#race-screen{position:absolute;z-index:45;inset:68px 18px 16px;background:#14271bf5;border:1px solid #bfd3a33d;border-radius:16px;padding:22px;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:18px;color:#ecf0df;box-sizing:border-box}#race-screen[hidden],#race-hud[hidden]{display:none!important}#app.race-open #menu-screen,#app.race-open #pause-screen,#app.race-open #result-screen{visibility:hidden}#app.race-open .topbar{z-index:46}#race-screen *{box-sizing:border-box}#race-screen header,#race-screen footer{display:flex;justify-content:space-between;gap:16px;align-items:center;flex:none}#race-screen h2{font-size:clamp(22px,2.6vw,34px);margin:6px 0 0;line-height:1.25}#race-screen header small{font:10px monospace;letter-spacing:2px;color:#bed184}#race-screen p{font-size:14px;color:#b5c3a9;line-height:1.6;margin:7px 0}#race-screen button,#race-hud button{font:inherit;min-height:42px;padding:9px 16px;border-radius:8px;border:1px solid #bdd17b60;background:#293e27;color:#e9f1d8;cursor:pointer;touch-action:manipulation}#race-screen button:disabled{opacity:.4;cursor:default}#race-screen .race-primary{background:#d9ef78;color:#203515;font-weight:700;border-color:#e5fa9b}#race-screen .race-quiet{background:transparent;color:#b0c09f}#race-screen input,#race-screen select{font:16px system-ui;color:#e9f1d8;background:#102018;border:1px solid #bbd38b60;border-radius:6px;padding:10px;min-width:0;max-width:100%}.race-modes{display:grid;grid-template-columns:1fr 1fr;gap:20px;flex:1;min-height:220px}.race-modes button{text-align:left;padding:24px!important;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;background:radial-gradient(ellipse at 90% 10%,#64863260,transparent),#1a3022!important}.race-modes b{font:36px monospace;color:#bbd36c}.race-modes h3{font-size:26px;margin:12px 0 0}.race-modes strong{color:#d9ef78;margin-top:20px}.race-setup{display:grid;grid-template-columns:1.4fr 1fr;gap:32px;min-height:0}.race-rules{margin:0;padding-left:24px;display:grid;gap:12px}.race-rules b{font-size:17px}.race-config{display:flex;flex-direction:column;gap:16px;padding:24px;background:#0d1e1666;border:1px solid #bed18b30;border-radius:10px}.race-config label{display:grid;gap:8px;font-size:14px}.race-config .race-check{display:flex;align-items:center}.race-check input{width:18px;height:18px;accent-color:#d9ef78}.race-invite{display:flex;gap:8px;flex:none}.race-invite input{flex:1}.race-seats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;flex:1;min-height:240px}.race-seat{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;padding:14px 10px;border:1px solid var(--seat,#6c82545c);border-radius:10px;background:#203627}.race-seat-no{font:10px monospace;color:var(--seat,#8e9e7b);align-self:flex-start}.race-seat img{width:100%;height:clamp(85px,19vh,190px);object-fit:contain}.race-seat h3{font-size:16px;margin:8px 0;max-width:100%;overflow-wrap:anywhere}.race-seat .ready{color:#dcf18a!important}.race-seat p{font-size:12px!important}.race-seat.empty{border-style:dashed;background:#101e174d}.race-empty-symbol{font-size:50px;color:#b8cc7870;margin:15px}.race-lobby-actions{display:flex;gap:8px;align-items:center}.race-footnote{font-size:12px!important;margin:0!important}.race-result-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:24px;flex:1;min-height:220px}.race-podium{display:flex;align-items:flex-end;justify-content:center;gap:6px;min-width:0}.podium-player{flex:1;min-width:0;text-align:center;display:flex;flex-direction:column;align-items:center}.podium-player img{width:100%;height:clamp(90px,23vh,210px);object-fit:contain}.podium-player strong{font-size:13px;margin:6px 0;overflow-wrap:anywhere}.podium-step{width:100%;height:75px;background:#314b34;display:flex;flex-direction:column;justify-content:center;border-radius:5px 5px 0 0}.podium-step b{font:32px monospace}.podium-step span{font-size:11px}.rank-1{order:2}.rank-1 .podium-step{height:135px;background:#d9ef78;color:#203515}.rank-2{order:1}.rank-2 .podium-step{height:100px}.rank-3{order:3}.rank-4{order:4}.rank-4 .podium-step{height:55px}.race-standings{align-self:center;min-width:0;overflow:auto}.race-standings table{width:100%;border-collapse:collapse;font-size:14px;text-align:left}.race-standings th{font-size:11px;color:#9baa90;font-weight:400}.race-standings th,.race-standings td{padding:12px 7px;border-bottom:1px solid #b8c99826}.race-standings td:first-child{overflow-wrap:anywhere}.race-standings .self{color:#e2f48b}.race-standings td b{font:20px monospace}.race-standings small{font:9px monospace;opacity:.6}.race-result-actions{justify-content:flex-end!important}.race-result-actions button:first-child{margin-right:auto}#race-hud{position:absolute;z-index:15;left:18px;bottom:16px;display:flex;align-items:center;gap:8px;max-width:calc(100% - 36px);background:#101e17e6;border:1px solid #d8ee7959;border-radius:8px;padding:8px 12px;font-size:12px}#race-hud>div{display:flex;gap:10px;align-items:center}#race-hud b{color:#d9ef78}.race-network{font-size:10px;color:#b6c3a6}#race-hud button{font-size:11px;min-height:32px;padding:4px 10px}#race-labels{position:absolute;inset:0;pointer-events:none;z-index:13;overflow:hidden}#race-labels>span{position:absolute;top:0;left:0;max-width:170px;font:12px system-ui;background:#102018e6;color:var(--seat);border:1px solid var(--seat);border-radius:4px;padding:4px 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 2px 9px #0005}#app.race-active #inspect-button{display:none}#app.race-active .inspect-viewbar{bottom:64px}
@media(max-width:600px){#race-screen{inset:65px 10px 10px;padding:14px;gap:12px}#race-screen h2{font-size:22px}#race-screen header small{font-size:8px;letter-spacing:1px}#race-screen header p{font-size:12px}.race-modes{grid-template-columns:1fr;gap:12px;min-height:0}.race-modes button{padding:16px!important}.race-modes h3{font-size:22px}.race-modes b{font-size:22px}.race-modes strong{margin-top:8px}.race-setup{grid-template-columns:1fr;gap:18px}.race-config{padding:16px}.race-seats{grid-template-columns:1fr 1fr;gap:8px;min-height:0}.race-seat{padding:8px}.race-seat img{height:85px}.race-seat h3{font-size:13px;margin:4px 0}.race-seat p{margin:3px 0!important}.race-seat button{min-height:32px!important;padding:5px!important;font-size:12px!important}.race-invite{flex-wrap:wrap}.race-invite input{flex-basis:100%;font-size:12px!important}.race-invite button{flex:1;min-height:34px!important;font-size:12px!important}#race-screen footer{flex-wrap:wrap;gap:8px}.race-lobby-actions{width:100%;justify-content:flex-end}.race-result-layout{grid-template-columns:1fr;gap:12px}.race-podium{min-height:205px}.podium-player img{height:85px}.podium-player strong{font-size:10px}.rank-1 .podium-step{height:85px}.rank-2 .podium-step{height:65px}.podium-step{height:50px}.rank-4 .podium-step{height:40px}.race-standings th,.race-standings td{padding:7px 4px;font-size:12px}.race-result-actions button{font-size:12px!important;padding:7px!important}#app.handheld #race-hud{top:154px;bottom:auto;left:10px;right:10px;max-width:none;padding:5px;font-size:10px;gap:4px}#race-hud>div{gap:5px;flex-wrap:wrap}.race-network{display:none}#race-hud button{font-size:9px;padding:3px 6px}.race-rules p{font-size:13px!important}}
@media(orientation:landscape) and (max-height:550px){#race-screen{inset:46px 10px 8px;padding:12px;gap:8px}#race-screen h2{font-size:20px}#race-screen header small{font-size:8px}#race-screen header p{font-size:11px;margin:4px 0}#race-screen button{min-height:32px;padding:6px 11px;font-size:12px}.race-modes{min-height:120px;gap:12px}.race-modes button{padding:12px!important}.race-modes b{font-size:20px}.race-modes h3{font-size:20px;margin:3px 0}.race-modes p{font-size:11px!important}.race-modes strong{margin-top:6px;font-size:12px}.race-rules{gap:5px;grid-template-columns:1fr 1fr;font-size:12px}.race-rules b{font-size:13px}.race-rules p{font-size:11px!important;margin:3px 0!important}.race-config{padding:12px;gap:10px}.race-config label{font-size:12px;gap:4px}.race-config select{font-size:13px!important;padding:6px!important}.race-seats{min-height:125px;gap:7px}.race-seat{padding:6px}.race-seat img{height:66px}.race-seat h3{font-size:12px;margin:3px 0}.race-seat p{font-size:10px!important;margin:2px 0!important}.race-empty-symbol{font-size:25px;margin:6px}.race-seat button{min-height:25px!important;font-size:10px!important;padding:3px 5px!important}.race-invite input{font-size:11px!important;padding:5px!important}.race-result-layout{gap:12px;min-height:150px}.podium-player img{height:65px}.podium-player strong{font-size:10px}.podium-step{height:38px}.rank-1 .podium-step{height:70px}.rank-2 .podium-step{height:50px}.rank-4 .podium-step{height:30px}.podium-step b{font-size:22px}.podium-step span{font-size:9px}.race-standings table{font-size:11px}.race-standings th,.race-standings td{padding:6px 4px}.race-footnote{font-size:10px!important}#race-screen footer p{font-size:11px}#app.handheld #race-hud{top:75px;bottom:auto;left:calc(50% - 170px);max-width:340px;padding:3px 6px;font-size:10px}.race-network{display:none}#race-labels>span{font-size:10px;max-width:130px}}

.race-podium{align-self:center;width:100%}#app.race-open #pause-button{visibility:hidden}@media(orientation:landscape) and (max-height:550px){#app.handheld #race-hud{left:12px;top:102px;max-width:320px}}
#race-screen header>button{flex:none;white-space:nowrap;min-width:68px}#race-screen header>div{min-width:0}
@media(max-width:600px){.race-rules{grid-template-columns:1fr 1fr;gap:12px 18px}.race-rules b{font-size:14px}.race-rules p{font-size:12px!important}.race-config{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px}.race-config>h3,.race-config>p,.race-config>.race-check,.race-config>button{grid-column:1/-1}}

#race-hud.network-lost .race-network{display:inline;color:#f0bd95}
/* Consistent briefing rhythm: heading, illustration/content, back-left/next-right. */
#race-screen footer{margin-top:auto;border-top:1px solid #bdd17b30;padding-top:12px}
.race-modes{flex:none;min-height:0;max-width:920px;width:100%;align-self:center;margin:auto 0;gap:18px}.race-modes button{padding:22px!important;min-height:190px}.race-modes small{color:#a9b79b;font-size:12px;line-height:1.6;margin-top:8px}.race-modes b{font-size:24px}.race-modes h3{font-size:23px}.race-modes strong{margin-top:12px}
.race-step-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.race-step-tabs button{border:0!important;border-radius:0!important;border-bottom:2px solid #b3c29740!important;background:transparent!important;color:#a7b59f!important}.race-step-tabs button[aria-current=step]{border-color:#d9ef78!important;color:#d9ef78!important;background:#d9ef7808!important}.race-instruction{flex:1;min-height:0;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px}.race-instruction svg{width:300px;max-width:70%;height:140px;flex-shrink:0;fill:none;stroke:#cfe88a;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.race-instruction h3{font-size:22px;margin:12px 0 4px}.race-instruction p{max-width:720px}.race-config{display:flex;flex-direction:row;justify-content:center;gap:22px;padding:12px}.race-config label{min-width:0;flex:1;max-width:320px}#race-labels>span{width:180px;max-width:calc(100% - 24px)}
#race-share{color:#edf1df;background:#14271b;border:1px solid #bbcc8660;border-radius:16px;padding:22px;width:min(1000px,94vw);max-height:90dvh;overflow:auto}#race-share::backdrop{background:#07130ce0}#race-share header{display:flex;align-items:center;justify-content:space-between;gap:12px}#race-share h2{font-size:24px;margin:0 0 16px}#race-share button,#race-share a{padding:10px 14px;border:1px solid #bed17b60;border-radius:8px;color:#d9e6c5;background:#293e27;font:inherit;text-decoration:none;cursor:pointer}#race-share .race-primary{background:#d9ef78;color:#203515;font-weight:700}.race-share-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:24px}.race-share-preview{background:#0e1c13;border-radius:12px;padding:16px;min-width:0;align-self:center}.race-share-preview p{font-size:12px;color:#aabd97}.race-share-info{min-width:0}.race-share-info ol{padding-left:24px}.race-share-info li{padding:8px 0;overflow-wrap:anywhere}.race-share-info li span{display:block;color:#b5c3a9;font-size:12px}.race-share-buttons{display:flex;flex-wrap:wrap;gap:8px}.race-share-info small{display:block;font-size:12px;margin-top:12px;color:#a9b79b}
@media(max-width:600px){.race-modes{gap:10px}.race-modes button{min-height:140px;padding:14px!important}.race-modes h3{font-size:20px}.race-step-tabs button{padding:8px 2px!important;font-size:11px!important}.race-instruction svg{height:100px}.race-instruction h3{font-size:20px}.race-config{gap:10px}.race-config label{font-size:12px}#race-labels>span{font-size:10px;width:145px}.race-share-layout{grid-template-columns:1fr}.race-share-preview .podium-player img{height:90px}#race-share{padding:14px}.race-lobby-actions{width:auto;flex-wrap:wrap}.race-share-buttons>*{font-size:13px!important}}
@media(orientation:landscape) and (max-height:550px){.race-modes button{min-height:135px;padding:12px!important}.race-instruction{display:grid;grid-template-columns:180px 1fr;grid-template-rows:auto 1fr;text-align:left;column-gap:18px;padding:0}.race-instruction svg{grid-row:1/3;width:180px;max-width:100%;height:95px}.race-instruction h3{font-size:17px;margin:0}.race-instruction p{font-size:12px!important;margin:3px 0!important}.race-step-tabs button{min-height:29px!important;padding:4px!important}.race-config{padding:6px;gap:12px}.race-config label{display:flex;align-items:center;font-size:11px;max-width:none}.race-config select{font-size:12px!important;padding:4px!important}#race-screen footer{padding-top:7px}.race-share-layout{grid-template-columns:1fr 1fr;gap:14px}#race-share{padding:12px}#race-share h2{font-size:18px;margin:0}.race-share-info h3{margin:4px 0}.race-share-info p{margin:4px 0;font-size:12px}.race-share-info li{padding:2px 0;font-size:12px}.race-share-info ol{margin:4px 0}.race-share-buttons>*{font-size:11px!important;padding:6px!important}.race-share-preview .podium-player img{height:75px}.race-share-info small{font-size:10px;margin:4px 0}}
@media(max-width:600px){#race-share .race-share-layout{gap:12px}#race-share .race-share-info h3{font-size:18px;margin:4px 0}#race-share .race-share-info p{font-size:13px;margin:6px 0;line-height:1.4}#race-share .race-share-info ol{margin:8px 0;padding-left:22px}#race-share .race-share-info li{font-size:13px;padding:4px 0}#race-share .race-share-preview{padding:10px}#race-share .race-share-preview p{margin:8px 0;font-size:11px}#race-share .race-share-buttons{gap:6px}#race-share .race-share-info small{margin-top:6px;line-height:1.4}}
/* Content must keep its intrinsic height rather than overflowing a shrunken flex row. */
#race-screen .race-instruction{flex:1 0 auto;min-height:215px;overflow:visible;gap:6px}#race-screen .race-instruction h3{margin:6px 0}#race-screen .race-instruction p{margin:4px 0;line-height:1.6}.race-step-tabs,.race-config{flex-shrink:0}.race-config{flex-wrap:wrap}.race-config .race-check{display:flex;align-items:center;justify-content:center;gap:8px;flex:none}.race-ready-banner{padding:12px 18px;border-left:3px solid #d9ef78;background:#d9ef7812;border-radius:6px;flex-shrink:0;display:flex;gap:8px;flex-direction:column}.race-ready-banner b{font-size:18px;color:#e2f48b}.race-ready-banner span{font-size:13px;color:#c0ceb1}@keyframes ready-breathe{0%,100%{box-shadow:0 0 0 0 #d9ef7855;filter:brightness(1)}50%{box-shadow:0 0 0 5px #d9ef7818;filter:brightness(1.12)}}.race-ready-pulse{animation:ready-breathe 1.6s ease-in-out infinite}#race-item-slot{position:absolute;z-index:17;left:12px;top:250px;max-width:min(320px,70%);padding:9px 12px;background:#192b20eb;border:1px solid #cadf7b;color:#e4f5a2;border-radius:8px;font-size:12px;cursor:pointer}#race-item-slot[hidden]{display:none}#race-item-slot.locked{border-color:#f1a75f;box-shadow:0 0 14px #ffb56666}#race-item-slot.stunned{border-color:#efb2d4;color:#efb2d4}
@media(prefers-reduced-motion:reduce){.race-ready-pulse{animation:none;box-shadow:0 0 0 3px #d9ef7850}}
@media(orientation:landscape) and (max-height:550px){#race-screen .race-instruction{min-height:105px;flex:1 0 auto}.race-ready-banner{padding:7px 10px;gap:3px}.race-ready-banner b{font-size:14px}.race-ready-banner span{font-size:11px}#race-item-slot{top:235px;padding:4px 8px;font-size:10px;max-width:230px}.race-config .race-check{font-size:11px}}
@media(max-width:600px){.race-ready-banner{padding:10px}.race-ready-banner b{font-size:16px}.race-ready-banner span{font-size:12px}#race-screen .race-instruction{min-height:180px}#race-item-slot{top:290px;font-size:11px;max-width:220px}}
.race-ready-banner{flex-direction:row;justify-content:space-between;align-items:center}.race-ready-banner>div{display:flex;flex-direction:column;gap:5px;min-width:0}.race-ready-banner>button{flex-shrink:0;font-size:17px!important;min-width:120px}.race-ready-banner b{line-height:1.45}@media(max-width:600px){.race-ready-banner>button{min-width:84px;font-size:13px!important;padding:9px!important}.race-ready-banner b{font-size:14px}.race-ready-banner span{font-size:11px}}@media(orientation:landscape) and (max-height:550px){.race-ready-banner>button{font-size:13px!important;min-width:98px}}
#race-screen[data-screen=setup]{gap:12px}#race-screen[data-screen=setup] h2{font-size:26px}#race-screen[data-screen=setup] .race-instruction{min-height:150px;padding:6px;gap:4px}#race-screen[data-screen=setup] .race-instruction svg{height:95px;width:240px}#race-screen [role=status]:empty,#race-screen .race-footnote:empty{display:none}#race-screen footer{position:sticky;bottom:-22px;background:#14271bf5;z-index:2;padding-bottom:8px}#race-item-slot{top:420px}
@media(max-width:600px){#race-screen[data-screen=setup] h2{font-size:22px}#race-screen footer{bottom:-14px}#race-item-slot{top:290px}}
@media(orientation:landscape) and (max-height:550px){#race-screen[data-screen=setup]{gap:8px}#race-screen[data-screen=setup] h2{font-size:20px}#race-screen[data-screen=setup] .race-instruction{min-height:90px}#race-screen[data-screen=setup] .race-instruction svg{height:80px;width:170px}#race-screen footer{bottom:-12px}#race-item-slot{top:235px}}
.race-item-guide{display:grid;grid-template-columns:1fr 1fr;gap:8px 20px;text-align:left;font-size:12px;color:#d6e7a4;margin:8px 0}.race-item-guide span{padding:6px 8px;background:#d9ef780a;border-radius:5px}@media(orientation:landscape) and (max-height:550px){.race-item-guide{grid-column:1/-1;font-size:11px;gap:4px;margin:3px 0}.race-item-guide span{padding:3px 6px}}@media(max-width:600px){.race-item-guide{font-size:11px;gap:4px}.race-item-guide span{padding:5px}}
/* Race-focused HUD: shared visual hierarchy for small and large viewports. */
#race-grid-countdown[hidden],#race-item-reveal[hidden],#race-route[hidden],#race-item-slot[hidden]{display:none!important}
#app.race-driving .topbar,#app.race-driving .health-card,#app.race-driving .run-extras,#app.race-driving .mission,#app.race-driving .timer-panel,#app.race-driving #map-card,#app.race-driving .movement-help,#app.race-driving #scare-button,#app.race-driving #pause-button,#app.race-driving #race-labels{display:none!important}
#app.race-driving .goal-radar>svg,#app.race-driving .hud-bearing,#app.race-driving .hud-flight,#app.race-driving .hud-range{display:none!important}
#app.race-driving .abilities small{display:none!important}
#app.race-driving:not(.handheld) .abilities{width:auto;display:flex;gap:8px;right:18px;bottom:18px;left:auto}
#app.race-driving:not(.handheld) .abilities .ability{min-width:75px;padding:8px 12px;font-size:12px}
#app.race-driving #race-hud{inset:12px auto auto 14px;display:block;width:180px;max-width:38%;padding:0;border:0;background:none;border-radius:0;pointer-events:none;color:#ecf4d9;text-shadow:0 2px 5px #000}
#app.race-driving #race-hud .race-place{display:flex;align-items:baseline;gap:6px;line-height:1}
#app.race-driving #race-hud .race-place>b{font:italic 800 clamp(40px,6vw,68px)/1 system-ui;color:#e3f68e;-webkit-text-stroke:1px #30462a}
#app.race-driving #race-hud .race-place>span{font:18px monospace}
#app.race-driving #race-hud .race-place>strong{margin-left:auto;font:14px monospace}
#app.race-driving #race-hud .race-progress-list{display:grid;gap:3px;margin:8px 0 4px}
#app.race-driving .race-progress-list>div{display:grid;grid-template-columns:15px minmax(0,1fr) 35px;align-items:center;gap:5px;padding:3px 5px;border-left:3px solid var(--seat);background:#10201885;font:12px system-ui;border-radius:0 4px 4px 0}
#app.race-driving .race-progress-list>div.self{background:#33482bba;color:#e4f692}
#app.race-driving .race-progress-list span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#app.race-driving .race-progress-list small{text-align:right;font:10px monospace}
#app.race-driving #race-hud .race-network{display:block;font-size:10px}
#race-route{position:absolute;z-index:12;pointer-events:none;left:14px;top:205px;width:75px;height:150px;color:#e3edcc;opacity:.52;filter:drop-shadow(0 1px 2px #000)}
#race-route svg{display:block;width:100%;height:100%}
#app.race-driving #race-item-slot{position:absolute;inset:14px 18px auto auto;width:112px;min-height:0;max-width:none;display:flex;flex-direction:column;align-items:center;gap:3px;padding:9px;border-radius:22px;background:#13251ddd;border:1px solid var(--item);color:var(--item);font:12px system-ui;box-shadow:0 3px 15px #0004;opacity:1;z-index:18}
#race-item-slot svg{width:65px;height:65px;filter:drop-shadow(0 0 7px color-mix(in srgb,var(--item) 30%,transparent))}
#race-item-slot b{font-size:12px;font-weight:600}#race-item-slot small{font-size:10px;color:#d7e0c8}
#race-item-slot:disabled{cursor:default}#race-item-slot.locked{box-shadow:0 0 20px var(--item)}
#race-item-reveal{position:absolute;z-index:24;right:15%;top:32%;width:180px;padding:15px;display:flex;flex-direction:column;align-items:center;gap:7px;background:radial-gradient(ellipse,#13251df2,transparent);color:var(--item);pointer-events:none;text-shadow:0 2px 5px #000;animation:item-arrive .25s ease-out}
#race-item-reveal svg{width:120px;height:120px;filter:drop-shadow(0 0 16px var(--item))}#race-item-reveal b{font-size:20px}#race-item-reveal span{font-size:12px;color:#ecf3dc}
#race-grid-countdown{position:absolute;inset:0;z-index:23;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;background:#10201818;color:#e5f798;text-shadow:0 3px 15px #000}
#race-grid-countdown b{font:800 clamp(80px,20vh,150px)/1.2 system-ui}#race-grid-countdown span{font-size:16px}
#race-screen .race-seat.not-ready{border-color:#79916466;background:#18291d}#race-screen .race-seat.not-ready:not(.is-self) img{opacity:.55;filter:saturate(.4)}
#race-screen .race-seat.is-ready{background:linear-gradient(160deg,#3d512c55,#18291d);border-color:var(--seat)}
#race-screen .race-seat.is-self{box-shadow:inset 0 0 0 1px var(--seat)}
#race-screen .race-seat.is-ready p.ready{background:#d9ef781c;padding:4px 13px;border-radius:20px}
#race-screen .race-item-guide{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;max-width:900px;margin:10px auto}
#race-screen .race-item-guide>div{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#0b1b1466;border:1px solid #a8bc7933;border-radius:8px;text-align:left}
#race-screen .race-item-guide svg{width:46px!important;height:46px!important;flex:0 0 46px;color:var(--item)}
#race-screen .race-item-guide p{margin:0;font-size:12px;line-height:1.5}#race-screen .race-item-guide b{display:block;color:#e3edcf;font-size:13px}#race-screen .race-item-guide span{display:block}
#race-screen .race-instruction:has(.race-item-guide)>svg{display:none}#race-screen .race-instruction:has(.race-item-guide){min-height:0;padding:10px;flex:none}
@keyframes item-arrive{from{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}
@media(max-height:550px){#app.race-driving #race-hud{top:8px;left:10px;width:150px}#app.race-driving #race-hud .race-place>b{font-size:38px}#app.race-driving .race-progress-list>div{font-size:10px;padding:2px 4px}#race-route{top:155px;left:7px;height:90px;width:50px}#app.race-driving #race-item-slot{top:8px;right:10px;width:88px;padding:5px}#race-item-slot svg{width:44px;height:44px}#race-item-slot b{font-size:10px}#race-item-slot small{font-size:9px}#race-item-reveal{top:23%;right:18%;width:130px}#race-item-reveal svg{width:80px;height:80px}#race-item-reveal b{font-size:16px}#race-screen .race-item-guide{gap:5px;margin:5px auto}#race-screen .race-item-guide>div{padding:5px 8px}#race-screen .race-item-guide p{font-size:11px}}
@media(max-width:600px){#app.race-driving #race-hud{left:10px;width:155px;max-width:48%}#race-route{top:184px;height:110px;width:60px}#app.race-driving #race-item-slot{right:10px;width:96px}#race-item-reveal{right:12%;top:35%;width:135px}#race-item-reveal svg{width:90px;height:90px}#race-screen .race-item-guide{grid-template-columns:1fr}#race-screen .race-ready-banner b{font-size:14px}}
@media(prefers-reduced-motion:reduce){#race-item-reveal{animation:none}}
#race-screen:has(.race-item-guide){gap:10px}
#race-screen .race-instruction:has(.race-item-guide){padding:0}
#race-screen .race-instruction:has(.race-item-guide)>h3{display:none}
#race-screen .race-instruction:has(.race-item-guide)>p{margin:3px auto 8px;max-width:900px}
#race-screen .race-item-guide span{padding:0;background:none;border:0}
#race-screen:has(.race-item-guide) .race-config{padding:10px 14px;gap:12px}
#race-screen:has(.race-item-guide) .race-config select{padding:7px}
#race-screen:has(.race-item-guide)>p[role=status]:empty{display:none}
#race-screen:has(.race-item-guide) footer{position:static;margin-top:auto}
#app[data-phase=race-grid] #game-hud{display:block}
#race-screen[data-screen=lobby] footer{position:static;margin-top:auto}
#race-screen[data-screen=lobby] .race-seats{flex:none;min-height:0}
#race-screen[data-screen=lobby] .race-seat{min-height:210px}
@media(orientation:landscape) and (max-height:550px){#race-screen[data-screen=lobby] .race-seat{min-height:160px;padding:7px}#race-screen[data-screen=lobby] .race-seat img{height:58px}#race-screen[data-screen=lobby] .race-seat h3{margin:3px 0;font-size:12px}#race-screen[data-screen=lobby] .race-seat p{margin:2px 0}#race-screen[data-screen=lobby] .race-seat button{font-size:11px;min-height:30px;padding:4px 8px}#race-screen[data-screen=lobby] .race-ready-banner{padding:7px 10px}}
#app.race-open #map-card{display:none!important}
/* v3: a lobby is a game screen, not a scrolling article. */
#race-screen[data-screen=lobby]{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:12px;padding:16px;overflow:hidden}
#race-screen[data-screen=lobby] header p{margin:3px 0 0}
#race-screen[data-screen=lobby] .race-seats{height:100%;min-height:0;grid-auto-rows:minmax(0,1fr)}
#race-screen[data-screen=lobby] .race-seat{min-height:0;overflow:hidden;padding:10px;gap:3px;justify-content:center}
#race-screen[data-screen=lobby] .race-seat img{height:clamp(48px,18vh,135px);max-height:45%;min-height:0;flex-shrink:1}
#race-screen[data-screen=lobby] .race-seat h3{margin:3px 0;font-size:15px}
#race-screen[data-screen=lobby] .race-seat p{margin:2px 0;line-height:1.2}
#race-screen[data-screen=lobby] .race-empty-symbol{margin:3px;font-size:36px}
#race-screen[data-screen=lobby] .race-seat.empty p{display:none}
#race-screen[data-screen=lobby] footer{margin:0;min-height:40px;padding-top:8px;flex-wrap:nowrap}
#race-screen[data-screen=lobby]>.race-footnote{display:none}
#race-screen[data-screen=lobby] .race-seat button{min-height:38px;flex-shrink:0;padding:7px 15px}
#race-screen .race-ready-pulse{animation:ready-beacon 1s ease-in-out infinite;border:3px solid #f2ffc4!important;font-weight:800!important;box-shadow:0 0 0 3px #d9ef7840}
@keyframes ready-beacon{0%,100%{background:#d9ef78;box-shadow:0 0 0 2px #d9ef7822,0 0 8px #d9ef7833;filter:brightness(.92)}50%{background:#edffa8;box-shadow:0 0 0 6px #d9ef7840,0 0 25px #d9ef78aa;filter:brightness(1.12)}}
.race-step-tabs{grid-template-columns:repeat(5,minmax(0,1fr))!important}
#race-screen .race-item-guide{max-width:1040px;gap:14px}
#race-screen .race-item-guide>div{min-height:100px;border:2px solid var(--item);background:#12251deb;border-radius:18px;padding:12px 18px;gap:18px}
#race-screen .race-item-guide svg{width:84px!important;height:84px!important;flex-basis:84px;filter:drop-shadow(0 3px 0 #06140c)}
#race-screen .race-item-guide b{font-size:17px;margin-bottom:5px}#race-screen .race-item-guide p{font-size:13px}
#app.race-driving #race-hud{width:230px;max-width:43%;top:16px;left:16px}
#app.race-driving #race-hud .race-place>b{font-size:88px;line-height:.95;-webkit-text-stroke:2px #243b18;text-shadow:0 4px 0 #071409}
#app.race-driving #race-hud .race-place>strong{font:bold 18px monospace;background:#15251ee8;border:3px solid #a5bb82;padding:5px 9px;border-radius:10px}
#app.race-driving .race-progress-list>div{font-size:15px;grid-template-columns:21px minmax(0,1fr) 44px;min-height:28px;border-left:5px solid var(--seat);background:#102018d9;padding:3px 7px}
#app.race-driving .race-progress-list small{font-size:12px}#app.race-driving #race-hud .race-network{font-size:12px}
#race-route{top:265px;width:105px;height:210px;opacity:.52}
#app.race-driving #race-item-slot{width:146px;border:5px solid var(--item);outline:3px solid #08180f;border-radius:30px;box-shadow:0 6px 0 #08180f,0 8px 20px #0009;background:#14291ff5;padding:10px;right:20px;top:18px}
#race-item-slot svg{width:88px;height:88px}#race-item-slot b{font-size:16px}#race-item-slot small{font-size:12px}
#app.race-driving #threat-banner,#app.race-driving #threat-ring,#app.race-driving #escape-warning,#app.race-driving #crowd-warning,#app.race-driving #toast{display:none!important}
@media(orientation:landscape) and (max-height:550px){#race-screen[data-screen=lobby]{padding:10px;gap:7px}#race-screen[data-screen=lobby] header h2{font-size:20px}#race-screen[data-screen=lobby] header small{display:none}#race-screen[data-screen=lobby] header p{font-size:11px}#race-screen[data-screen=lobby] .race-seat img{height:58px}#race-screen[data-screen=lobby] .race-seat h3{font-size:12px}#race-screen[data-screen=lobby] .race-seat p{font-size:10px!important}#race-screen[data-screen=lobby] .race-seat button{min-height:30px;padding:3px 8px;font-size:11px}#race-screen[data-screen=lobby] footer{min-height:31px;padding:0}#race-screen[data-screen=lobby] .race-invite button{min-height:32px;padding:5px 10px;font-size:11px}#race-screen[data-screen=lobby] .race-invite input{padding:6px;font-size:12px}#race-screen .race-item-guide{gap:7px}#race-screen .race-item-guide>div{padding:7px;gap:9px;min-height:70px}#race-screen .race-item-guide svg{width:54px!important;height:54px!important;flex-basis:54px}#race-screen .race-item-guide b{font-size:13px}#race-screen .race-item-guide p{font-size:11px}#app.race-driving #race-hud{top:9px;left:10px;width:180px}#app.race-driving #race-hud .race-place>b{font-size:52px}#app.race-driving #race-hud .race-place>strong{font-size:14px;padding:3px 6px}#app.race-driving .race-progress-list>div{font-size:12px;min-height:21px;padding:2px 5px}#app.race-driving .race-progress-list small{font-size:10px}#race-route{top:190px;width:65px;height:112px}#app.race-driving #race-item-slot{width:108px;right:12px;top:10px;padding:6px;border-width:4px}#race-item-slot svg{width:55px;height:55px}#race-item-slot b{font-size:12px}#race-item-slot small{font-size:10px}}
@media(max-width:600px){#race-screen[data-screen=lobby]{padding:10px;gap:8px}#race-screen[data-screen=lobby] header h2{font-size:20px}#race-screen[data-screen=lobby] header small{display:none}#race-screen[data-screen=lobby] .race-seat{padding:6px}#race-screen[data-screen=lobby] .race-seat h3{font-size:12px}#race-screen[data-screen=lobby] .race-seat img{height:70px}#race-screen[data-screen=lobby] .race-seat button{font-size:12px!important;min-height:34px!important}#race-screen[data-screen=lobby] .race-lobby-actions{width:auto}#race-screen[data-screen=lobby] footer button{font-size:12px;padding:6px 9px}#race-screen .race-item-guide>div{min-height:76px;padding:8px;gap:10px}#race-screen .race-item-guide svg{width:62px!important;height:62px!important;flex-basis:62px}#race-screen .race-item-guide b{font-size:14px}#app.race-driving #race-hud{width:178px;left:10px;max-width:49%}#app.race-driving #race-hud .race-place>b{font-size:60px}#app.race-driving #race-hud .race-place>strong{font-size:12px;padding:3px 5px}#app.race-driving .race-progress-list>div{font-size:12px;min-height:24px;grid-template-columns:16px minmax(0,1fr) 33px}#app.race-driving .race-progress-list small{font-size:10px}#race-route{top:235px;width:85px;height:170px}#app.race-driving #race-item-slot{width:112px;right:10px;padding:6px;border-width:4px}#race-item-slot svg{width:60px;height:60px}#race-item-slot b{font-size:12px}}
@media(prefers-reduced-motion:reduce){#race-screen .race-ready-pulse{animation:none;box-shadow:0 0 0 4px #d9ef7866;border-width:4px!important}}
#race-impact[hidden]{display:none!important}
#race-impact{position:absolute;bottom:18%;left:50%;transform:translateX(-50%);z-index:25;display:flex;align-items:center;gap:12px;color:var(--impact);background:#102119f2;border:4px solid var(--impact);outline:3px solid #08170e;border-radius:18px;padding:9px 15px;pointer-events:none;box-shadow:0 5px 0 #08170e}
#race-impact svg{width:52px;height:52px}#race-impact>div{display:grid;grid-template-columns:auto auto;align-items:center;gap:5px 12px}#race-impact b{font-size:20px}#race-impact span{font:bold 18px monospace}#race-impact i{grid-column:1/-1;height:5px;background:currentColor;transform:scaleX(var(--remaining));transform-origin:left;border-radius:3px}
#app[data-race-hit]::after{content:'';position:absolute;inset:0;z-index:21;pointer-events:none;border:8px solid #f4d77355;box-shadow:inset 0 0 85px #f4d77344;animation:impact-wash .5s ease-out}
#app[data-race-hit=missile]::after{border-color:#ffab6888;box-shadow:inset 0 0 100px #ff773866}
#app[data-race-hit=glue]::after{border-color:#6be7ba66;box-shadow:inset 0 -90px 90px -60px #6be7ba88}
#app[data-race-hit=swatter]::after{border-color:#eba4eb88;box-shadow:inset 0 0 85px #eba4eb55}
@keyframes impact-wash{from{opacity:1}to{opacity:0}}
@media(max-height:550px){#race-impact{bottom:12%;padding:6px 10px;gap:7px}#race-impact svg{width:34px;height:34px}#race-impact b{font-size:15px}#race-impact span{font-size:14px}}
@media(max-width:600px){#race-impact{bottom:29%;padding:8px 10px;gap:7px;white-space:nowrap}#race-impact b{font-size:16px}#race-impact svg{width:38px;height:38px}}
@media(prefers-reduced-motion:reduce){#app[data-race-hit]::after{animation:none}}
#race-screen[data-screen=setup]:has(.race-item-guide){display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;overflow:hidden}
#race-screen[data-screen=setup] .race-instruction:has(.race-item-guide){display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);min-height:0;padding:0;gap:8px;text-align:center}
#race-screen .race-instruction:has(.race-item-guide)>p{width:100%;max-width:1040px;margin:0 auto;font-size:13px;line-height:1.4}
#race-screen .race-item-guide{height:100%;margin:0 auto;min-height:0;grid-auto-rows:minmax(0,1fr)}
#race-screen .race-item-guide>div{min-height:0}
#race-screen .race-item-guide svg{fill:color-mix(in srgb,var(--item) 24%,transparent);stroke:var(--item);stroke-width:4;max-height:100%}
#race-screen[data-screen=setup]:has(.race-item-guide) footer{margin:0;padding-top:5px;position:static}
@media(max-height:550px){#race-screen .race-instruction:has(.race-item-guide)>p{font-size:11px!important;line-height:1.3}#race-screen:has(.race-item-guide) header small,#race-screen:has(.race-item-guide) header p{display:none}#race-screen:has(.race-item-guide) h2{font-size:19px}}
@media(max-width:600px){#race-screen .race-item-guide{gap:7px}#race-screen .race-item-guide svg{width:54px!important;height:54px!important;flex-basis:54px}#race-screen .race-item-guide p{font-size:11px;line-height:1.35}#race-screen .race-item-guide b{font-size:13px;margin-bottom:2px}#race-screen .race-instruction:has(.race-item-guide)>p{font-size:12px}}
#app.race-driving:has(#race-impact:not([hidden])) .goal-radar{opacity:0}

/* Item education reads as four left-to-right illustrated columns. */
#race-screen .race-item-guide{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;max-width:1160px;gap:14px}
#race-screen .race-item-guide>div{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:14px 10px;gap:10px}
#race-screen .race-item-guide svg{width:100px;height:100px;flex:0 1 100px}
#race-screen .race-item-guide p{margin:0;display:flex;flex-direction:column;gap:8px;font-size:14px;line-height:1.5}
#race-screen .race-item-guide b{font-size:18px}
@media(max-height:550px){#race-screen .race-item-guide{gap:8px}#race-screen .race-item-guide>div{padding:6px;gap:3px}#race-screen .race-item-guide svg{width:56px;height:56px;flex-basis:56px}#race-screen .race-item-guide p{font-size:11px;line-height:1.3;gap:3px}#race-screen .race-item-guide b{font-size:14px}}
@media(max-width:600px) and (orientation:portrait){#race-screen .race-item-guide{grid-template-columns:repeat(4,155px);overflow-x:auto;scroll-snap-type:x mandatory;justify-content:start;padding-bottom:10px}#race-screen .race-item-guide>div{scroll-snap-align:start}#race-screen .race-item-guide p{font-size:13px}#race-screen .race-item-guide b{font-size:15px}}

.result-layout>.result-personal{display:none!important}
.result-layout>.result-records{grid-column:1;border-left:0!important;padding-left:0!important;min-width:0}
.result-layout>.result-card{grid-column:2;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0;min-width:0;min-height:0;overflow:hidden}
.result-card canvas{display:block;max-width:100%;max-height:100%;width:auto;height:auto;aspect-ratio:1;object-fit:contain;border-radius:14px}
.result-card figcaption{font-size:12px;text-align:center}
@media(max-width:600px) and (orientation:portrait){.result-layout{display:flex!important;flex-direction:column}.result-layout>.result-records{flex:1;min-height:170px}.result-layout>.result-card{flex:0 0 230px}.result-card canvas{max-height:220px}}

#input-choice{color:#edf2d8;background:#152a1d;border:2px solid #a4ba6d;border-radius:20px;padding:24px;width:min(580px,90vw)}
#input-choice::backdrop{background:#041009cc}#input-choice h2{font-size:24px;margin:0 35px 20px 0}.input-close{position:absolute;right:12px;top:10px;background:none;color:inherit;border:0;font-size:28px}.input-options{display:grid;grid-template-columns:1fr 1fr;gap:14px}.input-options button{display:flex;flex-direction:column;align-items:center;gap:12px;padding:20px;background:#243d29;color:#e9f0d4;border:2px solid #91ad61;border-radius:14px;cursor:pointer}.input-options button:hover,.input-options button:focus-visible{background:#ddef7b;color:#172b1b}.input-options b{font-size:40px}.input-options strong{font-size:20px}.input-options small{font-size:12px}.race-seat .race-pair{font-size:11px;padding:3px 8px;min-height:24px;background:none;border:0;color:#b5c89c}#race-screen .race-config{gap:12px}#race-control{min-width:115px}

@media(max-width:600px) and (orientation:portrait){#result-screen .result-layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) minmax(180px,.85fr);gap:10px;overflow:hidden}#result-screen .result-layout>.result-records{grid-column:1;grid-row:1;min-height:0;overflow:hidden;margin:0;padding:0;border:0;display:flex;flex-direction:column}#result-screen .result-layout>.result-card{grid-column:1;grid-row:2;min-height:0;overflow:hidden}#result-screen .result-card canvas{max-height:100%;max-width:100%}#result-screen .result-buttons{display:grid;grid-template-columns:1fr 1fr;gap:7px}#result-screen .result-buttons button{min-width:0;padding:8px;font-size:12px;white-space:normal}#result-screen .result-ranking-heading{padding-bottom:8px}#result-screen .result-ranking-heading h3{font-size:19px}}

@media(max-width:600px) and (orientation:portrait){#app #result-screen .result-buttons{display:grid!important;grid-template-columns:1fr 1fr!important;grid-auto-flow:row;gap:7px}#app #result-screen .result-buttons>button{height:auto;min-height:44px;font-size:12px}#app #result-screen .result-buttons .share-cta small{display:none}}
#race-grid-countdown{justify-content:flex-start;padding-top:clamp(20px,12vh,75px)}
#app.race-driving #race-route{left:auto;right:20px;top:190px}

.race-self-label{position:absolute;z-index:22;transform:translate(-50%,-100%);padding:7px 12px;background:#ddf179;color:#13251b;border:3px solid #f4ffc0;border-radius:8px;font-weight:800;pointer-events:none;white-space:nowrap}#race-hit-confirm{position:absolute;top:22%;left:50%;transform:translateX(-50%);z-index:26;background:#173621ed;color:#e6ff9d;border:2px solid #d4ed86;border-radius:12px;padding:12px 20px;font-weight:700;pointer-events:none}
#app.race-driving[data-phase=race-grid] #race-labels{display:block!important} #app[data-phase=race-grid] #race-labels>span{width:auto;max-width:150px;background:#102018ee;font-weight:700;border-width:2px}

/* Champion artwork gets a larger reserved slot, not an overlapping transform. */
.race-podium .podium-player.rank-1{flex:1.4}.race-podium .rank-1 img{height:clamp(115px,29vh,265px)}
@media(max-width:600px){.race-share-preview .rank-1 img{height:115px}}

/* Match the site start cue after choosing a multiplayer connection scenario. */
#race-screen footer .start-game-cue:not(:disabled){position:relative;background:#f3df75;color:#253017;border:1px solid #fff0a1;font-weight:700;box-shadow:0 0 18px #f3df7533;animation:start-game-glow 1.15s ease-in-out infinite}
#race-screen footer .start-game-cue:hover,#race-screen footer .start-game-cue:focus-visible{background:#fff1a0;box-shadow:0 0 26px #f3df7570}
@media(prefers-reduced-motion:reduce){#race-screen footer .start-game-cue,#race-screen footer .start-game-cue:after{animation:none}#race-screen footer .start-game-cue{box-shadow:0 0 0 3px #ffe86b80}}
#race-screen footer .start-game-cue:disabled{animation:none}
@media(prefers-reduced-motion:reduce){#race-screen footer .start-game-cue:not(:disabled){animation:none}}

#race-item-reveal{background:#12281ff2;border:3px solid var(--item);border-radius:18px;box-shadow:0 0 25px #d9ef7840}#race-item-reveal>small{font-size:15px;font-weight:800;color:#f0ffcf}
