:root {
  color-scheme: dark;
  --ink: #faf9ee;
  --muted: #d5d9cf;
  --fine: #afb8ad;
  --accent: #edfb78;
  --panel: rgba(12, 20, 19, .77);
  --shadow: rgba(0, 0, 0, .38);
  font-family: Inter, "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-width: 320px; min-height: 100dvh; overflow-x: hidden; background: #101516; color: var(--ink); }
button, select { font: inherit; }
button { cursor: pointer; }
button, a, select, summary, .phone, .lcd-glass { -webkit-tap-highlight-color: transparent; }
button, a, summary, .phone, .lcd-glass { -webkit-user-select: none; user-select: none; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible), summary:focus:not(:focus-visible) { outline: none; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: inherit; }
[hidden] { display: none !important; }
#desk-light, .desk-surface { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.desk-surface { z-index: -2; background: #101516 url("./assets/mountain-photo.webp") center / cover; filter: blur(20px) brightness(.34) saturate(.66); transform: scale(1.08); }
#desk-light { z-index: -1; opacity: .24; }
body[data-surface="leather"] .desk-surface { background-image: url("./assets/leather-texture.webp"); filter: brightness(.43) saturate(.58); }
body[data-surface="walnut"] .desk-surface { background-image: url("./assets/walnut-texture.webp"); filter: brightness(.43) saturate(.7); }
body[data-surface="stone"] .desk-surface { background-image: url("./assets/stone-texture.webp"); filter: brightness(.43) saturate(.7); }
body[data-surface="custom"] .desk-surface { background-image: var(--custom-background); filter: blur(20px) brightness(.34) saturate(.66); }
body[data-surface="carpet"] .desk-surface { background-image: url("./assets/retro-arcade-carpet.png"); }
body[data-surface="arcade"] .desk-surface { background-image: url("./assets/olive-snake-scale-mosaic.png"); }
body[data-surface="crt"] .desk-surface { background-image: url("./assets/crt-glow-desk.webp"); }
.page-shell { position: relative; display: flex; flex-direction: column; min-height: 100dvh; max-width: 1800px; margin: auto; padding: 0 clamp(24px, 4vw, 76px); }
.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; }
.site-header { height: 64px; gap: 24px; border-bottom: 1px solid rgba(250,249,238,.22); }
.brand-wrap { display: flex; align-items: center; gap: 22px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; font-size: 13px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: block; flex: 0 0 48px; width: 48px; height: 48px; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.brand-number { font-weight: 500; color: #dae0d5; }
.creator-credit { padding-left: 20px; border-left: 1px solid rgba(250,249,238,.24); color: #cbd4c8; font-size: 11px; white-space: nowrap; }
.creator-credit strong { color: var(--ink); font-weight: 650; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-button { min-height: 36px; border: 1px solid rgba(250,249,238,.36); border-radius: 999px; padding: 0 13px; background: rgba(13,21,20,.38); color: var(--ink); font-size: 11px; font-weight: 650; white-space: nowrap; transition: background-color .18s ease, border-color .18s ease; }
.header-button span:not(.chevron) { color: var(--accent); }
.header-button:hover { border-color: var(--accent); background: rgba(237,251,120,.1); }
.chevron { display: inline-block; margin-left: 8px; font-size: 18px; line-height: 0; transition: transform .25s cubic-bezier(.2,0,0,1); }
.surface-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.experience { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(280px, min(32vw, 430px)) minmax(205px, .85fr); align-items: center; gap: clamp(16px, 2.5vw, 48px); flex: 1 0 auto; min-height: 0; }
.intro { align-self: center; max-width: 390px; padding: 8px 0; z-index: 1; }
.eyebrow, .instruction-label, .phone-caption, .panel-topline, .metric-label { font-size: 10px; line-height: 1.35; font-weight: 800; letter-spacing: .19em; }
.eyebrow { margin: 0 0 17px; color: var(--accent); text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 4.75vw, 85px); line-height: .94; letter-spacing: -.072em; font-weight: 400; text-wrap: balance; }
.period { color: var(--accent); }
.intro-copy { margin: 19px 0 19px; max-width: 320px; color: #e4e8dd; font-size: clamp(13px, 1vw, 15px); line-height: 1.5; text-wrap: pretty; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 35px; min-width: 184px; min-height: 46px; border: 1px solid #f7ffb6; border-radius: 999px; padding: 0 19px; color: #17201a; background: var(--accent); font-size: 12px; line-height: 1; font-weight: 800; white-space: nowrap; box-shadow: 0 9px 25px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.55); transition: transform .18s cubic-bezier(.2,0,0,1), background-color .18s cubic-bezier(.2,0,0,1), box-shadow .18s cubic-bezier(.2,0,0,1); }
.primary-button:hover, .secondary-button:hover { background: #f4ffa7; box-shadow: 0 12px 28px rgba(0,0,0,.24); }
.primary-button:active, .secondary-button:active { transform: scale(.96); }
.primary-button span, .secondary-button span { font-size: 20px; font-weight: 400; line-height: 0; }
/* A web approximation of a layered glass material, with a solid contrast fallback. */
.music-player { position: relative; isolation: isolate; width: min(100%, 330px); margin-top: 18px; padding: 12px 14px 11px; overflow: hidden; border: 1px solid rgba(255,255,255,.42); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.09) 50%, rgba(255,255,255,.17)), rgba(25,39,36,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(255,255,255,.12), 0 14px 35px rgba(0,0,0,.2); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); }
.music-player::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: radial-gradient(ellipse at 10% 0%, rgba(255,255,255,.27), transparent 48%), radial-gradient(ellipse at 100% 100%, rgba(237,251,120,.12), transparent 48%); pointer-events: none; }
.music-topline, .music-main, .music-progress-row, .music-controls, .music-transport, .music-volume { display: flex; align-items: center; }
.music-topline { justify-content: space-between; color: #f0f4e4; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.music-main { gap: 10px; min-width: 0; margin-top: 8px; }
.music-art { display: grid; flex: 0 0 37px; width: 37px; height: 37px; place-items: center; border: 1px solid rgba(255,255,255,.53); border-radius: 12px; background: linear-gradient(135deg, #f5f6df, #cbd8b0); color: #263322; font-family: Georgia, serif; font-size: 22px; transform: rotate(-5deg); box-shadow: 0 3px 9px rgba(0,0,0,.16); }
.music-details { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.music-details strong { overflow: hidden; color: #fffef6; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.music-details span { overflow: hidden; color: #e0e7da; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.music-progress-row { gap: 8px; margin-top: 9px; color: #eef1e7; font-size: 9px; font-variant-numeric: tabular-nums; }
.music-progress-row input { flex: 1; min-width: 0; height: 14px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.music-progress-row input:disabled { opacity: .5; cursor: default; }
.music-controls { justify-content: space-between; gap: 7px; margin-top: 5px; }
.music-controls button { display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.5); color: #fffef6; transition: transform .18s ease, background-color .18s ease, border-color .18s ease; }
.music-controls button:not(:disabled):hover { transform: translateY(-1px); border-color: #fff; background-color: rgba(255,255,255,.21); }
.music-controls button:disabled { cursor: default; opacity: .5; }
.music-upload { min-height: 30px; border-radius: 999px; padding: 0 9px; background: rgba(255,255,255,.16); font-size: 10px; font-weight: 700; white-space: nowrap; }
.music-transport { gap: 4px; }
.music-skip { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.13); font-size: 19px; line-height: 1; padding-bottom: 2px; }
.music-play { width: 35px; height: 35px; border-radius: 50%; background: var(--accent); color: #19231b !important; font-size: 13px; padding-left: 2px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 10px rgba(0,0,0,.2); }
.music-play:not(:disabled):hover { background: #f5ffaa !important; }
.music-volume { gap: 5px; color: #fffef6; font-size: 16px; }
.music-volume input { width: 45px; height: 14px; margin: 0; accent-color: var(--accent); cursor: pointer; }
@supports not (backdrop-filter: blur(1px)) { .music-player { background: #33423e; } }
@media (prefers-reduced-transparency: reduce) { .music-player { background: #33423e; backdrop-filter: none; -webkit-backdrop-filter: none; } }
.instructions { margin-top: 17px; max-width: 300px; padding-top: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.instruction-label { color: var(--accent); }
.instructions p { margin: 7px 0 0; color: #d2d8cd; font-size: 11px; line-height: 1.42; text-wrap: pretty; }
.instructions strong { color: var(--ink); letter-spacing: .14em; white-space: nowrap; }
.phone-area { align-self: center; justify-self: center; width: min(100%, calc(66.667dvh - 183px), 430px); position: relative; z-index: 1; }
.phone { position: relative; width: 100%; aspect-ratio: 2 / 3; filter: drop-shadow(0 32px 35px rgba(0,0,0,.45)); transform: perspective(1500px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)); transform-origin: 50% 50%; transition: transform .55s cubic-bezier(.2,0,0,1), filter .55s cubic-bezier(.2,0,0,1); }
.phone-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
.phone-press-art {
  position: absolute; z-index: 1; inset: 0; pointer-events: none;
  background: url("./assets/phone-pressed-keys.png") center / 100% 100% no-repeat;
  opacity: 0; transform: translateY(-.14%) scale(1.003);
  transition: opacity 150ms ease-out, transform 150ms cubic-bezier(.22, 1, .36, 1);
}
/* Four feathered crops preserve the photographed key and its recessed rim. */
.phone-press-art-up { -webkit-mask-image: radial-gradient(ellipse 9% 4% at 49.6% 64.8%, #000 63%, transparent 100%); mask-image: radial-gradient(ellipse 9% 4% at 49.6% 64.8%, #000 63%, transparent 100%); }
.phone-press-art-left { -webkit-mask-image: radial-gradient(ellipse 8.8% 4% at 32.4% 70.2%, #000 63%, transparent 100%); mask-image: radial-gradient(ellipse 8.8% 4% at 32.4% 70.2%, #000 63%, transparent 100%); }
.phone-press-art-right { -webkit-mask-image: radial-gradient(ellipse 8.8% 4% at 67.2% 70.2%, #000 63%, transparent 100%); mask-image: radial-gradient(ellipse 8.8% 4% at 67.2% 70.2%, #000 63%, transparent 100%); }
.phone-press-art-five { -webkit-mask-image: radial-gradient(ellipse 9% 4% at 49.6% 71.9%, #000 63%, transparent 100%); mask-image: radial-gradient(ellipse 9% 4% at 49.6% 71.9%, #000 63%, transparent 100%); }
.phone:has(.key-up.pressed) .phone-press-art-up,
.phone:has(.key-left.pressed) .phone-press-art-left,
.phone:has(.key-right.pressed) .phone-press-art-right,
.phone:has(.key-five.pressed) .phone-press-art-five {
  opacity: 1; transform: translateY(.12%) scale(1);
  transition-duration: 80ms;
}
.phone-logo { position: absolute; z-index: 2; left: 34%; top: 15.7%; width: 32%; height: 4.7%; min-height: 30px; border: 0; border-radius: 5px; background: transparent; padding: 0; touch-action: manipulation; }
.phone-logo::after { content: ""; position: absolute; inset: 1px; border-radius: 5px; box-shadow: 0 0 0 2px rgba(237,251,120,.78), 0 0 18px rgba(237,251,120,.45); opacity: 0; transition: opacity .18s ease; }
.phone-logo:focus-visible::after, .phone-logo.ringing::after { opacity: 1; }
.phone-logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lcd-glass { position: absolute; left: 31.1%; top: 26.1%; width: 37.8%; height: 17.55%; overflow: hidden; touch-action: none; }
#lcd { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; opacity: 1; transition: opacity 180ms ease-in-out; }
#lcd.is-fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) { #lcd { transition: none; } }
.phone-key { position: absolute; z-index: 3; appearance: none; border: 0; background: transparent; border-radius: 50%; min-width: 40px; min-height: 40px; padding: 0; touch-action: manipulation; }
.phone-key:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.phone-key::after { content: ""; position: absolute; inset: 3px; border-radius: inherit; background: rgba(237,251,120,.18); opacity: 0; transition: opacity .16s ease; }
.phone-key.pressed::after { opacity: 1; }
.phone-key:is(.key-up, .key-left, .key-five, .key-right).pressed::after { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .phone-logo:hover::after, .phone-key:not(.key-up, .key-left, .key-five, .key-right):hover::after { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .phone-press-art { transition: none; transform: none !important; }
}
.key-select { left: 38%; top: 48.4%; width: 24%; height: 4%; border-radius: 50%; }
.key-c { left: 28.7%; top: 50.8%; width: 12%; height: 7%; transform: rotate(-28deg); border-radius: 26%; }
.key-up { left: 42.6%; top: 62.3%; width: 15%; height: 5.5%; }
.key-left { left: 25.9%; top: 68.8%; width: 14%; height: 5.5%; transform: rotate(19deg); }
.key-five { left: 42.5%; top: 69.1%; width: 15%; height: 5.6%; }
.key-right { left: 60.4%; top: 68.8%; width: 14%; height: 5.5%; transform: rotate(-19deg); }
.key-down { left: 42.8%; top: 76.5%; width: 15%; height: 5.5%; }
.key-turn-left { left: 26.5%; top: 82.4%; width: 15%; height: 6%; transform: rotate(17deg); }
.key-turn-right { left: 59.5%; top: 82.4%; width: 15%; height: 6%; transform: rotate(-17deg); }
.phone-caption { margin: -6px 0 0; color: #c4ccbd; text-align: center; font-size: 9px; }
.score-panel { align-self: center; justify-self: end; width: 100%; max-width: 290px; padding: 0 0 12px; }
.panel-topline { display: flex; align-items: center; gap: 15px; color: var(--accent); white-space: nowrap; }
.panel-line { height: 1px; flex: 1; background: rgba(255,255,255,.25); }
.score-block { margin-top: 16px; }
.metric-label { margin: 0 0 4px; color: #e4e7d9; }
.score-value { display: block; font-size: clamp(56px, 5.5vw, 92px); font-weight: 550; line-height: .98; letter-spacing: -.075em; font-variant-numeric: tabular-nums; }
.best-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.3); color: #d7dfd1; font-size: 12px; }
.best-row strong { color: var(--ink); font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.score-hint { margin: 18px 0 0; max-width: 240px; color: #cbd3c7; font-size: 13px; line-height: 1.5; text-wrap: pretty; }
.challenge-banner { margin-top: 20px; border-radius: 10px; padding: 13px 15px; background: rgba(237,251,120,.12); box-shadow: inset 0 0 0 1px rgba(237,251,120,.28); color: #f3f8c0; font-size: 13px; line-height: 1.4; }
.result { padding-top: 25px; }
.result h2 { margin: 0 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-weight: 400; line-height: 1.05; letter-spacing: -.045em; text-wrap: balance; }
.result p { margin: 0; color: #c1c8c3; font-size: 13px; line-height: 1.5; }
.result-actions { display: flex; flex-direction: column; align-items: stretch; gap: 9px; margin-top: 21px; }
.secondary-button { width: 100%; }
.text-button { min-height: 40px; border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 700; text-align: left; }
.text-button:hover { color: #f4ffa7; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.share-grid button, .share-grid a { display: grid; place-items: center; min-height: 42px; padding: 7px 4px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(255,255,255,.065); color: #e4e8e4; text-decoration: none; font-size: 11px; font-weight: 600; text-align: center; transition: background-color .18s ease, transform .18s ease; }
.share-grid button:hover, .share-grid a:hover { background: rgba(255,255,255,.13); }
.share-grid button:active, .share-grid a:active { transform: scale(.96); }
.result .share-note { margin-top: 13px; font-size: 11px; color: #9fa9a3; }
.score-form { margin-top: 19px; }
.score-form label { display: block; margin-bottom: 8px; color: #d4e0db; font-size: 12px; font-weight: 700; }
.score-form-row { display: flex; gap: 7px; }
.score-form input { min-width: 0; width: 100%; min-height: 42px; border: 1px solid rgba(255,255,255,.27); border-radius: 7px; padding: 0 10px; background: rgba(18,27,27,.75); color: var(--ink); font-size: 12px; }
.score-form input::placeholder { color: #aebbb7; }
.score-form-row button { flex: 0 0 auto; min-height: 42px; border: 0; border-radius: 999px; padding: 0 15px; background: var(--accent); color: #17201a; font-size: 11px; font-weight: 800; transition: transform .18s ease, background-color .18s ease; }
.score-form-row button:hover { background: #f4ffa7; }
.score-form-row button:active { transform: scale(.96); }
.score-form-row button:disabled { opacity: .55; cursor: default; }
.submit-status { min-height: 0; margin: 6px 0 0 !important; color: #b9c6c0 !important; font-size: 11px !important; }
.submit-status:empty { display: none; }
.leaderboard { width: 100%; max-width: 1120px; margin: 7px auto 12px; padding: 14px 20px 12px; border-radius: 15px; background: #f4f3e9; color: #18201b; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.leaderboard-header { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.leaderboard-kicker { margin: 0 0 5px; color: #596143; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.leaderboard h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 2.7vw, 38px); font-weight: 400; line-height: 1; letter-spacing: -.057em; text-wrap: balance; }
.room-actions { display: flex; align-items: center; gap: 14px; }
.room-code { color: #5a625a; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .18em; }
.invite-button { min-height: 42px; border: 1px solid #1c251e; border-radius: 999px; padding: 0 15px; background: #1c251e; color: #f6f6e9; font-size: 12px; font-weight: 700; white-space: nowrap; transition: background-color .18s ease, transform .18s ease; }
.invite-button:hover { background: #3d473d; }
.invite-button:active { transform: scale(.96); }
.invite-button span { margin-left: 9px; color: var(--accent); font-size: 16px; }
.leaderboard-status { margin-top: 6px; min-height: 20px; display: flex; align-items: center; color: #59635a; font-size: 11px; line-height: 1.35; }
.leaderboard-list { list-style: none; max-height: 126px; margin: 10px 0 0; padding: 0; overflow-y: auto; scrollbar-color: #889276 transparent; }
.leaderboard-list li { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 42px; border-top: 1px solid rgba(27,36,30,.16); }
.leaderboard-list .rank { color: #647023; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.leaderboard-list .player { overflow: hidden; color: #252d25; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-list .points { color: #18201b; font-size: 24px; font-weight: 750; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.site-footer { min-height: 37px; gap: 20px; border-top: 1px solid rgba(250,249,238,.2); color: #d4dbd0; font-size: 10px; letter-spacing: .02em; }
#maker-name { color: var(--ink); }
.site-footer a { color: #d2dbd5; text-underline-offset: 3px; }
.settings-panel { position: fixed; z-index: 10; right: clamp(20px, 4.4vw, 88px); top: 60px; width: min(330px, calc(100vw - 40px)); padding: 22px; border-radius: 15px; background: #f4f3e9; color: #18201b; box-shadow: 0 30px 70px rgba(0,0,0,.48); }
.settings-head { display: flex; align-items: center; justify-content: space-between; }
.settings-head h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 400; letter-spacing: -.04em; }
.settings-head button { min-width: 40px; min-height: 40px; border: 0; background: transparent; color: #18201b; font-size: 24px; }
.setting-group { margin: 18px 0 0; padding: 18px 0 0; border: 0; border-top: 1px solid rgba(27,36,30,.18); }
.setting-group legend { float: left; width: 100%; padding: 0; color: #59635a; font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.surface-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; clear: both; padding-top: 12px; }
.surface-option { display: flex; align-items: center; gap: 8px; min-height: 47px; border: 1px solid rgba(27,36,30,.17); border-radius: 9px; padding: 6px 8px; background: rgba(255,255,255,.5); color: #263026; text-align: left; font-size: 11px; }
.surface-option.selected { border-color: #1d261e; color: #162016; box-shadow: inset 0 0 0 1px #1d261e; }
.swatch { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 5px; border: 1px solid rgba(255,255,255,.18); }
.swatch-mountain { background: #243339 url("./assets/mountain-photo.webp") center / cover; }
.swatch-carpet { background: #111827 url("./assets/retro-arcade-carpet.png") center / cover; }
.swatch-arcade { background: #282516 url("./assets/olive-snake-scale-mosaic.png") center / cover; }
.swatch-crt { background: #111827 url("./assets/crt-glow-desk.webp") center / cover; }
.swatch-leather { background: #242727 url("./assets/leather-texture.webp") center / 100px; }
.swatch-walnut { background: #312019 url("./assets/walnut-texture.webp") center / 100px; }
.swatch-stone { background: #3b4040 url("./assets/stone-texture.webp") center / 100px; }
.swatch-custom { font-size: 18px; font-weight: 300; }
.select-label { display: block; clear: both; padding-top: 13px; margin-bottom: 6px; color: #263026; font-size: 12px; }
#speed-select { width: 100%; min-height: 43px; border: 1px solid rgba(27,36,30,.2); border-radius: 7px; padding: 0 10px; color: #18201b; background: #fffef5; font-size: 12px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; margin-top: 8px; color: #263026; font-size: 12px; cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-track { width: 38px; height: 22px; border-radius: 99px; background: #545e5b; position: relative; transition: background-color .2s ease; }
.toggle-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #f0f1ea; transition: transform .2s ease; }
.toggle-row input:checked + .toggle-track { background: #828e26; }
.toggle-row input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle-row input:focus-visible + .toggle-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.toast { position: fixed; z-index: 20; bottom: 26px; left: 50%; padding: 11px 17px; border-radius: 8px; background: #e7f0e9; color: #172225; font-size: 12px; font-weight: 700; box-shadow: 0 12px 35px rgba(0,0,0,.3); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 1120px) {
  .experience { grid-template-columns: minmax(190px, .85fr) minmax(325px, 1.25fr) minmax(170px, .8fr); gap: 14px; }
  h1 { font-size: clamp(42px, 4.6vw, 62px); }
  .score-value { font-size: clamp(51px, 5.4vw, 65px); }
  .score-panel { max-width: 230px; }
}
@media (max-width: 820px) {
  .page-shell { padding: 0 24px; }
  .site-header { height: 64px; }
  .experience { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .intro { padding: 0; }
  .intro h1 { font-size: clamp(44px, 7.8vw, 67px); }
  .instructions { margin-top: 14px; }
  .phone-area { width: min(100%, 480px); }
  .score-panel { grid-column: 1 / -1; justify-self: stretch; max-width: none; padding: 15px 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .panel-topline { grid-column: 1 / -1; }
  .best-row { align-self: end; }
  .score-hint, .result, .challenge-banner { grid-column: 1 / -1; }
  .leaderboard { margin: 15px auto 22px; }
}
@media (max-width: 620px) {
  .page-shell { padding: 0 18px; }
  .site-header { height: 60px; }
  .brand { font-size: 11px; }
  .brand-mark { flex-basis: 40px; width: 40px; height: 40px; }
  .brand-wrap { gap: 9px; }
  .creator-credit { padding-left: 9px; font-size: 9px; }
  .header-actions { gap: 13px; }
  .header-button { font-size: 11px; }
  .surface-toggle { font-size: 0; }
  .surface-toggle .chevron { font-size: 21px; }
  .experience { display: flex; flex-direction: column; gap: 0; }
  .intro { order: 1; align-self: stretch; width: 100%; max-width: none; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding-top: 12px; }
  .eyebrow { grid-column: 1 / -1; margin-bottom: 10px; font-size: 9px; }
  .intro h1 { font-size: clamp(41px, 10.7vw, 61px); }
  .intro-copy { grid-column: 1 / -1; margin: 13px 0 15px; font-size: 13px; max-width: 290px; }
  .primary-button { grid-column: 1 / -1; min-height: 45px; width: 100%; max-width: 240px; }
  .music-player { grid-column: 1 / -1; width: min(100%, 350px); margin-top: 16px; }
  .instructions { display: none; }
  .phone-area { order: 0; margin-top: -4px; width: min(100%, 440px); }
  .phone-caption { margin-top: -2px; }
  .score-panel { order: 2; display: block; width: 100%; margin-top: 15px; padding: 0 0 28px; }
  .leaderboard { margin: 8px auto 18px; padding: 17px 16px 13px; border-radius: 12px; }
  .leaderboard-header { align-items: flex-start; flex-direction: column; gap: 17px; }
  .room-actions { justify-content: space-between; width: 100%; }
  .leaderboard-list li { min-height: 52px; }
  .leaderboard-list { max-height: none; }
  .score-block { margin-top: 14px; }
  .score-value { font-size: 64px; }
  .best-row { margin-top: 4px; padding: 10px 0 15px; }
  .site-footer { min-height: 48px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 3px; font-size: 9px; }
  .settings-panel { top: 58px; right: 12px; }
}
@media (max-width: 385px) { .brand-number { display: none; } .phone-area { margin-top: 2px; } }
@media (max-width: 420px) { .creator-credit { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .phone { transform: none !important; }
}
