/* Multiplayer follows the same fixed header, stage and action bar as solo practice. */
.multiplayer-page { height:100dvh; min-height:0; overflow:hidden; }
.multiplayer-page .mp-shell { height:100dvh; }
.multiplayer-page .mp-page { flex:1; min-height:0; overflow:auto; display:block; }
.mp-stage { --mp-accent:#00d2be; position:relative; isolation:isolate; height:100%; min-height:0; background:#050709; }
.mp-stage::before { content:''; position:absolute; inset:0; z-index:-2; background:url('../images/showroom-satin.webp') center / cover no-repeat; opacity:.4; pointer-events:none; }
.mp-stage::after { content:''; position:absolute; inset:0; z-index:-1; background:color-mix(in srgb,var(--mp-accent) 45%,transparent); mix-blend-mode:multiply; pointer-events:none; }
.mp-step { min-height:100%; height:100%; padding:clamp(24px,3.5vh,40px) 4.5vw; }
.mp-step h1 { margin-top:12px; font-size:clamp(28px,2.8vw,44px); font-weight:400; line-height:1.3; outline:none; }
.mp-help { margin-top:14px; color:#929caa; font-size:12px; line-height:1.8; }
.mp-lead { margin-top:14px; color:#a8b0be; font-size:14px; line-height:1.8; }
.mp-entry-step { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(350px,.85fr); gap:7vw; align-items:center; }
.mp-entry-intro { position:relative; height:100%; min-height:440px; overflow:hidden; padding-top:5vh; }
.mp-entry-wordmark { position:absolute; left:0; right:0; top:35%; color:transparent; -webkit-text-stroke:1px #ffffff40; font:600 clamp(36px,4.1vw,76px)/1 var(--font-display); white-space:nowrap; }
.mp-entry-car { position:absolute; width:110%; max-width:none; height:66%; object-fit:contain; object-position:center bottom; bottom:6%; left:50%; transform:translateX(-50%); pointer-events:none; }
.mp-entry-facts { position:absolute; bottom:0; left:0; display:flex; gap:24px; color:#a9b2c0; font-size:11px; }
.mp-entry-form { width:100%; max-width:490px; justify-self:end; display:grid; gap:24px; padding:28px; background:#121720e8; border:1px solid #ffffff20; border-radius:5px; }
.mp-entry-tabs { display:grid; grid-template-columns:1fr 1fr; border-bottom:1px solid #ffffff20; }
.mp-entry-tabs button { padding:0 8px 16px; color:#8a94a3; font-size:16px; border-bottom:2px solid transparent; }
.mp-entry-tabs button[aria-selected="true"] { color:#fff; border-bottom-color:#fa514e; }
.mp-entry-tabs button:hover:not(:disabled) { color:#fff; }
.mp-field { display:grid; gap:8px; min-width:0; color:#adb7c5; font-size:12px; }
.mp-field input { width:100%; min-width:0; height:48px; padding:12px 14px; border:1px solid #ffffff30; border-radius:3px; color:#f1f3f7; background:#0b1019; font:14px var(--font-body); }
.mp-field input:focus { outline:2px solid #ffffffa0; outline-offset:2px; }
#mp-code { font-family:var(--font-mono); letter-spacing:2px; text-transform:uppercase; }
.mp-settings { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.mp-settings #mp-transport-field { grid-column:1 / -1; }
.mp-settings .mp-limit-field { grid-column:1 / -1; }
.mp-limit-field small { color:#939fb0; font-size:11px; font-weight:400; line-height:1.6; }
.mp-settings .fr-select-trigger { min-height:48px; padding:12px 14px; border-radius:3px; background:#0b1019; font-size:14px; }
.mp-advanced { border-top:1px solid #ffffff17; padding-top:16px; }
.mp-advanced summary,#mp-rule-editor summary { color:#acb5c4; font-size:12px; cursor:pointer; }
.mp-advanced .mp-field,#mp-rule-editor .mp-settings { margin-top:16px; }
.mp-version { color:#647184; font:10px/1.6 var(--font-mono); margin-top:12px; overflow-wrap:anywhere; }
.mp-discover { margin-top:14px; color:#dce3ec; border-bottom:1px solid #ffffff50; font-size:12px; }
.mp-discovery { display:grid; gap:8px; max-height:132px; overflow:auto; margin-top:12px; }
.mp-discovery:empty { display:none; }
.mp-discovery button { padding:10px 12px; border:1px solid #ffffff20; border-radius:3px; background:#1b2330; color:#e2e7ed; text-align:left; font-size:12px; }
.mp-team-step { position:relative; overflow:hidden; }
.mp-team-heading { position:relative; z-index:2; }
.mp-team-heading p { margin-top:12px; color:#abb5c3; font-size:12px; }
.mp-team-wordmark { position:absolute; left:4.5vw; right:4.5vw; top:23%; overflow:hidden; text-align:center; color:transparent; -webkit-text-stroke:1px #ffffff60; font:600 clamp(64px,10vw,170px)/1 var(--font-display); white-space:nowrap; pointer-events:none; }
.mp-car-wrap { position:absolute; inset:23% 10% 18%; pointer-events:none; }
.mp-car-wrap>img { display:block; width:100%; height:100%; object-fit:contain; }
.mp-car-status { position:absolute; inset:50% 0 auto; text-align:center; color:#b8c1d0; font-size:12px; }
.mp-car-status button { pointer-events:auto; margin-left:10px; text-decoration:underline; }
.mp-team-dock { position:absolute; z-index:3; left:4.5vw; right:4.5vw; bottom:4%; }
.mp-dock-heading { display:flex; justify-content:space-between; gap:16px; margin-bottom:14px; color:#aab4c3; font-size:11px; }
.mp-slots { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:clamp(10px,1.4vw,22px); padding:3px; }
.mp-slot { position:relative; display:grid; justify-items:center; align-content:center; gap:7px; width:100%; min-width:0; height:clamp(100px,13vh,144px); padding:12px 8px; border:1px solid #ffffff25; border-radius:10px; background:#191b22e8; transition:background .16s,border-color .16s; }
.mp-slot:hover:not(:disabled) { background:#3b3e48; border-color:#ffffff70; }
.mp-slot.is-you { border:2px solid #fff; background:#4a4d56e8; }
.mp-slot.is-occupied { opacity:.5; }
.mp-slot.is-disconnected { border-style:dashed; border-color:var(--yellow); }
.mp-slot:disabled { cursor:default; }
.mp-slot-logo { height:42%; width:65%; min-height:32px; max-height:58px; object-fit:contain; }
.mp-slot-abbr { color:#d1d6df; font:500 11px/1 var(--font-display); letter-spacing:.13em; }
.mp-slot-player { color:#929fb2; font-size:10px; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-slot.is-you .mp-slot-player { color:#fff; }
.mp-confirm-step { display:flex; flex-direction:column; gap:clamp(20px,3vh,32px); }
.mp-confirm-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; flex:none; }
.mp-track-meta { margin-top:10px; color:#98a3b4; font:11px/1.6 var(--font-mono); letter-spacing:.06em; }
.mp-invite { display:grid; grid-template-columns:auto auto; gap:6px 18px; align-items:center; }
.mp-invite>span { color:#8d9aaa; font-size:11px; }
.mp-invite>strong { grid-column:1; font:500 20px/1.5 var(--font-mono); letter-spacing:2px; color:#f2f4f8; }
.mp-invite>button { grid-column:2; grid-row:1 / 3; border-radius:3px; clip-path:none; font-size:12px; }
.mp-confirm-grid { display:grid; grid-template-columns:minmax(0,.42fr) minmax(0,.58fr); gap:3vw; flex:1; min-height:0; padding-bottom:4px; }
.mp-track-card,.mp-roster-card { border:1px solid #ffffff20; border-radius:5px; background:#151b25df; padding:clamp(18px,2vw,28px); min-height:0; min-width:0; overflow:auto; }
.mp-track-card { display:flex; flex-direction:column; }
.mp-track-map { width:100%; height:clamp(100px,22vh,240px); object-fit:contain; flex:1; min-height:80px; }
.mp-track-facts { display:grid; grid-template-columns:1fr 1fr; gap:16px 20px; margin-top:18px; flex:none; }
.mp-track-facts>div { padding-top:10px; border-top:1px solid #ffffff1c; min-width:0; }
.mp-track-facts dt { color:#98a5b5; font-size:11px; }
.mp-track-facts dd { margin-top:4px; font:400 clamp(13px,1.2vw,19px)/1.5 var(--font-display); color:#e4e9f2; }
#mp-rule-editor { border-top:1px solid #ffffff1c; padding-top:14px; margin-top:18px; flex:none; }
.mp-connection-note { margin-top:16px; font-size:10px; color:#77879b; flex:none; }
.mp-roster-card { display:flex; flex-direction:column; }
.mp-roster-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.mp-roster-heading h2 { font-size:16px; font-weight:500; }
.mp-roster-heading>span { color:#98a7bc; font-size:11px; }
.mp-roster { display:grid; gap:8px; }
.mp-roster-row { display:flex; align-items:center; gap:14px; padding:10px 12px; min-height:64px; border:1px solid #ffffff0e; border-radius:3px; background:#0d121bd9; }
.mp-roster-row.is-you { border-color:#ffffff40; background:#202733; }
.mp-roster-row>img { width:50px; height:36px; object-fit:contain; flex:none; }
.mp-roster-row>div { display:grid; gap:3px; min-width:0; flex:1; }
.mp-roster-row strong { font-size:13px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-roster-row>div>span { color:#91a0b3; font-size:10px; }
.mp-player-state { color:#7d8b9f; font-size:11px; flex:none; }
.mp-player-state.is-ready { color:#67c29d; }
.mp-kick { color:#8e9aab; font-size:10px; flex:none; padding:6px; }
.mp-kick:hover { color:#ff777d; }
.mp-roster-note { margin-top:auto; padding-top:18px; color:#7d8c9e; font-size:11px; }
@media(min-width:701px) {
 .mp-roster-card.is-crowded .mp-roster { gap:6px; }
 .mp-roster-card.is-crowded .mp-roster-row { min-height:52px; padding-block:6px; }
}
.multiplayer-page .mp-actionbar { flex:none; gap:20px; }
.multiplayer-page .mp-actionbar .btn-step { width:clamp(152px,14vw,212px); }
.multiplayer-page .mp-actionbar .mp-status { display:block; flex:1; min-width:0; font-size:11px; color:#929fb1; text-align:center; line-height:1.6; overflow-wrap:anywhere; }
.multiplayer-page .mp-actionbar .mp-status.is-error { color:#ff858d; }
@media(max-width:1100px) {
 .mp-entry-step { gap:4vw; grid-template-columns:minmax(0,1fr) minmax(340px,1fr); }
 .mp-entry-form { padding:24px; }
 .mp-entry-wordmark { font-size:4vw; }
 .mp-entry-facts { gap:14px; font-size:10px; }
 .mp-confirm-grid { gap:20px; }
 .mp-slot { border-radius:8px; }
 .mp-track-card,.mp-roster-card { padding:18px; }
}
@media(max-height:780px) and (min-width:701px) {
 .mp-step { padding-block:20px; }
 .mp-entry-intro { padding-top:20px; min-height:360px; }
 .mp-entry-form { gap:18px; padding:20px 24px; }
 .mp-entry-tabs button { padding-bottom:12px; }
 .mp-field input,.mp-settings .fr-select-trigger { height:42px; min-height:42px; padding-block:9px; }
 .mp-confirm-heading h1 { font-size:28px; margin-top:8px; }
 .mp-confirm-step { gap:18px; }
 .mp-confirm-grid { min-height:0; }
 .mp-roster-row { min-height:54px; padding:7px 10px; }
 .mp-roster-heading { margin-bottom:12px; }
 .mp-roster-card.is-crowded .mp-roster { gap:5px; }
 .mp-roster-card.is-crowded .mp-roster-row { min-height:38px; padding-block:3px; }
 .mp-roster-card.is-crowded .mp-roster-row>img { height:30px; }
 .mp-roster-card.is-crowded .mp-roster-row>div { gap:2px; }
 .mp-roster-card.is-crowded .mp-roster-row strong { font-size:12px; line-height:1.3; }
 .mp-roster-card.is-crowded .mp-roster-row>div>span { line-height:1.3; }
}
@media(max-width:700px) {
 .multiplayer-page .mp-page { overflow:auto; }
 .mp-stage { min-height:100%; height:auto; }
 .mp-step { min-height:100%; height:auto; padding:24px 18px; }
 .mp-entry-step { display:flex; flex-direction:column; gap:24px; align-items:stretch; }
 .mp-entry-intro { min-height:120px; height:auto; padding:0; overflow:visible; }
 .mp-entry-intro h1 { font-size:26px; }
 .mp-lead { font-size:12px; margin-top:8px; }
 .mp-entry-car,.mp-entry-wordmark { display:none; }
 .mp-entry-facts { position:static; margin-top:14px; gap:14px; font-size:10px; }
 .mp-entry-form { max-width:none; padding:20px; gap:20px; }
 .mp-team-step { height:max(570px,calc(100dvh - 126px)); }
 .mp-team-heading h1 { font-size:28px; }
 .mp-team-heading p { font-size:11px; }
 .mp-team-wordmark { left:18px; right:18px; top:30%; font-size:13vw; }
 .mp-car-wrap { inset:28% -8% 24%; }
 .mp-team-dock { left:18px; right:18px; bottom:20px; }
 .mp-dock-heading { font-size:10px; }
 .mp-slots { display:flex; overflow-x:auto; gap:10px; scroll-snap-type:x proximity; padding:4px 3px 10px; }
 .mp-slot { width:86px; flex:none; height:104px; scroll-snap-align:center; }
 .mp-confirm-heading { align-items:start; flex-direction:column; gap:20px; }
 .mp-confirm-heading h1 { font-size:28px; }
 .mp-invite { width:100%; grid-template-columns:1fr auto; }
 .mp-invite>strong { font-size:18px; }
 .mp-invite>button { padding:10px 12px; font-size:11px; }
 .mp-confirm-grid { display:flex; flex-direction:column; gap:16px; }
 .mp-track-card,.mp-roster-card { overflow:visible; flex:none; }
 .mp-track-map { height:160px; flex:none; }
 .mp-roster-card { min-height:180px; }
 .mp-roster-row { gap:10px; padding:9px; }
 .mp-roster-row>img { width:36px; }
 .mp-roster-row strong { font-size:12px; }
 .mp-kick { padding:4px; }
 .multiplayer-page .mp-actionbar { flex-wrap:wrap; padding:10px 18px; gap:8px; }
 .multiplayer-page .mp-actionbar .mp-status { display:block; order:-1; flex:0 0 100%; text-align:left; font-size:10px; }
 .multiplayer-page .mp-actionbar .group { margin-left:auto; }
 .multiplayer-page .mp-actionbar .btn-step { display:inline-flex; width:auto; min-width:132px; min-height:40px; padding:10px 12px; font-size:11px; }
}
@media(max-height:600px) and (min-width:701px) {
 .mp-entry-step { align-items:start; }
 .mp-entry-intro { min-height:310px; }
 .mp-entry-wordmark { top:38%; }
 .mp-team-step { min-height:350px; }
 .mp-team-heading h1 { font-size:24px; margin-top:6px; }
 .mp-team-heading p { margin-top:6px; font-size:10px; }
 .mp-team-wordmark { top:25%; font-size:7vw; }
 .mp-car-wrap { inset:16% 20% 18%; }
 .mp-slot { height:76px; gap:4px; padding:8px; }
 .mp-slot-logo { height:28px; min-height:24px; }
 .mp-slot-abbr,.mp-slot-player { font-size:8px; }
 .mp-dock-heading { margin-bottom:6px; }
 .mp-team-dock { bottom:14px; }
 .mp-confirm-step { min-height:420px; }
}
@media(prefers-reduced-motion:reduce) { .mp-slot { transition:none; } }
.mp-loading{position:fixed;inset:0;z-index:85;display:grid;place-items:center;background:#070b12e8;color:#fff;font:14px/1.8 var(--font-body,'Noto Sans SC',sans-serif)}.mp-loading section{width:min(560px,calc(100% - 32px));padding:30px;background:#151d29;border-top:3px solid var(--red,#e10600)}.mp-loading h1{font-size:27px;margin:8px 0}.mp-loading p{color:#aeb9cc}.mp-loading-list{display:grid;gap:8px;margin:18px 0}.mp-loading-list>div{display:flex;justify-content:space-between;border-bottom:1px solid #ffffff17;padding:7px}.mp-network-hud{position:fixed;right:18px;bottom:18px;z-index:15;padding:10px 13px;background:#111722e8;border-left:2px solid #e10600;color:#aebacc;font:10px/1.7 var(--font-mono,'JetBrains Mono',monospace);max-width:260px}.mp-network-hud strong{color:#fff}.mp-network-actions{display:flex;gap:6px;margin-top:5px;flex-wrap:wrap}.mp-network-actions button{font:10px inherit;background:#242e3e;color:#fff;border:1px solid #5d6c82;padding:5px 7px;cursor:pointer}.mp-network-actions button[aria-pressed=true]{border-color:#f4434b;color:#ff777e}.mp-personal-note{color:#f0cf5c}.multiplayer-game .weekend-hud{width:min(500px,calc(100vw - 32px))}.multiplayer-game #practice-session,.multiplayer-game #results-screen{display:none!important}.mp-summary-votes{color:#e1ca77!important}.mp-results-hash{font:11px var(--font-mono,'JetBrains Mono',monospace);color:#8ea5bc}.mp-summary-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:18px}.mp-error-action{color:#fff;background:#b6151d;border:0;padding:10px 16px;cursor:pointer}.mp-feedback{color:#ffae8f!important}
/* Player nicknames may be longer than a driver's three-letter abbreviation. */
body.multiplayer-game #broadcast-hud #tower-rows li{grid-template-columns:10cqw 11cqw minmax(0,1fr) 24cqw 5cqw;gap:1cqw}
body.multiplayer-game #broadcast-hud #tower-rows b{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:min(14px,6cqw);line-height:1.2}
body.multiplayer-game #broadcast-hud #tower-rows .interval{min-width:0;overflow:hidden;font-size:min(12px,5cqw)}
@media(max-width:760px){.mp-network-hud{right:8px;bottom:8px;font-size:9px;max-width:205px}}
@media(max-width:480px){.mp-network-hud{max-width:185px}.multiplayer-game .weekend-hud{width:290px}}
/* Multiplayer uses the solo timer above the live classification. */
body.multiplayer-game #broadcast-hud .timing-tower{top:24px;left:24px;width:clamp(220px,18vw,260px);border:0;background:#191b22}
body.multiplayer-game #broadcast-hud .practice-timer-brand{height:64px}
body.multiplayer-game #broadcast-hud .practice-timer-brand img{width:144px;height:36px}
body.multiplayer-game #broadcast-hud .practice-timer-readout{min-height:50px;gap:10px;padding:0 12px}
body.multiplayer-game #broadcast-hud .practice-timer-label{font-size:17px}
body.multiplayer-game #tower-lap{font:700 27px/1.1 'JetBrains Mono',ui-monospace,monospace;letter-spacing:-1px;white-space:nowrap}
body.multiplayer-game .practice-timer[data-clock-state="warning"] #tower-lap{color:#ffe16b}
body.multiplayer-game .practice-timer[data-clock-state="expired"] #tower-lap{color:#ff6870}
body.multiplayer-game #broadcast-hud #tower-rows b{font-family:'Chakra Petch','Noto Sans SC',system-ui,sans-serif;font-weight:600;letter-spacing:0}
@media(max-width:900px){body.multiplayer-game #broadcast-hud .timing-tower{top:12px;left:12px;width:220px}}
@media(max-height:560px){body.multiplayer-game #broadcast-hud .timing-tower{top:8px;left:8px;width:200px}body.multiplayer-game #broadcast-hud .practice-timer-brand{height:40px}body.multiplayer-game #broadcast-hud .practice-timer-brand img{width:108px;height:27px}body.multiplayer-game #broadcast-hud .practice-timer-readout{min-height:36px;gap:6px;padding:0 8px}body.multiplayer-game #broadcast-hud .practice-timer-label{font-size:14px}body.multiplayer-game #tower-lap{font-size:23px}}
