:root {
  color-scheme: dark;
  --ink: #fffdf5;
  --paper: #fffdf5;
  --muted: #bec8d8;
  --panel: #0d1320;
  --line: #596b84;
  --line-strong: #91a8c5;
  --acid: #a5ff32;
  --blue: #36d9ff;
  --cyan: #36d9ff;
  --magenta: #ff3b9d;
  --violet: #8b63ff;
  --amber: #ffbf3f;
  --danger: #ff6f72;
  --focus: #fff46a;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --lane-count: 6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: #08090b; color: var(--ink); }
body {
  margin: 0;
  min-width: 300px;
  background:
    radial-gradient(circle at 8% 0, rgba(54, 217, 255, .15), transparent 32rem),
    radial-gradient(circle at 92% 18%, rgba(255, 59, 157, .11), transparent 30rem),
    #06080e;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

.fullscreen-gate {
  width: min(760px, calc(100vw - 28px));
  padding: 0;
  border: 2px solid var(--acid);
  background: #060a11;
  color: var(--ink);
  box-shadow: 0 0 0 2px #142033, 0 24px 90px rgba(0, 0, 0, .9), 0 0 34px rgba(165, 255, 50, .2);
}
.fullscreen-gate::backdrop { background: rgba(1, 3, 8, .94); backdrop-filter: blur(12px); }
.fullscreen-gate section { display: grid; gap: 18px; padding: clamp(24px, 6vw, 44px); text-align: center; }
.fullscreen-gate h1 { margin: 0; font-family: inherit; font-size: clamp(1.35rem, 5vw, 2.15rem); line-height: 1.05; text-transform: uppercase; }
.fullscreen-gate p { margin: 0; color: #d8e0ec; font-size: .82rem; line-height: 1.6; }
.fullscreen-language-menu { display: grid; gap: 9px; text-align: left; }
.fullscreen-language-menu > span { color: var(--acid); font: 900 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.fullscreen-language-choices span { min-height: 44px; font-size: .78rem; }
.fullscreen-gate .primary-action { width: 100%; min-height: 58px; }
.fullscreen-gate .primary-action:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .55; }
.language-picker-dialog {
  position: fixed;
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(820px, calc(100dvw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: 0;
  overflow: auto;
  padding: 0;
  border: 2px solid var(--cyan);
  background: #060a11;
  color: var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px #142033, 0 24px 90px rgba(0, 0, 0, .9), 0 0 34px rgba(54, 217, 255, .2);
}
.language-picker-dialog::backdrop { background: rgba(1, 3, 8, .96); backdrop-filter: blur(12px); }
.language-picker-dialog form { display: grid; gap: 16px; padding: clamp(22px, 3vw, 34px); }
.language-picker-dialog form > span { color: var(--acid); font: 900 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.language-picker-dialog h1 { margin: 0; font-family: inherit; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.05; text-transform: uppercase; }
.language-picker-dialog p { max-width: 68ch; margin: 0; color: #d8e0ec; font-size: .84rem; line-height: 1.55; }
.language-choice-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.language-choice-grid label { position: relative; display: block; min-width: 0; cursor: pointer; }
.language-choice-grid input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.language-choice-grid span {
  display: grid;
  min-height: 50px;
  place-items: center;
  border: 1px solid #667b98;
  background: #0c121c;
  font-weight: 900;
}
.language-choice-grid input:checked + span,
.language-choice-grid input:focus-visible + span { border-color: var(--acid); color: var(--acid); box-shadow: inset 0 -3px var(--acid), 0 0 14px rgba(165, 255, 50, .2); }
.language-picker-dialog .primary-action { min-height: 52px; }
body[data-active-screen="songs"] {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}
body[data-active-screen="songs"] main { min-height: 0; overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; }
.game-header a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.game-header { min-height: 92px; padding: 14px clamp(20px, 4vw, 70px); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(18px, 3vw, 48px); background: rgba(8, 9, 11, .88); }
.game-header img { display: block; width: clamp(170px, 20vw, 250px); height: auto; }
.game-header-links { min-width: 0; display: flex; justify-content: center; gap: 6px; }
.game-header-links a { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); color: #fff; font-size: .58rem; font-weight: 850; letter-spacing: .075em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.game-header-links a:hover,
.game-header-links a:focus-visible { border-color: var(--acid); background: rgba(165, 255, 50, .1); color: var(--acid); }
.game-header-icon { width: 15px; height: 15px; flex: 0 0 auto; fill: currentColor; }
.game-header-icon--youtube { color: #ff3358; }
.game-header-icon--facebook { color: #4f8cff; }
.eyebrow { color: var(--acid); text-transform: uppercase; letter-spacing: .19em; font-size: .68rem; font-weight: 800; }
.game-header strong { text-transform: uppercase; letter-spacing: .22em; font-size: .85rem; }
main { min-height: calc(100vh - 180px); }
.screen { width: min(1500px, 100%); margin: 0 auto; padding: clamp(42px, 7vw, 110px) clamp(20px, 5vw, 80px); }
.screen[hidden] { display: none; }
.screen--active { display: grid; grid-template-columns: minmax(0, .88fr) minmax(520px, 1.12fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: .9; }
h1 { font-size: clamp(4rem, 8vw, 8.8rem); margin: 30px 0; letter-spacing: -.065em; }
h1 em, h2 em { color: var(--blue); font-weight: 400; }
.hero-copy > p:last-child, .song-heading p { color: var(--muted); max-width: 40rem; line-height: 1.7; }
.settings-panel { border: 1px solid var(--line); background: rgba(17, 19, 24, .94); }
.settings-heading { padding: 28px; display: flex; align-items: start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.settings-heading span { color: var(--muted); text-transform: uppercase; letter-spacing: .16em; font-size: .67rem; }
.settings-heading h2 { font-family: inherit; font-size: 1.35rem; line-height: 1.2; margin: 6px 0 0; font-weight: 700; }
.settings-heading b, .song-card__status { color: var(--acid); border: 1px solid currentColor; border-radius: 999px; padding: 7px 10px; text-transform: uppercase; letter-spacing: .1em; font-size: .62rem; white-space: nowrap; }
fieldset { border: 0; border-bottom: 1px solid var(--line); padding: 26px 28px; margin: 0; }
legend { padding: 0; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; }
fieldset > label { display: inline-flex; gap: 8px; margin: 16px 24px 0 0; align-items: center; }
fieldset > p { margin: 9px 0 0; color: var(--muted); font-size: .85rem; }
input { accent-color: var(--acid); }
.lane-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 15px; }
.lane-options label { display: flex; gap: 8px; padding: 12px; background: #191c22; border: 1px solid #262a33; font-size: .82rem; }
.volume-control { display: grid; gap: 14px; padding: 26px 28px; border-bottom: 1px solid var(--line); }
.volume-control span { display: flex; justify-content: space-between; font-weight: 700; font-size: .82rem; }
.volume-control input { width: 100%; }
.primary-action { border: 0; background: var(--acid); color: #111; padding: 20px 28px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; cursor: pointer; }
.settings-panel > .primary-action { width: 100%; display: flex; justify-content: space-between; }
.screen--songs { width: min(1280px, 100%); height: 100%; min-height: 0; padding: clamp(16px, 3vw, 40px); overflow: hidden; }
.music-selector-shell { height: 100%; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; }
.selector-header { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); background: rgba(10, 12, 17, .94); }
.selector-header h1 { overflow: hidden; margin: 0; font-family: inherit; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 900; letter-spacing: -.025em; line-height: 1; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.selector-back, .selector-options, .artist-switcher button { border: 1px solid var(--line); background: #171a20; color: var(--ink); cursor: pointer; }
.selector-back { min-width: 40px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 11px; font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.selector-back > span:first-child { color: var(--acid); font-size: .92rem; }
.selector-header__actions { display: flex; align-items: center; gap: 10px; }
.selector-options { height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; font-size: .65rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.selector-options > span:first-child { color: #55dcff; font-size: 1rem; line-height: 1; }
.selector-back:hover, .selector-back:focus-visible, .selector-options:hover, .selector-options:focus-visible { border-color: var(--acid); background: #20252d; outline: 0; }
.selector-ready { margin: 0; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; }
.selector-ready strong { color: var(--acid); font-size: 1.1rem; }
.artist-switcher { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 8px; align-items: center; min-height: 42px; padding: 4px; border: 1px solid var(--line); background: #0d1015; }
.artist-switcher strong { overflow: hidden; font-size: .82rem; text-align: center; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.artist-switcher button { height: 32px; color: var(--acid); }
.artist-switcher select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.music-selector { min-height: 0; display: grid; grid-template-columns: minmax(300px, .92fr) minmax(360px, 1.08fr); overflow: hidden; border: 1px solid var(--line); background: rgba(8, 10, 14, .92); }
.selection-preview { min-width: 0; min-height: 0; position: relative; display: grid; grid-template-rows: auto auto minmax(0, 1fr); align-content: start; overflow: hidden; border-right: 1px solid var(--line); background: #090b0f; }
.selection-artwork { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #090b0f; }
.selection-artwork > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.selection-preview__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 5, 9, .02), rgba(3, 5, 9, .14)); }
.selection-status { position: absolute; top: 12px; right: 12px; padding: 5px 8px; border: 1px solid currentColor; border-radius: 999px; background: rgba(3, 5, 9, .86); color: var(--acid); font-size: .58rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.selection-details { z-index: 3; min-width: 0; display: grid; grid-template: "copy copy" auto "scores speed" auto "scores difficulty" auto "scores action" auto / minmax(0, 1fr) auto; gap: 6px 16px; padding: 14px; border-top: 1px solid rgba(96, 104, 123, .42); background: linear-gradient(180deg, #0d1015, #090b0f); }
.selection-difficulty { grid-area: difficulty; justify-self: end; display: flex; align-items: center; gap: 6px; padding: 4px 5px 4px 7px; border: 1px solid rgba(96, 104, 123, .76); border-radius: 5px; background: rgba(3, 5, 9, .92); box-shadow: 0 4px 16px rgba(0, 0, 0, .34); }
.selection-difficulty[hidden] { display: none; }
.selection-difficulty > span { color: var(--muted); font-size: .46rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.selection-difficulty > div { display: flex; gap: 3px; }
.selection-difficulty button { min-width: 51px; display: grid; gap: 2px; justify-items: center; padding: 4px 6px; border: 1px solid #4a5060; border-radius: 3px; background: #161a22; color: var(--muted); cursor: pointer; font-size: .5rem; font-weight: 900; line-height: 1; text-transform: uppercase; }
.selection-difficulty button strong { color: inherit; font-size: .52rem; }
.selection-difficulty button small { color: #828a9b; font-size: .4rem; }
.selection-difficulty button:hover { border-color: var(--acid); color: var(--ink); }
.selection-difficulty button.is-selected { border-color: var(--acid); background: color-mix(in srgb, var(--acid) 17%, #11161d); color: var(--acid); box-shadow: 0 0 9px rgba(165, 255, 50, .2); }
.selection-highscores { position: relative; z-index: 2; grid-area: scores; align-self: start; width: min(195px, 100%); height: auto; overflow: visible; border: 1px solid rgba(96, 104, 123, .76); background: rgba(3, 5, 9, .88); box-shadow: 0 8px 24px rgba(0, 0, 0, .34); backdrop-filter: blur(8px); }
.selection-highscores > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 7px; border-bottom: 1px solid rgba(96, 104, 123, .5); }
.selection-highscores > header > span { color: var(--muted); font-size: .5rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.selection-highscores > header button { padding: 4px 6px; border: 1px solid var(--acid); background: rgba(165, 255, 50, .08); color: var(--acid); cursor: pointer; font-size: .5rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.selection-highscores > header button:hover,
.selection-highscores > header button:focus-visible { background: var(--acid); color: #10130d; }
.selection-highscores ol { margin: 0; padding: 3px; list-style: none; }
.selection-highscores .highscore-row { min-height: 24px; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 5px; padding: 3px 5px; border-color: rgba(96, 104, 123, .32); font-size: .56rem; }
.selection-highscores .highscore-score { font-size: .62rem; }
.selection-highscores .highscore-difficulty,
.selection-highscores .highscore-accuracy { display: none; }
.selection-highscores .highscore-empty { padding: 8px; font-size: .56rem; }
.selection-copy { position: relative; z-index: 2; grid-area: copy; min-width: 0; padding-right: 58px; text-shadow: 0 2px 14px #000; }
.selection-copy p { margin: 0 0 5px; color: var(--acid); font-size: .68rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.selection-copy h2 { margin: 0; font-family: inherit; font-size: clamp(1.35rem, 3vw, 2.2rem); font-weight: 900; line-height: 1.05; overflow-wrap: anywhere; }
.selection-copy > span { display: block; margin-top: 7px; color: #f0ede5; font-size: clamp(.9rem, 1.5vw, 1.08rem); font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.selection-year-stat { z-index: 3; grid-column: 2; grid-row: 1; align-self: center; justify-self: end; margin: 0; text-align: right; }
.selection-year-stat dt { color: var(--muted); font-size: .48rem; letter-spacing: .1em; text-transform: uppercase; }
.selection-year-stat dd { margin: 2px 0 0; font-size: .78rem; font-weight: 900; }
.selection-action-row { grid-area: action; min-height: 50px; display: flex; align-items: stretch; justify-content: end; gap: 6px; }
.selection-stats { display: flex; gap: 5px; margin: 0; }
.selection-stats div { --stat-accent: var(--acid); width: 56px; min-width: 56px; display: grid; align-content: center; padding: 6px 7px; border: 1px solid #252b35; border-top: 2px solid var(--stat-accent); background: linear-gradient(180deg, #12161d, #0a0d12); box-shadow: inset 0 1px rgba(255, 255, 255, .025); }
.selection-stats div:first-child { --stat-accent: var(--amber); }
.selection-stats dt { color: #8f97a8; font-size: .48rem; font-weight: 800; letter-spacing: .12em; line-height: 1; text-transform: uppercase; }
.selection-stats dd { margin: 4px 0 0; color: var(--stat-accent); font-size: .9rem; font-weight: 950; font-variant-numeric: tabular-nums; line-height: 1; }
.selection-confirm { width: 144px; min-width: 144px; max-width: 144px; overflow: hidden; padding: 9px 11px; border: 0; background: var(--acid); color: #10130d; cursor: pointer; font-weight: 950; text-align: left; text-transform: uppercase; white-space: nowrap; }
.selection-confirm span, .selection-confirm small { display: block; }
.selection-confirm span { font-size: .78rem; line-height: 1.1; letter-spacing: .01em; }
.selection-confirm small { margin-top: 2px; font-size: .5rem; letter-spacing: .08em; }
.selection-list-panel { min-width: 0; min-height: 0; display: grid; grid-template-rows: 42px minmax(0, 1fr); overflow: hidden; }
.selection-list-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }
kbd { min-width: 19px; display: inline-block; margin-inline: 2px; padding: 2px 4px; border: 1px solid #4a5060; border-radius: 3px; background: #161a22; color: var(--ink); font: inherit; line-height: 1; text-align: center; }
.song-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 7px; scrollbar-color: var(--acid) #11151b; scrollbar-gutter: stable; }
.song-list-item { width: 100%; min-height: 62px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 5px; padding: 8px 10px; border: 1px solid #2b303a; background: linear-gradient(90deg, #11151c, #0d1015); color: var(--ink); cursor: pointer; text-align: left; }
.song-list-item:hover { border-color: #596175; }
.song-list-item.is-selected { border-color: var(--acid); background: linear-gradient(90deg, color-mix(in srgb, var(--acid) 18%, #10151b), #17213a); box-shadow: inset 4px 0 var(--acid), 0 0 18px rgba(165, 255, 50, .13); }
.song-list-item__number { color: #737989; font-size: .72rem; font-variant-numeric: tabular-nums; }
.song-list-item.is-selected .song-list-item__number { color: var(--acid); }
.song-list-item__title { min-width: 0; }
.song-list-item__heading { min-width: 0; display: flex; align-items: center; gap: 8px; }
.song-list-item__title strong, .song-list-item__title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-list-item__heading strong { min-width: 0; flex: 1; }
.song-list-item__title strong { font-size: .9rem; }
.song-list-item__title small { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.song-list-item__status { color: var(--acid); font-size: .52rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.selector-controls { min-width: 0; display: flex; justify-content: center; gap: 18px; overflow: hidden; padding: 6px 10px; border: 1px solid var(--line); background: #0c0f14; color: var(--muted); font-size: .6rem; text-transform: uppercase; white-space: nowrap; }
.selector-controls span { overflow: hidden; text-overflow: ellipsis; }
.song-card__status--review { color: var(--amber); }
.song-card__status--missing { color: var(--muted); }
.screen--game { width: 100%; max-width: none; padding: 22px clamp(12px, 3vw, 48px) 50px; position: relative; isolation: isolate; overflow: hidden; }
.screen--game > :not(.game-backdrop) { position: relative; z-index: 1; }
.game-backdrop { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; background: #08090b; }
.game-backdrop img { display: block; width: 100%; height: 100%; object-fit: cover; filter: blur(8px) saturate(.94); opacity: .86; transform: scale(1.035); }
.game-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 7, 11, .25), rgba(5, 7, 11, .4) 34%, rgba(5, 7, 11, .6)), radial-gradient(circle at 50% 32%, rgba(17, 22, 31, .03), rgba(5, 7, 11, .22) 76%); }
.play-header { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 24px; align-items: center; margin-bottom: 18px; }
.play-identity { min-width: 0; display: flex; align-items: center; gap: 16px; }
.play-identity > img { width: clamp(96px, 10vw, 150px); height: auto; flex: 0 0 auto; }
.play-identity > div { min-width: 0; }
.play-header h1 { font-family: inherit; letter-spacing: -.02em; font-weight: 800; font-size: clamp(1.45rem, 3vw, 2.5rem); margin: 5px 0; line-height: 1; }
.play-identity > div > span { color: var(--muted); }
.score-strip { display: flex; border: 1px solid var(--line); }
.score-strip span { min-width: 110px; padding: 11px 16px; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; border-right: 1px solid var(--line); }
.score-strip span:last-child { border: 0; }
.score-strip strong { color: var(--ink); display: block; font-size: 1rem; margin-top: 4px; }
.round-button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 1.4rem; cursor: pointer; }
.candidate-notice { padding: 10px 14px; background: #322713; border: 1px solid #624b1a; color: #f4d99e; margin-bottom: 12px; font-size: .82rem; }
.game-stage { height: min(64vh, 660px); min-height: 420px; position: relative; overflow: hidden; border: 1px solid rgba(98, 105, 122, .64); background: linear-gradient(rgba(10, 13, 20, .48), rgba(17, 20, 28, .66)); box-shadow: 0 18px 60px rgba(0, 0, 0, .28); backdrop-filter: blur(2px); }
.lane-rail { --instrument-shelf-height: 124px; --lane-gutter: clamp(5px, 2vw, 28px); height: 100%; position: relative; }
.lane-highway { position: absolute; z-index: 1; top: -38%; right: 0; bottom: var(--instrument-shelf-height); left: 0; isolation: isolate; display: grid; grid-template-columns: repeat(var(--lane-count), 1fr); padding-inline: var(--lane-gutter); transform: perspective(940px) rotateX(32deg); transform-origin: center bottom; transform-style: preserve-3d; backface-visibility: hidden; }
.lane-highway::before { content: ""; position: absolute; z-index: 0; inset: 0 var(--lane-gutter); background: linear-gradient(180deg, rgba(3, 5, 10, .12), rgba(3, 5, 10, .55)), repeating-linear-gradient(to bottom, rgba(255, 255, 255, .065) 0 1px, transparent 1px 72px); box-shadow: inset 0 0 36px rgba(0, 0, 0, .46); }
.highway-lane { z-index: 1; border-left: 1px solid rgba(129, 137, 156, .48); position: relative; min-width: 0; overflow: hidden; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--lane-color) 2.5%, transparent) 50%, transparent); cursor: pointer; touch-action: manipulation; }
.highway-lane:last-child { border-right: 1px solid rgba(129, 137, 156, .48); }
.highway-lane:first-child::before, .highway-lane:last-child::before { content: ""; position: absolute; z-index: 9; top: 0; bottom: 0; width: 8px; background: linear-gradient(90deg, #121722 0, #e0e6f0 24%, #687386 48%, #1b2230 76%, #090c12 100%); box-shadow: 0 0 10px rgba(190, 206, 232, .3), 3px 0 8px rgba(0, 0, 0, .8); }
.highway-lane:first-child::before { left: 0; }
.highway-lane:last-child::before { right: 0; transform: scaleX(-1); }
.highway-lane.is-triggered { animation: highwayLaneFlash .18s ease-out; }
.highway-lane::after { content: ""; position: absolute; z-index: 7; right: 0; bottom: 0; left: 0; height: 4px; background: var(--lane-color); box-shadow: 0 0 18px color-mix(in srgb, var(--lane-color) 66%, transparent); }
.highway-lane.is-triggered::after { animation: hitLinePulse .16s ease-out; }
.lane-inputs { position: absolute; z-index: 3; right: 0; bottom: 0; left: 0; height: var(--instrument-shelf-height); display: grid; grid-template-columns: repeat(var(--lane-count), 1fr); padding-inline: var(--lane-gutter); }
.lane { position: relative; min-width: 0; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent; overflow: hidden; }
.lane:hover { background: linear-gradient(transparent calc(100% - var(--instrument-shelf-height)), color-mix(in srgb, var(--lane-color) 10%, transparent)); }
.lane:focus-visible { outline: 3px solid var(--lane-color); outline-offset: -4px; z-index: 3; }
.lane.is-triggered { animation: instrumentShelfFlash .18s ease-out; }
.lane__name { position: absolute; z-index: 10; left: 50%; bottom: calc(var(--instrument-shelf-height) - 20px); max-width: calc(100% - 8px); transform: translateX(-50%); overflow: hidden; padding: 2px 5px; border-radius: 4px; background: rgba(3, 5, 10, .78); color: #fff; font-size: clamp(.5rem, .8vw, .65rem); font-weight: 800; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; text-shadow: 0 0 7px var(--lane-color); pointer-events: none; }
.lane__instrument { position: absolute; z-index: 5; left: 8px; right: 8px; bottom: 0; width: calc(100% - 16px); height: var(--instrument-shelf-height); object-fit: contain; transform: scale(var(--instrument-scale)); transform-origin: 50% 48%; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--lane-color) 65%, transparent)); pointer-events: none; }
.lane__instrument.is-hit { animation: instrumentBounce .3s cubic-bezier(.18, .8, .25, 1.3); }
.lane__bindings { position: absolute; z-index: 10; left: 50%; bottom: 6px; max-width: calc(100% - 6px); display: flex; flex-direction: column; align-items: center; gap: 2px; transform: translateX(-50%); pointer-events: none; }
.lane__key, .lane__mode { max-width: 100%; overflow: hidden; border: 1px solid color-mix(in srgb, var(--lane-color) 58%, transparent); border-radius: 999px; background: rgba(3, 5, 10, .88); font-weight: 800; letter-spacing: .08em; line-height: 1; text-align: center; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.lane__key { min-width: 38px; padding: 3px 6px; color: #fff; font-size: clamp(.5rem, .8vw, .68rem); box-shadow: 0 0 8px rgba(0, 0, 0, .45); }
.lane__mode { padding: 2px 5px; color: var(--lane-color); font-size: clamp(.4rem, .62vw, .52rem); box-shadow: 0 0 10px color-mix(in srgb, var(--lane-color) 24%, transparent); }
.lane__burst { position: absolute; z-index: 12; left: 50%; bottom: calc(var(--instrument-shelf-height) - 18px); width: 72px; height: 36px; transform: translate(-50%, 50%); border-radius: 50%; background: radial-gradient(circle, var(--lane-color), transparent 70%); animation: burstFade .42s ease-out forwards; pointer-events: none; }
.lane__burst i { position: absolute; left: 50%; top: 50%; width: 4px; height: 11px; border-radius: 999px; background: var(--lane-color); box-shadow: 0 0 8px var(--lane-color); transform: translate(-50%, -50%) rotate(var(--spark-angle)) translateY(-8px); animation: sparkFly .42s ease-out forwards; }
.note { position: absolute; z-index: 3; top: 0; left: 8%; width: 84%; height: 18px; will-change: transform; }
.note__face { position: absolute; inset: 0; border: 1px solid color-mix(in srgb, white 34%, var(--lane-color)); border-radius: 5px; background: linear-gradient(180deg, color-mix(in srgb, white 58%, var(--lane-color)) 0 18%, color-mix(in srgb, white 18%, var(--lane-color)) 19% 48%, var(--lane-color) 49% 74%, color-mix(in srgb, black 35%, var(--lane-color)) 75% 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .62), inset 0 -3px 0 rgba(0, 0, 0, .34), 0 4px 0 color-mix(in srgb, black 48%, var(--lane-color)), 0 7px 15px color-mix(in srgb, var(--lane-color) 72%, transparent); }
.note__impact { position: absolute; z-index: 4; inset: -11px -7px; border: 3px solid color-mix(in srgb, white 68%, var(--lane-color)); border-radius: 50%; opacity: 0; box-shadow: 0 0 20px var(--lane-color), inset 0 0 12px color-mix(in srgb, white 60%, var(--lane-color)); pointer-events: none; }
.note.is-hit .note__face { animation: noteHitFace .3s cubic-bezier(.18, .75, .25, 1) forwards; }
.note.is-hit .note__impact { animation: noteImpact .3s ease-out forwards; }
@keyframes highwayLaneFlash { 0% { background: linear-gradient(90deg, color-mix(in srgb, var(--lane-color) 5%, transparent), color-mix(in srgb, var(--lane-color) 30%, transparent) 50%, color-mix(in srgb, var(--lane-color) 5%, transparent)); box-shadow: inset 0 0 32px color-mix(in srgb, var(--lane-color) 24%, transparent); } 100% { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--lane-color) 2.5%, transparent) 50%, transparent); box-shadow: none; } }
@keyframes instrumentShelfFlash { 0% { background: linear-gradient(transparent calc(100% - var(--instrument-shelf-height)), color-mix(in srgb, var(--lane-color) 24%, transparent)); } 100% { background: linear-gradient(transparent calc(100% - var(--instrument-shelf-height)), transparent); } }
@keyframes hitLinePulse { 0% { transform: scaleY(2.4); opacity: 1; } 100% { transform: scaleY(1); opacity: .9; } }
@keyframes noteHitFace { 0% { opacity: 1; filter: brightness(1); transform: scale(1); } 28% { opacity: 1; filter: brightness(2.4); transform: scale(1.16, .72); } 100% { opacity: 0; filter: brightness(3); transform: scale(1.46, .12); } }
@keyframes noteImpact { 0% { opacity: 0; transform: scale(.18); } 18% { opacity: 1; transform: scale(.38); } 100% { opacity: 0; transform: scale(1.15); } }
@keyframes instrumentBounce { 0% { transform: scale(var(--instrument-scale)) translateY(0); } 35% { transform: scale(var(--instrument-scale)) translateY(9px) scaleX(1.08) scaleY(.88); } 70% { transform: scale(var(--instrument-scale)) translateY(-7px) scaleX(.96) scaleY(1.08); } 100% { transform: scale(var(--instrument-scale)) translateY(0); } }
@keyframes burstFade { 0% { transform: translate(-50%, 50%) scale(.5); opacity: 1; } 100% { transform: translate(-50%, 50%) scale(1.45); opacity: 0; } }
@keyframes sparkFly { from { opacity: 1; transform: translate(-50%, -50%) rotate(var(--spark-angle)) translateY(-8px) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) rotate(var(--spark-angle)) translateY(calc(var(--spark-distance) * -1)) scale(.2); } }
.judgement, .countdown { z-index: 4; position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); pointer-events: none; font-family: Georgia, serif; font-size: clamp(2.5rem, 8vw, 7rem); text-shadow: 0 4px 30px #000; }
.judgement { color: var(--acid); opacity: 0; }
.judgement.is-visible { animation: judgement .45s ease-out; }
@keyframes judgement { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -65%) scale(1.1); } }
.transport { display: flex; gap: 18px; align-items: center; margin-top: 14px; }
.timeline { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .75rem; }
.timeline progress { flex: 1; accent-color: var(--acid); }
.exit-song-button { min-height: 42px; padding: 9px 14px; border: 1px solid #ff6868; background: rgba(26, 8, 12, .84); color: #ff8b8b; cursor: pointer; font: inherit; font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.exit-song-button:hover, .exit-song-button:focus-visible { background: #ff4f58; color: #090a0d; }
.exit-song-dialog { width: min(420px, calc(100vw - 28px)); padding: 0; border: 1px solid #60697c; background: #0b0e14; color: var(--ink); box-shadow: 0 28px 100px rgba(0, 0, 0, .86); }
.exit-song-dialog::backdrop { background: rgba(1, 2, 7, .84); backdrop-filter: blur(8px); }
.exit-song-dialog > section { display: grid; gap: 12px; padding: 26px; }
.exit-song-dialog span { color: var(--acid); font-size: .62rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.exit-song-dialog h2 { margin: 0; font-size: 1.7rem; }
.exit-song-dialog p { margin: 0; color: var(--muted); line-height: 1.5; }
.exit-song-dialog section > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 6px; }
.exit-song-dialog button { min-height: 46px; cursor: pointer; font: inherit; font-weight: 900; }
.danger-action { border: 1px solid #ff5c64; background: #2a0d12; color: #ff8b91; }
.danger-action:hover, .danger-action:focus-visible { background: #ff4f58; color: #090a0d; }
.song-preparation {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 3, 8, .86);
  backdrop-filter: blur(10px);
}
.song-preparation[hidden] { display: none; }
.song-preparation > section {
  width: min(520px, 100%);
  display: grid;
  gap: 12px;
  padding: clamp(24px, 5vw, 40px);
  border: 2px solid var(--cyan);
  background: #070c14;
  box-shadow: 0 0 0 2px #142033, 0 24px 90px rgba(0, 0, 0, .9), 0 0 34px rgba(54, 217, 255, .22);
  text-align: center;
}
.song-preparation__brand { position: relative; height: 104px; display: grid; place-items: center; isolation: isolate; }
.song-preparation__brand img { position: relative; z-index: 2; width: 72px; height: 72px; filter: drop-shadow(0 0 15px rgba(54, 217, 255, .46)); }
.song-preparation__spectrum { position: absolute; z-index: 1; inset: 6px 50% 6px auto; width: 210px; display: flex; align-items: center; justify-content: center; gap: 7px; transform: translateX(50%); opacity: .62; }
.song-preparation__spectrum i { width: 7px; height: var(--spectrum-height, 64%); border-radius: 999px; background: linear-gradient(180deg, var(--magenta), var(--cyan) 58%, var(--acid)); box-shadow: 0 0 10px rgba(54, 217, 255, .46); transform-origin: center; animation: songSpectrum .62s ease-in-out infinite alternate; }
.song-preparation__spectrum i:nth-child(2) { --spectrum-height: 38%; animation-delay: -.4s; animation-duration: .78s; }
.song-preparation__spectrum i:nth-child(3) { --spectrum-height: 82%; animation-delay: -.18s; animation-duration: .56s; }
.song-preparation__spectrum i:nth-child(4) { --spectrum-height: 52%; animation-delay: -.5s; animation-duration: .7s; }
.song-preparation__spectrum i:nth-child(5) { --spectrum-height: 94%; animation-delay: -.28s; animation-duration: .64s; }
.song-preparation__spectrum i:nth-child(6) { --spectrum-height: 62%; animation-delay: -.12s; animation-duration: .82s; }
.song-preparation__spectrum i:nth-child(7) { --spectrum-height: 78%; animation-delay: -.46s; animation-duration: .58s; }
.song-preparation__spectrum i:nth-child(8) { --spectrum-height: 44%; animation-delay: -.2s; animation-duration: .74s; }
.song-preparation__spectrum i:nth-child(9) { --spectrum-height: 68%; animation-delay: -.36s; animation-duration: .66s; }
.song-preparation__eyebrow { color: var(--acid); font-size: .62rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.song-preparation h2 { margin: 0; font-size: clamp(1.35rem, 5vw, 2rem); overflow-wrap: anywhere; text-transform: uppercase; }
.song-preparation p { margin: 0; color: #e7edf7; font-size: .8rem; line-height: 1.5; }
.song-preparation small { color: var(--muted); font-size: .58rem; line-height: 1.45; }
.song-preparation__meter { height: 12px; overflow: hidden; border: 1px solid #5d718d; background: #02050a; }
.song-preparation__meter > i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--acid), var(--magenta)); box-shadow: 0 0 13px rgba(54, 217, 255, .55); transition: width .16s linear; }
.song-preparation__meter.is-indeterminate > i { animation: preparationSweep 1.15s ease-in-out infinite; }
.song-preparation__progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--muted); }
.song-preparation__progress-copy output { color: var(--acid); font-size: .86rem; font-weight: 900; letter-spacing: .06em; }
.song-preparation__progress-copy small { text-align: right; }
.song-preparation__cache { padding-top: 2px; border-top: 1px solid rgba(93, 113, 141, .42); }
@keyframes songSpectrum { from { transform: scaleY(.28); filter: brightness(.72); } to { transform: scaleY(1); filter: brightness(1.4); } }
@keyframes preparationSweep { from { transform: translateX(-110%); } to { transform: translateX(305%); } }
.result-screen { min-height: 70vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .86fr); grid-template-rows: auto auto auto auto auto; gap: 14px clamp(24px, 5vw, 72px); align-content: center; text-align: left; }
.result-screen > .eyebrow { grid-column: 1; grid-row: 1; align-self: end; margin: 0; }
.result-screen h1 { grid-column: 1; grid-row: 2; max-width: 900px; margin: 10px 0 18px; font-size: clamp(2.6rem, 7vw, 6.5rem); overflow-wrap: anywhere; }
.result-score { grid-column: 1; grid-row: 3; border-block: 1px solid var(--line); padding: 24px 0; }
.result-score span { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.result-score strong { display: block; font-size: clamp(3rem, 8vw, 5.5rem); color: var(--acid); line-height: 1; }
.result-score p { margin-bottom: 0; color: var(--muted); }
.result-claim { grid-column: 1; grid-row: 4; position: relative; isolation: isolate; display: grid; gap: 7px; overflow: hidden; padding: 12px; border: 1px solid var(--line); background: rgba(15, 18, 24, .94); }
.result-claim[hidden] { display: none; }
.result-claim > * { position: relative; z-index: 2; }
.result-claim.is-awaiting-claim::before { content: ""; position: absolute; z-index: 0; inset: -220%; background: conic-gradient(from 0deg, transparent 0 31%, var(--acid) 36% 42%, #fff 45%, transparent 50% 81%, #4fe6ff 86% 92%, transparent 97%); animation: claimBorderSpin 3.2s linear infinite; }
.result-claim.is-awaiting-claim::after { content: ""; position: absolute; z-index: 1; inset: 2px; background: #0f1218; }
.result-claim__celebration { display: flex; align-items: center; gap: 9px; padding-bottom: 7px; border-bottom: 1px solid rgba(165, 255, 50, .25); }
.result-claim__celebration > span { flex: 0 0 auto; color: #ffe34f; font-size: 1.55rem; line-height: 1; text-shadow: 0 0 13px rgba(255, 227, 79, .8); }
.result-claim.is-awaiting-claim .result-claim__celebration > span { animation: claimStarPulse 1.15s ease-in-out infinite alternate; }
.result-claim__celebration > div { display: grid; gap: 1px; }
.result-claim__celebration strong { color: var(--acid); font-size: .82rem; letter-spacing: .09em; text-transform: uppercase; }
.result-claim__celebration small { color: var(--ink); font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.result-claim label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.result-claim label span { color: var(--acid); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.result-claim label small,
.result-claim > p { color: var(--muted); font-size: .62rem; }
.result-claim__entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.result-claim input { min-width: 0; padding: 10px 11px; border: 1px solid #555c6b; border-right: 0; background: #090c11; color: var(--ink); font-family: inherit; font-size: .85rem; font-weight: 900; line-height: 1; letter-spacing: .08em; text-transform: uppercase; }
.result-claim button { padding: 10px 13px; border: 1px solid var(--acid); background: var(--acid); color: #10130d; cursor: pointer; font-weight: 900; text-transform: uppercase; }
.result-claim input:disabled,
.result-claim button:disabled { cursor: default; opacity: .68; }
.result-claim > p { margin: 0; }
.result-miss { grid-column: 1; grid-row: 4; padding: 15px 16px; border: 1px solid #5a6070; background: rgba(15, 18, 24, .88); }
.result-miss[hidden] { display: none; }
.result-miss strong { color: #ffbd58; font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; }
.result-miss p { margin: 5px 0 0; color: var(--muted); font-size: .72rem; }
@keyframes claimBorderSpin { to { transform: rotate(1turn); } }
@keyframes claimStarPulse { to { transform: scale(1.22) rotate(8deg); filter: brightness(1.35); } }
.result-highscores { grid-column: 2; grid-row: 1 / 6; min-height: 0; max-height: min(600px, 70vh); display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); background: rgba(15, 18, 24, .94); }
.result-highscores > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.result-highscores > header span, .result-highscores > header small { color: var(--muted); font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.result-highscores h2 { margin: 4px 0 0; font-family: inherit; font-size: 1rem; font-weight: 900; line-height: 1.1; }
.highscore-list { min-height: 0; overflow-y: auto; margin: 0; padding: 6px; list-style: none; scrollbar-color: var(--acid) #11151b; }
.highscore-row { min-height: 38px; display: grid; grid-template-columns: 34px minmax(70px, 1fr) minmax(82px, 1fr) minmax(92px, auto) 42px; gap: 8px; align-items: center; padding: 6px 8px; border-bottom: 1px solid #292e38; font-size: .72rem; font-variant-numeric: tabular-nums; }
.highscore-row:first-child { background: color-mix(in srgb, var(--acid) 8%, transparent); }
.highscore-rank { color: var(--acid); font-weight: 900; }
.highscore-player { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.highscore-score { color: var(--ink); font-size: .86rem; letter-spacing: .04em; }
.highscore-difficulty { overflow: hidden; color: #d2d5dc; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.highscore-accuracy { color: var(--muted); text-align: right; }
.highscore-empty { padding: 22px 16px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.result-actions { grid-column: 1; grid-row: 5; display: flex; justify-content: flex-start; gap: 14px; margin-top: 4px; }
.result-actions .text-button { border: 1px solid #555c6b; background: #171a22; color: var(--ink); padding: 14px 18px; cursor: pointer; }
.result-actions button:disabled { cursor: not-allowed; filter: grayscale(.75); opacity: .35; }
.highscore-dialog { width: min(760px, calc(100vw - 28px)); max-height: min(720px, calc(100svh - 28px)); padding: 0; border: 1px solid var(--line-strong); background: #0b0f15; color: var(--paper); box-shadow: 0 26px 80px rgba(0, 0, 0, .72); }
.highscore-dialog::backdrop { background: rgba(0, 0, 0, .8); backdrop-filter: blur(6px); }
.highscore-dialog > section { min-height: min(580px, calc(100svh - 30px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.highscore-dialog > section > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.highscore-dialog > section > header span { color: var(--acid); font-size: .56rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.highscore-dialog > section > header h2 { margin: 4px 0 0; font-size: 1.25rem; }
.highscore-dialog > section > header p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; }
.highscore-list--dialog { padding: 10px; }
.highscore-dialog > section > footer { display: block; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .54rem; letter-spacing: .1em; text-align: right; text-transform: uppercase; }
.highscore-dialog > section > footer small { color: var(--acid); font: inherit; }
footer { border-top: 1px solid var(--line); padding: 24px clamp(20px, 4vw, 70px); color: #74767d; display: flex; justify-content: space-between; font-size: .7rem; text-transform: uppercase; letter-spacing: .11em; }

@media (max-width: 900px) {
  body[data-active-screen="result"] .game-header,
  body[data-active-screen="result"] footer,
  body[data-active-screen="songs"] .game-header,
  body[data-active-screen="songs"] footer { display: none; }
  body[data-active-screen="result"] main { min-height: 100svh; }
  body[data-active-screen="songs"] {
    grid-template-rows: minmax(0, 1fr);
  }
  body[data-active-screen="songs"] main {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .screen--active { grid-template-columns: 1fr; }
  .screen--active { gap: 25px; }
  h1 { font-size: clamp(3.5rem, 16vw, 6.5rem); }
  .screen--songs { width: 100%; height: 100%; padding: 8px; }
  .music-selector-shell { height: 100%; min-height: 0; grid-template-rows: 48px 38px minmax(0, 1fr) 28px; gap: 6px; }
  .selector-header { padding: 5px 8px; }
  .selector-header h1 { font-size: 1.25rem; }
  .artist-switcher { min-height: 38px; }
  .selector-controls { gap: 9px; padding-block: 4px; font-size: .54rem; }
  .result-screen { width: 100%; height: 100svh; min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; gap: 7px; align-content: stretch; overflow: hidden; padding: 14px; }
  .result-screen > .eyebrow, .result-screen h1, .result-score, .result-claim, .result-miss, .result-highscores, .result-actions { grid-column: 1; grid-row: auto; }
  .result-screen h1 { max-width: 100%; margin: 12px auto 20px; font-size: clamp(1.8rem, 9vw, 3.6rem); line-height: 1; }
  .result-score { padding: 18px 12px; }
  .result-score strong { font-size: clamp(3rem, 14vw, 5rem); }
  .result-highscores { max-height: none; }
  .result-actions { margin-top: 16px; }
  .play-header { grid-template-columns: minmax(0, 1fr) auto; }
  .score-strip { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 600px) {
  body[data-active-screen="game"] .game-header,
  body[data-active-screen="game"] footer { display: none; }
  body[data-active-screen="game"] main { min-height: 100svh; }
  .game-header { min-height: 74px; padding: 13px 16px; }
  .game-header > div span { display: none; }
  .screen { padding-inline: 16px; }
  .screen--game { min-height: 100svh; padding: 10px 12px; }
  .lane-options { grid-template-columns: 1fr 1fr; }
  .settings-heading { align-items: center; }
  fieldset > label { margin-right: 12px; }
  .catalog-toolbar { align-items: flex-end; }
  .screen--songs { padding: 7px; }
  .music-selector-shell { grid-template-rows: 46px 36px minmax(0, 1fr) 28px; gap: 5px; }
  .selector-header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .selector-header h1 { font-size: 1.05rem; }
  .selector-back { min-width: 34px; height: 32px; padding-inline: 8px; }
  .selector-back__label > span, .selector-options__label { display: none; }
  .selector-header__actions { gap: 6px; }
  .selector-options { width: 34px; height: 32px; padding: 0; }
  .selector-ready span { display: none; }
  .artist-switcher { grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 5px; min-height: 36px; }
  .artist-switcher button { height: 28px; }
  .music-selector { grid-template-columns: 1fr; grid-template-rows: minmax(380px, 58%) minmax(0, 1fr); }
  .selection-preview { border-right: 0; border-bottom: 1px solid var(--line); }
  .selection-details { gap: 5px 8px; padding: 10px; }
  .selection-copy { right: auto; bottom: auto; left: auto; padding-right: 50px; }
  .selection-copy p { margin-bottom: 3px; font-size: .58rem; }
  .selection-copy h2 { font-size: 1.2rem; }
  .selection-copy > span { margin-top: 4px; font-size: .78rem; }
  .selection-stats div { width: 44px; min-width: 44px; padding: 4px 5px; }
  .selection-status { top: 8px; right: 8px; }
  .selection-difficulty > span { display: none; }
  .selection-highscores { top: auto; right: auto; width: min(160px, 100%); }
  .selection-highscores .highscore-row { min-height: 21px; }
  .selection-confirm { width: 144px; min-width: 144px; max-width: 144px; padding: 7px 9px; }
  .selection-list-panel { grid-template-rows: 32px minmax(0, 1fr); }
  .selection-list-panel > header { padding-inline: 8px; font-size: .56rem; }
  .song-list { padding: 4px; }
  .song-list-item { min-height: 51px; grid-template-columns: 29px minmax(0, 1fr) auto; gap: 7px; margin-bottom: 3px; padding: 5px 7px; }
  .song-list-item__status { font-size: .46rem; }
  .selector-controls { justify-content: space-between; gap: 4px; padding-inline: 5px; font-size: .48rem; }
  .selector-controls kbd { min-width: 16px; padding-inline: 2px; }
  .result-screen { padding: 12px; }
  .result-screen h1 { margin-block: 10px 16px; font-size: clamp(1.7rem, 10vw, 3rem); }
  .result-score { padding: 14px 8px; }
  .result-score p { margin-top: 7px; font-size: .76rem; }
  .result-claim { gap: 5px; padding: 8px; }
  .result-claim label small { display: none; }
  .result-claim input,
  .result-claim button { padding: 8px; font-size: .7rem; }
  .result-claim > p { font-size: .55rem; }
  .result-actions { gap: 8px; margin-top: 12px; }
  .result-actions .primary-action,
  .result-actions .text-button { flex: 1; min-width: 0; padding: 12px 8px; font-size: .72rem; }
  .result-highscores > header { padding: 9px 10px; }
  .result-highscores h2 { font-size: .82rem; }
  .highscore-row { min-height: 31px; grid-template-columns: 27px minmax(52px, .85fr) minmax(66px, 1fr) minmax(76px, auto) 36px; gap: 5px; padding: 4px 6px; font-size: .63rem; }
  .highscore-score { font-size: .72rem; }
  .highscore-dialog > section { min-height: calc(100svh - 30px); }
  .highscore-dialog > section > header { padding: 12px; }
  .highscore-dialog > section > footer { padding: 8px 12px; }
  .play-header { gap: 6px 10px; margin-bottom: 7px; }
  .play-identity { gap: 8px; }
  .play-identity > img { width: 78px; }
  .play-header h1 { font-size: 1.2rem; margin-block: 3px; }
  .play-identity > div > span { font-size: .72rem; }
  .score-strip { width: 100%; }
  .score-strip span { flex: 1; min-width: 0; padding: 7px 9px; }
  .score-strip strong { margin-top: 2px; }
  .candidate-notice { margin-bottom: 7px; padding: 7px 10px; font-size: .68rem; line-height: 1.3; }
  .candidate-notice span { display: none; }
  .game-stage { min-height: 320px; height: calc(100svh - 241px); }
  .lane-rail { --instrument-shelf-height: 96px; --lane-gutter: 3px; }
  .lane-highway { top: -24%; transform: perspective(720px) rotateX(25deg); }
  .lane__instrument { left: 3px; right: 3px; width: calc(100% - 6px); }
  .lane__name { bottom: calc(var(--instrument-shelf-height) - 17px); padding-inline: 3px; letter-spacing: .04em; }
  .lane__key { min-width: 34px; padding-inline: 4px; }
  .transport { gap: 8px; margin-top: 7px; }
  footer { flex-direction: column; gap: 8px; }
}

@media (max-width: 600px) and (max-height: 850px) and (orientation: portrait) {
  body[data-active-screen="settings"] .game-header,
  body[data-active-screen="settings"] > footer { display: none; }
  body[data-active-screen="settings"] main { min-height: 100svh; }
  .screen--active { width: 100%; height: 100svh; grid-template-columns: 1fr; grid-template-rows: 148px minmax(0, 1fr); gap: 7px; align-items: stretch; overflow: hidden; padding: 7px; }
  .screen--active .hero-copy { min-height: 0; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 13px 15px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(23, 33, 45, .96), rgba(8, 10, 14, .98) 72%); }
  .screen--active .hero-copy .eyebrow { margin: 0; font-size: .52rem; }
  .screen--active .hero-copy h1 { margin: 0; font-size: 2.35rem; line-height: .84; }
  .screen--active .hero-copy > p:last-child { display: none; }
  .screen--active .settings-panel { min-height: 0; display: grid; grid-template-rows: 50px 76px minmax(0, 1fr) 58px 50px; overflow: hidden; }
  .screen--active .settings-heading { align-items: center; padding: 7px 11px; }
  .screen--active .settings-heading h2 { margin-top: 2px; font-size: .86rem; }
  .screen--active .settings-heading span { font-size: .5rem; }
  .screen--active .settings-heading b { display: none; }
  .screen--active fieldset { min-width: 0; padding: 8px 11px; }
  .screen--active legend { font-size: .57rem; }
  .screen--active fieldset:first-of-type { display: flex; flex-wrap: wrap; align-content: center; gap: 7px 15px; }
  .screen--active fieldset:first-of-type legend { width: 100%; }
  .screen--active fieldset:first-of-type > label { margin: 0; font-size: .7rem; }
  .screen--active fieldset:nth-of-type(2) { position: relative; }
  .screen--active fieldset:nth-of-type(2) > p { display: none; }
  .screen--active .lane-options { position: absolute; top: 50%; right: 11px; left: 11px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; transform: translateY(-50%); }
  .screen--active .lane-options label { min-width: 0; align-items: center; gap: 5px; padding: 8px 6px; font-size: .62rem; }
  .screen--active .volume-control { gap: 5px; padding: 7px 11px; }
  .screen--active .volume-control span { font-size: .67rem; }
  .screen--active .settings-panel > .primary-action { align-items: center; padding: 9px 12px; font-size: .73rem; }
}

@media (orientation: landscape) and (min-width: 700px) {
  .lane-highway { top: -58%; transform: perspective(940px) rotateX(36deg); }
}

@media (max-height: 500px) and (orientation: landscape) {
  body[data-active-screen="settings"] .game-header,
  body[data-active-screen="settings"] > footer,
  body[data-active-screen="result"] .game-header,
  body[data-active-screen="result"] > footer,
  body[data-active-screen="songs"] .game-header,
  body[data-active-screen="songs"] > footer,
  body[data-active-screen="game"] .game-header,
  body[data-active-screen="game"] > footer { display: none; }
  body[data-active-screen="result"] main,
  body[data-active-screen="game"] main,
  body[data-active-screen="settings"] main { min-height: 100svh; }
  .screen--active { width: 100%; height: 100svh; grid-template-columns: minmax(210px, .68fr) minmax(470px, 1.32fr); gap: 8px; align-items: stretch; overflow: hidden; padding: 7px 10px; }
  .screen--active .hero-copy { min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 16px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(23, 33, 45, .96), rgba(8, 10, 14, .98) 70%); }
  .screen--active .hero-copy .eyebrow { margin-bottom: auto; font-size: .54rem; }
  .screen--active .hero-copy h1 { margin: 0; font-size: clamp(2.15rem, 5.6vw, 3rem); line-height: .88; overflow-wrap: anywhere; }
  .screen--active .hero-copy > p:last-child { display: none; }
  .screen--active .settings-panel { min-width: 0; display: grid; grid-template-columns: minmax(160px, .72fr) minmax(280px, 1.28fr); grid-template-rows: 48px minmax(0, 1fr) 48px 46px; overflow: hidden; }
  .screen--active .settings-heading { grid-column: 1 / -1; grid-row: 1; align-items: center; padding: 6px 10px; gap: 10px; }
  .screen--active .settings-heading h2 { margin-top: 2px; font-size: .82rem; }
  .screen--active .settings-heading span { font-size: .5rem; }
  .screen--active .settings-heading b { display: none; }
  .screen--active fieldset { min-width: 0; padding: 9px 11px; }
  .screen--active fieldset:first-of-type { grid-column: 1; grid-row: 2; border-right: 1px solid var(--line); }
  .screen--active fieldset:first-of-type > label { display: flex; margin: 9px 0 0; font-size: .69rem; }
  .screen--active fieldset:nth-of-type(2) { position: relative; grid-column: 2; grid-row: 2 / 4; }
  .screen--active fieldset:nth-of-type(2) > p { display: none; }
  .screen--active legend { font-size: .58rem; }
  .screen--active .lane-options { position: absolute; top: 50%; right: 11px; left: 11px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; transform: translateY(-50%); }
  .screen--active .lane-options label { min-width: 0; align-items: center; gap: 5px; padding: 7px; font-size: .64rem; }
  .screen--active .volume-control { grid-column: 1; grid-row: 3; gap: 4px; padding: 6px 10px; border-right: 1px solid var(--line); }
  .screen--active .volume-control span { font-size: .64rem; }
  .screen--active .settings-panel > .primary-action { grid-column: 1 / -1; grid-row: 4; align-items: center; padding: 8px 12px; font-size: .72rem; }
  body[data-active-screen="songs"] main { height: 100dvh; min-height: 0; overflow: hidden; }
  .screen--songs { width: 100%; height: 100%; padding: 5px 8px; }
  .music-selector-shell { height: 100%; min-height: 0; grid-template-rows: 36px 30px minmax(0, 1fr) 22px; gap: 4px; }
  .selector-header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; padding: 2px 6px; }
  .selector-header h1 { font-size: 1rem; }
  .selector-back { min-width: 30px; height: 28px; gap: 5px; padding-inline: 6px; font-size: .53rem; }
  .selector-options { width: 30px; height: 28px; }
  .selector-header__actions { gap: 5px; }
  .selector-ready { font-size: .56rem; }
  .selector-ready strong { font-size: .82rem; }
  .artist-switcher { grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 4px; min-height: 30px; padding: 2px; }
  .artist-switcher button { height: 24px; }
  .artist-switcher strong { font-size: .68rem; }
  .music-selector { grid-template-columns: minmax(250px, .84fr) minmax(330px, 1.16fr); grid-template-rows: 1fr; }
  .selection-preview { border-right: 1px solid var(--line); border-bottom: 0; }
  .selection-details { gap: 4px 7px; padding: 8px 9px; }
  .selection-copy { right: auto; bottom: auto; left: auto; padding-right: 44px; }
  .selection-copy p { margin-bottom: 2px; font-size: .52rem; }
  .selection-copy h2 { font-size: 1.05rem; }
  .selection-copy > span { margin-top: 3px; font-size: .7rem; }
  .selection-stats div { width: 38px; min-width: 38px; padding: 3px 4px; }
  .selection-status { top: 7px; right: 7px; padding: 3px 5px; font-size: .45rem; }
  .selection-difficulty { gap: 4px; padding: 3px 4px; }
  .selection-difficulty > span { display: none; }
  .selection-difficulty button { min-width: 43px; padding: 3px 4px; font-size: .46rem; }
  .selection-highscores { top: auto; right: auto; width: min(150px, 100%); }
  .selection-highscores > header { padding: 4px 5px; }
  .selection-highscores .highscore-row { min-height: 20px; padding-block: 2px; }
  .selection-confirm { width: 144px; min-width: 144px; max-width: 144px; padding: 6px 8px; font-size: .66rem; }
  .selection-list-panel { grid-template-rows: 30px minmax(0, 1fr); }
  .selection-list-panel > header { padding-inline: 7px; font-size: .53rem; }
  .song-list { padding: 4px; }
  .song-list-item { min-height: 46px; grid-template-columns: 27px minmax(0, 1fr) auto; gap: 6px; margin-bottom: 3px; padding: 4px 6px; }
  .song-list-item__title strong { font-size: .74rem; }
  .song-list-item__title small { margin-top: 1px; font-size: .55rem; }
  .song-list-item__status { font-size: .44rem; }
  .selector-controls { justify-content: space-evenly; gap: 6px; padding: 2px 5px; font-size: .48rem; }
  .selector-controls kbd { min-width: 15px; padding: 1px 2px; }
  .result-screen { width: 100%; height: 100svh; min-height: 0; grid-template-columns: minmax(240px, .9fr) minmax(350px, 1.1fr); grid-template-rows: 20px minmax(0, 1fr) auto auto 46px; gap: 5px 18px; place-content: stretch; overflow: hidden; padding: 8px 14px; text-align: left; }
  .result-screen > .eyebrow { grid-column: 1; grid-row: 1; align-self: end; }
  .result-screen h1 { grid-column: 1; grid-row: 2; align-self: center; max-width: 100%; margin: 0; font-size: clamp(1.8rem, 5.4vw, 3rem); line-height: .95; }
  .result-score { grid-column: 1; grid-row: 3; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 5px 0; text-align: left; }
  .result-score > span { grid-column: 2; grid-row: 1; }
  .result-score strong { grid-column: 1; grid-row: 1 / 3; font-size: clamp(1.8rem, 5vw, 2.8rem); }
  .result-score p { grid-column: 2; grid-row: 2; margin: 0; font-size: .6rem; }
  .result-claim, .result-miss { grid-column: 1; grid-row: 4; }
  .result-claim { gap: 3px; padding: 5px; }
  .result-claim__celebration { gap: 5px; padding-bottom: 3px; }
  .result-claim__celebration > span { font-size: .9rem; }
  .result-claim__celebration strong { font-size: .58rem; }
  .result-claim__celebration small { display: none; }
  .result-miss { align-self: center; padding: 9px 10px; }
  .result-claim label small { display: none; }
  .result-claim input,
  .result-claim button { padding: 6px 7px; font-size: .62rem; }
  .result-claim > p { overflow: hidden; font-size: .5rem; text-overflow: ellipsis; white-space: nowrap; }
  .result-highscores { grid-column: 2; grid-row: 1 / 6; max-height: none; }
  .result-highscores > header { padding: 7px 9px; }
  .result-highscores h2 { font-size: .78rem; }
  .highscore-list { padding: 3px; }
  .highscore-row { min-height: 27px; grid-template-columns: 25px minmax(48px, .85fr) minmax(60px, 1fr) minmax(72px, auto) 34px; padding: 3px 5px; font-size: .58rem; }
  .highscore-score { font-size: .68rem; }
  .result-actions { grid-column: 1; grid-row: 5; align-items: stretch; gap: 8px; margin: 0; }
  .result-actions .primary-action,
  .result-actions .text-button { flex: 1; min-width: 0; padding: 8px; font-size: .7rem; }
  .screen--game { min-height: 100svh; padding: 6px 12px; }
  .play-header { grid-template-columns: minmax(240px, 1fr) auto auto; gap: 8px; margin-bottom: 5px; }
  .play-identity { gap: 8px; }
  .play-identity > img { width: 76px; }
  .play-identity > div > span { display: none; }
  .play-header h1 { overflow: hidden; margin: 0; font-size: 1.05rem; text-overflow: ellipsis; white-space: nowrap; }
  .round-button { width: 36px; height: 36px; font-size: 1.1rem; }
  .score-strip { grid-column: auto; grid-row: auto; width: auto; }
  .score-strip span { min-width: 58px; padding: 4px 7px; font-size: .5rem; }
  .score-strip strong { margin-top: 1px; font-size: .76rem; }
  .candidate-notice { margin-bottom: 5px; padding: 5px 8px; font-size: .62rem; line-height: 1.2; }
  .candidate-notice span { display: none; }
  .game-stage { height: calc(100svh - 124px); min-height: 0; }
  .lane-rail { --instrument-shelf-height: 72px; --lane-gutter: 3px; }
  .lane-highway { top: -70%; transform: perspective(760px) rotateX(38deg); }
  .lane__instrument { left: 4px; right: 4px; width: calc(100% - 8px); }
  .lane__name { bottom: calc(var(--instrument-shelf-height) - 14px); padding: 1px 3px; font-size: .45rem; }
  .lane__bindings { bottom: 3px; gap: 1px; }
  .lane__key { min-width: 30px; padding: 2px 4px; font-size: .48rem; }
  .lane__mode { padding: 1px 4px; font-size: .4rem; }
  .transport { gap: 8px; margin-top: 5px; }
  .timeline { gap: 5px; }
  .timeline span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lane.is-triggered,
  .highway-lane.is-triggered,
  .highway-lane.is-triggered::after,
  .lane__instrument.is-hit,
  .lane__burst,
  .lane__burst i,
  .note.is-hit .note__face,
  .note.is-hit .note__impact,
  .result-claim.is-awaiting-claim::before,
  .result-claim.is-awaiting-claim .result-claim__celebration > span,
  .lane-order-key.is-learning kbd { animation: none; }
  .lane__burst { display: none; }
  .note.is-hit .note__face { opacity: 0; }
  .note.is-hit .note__impact { display: none; }
}

/* Controller configuration and per-release speed controls */
.controller-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 14px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 16, .58);
}

.controller-summary > span,
.controller-summary > strong,
.controller-summary > small { min-width: 0; }
.controller-summary > span { color: var(--acid); font-size: .58rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.controller-summary > strong { font-size: .78rem; }
.controller-summary > small { color: var(--muted); font-size: .62rem; }
.controller-summary > button { grid-column: 2; grid-row: 1 / 4; }

.secondary-action {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  background: var(--panel-soft);
  color: var(--paper);
  font: 800 .62rem/1 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.secondary-action:hover,
.secondary-action:focus-visible { border-color: var(--acid); color: var(--acid); }

.selection-speed {
  display: inline-grid;
  grid-template-columns: auto 32px 48px 32px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(7, 10, 14, .82);
  backdrop-filter: blur(8px);
  text-shadow: none;
}

.selection-speed > span {
  padding: 7px 9px;
  border-right: 1px solid rgba(255, 255, 255, .14);
  color: var(--ink);
  font: 800 .65rem/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.selection-speed button {
  width: 32px;
  min-height: 28px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .1);
  background: transparent;
  color: var(--acid);
  font-size: .7rem;
  font-weight: 900;
  cursor: pointer;
}

.selection-speed output {
  min-width: 48px;
  color: var(--ink);
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
}

.selection-speed button:hover,
.selection-speed button:focus-visible { background: var(--acid); color: #08100d; }

.selection-details > .selection-speed { grid-area: speed; justify-self: end; margin-top: 0; }

.game-header-actions { display: flex; gap: 8px; align-items: center; }
.round-button--controller { width: auto; min-width: 42px; padding-inline: 12px; font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; }

.controller-dialog {
  width: min(940px, calc(100vw - 28px));
  max-height: min(780px, calc(100svh - 28px));
  padding: 0;
  border: 1px solid var(--line-strong);
  background: #0b0f15;
  color: var(--paper);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .7);
}

.controller-dialog::backdrop { background: rgba(0, 0, 0, .78); backdrop-filter: blur(5px); }
.controller-panel { display: grid; gap: 18px; overflow: auto; max-height: inherit; padding: 22px; }
.controller-panel__header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; }
.controller-panel__header .eyebrow { margin: 0; }
.controller-panel__header h2 { margin: 4px 0 0; font-size: clamp(1.35rem, 4vw, 2rem); }
.controller-close { grid-column: 2; grid-row: 1 / 3; width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--paper); font-size: 1.25rem; cursor: pointer; }
.controller-status { margin: 0; padding: 11px 12px; border: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.controller-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lane-order-section { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.controller-section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.controller-section-heading span { color: var(--acid); font-size: .56rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.controller-section-heading h3 { margin: 2px 0 0; font-size: .95rem; }
.controller-section-heading button { min-height: 34px; padding: 7px 10px; }
.lane-order-section > p { margin: 0; color: var(--muted); font-size: .64rem; line-height: 1.45; }
.lane-order-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid #4b5364;
  background:
    linear-gradient(180deg, rgba(3, 5, 10, .3), rgba(3, 5, 10, .94)),
    repeating-linear-gradient(90deg, transparent 0 calc(16.666% - 1px), rgba(255, 255, 255, .07) calc(16.666% - 1px) 16.666%),
    #10141d;
  box-shadow: inset 0 12px 40px rgba(0, 0, 0, .55);
}
.lane-order-grid::before { content: ""; position: absolute; z-index: 0; right: 0; left: 0; top: 41%; height: 2px; background: linear-gradient(90deg, #ffeb3b, #ff8a00, #fff, #39ff14, #ff2a2a, #28dcff); box-shadow: 0 0 10px rgba(255, 255, 255, .35); pointer-events: none; }
.lane-order-slot { position: relative; z-index: 1; min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 4px; padding: 3px; border-top: 3px solid var(--lane-color); background: linear-gradient(180deg, color-mix(in srgb, var(--lane-color) 6%, transparent), rgba(3, 5, 10, .64)); transition: background .14s ease, box-shadow .14s ease, transform .14s ease; }
.lane-order-drum { position: relative; min-width: 0; min-height: 116px; display: grid; grid-template-rows: minmax(70px, 1fr) auto; justify-items: center; align-items: center; gap: 3px; padding: 13px 4px 6px; border: 1px solid transparent; background: transparent; color: var(--paper); cursor: grab; touch-action: pan-y; user-select: none; }
.lane-order-drum:active { cursor: grabbing; }
.lane-order-drum:hover,
.lane-order-drum:focus-visible { border-color: var(--lane-color); background: color-mix(in srgb, var(--lane-color) 9%, rgba(4, 6, 10, .9)); outline: 0; }
.lane-order-drum__handle { position: absolute; top: 4px; right: 5px; color: color-mix(in srgb, var(--lane-color) 70%, #fff); font-size: .76rem; line-height: 1; opacity: .74; }
.lane-order-drum img { width: 100%; height: 82px; object-fit: contain; transform: scale(var(--instrument-scale)); filter: drop-shadow(0 0 7px color-mix(in srgb, var(--lane-color) 64%, transparent)); pointer-events: none; }
.lane-order-drum strong { max-width: 100%; overflow: hidden; font-size: .58rem; line-height: 1.1; text-align: center; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.lane-order-key { min-width: 0; display: grid; grid-template-columns: 1fr; justify-items: center; gap: 2px; padding: 5px 3px; border: 1px solid color-mix(in srgb, var(--lane-color) 50%, #303744); background: rgba(3, 5, 10, .88); color: #fff; cursor: pointer; }
.lane-order-key span { color: var(--muted); font-size: .43rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.lane-order-key kbd { min-width: 34px; margin: 0; border-color: color-mix(in srgb, var(--lane-color) 70%, #303744); color: #fff; background: #05070b; box-shadow: 0 0 7px color-mix(in srgb, var(--lane-color) 35%, transparent); font-size: .54rem; }
.lane-order-key:hover, .lane-order-key:focus-visible, .lane-order-key.is-learning { border-color: var(--acid); background: color-mix(in srgb, var(--acid) 12%, #05070b); outline: 0; }
.lane-order-key.is-learning kbd { color: var(--acid); animation: keyLearnPulse .75s ease-in-out infinite alternate; }
@keyframes keyLearnPulse { to { box-shadow: 0 0 14px var(--acid); } }
.lane-order-slot__moves { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.lane-order-slot__moves button { min-width: 0; min-height: 27px; padding: 3px; border: 1px solid color-mix(in srgb, var(--lane-color) 44%, #313847); background: rgba(3, 5, 10, .84); color: #fff; cursor: pointer; font-size: .8rem; line-height: 1; }
.lane-order-slot__moves button:hover,
.lane-order-slot__moves button:focus-visible { border-color: var(--lane-color); background: var(--lane-color); color: #05070b; }
.lane-order-slot__moves button:disabled { cursor: default; opacity: .2; }
.lane-order-slot.is-selected { background: color-mix(in srgb, var(--lane-color) 17%, rgba(3, 5, 10, .82)); box-shadow: inset 0 0 0 2px var(--lane-color), 0 0 16px color-mix(in srgb, var(--lane-color) 32%, transparent); }
.lane-order-slot.is-drop-target { z-index: 2; transform: translateY(-3px); background: color-mix(in srgb, var(--lane-color) 24%, rgba(3, 5, 10, .78)); box-shadow: inset 0 0 0 2px #fff, 0 0 22px var(--lane-color); }
.lane-order-drum.is-dragging { opacity: .3; }
.lane-order-drag-ghost { position: fixed; z-index: 9999; width: 100px; min-height: 112px; display: grid; grid-template-rows: 65px auto auto; justify-items: center; gap: 3px; transform: translate(-50%, -50%) rotate(-2deg); overflow: hidden; padding: 8px 5px; border: 2px solid var(--acid); background: rgba(5, 8, 13, .94); color: #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .7), 0 0 18px rgba(165, 255, 50, .4); pointer-events: none; }
.lane-order-drag-ghost img { width: 100%; height: 65px; object-fit: contain; }
.lane-order-drag-ghost strong { font-size: .56rem; text-transform: uppercase; }
.lane-order-drag-ghost kbd { font-size: .5rem; }
.lane-order-drag-ghost .lane-order-drum__handle { display: none; }
.midi-input-picker { display: grid; gap: 7px; color: var(--muted); font-size: .65rem; }
.midi-input-picker select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line-strong); background: #080b10; color: var(--paper); }
.midi-mapping { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.midi-mapping-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.midi-mapping-row > div { min-width: 0; display: grid; gap: 2px; }
.midi-mapping-row strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.midi-mapping-row small { overflow: hidden; color: var(--cyan); font: .62rem/1.35 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.midi-mapping-row button { min-width: 72px; justify-self: end; }
.midi-mapping-row.is-learning { border-color: var(--acid); box-shadow: inset 3px 0 0 var(--acid); }

@media (max-width: 700px) {
  .controller-summary { padding: 9px 10px; gap: 3px 8px; }
  .controller-summary > small { font-size: .56rem; }
  .controller-summary > button { padding-inline: 9px; }
  .round-button--controller { min-width: 36px; padding-inline: 8px; }
  .controller-panel { gap: 12px; padding: 14px; }
  .controller-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .lane-order-section { padding: 10px 8px; }
  .lane-order-grid { gap: 2px; padding: 5px; }
  .lane-order-drum { min-height: 88px; grid-template-rows: minmax(48px, 1fr) auto; padding: 11px 2px 4px; }
  .lane-order-drum img { height: 54px; }
  .lane-order-drum strong { font-size: .45rem; white-space: normal; }
  .lane-order-key { padding: 4px 2px; }
  .lane-order-key kbd { min-width: 24px; padding: 2px 3px; font-size: .44rem; }
  .lane-order-slot__moves button { min-height: 25px; }
  .midi-mapping { grid-template-columns: 1fr; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .screen--active .settings-panel { grid-template-rows: 48px minmax(0, 1fr) 48px 46px; }
  .screen--active .controller-summary { grid-column: 1; grid-row: 3; border-right: 1px solid var(--line); }
  .screen--active .volume-control { display: none; }
  .selection-speed { margin-top: 5px; }
  .game-header-actions { gap: 4px; }
  .round-button--controller { height: 36px; padding-inline: 7px; }
  .controller-dialog { width: min(760px, calc(100vw - 16px)); max-height: calc(100svh - 12px); }
  .controller-panel { grid-template-columns: minmax(220px, .8fr) minmax(340px, 1.2fr); gap: 10px 16px; padding: 12px 16px; }
  .controller-panel__header,
  .controller-status,
  .controller-actions,
  .midi-input-picker { grid-column: 1; }
  .lane-order-section { grid-column: 2; grid-row: 1 / span 2; }
  .lane-order-section { gap: 5px; padding: 7px; }
  .lane-order-section > p { font-size: .52rem; line-height: 1.25; }
  .lane-order-grid { gap: 2px; padding: 4px; }
  .lane-order-drum { min-height: 60px; grid-template-rows: 38px auto; padding: 8px 1px 3px; }
  .lane-order-drum img { height: 40px; }
  .lane-order-drum strong { font-size: .4rem; white-space: normal; }
  .lane-order-key { padding: 2px 1px; }
  .lane-order-key span { display: none; }
  .lane-order-key kbd { min-width: 20px; padding: 1px 2px; font-size: .39rem; }
  .lane-order-slot__moves button { min-height: 20px; padding: 1px; font-size: .64rem; }
  .midi-mapping { grid-column: 2; grid-row: 3 / span 2; }
  .midi-mapping-row { padding-block: 6px; }
}

/* Morville Pulse title and shared game options */
body[data-active-screen="settings"] {
  height: 100svh;
  overflow: hidden;
  background: #040408;
}

body[data-active-screen="settings"] .game-header,
body[data-active-screen="settings"] > footer { display: none; }
body[data-active-screen="settings"] main { min-height: 100svh; }

.title-screen {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100svh;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(20px, 4vw, 54px);
  background: #05050a;
}

.title-screen::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(2, 3, 8, .7) 0 23%, rgba(2, 3, 8, .34) 39%, transparent 62%),
    linear-gradient(180deg, rgba(2, 2, 6, .62), transparent 18%, transparent 78%, rgba(2, 2, 6, .78));
}

.title-screen::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 2, 7, .5), transparent 15%, transparent 85%, rgba(2, 2, 7, .5)),
    radial-gradient(ellipse at 50% 50%, transparent 0 50%, rgba(3, 3, 8, .55) 100%);
  box-shadow: inset 0 0 7vw rgba(0, 0, 0, .74);
}

.title-key-art {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #05050a;
}

.title-key-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.06) contrast(1.05) brightness(.86);
  transform: scale(1.015);
}

.title-utility {
  position: absolute;
  z-index: 5;
  top: clamp(12px, 2.2vh, 24px);
  left: 50%;
  width: min(1180px, calc(100vw - clamp(28px, 4.8vw, 68px)));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(154, 178, 204, .42);
  background: linear-gradient(90deg, rgba(5, 8, 14, .92), rgba(13, 18, 27, .82), rgba(5, 8, 14, .92));
  box-shadow: 0 10px 34px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .04);
  backdrop-filter: blur(12px);
}

.title-site-link,
.title-listen {
  background: transparent;
}

.title-site-link {
  padding: 11px 16px;
  color: var(--acid);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}
.title-site-link:hover,
.title-site-link:focus-visible { background: var(--acid); color: #08100d; outline: 0; }
.title-listen { display: flex; align-items: stretch; gap: 0; }
.title-listen > span { display: grid; place-items: center; padding: 0 13px; border-left: 1px solid rgba(154, 178, 204, .25); color: #8e9aaa; font-size: .54rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.title-listen a { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-left: 1px solid rgba(154, 178, 204, .25); color: #e9edf2; font-size: .58rem; font-weight: 900; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.title-social-icon { width: 16px; height: 16px; flex: 0 0 auto; fill: currentColor; filter: drop-shadow(0 0 5px currentColor); }
.title-social-icon--youtube { color: #ff3358; }
.title-social-icon--facebook { color: #4f8cff; }
.title-listen a:hover,
.title-listen a:focus-visible { background: #e9edf2; color: #080a0f; outline: 0; }

.title-stage {
  position: relative;
  z-index: 4;
  width: min(940px, 92vw);
  display: grid;
  justify-items: center;
  text-align: center;
  filter: drop-shadow(0 12px 28px #000);
}

.title-legal {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: clamp(8px, 1.5vh, 16px);
  left: 16px;
  display: grid;
  gap: 2px;
  color: rgba(255, 255, 255, .62);
  font-size: clamp(.48rem, .72vw, .62rem);
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 8px #000;
}
.title-legal p { margin: 0; }

.title-presentation { display: grid; justify-items: center; margin-bottom: clamp(12px, 2vh, 21px); }
.title-studio {
  width: clamp(150px, 17vw, 215px);
  height: auto;
  display: block;
  filter: drop-shadow(0 5px 16px rgba(0, 0, 0, .72));
}
.title-presents { margin-top: 8px; color: #91a0b1; font: 800 clamp(.52rem, .78vw, .68rem)/1 var(--mono); letter-spacing: .45em; text-transform: uppercase; }

.morville-pulse-wordmark { position: relative; width: 100%; }
.morville-pulse-wordmark h1 {
  margin: 0;
  transform: skewX(-7deg) scaleY(.94);
  font-family: "Arial Black", Impact, Haettenschweiler, sans-serif;
  font-size: clamp(4.6rem, 10.4vw, 9.8rem);
  font-weight: 950;
  line-height: .8;
  letter-spacing: -.045em;
  white-space: nowrap;
  -webkit-text-stroke: clamp(1px, .16vw, 2px) #d8e2ec;
  paint-order: stroke fill;
  text-shadow:
    0 .04em 0 #35404d,
    0 .075em 0 #111720,
    0 0 .14em rgba(95, 221, 255, .22),
    .025em .025em 0 #020409;
}
.morville-pulse-wordmark h1 span {
  color: transparent;
  background: linear-gradient(180deg, #f8fbff 0 31%, #aeb9c6 49%, #edf3f8 57%, #687684 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.morville-pulse-wordmark h1 .wordmark-prefix {
  display: block;
  margin-bottom: -.18em;
  font-size: .25em;
  letter-spacing: .42em;
  text-indent: .42em;
}
.morville-pulse-wordmark h1 .wordmark-title { display: block; filter: brightness(.92); }

.title-discovery {
  position: absolute;
  z-index: 7;
  left: clamp(1rem, 2.2vw, 2.5rem);
  bottom: clamp(1rem, 2vw, 2rem);
  width: min(31rem, calc(100vw - 2rem));
  color: #f5f7f8;
  font-size: .78rem;
}
.title-discovery summary {
  width: max-content;
  max-width: 100%;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(5,7,9,.82);
  padding: .62rem .82rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.title-discovery__panel {
  margin-top: .45rem;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(5,7,9,.96);
  padding: .9rem;
  max-height: min(65vh, 34rem);
  overflow: auto;
  box-shadow: 0 1rem 3rem rgba(0,0,0,.55);
}
.title-discovery__panel p { margin: 0 0 .7rem; line-height: 1.5; }
.title-discovery__panel nav { display: flex; flex-wrap: wrap; gap: .45rem .8rem; }
.title-discovery__panel a { color: #fff; text-underline-offset: .2em; }
.title-discovery__songs { display: grid; gap: .5rem; margin-top: .8rem; }
.title-discovery__songs section { display: grid; gap: .22rem; }
.title-discovery__songs strong { color: #aeb8c4; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.title-discovery__songs p { display: flex; flex-wrap: wrap; gap: .25rem .7rem; margin: 0; }
.title-discovery__music { display: block; margin-top: .75rem; color: var(--acid) !important; font-weight: 800; }

.wordmark-meter {
  width: min(440px, 58%);
  height: 4px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 4px;
  margin: clamp(15px, 2.2vh, 24px) auto 0;
  background: rgba(255, 255, 255, .08);
}
.wordmark-meter i { width: 16.666%; height: 100%; background: #ffe738; box-shadow: 0 0 9px currentColor; }
.wordmark-meter i:nth-child(2) { background: #ff8a36; }
.wordmark-meter i:nth-child(3) { background: #63eaff; }
.wordmark-meter i:nth-child(4) { background: #3b8cff; }
.wordmark-meter i:nth-child(5) { background: #ff5a9d; }
.wordmark-meter i:nth-child(6) { background: #a5ff32; }

.title-actions { display: flex; justify-content: center; gap: 12px; margin-top: clamp(22px, 3.7vh, 42px); }
.title-start,
.title-options {
  min-height: 52px;
  padding: 14px 28px;
  border: 1px solid #697789;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .05);
}
.title-start { min-width: 220px; border-color: #a5ff32; background: linear-gradient(180deg, #1c2730, #0b1017); color: #c9ff83; box-shadow: 0 10px 28px rgba(0, 0, 0, .42), inset 4px 0 #a5ff32; }
.title-options { min-width: 154px; background: linear-gradient(180deg, rgba(25, 34, 44, .94), rgba(7, 10, 15, .94)); color: #dce4ec; backdrop-filter: blur(8px); }
.title-options span { margin-right: 7px; color: #63eaff; font-size: 1rem; }
.title-start:disabled { cursor: wait; filter: grayscale(.72) brightness(.66); }
.title-start:hover,
.title-start:focus-visible { transform: translateY(-2px); background: #a5ff32; color: #08100d; }
.title-options:hover,
.title-options:focus-visible { transform: translateY(-2px); border-color: #63eaff; color: #63eaff; }

.gameplay-mix-notice {
  max-width: 680px;
  margin: clamp(20px, 3.3vh, 34px) 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(.66rem, 1vw, .78rem);
  line-height: 1.5;
  text-shadow: 0 2px 8px #000;
}

.game-config-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(720px, calc(100svh - 28px));
  padding: 0;
  border: 1px solid #586176;
  background: #0b0e14;
  color: var(--ink);
  box-shadow: 0 28px 100px rgba(0, 0, 0, .82), 0 0 36px rgba(99, 234, 255, .12);
}
.game-config-dialog::backdrop { background: rgba(1, 2, 7, .82); backdrop-filter: blur(9px); }
.game-config-dialog .settings-panel { max-height: inherit; overflow: auto; border: 0; }
.game-config-dialog .settings-heading { align-items: center; }
.game-config-dialog .controller-summary > div { min-width: 0; display: grid; gap: 4px; }
.game-config-dialog .controller-summary > div span { color: var(--muted); font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.game-config-dialog .controller-summary > div strong { font-size: .85rem; }
.game-config-dialog fieldset { border-bottom: 1px solid var(--line); }
.config-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 18px 28px; }
.config-actions .primary-action { min-width: 180px; padding-block: 15px; }
.config-update {
  min-height: 48px;
  padding: 10px 16px;
  border: 2px solid var(--cyan);
  background: #101827;
  color: #fff;
  cursor: pointer;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.config-update:hover { background: rgba(54, 217, 255, .14); }
.config-update:disabled { cursor: wait; opacity: .58; }
.config-update-status { min-width: 0; margin-right: auto; color: var(--cyan); font-size: .62rem; line-height: 1.35; }
.round-button--options { color: #63eaff; }
.song-list-item { grid-template-columns: 38px minmax(0, 1fr); }

@media (max-width: 700px) {
  .title-discovery { left: 8px; bottom: 42px; width: calc(100vw - 16px); font-size: .66rem; }
  .title-discovery summary { padding: .48rem .58rem; font-size: .57rem; }
  .title-discovery__panel { position: absolute; bottom: calc(100% + .4rem); width: 100%; max-height: 52vh; }
  .title-screen::before { background: radial-gradient(ellipse at 50% 49%, rgba(2, 3, 8, .74) 0 25%, rgba(2, 3, 8, .34) 42%, transparent 65%), linear-gradient(180deg, rgba(2, 2, 6, .68), transparent 20%, transparent 77%, rgba(2, 2, 6, .84)); }
  .title-key-art img { filter: saturate(1.05) contrast(1.05) brightness(.8); }
  .title-utility { top: 8px; width: calc(100vw - 16px); gap: 0; }
  .title-site-link { min-width: 0; overflow: hidden; padding: 9px 10px; font-size: .53rem; text-overflow: ellipsis; white-space: nowrap; }
  .title-listen > span,
  .title-listen a span { display: none; }
  .title-listen a { width: 38px; justify-content: center; padding: 5px; }
  .title-social-icon { width: 14px; height: 14px; }
  .title-stage { width: min(94vw, 560px); }
  .morville-pulse-wordmark h1 { font-size: clamp(4.1rem, 19.5vw, 7.5rem); white-space: normal; }
  .morville-pulse-wordmark h1 span { display: block; }
  .title-actions { width: min(360px, 90vw); display: grid; }
  .title-start,
  .title-options { width: 100%; min-width: 0; min-height: 48px; padding: 11px 18px; }
  .gameplay-mix-notice { max-width: 88vw; }
  .title-legal { right: 8px; bottom: 6px; left: 8px; font-size: .45rem; }
  .game-config-dialog .settings-heading,
  .game-config-dialog fieldset,
  .game-config-dialog .volume-control,
  .config-actions { padding: 15px; }
  .game-config-dialog .lane-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-actions .primary-action { width: 100%; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .title-screen { padding: 8px 20px; }
  .title-utility { top: 4px; left: 50%; width: calc(100vw - 16px); }
  .title-site-link { padding: 5px 8px; font-size: .5rem; }
  .title-listen { padding: 2px; }
  .title-listen > span { display: none; }
  .title-listen a { padding: 4px 7px; font-size: .48rem; }
  .title-stage { width: min(690px, 72vw); }
  .title-presentation { margin-bottom: 2px; }
  .title-studio { width: 130px; }
  .title-presents { margin-top: 1px; font-size: .58rem; }
  .morville-pulse-wordmark h1 { font-size: clamp(4rem, 14vh, 5.8rem); }
  .wordmark-meter { height: 11px; margin-top: 9px; }
  .title-actions { margin-top: 12px; }
  .title-start,
  .title-options { min-height: 38px; padding: 7px 18px; font-size: .65rem; }
  .title-start { min-width: 170px; }
  .gameplay-mix-notice { margin-top: 12px; font-size: .56rem; }
  .title-legal { right: 8px; bottom: 3px; left: 8px; display: flex; justify-content: center; gap: 8px; font-size: .46rem; }
  .game-config-dialog { width: min(760px, calc(100vw - 16px)); max-height: calc(100svh - 12px); }
  .game-config-dialog .settings-panel { display: grid; grid-template-columns: 1fr 1.2fr; }
  .game-config-dialog .settings-heading { grid-column: 1 / -1; padding: 9px 13px; }
  .game-config-dialog .controller-summary { grid-column: 1; border-right: 1px solid var(--line); }
  .game-config-dialog fieldset { grid-column: 2; grid-row: 2 / span 2; padding: 10px 13px; }
  .game-config-dialog .lane-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .game-config-dialog .lane-options label { padding: 7px; font-size: .62rem; }
  .game-config-dialog .volume-control { grid-column: 1; padding: 10px 13px; border-right: 1px solid var(--line); }
  .game-config-dialog .config-actions { grid-column: 1 / -1; padding: 8px 13px; }
  .game-config-dialog .config-actions .primary-action { width: 100%; padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .song-preparation__spectrum i,
  .song-preparation__meter.is-indeterminate > i { animation: none; transform: none; }
  .title-start:hover,
  .title-start:focus-visible,
  .title-options:hover,
  .title-options:focus-visible { transform: none; }
}

/* Focused three-column gameplay shell */
body[data-active-screen="game"] main { min-height: calc(100svh - 98px); }
.screen--game { padding: 18px clamp(12px, 2vw, 32px) 28px; }
.game-layout {
  width: min(1480px, 100%);
  height: min(720px, calc(100svh - 150px));
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(560px, 860px) minmax(220px, 300px);
  gap: clamp(12px, 1.4vw, 22px);
  align-items: stretch;
  justify-content: center;
  margin-inline: auto;
}
.game-info-panel,
.game-media-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(98, 105, 122, .7);
  background: linear-gradient(180deg, rgba(10, 13, 20, .9), rgba(8, 10, 15, .82));
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
  backdrop-filter: blur(6px);
}
.game-info-panel { display: flex; flex-direction: column; padding: 18px; }
.game-info-panel .play-identity { display: grid; align-items: start; }
.game-info-panel .play-header h1,
.game-info-panel h1 { margin: 0 0 8px; font-size: clamp(1.25rem, 1.8vw, 1.75rem); line-height: 1.03; }
.game-info-panel .play-identity > div > span { display: block; font-size: .72rem; line-height: 1.45; }
.game-info-panel .score-strip { display: grid; margin-top: 22px; border: 0; border-top: 1px solid var(--line); }
.game-info-panel .score-strip span { min-width: 0; padding: 13px 3px; border: 0; border-bottom: 1px solid var(--line); }
.game-info-panel .score-strip strong { margin-top: 5px; font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-variant-numeric: tabular-nums; }
.game-info-panel .exit-song-button { width: 100%; margin-top: auto; }
.game-center { min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.game-center .game-stage { width: 100%; height: auto; min-height: 0; }
.game-center .transport { margin-top: 10px; }
.game-media-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.game-poster { margin: 0; border-bottom: 1px solid var(--line); background: #080a0e; }
.game-poster img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.game-poster figcaption { display: grid; gap: 4px; padding: 13px 14px 15px; }
.game-poster strong { overflow: hidden; font-size: .9rem; line-height: 1.25; text-overflow: ellipsis; }
.game-poster span { overflow: hidden; color: var(--muted); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.game-lyrics-panel { position: relative; min-height: 0; overflow: hidden; background: rgba(4, 6, 10, .9); }
.game-lyrics-label { position: absolute; z-index: 4; top: 13px; left: 15px; color: var(--acid); font-size: .58rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.game-lyrics-panel::before,
.game-lyrics-panel::after { content: ""; position: absolute; z-index: 3; right: 0; left: 0; height: 70px; pointer-events: none; }
.game-lyrics-panel::before { top: 0; background: linear-gradient(#05070b 22%, rgba(5, 7, 11, 0)); }
.game-lyrics-panel::after { bottom: 0; background: linear-gradient(rgba(5, 7, 11, 0), #05070b 78%); }
.game-lyrics-track { position: absolute; inset: 0; overflow: auto; padding: 0 16px; scrollbar-width: none; scroll-behavior: auto; overscroll-behavior: contain; }
.game-lyrics-track::-webkit-scrollbar { display: none; }
.game-lyrics-track::before,
.game-lyrics-track::after { content: ""; display: block; height: calc(50% - 38px); min-height: 70px; }
.game-lyric-cue { margin: 0 0 26px; color: rgba(224, 226, 232, .38); font-size: clamp(.76rem, .88vw, .96rem); line-height: 1.38; transition: color .25s ease, opacity .25s ease, transform .25s ease, text-shadow .25s ease; transform-origin: left center; }
.game-lyric-cue strong,
.game-lyric-cue span { display: block; }
.game-lyric-cue strong { font-weight: 850; }
.game-lyric-cue span { margin-top: 5px; color: inherit; font-size: .72em; font-weight: 600; line-height: 1.35; white-space: pre-line; }
.game-lyric-cue.is-past { color: rgba(224, 226, 232, .22); }
.game-lyric-cue.is-active { color: #fff; transform: scale(1.035); text-shadow: 0 0 16px rgba(255, 255, 255, .2); }
.game-lyrics-empty { position: absolute; top: 50%; right: 16px; left: 16px; margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.5; transform: translateY(-50%); }

@media (max-width: 1050px) {
  .game-layout { grid-template-columns: minmax(170px, 210px) minmax(0, 820px); }
  .game-media-panel { display: none; }
}

@media (max-width: 760px) {
  .screen--game { min-height: 100svh; padding: 8px; }
  .game-layout { width: 100%; height: calc(100svh - 16px); min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 7px; }
  .game-info-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 7px 9px; }
  .game-info-panel .play-identity { display: flex; gap: 8px; align-items: center; }
  .game-info-panel h1 { overflow: hidden; margin: 0; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
  .game-info-panel .play-identity > div > span { overflow: hidden; font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
  .game-info-panel .score-strip { display: flex; margin: 0; border: 1px solid var(--line); }
  .game-info-panel .score-strip span { min-width: 52px; padding: 4px 6px; border: 0; border-right: 1px solid var(--line); font-size: .46rem; }
  .game-info-panel .score-strip span:last-child { border: 0; }
  .game-info-panel .score-strip strong { margin-top: 1px; font-size: .7rem; }
  .game-info-panel .exit-song-button { width: auto; min-height: 34px; margin: 0; padding: 5px 8px; font-size: .52rem; }
  .game-center .transport { margin-top: 5px; }
  .game-center .timeline { font-size: .58rem; }
}

@media (max-width: 900px) {
  .game-header { gap: 12px; padding-inline: 18px; }
  .game-header img { width: 160px; }
  .game-header-links a { padding-inline: 8px; }
  .game-header-links a span:last-child { display: none; }
}

@media (max-width: 520px) {
  .game-info-panel { grid-template-columns: minmax(0, 1fr) auto; }
  .game-info-panel .score-strip { grid-column: 1 / -1; grid-row: 2; }
  .game-info-panel .score-strip span { flex: 1; }
  .game-info-panel .exit-song-button { grid-column: 2; grid-row: 1; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .screen--game { width: 100%; height: 100svh; min-height: 0; padding: 6px 10px; }
  .game-layout { width: min(1060px, 100%); height: calc(100svh - 12px); min-height: 0; grid-template-columns: minmax(150px, 190px) minmax(0, 850px); grid-template-rows: 1fr; gap: 7px; }
  .game-media-panel { display: none; }
  .game-info-panel { display: flex; padding: 9px; }
  .game-info-panel .play-identity { display: grid; gap: 6px; }
  .game-info-panel .play-identity > img { width: 70px; }
  .game-info-panel h1 { white-space: normal; font-size: .9rem; }
  .game-info-panel .play-identity > div > span { display: block; font-size: .52rem; white-space: normal; }
  .game-info-panel .score-strip { display: grid; margin-top: 6px; border: 0; border-top: 1px solid var(--line); }
  .game-info-panel .score-strip span { min-width: 0; padding: 4px 2px; border: 0; border-bottom: 1px solid var(--line); font-size: .43rem; }
  .game-info-panel .score-strip strong { font-size: .68rem; }
  .game-info-panel .exit-song-button { width: 100%; min-height: 30px; margin-top: auto; padding: 4px 6px; }
  .game-center .transport { margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .game-lyric-cue { transition: none; }
}

/* High-contrast live-stage theme
   Structural edges remain visible without glow; neon is reserved for hierarchy and game state. */
.game-header {
  border-bottom: 2px solid var(--line-strong);
  background:
    linear-gradient(90deg, rgba(54, 217, 255, .05), transparent 30%, transparent 70%, rgba(255, 59, 157, .05)),
    rgba(5, 8, 14, .96);
  box-shadow: 0 4px 0 rgba(54, 217, 255, .08), 0 14px 34px rgba(0, 0, 0, .35);
}

.game-header-links a,
.title-site-link,
.title-listen,
.selector-back,
.selector-options,
.artist-switcher button,
.round-button,
.controller-close {
  border-width: 2px;
  border-color: var(--line-strong);
}

.game-header-links a:hover,
.game-header-links a:focus-visible,
.selector-back:hover,
.selector-back:focus-visible,
.selector-options:hover,
.selector-options:focus-visible,
.round-button:hover,
.round-button:focus-visible,
.controller-close:hover,
.controller-close:focus-visible {
  border-color: var(--cyan);
  background: rgba(54, 217, 255, .14);
  color: #fff;
  box-shadow: 0 0 16px rgba(54, 217, 255, .24);
}

.selector-header,
.artist-switcher,
.music-selector,
.selector-controls {
  border: 2px solid var(--line-strong);
  background:
    linear-gradient(110deg, rgba(54, 217, 255, .055), transparent 28%, transparent 72%, rgba(255, 59, 157, .055)),
    #080c14;
}

.selector-header {
  position: relative;
  box-shadow: 5px 5px 0 rgba(54, 217, 255, .11), -3px 0 0 rgba(255, 59, 157, .36);
}

.selector-header::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -2px;
  left: 14px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--acid) 45%, var(--magenta));
  box-shadow: 0 0 12px rgba(54, 217, 255, .36);
  pointer-events: none;
}

.selector-header h1,
.result-screen h1,
.game-info-panel h1 {
  text-shadow: 2px 0 0 rgba(54, 217, 255, .22), -2px 0 0 rgba(255, 59, 157, .18);
}

.artist-switcher {
  border-color: #71849e;
  box-shadow: inset 0 -2px rgba(255, 59, 157, .14);
}

.music-selector {
  box-shadow: 0 0 0 1px #05070b, 0 16px 42px rgba(0, 0, 0, .42), 0 0 28px rgba(54, 217, 255, .08);
}

.selection-preview {
  border-right: 2px solid var(--line-strong);
  background: linear-gradient(180deg, #080b12, #05070c);
}

.selection-details {
  border-top: 2px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(54, 217, 255, .06), transparent 36%, rgba(255, 59, 157, .055)),
    #080c13;
}

.selection-highscores,
.selection-difficulty,
.selection-speed,
.selection-stats div {
  border-color: #71849e;
  background-color: rgba(6, 10, 17, .96);
}

.selection-highscores {
  border-width: 2px;
  box-shadow: 5px 5px 0 rgba(255, 59, 157, .08), 0 10px 28px rgba(0, 0, 0, .42);
}

.selection-highscores > header,
.selection-list-panel > header {
  border-color: #61738d;
  background: linear-gradient(90deg, rgba(54, 217, 255, .08), rgba(255, 59, 157, .04));
  color: var(--ink);
}

.selection-confirm,
.primary-action {
  border: 2px solid #dfff89;
  background: linear-gradient(135deg, #c8ff52, var(--acid));
  box-shadow: 4px 4px 0 #29480b, 0 0 18px rgba(165, 255, 50, .22);
}

.selection-confirm:hover,
.selection-confirm:focus-visible,
.primary-action:hover,
.primary-action:focus-visible {
  background: #e7ff98;
  box-shadow: 2px 2px 0 #29480b, 0 0 24px rgba(165, 255, 50, .38);
}

.song-list-item {
  border-color: #506078;
  background:
    linear-gradient(90deg, rgba(54, 217, 255, .035), transparent 34%, rgba(255, 59, 157, .025)),
    #0c111a;
}

.song-list-item:hover,
.song-list-item:focus-visible {
  border-color: var(--cyan);
  background-color: #101827;
  box-shadow: inset 4px 0 var(--cyan), 0 0 14px rgba(54, 217, 255, .16);
}

.song-list-item.is-selected {
  border: 2px solid var(--acid);
  background:
    linear-gradient(90deg, rgba(165, 255, 50, .2), rgba(54, 217, 255, .1) 58%, rgba(255, 59, 157, .09)),
    #101722;
  box-shadow: inset 6px 0 var(--acid), inset 0 -2px rgba(54, 217, 255, .34), 0 0 22px rgba(165, 255, 50, .2);
}

.song-list-item.is-selected .song-list-item__title strong::after {
  content: "  ◆";
  color: var(--acid);
  font-size: .65em;
}

.selection-difficulty button,
kbd {
  border-color: #71849e;
  background: #111927;
  color: var(--ink);
}

.selection-difficulty button.is-selected {
  border-width: 2px;
  border-color: var(--acid);
  background: rgba(165, 255, 50, .17);
  box-shadow: inset 0 -2px var(--acid), 0 0 12px rgba(165, 255, 50, .24);
}

.settings-panel,
.game-config-dialog,
.controller-dialog,
.exit-song-dialog,
.highscore-dialog,
.result-highscores,
.result-claim,
.result-miss,
.lane-order-section {
  border: 2px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(54, 217, 255, .055), transparent 38%, rgba(255, 59, 157, .045)),
    #090e17;
  box-shadow: 0 0 0 1px #020408, 7px 7px 0 rgba(54, 217, 255, .07), 0 24px 72px rgba(0, 0, 0, .5);
}

.settings-heading,
.controller-panel__header,
.result-highscores > header,
.highscore-dialog > section > header {
  border-bottom-color: var(--line-strong);
  background: linear-gradient(90deg, rgba(54, 217, 255, .09), transparent 52%, rgba(255, 59, 157, .08));
}

.lane-options label,
.controller-status,
.midi-mapping-row {
  border-color: #596b84;
  background: #101722;
}

.game-info-panel,
.game-media-panel,
.game-stage {
  border: 2px solid var(--line-strong);
  box-shadow: 0 0 0 1px #020408, 0 18px 60px rgba(0, 0, 0, .4), 0 0 24px rgba(54, 217, 255, .08);
}

.game-info-panel {
  position: relative;
  background:
    linear-gradient(160deg, rgba(54, 217, 255, .09), transparent 35%, rgba(255, 59, 157, .07)),
    rgba(6, 10, 17, .94);
}

.game-info-panel::before,
.game-media-panel::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--acid), var(--magenta));
  box-shadow: 0 0 13px rgba(54, 217, 255, .38);
  pointer-events: none;
}

.game-media-panel { position: relative; }
.game-poster { border-bottom: 2px solid var(--line-strong); }
.score-strip,
.game-info-panel .score-strip,
.game-info-panel .score-strip span { border-color: #667a96; }

.game-stage {
  border-color: #8299b7;
  background:
    linear-gradient(rgba(8, 12, 20, .4), rgba(10, 14, 23, .68)),
    repeating-linear-gradient(90deg, transparent 0 16.3%, rgba(54, 217, 255, .025) 16.3% 16.66%);
}

.game-lyrics-label,
.eyebrow { text-shadow: 0 0 11px rgba(165, 255, 50, .32); }

.result-score {
  border-block: 2px solid var(--line-strong);
  background: linear-gradient(90deg, rgba(54, 217, 255, .06), transparent 55%, rgba(255, 59, 157, .05));
  padding-inline: 16px;
}

.result-score strong {
  text-shadow: 3px 3px 0 #29480b, 0 0 22px rgba(165, 255, 50, .3);
}

.result-claim.is-awaiting-claim { border-color: var(--acid); }
.highscore-row { border-bottom-color: #4d5d73; }
.highscore-row:first-child { box-shadow: inset 4px 0 var(--acid); }
.selector-controls { color: #d8e0ec; }

/* Unified tabbed game options */
.game-config-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: min(820px, calc(100svh - 28px));
  overflow: hidden;
}

.game-config-dialog .game-options-panel {
  height: min(790px, calc(100svh - 32px));
  max-height: inherit;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 0;
}
.game-config-dialog .settings-heading { padding: 18px 22px; }

.game-options-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 7px;
  border-bottom: 2px solid var(--line-strong);
  background: #050912;
}

.game-options-tabs button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid #52647d;
  background: #0d1420;
  color: var(--muted);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.game-options-tabs button > span {
  color: #8495ac;
  font: 800 .58rem/1 var(--mono);
}

.game-options-tabs button:hover { border-color: var(--cyan); color: #fff; }
.game-options-tabs button[aria-selected="true"] {
  border-color: var(--acid);
  background: linear-gradient(90deg, rgba(165, 255, 50, .2), rgba(54, 217, 255, .1));
  color: #fff;
  box-shadow: inset 0 -4px var(--acid), 0 0 16px rgba(165, 255, 50, .18);
}
.game-options-tabs button[aria-selected="true"] > span { color: var(--acid); }

.game-options-tab-panel {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 18px;
  scrollbar-color: var(--acid) #101722;
  scrollbar-gutter: stable;
}
.game-options-tab-panel[hidden] { display: none; }
.game-options-tab-panel > fieldset,
.game-options-tab-panel > .volume-control { grid-column: auto; grid-row: auto; }
#game-options-controllers { position: relative; padding: 0; overflow: hidden; }
#game-options-controllers > .controller-mode-layout { position: absolute; inset: 0; }
#game-options-gameplay { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
#game-options-gameplay > .game-language-setting { grid-column: 1 / -1; grid-row: 1; }
#game-options-gameplay > .lane-order-section { grid-column: 1 / -1; grid-row: 2; }
#game-options-gameplay > .game-defaults { grid-column: 1; grid-row: 3; }
#game-options-gameplay > .song-volume-control { grid-column: 2; grid-row: 3; }
.game-language-setting {
  display: grid;
  grid-template-columns: minmax(160px, .6fr) minmax(240px, 1fr) minmax(160px, .45fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #596b84;
  background: #0b111a;
}
.game-language-setting strong { color: var(--acid); text-transform: uppercase; }
.game-language-setting small { color: #b8c4d4; line-height: 1.45; }
.game-language-setting select { min-height: 42px; border: 1px solid var(--cyan); background: #080d15; color: #fff; padding: 0 12px; }
#game-options-gameplay .lane-order-section { gap: 6px; padding: 10px; }
#game-options-gameplay .lane-order-drum { min-height: 82px; grid-template-rows: minmax(48px, 1fr) auto; }
#game-options-gameplay .lane-order-drum img { height: 56px; }

.options-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 11px;
  border-bottom: 1px solid #596b84;
}
.options-section-heading span,
.keyboard-binding-section .controller-section-heading span { color: var(--acid); font-size: .56rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.options-section-heading h3 { margin: 3px 0 0; font-size: 1.05rem; }
.options-section-heading > strong { color: var(--cyan); font-size: .68rem; }

.game-options-tab-panel .controller-actions button,
.game-options-tab-panel .controller-section-heading button,
.game-options-tab-panel .midi-mapping-row button,
.game-options-tab-panel .gamepad-mapping-row button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #71849e;
  background: #141b28;
  color: #fff;
  cursor: pointer;
  font-size: .66rem;
  font-weight: 850;
}
.game-options-tab-panel .controller-actions button:hover,
.game-options-tab-panel .controller-section-heading button:hover,
.game-options-tab-panel .midi-mapping-row button:hover,
.game-options-tab-panel .gamepad-mapping-row button:hover { border-color: var(--cyan); background: rgba(54, 217, 255, .12); }

.controller-mode-layout {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  overflow: hidden;
}

.controller-mode-sidebar {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  border-right: 2px solid var(--line-strong);
  background: #03060c;
}

.controller-mode-sidebar button {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(74px, 1fr) auto;
  gap: 4px;
  padding: 8px;
  overflow: hidden;
  border: 2px solid #52647d;
  background: #05080e;
  color: #d9e2ee;
  cursor: pointer;
}

.controller-mode-sidebar button:hover { border-color: var(--cyan); color: #fff; }
.controller-mode-sidebar button[aria-selected="true"] {
  border-color: var(--acid);
  background: linear-gradient(145deg, rgba(165, 255, 50, .14), rgba(54, 217, 255, .08) 62%, #060a11);
  color: #fff;
  box-shadow: 0 0 18px rgba(165, 255, 50, .16);
}
.controller-mode-sidebar button[aria-selected="true"]::before { content: ""; position: absolute; z-index: 2; top: 5px; bottom: 5px; left: 4px; width: 4px; background: var(--acid); box-shadow: 0 0 8px rgba(165, 255, 50, .6); pointer-events: none; }

.controller-mode-sidebar img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  filter: saturate(.82) brightness(.88);
}

.controller-mode-sidebar button[aria-selected="true"] img { filter: saturate(1.2) brightness(1.2) drop-shadow(0 0 8px rgba(54, 217, 255, .42)); }
.controller-mode-sidebar button > span { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .7rem; font-weight: 950; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.controller-mode-sidebar button small { color: #8495ac; font: 800 .5rem/1 var(--mono); }
.controller-mode-sidebar button[aria-selected="true"] small { color: var(--acid); }

.controller-mode-content { min-width: 0; min-height: 0; overflow-y: auto; scrollbar-color: var(--acid) #101722; scrollbar-gutter: stable; }
.controller-mode-panel { display: grid; align-content: start; gap: 14px; padding: 18px; }
.controller-mode-panel[hidden] { display: none; }
.controller-panel-help { margin: 0; color: var(--muted); font-size: .66rem; line-height: 1.45; }

.keyboard-binding-section {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}
.keyboard-binding-section > p { margin: 0; color: var(--muted); font-size: .66rem; line-height: 1.45; }
.keyboard-binding-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.keyboard-binding-card {
  position: relative;
  min-width: 0;
  min-height: 88px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 5px;
  padding: 9px 5px;
  border: 1px solid #61738d;
  background: linear-gradient(180deg, #111a28, #080d15);
  color: var(--ink);
  cursor: pointer;
}
.keyboard-binding-card > span { color: var(--muted); font-size: .48rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.keyboard-binding-card kbd { min-width: 54px; align-self: center; padding: 7px 8px; border: 2px solid var(--cyan); color: #fff; font-size: .78rem; box-shadow: 0 0 12px rgba(54, 217, 255, .18); }
.keyboard-binding-card small { max-width: 100%; overflow: hidden; color: var(--muted); font-size: .52rem; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.keyboard-binding-card:hover,
.keyboard-binding-card:focus-visible,
.keyboard-binding-card.is-learning { border-color: var(--acid); background: rgba(165, 255, 50, .09); }
.keyboard-binding-card.is-learning kbd { border-color: var(--acid); color: var(--acid); animation: keyLearnPulse .75s ease-in-out infinite alternate; }

.gamepad-mapping { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.gamepad-mapping-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}
.gamepad-mapping-row > div { min-width: 0; display: grid; gap: 2px; }
.gamepad-mapping-row strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.gamepad-mapping-row small { overflow: hidden; color: var(--cyan); font: .62rem/1.35 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.gamepad-mapping-row.is-learning { border-color: var(--acid); box-shadow: inset 3px 0 0 var(--acid); }

.midi-mapping-row,
.gamepad-mapping-row { position: relative; }
.keyboard-binding-card.is-signaled,
.midi-mapping-row.is-signaled,
.gamepad-mapping-row.is-signaled { animation: controllerSignalPulse 520ms ease-out; }
.keyboard-binding-card.is-signaled::after,
.midi-mapping-row.is-signaled::after,
.gamepad-mapping-row.is-signaled::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 13px var(--acid);
  pointer-events: none;
}
@keyframes controllerSignalPulse {
  0% { border-color: #fff; background: rgba(165, 255, 50, .32); box-shadow: inset 0 0 0 2px var(--acid), 0 0 24px rgba(165, 255, 50, .7); }
  100% { border-color: var(--line); background: rgba(255, 255, 255, .025); box-shadow: none; }
}

.lane-order-position {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--lane-color) 48%, #445066);
  background: rgba(3, 5, 10, .88);
}
.lane-order-position span { overflow: hidden; color: var(--muted); font-size: .43rem; font-weight: 800; letter-spacing: .05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.lane-order-position kbd { min-width: 32px; margin: 0; border-color: color-mix(in srgb, var(--lane-color) 70%, #526079); font-size: .52rem; }

.lane-order-auto {
  position: relative;
  display: block;
  margin: 0;
  padding: 0 4px 2px;
  cursor: pointer;
}
.lane-order-auto input { position: absolute; opacity: 0; pointer-events: none; }
.lane-order-auto span {
  min-height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #61738d;
  background: rgba(3, 5, 10, .88);
  color: #8f9bad;
  font-size: .56rem;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.lane-order-auto span::before { content: "○"; font-size: .72rem; line-height: 1; }
.lane-order-auto:hover span { border-color: var(--lane-color); color: #fff; }
.lane-order-auto input:checked + span {
  border: 2px solid var(--lane-color);
  background: color-mix(in srgb, var(--lane-color) 17%, #080d14);
  color: #fff;
  box-shadow: inset 0 -3px var(--lane-color), 0 0 12px color-mix(in srgb, var(--lane-color) 28%, transparent);
}
.lane-order-auto input:checked + span::before { content: "✓"; color: var(--lane-color); }
.lane-order-auto input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.game-defaults { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.freestyle-control {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #0d1420;
}
.freestyle-control > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.freestyle-control input { width: 20px; height: 20px; accent-color: var(--acid); }
.freestyle-control small { color: var(--muted); font-size: .62rem; line-height: 1.4; }
.visual-fps-control {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .45fr);
  align-items: center;
  gap: 7px 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #0d1420;
}
.visual-fps-control > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.visual-fps-control output { color: var(--acid); font-size: .78rem; font-weight: 950; }
.visual-fps-control small { color: var(--muted); font-size: .62rem; line-height: 1.4; }
.visual-fps-control select { grid-column: 2; grid-row: 1 / span 2; width: 100%; min-height: 42px; border: 1px solid var(--cyan); background: #080d15; color: #fff; padding: 0 10px; }
.default-controller-choice {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line-strong);
  background: #0b111a;
}
.default-controller-choice legend { padding-inline: 5px; color: var(--acid); font-weight: 900; }
.default-controller-choice p,
.default-controller-choice small { margin: 0; color: var(--muted); font-size: .62rem; line-height: 1.4; }
.default-controller-choice > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.default-controller-choice label { position: relative; margin: 0; }
.default-controller-choice input { position: absolute; opacity: 0; }
.default-controller-choice label span { display: grid; min-height: 34px; place-items: center; padding: 5px; border: 1px solid #61738d; color: var(--muted); font-size: .58rem; font-weight: 850; cursor: pointer; text-align: center; }
.default-controller-choice input:checked + span { border: 2px solid var(--acid); color: var(--acid); background: rgba(165, 255, 50, .12); box-shadow: inset 0 -3px var(--acid); }
.default-controller-choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.default-speed-control,
.game-options-tab-panel .default-difficulty-control,
.song-volume-control {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: #0d1420;
}
.default-speed-control > span,
.song-volume-control > span { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.default-speed-control output,
.song-volume-control output { color: var(--acid); font-size: .92rem; font-weight: 950; }
.default-speed-control small,
.song-volume-control small { color: var(--muted); font-size: .62rem; line-height: 1.4; }
.default-speed-control input,
.song-volume-control input { width: 100%; accent-color: var(--acid); }

.game-options-tab-panel .default-difficulty-control { border-bottom: 1px solid var(--line); }
.game-options-tab-panel .default-difficulty-control > p { margin: 0; color: var(--muted); font-size: .62rem; }
.default-difficulty-control > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.default-difficulty-control label { position: relative; margin: 0; }
.default-difficulty-control input { position: absolute; opacity: 0; }
.default-difficulty-control label > span { min-height: 47px; display: grid; place-items: center; gap: 2px; padding: 6px; border: 1px solid #61738d; background: #111927; color: var(--muted); cursor: pointer; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.default-difficulty-control label small { display: block; color: inherit; font-size: .45rem; }
.default-difficulty-control input:checked + span { border: 2px solid var(--acid); background: rgba(165, 255, 50, .14); color: var(--acid); box-shadow: inset 0 -3px var(--acid); }
.default-difficulty-control input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }

.game-options-tab-panel .song-volume-control { border-bottom: 1px solid var(--line); }
.game-options-panel .config-actions {
  position: sticky;
  z-index: 20;
  bottom: 0;
  min-height: 70px;
  border-top: 2px solid var(--line-strong);
  background: #070b12;
  box-shadow: 0 -12px 26px rgba(0, 0, 0, .48);
}

@media (max-width: 700px) {
  .game-config-dialog {
    width: calc(100vw - 12px);
    height: calc(100svh - 12px);
    height: calc(100dvh - 12px);
    max-height: none;
    margin: auto;
  }
  .game-config-dialog .game-options-panel { width: 100%; height: 100%; max-height: none; }
  .game-options-panel .config-actions {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    min-height: 62px;
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  }
  .game-options-panel .config-update-status { grid-column: 1 / -1; min-height: 0; margin: 0; text-align: center; }
  .game-options-panel .config-update,
  .game-options-panel .primary-action { width: 100%; min-width: 0; min-height: 46px; padding: 9px 7px; }
  .game-options-tabs button { min-height: 42px; font-size: .66rem; }
  .game-options-tab-panel { gap: 10px; padding: 11px; }
  #game-options-controllers { padding: 0; }
  .controller-mode-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .controller-mode-sidebar { grid-template-columns: repeat(3, 1fr); grid-template-rows: 96px; padding: 5px; border-right: 0; border-bottom: 2px solid var(--line-strong); }
  .controller-mode-sidebar button { grid-template-rows: minmax(46px, 1fr) auto; gap: 1px; padding: 4px; }
  .controller-mode-sidebar button > span { gap: 4px; font-size: .56rem; letter-spacing: .02em; }
  .controller-mode-sidebar img { max-height: 58px; }
  .controller-mode-panel { gap: 10px; padding: 11px; }
  .keyboard-binding-grid { grid-template-columns: repeat(3, 1fr); }
  .keyboard-binding-card { min-height: 74px; }
  .gamepad-mapping { grid-template-columns: 1fr; }
  .game-defaults { grid-template-columns: 1fr; }
  .visual-fps-control { grid-template-columns: 1fr; }
  .visual-fps-control select { grid-column: auto; grid-row: auto; }
  #game-options-gameplay { grid-template-columns: 1fr; }
  #game-options-gameplay > .lane-order-section,
  #game-options-gameplay > .game-defaults,
  #game-options-gameplay > .song-volume-control { grid-column: auto; grid-row: auto; }
  .game-options-tab-panel .lane-order-section { padding: 10px 8px; }
  #game-options-gameplay .lane-order-position { grid-template-columns: 1fr; justify-items: center; padding-inline: 1px; }
  #game-options-gameplay .lane-order-position span { display: none; }
  #game-options-gameplay .lane-order-position kbd { min-width: 28px; padding-inline: 2px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .game-config-dialog { width: min(980px, calc(100vw - 16px)); max-height: calc(100svh - 12px); }
  .game-config-dialog .game-options-panel { height: calc(100svh - 12px); grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .game-config-dialog .settings-heading,
  .game-config-dialog .game-options-tabs,
  .game-config-dialog .game-options-tab-panel,
  .game-config-dialog .config-actions { grid-column: 1; grid-row: auto; }
  .game-options-tabs button { min-height: 34px; }
  .game-options-tab-panel { padding: 8px 12px; }
  #game-options-controllers { padding: 0; }
  .controller-mode-layout { grid-template-columns: 168px minmax(0, 1fr); }
  .controller-mode-sidebar { padding: 4px; }
  .controller-mode-sidebar button { grid-template-columns: 62px 1fr; grid-template-rows: 1fr; align-items: center; padding: 4px; }
  .controller-mode-sidebar img { max-height: 58px; }
  .controller-mode-panel { gap: 7px; padding: 8px 12px; }
  .keyboard-binding-card { min-height: 66px; }
  .game-defaults { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .keyboard-binding-card.is-learning kbd { animation: none; }
  .keyboard-binding-card.is-signaled,
  .midi-mapping-row.is-signaled,
  .gamepad-mapping-row.is-signaled { animation: none; border-color: var(--acid); box-shadow: inset 0 0 0 2px var(--acid); }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #eef3fb;
    --line: #aebed2;
    --line-strong: #e5edf8;
  }

  .selector-header,
  .artist-switcher,
  .music-selector,
  .selector-controls,
  .settings-panel,
  .game-info-panel,
  .game-media-panel,
  .game-stage,
  .result-highscores,
  dialog { box-shadow: none; }

  .song-list-item { border-color: #aebed2; }
  .song-list-item.is-selected { border-color: var(--acid); }
}

/* Input-independent navigation and readable, named difficulty levels. */
button,
a,
input,
select,
label { touch-action: manipulation; }

body[data-navigation-mode="directional"] button:focus,
body[data-navigation-mode="directional"] a:focus,
body[data-navigation-mode="directional"] input:focus,
body[data-navigation-mode="directional"] select:focus,
body[data-navigation-mode="directional"] [tabindex]:focus {
  position: relative;
  z-index: 20;
  outline: 0;
  animation: controllerFocusFrame 1.35s ease-in-out infinite;
}

body[data-navigation-mode="directional"] .lane-order-auto input:focus + span,
body[data-navigation-mode="directional"] .default-difficulty-control input:focus + span {
  position: relative;
  z-index: 20;
  outline: 0;
  animation: controllerFocusFrame 1.35s ease-in-out infinite;
}

body[data-navigation-mode="directional"] .language-choice-grid input:focus {
  position: absolute;
  z-index: auto;
  animation: none;
}

@keyframes controllerFocusFrame {
  0%, 100% {
    box-shadow: inset 0 0 0 3px #ffe34d, inset 0 0 0 5px rgba(8, 11, 17, .92), 0 0 14px rgba(255, 227, 77, .78);
  }
  33% {
    box-shadow: inset 0 0 0 3px #36d9ff, inset 0 0 0 5px rgba(8, 11, 17, .92), 0 0 14px rgba(54, 217, 255, .78);
  }
  66% {
    box-shadow: inset 0 0 0 3px #ff3b9d, inset 0 0 0 5px rgba(8, 11, 17, .92), 0 0 14px rgba(255, 59, 157, .78);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-navigation-mode="directional"] button:focus,
  body[data-navigation-mode="directional"] a:focus,
  body[data-navigation-mode="directional"] input:focus,
  body[data-navigation-mode="directional"] select:focus,
  body[data-navigation-mode="directional"] [tabindex]:focus,
  body[data-navigation-mode="directional"] .lane-order-auto input:focus + span,
  body[data-navigation-mode="directional"] .default-difficulty-control input:focus + span {
    animation: none;
    box-shadow: inset 0 0 0 3px #ffe34d, inset 0 0 0 5px rgba(8, 11, 17, .92), 0 0 12px rgba(255, 227, 77, .72);
  }
}

.selector-controls__gamepad { color: var(--cyan); }

.selection-difficulty > span {
  display: inline-block;
  color: #e8edf5;
  font-size: clamp(.58rem, .65vw, .7rem);
  font-weight: 950;
  letter-spacing: .08em;
}

.selection-difficulty button[data-chart-difficulty="reduced-50"] { --difficulty-color: #ffe34d; }
.selection-difficulty button[data-chart-difficulty="reduced-25"] { --difficulty-color: #ff9f32; }
.selection-difficulty button[data-chart-difficulty="original"] { --difficulty-color: #ff565e; }

.selection-difficulty button[data-chart-difficulty] {
  border-color: color-mix(in srgb, var(--difficulty-color) 62%, #485263);
  color: var(--difficulty-color);
}

.selection-difficulty button[data-chart-difficulty] strong { color: var(--difficulty-color); }
.selection-difficulty button[data-chart-difficulty] small { color: color-mix(in srgb, var(--difficulty-color) 68%, #9099a9); }
.selection-difficulty button[data-chart-difficulty]:hover,
.selection-difficulty button[data-chart-difficulty]:focus-visible,
.selection-difficulty button[data-chart-difficulty].is-selected {
  border-color: var(--difficulty-color);
  background: color-mix(in srgb, var(--difficulty-color) 18%, #0c111a);
  color: var(--difficulty-color);
  box-shadow: inset 0 -3px var(--difficulty-color), 0 0 13px color-mix(in srgb, var(--difficulty-color) 30%, transparent);
}

.default-difficulty-control input[value="reduced-50"] + span { --difficulty-color: #ffe34d; }
.default-difficulty-control input[value="reduced-25"] + span { --difficulty-color: #ff9f32; }
.default-difficulty-control input[value="original"] + span { --difficulty-color: #ff565e; }
.default-difficulty-control input + span { color: var(--difficulty-color); }
.default-difficulty-control input:checked + span {
  border-color: var(--difficulty-color);
  background: color-mix(in srgb, var(--difficulty-color) 16%, #0c111a);
  color: var(--difficulty-color);
  box-shadow: inset 0 -3px var(--difficulty-color);
}

@media (forced-colors: active) {
  .selector-header,
  .artist-switcher,
  .music-selector,
  .selector-controls,
  .song-list-item,
  .selection-highscores,
  .settings-panel,
  .game-info-panel,
  .game-media-panel,
  .game-stage,
  .result-highscores,
  dialog,
  button,
  a { border: 2px solid ButtonText; }

  .song-list-item.is-selected,
  .selection-difficulty button.is-selected { border: 3px solid Highlight; }
}

@media (max-width: 600px) {
  .language-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-language-setting { grid-template-columns: 1fr; }
  .selection-preview {
    border-right: 0;
    border-bottom: 2px solid var(--line-strong);
  }
}

@media (max-width: 420px) {
  .language-picker-dialog {
    width: calc(100dvw - 20px);
    max-height: calc(100dvh - 20px);
  }
  .language-picker-dialog form { gap: 13px; padding: 20px; }
  .language-choice-grid { grid-template-columns: 1fr; }
}
