*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#16393f;color:#16393f;font-family:Arial,Helvetica,sans-serif;overscroll-behavior:none}button,input{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,input:focus-visible{outline:3px solid #2c8068;outline-offset:3px}#game{position:relative;width:100%;height:100dvh;overflow:hidden;touch-action:none;user-select:none}#scene{position:absolute;inset:0;width:100%;height:100%}header{position:absolute;top:max(22px,env(safe-area-inset-top));left:24px;right:24px;display:flex;justify-content:space-between;align-items:center;z-index:5}.brand{font-size:27px;font-weight:900;letter-spacing:-1.3px}.brand>span{font-style:italic}.brand small{display:block;font-size:10px;letter-spacing:3px;margin-top:3px}.tools{display:flex;gap:8px}.tools button{border:1px solid #173f3920;background:#eff5eac9;border-radius:50%;min-width:44px;height:44px;color:#193e3d;font-weight:700}.tools span{font-size:12px}#sound{border-radius:24px;padding:0 14px}#pause{display:none}body.playing #pause{display:block}#hud{position:absolute;top:100px;width:100%;text-align:center;pointer-events:none}.score{font-size:clamp(64px,11vh,88px);font-weight:850;letter-spacing:-4px;line-height:1.1;font-variant-numeric:tabular-nums}.score small{font-size:25px;letter-spacing:0;margin-left:8px;font-weight:400}#bestline{font-size:16px;margin-top:10px;color:#3a6158}#bestline b{margin-left:6px}#bestline b:empty{display:none}#scoreLabel,#goalTrack,#district,#reason,#hint,#introTitle,#introMessage{display:none}#milestone{font-size:16px;font-weight:bold;height:22px;margin-top:12px;color:#246d57}.hidden{display:none!important}
body.menu,body.result-mode{overflow-y:auto;touch-action:pan-y}body.menu #game{min-height:780px;touch-action:pan-y}body.result-mode #game{min-height:800px;touch-action:pan-y}body.menu #hud,body.result-mode #hud{display:none}#leaderboard{display:none;position:absolute;top:94px;left:50%;transform:translateX(-50%);width:min(390px,calc(100% - 32px));padding:20px;border:1px solid #fff;border-radius:22px;background:#f5f7eef5;z-index:3}body.menu #leaderboard{display:block}.board-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.eyebrow{font-size:11px;font-weight:700;letter-spacing:1.8px;color:#587669}.board-heading h1{font-size:29px;letter-spacing:-1px;margin:4px 0 0}.trophy{width:46px;height:46px;flex-shrink:0}#boardRows{list-style:none;padding:0;margin:0;max-height:180px;overflow-y:auto;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#7d9b78 transparent}#boardRows li{display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:40px;border-top:1px solid #16393f12;font-size:16px}#boardRows li b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#boardRows li>span{font-size:14px;color:#628074}#boardRows li strong{font-size:16px;font-variant-numeric:tabular-nums}#boardRows li:nth-child(-n+3)>span{color:#9b7525;font-weight:800}.is-me{background:#e0efbc;border-radius:6px}#boardStatus{padding:24px 0;color:#557264;font-size:16px;text-align:center;line-height:1.5}.board-foot{display:flex;justify-content:space-between;gap:8px;margin-top:10px;border-top:1px solid #16393f15;padding-top:6px}.board-foot button{border:0;background:transparent;color:#2a6656;min-height:44px;font-size:15px;font-weight:700;padding:6px 0}#refreshBoard{min-width:44px;font-size:24px}.panel{position:absolute;z-index:4;left:50%;transform:translateX(-50%);width:min(390px,calc(100% - 32px));background:#f5f7eef7;border:1px solid #fff;border-radius:24px;padding:24px;text-align:center}#intro{bottom:105px;background:none;border:0;padding:0 8px}button.primary{background:#d5f66a;border:1px solid #b5d44e;border-radius:14px;width:100%;min-height:56px;font-size:18px;font-weight:800;color:#1e3b31;display:flex;align-items:center;justify-content:center;gap:16px;padding:12px 18px;box-shadow:0 4px 0 #9db943}.primary:active{transform:translateY(2px);box-shadow:0 2px 0 #9db943}.primary span:last-child:not(:first-child){font-size:25px}#startLabel{font-size:18px}.micro{font-size:14px;line-height:1.4;margin-top:12px;color:#527164}#introHelp{color:#e4eee4}#challengeBanner{background:#f4f6ec;border-radius:10px;padding:10px;margin-top:12px;font-size:17px;font-weight:bold}#result{top:94px}#resultTag{font-size:17px;font-weight:800;color:#2d7056}#result h2{font-size:66px;letter-spacing:-3px;margin:14px 0 4px;font-variant-numeric:tabular-nums}h2 small{font-size:25px;font-weight:400;letter-spacing:0}#resultMessage{font-size:17px;font-weight:700;color:#2c7656;margin:8px 0}#resultMessage:empty{display:none}.stats{font-size:16px;color:#4b6d61;padding:12px 0 20px}.stats b{margin-left:8px;color:#193e3d}.rank-status{font-size:16px;line-height:1.4;color:#2d7056;margin:12px 0;font-weight:700}.rank-status:empty{display:none}.share-button{width:100%;min-height:50px;background:#e7eddc;border:1px solid #ccd9bd;color:#245343;border-radius:12px;font-size:16px;font-weight:700;margin-top:12px}.result-links{display:flex;justify-content:space-between;margin-top:8px}.secondary{min-height:44px;padding:8px;border:0;background:transparent;color:#436959;font-size:15px}#shareNote,#inviteNote{font-size:14px;color:#436959;line-height:1.4;overflow-wrap:anywhere}#shareNote:empty,#inviteNote:empty{display:none}#nameForm{text-align:left;background:#e7eedc;padding:14px;border-radius:12px;margin:14px 0}#nameForm label{font-size:16px;font-weight:700;display:block;margin-bottom:8px}.name-row{display:flex;gap:8px}#playerName{min-width:0;width:100%;background:#fff;border:1px solid #b4c7a8;padding:10px;font-size:16px;border-radius:8px;user-select:text}#saveName{border:0;background:#d2ed90;color:#244c3b;border-radius:8px;padding:10px;font-size:14px;font-weight:700}#nameHelp{display:block;font-size:12px;margin-top:7px;color:#527164}#paused{top:25%}#paused h2{font-size:42px;margin:12px 0 20px}#paused .tag,#paused p{display:none}#adSlot{display:none;position:absolute;bottom:0;width:100%;height:66px;background:#e5ede3;padding:6px 12px;text-align:center;color:#577165;font-size:11px}body.menu #adSlot,body.result-mode #adSlot{display:block}#adPlaceholder{margin:5px auto 0;max-width:728px;height:35px;border:1px dashed #b5c5b0;display:grid;place-items:center;font-size:12px}
@media(min-width:800px){#leaderboard{left:25%;width:360px}#boardRows{max-height:400px}#intro{left:74%;width:340px;bottom:120px}#result{left:72%;top:95px}header{left:36px;right:36px}}
@media(max-width:360px){header{left:18px;right:18px}#leaderboard,.panel{padding:16px}.board-heading h1{font-size:26px}#boardRows li{font-size:15px}#result h2{font-size:58px}#intro{padding:0 8px}}
@media(max-height:550px) and (min-width:600px){#hud{top:100px;width:230px;left:20px}.score{font-size:56px}body.menu #game,body.result-mode #game{min-height:700px}}

#challengeBanner{display:none}@media(max-width:360px){#boardRows{max-height:150px}#startLabel{font-size:17px}}
/* Live race layout and separate, non-interactive ad clearance. */
html,body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}body.playing{overflow-y:hidden}#game{height:calc(100dvh - 226px);min-height:420px}body.menu #game{min-height:620px}body.result-mode #game{min-height:650px}header{justify-content:flex-start;gap:12px;right:auto;left:18px;top:max(16px,env(safe-area-inset-top))}.brand{font-size:24px}.brand small{font-size:9px;letter-spacing:2px}.tools button{height:38px;min-width:38px}#sound{padding:0 10px}#hud{top:95px;left:18px;width:46%;text-align:left}.score{font-size:clamp(36px,10vw,58px);letter-spacing:-2px;white-space:nowrap}.score small{font-size:18px;margin-left:4px}#bestline{font-size:12px;margin-top:8px}#milestone{font-size:12px}#liveBoard{display:none;position:absolute;right:12px;top:90px;width:min(44%,175px);pointer-events:none;color:#234b46;z-index:3}body.playing #liveBoard{display:block}#liveBoard h2{font-size:14px;letter-spacing:0;margin:0 0 6px;text-align:right}#liveRows{list-style:none;padding:0;margin:0}#liveRows li{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:4px;font-size:11px;line-height:18px;text-shadow:0 1px 2px #f4f8efb0}#liveRows b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#liveRows li span:last-child{text-align:right;font-variant-numeric:tabular-nums}.live-me{color:#176b45;font-weight:800}#liveRows .live-me b{font-weight:800}#liveStatus{font-size:11px;text-align:right;color:#4e7064}#adSeparation{height:150px;min-height:150px;background:#16393f;touch-action:pan-y}#adSlot,body.menu #adSlot,body.result-mode #adSlot{display:block;position:relative;height:76px;width:100%;padding:7px 12px;background:#e5ede3;touch-action:pan-y}#adPlaceholder{height:46px;margin-top:3px}#intro{bottom:24px}.lobby-name{display:block;text-align:left;color:#edf5df;font-size:14px;margin-bottom:12px}.lobby-name input{display:block;width:100%;margin-top:6px;border:1px solid #bad0b0;border-radius:10px;background:#f5f7ed;padding:12px;font-size:16px;user-select:text}#intro .secondary{color:#e2efda}#intro #inviteNote{color:#e2efda}#introHelp{font-size:13px}#paused{top:100px}body.result-mode #result{top:85px}
@media(min-width:800px){#hud{left:36px;width:260px}#liveBoard{right:36px;top:28px;width:220px}#liveBoard h2{font-size:17px}#liveRows li{font-size:14px;line-height:22px}#intro{bottom:30px}header{left:36px}}
@media(max-width:360px){header{gap:9px}.brand{font-size:22px}#sound{padding:0 8px}.tools span{font-size:10px}#liveBoard{width:45%;right:10px}#liveRows li{font-size:10px;gap:3px}#hud{left:16px}.score{font-size:36px}#bestline{font-size:11px}#introHelp{font-size:12px}}
/* Full street remains visible; only input is blocked above the fixed banner. */
:root{--ad-height:76px;--ad-clearance:150px}
html,body{height:100%;min-height:0;overflow:hidden}
body{position:relative}
#game,body.menu #game,body.result-mode #game{height:calc(100dvh - var(--ad-height));min-height:0}
#adSeparation{position:fixed;left:0;right:0;bottom:var(--ad-height);height:var(--ad-clearance);min-height:0;background:transparent;z-index:19;touch-action:none}
#adSlot,body.menu #adSlot,body.result-mode #adSlot{position:fixed;left:0;right:0;bottom:0;height:var(--ad-height);padding:7px 12px;z-index:20}
#intro{bottom:calc(var(--ad-clearance) + 12px)}
#result,body.result-mode #result{top:85px;max-height:calc(100% - 247px);overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;padding:16px}
#result h2{font-size:52px;margin:8px 0 4px}
#result .stats{padding:8px 0 14px}
#result .result-links{margin-top:4px}
@media(max-height:750px){#result,body.result-mode #result{top:78px;max-height:calc(100% - 240px)}#result h2{font-size:44px}#result .primary{min-height:46px}#result .share-button{min-height:44px;margin-top:8px}}
/* Align the live board with the header and prevent accidental text selection. */
#liveBoard{top:max(16px,env(safe-area-inset-top));width:min(44%,175px,calc(100% - 190px))}
body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,[contenteditable="true"]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
@media(min-width:800px){#liveBoard{width:220px}}
.brand-logo{display:block;width:88px;height:auto;aspect-ratio:520/291;object-fit:contain}.brand:has(.brand-logo){line-height:1}.brand:has(.brand-logo) small{text-align:center;margin-top:5px}
@media(max-width:360px){header{gap:8px}.brand-logo{width:76px}}
.ui-icon{width:20px;height:20px;flex:none;vertical-align:middle}#share,#toBoard{display:flex;align-items:center;justify-content:center;gap:9px}.result-links{justify-content:center}
