/* Snake 3330: one visual language drawn from the supplied handset. */
:root {
  --ink: #f1f2e8;
  --muted: #c2d0ce;
  --fine: #91a7ab;
  --accent: #73cbd5;
  --accent-bright: #b9e9e7;
  --lcd: #d9e2bd;
  --navy: #172a35;
  --navy-deep: #0b1922;
  --line: rgba(176, 218, 220, .22);
  --panel: rgba(18, 36, 45, .76);
  --duration-micro: 80ms;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-medium: 350ms;
  --duration-slow: 400ms;
  --ease-smooth-out: cubic-bezier(.22, 1, .36, 1);
  --ease-bounce: cubic-bezier(.34, 1.36, .64, 1);
  --acc-expand: 250ms;
  --acc-collapse: 250ms;
  --acc-chevron: 250ms;
  --acc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --digit-dur: 500ms;
  --digit-distance: 8px;
  --digit-stagger: 70ms;
  --digit-blur: 2px;
  --digit-ease: cubic-bezier(0.34, 1.45, 0.64, 1);
  --digit-dir-x: 0;
  --digit-dir-y: 1;
  --dropdown-open-dur: 250ms;
  --dropdown-close-dur: 150ms;
  --dropdown-pre-scale: 0.97;
  --dropdown-closing-scale: 0.99;
  --dropdown-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --toast-open: 350ms;
  --toast-close: 250ms;
  --toast-distance: 16px;
  --toast-blur: 2px;
  --toast-scale: 0.97;
  --toast-ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
body { background: var(--navy-deep); color: var(--ink); }
.desk-surface { background-color: var(--navy-deep); filter: blur(23px) brightness(.26) saturate(.48); }
body[data-surface="custom"] .desk-surface { filter: blur(23px) brightness(.26) saturate(.48); }
body[data-surface="leather"] .desk-surface,
body[data-surface="walnut"] .desk-surface,
body[data-surface="stone"] .desk-surface { filter: brightness(.3) saturate(.46); }
#desk-light { opacity: .16; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline-color: var(--accent-bright); }
.page-shell { max-width: 1620px; padding-inline: clamp(24px, 4vw, 72px); }
.site-header { position: relative; z-index: 3; height: 65px; border-bottom-color: var(--line); }
.brand { gap: 7px; font-size: 13px; letter-spacing: .075em; }
.brand-mark { flex-basis: 45px; width: 45px; height: 45px; }
.brand-number { color: var(--accent-bright); font-weight: 600; }
.creator-credit { color: #b9cbcb; border-left-color: var(--line); }
.creator-credit strong { color: #e8f0e9; }
.header-button { border-color: var(--line); background: rgba(18, 38, 48, .52); color: #dce9e8; font-size: 12px; }
.header-button span:not(.chevron) { color: var(--accent-bright); }
.header-button:hover, .header-button[aria-expanded="true"] { border-color: rgba(160, 225, 229, .62); background: rgba(62, 121, 135, .22); color: #fff; }
.experience { position: relative; z-index: 1; grid-template-columns: minmax(245px, .88fr) minmax(335px, min(44vw, 560px)) minmax(230px, .76fr); gap: clamp(19px, 3vw, 50px); }
.intro { max-width: 360px; padding: 0; animation: scene-rise .65s var(--ease-smooth-out) both; }
.eyebrow, .instruction-label, .phone-caption, .metric-label, .panel-topline { font-family: "Courier New", Menlo, monospace; font-weight: 700; letter-spacing: .15em; }
.eyebrow { margin-bottom: 15px; color: var(--accent-bright); font-size: 11px; }
h1 { max-width: 390px; font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: clamp(52px, 5vw, 82px); line-height: .96; font-weight: 660; letter-spacing: -.065em; }
.period { color: var(--accent); }
.intro-copy { max-width: 320px; margin: 19px 0 20px; color: #d1dddd; font-size: 15px; line-height: 1.48; }
.primary-button, .secondary-button { min-height: 48px; min-width: 180px; border: 1px solid #ecfbf4; border-radius: 11px; padding-inline: 17px; background: #d8ece9; color: #152630; box-shadow: inset 0 2px 0 rgba(255,255,255,.9), inset 0 -2px 0 rgba(81,126,134,.17), 0 7px 20px rgba(0,0,0,.22); font-size: 13px; transition: transform var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out); }
.primary-button:hover, .secondary-button:hover { background: #f0faf2; box-shadow: inset 0 2px 0 rgba(255,255,255,1), 0 11px 25px rgba(0,0,0,.28); transform: translateY(-2px); }
.primary-button:active, .secondary-button:active { transform: translateY(1px) scale(.98); box-shadow: inset 0 2px 4px rgba(20,42,49,.2); }
.primary-button span, .secondary-button span { transition: transform var(--duration-fast) var(--ease-smooth-out); }
.primary-button:hover span, .secondary-button:hover span { transform: translate(2px,-2px); }
body[data-phase="loading"] .primary-button { background: linear-gradient(100deg, #c8deda 20%, #e9f7ee 45%, #c8deda 70%); background-size: 230% 100%; animation: connecting-sweep 1.1s linear infinite; }
.instructions { max-width: 320px; margin-top: 24px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--line); }
.instruction-label { color: var(--accent-bright); font-size: 10px; }
.instructions p { margin-top: 8px; color: #bdcece; font-size: 12px; line-height: 1.55; }
.instructions strong { color: #f0f4e8; }
.phone-area { width: min(100%, calc(66.667dvh - 80px), 540px); animation: phone-arrive .78s var(--ease-smooth-out) .08s both; }
.phone-area::before { content: ""; position: absolute; z-index: -1; left: 8%; right: 8%; top: 20%; bottom: 4%; border-radius: 50%; background: radial-gradient(ellipse, rgba(121,173,178,.21), transparent 70%); filter: blur(30px); pointer-events: none; }
.phone { filter: drop-shadow(0 37px 42px rgba(0,6,12,.6)); translate: 0 0; transition: transform .55s var(--ease-smooth-out), translate .55s var(--ease-smooth-out), filter .55s var(--ease-smooth-out); }
body[data-phase="running"] .phone { translate: 0 -5px; filter: drop-shadow(0 44px 48px rgba(0,6,12,.66)); }
.phone-logo::after { box-shadow: 0 0 0 2px rgba(115,203,213,.85), 0 0 22px rgba(115,203,213,.58); }
.phone-logo:focus-visible, .phone-key:focus-visible { outline-color: var(--accent); }
.phone-key::after { background: rgba(100,202,211,.21); }
.phone-caption { color: #9cb0b1; font-size: 9px; }
.score-panel { justify-self: end; max-width: 300px; padding: 14px 0 14px 24px; border-left: 1px solid var(--line); animation: scene-rise .65s var(--ease-smooth-out) .16s both; }
.panel-topline { gap: 8px; color: var(--accent-bright); font-size: 10px; }
.status-light { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #87b4b6; box-shadow: 0 0 0 3px rgba(116,193,196,.12); }
body[data-phase="running"] .status-light { background: #bde5cb; box-shadow: 0 0 0 4px rgba(130,218,164,.15); }
body[data-phase="over"] .status-light { background: #d7c6a5; }
.panel-line { background: var(--line); }
.state-enter { animation: state-in var(--duration-fast) var(--ease-smooth-out) both; }
.score-block { margin-top: 22px; }
.metric-label { color: #b6c9c9; font-size: 11px; }
.score-value, .score-value.t-digit-group { display: inline-flex; color: var(--lcd); font-family: "Courier New", Menlo, monospace; font-size: clamp(64px, 6.2vw, 98px); font-weight: 700; letter-spacing: -.11em; line-height: .98; }
.best-row { padding: 13px 0 16px; border-color: var(--line); color: #b9caca; }
.best-row strong { color: #e4ebdb; font-family: "Courier New", Menlo, monospace; font-size: 19px; }
.player-country-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 11px; border: 1px solid rgba(157,202,205,.24); border-radius: 999px; padding: 4px 9px 4px 5px; background: rgba(81,140,148,.1); color: #c4d6d2; font-size: 10px; }
.player-country-badge span:first-child { font-size: 15px; line-height: 1; }
.score-hint { margin-top: 16px; color: #aebfc0; font-size: 13px; }
.challenge-banner { border: 1px solid rgba(155,205,207,.32); background: rgba(63,106,113,.18); color: #e1eeee; }
.result { padding-top: 20px; }
.result:not([hidden]) { animation: result-rise var(--duration-slow) var(--ease-smooth-out) both; }
.result h2 { font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif; color: #f2f2e9; font-size: 26px; font-weight: 650; letter-spacing: -.035em; }
.result p, .score-form label { color: #c0d0d0; }
.result-actions { margin-top: 16px; }
.text-button { color: var(--accent-bright); }
.text-button:hover { color: #fff; }
.share-grid button, .share-grid a { border-color: var(--line); border-radius: 8px; background: rgba(103,159,169,.1); color: #e7f0ed; }
.share-grid button:hover, .share-grid a:hover { background: rgba(103,159,169,.24); transform: translateY(-2px); }
.score-form input { border-color: var(--line); background: rgba(9,23,31,.8); }
.score-form input::placeholder { color: #829b9c; }
.score-form #player-name { width: 100%; }
.score-form .country-field-label { margin: 14px 0 7px; color: var(--accent-bright); font-family: "Courier New", Menlo, monospace; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.country-control { display: flex; align-items: center; gap: 9px; min-height: 44px; border: 1px solid rgba(167,213,215,.34); border-radius: 9px; padding: 4px 10px 4px 5px; background: rgba(9,23,31,.72); transition: border-color var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out); }
.country-control:hover, .country-control:focus-within { border-color: var(--accent); background: rgba(22,51,62,.9); }
.country-flag { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid rgba(182,221,208,.42); border-radius: 7px; background: linear-gradient(145deg, #c3d4b2, #8aa69d); color: #17303b; font-size: 21px; line-height: 1; box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
#player-country { appearance: none; -webkit-appearance: none; flex: 1; min-width: 0; min-height: 34px; border: 0; background: transparent; color: #edf4e9; font-size: 12px; cursor: pointer; }
#player-country option { background: #17303b; color: #eef4ea; }
#player-country:focus-visible { outline: 0; }
.country-chevron { color: var(--accent-bright); font-size: 21px; line-height: 1; pointer-events: none; }
.post-score-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 43px; margin-top: 10px; border: 1px solid #e8f8f3; border-radius: 9px; padding: 0 13px; background: #d8ece9; color: #152630; font-size: 11px; font-weight: 800; transition: transform var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out); }
.post-score-button span { font-size: 18px; font-weight: 400; }
.post-score-button:hover { transform: translateY(-2px); background: #f0faf2; box-shadow: 0 7px 16px rgba(0,0,0,.2); }
.post-score-button:active { transform: translateY(1px) scale(.99); }
.post-score-button:disabled { opacity: .55; cursor: default; transform: none; }
body[data-phase="over"] .score-panel { max-height: calc(100dvh - 96px); overflow-y: auto; scrollbar-color: rgba(132,180,186,.45) transparent; }

/* The room board belongs to the score rail. It is quiet until requested. */
.leaderboard { width: 100%; max-width: none; margin: 24px 0 0; padding: 15px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); box-shadow: none; }
.leaderboard-head { display: grid; grid-template-columns: 31px minmax(0,1fr) 18px; align-items: center; gap: 10px; width: 100%; min-height: 58px; border: 0; padding: 0; background: transparent; color: inherit; text-align: left; }
.board-emblem { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid rgba(166,212,215,.35); border-radius: 9px; background: rgba(115,203,213,.12); color: var(--accent-bright); font-size: 19px; transition: transform var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out); }
.leaderboard-head:hover .board-emblem { transform: rotate(-12deg) scale(1.06); background: rgba(115,203,213,.24); }
.leaderboard-summary { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.leaderboard-kicker { margin: 0; color: var(--accent-bright); font-family: "Courier New", Menlo, monospace; font-size: 9px; font-weight: 700; letter-spacing: .09em; white-space: nowrap; }
.room-code { color: #a5c4c7; font-size: 9px; letter-spacing: .08em; }
.leaderboard-summary strong { color: #edf2e9; font-size: 14px; font-weight: 700; }
.leaderboard-head:hover .leaderboard-summary strong { color: #fff; }
.leaderboard-preview { overflow: hidden; color: #aebfc0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.board-chevron { color: var(--accent-bright); font-size: 22px; line-height: 1; }
.leaderboard-content { padding: 12px 0 4px; }
.invite-button { min-height: 36px; width: 100%; border: 1px solid rgba(150,204,207,.38); border-radius: 8px; background: rgba(98,158,167,.12); color: #e7f2ed; text-align: left; }
.invite-button:hover { background: rgba(98,158,167,.24); }
.invite-button span { color: var(--accent-bright); }
.leaderboard-status { color: #b1c6c5; font-size: 11px; }
.leaderboard-list { max-height: 170px; }
.leaderboard-list li { grid-template-columns: 23px 29px minmax(0,1fr) auto; gap: 7px; min-height: 49px; border-color: var(--line); }
.leaderboard-list .rank { color: var(--accent-bright); }
.leaderboard-list .player-flag { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(159,201,204,.25); border-radius: 7px; background: rgba(100,151,156,.12); font-size: 18px; line-height: 1; }
.leaderboard-list .player { display: flex; flex-direction: column; min-width: 0; gap: 2px; color: #e0eae6; }
.leaderboard-list .player-name, .leaderboard-list .player-country-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-list .player-name { font-size: 12px; font-weight: 700; }
.leaderboard-list .player-country-name { color: #a7bfc0; font-size: 9px; font-weight: 500; }
.leaderboard-list .points { color: var(--lcd); font-family: "Courier New", Menlo, monospace; font-size: 19px; }

/* A restrained glass dock for the soundtrack controls. */
.music-player { width: min(100%, 340px); margin-top: 25px; padding: 12px 14px 11px; border-color: rgba(178,221,224,.32); border-radius: 16px; background: linear-gradient(150deg, rgba(169,220,222,.14), rgba(39,76,89,.08) 55%), rgba(15,32,42,.64); box-shadow: inset 0 1px 0 rgba(226,255,251,.24), 0 11px 28px rgba(0,7,14,.22); backdrop-filter: blur(19px) saturate(125%); -webkit-backdrop-filter: blur(19px) saturate(125%); transition: border-color var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out); }
.music-player::before { background: radial-gradient(ellipse at 8% 0%, rgba(231,252,245,.14), transparent 53%); }
.music-player:hover { border-color: rgba(178,221,224,.52); }
.music-topline { color: #acd1d2; font-family: "Courier New", Menlo, monospace; }
.music-art { border-color: rgba(205,229,188,.62); border-radius: 8px; background: linear-gradient(135deg, #d6debb, #aeba9b); color: #314737; transition: transform var(--duration-medium) var(--ease-smooth-out), box-shadow var(--duration-medium) var(--ease-smooth-out); }
.music-player[data-playing="true"] .music-art { transform: rotate(0) scale(1.04); box-shadow: 0 0 0 3px rgba(115,203,213,.13); }
.music-details strong { color: #ecf3e8; }
.music-details span, .music-progress-row { color: #b9ced0; }
.music-details strong { font-size: 13px; }
.music-details span, .music-progress-row { font-size: 11px; }
.music-details strong.track-enter { animation: track-in var(--duration-fast) var(--ease-smooth-out) both; }
.music-progress-row input, .music-volume input { accent-color: var(--accent); }
.music-controls button { border-color: rgba(194,230,230,.42); }
.music-controls button:not(:disabled):hover { border-color: #cceff0; background-color: rgba(137,196,200,.21); }
.music-upload, .music-skip { background: rgba(92,149,160,.15); }
.music-skip { width: 36px; height: 36px; }
.music-play { width: 41px; height: 41px; }
.music-play { background: #ccebe8; color: #18303a !important; }
.music-play:not(:disabled):hover { background: #edfaf1 !important; }

.settings-panel { z-index: 12; top: 59px; border: 1px solid rgba(169,214,217,.29); border-radius: 15px; background: rgba(19,37,47,.97); color: var(--ink); box-shadow: 0 24px 60px rgba(0,7,12,.56); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.settings-head h2 { color: #f0f4e9; font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 650; }
.settings-head button { color: #eaf2ec; }
.setting-group { border-top-color: var(--line); }
.setting-group legend, .select-label, .toggle-row { color: #c4d5d3; }
.surface-option { border-color: var(--line); background: rgba(117,175,180,.08); color: #d8e7e3; }
.surface-option { transition: transform var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out); }
.surface-option:hover { transform: translateY(-2px); border-color: rgba(170,224,226,.57); background: rgba(117,175,180,.17); }
.surface-option:active { transform: translateY(0) scale(.98); }
.surface-option.selected { border-color: var(--accent); color: #f4fbf4; box-shadow: inset 0 0 0 1px rgba(115,203,213,.28); }
#speed-select { border-color: var(--line); background: #1c3440; color: #eef4ed; }
.toggle-track { background: #61777b; }
.toggle-row input:checked + .toggle-track { background: #6bbbc4; }
.toast { z-index: 30; border: 1px solid rgba(171,215,217,.42); border-radius: 10px; background: #1b3440; color: #eef7ee; box-shadow: 0 18px 38px rgba(0,7,12,.35); }

/* Transitions.dev recipes: accordion, number pop-in, dropdown, and toast. */
.t-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel {
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--acc-expand) var(--acc-ease);
}
.t-acc-panel-inner {
  overflow: hidden;
  opacity: 0;
  filter: blur(2px);
  transition:
    opacity var(--acc-collapse) var(--acc-ease),
    filter var(--acc-collapse) var(--acc-ease);
}
.t-acc[data-open="true"] .t-acc-panel-inner {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity var(--acc-expand) var(--acc-ease),
    filter var(--acc-expand) var(--acc-ease);
}
.t-acc-chevron {
  display: inline-flex;
  transform: scaleY(1);
  transform-origin: center;
  transition: transform var(--acc-chevron) var(--acc-ease);
}
.t-acc-chevron path { vector-effect: non-scaling-stroke; }
.t-acc[data-open="true"] .t-acc-chevron {
  transform: scaleY(-1);
}

@keyframes t-digit-pop-in {
  0%   {
    transform: translate(
      calc(var(--digit-distance) * var(--digit-dir-x)),
      calc(var(--digit-distance) * var(--digit-dir-y))
    );
    opacity: 0;
    filter: blur(var(--digit-blur));
  }
  100% { transform: translate(0, 0); opacity: 1; filter: blur(0); }
}
.t-digit-group {
  display: inline-flex;
  align-items: baseline;
}
.t-digit {
  display: inline-block;
  will-change: transform, opacity, filter;
}
.t-digit-group.is-animating .t-digit {
  animation: t-digit-pop-in var(--digit-dur) var(--digit-ease) both;
}
.t-digit-group.is-animating .t-digit[data-stagger="1"] {
  animation-delay: var(--digit-stagger);
}
.t-digit-group.is-animating .t-digit[data-stagger="2"] {
  animation-delay: calc(var(--digit-stagger) * 2);
}

.t-dropdown {
  transform-origin: top left;
  transform: scale(var(--dropdown-pre-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-open-dur) var(--dropdown-ease),
    opacity   var(--dropdown-open-dur) var(--dropdown-ease);
  will-change: transform, opacity;
}
.t-dropdown[data-origin="top-right"]     { transform-origin: top right; }
.t-dropdown[data-origin="top-center"]    { transform-origin: top center; }
.t-dropdown[data-origin="bottom-left"]   { transform-origin: bottom left; }
.t-dropdown[data-origin="bottom-center"] { transform-origin: bottom center; }
.t-dropdown[data-origin="bottom-right"]  { transform-origin: bottom right; }

.t-dropdown.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-dropdown.is-closing {
  transform: scale(var(--dropdown-closing-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-close-dur) var(--dropdown-ease),
    opacity   var(--dropdown-close-dur) var(--dropdown-ease);
}

.t-toast {
  opacity: 0;
  transform: translateY(var(--toast-distance)) scale(var(--toast-scale));
  filter: blur(var(--toast-blur));
  will-change: transform, opacity, filter;
  transition:
    opacity var(--toast-close) var(--toast-ease),
    transform var(--toast-close) var(--toast-ease),
    filter var(--toast-close) var(--toast-ease);
}
.t-toast.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity var(--toast-open) var(--toast-ease),
    transform var(--toast-open) var(--toast-ease),
    filter var(--toast-open) var(--toast-ease);
}
.toast.t-toast { transform: translate(-50%, var(--toast-distance)) scale(var(--toast-scale)); }
.toast.t-toast.is-open { transform: translate(-50%, 0) scale(1); }

@keyframes scene-rise { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes phone-arrive { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes state-in { from { opacity: .25; transform: translateY(4px); filter: blur(2px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes result-rise { from { opacity: 0; transform: translateY(9px); filter: blur(2px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes track-in { from { opacity: 0; transform: translateY(4px); filter: blur(2px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes connecting-sweep { to { background-position: -230% 0; } }

@media (max-width: 1120px) {
  .experience { grid-template-columns: minmax(190px, .84fr) minmax(315px, 1.22fr) minmax(185px, .78fr); gap: 18px; }
  .phone-area { width: min(100%, calc(66.667dvh - 80px), 500px); }
  .score-panel { max-width: 270px; padding-left: 17px; }
  h1 { font-size: clamp(48px, 5.2vw, 70px); }
}
@media (max-width: 860px) {
  .experience { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 24px; }
  .phone-area { width: min(100%, 500px); }
  .score-panel { grid-column: 1 / -1; width: 100%; max-width: none; padding: 20px 0 26px; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .panel-topline, .result, .score-hint, .challenge-banner, .leaderboard { grid-column: 1 / -1; }
  .leaderboard { max-width: 420px; }
  body[data-phase="over"] .score-panel { max-height: none; overflow: visible; }
  .creator-credit { display: none; }
}
@media (max-width: 620px) {
  .page-shell { padding-inline: 14px; }
  .site-header { height: 60px; }
  .experience { display: flex; flex-direction: column; gap: 0; }
  .phone-area { order: 0; width: min(100%, 460px); margin-top: -4px; }
  .intro { order: 1; width: 100%; max-width: none; display: block; padding: 15px 0 0; }
  .intro h1 { font-size: clamp(46px, 10.5vw, 66px); max-width: 390px; }
  .eyebrow { margin-bottom: 9px; }
  .intro-copy { margin: 13px 0 15px; font-size: 14px; }
  .instructions { display: block; margin-top: 16px; }
  .music-player { margin-top: 19px; width: min(100%, 370px); }
  .score-panel { order: 2; display: block; width: 100%; margin-top: 25px; padding: 20px 0 32px; border-top: 1px solid var(--line); }
  .score-value, .score-value.t-digit-group { font-size: 74px; }
  .leaderboard { max-width: 100%; margin-top: 20px; }
  .leaderboard-list { max-height: 180px; }
  .settings-panel { top: 54px; right: 12px; }
}
@media (max-width: 385px) {
  .brand-mark { flex-basis: 35px; width: 35px; height: 35px; }
  .header-actions { gap: 6px; }
  .header-button { padding-inline: 9px; }
}
@supports not (backdrop-filter: blur(1px)) {
  .music-player { background: #17303b; }
  .settings-panel { background: #142a35; }
}
@media (prefers-reduced-transparency: reduce) {
  .music-player { background: #17303b; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .settings-panel { background: #142a35; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .t-acc-panel, .t-acc-panel-inner, .t-acc-chevron { transition: none !important; }
  .t-digit-group .t-digit { animation: none !important; }
  .t-dropdown { transition: none !important; }
  .t-toast { transition: none !important; }
  .intro, .phone-area, .score-panel, .state-enter, .result:not([hidden]), .music-details strong.track-enter, .primary-button { animation: none !important; }
  .phone { transform: none !important; translate: none !important; }
}
