/* The "bebop" look: shared by every page when content.look (or LOOK) is 'bebop'. Loaded after tokens.css and app.css.
   Fonts, the red bar, header, buttons and footer, then the app's shared components restyled. Colours come only from the
   noir-bebop palette tokens: --accent red fill, --accent-ink red text, --highlight brass, --signal cyan, --border lines. */
@font-face { font-family: Anton; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/anton-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/jetbrains-mono-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 700; font-display: swap; src: url(/fonts/playfair-display-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

html.bb {
  --bb-display: Anton, Impact, "Arial Narrow Bold", "Helvetica Neue Condensed", sans-serif;
  --bb-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bb-italic: "Playfair Display", Georgia, serif;
  --bb-panel2: color-mix(in srgb, var(--surface), var(--text) 8%);
  --bb-sq-l: color-mix(in srgb, var(--text) 88%, var(--bg));
  --bb-sq-d: color-mix(in srgb, var(--surface) 82%, var(--text));
  --bb-grid: color-mix(in srgb, var(--border) 45%, transparent);
  --bb-scan: linear-gradient(transparent 50%, color-mix(in srgb, var(--bg) 40%, transparent) 50%);
  --bb-gridbg: linear-gradient(to right, var(--bb-grid) 1px, transparent 1px), linear-gradient(to bottom, var(--bb-grid) 1px, transparent 1px);
  /* One spacing scale for app pages. */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2.5rem; --s7: 4rem;
  --bb-line: color-mix(in srgb, var(--text) 30%, transparent);
}
@media (prefers-reduced-motion: no-preference) { html.bb { scroll-behavior: smooth; } }
html.bb body {
  background-color: var(--bg); color: var(--text);
  background-image: var(--bb-gridbg);
  background-size: 40px 40px;
}
/* App pages are plain: the grid only sits behind the page-head band (and the home page's own sections). */
html.bb body:has(> main.wrap) { background-image: none; overflow-x: clip; }
html.bb ::selection { background: var(--accent); color: var(--on-accent); }
html.bb main { display: block; }
.bb [id] { scroll-margin-top: 5rem; }
.bb .rd { color: var(--accent-ink); } .bb .hi { color: var(--highlight); } .bb .cy { color: var(--signal); } .bb .bone { color: var(--text); }
.bb-wrap { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 40rem) { .bb-wrap { padding-inline: 1.5rem; } }
@media (min-width: 64rem) { .bb-wrap { padding-inline: 2rem; } }
.bb-scan { background-image: var(--bb-scan); background-size: 100% 4px; }

/* Ticker and header */
.bb-ticker { height: 1.9rem; background-color: var(--accent); border-bottom: 2px solid var(--text); background-image: var(--bb-scan); background-size: 100% 4px; }
.bb-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 95%, transparent); backdrop-filter: blur(8px); border-bottom: 2px solid var(--border); }
.bb-header .bb-wrap { height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bb-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--text); }
.bb-logo { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; background: var(--accent); color: var(--on-accent); border: 2px solid var(--text); box-shadow: 4px 4px 0 var(--highlight); font: 400 1.5rem/1 var(--bb-display); transition: transform .15s; }
.bb-brand:hover .bb-logo { transform: translate(2px, 2px); }
.bb-wordmark { display: block; height: 3.75rem; width: auto; }
@media (max-width: 30rem) { .bb-wordmark { height: 2.75rem; } }
.bb-brand b { display: block; font: 400 1.5rem/1 var(--bb-display); letter-spacing: .05em; text-transform: uppercase; }
.bb-actions { display: flex; align-items: center; gap: .5rem; }
.bb-signin { white-space: nowrap; font: 400 .75rem/1 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text); text-decoration: none; padding: .75rem .5rem; border: 1px solid transparent; }
.bb-signin:hover { color: var(--highlight); border-color: var(--border); }

@media (max-width: 37.5rem) { .bb-actions .bb-btn.sm { display: none; } .bb-signin { padding-inline: .75rem; border-color: var(--border); } }

/* Buttons */
.bb-btn { display: inline-block; text-align: center; text-decoration: none; background: var(--accent); color: var(--on-accent); border: 2px solid var(--text);
  box-shadow: 5px 5px 0 var(--highlight); font: 700 .875rem/1.2 var(--bb-mono); letter-spacing: .1em; text-transform: uppercase; padding: 1rem 1.75rem; }
.bb-btn:hover { background: var(--text); color: var(--bg); }
.bb-btn.sm { white-space: nowrap; font-size: .75rem; padding: .65rem 1rem; box-shadow: 4px 4px 0 var(--text); }
.bb-btn.sm:hover { background: var(--highlight); color: var(--bg); }
.bb-btn:active { transform: translate(3px, 3px); box-shadow: none; }
.bb-btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: none; font-weight: 400; padding-inline: 1.5rem; }
.bb-btn.ghost:hover { border-color: var(--signal); color: var(--signal); background: var(--surface); }
.bb-btn.dark { background: var(--bg); color: var(--text); }
.bb-btn.dark:hover { background: var(--highlight); color: var(--bg); }
.bb-btn.ghostred { box-shadow: none; font-weight: 400; }
.bb-cta { display: flex; flex-direction: column; gap: 1rem; padding-top: .5rem; }
.bb-cta.center { justify-content: center; align-items: center; }
@media (min-width: 40rem) { .bb-cta { flex-direction: row; } }


/* Footer */
.bb-footer { background: var(--bg); color: var(--text-muted); border-top: 0; padding: 3.5rem 0 2.5rem; font: 400 .75rem/1.5 var(--bb-mono); }
.bb-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid var(--border); }
@media (min-width: 48rem) { .bb-fgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.bb-fbrand { grid-column: span 2; display: grid; gap: .75rem; align-content: start; } @media (min-width: 48rem) { .bb-fbrand { grid-column: auto; } }
.bb-fbrand p { margin: 0; font-size: .6875rem; line-height: 1.6; }
.bb-footer .bb-fname { font: 400 1.5rem/1 var(--bb-display); letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.bb-ftitle { margin: 0 0 .75rem; color: var(--text); font-weight: 700; text-transform: uppercase; }
.bb-fgrid > * { min-width: 0; }
.bb-footer nav { display: block; }
.bb-footer ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.bb-footer a { color: var(--text-muted); text-decoration: none; display: inline-block; padding-block: .15rem; } .bb-footer a:hover { color: var(--text); text-decoration: underline; }
.bb-soon-link { color: var(--text-muted); }
.bb-footnote { margin: 1.5rem 0 0; color: var(--highlight); font-size: .75rem; }
.bb-fbottom { padding-top: 1.25rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: space-between; font-size: .6875rem; text-align: center; }
@media (min-width: 40rem) { .bb-fbottom { flex-direction: row; text-align: left; } }


/* ---------- App pages (main.wrap): the shared components in the bebop look, toned down ----------
   Scoped to main.wrap so the home page's own sections (landing-bebop.css) are untouched.
   Rules: soft 1px borders and small radii, no hard shadows; Anton only for page titles and a few key numbers;
   sans for titles, text and buttons; mono for numbers, times, chips and table heads. Colour has one meaning each:
   red = act or live, brass = you and yours, cyan = a good result. */
html.bb { --bb-r: 6px; --bb-r-sm: 4px; }
html.bb body:has(> main.wrap) .bb-ticker { height: 4px; border-bottom: 0; background-image: none; }
html.bb body:has(> main.wrap) .bb-logo { box-shadow: none; }

.bb-header .bb-wrap:has(.bb-nav) { height: auto; min-height: 4rem; flex-wrap: wrap; padding-block: var(--s2); row-gap: var(--s2); }
.bb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font: 400 .75rem/1 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; }
.bb-nav a, .bb-nav button { border-radius: var(--bb-r-sm); padding: .6rem .6rem; color: var(--text-muted); font: inherit; letter-spacing: inherit; text-transform: inherit; }
.bb-nav a:hover { background: var(--surface); color: var(--text); }
.bb-nav .who { color: var(--highlight); font-weight: 700; }
.bb-nav form { display: inline; }
.bb-nav button { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.bb-nav button:hover { border-color: var(--control-border); background: transparent; filter: none; }
.bb-nav .signin { margin-left: var(--s2); background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); font-weight: 700; }
.bb-nav .signin:hover { background: var(--accent); color: var(--on-accent); filter: brightness(1.1); }
.bb-nav .badge { border-radius: 999px; font-family: var(--bb-mono); }
@media (max-width: 40rem) { .bb-nav { width: 100%; } }

/* One width for header and pages, so their edges line up. */
html.bb main.wrap { max-width: 80rem; padding: 0 1rem var(--s7); }
@media (min-width: 40rem) { html.bb main.wrap { padding-inline: 1.5rem; } }
@media (min-width: 64rem) { html.bb main.wrap { padding-inline: 2rem; } }
.bb main.wrap > p, .bb main.wrap > ul, .bb main.wrap > ol { max-width: 68ch; }

.bb main.wrap h1 { font: 400 clamp(1.9rem, 5vw, 2.5rem)/1 var(--bb-display); text-transform: uppercase; letter-spacing: .015em; margin: var(--s6) 0 var(--s5); overflow-wrap: anywhere; text-wrap: balance; }
.bb main.wrap h2 { font: 700 1.25rem/1.3 var(--sans); letter-spacing: -.005em; margin: var(--s6) 0 var(--s3); }
.bb main.wrap h3 { font: 600 1.0625rem/1.35 var(--sans); letter-spacing: 0; margin: var(--s5) 0 var(--s2); }
.bb main.wrap a { text-decoration-color: var(--bb-line); text-decoration-thickness: 1px; }
.bb main.wrap a:hover { color: var(--text); text-decoration-color: var(--text); }
.bb main.wrap h1 a, .bb main.wrap h2 a { text-decoration: none; }
.bb main.wrap h1 a:hover, .bb main.wrap h2 a:hover { color: var(--text-muted); }

/* Labels: small mono kickers, used sparingly. Muted, not coloured. */
.bb main.wrap .label { margin: 0 0 var(--s2); font: 700 .6875rem/1.3 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }

/* Buttons: red fill for the primary action, outlines for the rest. No offset shadows. */
.bb main.wrap button, .bb main.wrap .btn { border-radius: var(--bb-r-sm); border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  box-shadow: none; font: 600 .875rem/1.2 var(--sans); letter-spacing: 0; text-transform: none; padding: .6rem 1rem; }
.bb main.wrap button:hover, .bb main.wrap .btn:hover { background: var(--accent); color: var(--on-accent); filter: brightness(1.12); }
.bb main.wrap button.secondary, .bb main.wrap .btn.secondary { background: transparent; color: var(--text); border-color: var(--control-border); }
.bb main.wrap button.secondary:hover, .bb main.wrap .btn.secondary:hover { background: var(--surface); color: var(--text); border-color: var(--text-muted); filter: none; }
.bb main.wrap td button, .bb main.wrap td .btn { padding: var(--s1) var(--s3); }

.bb main.wrap input, .bb main.wrap select, .bb main.wrap textarea { border-radius: var(--bb-r-sm); border: 1px solid var(--control-border); background: var(--bg); color: var(--text); font: 400 1rem/1.4 var(--sans); padding: var(--s2) var(--s3); }
.bb main.wrap input:focus-visible, .bb main.wrap select:focus-visible, .bb main.wrap textarea:focus-visible { border-color: var(--text-muted); }
.bb main.wrap label { font-weight: 600; }
.bb main.wrap form.stack > label:not(.opt), .bb main.wrap fieldset > label:not(.opt) { font: 600 .875rem/1.4 var(--sans); color: var(--text-muted); }
.bb main.wrap fieldset { border-radius: var(--bb-r); border: 1px solid var(--border); background: var(--surface); padding: var(--s4); }
.bb main.wrap legend { font: 600 .875rem/1.4 var(--sans); color: var(--text); padding-inline: var(--s2); }

/* Tables: rounded container, hairlines, mono numbers, a quiet header row. */
.bb main.wrap table { border-radius: var(--bb-r); border: 1px solid var(--border); background: var(--surface); }
.bb main.wrap th, .bb main.wrap td { border-top-color: var(--border); padding: var(--s3) var(--s4); }
.bb main.wrap tr:first-child:not(:has(td)) > th { font: 700 .6875rem/1.3 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); background: transparent; border-top: 0; }
.bb main.wrap tr:not(:first-child):hover > * { background: color-mix(in srgb, var(--text) 3%, transparent); }
.bb main.wrap td { font-variant-numeric: tabular-nums; }
.bb main.wrap tr.subs-start td, .bb main.wrap tr.subs-start th { border-top-color: var(--control-border); }
.bb main.wrap code { border-radius: var(--bb-r-sm); font-family: var(--bb-mono); }

.bb main.wrap .card { border-radius: var(--bb-r); border: 1px solid var(--border); background: var(--surface); box-shadow: none; }
.bb main.wrap .card h2, .bb main.wrap .card h3 { margin: 0 0 var(--s2); }
.bb main.wrap .score { font: 400 clamp(1.4rem, 3.5vw, 1.8rem)/1.15 var(--bb-display); text-transform: uppercase; letter-spacing: .02em; }
.bb main.wrap .locked { border-radius: 0 var(--bb-r) var(--bb-r) 0; border-left-color: var(--highlight); }
.bb main.wrap .badge { border-radius: 999px; }
.bb main.wrap .invites li { border-radius: var(--bb-r); border: 1px solid var(--border); }
.bb main.wrap p.error, .bb main.wrap ul.error { border-left-width: 3px; }

/* Page head (pageHead / hubBanner in web.ts): title, a line of facts and actions, a hairline under it. */
.ph { margin: 0 0 var(--s5); padding: var(--s6) 0 var(--s4); border-bottom: 1px solid var(--border); }
.bb main.wrap .ph h1 { margin: 0; }
.bb main.wrap .ph .label { margin-bottom: var(--s2); }
.ph-meta { margin: var(--s2) 0 0; color: var(--text-muted); max-width: 68ch; }
.ph-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin: var(--s4) 0 0; }

/* Match page: the head is a scoreboard, home | score | away. */
.bb main.wrap h1.sb { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--s4); margin: 0; }
.sb > a:first-child { text-align: right; } .sb > a:last-child { text-align: left; }
.sb-mid { display: grid; place-items: center; min-width: 4.5rem; padding: var(--s2) var(--s4); font-size: .6em; color: var(--text-muted); }
.sb-mid.on { min-width: 0; padding: var(--s2) var(--s4); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--bb-r); color: var(--text); font-size: 1em; white-space: nowrap; }
.ph-match { text-align: center; }
.sb-state { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); }
@media (max-width: 40rem) { .bb main.wrap h1.sb { font-size: clamp(1.4rem, 7vw, 2rem); gap: var(--s2); } .sb-mid.on { padding: var(--s1) var(--s3); } }

/* Boards table: full width; your own name in brass; results as boxed mono. */
.bb main.wrap table.boards { display: table; width: 100%; }
.bb main.wrap table.boards tr:not(:first-child) > th { font: 400 1.4rem/1 var(--bb-display); width: 4rem; color: var(--text-muted); }
.bb main.wrap table.boards td { vertical-align: top; }
.bb main.wrap table.boards td:last-child { white-space: nowrap; }
.bb main.wrap table.boards .side { margin-left: var(--s1); font: 700 .6875rem/1.4 var(--bb-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.bb main.wrap table.boards .me > a:first-child { color: var(--highlight); font-weight: 700; }
.bb main.wrap .res { display: inline-block; min-width: 3.5rem; padding: .15rem var(--s2); border: 1px solid var(--control-border); border-radius: var(--bb-r-sm); font: 700 .875rem/1.3 var(--bb-mono); text-align: center; }
.bb main.wrap .muted.rating { font: 400 .8125rem/1.5 var(--bb-mono); }
@media (max-width: 40rem) {
  .bb main.wrap table.boards { display: block; }
  .bb main.wrap table.boards td::before { font-family: var(--bb-mono); color: var(--text-muted); }
  .bb main.wrap table.boards td:last-child { white-space: normal; }
}
.match-notes { display: grid; gap: var(--s2); margin-top: var(--s5); }
.bb main.wrap .match-notes p { margin: 0; max-width: 68ch; }

/* Chips: role and status. Small mono capitals; the text says what it is, colour only adds to it. */
.deck-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-block; padding: .15rem .45rem; border: 1px solid var(--control-border); border-radius: var(--bb-r-sm); font: 700 .625rem/1.4 var(--bb-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); vertical-align: middle; }
.chip.live { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip.open { border-color: var(--accent-ink); color: var(--accent-ink); }
.chip.hi { border-color: var(--highlight); color: var(--highlight); }
.chip.done { border-color: var(--signal); color: var(--signal); }

/* Signed-in nav: Home, Inbox, Admin, then a <details> menu with the rest (no JS; it closes on a second click). */
.bb-menu { position: relative; }
.bb-menu summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: var(--s2); padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--bb-r-sm); }
.bb-menu summary::-webkit-details-marker { display: none; }
.bb-menu summary::after { content: "▾"; color: var(--text-muted); }
.bb-menu[open] summary, .bb-menu summary:hover { border-color: var(--control-border); }
.bb-menu .who { color: var(--highlight); font-weight: 700; }
.bb-menu-rt { color: var(--text-muted); font-size: .6875rem; }
.bb-menu-list { position: absolute; right: 0; top: calc(100% + var(--s2)); z-index: 60; min-width: 14rem; display: grid; padding: var(--s2);
  background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--bb-r); box-shadow: 0 12px 32px -12px color-mix(in srgb, var(--bg) 80%, transparent); }
.bb-menu-list a { padding: .65rem .7rem; border-radius: var(--bb-r-sm); text-decoration: none; }
.bb-menu-list a:hover { background: var(--bg); }
.bb-menu-list form { display: block; margin-top: var(--s1); padding-top: var(--s2); border-top: 1px solid var(--border); }
.bb-nav .bb-menu-list button { width: 100%; text-align: left; }
@media (max-width: 40rem) { .bb-menu { margin-left: auto; } }

/* App footer (bebopAppFooter in web.ts): one quiet row, real links only. */
.bb-appfoot { margin-top: auto; border-top: 1px solid var(--border); background: transparent; color: var(--text-muted); font: 400 .75rem/1.5 var(--bb-mono); }
.bb-appfoot .bb-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2) var(--s5); padding-block: var(--s5); }
.bb-appfoot nav { display: flex; flex-wrap: wrap; gap: var(--s4); }
.bb-appfoot a { color: var(--text-muted); text-decoration: none; } .bb-appfoot a:hover { color: var(--text); }

/* ---------- Signed-in home: the deck (src/home.ts) ----------
   Blends the Stitch Command Deck layout with the matte noir-bebop system. Main column (next game, seasons, team)
   and side column (club, active match boards, upcoming) from 64rem; one column below, main first. */
/* Two shattered pieces, faint, fixed behind the deck on wide screens: the king high on the right, the rook low on the
   left to balance it. Narrower screens get the king at the bottom of the page instead. Decoration only. */
@media (min-width: 64rem) {
  html.bb body:has(.deck)::before, html.bb body:has(.deck)::after { content: ""; position: fixed; z-index: -1; opacity: .12; pointer-events: none;
    background-position: center; background-size: contain; background-repeat: no-repeat; }
  html.bb body:has(.deck)::before { right: -3vw; top: 16vh; width: min(44vw, 700px); aspect-ratio: 640 / 456; background-image: url(/shattered-king-light.webp); }
  html.bb body:has(.deck)::after { left: -4vw; bottom: 2vh; width: min(34vw, 540px); aspect-ratio: 640 / 498; background-image: url(/shattered-rook-light.webp); }
}
@media (max-width: 63.99rem) {
  .deck-side::after { content: ""; display: block; width: min(100%, 26rem); margin-inline: auto; aspect-ratio: 640 / 456; background: url(/shattered-king-light.webp) center / contain no-repeat; opacity: .14; pointer-events: none; }
}

/* Deck command header: eyebrow, Anton greeting, team facts, and right-side team-only telemetry strip. */
.dk-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s4) var(--s6); padding: var(--s5) 0 var(--s4); margin-bottom: var(--s5); }
.dk-head-id { display: grid; gap: var(--s2); min-width: 0; }
.dk-kicker { margin: 0; display: inline-flex; align-items: center; gap: .45rem; justify-self: start; padding: .2rem .55rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r-sm);
  font: 700 .625rem/1.3 var(--bb-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--highlight); }
.dk-dot { width: .4rem; height: .4rem; border-radius: 999px; background: var(--highlight); }
.bb main.wrap .dk-head h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.1rem); line-height: .96; }
.dk-sub { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font: 500 .8125rem/1.4 var(--bb-mono); color: var(--text-muted); }
.dk-stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(5.2rem, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--bb-r-sm); overflow: hidden; }
.dk-stats > div { display: flex; flex-direction: column-reverse; gap: .2rem; padding: .6rem .95rem;
  background: color-mix(in srgb, var(--surface) 94%, transparent); min-width: 0; }
.dk-stats dt { font: 700 .6rem/1.2 var(--bb-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.dk-stats dd { margin: 0; font: 400 1.45rem/1 var(--bb-display); letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
@media (max-width: 40rem) { .dk-stats { width: 100%; } .dk-stats > div { padding: .55rem .65rem; } }

html.bb main.wrap .deck { margin-top: 0; display: grid; gap: var(--s5); align-items: start; }
.deck-col { display: grid; gap: var(--s5); min-width: 0; }
@media (min-width: 64rem) {
  .deck { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .deck-inbox { grid-column: 1 / -1; }
}

.deck-panel { min-width: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--border); border-radius: var(--bb-r); padding: var(--s5); }
.deck-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.dk-title { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.dk-bar { flex: none; width: 4px; height: 1.15rem; border-radius: 1px; background: var(--control-border); }
.dk-bar.brass { background: var(--highlight); } .dk-bar.red { background: var(--accent); } .dk-bar.cyan { background: var(--signal); }
.dk-head-meta { flex: none; font: 700 .65rem/1.3 var(--bb-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--highlight); white-space: nowrap; }
.bb main.wrap .deck-all { flex: none; font: 700 .6875rem/1.3 var(--bb-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.bb main.wrap .deck-all:hover { color: var(--signal); }
.bb main.wrap .deck-panel h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
  font: 400 1.35rem/1.1 var(--bb-display); letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.bb main.wrap .deck-panel h2 a, .bb main.wrap .deck-panel h3 a { color: inherit; text-decoration: none; }
.bb main.wrap .deck-panel h2 a:hover, .bb main.wrap .deck-panel h3 a:hover { color: var(--highlight); }
.deck-panel p { margin: 0 0 var(--s2); } .deck-panel > :last-child { margin-bottom: 0; }
.deck-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s4) !important; }
.deck-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); align-items: center;
  margin-top: var(--s4) !important; padding-top: var(--s3); border-top: 1px solid var(--border);
  font: 500 .75rem/1.4 var(--bb-mono); }
.deck-foot a { white-space: nowrap; color: var(--accent-ink); text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.deck-foot a:hover { color: var(--text); }

/* Inbox strip across the top, only when something waits. */
.deck-inbox { display: grid; gap: var(--s3) var(--s4); padding: var(--s4); border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--bg) 72%, var(--surface)); }
@media (min-width: 64rem) { .deck-inbox:has(> .dk-inbox-box + .dk-inbox-box) { grid-template-columns: 1fr 1fr; } .deck-inbox .deck-more { grid-column: 1 / -1; } }
.dk-inbox-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r-sm); padding: var(--s3) var(--s4); min-width: 0; }
.bb main.wrap .deck-inbox h2 { font: 700 1rem/1.3 var(--sans); text-transform: none; letter-spacing: 0; margin-bottom: var(--s2); }
.bb main.wrap .deck-inbox .invites { margin: var(--s2) 0 0; }
.bb main.wrap .deck-inbox .invites li { background: var(--bg); padding: .6rem var(--s3); }
.deck-more { font: 600 .72rem/1.3 var(--bb-mono); letter-spacing: .1em; text-transform: uppercase; text-align: right; }

/* Next game primary dispatch card: red edge, board tag, Anton matchup, real head-to-head inset, one red CTA. */
.next { display: grid; gap: var(--s4); border-left: 3px solid var(--accent); }
.dk-next-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.dk-next-k { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.bb main.wrap .dk-next-k .label { margin: 0; }
.dk-btag { display: inline-block; padding: .18rem .5rem; border-radius: 3px; background: var(--accent); color: var(--on-accent);
  font: 700 .625rem/1.3 var(--bb-mono); letter-spacing: .12em; text-transform: uppercase; }
.dk-btag.b1 { background: var(--highlight); color: var(--bg); }
.dk-btag.b2 { background: var(--signal); color: var(--bg); }
.dk-btag.b3 { background: var(--accent); color: var(--on-accent); }
.dk-btag.b4 { background: var(--text); color: var(--bg); }
.dk-btag.sub { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.dk-timer { padding: .2rem .55rem; background: var(--bg); border: 1px solid var(--border); border-radius: 3px;
  font: 700 .65rem/1.3 var(--bb-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--highlight); white-space: nowrap; }
.bb main.wrap .next h2 { margin: 0 0 var(--s2); font: 400 clamp(1.65rem, 3.2vw, 2.15rem)/1.05 var(--bb-display); letter-spacing: .02em; text-transform: uppercase; display: block; }
.dk-vs { font: 400 .62em/1 var(--bb-mono); color: var(--text-muted); margin-inline: .25rem; vertical-align: .1em; }
.dk-opp { color: var(--accent-ink); }
.dk-next-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); }
.next-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin: 0; }
.next-when { color: var(--text-muted); font-size: .875rem; margin: 0; }
.next-when b { color: var(--text); font: 700 .875rem/1 var(--bb-mono); }
.sw { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; border: 1px solid var(--control-border); }
.sw.w { background: var(--bb-sq-l); } .sw.b { background: var(--bg); }
.next-score { display: flex; align-items: center; gap: var(--s3); margin: 0; }
.next-score b { font: 400 2.25rem/1 var(--bb-display); letter-spacing: .02em; }

/* Real head-to-head matchup inset inside the Next Game card */
.dk-h2h { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--s4);
  padding: var(--s4); background-color: var(--bg); border: 1px solid var(--border); border-radius: var(--bb-r-sm);
  background-image: radial-gradient(color-mix(in srgb, var(--signal) 18%, transparent) 1px, transparent 1px); background-size: 16px 16px; }
.dk-h2h.single { grid-template-columns: 1fr; justify-items: center; }
.dk-side-p { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.dk-side-p.right { justify-content: flex-end; text-align: right; }
.dk-side-p > div { display: grid; gap: .1rem; min-width: 0; }
.dk-plaque { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--bb-r-sm);
  background: var(--surface); border: 1px solid var(--border); font: 400 1.25rem/1 var(--bb-display); letter-spacing: .03em; color: var(--text); }
.dk-plaque.b1 { border-top: 2px solid var(--highlight); color: var(--highlight); }
.dk-plaque.b2 { border-top: 2px solid var(--signal); color: var(--signal); }
.dk-plaque.b3 { border-top: 2px solid var(--accent); color: var(--accent-ink); }
.dk-plaque.b4 { border-top: 2px solid var(--text); color: var(--text); }
.dk-plaque.opp { border-top: 2px solid var(--accent); color: var(--accent-ink); font-size: 1.05rem; }
.dk-side-k { font: 700 .6rem/1.2 var(--bb-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.dk-side-n { font: 400 1.15rem/1.1 var(--bb-display); letter-spacing: .03em; text-transform: uppercase; overflow-wrap: anywhere; }
.dk-side-r { font: 600 .6875rem/1.2 var(--bb-mono); color: var(--highlight); }
.dk-side-p.right .dk-side-r { color: var(--text-muted); }
.dk-clash { display: grid; justify-items: center; gap: .3rem; padding-inline: var(--s2); }
.dk-clash-k { font: 700 .6rem/1.2 var(--bb-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.dk-clash-s { font: 400 1.6rem/1 var(--bb-display); letter-spacing: .04em; color: var(--text); }
.dk-pips { display: flex; gap: .3rem; }
.dk-pip { padding: .1rem .35rem; border-radius: 2px; border: 1px solid var(--border); background: var(--surface);
  font: 700 .5625rem/1.3 var(--bb-mono); color: var(--text-muted); }
.dk-pip.won { background: color-mix(in srgb, var(--signal) 18%, var(--surface)); border-color: var(--signal); color: var(--signal); }
.dk-pip.lost { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-color: var(--accent); color: var(--accent-ink); }
.dk-pip.draw { border-color: var(--control-border); color: var(--text); }
.dk-pip.is-me { border-color: var(--highlight); color: var(--highlight); }
@media (max-width: 42rem) {
  .dk-h2h { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .dk-side-p.right { justify-content: flex-start; text-align: left; flex-direction: row-reverse; }
  .dk-clash { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: var(--s2) 0; width: 100%; }
}

.dk-next-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--border); }
.dk-next-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font: 600 .72rem/1.3 var(--bb-mono); }
.dk-tc { color: var(--signal); text-transform: uppercase; letter-spacing: .08em; }
.next .deck-actions { margin: 0 !important; }
.bb main.wrap .next .btn:not(.secondary) { padding: .7rem 1.35rem; font: 400 1.05rem/1.1 var(--bb-display); letter-spacing: .06em; text-transform: uppercase; }

/* Seasons dispatch: inset season cards, brass rank plaque, labeled round bar, elevated mini-table, captain strip. */
.deck-season { background: var(--bg); border: 1px solid var(--border); border-radius: var(--bb-r-sm); padding: var(--s4); }
.deck-season + .deck-season { margin-top: var(--s4); }
.deck-season-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3) var(--s5); align-items: flex-start; }
.dk-season-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s1); }
.bb main.wrap .deck-season h3 { margin: 0; font: 400 1.2rem/1.15 var(--bb-display); letter-spacing: .03em; text-transform: uppercase; }
.dk-rank-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r-sm); padding: .45rem .8rem; }
.deck-rank { margin: 0; font: 500 .75rem/1.35 var(--bb-mono); text-align: right; color: var(--text); }
.deck-rank strong { font: 400 1.85rem/1 var(--bb-display); color: var(--highlight); margin-right: .25rem; }
.dk-rank-pts { display: block; font-size: .6875rem; color: var(--text-muted); margin-top: .1rem; }
.deck-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }

.dk-rprog { margin-top: var(--s4); display: grid; gap: .4rem; }
.dk-rhead { display: flex; justify-content: space-between; gap: var(--s2); font: 600 .65rem/1.3 var(--bb-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.rounds { list-style: none; margin: var(--s4) 0 0; padding: 0; display: flex; gap: 4px; }
.dk-rprog .rounds { margin: 0; }
.rounds li { flex: 1; height: 6px; border-radius: 2px; background: var(--border); }
.rounds .done { background: var(--signal); } .rounds .now { background: var(--accent); }
.dk-rlabels { display: flex; gap: 4px; font: 600 .6rem/1.2 var(--bb-mono); color: var(--text-muted); text-align: center; }
.dk-rlabels span { flex: 1; }
.dk-rlabels .now { color: var(--accent-ink); font-weight: 700; }

.bb main.wrap table.mini-table { display: table; width: 100%; margin-top: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r-sm); font-size: .875rem; }
.bb main.wrap .mini-table th, .bb main.wrap .mini-table td { padding: .55rem .7rem; }
.bb main.wrap .mini-table td:first-child, .bb main.wrap .mini-table th:first-child { width: 2.25rem; font-family: var(--bb-mono); color: var(--text-muted); }
.bb main.wrap .mini-table .num { text-align: right; font-family: var(--bb-mono); }
.bb main.wrap .mini-table tr.me td { color: var(--highlight); font-weight: 700; background: color-mix(in srgb, var(--highlight) 7%, transparent); }
.dk-you { display: inline-block; margin-left: .35rem; padding: .08rem .35rem; border-radius: 2px; background: var(--highlight); color: var(--bg);
  font: 700 .5625rem/1.3 var(--bb-mono); letter-spacing: .08em; vertical-align: .1em; }
.dk-captain-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4);
  margin-top: var(--s4); padding: var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r-sm);
  font: 500 .75rem/1.4 var(--bb-mono); }

/* Team roster: inset board row cards with full 3px board-coded left edge, B1-B4 badge, avatar and league rating. */
.dk-affil { margin: 0 0 var(--s3); font: 600 .72rem/1.3 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.dk-affil a { color: var(--text); text-decoration: none; } .dk-affil a:hover { color: var(--highlight); }
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.roster li { --bc: var(--control-border); display: grid; grid-template-columns: 2.3rem 2rem minmax(0, 1fr) auto 3.25rem; align-items: center; gap: var(--s2) var(--s3);
  padding: .55rem var(--s3); background: var(--bg); border: 1px solid var(--border); border-radius: var(--bb-r-sm);
  box-shadow: inset 3px 0 0 var(--bc); }
.roster .sub-first { margin-top: var(--s1); }
.ro-tag { display: inline-grid; place-items: center; padding: .2rem .3rem; border-radius: 2px; background: var(--surface);
  font: 700 .625rem/1.2 var(--bb-mono); letter-spacing: .06em; color: var(--bc); }
.av { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--bb-r-sm); background: var(--surface); border: 1px solid var(--border); font: 700 .8125rem/1 var(--sans); color: var(--text-muted); }
img.av { object-fit: cover; padding: 0; }
.ro-who { display: inline-flex; align-items: center; gap: var(--s2); }
.ro-who .av { flex: none; }
.ro-n { font-weight: 600; overflow-wrap: anywhere; }
.ro-b { font: 400 .72rem/1 var(--bb-mono); color: var(--text-muted); }
.ro-r { font: 600 .875rem/1 var(--bb-mono); text-align: right; font-variant-numeric: tabular-nums; }
.roster .b1 { --bc: var(--highlight); } .roster .b2 { --bc: var(--signal); } .roster .b3 { --bc: var(--accent-ink); } .roster .b4 { --bc: var(--text); }
.roster :is(.b1, .b2, .b3, .b4) .ro-b { color: var(--bc); font-weight: 700; }
.roster :is(.b1, .b2, .b3, .b4) .ro-n { color: color-mix(in srgb, var(--bc) 35%, var(--text)); }
.roster li.me { background: color-mix(in srgb, var(--bc) 9%, var(--bg)); border-color: color-mix(in srgb, var(--bc) 45%, var(--border)); }
.roster li.me .dk-you { background: var(--bc); color: var(--bg); }
.roster li.b3.me .dk-you { color: var(--on-accent); }
.roster li.empty { opacity: .72; }
.roster li.empty .ro-n { color: var(--text-muted); font-weight: 400; }
.lu-c { display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; margin-left: .3rem; vertical-align: .1em; border: 1px solid var(--highlight); border-radius: 3px; font: 700 .6rem/1 var(--bb-mono); text-decoration: none; color: var(--highlight); }
@media (max-width: 34rem) { .roster li { grid-template-columns: 2.1rem 1.75rem minmax(0, 1fr) 3rem; } .roster .ro-b { display: none; } }

/* Sidebar Club Base */
.dk-club-card { display: flex; gap: var(--s3); align-items: center; padding: var(--s3); background: var(--bg); border: 1px solid var(--border); border-radius: var(--bb-r-sm); }
.dk-club-id { display: grid; gap: .3rem; min-width: 0; }
.dk-club-name { font: 400 1.2rem/1.1 var(--bb-display); letter-spacing: .03em; text-transform: uppercase; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.dk-club-name:hover { color: var(--highlight); }
.dk-club-id .deck-chips { align-items: center; margin: 0; font-size: .8125rem; }
.monogram { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: var(--bb-r-sm); background: var(--accent); color: var(--on-accent); font: 400 1.4rem/1 var(--bb-display); }
.bb main.wrap .dk-panel-link { display: block; margin-top: var(--s3); padding: .55rem var(--s3); text-align: center; text-decoration: none;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--bb-r-sm);
  font: 700 .6875rem/1.3 var(--bb-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.bb main.wrap .dk-panel-link:hover { border-color: var(--control-border); color: var(--highlight); }

/* Sidebar 2x2 Active Match Boards widget */
.dk-quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.dk-btile { --bc: var(--control-border); }
.bb main.wrap .dk-btile { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s3);
  padding: .65rem .7rem; min-width: 0; text-decoration: none;
  background: var(--bg); border: 1px solid var(--border); border-top: 2px solid var(--bc); border-radius: var(--bb-r-sm); }
.bb main.wrap .dk-btile:hover { border-color: var(--bc); }
.dk-btile.b1 { --bc: var(--highlight); } .dk-btile.b2 { --bc: var(--signal); } .dk-btile.b3 { --bc: var(--accent-ink); } .dk-btile.b4 { --bc: var(--text); }
.bb main.wrap .dk-btile.mine { background: color-mix(in srgb, var(--bc) 12%, var(--bg)); }
.bb main.wrap .dk-btile.won { background: color-mix(in srgb, var(--signal) 9%, var(--bg)); }
.bb main.wrap .dk-btile.lost { background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.dk-btile-top { display: flex; justify-content: space-between; align-items: center; gap: .35rem; font: 700 .58rem/1.2 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; }
.dk-btile-b { color: var(--bc); }
.dk-btile-st { padding: .08rem .3rem; border-radius: 2px; background: var(--surface); color: var(--text-muted); }
.dk-btile.mine .dk-btile-st { background: var(--bc); color: var(--bg); }
.dk-btile.b3.mine .dk-btile-st { color: var(--on-accent); }
.dk-btile.won .dk-btile-st { color: var(--signal); }
.dk-btile.lost .dk-btile-st { color: var(--accent-ink); }
.dk-btile-who { display: grid; gap: .15rem; min-width: 0; }
.dk-btile-n { font-size: .84rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-btile-sc { font: 600 .72rem/1.2 var(--bb-mono); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-agg { font: 400 1.2rem/1 var(--bb-display); letter-spacing: .04em; color: var(--text); }

/* Sidebar Upcoming Fixtures: inset cards with bold calendar block and home/away/next tag. */
.deck-upcoming { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.deck-upcoming li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s3);
  padding: .6rem var(--s3); background: var(--bg); border: 1px solid var(--border); border-radius: var(--bb-r-sm); }
.dk-fix-info { display: grid; gap: .15rem; min-width: 0; }
.dk-fix-info a { font-weight: 600; font-size: .875rem; text-decoration: none; overflow-wrap: anywhere; }
.dk-fix-info a:hover { color: var(--highlight); }
.dk-fix-tag { padding: .15rem .4rem; border-radius: 2px; background: var(--surface); border: 1px solid var(--border);
  font: 700 .58rem/1.3 var(--bb-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.dk-fix-tag.live { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-color: var(--accent); color: var(--accent-ink); }
.cal { display: grid; place-items: center; width: 2.75rem; padding: .3rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r-sm);
  font: 700 .5625rem/1.2 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.cal b { font: 400 1.15rem/1.05 var(--bb-display); letter-spacing: .02em; color: var(--text); }
.cal.now { background: var(--accent); border-color: var(--accent); }
.cal.now b { font: 700 .65rem/2 var(--bb-mono); letter-spacing: .08em; color: var(--on-accent); }
.deck-upcoming .muted { font-size: .75rem; }

/* Club and team pages: the hub banner (hubBanner in web.ts), a page head with a monogram and tabs. */
.hub { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4) var(--s5); align-items: center; }
.hub .monogram { width: 4rem; height: 4rem; font-size: 2rem; }
.bb main.wrap .hub h1 { margin: 0 0 var(--s2); }
.bb main.wrap .hub .label { margin: 0 0 var(--s2); }
.hub-meta { margin: var(--s2) 0 0; color: var(--text-muted); }
.hub-tabs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); padding-top: var(--s2); }
.bb main.wrap .hub-tabs a { padding: var(--s2) 0; color: var(--text-muted); text-decoration: none; font: 600 .875rem/1 var(--sans); }
.bb main.wrap .hub-tabs a:hover { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 30rem) { .hub { grid-template-columns: minmax(0, 1fr); } .hub .monogram { width: 3.25rem; height: 3.25rem; font-size: 1.6rem; } }

/* Profile page (/profile): rating tiles. */
.bb main.wrap > .rt-grid { list-style: none; max-width: none; margin: 0 0 var(--s4); padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s3); }
@media (max-width: 30rem) { .bb main.wrap > .rt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rt-tile { padding: var(--s3); } .rt-tile .rt-num { font-size: 2rem; } }
.rt-tile { display: grid; gap: var(--s2); padding: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r); }
.rt-top { display: flex; align-items: center; gap: var(--s2); min-width: 0; font: 700 .75rem/1.2 var(--bb-mono); letter-spacing: .06em; text-transform: uppercase; }
.rt-icon { flex: none; width: 1.125rem; height: 1.125rem; color: var(--text-muted); }
.rt-tile .rt-num { font: 400 2.4rem/1 var(--bb-display); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.rt-tile small { font: 400 .6875rem/1.3 var(--bb-mono); letter-spacing: .04em; color: var(--text-muted); }
.rt-tile.mine { box-shadow: inset 0 3px 0 var(--highlight); } .rt-tile.mine .rt-icon { color: var(--highlight); }
.rt-tile.league { border-color: var(--highlight); } .rt-tile.league .rt-icon, .rt-tile.league .rt-num { color: var(--highlight); }

/* ---------- Profile (src/profile.ts) ----------
   A hero (picture, name, bio, facts) above a tab bar; each tab is a link (?tab=), no JS. Brass marks the player's own
   things (the picture ring, the current tab, league rating); cyan is wins, red losses. The faint king sits bottom left. */
.pf-page { position: relative; padding-top: var(--s5); }
.pf-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s5);
  padding: var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r); }
.pf-pic { display: grid; place-items: center; width: 7rem; height: 7rem; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--highlight); background: var(--bg); }
span.pf-pic { background: var(--accent); color: var(--on-accent); font: 400 2.75rem/1 var(--bb-display); letter-spacing: .02em; }
.pf-id { min-width: 0; }
.bb main.wrap .pf-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 2.75rem); }
.pf-bio { margin: var(--s2) 0 0; font-size: .9375rem; max-width: 60ch; white-space: pre-line; overflow-wrap: anywhere; }
.pf-meta { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) 0;
  font: 400 .8125rem/1.5 var(--bb-mono); color: var(--text-muted); }
.pf-meta li + li::before { content: "·"; margin-inline: var(--s2); color: var(--control-border); }
.pf-meta a { color: var(--text); text-decoration-color: var(--control-border); }
.pf-edit { align-self: start; white-space: nowrap; }

.pf-tabs { display: flex; gap: var(--s1); margin: var(--s5) 0 var(--s4); border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none; }
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tabs a { flex: none; padding: var(--s3) var(--s4); margin-bottom: -1px; border-bottom: 2px solid transparent;
  color: var(--text-muted); text-decoration: none; font: 600 .875rem/1 var(--sans); }
.pf-tabs a:hover { color: var(--text); }
.pf-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--highlight); }

.pf-panel { display: grid; gap: var(--s4); }
.pf-card { padding: var(--s4) var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r); min-width: 0; }
.bb main.wrap .pf-card h2 { margin: 0 0 var(--s3); font: 700 .75rem/1.3 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pf-grid { display: grid; gap: var(--s4); }
@media (min-width: 48rem) { .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.pf-fine { margin: var(--s3) 0 0; font-size: .8125rem; }

.pf-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r); }
.pf-stats li { display: grid; gap: var(--s1); padding: var(--s4) var(--s5); min-width: 0; }
.pf-stats li + li { border-left: 1px solid var(--border); }
.pf-stat-k { font: 700 .6875rem/1.3 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pf-stat-v { font: 400 2.25rem/1 var(--bb-display); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.pf-stat-n { font: 400 .75rem/1.3 var(--bb-mono); color: var(--text-muted); }
.pf-stats .hi .pf-stat-v { color: var(--highlight); }
@media (max-width: 40rem) {
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-stats li:nth-child(3) { border-left: 0; }
  .pf-stats li:nth-child(n+3) { border-top: 1px solid var(--border); }
}

.pf-split { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.pf-split li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--s3); }
.pf-split-k { font-weight: 600; }
.pf-split-n { font-size: .8125rem; color: var(--text-muted); white-space: nowrap; }
.pf-bar { display: flex; gap: 0; height: .5rem; border-radius: 999px; overflow: hidden; background: var(--bg); }
.pf-bar .seg { flex: 1 1 0; }
.pf-bar .w { background: var(--signal); } .pf-bar .d { background: var(--control-border); } .pf-bar .l { background: var(--accent); }
.pf-bar .none { flex-grow: 1; background: var(--bg); }

.pf-reps { display: grid; gap: var(--s3); }
.pf-rep { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s3); padding: var(--s3);
  border: 1px solid var(--border); border-radius: var(--bb-r); background: var(--bg); color: var(--text); text-decoration: none; }
a.pf-rep:hover { border-color: var(--control-border); }
.pf-rep > span { display: grid; gap: 2px; min-width: 0; }
.pf-rep-k { font: 700 .625rem/1.3 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pf-rep-v { font-weight: 700; overflow-wrap: anywhere; }
.pf-rep.none .pf-rep-v { color: var(--text-muted); font-weight: 600; }
.pf-rep .pf-ico { width: 1.75rem; height: 1.75rem; color: var(--highlight); }
.pf-rep.none .pf-ico { color: var(--text-muted); }
.pf-rep.big { padding: var(--s4); margin-bottom: var(--s4); }
.pf-rep.big .pf-rep-v { font: 400 1.6rem/1.1 var(--bb-display); text-transform: uppercase; letter-spacing: .02em; }
.pf-mono { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--bb-r); border: 1px solid var(--highlight);
  color: var(--highlight); font: 400 1.25rem/1 var(--bb-display); }

.pf-list { list-style: none; margin: 0; padding: 0; }
.pf-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--border); }
.pf-list li:first-child { border-top: 0; }
.pf-list a { font-weight: 600; }

.bb main.wrap .pf-card .rt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s3); }
.pf-card .rt-tile { background: var(--bg); }

.pf-empty { display: grid; justify-items: center; gap: var(--s2); padding: var(--s6) var(--s4); text-align: center;
  background: var(--surface); border: 1px dashed var(--control-border); border-radius: var(--bb-r); }
.pf-card .pf-empty { padding: var(--s4); background: var(--bg); }
.pf-empty .pf-ico, .pf-empty .rt-icon { width: 2.25rem; height: 2.25rem; color: var(--highlight); }
.bb main.wrap .pf-empty p { margin: 0; }
.pf-empty-t { font-weight: 700; font-size: 1.0625rem; }
.pf-empty .btn { margin-top: var(--s2); }

.pf-pick { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s5); }
.pf-pick > div { display: grid; gap: var(--s2); min-width: 0; }
.pf-form fieldset { min-inline-size: 0; }
.pf-pick input[type=file] { width: 100%; max-width: 100%; }
.bb main.wrap .pf-pick .muted { margin: 0; }
.pf-form { max-width: 36rem; }
.pf-form textarea { width: 100%; min-height: 6rem; resize: vertical; }
.pf-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: 0; }

@media (max-width: 40rem) {
  .pf-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: var(--s5) var(--s4); }
  .pf-hero .pf-meta { justify-content: center; }
  .pf-bio { margin-inline: auto; }
  .pf-edit { justify-self: center; }
  .pf-split li { grid-template-columns: minmax(0, 1fr) auto; }
  .pf-split .pf-bar { grid-column: 1 / -1; grid-row: 2; }
  .pf-pick { grid-template-columns: minmax(0, 1fr); justify-items: start; }
}

/* The shattered king, faint, fixed in the bottom-left corner on wide screens; under the content on narrower ones. */
@media (min-width: 64rem) {
  html.bb body:has(.pf-page)::before { content: ""; position: fixed; z-index: -1; left: -4vw; bottom: -2vh; width: min(40vw, 620px);
    aspect-ratio: 640 / 456; background: url(/shattered-king-light.webp) center / contain no-repeat; opacity: .1; pointer-events: none; }
}
@media (max-width: 63.99rem) {
  .pf-page::after { content: ""; display: block; width: min(100%, 24rem); margin-top: var(--s6); aspect-ratio: 640 / 456;
    background: url(/shattered-king-light.webp) center / contain no-repeat; opacity: .12; pointer-events: none; }
}

/* ---------- Club hub (src/clubs.ts) ----------
   Same language as the profile (pf-tabs, pf-card, pf-stats, pf-empty). The banner runs across the top of the hero;
   without one, a quiet brass-to-red wash in token colours. The logo overlaps the banner's lower edge. */
.cl-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r); overflow: hidden; }
.cl-banner { aspect-ratio: 16 / 5; max-height: 16rem; width: 100%; overflow: hidden;
  background: linear-gradient(115deg, color-mix(in srgb, var(--highlight) 24%, var(--bg)), var(--bg) 48%, color-mix(in srgb, var(--accent) 22%, var(--bg))); }
.cl-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cl-hero .cl-banner { border-bottom: 1px solid var(--border); }
.cl-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s5); align-items: start; padding: 0 var(--s5) var(--s5); }
.cl-logo { display: grid; place-items: center; width: 6rem; height: 6rem; border-radius: var(--bb-r); object-fit: cover; background: var(--accent);
  color: var(--on-accent); font: 400 2.5rem/1 var(--bb-display); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--highlight); }
.cl-head > .cl-logo { margin-top: -3rem; }
.cl-id { min-width: 0; padding-top: var(--s4); }
.bb main.wrap .cl-id .label { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s1); }
.bb main.wrap .cl-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 2.75rem); }
.cl-action { padding-top: var(--s4); }
.cl-action form { display: inline; }
.cl-stats .pf-stat-v { font-size: 2rem; }

.cl-teams { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
@media (min-width: 48rem) { .cl-teams { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cl-teams .pf-card { display: grid; gap: var(--s4); align-content: start; }
.cl-team-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: center; }
.bb main.wrap .cl-team-head p { margin: 0; }
.cl-team-name { font: 400 1.4rem/1.1 var(--bb-display); text-transform: uppercase; letter-spacing: .02em; text-decoration: none; color: var(--text); }
.cl-team-name:hover { color: var(--highlight); }
.cl-team-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); padding: var(--s3); border-radius: var(--bb-r); background: var(--bg); }
.cl-team-facts div { display: grid; gap: 2px; min-width: 0; }
.cl-team-facts dt { font: 700 .625rem/1.3 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.cl-team-facts dd { margin: 0; font: 700 1rem/1.2 var(--bb-mono); font-variant-numeric: tabular-nums; }
.cl-teams form { justify-self: start; }

.cl-people { list-style: none; margin: 0; padding: 0; }
.cl-people li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--s2) var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--border); }
.cl-people li:first-child { border-top: 0; }
.cl-people .muted { font-size: .8125rem; }
.cl-people .chip { margin-left: var(--s1); vertical-align: .15em; }
.pf-list li form { display: inline; }

.cl-form { max-width: none; }
.cl-pick { display: grid; gap: var(--s5); }
@media (min-width: 48rem) { .cl-pick { grid-template-columns: 14rem minmax(0, 1fr); } }
.cl-pick > div { display: grid; gap: var(--s2); align-content: start; min-width: 0; }
.bb main.wrap .cl-pick .muted { margin: 0; }
.cl-pick input[type=file] { width: 100%; max-width: 100%; }
.cl-pick .cl-banner { border-radius: var(--bb-r); border: 1px solid var(--border); }
.cl-pick-logo .cl-logo { margin-bottom: var(--s2); }

img.monogram, img.pf-mono, img.av, img.cl-logo { object-fit: cover; padding: 0; }

@media (max-width: 40rem) {
  .cl-head { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 0 var(--s4) var(--s5); gap: var(--s3); }
  .cl-id, .cl-action { padding-top: 0; }
  .bb main.wrap .cl-id .label { justify-content: center; }
  .cl-hero .pf-meta { justify-content: center; }
  .cl-team-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-people li { grid-template-columns: minmax(0, 1fr) auto; }
  .cl-people li > .muted { grid-column: 1; grid-row: 2; }
}

/* ---------- Seasons (src/seasons.ts) ----------
   The list: filter tabs (status) over a grid of season cards. A season: a hero with the round strip and a
   registration card, then standings, schedule and teams as cards. Red = registering or running, cyan = finished,
   brass = your team and the champion. */
.ss-count { display: inline-block; min-width: 1.4em; margin-left: .2rem; padding: 0 .35em; border-radius: 999px; background: var(--bg);
  border: 1px solid var(--border); font: 700 .6875rem/1.5 var(--bb-mono); text-align: center; color: var(--text-muted); }
.pf-tabs a[aria-current="page"] .ss-count { border-color: var(--highlight); color: var(--highlight); }
.ss-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
@media (min-width: 48rem) { .ss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ss-card { display: grid; gap: var(--s3); align-content: start; }
.ss-top { display: flex; flex-wrap: wrap; gap: var(--s2); }
.bb main.wrap h2.ss-name { margin: 0; font: 400 1.6rem/1.1 var(--bb-display); text-transform: uppercase; letter-spacing: .02em; color: var(--text); }
.ss-name a { text-decoration: none; color: inherit; }
.ss-name a:hover { color: var(--highlight); }
.ss-facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); margin: 0; font: 400 .8125rem/1.5 var(--bb-mono); color: var(--text-muted); }
.ss-facts .rt-icon { width: 1rem; height: 1rem; }
.ss-card .rounds { margin: 0; }
.ss-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s4); margin: 0; padding-top: var(--s3); border-top: 1px solid var(--border); font-size: .875rem; }
.ss-foot a { font-weight: 600; }
.ss-champ { display: inline-flex; align-items: center; gap: var(--s2); color: var(--highlight); font-weight: 600; }
.ss-champ a { color: var(--highlight); }
.ss-champ .rt-icon { color: var(--highlight); }

.ss-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem); gap: var(--s5); align-items: start; margin-bottom: var(--s5);
  padding: var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--bb-r); }
.bb main.wrap .ss-id .label { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); }
.bb main.wrap .ss-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 2.75rem); }
.ss-meta .rt-icon { width: 1rem; height: 1rem; vertical-align: -.2em; margin-right: .25rem; }
.ss-hero .rounds { margin-top: var(--s4); max-width: 32rem; }
.ss-action { display: grid; gap: var(--s2); padding: var(--s4); border-radius: var(--bb-r); background: var(--bg); border: 1px solid var(--border); }
.bb main.wrap .ss-action p { margin: 0; }
.ss-action-k { font: 700 .6875rem/1.3 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.ss-lock { font-size: .875rem; color: var(--text-muted); }
.ss-lock strong { color: var(--text); font-weight: 600; }
.ss-action form { display: block; }
.ss-action button, .ss-action .btn { width: 100%; text-align: center; }

.bb main.wrap .ss-section > h2:first-child { margin: 0 0 var(--s3); font: 700 .75rem/1.3 var(--bb-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.bb main.wrap .ss-section h3 { margin: var(--s4) 0 var(--s2); font: 700 .9375rem/1.3 var(--sans); }
/* Inside a season card, tables sit on the page colour and fill the card on wider screens (phones keep them scrolling). */
.bb main.wrap .ss-section table { background: var(--bg); }
@media (min-width: 48rem) { .bb main.wrap .ss-section table { display: table; width: 100%; } }
/* The champion: the first team row (the header is row 1) once the standings are final. */
.ss-section.final table tr:nth-child(2) :is(th, td, a) { color: var(--highlight); font-weight: 700; }
.ss-teams { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.ss-teams li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--bb-r); background: var(--bg); border: 1px solid var(--border); }
.ss-teams li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.ss-teams a { font-weight: 700; overflow-wrap: anywhere; }
.ss-teams .muted { font-size: .8125rem; }

@media (max-width: 48rem) {
  .ss-hero { grid-template-columns: minmax(0, 1fr); padding: var(--s4); }
}

/* Admin moderation (/admin/moderation): a thumbnail, the name and text, and a remove form with a required note. */
@media (min-width: 48rem) { .bb main.wrap table.mod { display: table; width: 100%; } }
.mod td { vertical-align: top; }
.mod-text { display: inline-block; max-width: 48ch; white-space: pre-line; overflow-wrap: anywhere; font-size: .875rem; }
.mod-form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.mod-form input[type=text] { min-width: min(14rem, 100%); flex: 1; }
.mod-search { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: end; margin: var(--s4) 0; }

/* Delete account (/settings/account) */
.del-list { margin: 0; padding-left: 1.2rem; display: grid; gap: var(--s1); }
.del-blocked { border-color: var(--danger); }

/* Terms and Privacy (src/legal.ts): readable measure, cards per section. */
.legal .pf-card { margin-bottom: var(--s4); max-width: 48rem; }
.legal .pf-card ul { margin: 0; padding-left: 1.2rem; display: grid; gap: var(--s2); }
.bb main.wrap .legal .pf-card p { margin: 0; max-width: 68ch; }
.legal .locked { max-width: 48rem; }
