@font-face { font-family: "Geist"; src: url(/fonts/geist.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/geist-mono.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --ink-950: #0b0a10; --ink-900: #100f16; --ink-850: #15141c; --ink-800: #1b1a23; --ink-700: #24232e; --ink-600: #302f3b;
  --line: #ffffff12; --line-strong: #ffffff1f;
  --fg: #ecebf2; --fg-muted: #a09eac; --fg-faint: #6a6876;
  --brand: #8d52fc; --brand-strong: #6c28ec; --brand-soft: #8d52fc24; --brand-glow: #8d52fc59;
  --ok: #3fcf8e; --warn: #f2b54a; --bad: #f0686b;
  --r-md: 10px; --r-lg: 14px; --r-xl: 18px; --r-2xl: 24px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { background: #0b0a10; }
body {
  background: var(--ink-950); color: var(--fg); font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
#app { min-height: 100%; }

/* ---------- shared bits ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 6px 24px var(--brand-glow); }
.brand small { color: var(--fg-faint); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-left: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: var(--r-lg); font-weight: 600; transition: transform .12s, background .15s, opacity .15s; user-select: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(180deg, var(--brand), var(--brand-strong)); color: #fff;
  box-shadow: 0 8px 28px -6px var(--brand-glow), inset 0 1px 0 #ffffff33; }
.btn-ghost { background: var(--ink-800); border: 1px solid var(--line-strong); }
.btn-danger { background: #f0686b1f; color: var(--bad); border: 1px solid #f0686b40; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }

.card { background: linear-gradient(180deg, var(--ink-850), var(--ink-900)); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px;
  background: #0b0a10b3; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 600; white-space: nowrap;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.chip svg.i { width: 14px; height: 14px; }
.chip.live { color: #fff; background: #f0686bd9; border-color: transparent; }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); } .chip.bad { color: var(--bad); } .chip.brand { color: #c7a8ff; }
@keyframes pulse { 50% { opacity: .35; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--fg-muted); font-weight: 500; }
.input { height: 48px; width: 100%; padding: 0 14px; border-radius: var(--r-lg); background: var(--ink-950);
  border: 1px solid var(--line-strong); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.code-input { font-family: var(--mono); font-size: 24px; letter-spacing: .3em; text-align: center; text-transform: uppercase; height: 58px; }

/* ---------- home ---------- */
.home { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: calc(20px + var(--safe-t)) 16px calc(28px + var(--safe-b)); }
.home header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
  background: var(--brand-soft); color: #c7a8ff; border: 1px solid #8d52fc3d; }
.section-title { font-size: 12px; color: var(--fg-faint); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin: 28px 4px 10px; }
.saved { display: grid; gap: 8px; }
.saved-item { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--r-xl); background: var(--ink-900); border: 1px solid var(--line); }
.saved-item .dot { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--ink-800); color: #c7a8ff; }
.saved-item b { font-weight: 600; display: block; }
.saved-item small { color: var(--fg-faint); font-family: var(--mono); }
.saved-item .grow { flex: 1; min-width: 0; text-align: left; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--fg-muted); }
.icon-btn:hover { background: var(--ink-800); color: var(--fg); }
.foot { margin-top: 30px; text-align: center; color: var(--fg-faint); font-size: 12.5px; }
.foot p { margin: 6px 0; }
.foot a { color: var(--fg-muted); }

/* ---------- full-screen stage (camera + viewer) ---------- */
.stage { position: fixed; inset: 0; background: #000; overflow: hidden; display: flex; flex-direction: column; }
.stage video.feed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.stage.contain video.feed { object-fit: contain; }
.stage .shade-t, .stage .shade-b { position: absolute; left: 0; right: 0; pointer-events: none; }
.stage .shade-t { top: 0; height: 160px; background: linear-gradient(#000000b3, transparent); }
.stage .shade-b { bottom: 0; height: 260px; background: linear-gradient(transparent, #000000d9); }
.topbar { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; padding: calc(12px + var(--safe-t)) 12px 0; }
.topbar .title { display: block; min-width: 0; flex: 1; text-align: left; }
.topbar .title b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title small { color: #ffffffa6; font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px 0; position: relative; z-index: 3; }
.glass-btn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: #0b0a1099; border: 1px solid var(--line-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.spacer { flex: 1; }

.dock { position: relative; z-index: 3; padding: 0 12px calc(14px + var(--safe-b)); display: grid; gap: 10px; }
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 66px; border-radius: var(--r-xl);
  background: #15141cbf; border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 600; color: #ffffffd9;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: background .15s, transform .1s, color .15s; position: relative; user-select: none; -webkit-user-select: none; }
.tool:active { transform: scale(.95); }
.tool svg.i { width: 22px; height: 22px; }
.tool.on { background: #8d52fce0; border-color: transparent; color: #fff; box-shadow: 0 8px 26px -8px var(--brand-glow); }
.tool.alert { background: #f0686be6; border-color: transparent; color: #fff; }
.tool.warnon { background: #f2b54ae0; color: #1b1300; border-color: transparent; }
.tool .badge { position: absolute; top: 7px; right: 12px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }

.talk { height: 64px; border-radius: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 16px;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong)); color: #fff; box-shadow: 0 12px 34px -10px var(--brand-glow), inset 0 1px 0 #ffffff33;
  user-select: none; -webkit-user-select: none; touch-action: none; transition: transform .1s; }
.talk.active { background: linear-gradient(180deg, #ff7a7d, #e04448); transform: scale(.98); box-shadow: 0 0 0 6px #f0686b33, 0 12px 34px -10px #f0686b; }
.talk svg.i { width: 24px; height: 24px; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

.center-msg { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: 24px; pointer-events: none; }
.center-msg > div { max-width: 320px; }
.center-msg b { display: block; font-size: 18px; margin: 14px 0 4px; }
.center-msg p { margin: 0; color: #ffffffa6; font-size: 14px; }
.spinner { width: 42px; height: 42px; margin: 0 auto; border-radius: 50%; border: 3px solid #ffffff26; border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.banner { position: relative; z-index: 4; margin: 10px 12px 0; padding: 12px 14px; border-radius: var(--r-xl); display: flex; align-items: center; gap: 12px;
  background: #f0686be6; color: #fff; font-weight: 600; animation: pop .25s ease-out; }
.banner.brand { background: #8d52fce6; }
.banner .grow { flex: 1; min-width: 0; }
.banner small { display: block; font-weight: 500; opacity: .85; }
.banner button { background: #ffffff2e; border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 13px; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } }

/* camera code card */
.pair { position: relative; z-index: 3; margin: 12px 12px 0; padding: 14px; display: flex; align-items: center; gap: 14px;
  background: #0b0a10b8; border: 1px solid var(--line-strong); border-radius: var(--r-2xl); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.pair .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-muted); font-weight: 600; }
.pair .code { font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: .12em; line-height: 1.15; }
.pair .grow { flex: 1; min-width: 0; }
.pair .acts { display: flex; gap: 6px; }
.meter { height: 4px; border-radius: 2px; background: #ffffff1f; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; border-radius: 2px; }

/* camera setup */
.setup { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 16px calc(24px + var(--safe-b)); }
.setup header { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.setup .card { padding: 18px; display: grid; gap: 14px; }
.setup h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.setup p.lead { margin: -6px 0 4px; color: var(--fg-muted); }

/* sleep overlay */
.sleep { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: calc(40px + var(--safe-b)); color: #ffffff40; font-size: 12px; gap: 6px; }
.sleep .dot { width: 6px; height: 6px; border-radius: 50%; background: #f0686b80; animation: pulse 2s infinite; }

/* ---------- sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: #00000099; display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
.sheet { width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; background: var(--ink-900); border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: 26px 26px 0 0; padding: 8px 16px calc(20px + var(--safe-b)); animation: up .24s cubic-bezier(.2,.9,.3,1); overscroll-behavior: contain; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--ink-600); margin: 4px auto 10px; }
.sheet h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet .sub { font-size: 12px; color: var(--fg-faint); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin: 18px 2px 8px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.grid-snd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.snd { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--r-xl); background: var(--ink-800);
  border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; text-align: center; transition: transform .1s, background .15s; }
.snd:active { transform: scale(.95); }
.snd svg.i { width: 24px; height: 24px; color: #c7a8ff; }
.snd.playing { background: var(--brand); border-color: transparent; color: #fff; }
.snd.playing svg.i { color: #fff; }
.snd.danger svg.i { color: var(--bad); }
.list { display: grid; gap: 6px; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r-lg); }
.li .grow { flex: 1; min-width: 0; }
.li b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li small { color: var(--fg-faint); font-size: 12px; }
.empty { color: var(--fg-faint); font-size: 13.5px; padding: 14px; text-align: center; background: var(--ink-850); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }

.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r-lg); }
.toggle-row + .toggle-row { margin-top: 6px; }
.toggle-row .grow { flex: 1; min-width: 0; }
.toggle-row b { font-weight: 600; display: block; font-size: 14.5px; }
.toggle-row small { color: var(--fg-faint); font-size: 12.5px; display: block; line-height: 1.35; }
.toggle-row > svg.i { color: #c7a8ff; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--ink-600); transition: background .18s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .18s; box-shadow: 0 2px 6px #0006; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.range { width: 100%; accent-color: var(--brand); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--ink-950); border: 1px solid var(--line); border-radius: var(--r-lg); }
.seg button { height: 38px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--fg-muted); }
.seg button.on { background: var(--ink-700); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%), linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }

.alert-item { display: flex; gap: 12px; padding: 8px; background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r-lg); align-items: center; }
.alert-item img, .alert-item .ph { width: 96px; height: 54px; object-fit: cover; border-radius: 10px; background: var(--ink-950); flex: none; display: grid; place-items: center; }
.alert-item b { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.alert-item small { color: var(--fg-faint); font-size: 12px; }
.alert-item .tag { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.alert-item .tag.tamper { background: var(--bad); }

.qr { background: #fff; border-radius: 20px; padding: 14px; width: min(260px, 70vw); margin: 4px auto 12px; }
.qr svg { display: block; width: 100%; height: auto; }
.qr-code { text-align: center; font-family: var(--mono); font-size: 22px; letter-spacing: .15em; margin: 0 0 4px; }
.qr-label { text-align: center; color: var(--fg-muted); font-size: 13px; margin: 0 0 14px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 60; left: 0; right: 0; top: calc(10px + var(--safe-t)); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: 440px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px;
  background: #1b1a23f2; border: 1px solid var(--line-strong); box-shadow: 0 16px 40px -12px #000; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  font-size: 14px; font-weight: 500; animation: pop .22s ease-out; }
.toast img { width: 64px; height: 36px; border-radius: 8px; object-fit: cover; }
.toast.bad { border-color: #f0686b66; }
.toast.ok svg.i { color: var(--ok); } .toast.bad svg.i { color: var(--bad); } .toast.warn svg.i { color: var(--warn); }
.toast .grow { flex: 1; min-width: 0; }
.toast small { display: block; color: var(--fg-muted); font-size: 12px; }

.stats { position: relative; z-index: 3; margin: 8px 12px 0; font-family: var(--mono); font-size: 11px; color: #ffffffb3; display: flex; gap: 10px; flex-wrap: wrap; }

@media (min-width: 760px) {
  .stage .dock { max-width: 560px; width: 100%; margin: 0 auto; }
  .tools { grid-template-columns: repeat(8, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
video.mirror { transform: scaleX(-1); }
.stage .tool.wide { grid-column: span 2; }
.flash { position: absolute; inset: 0; background: #fff; z-index: 5; pointer-events: none; animation: flash .35s ease-out forwards; }
@keyframes flash { to { opacity: 0; } }
.tap-sound { position: absolute; z-index: 4; left: 50%; top: 45%; transform: translate(-50%, -50%); }
.center-msg svg.i { width: 40px; height: 40px; color: #c7a8ff; }

/* ---------- performance: no live blur over moving video ----------
   backdrop-filter forces the phone to re-blur every video frame behind each
   control; solid translucent fills look the same and cost nothing. */
.stage .chip, .stage .glass-btn, .stage .tool, .stage .pair, .stage .toast {
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.stage .chip { background: #0b0a10d9; }
.stage .chip.live { background: #e5585b; border-color: transparent; }
.stage .glass-btn { background: #0b0a10cc; }
.stage .tool { background: #15141ce6; }
.stage .tool.on { background: #8d52fc; }
.stage .tool.alert { background: #e5585b; }
.stage .tool.warnon { background: #f2b54a; }
.stage .pair { background: #0b0a10e6; }
.stage video.feed { transform: translateZ(0); }
.stage video.feed.mirror { transform: scaleX(-1) translateZ(0); }
.topbar button.chip { cursor: pointer; }

.lead-sm { color: var(--fg-muted); font-size: 13px; margin: 8px 2px 0; line-height: 1.45; }
.seg-wrap { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.seg-wrap button { height: auto; min-height: 40px; padding: 6px 4px; line-height: 1.2; }
.li .btn { height: 36px; padding: 0 12px; font-size: 13px; }

/* ---------- home: live status + install ---------- */
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-faint); display: inline-block; margin-right: 6px; vertical-align: 1px; }
.status-dot.live { background: var(--ok); box-shadow: 0 0 0 3px #3fcf8e33; animation: pulse 1.6s infinite; }
.status-dot.gone { background: transparent; border: 1px solid var(--fg-faint); }
.saved-item.live { border-color: #3fcf8e40; }
.resume { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; border-color: #3fcf8e40; }
.resume .ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: #3fcf8e1f; color: var(--ok); flex: none; }
.resume b { display: block; font-weight: 600; }
.resume span { color: var(--fg-muted); font-size: 13px; }
.resume .btn { margin-left: auto; height: 40px; }
.install { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin: 0 0 12px; }
.install .ico { width: 44px; height: 44px; border-radius: 13px; flex: none; }
.install b { display: block; font-weight: 600; font-size: 14.5px; }
.install span { color: var(--fg-muted); font-size: 12.5px; line-height: 1.35; display: block; }
.install .acts { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.install .btn { height: 38px; padding: 0 14px; }
.steps { display: grid; gap: 10px; counter-reset: s; margin: 4px 0 10px; }
.step { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 14.5px; }
.step::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.step svg.i { color: #c7a8ff; margin-left: auto; }

/* boot splash shown until the first view renders (matches the iOS launch image) */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--ink-950); }
.boot img { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 10px 40px var(--brand-glow); }
.update-bar { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 18px; background: #1b1a23; border: 1px solid var(--line-strong); box-shadow: 0 16px 40px -12px #000; font-weight: 600; font-size: 14px; animation: pop .22s ease-out; }
.update-bar .grow { flex: 1; min-width: 0; }
.update-bar small { display: block; color: var(--fg-muted); font-weight: 500; font-size: 12.5px; }
.update-bar .btn { height: 38px; padding: 0 14px; }
.center-msg .btn { pointer-events: auto; margin-top: 14px; }

/* ---------- QR scanner ---------- */
.scan { position: fixed; inset: 0; z-index: 80; background: #000; animation: fade .18s; }
.scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-top { position: absolute; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; display: flex; justify-content: flex-end; }
.scan-frame { position: absolute; left: 50%; top: 46%; width: min(68vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 28px; box-shadow: 0 0 0 100vmax #0000008c; }
.scan-frame i { position: absolute; width: 44px; height: 44px; border: 4px solid var(--brand); }
.scan-frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 28px; }
.scan-frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 28px; }
.scan-frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 28px; }
.scan-frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 28px; }
.scan-hint { position: absolute; left: 16px; right: 16px; bottom: calc(40px + var(--safe-b)); text-align: center; display: grid; gap: 4px; }
.scan-hint b { font-size: 17px; }
.scan-hint span { color: #ffffffb3; font-size: 13.5px; }
.perm-row .chip { margin-left: auto; }
.perm-row .chip.ok svg.i, .perm-row .chip.bad svg.i { width: 14px; height: 14px; }
.home header .acts { display: flex; gap: 8px; align-items: center; }
video.feed.stalled { filter: saturate(.6) brightness(.85); transition: filter .3s; }

/* ---------- legal / static pages ---------- */
.legal { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: calc(18px + var(--safe-t)) 18px calc(30px + var(--safe-b)); }
.legal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.legal-head .btn { height: 40px; }
.legal article { line-height: 1.65; color: #d8d6e2; }
.legal h1 { font-size: clamp(30px, 6vw, 40px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 6px; color: var(--fg); }
.legal h2 { font-size: 19px; letter-spacing: -.01em; margin: 30px 0 8px; color: var(--fg); }
.legal .updated { color: var(--fg-faint); font-size: 13.5px; margin: 0 0 22px; }
.legal a { color: #c7a8ff; text-decoration: underline; text-underline-offset: 3px; }
.legal a.btn, .legal a.brand { text-decoration: none; color: inherit; }
.legal a.btn-primary { color: #fff; }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); vertical-align: top; }
.legal th { color: var(--fg-muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.legal-foot { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--fg-faint); font-size: 13px; }
.legal-foot nav, .foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; justify-content: center; }
.legal-foot nav { justify-content: flex-start; }
.legal-foot a, .foot-links a { color: var(--fg-muted); text-decoration: none; }
.legal-foot a:hover, .foot-links a:hover { color: var(--fg); }

/* static intro shown to crawlers / before the app boots (hidden under the splash) */
.seo { max-width: 680px; margin: 0 auto; padding: 24px 18px; color: var(--fg-muted); }
.seo h1 { color: var(--fg); }

/* cookie notice */
.cookie-bar { position: fixed; z-index: 65; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); max-width: 560px; margin: 0 auto; display: flex; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 18px; background: #1b1a23; border: 1px solid var(--line-strong); box-shadow: 0 16px 40px -12px #000; font-size: 13.5px; color: var(--fg-muted); animation: pop .22s ease-out; }
.cookie-bar a { color: #c7a8ff; }
.cookie-bar .btn { height: 38px; padding: 0 16px; flex: none; }
.banner.req { background: #1b1a23f2; border: 1px solid #8d52fc80; flex-wrap: wrap; }
.banner.req .grow { flex-basis: 100%; }
.banner.req button { flex: 1; background: #ffffff1a; }
.banner.req button[data-a=req-allow] { background: var(--brand); }
.banner.req button[data-a=req-deny] { background: #f0686b33; color: #ffb3b4; }
/* last good frame held over the video while reconnecting (never a black screen) */
.stage canvas.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; pointer-events: none; }
.stage.contain canvas.poster { object-fit: contain; }
.stage canvas.poster.on { display: block; }

/* ---------- picture layer: zoom + face boxes ---------- */
.stage .view { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.stage .zoom { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.stage .faces { position: absolute; inset: 0; pointer-events: none; }
.stage .faces i { position: absolute; border: 2px solid #c7a8ff; border-radius: 12px; box-shadow: 0 0 0 1px #0008, 0 0 18px #8d52fc80; transition: all .25s ease-out; }
.stage .faces i::after { content: "Face " attr(data-score); position: absolute; left: -2px; top: -22px; padding: 1px 6px; border-radius: 6px; background: #8d52fc; color: #fff; font: 600 11px/18px var(--font); white-space: nowrap; }

/* ---------- immersive full screen ---------- */
.stage .topbar, .stage .chips, .stage .dock, .stage .stats, .stage .shade-t, .stage .shade-b, .stage [data-f=banners] { transition: opacity .3s ease; }
.stage.immersive.idle .topbar, .stage.immersive.idle .chips, .stage.immersive.idle .dock,
.stage.immersive.idle .stats, .stage.immersive.idle .shade-t, .stage.immersive.idle .shade-b { opacity: 0; pointer-events: none; }
.stage.immersive .tool { height: 56px; border-radius: 18px; }
.stage.immersive .tool span { display: none; }
.stage.immersive .tool .badge { top: 4px; right: 4px; }
.stage.immersive .talk { height: 56px; border-radius: 20px; }
.stage.immersive .shade-b { height: 200px; }

@media (orientation: landscape) and (max-height: 600px) {
  /* Side rail: controls hug the right edge, the picture keeps the middle. */
  .stage.immersive .dock {
    position: absolute; right: calc(10px + env(safe-area-inset-right, 0px)); top: 0; bottom: 0; margin: 0; width: auto; max-width: none;
    padding: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  }
  .stage.immersive .tools { grid-template-columns: 52px 52px; gap: 6px; }
  .stage.immersive .tool { height: 52px; border-radius: 16px; }
  .stage.immersive .talk { width: 110px; height: 52px; font-size: 13px; gap: 6px; }
  .stage.immersive .talk span { display: none; }
  .stage.immersive .shade-b { left: auto; right: 0; top: 0; bottom: 0; width: 220px; height: auto; background: linear-gradient(90deg, transparent, #000000b3); }
  .stage.immersive .topbar { padding-right: 140px; }
  .stage.immersive .chips { padding-right: 140px; }
  .stage.immersive [data-f=banners] { margin-right: 130px; }
  /* Non-immersive landscape: keep the dock compact too. */
  .stage:not(.immersive) .tool { height: 50px; }
  .stage:not(.immersive) .tool span { display: none; }
}

/* =====================================================================
   App feel: behaves like an installed app, not a web page
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
input, textarea, select, .legal article { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* iOS zooms into any field under 16px; keep them at 16 so it never does. */
input:not(.code-input):not([type=range]):not([type=checkbox]), select, textarea { font-size: 16px; }
img, svg, video, canvas { -webkit-user-drag: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
.stage { height: 100dvh; }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
button:focus:not(:focus-visible) { outline: none; }

/* =====================================================================
   Look: flat, quiet surfaces. Purple is only used where it means
   "do this" or "this is on" -- never as decoration.
   ===================================================================== */
:root {
  --ink-950: #0c0c0e; --ink-900: #141416; --ink-850: #17171a; --ink-800: #1d1d20; --ink-700: #27272b; --ink-600: #3a3a40;
  --line: #ffffff0d; --line-strong: #ffffff1a;
  --fg: #f4f4f5; --fg-muted: #a1a1aa; --fg-faint: #71717a;
  --brand: #8d52fc; --brand-strong: #7a3fef; --brand-soft: #8d52fc22; --brand-ink: #c7a8ff;
  --ok: #4ade80; --warn: #fbbf24; --bad: #f26b6b;
}
html, body, .boot { background: var(--ink-950); }
body { letter-spacing: -.006em; }
.glow { display: none; }
.brand { gap: 9px; font-size: 15px; }
.brand img { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }
.brand small { font-size: inherit; letter-spacing: inherit; text-transform: none; font-weight: 500; color: var(--fg-faint); margin-left: -4px; }
.boot img { box-shadow: none; }

.btn { height: 48px; border-radius: 14px; font-weight: 600; letter-spacing: -.01em; transition: transform .1s, background .15s; }
.btn-primary { background: var(--brand); box-shadow: none; }
.btn-primary:active { background: var(--brand-strong); }
.btn-ghost { background: var(--ink-800); border: 1px solid var(--line-strong); }
.btn-ghost:active { background: var(--ink-700); }
.btn svg.i { width: 18px; height: 18px; }

.card { background: var(--ink-900); border: 1px solid var(--line); border-radius: 20px; box-shadow: none; }
.input { height: 50px; border-radius: 14px; background: var(--ink-950); border: 1px solid var(--line-strong); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input::placeholder { color: var(--fg-faint); }
.code-input { height: 60px; font-size: 24px; letter-spacing: .28em; font-weight: 500; }
.code-input::placeholder { color: #ffffff2b; }
.chip { background: var(--ink-800); border-color: var(--line-strong); font-weight: 500; backdrop-filter: none; -webkit-backdrop-filter: none; }
.chip.brand { color: var(--brand-ink); }
.icon-btn { color: var(--fg-muted); border-radius: 12px; }
.icon-btn:hover, .icon-btn:active { background: var(--ink-800); color: var(--fg); }

/* Labels read like headings in a settings app, not shouty caps. */
.section-title, .sheet .sub { text-transform: none; letter-spacing: -.005em; font-size: 13px; font-weight: 600; color: var(--fg-muted); }
.section-title { margin: 28px 4px 8px; }
.sheet .sub { margin: 22px 2px 8px; }
.lead-sm { color: var(--fg-muted); font-size: 13.5px; line-height: 1.5; }

/* ---------- home ---------- */
.home { max-width: 460px; padding: calc(14px + var(--safe-t)) 16px calc(28px + var(--safe-b)); }
.home header { height: 44px; margin-bottom: 22px; }
.home header .acts { gap: 4px; }
.home header .chip.warn { background: #fbbf2414; border-color: #fbbf2440; }
.panel { padding: 20px; display: grid; gap: 12px; }
.panel h1, .panel h2 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
.panel p { margin: -6px 0 2px; color: var(--fg-muted); font-size: 14px; line-height: 1.45; }
.panel .row .btn { flex: 1; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 4px; color: var(--fg-faint); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.row-link { display: flex; align-items: center; gap: 14px; padding: 16px; width: 100%; text-align: left; transition: background .15s; }
.row-link:active { background: var(--ink-850); }
.row-link .ico { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--ink-800); color: var(--fg); }
.row-link .grow { flex: 1; min-width: 0; }
.row-link b { display: block; font-weight: 600; font-size: 15px; }
.row-link span { display: block; color: var(--fg-muted); font-size: 13px; margin-top: 1px; }
.row-link > svg.i { color: var(--fg-faint); }

/* Recent cameras: one grouped list, like a phone's settings screen. */
.saved { gap: 0; background: var(--ink-900); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.saved-item { border: 0; border-radius: 0; background: none; padding: 10px 6px 10px 14px; }
.saved-item + .saved-item { border-top: 1px solid var(--line); }
.saved-item.live { border-color: var(--line); }
.saved-item .dot { width: 38px; height: 38px; border-radius: 11px; background: var(--ink-800); color: var(--fg-muted); }
.saved-item.live .dot { color: var(--ok); background: #4ade8014; }
.saved-item b { font-size: 15px; }
.saved-item small { font-family: var(--font); font-size: 12.5px; color: var(--fg-faint); }
.saved-item .icon-btn { color: var(--fg-faint); }
.status-dot.live { box-shadow: none; }
.resume { border-color: #4ade8033; margin-bottom: 12px; padding: 14px 14px 14px 16px; }
.resume .ico { width: 42px; height: 42px; border-radius: 12px; background: #4ade8014; }
.resume .btn { height: 38px; padding: 0 16px; }
.install { padding: 12px 12px 12px 14px; margin-bottom: 12px; }
.install .ico { width: 40px; height: 40px; border-radius: 10px; }
.foot { margin-top: 36px; color: var(--fg-faint); font-size: 12.5px; line-height: 1.5; }
.foot-links { gap: 6px 16px; margin: 12px 0 8px; }

/* ---------- setup screens (camera, name) ---------- */
.setup { max-width: 460px; }
.setup header { height: 44px; margin-bottom: 18px; gap: 6px; }
.setup .card { padding: 20px; gap: 14px; }
.setup h2 { font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.setup p.lead { margin: -8px 0 2px; font-size: 14px; line-height: 1.45; }
.field label { font-size: 13px; font-weight: 500; }

/* ---------- over the video ---------- */
.stage .chip { background: #000000a6; border-color: #ffffff17; }
.stage .chip.live { background: #e5484d; }
.chip.live::before { animation-duration: 2s; }
.glass-btn { width: 40px; height: 40px; border-radius: 50%; }
.stage .glass-btn { background: #000000a6; border-color: #ffffff17; }
.topbar .title b { font-size: 15px; }
.topbar .title small { color: #ffffff99; }
.stage .pair { background: #000000bf; border-color: #ffffff17; border-radius: 18px; }
.pair .lbl { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; }
.pair .code { font-size: 26px; letter-spacing: .1em; }
.stage .tool { background: #000000a6; border: 1px solid #ffffff14; border-radius: 16px; box-shadow: none; font-weight: 500; }
.stage .tool.on { background: var(--brand); box-shadow: none; }
.stage .tool.alert { background: #e5484d; }
.center-msg > div { background: #111113eb; border: 1px solid #ffffff12; border-radius: 20px; padding: 22px 20px; box-shadow: none; }
.center-msg b { font-size: 17px; font-weight: 600; }
.center-msg p { line-height: 1.45; }
.center-msg svg.i { color: var(--fg-muted); width: 32px; height: 32px; }
.center-msg .btn { pointer-events: auto; }
.center-msg a.btn { pointer-events: auto; display: inline-flex; margin-top: 14px; }
.center-msg p b { display: inline; font-size: inherit; margin: 0; color: #fff; font-weight: 600; }
.spinner { width: 30px; height: 30px; border-width: 2.5px; border-color: #ffffff1f; border-top-color: #fff; }
.banner { border-radius: 16px; font-weight: 600; }
.banner button { border-radius: 10px; }
.banner.req { background: #141416f5; border: 1px solid var(--line-strong); }
.banner.req button[data-a=req-allow] { background: var(--brand); }
.stage .faces i { border: 2px solid #fff; border-radius: 10px; box-shadow: 0 0 0 1px #0007; }
.stage .faces i::after { background: #000000b3; border-radius: 6px; font-weight: 500; }

/* ---------- viewer control bar ---------- */
.stage .dock { padding: 0 12px calc(10px + var(--safe-b)); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 2px; width: 100%; max-width: 480px; margin: 0 auto;
  padding: 6px; border-radius: 24px; background: #121214eb; border: 1px solid #ffffff12; }
.act { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px;
  border-radius: 18px; font-size: 11px; font-weight: 500; color: #ffffffb3; transition: background .15s, color .15s, transform .1s; }
.act:active { transform: scale(.95); background: #ffffff0d; }
.act svg.i { width: 22px; height: 22px; }
.act span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.act.on { color: #fff; background: #ffffff14; }
.act.alert { color: #ff9494; }
.act .badge { position: absolute; top: 3px; left: calc(50% + 5px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 600; display: grid; place-items: center; padding: 0 5px; }
.bar .talk { flex: none; width: 58px; height: 58px; margin: 0 4px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); border: 0; box-shadow: none; transform: none; transition: background .15s, transform .1s, box-shadow .2s; }
.bar .talk svg.i { width: 26px; height: 26px; color: #fff; }
.bar .talk:active { transform: scale(.94); }
.bar .talk.active { background: #e5484d; box-shadow: 0 0 0 5px #e5484d33; animation: talkring 1.6s ease-in-out infinite; }
.bar .talk.locked { box-shadow: 0 0 0 5px #e5484d55; }
.bar .talk:disabled { background: var(--ink-700); }
.bar .talk:disabled svg.i { color: var(--fg-faint); }
@keyframes talkring { 50% { box-shadow: 0 0 0 9px #e5484d1f; } }
.talk-hint { margin: 8px 0 0; text-align: center; font-size: 12px; color: #ffffff80; min-height: 16px; }
.talk-hint.live { color: #ff9494; font-weight: 600; }

/* ---------- sheets ---------- */
.sheet-wrap { background: #0000008c; }
.sheet { background: var(--ink-900); border-color: var(--line-strong); border-radius: 22px 22px 0 0; box-shadow: none; padding-left: 16px; padding-right: 16px; }
.sheet .grab { width: 36px; height: 5px; background: var(--ink-600); }
.sheet h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.snd { position: relative; border-radius: 16px; background: var(--ink-800); border: 1px solid var(--line); font-weight: 500; font-size: 12.5px; }
.snd svg.i { color: var(--fg); opacity: .85; }
.snd.danger svg.i { color: var(--bad); opacity: 1; }
.snd.playing { background: var(--brand); }
.snd.playing svg.i { opacity: 1; color: #fff; }
.snd .badge { position: absolute; top: 8px; right: 10px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-style: normal; display: grid; place-items: center; padding: 0 5px; }
.snd.alert { background: #f26b6b1a; border-color: #f26b6b40; color: #ffb4b4; }
.snd.alert svg.i { color: #ff9494; }
.more-grid { grid-template-columns: repeat(2, 1fr); }
.more-grid .snd { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 15px 14px; font-size: 14px; text-align: left; }
.li, .toggle-row, .alert-item, .step { background: var(--ink-800); border: 1px solid var(--line); border-radius: 14px; }
.toggle-row > svg.i, .li > svg.i, .step svg.i { color: var(--fg-muted); }
.toggle-row b { font-weight: 500; }
.empty { border-style: solid; border-color: var(--line); background: transparent; border-radius: 14px; }
.seg { border-radius: 14px; }
.seg button { border-radius: 10px; font-weight: 500; }
.qr { border-radius: 18px; }
.toast { border-radius: 16px; padding: 11px 14px; background: #1d1d20f7; border-color: var(--line-strong); box-shadow: 0 12px 30px -12px #000; backdrop-filter: none; -webkit-backdrop-filter: none; }
.update-bar, .cookie-bar { background: var(--ink-800); border-radius: 16px; box-shadow: 0 12px 30px -12px #000; }
.cookie-bar a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- QR scanner ---------- */
.scan-frame { border-radius: 24px; }
.scan-frame i { border-color: #fff; border-width: 3px; }
.scan-frame i:nth-child(1) { border-top-left-radius: 24px; } .scan-frame i:nth-child(2) { border-top-right-radius: 24px; }
.scan-frame i:nth-child(3) { border-bottom-left-radius: 24px; } .scan-frame i:nth-child(4) { border-bottom-right-radius: 24px; }
.scan-hint b { font-weight: 600; }

/* ---------- immersive (full screen) viewer ---------- */
.stage.immersive .talk-hint { opacity: .8; }
.stage.immersive .bar .talk { width: 56px; height: 56px; border-radius: 50%; }
@media (orientation: landscape) and (max-height: 600px) {
  .stage .dock { padding-bottom: calc(6px + var(--safe-b)); }
  .stage:not(.immersive) .act span { display: none; }
  .stage:not(.immersive) .talk-hint { display: none; }
  .stage:not(.immersive) .bar .talk { width: 52px; height: 52px; }
  .stage.immersive .dock { position: absolute; right: calc(10px + env(safe-area-inset-right, 0px)); top: 0; bottom: 0; width: auto; padding: 0;
    display: flex; flex-direction: column; justify-content: center; }
  .stage.immersive .bar { flex-direction: column; width: auto; padding: 6px; border-radius: 26px; gap: 2px; }
  .stage.immersive .act { flex: none; width: 50px; padding: 8px 0; }
  .stage.immersive .act span { display: none; }
  .stage.immersive .bar .talk { width: 52px; height: 52px; margin: 4px 0; }
  .stage.immersive .talk-hint { display: none; }
  .stage.immersive .topbar, .stage.immersive .chips { padding-right: 90px; }
  .stage.immersive [data-f=banners] { margin-right: 80px; }
  .stage.immersive .shade-b { width: 150px; }
}

/* Keep clear of the notch / rounded corners in landscape. */
.topbar, .chips { padding-left: calc(12px + env(safe-area-inset-left, 0px)); padding-right: calc(12px + env(safe-area-inset-right, 0px)); }
.stage .dock { padding-left: calc(12px + env(safe-area-inset-left, 0px)); padding-right: calc(12px + env(safe-area-inset-right, 0px)); }

/* ---------- sizes: small phones up to tablets and desktops ---------- */
@media (max-width: 360px) {
  body { font-size: 14px; }
  .home, .setup { padding-left: 12px; padding-right: 12px; }
  .panel, .setup .card { padding: 16px; }
  .panel h1, .panel h2, .setup h2 { font-size: 20px; }
  .act { font-size: 10px; }
  .act svg.i { width: 20px; height: 20px; }
  .bar .talk { width: 52px; height: 52px; }
  .tools { gap: 6px; }
  .stage .tool { height: 58px; font-size: 10.5px; }
}
@media (min-width: 768px) {
  .home, .setup { padding-top: calc(40px + var(--safe-t)); }
  .home header, .setup header { margin-bottom: 32px; }
  .sheet { max-width: 560px; border-radius: 22px; margin-bottom: 16px; }
  .bar { max-width: 520px; }
}
.btn-primary:disabled { background: var(--ink-800); color: var(--fg-faint); opacity: 1; }
.li small { line-height: 1.4; }
