/* v2.css — the "timing screen" design system. Loads LAST on every page.
 *
 * Direction: a broadcast timing screen, not a web form. Neutral graphite
 * surfaces in clear steps (page < panel < raised), hairlines instead of tinted
 * outlines, one condensed display face (Saira) for labels, tabs, buttons and
 * every number, and the theme accent kept for state and the one thing to press.
 *
 * Everything is scoped so ?design=old (or localStorage stintlab.design = 'old')
 * puts html.design-old on the page and turns all of this off:
 *   - token blocks use  html:not(.design-old)          (beats [data-theme])
 *   - rules use        :where(html:not(.design-old))   (zero specificity, so
 *     source order wins and app.css state rules like .tab.active still apply)
 * Spec and class names: DESIGN-V2.md. Page files: v2-planner/-race/-dash.css.
 */

/* Saira variable (wght 100-900, wdth 50-125), SIL OFL 1.1: /fonts/saira-OFL.txt */
@font-face {
    font-family: "SL Saira";
    src: url(/fonts/saira-var.woff2) format("woff2-variations"), url(/fonts/saira-var.woff2) format("woff2");
    font-weight: 100 900;
    font-stretch: 50% 125%;
    font-style: normal;
    font-display: swap;
}

/* ======================================================================
   1. TOKENS — derived from each theme's --bg / --text / --accent
   ====================================================================== */
html:not(.design-old) {
    color-scheme: dark;

    /* Type: 5 sizes. Display face for labels, controls and numbers; the
       system face for running text. */
    --v2-font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --v2-font-display: "SL Saira", Bahnschrift, "DIN Alternate", "Arial Narrow", system-ui, sans-serif;
    --v2-font-mono: "Cascadia Mono", ui-monospace, Consolas, monospace;
    --v2-fs-xs: 11px;    /* caps labels, table headers */
    --v2-fs-sm: 13px;    /* secondary text, dense rows, segmented items */
    --v2-fs-md: 15px;    /* body, controls */
    --v2-fs-lg: 20px;    /* section headings, card values */
    --v2-fs-xl: clamp(30px, 4.2vw, 48px);  /* key race numbers */
    --v2-track-caps: .08em;

    /* Space: --s1..--s6 from app.css (4 8 12 16 24 36) plus one. */
    --s7: 48px;

    /* Radius: sharper than before; a timing screen is not a bubble UI. */
    --v2-r-sm: 3px;
    --v2-r-md: 6px;
    --v2-r-lg: 10px;
    --v2-r-pill: 999px;
    --radius: var(--v2-r-md);

    /* Control heights */
    --v2-h-sm: 30px;
    --v2-h-md: 38px;
    --v2-h-lg: 46px;

    /* Surfaces: page < inset < panel < raised < overlay, by mixing white into
       the theme's own --bg so every dark theme keeps its tint. */
    --v2-page: var(--bg);
    --v2-inset: color-mix(in srgb, #000 40%, var(--bg));
    --v2-panel: color-mix(in srgb, #fff 4.5%, var(--bg));
    --v2-raise: color-mix(in srgb, #fff 8%, var(--bg));
    --v2-overlay: color-mix(in srgb, #fff 11%, var(--bg));
    --v2-line: color-mix(in srgb, var(--text) 11%, transparent);
    --v2-line-2: color-mix(in srgb, var(--text) 19%, transparent);
    --v2-hover: color-mix(in srgb, var(--text) 6%, transparent);
    --v2-zebra: color-mix(in srgb, var(--text) 2.5%, transparent);
    --v2-wash: rgba(var(--accent-rgb), .13);
    --v2-shadow-1: inset 0 1px 0 rgba(255, 255, 255, .045), 0 1px 2px rgba(0, 0, 0, .45);
    --v2-shadow-2: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 34px -14px rgba(0, 0, 0, .8);
    --v2-shadow-pop: 0 0 0 1px var(--v2-line-2), 0 22px 54px -14px rgba(0, 0, 0, .85);
    --v2-focus: 0 0 0 3px rgba(var(--accent-rgb), .35);

    /* Stacking: one scale. Content stays at or below --z-sticky; the header
       never sets a z-index (no stacking context), its menus use --z-dropdown. */
    --z-base: 1;
    --z-sticky: 30;
    --z-ticker: 10050;
    --z-dropdown: 10070;
    --z-toast: 10080;
    --z-dialog: 10090;

    /* Motion */
    --v2-ease: cubic-bezier(.2, .7, .2, 1);
    --v2-fast: 120ms;
    --v2-med: 200ms;

    /* The old tokens follow, so the ~5000 lines of app.css shift with us. */
    --panel: var(--v2-panel);
    --panel-2: var(--v2-raise);
    --bg-2: var(--v2-inset);
    --surface-1: var(--v2-raise);
    --surface-2: color-mix(in srgb, #fff 11%, var(--bg));
    --surface-3: color-mix(in srgb, #fff 16%, var(--bg));
    --line: var(--v2-line);
    --line-2: var(--v2-line-2);
    --line-3: color-mix(in srgb, var(--text) 28%, transparent);
    --dx-mono: var(--v2-font-display);
}

/* Daylight: white cards on a grey page, ink shadows, darker wells. */
html[data-theme="daylight"]:not(.design-old) {
    color-scheme: light;
    --v2-inset: color-mix(in srgb, #000 3%, var(--bg));
    --v2-panel: #fff;
    --v2-raise: #fff;
    --v2-overlay: #fff;
    --v2-line: color-mix(in srgb, var(--text) 14%, transparent);
    --v2-line-2: color-mix(in srgb, var(--text) 24%, transparent);
    --v2-hover: color-mix(in srgb, var(--text) 5%, transparent);
    --v2-zebra: color-mix(in srgb, var(--text) 2.5%, transparent);
    --v2-wash: rgba(var(--accent-rgb), .1);
    --v2-shadow-1: 0 1px 2px rgba(16, 32, 26, .08);
    --v2-shadow-2: 0 1px 2px rgba(16, 32, 26, .06), 0 10px 28px -14px rgba(16, 32, 26, .28);
    --v2-shadow-pop: 0 0 0 1px var(--v2-line-2), 0 18px 44px -14px rgba(16, 32, 26, .35);
    --surface-2: color-mix(in srgb, #000 4%, var(--bg));
    --surface-3: color-mix(in srgb, #000 8%, var(--bg));
}
/* Mono's page is already #000: lift the wells a touch so they still read. */
html[data-theme="mono"]:not(.design-old) { --v2-inset: #050505; }

/* ======================================================================
   2. BASE + TYPE
   ====================================================================== */
/* Paint the whole viewport, not only what the body covers; in-frame pages stay see-through. */
:where(html:not(.in-frame)) { background: var(--v2-page, var(--bg)); }
:where(html:not(.design-old)) body {
    font-family: var(--v2-font-ui);
    background: var(--v2-page);
    font-feature-settings: "kern";
}
:where(html:not(.design-old)) h1,
:where(html:not(.design-old)) h2,
:where(html:not(.design-old)) h3 {
    font-family: var(--v2-font-display);
    font-stretch: 94%;
    letter-spacing: -.005em;
    color: var(--text-hi, var(--text));
}

/* Section heading: big and mixed case. Labels below are the small caps. */
:where(html:not(.design-old)) .section h1,
:where(html:not(.design-old)) .section h2,
:where(html:not(.design-old)) .section h3,
:where(html:not(.design-old)) .plan-sec > .section:first-child h2 {
    font-size: var(--v2-fs-lg);
    font-weight: 650;
    text-transform: none;
    letter-spacing: -.005em;
    color: var(--text-hi, var(--text));
    line-height: 1.15;
}
:where(html:not(.design-old)) .section { margin: var(--s5) 0 var(--s4); }
:where(html:not(.design-old)) .section .section-note { font-size: var(--v2-fs-sm); color: var(--text-3); }

/* Caps label: field labels, table headers, card eyebrows. */
:where(html:not(.design-old)) .v2-label,
:where(html:not(.design-old)) .field > label,
:where(html:not(.design-old)) th {
    font-family: var(--v2-font-display);
    font-size: var(--v2-fs-xs);
    font-weight: 600;
    font-stretch: 92%;
    letter-spacing: var(--v2-track-caps);
    text-transform: uppercase;
    color: var(--text-3);
}
:where(html:not(.design-old)) .field .hint { font-size: 12.5px; color: var(--text-4); }

/* ======================================================================
   3. KEY NUMBERS
   ====================================================================== */
:where(html:not(.design-old)) .v2-num,
:where(html:not(.design-old)) .tk-val,
:where(html:not(.design-old)) .gmt-clock,
:where(html:not(.design-old)) .room-code,
:where(html:not(.design-old)) #lapDelta .ld-num,
:where(html:not(.design-old)) .call-word,
:where(html:not(.design-old)) .ev-val,
:where(html:not(.design-old)) .wx-v,
:where(html:not(.design-old)) .big,
:where(html:not(.design-old)) .dv-tile > b,
:where(html:not(.design-old)) .eh-cell b,
:where(html:not(.design-old)) .eh-clock b,
:where(html:not(.design-old)) .field.is-derived .value {
    font-family: var(--v2-font-display);
    font-variant-numeric: tabular-nums lining-nums;
    font-stretch: 84%;
    letter-spacing: -.01em;
}
:where(html:not(.design-old)) .v2-num,
:where(html:not(.design-old)) #lapDelta .ld-num,
:where(html:not(.design-old)) .call-word,
:where(html:not(.design-old)) .dv-tile > b { font-weight: 700; line-height: .95; }
:where(html:not(.design-old)) .v2-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
:where(html:not(.design-old)) .v2-kpi-value {
    font-family: var(--v2-font-display); font-size: var(--v2-fs-xl); font-weight: 700;
    font-stretch: 84%; line-height: .95; letter-spacing: -.015em;
    font-variant-numeric: tabular-nums lining-nums; color: var(--text-hi, var(--text));
}
:where(html:not(.design-old)) .v2-kpi-unit { font-size: .45em; font-weight: 600; color: var(--text-3); margin-left: .15em; letter-spacing: 0; }
:where(html:not(.design-old)) .field.is-derived .value { font-size: 18px; font-weight: 600; color: var(--text-hi, var(--text)); }

/* ======================================================================
   4. SURFACES
   ====================================================================== */
:where(html:not(.design-old)) .v2-card,
:where(html:not(.design-old)) .panel {
    background: var(--v2-panel);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-r-md);
    box-shadow: var(--v2-shadow-1);
}
:where(html:not(.design-old)) .v2-card { padding: var(--s4); }
:where(html:not(.design-old)) .v2-card-2 { background: var(--v2-inset); border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); padding: var(--s3); }
:where(html:not(.design-old)) .v2-quiet { border-top: 1px solid var(--v2-line); padding-top: var(--s3); }
/* The one card to look at: an accent rail down its left edge. */
:where(html:not(.design-old)) .v2-rail { box-shadow: inset 3px 0 0 var(--accent), var(--v2-shadow-1); }

/* ======================================================================
   5. HEADER, NAV, THEME MENU, TICKER
   ====================================================================== */
/* The header is a full-width band, not a floating box. */
:where(html:not(.design-old)) .top-bar {
    margin: 0 0 var(--s4);
    padding: 10px 4px;
    background: var(--v2-panel);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    /* Full-bleed band + bottom hairline painted outside #app by border-image
       outset: no clip-path or transform, so the header's dropdowns are never
       clipped or trapped in a stacking context. */
    border-image: linear-gradient(to top, var(--v2-line) 1px, var(--v2-panel) 1px) fill 0 / 0 / 0 100vmax;
}
:where(html:not(.design-old)) .site-link {
    font-family: var(--v2-font-display);
    font-size: 12.5px;
    font-weight: 600;
    font-stretch: 88%;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
    border-radius: var(--v2-r-sm);
    padding: 8px 8px;
}
:where(html:not(.design-old)) .site-link:hover { color: var(--text); background: var(--v2-hover); }
:where(html:not(.design-old)) .site-link.is-here { color: var(--text-hi, var(--text)); background: none; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
/* Companion dot (site-nav.js): a 32x44 target around a 10px light, green when connected. */
.sn-comp { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 44px; border-radius: 8px; flex: none; }
.sn-comp[hidden] { display: none; }
.sn-comp:hover { background: var(--v2-hover, var(--panel-2)); }
.sn-comp:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-4); box-shadow: 0 0 0 2px var(--v2-panel, var(--panel)); }
.sn-comp.is-on .sn-dot { background: #22c55e; }

:where(html:not(.design-old)) .room-chip { background: transparent; border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); }
:where(html:not(.design-old)) .room-code { color: var(--accent); font-size: 16px; font-weight: 650; letter-spacing: .06em; }
:where(html:not(.design-old)) .gmt-clock {
    background: var(--v2-inset); border: 1px solid var(--v2-line); border-radius: var(--v2-r-md);
    color: var(--text-hi, var(--text)); font-size: 15px; font-weight: 600; min-height: var(--v2-h-md);
}
:where(html:not(.design-old)) .clock-zone { border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); background: var(--v2-inset); padding: 2px; gap: 2px; }
:where(html:not(.design-old)) .clock-zone button {
    background: none; border-radius: var(--v2-r-sm); color: var(--text-3);
    font: 600 12px var(--v2-font-display); letter-spacing: .06em; text-transform: uppercase;
}
:where(html:not(.design-old)) .clock-zone button[aria-pressed="true"] { background: var(--v2-overlay); color: var(--text-hi, var(--text)); box-shadow: var(--v2-shadow-1); }

:where(html:not(.design-old)) .top-btn { height: var(--v2-h-md); }
:where(html:not(.design-old)) .top-btn,
:where(html:not(.design-old)) .theme-trigger {
    min-height: var(--v2-h-md);
    background: var(--v2-raise); border: 1px solid var(--v2-line-2); border-radius: var(--v2-r-md);
    color: var(--text); font-family: var(--v2-font-display); font-size: 14px; font-weight: 600;
    box-shadow: var(--v2-shadow-1);
}
:where(html:not(.design-old)) .top-btn:hover,
:where(html:not(.design-old)) .theme-trigger:hover { background: var(--v2-overlay); border-color: var(--line-3); }

:where(html:not(.design-old)) .theme-menu {
    background: var(--v2-overlay); border: 0; border-radius: var(--v2-r-lg);
    box-shadow: var(--v2-shadow-pop); padding: 4px;
    animation: v2-pop var(--v2-med) var(--v2-ease);
}
:where(html:not(.design-old)) .theme-menu button { min-height: 34px; border-radius: var(--v2-r-sm); font-family: var(--v2-font-display); font-size: 14px; }
:where(html:not(.design-old)) .theme-menu button:hover { background: var(--v2-hover); }
:where(html:not(.design-old)) .theme-menu button.is-current { background: var(--v2-wash); }

/* ---- Top bar: one row (topbar.js builds the "more" menu) -------------
   Left: logo, nav, room chip. Right: engineer | clock | more | account.
   Controls are ghost (no box each); groups are split by hairline dividers. */
:where(html:not(.design-old)) .top-bar {
    position: relative;
    flex-direction: row; flex-wrap: nowrap; align-items: center;
    gap: var(--s4); min-height: 60px; padding-top: 8px; padding-bottom: 8px;
}
:where(html:not(.design-old)) .top-bar-left,
:where(html:not(.design-old)) .top-bar-right {
    min-height: 44px; flex-wrap: nowrap; align-items: center; width: auto;
}
:where(html:not(.design-old)) .top-bar-left { flex: 1 1 auto; min-width: 0; gap: var(--s4); }
:where(html:not(.design-old)) .top-bar-right { flex: 0 0 auto; gap: 2px; }
:where(html:not(.design-old)) .site-nav { flex: 0 0 auto; flex-wrap: nowrap; gap: 2px; }
:where(html:not(.design-old)) .top-bar-right > .clock-group,
:where(html:not(.design-old)) .top-bar-right > .tb-more,
:where(html:not(.design-old)) .top-bar-right > .user-menu {
    margin-left: var(--s2); padding-left: var(--s2); border-left: 1px solid var(--v2-line);
}
:where(html:not(.design-old)) .top-bar-right > .tb-more { margin-left: var(--s1); padding-left: var(--s1); }
:where(html:not(.design-old)) .top-bar-right > :first-child { margin-left: 0; padding-left: 0; border-left: 0; }

/* Ghost control: the shared look of every bar button. Plain prefix: it must
   beat the styles engineer-header.js injects at runtime. */
html:not(.design-old) .top-bar .room-name,
html:not(.design-old) .top-bar .split-btn,
html:not(.design-old) .room-copy-btn,
html:not(.design-old) .top-bar .eh-btn,
html:not(.design-old) .top-bar .gmt-clock,
html:not(.design-old) .tb-more-btn,
html:not(.design-old) .top-bar .user-trigger {
    min-height: 40px; height: 40px; margin: 0; padding: 0 10px;
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: 1px solid transparent; border-radius: var(--v2-r-md);
    box-shadow: none; color: var(--text-2);
    font-family: var(--v2-font-display); font-size: 14px; font-weight: 600;
}
html:not(.design-old) .top-bar .room-name:hover,
html:not(.design-old) .top-bar .split-btn:hover,
html:not(.design-old) .room-copy-btn:hover,
html:not(.design-old) .top-bar .eh-btn:hover,
html:not(.design-old) .top-bar .gmt-clock:hover,
html:not(.design-old) .tb-more-btn:hover,
html:not(.design-old) .top-bar .user-trigger:hover { background: var(--v2-hover); color: var(--text-hi, var(--text)); border-color: transparent; }
html:not(.design-old) .tb-more-btn[aria-expanded="true"],
html:not(.design-old) .top-bar .eh-btn[aria-expanded="true"] { background: var(--v2-hover); color: var(--text-hi, var(--text)); }

html:not(.design-old) .top-bar :is(.room-name, .split-btn, .room-copy-btn, .eh-btn, .gmt-clock, .tb-more-btn, .user-trigger):focus-visible,
html:not(.design-old) .tb-menu :is(button, a):focus-visible { outline: none; box-shadow: var(--v2-focus); border-color: var(--accent); }

/* Split view: icon + label on wide screens, icon only below 1700px (the
   button is hidden below 1100px, where split-view.js won't open it). */
html:not(.design-old) .top-bar .split-btn.is-on,
html:not(.design-old) .top-bar .split-btn[aria-pressed="true"] { color: var(--accent); background: var(--v2-wash); }
@media (min-width: 1700px) { :where(html:not(.design-old)) .top-bar .split-btn .split-label { display: inline; } }
@media (max-width: 1699px) { :where(html:not(.design-old)) .top-bar .split-btn .split-label { display: none; } }
@media (max-width: 1100px) { html:not(.design-old) .top-bar .split-btn { display: none; } }

/* Room chip: name, code, copy icon, one compact group. */
:where(html:not(.design-old)) .top-bar .room-chip {
    flex: 0 1 auto; min-width: 0; gap: 0; padding: 0 0 0 var(--s3);
    background: none; border: 0; border-left: 1px solid var(--v2-line); border-radius: 0;
}
html:not(.design-old) .top-bar .room-name { min-width: 9ch; max-width: 34ch; color: var(--text); padding-right: 6px; }
:where(html:not(.design-old)) .top-bar .room-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(html:not(.design-old)) .top-bar .room-name-pencil { color: var(--text-4); font-size: 12px; }
:where(html:not(.design-old)) .top-bar .room-code { padding: 0 2px 0 4px; font-size: 15px; white-space: nowrap; }
html:not(.design-old) .room-copy-btn { width: 36px; padding: 0; justify-content: center; color: var(--text-3); }
html:not(.design-old) .room-copy-btn:hover { color: var(--accent); }

/* Engineer (engineer-header.js): icon + On/Off. */
/* "Engineer: Off" in words at every width: "off" alone read as nothing. */
html:not(.design-old) .top-bar .eh-word { display: inline; }
:where(html:not(.design-old)) .eh-btn { font-size: 13px; }
html:not(.design-old) .top-bar .eh-btn.is-on { color: var(--accent); }
html:not(.design-old) .top-bar .eh-btn.is-locked { color: var(--warn); }
:where(html:not(.design-old)) .eh-panel {
    background: var(--v2-overlay); border: 0; border-radius: var(--v2-r-lg); box-shadow: var(--v2-shadow-pop);
}

/* Clock: the time; the UTC|Local switch sits in the "…" menu. */
:where(html:not(.design-old)) .clock-group { display: inline-flex; align-items: center; gap: 6px; }
:where(html:not(.design-old)) .top-bar .gmt-clock { color: var(--text-hi, var(--text)); font-size: 16px; padding: 0 8px; white-space: nowrap; }
:where(html:not(.design-old)) .clock-zone {
    display: inline-flex; flex: 0 0 auto; gap: 1px; padding: 2px;
    background: var(--v2-inset); border: 1px solid var(--v2-line); border-radius: var(--v2-r-md);
}
:where(html:not(.design-old)) .clock-zone button {
    min-height: 26px; height: 26px; margin: 0; padding: 0 7px; border: 0; box-shadow: none;
    background: none; border-radius: var(--v2-r-sm); color: var(--text-3);
    font: 600 11px var(--v2-font-display); letter-spacing: .06em; text-transform: uppercase;
}
:where(html:not(.design-old)) .clock-zone button:hover { color: var(--text); background: var(--v2-hover); }
:where(html:not(.design-old)) .clock-zone button[aria-pressed="true"] { background: var(--v2-overlay); color: var(--text-hi, var(--text)); box-shadow: var(--v2-shadow-1); }

/* More / hamburger */
:where(html:not(.design-old)) .tb-more { display: inline-flex; }
:where(html:not(.design-old)) .tb-more-btn { width: 40px; padding: 0; justify-content: center; }
:where(html:not(.design-old)) .tb-ico-burger { display: block; }
:where(html:not(.design-old)) .top-bar .user-trigger { padding: 0 8px 0 4px; }
:where(html:not(.design-old)) .top-bar .user-trigger.is-signed-in { padding: 0 4px; }

:where(html:not(.design-old)) .tb-menu {
    position: absolute; top: calc(100% + 4px); right: 0;
    width: min(300px, calc(100vw - 16px)); max-height: calc(100dvh / var(--z, 1) - 90px); overflow-y: auto;
    padding: 6px; background: var(--v2-overlay); border-radius: var(--v2-r-lg); box-shadow: var(--v2-shadow-pop);
    display: flex; flex-direction: column;
    animation: v2-pop var(--v2-med) var(--v2-ease);
}
:where(html:not(.design-old)) .tb-menu[hidden] { display: none; }
:where(html:not(.design-old)) .tb-slot { display: flex; flex-direction: column; gap: 1px; }
:where(html:not(.design-old)) .tb-slot:empty { display: none; }
:where(html:not(.design-old)) .tb-slot:not(:empty) ~ .tb-slot:not(:empty) { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--v2-line); }
/* Rows inside the menu */
:where(html:not(.design-old)) .tb-menu .top-btn,
:where(html:not(.design-old)) .tb-menu .split-btn,
:where(html:not(.design-old)) .tb-menu .theme-trigger,
:where(html:not(.design-old)) .tb-menu .site-link,
:where(html:not(.design-old)) .tb-menu .user-trigger {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; min-height: 40px; margin: 0;
    padding: 0 10px; justify-content: flex-start; flex: none;
    background: none; border: 0; border-radius: var(--v2-r-sm); box-shadow: none;
    color: var(--text-2); font-family: var(--v2-font-display); font-size: 14px; font-weight: 600;
    text-transform: none; letter-spacing: 0; text-align: left;
}
:where(html:not(.design-old)) .tb-menu .top-btn:hover,
:where(html:not(.design-old)) .tb-menu .split-btn:hover,
:where(html:not(.design-old)) .tb-menu .theme-trigger:hover,
:where(html:not(.design-old)) .tb-menu .site-link:hover,
:where(html:not(.design-old)) .tb-menu .user-trigger:hover { background: var(--v2-hover); color: var(--text-hi, var(--text)); }
:where(html:not(.design-old)) .tb-menu .site-link.is-here { color: var(--text-hi, var(--text)); box-shadow: inset 3px 0 0 var(--accent); }
:where(html:not(.design-old)) .tb-menu .site-nav { flex-direction: column; align-items: stretch; }
:where(html:not(.design-old)) .tb-menu .split-btn .split-label,
:where(html:not(.design-old)) .tb-menu .theme-picker .theme-name { display: inline; }
:where(html:not(.design-old)) .tb-menu .theme-picker { display: block; }
:where(html:not(.design-old)) .tb-menu .theme-caret { margin-left: auto; }
:where(html:not(.design-old)) .tb-menu .user-menu { display: block; }
/* Sub-menus open in place inside the panel, not as a second popup. */
:where(html:not(.design-old)) .tb-menu .theme-menu,
:where(html:not(.design-old)) .tb-menu .user-dropdown {
    position: static; width: auto; min-width: 0; max-height: none; margin: 2px 0 4px;
    box-shadow: none; background: var(--v2-inset); border: 0; animation: none;
}
:where(html:not(.design-old)) .tb-menu .clock-group { flex-wrap: wrap; padding: 4px 2px; }

/* Room menu (planner): "Room ▾" beside the room chip; grouped panel under it; a full-height sheet on a phone. */
:where(html:not(.design-old)) .tb-room { display: inline-flex; flex: none; }
html:not(.design-old) .tb-room-btn {
    min-height: 40px; height: 40px; margin: 0; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); box-shadow: none;
    color: var(--text-2); font: 600 14px var(--v2-font-display); white-space: nowrap; cursor: pointer;
}
html:not(.design-old) .tb-room-btn:hover,
html:not(.design-old) .tb-room-btn[aria-expanded="true"] { background: var(--v2-hover); color: var(--text-hi, var(--text)); }
html:not(.design-old) .tb-room-btn:focus-visible { outline: none; box-shadow: var(--v2-focus); border-color: var(--accent); }
:where(html:not(.design-old)) .tb-caret { font-size: 11px; color: var(--text-4); }
html:not(.design-old) #tbRoomMenu { right: auto; left: var(--tb-room-x, 0); width: min(320px, calc(100vw - 16px)); }
:where(html:not(.design-old)) #tbRoomMenu .tb-h {
    padding: 10px 10px 4px; color: var(--text-4); font: 600 11px var(--v2-font-display); letter-spacing: .08em; text-transform: uppercase;
}
:where(html:not(.design-old)) #tbRoomMenu .tb-h:not(:nth-child(2)) { margin-top: 6px; border-top: 1px solid var(--v2-line); padding-top: 12px; }
:where(html:not(.design-old)) #tbRoomMenu .tb-slot ~ .tb-slot { margin-top: 0; padding-top: 0; border-top: 0; }
:where(html:not(.design-old)) #tbRoomMenu .top-btn[hidden] { display: none; }
:where(html:not(.design-old)) #tbRoomMenu .tb-sheet-head { display: none; }
:where(html:not(.design-old)) #tbRoomMenu .clock-group { padding: 0; }
:where(html:not(.design-old)) #tbRoomMenu .gmt-clock { width: 100%; justify-content: flex-start; }
/* Room name: wraps to two lines before it is cut, and the tooltip (state.js) carries the whole name. */
html:not(.design-old) .top-bar.tb-in-room .room-name { max-width: 20ch; }
:where(html:not(.design-old)) .top-bar.tb-in-room .room-name-text {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    white-space: normal; overflow-wrap: anywhere; line-height: 1.15; text-align: left;
}
/* People is in the Room menu; the bar keeps name, code and copy. */
html:not(.design-old) .top-bar #roomPeopleBtn { display: none; }
@media (max-width: 820px) {
    /* In a room the logo shrinks to its mark: the room name needs the width more than the wordmark. */
    html:not(.design-old) .top-bar.tb-in-room .brand-logo-img { width: 22px; object-fit: cover; object-position: left center; }
    html:not(.design-old) .top-bar.tb-in-room .room-name { min-width: 0; max-width: none; font-size: 13px; }
    html:not(.design-old) #tbRoomMenu {
        position: fixed; inset: 0 0 0 auto; left: auto; width: min(360px, 100vw); max-height: none; height: 100dvh;
        border-radius: 0; padding: 0 8px 16px; overscroll-behavior: contain;
    }
    :where(html:not(.design-old)) #tbRoomMenu .tb-sheet-head {
        display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1;
        min-height: 56px; margin: 0 -8px; padding: 0 8px 0 18px; background: var(--v2-overlay); border-bottom: 1px solid var(--v2-line);
        color: var(--text-hi, var(--text)); font: 650 16px var(--v2-font-display);
    }
    html:not(.design-old) #tbRoomMenu .tb-sheet-x {
        width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none;
        color: var(--text-2); font-size: 26px; line-height: 1; cursor: pointer;
    }
    :where(html:not(.design-old)) #tbRoomMenu .tb-h:nth-child(2) { margin-top: 0; }
    :where(html:not(.design-old)) #tbRoomMenu .top-btn { height: 44px; min-height: 44px; }
    /* The bar keeps logo, name, Room, engineer, ☰; code, copy and People are in the Room sheet. */
    html:not(.design-old) .top-bar .room-code,
    html:not(.design-old) .top-bar .room-copy-btn { display: none; }
    html:not(.design-old) .tb-room-btn { padding: 0 8px; }
}

/* Phone: logo, room chip, engineer, hamburger. */
@media (max-width: 820px) {
    :where(html:not(.design-old)) .top-bar { gap: var(--s2); padding-left: 0; padding-right: 0; min-height: 56px; }
    :where(html:not(.design-old)) .top-bar-left { gap: var(--s2); }
    :where(html:not(.design-old)) .top-bar .brand-logo-img { height: 24px; }
    :where(html:not(.design-old)) .top-bar .room-chip { padding-left: var(--s2); }
    html:not(.design-old) .top-bar .room-name { max-width: 9ch; padding: 0 4px; }
    :where(html:not(.design-old)) .top-bar .room-name-pencil { display: none; }
    :where(html:not(.design-old)) .top-bar .room-code { font-size: 14px; }
    html:not(.design-old) .room-copy-btn { width: 32px; }
    html:not(.design-old) .top-bar .eh-btn { padding: 0 8px; }
    :where(html:not(.design-old)) .top-bar-right > .tb-more { border-left: 0; margin-left: 0; padding-left: 0; }
}
@media (max-width: 380px) {
    html:not(.design-old) .top-bar .room-name { display: none; }
}

/* Dash and Debrief bars: the same ghost controls and segmented presets. */
:where(html:not(.design-old)) .dx-bar,
:where(html:not(.design-old)) .db-bar { background: var(--v2-panel); border-bottom: 1px solid var(--v2-line); }
:where(html:not(.design-old)) .dx-btn {
    background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2);
    font-family: var(--v2-font-display); font-weight: 600;
}
html:not(.design-old) .dx-bar .eh-btn { border-color: transparent; font-family: var(--v2-font-display); font-weight: 600; }
html:not(.design-old) .dx-bar .eh-btn:hover { background: var(--v2-hover); }
:where(html:not(.design-old)) .dx-btn:hover { background: var(--v2-hover); color: var(--text-hi, var(--text)); border-color: transparent; }
:where(html:not(.design-old)) .dx-seg { padding: 2px; gap: 1px; background: var(--v2-inset); border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); }
:where(html:not(.design-old)) .dx-seg button { border: 0; box-shadow: none; background: none; color: var(--text-3); font-family: var(--v2-font-display); font-weight: 600; border-radius: var(--v2-r-sm); }
:where(html:not(.design-old)) .dx-seg button:first-child,
:where(html:not(.design-old)) .dx-seg button:last-child { border-radius: var(--v2-r-sm); margin-left: 0; }

/* Dash on a phone: the tools are one row that scrolls sideways, so the bar
   stays short and the grid keeps its tiles. The theme menu is fixed so the
   scroller can't clip it. */
@media (max-width: 760px) {
    :where(html:not(.design-old)) .dx-tools {
        flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
        scrollbar-width: none; gap: 6px; padding-bottom: 2px;
    }
    :where(html:not(.design-old)) .dx-tools::-webkit-scrollbar { display: none; }
    :where(html:not(.design-old)) .dx-tools > * { flex: 0 0 auto; }
    html:not(.design-old) .dx-tools .theme-menu { position: fixed; top: 56px; right: 8px; }
}

/* Menus above everything on the page (sticky Plan tabs, ticker, plan strip);
   toasts and dialogs above menus. Plain prefix: these must beat the styles
   account.js and engineer-header.js inject at runtime. */
html:not(.design-old) .race-ticker { z-index: var(--z-ticker); }
html:not(.design-old) .plan-jump { z-index: var(--z-sticky); }
html:not(.design-old) .theme-menu,
html:not(.design-old) .user-dropdown,
html:not(.design-old) .eh-panel,
html:not(.design-old) .tb-menu { z-index: var(--z-dropdown); }
html:not(.design-old) #toast { z-index: var(--z-toast); }
html:not(.design-old) .cfm-back { z-index: var(--z-dialog); }

/* Ticker: the darkest strip on the page, values in the number face. */
:where(html:not(.design-old)) .race-ticker {
    background: var(--v2-inset);
    border-bottom: 1px solid var(--v2-line);
    box-shadow: inset 0 -1px 0 rgba(var(--accent-rgb), .25);
}
:where(html:not(.design-old)) .ticker-item { border-right-color: var(--v2-line); }
:where(html:not(.design-old)) .ticker-item .tk-label {
    font-family: var(--v2-font-display); font-size: 10.5px; font-weight: 600;
    letter-spacing: var(--v2-track-caps); color: var(--text-4);
}
:where(html:not(.design-old)) .ticker-item .tk-val { font-size: 16px; font-weight: 650; }

/* ======================================================================
   6. TABS AND SEGMENTED CONTROLS
   ====================================================================== */
/* Level 1 — Plan / Drivers / Race: big words, a 3px accent bar under the one you're on. */
:where(html:not(.design-old)) nav.tabs { border-bottom: 1px solid var(--v2-line); gap: var(--s2); }
:where(html:not(.design-old)) nav.tabs .tab {
    font-family: var(--v2-font-display); font-size: 18px; font-weight: 600; font-stretch: 94%;
    padding: 10px var(--s3) 9px; color: var(--text-3); border-radius: 0;
    transition: color var(--v2-fast) var(--v2-ease), box-shadow var(--v2-fast) var(--v2-ease);
}
:where(html:not(.design-old)) nav.tabs .tab:hover { color: var(--text); }
:where(html:not(.design-old)) nav.tabs .tab.active { color: var(--text-hi, var(--text)); background: none; box-shadow: inset 0 -3px 0 var(--accent); }

/* Level 2 — segmented control: an inset track, the selected item raised. */
:where(html:not(.design-old)) .v2-seg,
:where(html:not(.design-old)) .plan-jump,
:where(html:not(.design-old)) .subtabs {
    background: var(--v2-inset);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-r-md);
    padding: 3px;
    gap: 2px;
}
:where(html:not(.design-old)) .plan-jump { box-shadow: 0 -8px 0 var(--v2-page); }
:where(html:not(.design-old)) .v2-seg > *,
:where(html:not(.design-old)) .plan-jump a,
:where(html:not(.design-old)) .subtab {
    font-family: var(--v2-font-display); font-size: 14px; font-weight: 600; font-stretch: 94%;
    color: var(--text-3); border-radius: var(--v2-r-sm); padding: 7px 14px;
    transition: background-color var(--v2-fast) var(--v2-ease), color var(--v2-fast) var(--v2-ease);
}
:where(html:not(.design-old)) .v2-seg > *:hover,
:where(html:not(.design-old)) .plan-jump a:hover,
:where(html:not(.design-old)) .subtab:hover { color: var(--text); background: var(--v2-hover); }
:where(html:not(.design-old)) .v2-seg > .is-on,
:where(html:not(.design-old)) .v2-seg > [aria-pressed="true"],
:where(html:not(.design-old)) .plan-jump a.is-on,
:where(html:not(.design-old)) .subtab.active {
    color: var(--text-hi, var(--text));
    background: var(--v2-overlay);
    box-shadow: inset 0 -2px 0 var(--accent), var(--v2-shadow-1);
}

/* ======================================================================
   7. BUTTONS — primary / secondary (default) / ghost / danger
   ====================================================================== */
:where(html:not(.design-old)) button,
:where(html:not(.design-old)) .v2-btn {
    font-family: var(--v2-font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .01em;
    min-height: var(--v2-h-md);
    border-radius: var(--v2-r-md);
    background: var(--v2-raise);
    border: 1px solid var(--v2-line-2);
    color: var(--text);
    box-shadow: var(--v2-shadow-1);
    transition: background-color var(--v2-fast) var(--v2-ease), border-color var(--v2-fast) var(--v2-ease),
        color var(--v2-fast) var(--v2-ease), transform var(--v2-fast) var(--v2-ease);
}
:where(html:not(.design-old)) button:hover,
:where(html:not(.design-old)) .v2-btn:hover { background: var(--v2-overlay); border-color: var(--line-3); color: var(--text-hi, var(--text)); }
:where(html:not(.design-old)) button:focus-visible,
:where(html:not(.design-old)) .v2-btn:focus-visible { box-shadow: var(--v2-focus); border-color: var(--accent); }

:where(html:not(.design-old)) .btn-primary,
:where(html:not(.design-old)) a.btn-primary {
    background: var(--accent); border-color: var(--accent); color: var(--ink);
    font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(0, 0, 0, .35);
}
:where(html:not(.design-old)) .btn-primary:hover,
:where(html:not(.design-old)) a.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--ink); }

:where(html:not(.design-old)) .btn-ghost,
:where(html:not(.design-old)) a.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); box-shadow: none; }
:where(html:not(.design-old)) .btn-ghost:hover,
:where(html:not(.design-old)) a.btn-ghost:hover { background: var(--v2-hover); border-color: transparent; color: var(--text-hi, var(--text)); }

:where(html:not(.design-old)) .btn-danger,
:where(html:not(.design-old)) a.btn-danger { background: transparent; color: var(--crit); border-color: color-mix(in srgb, var(--crit) 45%, transparent); box-shadow: none; }
:where(html:not(.design-old)) .btn-danger:hover,
:where(html:not(.design-old)) a.btn-danger:hover { background: var(--crit-dim); border-color: var(--crit); color: var(--crit); }

:where(html:not(.design-old)) a.btn-primary,
:where(html:not(.design-old)) a.btn-ghost,
:where(html:not(.design-old)) a.btn-danger,
:where(html:not(.design-old)) a.v2-btn { min-height: var(--v2-h-md); border-radius: var(--v2-r-md); font-family: var(--v2-font-display); font-weight: 600; }
:where(html:not(.design-old)) .v2-btn-sm { min-height: var(--v2-h-sm); font-size: var(--v2-fs-sm); padding: 0 10px; }
:where(html:not(.design-old)) .v2-btn-lg { min-height: var(--v2-h-lg); font-size: 16px; padding: 0 20px; }

/* Existing variants mapped onto the system */
:where(html:not(.design-old)) .room-copy-btn { background: var(--v2-wash); border: 1px solid rgba(var(--accent-rgb), .5); color: var(--accent); border-radius: var(--v2-r-sm); min-height: var(--v2-h-sm); box-shadow: none; }
:where(html:not(.design-old)) .btn-download {
    min-height: var(--v2-h-sm); border-radius: var(--v2-r-md); background: var(--v2-raise);
    border: 1px solid var(--v2-line-2); color: var(--text); font-family: var(--v2-font-display); font-size: 13px; font-weight: 600;
}
:where(html:not(.design-old)) .btn-download:hover { background: var(--v2-overlay); border-color: var(--line-3); }
:where(html:not(.design-old)) .section-act {
    min-height: var(--v2-h-sm); border-radius: var(--v2-r-sm); font-family: var(--v2-font-display);
    font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); box-shadow: none;
}
:where(html:not(.design-old)) .section-act-primary { color: var(--accent); border-color: rgba(var(--accent-rgb), .55); background: var(--v2-wash); }

@media (pointer: coarse) {
    :where(html:not(.design-old)) button,
    :where(html:not(.design-old)) .v2-btn,
    :where(html:not(.design-old)) a.btn-primary,
    :where(html:not(.design-old)) a.btn-ghost,
    :where(html:not(.design-old)) a.btn-danger,
    :where(html:not(.design-old)) .top-btn { min-height: 44px; }
}

/* ======================================================================
   8. INPUTS AND SELECTS — inset wells
   ====================================================================== */
:where(html:not(.design-old)) input[type="text"],
:where(html:not(.design-old)) input[type="number"],
:where(html:not(.design-old)) input[type="url"],
:where(html:not(.design-old)) input[type="email"],
:where(html:not(.design-old)) input[type="search"],
:where(html:not(.design-old)) input[type="password"],
:where(html:not(.design-old)) input[type="datetime-local"],
:where(html:not(.design-old)) input[type="time"],
:where(html:not(.design-old)) input[type="date"],
:where(html:not(.design-old)) select,
:where(html:not(.design-old)) textarea {
    background: var(--v2-inset);
    border: 1px solid var(--v2-line-2);
    border-radius: var(--v2-r-md);
    color: var(--text-hi, var(--text));
    font-family: var(--v2-font-display);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    min-height: 40px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
    transition: border-color var(--v2-fast) var(--v2-ease), box-shadow var(--v2-fast) var(--v2-ease);
}
:where(html:not(.design-old)) input:hover:not(:disabled):not(:focus),
:where(html:not(.design-old)) select:hover:not(:disabled):not(:focus),
:where(html:not(.design-old)) textarea:hover:not(:disabled):not(:focus) { border-color: var(--line-3); }
:where(html:not(.design-old)) input:focus,
:where(html:not(.design-old)) select:focus,
:where(html:not(.design-old)) textarea:focus { border-color: var(--accent); box-shadow: var(--v2-focus); outline: none; }
:where(html:not(.design-old)) input::placeholder,
:where(html:not(.design-old)) select::placeholder,
:where(html:not(.design-old)) textarea::placeholder { color: var(--text-4); }
:where(html[data-theme="daylight"]:not(.design-old)) :is(input, select, textarea) { box-shadow: inset 0 1px 1px rgba(16, 32, 26, .06); }
:where(html:not(.design-old)) input[type="datetime-local"],
:where(html:not(.design-old)) input[type="time"],
:where(html:not(.design-old)) input[type="date"] { color-scheme: inherit; }
@media (pointer: coarse) {
    :where(html:not(.design-old)) input[type="text"],
    :where(html:not(.design-old)) input[type="number"],
    :where(html:not(.design-old)) input[type="datetime-local"],
    :where(html:not(.design-old)) select { min-height: 44px; }
}

/* ======================================================================
   9. TABLES — row lines only, caps headers, zebra + hover, numbers right
   ====================================================================== */
:where(html:not(.design-old)) .table-wrap {
    background: var(--v2-panel);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-r-md);
    box-shadow: var(--v2-shadow-1);
}
:where(html:not(.design-old)) table { background: transparent; }
:where(html:not(.design-old)) th,
:where(html:not(.design-old)) td {
    border: 0;
    border-bottom: 1px solid var(--v2-line);
    padding: 9px 12px;
}
:where(html:not(.design-old)) td { font-size: 13.5px; }
:where(html:not(.design-old)) th {
    background: var(--v2-raise);
    border-bottom-color: var(--v2-line-2);
    padding-top: 10px; padding-bottom: 10px;
    white-space: nowrap;
}
:where(html:not(.design-old)) tbody tr:last-child > td { border-bottom: 0; }
:where(html:not(.design-old) tbody tr:nth-child(even)) { background-color: var(--v2-zebra); }
:where(html:not(.design-old) tbody tr:hover) { background-color: var(--v2-hover); }
:where(html:not(.design-old)) td.num,
:where(html:not(.design-old)) th.num,
:where(html:not(.design-old)) .v2-numcol { text-align: right; font-variant-numeric: tabular-nums; }

/* ======================================================================
   10. PILLS / BADGES
   ====================================================================== */
:where(html:not(.design-old)) .v2-pill {
    display: inline-flex; align-items: center; gap: 5px;
    height: 22px; padding: 0 9px; border-radius: var(--v2-r-pill);
    font: 600 11px/1 var(--v2-font-display); letter-spacing: .06em; text-transform: uppercase;
    background: var(--v2-hover); color: var(--text-2); border: 1px solid var(--v2-line);
    white-space: nowrap;
}
:where(html:not(.design-old)) .v2-pill.is-accent { background: var(--v2-wash); color: var(--accent); border-color: rgba(var(--accent-rgb), .4); }
:where(html:not(.design-old)) .v2-pill.is-good { background: color-mix(in srgb, var(--dx-good) 14%, transparent); color: var(--dx-good); border-color: color-mix(in srgb, var(--dx-good) 40%, transparent); }
:where(html:not(.design-old)) .v2-pill.is-warn { background: var(--warn-dim); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
:where(html:not(.design-old)) .v2-pill.is-crit { background: var(--crit-dim); color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, transparent); }
:where(html:not(.design-old)) .v2-pill.is-info { background: var(--info-dim); color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
/* A status dot that can sit in a pill or alone. */
:where(html:not(.design-old)) .v2-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ======================================================================
   11. RACE STEPS — a sector bar: one strip, a colored bar per step
   ====================================================================== */
:where(html:not(.design-old)) .rs-row { gap: 2px; }
:where(html:not(.design-old)) .rs-step {
    border: 0; border-radius: 0;
    background: var(--v2-panel);
    box-shadow: inset 0 3px 0 var(--v2-line-2);
}
:where(html:not(.design-old)) .rs-step:first-child { border-radius: var(--v2-r-md) 0 0 var(--v2-r-md); }
:where(html:not(.design-old)) .rs-step:last-child { border-radius: 0 var(--v2-r-md) var(--v2-r-md) 0; }
:where(html:not(.design-old)) .rs-step.is-done { box-shadow: inset 0 3px 0 var(--accent); }
:where(html:not(.design-old)) .rs-step.is-need { box-shadow: inset 0 3px 0 var(--warn); }
:where(html:not(.design-old)) .rs-step.is-next { box-shadow: inset 0 3px 0 var(--accent); background: var(--v2-raise); }
:where(html:not(.design-old)) .rs-step.is-live { box-shadow: inset 0 3px 0 var(--accent); }
:where(html:not(.design-old)) .rs-go { padding: 10px var(--s3) 8px; min-height: 0; background: none; border: 0; box-shadow: none; }
:where(html:not(.design-old)) .rs-go:hover { background: var(--v2-hover); }
:where(html:not(.design-old)) .rs-label { font-family: var(--v2-font-display); font-size: 15px; font-weight: 650; }
:where(html:not(.design-old)) .rs-why { font-variant-numeric: tabular-nums; }
:where(html:not(.design-old)) .rs-mark { border-radius: var(--v2-r-sm); }

/* ======================================================================
   12. TOASTS, DIALOGS, FOOTER
   ====================================================================== */
:where(html:not(.design-old)) #toast {
    background: var(--v2-overlay);
    border-width: 1px 1px 1px 4px;
    border-radius: var(--v2-r-md);
    box-shadow: var(--v2-shadow-pop);
    font-family: var(--v2-font-display);
    font-size: 15px;
    padding: 12px 18px;
    animation: v2-rise var(--v2-med) var(--v2-ease);
}
:where(html:not(.design-old)) dialog,
:where(html:not(.design-old)) .vid-dlg {
    background: var(--v2-raise); color: var(--text);
    border: 0; border-radius: var(--v2-r-lg); box-shadow: var(--v2-shadow-pop);
}
:where(html:not(.design-old)) dialog[open] { animation: v2-pop var(--v2-med) var(--v2-ease); }
:where(html:not(.design-old)) dialog::backdrop,
:where(html:not(.design-old)) .vid-dlg::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
/* askConfirm (toast.js) injects its own <style> later, so these need weight. */
html:not(.design-old) .cfm-back { backdrop-filter: blur(3px); }
html:not(.design-old) .cfm {
    background: var(--v2-raise); border: 0; border-top: 3px solid var(--cfm-tone, var(--warn));
    border-radius: var(--v2-r-lg); box-shadow: var(--v2-shadow-pop);
    animation: v2-pop var(--v2-med) var(--v2-ease);
}
html:not(.design-old) .cfm h2 { font-size: var(--v2-fs-lg); }
html:not(.design-old) .cfm-acts button { border-radius: var(--v2-r-md); font-family: var(--v2-font-display); }

/* Sticky footer: on a short page it sits on the window's bottom edge, on a
   long one it follows the content. Only pages with a footer (not dash.html). */
:where(html:not(.design-old)) body:has(> #siteFooter) { min-height: calc(100dvh / var(--z, 1)); display: flex; flex-direction: column; }
:where(html:not(.design-old)) body:has(> #siteFooter) > #app { flex: 1 0 auto; width: 100%; }
:where(html:not(.design-old)) body > #siteFooter { margin-top: auto; }
:where(html:not(.design-old)) #siteFooter {
    background: var(--v2-inset);
    border-top: 1px solid var(--v2-line);
    color: var(--text-4);
    padding-top: var(--s4);
}
:where(html:not(.design-old)) #siteFooter .footer-links :is(a, button) {
    font-family: var(--v2-font-display); font-size: 12.5px; letter-spacing: .02em; box-shadow: none;
}

/* ======================================================================
   13. MOTION — subtle, and off for reduced motion
   ====================================================================== */
:where(html:not(.design-old)) .content.active,
:where(html:not(.design-old)) .plan-sec:not([hidden]),
:where(html:not(.design-old)) .subcontent.active {
    animation: v2-in var(--v2-med) var(--v2-ease);
}
:where(html:not(.design-old)) button:active:not(:disabled),
:where(html:not(.design-old)) .v2-btn:active:not(:disabled),
:where(html:not(.design-old)) .btn-download:active:not(:disabled) { transform: translateY(1px); }
@keyframes v2-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes v2-rise { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes v2-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
    :where(html:not(.design-old)) * { animation: none !important; transition: none !important; }
}

/* responsive: shell */
/* topbar.js adds .tb-tight when the bar is crowded above the phone width: same squeeze as the phone. */
html:not(.design-old) .top-bar.tb-tight .room-name { max-width: 9ch; padding: 0 4px; }
:where(html:not(.design-old)) .top-bar.tb-tight .room-name-pencil { display: none; }
/* Footer links: the Discord/coffee links keep app.css's size and weight; match the rest. */
html:not(.design-old) #siteFooter .footer-links :is(.discord-link, .bmc-link, .btn-ghost) { font-family: var(--v2-font-display); font-size: 12.5px; font-weight: inherit; letter-spacing: .02em; }
/* The footer rule above clears box-shadow, which is the focus ring. */
html:not(.design-old) #siteFooter .footer-links :is(a, button):focus-visible { box-shadow: var(--v2-focus); }

/* ======================================================================
   14. EXPLANATION — the one shared fold: <details class="explain"><summary>Explanation</summary>…</details>
   Closed by default; theme.js remembers it per data-explain-key on planner pages.
   ====================================================================== */
details.explain { margin: 10px 0 0; border: 1px solid var(--v2-line, var(--surface-3, #2a2f2a)); border-radius: var(--v2-r-md, 6px); background: transparent; min-width: 0; }
details.explain > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; margin: 0; border: 0; background: transparent;
    font: 600 var(--v2-fs-xs, 12px)/1.3 var(--v2-font-display, inherit); letter-spacing: var(--v2-track-caps, .06em); text-transform: uppercase; color: var(--text-2, #9aa39a); }
details.explain > summary::-webkit-details-marker { display: none; }
details.explain > summary::before { content: '\25b8'; color: var(--text-4, #667); transition: transform .12s ease; }
details.explain[open] > summary::before { transform: rotate(90deg); }
details.explain > summary:hover { color: var(--text-hi, var(--text, #fff)); background: var(--v2-hover, rgba(255,255,255,.04)); }
details.explain > summary:focus-visible { outline: none; box-shadow: var(--v2-focus, 0 0 0 2px var(--accent)); }
details.explain > :not(summary) { margin-left: 14px; margin-right: 14px; color: var(--text-2, #9aa39a); font-size: var(--v2-fs-sm, 13px); line-height: 1.5; overflow-wrap: anywhere; }
details.explain > :not(summary):not(.explain-body):last-child { margin-bottom: 12px; }
details.explain > .explain-body { margin: 0; padding: 4px 14px 12px; }
details.explain ul { margin: 4px 0; padding-left: 18px; }
@media (pointer: coarse) { details.explain > summary { min-height: 44px; } }
/* Headline pattern: the action first, one fact under it. */
.do-now { font: 700 28px/1.15 var(--v2-font-display, inherit); color: var(--text-hi, var(--text, #fff)); margin: 0 0 4px; letter-spacing: .01em; }
.do-now.is-urgent { color: var(--crit, #ff5a4f); }
.do-why { color: var(--text-2, #9aa39a); font-size: 14px; margin: 0 0 6px; }
/* "…" menu: the UTC/Local switch as a labeled row. */
:where(html:not(.design-old)) .tb-menu .tb-zone { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 10px; color: var(--text-2); font: 600 14px var(--v2-font-display); }
/* Lobby: the pitch is for newcomers; signed in, it is just the logo and your rooms (account.js sets the class). */
#lobby.is-signed-in :is(.lobby-badge, .lobby-headline, .lobby-lede, .lobby-points) { display: none; }
#lobby.is-signed-in .lobby-wrap { grid-template-columns: minmax(0, 440px); justify-content: center; gap: var(--s4); }
#lobby.is-signed-in .lobby-logo { margin: 0 auto; }
/* The card fills the 440px column, so it shares the logo's center (its 360px cap left it 40px to the left). */
#lobby.is-signed-in .lobby-card { max-width: none; }
#lobby.is-signed-in :is(.lobby-card-title, .lobby-aside) { display: none; }
#lobby:not(.is-signed-in) .lobby-quick { display: none; }
/* The demo race: a button for newcomers; signed in it is a Live demo link in .lobby-quick. */
.lobby-demo { display: flex; align-items: center; justify-content: center; margin-top: var(--s2); text-decoration: none; box-sizing: border-box; }
.lobby-demo-note { margin: var(--s2) 0 0; font-size: 13px; color: var(--text-3); text-align: center; }
.lobby-racefor { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--s2); font-size: 13px; color: var(--text-3); }
.lobby-racefor[hidden] { display: none; }
.lobby-racefor select { flex: 1; min-width: 0; }
#lobby.is-signed-in :is(.lobby-demo, .lobby-demo-note) { display: none; }
/* The public demo room's banner, on the planner and the Race view (js/demo-banner.js). */
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 16px; border-bottom: 1px solid var(--accent);
    background: var(--accent-deep, var(--bg-2)); color: var(--text-hi, var(--text)); font-size: 14px; }
.demo-banner[hidden] { display: none; }
.demo-banner a { color: var(--accent); font-weight: 600; }
.demo-banner .demo-ro-note { color: var(--text-2, inherit); }
/* Read only (demo-banner.js): the planner's fields cannot be changed in the demo room. */
.demo-ro .content :is(input, select, textarea) { pointer-events: none; opacity: .7; }
.demo-banner button { margin: 0 0 0 auto; min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px;
    background: var(--accent); color: var(--ink); font-weight: 700; cursor: pointer; }
.lobby-greet { margin: 0 0 var(--s3); font: 650 22px/1.2 var(--v2-font-display, inherit); color: var(--text-hi, var(--text)); }
#lobby:not(.is-signed-in) .lobby-greet { font-size: 16px; color: var(--text-2); }
.lobby-rejoin { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 var(--s3); min-height: 44px; padding: 0 14px;
    background: var(--accent-deep, transparent); border: 1px solid var(--accent); border-radius: var(--v2-r-md, 8px);
    color: var(--accent); font: 700 15px var(--v2-font-display, inherit); text-align: left; cursor: pointer; }
.lobby-rejoin[hidden] { display: none; }
.lobby-rejoin::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.lobby-quick { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0 0; }
.lobby-quick a { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px;
    border: 1px solid var(--line-2); border-radius: var(--v2-r-md, 8px); color: var(--text-2); font-size: 14px; text-decoration: none; }
.lobby-quick a:hover, .lobby-quick a:focus-visible { border-color: var(--accent); color: var(--text-hi, var(--text)); }
.lobby-rooms .lr-live { margin-left: auto; color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.lobby-companion { display: flex; align-items: center; gap: 8px; margin: var(--s3) 0 0; color: var(--text-3); font-size: 13px; }
.lobby-companion[hidden] { display: none; }
.lobby-companion .lc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
#lobby .lobby-btn-secondary { margin: 0; }   /* the global button margin-right left Join short of the card edge */
.lobby-colors { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.lobby-colors > span { color: var(--text-3); font-size: 12px; }
.lobby-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.lobby-swatches .sw { width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    box-shadow: 0 0 0 1px rgba(128, 128, 128, .45) inset; }
.lobby-swatches .sw[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg, #000), 0 0 0 4px var(--accent); }
.lobby-swatches .sw:focus-visible { outline: 2px solid var(--text-hi, #fff); outline-offset: 3px; }
@media (pointer: coarse) { .lobby-swatches { gap: 10px; } .lobby-swatches .sw { width: 30px; height: 30px; } }

/* Companion download (lobby button, planner bar button and menu item): not useful inside the Windows app or on a phone. */
.lobby-dl { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: var(--s2); text-decoration: none; box-sizing: border-box; }
.lobby-dl-hint { margin-top: 6px; }
html:not(.design-old) .top-bar .tb-dl { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: var(--v2-r-md); color: var(--text-2);
    font: 600 14px var(--v2-font-display); text-decoration: none; white-space: nowrap; }
html:not(.design-old) .top-bar .tb-dl:hover, html:not(.design-old) .top-bar .tb-dl:focus-visible { background: var(--v2-hover); color: var(--text-hi, var(--text)); }
html:not(.design-old) .top-bar.tb-phone .tb-dl,
html:not(.design-old) .top-bar.tb-fold .tb-dl { display: none; }   /* folded: the "..." menu item takes over */
@media (max-width: 1280px) { .tb-dl-label { display: none; } }
html.no-dl [data-companion-dl] { display: none !important; }
@media (max-width: 559px), (pointer: coarse) and (max-width: 900px) { [data-companion-dl] { display: none !important; } }

/* Lobby: the header row every page has (logo and page links), pinned to the top of the landing. */
#lobby { padding-top: 64px; box-sizing: border-box; }
#lobby .lobby-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 18px; padding: 10px 28px; border-bottom: 1px solid var(--border, rgba(255,255,255,.08)); }
#lobby .lobby-top .brand-logo-img { height: 28px; width: auto; display: block; }
@media (max-width: 640px) { #lobby { padding-top: 0; flex-direction: column; justify-content: flex-start !important; } #lobby .lobby-top { position: static; flex: none; padding: 8px 16px; gap: 6px 10px; flex-wrap: wrap; } #lobby .lobby-top .site-nav { max-width: 100%; flex-wrap: wrap; } }
/* The demo tour (demo-banner.js): five steps under the banner, from the pit call to Start your own room. */
.demo-tour { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 12px 16px; background: var(--bg-2);
    border-bottom: 1px solid var(--line-2); }
.demo-tour[hidden] { display: none; }
.dt-dots { display: flex; gap: 6px; flex: none; }
.dt-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.dt-dots .past { background: var(--accent-deep, var(--text-3)); outline: 1px solid var(--accent); }
.dt-dots .on { width: 22px; border-radius: 4px; background: var(--accent); }
.dt-body { flex: 1 1 320px; min-width: 0; }
.dt-step { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.demo-tour .dt-title { margin: 2px 0 2px; padding: 0; border: 0; font: 700 17px/1.25 var(--v2-font-display, inherit); color: var(--text-hi, var(--text)); }
.dt-text { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2, var(--text)); max-width: 70ch; }
.dt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dt-actions button { min-height: 38px; padding: 0 16px; border-radius: 8px; font-weight: 700; cursor: pointer;
    border: 1px solid var(--line-2); background: transparent; color: var(--text-hi, var(--text)); }
.dt-actions :is(.dt-next, .dt-go) { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.dt-actions .dt-close { min-width: 38px; padding: 0; font-size: 20px; line-height: 1; }
.dt-alt { font-size: 13px; color: var(--accent); }
.demo-banner .demo-tour-open { background: transparent; color: var(--accent); border: 1px solid var(--accent); margin-left: auto; }
.demo-banner .demo-tour-open + button { margin-left: 0; }
.demo-tour-open[hidden] { display: none; }
.tab.dt-spot { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 6px; animation: dtPulse 1s ease-in-out 3 alternate; }
@keyframes dtPulse { to { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .tab.dt-spot { animation: none; } }
/* Phones: the tour is a sheet at the bottom and the banner one short line, so the race itself fills the first screen. */
@media (max-width: 600px) {
    .demo-tour { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 950; gap: 8px; padding: 12px 14px;
        border: 1px solid var(--accent); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
    .dt-dots { order: 0; }
    .dt-body { flex-basis: 100%; }
    .dt-text { font-size: 13.5px; }
    .dt-actions { width: 100%; }
    .dt-actions :is(.dt-next, .dt-go) { flex: 1; }
    .dt-alt { flex-basis: 100%; text-align: center; }
    .demo-banner { padding: 6px 12px; gap: 6px 10px; font-size: 13px; }
    .demo-banner .demo-ro-note, .demo-banner [data-demo-race] { display: none; }
    .demo-banner button { min-height: 32px; padding: 0 10px; }
    html:has(.demo-tour:not([hidden])) body { padding-bottom: 210px; }
}
/* The signed-in lobby with no rooms yet (account.js paintLobby): three first steps. */
.lobby-first { list-style: none; counter-reset: lf; display: grid; gap: 8px; margin: 8px 0 10px; padding: 0; text-align: left; }
.lobby-first li { counter-increment: lf; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-rows: auto auto;
    align-items: center; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); }
.lobby-first li::before { content: counter(lf); grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px;
    border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-weight: 800; }
.lobby-first b { color: var(--text-hi, var(--text)); font-size: 15px; }
.lobby-first span { grid-column: 2; font-size: 13px; line-height: 1.4; color: var(--text-3); }
.lobby-first :is(a, button) { grid-column: 3; grid-row: 1 / 3; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
    border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text-hi, var(--text));
    font: 700 13.5px var(--v2-font-display, inherit); text-decoration: none; cursor: pointer; white-space: nowrap; min-width: 112px; justify-content: center; box-sizing: border-box; }
.lobby-first li:first-child :is(a, button) { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.lobby-first :is(a, button):hover { border-color: var(--accent); }
@media (max-width: 420px) { .lobby-first li { grid-template-columns: 30px minmax(0, 1fr); }
    .lobby-first :is(a, button) { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 6px; } }
#lobby.is-first-run .lobby-dl { display: none; }
/* The signed-out lobby (index.html): what setup asks, as a numbered track; the demo is the second choice, not a twin of Create. */
.lobby-next { list-style: none; counter-reset: ln; position: relative; display: grid; gap: 14px; margin: var(--s4) 0 0; padding: 0; }
.lobby-next::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: var(--line-2); }
.lobby-next li { counter-increment: ln; position: relative; display: grid; gap: 2px; padding-left: 42px; }
.lobby-next li::before { content: counter(ln); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px;
    border-radius: 50%; background: var(--bg-2); border: 2px solid var(--accent); color: var(--accent); font-weight: 800; font-size: 13px; box-sizing: border-box; }
.lobby-next li:last-child::before { background: var(--accent); color: var(--ink); }
.lobby-next b { color: var(--text-hi, var(--text)); font-size: 15px; }
.lobby-next span { color: var(--text-3); font-size: 13.5px; line-height: 1.45; }
#lobby.is-signed-in .lobby-next { display: none; }
#lobby:not(.is-signed-in) .lobby-demo { background: transparent; color: var(--text-hi, var(--text)); border: 1px solid var(--line-2); }
#lobby:not(.is-signed-in) .lobby-demo:hover { border-color: var(--accent); }
@media (max-width: 900px) {
    #lobby:not(.is-signed-in) .lobby-card { order: -1; }
    #lobby:not(.is-signed-in) :is(.lobby-logo, .lobby-badge) { display: none; }
    .lobby-headline { font-size: 22px; }
}
/* The guide's Start here paths (guide.html .gd-paths): three common goals, three links each, one action. */
.gd-paths { margin: 18px 0 26px; }
.gd-paths > ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0 0; padding: 0; }
.gd-paths > ul > li { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.gd-paths .gd-path-t { margin: 0; padding: 0; border: 0; font-size: 1.05rem; color: var(--text-hi, var(--text)); }
.gd-paths p { margin: 0; color: var(--text-3); font-size: .9rem; }
.gd-paths ol { margin: 4px 0 8px; padding-left: 18px; display: grid; gap: 4px; flex: 1; align-content: start; font-size: .92rem; line-height: 1.35; }
.gd-paths ol a { color: var(--accent); }
.gd-path-go { align-self: flex-start; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 8px;
    border: 1px solid var(--accent); color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.gd-path-go:hover { background: var(--accent); color: var(--ink); }
@media (max-width: 860px) { .gd-paths > ul { grid-template-columns: minmax(0, 1fr); } }
/* What's new search (js/changelog-find.js). */
.cl-find { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; max-width: 760px; margin: 14px 0 20px; padding: 10px 12px;
    border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); }
.cl-find label { font-weight: 700; color: var(--text-hi, var(--text)); }
.cl-find input { flex: 1 1 240px; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text-hi, var(--text)); font-size: 15px; }
.cl-find input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cl-find-n { color: var(--accent); font-weight: 700; font-size: 14px; }
details.cl[hidden] { display: none; }
details.cl.cl-only-hits li:not(.cl-hit):not(:has(.cl-hit)) { display: none; }
details.cl li.cl-hit { background: var(--accent-deep, transparent); box-shadow: inset 3px 0 0 var(--accent); border-radius: 4px; padding-left: 6px; }
/* Signed-in lobby rooms as cards (account.js paintLobby). */
#lobby .lobby-rooms .lr-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; }
#lobby .lobby-rooms .lr-t { grid-column: 1; font-size: 15px; font-weight: 700; color: var(--text-hi, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lobby .lobby-rooms .lr-m { grid-column: 1; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lobby .lobby-rooms .lr-chip { grid-column: 2; grid-row: 1 / 3; margin: 0; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-3);
    font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
#lobby .lobby-rooms .lr-chip.lr-live { border-color: var(--accent); background: var(--accent); color: var(--ink); }
#lobby .lobby-rooms .lr-chip.lr-soon { border-color: var(--accent); color: var(--accent); }
#lobby .lobby-auth:has(.lobby-rooms) { margin-top: 14px; padding-top: 12px; }
/* Past races (account.js sectionsHtml, ROOM_ARCHIVE) */
#lobby .lobby-past > summary { cursor: pointer; }
#lobby .lobby-rooms .lr-past .lr-card { margin-bottom: 2px; }
#lobby .lobby-rooms .lr-acts { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 0 0 10px; padding: 0 12px; font-size: 12.5px; color: var(--text-3); }
#lobby .lobby-rooms .lr-acts a, #lobby .lobby-rooms .lr-acts button { color: var(--accent); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
#lobby .lobby-rooms .lr-acts button { margin-left: auto; }
