/* Equipment, private rooms and race actions. Keep the road clear. */
.friends-entry{width:100%;background:#e3eadb;border:1px solid #bacbb5;color:var(--ink);justify-content:flex-start;gap:12px;margin:0 0 12px;text-align:left}
.friends-entry>span{display:grid;gap:3px}.friends-entry small{font-size:11px;font-weight:400;letter-spacing:0}
.equipment-setup{margin:17px 0;padding:15px;border:1px solid #c4cfbd;border-radius:10px;background:#edf0e4}
.equipment-setup h2{margin:0;font-size:10px}.equipment-select{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;margin:12px 0 8px}
.equipment-select select,.friends-dialog select,.friends-dialog input[type="text"]{min-width:0;min-height:44px;padding:9px 11px;border:1px solid #9eae98;border-radius:6px;background:#fbfaf4;color:#173c34;font:inherit}
.equipment-setup p,.race-rulebook,.front-guard-option small{font-size:12px;line-height:1.5;color:#47634f}.equipment-setup p{margin:8px 0 12px}
.front-guard-option{display:flex;align-items:flex-start;gap:10px;line-height:1.4;font-size:13px}.front-guard-option input{width:20px;height:20px;accent-color:#205e4a;flex:none;margin-top:2px}.front-guard-option span{display:grid;gap:4px}.front-guard-option small{display:block}
.race-rulebook{margin-top:12px;padding-top:10px;border-top:1px solid #c4cfbd}.race-rulebook summary{cursor:pointer;min-height:32px;font-weight:700}
.friends-dialog{width:min(660px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;border:1px solid #b7c6ae;border-radius:18px;padding:28px;background:#f5f2e6;color:#173c34;box-shadow:0 22px 90px #071e2470;overscroll-behavior:contain}
.friends-dialog::backdrop{background:#0d2e2baa;backdrop-filter:blur(6px)}.friends-dialog .dialog-heading{margin-bottom:16px}.friends-dialog h2{font-size:clamp(26px,5vw,36px);margin:0}.friends-dialog .eyebrow{margin-bottom:8px;font-size:10px}.friends-dialog .icon-button{flex:none}
.friends-status{min-height:22px;margin:0 0 18px;font-size:14px;line-height:1.5}.friends-status[data-state="error"]{color:#913e28}
.room-connection{padding:12px 2px 0;font-size:12px;line-height:1.5}.room-connection>span{font-weight:700;color:#27684b}.room-connection p{margin:5px 0 0;color:#47634f}
.friends-field{display:grid;gap:7px;min-width:0;font-size:12px;font-weight:700}.friends-intro,.friends-unavailable,.room-rules,.gamepad-guide{font-size:13px;line-height:1.55;color:#47634f}.friends-unavailable{padding:12px;border:1px solid #d3b57d;border-radius:6px;background:#f6e9c9}
.friends-dialog .button{min-height:44px;font-size:13px}.friends-join{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;margin-top:18px}.friends-join input{text-transform:uppercase;letter-spacing:3px}.friends-dialog [hidden]{display:none!important}
.room-invitation{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;border-radius:10px;background:#173c34;color:#f5f2e6}.room-invitation>div{display:grid;gap:4px}.room-invitation .field-label{font-size:9px}.room-invitation strong{font-size:24px;letter-spacing:5px}.room-invitation .button{background:#f5f2e6;color:#173c34}
.room-seats{display:grid;grid-template-columns:1fr 1fr;list-style:none;padding:0;gap:10px;margin:16px 0}.room-seat{display:grid;grid-template-columns:32px 1fr;gap:8px;padding:13px;border:1px solid #c0cbb6;border-radius:10px;background:#faf9f0;min-height:95px}.room-seat[data-ready="true"]{border-color:#4c8667;background:#e5efdf}.room-seat[data-empty="true"]{border-style:dashed;background:transparent;color:#6d7d66}.room-seat .seat-number{font-size:13px;font-weight:700;color:#658165}.room-seat strong{font-size:14px;overflow-wrap:anywhere}.room-seat p{margin:5px 0 0;line-height:1.4;font-size:11px}.room-seat small{display:block;margin-top:5px;font-size:11px;font-weight:700;color:#2b6749}
.room-settings,.room-loadout{display:grid;grid-template-columns:1fr 1fr;gap:12px}.room-loadout{margin-top:14px;padding-top:15px;border-top:1px solid #c4cfbd}.room-loadout .front-guard-option{align-self:end;min-height:52px}.room-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.room-actions .text-button{margin-left:auto;min-height:44px}.friends-dialog :disabled{opacity:.55;cursor:default}
.gamepad-guide{padding:12px;background:#e7eddf;border-radius:8px}
.time-card{position:relative}.penalty-badge{position:absolute;right:0;top:calc(100% + 4px);font-size:11px;line-height:18px;padding:0 7px;border-radius:5px;background:#f4d39b;color:#623617;white-space:nowrap;font-variant-numeric:tabular-nums}.penalty-badge[hidden]{display:none}
.network-badge{position:absolute;top:calc(118px + var(--safe-top));right:calc(12px + var(--safe-right));max-width:190px;padding:6px 9px;border-radius:7px;background:#173c34eb;color:#f5f2e6;font-size:11px;line-height:1.4}.network-badge[data-state="error"]{background:#6d382aeb}.network-badge[hidden]{display:none}
.finish-pending{position:absolute;top:38%;left:50%;transform:translateX(-50%);width:min(360px,calc(100vw - 32px));padding:18px 20px;border-radius:14px;background:#173c34ee;color:#f5f2e6;text-align:center}.finish-pending strong{display:block;font-size:19px;line-height:1.3}.finish-pending span{display:block;margin-top:10px;font-size:13px;line-height:1.5}.finish-pending[hidden]{display:none}
.boost-readiness{position:absolute;left:calc(28px + var(--safe-left));bottom:calc(63px + var(--safe-bottom));color:#f5e0ab;background:#173c34b8;border-radius:5px;padding:4px 7px;font-size:10px;letter-spacing:.5px;pointer-events:none}
#boost-btn{position:relative;overflow:hidden}#boost-btn::after{content:"";position:absolute;left:0;bottom:0;height:3px;width:var(--boost-ready,100%);background:#266b4c}#boost-btn[aria-disabled="true"]{filter:saturate(.45)}
#horn-status{font-size:9px;line-height:11px}#horn-btn{flex-direction:column;gap:1px}#horn-btn[aria-disabled="true"]{opacity:.65}
.standing-penalty{font-size:10px;color:#f1ca7e;white-space:nowrap}.race-standings .standing-row{grid-template-columns:20px 1fr auto}.standing-name small{display:block;font-size:9px;font-weight:400;opacity:.75}
.result-panel{max-width:680px}.result-standings{width:100%;max-height:38vh;overflow:auto}.result-standings .standing-row{display:grid;grid-template-columns:24px minmax(90px,1fr) repeat(3,minmax(58px,auto));gap:9px;align-items:center;padding:11px 8px}.result-standings .standing-row>span:not(.standing-place){font-size:12px;text-align:right;font-variant-numeric:tabular-nums}.result-standings .standing-row.standing-heading{font-size:9px;letter-spacing:.5px;border-bottom:1px solid #bfc9b5;color:#536b54}.result-standings .standing-heading span{font-size:9px!important}.result-standings .standing-penalty{color:#934622}.result-standings details{grid-column:2/-1;font-size:12px;line-height:1.5}.result-standings summary{cursor:pointer;padding:5px 0}.result-standings details p{margin:4px 0;color:#5b6c51}.result-checks{line-height:1.6}
@media(max-width:420px){.friends-dialog{padding:20px 16px}.room-seats{gap:7px}.room-seat{padding:10px;grid-template-columns:20px 1fr}.room-loadout{grid-template-columns:1fr 1fr}.room-seat strong{font-size:13px}.result-panel{padding:24px 14px}.result-standings .standing-row{grid-template-columns:20px minmax(62px,1fr) repeat(3,minmax(46px,auto));gap:5px;padding:9px 3px}.result-standings .standing-row>span:not(.standing-place){font-size:11px}.result-standings .standing-name{font-size:12px}.equipment-select{align-items:stretch;flex-direction:column}.room-actions .button{flex:1}.room-actions .text-button{margin-left:0}}
@media(orientation:landscape) and (max-height:600px){.network-badge{top:calc(62px + var(--safe-top));left:calc(12px + var(--safe-left));right:auto}.finish-pending{top:28%}.result-standings{max-height:45vh}}
@media(prefers-reduced-motion:reduce){.friends-dialog *{scroll-behavior:auto;transition:none}}
@media(max-width:440px){.room-settings,.room-loadout{grid-template-columns:1fr}}

/* Championships remain in menus and results; the racing line stays clear. */
.results-screen{--result-top:calc(96px + var(--safe-top));align-items:flex-start;top:var(--result-top);height:calc(var(--game-height,100dvh) - var(--result-top));padding-top:14px}.result-panel{margin-block:auto;flex-shrink:0}
.result-actions [hidden]{display:none!important}
.result-actions:has(#compare-btn[hidden])>#retry-btn{grid-column:1/-1}
.cup-entry{width:100%;display:flex;align-items:center;gap:14px;text-align:left;background:#ebe5cf;color:#173c34;border:1px solid #b6bba0;margin-top:10px}.cup-entry>svg{flex:none;width:26px;height:26px}.cup-entry>span{display:grid;gap:5px}.cup-entry small{font-size:11px;font-weight:400;letter-spacing:.2px}
.cup-dialog{width:min(680px,calc(100vw - 28px))}.cup-dialog h3,.room-cup h3{font:600 23px/1.15 Georgia,serif;margin:6px 0 10px}.cup-dialog .button{width:100%;margin-top:12px}.cup-dialog .text-button{min-height:44px}.cup-note{font-size:12px;line-height:1.6;color:#47634f}.cup-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cup-choice{display:flex;align-items:flex-start;gap:10px;min-width:0;border:1px solid #b9c7b3;background:#faf9f0;border-radius:11px;padding:16px;cursor:pointer}.cup-choice:has(input:checked){background:#e5eddf;border-color:#26704d;box-shadow:inset 0 0 0 1px #26704d}.cup-choice input{margin-top:3px;accent-color:#26704d;flex:none;width:18px;height:18px}.cup-choice-copy{min-width:0}.cup-choice strong{font-size:18px;font-family:Georgia,serif}.cup-route{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:10px}.cup-route li{display:grid;grid-template-columns:21px 1fr;gap:7px;font-size:12px;line-height:1.4}.cup-route li>span:first-child{font-weight:700;color:#61806a}.cup-route li[data-done="true"]>span:first-child{color:#27684b}.cup-route li[data-done="true"]>span:last-child::after{content:" · complete";color:#27684b;font-size:10px}
.cup-setup{margin-top:17px;padding:14px 16px;background:#ecebde;border-radius:9px}.cup-setup p{font-size:13px;line-height:1.55;margin:7px 0 0}.cup-scoring{margin-top:18px;border-top:1px solid #c4cfbd;padding-top:14px;font-size:12px;line-height:1.6;color:#47634f}.cup-scoring summary{cursor:pointer;font-weight:700;min-height:28px}.cup-scoring p{margin:8px 0}.cup-saved{border:1px solid #afc1a4;background:#edf1e4;border-radius:12px;padding:18px;margin-bottom:18px}.cup-saved>p:not(.eyebrow){font-size:13px;line-height:1.55}.cup-table-wrap{width:100%;overflow-x:auto;overscroll-behavior:contain;margin:16px 0;scrollbar-width:thin}.cup-table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:13px;font-variant-numeric:tabular-nums}.cup-table thead th{font-size:10px;letter-spacing:.5px;text-transform:uppercase;color:#58705a;padding:8px 3px;text-align:right}.cup-table th:first-child{width:25px;text-align:left}.cup-table th:nth-child(2){width:36%;text-align:left}.cup-table td{padding:11px 3px;text-align:right;border-top:1px solid #ced6c1}.cup-table tbody th{padding:11px 3px;text-align:left;font-weight:600;border-top:1px solid #ced6c1;overflow-wrap:anywhere}.cup-table td:first-child{text-align:left;color:#61806a}.cup-table small{display:block;font-size:10px;font-weight:400;margin-top:3px}.cup-table .cup-points{font-weight:800;color:#173c34}.cup-table .is-player{background:#dce8d3}.cup-table .is-player th{color:#195b3b}.cup-result{margin:22px 0 18px;border-top:1px solid #b9c7b3;padding-top:20px}.cup-result h2{font-family:Georgia,serif;font-weight:500;font-size:28px;margin:6px 0 10px}.cup-result>p:not(.eyebrow){font-size:14px;line-height:1.55}.cup-result[hidden]{display:none}
.room-ai-option{margin-top:14px;padding:12px;background:#e9eddf;border-radius:8px}.room-cup{margin:16px 0;padding:16px;border:1px solid #b6c6aa;border-radius:10px;background:#f4f4e9}.room-cup p{font-size:12px;line-height:1.5}.room-cup .cup-route{gap:7px}.room-seat[data-ai="true"]{background:#e9ebdd;border-style:dashed}.room-seat[data-ai="true"] small{color:#586446}.room-rules:empty{display:none}#friends-rejoin{margin-top:10px}
@media(max-width:520px){.cup-choices{grid-template-columns:1fr}.cup-choice{padding:13px}.cup-choice .cup-route{gap:6px}.cup-dialog h2{font-size:26px}.cup-saved{padding:13px}.cup-table{font-size:12px}.cup-table th:first-child{width:19px}.cup-table th:nth-child(2){width:35%}.cup-table thead th{font-size:9px;letter-spacing:0}.cup-table tbody th,.cup-table td{padding:10px 2px}.cup-table .cup-round{font-size:11px}.cup-result h2{font-size:25px}}
@media(orientation:landscape) and (max-height:600px){.cup-dialog{max-height:calc(100dvh - 24px);margin:12px auto;padding:20px}.cup-dialog .dialog-heading{margin-bottom:10px}.cup-dialog .friends-status{margin-bottom:12px}}
@media(max-width:700px) and (orientation:portrait){.results-screen{--result-top:calc(76px + var(--safe-top));padding-top:8px}}
@media(orientation:landscape) and (max-height:600px){.results-screen{--result-top:calc(64px + var(--safe-top));padding-top:8px}}

/* 1.9.0: all active equipment shares one stable dock. The six controls
   remain visible while cooling; directional driving stays at the lower corners. */
#race-actions{
 position:absolute;right:calc(24px + var(--safe-right));bottom:calc(24px + var(--safe-bottom));
 display:grid;grid-template-columns:76px 118px 86px 86px 76px 88px;gap:8px;
 width:570px;pointer-events:none;z-index:17;
}
#race-actions .race-action{
 position:relative;inset:auto;transform:none;display:flex;flex-direction:column;
 align-items:center;justify-content:center;gap:3px;width:auto;min-width:0;
 height:82px;min-height:82px;margin:0;padding:6px 5px 8px;
 border:1px solid #d9e3ca;border-radius:12px;background:#f3f1e5f2;color:#173c34;
 box-shadow:0 3px 14px #0c231a30;overflow:hidden;text-align:center;
 font:inherit;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;
 -webkit-tap-highlight-color:transparent;cursor:pointer;
}
#race-actions #horn-btn,#race-actions #ability-btn,#race-actions #drift-btn,#race-actions #boost-btn,
#race-actions #breaker-btn,#race-actions #deflector-btn{position:relative;inset:auto;transform:none;width:auto!important;min-width:0;display:flex}
#race-actions .race-action>.kk-icon{display:block;flex:none;align-self:flex-start;width:22px;height:22px;margin-left:3px;color:inherit}
#race-actions .race-action .race-action-copy{display:grid;gap:3px;min-width:0;width:100%}
#race-actions .race-action strong{
 display:flex;align-items:center;justify-content:center;min-height:14px;
 font-size:11px;font-weight:750;line-height:13px;letter-spacing:0;white-space:normal;
}
#race-actions .race-action small{
 display:block;min-height:24px;max-width:100%;font-size:10px;line-height:12px;
 letter-spacing:0;color:#3e6250;white-space:normal;font-variant-numeric:tabular-nums;
}
#race-actions .race-action kbd{
 position:absolute;top:4px;right:4px;display:block;min-width:17px;max-width:36px;
 padding:1px 3px;border:1px solid #6e867e80;border-radius:4px;background:#ffffff20;
 font-family:inherit;font-weight:600;line-height:12px;font-size:9px;
 text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:inherit;
}
#race-actions #horn-btn,#race-actions #ability-btn{background:#173c34f2;color:#f8f0d7;border-color:#a0b59c}
#race-actions #ability-btn{border-color:#e0c27f}
#race-actions #horn-btn small,#race-actions #ability-btn small{color:#cfe4bf}
#race-actions #breaker-btn{background:#f1ddc2f5;border-color:#d9b07a}
#race-actions #deflector-btn{background:#c9e4daf5;border-color:#8bc8b4}
#race-actions #boost-btn{background:#e8c37df5;color:#173c34;border-color:#ffe2a8;filter:none}
#race-actions #boost-btn::after{height:4px;background:#236745}
#race-actions .race-action>i{position:absolute;bottom:0;left:0;height:4px;width:100%;background:#9a6936;pointer-events:none;transition:width .08s linear}
#race-actions #ability-btn>i{background:#e8bd6c}
#race-actions #deflector-btn>i{background:#24785c}
#race-actions .race-action[aria-disabled="true"],#race-actions .race-action:disabled{opacity:1;cursor:default;border-color:#9da99c;background:#dce1d6f2;color:#485a4c;box-shadow:none}
#race-actions #horn-btn[aria-disabled="true"],#race-actions #ability-btn[aria-disabled="true"]{background:#263f36f2;color:#dae2d0;border-color:#8c9d8a}
#race-actions .race-action[aria-disabled="true"] small,#race-actions .race-action:disabled small{color:inherit}
#race-actions .race-action.held,#race-actions .race-action[data-state="active"],#race-actions #ability-btn.ability-active{background:#d4af63;color:#173c34;border-color:#fff1bf;box-shadow:0 0 0 2px #f7df9650}
#race-actions .race-action.held small,#race-actions .race-action[data-state="active"] small,#race-actions #ability-btn.ability-active small{color:#234d37}
#race-actions .race-action:focus-visible,.race-tools .race-tool:focus-visible{outline:3px solid #fff3ba;outline-offset:3px}
#race-actions[hidden]{display:none!important}
body.race-paused #race-actions,.race-hud:has(#finish-pending:not([hidden])) #race-actions{visibility:hidden}
.race-hud:has(#race-actions) .boost-readiness{display:none}

/* Recovery stays away from the thumb actions, with its time cost visible. */
.race-hud .race-tools{position:absolute;display:flex;align-items:center;gap:6px;top:calc(88px + var(--safe-top));right:calc(232px + var(--safe-right));pointer-events:none;z-index:18}
.race-hud .race-tools .race-tool{pointer-events:auto;display:flex;align-items:center;justify-content:center;gap:5px;width:44px;min-width:44px;height:44px;min-height:44px;padding:4px;border:1px solid #d4dfc680;border-radius:10px;background:#173c34ed;color:#f7f4e9;touch-action:manipulation;cursor:pointer}
.race-hud .race-tools #recover-btn{width:80px}
.race-hud .race-tools #standings-toggle{flex-direction:column;gap:2px;font-size:9px;line-height:10px}
.race-hud .race-tools .race-tool>.kk-icon{width:20px;height:20px;flex:none}
.race-hud .race-tools .race-tool-copy{display:grid;gap:2px;text-align:left;white-space:nowrap}
.race-hud .race-tools .race-tool-copy strong{font-size:10px;line-height:12px;font-weight:700}
.race-hud .race-tools .race-tool-copy small{font-size:9px;line-height:10px;color:#e7cf97}
.race-hud .race-tools .race-tool:disabled{opacity:.65;cursor:default}
.race-hud .race-tools .race-tool[aria-expanded="true"]{background:#f7f4e9;color:#173c34}
body.race-paused .race-tools{visibility:hidden}

/* Brief impact information lives on the left edge; never over the road centre. */
.impact-feedback{position:absolute;left:calc(24px + var(--safe-left));top:calc(156px + var(--safe-top));display:grid;gap:3px;width:180px;padding:8px 10px;border-left:3px solid #e8bd6c;border-radius:0 7px 7px 0;background:#153c33e8;color:#fbf4df;pointer-events:none;z-index:14}
.impact-feedback strong{font-size:12px;line-height:15px}
.impact-feedback span{font-size:10px;line-height:13px;color:#deead5;overflow-wrap:anywhere}
.impact-feedback[data-kind="penalty"]{border-color:#e59b77}
.impact-feedback[data-kind="shield"]{border-color:#80d4bd}
.impact-feedback[hidden]{display:none!important}
body.race-paused .impact-feedback,.race-hud:has(#finish-pending:not([hidden])) .impact-feedback{visibility:hidden}

body.touch #race-actions{left:auto;right:calc(var(--drive-edge) + var(--safe-right));bottom:calc(var(--drive-bottom) + 100px + var(--safe-bottom));width:calc(var(--drive-pedal) + var(--drive-throttle) + 8px);grid-template-columns:56px minmax(0,1fr);gap:8px}
body.touch #race-actions .race-action{height:82px;min-height:82px;padding:4px 3px 6px;gap:2px;border-radius:12px}
body.touch #race-actions .race-action>.kk-icon{align-self:center;width:20px;height:20px;margin-left:0}
body.touch #race-actions .race-action .race-action-copy{gap:2px}
body.touch #race-actions .race-action strong{min-height:24px;font-size:11px;line-height:12px}
body.touch #race-actions .race-action small{font-size:10px;line-height:11px;min-height:22px}
body.touch #race-actions .race-action kbd{display:none}
body.touch:is([data-touch-layout="lefty"],[data-touch-layout="buttons-lefty"]) #race-actions{right:auto;left:calc(var(--drive-edge) + var(--safe-left))}
body.touch .race-hud .race-tools{top:calc(64px + var(--safe-top));right:calc(62px + var(--safe-right))}
body.touch .drift-meter{left:calc(var(--drive-edge) + var(--safe-left));right:auto;bottom:calc(var(--drive-secondary) + var(--safe-bottom));transform:none;width:var(--drive-steering)}
body.touch:is([data-touch-layout="lefty"],[data-touch-layout="buttons-lefty"]) .drift-meter{left:auto;right:calc(var(--drive-edge) + var(--safe-right))}
body.touch[data-touch-layout="buttons-lefty"] .button-steering{left:auto;right:calc(var(--drive-edge) + var(--safe-right))}
body.touch .impact-feedback{left:calc(var(--drive-edge) + var(--safe-left));top:calc(112px + var(--safe-top));width:min(150px,43vw);padding:7px 8px}
body.touch:is([data-touch-layout="lefty"],[data-touch-layout="buttons-lefty"]) .impact-feedback{left:auto;right:calc(var(--drive-edge) + var(--safe-right))}
body.touch .impact-feedback strong{font-size:11px;line-height:14px}
body.touch .impact-feedback span{font-size:10px;line-height:12px}

/* All tools are included. Menus explain them without another equipment choice. */
.arsenal-overview{margin:14px 0;padding:12px;border:1px solid #b8c6ac;border-radius:9px;background:#edf0e4;color:#173c34;text-align:left;min-width:0}
.arsenal-overview>p{margin:8px 0;font-size:12px;line-height:1.45;min-width:0}
.arsenal-overview>p>strong{font-size:14px;margin-right:8px}
.arsenal-overview>p>span{color:#4b6658;font-size:11px}
.arsenal-chips{display:flex;flex-wrap:wrap;gap:6px}
.arsenal-chips span{display:inline-flex;align-items:center;min-height:26px;padding:4px 7px;border:1px solid #b9c9b2;border-radius:5px;font-size:10px;font-weight:700;background:#f8f8ef}
.quick-equipment-description{margin:8px 0 0;font-size:12px;line-height:1.5;color:#47634f}
.equipment-select[hidden],.arsenal-overview [hidden],.room-loadout [hidden]{display:none!important}
.home-scroll,.garage-scroll{min-width:0}
.home-scroll>.hero-actions,.home-scroll>.race-format,.home-scroll>.arsenal-overview{max-width:100%;min-width:0}
.home-scroll .hero-actions>*{min-width:0}
.home-scroll .race-format{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.home-scroll .race-format label{min-width:0;flex-direction:column;align-items:flex-start;gap:0}
.home-scroll .race-format select{min-width:0;width:100%;max-width:100%;letter-spacing:normal}

@media(max-width:1100px){
 body:not(.touch) #race-actions{right:calc(16px + var(--safe-right));bottom:calc(20px + var(--safe-bottom));width:272px;grid-template-columns:76px 104px 76px}
 body:not(.touch) #race-actions .race-action{height:82px;min-height:82px}
 body:not(.touch) #race-actions .race-action strong{min-height:24px}
 body:not(.touch) .keyboard-hint{right:auto;max-width:calc(100% - 320px)}
 body:not(.touch) .race-hud .race-tools{right:calc(174px + var(--safe-right))}
}
@media(orientation:portrait){
 body.touch #race-actions{width:252px;grid-template-columns:74px 96px 66px;gap:8px}
 body.touch #race-actions .race-action{height:70px;min-height:70px;padding:3px 2px 5px;gap:1px}
 body.touch #race-actions .race-action>.kk-icon{width:16px;height:16px}
 body.touch #race-actions .race-action .race-action-copy{gap:1px}
 body.touch #race-actions .race-action strong{font-size:11px;line-height:12px;min-height:24px}
 body.touch #race-actions .race-action small{font-size:10px;line-height:11px;min-height:22px}
 body.touch .drift-meter{width:104px;bottom:calc(var(--drive-bottom) + 256px + var(--safe-bottom))}
 body.touch[data-controls="manual"]:not([data-touch-layout^="buttons"]) #race-actions{width:calc(var(--drive-pedal) + var(--drive-throttle) + 8px);grid-template-columns:56px minmax(0,1fr)}
 body.touch[data-controls="manual"]:not([data-touch-layout^="buttons"]) #race-actions .race-action{height:82px;min-height:82px;padding:4px 3px 6px;gap:2px}
 body.touch[data-controls="manual"]:not([data-touch-layout^="buttons"]) #race-actions .race-action>.kk-icon{width:20px;height:20px}
 body.touch[data-controls="manual"]:not([data-touch-layout^="buttons"]) .drift-meter{bottom:calc(var(--drive-secondary) + var(--safe-bottom));width:var(--drive-steering)}
}
@media(orientation:landscape){
 body.touch #race-actions{width:252px;grid-template-columns:74px 96px 66px;gap:8px}
 body.touch .race-hud .race-tools{right:calc(112px + var(--safe-right));top:calc(8px + var(--safe-top))}
 body.touch .race-hud .race-tools .race-tool{height:48px;min-height:48px}
 body.touch .impact-feedback{top:calc(116px + var(--safe-top));width:min(160px,25vw)}
 body.touch:is([data-touch-layout="lefty"],[data-touch-layout="buttons-lefty"]) .speed-card{left:auto;right:calc(var(--drive-edge) + var(--safe-right))}
}
@media(orientation:landscape) and (max-height:350px){
 body.touch #race-actions{bottom:calc(var(--drive-bottom) + 88px + var(--safe-bottom));gap:6px;width:248px;grid-template-columns:74px 96px 66px}
 body.touch #race-actions .race-action{height:70px;min-height:70px;padding:3px 2px 5px;gap:1px}
 body.touch #race-actions .race-action>.kk-icon{width:16px;height:16px}
 body.touch #race-actions .race-action .race-action-copy{gap:1px}
 body.touch #race-actions .race-action strong{font-size:10px;line-height:11px;min-height:22px}
 body.touch #race-actions .race-action small{font-size:9px;line-height:10px;min-height:20px}
}
@media(prefers-reduced-motion:reduce){#race-actions .race-action>i{transition:none}}
body.reduced-motion #race-actions .race-action>i{transition:none}

/* Sound remains a labelled control in menus and on the driving HUD. */
.top-actions .quiet-button{min-height:44px}
.top-actions #sound-btn{width:116px;min-width:116px;gap:7px;padding:5px 9px;font-size:11px;line-height:14px}
.top-actions #sound-btn svg{flex:none;width:20px;height:20px}
#sound-label{display:block;text-align:center}
.top-actions #sound-btn[data-sound-state="muted"],.race-hud #race-sound-btn[data-sound-state="muted"]{color:#b96542}
.race-hud .race-tools #race-sound-btn{flex-direction:column;gap:1px;padding:2px}
.race-hud .race-tools #race-sound-btn>.kk-icon{width:16px;height:16px}
#race-sound-label{display:block;max-width:40px;font-size:9px;line-height:10px;text-align:center;overflow-wrap:normal}
.race-hud #race-sound-btn[data-sound-state="muted"]{color:#f1c481}
.sound-test-row{padding:12px 0 0;border-top:1px solid #173c3426}
#sound-test-btn{min-height:44px;height:auto;padding:10px 16px}
#sound-status{font-size:12px;line-height:1.55;color:#526a5d;margin:8px 0 0}
#race-actions .race-action[data-feedback="fired"]{border-color:#fff0b2;box-shadow:0 0 0 2px #e4ba55b3,inset 0 0 18px #e7c77e30}
#race-actions .race-action[data-feedback="blocked"]{border-color:#cdbb9a}
.impact-feedback[data-kind="horn"]{border-color:#d7c37b}
@media(max-width:700px){
 .top-actions #sound-btn{width:62px;min-width:62px;min-height:44px;flex-direction:column;gap:1px;padding:3px 2px;font-size:9px;line-height:10px}
 .top-actions #sound-btn svg{width:17px;height:17px}
 #sound-label{max-width:58px}
}
@media(max-width:360px){
 .topbar .wordmark{gap:6px;font-size:12px;line-height:13px}
 .topbar .wordmark-light{display:block;margin-left:0;letter-spacing:1.2px}
}
