/* Mobile app shell: one scroll region, no fixed controls covering content. */
.google-signin { display:flex; justify-content:center; align-items:center; gap:12px; width:100%; min-height:52px; padding:12px 18px; border-radius:14px; background:#fff; color:#192032; text-decoration:none; font-weight:650; }
.google-signin:hover { background:#edf0ff; }
.google-signin span { font-size:21px; color:#3769d6; }
.login { background:radial-gradient(ellipse at 30% 10%,#302c50 0,transparent 55%),#0c1018; }
.login-card { max-width:440px; padding:32px; border:1px solid #34394d; background:#141a25e8; box-shadow:0 24px 80px #0004; }
.login-card .brand { justify-content:center; }
.login-card h1 { font-size:29px; letter-spacing:-.8px; margin:20px 0 14px; }
.login-card > .muted { margin-bottom:26px; }
.login-emblem { display:grid; place-items:center; width:62px; height:62px; margin:28px auto 0; border-radius:20px; font-size:30px; background:linear-gradient(145deg,#aea1ff,#6257c4); color:#fff; }
#auth-status { font-size:13px; margin:14px 0; }
#token-login { margin-top:24px; border-top:1px solid #333b4d; padding-top:18px; text-align:left; }
#token-login summary { font-size:13px; color:#aeb8cb; }
#context-toggle { display:none; }
.voice-help { margin-top:6px; }
.voice-help summary { font-size:11px; color:#aeb8cb; min-height:24px; }
@media(max-width:999px) {
  html,body { height:100%; overflow:hidden; }
  #app { height:var(--app-height,100dvh); min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; overflow:hidden; padding:0; }
  .topbar { grid-row:1; position:relative; top:auto; height:auto; min-height:62px; padding:12px 18px; padding-top:max(12px,env(safe-area-inset-top)); margin:0; background:#111621; border-color:#252b3a; }
  .topbar .brand { font-size:16px; letter-spacing:3px; }
  .topbar-actions { gap:8px; }
  #new-chat { min-height:38px; padding:8px 12px; border-radius:12px; font-size:12px; }
  .topbar .pill { padding:4px 8px; font-size:10px; max-width:78px; }
  #views { grid-row:2; overflow:auto; overscroll-behavior:contain; min-height:0; padding:22px 18px 24px; scroll-padding:16px; }
  .view { width:100%; min-width:0; }
  h2 { font-size:26px; letter-spacing:-.7px; margin-bottom:10px; }
  .view > p { font-size:14px; line-height:1.6; }
  .chat-welcome { padding:4px 0 20px; }
  .chat-welcome .eyebrow { font-size:10px; letter-spacing:1.8px; }
  .chat-welcome h1 { font-size:34px; font-weight:600; margin:10px 0 8px; }
  .chat-welcome > p { margin:0; font-size:15px; color:#a8b2c7; }
  .starter-grid { gap:9px; margin:22px 0 0; }
  .starter-grid button { border-radius:16px; min-height:90px; padding:15px 13px; background:linear-gradient(140deg,#1b2232,#151b28); border-color:#30384b; }
  .starter-grid span { font-size:14px; line-height:1.35; }
  .starter-grid small { display:block; font-size:11px; line-height:1.4; margin-top:7px; color:#929fb7; }
  .context-bar { padding:12px 14px; margin-bottom:20px; border-radius:14px; background:#131925; }
  .context-heading { flex-wrap:nowrap; }
  #context-summary { font-size:12px; min-width:0; }
  #context-toggle { display:block; flex-shrink:0; min-height:36px; font-size:11px; padding:6px 8px; background:transparent; border-color:#343d52; }
  #context-options:not(.expanded) { display:none; }
  .context-selectors { grid-template-columns:1fr; gap:12px; }
  .context-selectors label:last-child { display:block; grid-column:auto; }
  .context-selectors label:last-child select { width:100%; margin-top:5px; }
  .context-selectors select { font-size:16px; }
  .composer { grid-row:3; position:relative; left:auto; right:auto; bottom:auto; margin:0; padding:10px 14px 8px; background:#131a26; border-top:1px solid #30384a; box-shadow:0 -6px 20px #0002; min-width:0; max-height:48vh; overflow:auto; }
  body.no-composer .composer { display:none; }
  .composer textarea { min-height:48px; height:52px; max-height:110px; resize:none; padding:12px; font-size:16px; border-radius:15px; background:#0e1420; }
  .composer-tools { display:flex; gap:8px; margin-top:8px; flex-wrap:wrap; }
  .composer-tools button { min-height:40px; padding:8px 11px; font-size:13px; border-radius:12px; }
  .composer-tools #send { min-width:72px; }
  .composer-hint { display:none; }
  .voice-help summary { font-size:10px; min-height:20px; }
  #dictation-status,#dictation-help { font-size:11px; line-height:1.35; }
  #dictation-status { max-height:45px; overflow:auto; }
  .attachment-list { max-height:65px; }
  .card { padding:18px; border-radius:18px; margin-bottom:14px; box-shadow:none; }
  .card h3 { font-size:18px; line-height:1.35; }
  .card p { font-size:14px; line-height:1.65; }
  .card label,.view form label { display:block; margin:14px 0; }
  .card input,.card textarea,.card select,.view form input:not([type=checkbox]),.view form select { width:100%; min-width:0; font-size:16px; }
  .card input[type=checkbox] { width:auto; }
  .card button { max-width:100%; white-space:normal; }
  #project-panel { padding:18px; }
  .messages { gap:16px; }
  .msg { padding:15px; max-width:100%; min-width:0; font-size:15px; line-height:1.65; border-radius:18px; overflow-wrap:anywhere; }
  .msg.user { max-width:90%; background:#35305b; }
  .msg.assistant { width:100%; background:#161d2b; }
  .read-aloud,.deliverables summary { font-size:12px; }
  .metric-table { display:block; max-width:100%; overflow:auto; }
  .login { height:var(--app-height,100dvh); min-height:0; overflow:auto; padding:24px; }
  .login-card { flex-shrink:0; padding:28px 22px; width:100%; }
  body.keyboard-open .tabbar { display:none; }
  body.keyboard-open .voice-help { display:none; }
  body.keyboard-open .composer { max-height:55vh; }
}
@media(max-width:359px) {
  #views { padding-left:12px; padding-right:12px; }
  .topbar { padding-left:12px; padding-right:12px; }
  .topbar .pill { display:none; }
  .starter-grid button { padding:12px; }
  .starter-grid small { font-size:10px; }
}

.message-body { white-space:normal; min-width:0; }
.message-body p { margin:0 0 12px; }
.message-body p:last-child { margin-bottom:0; }
.message-body h1,.message-body h2,.message-body h3 { font-size:20px; line-height:1.35; margin:20px 0 10px; letter-spacing:0; }
.message-body h1:first-child,.message-body h2:first-child,.message-body h3:first-child { margin-top:0; }
.message-body table { display:block; max-width:100%; overflow:auto; border-collapse:collapse; margin:16px 0; font-size:13px; }
.message-body th,.message-body td { padding:10px; border:1px solid #3a4359; text-align:left; min-width:90px; }
.message-body th { background:#232b40; }
.message-body pre { overflow:auto; white-space:pre-wrap; background:#0d1320; padding:12px; border-radius:10px; }
.message-body .bullet { padding-left:12px; }

.context-selectors { grid-template-columns:repeat(2,minmax(0,1fr)); }
.composer-options { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:6px; }
.response-mode { display:flex; align-items:center; gap:6px; font-size:11px; }
.response-mode select { display:inline-block; margin:0; min-height:28px; padding:3px 7px; font-size:12px; border-radius:8px; }
.composer-options .voice-help { margin:0; }
.composer-options .voice-help[open] { max-width:65%; }
@media(max-width:999px) { .context-selectors { grid-template-columns:1fr; } .response-mode select { font-size:13px; } }
