:root {
  color-scheme: dark;
  --bg: #101019;
  --surface: #1a1925;
  --raised: #232233;
  --border: #383648;
  --muted: #bbb7ca;
  --faint: #9893ab;
  --text: #f7f4ed;
  --lilac: #bba8ff;
  --lime: #dbfd83;
  --error: #ffb4ad;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
button, input, label { touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--lilac); outline-offset: 3px; }
::selection { color: #14131d; background: var(--lilac); }
[hidden] { display: none !important; }
svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-bank { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(1240px, calc(100% - clamp(40px, 8vw, 128px))); margin-inline: auto; }
main.wrap { padding-block: clamp(24px, 3.2vw, 46px) 48px; }
h1, h2, h3, p { margin: 0; }
h2, h3 { line-height: 1.15; }
h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); letter-spacing: -.052em; }
p { line-height: 1.55; }
button { transition: background-color .15s, border-color .15s, color .15s, transform .15s; }
button:active:enabled { transform: translateY(1px); }

.masthead { border-bottom: 1px solid #2b2939; }
.head-inner, .brand, .head-tools, .languages, .modal-languages, .sleeve-info,
.sleeve-bottom, .sleeve-bottom > span, .how-title, .room-top, .room-top > div,
.score-title, .audio-help, .sound-panel, .modal-head, .modal-actions { display: flex; align-items: center; }
.head-inner { min-height: 78px; justify-content: space-between; gap: 12px; }
.brand { gap: 10px; white-space: nowrap; flex: none; }
.brand-mark { display: grid; width: 39px; height: 39px; place-items: center; background: var(--lime); color: var(--bg); border-radius: 12px 12px 12px 3px; }
.brand-mark svg { width: 26px; height: 26px; }
.brand-word { font: 900 clamp(1.2rem, 2vw, 1.65rem)/1 Arial, sans-serif; letter-spacing: -.085em; text-transform: uppercase; }
.brand-accent { color: var(--lilac); }
.head-tools { gap: 10px; }
.languages, .modal-languages { gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 99px; width: max-content; }
.languages button, .modal-languages button { min-height: 30px; border: 0; padding: 3px 11px; border-radius: 99px; background: transparent; color: var(--muted); font-size: .79rem; font-weight: 650; }
.languages button[aria-pressed=true], .modal-languages button[aria-pressed=true] { color: var(--text); background: #373247; }
.quiet, .invite, .audio-help, .cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; font-weight: 700; }
.quiet, .invite, .audio-help { border: 1px solid var(--border); padding: 9px 13px; min-height: 40px; background: transparent; font-size: .87rem; }
.head-btn { border-color: transparent; color: var(--muted); }
.quiet:hover, .invite:hover, .audio-help:hover { color: var(--text); border-color: #676078; background: var(--raised); }
.head-btn svg, .invite svg, .exit svg, .audio-help svg { width: 17px; height: 17px; }
.circle { width: 40px; padding: 0; border-radius: 50%; }

.entry-grid, .room-grid { display: grid; gap: clamp(18px, 2vw, 28px); }
.entry-grid { grid-template-columns: minmax(0, 1.47fr) minmax(340px, 1fr); align-items: stretch; }
.sleeve, .entry-card, .stage, .score-card { min-width: 0; border: 1px solid var(--border); border-radius: 21px; }
.sleeve {
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 490px;
  padding: clamp(26px, 3.4vw, 50px);
  border-color: #443c58;
  background: radial-gradient(ellipse at 86% 60%, #5b4975, #242132 64%, #1a1928 100%);
}
.sleeve::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15,13,22,.89), rgba(15,13,22,.45) 34%, transparent 63%),
    linear-gradient(0deg, rgba(15,14,23,.82), transparent 35%),
    url("/studio.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.sleeve-info { gap: 9px; color: #ede9f7; font-size: .91rem; font-weight: 670; }
.label-line { display: inline-flex; flex: none; width: 24px; height: 3px; border-radius: 9px; background: var(--lime); }
.sleeve h1 {
  margin-block: auto;
  padding-block: 36px;
  font-size: clamp(5.1rem, 7.7vw, 7.4rem);
  font-weight: 900;
  letter-spacing: -.085em;
  line-height: .96;
  text-shadow: 0 2px 22px rgba(8,7,15,.34);
}
.sleeve h1 > span { display: block; color: var(--lilac); }
.sleeve h1 i { color: var(--lime); font-style: normal; }
:lang(de) .sleeve h1 { font-family: Arial, "Segoe UI", sans-serif; font-weight: 900; }
.sleeve-bottom { flex-wrap: wrap; gap: 10px 24px; color: #edebf2; font-size: .85rem; font-weight: 600; }
.sleeve-bottom > span { gap: 7px; }
.sleeve-bottom svg { width: 16px; height: 16px; color: var(--lilac); }
.entry-card, .stage, .score-card { background: var(--surface); }
.entry-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 2.7vw, 42px); }
.entry-heading p, #role-hint, .how-item p, .hint, #sound-status, .rules-list, .modal-head + p { color: var(--muted); }
.entry-heading h2 { font-weight: 790; }
.entry-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
#start-solo { min-height: 44px; padding: 6px 12px; color: var(--lilac); }
#start-solo svg { width: 18px; height: 18px; }
.entry-heading p { margin-top: 7px; font-size: .94rem; }
.switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #12111b; border: 1px solid #322e40; padding: 4px; margin-block: 21px; border-radius: 12px; }
.switch button { min-height: 43px; padding: 7px 5px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-weight: 690; font-size: .94rem; line-height: 1.22; }
.switch button[aria-pressed=true] { background: #332c46; border-color: #55496e; color: #e6deff; }
label, legend { display: block; margin: 0 0 7px; font-size: .89rem; font-weight: 690; }
input:not([type=radio]) { min-width: 0; width: 100%; height: 47px; border: 1px solid #50495d; border-radius: 10px; padding: 0 14px; background: #14131e; color: var(--text); font-size: 1rem; }
input::placeholder { color: var(--faint); }
input:not([type=radio]):focus { border-color: var(--lilac); }
#code-field, #host-role { margin: 16px 0 0; }
#host-role { border: 0; padding: 0; min-width: 0; }
#host-role legend { padding: 0; }
.role-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.role-options label { display: flex; align-items: center; gap: 9px; margin: 0; min-height: 43px; padding: 7px 10px; border: 1px solid #454052; border-radius: 9px; cursor: pointer; color: var(--muted); line-height: 1.25; }
.role-options label:has(input:checked) { border-color: #82769d; color: var(--text); background: #252232; }
.role-options input { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--lilac); }
#role-hint { margin-top: 7px; font-size: .81rem; }
#room-code, #active-code, #seat-count, .times, .score { font-variant-numeric: tabular-nums; }
#room-code { letter-spacing: .08em; }
.cta { min-height: 50px; border: 1px solid transparent; background: var(--lime); color: #1b2112; padding: 10px 18px; font-size: 1rem; }
.cta:hover:enabled { background: #e8ffa9; }
.cta:disabled { background: #45483c; color: #c1c5ae; }
#enter, #main-action { width: 100%; }
#enter { margin-top: 18px; }
.form-error { margin-top: 10px; color: var(--error); font-size: .9rem; }

.how { margin-top: clamp(28px, 3.8vw, 52px); }
.how-title { gap: 18px; }
.how-title h2, .score-title h2 { font-size: clamp(1.23rem, 1.8vw, 1.52rem); }
.how-title > span { height: 1px; background: var(--border); flex: 1; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; }
.how-item { min-width: 0; display: flex; align-items: flex-start; gap: 13px; }
.how-item:not(:first-child) { border-left: 1px solid var(--border); padding-left: clamp(16px, 2.2vw, 32px); }
.how-item:not(:last-child) { padding-right: clamp(16px, 2.2vw, 32px); }
.tile-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #30283e; color: var(--lilac); flex: none; }
.how-item:nth-child(2) .tile-icon { background: #282e22; color: var(--lime); }
.how-item h3 { margin: 2px 0 6px; font-size: 1.04rem; letter-spacing: -.025em; }
.how-item p { font-size: .88rem; line-height: 1.5; }

.room-top { justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.room-top > div { gap: 12px; min-width: 0; flex-wrap: wrap; }
.eyebrow { color: var(--muted); font-weight: 650; font-size: .88rem; }
#active-code { color: var(--text); font: 730 clamp(1.35rem, 3vw, 2rem)/1.1 var(--mono); letter-spacing: .075em; }
.invite { color: var(--lilac); border-color: #514762; background: #23202e; }
#copy[data-copied=true], #copy[data-clipboard=copied] { color: var(--lime); border-color: #748250; background: #282e22; }
.exit { flex: none; color: var(--muted); }
.status-banner { color: #ffe1aa; background: #30291f; border: 1px solid #6c5735; border-radius: 9px; padding: 11px 15px; margin-bottom: 15px; }
.room-grid { grid-template-columns: minmax(0, 1.7fr) minmax(255px, .87fr); align-items: start; }

.stage { overflow: hidden; }
.stage-cover {
  --halo: #423653;
  min-height: clamp(185px, 18vw, 240px);
  display: flex;
  align-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 3vw, 40px);
  background: radial-gradient(ellipse at 87% 90%, var(--halo), #292331 50%, #1e1b2a 100%);
  border-bottom: 1px solid var(--border);
}
.stage-cover::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #201d2b 0%, #211e2c 25%, rgba(32,29,43,.9) 42%, transparent 76%);
}
.stage-copy { width: min(76%, 620px); position: relative; }
.stage-meta { display: flex; gap: 8px; align-items: center; }
.beat-meter { display: none; height: 15px; align-items: center; gap: 2px; color: var(--lilac); }
.beat-meter i { width: 3px; height: 11px; border-radius: 2px; background: currentColor; }
.beat-meter i:nth-child(2) { height: 15px; --offset: -.3s; }
.beat-meter i:nth-child(3) { height: 9px; --offset: -.1s; }
.beat-meter i:nth-child(4) { height: 12px; --offset: -.45s; }
#stage:is([data-phase=playing], [data-phase=paused]) .beat-meter { display: inline-flex; }
#stage:is([data-phase=playing], [data-phase=paused]) .beat-meter i { animation: beat .58s ease-in-out var(--offset, 0s) infinite alternate; animation-play-state: paused; }
#stage[data-phase=playing] .beat-meter { color: var(--lime); }
#stage[data-phase=playing] .beat-meter i { animation-play-state: running; }
#stage:is([data-phase=playing], [data-phase=paused]) .stage-tag::before { display: none; }
@keyframes beat { from { transform: scaleY(.42); } to { transform: scaleY(1); } }
.stage-tag { display: flex; align-items: center; gap: 8px; color: var(--lilac); font-weight: 700; font-size: .84rem; letter-spacing: .025em; }
.stage-tag::before { content: ""; flex: none; width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
#stage-title { margin-top: 15px; font-size: clamp(2.2rem, 4.5vw, 4.15rem); line-height: 1.06; font-weight: 840; overflow-wrap: anywhere; }
#stage-sub { margin-top: 10px; color: #ded8e8; font-size: .98rem; overflow-wrap: anywhere; }
.stage-art {
  position: absolute;
  z-index: -2;
  right: -9%;
  top: 50%;
  width: clamp(235px, 54%, 460px);
  aspect-ratio: 1;
  transform: translateY(-42%) rotate(-22deg);
  display: grid;
  place-items: center;
  border: 2px solid #635b6d;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 2px, #aaa1c21c 2.8px, #11101988 3.5px, transparent 4.3px),
    conic-gradient(from 25deg, #191721 0deg, #494250 33deg, #19171f 78deg, #0d0e15 130deg, #51485b 203deg, #15141d 247deg, #0d0e14 290deg, #191721 360deg);
  box-shadow: -8px 17px 30px #09091188;
}
.record-label { display: grid; place-content: center; position: relative; width: 32%; aspect-ratio: 1; border-radius: 50%; border: 1px solid #d5c7fc; background: var(--lilac); color: #191624; text-align: center; font: 900 clamp(1.2rem, 3vw, 2.3rem)/1 Arial, sans-serif; letter-spacing: -.09em; }
.record-label b { transform: translateY(-35%); }
.record-label i { position: absolute; top: 57%; left: 50%; transform: translate(-50%, -50%); width: 7%; aspect-ratio: 1; border-radius: 50%; background: #211d2b; }
#stage[data-phase=playing] .stage-tag, #stage[data-outcome=correct] .stage-tag { color: var(--lime); }
#stage[data-phase=playing] .stage-art { animation: vinyl-spin 18s linear infinite; }
#stage[data-phase=paused] .stage-cover { --halo: #594667; }
#stage[data-phase=final] .stage-tag { color: #f5d992; }
#stage[data-phase=reveal] #stage-title { font-size: clamp(2rem, 4vw, 3.45rem); }
#stage[data-outcome=correct] .stage-cover { --halo: #434a35; }
#stage[data-outcome=wrong] .stage-tag { color: var(--error); }
#stage[data-urgent=true] #stage-hint { color: #ffe4a4; font-weight: 750; }
#stage[data-phase-event=round] .stage-copy, #stage[data-phase-event=paused] .stage-copy,
#stage[data-phase-event=final] .stage-copy, #stage[data-phase-event=reveal] .stage-copy { animation: stage-in .26s ease-out both; }
@keyframes vinyl-spin { from { transform: translateY(-42%) rotate(-22deg); } to { transform: translateY(-42%) rotate(338deg); } }
@keyframes stage-in { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.stage-body { padding: clamp(20px, 2.6vw, 36px); }
.sound-panel { flex-wrap: wrap; gap: 7px 12px; margin-bottom: 18px; }
.audio-help { justify-content: flex-start; min-height: 44px; color: #e2d9ff; background: #2b263a; border-color: #534664; }
#sound-status { flex: 1 1 150px; font-size: .85rem; }
.track-line { overflow: hidden; height: 6px; border-radius: 8px; background: #363244; }
#progress { display: block; width: 0; height: 100%; background: var(--lilac); }
.times { display: flex; justify-content: space-between; margin-block: 7px 18px; font: .78rem/1.35 var(--mono); color: var(--muted); }
.hint, .notice { margin-bottom: 14px; font-size: .95rem; }
.hint:last-child { margin-bottom: 0; }
.notice { color: var(--lilac); }
#main-action { min-height: 54px; }
.game-audio { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; pointer-events: none; }
#choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
#choices button { min-width: 0; min-height: 68px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 14px 16px; border: 1px solid #595365; background: var(--raised); border-radius: 12px; font-size: 1rem; text-align: start; line-height: 1.32; font-weight: 680; overflow-wrap: anywhere; }
#choices button:hover:enabled { color: #f5efff; background: #332d43; border-color: var(--lilac); }
#choices button[data-selected=true] { border-color: var(--lilac); background: #382e4e; color: #f4edff; }
#choices[data-pending=true] button:not([data-selected=true]) { opacity: .62; }
.choice-label { max-width: 100%; hyphens: auto; }
.answer-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; }
.answer-head h3 { font-size: 1.26rem; font-weight: 780; }
.answer-value { font-size: .85rem; font-weight: 650; color: var(--lilac); font-variant-numeric: tabular-nums; }
.answer-actions { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.answer-actions > button { min-width: 0; min-height: 48px; }
.buzzer { display: inline-flex; gap: 7px; align-items: center; justify-content: center; padding: 8px; border: 1px solid #977bbd; border-radius: 10px; background: #392b49; color: #f0dfff; font-weight: 760; }
.buzzer svg { width: 15px; height: 15px; }
.buzzer:hover:enabled { background: #4a385f; }
.buzzer:disabled, #hint-buy:disabled { opacity: .48; }
#choices button:disabled:not([data-selected=true]) { opacity: .65; }
#hint-bar { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 15px; }
#hint-buy { min-height: 44px; color: var(--lilac); }
#round-hint { color: #efe7ff; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
#buzzer-win { margin-bottom: 14px; padding: 10px 13px; border-left: 3px solid var(--lime); background: #23281e; border-radius: 0 7px 7px 0; color: #e5f6c2; font-size: .9rem; overflow-wrap: anywhere; }
.score { flex-wrap: wrap; justify-content: flex-end; }
.text-btn { display: inline-flex; align-items: center; min-height: 44px; margin-top: 5px; padding: 7px 1px; color: var(--muted); background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; font-size: .89rem; }
.text-btn:hover { color: var(--text); }

.score-card { padding: clamp(19px, 2vw, 29px); }
.score-title { justify-content: space-between; gap: 10px; margin-bottom: 15px; }
#seat-count { color: var(--muted); font: .82rem/1.3 var(--mono); }
#presenter { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 12px; padding: 8px 11px; border-radius: 8px; background: #2a2436; color: #e7dfff; overflow-wrap: anywhere; }
#presenter span, #presenter small { font-size: .8rem; color: var(--lilac); }
#players { padding: 0; margin: 0; list-style: none; }
#players li { min-height: 61px; padding: 10px 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); }
#players li:last-child { padding-bottom: 0; }
.avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; color: #211a2b; background: var(--lilac); font-weight: 800; font-size: 1.04rem; }
.avatar.c1 { background: #c4de9c; }
.avatar.c2 { background: #f0bfac; }
.avatar.c3 { background: #accfe3; }
.empty .avatar { border: 1px dashed #51495e; background: transparent; color: var(--faint); font-weight: 500; }
.player-data { min-width: 0; flex: 1; }
.player-name { overflow-wrap: anywhere; font-weight: 710; line-height: 1.25; }
.player-meta { font-size: .78rem; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.empty .player-name { color: var(--faint); font-weight: 550; }
.score { display: flex; align-items: baseline; gap: 3px; color: var(--text); }
.score b { font-size: 1.4rem; }
.score small { color: var(--muted); font-size: .72rem; }
.score-gain { color: var(--lime); font: 700 .83rem/1.3 var(--mono); margin-left: 3px; }
#players li[data-gained=true] .score, #players li[data-score-event=gain] .score { color: var(--lime); }
#players li[data-gained=true] .score-gain { animation: gained .4s ease-out; }
@keyframes gained { from { opacity: .25; transform: translateY(6px); } to { opacity: 1; transform: none; } }

dialog { width: min(470px, calc(100% - 28px)); max-height: calc(100% - 32px); padding: clamp(20px, 4vw, 30px); background: #211e2c; color: var(--text); border: 1px solid #554d65; border-radius: 18px; box-shadow: 0 16px 70px #08080b90; overflow: auto; }
dialog::backdrop { background: rgba(8,7,13,.78); backdrop-filter: blur(4px); }
.modal-head { justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-head h2 { font-size: 1.55rem; }
.modal-head + p, .rules-list { font-size: .94rem; }
.rules-list { margin: 0 0 20px; padding-left: 1.5em; line-height: 1.55; }
.rules-list li { padding-left: 4px; margin-bottom: 9px; }
.rules-list li::marker { color: var(--lilac); font-weight: 700; }
.modal-actions { flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.modal-actions > button, #rules-modal > .cta { min-height: 44px; }
.modal-languages { margin-top: 22px; }
#toast { position: fixed; z-index: 4; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); padding: 10px 16px; color: var(--text); border: 1px solid #645872; background: #302a3d; border-radius: 10px; box-shadow: 0 8px 20px #08081080; font-size: .92rem; font-weight: 650; }
#toast[data-tone=correct], #toast[data-tone=success] { color: var(--lime); background: #262c1d; border-color: #5e6f3a; }
#toast[data-tone=wrong] { color: var(--error); background: #352529; border-color: #705050; }

#home-preview { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 12px; border: 1px solid #82778d; border-radius: 99px; background: #19161fbf; color: var(--text); font-weight: 650; font-size: .83rem; }
#home-preview:hover { border-color: var(--lilac); background: #292330; }
#home-preview[data-preview=playing] { background: #282e22; color: var(--lime); border-color: #9bac71; }
#home-preview[data-preview=playing] svg { color: var(--lime); animation: preview-meter .48s ease-in-out infinite alternate; }
@keyframes preview-meter { from { transform: scaleY(.66); } to { transform: scaleY(1.09); } }

@media (max-width: 965px) {
  .entry-grid { grid-template-columns: minmax(0, 1.18fr) minmax(310px, 1fr); }
  .sleeve { min-height: 455px; padding: 25px; }
  .sleeve h1 { font-size: clamp(4.5rem, 8.3vw, 5.4rem); }
  .sleeve-bottom { gap: 8px 13px; }
  .entry-card { padding: 24px; }
  .room-grid { grid-template-columns: minmax(0, 1.6fr) minmax(220px, .87fr); }
  .head-tools { gap: 5px; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  main.wrap { padding-top: 16px; }
  .head-inner { min-height: 60px; }
  .head-btn { padding: 9px; }
  .head-btn span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .entry-grid, .room-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .sleeve { min-height: 190px; padding: 18px 22px; }
  .sleeve::before { background-position: center, center, center 58%; }
  .sleeve h1 { font-size: clamp(2.85rem, 6.7vw, 3.75rem); padding-block: 10px 12px; }
  .sleeve-info { font-size: .81rem; }
  .sleeve-bottom { font-size: .79rem; }
  #home-preview { margin-left: auto; min-height: 36px; }
  .entry-card { padding: 23px; }
  .how { margin-top: 26px; }
  .how-grid { grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
  .how-item, .how-item:not(:first-child), .how-item:not(:last-child) { padding: 13px 0; border-left: 0; }
  .how-item:not(:first-child) { border-top: 1px solid #302d3d; }
  .tile-icon { width: 35px; height: 35px; }
  .how-item h3 { margin-top: 0; }
  .room-top { margin-bottom: 14px; }
  .stage-cover { min-height: 178px; }
  .stage-art { right: -9%; }
  #choices button { min-height: 63px; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 24px); }
  main.wrap { padding-block: 10px 28px; }
  .head-inner { min-height: 55px; gap: 5px; }
  .brand { gap: 6px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 9px 9px 9px 3px; }
  .brand-mark svg { width: 20px; height: 20px; }
  .brand-word { font-size: 1.08rem; }
  .head-tools { gap: 2px; }
  .head-btn { width: 33px; min-height: 40px; padding: 4px; }
  .languages { padding: 2px; }
  .languages button { min-height: 32px; padding: 4px 8px; font-size: .74rem; }
  .entry-grid, .room-grid { gap: 10px; }
  .sleeve, .entry-card, .stage, .score-card { border-radius: 15px; }
  .sleeve { min-height: 162px; padding: 14px 16px; }
  .sleeve h1 { font-size: 2.64rem; padding-block: 5px; }
  .sleeve-info { gap: 6px; font-size: .74rem; }
  .label-line { width: 16px; height: 2px; }
  .sleeve-bottom { gap: 5px 10px; font-size: .74rem; }
  .sleeve-bottom > span { gap: 4px; }
  .sleeve-bottom svg { width: 14px; height: 14px; }
  #home-preview { min-height: 34px; padding: 4px 8px; font-size: .73rem; gap: 4px; }
  .entry-card { padding: 18px; }
  .entry-heading h2 { font-size: 1.68rem; }
  .entry-heading p { font-size: .87rem; margin-top: 5px; }
  .switch { margin-block: 13px; }
  .switch button { min-height: 37px; font-size: .86rem; }
  #code-field, #host-role { margin-top: 12px; }
  .role-options { gap: 6px; }
  .role-options label { gap: 6px; padding: 7px; }
  #role-hint { font-size: .76rem; margin-top: 5px; }
  #enter { margin-top: 13px; min-height: 45px; }
  .room-top { gap: 7px; align-items: flex-start; }
  .room-top > div { gap: 5px 8px; }
  .eyebrow { font-size: .76rem; }
  .invite, .exit { min-height: 36px; padding: 5px 8px; gap: 4px; font-size: .77rem; }
  .room-top svg { width: 14px; height: 14px; }
  .stage-cover { min-height: 155px; padding: 20px 17px; }
  .stage-copy { width: 82%; }
  #stage-title { margin-top: 9px; font-size: 2.05rem; }
  #stage-sub { font-size: .88rem; margin-top: 7px; }
  .stage-art { right: -87px; width: 248px; }
  .stage-body, .score-card { padding: 16px; }
  .sound-panel { gap: 5px 10px; margin-bottom: 13px; }
  #sound-status { flex: 1 1 110px; font-size: .78rem; }
  .audio-help { padding: 5px 9px; }
  .times { margin-bottom: 13px; }
  .hint, .notice { margin-bottom: 10px; font-size: .88rem; }
  #main-action { min-height: 48px; }
  #choices { gap: 7px; }
  #choices button { padding: 11px 9px; font-size: .92rem; }
  #players li { min-height: 53px; gap: 10px; }
  .avatar { width: 32px; height: 32px; border-radius: 9px; }
}

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

@media (max-width: 375px) {
  .brand-word { font-size: .94rem; line-height: .87; }
  .brand-accent { display: block; }
}

@media (max-width: 350px) {
  .head-btn { width: 35px; }
  #home-preview { position: absolute; top: 10px; right: 12px; }
  .stage-copy { width: 75%; }
  .stage-art { right: -102px; }
}

.mode-deck { display: grid; gap: 12px; margin-top: clamp(18px, 2.2vw, 30px); }
.mode-tile, .board-link {
  display: flex; align-items: center; gap: 15px; width: 100%; text-align: left;
  padding: 18px; border: 1px solid transparent; border-radius: 14px;
}
.mode-tile { position: relative; isolation: isolate; overflow: hidden; min-height: 100px; }
.mode-tile::after {
  content: ""; position: absolute; z-index: -1; width: 110px; height: 110px; right: -54px; top: -50px;
  border: 1px solid currentColor; border-radius: 50%; opacity: .13;
  box-shadow: 0 0 0 7px transparent, 0 0 0 8px currentColor, 0 0 0 15px transparent, 0 0 0 16px currentColor;
}
#mode-solo { background: var(--lime); color: #1d2710; }
#mode-multi { background: var(--lilac); color: #251a3c; }
.mode-icon { width: 32px; height: 32px; stroke-width: 1.65; }
.mode-copy { display: grid; gap: 3px; min-width: 0; }
.mode-copy strong { font-size: clamp(1.3rem, 2.3vw, 1.72rem); letter-spacing: -.045em; }
.mode-copy small { line-height: 1.35; font-size: .85rem; }
.board-link { min-height: 54px; background: transparent; color: var(--text); border-color: #50495d; font-weight: 680; }
.board-link svg { color: var(--lilac); }
@media (hover: hover) {
  .mode-tile:hover, .board-link:hover { transform: translateY(-2px); }
  #mode-solo:hover { background: #e4ffa6; }
  #mode-multi:hover { background: #cabbff; }
  .board-link:hover { background: var(--raised); border-color: var(--lilac); }
}
.back-link {
  display: inline-flex; align-items: center; align-self: flex-start; width: max-content;
  min-height: 40px; margin-bottom: 12px; padding: 0 2px; border: 0;
  background: transparent; color: var(--muted); font-size: .9rem; text-decoration: underline; text-underline-offset: 4px;
}
.back-link:hover { color: var(--text); }
.count-picker, .board-filters { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.count-picker { margin: 22px 0; }
.count-picker button, .board-filters button { background: #211e2c; border: 1px solid #51495e; border-radius: 10px; color: var(--muted); }
.count-picker button { display: grid; justify-items: center; gap: 3px; align-content: center; padding: 9px 3px; min-height: 79px; }
.count-picker b { font: 750 1.45rem/1.1 var(--mono); letter-spacing: -.07em; }
.count-picker span { font-size: .77rem; }
.count-picker button[aria-pressed=true], .board-filters button[aria-pressed=true] { border-color: var(--lime); background: #293121; color: var(--lime); }
.count-picker button:hover, .board-filters button:hover { border-color: #a7a58e; }
#start-solo.cta { min-height: 48px; color: #1b2112; }
#solo-error:not([hidden]) { margin: 0 0 12px; }
.board-page {
  max-width: 790px; margin: 0 auto; padding: clamp(18px, 4vw, 48px);
  border: 1px solid var(--border); border-radius: 21px; background: var(--surface);
}
.board-head { display: flex; align-items: center; gap: 16px; }
.board-head p, .finish-publish p { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.board-emblem { display: grid; width: 60px; height: 60px; flex: none; place-items: center; background: #30273d; color: var(--lilac); border-radius: 16px; }
.board-emblem svg { width: 30px; height: 30px; }
.board-filters { margin: 26px 0 16px; }
.board-filters button { min-height: 44px; padding: 6px 3px; font-size: .9rem; font-weight: 680; }
.board-table { width: 100%; border-collapse: collapse; table-layout: auto; font-variant-numeric: tabular-nums; }
.board-table th, .board-table td { border-bottom: 1px solid var(--border); padding: 12px 8px; text-align: start; }
.board-table th { color: var(--muted); font-size: .8rem; font-weight: 620; }
.board-table td { font-weight: 650; }
.board-table :is(th,td):first-child { width: 16%; }
.board-table :is(th,td):last-child { text-align: end; }
.board-table td:nth-child(2) { overflow-wrap: anywhere; }
.board-table .first-place td:first-child { color: var(--lime); }
.board-status { color: var(--muted); padding-block: 18px; border-top: 1px solid var(--border); }
#board-next { margin-top: 12px; }
.finish-publish { border: 1px solid #564d66; border-radius: 14px; padding: clamp(14px, 2vw, 22px); margin-bottom: 14px; background: #24202f; }
.finish-publish h3 { font-size: 1.24rem; letter-spacing: -.025em; }
#publish-form { margin-top: 16px; }
.publish-actions, .finish-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.finish-links > button { flex: 1 1 125px; }
.finish-publish #publish-error { color: var(--error); }
.finish-publish #publish-status { color: var(--lime); margin: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  #home:is([data-view=solo],[data-view=multi]) .sleeve { display: none; }
  .mode-tile { min-height: 78px; padding: 14px 16px; }
  .mode-deck { gap: 9px; }
}
@media (max-width: 400px) {
  .mode-icon { width: 26px; height: 26px; }
  .board-filters { gap: 4px; }
  .board-filters button { font-size: .78rem; }
  .board-head { align-items: flex-start; gap: 10px; }
  .board-emblem { width: 40px; height: 40px; border-radius: 11px; }
  .board-emblem svg { width: 23px; height: 23px; }
  .board-table td, .board-table th { padding-inline: 3px; }
}
