:root {
  color-scheme: dark;
  --bg: #151617;
  --surface: #242627;
  --surface-hover: #2d3031;
  --line: #3a3d3e;
  --text: #f4f4f2;
  --muted: #9ba0a2;
  --green: #52bd20;
  --green-dark: #3d9918;
  --blue: #8aa6c5;
  font-family: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(100% - 32px, 760px); margin: 0 auto; padding: 20px 0 30px; }
.topbar { height: 142px; display: flex; justify-content: center; align-items: center; position: relative; }
.logo { color: var(--text); text-decoration: none; font-size: clamp(40px, 8vw, 68px); font-weight: 700; letter-spacing: -0.085em; }
.logo-white { color: #f4f4f2; }.logo-green { color: #3fb51c; }.logo-red { color: #d94b45; }
.icon-button { position: absolute; right: 0; top: 24px; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font-size: 13px; }
.menu-toggle { position: absolute; left: 0; top: 50%; width: 32px; height: 32px; transform: translateY(-50%); border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 20px; line-height: 1; }
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { color: var(--text); background: var(--surface); }
.mode-menu { position: absolute; z-index: 5; left: 0; top: calc(50% + 27px); display: grid; width: 178px; padding: 5px; border-radius: 8px; background: var(--surface); box-shadow: 0 10px 30px #0007; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
.mode-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mode-tab.mode-coming-soon { display: grid; gap: 5px; color: var(--muted); cursor: default; }
.mode-coming-soon small { font-size: 10px; font-weight: 400; }
.genre-bar { display: flex; width: min(100%, 660px); gap: 5px; align-items: stretch; margin: 0 auto 42px; }
.genre-tabs { display: flex; flex: 1; min-width: 0; background: var(--surface); border-radius: 8px; padding: 5px; overflow-x: auto; scrollbar-width: none; }
.genre-tabs::-webkit-scrollbar { display: none; }
.mode-tab, .genre-tab { border: 0; color: var(--blue); background: transparent; border-radius: 5px; padding: 12px 8px; font-size: 14px; white-space: nowrap; overflow: visible; }
.genre-tab { font-family: Arial, "Segoe UI", sans-serif; font-weight: 500; letter-spacing: 0; }
.genre-tab { flex: 1 0 auto; min-width: 0; }.genre-tab:first-child { min-width: 92px; }.genre-tab:not(:first-child) { min-width: 210px; }
.mode-tab.active, .genre-tab.active { background: #151718; color: var(--text); box-shadow: 0 1px 3px #0009; }
.game-panel { position: relative; }
.panel-topline { display: flex; justify-content: flex-end; align-items: center; color: var(--muted); font-size: 11px; letter-spacing: .08em; margin-bottom: 11px; }
.fun-controls { margin: 0 auto 14px; }.difficulty-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.difficulty { border: 0; border-radius: 5px; background: var(--surface); color: var(--blue); padding: 10px 3px; font-size: 11px; }.difficulty.active { background: #151718; color: var(--text); box-shadow: 0 1px 3px #0009; }
.mode-actions { display: flex; gap: 5px; }
.restart-button, .info-button { width: 40px; border: 1px solid var(--line); border-radius: 5px; color: var(--blue); background: var(--surface); font-size: 23px; line-height: 1; }.restart-button:hover, .info-button:hover { color: var(--text); background: var(--surface-hover); }.info-button { width: 34px; font-family: Georgia, serif; font-size: 18px; font-style: italic; }
.play-button { display: grid; place-items: center; border: 0; border-radius: 50%; color: white; background: var(--green); font-weight: 700; padding: 0; }
.play-button:hover { background: #64d52d; }.play-icon { display: block; width: 0; height: 0; margin-left: 1px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 14px solid currentColor; }
.round-area { margin-top: 7px; }
.clue-stack { display: grid; gap: 7px; }.clue-row { height: 55px; display: grid; place-items: center; border-radius: 7px; background: var(--surface); color: var(--text); font-size: 19px; font-weight: 500; }.clue-row.done { color: var(--muted); }.clue-row.current { background: var(--surface-hover); }
.audio-row { display: flex; justify-content: center; align-items: center; gap: 9px; min-height: 78px; color: var(--muted); font-size: 11px; }.play-button { width: 48px; height: 48px; font-size: 16px; padding-left: 3px; }.play-button.playing { background: #f1a847; }.play-button .pause-icon { display: flex; align-items: center; justify-content: center; gap: 4px; }.play-button .pause-icon i { display: block; width: 3px; height: 16px; border-radius: 1px; background: currentColor; }.audio-row #audio-note { display: none; }.soundcloud-player { position: absolute; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
.timeline { position: relative; margin: 2px 0 18px; padding-top: 28px; }.timeline-label { position: absolute; top: auto; bottom: 18px; left: 50%; color: var(--text); font-size: 14px; font-weight: 500; transform: translateX(-50%); white-space: nowrap; }.timeline-track { position: relative; height: 17px; background: var(--bg); }.timeline-segments { display: flex; gap: 3px; height: 100%; overflow: hidden; border-radius: 5px; }.timeline-segment { min-width: 0; background: #303436; }.timeline-segment.target { background: linear-gradient(to right, #747a78 0 var(--segment-target, 0%), #303436 var(--segment-target, 0%) 100%); }.timeline-segment.active { background: #e4e7e5; }.timeline-segment.current { background: linear-gradient(to right, #e4e7e5 0 var(--segment-progress, 0%), #747a78 var(--segment-progress, 0%) var(--segment-target, 0%), #303436 var(--segment-target, 0%) 100%); }.timeline-marker { position: absolute; z-index: 2; top: -22px; left: 0; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 14px solid var(--text); transform: translateX(-50%); transition: left .08s linear; }
.guess-box { position: relative; }.guess-input-row { display: flex; gap: 7px; }.guess-input-row input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); outline: none; padding: 13px; font-size: 13px; }.guess-input-row input:focus { border-color: var(--blue); }.guess-button { border: 0; border-radius: 6px; color: white; background: var(--green-dark); padding: 0 17px; font-size: 13px; }.guess-button:hover { background: var(--green); }
.suggestions { position: absolute; z-index: 3; left: 0; right: 86px; top: 51px; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 6px; background: #202223; }.suggestion { display: block; width: 100%; padding: 11px; border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; font-size: 12px; overflow-wrap: anywhere; }.suggestion:last-child { border: 0; }.suggestion:hover { background: var(--surface-hover); }
.skip-button { display: block; margin: 10px auto 0; border: 0; color: var(--blue); background: transparent; font-size: 12px; }.skip-button:hover { color: var(--text); }
.result-card { margin-top: 12px; padding: 19px; border-radius: 7px; text-align: center; background: var(--surface); }.result-card h3 { margin: 0 0 7px; font-size: 21px; }.result-card h3 span, .result-card strong { color: var(--green); }.result-card p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }.result-actions { margin-top: 14px; }.result-actions .primary-button { border: 0; border-radius: 5px; background: var(--green); color: white; padding: 10px 24px; font-size: 12px; }
.score-bar { display: flex; justify-content: center; gap: 58px; padding: 29px 0 20px; }.score-bar div { text-align: center; }.score-bar strong { display: block; color: var(--text); font-size: 19px; font-weight: 500; }.score-bar span { color: var(--muted); font-size: 10px; }
.clue-row.incorrect { background:#c91c20; color:#fff; }
.clue-row.correct { background:#52b91d; color:#fff; }
.clue-row.artist-correct { background:#e2b83d; color:#171717; }
.info-open { overflow:hidden; }
.info-card { width:min(100%,460px) !important; max-height:calc(100dvh - 40px); overflow-y:auto; padding:30px 24px 24px !important; border-radius:16px !important; }
.info-card h2 { font-size:28px !important; padding-right:24px; }
.howto-stages { display:flex; gap:4px; margin:22px 0; }
.howto-stages span { flex:1; padding:10px 2px; text-align:center; border-radius:4px; background:#353b39; font-size:12px; }
.howto-stages span:first-child { background:#52b91d; color:white; }
.howto-actions { display:grid; grid-template-columns:auto 1fr; gap:14px 12px; align-items:center; font-size:14px; }
.howto-play { display:grid; place-items:center; width:36px; height:36px; background:#52b91d; color:white; border-radius:50%; }
.howto-skip { padding:8px; border:1px solid #606764; border-radius:5px; font-size:12px; }
.howto-colours { border-top:1px solid var(--line); margin:20px 0; padding-top:18px; display:grid; gap:12px; font-size:13px; }
.howto-colours div { display:flex; gap:12px; align-items:center; }
.howto-colours i { width:22px; height:22px; border-radius:5px; flex:none; }
.howto-red { background:#c91c20; }.howto-yellow { background:#e2b83d; }.howto-green { background:#52b91d; }
#info-ready { width:100%; margin-top:20px; padding:12px; border:0; border-radius:7px; background:#52b91d; color:white; font-size:16px; font-weight:600; }
.clue-row { padding:8px 12px; min-height:55px; height:auto; overflow-wrap:anywhere; text-align:center; }
.suggestions:empty { display:none; }
.script-toggle { position:relative; isolation:isolate; display:flex; flex:none; width:86px; height:32px; padding:3px; border:1px solid #4d5551; border-radius:18px; background:#202423; color:#aeb8b3; cursor:pointer; }
.script-toggle::before { content:''; position:absolute; z-index:-1; inset:3px auto 3px 3px; width:38px; border-radius:14px; background:#52b91d; transition:transform .18s ease; }
.script-toggle[aria-checked="true"]::before { transform:translateX(40px); }
.script-toggle span { flex:1; display:grid; place-items:center; font-size:12px; font-weight:600; }
.script-toggle[aria-checked="false"] span:first-child,.script-toggle[aria-checked="true"] span:last-child { color:white; }
.header-tools { position:absolute; right:0; top:50%; transform:translateY(-50%); display:flex; align-items:center; gap:8px; }
.topbar > .script-toggle { position:absolute; right:clamp(-180px,calc(396px - 50vw),-112px); top:50%; transform:translateY(-50%); }
.header-tools .info-button { height:32px; }
.topbar .logo { font-size:clamp(32px,6vw,54px); }
.reset-label { font-size:11px; color:var(--muted); }
.panel-topline { gap:8px; }
html[data-interface-script="latin"] .result-card .result-kicker { text-transform:none; }
@media(max-width:1024px){.topbar .logo{position:relative;top:28px;}.topbar{min-height:150px;}.header-tools,.menu-toggle,.topbar > .script-toggle{top:25px;}.header-tools{right:104px;}.topbar > .script-toggle{right:0;}}
.login-shell > .script-toggle { margin:16px auto; }
.script-toggle:focus-visible { outline:2px solid white; outline-offset:3px; }
@media(prefers-reduced-motion:reduce){.script-toggle::before{transition:none;}}
.audio-row #audio-note:not(:empty) { display:block; max-width:240px; line-height:1.4; }
.suggestions { top:0; bottom:auto; right:auto; transform:translateY(calc(-100% - 8px)); max-height:min(420px,60dvh); overscroll-behavior:contain; box-shadow:0 -8px 24px #0005; }
.hidden { display: none !important; }
.info-popover { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: #0009; }
.info-card { position: relative; width: min(100%, 360px); border: 1px solid var(--line); border-radius: 8px; padding: 23px 22px 20px; background: var(--surface); box-shadow: 0 18px 50px #0009; }.info-card h2 { margin: 0 0 10px; font-size: 18px; }.info-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }.info-close { position: absolute; top: 7px; right: 9px; width: 27px; height: 27px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 22px; line-height: 1; }.info-close:hover { color: var(--text); background: var(--surface-hover); }
@media (max-width: 540px) { .page-shell { width: min(100% - 22px, 760px); padding-top: 8px; }.topbar { height: 120px; }.logo { font-size: clamp(35px, 11vw, 54px); }.mode-menu { width: 164px; }.genre-tabs { margin-bottom: 28px; }.genre-tab { font-size: 12px; padding-inline: 3px; }.difficulty { font-size: 9px; }.score-bar { gap: 34px; } }
.audio-row #audio-note:not(:empty) { display: inline; }
/* Keep a valid rendering surface for SoundCloud's canvas, without revealing the answer. */
.audio-row iframe.soundcloud-player { width: 320px; height: 166px; clip-path: inset(100%); }
