/* A flat instrument surface around the bright, physical handset. */
:root {
  --ink: #eeeeee;
  --muted: #b8b3b0;
  --fine: #8a8380;
  --accent: #a0ca92;
  --accent-bright: #c1dfb7;
  --lcd: #a0ca92;
  --navy: #1d1a18;
  --navy-deep: #101010;
  --line: #3d3a39;
  --panel: #1d1a18;
  --digit-blur: 0px;
  --toast-blur: 0px;
  font-family: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { background: #101010; }
h1, h2 { text-wrap: balance; }
p, li, .phone-caption { text-wrap: pretty; }
.score-value, .best-row strong, .leaderboard-list .points,
.music-progress-row, #music-track-number, .room-code { font-variant-numeric: tabular-nums; }

/* Keep the chosen photograph, but let the handset be the one bright object. */
.desk-surface,
body[data-surface="custom"] .desk-surface { filter: blur(27px) brightness(.13) saturate(.39); }
body[data-surface="leather"] .desk-surface,
body[data-surface="walnut"] .desk-surface,
body[data-surface="stone"] .desk-surface { filter: brightness(.18) saturate(.35); }
#desk-light { opacity: .18; }
.page-shell::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: rgba(10, 10, 10, .35);
}

.site-header {
  z-index: 4;
  height: 64px;
  border-bottom: 1px solid rgba(238,238,238,.17);
  background: transparent;
}
.brand { gap: .18em; color: #eeeeee; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 700; letter-spacing: -.065em; line-height: 1; }
.brand-mark { flex-basis: 42px; width: 42px; height: 42px; }
.brand-mark img { width: 100%; height: 100%; }
.brand-number { color: inherit; font-weight: inherit; }
.creator-credit { border-left-color: #3d3a39; color: #a9a4a1; font-size: 11px; }
.creator-credit strong { color: #eeeeee; font-weight: 500; }
.header-button {
  min-height: 40px;
  border: 1px solid #4b4746;
  border-radius: 3px;
  padding-inline: 13px;
  background: #1d1a18;
  color: #eeeeee;
  font-size: 12px;
  font-weight: 400;
  box-shadow: none;
  transition: scale 150ms cubic-bezier(.4,0,.2,1), background-color 150ms cubic-bezier(.4,0,.2,1), border-color 150ms cubic-bezier(.4,0,.2,1);
}
.header-button span:not(.chevron) { color: #a0ca92; }
.header-button:hover, .header-button[aria-expanded="true"] { border-color: #b8b3b0; background: #292522; color: #fff; }
.header-button:active { scale: .96; }

.experience { grid-template-columns: minmax(235px,.88fr) minmax(350px,min(44vw,560px)) minmax(235px,.76fr); gap: clamp(22px,3vw,52px); }
.intro { max-width: 380px; animation: none; }
.eyebrow, .instruction-label, .phone-caption, .metric-label, .panel-topline,
.music-topline, .leaderboard-kicker, .room-code, .score-form .country-field-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-weight: 400;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: #b8b3b0; font-size: 12px; animation: instrument-in 290ms cubic-bezier(.4,0,.2,1) 20ms both; }
.eyebrow::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: #ee6018; }
h1 { max-width: 405px; color: #eeeeee; font-family: Georgia, "Times New Roman", serif; font-size: clamp(54px,4.8vw,78px); font-weight: 700; line-height: .91; letter-spacing: -.075em; }
.intro h1 { font-size: clamp(56px,4.5vw,76px); animation: instrument-in 310ms cubic-bezier(.4,0,.2,1) 110ms both; }
.period { color: inherit; }
.intro-copy { max-width: 330px; margin: 22px 0 24px; color: #b8b3b0; font-size: 16px; line-height: 1.5; animation: instrument-in 310ms cubic-bezier(.4,0,.2,1) 160ms both; }
.primary-button, .secondary-button {
  min-width: 186px;
  min-height: 48px;
  border: 0;
  border-radius: 3px;
  padding-left: 16px;
  padding-right: 14px;
  background: #fafafa;
  color: #101010;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  transition: scale 150ms cubic-bezier(.4,0,.2,1), background-color 150ms cubic-bezier(.4,0,.2,1);
}
.intro > .primary-button { animation: instrument-in 310ms cubic-bezier(.4,0,.2,1) 230ms both; }
.primary-button:hover, .secondary-button:hover { background: #e9e9e9; box-shadow: none; transform: none; }
.primary-button:active, .secondary-button:active { transform: none; scale: .96; }
.primary-button:hover span, .secondary-button:hover span { transform: translate(2px,-2px); }
.instructions { max-width: 350px; margin-top: 24px; border-top: 1px solid #3d3a39; padding-top: 16px; box-shadow: none; animation: instrument-in 310ms cubic-bezier(.4,0,.2,1) 300ms both; }
.instruction-label { color: #b8b3b0; font-size: 12px; }
.instructions p { color: #a9a4a1; font-size: 13px; line-height: 1.5; }
.instructions strong { display: inline-block; border: 1px solid #514c49; border-radius: 3px; padding: 1px 4px; background: #1d1a18; color: #eeeeee; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 400; letter-spacing: -.02em; }

.music-player {
  width: min(100%,340px);
  margin-top: 24px;
  border: 1px solid #3d3a39;
  border-radius: 10px;
  background: #1d1a18;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: instrument-in 310ms cubic-bezier(.4,0,.2,1) 370ms both;
}
.music-player::before { display: none; }
.music-player:hover { border-color: #625c58; background: #211e1c; box-shadow: none; }
.music-topline { color: #b8b3b0; font-size: 11px; }
.music-art { border: 1px solid #666861; border-radius: 3px; background: #a0ca92; color: #18231c; box-shadow: none; transform: none; }
.music-player[data-playing="true"] .music-art { transform: none; box-shadow: none; }
.music-details strong { color: #eeeeee; font-weight: 500; }
.music-details span, .music-progress-row { color: #b8b3b0; }
.music-controls button { border: 1px solid #514c49; box-shadow: none; transition: scale 150ms cubic-bezier(.4,0,.2,1), background-color 150ms cubic-bezier(.4,0,.2,1), border-color 150ms cubic-bezier(.4,0,.2,1); }
.music-controls button:not(:disabled):hover { border-color: #a9a4a1; background: #33302d; transform: none; }
.music-controls button:not(:disabled):active { scale: .96; }
.music-upload { min-height: 40px; border-radius: 3px; background: #292522; }
.music-skip { width: 40px; height: 40px; border-radius: 3px; background: #292522; }
.music-play { width: 44px; height: 44px; border-radius: 3px; background: #eeeeee; color: #101010 !important; }
.music-play:not(:disabled):hover { background: #fafafa !important; }
.music-icon-stack { display: grid; position: relative; place-items: center; width: 18px; height: 18px; }
.music-icon-play, .music-icon-pause { grid-area: 1 / 1; transition: opacity 300ms cubic-bezier(.2,0,0,1), scale 300ms cubic-bezier(.2,0,0,1), filter 300ms cubic-bezier(.2,0,0,1); }
.music-icon-play { translate: 1px 0; opacity: 1; scale: 1; filter: blur(0); }
.music-icon-pause { opacity: 0; scale: .25; filter: blur(4px); }
.music-player[data-playing="true"] .music-icon-play { opacity: 0; scale: .25; filter: blur(4px); }
.music-player[data-playing="true"] .music-icon-pause { opacity: 1; scale: 1; filter: blur(0); }
.music-progress-row input, .music-volume input { height: 40px; accent-color: #a0ca92; }

.audio-tuning {
  width: min(100%,340px);
  margin-top: 8px;
  border: 1px solid #3d3a39;
  border-radius: 10px;
  padding: 12px 14px 10px;
  background: #1d1a18;
  color: #eeeeee;
  animation: instrument-in 310ms cubic-bezier(.4,0,.2,1) 420ms both;
}
.audio-tuning-heading, .audio-control-meta, .volume-scale { display: flex; align-items: center; justify-content: space-between; }
.audio-tuning-heading, .audio-control-meta label, .audio-control-meta output, .volume-scale, .audio-tuning-note {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-weight: 400;
  letter-spacing: -.02em;
}
.audio-tuning-heading { color: #b8b3b0; font-size: 11px; }
.audio-tuning-index { color: #a0ca92; }
.audio-control-row { margin-top: 9px; }
.audio-control-row + .audio-control-row { margin-top: 4px; border-top: 1px solid #3d3a39; padding-top: 9px; }
.audio-control-meta { gap: 10px; min-height: 16px; }
.audio-control-meta label { color: #eeeeee; font-size: 11px; }
.audio-control-meta output, .audio-time { color: #a0ca92; font-size: 12px; font-variant-numeric: tabular-nums; }
.audio-time span[aria-hidden] { color: #8a8380; }
.audio-range { display: block; width: 100%; height: 32px; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.audio-range:disabled { opacity: .45; cursor: default; }
.audio-range::-webkit-slider-runnable-track {
  height: 6px;
  border: 1px solid #66605b;
  border-radius: 3px;
  background: linear-gradient(90deg,#a0ca92 0 var(--range-fill,0%),#4d4947 var(--range-fill,0%) 100%);
}
.audio-range::-webkit-slider-thumb {
  width: 17px;
  height: 20px;
  margin-top: -8px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #101010;
  border-radius: 2px;
  background: #eeeeee;
  box-shadow: 0 0 0 1px #b8b3b0;
}
.audio-range::-moz-range-track { height: 6px; border: 1px solid #66605b; border-radius: 3px; background: #4d4947; }
.audio-range::-moz-range-progress { height: 6px; border-radius: 3px; background: #a0ca92; }
.audio-range::-moz-range-thumb { width: 17px; height: 20px; border: 1px solid #101010; border-radius: 2px; background: #eeeeee; }
.volume-scale { margin-top: -3px; color: #8a8380; font-size: 9px; font-variant-numeric: tabular-nums; }
.audio-tuning-note { margin: 7px 0 0; color: #a9a4a1; font-size: 10px; line-height: 1.3; }

.phone-area { width: min(100%,calc(66.667dvh - 84px),540px); animation: instrument-in 360ms cubic-bezier(.4,0,.2,1) 100ms both; }
.phone-area::before { display: none; }
.phone { filter: drop-shadow(0 28px 28px rgba(0,0,0,.55)); transition: transform 200ms cubic-bezier(.4,0,.2,1), filter 200ms cubic-bezier(.4,0,.2,1); }
body[data-phase="running"] .phone { translate: 0 0; filter: drop-shadow(0 28px 28px rgba(0,0,0,.55)); }
.phone-logo::after { box-shadow: 0 0 0 2px rgba(160,202,146,.85); }
.phone-key::after { background: rgba(160,202,146,.18); }
.phone-caption { margin-top: -3px; color: #a9a4a1; font-size: 11px; }
.phone-caption span { margin-inline: 4px; color: #a0ca92; }
.phone { cursor: default; }
.phone-key, .phone-logo, .lcd-glass { cursor: pointer; }
.phone-caption { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.maker-open { min-height: 40px; border: 0; padding: 0 3px; background: transparent; color: #a0ca92; font: inherit; letter-spacing: inherit; cursor: pointer; transition: color 150ms cubic-bezier(.4,0,.2,1), scale 150ms cubic-bezier(.4,0,.2,1); }
.maker-open:hover { color: #eeeeee; }
.maker-open:active { scale: .96; }

.score-panel { max-width: 300px; border-left-color: #3d3a39; padding-left: 26px; animation: instrument-in 310ms cubic-bezier(.4,0,.2,1) 240ms both; }
.panel-topline { color: #b8b3b0; font-size: 12px; }
.panel-line { background: #3d3a39; }
.status-light, body[data-phase="running"] .status-light { background: #ee6018; box-shadow: none; }
body[data-phase="over"] .status-light { background: #a0ca92; }
.score-block { margin-top: 19px; border-top: 1px solid #3d3a39; border-bottom: 1px solid #3d3a39; padding: 17px 0 15px; }
.metric-label { color: #b8b3b0; font-size: 12px; }
.score-value, .score-value.t-digit-group { color: #a0ca92; font-size: clamp(64px,5.6vw,88px); font-weight: 400; letter-spacing: -.09em; }
.best-row { border-color: #3d3a39; color: #a9a4a1; font-size: 13px; }
.best-row strong { color: #eeeeee; font-size: 20px; font-weight: 400; }
.score-hint { color: #a9a4a1; font-size: 13px; }
.player-country-badge { border: 1px solid #514c49; border-radius: 3px; background: #1d1a18; color: #eeeeee; }
.challenge-banner { border: 1px solid #514c49; border-radius: 3px; background: #1d1a18; color: #eeeeee; }
.result h2 { color: #eeeeee; font-weight: 400; }
.result p, .score-form label { color: #b8b3b0; }
.score-form input, .country-control { border-color: #514c49; border-radius: 3px; background: #1d1a18; }
.country-control:hover, .country-control:focus-within { border-color: #a9a4a1; background: #292522; }
.country-flag { border-radius: 3px; background: #a0ca92; }
#player-country option { background: #1d1a18; }
.post-score-button { min-height: 44px; border: 0; border-radius: 3px; background: #fafafa; color: #101010; transition: scale 150ms cubic-bezier(.4,0,.2,1), background-color 150ms cubic-bezier(.4,0,.2,1); }
.post-score-button:hover { background: #e8e8e8; transform: none; box-shadow: none; }
.post-score-button:active { transform: none; scale: .96; }
.share-grid button, .share-grid a { border-color: #514c49; border-radius: 3px; background: #1d1a18; }
.share-grid button:hover, .share-grid a:hover { background: #292522; }
.text-button { color: #eeeeee; }
.text-button:hover { color: #a0ca92; }
.leaderboard { border-top-color: #3d3a39; }
.board-emblem { border-color: #514c49; border-radius: 3px; background: #1d1a18; color: #a0ca92; }
.leaderboard-head:hover .board-emblem { background: #292522; transform: none; }
.leaderboard-kicker, .room-code { color: #b8b3b0; font-size: 11px; }
.leaderboard-summary strong { color: #eeeeee; font-weight: 500; }
.leaderboard-preview { color: #a9a4a1; }
.board-chevron { color: #b8b3b0; }
.invite-button { min-height: 40px; border-color: #514c49; border-radius: 3px; background: #1d1a18; }
.invite-button:hover { background: #292522; }
.leaderboard-list li { border-color: #3d3a39; }
.leaderboard-list .points { color: #a0ca92; font-weight: 400; }

.settings-panel { border: 1px solid #514c49; border-radius: 10px; background: #1d1a18; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.settings-head h2 { color: #eeeeee; font-weight: 400; }
.setting-group { border-top-color: #3d3a39; }
.setting-group legend, .select-label, .toggle-row { color: #b8b3b0; }
.surface-option { min-height: 48px; border-color: #514c49; border-radius: 3px; background: #292522; color: #eeeeee; }
.surface-option:hover { border-color: #a9a4a1; background: #33302d; transform: none; }
.surface-option:active { transform: none; scale: .96; }
.surface-option.selected { border-color: #a0ca92; color: #eeeeee; box-shadow: none; }
#speed-select { border-color: #514c49; border-radius: 3px; background: #292522; color: #eeeeee; }
.toggle-track { background: #5c5754; }
.toggle-row input:checked + .toggle-track { background: #a0ca92; }
.toast { border-color: #514c49; border-radius: 3px; background: #eeeeee; color: #101010; box-shadow: none; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid #a0ca92; outline-offset: 3px; }

.maker-dialog { width: min(510px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; border: 1px solid #5b5652; border-radius: 10px; padding: 0; overflow: auto; background: #1d1a18; color: #eeeeee; box-shadow: none; }
.maker-dialog::backdrop { background: rgba(5,5,5,.8); }
.maker-dialog[open] { animation: maker-appear 220ms cubic-bezier(.4,0,.2,1) both; }
.maker-dialog-top { display: flex; align-items: center; justify-content: space-between; min-height: 62px; border-bottom: 1px solid #3d3a39; padding: 0 18px 0 26px; }
.maker-dialog-kicker, .maker-overline { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace; font-size: 11px; font-weight: 400; letter-spacing: -.02em; }
.maker-dialog-kicker { display: inline-flex; align-items: center; gap: 9px; color: #b8b3b0; }
.maker-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #ee6018; }
.maker-dialog-top button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #514c49; border-radius: 3px; background: #292522; color: #eeeeee; font-size: 24px; cursor: pointer; transition: scale 150ms cubic-bezier(.4,0,.2,1), background-color 150ms cubic-bezier(.4,0,.2,1); }
.maker-dialog-top button:hover { background: #3a3531; }
.maker-dialog-top button:active { scale: .96; }
.maker-dialog-body { padding: 27px 28px 30px; }
.maker-overline { margin: 0 0 9px; color: #a0ca92; }
.maker-dialog h2 { margin: 0 0 19px; font-size: clamp(35px,6vw,47px); font-weight: 400; line-height: 1.04; letter-spacing: -.04em; }
.maker-dialog h2 span { color: #a0ca92; }
.maker-dialog-body > p:not(.maker-overline) { max-width: 410px; margin: 0; color: #b8b3b0; font-size: 15px; line-height: 1.5; }
.maker-dialog-body > p.maker-message { margin-top: 14px; color: #eeeeee; }
.maker-contact { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 25px; }
.maker-contact a { display: flex; align-items: center; justify-content: space-between; min-height: 42px; border: 1px solid #514c49; border-radius: 3px; padding: 0 11px; color: #eeeeee; font-size: 12px; text-decoration: none; transition: background-color 150ms cubic-bezier(.4,0,.2,1), border-color 150ms cubic-bezier(.4,0,.2,1); }
.maker-contact a:hover { border-color: #b8b3b0; background: #292522; }
.maker-contact .maker-email { grid-column: 1 / -1; min-height: 46px; border-color: #eeeeee; background: #eeeeee; color: #101010; font-size: 14px; }
.maker-contact .maker-email:hover { background: #d8d8d8; }
.site-grain { position: fixed; z-index: 30; inset: -3px; pointer-events: none; opacity: .03; mix-blend-mode: screen; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E"); background-size: 160px 160px; animation: grain-nudge 9s steps(1,end) infinite; }

@keyframes instrument-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes maker-appear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes grain-nudge { 0%,100% { transform: translate(0,0); } 34% { transform: translate(2px,-1px); } 67% { transform: translate(-1px,2px); } }

@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 - 84px),500px); }
  .score-panel { max-width: 270px; padding-left: 17px; }
  .intro h1 { font-size: clamp(52px,4.6vw,68px); }
}
@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 { width: 100%; max-width: none; padding: 20px 0 26px; border-left: 0; border-top: 1px solid #3d3a39; }
  .score-block { max-width: 315px; }
}
@media (max-width: 620px) {
  .page-shell { padding-inline: 16px; }
  .site-header { height: 60px; }
  .brand { font-size: 25px; }
  .brand-mark { flex-basis: 38px; width: 38px; height: 38px; }
  .header-button { padding-inline: 10px; font-size: 11px; }
  .experience { display: flex; flex-direction: column; gap: 0; }
  .phone-area { order: 0; width: min(100%,460px); }
  .intro { order: 1; width: 100%; max-width: none; }
  .intro h1 { max-width: 390px; font-size: clamp(57px,12vw,72px); }
  .intro-copy { font-size: 14px; }
  .music-player { width: min(100%,370px); }
  .audio-tuning { width: min(100%,370px); }
  .score-panel { order: 2; margin-top: 25px; padding: 20px 0 32px; }
  .score-value, .score-value.t-digit-group { font-size: 74px; }
}
@media (max-width: 520px) { .maker-contact { grid-template-columns: 1fr 1fr; } .maker-contact a:last-child { grid-column: 1 / -1; } }
@media (max-height: 800px) and (min-width: 861px) {
  .intro h1 { font-size: clamp(52px,4.5vw,70px); }
  .intro-copy { margin: 15px 0 18px; }
  .instructions { margin-top: 17px; padding-top: 11px; }
  .music-player { margin-top: 16px; }
  .audio-tuning { padding-block: 9px; }
  .audio-control-row { margin-top: 6px; }
  .audio-control-row + .audio-control-row { margin-top: 2px; padding-top: 6px; }
  .audio-tuning-note { margin-top: 3px; }
}
@media (max-width: 385px) {
  .brand-mark { flex-basis: 34px; width: 34px; height: 34px; }
  .header-button { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .eyebrow, .intro h1, .intro-copy, .intro > .primary-button,
  .instructions, .music-player, .audio-tuning, .phone-area, .score-panel, .maker-dialog, .site-grain { animation: none !important; }
}
