/* ============================================================
   CAIT live demo — hosted/mobile adaptation layer.
   The v2 UI itself is untouched (index.html is the approved
   prototype). This file only adapts the *presentation shell*:
   on phones the app fills the real viewport (no fake bezel /
   status bar); on desktop the device-frame presentation stays.
   ============================================================ */

/* --- phones / small screens: the app IS the screen ---
   (body-prefixed selectors: live.css loads before the page's inline <style>,
    so these must out-rank it on specificity, not source order) --- */
@media (max-width:720px){
  body{background:var(--screen-bg)}
  body .stage{padding:0;gap:0}
  body .rail{display:none}
  body .device{width:100%;max-width:100%;border-radius:0;padding:0;box-shadow:none;background:transparent}
  body .device__screen{height:100dvh;border-radius:0}
  body .notch,body .statusbar{display:none}
}

/* --- desktop (≥721px): the centered phone frame + reviewer rail from the
   base .stage layout in index.html — nothing to override here. (The CR-06
   command-center @media block lived here 7/17–7/17; pulled back to this
   prior view per the 7/17 Christina+Gina call. The Recognition + Checklists
   screens it surfaced as panels remain reachable inside the frame via the
   tabbar/jump nav — features unchanged, presentation only.) --- */

/* --- touch behavior for press-hold voice (iOS Safari cares) --- */
.tab.talk,#micBtn{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.tab,.talkfab{-webkit-tap-highlight-color:transparent}

/* --- demo login overlay (uses the app's own tokens) --- */
.login{position:absolute;inset:0;z-index:30;background:var(--app-bg);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px;text-align:center}
.login .mark{height:44px;width:auto;object-fit:contain;aspect-ratio:760/437;margin-bottom:18px}
.login h2{font-family:var(--font-head);font-size:26px;font-weight:600;margin:0 0 4px}
.login .sub{font-size:13px;color:var(--ink-2);margin:0 0 26px}
.login .who{display:flex;align-items:center;gap:12px;width:100%;max-width:300px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;box-shadow:var(--shadow-sm);margin-bottom:12px;text-align:left}
.login .who .nm{font-size:15px;font-weight:600}
.login .who .rl{font-size:12px;color:var(--ink-2)}
.login .go{width:100%;max-width:300px}
.login .foot{font-size:11.5px;color:var(--muted);margin-top:22px;max-width:300px}

/* --- live voice states --- */
.recdot.paused{animation:none;opacity:.5}
#recInterim{font-size:12.5px;color:var(--ink-2);margin-top:6px;min-height:16px;font-style:italic}
.transcribing{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--ink-2)}
.transcribing i{width:12px;height:12px;border-radius:50%;border:2px solid var(--line-2);border-top-color:var(--cait);animation:lspin .8s linear infinite;display:inline-block}
@keyframes lspin{to{transform:rotate(360deg)}}

/* --- chat composer becomes a real input (same skin as the .field div) --- */
input.field{border:1px solid var(--line);outline:none;color:var(--ink);font-family:var(--font);font-weight:400}
input.field::placeholder{color:var(--ink-2);opacity:1}
input.field:focus{border-color:var(--line-2)}

/* --- CR-01: Ask-vs-Note mode bar (two clearly-labeled options on chat entry) --- */
#modeBar{padding:10px 12px 0;flex:0 0 auto}
.modes{display:flex;gap:8px}
.modes button{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:2px;background:var(--surface);border:1px solid var(--line-2);border-radius:12px;padding:9px 12px;text-align:left}
.modes button b{font-size:13.5px;font-weight:600}
.modes button span{font-size:11px;color:var(--ink-2)}
.modes button.sel{background:var(--cait-050);border-color:var(--cait);box-shadow:var(--shadow-sm)}
.modes button.sel b{color:var(--cait-strong)}
.modehint{font-size:11px;color:var(--muted);margin:6px 3px 0}

/* --- CR-03: badges — tappable tiles, locked inventory, progress ---
   (body-prefixed where the page's inline styles must be out-ranked) --- */
button.badge{font-family:inherit;cursor:pointer}
.badge .e{position:relative}
/* 7/17 polish: vector badge icons (crisp at any DPI; stroke inherits the per-badge color) */
.badge .e svg{width:24px;height:24px;display:block}
#sheetBody .bsheet-e svg{width:30px;height:30px;display:block}
.badge .lk{position:absolute;right:-7px;bottom:-6px;width:18px;height:18px;border-radius:50%;background:var(--surface);border:1px solid var(--line-2);display:grid;place-items:center;color:var(--ink-2);box-shadow:var(--shadow-sm)}
.badge .lk svg{width:9px;height:9px;display:block}
body .badge.locked{opacity:1;border-style:dashed}
body .badge.locked .e{filter:grayscale(1);opacity:.55}
body .badge.locked .t{color:var(--ink-2)}
.bprog{height:4px;border-radius:2px;background:var(--surface-3);overflow:hidden;margin-top:7px}
.bprog i{display:block;height:100%;background:var(--cait);border-radius:2px}
.bpct{font-size:10px;color:var(--cait-strong);font-weight:600;margin-top:3px}

/* --- CR-13: field dictation mic — hold to dictate, transcript APPENDS --- */
.fmic{width:30px;height:30px;border-radius:50%;border:1px solid var(--line-2);background:var(--surface);color:var(--cait-strong);display:grid;place-items:center;flex:0 0 auto;cursor:pointer;touch-action:none;-webkit-user-select:none;user-select:none}
.fmic svg{width:14px;height:14px;display:block}
.fmic.rec{background:var(--neg);border-color:var(--neg);color:#fff;animation:fpulse 1s infinite}
@keyframes fpulse{50%{transform:scale(1.1)}}

/* --- CR-02: touchpoint rows — tappable, done state --- */
button.row.tp{font-family:inherit;cursor:pointer}
button.row.tp:disabled{cursor:default}
.tp.done .row__tx b{color:var(--ink-2)}
.tp.done .row__tx span{text-decoration:line-through;opacity:.7}
.tpcheck{width:26px;height:26px;border-radius:50%;background:var(--cait);color:var(--on-accent);display:grid;place-items:center;flex:0 0 auto}

/* --- CR-08: checklist rows + gamified completion --- */
button.row.cl{font-family:inherit;cursor:pointer}
.clbox{width:26px;height:26px;border-radius:50%;border:2px solid var(--line-2);background:var(--surface);flex:0 0 auto}
.cl.done .row__tx b{color:var(--ink-2);text-decoration:line-through;opacity:.75}
.cl-donecard .e{width:56px;height:56px;border-radius:18px;background:var(--cait-050);display:grid;place-items:center;font-size:26px;margin:2px auto 10px}
