/* Live Rondes gebruikt het vertrouwde puzzeloppervlak, met een compacte gedeelde status. */
#liveScreen { padding-top: 84px; }
.live-shell { max-width: 980px; margin: 0 auto; padding-bottom: 32px; }
.live-card { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--surface-border); border-radius: 22px; background: var(--surface); color: var(--ink); }
#liveScreen [hidden] { display: none !important; }
.live-eyebrow { font: 600 11px/1.5 'Space Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow, #ffdf48); margin: 0 0 14px; }
.live-card .live-eyebrow { color: var(--ink-muted, #626880); }
.live-card h1 { font-size: clamp(25px, 4vw, 40px); line-height: 1.15; margin: 0 0 14px; }
.live-card h2 { font-size: 19px; margin: 0 0 18px; }
.live-intro { font-size: 17px; line-height: 1.5; margin: 0; }
.live-muted { color: var(--ink-muted, #626880); font-size: 13px; line-height: 1.5; }
.live-rules { display: flex; flex-wrap: wrap; gap: 8px 20px; border-bottom: 1px solid var(--surface-border); padding: 18px 0 24px; margin-bottom: 28px; font-size: 12px; }
.live-setup-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; }
.live-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.live-card input, .live-card select { width: 100%; min-width: 0; min-height: 46px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.live-card input:focus-visible, .live-card select:focus-visible, .live-card button:focus-visible { outline: 3px solid var(--accent-blue-light, #7777ff); outline-offset: 3px; }
.live-card .hero-cta, .live-card .btn-check { margin: 6px 0 0; min-height: 48px; }
.live-card button:disabled { opacity: .55; cursor: not-allowed; }
.live-text-button { background: none; border: none; color: inherit; font: inherit; font-size: 13px; padding: 10px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.live-section-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; border-top: 1px solid var(--surface-border); padding-top: 24px; }
.live-section-heading h2 { margin: 0; }
.live-notice { padding: 12px 16px; border-radius: 12px; background: #fff0a6; color: #222044; font-size: 14px; line-height: 1.5; }
.live-room-code { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.live-room-code strong { font: 700 32px/1.5 'Space Mono', monospace; letter-spacing: .12em; }
.live-players { list-style: none; padding: 0; margin: 20px 0; }
.live-player { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--surface-border); padding: 13px 4px; font-size: 14px; }
.live-player > b { margin-left: auto; font-variant-numeric: tabular-nums; }
.live-player small, .live-table small { display: block; font-size: 11px; font-weight: 400; color: var(--ink-muted, #626880); margin-top: 3px; }
.live-marker { color: #b53e50; font-weight: 700; }
.live-player.is-submitted .live-marker { color: #13845d; }
.live-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.live-round-heading { display: flex; gap: 20px; align-items: center; justify-content: space-between; }
.live-round-heading h1 { font-size: 21px; margin: 0; }
.live-clock { text-align: right; }
.live-clock strong { display: block; font: 700 30px/1.2 'Space Mono', monospace; font-variant-numeric: tabular-nums; }
.live-clock small { display: block; font-size: 10px; margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }
.live-clock .is-urgent { color: #c23545; }
.live-round-players { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 4px 16px; margin: 16px 0 24px; }
.live-round-players .live-player { font-size: 12px; padding: 8px 0; min-width: 0; }
.live-player > span { overflow-wrap: anywhere; }
.live-preparing { padding: 48px 0; text-align: center; font-size: 18px; }
#liveQuestionList .q-block { padding: 16px 18px; margin: 0; border-radius: 14px; border: 1px solid var(--surface-border); background: color-mix(in srgb, var(--vraag-tint, var(--surface-2)) 78%, var(--surface)); color: var(--ink); }
#liveQuestionList .q-label { font-size: 15px; line-height: 1.5; margin-bottom: 10px; }
#liveQuestionList .input-wrapper input { margin: 0; min-height: 50px; }
#liveQuestionList input.met-eenheid { padding-right: min(48%, var(--eenheid-ruimte)); }
#liveQuestionList .connector { margin: 14px 0; gap: 14px; }
#liveQuestionList .connector-badge { width: 36px; height: 36px; min-height: 36px; font-size: 18px; }
#liveQuestionList .puzzelfoto { position: relative; float: right; width: 132px; margin: 0 0 12px 16px; top: auto; right: auto; }
#liveQuestionList .puzzelfoto img { height: 98px; }
#liveSubmit { margin-top: 24px; width: 100%; }
.live-table-wrap { overflow-x: auto; }
.live-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.live-table td, .live-table th { padding: 14px 10px; text-align: right; border-bottom: 1px solid var(--surface-border); font-variant-numeric: tabular-nums; }
.live-table th:first-child { text-align: left; min-width: 110px; }
.live-table thead { font-size: 11px; color: var(--ink-muted, #626880); }
.live-winner { background: color-mix(in srgb, #ffdf48 20%, var(--surface)); }
#livePlay { position: relative; isolation: isolate; }
.live-round-outcome { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; padding: 24px; border-radius: inherit; text-align: center; backdrop-filter: blur(4px); }
.live-round-outcome.is-win { background: rgba(22, 158, 109, .9); color: #fff; }
.live-round-outcome.is-loss { background: rgba(185, 55, 72, .91); color: #fff; }
.live-round-outcome.is-draw { background: rgba(22, 25, 64, .9); color: #fff; }
.live-outcome-content { display: grid; justify-items: center; gap: 10px; max-width: 420px; }
.live-outcome-icon { display: grid; place-items: center; width: 82px; height: 82px; border: 3px solid currentColor; border-radius: 50%; font: 700 54px/1 'Space Mono', monospace; }
.live-outcome-content strong { font-size: clamp(26px, 4vw, 42px); line-height: 1.15; }
.live-outcome-content > span:last-child { font-size: 16px; line-height: 1.4; }
.live-finish-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.live-finish-actions .hero-cta, .live-finish-actions .btn-check { width: auto; flex: 1 1 220px; margin: 0; }
.live-answer-archive { margin-top: 28px; border-top: 1px solid var(--surface-border); padding-top: 24px; }
.live-answer-round { padding: 20px 0; border-bottom: 1px solid var(--surface-border); }
.live-answer-round h2 { margin-bottom: 14px; }
.live-answer-questions { list-style: none; padding: 0; margin: 0 0 14px; }
.live-answer-questions li { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; font-size: 13px; line-height: 1.4; }
.live-answer-questions b { flex: none; font-family: 'Space Mono', monospace; }
/* De lobby groepeert kiezen, aansluiten en wachten zonder extra schermstappen. */
.live-setup-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
/* Wit als basis; open rooms krijgen een lichte blauw-lavendeltint. */
#liveSetup { --surface-border: color-mix(in srgb, var(--surface) 87%, var(--ink)); --ink-muted: color-mix(in srgb, var(--ink) 72%, var(--surface)); background: var(--surface); }
#liveSetup .live-create-panel { background: var(--surface); padding: 24px; border: 1px solid var(--surface-border); border-radius: 16px; }
#liveSetup .live-join-panel { border: 0; padding: 0; }
#liveSetup .live-open-empty { background: color-mix(in srgb, var(--surface) 88%, #9ba3e6); border-color: var(--surface-border); }
#liveSetup .live-open-empty-icon { background: color-mix(in srgb, var(--surface) 80%, #9ba3e6); color: var(--ink); }
#liveSetup .live-private-join { border-color: var(--surface-border); }
#liveSetup .live-setup-grid { gap: 24px; }
#liveSetup > .live-setup-heading { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--surface-border); }
@media(max-width: 760px) {
  #liveSetup .live-create-panel { padding: 18px; }
}
.live-player-count { flex: none; padding: 7px 11px; border-radius: 8px; background: var(--surface-2); color: var(--ink-muted); font: 600 12px/1.5 'Space Mono', monospace; }
.live-setup-heading .live-intro { max-width: 560px; font-size: 15px; color: var(--ink-muted); }
.live-create-panel > h2, .live-join-panel h2 { font-size: 19px; margin-bottom: 20px; }
.live-settings-grid > div { min-width: 0; }
.live-settings-grid label { margin-bottom: 20px; }
.live-join-panel { display: flex; flex-direction: column; border-right: 1px solid var(--surface-border); padding: 0 28px 0 0; align-self: stretch; }
.live-join-panel h2 { margin-bottom: 20px; }
.live-join-panel .live-muted { margin: 0 0 22px; }
#liveJoinCode { letter-spacing: .16em; text-transform: uppercase; font-family: 'Space Mono', monospace; font-size: 18px; }
.live-create-panel > .hero-cta, #liveJoinForm > .btn-check { width: 100%; justify-content: center; }
.live-option-list { border: 0; min-width: 0; padding: 0; margin: 24px 0; }
.live-option-list legend { padding: 0; margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.live-card .live-option { display: flex; align-items: center; position: relative; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--surface-border); margin: 0; cursor: pointer; }
.live-option > span:first-child { flex: 1; min-width: 0; }
.live-option strong { font-size: 13px; font-weight: 600; }
.live-option small { display: block; color: var(--ink-muted); font-size: 12px; font-weight: 400; line-height: 1.5; margin-top: 4px; }
.live-card .live-option > input { position: absolute; opacity: 0; width: 42px; height: 28px; min-height: 0; margin: 0; right: 0; }
.live-switch { flex: 0 0 42px; height: 26px; border-radius: 20px; background: #d2d3df; border: 1px solid #b1b3c6; position: relative; transition: background .15s; pointer-events: none; }
.live-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: white; border-radius: 50%; box-shadow: 0 1px 3px #0002; transition: transform .15s; }
.live-option input:checked + .live-switch { background: #3832c4; border-color: #3832c4; }
.live-option input:checked + .live-switch::after { transform: translateX(16px); }
.live-option input:focus-visible + .live-switch { outline: 3px solid #9792ee; outline-offset: 3px; }
.live-option:has(input:disabled) { cursor: default; }
.live-option input:disabled + .live-switch { opacity: .65; }
@media(max-width: 760px) {
  .live-join-panel { border-right: 0; border-bottom: 1px solid var(--surface-border); padding: 0 0 24px; }
}
.live-join-panel .live-section-heading { padding: 0; margin: 0 0 10px; border: 0; gap: 12px; }
.live-join-panel .live-section-heading h2 { margin: 0; font-size: 21px; }
.live-join-panel .live-text-button { font-size: 12px; }
.live-refresh-button { display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; min-height: 40px; padding: 0; border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface); color: var(--ink-muted); cursor: pointer; }
.live-refresh-button:hover { background: var(--surface-2); color: var(--ink); border-color: color-mix(in srgb, var(--surface) 70%, var(--ink)); }
.live-refresh-button:active { background: color-mix(in srgb, var(--surface) 90%, var(--ink)); }
#liveOpenGames { flex: 1; min-height: 180px; display: flex; flex-direction: column; }
.live-open-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px 24px; text-align: center; background: var(--surface-2); border: 1px solid var(--surface-border); border-radius: 14px; }
.live-open-empty-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 75%, #9792ee); color: var(--ink-muted); margin-bottom: 6px; }
.live-open-empty-icon svg { width: 36px; height: 36px; }
.live-open-empty h3 { margin: 0; font-size: 17px; font-weight: 600; }
.live-open-empty p { max-width: 270px; margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.65; }
.live-private-join { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--surface-border); }
.live-private-join summary { color: var(--ink-muted); font-size: 13px; font-weight: 600; cursor: pointer; padding: 5px 0; }
.live-private-join summary:focus-visible { outline: 3px solid #9792ee; outline-offset: 3px; }
.live-private-join form { padding-top: 18px; }
/* De rechterkolom bepaalt de hoogte; een open codeformulier neemt ruimte van de lijst. */
@media(min-width: 761px) {
  .live-join-panel { contain: size; min-height: 0; }
  #liveOpenGames { min-height: 0; overflow-y: auto; }
  .live-private-join { flex: none; margin-top: 18px; }
  .live-open-empty { padding: 20px; }
  .live-open-empty-icon { flex-shrink: 0; }
  .live-join-panel:has(.live-private-join[open]) .live-open-empty { padding: 12px; gap: 6px; }
  .live-join-panel:has(.live-private-join[open]) .live-open-empty-icon { display: none; }
  .live-join-panel:has(.live-private-join[open]) .live-open-empty p { font-size: 12px; line-height: 1.5; }
}
#liveOpenGames .race-open-game { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; margin-bottom: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--surface-border); border-radius: 10px; text-align: left; color: var(--ink); cursor: pointer; }
#liveOpenGames .race-open-game small { display: block; margin-top: 4px; font-size: 10px; line-height: 1.5; color: var(--ink-muted); }
#liveOpenGames .race-open-game b { white-space: nowrap; font-size: 12px; }
.live-room-code { justify-content: space-between; padding: 20px 24px; background: var(--surface-2); border: 1px solid var(--surface-border); border-radius: 14px; }
.live-room-code span { display: block; font-size: 11px; color: var(--ink-muted); }
.live-room-code strong { display: block; font-size: clamp(23px, 4vw, 32px); }
.live-copy-button { border: 1px solid var(--surface-border); border-radius: 9px; background: var(--surface); color: var(--ink); padding: 10px 14px; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.live-room-summary { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 18px 0; color: var(--ink-muted); font-size: 13px; }
.live-room-summary b { color: var(--ink); }
.live-room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.live-room-grid .live-section-heading { margin: 16px 0 0; padding: 16px 0 0; border: 0; }
.live-room-grid .live-section-heading h2 { font-size: 15px; }
.live-room-grid .live-players { margin: 10px 0 0; }
.live-room-grid .live-option-list { margin: 30px 0 0; }
#liveLobbyPlayers .live-marker { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #3e378b; background: #edebff; }
#liveRoom .live-actions { border-top: 1px solid var(--surface-border); padding-top: 22px; }
#liveReveal .live-round-heading h1 { font-size: 28px; }
#liveReveal .live-eyebrow { margin: 0 0 8px; }
.live-reveal-winner { margin: 22px 0; padding: 12px 16px; border-radius: 10px; background: #f7f0d3; color: #5e4b15; font-size: 14px; }
.live-reveal-winner.is-win { background: #dff4e9; color: #176048; }
.live-reveal-answers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.live-reveal-answer { display: flex; flex-direction: column; border-radius: 12px; padding: 16px; background: #eeecf9; color: #171737; }
.live-reveal-answer:nth-child(2) { background: #e6f2ed; }
.live-reveal-answer:nth-child(3) { background: #faf1da; }
.live-reveal-answer .live-muted { color: #66647e; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.live-reveal-answer p { font-size: 13px; line-height: 1.5; margin: 8px 0 14px; flex: 1; }
.live-reveal-answer strong { font: 700 23px/1.3 'Space Mono', monospace; overflow-wrap: anywhere; }
.live-reveal-equation { padding: 16px 0; margin-bottom: 10px; text-align: center; font: 600 15px/1.5 'Space Mono', monospace; color: var(--ink-muted); }
@media(prefers-reduced-motion: reduce) { .live-switch, .live-switch::after { transition: none; } }
@media(min-width: 601px) {
  #liveQuestionList .q-block:has(.puzzelfoto) { display: grid; grid-template-columns: minmax(0,1fr) 132px; grid-template-rows: 1fr auto auto auto 1fr; column-gap: 20px; min-height: 164px; }
  #liveQuestionList .q-block:has(.puzzelfoto)::after { content: none; }
  #liveQuestionList .q-block:has(.puzzelfoto) > .q-label { grid-column: 1; grid-row: 2; }
  #liveQuestionList .q-block:has(.puzzelfoto) > .vraag-ondertekst { grid-column: 1; grid-row: 3; }
  #liveQuestionList .q-block:has(.puzzelfoto) > .input-wrapper { grid-column: 1; grid-row: 4; clear: none; }
  #liveQuestionList .q-block:has(.puzzelfoto) > .puzzelfoto { grid-column: 2; grid-row: 1 / 6; float: none; align-self: center; margin: 0; }
}
@media(max-width: 600px) {
  .live-setup-grid { grid-template-columns: 1fr; gap: 28px; }
  .live-setup-heading { flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
  .live-join-panel { padding: 20px; }
  .live-room-grid { grid-template-columns: 1fr; gap: 8px; }
  .live-room-code { padding: 16px; gap: 12px; }
  .live-room-grid .live-option-list { margin-top: 18px; }
  .live-reveal-answers { grid-template-columns: 1fr; gap: 8px; }
  .live-reveal-answer { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  .live-reveal-answer p { grid-column: 1; margin: 0; }
  .live-reveal-answer strong { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 21px; }
  .live-round-heading { align-items: flex-start; }
  .live-round-heading h1 { font-size: 18px; }
  .live-clock strong { font-size: 24px; }
  .live-round-players { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #liveQuestionList .q-block { padding: 14px; }
  #liveQuestionList .puzzelfoto { width: 104px; }
  #liveQuestionList .puzzelfoto img { height: 80px; }
}

/* Beide racevarianten delen één rustige lobby; de spelkaart blijft ongewijzigd. */
#raceStart { --surface-border: color-mix(in srgb, var(--surface) 87%, var(--ink)); --ink-muted: color-mix(in srgb, var(--ink) 72%, var(--surface)); max-width: 980px; margin-inline: auto; padding: clamp(20px, 3vw, 32px); background: var(--surface); }
.race-setup-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--surface-border); }
.race-setup-heading h1 { font-size: clamp(25px, 4vw, 40px); line-height: 1.15; margin: 0 0 14px; }
.race-setup-heading p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
#raceStart .race-mode-tabs { min-width: 0; width: fit-content; max-width: 100%; margin-bottom: 24px; background: var(--surface-2); border: 1px solid var(--surface-border); }
#raceStart .race-mode-tabs[hidden] { display: none; }
#raceStart .race-mode-tab { min-height: 44px; padding: 10px 24px; color: var(--ink-muted); font-size: 14px; white-space: nowrap; }
#raceStart .race-mode-tab.active { background: var(--ink); color: var(--surface); }
#raceStart button:focus-visible, #raceStart input:focus-visible { outline: 3px solid #7777ff; outline-offset: 3px; }
#raceStart .race-intro { margin-top: 0; font-size: 15px; color: var(--ink-muted); }
#raceStart .race-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
#raceStart .race-config-card { background: var(--surface); border: 1px solid var(--surface-border); padding: 22px; border-radius: 14px; }
#raceStart .race-config-label { font-size: 11px; color: var(--ink-muted); margin-bottom: 14px; }
#raceStart .race-duration-options { gap: 8px; }
#raceStart .race-duration-options button { min-height: 66px; background: var(--surface); border: 1px solid var(--surface-border); color: var(--ink-muted); }
#raceStart .race-duration-options button.active { background: #ffdf48; border-color: #a88b1b; color: #171737; }
#raceStart .race-duration-options button.active b { color: #171737; }
#raceStart .race-tolerance-labels button { min-height: 44px; padding: 6px 2px; }
#raceStart .race-tolerance-labels .active { background: var(--surface-2); }
#raceStart .race-tolerance-labels small { font-size: 10px; margin-top: 3px; }
#raceStart .race-tolerance-note { color: var(--ink-muted); margin-bottom: 0; }
#raceStart .race-best { color: var(--ink-muted); margin: 16px 0; line-height: 1.5; }
#raceStart .race-online-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
#raceStart .race-online-controls { min-width: 0; padding: 24px; border: 1px solid var(--surface-border); border-radius: 16px; background: var(--surface); }
#raceStart .race-online-controls > h2, #raceStart .race-open-games-heading h2 { font-size: 21px; line-height: 1.3; margin: 0; }
#raceStart .race-online-controls > h2 { margin-bottom: 24px; }
#raceStart .race-online-controls .race-config-card { padding: 0; border: 0; border-radius: 0; margin-bottom: 24px; }
#raceStart .race-online-controls .race-config-card:last-child { margin-bottom: 0; padding-top: 20px; border-top: 1px solid var(--surface-border); }
#raceStart .race-online-create { min-height: 48px; margin-top: 22px; }
#raceStart .race-visibility-copy small { color: var(--ink-muted); line-height: 1.5; }
#raceStart .race-switch input:focus-visible + .race-switch-track { outline: 3px solid #7777ff; outline-offset: 3px; }
#raceStart .race-open-games { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; background: none; }
#raceStart .race-open-games-heading { margin-bottom: 6px; }
#raceStart .race-open-games-heading button { min-width: 44px; min-height: 44px; border: 1px solid var(--surface-border); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 22px; cursor: pointer; }
#raceStart .race-lobby-intro { margin: 0 0 20px; color: var(--ink-muted); font-size: 13px; line-height: 1.5; }
#raceStart .race-open-games-list { flex: 1; display: flex; flex-direction: column; gap: 8px; max-height: none; min-height: 180px; }
#raceStart .race-open-games-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 28px; border: 1px solid var(--surface-border); border-radius: 14px; background: color-mix(in srgb, var(--surface) 88%, #9ba3e6); color: var(--ink-muted); font: 400 13px/1.65 'Space Grotesk', sans-serif; }
#raceStart .race-open-games-empty strong { color: var(--ink); font-size: 17px; font-weight: 600; }
#raceStart .race-open-game { flex: none; padding: 16px; background: var(--surface); border: 1px solid var(--surface-border); }
#raceStart .race-online-code-join { display: flex; gap: 8px; margin: 0; }
#raceStart .race-online-code-join input { width: 0; min-width: 0; flex: 1; min-height: 46px; letter-spacing: .12em; text-transform: uppercase; }
#raceStart .race-online-code-join button { min-height: 46px; padding-inline: 14px; }
#raceStart .race-online-code-join label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#liveSetup .live-text-button, .live-private-join summary { min-height: 44px; align-content: center; }
.live-player-count { font-variant-numeric: tabular-nums; }
@media(min-width: 761px) {
  #raceStart .race-open-games { contain: size; }
  #raceStart .race-open-games-list { min-height: 0; overflow-y: auto; }
}
@media(max-width: 760px) {
  #raceStart .race-config-grid, #raceStart .race-online-layout { grid-template-columns: minmax(0, 1fr); }
  #raceStart .race-online-controls, #raceStart .race-config-card { padding: 18px; }
  .race-setup-heading { flex-wrap: wrap; gap: 12px; }
  #raceStart .race-mode-tabs { width: 100%; }
  #raceStart .race-mode-tab { padding-inline: 16px; }
  #raceStart .race-open-games-empty { min-height: 180px; padding: 24px; }
  #raceStart .race-start-button { width: 100%; justify-content: center; }
}

/* Tijdens het spelen krijgt de puzzel voorrang op de omringende bediening. */
#livePlay { max-width: 860px; margin-inline: auto; padding: 24px 28px; }
#livePlay .live-round-heading .live-eyebrow { margin: 0 0 5px; font-size: 10px; }
#livePlay .live-round-heading h1 { font-size: 19px; line-height: 1.3; }
#livePlay .live-clock { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-radius: 10px; background: var(--surface-2); }
#livePlay .live-clock strong { font-size: 25px; }
#livePlay .live-clock small { max-width: 58px; text-align: left; line-height: 1.5; margin: 0; }
#livePlay .live-round-players { display: flex; flex-wrap: wrap; gap: 6px; margin: 15px 0 20px; }
#livePlay .live-round-players .live-player { flex: 1 1 130px; max-width: 100%; gap: 7px; border: 1px solid var(--surface-border); border-radius: 8px; padding: 7px 9px; font-size: 11px; }
#livePlay .live-round-players .live-player small { display: inline; margin-left: 5px; font-size: 10px; }
#livePlay .live-round-players .is-submitted { background: color-mix(in srgb, #32ae7b 8%, var(--surface)); border-color: color-mix(in srgb, #32ae7b 30%, var(--surface-border)); }
#liveQuestionList .q-block { padding: 14px 18px; }
#liveQuestionList .q-label { line-height: 1.45; margin-bottom: 8px; }
#liveQuestionList .input-wrapper input { min-height: 46px; }
#liveQuestionList .connector { margin: 10px 0; }
#liveQuestionList .connector-badge { width: 30px; height: 30px; min-height: 30px; font-size: 16px; }
.live-submit-area { margin-top: 20px; }
.live-submit-area #liveSubmit { margin: 0; min-height: 46px; }
.live-submit-area #liveRoundHint { text-align: center; font-size: 11px; line-height: 1.4; margin: 9px 0 0; }
#livePlay.has-submitted #liveSubmit { background: #e3f3eb; border-color: #b4dac5; color: #1b6145; opacity: 1; }
#livePlay.has-submitted input:disabled { opacity: 1; color: var(--ink); -webkit-text-fill-color: var(--ink); }
#liveFinished { max-width: 740px; margin-inline: auto; }
#liveFinalPlayers { margin: 28px 0; }
#liveFinalPlayers .live-player { border: 1px solid var(--surface-border); border-radius: 11px; padding: 14px 18px; margin-bottom: 8px; }
#liveFinalPlayers .live-player > b { font: 700 23px/1.3 'Space Mono', monospace; text-align: right; }
#liveFinalPlayers .live-player > b small { font: 400 10px/1.5 'Space Mono', monospace; }
.live-rank { width: 24px; flex: none; color: var(--ink-muted); font: 600 14px/1.5 'Space Mono', monospace; }
@media(min-width: 761px) and (max-height: 800px) {
  #liveScreen:has(#livePlay:not([hidden])) { padding-top: 72px; }
  #liveScreen:has(#livePlay:not([hidden])) > .live-shell > .live-eyebrow { display: none; }
  #livePlay { padding: 18px 24px; }
  #livePlay .live-round-players { margin: 10px 0 12px; }
  #livePlay .live-round-players .live-player { padding: 5px 8px; }
  #liveQuestionList .q-block { padding: 11px 16px; }
  #liveQuestionList .connector { margin: 7px 0; }
  #liveQuestionList .connector-badge { width: 26px; height: 26px; min-height: 26px; }
  #liveQuestionList .input-wrapper input { min-height: 42px; }
  #liveQuestionList .q-block:has(.puzzelfoto) { min-height: 126px; grid-template-columns: minmax(0,1fr) 118px; }
  #liveQuestionList .puzzelfoto { width: 118px; }
  #liveQuestionList .puzzelfoto img { height: 82px; }
  .live-submit-area { margin-top: 14px; }
}
@media(max-width: 760px) {
  .live-setup-grid { grid-template-columns: 1fr; gap: 26px; }
  .live-room-grid { grid-template-columns: 1fr; gap: 8px; }
  #livePlay { padding: 18px; }
  #livePlay .live-clock { padding: 8px 10px; }
  #livePlay .live-clock small { display: none; }
  #livePlay .live-round-players .live-player { flex-basis: 120px; }
}

/* ===== Puzzel Race: aftellen, uitnodigen, eindscherm ===== */
#racePlay .race-question-card { position: relative; }
.race-countdown { position: absolute; inset: -6px; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(3px); text-align: center; }
.race-countdown[hidden] { display: none; }
.race-countdown strong { font: 700 clamp(64px, 14vw, 112px)/1 'Space Mono', 'JetBrains Mono', monospace; color: var(--ink); animation: race-count-pop .9s ease-out both; }
.race-countdown span { font: 600 14px/1.4 'Space Grotesk', sans-serif; color: var(--ink-muted, #626880); }
.race-countdown.is-go strong { color: var(--green, #13845d); }
@keyframes race-count-pop { from { transform: scale(1.35); opacity: .2; } 30% { transform: scale(1); opacity: 1; } }
#racePlay input:disabled, #raceSubmitButton:disabled { opacity: .55; cursor: not-allowed; }
.race-feedback.is-good, .race-feedback.is-bad { animation: race-feedback-in .35s ease-out; }
@keyframes race-feedback-in { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }
.race-share-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.race-share-actions .btn-check { margin: 0; min-height: 42px; padding: 10px 16px; }
.race-invite-link { display: block; margin: 4px 0 14px; font-size: 13px; color: var(--ink-muted, #626880); }
.race-invite-link input { display: block; width: 100%; margin-top: 6px; padding: 9px 11px; border: 1px solid var(--surface-border); border-radius: 9px; background: var(--surface); color: var(--ink); font: 500 12px/1.4 'JetBrains Mono', monospace; }
.race-online-explainer { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--ink-muted, #626880); }
.race-online-explainer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.race-duel-player .is-waiting { color: var(--ink-muted, #626880); font-weight: 500; }
.race-duel-verdict.waiting { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); font-size: 16px; }
.race-duel-verdict.left { background: #E0E7FF; color: #1E1B4B; font-size: 17px; }
.race-duel-verdict b { margin-right: 6px; }
.race-results-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.race-results-actions .hero-cta, .race-results-actions .btn-check { margin: 0; }
#raceResultsMeta .race-summary-record { animation: race-count-pop .8s ease-out both; }
@media (max-width: 640px) {
  .race-duel-code-row { flex-wrap: wrap; }
  .race-share-actions { width: 100%; justify-content: stretch; }
  .race-share-actions > button { flex: 1 1 auto; }
  .race-results-actions > button { flex: 1 1 100%; }
}

/* ===== Naamvraag voor spelen zonder account (race en live) ===== */
.netto-name-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--surface-border); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.netto-name-dialog::backdrop { background: rgba(10, 12, 40, .55); }
.netto-name-form { display: grid; gap: 10px; padding: 24px; }
.netto-name-form h2 { margin: 0; font-size: 22px; }
.netto-name-text { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: var(--ink-muted, #626880); }
.netto-name-form label { font-size: 13px; font-weight: 600; }
.netto-name-form input { min-height: 46px; padding: 10px 12px; border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.netto-name-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.netto-name-actions .hero-cta, .netto-name-actions .btn-check { margin: 0; min-height: 46px; }
.netto-name-actions .live-text-button { margin-left: auto; }

.race-theme-select{display:grid;gap:.5rem;margin:1rem 0;color:var(--ink)}
.race-theme-select select{font:inherit;padding:.75rem;border:1px solid var(--surface-border);border-radius:10px;background:var(--surface);color:inherit;max-width:100%}
.race-theme-select small{opacity:.75}
