/* Team identity only. Rules, card data and seat order are unchanged. */
.playtest-page{--team-primary:#e4e0ce;--team-secondary:#a4312c;--team-tertiary:#2455a4;--team-accent:#e4e0ce;--team-ink:#071116;--team-text:#e4e8e6;--team-surface:#15232b}
.playtest-page[data-team="neutral"]{--team-primary:#c6d2d7;--team-secondary:#738890;--team-tertiary:#415a65;--team-accent:#dce6e7;--team-surface:#15232b}
.playtest-page[data-team="common-line"],.playtest-page [data-team="common-line"]{--team-primary:#e4e0ce;--team-secondary:#a4312c;--team-tertiary:#2455a4;--team-accent:#e4e0ce;--team-surface:#24252a}
.playtest-page[data-team="crownward"],.playtest-page [data-team="crownward"]{--team-primary:#e5e3d9;--team-secondary:#172439;--team-tertiary:#b89a55;--team-accent:#e5e3d9;--team-surface:#172439}
.playtest-page[data-team="ninefold"],.playtest-page [data-team="ninefold"]{--team-primary:#333c40;--team-secondary:#ac704d;--team-tertiary:#c64c2c;--team-accent:#ac704d;--team-surface:#242c30}
.playtest-page[data-team="sinterline"],.playtest-page [data-team="sinterline"]{--team-primary:#192126;--team-secondary:#3abec7;--team-tertiary:#8d9a9f;--team-accent:#3abec7;--team-surface:#192b30}
.playtest-page[data-team="ivaran"],.playtest-page [data-team="ivaran"]{--team-primary:#176567;--team-secondary:#937744;--team-tertiary:#58714d;--team-accent:#937744;--team-surface:#163235}
.playtest-page .team-mark{display:block;position:static;flex:none;width:30px;height:24px;min-width:0;max-width:none;aspect-ratio:auto;object-fit:contain;object-position:center;grid-row:auto;border:0;border-radius:0;margin:0;padding:0;filter:none}
.driver-option{position:relative;overflow:visible;border-top:3px solid var(--team-accent);background:var(--team-surface)}
.driver-option:before{content:"";position:absolute;bottom:0;left:0;right:0;height:3px;border-radius:0 0 5px 5px;background:linear-gradient(90deg,var(--team-primary) 0 55%,var(--team-secondary) 55% 80%,var(--team-tertiary) 80%)}
.driver-option:has(input:checked){outline-color:var(--team-accent)}
.driver-option input{accent-color:var(--team-accent)}
.driver-option .setup-team{gap:7px;color:var(--team-text);font-size:11px;line-height:1.2;font-weight:600;letter-spacing:.01em}
.driver-option>img{object-position:center 25%}
.driver-choice{border-top:3px solid var(--team-accent);background:var(--team-surface)}
.driver-choice-brand{display:flex;align-items:center;gap:8px;margin-bottom:10px;color:var(--team-text);font-size:11px;font-weight:600;line-height:1.25}
.driver-choice-brand .team-mark{width:32px;height:28px}
.driver-choice>strong{display:block;margin-bottom:4px}
.action[aria-pressed="true"]{border-color:var(--team-text);background:var(--team-surface);box-shadow:inset 0 0 0 1px var(--team-accent)}
.playtest-page .button,.action-primary,.race-dock button[data-open-decision],.game-sheet .hand-card.is-playable:after{color:var(--team-ink)}
.action-primary small{color:var(--team-ink)}
.guide-note{background:#182d33;color:#e1e8e7}
.choice-confirm,.game-sheet .choice-confirm{background:var(--team-surface);border-color:var(--team-accent)}
.racer-panel,.racer-panel[data-racer="you"],.racer-panel[data-racer="rival"]{border-top:3px solid var(--team-accent);background:linear-gradient(120deg,var(--team-surface),#102029)}
.racer-panel:after,.racer-panel[data-racer="rival"]:after{background:linear-gradient(90deg,var(--team-primary) 0 55%,var(--team-secondary) 55% 80%,var(--team-tertiary) 80%)}
.racer-panel.is-current-seat{box-shadow:inset 0 0 0 1px #ffffff28}
.racer-team{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:6px;margin:7px 0 6px;padding-top:6px;border-top:1px solid #ffffff24;color:#e5eceb;font:600 10px/1.25 var(--body)}
.racer-team .team-mark{width:24px;height:22px}
.racer-seat{padding:3px 5px;border:1px solid #b9c9cd;border-radius:3px;color:#f0f3f1;font-size:9px;white-space:nowrap;line-height:1.2}
.racer-panel[data-seat="B"] .racer-seat{border-style:dashed;border-radius:7px}
.racer-panel:has(.racer-avatar[hidden]) header{padding-left:0}
.track-marker[data-team]{color:var(--team-ink);background:var(--team-accent);border:1px solid #f4f0df;box-shadow:inset 0 -3px 0 var(--team-tertiary),0 2px 6px #000b;font-style:normal;font-weight:900}
.track-marker[data-seat="A"]{border-radius:3px}
.track-marker[data-seat="B"]{border-radius:8px 2px 8px 2px;border-style:dashed}
.track-marker[data-team="ivaran"]{background:var(--team-primary);color:#fff}
.race-status span:first-child{color:#e4e8e6}
.race-handoff{border-color:var(--team-accent)}
@media(max-width:650px){.driver-option{grid-template-columns:110px minmax(0,1fr);gap:5px 10px}.driver-option>img{grid-row:1/4;height:100%;min-height:96px;max-height:118px;aspect-ratio:auto}.driver-option>span,.driver-option>small{grid-column:2}.driver-option .setup-team{font-size:10px}.driver-option small{font-size:12px}.driver-option .team-mark{width:25px;height:21px}}
@media(max-width:520px){.driver-option{grid-template-columns:92px minmax(0,1fr)}.racer-team{grid-template-columns:22px minmax(0,1fr);gap:3px 5px;font-size:9px;min-height:28px;margin:5px 0;padding-top:5px}.racer-team .team-mark{grid-row:1/3;width:22px;height:24px}.racer-seat{grid-column:2;justify-self:start;font-size:8px;padding:2px 4px}.race-active .racer-panel h2{overflow-wrap:normal}}
@media(max-height:430px) and (min-width:521px){.racer-team{margin:3px 0;padding-top:3px;font-size:8px;gap:3px;grid-template-columns:17px minmax(0,1fr) auto}.racer-team .team-mark{width:17px;height:17px}.racer-seat{font-size:7px;padding:2px 3px}.race-active .racer-where{font-size:9px;line-height:1.2;margin:3px 0}.race-active .racer-stats{gap:2px 5px}.race-active .racer-panel h2{font-size:15px}.race-active .racer-stats dt{font-size:8px}.race-active .racer-stats output{font-size:12px}}

/* Team-first setup: marks identify crews, not a premature Driver choice. */
.team-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px}.team-option{display:flex;flex-direction:column;gap:8px;border:1px solid #68727b;border-radius:14px;padding:18px;cursor:pointer;background:#111820;color:#f4f3ee}.team-option:has(input:checked){border-color:var(--team-secondary,#eedb7b);box-shadow:inset 0 0 0 2px var(--team-secondary,#eedb7b)}.team-option .team-mark{height:64px;width:96px;object-fit:contain;align-self:center}.team-option span{font-weight:800}.team-option input{margin-right:8px}.team-option small{color:#bfc7cf}.team-presets{border:0;padding:0}.starter-deck{display:flex;align-items:center;gap:12px;margin:16px 0}.starter-deck select{padding:10px;font:inherit}.setup-deck-note{font-size:.85rem;color:#bbc5ce}.team-option:focus-within{outline:2px solid #fff;outline-offset:3px}
