/* Hello Again, web. Same look as the Android app: calm neutrals, one blue kept for what you can
   press and what's filling up, and a night stage where they appear. */
:root {
  --bg: #F5F6F8; --card: #FFFFFF; --line: #E1E4EA; --ink: #10141F; --dim: #5A6273; --faint: #9AA1AE;
  --accent: #1F5FD6; --on-accent: #FFFFFF; --soft: #EDEFF3; --glow: #2A93D0; --warn: #C2412D; --rec: #D93A2B;
  --night: #02050E; --night-panel: #0B1120; --night-line: #1D2638; --pearl: #E9EEF6; --mist: #8D97AA; --night-faint: #4F5A6E; --night-glow: #4FA9EE;
  --r: 18px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #05070C; --card: #0E1219; --line: #1C222E; --ink: #ECEFF4; --dim: #98A0AE; --faint: #5A6372;
    --accent: #5A9BFF; --on-accent: #030B1C; --soft: #151A24; --glow: #56B8EE; --warn: #F08A72; --rec: #FF5A47;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }

#app { min-height: 100%; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; max-width: 680px; width: 100%; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.scroll { flex: 1; padding: 0 20px 28px; }
.pad-top { padding-top: calc(var(--safe-top) + 12px); }

/* type */
.title { font-weight: 300; font-size: 30px; line-height: 1.2; letter-spacing: -0.01em; margin: 6px 0 8px; }
.title.l { font-size: 38px; } .title.m { font-size: 24px; } .title.s { font-size: 20px; }
.label { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; color: var(--dim); font-weight: 500; margin: 22px 0 10px; }
.body { color: var(--dim); font-size: 15px; line-height: 1.45; margin: 6px 0; }
.body.ink { color: var(--ink); } .body.small { font-size: 13px; } .body.warn { color: var(--warn); }
.dim { color: var(--dim); } .faint { color: var(--faint); } .warn { color: var(--warn); } .glow { color: var(--glow); }

/* top bar */
.topbar { display: flex; align-items: center; gap: 4px; padding: calc(var(--safe-top) + 6px) 8px 6px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.topbar .t { flex: 1; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { border: 0; background: none; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.iconbtn:active { background: var(--soft); }
.iconbtn svg { width: 24px; height: 24px; }

/* buttons */
.btn { appearance: none; border: 0; border-radius: 26px; min-height: 52px; padding: 0 24px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.block { width: 100%; } .btn:disabled { background: var(--line); color: var(--faint); cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 400; }
.btn.rec { background: var(--rec); color: #fff; }
.btn.danger { background: var(--warn); color: #fff; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; }
.link { background: none; border: 0; color: var(--accent); font-weight: 500; font-size: 15px; padding: 8px 2px; cursor: pointer; text-align: left; }
.link.warn { color: var(--warn); }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 10px 0; }
.card.tap { cursor: pointer; } .card.tap:active { transform: scale(.99); }
.card h3 { margin: 0 0 4px; font-weight: 400; font-size: 18px; }
.prompt { display: flex; align-items: center; gap: 10px; }
.prompt .k { font-size: 12px; color: var(--dim); font-weight: 500; }
.prompt .q { font-size: 16px; line-height: 1.38; margin-top: 2px; }
.prompt .chev { color: var(--faint); }
.note { background: var(--soft); border-radius: 14px; padding: 14px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 18px; padding: 8px 14px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on::before { content: "\2713  "; }
.tog { font-size: 12px; border-radius: 12px; padding: 4px 9px; border: 1px solid var(--line); color: var(--faint); background: transparent; cursor: pointer; }
.tog.on { color: var(--accent); background: var(--soft); border-color: var(--soft); font-weight: 500; }
.tog.on::before { content: "\2713 "; }

/* fields */
.field { display: block; margin: 8px 0; }
.field span { display: block; font-size: 13px; color: var(--dim); margin: 0 0 4px 4px; }
.field input, .field textarea, .field select { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; font-size: 16px; color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
::placeholder { color: var(--faint); }

/* progress */
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar.done > i { background: var(--glow); }
.ring { position: relative; flex: none; } .ring svg { display: block; transform: rotate(-90deg); } .ring b { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 300; font-size: 24px; }
.mini { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-top: 6px; }

/* checklists */
.check { display: flex; gap: 12px; align-items: center; padding: 9px 2px; cursor: pointer; border-radius: 12px; }
.check i { flex: none; width: 24px; height: 24px; border-radius: 12px; background: var(--line); display: grid; place-items: center; color: var(--on-accent); font-style: normal; font-size: 14px; }
.check.done i { background: var(--accent); } .check.done span { color: var(--dim); }
.check span { flex: 1; font-size: 15px; line-height: 1.4; }

/* avatars */
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--soft); border: 1.5px solid color-mix(in srgb, var(--glow) 70%, transparent); display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 300; font-size: 22px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.head { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-top) + 10px) 0 6px; }
.head .who { flex: 1; cursor: pointer; } .head .who b { display: block; font-weight: 300; font-size: 21px; } .head .who small { color: var(--dim); font-size: 13px; }

/* the bottom tabs */
.tabs { position: sticky; bottom: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: var(--safe-bottom); z-index: 5; }
.tabs button { flex: 1; border: 0; background: none; padding: 9px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--faint); font-size: 12px; cursor: pointer; }
.tabs button.on { color: var(--ink); font-weight: 500; } .tabs button.on svg { color: var(--accent); }
.tabs svg { width: 24px; height: 24px; }
.bottombar { position: sticky; bottom: 0; background: var(--bg); padding: 12px 20px calc(var(--safe-bottom) + 12px); display: flex; gap: 10px; z-index: 5; }

/* recording */
.cambox { position: relative; border-radius: 20px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; }
.cambox video { width: 100%; height: 100%; object-fit: cover; }
.shutter { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: none; padding: 6px; cursor: pointer; }
.shutter i { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--rec); transition: border-radius .15s, transform .15s; }
.shutter.photo i { background: #fff; } .shutter.on i { border-radius: 8px; transform: scale(.55); }
.camflip { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.4); color: #fff; }
.camtime { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.55); color: #fff; border-radius: 12px; padding: 4px 10px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.camtime::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--rec); }
.camwarn { position: absolute; left: 12px; right: 12px; bottom: 104px; text-align: center; background: rgba(138,42,22,.85); color: #fff; border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.flash { position: absolute; inset: 0; background: rgba(255,255,255,.6); pointer-events: none; }
.meter { display: flex; gap: 3px; height: 36px; align-items: center; }
.meter i { flex: 1; border-radius: 2px; background: var(--line); }
.meter i.on { background: var(--accent); } .meter i.hot { background: var(--warn); }
.mic { width: 72px; height: 72px; border-radius: 50%; background: var(--rec); border: 0; color: #fff; display: grid; place-items: center; margin: 4px auto; cursor: pointer; }
.mic svg { width: 32px; height: 32px; }
.take { display: flex; gap: 12px; align-items: center; }
.thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--soft); overflow: hidden; flex: none; display: grid; place-items: center; color: var(--accent); position: relative; cursor: pointer; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb.sm { width: 56px; height: 56px; }

/* the archive list */
.erow { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px; margin: 10px 0; cursor: pointer; }
.erow .k { font-size: 12px; color: var(--dim); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erow .t { font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.erow .m { font-size: 12px; color: var(--faint); }

/* dialogs */
.veil { position: fixed; inset: 0; background: rgba(4,6,12,.55); display: grid; place-items: end center; z-index: 50; padding: 0; animation: fade .15s; }
@media (min-width: 640px) { .veil { place-items: center; } }
.sheet { background: var(--card); color: var(--ink); width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; padding: 22px 20px calc(var(--safe-bottom) + 18px); max-height: 88vh; overflow: auto; }
@media (min-width: 640px) { .sheet { border-radius: 22px; } }
.sheet h2 { font-weight: 400; font-size: 21px; margin: 0 0 10px; }
.sheet .acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 14px; }
.sheet .acts button { background: none; border: 0; color: var(--accent); font-weight: 600; font-size: 15px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.sheet .acts button.warn { color: var(--warn); } .sheet .acts button.dim { color: var(--dim); font-weight: 400; }
.viewer { position: fixed; inset: 0; background: #000; z-index: 60; display: grid; place-items: center; }
.viewer video, .viewer img { max-width: 100%; max-height: 100%; }
.viewer .x { position: absolute; top: calc(var(--safe-top) + 8px); right: 8px; background: rgba(0,0,0,.5); color: #fff; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* the night stage */
.stage { background: var(--night); color: var(--pearl); position: relative; }
.stage .topbar { background: transparent; }
.stage .iconbtn { color: var(--pearl); }
.particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage .field input { background: var(--night-panel); border-color: var(--night-line); color: var(--pearl); }
.stage .chip { background: rgba(11,17,32,.7); border-color: var(--night-line); color: var(--pearl); }
.frame { position: relative; width: 82%; max-width: 380px; aspect-ratio: .78; margin: 6px auto 0; }
.frame .inside { position: absolute; inset: 12px; border-radius: 50%; overflow: hidden; background: var(--night-panel); }
.frame .inside video, .frame .inside img { width: 100%; height: 100%; object-fit: cover; }
.frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.caption { text-align: center; font-weight: 300; font-size: 21px; margin: 16px 0 4px; }
.subcap { text-align: center; color: var(--mist); font-size: 13px; }
.askbar { display: flex; gap: 10px; align-items: center; padding: 12px 16px; }
.askbar input { flex: 1; background: var(--night-panel); border: 1px solid var(--night-line); color: var(--pearl); border-radius: 26px; padding: 14px 18px; font-size: 16px; }
.askbar button { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--pearl); color: var(--night); display: grid; place-items: center; cursor: pointer; }
.qbig { font-weight: 300; font-size: 28px; line-height: 1.25; color: var(--pearl); margin: 6px 0 0; }
.cue { margin-top: 10px; border-radius: 12px; background: var(--night-panel); border: 1px solid color-mix(in srgb, var(--night-glow) 35%, transparent); padding: 10px 12px; font-size: 15px; }
.sbtn { flex: 1; min-height: 56px; border-radius: 28px; border: 1px solid var(--night-line); background: transparent; color: var(--mist); font-size: 16px; cursor: pointer; }
.sbtn.main { flex: 2; background: var(--pearl); color: var(--night); border: 0; font-weight: 600; font-size: 17px; }

/* the welcome hero */
.hero { position: relative; border-radius: 28px; overflow: hidden; background: var(--night); aspect-ratio: 1.15; margin-top: calc(var(--safe-top) + 8px); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .particles { z-index: 1; }
.install { display: flex; gap: 12px; align-items: center; background: var(--soft); border-radius: 16px; padding: 12px 14px; margin: 14px 0; font-size: 14px; color: var(--ink); }
.install img { width: 40px; height: 40px; border-radius: 10px; }

.hidden { display: none !important; }
.center { text-align: center; }
.spacer { height: 24px; }
