/* Qingniao R9 generic mobile safety base.
 * Minimal by design: no sidebar/nav redesign, no form relayout.
 */
@media (max-width: 767px) {
  html, body { min-width: 0 !important; }
  img, svg, video, canvas { max-width: 100%; }
  .wrapper, .wrapper-md, .container-fluid { max-width: 100%; box-sizing: border-box; }

  .modal-dialog { max-width: calc(100vw - 16px) !important; margin: 8px auto !important; }
  .modal-content {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    display: flex;
    flex-direction: column;
  }
  .modal-body { overflow: auto; -webkit-overflow-scrolling: touch; }

  .layui-layer:not(.layui-layer-tips) { max-width: calc(100vw - 16px) !important; }
  .layui-layer-page .layui-layer-content {
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
    overflow: auto !important;
  }
}
