/* The Dutchman's Curse: shared design system.
   The water is the canvas and light is information. Lantern amber marks what
   residents can act on; wraith violet marks the Dutchman's reach. IM Fell
   carries the story, Atkinson Hyperlegible carries everything read at speed. */

@font-face { font-family: 'Fell'; src: url(/fonts/fell-400.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Fell'; font-style: italic; src: url(/fonts/fell-400-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url(/fonts/atkinson-400.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Atkinson'; font-style: italic; src: url(/fonts/atkinson-400-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Atkinson'; font-weight: 700; src: url(/fonts/atkinson-700.woff2) format('woff2'); font-display: swap; }
/* The reading face slashes its zero, which reads as Ø on big numbers. This borrows a plain
   zero drawn from the same face's own oval, for the digit 0 only. */
@font-face { font-family: 'AtkinsonZero'; src: url(/fonts/atkinson-zero-400.woff2) format('woff2'); unicode-range: U+0030; font-display: swap; }
@font-face { font-family: 'AtkinsonZero'; font-weight: 700; src: url(/fonts/atkinson-zero-700.woff2) format('woff2'); unicode-range: U+0030; font-display: swap; }

:root {
  --abyss: #071824;
  --trench: #0e2a3a;
  --trench-hi: #15394c;
  --lantern: #f4b860;
  --wraith: #9c8cff;
  --coral: #ff7a6b;
  --sea: #63c7cf; /* spectators: the teal of the SPECTATOR tag */
  --foam: #ddeff2;
  --silt: #8fb3bf;
  --line: rgba(143, 179, 191, 0.22);
  --line-strong: rgba(143, 179, 191, 0.42);
  --display: 'Fell', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --ui: 'AtkinsonZero', 'Atkinson', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t0: 0.8rem;
  --t1: 1rem;
  --t2: 1.25rem;
  --t3: 1.563rem;
  --t4: 1.953rem;
  --t5: 2.441rem;
  --t6: 3.052rem;
  --t7: 3.815rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--abyss);
  color: var(--foam);
  font-family: var(--ui);
  font-size: 106.25%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  background:
    radial-gradient(140% 55% at 50% -12%, rgba(40, 110, 140, 0.35), transparent 62%),
    linear-gradient(var(--abyss), #04111b 90%);
  background-attachment: fixed;
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; }
p { margin: 0; }
a { color: var(--lantern); text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--lantern); outline-offset: 2px; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
/* Crew flags are plain color swatches: small by default, sized up where they lead. */
.flag { width: 1.05rem; height: 0.7rem; display: inline-block; vertical-align: -0.05rem; border-radius: 2px; flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--silt); }
/* IM Fell's numeral one reads as a capital I, so numbers inside story headings use the UI face. */
.num { font-family: var(--ui); font-weight: 700; font-size: 0.86em; font-style: normal; }
.small { font-size: var(--t0); }
.stack > * + * { margin-top: 0.75rem; }
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 0.6rem; align-items: center; justify-content: space-between; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.55em 1.25em;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--foam);
  font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--lantern); border-color: var(--lantern); color: var(--abyss); }
.btn.wraith { background: var(--wraith); border-color: var(--wraith); color: var(--abyss); }
.btn.danger { border-color: var(--coral); color: var(--coral); }
.btn.quiet { border-color: transparent; color: var(--silt); }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 0.3em 0.9em; font-size: 0.9rem; }

/* ---------- forms ---------- */

.field { display: grid; gap: 0.35rem; }
.field > span { font-weight: 700; }
.field small { color: var(--silt); }
.input, select.input, textarea.input {
  width: 100%; min-height: 50px; padding: 0.6em 0.85em;
  border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(7, 24, 36, 0.6);
}
.input::placeholder { color: rgba(143, 179, 191, 0.6); }
textarea.input { min-height: 90px; resize: vertical; }
.code-input { font-size: var(--t4); letter-spacing: 0.3em; text-transform: uppercase; text-align: center; font-weight: 700; }
.code-input::placeholder { font-size: 1rem; letter-spacing: 0.04em; text-transform: none; font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 0.4em; min-height: 44px; padding: 0.4em 1em;
  border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(14, 42, 58, 0.55);
}
.chip input:checked + span { border-color: var(--lantern); color: var(--lantern); background: rgba(244, 184, 96, 0.1); }
.chip input:checked + span::before { content: ''; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--lantern); }
.chip input:focus-visible + span { outline: 3px solid var(--lantern); outline-offset: 2px; }
.chip input:disabled + span { opacity: 0.4; text-decoration: line-through; }

.check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; cursor: pointer; }
.check input { width: 1.4rem; height: 1.4rem; margin: 0.15rem 0 0; accent-color: var(--lantern); }

.switch { display: flex; gap: 0.9rem; align-items: center; justify-content: space-between; cursor: pointer; }
.switch input { appearance: none; width: 52px; height: 30px; border-radius: 999px; background: var(--trench-hi); border: 1px solid var(--line-strong); position: relative; flex: none; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--silt); transition: transform 0.15s; }
.switch input:checked { background: rgba(244, 184, 96, 0.25); border-color: var(--lantern); }
.switch input:checked::after { transform: translateX(22px); background: var(--lantern); }

/* ---------- surfaces ---------- */

.panel { background: rgba(14, 42, 58, 0.72); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; }
.panel h2 { font-size: var(--t3); }
/* Tints sit on top of the trench blue so warm panels never turn muddy brown. */
.panel.alarm { border-color: var(--coral); background: linear-gradient(rgba(255, 122, 107, 0.09), rgba(255, 122, 107, 0.09)), rgba(14, 42, 58, 0.85); }
.panel.lit { border-color: rgba(244, 184, 96, 0.6); background: linear-gradient(rgba(244, 184, 96, 0.07), rgba(244, 184, 96, 0.07)), rgba(14, 42, 58, 0.85); }
.panel.cursed { border-color: rgba(156, 140, 255, 0.6); background: linear-gradient(rgba(156, 140, 255, 0.09), rgba(156, 140, 255, 0.09)), rgba(14, 42, 58, 0.85); }
.panel.lit { border-color: rgba(244, 184, 96, 0.55); background: linear-gradient(rgba(244, 184, 96, 0.06), rgba(244, 184, 96, 0.06)), rgba(14, 42, 58, 0.85); }

.tag {
  display: inline-flex; align-items: center; gap: 0.35em; padding: 0.1em 0.65em;
  border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.85rem; white-space: nowrap;
}
.tag.alive { color: var(--foam); }
.tag.ghost { color: var(--silt); border-style: dashed; }
.tag.possessed { color: var(--wraith); border-color: var(--wraith); }
.tag.resident { color: var(--lantern); border-color: var(--lantern); }
.tag.danger { color: var(--coral); border-color: var(--coral); }
.tag.here { color: var(--lantern); border-color: var(--lantern); }
.tag.watching { color: var(--sea); border-color: var(--sea); }
.tag.left { color: var(--silt); border-style: dashed; }
/* PLAYER and SPECTATOR, colored like the printed hang tags. */
.tagword { display: inline-block; padding: 0.02em 0.45em; border-radius: 4px; font-weight: 700; letter-spacing: 0.08em; font-size: 0.85em; }
.tagword.play { background: var(--lantern); color: var(--abyss); }
.tagword.watch { background: #1d6f7a; color: #fff; }

/* ---------- portholes: every avatar is a window in the hull ---------- */

.porthole {
  --size: 48px;
  position: relative; flex: none;
  width: var(--size); height: var(--size); border-radius: 50%;
  display: grid; place-items: center;
  background: var(--trench-hi) center 22% / cover no-repeat;
  box-shadow: 0 0 0 2px var(--abyss), 0 0 0 calc(2px + var(--size) / 22) rgba(244, 184, 96, 0.78);
  font-family: var(--display); font-size: calc(var(--size) * 0.42); color: var(--silt);
}
/* Rivets around the brass ring, on portholes big enough to show them. */
.porthole:not(.s) { outline: 2px dotted rgba(217, 165, 90, 0.55); outline-offset: calc(3px + var(--size) / 22); }
.porthole.ghost { outline-color: rgba(143, 179, 191, 0.35); }
.porthole.s { --size: 34px; }
.porthole.l { --size: 72px; }
.porthole.xl { --size: 128px; }
.porthole.ghost { filter: grayscale(1) brightness(0.8); opacity: 0.6; box-shadow: 0 0 0 2px var(--abyss), 0 0 0 calc(2px + var(--size) / 22) rgba(143, 179, 191, 0.5); }
.porthole.ghost::after {
  content: ''; position: absolute; right: -4%; bottom: -4%; width: 38%; height: 38%; border-radius: 50%;
  background: var(--abyss) url(/img/ghost.svg) center / 70% no-repeat; border: 1px solid var(--silt);
}
.porthole.possessed { box-shadow: 0 0 0 2px var(--abyss), 0 0 0 calc(2px + var(--size) / 22) var(--wraith); }
.porthole.resident-revealed { box-shadow: 0 0 0 2px var(--abyss), 0 0 0 calc(2px + var(--size) / 22) var(--lantern); }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.9rem 0.6rem; }
.person { display: grid; justify-items: center; gap: 0.45rem; text-align: center; font-size: 0.85rem; line-height: 1.2; background: none; border: 0; padding: 0.35rem; border-radius: 12px; cursor: pointer; }
.person .porthole { --size: 60px; }
.person[aria-pressed='true'] { background: rgba(244, 184, 96, 0.12); outline: 2px solid var(--lantern); }
.person:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  max-width: min(92vw, 30rem); padding: 0.8em 1.1em; border-radius: 12px;
  background: var(--foam); color: var(--abyss); font-weight: 700; z-index: 90;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.toast.bad { background: var(--coral); }

/* ---------- document pages (privacy) ---------- */

.doc .prose { max-width: 38rem; margin: 0 auto; padding: 3rem 1.25rem 4rem; }
.prose h1 { font-size: var(--t6); margin-bottom: 1.25rem; }
.prose h2 { font-size: var(--t3); margin: 2rem 0 0.5rem; }
.prose p { margin: 0 0 1rem; color: var(--foam); }

/* ---------- registration: the ship's manifest ---------- */

.manifest { max-width: 40rem; margin: 0 auto; padding: 2.5rem 1.25rem 5rem; }
.hero { padding: 1.5rem 0 2.5rem; }
.hero .when { color: var(--lantern); font-size: var(--t2); }
.hero h1 { font-size: clamp(3rem, 12vw, 5.2rem); line-height: 0.95; margin: 0.4rem 0 1rem; letter-spacing: -0.01em; }
.hero .tagline { font-size: var(--t2); color: var(--foam); max-width: 30rem; }
.hero .where { color: var(--silt); margin-top: 0.75rem; }

.entry { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.entry > h2 { font-size: var(--t4); margin-bottom: 0.35rem; }
.entry > .lede { color: var(--silt); margin-bottom: 1.1rem; max-width: 34rem; }
.entry .stack > .field + .field { margin-top: 1rem; }

.crews { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.6rem; }
.crew-card { position: relative; }
.crew-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.crew-card > span {
  display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.75rem; align-items: start;
  padding: 0.9rem; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(14, 42, 58, 0.55); height: 100%;
}
.crew-card .icon { grid-row: span 3; width: 1.8rem; height: 1.8rem; color: var(--silt); margin-top: 0.1rem; }
.crew-card .flag.crest { grid-row: span 3; width: 2.4rem; height: 1.6rem; margin-top: 0.25rem; border-radius: 3px; }
.crew-card b { font-family: var(--display); font-weight: 400; font-size: var(--t3); line-height: 1.05; }
.crew-card em { font-style: normal; color: var(--silt); font-size: 0.9rem; }
.crew-card input:checked + span { border-color: var(--lantern); background: rgba(244, 184, 96, 0.08); }
.crew-card input:checked + span .icon { color: var(--lantern); }
.crew-card input:focus-visible + span { outline: 3px solid var(--lantern); outline-offset: 2px; }

/* The typed costume and the crew it sorts into. */
.sorted { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.85rem; align-items: center; margin: 0.9rem 0 1rem; padding: 0.85rem 0.95rem; border-radius: 12px; border: 1px dashed var(--line-strong); min-height: 4.4rem; }
.sorted.on { border-style: solid; border-color: var(--lantern); background: rgba(244, 184, 96, 0.08); }
.sorted > .icon { width: 1.6rem; height: 1.6rem; color: var(--silt); }
.sorted .flag.crest { width: 2.6rem; height: 1.75rem; border-radius: 3px; }
.sorted b { font-family: var(--display); font-weight: 400; font-size: var(--t3); line-height: 1.05; display: block; }
.crews.legend { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.45rem; }
.crews.legend .crew-card > span { padding: 0.55rem 0.65rem; gap: 0.1rem 0.6rem; opacity: 0.75; transition: opacity 0.2s, border-color 0.2s, background 0.2s; }
.crews.legend .crew-card .flag.crest { grid-row: span 2; width: 1.9rem; height: 1.3rem; margin-top: 0.15rem; }
.crews.legend .crew-card b { font-size: var(--t2); }
.crews.legend .crew-card em { font-size: 0.8rem; line-height: 1.25; }
.crew-card.on > span { opacity: 1; border-color: var(--lantern); background: rgba(244, 184, 96, 0.1); }
.entry > h3.group, .panel > h3.group { font-family: var(--ui); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lantern); margin: 1.5rem 0 0.9rem; }
.entry > h3.group:first-of-type { margin-top: 0.4rem; }
.panel > h3.group { margin: 1rem 0 0.2rem; font-size: 0.74rem; }

/* The clue card on the phone: chips to tap, saved right away. */
.clue-card > li.ask { display: block; }
.clue-card > li.given { align-items: center; padding: 0.55rem 0; }
.clue-card legend { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.45rem; padding: 0; }
.chip.small span { padding: 0.32rem 0.7rem; font-size: 0.88rem; }

/* Waiting for the door: registered, not yet checked in. */
.waiting { display: flex; gap: 0.75rem; align-items: center; padding: 0.85rem 1rem; border-radius: 12px; border: 1px dashed var(--lantern); background: rgba(244, 184, 96, 0.06); margin-top: 0.9rem; }
.waiting > .icon { flex: none; width: 1.7rem; height: 1.7rem; color: var(--lantern); animation: waiting 2.4s ease-in-out infinite; }
.waiting p { margin: 0; }
@keyframes waiting { 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .waiting > .icon { animation: none; } }
.crew-line { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.8rem; }
.crew-line .flag { width: 2rem; height: 1.35rem; border-radius: 3px; flex: none; }
.boarding .where { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.8rem; }
.boarding .where .icon { flex: none; width: 1.4rem; height: 1.4rem; color: var(--lantern); margin-top: 0.1rem; }
.question { border: 0; padding: 0; margin: 0; min-width: 0; }
.question + .question { margin-top: 1.6rem; }
.question > p { font-weight: 700; margin-bottom: 0.5rem; }
.consent { padding: 1rem; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(7, 24, 36, 0.5); }
.consent p { font-size: 0.92rem; color: var(--silt); margin-top: 0.35rem; }
.sign { padding-top: 2rem; border-top: 1px solid var(--line); }
.sign .error { color: var(--coral); font-weight: 700; margin-bottom: 1rem; }

.signed { text-align: left; }
.signed .number { font-family: var(--display); font-style: italic; color: var(--lantern); font-size: var(--t3); }
.signed h1 { font-size: clamp(2.6rem, 10vw, 4.4rem); margin: 0.3rem 0 1rem; }
.signed .qr { width: 11rem; background: #fff; padding: 0.6rem; border-radius: 10px; margin: 1.25rem 0; }
.signed .link { word-break: break-all; font-size: 0.9rem; }

/* ---------- check-in ---------- */

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.25rem 0.9rem; }
.steps > li::before {
  content: counter(step); grid-row: span 2; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-strong); font-weight: 700;
}
.steps > li.done::before { content: '✓'; font-family: var(--ui); color: var(--abyss); background: var(--lantern); border-color: var(--lantern); }
.steps h2 { font-size: var(--t3); align-self: center; }
.selfie-preview { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.9rem; }

/* ---------- player app ---------- */

.app { max-width: 34rem; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.app.ghostly { filter: saturate(0.55); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; gap: 0.75rem; align-items: center; padding: 0.75rem 1rem; background: rgba(7, 24, 36, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .who { flex: 1; min-width: 0; line-height: 1.2; }
.topbar .who b { display: block; font-family: var(--display); font-weight: 400; font-size: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .who > .muted { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coins { display: inline-flex; gap: 0.3em; align-items: center; color: var(--lantern); font-weight: 700; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--foam); }

.phase { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: 0.9rem 1rem 0.4rem; }
.phase h1 { font-size: 1.65rem; }
.phase .clock { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.phase .clock.frozen { color: var(--silt); }

.main { flex: 1; padding: 0.5rem 1rem 6.5rem; }
.main > * + *, .main > [data-key] > * + * { margin-top: 0.9rem; }

.tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 30;
  width: min(100%, 34rem); display: grid; grid-template-columns: repeat(var(--tabs, 4), 1fr);
  padding: 0.3rem 0.3rem calc(0.3rem + env(safe-area-inset-bottom, 0px));
  background: rgba(7, 24, 36, 0.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px);
}
.tabs button { position: relative; display: grid; justify-items: center; gap: 0.1rem; padding: 0.45rem 0 0.35rem; border: 0; background: none; color: var(--silt); font-size: 0.78rem; cursor: pointer; border-radius: 10px; }
.tabs button .icon { width: 1.5rem; height: 1.5rem; }
.tabs button[aria-selected='true'] { color: var(--lantern); }
.tabs .dot { position: absolute; top: 0.25rem; right: calc(50% - 1.3rem); min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem; border-radius: 999px; background: var(--coral); color: var(--abyss); font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; }

/* The fate card: one sealed card, the same for every role until you hold it. */
.fate { position: relative; min-height: 15rem; border-radius: 18px; padding: 1.4rem; border: 1px solid var(--line-strong); background: linear-gradient(160deg, #123246, #0b2231 70%); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.fate .sealed { display: grid; justify-items: center; align-content: center; gap: 1rem; min-height: 12rem; text-align: center; }
.fate .seal { position: relative; width: 6.2rem; height: 6.2rem; border-radius: 50%; display: grid; place-items: center; padding: 0; border: 0; background: radial-gradient(circle, rgba(244, 184, 96, 0.14), transparent 70%); color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.fate .seal svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.fate .seal .ring circle { fill: none; stroke-width: 4; }
.fate .seal .ring .track { stroke: var(--line-strong); }
.fate .seal .ring .fill { stroke: var(--lantern); stroke-dasharray: 289; stroke-dashoffset: 289; }
.fate .seal .anchor { width: 2.6rem; height: 2.6rem; color: var(--lantern); }
.fate .sealed .prompt { font-family: var(--display); font-size: var(--t3); }
.fate .sealed .small { max-width: 22rem; }
.fate .open h2 { font-size: var(--t6); line-height: 1; margin: 0.2rem 0 0.6rem; }
.fate .open .kind { font-size: 0.95rem; color: var(--silt); }
.fate.possessed-open { border-color: var(--wraith); background: linear-gradient(160deg, #221a4a, #0b1c2b 75%); }
.fate.possessed-open h2 { color: var(--wraith); }
.fate.resident-open { border-color: rgba(244, 184, 96, 0.55); }
.fate.resident-open h2 { color: var(--lantern); }
.fate .power .segment { margin-top: 0.2rem; }
.fate .power { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.fate .power-head b, .fate .power > b { font-family: var(--display); font-weight: 400; font-size: var(--t3); display: block; }
.fate .curse-card b { font-family: var(--display); font-weight: 400; font-size: var(--t3); line-height: 1.1; }
.fate .mates { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.6rem; }

.card-title { display: flex; gap: 0.55rem; align-items: center; margin-bottom: 0.5rem; }
.card-title .icon { width: 1.5rem; height: 1.5rem; }
.card-title h2 { font-size: var(--t3); }
.card-title > .muted:last-child { margin-left: auto; white-space: nowrap; }
.alarm .card-title { color: var(--coral); }
.cursed .card-title { color: var(--wraith); }
.lit .card-title { color: var(--lantern); }

.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.4rem; }
.segment button { display: grid; justify-items: center; gap: 0.15rem; min-height: 68px; padding: 0.5rem; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(7, 24, 36, 0.5); cursor: pointer; font-weight: 700; }
.segment button small { font-weight: 400; color: var(--silt); }
.segment button[aria-pressed='true'] { border-color: var(--lantern); color: var(--lantern); background: rgba(244, 184, 96, 0.08); }
.segment button.curse[aria-pressed='true'] { border-color: var(--wraith); color: var(--wraith); background: rgba(156, 140, 255, 0.1); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .when { color: var(--silt); font-size: 0.8rem; white-space: nowrap; margin-left: auto; }

.clue { font-family: var(--display); font-size: var(--t2); line-height: 1.3; }

.thread { display: grid; gap: 0.5rem; max-height: 50vh; overflow-y: auto; padding-right: 0.25rem; }
.bubble { max-width: 85%; padding: 0.55rem 0.8rem; border-radius: 14px; background: var(--trench-hi); }
.bubble.mine { justify-self: end; background: rgba(244, 184, 96, 0.14); }
.bubble.narrator { border: 1px solid rgba(244, 184, 96, 0.45); }
.bubble small { display: block; color: var(--silt); font-size: 0.75rem; }

.cover { position: fixed; inset: 0; z-index: 80; background: var(--abyss); overflow-y: auto; padding: 1.25rem 1rem 3rem; }

.meter { height: 10px; border-radius: 999px; background: var(--trench-hi); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--silt); }

/* A live quiz or muster follows you across tabs. */
.banner { display: flex; gap: 0.5rem; align-items: center; justify-content: center; width: calc(100% - 2rem); margin: 0 1rem 0.7rem; padding: 0.6rem 0.9rem; border-radius: 12px; border: 1px solid var(--lantern); background: rgba(244, 184, 96, 0.14); color: var(--lantern); font-weight: 700; cursor: pointer; }
.banner [data-ends] { font-variant-numeric: tabular-nums; }

/* Quiz calls and trivia cards: four big answers. */
.panel.quiz .clock { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--lantern); }
.answers { display: grid; gap: 0.5rem; }
.answer { display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.6rem; align-items: center; min-height: 56px; padding: 0.55rem 0.8rem; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(7, 24, 36, 0.55); text-align: left; cursor: pointer; font-size: 1.02rem; }
.answer b { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--trench-hi); color: var(--lantern); }
.answer[aria-pressed='true'] { border-color: var(--lantern); background: rgba(244, 184, 96, 0.12); }
.answer[aria-pressed='true'] b { background: var(--lantern); color: var(--abyss); }
.answer:disabled { cursor: default; }
.answer:disabled:not([aria-pressed='true']) { opacity: 0.55; }

.crewline { margin-top: 0.8rem; font-weight: 700; }
.crewline .meter { margin-top: 0.4rem; }
.crewline .meter i, .cupline .meter i { background: linear-gradient(90deg, #b7863b, var(--lantern)); }
.cup { display: grid; gap: 0.5rem; margin-top: 0.7rem; }
.cupline { display: grid; grid-template-columns: minmax(7.5rem, 9.5rem) 1fr 2.5rem; gap: 0.6rem; align-items: center; font-size: 0.92rem; }
.cupline b { text-align: right; font-variant-numeric: tabular-nums; }
.cupline.mine span:first-child { color: var(--lantern); font-weight: 700; }

/* The ship's wheel penalty spinner. */
.wheel-wrap { position: relative; display: grid; place-items: center; padding: 0.6rem 0 0.2rem; }
.wheel { width: min(60vw, 220px); height: auto; animation: helm 2.6s cubic-bezier(0.15, 0.8, 0.2, 1) both; }
.wheel line { stroke: #b7863b; stroke-width: 3.2; stroke-linecap: round; }
.wheel .knob { fill: #d9a55a; }
.wheel .rim { fill: none; stroke: #8a6424; stroke-width: 5; }
.wheel .rim.inner { stroke: #b7863b; stroke-width: 1.6; }
.wheel .hub { fill: #d9a55a; stroke: #8a6424; stroke-width: 2; }
.wheel-pointer { position: absolute; top: -0.1rem; color: var(--lantern); font-size: 1.3rem; }
@keyframes helm { from { transform: rotate(0deg); } to { transform: rotate(var(--turn, 1100deg)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- party night two: the phone's new cards ---------- */
.seg { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.2rem; border-radius: 999px; border: 1px solid var(--line); margin-top: 0.6rem; }
.seg button { flex: 1; padding: 0.4rem 0.6rem; border-radius: 999px; border: 0; background: none; color: var(--silt); font: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed='true'] { background: var(--trench-hi); color: var(--foam); }
.boardlist { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.boardlist li { display: grid; grid-template-columns: 1.6rem auto 1fr auto; gap: 0.6rem; align-items: center; padding: 0.3rem 0.4rem; border-radius: 10px; }
.boardlist li b { color: var(--silt); text-align: center; }
.boardlist li:first-child b { color: var(--lantern); }
.boardlist li em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.boardlist li.me { background: rgba(244, 184, 96, 0.12); outline: 1px solid rgba(244, 184, 96, 0.45); }
.boardlist li.muted { display: block; }
.choices { display: grid; gap: 0.45rem; }
.choice { text-align: left; padding: 0.7rem 0.9rem; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(14, 42, 58, 0.55); color: var(--foam); font: inherit; cursor: pointer; }
.choice[aria-pressed='true'] { border-color: var(--wraith); background: rgba(156, 140, 255, 0.14); }
.panel.watch { border-color: rgba(99, 199, 207, 0.6); background: linear-gradient(rgba(99, 199, 207, 0.09), rgba(99, 199, 207, 0.02)), rgba(14, 42, 58, 0.85); }
.panel.watch .card-title .icon { color: var(--sea); }
.clockline b { font-size: 2rem; font-variant-numeric: tabular-nums; }
.gate { display: grid; gap: 1rem; padding-top: 0.6rem; }
.gate-steps { margin-top: 1rem; }
.gate-steps li b, .gate-steps li span { grid-column: 2; }
.gate-steps li span { color: var(--silt); font-size: 0.92rem; }
.bubble.whisper { border-color: rgba(156, 140, 255, 0.55); background: rgba(156, 140, 255, 0.1); font-style: italic; }
.door-note { margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 12px; border: 1px solid rgba(244, 184, 96, 0.6); background: rgba(244, 184, 96, 0.08); }

/* ---------- the green flash: a sheet or badge linked ---------- */
.flash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 2rem; background: radial-gradient(circle at 50% 45%, #3ddc84 0%, #1f9d55 55%, #126b3a 100%); color: #fff; text-align: center; animation: flash-in 0.28s ease-out; cursor: pointer; }
.flash.out { opacity: 0; transition: opacity 0.35s; }
.flash-inner { display: grid; justify-items: center; gap: 0.6rem; max-width: 22rem; }
.flash svg { width: 7.5rem; height: 7.5rem; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0.4rem 1.2rem rgba(0, 0, 0, 0.25)); }
.flash svg path { stroke-width: 2.4; stroke-dasharray: 16; stroke-dashoffset: 16; animation: flash-check 0.45s 0.15s ease-out forwards; }
.flash b { font-size: 2rem; line-height: 1.15; }
.flash span { font-size: 1.1rem; opacity: 0.95; }
@keyframes flash-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes flash-check { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .flash, .flash svg path { animation: none; stroke-dashoffset: 0; } }

/* ---------- claiming a blank badge ---------- */
.claim-sheet { position: fixed; inset: 0; z-index: 150; display: grid; align-items: end; background: rgba(4, 12, 18, 0.72); padding: 1rem; }
.claim-sheet .panel { max-width: 30rem; width: 100%; margin: 0 auto; background: var(--trench); box-shadow: 0 -0.6rem 2.4rem rgba(0, 0, 0, 0.5); }
.claim-sheet .code { font-weight: 700; letter-spacing: 0.16em; }

/* ---------- the phone, simplified: the counts, the trial, the cues ---------- */
.phase .kicker { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lantern); font-weight: 700; margin-bottom: 0.15rem; }
.sides { display: flex; gap: 0.45rem; padding: 0 1rem 0.75rem; flex-wrap: wrap; }
.side { display: inline-flex; gap: 0.35rem; align-items: center; padding: 0.22rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.85rem; white-space: nowrap; }
.side b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.side.possessed { color: var(--wraith); border-color: rgba(156, 140, 255, 0.55); background: rgba(156, 140, 255, 0.07); }
.side.residents { color: var(--lantern); border-color: rgba(244, 184, 96, 0.5); background: rgba(244, 184, 96, 0.06); }
.side.ghosts { color: var(--silt); border-style: dashed; }
.icon-btn { position: relative; }
.icon-btn .pip { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.person { position: relative; }
.person .count { position: absolute; top: 0.05rem; left: calc(50% + 1rem); min-width: 1.55rem; height: 1.55rem; padding: 0 0.35rem; border-radius: 999px; background: var(--coral); color: var(--abyss); font-style: normal; font-weight: 700; font-size: 0.85rem; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--abyss); }
.person .captain { display: block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lantern); }
.input.find { margin-bottom: 0.8rem; min-height: 44px; }
.accused-line { display: flex; gap: 1rem; align-items: center; margin-top: 0.5rem; }
.accused-line b { display: block; font-family: var(--display); font-weight: 400; font-size: var(--t4); line-height: 1.05; }
.btn.danger-fill { background: var(--coral); border-color: var(--coral); color: var(--abyss); }
.panel.big-moment h2 { font-size: var(--t4); }
.panel.trial { text-align: center; }
.panel.trial h2 { font-size: var(--t5); line-height: 1.05; margin-bottom: 0.4rem; }
.trial-face { display: grid; place-items: center; margin: 0.4rem 0 1.1rem; }
.verdict-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1.1rem; }
.vote { display: grid; justify-items: center; align-content: center; gap: 0.35rem; min-height: 116px; padding: 0.8rem; border-radius: 18px; border: 2px solid var(--line-strong); background: rgba(7, 24, 36, 0.6); color: var(--foam); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: transform 0.1s, background 0.15s; }
.vote:active { transform: scale(0.97); }
.vote .icon { width: 2.3rem; height: 2.3rem; }
.vote.guilty { border-color: rgba(255, 122, 107, 0.75); color: var(--coral); }
.vote.guilty[aria-pressed='true'] { background: var(--coral); color: var(--abyss); }
.vote.innocent { border-color: rgba(99, 199, 207, 0.75); color: var(--sea); }
.vote.innocent[aria-pressed='true'] { background: var(--sea); color: var(--abyss); }
.vote-lines { margin-top: 1rem; display: grid; gap: 0.35rem; text-align: left; font-size: 0.92rem; }
.vote-lines .g { color: var(--coral); margin-right: 0.3rem; }
.vote-lines .i { color: var(--sea); margin-right: 0.3rem; }
.ghost-rules { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.65rem; text-align: left; }
.ghost-rules li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.6rem; align-items: start; }
.ghost-rules .icon { color: var(--wraith); width: 1.4rem; height: 1.4rem; }
details.more { margin-top: 0.8rem; }
details.more summary { cursor: pointer; color: var(--lantern); font-weight: 700; }
ul.plain { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.45rem; }

/* Scan */
.scan-big { width: 100%; display: grid; justify-items: center; gap: 0.35rem; padding: 1.5rem 1rem 1.3rem; border-radius: 18px; border: 2px dashed var(--lantern); background: rgba(244, 184, 96, 0.08); color: var(--foam); cursor: pointer; }
.scan-big:active { transform: scale(0.99); }
.scan-big .icon { width: 3.6rem; height: 3.6rem; color: var(--lantern); }
.scan-big b { font-family: var(--display); font-weight: 400; font-size: var(--t4); line-height: 1.1; }
.scan-big span { color: var(--silt); font-size: 0.9rem; }
.scan-result { margin-top: 0.9rem; padding: 0.7rem 0.9rem; border-radius: 12px; background: rgba(7, 24, 36, 0.6); font-weight: 700; }
.list.tight > li { padding: 0.5rem 0; }

/* Secret */
.power-head { display: flex; gap: 0.5rem; align-items: center; }
.power-head .icon { width: 1.5rem; height: 1.5rem; color: var(--lantern); }
.possessed-open .power-head .icon { color: var(--wraith); }
.curse-count { margin-left: auto; font-weight: 700; color: var(--wraith); white-space: nowrap; font-size: 0.95rem; }
.curse-cards { display: grid; gap: 0.5rem; margin-top: 0.8rem; }
.curse-card { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.75rem; align-items: center; text-align: left; padding: 0.8rem 0.9rem; border-radius: 14px; border: 1px solid rgba(156, 140, 255, 0.6); background: rgba(156, 140, 255, 0.09); color: var(--foam); cursor: pointer; }
.curse-card:active { transform: scale(0.99); }
.curse-card .icon { width: 2.1rem; height: 2.1rem; color: var(--wraith); }
.curse-card b { display: block; font-size: 1.05rem; }
.curse-card small { display: block; color: var(--silt); font-size: 0.86rem; line-height: 1.3; margin-top: 0.1rem; }
.curse-card:disabled { opacity: 0.42; cursor: not-allowed; }
.cast { margin-top: 0.9rem; padding: 0.95rem; border-radius: 14px; border: 1px solid var(--wraith); background: rgba(156, 140, 255, 0.08); }
.crew-choice { display: flex; gap: 0.5rem; align-items: center; }
.crew-choice:disabled { opacity: 0.4; cursor: not-allowed; }
.sub { margin-top: 1rem; font-weight: 700; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silt); }
.verdict.good { color: var(--sea); font-weight: 700; }
.verdict.bad { color: var(--coral); font-weight: 700; }
.shield-line { margin-top: 0.7rem; display: flex; gap: 0.5rem; align-items: center; color: var(--sea); }

/* When the crew can curse: unmistakable, inside Secret only. */
.curse-status { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem 0.9rem; border-radius: 14px; border: 1px dashed rgba(156, 140, 255, 0.5); }
.curse-status > .icon { flex: none; width: 2rem; height: 2rem; color: var(--silt); }
.curse-status b { display: block; font-family: var(--display); font-weight: 400; font-size: var(--t4); line-height: 1.15; }
.curse-status [data-ends] { font-variant-numeric: tabular-nums; }
.curse-status p { color: var(--silt); margin-top: 0.2rem; }
.curses.open .curse-status { border-style: solid; border-color: var(--wraith); background: rgba(156, 140, 255, 0.14); }
.curses.open .curse-status > .icon { color: var(--wraith); animation: waiting 2.4s ease-in-out infinite; }
.btn.big-log { margin-top: 0.9rem; min-height: 56px; font-size: 1.05rem; }
@media (prefers-reduced-motion: reduce) { .curses.open .curse-status > .icon { animation: none; } }

/* The calm, the same on every phone. */
.calm { display: flex; gap: 0.5rem; align-items: center; margin: 0 1rem 0.7rem; padding: 0.5rem 0.8rem; border-radius: 12px; border: 1px dashed rgba(143, 179, 191, 0.5); color: var(--silt); font-size: 0.92rem; }
.calm .icon { flex: none; width: 1.2rem; height: 1.2rem; }
.calm [data-ends] { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--foam); }
.calm.awake { border-style: solid; border-color: var(--coral); color: var(--coral); font-weight: 700; }

/* The roster: a green ring for everyone you've met. */
.porthole.met { box-shadow: 0 0 0 2px var(--abyss), 0 0 0 calc(3px + var(--size) / 16) #4fd18f; }
.porthole.met:not(.s) { outline-color: rgba(79, 209, 143, 0.6); }
.met-word { color: #4fd18f; font-weight: 700; }
.chips-row { gap: 0.4rem; }
.chip-btn { padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--foam); font: inherit; font-size: 0.9rem; cursor: pointer; }
.chip-btn[aria-pressed='true'] { border-color: var(--lantern); color: var(--lantern); background: rgba(244, 184, 96, 0.1); }
.person-card .person-head { display: flex; gap: 0.9rem; align-items: center; margin-top: 0.9rem; }
.person-card .person-head .porthole { --size: 76px; }
.met-line { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.9rem; color: var(--silt); }
.met-line .icon { width: 1.3rem; height: 1.3rem; flex: none; }
.met-line.yes { color: #4fd18f; }
textarea.input.notes { width: 100%; min-height: 6.5rem; resize: vertical; line-height: 1.4; }

/* The meeting muster, and power-ups. */
.muster-btn { min-height: 52px; }
.muster-line { display: flex; gap: 0.5rem; align-items: center; color: #4fd18f; font-weight: 700; }
.muster-line .icon { width: 1.3rem; height: 1.3rem; flex: none; }
.powerup .power-head .icon { color: var(--sea); }

/* Help and settings: a sheet over the game. */
.sheet { position: fixed; inset: 0; z-index: 85; background: rgba(4, 12, 18, 0.8); overflow-y: auto; padding: max(1rem, env(safe-area-inset-top)) 1rem 3rem; }
.sheet-panel { max-width: 34rem; margin: 0 auto; display: grid; gap: 0.9rem; }
.sheet-panel > .spread h2 { font-size: var(--t4); }

/* The big moments: the whole screen, one at a time. */
.cue { position: fixed; inset: 0; z-index: 190; display: grid; place-items: center; overflow-y: auto; padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom)); text-align: center; color: #fff; background: radial-gradient(circle at 50% 38%, #2a5f7d 0%, #0f2c3e 60%, #071824 100%); animation: cue-in 0.3s ease-out; }
.cue.out { opacity: 0; transition: opacity 0.3s; }
.cue-inner { display: grid; justify-items: center; gap: 0.85rem; width: min(100%, 24rem); min-width: 0; }
.cue .cue-icon { width: 5.6rem; height: 5.6rem; stroke-width: 1.4; animation: cue-pulse 1.4s ease-in-out infinite; }
.cue h2 { font-size: clamp(2.2rem, 9.5vw, 3.1rem); line-height: 1.04; }
.cue p { font-size: 1.15rem; line-height: 1.4; opacity: 0.95; }
.cue .cue-actions { display: grid; gap: 0.6rem; width: 100%; margin-top: 0.6rem; }
.cue .btn { min-height: 58px; font-size: 1.12rem; }
.cue .btn.primary { background: #fff; border-color: #fff; color: #071824; }
.cue .btn.quiet { color: rgba(255, 255, 255, 0.78); }
.cue .porthole.xl { --size: 150px; }
.cue .ghost-rules .icon { color: #fff; }
.cue .ghost-rules { font-size: 1.02rem; }
.cue.cue-meeting { background: radial-gradient(circle at 50% 38%, #ffd08a 0%, #d08a2e 50%, #4a2a06 100%); color: #1a0f02; }
.cue.cue-meeting .btn.quiet { color: rgba(26, 15, 2, 0.75); }
.cue.cue-meeting .btn.primary { background: #1a0f02; border-color: #1a0f02; color: #ffd08a; }
.cue.cue-trial, .cue.cue-buzz { background: radial-gradient(circle at 50% 38%, #ff8a7c 0%, #c2392b 52%, #3d0c08 100%); }
.cue.cue-dead, .cue.cue-curse, .cue.cue-muted { background: radial-gradient(circle at 50% 38%, #6a5bd6 0%, #2c2266 52%, #0d0a24 100%); }
.cue.cue-final, .cue.cue-end { background: radial-gradient(circle at 50% 38%, #a99bff 0%, #3b2f8f 52%, #0d0a24 100%); }
.cue.cue-saved { background: radial-gradient(circle at 50% 38%, #7fe0e6 0%, #1d6f7a 52%, #062a30 100%); }
.cue.cue-vote { background: radial-gradient(circle at 50% 32%, #23506a 0%, #0d2433 60%, #050f17 100%); }
.cue.cue-vote .cue-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cue.cue-vote .cue-actions .btn.vote-guilty, .cue.cue-vote .cue-actions .btn.vote-innocent { flex-direction: column; gap: 0.3rem; white-space: normal; padding: 0.6rem 0.4rem; font-size: 1.2rem; letter-spacing: 0.03em; min-width: 0; }
.cue.cue-vote .cue-actions .btn.quiet { grid-column: 1 / -1; }
.cue .btn.vote-guilty { background: var(--coral); border-color: var(--coral); color: #1a0505; min-height: 88px; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.05em; }
.cue .btn.vote-innocent { background: var(--sea); border-color: var(--sea); color: #04191c; min-height: 88px; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.05em; }
@keyframes cue-in { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }
@keyframes cue-pulse { 50% { transform: scale(1.08); opacity: 0.85; } }
@media (prefers-reduced-motion: reduce) { .cue, .cue .cue-icon { animation: none; } }

/* ---------- the scanner: the phone, check-in and the door ---------- */
.scanner { position: fixed; inset: 0; z-index: 195; display: grid; grid-template-rows: auto 1fr auto; gap: 0.8rem; padding: max(0.9rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); background: #02080d; color: var(--foam); }
.scanner .head { display: flex; gap: 0.8rem; align-items: flex-start; justify-content: space-between; }
.scanner h2 { font-size: var(--t3); }
.scanner .frame { position: relative; min-height: 0; overflow: hidden; border-radius: 18px; background: #000; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .aim { position: absolute; left: 50%; top: 50%; width: min(68vw, 52vh, 17rem); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 20px; box-shadow: 0 0 0 100vmax rgba(2, 8, 13, 0.5); pointer-events: none; }
.scanner .aim i { position: absolute; width: 2.4rem; height: 2.4rem; border: 4px solid var(--lantern); }
.scanner .aim i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 20px; }
.scanner .aim i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 20px; }
.scanner .aim i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 20px; }
.scanner .aim i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 20px; }
.scanner .status { position: absolute; left: 0; right: 0; bottom: 0.8rem; margin: 0 1rem; padding: 0.45rem 0.8rem; border-radius: 999px; background: rgba(2, 8, 13, 0.75); text-align: center; font-weight: 700; font-size: 0.92rem; }
.scanner .bottom { display: grid; gap: 0.6rem; }
.scanner .bottom .row { justify-content: center; }
.scanner .typed { display: flex; gap: 0.5rem; }
.scanner .typed .input { flex: 1; min-width: 0; font-size: 1.3rem; min-height: 52px; }
