/* ============================================================
   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}
}

/* --- 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:300}
input.field::placeholder{color:var(--ink-2);opacity:1}
input.field:focus{border-color:var(--line-2)}
