@font-face {
  font-family: "Chakra Petch";
  src: url("/fonts/ChakraPetch-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url("/fonts/ChakraPetch-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oxanium";
  src: url("/fonts/Oxanium-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oxanium";
  src: url("/fonts/Oxanium-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07080d;
  --surface: rgba(17, 21, 32, 0.92);
  --surface-solid: #111520;
  --panel: #0e111a;
  --text: #f4f6fb;
  --text-soft: #d5dbe8;
  --muted: #9aa3b8;
  --line: #232a3a;
  --action: #d4f500;
  --action-ink: #07080d;
  --mint: #d4f500;
  --cyan: #00a6e8;
  --magenta: #d6009e;
  --paper: #f4ecd8;
  --paper-ink: #1c140c;
  --stamp: #d7263d;
  --bad: #ff4d5a;
  --good: #b6f25a;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(212, 245, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 245, 0, 0.035) 1px, transparent 1px),
    radial-gradient(980px 460px at 8% -12%, rgba(0, 166, 232, 0.16), transparent 58%);
  background-size: 36px 36px, 36px 36px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(212, 245, 0, 0.02) 3px,
    rgba(212, 245, 0, 0.02) 4px
  );
}

#app { position: relative; z-index: 1; }

body.shake { animation: shake 0.4s linear; }

@keyframes shake {
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

button, input { font: inherit; }

h1, h2, .room-code, .clock, .brand, .stamp, .award strong, .role-banner strong {
  font-family: "Chakra Petch", Oxanium, Inter, sans-serif;
}

.pad button, button, .dial, .readout span, .code-input, .map th, .map td.say, .stat b {
  font-family: Oxanium, "Chakra Petch", Inter, sans-serif;
}

button {
  font-weight: 700;
  border: 1px solid rgba(7, 20, 13, 0.4);
  background: var(--action);
  color: var(--action-ink);
  border-radius: 8px;
  padding: 0.8rem 1.05rem;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
}

button:hover { filter: brightness(1.06); }

button:active { transform: translateY(1px); }

button:focus-visible, input:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input {
  width: 100%;
  font-size: 1.15rem;
  padding: 0.85rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(25, 26, 28, 0.92);
  color: var(--text);
}

.wrap {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: max(0.75rem, env(safe-area-inset-top)) 0 max(1.5rem, env(safe-area-inset-bottom));
}

.gate {
  width: min(720px, calc(100% - 1.5rem));
  margin: 4vh auto 3rem;
}

.kicker, .eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--action);
  margin: 0;
}

h1 {
  font-size: clamp(3.2rem, 10vw, 6.4rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin: 0.15rem 0 0.4rem;
  font-weight: 700;
}

.deck, .note, .ask {
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--text-soft);
}

.howto {
  display: grid;
  gap: 0.45rem;
  padding: 0;
  margin: 1.2rem 0 0;
  list-style: none;
  counter-reset: step;
}

.howto li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.9rem 0.75rem 3.2rem;
  position: relative;
  font-size: 1.08rem;
  backdrop-filter: blur(10px);
}

.howto li::before {
  content: counter(step);
  position: absolute;
  left: 0.7rem;
  top: 0.65rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--action);
  color: var(--action-ink);
  display: grid;
  place-items: center;
  font-family: Oxanium, Inter, sans-serif;
  font-weight: 700;
}

.stack { display: grid; gap: 0.7rem; margin-top: 1rem; }
.row { display: flex; gap: 0.6rem; }
.row > * { flex: 1; }
.code-input { text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700; }

.toast {
  background: rgba(42, 14, 18, 0.88);
  color: #ffd5da;
  border: 1px solid var(--stamp);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  margin: 0.8rem 0 0;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(7, 8, 13, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0 0.7rem;
  margin-bottom: 0.8rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mark { width: 42px; height: 42px; }
.trophy { display: block; width: clamp(96px, 14vw, 150px); height: auto; margin: 0.2rem 0 0.6rem; filter: drop-shadow(0 0 18px rgba(255, 200, 60, 0.35)); }

.clock {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.85;
  margin-left: auto;
}

.clock.urgent { color: var(--bad); }
.clock.idle { display: none; }

.round-badge {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.9;
  padding: 0.25rem 0.7rem 0.3rem;
  border: 2px solid var(--action);
  border-radius: 12px;
  font-family: "Chakra Petch", system-ui, sans-serif;
  color: var(--action);
}
.round-badge small {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}
.round-badge strong {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.round-badge + .clock { margin-left: 0; }

.strikes { display: flex; align-items: center; gap: 0.35rem; font-weight: 700; }
.pip {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid var(--text);
  display: inline-block;
}
.pip.on { background: var(--bad); border-color: var(--bad); }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; width: 100%; align-items: center; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.18rem 0.45rem 0.18rem 0.6rem;
  font-size: 0.92rem;
}
.chip-x {
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 0.7rem;
  font-size: 1.45rem;
  line-height: 1;
}
.chip-x.armed {
  font-size: 0.95rem;
  background: var(--bad, #ff4d5a);
  color: #fff;
  border-color: var(--bad, #ff4d5a);
}
.chip.you { border-color: var(--action); }
.chip.away { border-style: dashed; border-color: rgba(255, 255, 255, 0.28) !important; background: rgba(255, 255, 255, 0.03); }
.chip.away b { opacity: 0.55; text-decoration: line-through; text-decoration-thickness: 1px; }
.chip.away .dot { background: #6b6b6b !important; }
.chip-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.08rem 0.42rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft, #bbb);
  white-space: nowrap;
}
.chip-tag.host { background: rgba(255, 200, 60, 0.18); color: #ffd84a; }
.chip-tag.manual-reader { background: rgba(214, 255, 0, 0.16); color: var(--action); }
.chip-tag.offline { background: rgba(255, 77, 90, 0.2); color: #ff8a93; }
.chip b { font-weight: 700; }

.room-code {
  font-size: clamp(4rem, 14vw, 7.5rem);
  letter-spacing: 0.12em;
  line-height: 0.85;
  margin: 0.1rem 0 0.4rem;
  font-weight: 700;
}

.people { list-style: none; padding: 0; margin: 0.6rem 0 1rem; display: grid; gap: 0.5rem; }
.people li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  font-size: 1.25rem;
  backdrop-filter: blur(10px);
}
.people .meta { color: var(--action); font-size: 0.95rem; text-align: right; }
.people li.away { opacity: 0.55; }

.stage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.7fr);
  gap: 1rem;
  align-items: start;
}

.manual, .device, .relay-card, .wait-card, .aside, .poster, .panel-card {
  border: 1px solid var(--line);
  box-shadow: none;
}

.manual {
  background: var(--paper);
  color: var(--paper-ink);
  padding: 1.15rem 1.2rem 1.3rem;
  border-radius: 14px;
  border-color: rgba(243, 234, 214, 0.7);
}

.stamp {
  display: inline-block;
  border: 3px solid var(--stamp);
  color: var(--stamp);
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 0.15rem 0.45rem;
  transform: rotate(-6deg);
  transform-origin: left center;
  margin: 0.15rem 0 0.9rem;
  background: transparent;
}

.manual h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
  margin: 0.4rem 0;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.contact {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
}

.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.rules li {
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: clamp(1.28rem, 2.3vw, 1.85rem);
  line-height: 1.25;
  background: #fff8ec;
  border-left: 8px solid var(--paper-ink);
  padding: 0.55rem 0.7rem;
}

.ask { color: #5c4a38; margin-bottom: 0; }

.progress { list-style: none; padding: 0; margin: 0 0 0.8rem; display: grid; gap: 0.35rem; }
.progress li { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 1.02rem; }
.progress .now { color: var(--action); font-weight: 700; }
.progress .done { opacity: 0.55; text-decoration: line-through; }

.aside, .relay-card, .wait-card, .panel-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 0.9rem;
  backdrop-filter: blur(12px);
}

.device {
  width: min(760px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  backdrop-filter: blur(12px);
}

.device h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0.1rem 0 0.2rem;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-weight: 700;
}

.turn {
  margin: 0 0 0.8rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.turn.live { color: var(--action); }
.turn.wait { color: var(--muted); }

.readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.readout {
  background: #111520;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  min-height: 9.2rem;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.25rem;
}

.readout span { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.04em; }
.readout small {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.bulb {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 999px;
  border: 3px solid rgba(244, 244, 245, 0.35);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.25);
}

.symbol { width: 4.8rem; height: 4.8rem; }
.symbol svg { width: 100%; height: 100%; }

.dial {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 999px;
  border: 6px solid var(--action);
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 700;
}

.lights { display: flex; gap: 0.45rem; }
.lights i {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 3px solid #f4f4f5;
  display: block;
}
.lights i.on { background: #f4f4f5; }

.pad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.pad button {
  min-height: 5rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: 0.05em;
}

.pad button.dim {
  background: rgba(12, 16, 14, 0.9);
  color: var(--muted);
  border-color: var(--line);
}

.hint { min-height: 1.3rem; color: var(--action); margin: 0.45rem 0 0; }

.feed { list-style: none; padding: 0; margin: 0.4rem 0 0.7rem; display: grid; gap: 0.3rem; align-content: start; height: 9.5rem; overflow-y: auto; }
.feed li { font-size: 1.02rem; line-height: 1.3; }
.feed .bad { color: var(--bad); }
.feed .good { color: var(--good); }
.feed .chat b { color: var(--action); }

.phrases { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-bottom: 0.2rem; }
.phrases button {
  flex: 0 0 auto;
  background: #111520;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.map {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.6rem;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}
.map th {
  text-align: left;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--action);
  font-family: Oxanium, Inter, sans-serif;
}
.map td { padding: 0.45rem 0.2rem; border-top: 1px solid var(--line); font-weight: 700; }
.map td.say { color: var(--action); font-family: Oxanium, Inter, sans-serif; }

.relay-card h2, .wait-card h2 {
  margin: 0.2rem 0 0.4rem;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
  font-weight: 700;
}

.poster {
  background: var(--surface);
  color: var(--text);
  border-radius: 14px;
  padding: clamp(1rem, 3vw, 2rem);
  margin-top: 0.4rem;
  backdrop-filter: blur(12px);
}

.poster h1 {
  max-width: 12ch;
  font-size: clamp(3.1rem, 8vw, 6.3rem);
}

.subhead {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.3;
  max-width: 38rem;
  color: var(--text-soft);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}
.stat {
  background: rgba(12, 16, 14, 0.55);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem 0.75rem;
  min-width: 6.5rem;
}
.stat b {
  display: block;
  font-size: 1.5rem;
  font-family: Oxanium, Inter, sans-serif;
}

.awards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.award {
  background: var(--mint);
  color: var(--action-ink);
  border: 1px solid rgba(7, 20, 13, 0.18);
  box-shadow: none;
  border-radius: 14px;
  padding: 0.85rem 0.95rem 1rem;
  min-height: 8.5rem;
}
.award.chaos {
  background: var(--magenta);
  color: #fff;
  border-color: #ff4fa8;
}
.award .label { letter-spacing: 0.14em; font-size: 0.82rem; font-weight: 700; }
.award strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0.25rem 0;
}
.award p { margin: 0; font-size: 1.05rem; }

.timeline { list-style: none; padding: 0; margin: 1.1rem 0 0; }
.timeline li {
  display: grid;
  grid-template-columns: 4.4rem minmax(6rem, 0.8fr) 2.4fr;
  gap: 0.65rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.3;
}
.timeline .who { font-weight: 700; }
.timeline .bad { color: #ffb4bc; }
.timeline .good { color: var(--good); }
.timeline .chat { color: var(--mint); }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

.logo { height: 42px; width: auto; }
.logo[hidden] { display: none !important; }
.discord { color: var(--cyan); font-weight: 700; display: inline-block; margin: 0.8rem 0; }
.role-banner {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  margin: 0 0 0.8rem;
  background: var(--surface);
}
.role-banner strong { display: block; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1; }
.role-banner.lead { border-color: var(--action); }
.role-banner.go { border-color: var(--cyan); }
.role-banner p { margin: 0.35rem 0 0; color: var(--text-soft); }
.callout {
  font-size: 1.35rem;
  background: var(--panel);
  border-left: 4px solid var(--cyan);
  padding: 0.7rem 0.8rem;
  margin: 0 0 0.8rem;
}
.lore { font-size: 1.05rem; margin: 0.2rem 0 0.4rem; }
.prompts { margin: 0.6rem 0; padding-left: 1.1rem; }
.prompts li { margin: 0.25rem 0; }
.composer { display: flex; gap: 0.45rem; margin-top: 0.45rem; }
.composer input { flex: 1; }
.start-row { margin-top: 0.8rem; }
.setup { display: grid; gap: 0.45rem; margin: 0.6rem 0; }
.people .meta { display: flex; gap: 0.45rem; align-items: center; }
button.tiny { padding: 0.25rem 0.5rem; font-size: 0.85rem; }
.people li.is-briefer { border-color: var(--action); }
.chip.briefer { border-color: var(--action); }
.chip.listening { box-shadow: inset 0 0 0 2px var(--cyan); }
.dot { width: 0.7rem; height: 0.7rem; border-radius: 999px; display: inline-block; flex: 0 0 auto; }
.talkto {
  border: 2px solid var(--action);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  margin: 0 0 0.8rem;
  background: var(--surface);
}
.talkto strong {
  display: block;
  font-family: "Chakra Petch", Oxanium, sans-serif;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 0.95;
}
.talkto.quiet strong { font-size: clamp(1.45rem, 3.4vw, 2.2rem); }
.talkto.now { animation: turn-pop 0.45s ease-out 1; }
.talkto .lock-owner, .yours, .manual .lock-owner { font-size: 1.25rem; font-weight: 700; margin: 0.35rem 0 0; }
.talkto .level, .mode-flag { margin: 0.35rem 0 0; color: var(--text-soft); }
.mode-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.2rem 0 0.8rem;
}
.mode-field { display: grid; gap: 0.25rem; }
.mode-select, .mode-name {
  font-family: "Chakra Petch", Oxanium, sans-serif;
  font-size: 1.35rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  min-width: 11rem;
}
.mode-explainer { margin: 0; font-size: 1.05rem; max-width: 28rem; }
.setup .mode-row { margin: 0.1rem 0 0.4rem; }
.up-chip.away { border-style: dashed; border-color: rgba(255, 255, 255, 0.28) !important; }
.up-chip.away b { opacity: 0.55; text-decoration: line-through; text-decoration-thickness: 1px; }
.up-chip.away .dot { background: #6b6b6b !important; }
.removed-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; width: 100%; }
.up-next {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  overflow-x: auto;
  flex-wrap: nowrap;
}
.up-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: var(--surface);
  flex: 0 0 auto;
}
.turn-card {
  border: 2px solid var(--line);
  border-radius: 16px;
}
.turn-card h2, .turn-card strong {
  font-family: "Chakra Petch", Oxanium, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1;
  margin: 0.15rem 0;
}
.turn-card.next {
  animation: turn-pulse 1.8s ease-in-out infinite;
  border-color: var(--turn, var(--action));
}
.turn-card.next h2, .turn-card.now strong { color: var(--turn, var(--cyan)); }
.turn-card.now { animation: turn-pop 0.45s ease-out 1; }
.brief-note {
  margin: 0 0 0.7rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 700;
  color: var(--text);
}
.sound-toggle { margin-left: 0.2rem; }
@keyframes turn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--turn, var(--action)) 50%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
}
@keyframes turn-pop {
  0% { transform: scale(0.98); }
  40% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .turn-card.next, .turn-card.now { animation: none; }
}
.progress li { padding-left: 0.45rem; }
.aside.dimmed { opacity: 0.45; }
.device { border: 1px solid var(--line); }
.leaderboard { margin-top: 1.2rem; }
.leaderboard h2 { font-size: 1.8rem; margin: 0 0 0.4rem; }
.board { margin: 0.2rem 0 0.7rem; padding-left: 1.1rem; }
.penalty {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: none;
  font-family: "Chakra Petch", Oxanium, sans-serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--bad);
  text-shadow: 0 0 18px rgba(255, 77, 90, 0.45);
}
#link-status { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 25; }

@media (max-width: 860px) {
  .stage-layout, .awards, .timeline li { grid-template-columns: 1fr; }
  .timeline li { gap: 0.15rem; }
  .clock { margin-left: 0; }
  .round-badge { margin-left: 0; padding: 0.2rem 0.55rem; }
  .round-badge strong { font-size: 1.7rem; }
  .mode-row { flex-direction: column; align-items: stretch; }
  h1 { font-size: clamp(2.8rem, 14vw, 4.4rem); }
}

.both-cards { display: grid; gap: 0.8rem; }
.pair-manual { border-left: 4px solid; padding: 0.4rem 0 0.4rem 0.8rem; margin: 0.6rem 0; }
.pair-manual h3 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.pair-manual.done { opacity: 0.5; }
.talkto.parallel .pair-names { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.talkto.parallel .pair-names strong { font-size: clamp(1.6rem, 4vw, 2.6rem); }
.pair-list { list-style: none; padding: 0; margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-weight: 700; font-size: 0.9rem; }
.pair-list li.done { opacity: 0.5; text-decoration: line-through; }

.wrap strong.term, .talkto strong.term, .role-banner strong.term { font-size: inherit; line-height: inherit; letter-spacing: inherit; display: inline; color: inherit; font-weight: 800; margin: 0; }

.chip-x-holder { position: relative; display: inline-flex; align-items: center; }
.kick-menu { position: static; margin-left: 0.35rem; display: flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.5rem; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); white-space: nowrap; }
.kick-ask { font-size: 0.8rem; font-weight: 700; color: var(--text); margin-right: 0.2rem; }
.kick-opt { padding: 0.3rem 0.7rem; font-size: 0.8rem; min-height: 0; }
.kick-opt.ban { background: var(--bad); color: #fff; border-color: var(--bad); }
.out-card { max-width: 32rem; margin: 2rem auto; padding: 1.4rem; border: 2px solid var(--action); border-radius: 16px; background: var(--surface); text-align: center; }
.out-card.banned { border-color: var(--bad); }

.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; }
.code-row .room-code { margin: 0; }
.logo-big { height: clamp(72px, 11vw, 132px); width: auto; filter: drop-shadow(0 0 18px rgba(212, 245, 0, 0.25)); }
.leave { white-space: nowrap; }
@media (max-width: 520px) {
  .logo-big { height: 64px; }
}

/* Lobby setup: one tidy centered column, same-width dropdowns, and room to breathe after the player list. */
.lobby-card .mode-row { flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; }
.lobby-card .mode-field { justify-items: center; text-align: center; }
.lobby-card .mode-select, .lobby-card .mode-name { width: 16rem; max-width: 100%; text-align: center; text-align-last: center; }
.lobby-card .mode-explainer { margin: 0 auto; text-align: center; }
.lobby-card .setup { justify-items: center; text-align: center; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.lobby-card .removed-row { justify-content: center; margin-top: 0.4rem; }
.feed-empty { text-align: center; }
@media (max-width: 860px) {
  .lobby-card .mode-row { align-items: center; }
}

.wins-badge { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.6rem 0.3rem 0.4rem; border: 2px solid #f5b83d; border-radius: 12px; color: #f5b83d; font-family: "Chakra Petch", system-ui, sans-serif; line-height: 0.9; }
.wins-badge .mark { width: 30px; height: 30px; }
.wins-text { display: flex; flex-direction: column; align-items: center; }
.wins-text small { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text); }
.wins-text strong { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; }
.wins-badge + .round-badge { margin-left: 0; }
.struck-out { font-family: "Chakra Petch", system-ui, sans-serif; font-size: clamp(1.4rem, 3.5vw, 2.2rem); font-weight: 700; color: var(--bad); margin: 0.4rem 0 0.8rem; }
.board-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.6rem 1.4rem; }
@media (max-width: 860px) {
  .wins-badge { margin-left: 0; padding: 0.2rem 0.5rem 0.2rem 0.35rem; }
  .wins-badge .mark { width: 24px; height: 24px; }
  .wins-text strong { font-size: 1.5rem; }
}

/* ===================== Skin 4: Vault HUD ===================== */
:root { --hud: rgba(0, 166, 232, 0.25); --hud-strong: rgba(0, 166, 232, 0.6); --mag-text: #ff4fc8; }
body {
  background:
    radial-gradient(900px 500px at 50% 0, rgba(0, 166, 232, 0.1), transparent 70%),
    linear-gradient(rgba(0, 166, 232, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(0, 166, 232, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
}
body::before { display: none; }

/* Top bar */
.topbar { border-bottom: 1px solid rgba(0, 166, 232, 0.35); background: linear-gradient(rgba(0, 166, 232, 0.08), rgba(7, 8, 13, 0.92)); }
.brand span { text-transform: uppercase; letter-spacing: 0.14em; font-size: 1.05rem; }
.strikes span { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pip { border-radius: 0; transform: rotate(45deg); width: 0.8rem; height: 0.8rem; border-color: var(--magenta); margin: 0 0.15rem; }
.pip.on { background: var(--magenta); border-color: var(--magenta); }
.clock { color: var(--action); letter-spacing: 0.04em; text-shadow: 0 0 18px rgba(212, 245, 0, 0.3); }
.clock.urgent { color: var(--bad); text-shadow: none; }
.round-badge { border-radius: 0; border: 1px solid var(--cyan); color: var(--cyan); }
.round-badge small { color: var(--cyan); letter-spacing: 0.22em; }
.wins-badge { border-radius: 0; border: 1px solid #f5b83d; }

/* Clipped-corner controls */
button.secondary, button.tiny, .kick-opt, .phrases button, .copy {
  border-radius: 0;
  border: 1px solid var(--hud-strong);
  color: var(--cyan);
  background: rgba(0, 166, 232, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
button.leave { border-color: var(--magenta); color: var(--mag-text); background: rgba(214, 0, 158, 0.1); margin-left: 0.2rem; }
.copy { border-color: var(--action); color: var(--action); background: transparent; }
.kick-opt { color: var(--action); border-color: var(--action); }
.kick-opt.ban { background: var(--bad); color: #fff; border-color: var(--bad); }
button:not(.secondary):not(.tiny):not(.chip-x):not(.kick-opt):not(.dim) {
  border-radius: 0;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
button.start { font-size: 1.3rem; padding: 1rem 3.5rem; letter-spacing: 0.24em; clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
select, .mode-select, .mode-name {
  border-radius: 0 !important;
  background: rgba(0, 166, 232, 0.06) !important;
  border: 1px solid rgba(0, 166, 232, 0.45) !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
input { border-radius: 0; border-color: var(--hud); background: rgba(0, 166, 232, 0.04); }

/* Chips: clipped tags with diamond dots */
.chip { border-radius: 0; border: 1px solid rgba(0, 166, 232, 0.3); background: rgba(0, 166, 232, 0.05); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.chip.you { border-color: var(--action); background: rgba(212, 245, 0, 0.06); }
.dot { border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); width: 0.8rem; height: 0.8rem; }
.chip-tag { border-radius: 0; }

/* Panels with corner brackets */
.panel, .hero, .talkto, .role-banner, .device, .relay-card, .wait-card, .aside, .poster, .manual, .out-card, .gate > section {
  position: relative;
  border-radius: 0 !important;
  border: 1px solid var(--hud);
  background-color: rgba(10, 14, 24, 0.78);
}
.manual { background-color: var(--paper); }
.panel::before, .panel::after, .hero::before, .hero::after, .talkto::before, .talkto::after,
.device::before, .device::after, .relay-card::before, .relay-card::after, .aside::before, .aside::after,
.poster::before, .poster::after, .wait-card::before, .wait-card::after, .role-banner::before, .role-banner::after,
.out-card::before, .out-card::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--cyan);
  pointer-events: none;
}
.panel::before, .hero::before, .talkto::before, .device::before, .relay-card::before, .aside::before, .poster::before, .wait-card::before, .role-banner::before, .out-card::before {
  top: -2px; left: -2px; border-right: 0; border-bottom: 0;
}
.panel::after, .hero::after, .talkto::after, .device::after, .relay-card::after, .aside::after, .poster::after, .wait-card::after, .role-banner::after, .out-card::after {
  bottom: -2px; right: -2px; border-left: 0; border-top: 0;
}

/* '// SECTION' labels */
.eyebrow, .kicker { color: var(--cyan); font-family: "Chakra Petch", sans-serif; letter-spacing: 0.24em; }
.panel-title { color: var(--cyan); font-size: 0.85rem; letter-spacing: 0.24em; text-transform: uppercase; text-align: center; margin: 0 0 0.9rem; }
.panel-title::before, .leaderboard h2::before { content: "// "; }
.panel-title .count { color: var(--action); }
.codebox .eyebrow::before { content: "▸ "; }

/* Lobby: centered column */
.lobby-card { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.6rem; }
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 3rem; padding: 1.6rem; }
.codebox { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.room-code { color: var(--action); text-shadow: 0 0 22px rgba(212, 245, 0, 0.35); letter-spacing: 0.14em; font-size: clamp(3.4rem, 11vw, 6.2rem); }
.logo-big { height: clamp(80px, 13vw, 150px); }
.panel { padding: 1.4rem; }
.people { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 0; }
.people li { border-radius: 0 !important; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); background: rgba(0, 166, 232, 0.05); }
.setup-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.setup-panel > .panel-title, .setup-panel > .note { grid-column: 1 / -1; text-align: center; }
.setup-panel .setup { display: contents; }
.setup-panel .mode-row { flex-direction: column; align-items: center; text-align: center; margin: 0; gap: 0.4rem; }
.setup-panel .mode-field { justify-items: center; }
.setup-panel .mode-select, .setup-panel .mode-name { width: 100%; min-width: 0; text-align: center; text-align-last: center; }
.setup-panel .mode-explainer { font-size: 0.85rem; color: var(--muted); text-align: center; }
.lobby-card .setup { border-top: 0; margin-top: 0; padding-top: 0; }
.start-row { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.lobby-card .leaderboard { margin: 0; }

/* Typed-text chat feed */
.feed li { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
.feed li::before { content: "> "; color: var(--muted); }
.feed .chat b, .feed b { color: var(--cyan); }
.feed .bad { color: var(--mag-text); font-weight: 700; }
.feed-empty::before { content: "" !important; }

/* Game: talk card, buttons in lime / cyan / magenta outlines */
.talkto { text-align: center; }
.talkto strong { text-transform: uppercase; letter-spacing: 0.04em; }
.role-banner { text-align: center; }
.pad button {
  border-radius: 0;
  background: rgba(212, 245, 0, 0.07);
  border: 1px solid var(--action);
  color: var(--action);
  letter-spacing: 0.16em;
}
.pad button:nth-child(2) { background: rgba(0, 166, 232, 0.08); border-color: var(--cyan); color: var(--cyan); }
.pad button:nth-child(3) { background: rgba(214, 0, 158, 0.09); border-color: var(--magenta); color: var(--mag-text); }
.pad button.dim { opacity: 0.5; }
.device h2 { color: var(--action); letter-spacing: 0.12em; text-transform: uppercase; }
.readout { border-radius: 0 !important; border-color: var(--hud) !important; }
.map th { color: var(--cyan); letter-spacing: 0.2em; }
.poster { text-align: center; }
.struck-out { text-transform: uppercase; letter-spacing: 0.08em; }

@media (max-width: 860px) {
  .setup-panel { grid-template-columns: 1fr; }
  .hero { gap: 0.8rem 1.4rem; padding: 1.1rem; }
  .logo-big { height: 72px; }
  .lobby-card { gap: 1.1rem; }
  button.start { padding: 0.9rem 2.2rem; }
}
