/* 与行智播 — mobile layout. Loaded after the main bundle. */
@media (max-width: 860px) {
  html, body, #root, .app-shell {
    min-height: 100dvh;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
  body.nav-open {
    overflow: hidden;
  }
  #root:has(.auth-gate) .app-shell {
    display: none;
  }

  .auth-gate {
    background: #080b10;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    place-items: center;
  }
  .auth-card {
    width: 100%;
    padding: 22px 18px 20px;
  }
  .auth-card .MuiButton-root,
  .auth-card button[type="submit"] {
    min-height: 44px;
    width: 100%;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #0a0e14;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  }
  .desktop-toolbar { display: none !important; }
  .topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .page-actions { min-height: 40px; }
  .menu-toggle,
  .side-close {
    min-width: 44px;
    min-height: 44px;
  }

  .side {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: min(280px, 86vw);
    height: 100dvh;
    max-height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px));
    background: #0a0e14;
    border-right: 1px solid #232c3a;
    border-bottom: 0;
  }
  .side .brand {
    flex: none;
    min-width: 0;
  }
  .side .brand h1 { font-size: 15px; display: block; }
  .side-nav {
    flex: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: visible;
  }
  .side-nav .MuiButton-root {
    flex: none;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px;
    padding: 8px 12px !important;
    justify-content: flex-start !important;
    font-size: 14px !important;
  }
  .side-foot {
    margin: auto 0 0;
    flex-direction: column;
    align-items: stretch;
  }
  .side-user { padding-top: 8px; }
  .side-user .link-btn {
    min-height: 40px;
    padding: 8px 6px;
  }

  .main-inner {
    padding: 14px 12px calc(24px + env(safe-area-inset-bottom));
  }
  .banner-stack { padding: 0 12px; }
  .page-card { padding: 16px 14px; }

  .card-head { align-items: flex-start; }
  .head-actions,
  .live-now-meta .head-actions {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .gongping-page .card-head { align-items: center; }
  .gongping-page .head-actions {
    margin-left: auto;
    width: auto;
    flex-wrap: nowrap;
  }
  .head-actions .MuiButton-root,
  .live-wizard-actions .MuiButton-root,
  .script-bar .MuiButton-root,
  .live-bar .MuiButton-root,
  .chat-compose .MuiButton-root {
    min-height: 44px;
  }
  .live-wizard-actions .MuiButton-root {
    width: 100%;
  }

  input, textarea, select,
  .MuiInputBase-input,
  .MuiSelect-select {
    font-size: 16px !important;
  }
  .MuiFormControl-root,
  .MuiTextField-root {
    max-width: 100%;
  }

  .voice-list,
  .script-list {
    grid-template-columns: 1fr;
  }

  .rec-area { gap: 14px; }
  .rec-meta { min-width: 0; width: 100%; }
  .rec-btn { width: 100%; justify-content: center; }
  .guide-top,
  .pending-head,
  .live-now-meta {
    flex-wrap: wrap;
  }
  .pending-form { grid-template-columns: 1fr !important; }

  .script-bar { align-items: stretch; }
  .script-bar .MuiFormControl-root,
  .script-bar .MuiTextField-root {
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 100%;
  }
  .script-card.is-editing {
    min-height: calc(100dvh - 96px);
  }

  .rq-row {
    grid-template-columns: 24px 1fr auto;
    gap: 6px 10px;
  }
  .rq-text { min-width: 0; }
  .rq-gap { justify-content: flex-start; }

  .chat-compose {
    flex-wrap: wrap;
    align-items: stretch;
  }
  .chat-compose .MuiFormControl-root,
  .chat-compose .MuiTextField-root {
    flex: 1 1 100%;
  }
  .chat-compose .MuiButton-root { width: 100%; }
  .chat-list { max-height: 50vh; }

  .live-wizard-fields { max-width: none; }
  .live-now-text { font-size: 18px; }
  .live-now,
  .live-next { padding: 14px; }
  .live-log-list li {
    flex-direction: column;
    gap: 4px;
  }
  .live-log-list li span:last-child { margin-left: 0; }

  .play-btn { width: 40px; height: 40px; }

  .zb-sitebot .zb-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .zb-sitebot .zb-activate {
    width: 100%;
    min-height: 44px;
    text-align: center;
  }
}
