/* Voxis Live — listener page. Tokens follow voxislive.com's main.css; this
   origin loads no file from voxislive.com, so the type is the system stack. */
:root {
  --bg: #131518; --panel: #17191d; --panel-2: #1b1e24; --well: #0e1013;
  --line: rgba(235, 240, 245, .08); --line-2: rgba(235, 240, 245, .14);
  --text: #e9eef3; --text-2: rgba(233, 238, 243, .64); --text-3: rgba(233, 238, 243, .42);
  --amber: #ffb224; --amber-soft: rgba(255, 178, 36, .12); --amber-glow: rgba(255, 178, 36, .28);
  --green: #3ecf8e; --red: #ff6b6b;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --cap: 1.5rem;
  --gutter: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
:root[data-size="1"] { --cap: 1.15rem; }
:root[data-size="2"] { --cap: 1.5rem; }
:root[data-size="3"] { --cap: 2.05rem; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- top bar ---- */
.bar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) calc(var(--gutter) + env(safe-area-inset-right)) 10px calc(var(--gutter) + env(safe-area-inset-left));
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.mark {
  width: 14px; height: 14px; border-radius: 4px; flex: none;
  background: linear-gradient(135deg, var(--amber), #ff8a00); box-shadow: 0 0 12px var(--amber-glow);
}
.word { font-weight: 700; letter-spacing: -.01em; }
.chip {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; padding: 2px 7px; border-radius: 6px;
  color: var(--amber); background: var(--amber-soft);
}
.code { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--text-3); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .code { display: none; } }
.status {
  margin-left: auto; display: flex; align-items: center; gap: 7px; min-width: 0;
  font-size: 13px; color: var(--text-2);
}
.status .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.status[data-kind="live"] .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(62, 207, 142, .16); }
.status[data-kind="waiting"] .dot, .status[data-kind="reconnecting"] .dot, .status[data-kind="connecting"] .dot,
.status[data-kind="pending"] .dot { background: var(--amber); }
.status[data-kind="full"] .dot, .status[data-kind="invalid"] .dot,
.status[data-kind="denied"] .dot, .status[data-kind="timeout"] .dot { background: var(--red); }
.status[data-kind="connecting"] .dot, .status[data-kind="reconnecting"] .dot,
.status[data-kind="pending"] .dot { animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.size {
  flex: none; display: inline-flex; align-items: baseline; gap: 1px; padding: 6px 10px; min-height: 36px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); cursor: pointer;
}
.size .a1 { font-size: 12px; } .size .a2 { font-size: 17px; font-weight: 700; }
.size:focus-visible, .btn:focus-visible, .jump:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---- captions ---- */
.feed {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 18px calc(var(--gutter) + env(safe-area-inset-right)) 28px calc(var(--gutter) + env(safe-area-inset-left));
}
.lines, .empty, .banner { max-width: 760px; margin-left: auto; margin-right: auto; }
.empty { color: var(--text-3); font-size: 1rem; line-height: 1.5; margin-top: 24vh; text-align: center; }
.line {
  margin: 0 0 .7em; font-size: var(--cap); line-height: 1.38; color: var(--text-2);
  overflow-wrap: anywhere; unicode-bidi: plaintext; transition: color .25s var(--ease);
}
.line:nth-last-child(-n+2) { color: var(--text); }
.line.open { color: var(--text); }
.line.open .txt::after {
  content: ""; display: inline-block; width: .45em; height: .9em; margin-inline-start: .15em; vertical-align: -.08em;
  border-radius: 2px; background: var(--amber); animation: pulse 1s steps(2) infinite;
}
.spk {
  display: inline-block; font-family: var(--mono); font-size: .5em; letter-spacing: .1em; vertical-align: .35em;
  padding: 1px 6px; margin-inline-end: .5em; border-radius: 5px; color: var(--text-3); border: 1px solid var(--line-2);
}
.banner {
  display: block; margin-bottom: 18px; padding: 12px 14px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2); font-size: 14px; line-height: 1.45; color: var(--text-2);
}
.banner strong { display: block; color: var(--text); font-weight: 600; }

.jump {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 5;
  padding: 10px 18px; min-height: 44px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--amber); color: #1a1205; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

/* ---- full-screen cards (gate, ended, invalid, full) ---- */
.card {
  flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 24px var(--gutter);
}
.card h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; max-width: 26ch; }
.card p { color: var(--text-2); line-height: 1.5; margin: 0 0 22px; max-width: 40ch; }
.card h1, .card p { overflow-wrap: break-word; }
.card .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---- waiting for approval ---- */
.wait .numbox {
  display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 100%;
  margin: 8px 0 20px; padding: 12px 28px 14px; border-radius: 16px;
  background: var(--panel-2); border: 1px solid var(--line-2);
}
.wait .numlabel { font-size: 13px; color: var(--text-2); }
.wait .num {
  font-family: var(--mono); font-weight: 700; font-size: clamp(3rem, 17vw, 5rem); line-height: 1.05;
  letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--amber);
}
.wait .hint { color: var(--text-3); font-size: 14px; margin-bottom: 12px; }
.wait .away { color: var(--amber); font-size: 14px; }
.gate form { display: flex; gap: 10px; width: 100%; max-width: 360px; }
.gate input {
  flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--well); color: var(--text);
  font-family: var(--mono); font-size: 1.35rem; letter-spacing: .12em; text-transform: uppercase; text-align: center;
}
.gate input::placeholder { color: var(--text-3); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 12px; background: var(--amber); color: #1a1205; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); min-height: 44px; }
.err { min-height: 1.4em; color: var(--red) !important; font-size: 14px; margin: 10px 0 !important; }
.site { color: var(--text-2); font-size: 14px; }

/* ---- footer ---- */
.foot {
  flex: none; border-top: 1px solid var(--line); background: var(--bg); font-size: 12.5px; color: var(--text-3);
  padding: 10px calc(var(--gutter) + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(var(--gutter) + env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 4px;
}
.foot .made { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-2); }
.foot .cta { color: var(--amber); font-weight: 600; text-decoration: none; white-space: nowrap; }
.foot .fine { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.foot .fine a { color: var(--text-3); }
.foot .fine .ai { flex-basis: 100%; color: var(--text-2); }

@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .foot { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
