/* Motorworks club identity. Room, cabinetry, signs and paper have distinct material roles.
   This sheet owns the shared shell; component mechanics remain in their original modules. */
:root {
  /* Display type belongs to the circuit lettering. Controls and records use ordinary shop type. */
  --face-display:var(--face-body);
  --club-green:#18243a; --club-deep:#0f1828; --club-ivory:#eeece6;
  --club-ink:#1b2433; --club-red:#b8322b; --club-rule:#c9c6bd;
  --mw-paper:#eeece6; --mw-paper-hi:#f6f5f1; --mw-paper-dim:#dcdad3;
  --mw-ink:#1b2433; --mw-ink-soft:#545a66; --mw-red:#b8322b; --mw-rule:#c9c6bd;
}
:root:not(.stream-transparent) {
  --face-body:'IBM Plex Sans',sans-serif;
  --type-small:14px; --type-body:16px; --type-title:24px; --type-race:32px;
  --type-reading:1.5; --type-heading:1.25;
}
body { background:var(--club-deep); }
.topbar, #garage, .pair, .drive-picker, .drive-hud { --face-display:var(--face-body); }
.shell { background:var(--club-green); }
.topbar { min-height:64px; height:auto; padding:8px 24px; gap:24px;
  background:var(--club-deep); color:var(--club-ivory); border-bottom:1px solid #3a4a66; }
.brand { flex:none; gap:12px; }
.club-brand-art { width:auto; height:40px; object-fit:contain; flex:none; }
.brand-sigil { display:none; }
.brand-copy, .topbar:has(> .topbar-context:not([hidden])) .brand-copy { display:block; }
.brand-copy strong { display:block; width:auto; white-space:normal;
  font:600 18px/1.2 var(--face-body); letter-spacing:0; color:var(--club-ivory); }
.brand-copy small { display:none; }
.topbar-context .poster-car { font-size:20px; }
/* The service bay's nameplate owns the car name. Other stations keep it in the shared header. */
body:has(#garage:not([hidden])[data-station="car"]:not([data-focus])) .topbar-context .poster-car { display:none; }
.topbar-context .poster-chip { border-color:#3a4a66; }
.topbar-context .poster-chip span { padding:4px 6px; font-size:13px; }
.topbar-context .poster-chip span + span { background:var(--club-ivory); color:var(--club-ink); }
.topbar-context .poster-points b { font-size:26px; }
.topbar-context .poster-points small { font-size:12px; }
.session-tools { gap:12px; }
#garage.garage:not([data-focus]) { background:transparent; padding:0 26px 26px; }
#garage .garage-directory { margin-inline:-26px; padding:0 24px; gap:0; height:56px;
  min-height:56px; background:var(--club-deep); border:0; border-bottom:2px solid #0b1220; }
#garage .garage-directory a, #garage .garage-directory a:first-of-type,
#garage .garage-directory a[aria-current="page"] {
  min-height:54px; padding:0 24px; border:0; color:var(--club-ivory); background:transparent;
}
#garage .garage-directory a[aria-current="page"] { background:transparent; color:var(--club-ivory); box-shadow:inset 0 -3px var(--club-ivory); }
#garage .garage-station-copy strong { font:400 var(--type-body)/var(--type-heading) var(--face-body); }
#garage .garage-directory a[aria-current="page"] strong { font-weight:600; }
#garage .garage-directory a:not([aria-current="page"]):hover { color:var(--club-ivory); background:#24344f; }
#garage :focus-visible, .pair :focus-visible { outline:3px solid var(--club-red); outline-offset:3px; }

/* Service bay and arrival desk sit against the same room wall. */
.pair { padding:26px; background:transparent; }
.pair-arrival { gap:0; grid-template-columns:minmax(0,1fr) 320px; align-items:stretch; }
.pair-showroom { height:clamp(580px,calc(100vh - 130px),780px); min-height:580px; }
.pair-desk { align-self:stretch; justify-content:center; padding:32px;
  background:var(--club-ivory); border-left:4px solid #c9c6bd; gap:20px; }
.pair .pair-desk h1 { font-size:48px; line-height:.98; }
.pair .twitch-login { color:var(--club-ivory); background:var(--club-red); }
.pair .twitch-login[aria-disabled="true"] { color:#514c43; background:var(--mw-paper-dim); }
.pair .pair-label { font-size:13px; }
.pair .pair-code { font-size:30px; }
/* One complete bench fills the bay. Entry paper rests to the right of the
   inspection space; the identity is printed on the cabinet front below it. */
.bay-ticket-stock, .bay-ticket-number { display:none; }
#garage.garage:not([data-focus])[data-station="car"] {
  --bay-paper:#eeece6; --bay-ink:#1b2433; --bay-soft:#545a66;
  grid-template-columns:minmax(0,1fr) 284px; gap:0 24px;
  grid-template-rows:auto auto auto auto auto auto minmax(0,1fr) auto;
  grid-template-areas:"directory directory" "hero status" "hero circuit" "hero primary"
    "hero recall" "hero recovery" "hero filler" "notice notice";
}
#garage:not([data-focus])[data-station="car"] .car-stage {
  grid-column:1 / -1; grid-row:2 / 8; z-index:0;
  margin-top:24px; min-height:600px; height:clamp(600px,calc(100vh - 180px),800px); background:var(--club-deep);
}
#garage:not([data-focus])[data-station="car"] > .bay-ticket-stock {
  display:block; grid-column:2; grid-row:2 / 5; align-self:stretch; margin:72px 24px 0 0; z-index:1;
  background:var(--bay-paper); border-bottom:8px solid #0b1220; pointer-events:none;
}
#garage:not([data-focus])[data-station="car"] > :is(.status-strip,.circuit-card,.actions) {
  margin:0 24px 0 0; padding:0; border:0; background:transparent; box-shadow:none; border-radius:0; z-index:2;
}
#garage:not([data-focus])[data-station="car"] > :is(.status-strip,.circuit-card) { position:relative; color:var(--bay-ink); }
#garage:not([data-focus])[data-station="car"] > .status-strip { margin-top:72px; padding:24px 20px 0; }
#garage:not([data-focus])[data-station="car"] > .status-strip[data-quiet="true"] { display:none; }
#garage:not([data-focus])[data-station="car"] > .circuit-card { align-self:start; margin-top:72px; padding:24px 20px; }
#garage:not([data-focus])[data-station="car"]:has(.status-strip:not([data-quiet="true"])) > .circuit-card { margin-top:0; }
#garage:not([data-focus])[data-station="car"] .status-main { color:var(--bay-ink); font:600 18px/1.33 var(--face-body); }
#garage:not([data-focus])[data-station="car"] .circuit-copy h2 { color:var(--bay-soft);
  font:400 14px/1.4 var(--face-body); letter-spacing:0; text-transform:none;
}
#garage:not([data-focus])[data-station="car"] .track-name {
  margin:8px 0; color:var(--bay-ink); font:600 var(--type-title)/var(--type-heading) var(--face-body);
  letter-spacing:0; text-transform:none;
}
#garage:not([data-focus])[data-station="car"] :is(.track-detail,.status-sub) { color:var(--bay-soft); font:400 14px/1.4 var(--face-body); }
#garage:not([data-focus])[data-station="car"] > .actions { display:contents; }
#garage:not([data-focus])[data-station="car"] > .actions > :is(#join,#leave,#drive-heat) {
  grid-area:primary; position:relative; z-index:2; min-height:64px; width:calc(100% - 24px); margin:0 24px 8px 0;
  padding:0 24px; border:0; border-radius:0; font:600 18px/1.33 var(--face-body);
}
#garage:not([data-focus])[data-station="car"] .action.primary { color:var(--bay-paper); background:var(--club-red); }
#garage:not([data-focus])[data-station="car"] > .actions > #join {
  display:flex; align-items:stretch; justify-content:space-between; padding:0; gap:0;
}
#garage:not([data-focus])[data-station="car"] #join-copy { align-self:center; padding:16px 24px; text-align:left; }
#garage:not([data-focus])[data-station="car"] .bay-ticket-number {
  display:flex; align-items:center; justify-content:center; flex:none; width:64px;
  border-left:1px solid rgba(238,236,230,.45); font:500 32px/1 'IBM Plex Mono',monospace;
}
#garage:not([data-focus])[data-station="car"] > .actions > #recall.action[data-mechanism="call-lever"] {
  grid-area:recall; position:relative; z-index:2; margin:16px 24px 0 0; padding:8px 0; min-height:48px; height:auto;
  border:0; background:transparent; color:var(--club-ivory);
}
#garage:not([data-focus])[data-station="car"] #recall .recall-label {
  color:inherit; font:500 16px/1.5 var(--face-body); text-decoration:underline; text-underline-offset:4px;
}
#garage:not([data-focus])[data-station="car"] #recall .recall-state { display:none; }
#garage:not([data-focus])[data-station="car"] #recall[data-feedback="true"] .recall-state {
  display:block; color:#c3cad6; font:400 14px/1.4 var(--face-body);
}
#garage:not([data-focus])[data-station="car"] > .actions > #refresh {
  grid-area:recovery; position:relative; z-index:2; margin:8px 24px 0 0; background:transparent; color:var(--club-ivory);
  font:500 16px/1.5 var(--face-body); text-decoration:underline; text-underline-offset:4px;
}
#garage:not([data-focus])[data-station="car"] .stage-pocket {
  background:#18243a; color:var(--bay-paper); border-top:4px solid #0b1220; min-height:96px;
  padding:16px 24px; gap:24px;
}
#garage:not([data-focus])[data-station="car"] .stage-pocket .identity {
  padding:8px 0; border:0; background:transparent;
  color:var(--bay-paper); max-width:calc(100% - 144px);
}
#garage:not([data-focus])[data-station="car"] .identity h1 {
  margin:0; color:var(--bay-paper); font:600 var(--type-title)/var(--type-heading) var(--face-body);
}
#garage:not([data-focus])[data-station="car"] .identity p { margin:4px 0 0; color:#c3cad6; font:400 14px/1.4 var(--face-body); }
#garage:not([data-focus])[data-station="car"] .stage-pocket .fitted-parts {
  min-width:112px; padding:0; border:0; background:transparent; box-shadow:none;
}
#garage:not([data-focus])[data-station="car"] .stage-pocket .fitted-parts-head {
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center;
  min-height:48px; padding:0; border:0; background:transparent; color:var(--bay-paper);
}
#garage:not([data-focus])[data-station="car"] .fitted-parts-head > strong { display:block; color:inherit;
  font:500 16px/1.4 var(--face-body); text-decoration:underline; text-underline-offset:4px;
}
#garage:not([data-focus])[data-station="car"] .fitted-parts-head > small { color:#c3cad6;
  padding:0; margin:0; border:0; background:transparent; font:400 14px/1.4 var(--face-body);
}
#garage:not([data-focus])[data-station="car"] .turntable-cue {
  top:auto; bottom:112px; right:24px; min-height:0; width:auto; min-width:0; padding:3px 8px;
  background:#18243a; color:var(--club-ivory);
}
#garage:not([data-focus])[data-station="car"] .turntable-cue :is(span,small) { color:var(--club-ivory); font:400 13px/1.4 var(--face-body); }
#station-legend { display:none; }

/* Parts drawers form one cabinet: labels on the left, contents, then the actual service bench. */
#garage[data-station="workshop"] :is(#parts-bench,#works-bench) { background:transparent; }
#garage[data-station="workshop"] .workshop-physical { background:transparent; padding:0; }
#garage[data-station="workshop"] .workshop-parts-room { background:transparent; }
#garage[data-station="workshop"] .workshop-physical-head { color:var(--club-ivory); border-color:#3a4a66; }
#garage[data-station="workshop"] .workshop-livery-door { color:var(--club-ivory); }
#garage[data-station="workshop"] .workshop-livery-door strong { color:var(--club-ivory); }
#garage[data-station="workshop"] .workshop-livery-door > span:last-child { color:var(--club-ivory); }
#garage[data-station="workshop"] .workshop-physical-heading h2 { color:var(--club-ivory); }
#garage[data-station="workshop"] .workshop-category-group-tab > strong { color:var(--club-ivory); }
#garage[data-station="workshop"] .workshop-parts-room { gap:0; border-bottom:8px solid #0b1220; }
#garage[data-station="workshop"] .workshop-category-rail { padding-right:18px;
  color:var(--club-ivory); background:transparent; }
#garage[data-station="workshop"] .workshop-parts-room :is(.workshop-category-tab,.workshop-category-group-tab) {
  color:var(--club-ivory); background:transparent; border-bottom-color:#3a4a66; }
#garage[data-station="workshop"] .workshop-category-group-tab[aria-expanded="true"] { box-shadow:none; border-left:3px solid var(--club-ivory); }
#garage[data-station="workshop"] .workshop-category-tab[aria-pressed="true"] { color:var(--club-ink); background:var(--club-ivory); }
#garage[data-station="workshop"] .workshop-category-label { color:var(--club-ivory); }
#garage[data-station="workshop"] :is(.workshop-category-count,.workshop-category-group-count) { color:#c3cad6; }
#garage[data-station="workshop"] .workshop-category-tab[aria-pressed="true"] :is(strong,.workshop-category-count) { color:var(--club-ink); }
#garage[data-station="workshop"] .workshop-part-rack { border-right:8px solid #0b1220; }
#garage[data-station="workshop"] .workshop-inspection { border:0; background:var(--club-ivory); }
#garage[data-station="workshop"] .workshop-part { background:var(--mw-paper-hi); }
#garage[data-station="workshop"] .workshop-part[data-active="true"] { background:#dfe3ea; }
#garage[data-station="workshop"] .workshop-part-name { color:var(--club-ink); }
#garage[data-station="workshop"] :is(.workshop-category-tab,.workshop-category-group-tab) strong { font:500 16px/1.3 var(--face-body); }
#garage[data-station="workshop"] .workshop-part-name { font:600 18px/1.25 var(--face-body); }
#garage[data-station="workshop"] .workshop-part::before { display:none; }
#garage[data-station="workshop"] .workshop-category-rail-head { display:none; }
#garage[data-station="workshop"] .workshop-part { border:0; border-bottom:1px solid var(--club-rule); }
#garage[data-station="workshop"] .workshop-action { font:600 16px/1.3 var(--face-body); }
#garage[data-station="workshop"] .workshop-action.primary { background:var(--club-red); color:var(--club-ivory); }
#garage[data-station="workshop"] .workshop-switch { background:var(--club-deep); border-color:#3a4a66; }
#garage[data-station="workshop"] .workshop-switch button { color:var(--club-ivory); background:transparent; }
#garage[data-station="workshop"] .workshop-switch button[aria-pressed="true"] { color:var(--club-ink); background:var(--club-ivory); }
#garage[data-station="workshop"] .workshop-turn-cue { background:var(--club-ivory); color:var(--club-ink); }
#garage[data-station="workshop"] .workshop-parts-wall-object { background:var(--club-deep); }
#garage[data-station="workshop"] .slot-car-paint-booth { background:var(--club-ivory); border-bottom:8px solid var(--club-deep); }
#garage .slot-car-paint-actions button:last-child, #garage .slot-car-prep-primary { background:var(--club-red); color:var(--club-ivory); }
/* Real asset views outrank component fallback shapes; these shared furniture rules belong outside the legacy layer. */
#garage .slot-car-books { border:0; }
#garage .slot-car-books-head { border:0; border-bottom:1px solid var(--mw-rule); background:var(--mw-paper); }
#garage .slot-car-books-stage { height:320px; border:0; }
#garage .slot-car-books-reading { background:var(--mw-paper-hi); }
#garage .slot-car-books-line { font-size:24px; }
#garage .slot-car-books-list { gap:0; border-top:1px solid var(--mw-rule); }
#garage .slot-car-book { border:0; border-bottom:1px solid var(--mw-rule); background:transparent; padding:18px 14px; }
#garage .slot-car-keepsakes { padding:24px; background:var(--mw-paper); color:var(--mw-ink); }
#garage .slot-car-keepsakes-head { border:0; }
#garage .slot-car-keepsakes-shelf { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); background:#4a4034; border:0; border-bottom:10px solid #352b24; gap:26px; padding:24px; }
#garage .slot-car-keepsake { min-width:0; }
#garage .slot-car-keepsake-stand { height:160px; }
#garage .slot-car-keepsake-object, #garage .slot-car-keepsake-object img { width:160px; height:160px; }
#garage .slot-car-keepsake p { max-width:100%; color:#f4efe4; font-size:16px; overflow-wrap:anywhere; }
#garage .slot-car-keepsake small { color:#e1d8c5; }
#garage .slot-car-toys { border:0; --toy-paper:var(--mw-paper); --toy-paper-hi:var(--mw-paper-hi); }
#garage .slot-car-toys-head { border:0; border-bottom:1px solid var(--mw-rule); }
#garage .slot-car-toy-bay { min-height:210px; background:#4a4034; border:0; }
#garage .slot-car-toy-bay::before { display:none; }
#garage .slot-car-toy-tale { border:0; box-shadow:none; }
#garage .slot-car-toy-list { gap:0; }
#garage .slot-car-toy-card { border:0; border-top:1px solid var(--mw-rule); background:transparent; }
#garage .slot-car-toy-card-icon { border:0; background:transparent; }
#garage .slot-car-toy-object .slot-car-toy-object-shape,
#garage .slot-car-toy-card .slot-car-toy-card-icon { display:block; position:relative; width:140px; height:140px; border:0; border-radius:0; background:none; top:auto; transform:none; filter:none; }
#garage .slot-car-toy-object .slot-car-toy-object-shape::before,
#garage .slot-car-toy-object .slot-car-toy-object-shape::after,
#garage .slot-car-toy-card .slot-car-toy-card-icon::before,
#garage .slot-car-toy-card .slot-car-toy-card-icon::after { display:none; }
#garage .slot-car-toy-view { display:block; width:100%; height:100%; object-fit:contain; }
#garage .slot-car-toy-bay::after { display:none; }
#garage .slot-car-toy-objects { display:block; padding:0; overflow-x:auto; }
#garage .slot-car-toy-objects::after { display:none; }
#garage .slot-car-toy-row { position:relative; display:flex; align-items:end; justify-content:center;
  gap:clamp(12px,3vw,36px); width:max-content; min-width:100%; height:100%; min-height:220px; padding:26px 20px 45px; }
#garage .slot-car-toy-row::after { content:''; position:absolute; left:20px; right:20px; bottom:32px; height:13px; border:2px solid #090a0a; background:linear-gradient(#8a7650,#403521); }
#garage .slot-car-toy-object { display:flex; flex:0 0 140px; flex-direction:column; align-items:center; justify-content:flex-end; gap:6px; }
/* Align each authored image's opaque base with the ledge, including the transparent render margin. */
#garage .slot-car-toy-object[data-kind="ball"] { --toy-base-gap:33px; }
#garage .slot-car-toy-object[data-kind="whistle"] { --toy-base-gap:20px; }
#garage .slot-car-toy-object[data-kind="blanket"] { --toy-base-gap:12px; }
#garage .slot-car-toy-object[data-kind="mirror"] { --toy-base-gap:34px; }
#garage .slot-car-toy-object[data-kind="radio"] { --toy-base-gap:22px; }
#garage .slot-car-toy-object .slot-car-toy-object-shape { order:3; flex:none; margin-bottom:calc(-1 * var(--toy-base-gap,0px)); }
#garage .slot-car-toy-card { grid-template-columns:140px minmax(0,1fr); align-items:center; }
#garage .slot-car-toy-object[data-wear="worn"] .slot-car-toy-view,
#garage .slot-car-toy-object[data-wear="treasured"] .slot-car-toy-view { filter:saturate(.78); }

#garage .slot-car-books, #garage .slot-car-toys, #garage .slot-car-keepsakes { background:var(--club-ivory); }
#garage .slot-car-radio { background:var(--club-ivory); color:var(--club-ink); border:0; }
#garage .slot-car-radio-head h2 { color:var(--club-ink); }
#garage .slot-car-radio-freq, #garage .slot-car-radio[data-on="false"] .slot-car-radio-freq,
#garage .slot-car-radio-scale, #garage .slot-car-radio-window { color:var(--mw-ink-soft); }
#garage .slot-car-radio-window[data-signal="clear"] { color:var(--club-ink); }
#garage .slot-car-prep-game { --paper:var(--club-ivory); --ink:var(--club-ink); --red:var(--club-red); --yellow:#d5ba81; }
#garage .slot-car-prep-hud { max-width:320px; padding:10px 12px; box-shadow:none; }
#garage .slot-car-prep-tool { grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:12px 16px; min-height:64px; }
#garage .slot-car-prep-tool-code { display:none; }
#garage .slot-car-prep-tool-name { grid-column:1; min-width:0; }
#garage .slot-car-prep-tool-stock { grid-column:2; }
#garage .slot-car-prep-tool[data-selected="1"] { background:#dfe3ea; color:var(--club-ink); }
#garage .slot-car-prep-kicker { display:none; }
#garage .slot-car-prep-title { font-size:26px; }
#garage .slot-car-prep-choices { top:118px; box-shadow:none; }
#garage .slot-car-prep-choice[data-selected="1"] { background:#dfe3ea; }

/* Record is filing furniture against the wall; paper retains its own light value. */
#garage .slot-car-mastery-board { --text-strong:var(--club-ink); --text-soft:var(--mw-ink-soft);
  --text-signal:var(--club-ink); background:var(--club-ivory); color:var(--club-ink); padding:24px; }
#garage .slot-car-mastery-head { background:transparent; border:0; border-bottom:1px solid var(--club-rule);
  padding:0 0 24px; }
#garage .slot-car-mastery-total { background:transparent; border:0; color:var(--club-ink); }
#garage .slot-car-license-rack { background:var(--club-ivory); border-color:var(--club-rule); }
#garage .slot-car-license { background:var(--club-ivory); border-color:var(--club-rule); }
#garage .slot-car-license[data-complete="true"] { background:var(--mw-paper-hi); border-top-color:var(--club-ink); }
#garage .slot-car-license-detail { font-size:14px; font-weight:400; }
#garage .slot-car-license-facts { font-size:14px; font-weight:400; }
#garage .slot-car-license-meter { background:var(--mw-paper-dim); border-color:var(--club-rule); }
#garage .slot-car-license-meter span { background:var(--club-ink); }
#garage .slot-car-license-slot { border-color:var(--club-rule); color:var(--mw-ink-soft); }
#garage .slot-car-license-slot[data-stamped="true"] { border-color:transparent; }
#garage .slot-car-license-stamp { border-color:var(--club-ink); color:var(--club-ink);
  box-shadow:inset 0 0 0 3px var(--mw-paper-hi),inset 0 0 0 5px var(--club-ink); }
#garage[data-station="record"] :is(.life-panel,.record-panel) { background:transparent; padding:0; border:0; }
#garage[data-station="record"] .record-empty {
  width:fit-content; max-width:100%; margin:20px 0; padding:16px 20px; background:#f4efe4; color:#242923;
}
.shell:has(> #garage[data-station="record"]:not([hidden]):not([data-focus])) {
  background:#30241d url('/media/slot-car/stream-board/walnut-board-albedo.png') repeat;
  background-size:1120px auto;
}
#garage:not([data-focus])[data-station="record"] .life-switchboard { gap:0; padding:0;
  background:var(--club-deep); border-bottom:2px solid #0b1220; }
#garage[data-station="record"] .life-switch { background:transparent; border:0;
  color:var(--club-ivory); clip-path:none; flex:0 1 150px; min-width:0; min-height:64px; border-top:3px solid transparent; border-right:1px solid #39423f; border-radius:0; box-shadow:none; }
#garage[data-station="record"] .life-switch strong,
#garage[data-station="record"] .life-switch small { color:inherit; }
#garage[data-station="record"] .life-switch[aria-pressed="true"] { background:#f4efe4; color:#242923; border-top-color:var(--club-red); box-shadow:none; }
#garage[data-station="record"] .life-switch:not([aria-pressed="true"]):hover { background:#26372e; color:#f4efe4; }
#garage[data-station="record"] .life-switch:focus-visible { outline:2px solid #f4efe4; outline-offset:-5px; }
#garage[data-station="record"] .life-switch[aria-pressed="true"]:focus-visible { outline-color:#242923; }
#garage:not([data-focus])[data-station="record"] .life-switch {
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:4px;
  padding:12px 16px; min-height:68px;
}
#garage[data-station="record"] .life-switch strong { font:600 15px/1.3 var(--face-body); }
#garage[data-station="record"] .life-switch small { font:400 13px/1.3 var(--face-body); }
#garage[data-station="record"] .life-switch :is(strong,small) {
  min-width:0; max-width:100%; white-space:normal; overflow:visible; overflow-wrap:anywhere; text-overflow:clip;
}
#garage[data-station="record"] :is(.memory-wall,.race-report,.slot-car-trophy-wall,#track-passport-root,#cup-archive-root) {
  border-inline:0;
}
#garage[data-station="record"] .mystery-note {
  grid-template-columns:144px minmax(0,64ch); gap:24px; align-items:center; justify-content:start;
  padding:24px; background:transparent; border:0; box-shadow:none;
}
#garage[data-station="record"] .mystery-receiver { height:170px; }
#garage[data-station="record"] .mystery-signal {
  align-content:start; min-height:0; padding:20px; background:#f4efe4; color:#242923;
  border:1px solid #a49b83; box-shadow:none;
}
#garage[data-station="record"] .mystery-signal::before { display:none; }
#garage[data-station="record"] .mystery-state {
  margin:0 0 12px; padding:0; border:0; color:#625e54;
  font:600 14px/1.3 var(--face-body); letter-spacing:0; transform:none;
}
#garage[data-station="record"] .mystery-omen {
  padding-top:12px; border-top:1px solid #a49b83; color:#242923; font:400 18px/1.5 var(--face-body);
}
@media(max-width:720px){
  #garage[data-station="record"] .mystery-note { grid-template-columns:minmax(0,1fr); gap:12px; padding:20px; }
  #garage[data-station="record"] .mystery-receiver { width:128px; height:160px; justify-self:start; }
}
#garage[data-station="record"] .return-board { background:var(--club-ivory); }
#garage[data-station="record"] :is(.slot-car-passport-head,.slot-car-cup-archive-head) {
  padding:16px 20px; background:#f4efe4; border-bottom:0;
}
#garage[data-station="record"] .slot-car-passport-head { margin-bottom:2px; }
#garage[data-station="record"] .slot-car-cup-archive-head { padding:0 8px 24px; border-bottom:2px solid #625447; }
#garage[data-station="record"] :is(.slot-car-passport-head,.slot-car-passport-owner,.slot-car-passport-count,
  .slot-car-cup-archive-head,.slot-car-cup-archive-owner,.slot-car-cup-archive-count) { color:#242923; }

/* The entry noticeboard belongs to the same painted club. Keep its authoritative programme grid. */
#garage:is([data-station="race"],[data-poster="true"]) .race-poster { padding:24px 0 0; background:transparent; }
#garage .poster { --paper:#f6f5f1; --ink:#1b2433; --litho:#b8322b; --signal:#d9c49c; --bench:#18243a;
  border:8px solid #0b1220; }
#garage .poster-field { background:var(--club-green); clip-path:none; }
#garage .poster-sheet::before { display:none; }
#garage .poster-flip:has([data-dash="true"]) { display:none; }
#garage .poster-venue { max-width:100%; }
#garage .poster-heat-rule, #garage .poster-free-heat { transform:none; border:0; padding-left:16px; text-transform:none; }
#garage .poster-heat-rule strong, #garage .poster-free-heat strong { font:600 16px/1.2 var(--face-body); letter-spacing:0; }
#garage .poster-heat-rule span, #garage .poster-free-heat span { font:400 14px/1.2 var(--face-body); letter-spacing:0; }
#garage .poster-foot .poster-purse b { font:600 20px/1 var(--face-body); }
#garage .poster-title { color:var(--club-ivory); }
#garage .poster-ticket :is(.body,.stub) { background:var(--club-red); color:var(--club-ivory); }
#garage .poster-legend { background:var(--club-ivory); color:var(--club-ink); }
#garage .poster-sheet, #garage .poster-foot { background:var(--mw-paper-hi); color:var(--club-ink); }
#garage .poster-watch, #garage .poster-legend kbd, #garage .poster-call { color:var(--club-ink); }

/* During the heat the same enamel carries live timing, and paper carries the
   driver's decisions. The circuit and its cars remain the moving foreground. */
#garage:is([data-focus="countdown"],[data-focus="racing"]) .car-stage {
  margin:24px 26px 0; height:600px; min-height:0;
}
#garage:is([data-focus="countdown"],[data-focus="racing"]) .car-stage::before,
#garage:is([data-focus="countdown"],[data-focus="racing"]) .car-stage::after { display:none; }
#garage:is([data-focus="countdown"],[data-focus="racing"]) .car-3d { inset:0; pointer-events:none; }
#garage:is([data-focus="countdown"],[data-focus="racing"]) .slot-car-3d-canvas { filter:none; }
#garage:is([data-focus="countdown"],[data-focus="racing"]) .turntable-cue { display:none; }
#garage .race-watch { opacity:0; background:transparent; pointer-events:none; transition:opacity 240ms ease; }
#garage .race-watch[data-ready="true"]:not([data-leaving]) { opacity:1; pointer-events:auto; }
@media (max-width:700px) {
  #garage:is([data-focus="countdown"],[data-focus="racing"]) .car-stage { margin:12px 12px 0; height:408px; }
}
@media (prefers-reduced-motion:reduce) { #garage .race-watch { transition:none; } }
#garage[data-focus="racing"] .status-strip {
  background:var(--club-deep); color:var(--club-ivory); border:0;
}
#garage[data-focus="racing"] .status-main { color:var(--club-ivory); font:500 var(--type-race)/var(--type-heading) var(--face-body); }
#garage[data-focus="racing"] .status-sub { color:#c3cad6; }
#garage[data-focus="racing"] .circuit-card {
  background:var(--club-ivory); color:var(--club-ink); border:0;
}
#garage[data-focus="racing"] .circuit-card :is(h2,.track-name,.track-detail) { color:var(--club-ink); }
#garage[data-focus="racing"] .race-controls { background:var(--club-ivory); color:var(--club-ink); border:0; }
#garage[data-focus="racing"] .control-readout { background:transparent; border:0; color:var(--club-ink); }
#garage[data-focus="racing"] .control-readout :is(strong,small) { color:var(--club-ink); }
#garage[data-focus="racing"] .position-board { background:var(--club-deep); border:0; }
#garage[data-focus="racing"] > .garage-directory { margin-inline:0; }
#garage[data-focus="racing"] .circuit-card h2 { font:400 var(--type-small)/var(--type-reading) var(--face-body); }
#garage[data-focus="racing"] .circuit-card .track-name { font:600 var(--type-title)/var(--type-heading) var(--face-body); }
#garage[data-focus="racing"] .control-readout { font:400 var(--type-small)/var(--type-reading) var(--face-body); }
#garage[data-focus="racing"] .control-readout strong { font:500 var(--type-body)/var(--type-reading) var(--face-body); }
/* Keep the physical clipboard, with its orders and call states readable in one type system. */
#garage .slot-car-contract-board[data-embedded="true"] :is(.slot-car-contract-kicker,.slot-car-contract-tier-code) { display:none; }
#garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-head { padding:8px 12px; }
#garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-head h2 { font:500 var(--type-body)/var(--type-heading) var(--face-body); letter-spacing:0; }
#garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-count { font:400 var(--type-small)/var(--type-reading) var(--face-body); letter-spacing:0; text-transform:none; }
#garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-slip {
  grid-template-columns:120px minmax(0,1fr) max-content; gap:8px; padding:12px 12px 12px 20px;
}
#garage .slot-car-contract-board[data-embedded="true"] :is(.slot-car-contract-slip h3,.slot-car-contract-order,.slot-car-contract-state,.slot-car-contract-action) {
  font:400 var(--type-small)/var(--type-reading) var(--face-body); letter-spacing:0; text-transform:none;
}
#garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-slip h3 { font-weight:600; }
#garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-mark { transform:none; padding:4px 8px; border:0; }
#garage[data-station="workshop"] .workshop-shelf-title { font:600 var(--type-title)/var(--type-heading) var(--face-body); }
html:not(.stream-transparent) :is(#garage,#drive-root) .race-moment-count,
html:not(.stream-transparent) :is(#garage,#drive-root) .race-moment-count[data-go="true"] {
  font:600 48px/var(--type-heading) var(--face-body); letter-spacing:0;
  color:var(--club-ivory); -webkit-text-stroke:2px var(--club-ink);
}

/* Timing slips, control box and official results belong to the same club as the service bay. */
.drive-hud { --paper:var(--club-ivory); --yellow:#edcf93; --soft:#c3cad6; }
.drive-hud :is(.drive-track,.drive-times,.watch-card,.watch-standings) {
  background:var(--club-deep); color:var(--club-ivory); border-radius:0;
  border:1px solid #3a4a66; box-shadow:none;
}
.drive-hud .watch-card-name, .drive-hud .watch-standings li[data-following="true"] { color:#edcf93; }
.drive-hud :is(.drive-wait,.drive-controls-card,.watch-director-console,.drive-result) {
  background:var(--club-ivory); color:var(--club-ink); border-radius:0; box-shadow:none;
}
.drive-hud .drive-result { --paper:var(--club-ink); --soft:#545a66; --yellow:var(--club-red); border:8px solid var(--club-deep); }
.drive-hud .drive-result-head { background:var(--club-deep); color:var(--club-ivory); }
.drive-hud .drive-result h2 { color:var(--club-ivory); }
.drive-hud .drive-result-actions button.primary { background:var(--club-red); border-color:var(--club-red); color:var(--club-ivory); }
.drive-hud .drive-result-error { color:var(--club-red); }
.drive-hud .drive-instrument-switches { background:var(--club-deep); border:1px solid #3a4a66; }
.drive-hud .drive-instrument-switches > button { color:var(--club-ivory) !important; }
.drive-hud .drive-instrument-switches > .drive-camera { background:var(--club-ivory) !important; color:var(--club-ink) !important; }
.drive-hud .drive-wait :is(.drive-wait-title,.drive-wait-detail) { color:var(--club-ink); }
.drive-hud .drive-controls-card .drive-hint { color:var(--club-ink); }
.drive-hud .watch-split[data-level="behind"] .watch-split-delta { color:#ffada0; }
.drive-hud .drive-dash { background:var(--club-deep); border-radius:0; }
.drive-hud :is(.drive-hand-controller,.drive-mixer) { background:var(--club-deep); color:var(--club-ivory); border-color:#3a4a66; }
.drive-hud .drive-controls-tab { background:var(--club-red); }
.drive-hud:is([data-phase="waiting"],[data-phase="countdown"]) .drive-dash { visibility:hidden; }
.drive-picker { --paper:var(--club-ivory); --text:var(--club-ivory); --soft:#c3cad6; --yellow:var(--club-ivory); }
.drive-picker .drive-brand-mark { display:none; }
.drive-picker header { border-bottom-color:#3a4a66; }
.drive-picker .drive-brand-copy > span { font:600 18px/1.2 var(--face-body); letter-spacing:0; }
.drive-picker :is(.drive-heat-actions button,.drive-gate .drive-secondary) { border-radius:0; background:var(--club-deep); color:var(--club-ivory); border-color:#3a4a66; }
.drive-picker :is(.drive-heat-actions button.primary,.drive-gate .drive-primary) { background:var(--club-red); color:var(--club-ivory); border-color:var(--club-red); border-radius:0; }
.drive-picker .drive-car-preview { height:260px; border:0; border-radius:0; background:var(--club-deep); }
html.stream-transparent body { background:transparent; }

/* Return to the car or the counter directly from the filed result. */
#garage .race-return { display:flex; flex-wrap:wrap; gap:8px 24px; align-items:center;
  background:var(--club-ivory); color:var(--club-ink); padding:12px 20px;
  border-top:1px solid var(--club-rule); }
#garage .race-return a { color:inherit; font:500 16px/1.35 var(--face-body);
  display:inline-flex; align-items:center; min-height:44px; text-underline-offset:4px; }
#garage:not([data-station="record"]):not([data-focus="results"]) .race-return { display:none; }
.drive-hud :is(.drive-result-kicker,.drive-result-laps-title,.drive-result-note,.drive-result-clock) {
  color:var(--club-ink); font:400 14px/1.4 var(--face-body); }
.drive-hud .drive-result-head .drive-result-kicker { color:var(--club-ivory); }
.drive-hud .drive-result-laps { border-top-color:var(--club-rule); }
.drive-hud .drive-result-lap { border-bottom-color:var(--club-rule); }
.drive-hud .drive-result-actions { flex-wrap:wrap; }
.drive-hud .drive-result-actions button { flex:1 1 100px; font:500 16px/1.25 var(--face-body); }
.drive-hud .drive-result :is(.drive-result-facts dt,.drive-result-lap .drive-lap-name) { color:var(--club-ink); }

/* A finish stays in the workshop. The timing slip sits in its foreground, not in another page column. */
#garage.garage[data-focus="results"] { background:var(--club-deep); padding:0;
  grid-template-columns:minmax(0,400px) minmax(0,1fr); grid-template-rows:56px auto auto;
  grid-template-areas:"directory directory" "report hero" "notice notice";
  gap:0; align-content:start; min-height:calc(100vh - 64px); }
#garage[data-focus="results"] > .garage-directory { display:flex !important; }
#garage[data-focus="results"] > .garage-directory { margin:0; }
#garage[data-focus="results"] > :is(.status-strip,.circuit-card) { display:none; }
#garage[data-focus="results"] > .race-report { display:flex; flex-direction:column; align-self:start;
  grid-column:1; grid-row:2; z-index:3; margin:48px 0 40px 40px;
  padding:0; border:0; background:transparent; box-shadow:none; }
#garage[data-focus="results"] .car-stage { grid-column:1 / -1; grid-row:2;
  height:clamp(600px,calc(100vh - 120px),900px); min-height:0; align-self:start; }
#garage[data-focus="results"] .race-return { padding:8px 16px; gap:0 12px;
  border:0; background:var(--club-deep); color:var(--club-ivory); }
#garage[data-focus="results"] .race-return a { font-size:var(--type-small); }
#garage[data-focus="results"] :is(.stage-readout,.pit-lights,.turntable-cue) { display:none; }
#garage[data-focus] .stage-pocket .identity { display:none; }
/* Human-facing race calls use the same paper/type as the result slip; the stream keeps its own composition. */
html:not(.stream-transparent) :is(#drive-root,#garage) .race-moment-finish {
  width:min(420px,calc(100% - 32px)); box-sizing:border-box; padding:20px;
  white-space:normal; overflow-wrap:anywhere; gap:12px; background:var(--club-ivory); color:var(--club-ink);
  border:1px solid var(--club-ink); border-radius:0; transform:translate(-50%,-50%); animation:none;
}
html:not(.stream-transparent) :is(#drive-root,#garage) .race-moment-finish b {
  font:600 36px/1.1 var(--face-body); letter-spacing:0; text-transform:none;
}
html:not(.stream-transparent) :is(#drive-root,#garage) .race-moment-finish .winner {
  font:600 20px/1.25 var(--face-body); text-align:center;
}
html:not(.stream-transparent) :is(#drive-root,#garage) .race-moment-finish li {
  font:400 16px/1.3 var(--face-body); text-align:center; animation:none;
}
html:not(.stream-transparent) :is(#drive-root,#garage) .race-moment-flag {
  width:112px; height:20px; animation:none;
}
html:not(.stream-transparent) :is(#drive-root,#garage) .race-moment-finish .photo {
  font:600 14px/1.3 var(--face-body); letter-spacing:0; text-transform:none;
}
@media (max-width:900px) {
  #garage.garage[data-focus="results"] { grid-template-columns:minmax(0,1fr);
    grid-template-rows:56px auto auto; grid-template-areas:"directory" "hero" "notice"; }
  #garage[data-focus="results"] > .race-report { grid-column:1; grid-row:2; margin:16px; }
  #garage[data-focus="results"] .car-stage { grid-column:1; grid-row:2;
    height:max(600px,calc(100svh - 160px),calc(var(--finish-slip-height,368px) + 320px)); }
  #garage[data-focus="results"] .race-return { padding:8px 16px; gap:0 12px; }
}

@media (max-width:1100px) {
  #garage.garage:not([data-focus])[data-station="car"] { grid-template-columns:1fr;
    grid-template-rows:auto auto auto auto auto auto auto auto;
    grid-template-areas:"directory" "hero" "status" "circuit" "primary" "recall" "recovery" "notice";
  }
  #garage:not([data-focus])[data-station="car"] .car-stage { grid-column:1; grid-row:2; }
  #garage:not([data-focus])[data-station="car"] > .bay-ticket-stock { grid-column:1; grid-row:3 / 6; margin:16px 0 0; }
  #garage:not([data-focus])[data-station="car"] > :is(.status-strip,.circuit-card,.actions) { margin-right:0; }
  #garage:not([data-focus])[data-station="car"] > .status-strip { margin-top:16px; padding:16px 20px 0; }
  #garage:not([data-focus])[data-station="car"] > .circuit-card { margin-top:16px; padding:20px; }
  #garage:not([data-focus])[data-station="car"] > .actions > :is(#join,#leave,#drive-heat) { width:100%; margin-right:0; }
  .topbar { gap:16px; padding-inline:18px; }
  .brand-copy strong { font-size:18px; }
  .topbar-context .poster-car { max-width:210px; }
  .session-tools .connection { display:none; }
}
@media (max-width:600px) {
  #garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-slip {
    grid-template-columns:minmax(0,1fr) auto;
  }
  #garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-tier { grid-column:1; grid-row:1; }
  #garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-order { grid-column:1; grid-row:2; }
  #garage .slot-car-contract-board[data-embedded="true"] .slot-car-contract-mark { grid-column:2; grid-row:1 / span 2; align-self:center; }
  #garage[data-station="workshop"] .workshop-parts-room .workshop-shelf-head {
    grid-template-columns:minmax(0,1fr); grid-template-areas:"label" "browse" "fitted"; gap:8px;
  }
  #garage[data-station="workshop"] .workshop-parts-room .workshop-wall-browse {
    grid-area:browse; justify-self:start;
  }
}
@media (max-width:700px) {
  .topbar, .topbar:has(> .topbar-context:not([hidden])) { display:flex; flex-wrap:wrap; min-height:62px;
    padding:8px 12px; column-gap:12px; row-gap:6px; }
  .topbar .brand { order:0; }
  .topbar .session-tools { order:1; margin-left:auto; }
  .topbar .session-tools .text-button { min-height:44px; }
  .topbar .topbar-context { display:block; order:2; flex:0 0 100%; }
  .topbar-context > .poster-ctx { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; gap:4px 8px; }
  .topbar-context .poster-car { grid-column:1; grid-row:1; }
  body:has(#garage:not([hidden])[data-station="car"]:not([data-focus])) .topbar-context #topbar-car-chip { grid-column:1; justify-self:start; }
  body:has(#garage:not([hidden])[data-station="car"]:not([data-focus])) .topbar-context .poster-class { grid-column:2; }
  .topbar-context .poster-chip { grid-column:2; grid-row:1; }
  .topbar-context .poster-class { grid-column:3; }
  .topbar-context .poster-points { grid-column:4; grid-row:1; margin:0; }
  .topbar-context .poster-points small { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .topbar-context .poster-cup { grid-column:1 / -1; grid-row:2; justify-self:start; padding:3px 0; }
  .topbar-context .poster-grow { display:none; }
  .brand-copy strong { font-size:16px; }
  .club-brand-art { width:auto; height:44px; }
  .topbar-context .poster-car { max-width:170px; font-size:22px; }
  .topbar-context .poster-chip { font-size:12px; }
  .session-tools { gap:8px; }
  #garage.garage:not([data-focus]) { padding:0 12px 16px; }
  #garage .garage-directory { margin-inline:-12px; padding:0 8px; height:56px; min-height:56px; }
  #garage .garage-directory a, #garage .garage-directory a:first-of-type,
  #garage .garage-directory a[aria-current="page"] { min-height:52px; padding:0 10px; }
  #garage .garage-station-copy strong { font-size:14px; }
  .pair { padding:12px; }
  .pair-arrival { grid-template-columns:1fr; }
  .pair-showroom { height:330px; min-height:330px; }
  .pair-desk { padding:26px 22px; border-left:0; border-top:4px solid #c9c6bd; }
  .pair .pair-desk h1 { font-size:40px; }
  #garage.garage:not([data-focus])[data-station="car"] { grid-template-columns:1fr;
    grid-template-rows:auto auto auto auto auto auto auto auto;
    grid-template-areas:"directory" "hero" "status" "circuit" "primary" "recall" "recovery" "notice";
  }
  #garage:not([data-focus])[data-station="car"] .car-stage { grid-column:1; grid-row:2; margin-top:12px; height:408px; min-height:408px; }
  #garage:not([data-focus])[data-station="car"] > .bay-ticket-stock { grid-column:1; grid-row:3 / 6; margin:16px 0 0; }
  #garage:not([data-focus])[data-station="car"] > :is(.status-strip,.circuit-card,.actions) { margin-right:0; }
  #garage:not([data-focus])[data-station="car"] .stage-pocket { padding:12px; gap:12px; }
  #garage:not([data-focus])[data-station="car"] .stage-pocket .identity { padding:8px; max-width:calc(100% - 108px); }
  #garage:not([data-focus])[data-station="car"] .identity h1 { font-size:20px; }
  #garage:not([data-focus])[data-station="car"] .stage-pocket .fitted-parts { display:block; min-width:96px; }
  #garage:not([data-focus])[data-station="car"] .fitted-parts-head > strong { font-size:15px; }
  #garage:not([data-focus])[data-station="car"] > .status-strip { margin-top:16px; padding:16px 16px 0; }
  #garage:not([data-focus])[data-station="car"] > .circuit-card { margin-top:16px; padding:16px; }
  #garage:not([data-focus])[data-station="car"] .track-name { margin:8px 0; font-size:24px; }
  #garage:not([data-focus])[data-station="car"] > .actions > :is(#join,#leave,#drive-heat) { min-height:56px; width:100%; margin-right:0; }
  #garage:not([data-focus])[data-station="car"] #join-copy { padding:12px 16px; }
  #garage:not([data-focus])[data-station="car"] .bay-ticket-number { width:56px; font-size:28px; }
  #garage:not([data-focus])[data-station="car"] .turntable-cue { bottom:112px; right:12px; }
  #garage:not([data-focus])[data-station="car"] > .actions > #recall.action[data-mechanism="call-lever"] { margin-top:8px; }
  #garage[data-station="workshop"] .workshop-category-rail { padding-right:0; }
  #garage[data-station="workshop"] .workshop-part-rack { border-right:0; }
  #garage[data-station="workshop"] .workshop-parts-room { gap:12px 0; }
  #garage[data-station="workshop"] .workshop-inspection-detail { padding:18px; }
  #garage[data-station="record"] .life-switchboard { padding-top:4px; }
  #garage:not([data-focus])[data-station="record"] .life-switch { flex:1 1 100px; min-height:56px; padding:10px 12px; }
  #garage .poster-venue { max-width:100%; }
  #garage .poster-lights .poster-watch { display:inline-flex; }
  #garage .poster-ticket-wrap { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; padding:8px 12px; }
  #garage .poster-drive { grid-column:1; grid-row:1; padding:8px; font-size:15px; }
  #garage .poster-stay { grid-column:2; grid-row:1; width:auto; min-width:0; padding:8px; }
  #garage .poster-ticket { grid-column:1 / -1; grid-row:auto; }
  #garage:is([data-station="race"],[data-poster="true"]) .race-poster { padding-top:12px; }
  #garage .poster { border-width:4px; }
}
