:root{color-scheme:dark;--ink:#10151c;--panel:#161e27;--muted:#9eacba;--line:#ffffff1a;--accent:#d5f65a;--white:#f4f7f6;font-family:Inter,"Segoe UI",Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--white);overflow:hidden}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:4px}button{border:0}a{color:inherit;text-decoration:none}.hidden{display:none!important}#game{position:fixed;inset:0;width:100%;height:100%;display:block}#boot{position:fixed;inset:0;background:var(--ink);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;z-index:20}#boot small{color:var(--muted);letter-spacing:.2em}.loader{width:36px;height:36px;border:2px solid #ffffff20;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.screen{position:fixed;inset:0;overflow:auto;background:linear-gradient(90deg,#10151cf7 0%,#10151ced 34%,#10151c69 55%,#10151c00 80%),linear-gradient(0deg,#10151ccc,transparent 28%,transparent 75%,#10151c88)}.topbar{height:90px;margin:0 4.5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{font-size:27px;font-weight:900;font-style:italic;letter-spacing:-1.5px}.brand span{font-size:10px;letter-spacing:.2em;font-weight:600;font-style:normal;color:var(--muted);margin-left:14px}.top-status{display:flex;align-items:center;gap:10px;font-size:10px;letter-spacing:.15em;color:#c6d1da}.top-status .gamepads{margin-left:22px;font-size:10px;letter-spacing:0;color:var(--muted)}.status-dot{width:6px;height:6px;background:var(--accent);border-radius:50%;box-shadow:0 0 10px #d5f64550}.menu-layout{display:grid;grid-template-columns:minmax(350px,440px) 1fr;gap:6%;margin:0 4.5%;min-height:calc(100vh - 149px)}.menu-panel{padding:32px 0 22px}.eyebrow{font-size:10px;font-weight:600;letter-spacing:.18em;color:var(--accent);display:flex;align-items:center;gap:10px;margin:0 0 18px}.line{height:1px;width:25px;background:var(--accent)}h1{font-size:clamp(43px,4.4vw,66px);line-height:1.03;letter-spacing:-2.8px;font-weight:700;margin:0 0 16px}h1 em{font-style:italic;font-weight:600;color:var(--accent)}.intro{font-size:13px;line-height:1.65;color:var(--muted);margin:0 0 25px}.mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:#ffffff07;border:1px solid var(--line);padding:4px;border-radius:5px}.mode-switch button{background:transparent;color:var(--muted);padding:12px 6px;font-size:12px;border-radius:3px}.mode-switch button span{font-size:10px;margin-right:8px;opacity:.6}.mode-switch button.selected{background:#e5f3cf12;color:var(--accent);box-shadow:inset 0 -2px var(--accent)}.garage-top{display:flex;align-items:center;justify-content:space-between;margin:21px 0 12px}h2{font-size:21px;letter-spacing:-.6px;margin:0 0 18px}.garage-top h2{margin:0;font-size:14px;font-weight:600}.text-button{color:var(--muted);font-size:10px;background:none;padding:4px 0}.player-form{background:#17212cb8;border:1px solid var(--line);border-radius:6px;padding:14px;margin-bottom:10px}.player-form header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.player-form header strong{font-size:10px;letter-spacing:.12em;font-weight:500;color:var(--muted)}.record{font-family:ui-monospace,monospace;font-size:10px;color:var(--accent)}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.player-form label{font-size:10px;color:var(--muted);display:flex;flex-direction:column;gap:6px}.player-form input[type=text],.player-form select,.setting-row select{min-width:0;width:100%;background:#10161e;border:1px solid #ffffff15;border-radius:3px;padding:9px 8px;color:#eaf0f4;font-size:12px}.car-row{display:flex;align-items:center;gap:10px;margin-top:11px}.car-row label{flex:1}.color-picker{width:33px;height:33px;padding:2px;background:none;border:1px solid #ffffff30;border-radius:4px;cursor:pointer}.car-meta{font-size:10px;color:#8e9aa5;margin-top:9px;display:flex;justify-content:space-between}.input-choice{margin-top:10px}.primary{width:100%;display:flex;align-items:center;justify-content:space-between;padding:16px 19px;font-weight:700;background:var(--accent);color:#172012;font-size:12px;letter-spacing:.08em;border-radius:4px;transition:background .15s,transform .15s}.primary:hover{background:#e5ff83;transform:translateY(-1px)}.primary span{font-size:19px}.menu-panel>.primary{margin-top:17px}.menu-links{display:flex;justify-content:space-between;margin-top:16px}.menu-links button{background:none;color:var(--muted);font-size:11px;padding:4px 0}.menu-links button:hover,.text-button:hover{color:white}.scene-info{position:relative;pointer-events:none;min-height:620px}.scene-location{position:absolute;right:0;top:45px;text-align:right}.scene-location span{font-size:9px;letter-spacing:.18em;color:#e1edf3a3}.scene-location strong{display:block;font-size:32px;line-height:1.05;font-weight:800;letter-spacing:-.7px;margin-top:10px;color:#f2f6f8b5}.track-facts{position:absolute;right:0;top:167px;display:flex;gap:23px}.track-facts div{display:flex;flex-direction:column;gap:8px}.track-facts strong{font-size:20px;font-weight:600}.track-facts strong small{font-size:11px;font-weight:400;color:#ffffff88}.track-facts span{font-size:8px;letter-spacing:.16em;color:#becdd9}.preview-label{position:absolute;bottom:45px;right:0;text-align:right;display:flex;flex-direction:column;gap:9px}.preview-label strong{font-size:38px;font-weight:600;letter-spacing:-1px}.preview-label span:first-child{color:var(--accent);font-size:10px;letter-spacing:.17em}.preview-label span:last-child{color:var(--muted);font-size:11px}.menu-footer{height:59px;display:flex;justify-content:space-between;align-items:center;margin:0 4.5%;border-top:1px solid var(--line);font-size:8px;letter-spacing:.15em;color:#8e9eac}.menu-footer b{font-weight:400;color:#cbd4dd}.storage-message{font-size:10px;color:#ffca7a}.dialog{background:#151d27f7;border:1px solid #ffffff24;border-radius:10px;color:var(--white);padding:29px;max-width:520px;width:calc(100% - 28px);box-shadow:0 30px 100px #0008;max-height:90vh;overflow:auto}.dialog::backdrop{background:#091018b8;backdrop-filter:blur(8px)}.dialog-header{display:flex;justify-content:space-between;align-items:start}.dialog-header .eyebrow{margin-bottom:20px}.dialog-header button{background:none;color:var(--muted);font-size:24px;margin-top:-8px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding:18px 0;font-size:13px;flex-wrap:wrap}.setting-row select{width:130px}.setting-row input{accent-color:var(--accent)}.setting-row input[type=range]{width:100%;margin:0}.muted{font-size:11px;line-height:1.7;color:var(--muted)}.dialog .primary{margin-top:22px}.controls-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:22px}.controls-grid h3{font-size:12px;color:var(--accent);font-weight:500;margin:0 0 12px}.control-row{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line);padding:8px 0;gap:8px}kbd{font:10px ui-monospace,monospace;display:inline-block;background:#ffffff0b;color:white;padding:4px 5px;border:1px solid #ffffff20;border-radius:3px;min-width:21px;text-align:center}.tip{border-left:2px solid var(--accent);padding-left:12px;margin-top:20px}.pause-dialog{max-width:620px}.pause-buttons{display:flex;flex-direction:column;gap:9px}.pause-buttons .primary{margin-top:12px}.secondary{border:1px solid var(--line);background:#ffffff04;border-radius:4px;padding:13px;color:#cdd6df;font-size:12px}.secondary:hover{background:#ffffff0d}.results-dialog{max-width:660px}.result-card{padding:20px 0;border-top:1px solid var(--line);display:grid;grid-template-columns:45px 1fr auto;align-items:center;gap:10px}.result-place{font-size:30px;font-style:italic;color:var(--accent)}.result-card h3{font-size:17px;margin:0 0 5px}.result-card p{font-size:11px;color:var(--muted);margin:0}.result-time{font:21px ui-monospace,monospace;text-align:right}.result-best{font-size:10px;color:var(--accent);margin-top:6px}
#race-ui{position:fixed;inset:0;pointer-events:none}.race-toolbar{position:absolute;top:0;left:0;right:0;height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 25px;background:linear-gradient(#0a132bd1,transparent);z-index:4}.race-toolbar .brand{font-size:21px}.race-toolbar>div{display:flex;align-items:center;gap:10px}.race-toolbar button{pointer-events:auto;background:#101a26aa;border:1px solid #ffffff25;border-radius:4px;padding:7px 11px;color:#e5edf5;font-size:11px}#perf{font:10px ui-monospace,monospace;color:var(--accent)}.hud{position:absolute;inset:0}.hud-top{position:absolute;left:27px;top:81px;display:flex;gap:25px;text-shadow:0 2px 8px #000b}.lap-block{display:flex;flex-direction:column;gap:5px}.hud-label{font-size:9px;letter-spacing:.15em;color:#d6e1e9}.lap-value{font-size:36px;line-height:1;font-weight:700;letter-spacing:-1px}.lap-value small{font-size:15px;font-weight:400;color:#dce6ee}.hud-time{font:19px ui-monospace,monospace;color:#fff}.hud-top .best-time{color:var(--accent);font-size:13px}.driver-label{position:absolute;right:27px;top:82px;text-align:right;text-shadow:0 2px 6px #0008}.driver-label strong{font-size:15px;font-weight:600}.driver-label p{font-size:10px;color:#d7e3ed;margin:5px 0}.input-label{color:var(--accent)!important}.speed-panel{position:absolute;bottom:36px;right:34px;display:flex;flex-direction:column;align-items:end;text-shadow:0 2px 8px #0009}.speed-readout{display:flex;align-items:baseline;gap:8px}.speed-number{font-size:76px;font-weight:700;font-style:italic;letter-spacing:-4px;font-variant-numeric:tabular-nums;line-height:1}.speed-unit{font-size:10px;letter-spacing:.12em;color:#dde4e9}.speed-meter{width:165px;height:3px;background:#ffffff30;margin-top:13px;overflow:hidden}.speed-fill{background:var(--accent);height:100%;width:0;transition:width .1s}.gear-line{display:flex;gap:15px;margin-top:9px;font-size:9px;letter-spacing:.12em;color:#dce5ee}.gear{color:var(--accent);font-size:12px}.minimap{position:absolute;left:26px;bottom:30px;width:184px;height:104px;background:#111b2799;border:1px solid #ffffff25;border-radius:8px}.race-time-box{position:absolute;top:150px;left:27px;font:11px ui-monospace,monospace;color:#e8f0f7;text-shadow:0 2px 4px #000}.checkpoint-hint{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);font-size:10px;color:#e9f2fc;text-shadow:0 2px 5px #000;text-align:center}.hud-finished{position:absolute;inset:40% 10% auto;text-align:center;background:#111b27aa;border:1px solid #ffffff30;padding:20px;border-radius:8px;color:var(--accent);font-size:23px;backdrop-filter:blur(6px)}#countdown{position:absolute;top:38%;left:0;right:0;text-align:center;font-size:100px;font-style:italic;font-weight:800;text-shadow:0 3px 30px #0008;color:var(--accent)}#countdown small{display:block;font-size:11px;letter-spacing:.2em;font-style:normal;margin-top:10px;color:white}#race-notice{position:absolute;top:65px;left:50%;transform:translateX(-50%);background:#101a29d9;border:1px solid #ffffff30;border-radius:5px;padding:10px 16px;font-size:12px;text-align:center;z-index:5}#split-line{position:absolute;left:50%;top:0;bottom:0;width:2px;background:#0f1722}.split .hud{width:50%;right:auto}.split .hud:nth-child(2){left:50%}.split .hud-top{top:75px;left:20px;gap:16px}.split .lap-value{font-size:28px}.split .driver-label{top:156px;right:22px}.split .speed-number{font-size:60px}.split .speed-panel{bottom:30px;right:24px}.split .race-time-box{top:140px;left:20px}.split .minimap{width:148px;height:90px;left:20px}.split .checkpoint-hint{bottom:139px;width:90%}.split .hud-finished{font-size:18px}
@media(min-width:1550px){.menu-layout{grid-template-columns:470px 1fr}.menu-panel{padding-top:48px}.player-form{padding:18px}.intro{font-size:14px}.mode-switch button{padding:15px}.scene-info{min-height:700px}}@media(max-height:850px){.topbar{height:66px}.menu-layout{min-height:calc(100vh - 111px)}.menu-panel{padding-top:23px}.menu-footer{height:45px}.scene-info{min-height:585px}h1{font-size:49px}.intro{margin-bottom:19px}.eyebrow{margin-bottom:13px}.player-form{padding:12px}.garage-top{margin-top:17px}.player-form header{margin-bottom:9px}.primary{padding:14px 17px}}
@media(max-width:850px){.menu-layout{grid-template-columns:340px 1fr;gap:3%}.top-status{font-size:9px}.top-status .gamepads{display:none}.scene-location strong{font-size:23px}.track-facts{gap:12px}.track-facts strong{font-size:16px}.preview-label strong{font-size:26px}.scene-info{min-height:640px}.hud-top{gap:14px}.driver-label{top:160px}.speed-number{font-size:58px}.race-toolbar .brand span{display:none}}
@media(max-width:600px){.screen{background:linear-gradient(90deg,#10151cf7,#10151cce)}.menu-layout{display:block}.scene-info{display:none}.menu-panel{max-width:440px;margin:auto}.menu-footer span:last-child{display:none}.topbar{height:64px}.top-status{display:none}h1{font-size:44px}.race-toolbar{padding:0 12px}.race-toolbar button{font-size:10px;padding:7px}.race-toolbar .brand{font-size:18px}.hud-top{left:15px;top:72px}.driver-label{right:15px}.hud-time{font-size:15px}.minimap{width:130px;height:84px;left:15px;bottom:20px}.speed-panel{bottom:25px;right:20px}.race-time-box{left:15px}.checkpoint-hint{bottom:120px;width:90%}.split .hud-time{font-size:12px}.split .hud-top{left:10px;gap:10px}.split .lap-value{font-size:22px}.split .hud-label{font-size:8px}.split .driver-label{right:12px;top:185px}.split .driver-label strong{font-size:12px}.split .minimap{width:84px;height:55px;left:8px}.split .speed-number{font-size:40px}.split .speed-panel{right:10px;bottom:90px}.split .speed-meter{width:90px}.split .race-time-box{left:10px;font-size:10px}.split .checkpoint-hint{font-size:9px;bottom:153px}.dialog{padding:22px}.controls-grid{gap:14px}.result-card{grid-template-columns:28px 1fr auto}.result-time{font-size:16px}}
/* v1.1 identity, country picker and boost HUD */
.brand{display:flex;flex-direction:column;gap:3px;font-size:20px;line-height:1.1;letter-spacing:-.8px}
.brand strong{font-weight:900}.brand em{color:var(--accent);font-style:italic}.brand span{margin-left:0;font-size:8px;letter-spacing:.22em}
.race-toolbar .brand{font-size:16px}.race-toolbar .brand span{font-size:7px}
.country-field{position:relative;min-width:0;display:flex;flex-direction:column;gap:6px}.field-label{font-size:10px;color:var(--muted)}
.country-current{display:flex;align-items:center;gap:7px;width:100%;min-height:34px;background:#10161e;border:1px solid #ffffff15;border-radius:3px;padding:8px;color:#eaf0f4;font-size:11px;text-align:left}
.country-current>span:not(.country-arrow){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.country-arrow{margin-left:auto;color:var(--muted)}
.country-flag{display:inline-block;width:23px;height:15px;object-fit:cover;flex-shrink:0;border-radius:2px;box-shadow:0 0 0 1px #ffffff20;vertical-align:middle}
.country-options{position:absolute;top:100%;left:0;right:0;min-width:185px;max-height:242px;overflow-y:auto;z-index:12;padding:4px;background:#17232f;border:1px solid #ffffff30;border-radius:5px;box-shadow:0 8px 28px #0009}
.country-options button{display:flex;align-items:center;gap:9px;text-align:left;width:100%;background:transparent;color:#eaf0f4;font-size:11px;padding:10px 8px;border-radius:3px}
.country-options button:hover,.country-options button:focus-visible{background:#ffffff10;outline-offset:-2px}.country-options [aria-selected=true]{background:#d5f65a17;color:var(--accent)}
.driver-country,.result-country{display:flex;align-items:center;gap:7px}.driver-country{justify-content:flex-end}.driver-country .country-flag,.result-country .country-flag{width:20px;height:13px}
.boost-panel{margin-top:13px;width:205px;text-shadow:0 1px 4px #0009;color:#9cddff}.boost-label{display:flex;align-items:center;justify-content:space-between;font-size:9px;letter-spacing:.08em;gap:7px}.boost-label kbd{padding:0;border:0;background:none;font-size:7px;color:#c6d8e3;letter-spacing:0}.boost-label strong{font:10px ui-monospace,monospace;white-space:nowrap}
.boost-meter{height:7px;background:#101923b3;border:1px solid #a0dfff4d;border-radius:2px;margin-top:7px;overflow:hidden}.boost-fill{height:100%;width:100%;background:linear-gradient(90deg,#3caddb,#9ee8ff);transition:width .1s linear}
.boost-active .boost-fill{background:#b5f0ff;box-shadow:0 0 12px #54caff}.boost-active .boost-label{color:#ecfcff}.boost-empty{color:#98a7b2}.boost-empty .boost-meter{border-color:#ffffff30}
.split .boost-panel{width:176px}.split .checkpoint-hint{top:278px;bottom:auto}
@media(max-width:850px){.brand{font-size:18px}.menu-footer span:first-child{display:none}.menu-footer{justify-content:flex-end}.menu-footer .studio-credit{display:inline}}
@media(max-width:600px){.brand{font-size:17px}.race-toolbar .brand{font-size:11px}.race-toolbar .brand span{display:none}.boost-panel{width:160px}.split .boost-panel{width:110px}.split .boost-label{font-size:8px;letter-spacing:0;flex-wrap:wrap}.split .boost-label kbd{display:block;margin-top:2px}.split .boost-label strong{font-size:8px}.split .checkpoint-hint{top:295px;bottom:auto}.menu-footer .studio-credit{font-size:7px;letter-spacing:.09em}}
.country-options.country-above{top:auto;bottom:calc(100% - 12px)}
.menu-footer span.studio-credit{display:inline}
.country-options{left:auto;right:0}
/* Compact grid: the race setup and start button stay inside the viewport. */
#menu{display:flex;flex-direction:column;min-height:0}
#menu .topbar{height:64px;flex-shrink:0}
#menu .menu-layout{flex:1;min-height:0;grid-template-columns:minmax(330px,400px) 1fr;gap:5%;align-items:center}
#menu .menu-panel{padding:16px 0;min-width:0;max-width:none;width:100%}
#menu .eyebrow{margin-bottom:10px;font-size:9px}
#menu h1{font-size:32px;line-height:1.1;letter-spacing:-1px;margin-bottom:8px}
#menu .intro{font-size:12px;line-height:1.4;margin-bottom:18px}
#menu .mode-switch button{padding:11px 5px;font-size:11px}
#menu .garage-top{margin:16px 0 10px}
#player-forms{display:grid;grid-template-columns:1fr;gap:12px}
#menu .player-form{margin:0;padding:12px;min-width:0}
#menu .player-form header{margin-bottom:10px}
#menu .car-row label:last-child{flex:0 0 34px}
#menu .car-row{margin-top:10px}
#menu .player-form select,#menu .player-form input[type=text]{padding:8px 7px;font-size:11px}
#menu .input-choice{margin-top:10px}
#menu .menu-panel>.primary{margin-top:14px;padding:12px 16px}
#menu .menu-links{margin-top:10px}
#menu .scene-info{min-height:0;align-self:stretch}
#menu .scene-location{top:30px}
#menu .track-facts{top:148px;gap:18px}
#menu .preview-label{bottom:34px}
#menu .menu-footer{height:36px;flex-shrink:0;font-size:7px}
#menu.menu-duo .menu-layout{grid-template-columns:minmax(540px,600px) 1fr;gap:3%}
#menu.menu-duo #player-forms{grid-template-columns:1fr 1fr}
#menu.menu-duo .record{font-size:8px}
#menu.menu-duo .player-form header strong{font-size:9px;letter-spacing:.04em}
#menu.menu-duo .car-meta span:first-child{display:none}
#menu.menu-duo .car-meta{justify-content:flex-end}
#menu.menu-duo .scene-location strong{font-size:24px}
#menu.menu-duo .track-facts{flex-wrap:wrap;justify-content:flex-end;max-width:200px}
#menu.menu-duo .preview-label strong{font-size:26px}
.checkpoint-missed{color:#ffc57b;background:#261b15d9;padding:8px 12px;border:1px solid #ffa44880;border-radius:4px}
@media(max-width:900px){#menu.menu-duo .scene-info{display:none}#menu.menu-duo .menu-layout{grid-template-columns:minmax(0,1fr);max-width:680px;width:91%;margin:auto}}
@media(max-width:600px){#menu .topbar{height:54px}#menu .menu-layout{display:grid;grid-template-columns:1fr;width:91%;margin:0 auto}#menu .menu-panel{padding:12px 0}#menu h1{font-size:27px}#menu .scene-info{display:none}#menu .intro{margin-bottom:12px}#menu .garage-top{margin:12px 0 8px}#menu .menu-footer{justify-content:center}#menu.menu-duo #player-forms{gap:8px}#menu.menu-duo .player-form{padding:9px}#menu.menu-duo .field-row{grid-template-columns:1fr;gap:8px}#menu.menu-duo .player-form header{display:block}#menu.menu-duo .record{display:block;margin-top:4px}#menu.menu-duo .car-meta{margin-top:5px}#menu.menu-duo .car-row{gap:5px}#menu.menu-duo .car-row label:last-child{flex-basis:26px}#menu.menu-duo .color-picker{width:26px;height:32px}}
@media(max-height:650px){#menu .topbar{height:52px}#menu .menu-panel{padding:8px 0}#menu .eyebrow{margin-bottom:6px}#menu h1{font-size:28px;margin-bottom:5px}#menu .intro{margin-bottom:10px}#menu .garage-top{margin:10px 0 8px}#menu .mode-switch button{padding:8px 4px}#menu .player-form{padding:10px}#menu .player-form label,#menu .country-field{gap:4px}#menu .player-form header{margin-bottom:8px}#menu .menu-panel>.primary{margin-top:10px;padding:10px 14px}#menu .menu-links{margin-top:6px}#menu .menu-footer{height:28px}#menu .preview-label{bottom:24px}}
@media(max-height:500px){#menu{overflow:auto}#menu .menu-layout{flex:none}#menu .menu-footer{min-height:28px}}
@media(max-width:600px){#menu.menu-duo .menu-panel>.eyebrow,#menu.menu-duo .intro,#menu.menu-duo .car-meta{display:none}#menu.menu-duo h1{margin-bottom:14px}}
@media(max-width:600px){#menu.menu-duo .player-form:last-child .country-options{left:auto;right:0}#menu.menu-duo .player-form:first-child .country-options{left:0;right:auto}}

.game-navigation{display:flex;align-items:center;gap:16px;min-width:0}.portal-back{font-size:10px;color:#b9c5ad;white-space:nowrap}.portal-back:hover{color:var(--accent)}@media(max-width:600px){.game-navigation{gap:12px}#menu .game-navigation .brand{font-size:15px}.portal-back{font-size:9px}}
/* Touch driving: each finger owns its button until release or cancellation. */
.touch-intro,.touch-reset{display:none}.touch-enabled .desktop-intro{display:none}.touch-enabled .touch-intro{display:inline}
#touch-controls[hidden]{display:none!important}
#touch-controls{position:absolute;inset:auto 0 0;z-index:6;display:flex;pointer-events:none;padding:10px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));user-select:none;-webkit-user-select:none}
.touch-driver{flex:1;min-width:0}.touch-player-label{display:none}.touch-groups{display:flex;align-items:end;justify-content:space-between;gap:18px}
.touch-steering{display:grid;grid-template-columns:60px 60px;gap:7px}.touch-pedals{display:grid;grid-template-columns:62px 74px;gap:7px}
.touch-button{pointer-events:auto;touch-action:none;-webkit-touch-callout:none;min-height:52px;border-radius:12px;border:1px solid #ffffff70;background:#13212fe6;color:#edf7ff;font:700 10px system-ui,sans-serif;box-shadow:0 3px 12px #0005;padding:8px 3px}
.touch-arrow{font-size:28px;line-height:1}.touch-drift{grid-column:1 / -1;min-height:44px;color:#d6e4ef}.touch-throttle{background:#d5f65ae8;color:#17210e;border-color:#d5f65a;min-height:66px}.touch-brake{min-height:66px}.touch-boost{grid-column:1 / -1;min-height:44px;background:#183e56e8;border-color:#8de0ff;color:#b7eeff}
.touch-button.is-held{transform:translateY(2px);background:#edffc2;color:#12200a;box-shadow:0 0 16px #d5f65a55}.touch-button:disabled{opacity:.35}.touch-enabled .touch-reset{display:inline-block;pointer-events:auto;touch-action:manipulation;background:#111b27c9;color:#e4edf4;border:1px solid #ffffff50;border-radius:4px;padding:7px 9px;font-size:10px;margin-left:5px;min-height:36px}
.touch-enabled .camera-button{min-height:36px;touch-action:manipulation}.touch-enabled .race-toolbar{height:54px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));padding-top:env(safe-area-inset-top)}
.touch-enabled .hud .speed-panel{bottom:calc(140px + env(safe-area-inset-bottom));right:18px}.touch-enabled .speed-number{font-size:42px}.touch-enabled .speed-meter{width:138px;margin-top:6px}.touch-enabled .boost-panel{width:162px;margin-top:7px}.touch-enabled .boost-label kbd{display:none}.touch-enabled .hud .minimap{bottom:calc(140px + env(safe-area-inset-bottom));width:115px;height:65px}.touch-enabled .hud .checkpoint-hint{bottom:calc(117px + env(safe-area-inset-bottom));font-size:9px}.touch-enabled .hud .driver-label{top:78px}.touch-enabled .hud-top{top:64px}.touch-enabled .race-time-box{top:129px}
.touch-duo{gap:12px}.touch-duo .touch-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.touch-duo .touch-steering,.touch-duo .touch-pedals{display:contents}.touch-duo .touch-button{grid-column:auto;min-height:44px;border-radius:8px;font-size:8px}.touch-duo .touch-arrow{font-size:22px}.touch-duo .touch-player-label{display:block;font-size:8px;color:#e9f4ff;text-shadow:0 1px 4px #000;margin-bottom:5px}.touch-enabled .split .hud .minimap{display:none}.touch-enabled .split .hud .speed-panel{bottom:calc(145px + env(safe-area-inset-bottom));right:10px}.touch-enabled .split .hud .checkpoint-hint{bottom:calc(112px + env(safe-area-inset-bottom));font-size:8px}.touch-enabled .split .boost-panel{width:132px}.touch-enabled .split .driver-label{top:137px}.touch-enabled .split .driver-label p:not(.input-label){display:none}.touch-enabled .split .driver-label strong{font-size:10px}.touch-enabled .split .hud-top{gap:6px;left:8px}.touch-enabled .split .hud-time{font-size:11px}.touch-enabled .split .lap-value{font-size:22px}
@media(max-width:600px){.touch-enabled .hud:not(.split .hud) .driver-label{top:154px}.touch-enabled #menu .menu-links{gap:10px;font-size:10px}.touch-enabled .hud .checkpoint-hint{width:92%}.touch-enabled .touch-groups{gap:10px}.touch-enabled .race-toolbar .brand{font-size:13px}.touch-enabled .race-toolbar>div{gap:6px}.touch-enabled .race-toolbar button{min-height:36px}.touch-enabled .hud .speed-panel{right:14px}.touch-enabled .hud .minimap{left:14px}}
@media(max-height:500px){.touch-enabled .hud .minimap{display:none}.touch-enabled .hud .driver-label{top:60px}.touch-enabled .driver-label p:not(.input-label){display:none}.touch-enabled .driver-label strong{font-size:11px}.touch-enabled .hud .speed-panel{bottom:calc(132px + env(safe-area-inset-bottom))}.touch-enabled .speed-number{font-size:32px}.touch-enabled .hud .checkpoint-hint{bottom:calc(108px + env(safe-area-inset-bottom))}.touch-enabled .speed-meter,.touch-enabled .gear-line{display:none}.touch-enabled .hud .boost-panel{margin-top:2px}.touch-enabled .touch-button{min-height:46px}.touch-enabled .touch-drift,.touch-enabled .touch-boost{min-height:44px}.touch-enabled .touch-throttle,.touch-enabled .touch-brake{min-height:54px}.touch-enabled .split .hud .driver-label{top:120px}.touch-enabled .split .driver-label .input-label{display:none}}
