@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{--paper:#f3f0e7;--ink:#263432;--orange:#ef6047;--muted:#78817b}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',sans-serif}main{max-width:1240px;margin:auto;padding:30px 48px 20px}header{display:flex;align-items:center;gap:28px;margin-bottom:26px}.brand{font-family:'Space Grotesk',sans-serif;font-size:24px;font-weight:700;letter-spacing:-1.3px;text-decoration:none;color:inherit;line-height:.95}.brand span{display:block;color:var(--orange)}.edition{font-size:9px;letter-spacing:1.6px;line-height:1.8}.edition span{color:var(--muted)}button{font:inherit;cursor:pointer;border:0}button:focus-visible,a:focus-visible{outline:3px solid #487ccc;outline-offset:5px}#pause{margin-left:auto;background:transparent;border:1px solid #c9cdc1;border-radius:50%;width:38px;height:38px;font-weight:700}.game{height:510px;position:relative;border:1px solid #cdd1c4;overflow:hidden;background:#e9eddf;border-radius:4px;touch-action:none;user-select:none}canvas{display:block;width:100%;height:100%}.hud{position:absolute;z-index:1;top:25px;left:30px;right:30px;display:flex;justify-content:space-between;pointer-events:none}.eyebrow{font-size:9px;letter-spacing:2px;font-weight:700}#score{font-family:'Space Grotesk',sans-serif;font-size:52px;letter-spacing:-3px;line-height:1.2;font-weight:600;font-variant-numeric:tabular-nums}.record{text-align:right;display:flex;flex-direction:column;gap:5px}.record strong{font-family:'Space Grotesk',sans-serif;font-size:25px;letter-spacing:-1px}#pace{font-size:8px;letter-spacing:1.2px;color:#737e73}.overlay{position:absolute;inset:122px auto auto 31px;z-index:2}.tag{font-size:9px;letter-spacing:1.8px;font-weight:700;color:#607363;margin-bottom:12px}h1{font-family:'Space Grotesk',sans-serif;font-size:58px;line-height:.98;letter-spacing:-3.2px;margin:0;font-weight:600}h1 em{font-style:normal;color:var(--orange)}.overlay p{font-size:12px;margin:16px 0}.overlay button{background:var(--ink);color:#fff9ed;padding:14px 18px;min-width:218px;display:flex;justify-content:space-between;gap:24px;font-size:10px;font-weight:700;letter-spacing:1.5px;border-radius:2px}.overlay button:hover{background:var(--orange)}.overlay .hint{font-size:8px;letter-spacing:2px;color:#7b837a;margin-top:10px}.scene-label,.billables{position:absolute;bottom:19px;font-size:9px;letter-spacing:1.7px;display:flex;align-items:center;gap:9px;pointer-events:none}.scene-label{left:30px}.scene-label #distance{color:#7b857c;margin-left:10px}.live-dot{width:6px;height:6px;background:#548578;border-radius:50%}.billables{right:30px}.billables small{color:#7b857c;font-size:8px;letter-spacing:.5px}.paper-icon{background:#edc958;border-radius:2px;padding:1px 5px;font-size:16px;font-weight:bold}.under{display:flex;justify-content:space-between;align-items:center;margin:12px 0 35px;font-size:10px;color:#788078}.under p{margin:0}.under p span{padding:0 8px}kbd{font-family:inherit;font-size:8px;border:1px solid #cbd0c4;padding:3px 6px;border-radius:3px;color:#3e4941}.motto{font-size:8px;letter-spacing:1.8px}.leaderboard{display:grid;grid-template-columns:1fr 1.7fr;gap:12px 40px;border-top:1px solid #cdd1c4;padding-top:22px}.board-title h2{font-family:'Space Grotesk',sans-serif;font-size:22px;font-weight:500;letter-spacing:-.8px;margin:0 0 9px}.board-title h2 span{color:var(--orange);margin-left:18px}.board-title p{font-size:8px;letter-spacing:1.7px;color:#7d857a;margin:0}ol{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:0}li{display:flex;gap:20px;border-bottom:1px solid #dbddd3;padding:10px 0;font-size:11px;align-items:center}li:first-child{padding-top:0}li .pos{font-family:'Space Grotesk';color:#929b90;width:20px}li .run{flex:1}li strong{font-family:'Space Grotesk';font-variant-numeric:tabular-nums}li small{color:#8b9588;font-size:9px}li.latest strong{color:var(--orange)}.storage{grid-column:2;font-size:9px;color:#889082;margin:0}footer{display:flex;justify-content:space-between;margin-top:38px;font-size:8px;letter-spacing:1.2px;color:#949b8f}footer span:nth-child(2){letter-spacing:0}.hidden{display:none!important}@media(max-width:650px){main{padding:18px 16px}.edition{font-size:8px}header{margin-bottom:18px}.brand{font-size:22px}.game{height:540px}.hud{left:20px;right:20px;top:21px}#score{font-size:45px}.overlay{left:20px;top:135px}h1{font-size:54px}.scene-label{left:20px;letter-spacing:.6px}.billables{right:15px;letter-spacing:.5px;gap:5px}.billables small{display:none}.under{margin-bottom:25px;font-size:9px}.motto{display:none}.leaderboard{grid-template-columns:1fr;gap:20px}.storage{grid-column:1}.board-title{display:flex;align-items:center;justify-content:space-between}.board-title h2{font-size:19px;margin:0}.board-title p{font-size:7px;max-width:90px;line-height:1.8}footer span:last-child{display:none}footer{margin-top:24px}li{padding:9px 0}}@media(max-height:750px) and (max-width:650px){.game{height:460px}.overlay{top:112px}h1{font-size:47px}.overlay p{margin:12px 0}}
/* V02 — overtime cartoon */
:root{--paper:#fff8ec;--ink:#29304f;--orange:#f36156;--muted:#8a8192}body{background:radial-gradient(ellipse at 10% 0%,#ffe5d5,transparent 50%),var(--paper)}main{max-width:1180px;padding-top:24px}.brand{font-size:27px;transform:rotate(-4deg);font-weight:700;letter-spacing:-1.8px}.brand span{color:var(--orange)}header{margin-bottom:24px}.edition{color:#665b78}.game{height:530px;border:2px solid var(--ink);border-radius:20px;box-shadow:0 8px 0 #29304f,0 20px 40px #60415712}.hud{top:22px;left:26px;right:26px}.hud>div:first-child{background:#fffaf0e8;padding:10px 17px 8px;border:2px solid var(--ink);border-radius:12px;box-shadow:3px 3px 0 #29304f}#score{font-size:43px;letter-spacing:-2px}.record{padding:12px 15px;border-radius:12px;background:#fffaf0cc}.record strong{color:#6766bd}#pace{color:#766584}.overlay{top:156px;left:35px;max-width:440px}.tag{display:inline-block;background:#ffcf53;color:#473945;padding:7px 10px;border-radius:5px;transform:rotate(-2deg);font-size:9px;letter-spacing:1px;border:1.5px solid var(--ink)}h1{font-size:66px;line-height:.95;font-weight:700;letter-spacing:-4px}h1 em{color:#ed645b}.overlay p{font-size:13px;max-width:350px;line-height:1.5}.overlay button{background:#7779e8;color:white;border:2px solid var(--ink);border-radius:9px;box-shadow:0 5px 0 var(--ink);font-size:11px;padding:15px 19px;transition:transform .1s,box-shadow .1s}.overlay button:hover{background:#898bf3;transform:translateY(-2px);box-shadow:0 7px 0 var(--ink)}.overlay button:active{transform:translateY(4px);box-shadow:0 1px 0 var(--ink)}.overlay .hint{color:#6c6077;margin-top:14px}.scene-label,.billables{bottom:18px;color:#423855;background:#f9f2e9c9;padding:8px 10px;border-radius:7px}.scene-label{left:20px}.billables{right:20px}.under{margin-top:20px;color:#7f7286}.motto{color:#9c879b}#pause{background:#fffaf0;border:2px solid var(--ink);box-shadow:0 3px 0 var(--ink)}.leaderboard{border-top:2px solid #e6d8dc;padding-top:22px}.board-title h2{font-weight:700;font-size:24px}.board-title p{color:#8a7488}li{border-color:#e6d8dc;padding:10px 8px}li:first-child{background:#f6e7bd;border-radius:6px;padding:10px 8px}li:first-child .pos{color:#906832}.storage{color:#8a7488}footer{color:#9b8796}@media(max-width:650px){main{padding:18px 14px}.game{height:560px;border-radius:16px}.hud{left:15px;right:15px;top:16px}.hud>div:first-child{padding:9px 12px}#score{font-size:36px}.eyebrow{font-size:8px;letter-spacing:1.5px}.record{padding:10px}.record strong{font-size:22px}.overlay{top:147px;left:20px;right:16px}h1{font-size:58px;letter-spacing:-3px}.overlay p{font-size:12px;max-width:275px}.tag{font-size:8px}.overlay button{min-width:190px;padding:13px 15px}.scene-label{left:12px;font-size:8px}.billables{right:12px;font-size:8px}.scene-label #distance{margin-left:0}.board-title h2{font-size:21px}}@media(max-height:750px) and (max-width:650px){.game{height:505px}.overlay{top:133px}h1{font-size:49px}.overlay p{margin:10px 0}.overlay .hint{margin-top:12px}}@media(prefers-reduced-motion:reduce){.overlay button{transition:none}}
.overlay{top:137px}h1{font-size:58px}.overlay p{margin:12px 0}.overlay .hint{margin-top:12px}@media(min-width:651px) and (max-width:800px){main{padding-left:20px;padding-right:20px}.overlay{left:24px}h1{font-size:54px}.motto{display:none}}@media(max-width:650px){.overlay{top:142px}h1{font-size:55px}}@media(max-height:750px) and (max-width:650px){.overlay{top:126px}h1{font-size:46px}}
.community{border:2px solid var(--ink);border-radius:14px;background:#fffaf2;padding:22px;margin:24px 0}.community-heading{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:22px}.community h2{font-family:'Space Grotesk',sans-serif;margin:0 0 8px;font-size:25px;letter-spacing:-1px}.community-heading p,.run-counter span{font-size:9px;letter-spacing:1px;margin:0;color:#7a6b87}.run-counter{text-align:right;display:flex;flex-direction:column;gap:4px}.run-counter strong{font-family:'Space Grotesk';font-size:30px;color:#6766bd}#community-status{font-size:11px;color:#7a6b87;margin:14px 0 0}.community .run{overflow-wrap:anywhere}#submit-run{margin-top:17px;background:#fffaf0f5;border:1px solid #d9cbd8;border-radius:10px;padding:12px;max-width:400px}#submit-run label{display:block;font-size:12px;font-weight:700;margin-bottom:7px}#submit-run label span{font-weight:400}.publish-fields{display:flex;gap:8px}#player-name{min-width:0;width:145px;border:1px solid #a59bb7;border-radius:6px;background:white;font:inherit;font-size:14px;padding:9px;color:var(--ink)}#submit-run button{min-width:0;box-shadow:none;padding:10px;font-size:8px;letter-spacing:.5px}#submit-run button:disabled{opacity:.6;cursor:default;transform:none}#submit-run #publish-status{font-size:10px;line-height:1.4;margin:9px 0 0}.overlay:has(#submit-run:not(.hidden)){top:140px}.overlay:has(#submit-run:not(.hidden)) h1{font-size:50px}.overlay:has(#submit-run:not(.hidden)) #message{margin:10px 0}.overlay:has(#submit-run:not(.hidden)) .hint{display:none}@media(max-width:650px){.community{padding:16px}.community h2{font-size:21px}.run-counter strong{font-size:25px}.run-counter span{font-size:7px}.overlay:has(#submit-run:not(.hidden)){top:135px}#submit-run{padding:10px}.publish-fields{gap:6px}#player-name{width:120px;flex:1}#submit-run button{font-size:8px}} 

/* V06 — arcade controls; the playfield and mobile physics are unchanged. */
#sound{margin-left:auto;flex-shrink:0;background:#fffaf0;border:2px solid var(--ink);border-radius:50%;width:38px;height:38px;box-shadow:0 3px 0 var(--ink);font-size:21px;font-weight:700}
#sound[aria-pressed="false"]{color:#8a8192;text-decoration:line-through}
#sound:disabled{opacity:.5;cursor:default}
#pause{margin-left:-16px;flex-shrink:0}
#message strong{color:var(--ink)}
.under p{line-height:1.9}
@media(max-width:650px){header{gap:16px}#pause{margin-left:-6px}.under{align-items:flex-start}.overlay #message{font-size:11px}}

/* Hall of Overtime podium */
#global-ranking li:first-child{background:transparent;border-radius:0}
#global-ranking li.podium-gold,#global-ranking li.podium-silver,#global-ranking li.podium-bronze{border:1px solid var(--medal-border);border-left:4px solid var(--medal-border);border-radius:8px;margin-bottom:6px;padding:12px;background:var(--medal-bg);color:var(--ink)}
#global-ranking .podium-gold{--medal-border:#c39227;--medal-bg:linear-gradient(110deg,#f4da8d,#fff4cf)}
#global-ranking .podium-silver{--medal-border:#929dac;--medal-bg:linear-gradient(110deg,#dce2e9,#f3f5f8)}
#global-ranking .podium-bronze{--medal-border:#b47a50;--medal-bg:linear-gradient(110deg,#e6bea0,#f8e7d9)}
#global-ranking li[class^="podium-"] .pos{color:var(--ink);font-weight:700}
/* Milan local time: visual atmosphere only. */
body,.game,.community,.record,.hud>div:first-child,#pause,#sound{transition:background-color 1.5s,color 1.5s,border-color 1.5s}
:root[data-time-of-day="sunset"]{--paper:#f9e6df;--orange:#d85249}
[data-time-of-day="sunset"] body{background:radial-gradient(ellipse at 10% 0%,#eecbdc,transparent 65%),var(--paper)}
[data-time-of-day="sunset"] .community{background:#fff2e8}
[data-time-of-day="night"]{--paper:#172334;--ink:#f6ebd5;--orange:#ffbd70;--muted:#c0cad7}
[data-time-of-day="night"] body{background:radial-gradient(ellipse at 10% 0%,#2b3550,transparent 65%),var(--paper)}
[data-time-of-day="night"] .game{border-color:#69788d;box-shadow:0 8px 0 #0d1726,0 20px 40px #10172540}
[data-time-of-day="night"] .hud>div:first-child,[data-time-of-day="night"] .record{background:#263449f5;border-color:#8d9aaf;box-shadow:none}
[data-time-of-day="night"] .record strong,[data-time-of-day="night"] .run-counter strong{color:#ffcd88}
[data-time-of-day="night"] .edition,[data-time-of-day="night"] .edition span,[data-time-of-day="night"] #pace,[data-time-of-day="night"] .under,[data-time-of-day="night"] .motto,[data-time-of-day="night"] footer,[data-time-of-day="night"] .overlay .hint,[data-time-of-day="night"] .community-heading p,[data-time-of-day="night"] .run-counter span,[data-time-of-day="night"] #community-status{color:#c0cad7}
[data-time-of-day="night"] h1 em{color:#ffbd70}
[data-time-of-day="night"] #message{text-shadow:0 1px 3px #172334}
[data-time-of-day="night"] .overlay button{background:#f4b85d;color:#172334;border-color:#f4b85d;box-shadow:0 5px 0 #131e2e}
[data-time-of-day="night"] .overlay button:hover{background:#ffd390}
[data-time-of-day="night"] #pause,[data-time-of-day="night"] #sound{background:#263449;color:#f6ebd5;border-color:#91a0b6;box-shadow:0 3px 0 #101a29}
[data-time-of-day="night"] .community,[data-time-of-day="night"] #submit-run{background:#263449;border-color:#69788d}
[data-time-of-day="night"] #player-name{color:#29304f}
[data-time-of-day="night"] kbd{color:#e4dccc;border-color:#8795ab}
[data-time-of-day="night"] #global-ranking li{border-bottom-color:#566579}
[data-time-of-day="night"] #global-ranking .pos{color:#c0cad7}
[data-time-of-day="night"] #global-ranking li[class^="podium-"],[data-time-of-day="night"] #global-ranking li[class^="podium-"] .pos{color:#29304f}
@media(prefers-reduced-motion:reduce){body,.game,.community,.record,.hud>div:first-child,#pause,#sound{transition:none}}

/* Focused end-of-run card; start and pause screens retain their layout. */
.game:has(.result-screen:not(.hidden)) .hud{opacity:0}
.game:has(.result-screen:not(.hidden)) canvas{filter:blur(2px);opacity:.4;transition:filter .25s,opacity .25s}
.overlay.result-screen,.overlay.result-screen:has(#submit-run:not(.hidden)){
 inset:50% auto auto 50%;transform:translate(-50%,-50%);width:calc(100% - 36px);max-width:440px;max-height:calc(100% - 90px);overflow:auto;
 padding:24px 28px 26px;text-align:center;border:2px solid #29304f;border-radius:20px;background:#fffaf2f5;box-shadow:0 6px 0 #29304f,0 16px 38px #29304f20;
 animation:result-arrive .32s cubic-bezier(.2,.8,.2,1) both;
}
.result-screen .tag{transform:none;margin:0 0 10px;font-size:9px}
.overlay.result-screen h1,.overlay.result-screen:has(#submit-run:not(.hidden)) h1{font-size:clamp(44px,8vw,68px);letter-spacing:-3px;line-height:1.05;font-variant-numeric:tabular-nums}
.overlay.result-screen #message,.overlay.result-screen:has(#submit-run:not(.hidden)) #message{margin:12px auto 18px;width:100%;max-width:340px;text-align:center;font-size:12px;line-height:1.5}
.result-screen #action{margin:0 auto;justify-content:center;width:100%;max-width:320px;min-width:0;transition:background .18s,transform .18s,box-shadow .18s}
.result-screen #submit-run{margin:20px auto 0;padding:16px 0 0;max-width:340px;border:0;border-top:1px solid #ded7e5;border-radius:0;background:transparent;text-align:center}
.result-screen .publish-fields{align-items:stretch;gap:8px}
.result-screen #player-name{flex:1;width:0;min-width:0}
.result-screen #submit-run button{justify-content:center;flex:1;line-height:1.4}
.result-screen #submit-run #publish-status{margin:10px auto 0;font-size:10px;color:#766584}
.overlay.result-screen .hint{display:none}
[data-time-of-day="night"] .result-screen{background:#263449f7;border-color:#8795ab;box-shadow:0 6px 0 #101a29,0 16px 38px #101a2940}
[data-time-of-day="night"] .result-screen #submit-run{background:transparent;border-color:#566579}
[data-time-of-day="night"] .result-screen #submit-run #publish-status{color:#c0cad7}
@keyframes result-arrive{from{opacity:0;transform:translate(-50%,calc(-50% + 10px)) scale(.98)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@media(max-width:450px){.overlay.result-screen,.overlay.result-screen:has(#submit-run:not(.hidden)){padding:20px 16px 22px;width:calc(100% - 24px)}.result-screen #submit-run button{font-size:8px;padding:9px 6px}}
@media(prefers-reduced-motion:reduce){.overlay.result-screen{animation:none}.game:has(.result-screen:not(.hidden)) canvas,.result-screen #action{transition:none}}

.overlay.result-screen #rank-message{max-width:340px;margin:0 auto 16px;padding:10px 12px;border:1px solid #d5ac40;border-radius:9px;background:#fff0bc;color:#574218;text-align:center;font-weight:700;font-size:12px;line-height:1.5}

/* Welcome: a compact editorial card over the office illustration. */
.game:has(.welcome-screen) .hud>div:first-child{visibility:hidden}
.overlay.welcome-screen{top:35px;left:28px;right:auto;width:43%;max-width:410px;padding:27px 28px 22px;background:linear-gradient(145deg,#fffdf7fa,#fff4e8f2);border:2px solid #29304f;border-radius:20px;box-shadow:5px 6px 0 #29304f;animation:welcome-enter .4s ease-out both}
.welcome-screen .tag{font-size:8px;letter-spacing:1.15px;transform:rotate(-2deg);margin-bottom:18px;padding:7px 9px}
.overlay.welcome-screen h1{font-size:clamp(48px,5.8vw,68px);line-height:.98;letter-spacing:-3.8px;color:#29304f}
.welcome-screen h1 em{color:#ed645b;display:inline-block;position:relative}
.welcome-screen h1 em:after{content:'';position:absolute;left:1px;right:0;bottom:-5px;height:4px;border-radius:50%;background:#ffcf53;transform:rotate(-2deg)}
.overlay.welcome-screen #message{font-size:12px;line-height:1.65;margin:22px 0 18px;color:#655c75;text-shadow:none}
.overlay.welcome-screen #message strong{color:#29304f}
.welcome-screen #action{width:100%;min-width:0;align-items:center;font-size:12px;padding:15px 17px;letter-spacing:1.3px}
.welcome-screen #action span{font-size:22px;line-height:1}
.overlay.welcome-screen .hint{margin:15px 0 0;text-align:center;font-size:8px;letter-spacing:1.2px;color:#766584}
[data-time-of-day="night"] .welcome-screen{background:linear-gradient(145deg,#2b3953fa,#202e43f5);border-color:#8290a8;box-shadow:5px 6px 0 #101a29}
[data-time-of-day="night"] .welcome-screen h1,[data-time-of-day="night"] .welcome-screen #message strong{color:#f6ebd5}
[data-time-of-day="night"] .welcome-screen h1 em{color:#ffbd70}
[data-time-of-day="night"] .welcome-screen #message,[data-time-of-day="night"] .welcome-screen .hint{color:#c0cad7}
@keyframes welcome-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:650px){
 .game:has(.welcome-screen) .hud{visibility:hidden}
 .overlay.welcome-screen{top:20px;left:16px;right:16px;width:auto;max-width:none;padding:18px 20px 17px}
 .welcome-screen .tag{margin-bottom:12px;font-size:7px}
 .overlay.welcome-screen h1{font-size:43px;letter-spacing:-2.5px;line-height:1}
 .overlay.welcome-screen #message{margin:14px 0 12px;font-size:11px}
 .welcome-screen #action{padding:11px 15px}
 .overlay.welcome-screen .hint{margin-top:12px;font-size:7px}
}
@media(prefers-reduced-motion:reduce){.overlay.welcome-screen{animation:none}}

/* Pause uses the same illustrated card language as welcome and results. */
.game:has(.pause-screen:not(.hidden)) canvas{filter:blur(2px);opacity:.45;transition:filter .2s,opacity .2s}
.overlay.pause-screen{inset:50% auto auto 50%;transform:translate(-50%,-50%);width:calc(100% - 36px);max-width:410px;max-height:calc(100% - 70px);overflow:auto;padding:30px 28px 26px;text-align:center;background:linear-gradient(145deg,#fffdf7fa,#fff4e8f5);color:#29304f;border:2px solid #29304f;border-radius:20px;box-shadow:5px 6px 0 #29304f;animation:result-arrive .25s ease-out both}
.pause-screen .tag{transform:rotate(-2deg);margin:0 0 22px;font-size:8px;letter-spacing:1px}
.overlay.pause-screen h1{font-size:clamp(42px,6vw,58px);line-height:1;letter-spacing:-2.5px;color:#29304f}
.overlay.pause-screen #message{margin:18px auto 24px;max-width:320px;color:#655c75;text-align:center;text-shadow:none;font-size:13px;line-height:1.6}
.pause-screen #action{width:100%;min-width:0;justify-content:center;padding:15px 18px;font-size:12px}
.overlay.pause-screen .hint{margin:18px 0 0;font-size:8px;letter-spacing:1px;color:#766584;line-height:1.7}
[data-time-of-day="night"] .pause-screen{background:linear-gradient(145deg,#2b3953fa,#202e43f5);border-color:#8290a8;box-shadow:5px 6px 0 #101a29}
[data-time-of-day="night"] .pause-screen h1{color:#f6ebd5}
[data-time-of-day="night"] .pause-screen #message,[data-time-of-day="night"] .pause-screen .hint{color:#c0cad7}
@media(max-width:450px){.overlay.pause-screen{padding:24px 18px;width:calc(100% - 28px)}.pause-screen .tag{font-size:7px}}
@media(prefers-reduced-motion:reduce){.overlay.pause-screen{animation:none}.game:has(.pause-screen:not(.hidden)) canvas{transition:none}}

.community-counters{display:flex;align-items:center;gap:24px}.community-counters .run-counter+ .run-counter{border-left:1px solid #b8aabc66;padding-left:24px}@media(max-width:650px){.community-heading{flex-wrap:wrap}.community-counters{gap:18px;margin-left:auto}.community-counters .run-counter+ .run-counter{padding-left:18px}}

.brand .brand-initial{display:inline;color:#d92532}

footer{flex-wrap:wrap;gap:12px}footer a{color:inherit;text-decoration:underline;text-underline-offset:3px}

/* Explicit surface/text pairs for all three themes and every overlay state. */
:root{--secondary:#62566c;--card:#fffaf2;--card-ink:#29304f;--button:#5553b8;--button-hover:#46449d}
:root[data-time-of-day="night"]{--secondary:#d0d8e5;--card:#263449;--card-ink:#f6ebd5;--button:#f4b85d;--button-hover:#ffd390}
.edition,.edition span,.under,.motto,footer,.community-heading p,.run-counter span,#community-status,#pace{color:var(--secondary);font-size:11px}
#global-ranking .pos{color:var(--secondary)}
#global-ranking li{font-size:14px}
.eyebrow{font-size:11px;letter-spacing:1.2px}
.overlay:is(.welcome-screen,.pause-screen,.result-screen),.overlay.result-screen:has(#submit-run:not(.hidden)){background:var(--card);color:var(--card-ink)}
.overlay:is(.welcome-screen,.pause-screen,.result-screen) h1{color:var(--card-ink)}
.overlay:is(.welcome-screen,.pause-screen,.result-screen) #message,.overlay:is(.welcome-screen,.pause-screen,.result-screen) .hint,.result-screen #submit-run #publish-status{color:var(--secondary);text-shadow:none;font-size:12px}
.overlay:is(.welcome-screen,.pause-screen,.result-screen) #message strong{color:var(--card-ink)}
.overlay .tag,.overlay.welcome-screen .tag,.overlay.pause-screen .tag{color:#473945;font-size:11px;letter-spacing:.6px}
.overlay button{background:var(--button);color:#fff;border-color:#29304f}
.overlay button:hover{background:var(--button-hover)}
.overlay #action,.result-screen #submit-run button{font-size:12px;letter-spacing:.6px}
.result-screen .publish-fields{flex-direction:column}
.result-screen #player-name{width:100%;flex:auto;font-size:16px;background:#fff;color:#29304f;border-color:#786986;padding:11px}
#player-name::placeholder{color:#62566c;opacity:1;font-size:13px}
.result-screen #submit-run label{font-size:14px;color:var(--card-ink)}
.result-screen #submit-run #name-guidance{font-size:12px;line-height:1.5;color:var(--secondary);margin:8px auto 12px}
.result-screen #submit-run button:disabled{opacity:1;background:#e4deeb;color:#51465b;border-color:#786986}
.scene-label,.billables{background:#fffaf2;color:#423855;font-size:11px;letter-spacing:.5px}
.scene-label #distance,.billables small{color:#62566c;font-size:11px}
.under kbd{font-size:11px;color:var(--secondary)}
.overlay.welcome-screen h1 em{color:#c13f36}
[data-time-of-day="night"] .overlay:is(.welcome-screen,.pause-screen,.result-screen),[data-time-of-day="night"] .overlay.result-screen:has(#submit-run:not(.hidden)){background:var(--card);color:var(--card-ink)}
[data-time-of-day="night"] .overlay:is(.welcome-screen,.pause-screen,.result-screen) h1{color:var(--card-ink)}
[data-time-of-day="night"] .overlay:is(.welcome-screen,.pause-screen,.result-screen) #message,[data-time-of-day="night"] .overlay:is(.welcome-screen,.pause-screen,.result-screen) .hint{color:var(--secondary);text-shadow:none}
[data-time-of-day="night"] .overlay:is(.welcome-screen,.pause-screen,.result-screen) #message strong{color:var(--card-ink)}
[data-time-of-day="night"] .overlay.welcome-screen h1 em{color:#ffbd70}
[data-time-of-day="night"] .overlay button{color:#172334}
[data-time-of-day="night"] .result-screen #submit-run button:disabled{background:#47566c;color:#f6ebd5;border-color:#8795ab}
[data-time-of-day="night"] .brand .brand-initial{color:#ff747e}
[data-time-of-day="night"] #sound[aria-pressed="false"]{color:#d0d8e5}
@media(max-width:650px){.edition{font-size:10px;letter-spacing:1px}.eyebrow{font-size:10px}.scene-label,.billables{font-size:10px;padding:7px;gap:5px}.overlay.welcome-screen .hint{font-size:11px;letter-spacing:.6px}.overlay.welcome-screen{max-height:calc(100% - 80px);overflow:auto}.motto{display:none}}
@media(max-width:370px){.scene-label{bottom:44px}.billables{bottom:10px}.edition{display:none}}

/* The results card sizes to its content; only the page can scroll. */
.game:has(.result-screen:not(.hidden)){height:auto;min-height:530px;display:grid;place-items:center;padding:24px 18px 70px}
.game:has(.result-screen:not(.hidden)) canvas{position:absolute;inset:0}
.overlay.result-screen,.overlay.result-screen:has(#submit-run:not(.hidden)){position:relative;inset:auto;transform:none;width:100%;max-width:440px;max-height:none;overflow:visible;padding:20px 24px;animation:welcome-enter .25s ease-out both}
.overlay.result-screen .tag{margin-bottom:8px}
.overlay.result-screen #message,.overlay.result-screen:has(#submit-run:not(.hidden)) #message{margin:8px auto 12px}
.overlay.result-screen #rank-message{margin-bottom:12px;padding:8px 10px}
.result-screen #submit-run{margin-top:14px;padding-top:12px}
.result-screen #submit-run #name-guidance{margin:6px auto 10px}
@media(max-width:450px){.game:has(.result-screen:not(.hidden)){padding:16px 10px 76px;min-height:505px}.overlay.result-screen,.overlay.result-screen:has(#submit-run:not(.hidden)){width:100%;padding:18px 16px}}
@media(prefers-reduced-motion:reduce){.overlay.result-screen{animation:none}}
