/* Motorsport working surface. F1 manual palette, with a quiet light shell. */
:root{--bg:#ece9e5;--panel:#f7f4f1;--line:#cfcbc6;--team:#e80020;--race-bg:#15151e;--race-ink:#fff;--race-muted:#b4b4bf}html[data-theme=dark]{--bg:#0d0d12;--panel:#1d1d27;--line:#373743;--muted:#b8b8c3}
body{background:var(--bg)}header{height:76px;border:0;max-width:1500px;padding:0 3%;}.brand{font-size:30px}.header-label{border:1px solid var(--line);border-radius:30px;padding:9px 16px;font-size:10px}.theme{background:var(--panel);padding:10px 14px;border:1px solid transparent;border-radius:24px}main{max-width:1500px;padding:0 3% 24px}
.selection{grid-template-columns:1.4fr 1fr 1fr auto;gap:12px;padding:4px 0 12px}.selection label{background:var(--panel);border-radius:12px;padding:12px 16px;gap:3px;border:1px solid var(--line);font-size:11px}.selection label:nth-child(2){border-left:4px solid var(--team)}.selection select{background:transparent;border:0;padding:0;min-height:32px;font-size:15px;font-weight:600}.selection .quiet{border:1px solid var(--line);border-radius:12px;min-height:75px;padding:12px;font-size:11px;max-width:120px}.profile-context{margin:0 0 14px;font-size:11px;padding-left:3px}
.stage{background:var(--race-bg);color:var(--race-ink);height:clamp(500px,65vh,660px);min-height:500px;border-radius:22px;overflow:hidden;border:1px solid #ffffff15;isolation:isolate;box-shadow:0 16px 40px #15151e15}.stage:before{content:'';position:absolute;width:65%;height:80%;left:20%;top:10%;pointer-events:none;background:radial-gradient(ellipse,#ff1e000c,transparent 68%);z-index:-1}.stage:after{content:'';position:absolute;left:28px;right:28px;top:130px;height:1px;background:linear-gradient(90deg,#ffffff16,transparent 80%);pointer-events:none}.stage .overline{color:var(--race-muted);font-size:10px}.stage-heading{left:28px;right:28px;top:25px}.stage h1{font-style:italic;font-size:clamp(42px,5vw,74px);letter-spacing:-.4px;max-width:80%;gap:16px}.stage h1 #circuitName{overflow-wrap:anywhere}.title-line{height:5px;width:44px;transform:skew(-25deg);flex-shrink:0}.track-meta{display:flex;gap:22px;font-size:26px;line-height:1.2;padding-top:19px}.track-meta span{color:var(--race-muted);display:block;font-size:10px;margin:6px 0 0}.canvas-wrap{inset:75px 185px 42px}.gear-hud{left:28px;top:48%;width:155px;transform:translateY(-30%)}#gear{font-size:152px;line-height:1;color:white;font-style:italic;letter-spacing:-5px}.gear-unit{color:var(--race-muted);font-size:24px}.gear-hud h2{font-size:16px}.gear-line{gap:15px}.phase{color:#ff705c;background:#ff1e001a;border:1px solid #ff1e0040;padding:5px 9px;border-radius:5px;margin-top:10px}.gear-rail{display:flex;gap:4px;margin-top:18px}.gear-rail i{height:5px;flex:1;background:#ffffff25;border-radius:1px}.gear-rail i.filled{background:#ff1e00}.next-hud{right:28px;top:48%;width:155px;padding:20px 0;border-top:1px solid #ffffff26;border-bottom:1px solid #ffffff26}.next-hud h2{font-size:30px;color:white}.next-data{color:var(--race-muted)}.next-data strong{color:white;font-size:36px}.scene-toolbar{left:28px;right:28px;bottom:18px;color:var(--race-muted);font-size:11px}.scene-toolbar button{color:white;border:1px solid #ffffff28;padding:8px 12px;background:#ffffff08;border-radius:8px;min-height:40px}.view-actions{display:flex;gap:8px}.scene-toolbar button[aria-pressed=true]{background:white;color:#15151e}.stage .track-marker{width:28px;height:28px;min-height:28px;color:#fff;background:#252530;border:1px solid #ffffff4d;box-shadow:0 2px 8px #0004;font-size:10px}.stage .track-marker:before{content:'';position:absolute;inset:-7px}.stage .track-marker.active{background:#ff1e00;border-color:#ff1e00;box-shadow:0 0 0 5px #ff1e0020}
.session-readout{position:absolute;right:28px;bottom:86px;display:flex;align-items:baseline;gap:7px;font-size:10px;color:var(--race-muted);letter-spacing:1px}.session-readout strong{font:600 29px 'Formula 1';color:white;font-variant-numeric:tabular-nums}.phase-track{display:flex;align-items:center;gap:6px;margin-left:14px}.phase-track span{font-size:9px;padding:5px 8px;color:var(--race-muted);border-radius:4px;border:1px solid #ffffff1c}.phase-track span.active{color:white;background:#ffffff14;border-color:#ffffff60}
.controls{padding:18px 20px 7px;margin-top:12px;background:var(--panel);border:1px solid var(--line);border-radius:14px}.play{border-radius:8px;min-height:44px}.icon-button{min-width:44px;min-height:44px;border-radius:8px}.speed select{min-height:40px}.lap-position strong{font-size:18px;font-weight:700}.lap-position>span{font-size:12px}input[type=range]{height:4px;margin:22px 0 16px}input[type=range]::-webkit-slider-thumb{height:17px;width:17px}.corners{margin-top:20px}.corners-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.corners-heading h2{font:600 22px 'Formula 1';margin:0}.corners-heading span{font-size:11px;color:var(--muted)}#cornerList{border:0;gap:10px;padding:2px 2px 12px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}.corner-card,.corner-card:first-child,.corner-card:last-child{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px;flex:1 0 160px;overflow:hidden}.corner-card.active{background:var(--panel);border-color:var(--red)}.corner-card.active:before{top:0;left:0;right:0;height:3px}.corner-card h3{font-size:24px;margin:6px 0 14px}.corner-card button{min-height:106px}.corner-card .number{font-size:10px}.corner-map{width:100%;height:45px;display:block;margin:4px 0 7px;color:var(--muted)}.corner-card.active .corner-map{color:var(--red)}.corner-card label{padding-top:10px;border-top:1px solid var(--line)}.corner-card select{font-size:18px;font-weight:600;min-height:36px;padding:3px 8px}.help{max-width:none;border-bottom:1px solid var(--line);padding:5px 0 18px;font-size:12px}.help summary{font-size:12px}.help p{font-size:13px}footer{font-size:10px}
.stage-heading>div:first-child{flex:1;min-width:0}.stage h1{max-width:none}.stage h1 #circuitName{overflow-wrap:normal}.track-meta>div{min-width:65px}.track-meta{flex-shrink:0}.stage h1.long-title{font-size:clamp(32px,3.5vw,52px)}
@media(hover:hover){.corner-card:hover{background:var(--soft)}.stage .track-marker:not(.active):hover{background:#fff;color:#15151e;border-color:#fff}.scene-toolbar button:hover{background:#ffffff18}.selection label:hover{border-color:var(--muted)}}
@media(max-width:1000px){.stage h1{font-size:55px}.track-meta{gap:12px;font-size:22px}.canvas-wrap{inset:100px 140px 60px}.gear-hud{width:120px}#gear{font-size:120px}.next-hud{width:120px}.phase-track{display:none}.selection{grid-template-columns:1.2fr 1fr 1fr}.selection .quiet{min-height:32px;max-width:none;grid-column:1/-1;justify-self:end;border:0;padding:0}.profile-context{margin-top:-6px}}
@media(max-width:700px){header{height:64px;padding:0 4%}.brand{font-size:26px}.theme{font-size:11px;padding:8px 12px}main{padding:0 4% 20px}.selection{grid-template-columns:1fr 1fr;gap:8px;padding:0 0 8px}.selection label{padding:9px 12px;border-radius:9px}.selection label:first-child{grid-column:1/-1}.selection select{font-size:14px}.selection .quiet{grid-column:1/-1;min-height:24px}.profile-context{font-size:10px;line-height:1.5;max-width:100%;margin:0 0 12px}.stage{height:590px;min-height:590px;border-radius:16px}.stage-heading{left:18px;right:18px;top:20px}.stage h1{font-size:38px;max-width:100%;gap:9px}.title-line{width:24px}.track-meta{display:none}.stage:after{left:18px;right:18px;top:106px}.canvas-wrap{inset:86px 0 180px}.gear-hud{left:18px;top:auto;bottom:72px;width:145px;transform:none}#gear{font-size:72px}.gear-unit{font-size:18px}.gear-hud .overline{font-size:9px}.gear-rail{margin-top:8px;width:120px}.gear-hud h2{font-size:13px}.phase{font-size:9px;padding:3px 6px;margin-top:4px}.next-hud{right:18px;top:auto;bottom:97px;width:130px;padding:12px 0;text-align:right}.next-hud h2{font-size:24px;margin:7px 0}.next-data strong{font-size:27px}.session-readout{right:18px;bottom:68px}.session-readout strong{font-size:20px}.scene-toolbar{left:18px;right:18px;bottom:16px}.scene-toolbar>span{display:none}.view-actions{width:100%;justify-content:space-between}.scene-toolbar button{font-size:11px}.controls{padding:14px 12px 4px}.controls-row{gap:8px}.play{min-width:142px}.icon-button{min-width:36px}.speed select{font-size:11px;max-width:58px}.lap-position{margin:0}.corners{margin-top:16px}.corners-heading span{font-size:10px}#cornerList .corner-card{flex-basis:144px;padding:12px!important;border:1px solid var(--line);border-radius:10px}.corner-card button{min-height:96px}.corner-card h3{font-size:21px}.corner-card select{min-height:44px}.corner-map{height:36px}footer{font-size:9px}}
