/* Arcade: purple cabinet, tactile controls and bright question cards. */
:root {
 color-scheme:dark;
 --bg:#161023; --panel:#241a35; --panel2:#302341; --line:#493656;
 --ink:#fff5ee; --muted:#b6a7c8;
 --gold:#b49aef; --gold-bright:#c8b2ff; --accent-ink:#24143b;
 --accent-soft:#342549; --accent-border:#72578c;
 --green:#addac0; --red:#f1a2b3; --success-soft:#233a30; --danger-soft:#432c3c;
 --yellow:#f9df68; --pink:#ee96b8; --mint:#a2d5bb; --card-ink:#2e203a; --outline:#0b0611;
 --font:'Avenir Next','Segoe UI',Arial,sans-serif;
 font-family:var(--font);background:var(--bg);color:var(--ink);font-synthesis:none;
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  min-width:320px;
  background:var(--bg)
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent
}
button {
  cursor:pointer
}
button:disabled {
  cursor:not-allowed;
  opacity:.38
}
a {
  color:inherit;
  text-decoration:none
}
button {
  color:inherit
}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:2px solid var(--gold);
  outline-offset:5px
}
button {
  transition:background .18s,transform .18s,border-color .18s,color .18s
}
button:not(:disabled):active {
  transform:translateY(1px)
}
.hidden {
  display:none!important
}
.app-shell {
  max-width:1600px;
  padding:0 56px;
  margin:auto;
  min-height:100vh;
  display:flex;
  flex-direction:column
}
.header {
  height:112px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-size:30px;
  letter-spacing:-1.6px;
  font-weight:800
}
.brand-dot {
  color:var(--gold)
}
.brand-symbol {
  font-family:Georgia,serif;
  font-style:italic;
  font-size:44px;
  color:var(--gold);
  width:37px;
  height:41px;
  border:1px solid var(--line);
  border-radius:12px;
  position:relative;
  line-height:.75;
  padding-left:10px;
  letter-spacing:-7px
}
.brand-symbol span {
  font-family:Arial,sans-serif;
  font-style:normal;
  font-size:23px;
  position:absolute;
  right:6px;
  top:3px
}
.header-center {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  color:var(--muted);
  letter-spacing:.2px
}
.live-dot {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--gold);
  box-shadow:0 0 0 4px var(--accent-soft);
  flex-shrink:0
}
.header-right {
  display:flex;
  align-items:center;
  gap:14px
}
.connection {
  font-size:11px;
  color:var(--muted);
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:30px
}
.connection.online {
  color:var(--green);
  border-color:var(--accent-border)
}
.connection.online:before {
  content:'•';
  margin-right:6px
}
.connection.busy {
  color:var(--gold)
}
main {
  flex:1
}
.join-layout {
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(340px,.85fr);
  gap:8%;
  padding:66px 0 55px;
  align-items:start;
  min-height:760px
}
.eyebrow {
  font-size:10px;
  line-height:1.7;
  letter-spacing:1.8px;
  font-weight:700;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:13px
}
.short-line {
  width:25px;
  height:1px;
  background:var(--gold)
}
.join-intro h1 {
  font-size:clamp(48px,5vw,76px);
  line-height:1.12;
  letter-spacing:-3px;
  margin:30px 0 24px;
  font-weight:500
}
.serif {
  font-family:Georgia,'Times New Roman',serif;
  font-weight:400;
  font-style:italic;
  color:var(--gold);
  letter-spacing:-2px
}
.intro-copy {
  font-size:14px;
  line-height:1.9;
  color:var(--muted);
  max-width:460px
}
.intro-steps {
  display:flex;
  align-items:center;
  gap:18px;
  font-size:11px;
  color:var(--muted);
  margin-top:36px
}
.intro-steps b {
  font-size:10px;
  font-weight:500;
  color:var(--gold);
  margin-right:8px
}
.step-line {
  height:1px;
  width:26px;
  background:var(--line)
}
.visual-board {
  height:220px;
  position:relative;
  margin-top:35px;
  max-width:540px
}
.decor-tile {
  position:absolute;
  width:150px;
  height:135px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:22px;
  box-shadow:0 18px 40px #0002;
  display:flex;
  flex-direction:column;
  gap:17px
}
.decor-tile small {
  font-size:8px;
  letter-spacing:1.3px;
  color:var(--muted)
}
.decor-tile>span {
  font-family:Georgia,serif;
  font-size:52px;
  line-height:1;
  color:var(--gold)
}
.tile-one {
  left:18px;
  top:26px;
  transform:rotate(-10deg);
  background:var(--panel)
}
.tile-two {
  left:154px;
  top:12px;
  transform:rotate(-1deg);
  z-index:1
}
.tile-three {
  left:292px;
  top:26px;
  transform:rotate(9deg);
  background:var(--gold);
  border-color:var(--line);
  z-index:2
}
.tile-three small,.tile-three>span {
  color:var(--panel)
}
.tile-star {
  font-size:19px;
  position:absolute;
  right:17px;
  bottom:25px
}
.visual-caption {
  position:absolute;
  bottom:7px;
  left:27px;
  color:var(--muted);
  font-size:10px;
  display:flex;
  gap:10px;
  align-items:center
}
.visual-caption .live-dot {
  background:var(--muted);
  width:4px;
  height:4px;
  box-shadow:none
}
.orbit {
  border:1px solid var(--line);
  position:absolute;
  border-radius:50%;
  transform:rotate(-15deg);
  pointer-events:none
}
.orbit-one {
  width:500px;
  height:170px;
  left:-15px;
  top:-5px
}
.orbit-two {
  width:520px;
  height:190px;
  left:-22px;
  top:-15px
}
.join-side {
  padding-top:5px;
  max-width:460px;
  width:100%;
  justify-self:end
}
.entry-card {
  background:linear-gradient(155deg,var(--panel),var(--panel) 75%);
  border:1px solid var(--line);
  border-radius:18px;
  padding:30px;
  box-shadow:0 28px 70px #0000001c
}
.card-top {
  display:flex;
  align-items:center;
  justify-content:space-between
}
.card-top .eyebrow {
  font-size:9px
}
.card-mark {
  color:var(--gold);
  font-size:24px
}
.entry-card h2 {
  font-size:24px;
  letter-spacing:-.9px;
  font-weight:600;
  margin:22px 0 10px
}
.muted {
  color:var(--muted);
  font-size:12px;
  line-height:1.7
}
.room-ticket {
  margin:25px 0 23px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border:1px dashed var(--line);
  border-radius:8px;
  padding:15px 17px;
  background:var(--panel)
}
.field-label {
  font-size:8px;
  letter-spacing:1.3px;
  font-weight:700;
  color:var(--muted);
  display:block
}
.room-ticket strong {
  font-size:21px;
  font-family:monospace;
  letter-spacing:3px;
  display:block;
  margin-top:5px;
  font-weight:500;
  color:var(--gold)
}
.ticket-icon {
  font-size:25px;
  color:var(--muted)
}
.identity-fieldset {
  border:0;
  padding:0;
  margin:0
}
.identity-fieldset legend {
  margin-bottom:13px
}
.identities {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px
}
.identity {
  border:1px solid var(--line);
  border-radius:9px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 10px;
  cursor:pointer;
  position:relative;
  min-width:0;
  background:var(--panel)
}
.identity:hover {
  border-color:var(--line)
}
.identity:has(input:checked) {
  border-color:var(--gold);
  background:var(--accent-soft)
}
.identity input {
  position:absolute;
  opacity:0;
  width:1px;
  height:1px
}
.identity:has(input:focus-visible) {
  outline:2px solid var(--gold);
  outline-offset:3px
}
.avatar {
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--panel2);
  border-radius:50%;
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  flex-shrink:0
}
.identity:nth-child(2) .avatar {
  background:var(--panel2);
  color:var(--muted)
}
.identity:nth-child(3) .avatar {
  background:var(--panel2);
  color:var(--muted)
}
.identity:nth-child(4) .avatar {
  background:var(--panel2);
  color:var(--muted)
}
.identity-info {
  min-width:0
}
.identity-info strong {
  font-size:11px;
  display:block;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
  font-weight:600
}
.identity-info small {
  font-size:9px;
  color:var(--muted);
  margin-top:4px;
  display:block
}
.identity-check {
  position:absolute;
  right:7px;
  top:7px;
  font-size:9px;
  color:var(--gold);
  opacity:0
}
.identity:has(input:checked) .identity-check {
  opacity:1
}
.button {
  border:1px solid transparent;
  border-radius:7px;
  padding:12px 18px;
  font-size:12px;
  line-height:1.5;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  min-height:43px
}
.button-gold {
  background:var(--gold);
  color:var(--accent-ink)
}
.button-gold:hover:not(:disabled) {
  background:var(--gold-bright)
}
.button-outline {
  background:transparent;
  border-color:var(--line)
}
.button-outline:hover:not(:disabled) {
  border-color:var(--gold);
  color:var(--gold)
}
.button-wide {
  width:100%;
  justify-content:space-between;
  margin-top:23px
}
.button-wide span {
  font-size:20px;
  font-weight:400;
  line-height:.8
}
.button-quiet {
  background:transparent;
  border-color:var(--line);
  color:var(--muted);
  padding:9px 12px;
  font-size:10px
}
.button-quiet:hover:not(:disabled) {
  background:var(--panel2);
  color:var(--ink)
}
.entry-footnote {
  font-size:9px;
  color:var(--muted);
  text-align:center;
  margin:14px 0 0;
  line-height:1.6
}
.manual-details {
  border-top:1px solid var(--line);
  margin-top:22px;
  padding-top:17px;
  color:var(--muted);
  font-size:10px
}
.manual-details summary {
  cursor:pointer
}
.manual-form {
  display:grid;
  gap:12px;
  margin-top:18px
}
.manual-form label,.score-dialog label,.final-form label {
  display:grid;
  gap:7px;
  font-size:11px;
  color:var(--muted)
}
input,select,textarea {
  background:var(--panel);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:7px;
  padding:11px 12px;
  min-width:0;
  width:100%
}
input::placeholder,textarea::placeholder {
  color:var(--muted)
}
input:focus,textarea:focus {
  border-color:var(--gold)
}
.join-note {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-top:23px;
  color:var(--muted)
}
.join-note>span {
  font-size:23px;
  color:var(--muted)
}
.join-note p {
  font-size:10px;
  line-height:1.8
}
.loading-line {
  color:var(--gold);
  font-size:12px;
  padding:36px 0
}
.footer {
  min-height:76px;
  border-top:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  font-size:10px;
  color:var(--muted)
}
.footer>span:nth-child(2) {
  font-size:8px;
  letter-spacing:1.7px
}
.footer-star {
  color:var(--gold);
  padding:0 11px
}
.debug-link {
  font-size:9px;
  color:var(--muted)
}
.skip-link {
  position:fixed;
  top:8px;
  left:8px;
  z-index:10;
  background:var(--gold);
  color:var(--bg);
  padding:10px;
  transform:translateY(-200%)
}
.skip-link:focus {
  transform:none
}

.game-layout {
  padding:38px 0 42px
}
.game-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:30px
}
.game-heading .eyebrow {
  font-size:9px
}
.game-heading h1 {
  font-size:30px;
  line-height:1.3;
  letter-spacing:-1px;
  font-weight:500;
  margin:9px 0 0
}
.game-meta {
  display:flex;
  gap:12px;
  align-items:center
}
.role-badge {
  color:var(--gold);
  font-size:10px;
  background:var(--accent-soft);
  border:1px solid var(--accent-border);
  border-radius:5px;
  padding:8px 10px
}
.room-code-button {
  border:1px solid var(--line);
  border-radius:7px;
  background:transparent;
  display:flex;
  gap:12px;
  align-items:center;
  font-size:8px;
  letter-spacing:1px;
  color:var(--muted);
  padding:10px 12px
}
.room-code-button strong {
  font-family:monospace;
  font-size:12px;
  letter-spacing:1px;
  color:var(--ink);
  font-weight:500
}
.room-code-button>span {
  color:var(--gold);
  font-size:14px
}
.game-columns {
  display:grid;
  grid-template-columns:minmax(0,1fr) 272px;
  gap:27px;
  align-items:start
}
.game-main {
  min-width:0
}
.stage-top {
  height:46px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:15px
}
.stage-label {
  font-size:9px;
  letter-spacing:1.3px;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted)
}
.stage-label .live-dot {
  width:5px;
  height:5px
}
.stage {
  border-radius:12px;
  overflow:hidden;
  min-height:420px
}
.board {
  display:flex;
  flex-direction:column;
  gap:7px
}
.board-row {
  display:grid;
  grid-template-columns:minmax(140px,1.6fr) repeat(var(--questions,5),minmax(40px,1fr));
  gap:7px
}
.theme-name {
  background:var(--panel2);
  border:1px solid var(--line);
  border-radius:6px;
  display:flex;
  align-items:center;
  padding:14px 18px;
  font-size:11px;
  font-weight:600;
  line-height:1.5;
  min-height:68px
}
.question-cell {
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--panel);
  color:var(--gold);
  font-family:Georgia,serif;
  font-size:30px;
  min-height:68px;
  position:relative
}
.question-cell:hover:not(:disabled) {
  background:var(--panel2);
  border-color:var(--gold);
  transform:translateY(-2px)
}
.question-cell:disabled {
  opacity:1;
  cursor:default
}
.question-cell.played {
  color:var(--muted);
  background:var(--panel);
  border-color:var(--line)
}
.question-cell.played:after {
  content:'—';
  font-family:var(--font);
  font-size:20px
}
.question-cell.played span {
  display:none
}
.question-cell.unavailable {
  color:var(--muted)
}
.board-readonly .question-cell:not(.played) {
  color:var(--muted)
}
.control-panel {
  margin-top:20px;
  min-height:78px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:17px 20px;
  background:var(--panel);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px
}
.control-copy {
  min-width:0
}
.control-copy strong {
  font-size:12px;
  font-weight:600;
  display:block;
  line-height:1.5
}
.control-copy small {
  display:block;
  color:var(--muted);
  font-size:10px;
  line-height:1.7;
  margin-top:4px
}
.control-actions {
  display:flex;
  gap:9px;
  align-items:center;
  flex-shrink:0
}
.game-bottom {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-top:15px;
  color:var(--muted);
  font-size:9px;
  line-height:1.7
}
.text-button {
  background:none;
  border:0;
  padding:5px 0;
  color:var(--muted);
  font-size:10px;
  white-space:nowrap
}
.text-button:hover {
  color:var(--gold)
}
.scoreboard {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel);
  overflow:hidden
}
.scoreboard-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:22px 20px 19px
}
.scoreboard-title h2 {
  font-size:12px;
  font-weight:600;
  margin:0
}
.scoreboard-title>span {
  font-family:monospace;
  font-size:10px;
  color:var(--muted)
}
.player-card {
  display:flex;
  align-items:center;
  gap:10px;
  padding:16px 18px;
  border-top:1px solid var(--line);
  position:relative;
  min-height:80px
}
.player-card.active {
  background:var(--accent-soft)
}
.player-card.active:before {
  content:'';
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:2px;
  background:var(--gold)
}
.player-card .avatar {
  width:35px;
  height:35px
}
.player-card:nth-child(4n+1) .avatar {
  background:var(--panel2);
  color:var(--muted)
}
.player-card:nth-child(4n+2) .avatar {
  background:var(--panel2);
  color:var(--muted)
}
.player-card:nth-child(4n+3) .avatar {
  background:var(--panel2);
  color:var(--muted)
}
.player-info {
  flex:1;
  min-width:0
}
.player-info strong {
  font-size:11px;
  display:block;
  font-weight:600;
  overflow-wrap:anywhere
}
.player-info small {
  font-size:8px;
  color:var(--muted);
  display:block;
  margin-top:5px;
  line-height:1.5
}
.player-points {
  color:var(--gold);
  font-family:Georgia,serif;
  font-size:23px;
  font-variant-numeric:tabular-nums;
  background:none;
  border:0;
  padding:5px 0 5px 5px;
  letter-spacing:-.6px
}
.player-points:disabled {
  opacity:1;
  cursor:default
}
.player-offline {
  opacity:.45
}
.leader-card {
  padding:16px 20px;
  display:flex;
  align-items:center;
  gap:10px;
  border-top:1px solid var(--line);
  background:var(--panel)
}
.leader-card .avatar {
  background:var(--accent-soft);
  color:var(--gold);
  width:28px;
  height:28px;
  font-size:13px
}
.leader-card strong {
  font-size:10px;
  font-weight:500
}
.leader-card small {
  font-size:8px;
  color:var(--muted);
  display:block;
  margin-top:4px
}
.table-note {
  padding:20px;
  color:var(--muted);
  font-size:8px;
  line-height:1.7;
  display:flex;
  align-items:center;
  gap:10px
}
.table-note span {
  font-size:18px;
  color:var(--muted)
}
.lobby-stage,.transition-stage,.question-stage,.end-stage {
  min-height:420px;
  border:1px solid var(--line);
  border-radius:12px;
  background:radial-gradient(ellipse at 50% 100%,var(--accent-soft),transparent 65%),var(--panel);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:40px;
  position:relative
}
.stage-ornament {
  width:78px;
  height:78px;
  display:grid;
  place-items:center;
  border:1px solid var(--accent-border);
  border-radius:50%;
  font-size:48px;
  color:var(--gold);
  margin-bottom:24px;
  background:var(--accent-soft)
}
.lobby-stage h2,.transition-stage h2,.end-stage h2 {
  font-size:32px;
  line-height:1.3;
  letter-spacing:-1px;
  font-weight:500;
  margin:0 0 16px
}
.stage-subtitle {
  font-size:12px;
  line-height:1.9;
  color:var(--muted);
  max-width:440px;
  margin:0
}
.lobby-seats {
  display:flex;
  justify-content:center;
  margin:25px 0 20px
}
.lobby-seat {
  width:40px;
  height:40px;
  background:var(--panel2);
  border:3px solid var(--panel);
  border-radius:50%;
  display:grid;
  place-items:center;
  margin:0 -3px;
  color:var(--muted);
  font-size:12px
}
.lobby-seat.empty {
  border:1px dashed var(--line);
  background:transparent;
  margin-left:8px;
  color:var(--line)
}
.question-stage {
  align-items:stretch;
  justify-content:flex-start;
  padding:30px;
  min-height:420px
}
.question-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  text-align:left;
  color:var(--gold);
  font-size:10px;
  line-height:1.6;
  letter-spacing:1px;
  padding-bottom:24px
}
.question-heading strong {
  font-family:Georgia,serif;
  font-size:30px;
  font-weight:400;
  white-space:nowrap;
  line-height:1
}
.question-content {
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:230px
}
.question-text {
  font-size:clamp(20px,2.25vw,33px);
  line-height:1.6;
  letter-spacing:-.5px;
  max-width:760px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  margin:15px 0
}
.question-context {
  font-size:12px;
  line-height:1.7;
  color:var(--muted);
  margin:0 0 15px;
  white-space:pre-wrap
}
.question-media {
  max-width:100%;
  max-height:380px;
  border-radius:7px;
  object-fit:contain
}
.question-content audio {
  width:min(440px,100%)
}
.media-unavailable {
  background:var(--panel);
  border:1px dashed var(--line);
  border-radius:8px;
  padding:28px;
  color:var(--muted);
  font-size:12px;
  line-height:1.8;
  max-width:440px
}
.media-unavailable strong {
  display:block;
  color:var(--ink);
  font-weight:500;
  margin-bottom:7px
}
.answer-banner {
  padding:13px 17px;
  border:1px solid var(--accent-border);
  background:var(--accent-soft);
  border-radius:7px;
  margin-top:22px;
  font-size:11px;
  color:var(--muted);
  text-align:left;
  line-height:1.8
}
.answer-banner small {
  color:var(--gold);
  font-size:8px;
  letter-spacing:1px;
  display:block;
  margin-bottom:3px
}
.answer-banner strong {
  font-weight:500;
  color:var(--ink)
}
.answering-indicator {
  font-size:11px;
  color:var(--green);
  margin:18px 0 0
}
.timer {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:9px;
  color:var(--muted);
  margin-top:-4px;
  white-space:nowrap
}
.timer strong {
  font-family:monospace;
  color:var(--gold);
  font-size:21px;
  font-weight:400;
  min-width:32px
}
.timer-pulse {
  width:6px;
  height:6px;
  border:1px solid var(--gold);
  border-radius:50%
}
.timer.urgent strong {
  color:var(--red)
}
.timer.urgent .timer-pulse {
  background:var(--red);
  border-color:var(--red);
  animation:pulse 1s infinite
}
.button-success {
  background:var(--green);
  color:var(--panel)
}
.button-success:hover:not(:disabled) {
  background:var(--green)
}
.button-danger {
  background:var(--danger-soft);
  border-color:var(--red);
  color:var(--red)
}
.button-danger:hover:not(:disabled) {
  background:var(--danger-soft)
}
.buzzer {
  background:var(--gold);
  color:var(--accent-ink);
  min-width:170px;
  font-size:13px
}
.buzzer kbd {
  font-family:var(--font);
  font-size:9px;
  font-weight:500;
  border:1px solid var(--accent-border);
  border-radius:4px;
  padding:3px 6px
}
.final-form {
  display:flex;
  gap:10px;
  align-items:end;
  width:100%
}
.final-form label {
  flex:1
}
.final-form textarea {
  resize:vertical;
  min-height:65px;
  max-height:140px
}
.final-form .button {
  flex-shrink:0
}
.final-themes {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:13px;
  margin-top:25px;
  width:100%;
  max-width:660px
}
.final-theme {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:8px;
  padding:22px 15px;
  color:var(--ink);
  font-size:13px;
  line-height:1.5;
  min-height:85px
}
.final-theme:hover:not(:disabled) {
  border-color:var(--gold);
  color:var(--gold)
}
.final-theme.picked {
  opacity:.35;
  text-decoration:line-through
}
.player-pick {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-top:24px
}
.player-pick button {
  padding:13px 20px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel);
  font-size:12px
}
.player-pick button:hover:not(:disabled) {
  border-color:var(--gold);
  color:var(--gold)
}
.offline-banner {
  border:1px solid var(--accent-border);
  background:var(--accent-soft);
  border-radius:8px;
  display:flex;
  justify-content:space-between;
  gap:18px;
  padding:12px 18px;
  margin:0 0 20px;
  color:var(--gold);
  font-size:11px;
  align-items:center
}
.winner-name {
  font-family:Georgia,serif;
  font-style:italic;
  font-size:44px;
  color:var(--gold);
  margin:5px 0 18px
}
.podium {
  display:flex;
  gap:25px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top:24px
}
.podium>div {
  display:grid;
  gap:8px;
  justify-items:center;
  font-size:12px
}
.podium strong {
  font-family:Georgia,serif;
  color:var(--gold);
  font-size:25px;
  font-weight:400
}
.score-dialog {
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  color:var(--ink);
  padding:27px;
  width:380px;
  max-width:calc(100vw - 30px);
  box-shadow:0 20px 90px #0009
}
.score-dialog::backdrop {
  background:#252d2866;
  backdrop-filter:blur(4px)
}
.dialog-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px
}
.dialog-top h2 {
  font-size:20px;
  margin:0;
  font-weight:500
}
.icon-button {
  background:none;
  border:0;
  font-size:25px;
  color:var(--muted);
  padding:0 5px
}
.score-dialog label {
  margin-top:20px
}
.dialog-actions {
  display:flex;
  justify-content:end;
  gap:10px;
  margin-top:23px
}
.toasts {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  z-index:50;
  width:max-content;
  max-width:calc(100vw - 32px);
  display:grid;
  gap:8px;
  pointer-events:none
}
.toast {
  border:1px solid #51645f;
  border-radius:9px;
  padding:13px 19px;
  background:var(--success-soft);
  color:var(--green);
  box-shadow:0 8px 30px #0005;
  font-size:12px;
  line-height:1.6;
  animation:appear .2s ease;
  pointer-events:auto;
  overflow-wrap:anywhere;
  max-width:540px
}
.toast.error {
  background:var(--danger-soft);
  border-color:var(--red);
  color:var(--red)
}
.toast.info {
  background:var(--panel2);
  border-color:var(--line);
  color:#cad8e0
}
.pending-text {
  color:var(--gold)
}
@keyframes pulse {
  50% {
    opacity:.25
  }

}
@keyframes appear {
  from {
    opacity:0;
    transform:translateY(8px)
  }
  to {
    opacity:1;
    transform:none
  }

}
@media(min-width:1500px) {
  .join-layout {
    padding-top:85px;
    min-height:810px
  }
  .visual-board {
    margin-top:50px
  }

}
@media(max-width:1200px) {
  .app-shell {
    padding:0 32px
  }
  .join-layout {
    gap:5%;
    grid-template-columns:1.1fr 1fr
  }
  .join-intro h1 {
    font-size:58px
  }
  .decor-tile {
    width:125px;
    padding:17px;
    height:123px
  }
  .tile-one {
    left:8px
  }
  .tile-two {
    left:120px
  }
  .tile-three {
    left:235px
  }
  .decor-tile>span {
    font-size:46px
  }
  .orbit {
    max-width:390px
  }
  .game-columns {
    grid-template-columns:minmax(0,1fr) 238px;
    gap:20px
  }
  .theme-name {
    padding:12px;
    font-size:10px
  }
  .question-cell {
    font-size:26px
  }
  .scoreboard-title,.player-card {
    padding-left:14px;
    padding-right:14px
  }
  .control-panel {
    padding:15px
  }
  .control-actions {
    gap:7px
  }
  .control-actions .button {
    padding:11px 13px
  }
  .board-row {
    grid-template-columns:minmax(115px,1.6fr) repeat(var(--questions,5),minmax(35px,1fr))
  }

}
@media(max-width:950px) {
  .header-center {
    display:none
  }
  .join-layout {
    gap:30px;
    padding-top:45px;
    min-height:730px
  }
  .join-intro h1 {
    font-size:50px;
    letter-spacing:-2px
  }
  .entry-card {
    padding:23px
  }
  .intro-copy {
    font-size:12px
  }
  .intro-steps {
    gap:10px;
    font-size:9px
  }
  .step-line {
    width:15px
  }
  .decor-tile {
    width:107px;
    height:113px;
    padding:15px
  }
  .decor-tile>span {
    font-size:40px
  }
  .decor-tile small {
    font-size:6px
  }
  .tile-two {
    left:99px
  }
  .tile-three {
    left:194px
  }
  .orbit {
    max-width:310px
  }
  .visual-caption {
    font-size:8px;
    left:13px
  }
  .game-columns {
    grid-template-columns:1fr
  }
  .scoreboard {
    display:grid;
    grid-template-columns:1fr;
    order:2
  }
  .scoreboard #players {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr))
  }
  .scoreboard-title {
    padding:16px 20px
  }
  .player-card {
    border-right:1px solid var(--line);
    min-height:75px
  }
  .scoreboard #leader-card {
    border-top:1px solid var(--line)
  }
  .leader-card {
    border-top:0;
    padding:13px 20px
  }
  .table-note {
    display:none
  }
  .stage {
    min-height:390px
  }
  .game-heading h1 {
    font-size:26px
  }
  .lobby-stage,.transition-stage,.question-stage,.end-stage {
    min-height:390px
  }
  .game-bottom {
    margin-bottom:5px
  }

}
@media(max-width:720px) {
  .app-shell {
    padding:0 20px
  }
  .header {
    height:85px
  }
  .brand {
    font-size:25px;
    gap:10px
  }
  .brand-symbol {
    width:31px;
    height:35px;
    font-size:38px;
    border-radius:9px;
    padding-left:8px
  }
  .brand-symbol span {
    font-size:19px;
    right:5px
  }
  .connection {
    font-size:9px;
    padding:8px 10px
  }
  .join-layout {
    display:flex;
    flex-direction:column;
    gap:34px;
    padding:35px 0
  }
  .join-intro {
    width:100%
  }
  .join-intro>.eyebrow {
    font-size:8px;
    letter-spacing:1.4px
  }
  .join-intro h1 {
    font-size:54px;
    margin:22px 0 18px
  }
  .intro-copy {
    font-size:12px;
    max-width:380px
  }
  .intro-steps {
    margin-top:23px;
    gap:14px;
    font-size:10px
  }
  .visual-board {
    display:none
  }
  .join-side {
    max-width:none;
    padding:0
  }
  .entry-card {
    padding:25px
  }
  .entry-card h2 {
    font-size:24px
  }
  .join-note {
    margin-top:17px
  }
  .join-note p {
    font-size:9px
  }
  .footer {
    min-height:68px;
    font-size:8px;
    gap:10px
  }
  .footer>span:nth-child(2) {
    font-size:6px;
    letter-spacing:.8px
  }
  .footer-star {
    padding:0 5px
  }
  .debug-link {
    font-size:8px
  }
  .game-layout {
    padding:26px 0
  }
  .game-heading {
    align-items:start;
    margin-bottom:24px;
    gap:12px
  }
  .game-heading .eyebrow {
    font-size:8px;
    letter-spacing:1px
  }
  .game-heading h1 {
    font-size:22px;
    letter-spacing:-.6px;
    margin-top:7px
  }
  .game-meta {
    flex-direction:column;
    align-items:end;
    gap:8px
  }
  .role-badge {
    font-size:8px;
    padding:5px 7px
  }
  .room-code-button {
    font-size:0;
    gap:6px;
    padding:6px 8px
  }
  .room-code-button strong {
    font-size:10px
  }
  .room-code-button>span {
    font-size:11px
  }
  .stage-top {
    height:40px
  }
  .stage-label {
    font-size:8px;
    letter-spacing:.7px
  }
  .timer {
    font-size:8px
  }
  .timer strong {
    font-size:19px
  }
  .board {
    gap:5px
  }
  .board-row {
    gap:5px;
    grid-template-columns:minmax(100px,1.8fr) repeat(var(--questions,5),minmax(29px,1fr))
  }
  .theme-name {
    padding:10px 8px;
    font-size:9px;
    min-height:59px
  }
  .question-cell {
    font-size:20px;
    min-height:59px
  }
  .stage {
    min-height:0;
    border-radius:8px
  }
  .control-panel {
    flex-direction:column;
    align-items:stretch;
    gap:14px;
    padding:16px;
    margin-top:16px
  }
  .control-actions {
    justify-content:stretch
  }
  .control-actions>.button {
    flex:1
  }
  .control-copy strong {
    font-size:12px
  }
  .control-copy small {
    font-size:10px
  }
  .control-panel .buzzer {
    padding:14px
  }
  .lobby-stage,.transition-stage,.question-stage,.end-stage {
    min-height:350px;
    padding:25px 20px
  }
  .lobby-stage h2,.transition-stage h2,.end-stage h2 {
    font-size:27px
  }
  .stage-ornament {
    width:65px;
    height:65px;
    font-size:40px
  }
  .stage-subtitle {
    font-size:11px
  }
  .question-heading {
    font-size:8px;
    padding-bottom:15px
  }
  .question-heading strong {
    font-size:27px
  }
  .question-text {
    font-size:23px;
    line-height:1.6
  }
  .question-content {
    min-height:210px
  }
  .question-context {
    font-size:10px
  }
  .question-media {
    max-height:280px
  }
  .game-bottom {
    font-size:8px;
    gap:12px
  }
  .game-bottom>span {
    max-width:72%
  }
  .final-form {
    flex-direction:column;
    align-items:stretch
  }
  .final-form label {
    width:100%
  }
  .final-themes {
    gap:8px
  }
  .final-theme {
    font-size:11px;
    padding:17px 12px;
    min-height:75px
  }
  .offline-banner {
    font-size:10px;
    padding:10px 12px
  }
  .winner-name {
    font-size:36px
  }
  .scoreboard #players {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .player-card {
    padding:13px 11px;
    gap:8px
  }
  .player-card .avatar {
    width:28px;
    height:28px;
    font-size:10px
  }
  .player-info strong {
    font-size:10px
  }
  .player-info small {
    font-size:7px
  }
  .player-points {
    font-size:21px
  }
  .header-right {
    gap:7px
  }
  .header-right .button {
    font-size:9px;
    padding:8px
  }
  .control-actions .button {
    font-size:11px
  }
  .game-heading .role-badge {
    max-width:115px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap
  }

}
@media(max-width:390px) {
  .app-shell {
    padding:0 14px
  }
  .join-intro h1 {
    font-size:48px
  }
  .entry-card {
    padding:20px
  }
  .board-row {
    grid-template-columns:minmax(87px,1.8fr) repeat(var(--questions,5),minmax(25px,1fr));
    gap:4px
  }
  .theme-name {
    font-size:8px;
    padding:8px 6px
  }
  .question-cell {
    font-size:17px
  }
  .footer>span:nth-child(2) {
    display:none
  }
  .identity {
    padding:10px 8px;
    gap:8px
  }
  .identity-info strong {
    font-size:10px
  }

}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }

}


.leader-tools {
  position:relative;
  margin-left:auto;
  font-size:9px;
  color:var(--muted)
}
.leader-tools summary {
  cursor:pointer
}
.leader-tools[open] button {
  position:absolute;
  right:0;
  top:20px;
  z-index:4;
  background:var(--panel2);
  border:1px solid var(--line);
  border-radius:7px;
  padding:13px 17px;
  color:var(--gold);
  box-shadow:0 9px 25px #0004
}


/* Shared application chrome and game surfaces in the Arcade direction. */
.app-shell{max-width:1440px;padding:0 48px}
.header{height:90px}.brand{font-size:29px;letter-spacing:-1.4px;gap:0}.brand-symbol{display:none}
.header-center{color:var(--muted)}.header-right{gap:12px}
.button{font-size:14px;font-weight:600;min-height:44px;border-radius:8px;padding:11px 17px}
.button-gold,.buzzer{color:var(--accent-ink)}.button-gold:hover:not(:disabled){color:var(--accent-ink)}
.button-quiet{font-size:13px}.button-success{background:var(--green);color:var(--panel)}
.button-success:hover:not(:disabled){background:#39654d;color:var(--panel)}
.button-danger{background:var(--danger-soft);color:var(--red);border-color:#885969}
.button-danger:hover:not(:disabled){background:#573448}
.serif{color:var(--gold)}.footer{color:var(--muted);font-size:11px}
.entry-card{background:var(--panel);border-color:var(--line);box-shadow:0 8px 35px #3e382508}
.avatar,.player-card:nth-child(n) .avatar{background:var(--mint);color:var(--card-ink)}
.player-card:nth-child(2n) .avatar{background:var(--pink);color:var(--card-ink)}
.theme-name{background:var(--panel2);color:var(--ink);font-size:12px}
.question-cell{background:var(--panel);color:var(--gold);border-color:var(--line)}
.question-cell:hover:not(:disabled){background:var(--accent-soft)}
.question-cell.played{background:var(--panel2);color:#8e7ca2}
.lobby-stage,.transition-stage,.question-stage,.end-stage{background:var(--panel);border-color:var(--line)}
.lobby-stage h2,.transition-stage h2,.end-stage h2,.game-heading h1{font-family:Georgia,'Times New Roman',serif;font-weight:400}
.stage-ornament{border:0;background:var(--accent-soft);color:var(--gold)}
.control-panel,.scoreboard{background:var(--panel);border-color:var(--line)}
.player-card.active{background:var(--accent-soft)}.leader-card{background:var(--panel2)}
.toast{background:var(--success-soft);color:var(--green);border-color:var(--accent-border);box-shadow:0 8px 30px #332b1715}
.toast.error{background:var(--danger-soft);color:var(--red);border-color:#885969}
.toast.info{background:var(--panel);color:var(--ink);border-color:var(--line)}
.score-dialog{background:var(--panel);color:var(--ink)}
@media(max-width:950px){.app-shell{padding:0 26px}}
@media(max-width:600px){.app-shell{padding:0 18px}.header{height:76px}.header-right .connection{font-size:10px;padding:7px 9px}.brand{font-size:25px}.footer{flex-wrap:wrap;gap:10px}.game-heading h1{font-size:28px}.button{font-size:13px}.board-row .theme-name{font-size:11px}}

/* Clear interaction hierarchy across live game, auth and package pages. */
.brand{font-weight:850;letter-spacing:-1.7px}.brand-dot{font-weight:500;margin-left:3px;font-size:34px;vertical-align:middle}
.button{font-weight:750;border-radius:11px}.button-gold{border:2px solid var(--outline);box-shadow:0 4px 0 var(--outline)}
.button-gold:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 var(--outline)}
.button-outline{background:var(--panel);border-color:var(--line)}.button-quiet{background:transparent;color:var(--muted)}
.serif{font-family:var(--font);font-style:normal;font-weight:800;letter-spacing:-1.4px}
.lobby-stage h2,.transition-stage h2,.end-stage h2,.game-heading h1{font-family:var(--font);font-weight:800;letter-spacing:-1.1px}
.game-heading h1{font-size:clamp(28px,3vw,42px)}
.question-cell{border:1px solid #645082;border-bottom:4px solid var(--outline);background:#3b2959;color:var(--yellow);border-radius:8px;font-weight:800;transition:transform .16s,background .16s}
.question-cell:hover:not(:disabled){background:var(--yellow);color:var(--card-ink);border-color:var(--yellow);transform:translateY(-3px)}
.question-cell.played{background:#21172d;color:#8e7ca2;border-color:#493859}.board-readonly .question-cell:not(.played){color:var(--yellow)}
.theme-name{background:var(--panel2);font-size:12px;color:var(--muted)}
.control-panel,.scoreboard,.lobby-stage,.transition-stage,.question-stage,.end-stage{border-radius:16px}
.stage-ornament{border:2px solid var(--outline);border-radius:18px;background:var(--yellow);color:var(--card-ink);box-shadow:3px 4px 0 var(--outline);transform:rotate(-6deg)}
.player-card:nth-child(3n) .avatar{background:var(--yellow);color:var(--card-ink)}
.button-success{background:var(--green);color:#173826}.button-success:hover:not(:disabled){background:#c4ecd2;color:#173826}
.toast{border-color:#4b7158}.toast.error{border-color:#885969}.score-dialog::backdrop{background:#0b0611b8}
@media(prefers-reduced-motion:reduce){.question-cell:hover:not(:disabled){transform:none}}

/* Live room spacing: action groups may wrap without touching their copy. */
.control-actions{gap:12px;flex-wrap:wrap}
.control-copy small{margin-top:8px}
.final-form{gap:16px}.final-form label{gap:10px;min-width:0}
.game-bottom{row-gap:12px;flex-wrap:wrap}
@media(max-width:760px){.control-panel{gap:20px}.control-actions{row-gap:12px}.final-form{gap:18px}}
#players>.muted{margin:0;padding:16px 20px 20px;line-height:1.7}
