/* Mobile-first shell for iPhone 17 Pro Max (440x956 CSS) and similar phones.
   Wide screens show the same phone column; desktop layout is no longer the primary design. */
:root{--keyboard-inset:0px;--dock-nav:calc(64px + env(safe-area-inset-bottom,0px));}
html,body.mobile-first{min-height:100dvh;min-height:100svh;background:#e8ebe3;}
body.mobile-first{padding:0;}
body.mobile-first .app-shell{
  display:flex;flex-direction:column;
  width:min(100%,440px);
  margin:0 auto;
  min-height:100dvh;
  min-height:100svh;
  background:var(--cream);
  box-shadow:0 0 0 1px var(--line);
}
body.mobile-first .sidebar{
  position:fixed;inset:auto 0 0;left:50%;transform:translateX(-50%);
  width:min(100%,440px);height:auto;z-index:40;
  display:block;padding:6px 8px calc(8px + env(safe-area-inset-bottom,0px));
  border:0;border-top:1px solid #dce4d6;background:#fafbf6f7;backdrop-filter:blur(16px);
}
body.mobile-first .sidebar>.brand,
body.mobile-first .sidebar>.nav-label,
body.mobile-first .sidebar>.device-hint,
body.mobile-first .sidebar>.sidebar-note,
body.mobile-first .sidebar>.legacy-link,
body.mobile-first .sidebar>.profile{display:none;}
body.mobile-first .primary-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;}
body.mobile-first .nav-item{flex-direction:column;justify-content:center;gap:4px;padding:8px 2px;font-size:10px;border-radius:10px;min-height:52px;}
body.mobile-first .nav-item>span{font-size:18px;text-align:center;}
body.mobile-first .nav-item.active,body.mobile-first .nav-item[aria-current=page]{background:#e2eee3;color:var(--teal);box-shadow:none;}
body.mobile-first .main-content{
  padding:calc(8px + env(safe-area-inset-top,0px)) 14px calc(var(--dock-nav) + 12px);
  max-width:none;margin:0;width:100%;
}
body.mobile-first .topbar{min-height:52px;padding-top:2px;border-bottom:1px solid var(--line);}
body.mobile-first .breadcrumb{font-size:10px;}
body.mobile-first .page-heading{padding:16px 0 12px;}
body.mobile-first h1{font-size:26px;letter-spacing:-.6px;}
body.mobile-first .subtitle{font-size:13px;max-width:34em;}
body.mobile-first .practice-layout,body.mobile-first .settings-layout{display:grid;grid-template-columns:1fr;gap:14px;}
body.mobile-first .setup-fields{display:grid;grid-template-columns:1fr;gap:12px;margin-top:12px;}
body.mobile-first .start-english{width:100%;min-height:52px;font-size:17px;border-radius:14px;}
body.mobile-first .setup-lead{font-size:13px;line-height:1.7;color:var(--muted);margin:8px 0 0;}
body.mobile-first .heading-decoration{display:none;}
body.mobile-first .conversation{display:flex;flex-direction:column;min-height:calc(100dvh - 210px);}
body.mobile-first .transcript{min-height:180px;max-height:none;flex:1;padding:16px 14px;}
body.mobile-first .composer-dock{
  position:sticky;bottom:calc(var(--dock-nav) + var(--keyboard-inset));
  z-index:20;background:#fcfcf7;border-top:1px solid #eff1e9;
  padding-bottom:2px;
}
body.mobile-first .voice-controls{padding:10px 12px;flex-wrap:wrap;}
body.mobile-first .voice-state{width:100%;font-size:12px;line-height:1.6;}
body.mobile-first .voice-actions{width:100%;display:flex;justify-content:space-between;gap:8px;}
body.mobile-first .voice-actions .icon-button,body.mobile-first .microphone,body.mobile-first .composer-footer .button{min-height:44px;}
body.mobile-first .composer{margin:0 10px 10px;}
body.mobile-first .composer textarea{font-size:16px;min-height:52px;max-height:28dvh;}
body.mobile-first .toast{bottom:calc(var(--dock-nav) + 12px + var(--keyboard-inset));}
body.mobile-first .tip-card,body.mobile-first .heading-decoration{display:none;}
body.mobile-first .correction-card{min-height:0;padding:16px;}
body.mobile-first .offline-note{font-size:12px;line-height:1.7;}
body.mobile-first.has-session #sessionSetup{display:none;}
body.mobile-first .capability-banner,body.mobile-first .install-hint{
  border-radius:14px;padding:12px 14px;margin:0 0 12px;font-size:13px;line-height:1.6;
}
body.mobile-first .capability-banner{background:#f7efe3;border:1px solid #ead9bb;color:#5c4a2e;}
body.mobile-first .install-hint{background:#eef4ea;border:1px solid #d5e3cc;color:#355348;}
body.mobile-first .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
body.mobile-first .form-grid{grid-template-columns:1fr;}
@media (orientation:landscape) and (max-height:500px){
  body.mobile-first .app-shell,body.mobile-first{width:100%;max-width:none;}
  body.mobile-first .sidebar{width:100%;left:0;transform:none;}
  body.mobile-first .page-heading{padding:8px 0;}
  body.mobile-first h1{font-size:20px;}
  body.mobile-first .conversation{min-height:calc(100dvh - 150px);}
  body.mobile-first .nav-item{min-height:44px;flex-direction:row;font-size:11px;}
  body.mobile-first .transcript{padding:10px 12px;}
}
@media (display-mode:standalone){
  body.mobile-first .install-hint{display:none!important;}
}
