/* The owner's selected Race Lights home. Game screens retain their racing HUD. */
body[data-screen="home"] .scene{background-color:#070d35;background-image:url('home-night.png');background-size:auto 100%;background-position:center bottom}
body[data-screen="home"] .scene:after{display:none}
body[data-screen="home"] main{padding:0 24px;min-height:100svh;max-width:none}
body[data-screen="home"] .hud,body[data-screen="home"] #help-button,.modes,main>footer{display:none}
.header{top:24px;left:24px;right:24px;justify-content:flex-end}
.icon-button{width:44px;height:44px;font-size:1.75rem}
#help-button{display:none}
body[data-screen="race"][data-playing="true"] .header{display:none}
body[data-screen="home"] .flight{flex:none;min-height:0}
body[data-screen="home"] .console{width:100%;max-width:640px}
body[data-screen="home"] #stage{min-height:100svh;height:auto;justify-content:flex-start;padding-top:16svh}
body[data-screen="home"] .console h1{font-size:clamp(3.5rem,10vw,6rem);letter-spacing:4px;line-height:1;margin:0 0 24px;color:#fff3c8;text-shadow:4px 4px 0 #423456,8px 8px 0 #111329}
body[data-screen="home"] .console .home-intro{font-size:clamp(1.125rem,3.6vw,1.75rem);margin:0 0 16px;color:#eee4ff;letter-spacing:1px;white-space:nowrap}
.start-control{width:clamp(216px,56vw,320px);position:relative;margin:0 auto;flex-shrink:0;transition:filter .2s ease}
.start-control img{display:block;width:100%;height:auto;image-rendering:pixelated;pointer-events:none}
.start-control:has(button:hover){filter:brightness(1.12)}
.start-control button{position:absolute;left:8%;right:8%;bottom:8%;height:23%;min-height:44px;padding:0 8px;border:0;background:transparent;color:#071b28;letter-spacing:3px;font-size:clamp(1.5rem,5.2vw,2rem);font-weight:400;text-transform:uppercase;text-shadow:none;transition:color .2s ease,transform .2s ease}
.start-control button:hover{color:#102e3a;transform:translateY(-2px)}
.start-control button:active{transform:translateY(2px)}
.start-control button:focus-visible{outline:4px solid #fff3c8;outline-offset:4px}
.start-control button:disabled{color:#102e3a;opacity:.7;cursor:wait}
.home-help{min-height:44px;margin:8px 0 0;padding:8px 16px;font-size:1.25rem;color:#eee4ff;letter-spacing:1px}
.home-progress{font-size:2rem;color:#6af5cc;margin:0 0 8px;line-height:1}
.home-progress small{font-size:1.25rem;color:#eee4ff}
.home-status{font-size:1.125rem;color:#eee4ff;min-height:24px;margin:8px 0 0}
.menu-links{display:grid;gap:8px;margin:16px 0 0}
.menu-links .text-button{min-height:44px;text-align:left;padding:8px 16px}
#dialog .secondary{min-height:44px}
.final-results{max-height:none;overflow:visible}
@media(min-width:701px){body[data-screen="home"] .scene{background-image:url('home-night-wide.png');background-size:cover}body[data-screen="home"] #stage{padding-top:12svh}body[data-screen="home"] .console h1{font-size:5rem}.start-control{width:256px}}
@media(max-height:700px) and (orientation:portrait){body[data-screen="home"] #stage{padding-top:12svh}body[data-screen="home"] .console h1{margin-bottom:16px}.start-control{width:216px}}
@media(orientation:landscape) and (max-height:600px){body[data-screen="home"] #stage{padding-top:32px;min-height:440px}body[data-screen="home"] .scene{background-size:cover;background-position:center 75%}body[data-screen="home"] .console h1{font-size:3.5rem;margin-bottom:16px}.start-control{width:200px}}
/* Results: the big total already shows the score, so the round strip steps aside for the menu button. */
body[data-complete="true"] .hud{visibility:hidden}
/* Secondary links stay at least 44px tall for thumbs. */
#full-history,#report-missing,#report-reveal,.source-note a,#dialog-body a[href$=".txt"]{display:inline-flex;align-items:center;min-height:44px}
/* A phone held sideways keeps the answer box on screen. */
@media(orientation:landscape) and (max-height:500px){body[data-screen="race"] main{padding-top:64px}body[data-screen="race"] .flight,body[data-screen="race"] #stage{min-height:0}body[data-screen="race"] .answer-form{padding-top:8px}}
/* On phones the keyboard and answer box own the bottom of the screen, so notices sit at the top. */
@media(max-width:700px){.toast{top:calc(16px + env(safe-area-inset-top, 0px));bottom:auto}}
.race-notice{margin:8px 0 0;padding:8px 16px;border:2px solid var(--mint);background:var(--ink);color:var(--white);font-size:1rem;line-height:1.4;text-align:center}
/* Notices can be dismissed with a tap. */
.toast.visible{cursor:pointer}
