:root{--panel:#0c0e12b8;--text:#f2f4f7;--muted:#9aa3ad;--purple:#b46cff;--green:#3ddc84;--yellow:#ffd23f;--red:#ff4d4d;--accent:#ff6a13}*{box-sizing:border-box}html,body{height:100%;color:var(--text);background:#0b0d10;margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;overflow:hidden}canvas#view{width:100vw;height:100vh;display:block}.num{font-variant-numeric:tabular-nums;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}#hud{--hud-scale:1;--auto-zoom:1;--panel-a:.7}#hud>*{zoom:calc(var(--hud-scale) * var(--auto-zoom))}.panel{background:rgba(12, 14, 18, var(--panel-a,.72));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);border-radius:10px}#hud.clear .panel{-webkit-backdrop-filter:none;backdrop-filter:none;text-shadow:0 1px 2px #000000e6,0 0 6px #0009}#hud [hidden]{display:none!important}#timing{width:280px;padding:12px 14px;position:fixed;top:16px;left:16px}#timing .trk{letter-spacing:.14em;color:var(--muted);text-transform:uppercase;font-size:11px}#lapTime{margin:2px 0 0;font-size:34px;font-weight:700}#lapTime.invalid{color:var(--red);text-decoration:line-through;text-decoration-thickness:2px}#lapState{color:var(--muted);letter-spacing:.1em;min-height:14px;font-size:11px}#delta{min-height:22px;font-size:18px;font-weight:700}#delta.ahead{color:var(--green)}#delta.behind{color:var(--red)}.sectors{grid-template-columns:repeat(3,1fr);gap:4px;margin:8px 0;display:grid}.sec{background:#ffffff12;border-bottom:3px solid #0000;border-radius:5px;padding:4px 6px;font-size:13px}.sec span{color:var(--muted);font-size:10px;display:block}.sec.purple{border-color:var(--purple)}.sec.green{border-color:var(--green)}.sec.yellow{border-color:var(--yellow)}.sec.live{border-color:#ffffff80}.row{justify-content:space-between;padding:2px 0;font-size:14px;display:flex}.row span{color:var(--muted);letter-spacing:.1em;font-size:12px}#lapList{color:var(--muted);max-height:110px;margin-top:6px;font-size:12px;overflow:hidden}#lapList div{justify-content:space-between;display:flex}#lapList .inv{opacity:.6;text-decoration:line-through}#lapList .pb{color:var(--purple)}#minimap{width:220px;height:220px;padding:0;position:fixed;top:16px;right:16px}#minimap.small{width:150px;height:150px}#minimap.large{width:300px;height:300px}#timing.compact{width:auto;min-width:220px}#timing.compact .sectors,#timing.compact #lapList{display:none}#timing.compact .row:has(#lastLap){display:none}#timing.compact .row:has(#optLap){display:none}#fps{color:var(--muted);padding:3px 9px;font-size:12px;position:fixed;top:16px;left:50%;transform:translate(-50%)}#dash{text-align:right;width:236px;padding:12px 14px;position:fixed;bottom:16px;right:16px}#shiftLights{justify-content:space-between;display:flex}#shiftLights i{background:#ffffff1a;border-radius:50%;width:11px;height:11px}#shiftLights i.on.g{background:#2ee66b;box-shadow:0 0 6px #2ee66b}#shiftLights i.on.r{background:#ff3b3b;box-shadow:0 0 6px #ff3b3b}#shiftLights i.on.b{background:#3d8bff;box-shadow:0 0 6px #3d8bff}#shiftLights.flash i.on{background:#3d8bff;box-shadow:0 0 8px #3d8bff}#shiftLights.flash.off i.on{box-shadow:none;background:#ffffff1a}#dashrow{align-items:flex-end;gap:10px;margin-top:10px;display:flex}#dashrow .spd{margin-left:auto}#pedals{gap:4px;height:50px;display:flex}.pedal{background:#ffffff1a;border-radius:3px;width:9px;height:100%;position:relative;overflow:hidden}.pedal>div{height:0;position:absolute;bottom:0;left:0;right:0}#thrFill{background:#2ee66b}#brkFill{background:#ff3b3b}#gear{text-align:center;background:#ffffff14;border-radius:6px;width:48px;font-size:40px;font-weight:800}#speed{font-size:44px;font-weight:700;line-height:1}.unit{color:var(--muted);letter-spacing:.12em;font-size:11px}#flags{color:var(--muted);letter-spacing:.08em;margin-top:4px;font-size:11px}#tyres{padding:8px 10px 10px;position:fixed;bottom:16px;right:262px}#tyres .thead{letter-spacing:.14em;color:var(--muted);font-size:10px}#tyres .thead span{letter-spacing:.04em;opacity:.8;margin-left:4px}.tgrid{grid-template-columns:repeat(2,48px);gap:8px 20px;margin-top:6px;display:grid;position:relative}.tgrid:before{content:"";background:#ffffff1a;border-radius:3px;width:6px;margin-left:-3px;position:absolute;top:10px;bottom:10px;left:50%}.tyre{--t:var(--muted);border:2px solid var(--t);background:color-mix(in srgb, var(--t) 24%, transparent);border-radius:9px;flex-direction:column;align-items:center;padding:3px 0 4px;line-height:1.15;display:flex}.tyre b{font-size:17px;font-weight:700}.tyre span{color:#d6dbe0;font-size:10px}.tyre .brk{color:var(--muted)}.tyre.cold{--t:#3d8bff}.tyre.cool{--t:#5cc8e8}.tyre.ok{--t:var(--green)}.tyre.warm{--t:#ffa53f}.tyre.hot{--t:var(--red)}#msg{text-align:center;pointer-events:none;opacity:0;text-wrap:balance;width:max-content;max-width:min(480px,100vw - 32px);padding:10px 18px;font-size:22px;font-weight:700;transition:opacity .25s,transform .25s;position:fixed;top:18%;left:50%;transform:translate(-50%,-6px)}#msg.show{opacity:1;transform:translate(-50%)}#msg small{color:var(--muted);font-size:14px;font-weight:500;display:block}#mouseSteer{pointer-events:none;background:#0c0e1299;border-radius:4px;width:260px;height:8px;position:fixed;bottom:22px;left:50%;transform:translate(-50%);box-shadow:0 0 0 1px #ffffff38}#mouseSteer:after{content:"";background:#ffffff59;width:2px;height:14px;position:absolute;top:-3px;left:50%}#mouseSteerKnob{background:#ff6a13;border:2px solid #111;border-radius:50%;width:16px;height:16px;margin-left:-8px;position:absolute;top:-4px;left:50%}#help{color:#d6dbe0;padding:10px 14px;font-size:12px;line-height:1.6;transition:opacity .4s,visibility .4s;position:fixed;bottom:16px;left:16px}#help .muted{color:var(--muted)}#help.hidden,#helpChip.hidden{opacity:0;visibility:hidden}#helpChip{color:#d6dbe0;padding:5px 10px;font-size:12px;transition:opacity .4s,visibility .4s;position:fixed;bottom:16px;left:16px}#overlay{background:radial-gradient(#0a0c1080,#0a0c10db);justify-content:center;align-items:center;padding:16px;transition:opacity .2s,visibility .2s;display:flex;position:fixed;inset:0}#overlay.hidden{opacity:0;visibility:hidden;pointer-events:none}#menu{background:#0d0f13f0;border:1px solid #ffffff12;border-radius:16px;flex-direction:column;width:min(940px,100%);height:min(760px,100%);padding:20px 22px 14px;transition:transform .2s;display:flex;box-shadow:0 24px 80px #00000080}#overlay.hidden #menu{transform:scale(.98)}.mhead{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px 16px;display:flex}#menu h1{letter-spacing:.1em;align-items:center;gap:12px;margin:0;font-size:30px;font-weight:800;display:flex}#menuPaused{letter-spacing:.2em;text-transform:uppercase;color:var(--text);background:#ffffff1f;border-radius:999px;padding:3px 9px;font-size:11px;font-weight:700}#menuPaused[hidden]{display:none}#menu .sub{color:var(--muted);margin:4px 0 0;font-size:14px}#menu:has(#menuBody[hidden]){height:auto}#loadState{color:var(--muted);justify-content:center;align-items:center;gap:10px;min-height:20px;margin:26px 0 12px;display:flex}#loadState[hidden]{display:none}#loadState:before{content:"";border:2px solid #ffffff2e;border-top-color:var(--accent);border-radius:50%;width:14px;height:14px;animation:.8s linear infinite spin}#loadState.err{color:var(--red);line-height:1.5;display:block}#loadState.err:before{content:none}@keyframes spin{to{transform:rotate(360deg)}}#menuBody{flex-direction:column;flex:1;min-height:0;display:flex}#menuBody[hidden]{display:none}.menu-actions{flex-direction:row-reverse;gap:8px;display:flex}.mbtn{appearance:none;color:var(--text);cursor:pointer;background:#ffffff14;border:0;border-radius:9px;padding:11px 18px;font-family:inherit;font-size:15px;font-weight:600}.mbtn:hover{background:#ffffff24}.mbtn:active{transform:translateY(1px)}.mbtn.primary{background:var(--accent);color:#111;padding:11px 30px;font-size:16px;font-weight:700}.mbtn.primary:after{content:" ▸"}.mbtn.primary:hover{background:#ff8133}.seg{scrollbar-width:none;background:#ffffff0f;border-radius:8px;flex-shrink:0;max-width:100%;padding:2px;display:flex;overflow-x:auto}.seg button{appearance:none;color:var(--muted);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:6px;padding:6px 11px;font-family:inherit;font-size:13px}.seg button:hover{color:var(--text)}.seg button.on{color:var(--text);background:#ffffff2e;font-weight:600}.seg.tabs{align-self:flex-start;margin:16px 0 4px;padding:3px}.seg.tabs button{padding:8px 20px;font-size:15px;font-weight:600}.seg.tabs button.on{background:var(--text);color:#111}.seg.chips{align-self:flex-start;margin:4px 0 10px}.seg.chips button{padding:7px 14px;font-size:14px}#menuContent{scrollbar-width:thin;scrollbar-color:#fff3 transparent;flex:1;min-height:0;margin:6px -8px 0;padding:4px 8px 8px;overflow-y:auto}#menuContent[data-tab=settings]{flex-direction:column;display:flex}.mh{letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin:14px 0 8px;font-size:12px;font-weight:700}.mh-row{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 12px;margin:14px 0 8px;display:flex}.mh-row .mh{margin:0}.mnote{color:var(--muted);margin:0;font-size:12px}p.mnote:not(:empty){margin:8px 2px}.search{appearance:none;font:inherit;color:var(--text);background:#ffffff12;border:1px solid #ffffff1a;border-radius:8px;width:min(240px,100%);padding:6px 10px;font-size:13px}.search::placeholder{color:var(--muted)}.cards{gap:8px;display:grid}.cards.cars{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}.cards.circuits{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.card{appearance:none;text-align:left;font:inherit;color:var(--text);cursor:pointer;background:#ffffff0a;border:1px solid #ffffff14;border-radius:11px;flex-direction:column;gap:3px;padding:12px 14px;transition:background .12s,border-color .12s;display:flex;position:relative}.card:hover{background:#ffffff14}.card.sel{border-color:var(--accent);background:#ff6a131f}.card.sel:after{content:"✓";background:var(--accent);color:#111;border-radius:50%;place-items:center;width:20px;height:20px;font-size:12px;font-weight:800;display:grid;position:absolute;top:9px;right:11px}.card[hidden]{display:none}.cname{padding-right:24px;font-size:16px;font-weight:700}.cblurb{color:#c9cfd6;font-size:13px}.cfacts{color:var(--muted);font-size:12px}.cbest{color:var(--muted);min-height:15px;margin-top:3px;font-size:12px}.cbest b{color:var(--text);font-weight:600}.circuit-card{flex-direction:row;align-items:center;gap:12px;padding:10px 12px}.circuit-card svg{flex-shrink:0;width:64px;height:64px}.circuit-card path{fill:none;stroke:#e8ecf0;stroke-width:4.5px;stroke-linejoin:round}.circuit-card circle{fill:var(--accent);stroke:#111;stroke-width:1.5px}.circuit-card.loading{opacity:.6;cursor:progress}.ctext{flex-direction:column;gap:2px;min-width:0;display:flex}.menu-settings{background:#ffffff06;border-radius:11px;padding:4px}.mrow{border-radius:8px;justify-content:space-between;align-items:center;gap:6px 16px;min-height:46px;padding:8px 10px;transition:opacity .15s;display:flex}.mrow+.mrow{box-shadow:0 -1px #ffffff0a}.mrow:hover{background:#ffffff09}.mrow.dim{opacity:.45}.mrow.dim:hover,.mrow.dim:focus-within{opacity:.85}.mlabel{color:#dfe3e8;flex-direction:column;gap:2px;min-width:0;font-size:14px;display:flex}.mlabel small{color:var(--muted);font-size:12px}.slider{flex-shrink:0;align-items:center;gap:10px;display:flex}.slider output{text-align:right;width:44px;font-size:13px}input[type=range]{appearance:none;cursor:pointer;background:0 0;width:180px;height:22px;margin:0}input[type=range]::-webkit-slider-runnable-track{background:linear-gradient(to right, var(--accent) var(--fill,0%), #ffffff24 var(--fill,0%));border-radius:3px;height:6px}input[type=range]::-moz-range-track{background:#ffffff24;border-radius:3px;height:6px}input[type=range]::-moz-range-progress{background:var(--accent);border-radius:3px;height:6px}input[type=range]::-webkit-slider-thumb{appearance:none;background:var(--text);border:0;border-radius:50%;width:16px;height:16px;margin-top:-5px}input[type=range]::-moz-range-thumb{background:var(--text);border:0;border-radius:50%;width:16px;height:16px}.keys .mrow{min-height:40px;padding:4px 10px}.keycaps{flex-shrink:0;align-items:center;gap:6px;display:flex}.keycap{appearance:none;font:inherit;cursor:pointer;min-width:58px;color:var(--text);text-align:center;background:#ffffff1a;border:1px solid #ffffff1f;border-bottom-width:3px;border-radius:6px;padding:5px 10px;font-size:13px;font-weight:700}.keycap:hover{background:#ffffff29}.keycap.empty{color:var(--muted);background:0 0;border-style:dashed}.keycap.capturing{background:var(--accent);color:#111;border-color:var(--accent);min-width:118px}.keycap.fixed{cursor:default;opacity:.7}.ref{background:#ffffff06;border-radius:11px;grid-template-columns:max-content 1fr;gap:6px 18px;margin:0;padding:10px 14px;font-size:13px;display:grid}.ref dt{color:var(--text);font-weight:600}.ref dd{color:#c9cfd6;margin:0}.mfoot{color:var(--muted);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 12px;margin:12px 2px 4px;font-size:13px;display:flex}button.link{color:var(--muted);cursor:pointer;font:inherit;background:0 0;border:0;padding:0;text-decoration:underline}button.link:hover{color:var(--text)}button.link.armed{color:var(--red)}.menu-hint{text-align:center;color:var(--muted);border-top:1px solid #ffffff0f;margin:10px 0 0;padding-top:10px;font-size:12px}kbd{font:inherit;color:var(--text);background:#ffffff1a;border-radius:4px;padding:0 5px;font-weight:700}.menu-hint kbd{margin:0 1px;padding:0 4px;font-size:11px}#menu button:focus,#menu input:focus{outline:none}#menu button:focus-visible,#menu input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.mrow:has(:focus-visible){outline:2px solid var(--accent);outline-offset:1px}.seg.tabs:has(:focus-visible){outline:2px solid var(--accent);outline-offset:1px}.seg.chips:has(:focus-visible){outline:2px solid var(--accent);outline-offset:1px}#menu .mrow :focus-visible,#menu .seg button:focus-visible{outline:none}#menu .keycap:focus-visible{outline:2px solid var(--text);outline-offset:1px}:is(#menu .seg.tabs:has(:focus-visible) button.on,#menu .seg.chips:has(:focus-visible) button.on){box-shadow:inset 0 0 0 2px var(--accent)}#menu .mbtn.primary:focus-visible{outline-color:var(--text);outline-offset:2px}@media (width<=640px){#overlay{padding:0}#menu{border:0;border-radius:0;height:100%;padding:14px 16px 10px}#menu h1{font-size:22px}.menu-actions{width:100%}.menu-actions .mbtn{flex:1}.seg.tabs{align-self:stretch}.seg.tabs button{flex:1;padding:8px 6px}.mrow{flex-wrap:wrap}.mrow .seg,.slider{margin-left:auto}.menu-hint{display:none}.cards.circuits{grid-template-columns:1fr}}@media (height<=560px){#overlay{padding:8px}.seg.tabs{margin-top:8px}.menu-hint{display:none}}@media (width<=700px),(height<=520px){#timing{padding:9px 12px}#lapTime{font-size:28px}.sectors{margin:6px 0}.row{padding:1px 0;font-size:13px}#lapList,#help{display:none}#msg{font-size:19px;top:42%}}@media (width<=700px){#timing{width:calc(100vw - 32px)}#minimap{display:none}#mouseSteer{width:200px;bottom:170px}#tyres{padding:7px 8px;bottom:50px;left:16px;right:auto}#tyres .thead,.tyre .brk{display:none}.tgrid{grid-template-columns:repeat(2,42px);gap:6px 14px;margin-top:0}.tyre b{font-size:15px}}@media (height<=520px){#timing .row:has(#optLap){display:none}#minimap{width:150px;height:150px}#msg{top:30%}}@media (width>=1700px) and (height>=1000px){#hud{--auto-zoom:1.2}#menu{zoom:1.2}}@media (width>=2300px) and (height>=1300px){#hud{--auto-zoom:1.5}#menu{zoom:1.5}}@media (prefers-reduced-motion:reduce){*,:before{transition-duration:0s!important}#loadState:before{animation-duration:2.4s}#shiftLights.flash.off i.on{background:#3d8bff;box-shadow:0 0 8px #3d8bff}}
