/* ==========================================================================
   mimELo — static design mockup
   UVA gameday system + per-game theme tokens
   ========================================================================== */

@layer od-layout {
  [hidden]:not([hidden="until-found" i]) { display: none !important; }
  dialog:not([open]) { display: none !important; }

  :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; }
  .od-stack   { display: flex; flex-direction: column; gap: var(--od-gap, 8px); }
  .od-row     { display: flex; align-items: center; gap: var(--od-gap, 8px); }
  .od-row-top { display: flex; align-items: flex-start; gap: var(--od-gap, 8px); }
  .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); }
  .od-fill    { flex: 1 1 0; min-width: 0; }
  .od-fixed   { flex: none; }
  .od-grid    { display: grid; gap: var(--od-gap, 12px); grid-template-columns: repeat(var(--od-cols, 3), minmax(0, 1fr)); }
  .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); }
  :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; }
  .od-tile { display: grid; grid-template-rows: auto 1fr; }
  :where(.od-tile) > :where(*) { display: block; }
  .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); }
  .od-media-cover { object-fit: cover; }
  .od-icon { display: inline-block; inline-size: var(--od-icon-size, 1em); block-size: var(--od-icon-size, 1em); flex: none; }
  .od-truncate { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .od-clamp-2 { -webkit-line-clamp: 2; }
  .od-clamp-3 { -webkit-line-clamp: 3; }
  .od-lines-2 { min-height: calc(2 * 1.4em); }
  .od-nowrap  { white-space: nowrap; }
  .od-keep    { word-break: keep-all; overflow-wrap: anywhere; }
  .od-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
  .od-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
  .od-rail { display: flex; gap: var(--od-gap, 8px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-inline: var(--od-rail-pad, 16px); scroll-padding-inline: var(--od-rail-pad, 16px); }
  .od-rail::-webkit-scrollbar { display: none; }
  :where(.od-rail) > :where(*) { flex: none; scroll-snap-align: start; }
  :where(.od-rail) > :where(:last-child) { margin-inline-end: var(--od-rail-pad, 16px); }
  .od-spacer { flex: none; visibility: hidden; pointer-events: none; }
  .od-touch  { min-width: 44px; min-height: 44px; }
}
:root [hidden]:where(:not([hidden="until-found" i])) { display: none; }

/* ---------- fonts ---------- */
@font-face { font-family: "Cruyff Sans"; src: url("../assets/fonts/CruyffSans-Light.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Cruyff Sans"; src: url("../assets/fonts/CruyffSans-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cruyff Sans"; src: url("../assets/fonts/CruyffSans-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cruyff Sans"; src: url("../assets/fonts/CruyffSans-Bold.ttf") format("truetype"); font-weight: 700 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Cruyff Sans Condensed"; src: url("../assets/fonts/CruyffSansCondensed-Medium.ttf") format("truetype"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cruyff Sans Expanded"; src: url("../assets/fonts/CruyffSansExpanded-Heavy.ttf") format("truetype"); font-weight: 800 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Cruyff Sans Mono"; src: url("../assets/fonts/CruyffSansMono-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cruyff Sans Mono"; src: url("../assets/fonts/CruyffSansMono-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../assets/fonts/Gotham-Medium.ttf") format("truetype"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "ITC Franklin Gothic"; src: url("../assets/fonts/ITC-Franklin-Gothic-Book.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Rodin Pro"; src: url("../assets/fonts/RodinPro-Light.otf") format("opentype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Rodin Pro"; src: url("../assets/fonts/RodinPro-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Rodin Pro"; src: url("../assets/fonts/RodinPro-DemiBold.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Rodin Pro"; src: url("../assets/fonts/RodinPro-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Rodin Pro"; src: url("../assets/fonts/RodinPro-UltraBold.otf") format("opentype"); font-weight: 900; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;
  --font-sans: "Cruyff Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --font-condensed: "Cruyff Sans Condensed", "Cruyff Sans", ui-sans-serif, sans-serif;
  --font-expanded: "Cruyff Sans Expanded", "Cruyff Sans", ui-sans-serif, sans-serif;
  --font-mono: "Cruyff Sans Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 22, 40, .05), 0 10px 30px rgba(16, 22, 40, .06);
  --shadow-md: 0 2px 4px rgba(16, 22, 40, .05), 0 18px 44px rgba(16, 22, 40, .10);
  --shadow-lg: 0 30px 80px rgba(16, 22, 40, .16);

  --duration: 200ms;
  --duration-slow: 320ms;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --wrap: 1240px;
  --header-h: 72px;

  --bg: #f1f1ef;
  --bg-2: #e8e9e5;
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --surface-3: #eef0f2;
  --ink: #232d4b;
  --ink-2: #39456a;
  --muted: #5c6478;
  --line: #d7dae0;
  --line-strong: #bfc5d1;
  --navy: #232d4b;
  --navy-deep: #161e35;
  --on-navy: #f7f8fb;
  --on-navy-muted: #c7ccda;
  --accent: #e57200;
  --accent-hover: #f07e10;
  --on-accent: #10162a;
  --accent-soft: #fbe9d6;
  --link: #3a4f86;
  --success: #1f7a45;
  --success-soft: #e1f1e7;
  --danger: #b4392f;
  --danger-soft: #f8e4e1;
  --pending: #7d5400;
  --pending-bg: #fbecc9;
  --locked-bg: #e7eaf0;
  --focus: #e57200;
  --chart: #232d4b;
  --chart-2: #e57200;
  --game: #232d4b;
  --game-soft: #eef0f2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1222;
    --bg-2: #0f172b;
    --surface: #141d33;
    --surface-2: #1a2440;
    --surface-3: #202b49;
    --ink: #f2f4f9;
    --ink-2: #d5dae6;
    --muted: #a9b3c8;
    --line: #2a3654;
    --line-strong: #3a486b;
    --navy: #0e1730;
    --navy-deep: #080d1a;
    --on-navy: #f7f8fb;
    --on-navy-muted: #b9c2d6;
    --accent: #ff8a1e;
    --accent-hover: #ffa04a;
    --on-accent: #0b1020;
    --accent-soft: #3a2510;
    --link: #9fb4e8;
    --success: #5fd18f;
    --success-soft: #12301f;
    --danger: #ef8a80;
    --danger-soft: #3a1b18;
    --pending: #f4c978;
    --pending-bg: #3a2c10;
    --locked-bg: #24304c;
    --focus: #ffa04a;
    --chart: #9fb4e8;
    --chart-2: #ff8a1e;
    --game: #9fb4e8;
    --game-soft: #1a2440;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .36), 0 12px 30px rgba(0, 0, 0, .22);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .34), 0 22px 50px rgba(0, 0, 0, .30);
    --shadow-lg: 0 34px 90px rgba(0, 0, 0, .50);
  }
}

/* EA FC game theme */
body[data-game="eafc"] {
  --bg: #f0f6f1;
  --bg-2: #e5f0e8;
  --surface: #ffffff;
  --surface-2: #f5faf6;
  --surface-3: #e8f2eb;
  --ink: #102419;
  --ink-2: #243a2c;
  --muted: #51695a;
  --line: #d3e3d7;
  --line-strong: #b7cfbd;
  --navy: #082417;
  --navy-deep: #04170d;
  --on-navy: #f2fbf5;
  --on-navy-muted: #b9d3c2;
  --accent: #00a94f;
  --accent-hover: #00b958;
  --on-accent: #04170d;
  --accent-soft: #dff3e6;
  --link: #007a3a;
  --success: #007a3a;
  --success-soft: #e0f2e7;
  --danger: #b4392f;
  --danger-soft: #f8e4e1;
  --pending: #7a5600;
  --pending-bg: #f8edc9;
  --locked-bg: #e2ece5;
  --focus: #00843e;
  --chart: #007a3a;
  --chart-2: #00a94f;
  --game: #00a94f;
  --game-soft: #e2f2e8;
}
@media (prefers-color-scheme: dark) {
  body[data-game="eafc"] {
    --bg: #06120b;
    --bg-2: #0a1a10;
    --surface: #0e2115;
    --surface-2: #13291b;
    --surface-3: #183222;
    --ink: #eef8f1;
    --ink-2: #d2e6d8;
    --muted: #9db5a4;
    --line: #1e3a28;
    --line-strong: #2c5138;
    --navy: #03120a;
    --navy-deep: #020c06;
    --on-navy: #f2fbf5;
    --on-navy-muted: #b2cdbb;
    --accent: #2be37e;
    --accent-hover: #54ee97;
    --on-accent: #04170d;
    --accent-soft: #123a23;
    --link: #6fe5a0;
    --success: #5fd18f;
    --success-soft: #12301f;
    --danger: #ef8a80;
    --danger-soft: #3a1b18;
    --pending: #f4c978;
    --pending-bg: #3a2c10;
    --locked-bg: #173423;
    --focus: #2be37e;
    --chart: #6fe5a0;
    --chart-2: #c9f06a;
    --game: #2be37e;
    --game-soft: #123a23;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px rgba(0, 0, 0, .26);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .4), 0 22px 50px rgba(0, 0, 0, .34);
    --shadow-lg: 0 34px 90px rgba(0, 0, 0, .52);
  }
}

/* EA FC 26 theme: same type system, blue instead of green */
body[data-game="eafc"][data-game-variant="eafc26"] {
  --bg: #f1f4fb;
  --bg-2: #e7ecf8;
  --surface: #ffffff;
  --surface-2: #f6f8fd;
  --surface-3: #e7eefb;
  --ink: #101a33;
  --ink-2: #223358;
  --muted: #525f7d;
  --line: #d6deee;
  --line-strong: #b8c4dc;
  --navy: #101c3d;
  --navy-deep: #081227;
  --on-navy: #f4f7ff;
  --on-navy-muted: #bcc8e4;
  --accent: #1d5bdb;
  --accent-hover: #2a68ee;
  --on-accent: #ffffff;
  --accent-soft: #e3ebfd;
  --link: #1b4dc0;
  --success: #1f7a45;
  --success-soft: #e1f1e7;
  --danger: #b4392f;
  --danger-soft: #f8e4e1;
  --pending: #7d5400;
  --pending-bg: #fbecc9;
  --locked-bg: #e5eaf4;
  --focus: #1d5bdb;
  --chart: #1b4dc0;
  --chart-2: #1d5bdb;
  --game: #1d5bdb;
  --game-soft: #e3ebfd;
}
@media (prefers-color-scheme: dark) {
  body[data-game="eafc"][data-game-variant="eafc26"] {
    --bg: #070d1b;
    --bg-2: #0b1428;
    --surface: #101a30;
    --surface-2: #16223c;
    --surface-3: #1b2a48;
    --ink: #eef3ff;
    --ink-2: #d0d9ec;
    --muted: #a2b0cb;
    --line: #223257;
    --line-strong: #32456d;
    --navy: #050e20;
    --navy-deep: #02070f;
    --on-navy: #f4f7ff;
    --on-navy-muted: #b4c1dd;
    --accent: #4d8dff;
    --accent-hover: #6fa2ff;
    --on-accent: #04122e;
    --accent-soft: #13284e;
    --link: #8ab6ff;
    --success: #5fd18f;
    --success-soft: #12301f;
    --danger: #ef8a80;
    --danger-soft: #3a1b18;
    --pending: #f4c978;
    --pending-bg: #3a2c10;
    --locked-bg: #17253f;
    --focus: #6fa2ff;
    --chart: #8ab6ff;
    --chart-2: #4d8dff;
    --game: #4d8dff;
    --game-soft: #13284e;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px rgba(0, 0, 0, .26);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .4), 0 22px 50px rgba(0, 0, 0, .34);
    --shadow-lg: 0 34px 90px rgba(0, 0, 0, .52);
  }
}

body.home-page,
body.player-directory-page {
  --bg: #f1f1ef;
  --bg-2: #e8e9e5;
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --surface-3: #eef0f2;
  --ink: #232d4b;
  --ink-2: #39456a;
  --muted: #5c6478;
  --line: #d7dae0;
  --line-strong: #bfc5d1;
  --navy: #232d4b;
  --navy-deep: #161e35;
  --on-navy: #f7f8fb;
  --on-navy-muted: #c7ccda;
  --accent: #e57200;
  --accent-hover: #f07e10;
  --on-accent: #10162a;
  --accent-soft: #fbe9d6;
  --link: #3a4f86;
  --success: #1f7a45;
  --success-soft: #e1f1e7;
  --danger: #b4392f;
  --danger-soft: #f8e4e1;
  --pending: #7d5400;
  --pending-bg: #fbecc9;
  --locked-bg: #e7eaf0;
  --focus: #e57200;
  --chart: #232d4b;
  --chart-2: #e57200;
  --game: #232d4b;
  --game-soft: #eef0f2;
  --font-sans: "ITC Franklin Gothic", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "ITC Franklin Gothic", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  body.home-page,
  body.player-directory-page {
    --bg: #101626;
    --bg-2: #171f32;
    --surface: #1c263b;
    --surface-2: #222e45;
    --surface-3: #293751;
    --ink: #f5f6fa;
    --ink-2: #e0e4ed;
    --muted: #bdc4d1;
    --line: #35425a;
    --line-strong: #4a5873;
    --navy: #202b46;
    --navy-deep: #151d32;
    --on-navy: #f7f8fb;
    --on-navy-muted: #c7ccda;
    --accent: #ff8a1e;
    --accent-hover: #ffa04a;
    --on-accent: #10162a;
    --accent-soft: #3b2918;
    --link: #a9b9e9;
    --success: #61c38a;
    --success-soft: #173625;
    --danger: #ef8a80;
    --danger-soft: #3a1b18;
    --pending: #f4c978;
    --pending-bg: #3a2c10;
    --locked-bg: #24304c;
    --focus: #ffa04a;
    --chart: #9fb4e8;
    --chart-2: #ff8a1e;
    --game: #9fb4e8;
    --game-soft: #1a2440;
  }
}

/* Tennis theme: Wimbledon deep green + purple */
body[data-game="tennis"] {
  --font-sans: "Gotham", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Gotham", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --font-condensed: "Gotham", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --bg: #f0f4f1;
  --bg-2: #e6ede8;
  --surface: #ffffff;
  --surface-2: #f4f8f5;
  --surface-3: #e8efe9;
  --ink: #14251c;
  --ink-2: #22382c;
  --muted: #50655a;
  --line: #d3e0d7;
  --line-strong: #b6c8bc;
  --navy: #0f2f24;
  --navy-deep: #081c14;
  --on-navy: #f2f7f3;
  --on-navy-muted: #b4c8bc;
  --accent: #7c5cbf;
  --accent-hover: #8a6dca;
  --on-accent: #ffffff;
  --accent-soft: #ece6f7;
  --link: #5f43a5;
  --success: #1f7a45;
  --success-soft: #e1f1e7;
  --danger: #b4392f;
  --danger-soft: #f8e4e1;
  --pending: #7d5400;
  --pending-bg: #fbecc9;
  --locked-bg: #e5ece7;
  --focus: #7c5cbf;
  --chart: #5f43a5;
  --chart-2: #7c5cbf;
  --game: #7c5cbf;
  --game-soft: #ece6f7;
}
body[data-game="table-tennis"] {
  --font-sans: "Gotham", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Gotham", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --font-condensed: "Gotham", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --bg: #f4f3ed;
  --bg-2: #e8e9df;
  --surface: #fffefa;
  --surface-2: #f8f7f0;
  --surface-3: #ecebe2;
  --ink: #172638;
  --ink-2: #263b50;
  --muted: #5b6c78;
  --line: #d7ddd9;
  --line-strong: #b8c7c1;
  --navy: #142b40;
  --navy-deep: #0a1b2a;
  --on-navy: #f7f8f5;
  --on-navy-muted: #bdcbd3;
  --accent: #e65b4b;
  --accent-hover: #d94d3e;
  --on-accent: #ffffff;
  --accent-soft: #f9e8e3;
  --link: #a7372d;
  --success: #24724e;
  --success-soft: #e1efe7;
  --danger: #b4392f;
  --danger-soft: #f8e4e1;
  --pending: #7d5400;
  --pending-bg: #fbecc9;
  --locked-bg: #e8ece6;
  --focus: #e65b4b;
  --chart: #e65b4b;
  --chart-2: #3b7b7a;
  --game: #e65b4b;
  --game-soft: #f9e8e3;
}
@media (prefers-color-scheme: dark) {
  body[data-game="table-tennis"] {
    --bg: #101923;
    --bg-2: #14212d;
    --surface: #1a2936;
    --surface-2: #203341;
    --surface-3: #2a4050;
    --ink: #f0f4f4;
    --ink-2: #d5e0e2;
    --muted: #a5b6bd;
    --line: #304653;
    --line-strong: #49616c;
    --navy: #0d1b27;
    --navy-deep: #07111a;
    --on-navy: #f7f8f5;
    --on-navy-muted: #bdcbd3;
    --accent: #ff7968;
    --accent-hover: #ff907f;
    --on-accent: #21120f;
    --accent-soft: #452b2a;
    --link: #ff9b8e;
    --success: #68d39a;
    --success-soft: #173827;
    --danger: #ef8a80;
    --danger-soft: #3b2322;
    --pending: #f3c969;
    --pending-bg: #3b301b;
    --locked-bg: #253a38;
    --focus: #ff907f;
    --chart: #ff7968;
    --chart-2: #69b4a8;
    --game: #ff7968;
    --game-soft: #452b2a;
  }
}
@media (prefers-color-scheme: dark) {
  body[data-game="tennis"] {
    --bg: #07120d;
    --bg-2: #0a1a12;
    --surface: #0f231a;
    --surface-2: #142c21;
    --surface-3: #193529;
    --ink: #eef5f0;
    --ink-2: #d2e0d6;
    --muted: #9db3a5;
    --line: #1f3a2c;
    --line-strong: #2d523d;
    --navy: #06130c;
    --navy-deep: #030b07;
    --on-navy: #f2f7f3;
    --on-navy-muted: #b2c9bb;
    --accent: #a58adc;
    --accent-hover: #b7a0e6;
    --on-accent: #141026;
    --accent-soft: #2a2140;
    --link: #b7a0e6;
    --success: #5fd18f;
    --success-soft: #12301f;
    --danger: #ef8a80;
    --danger-soft: #3a1b18;
    --pending: #f4c978;
    --pending-bg: #3a2c10;
    --locked-bg: #183324;
    --focus: #b7a0e6;
    --chart: #b7a0e6;
    --chart-2: #a58adc;
    --game: #a58adc;
    --game-soft: #2a2140;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px rgba(0, 0, 0, .26);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .4), 0 22px 50px rgba(0, 0, 0, .34);
    --shadow-lg: 0 34px 90px rgba(0, 0, 0, .52);
  }
}

/* Super Smash Bros. theme: deep navy + smash red */
body[data-game="smash"] {
  --font-sans: "Rodin Pro", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Rodin Pro", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --font-condensed: "Rodin Pro", "Cruyff Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Cruyff Sans Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --bg: #eef0f4;
  --bg-2: #e2e5ec;
  --surface: #ffffff;
  --surface-2: #f5f6f9;
  --surface-3: #e9ecf2;
  --ink: #131a2a;
  --ink-2: #26324a;
  --muted: #5a6476;
  --line: #d5dae4;
  --line-strong: #b7bfcf;
  --navy: #101a30;
  --navy-deep: #0a1222;
  --on-navy: #f4f6fb;
  --on-navy-muted: #b7c1d4;
  --accent: #e8285b;
  --accent-hover: #f63a6c;
  --on-accent: #ffffff;
  --accent-soft: #fbe2e9;
  --link: #b21f49;
  --success: #1f7a45;
  --success-soft: #e1f1e7;
  --danger: #b4392f;
  --danger-soft: #f8e4e1;
  --pending: #7d5400;
  --pending-bg: #fbecc9;
  --locked-bg: #e7eaf0;
  --focus: #e8285b;
  --chart: #e8285b;
  --chart-2: #101a30;
  --game: #e8285b;
  --game-soft: #fbe2e9;
}
@media (prefers-color-scheme: dark) {
  body[data-game="smash"] {
    --bg: #0a0f1d;
    --bg-2: #0e1628;
    --surface: #141d33;
    --surface-2: #1b2540;
    --surface-3: #222d4b;
    --ink: #eef2fa;
    --ink-2: #cfd8e8;
    --muted: #9aa6bd;
    --line: #27334f;
    --line-strong: #384662;
    --navy: #060b16;
    --navy-deep: #03060d;
    --on-navy: #f4f6fb;
    --on-navy-muted: #b7c1d4;
    --accent: #ff3f74;
    --accent-hover: #ff5c8a;
    --on-accent: #1a0410;
    --accent-soft: #3a1626;
    --link: #ff8aa6;
    --success: #5fd18f;
    --success-soft: #12301f;
    --danger: #ef8a80;
    --danger-soft: #3a1b18;
    --pending: #f4c978;
    --pending-bg: #3a2c10;
    --locked-bg: #1c2740;
    --focus: #ff3f74;
    --chart: #ff3f74;
    --chart-2: #7c93c9;
    --game: #ff3f74;
    --game-soft: #3a1626;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px rgba(0, 0, 0, .26);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .4), 0 22px 50px rgba(0, 0, 0, .34);
    --shadow-lg: 0 34px 90px rgba(0, 0, 0, .52);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { vertical-align: middle; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.02em; font-weight: 700; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
hr { border: 0; border-top: 1px solid var(--line); }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.narrow { width: min(880px, calc(100% - 48px)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: var(--pill); font-weight: 600;
  transition: top var(--duration) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-condensed); font-weight: 600;
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.display {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.65rem);
  line-height: .98; letter-spacing: -.035em; font-weight: 700;
}
.section-title { font-size: clamp(2rem, 3.4vw, 3.1rem); letter-spacing: -.03em; }
.section-lede { color: var(--muted); font-size: 1.075rem; max-width: 58ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.expanded { font-family: var(--font-expanded); font-weight: 800; letter-spacing: -.01em; }
.condensed { font-family: var(--font-condensed); }
.sample-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--pill);
  border: 1px dashed var(--line-strong); color: var(--muted);
  font-family: var(--font-condensed); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap;
}
.sample-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 1px solid transparent;
  border-radius: var(--pill); background: transparent; color: var(--ink);
  font-weight: 600; font-size: .975rem; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease),
              border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-navy { background: var(--navy); color: var(--on-navy); }
.btn-navy:hover { background: var(--navy-deep); color: var(--on-navy); }
.btn-outline { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-quiet { min-height: 44px; padding: 0 10px; color: var(--muted); }
.btn-quiet:hover { color: var(--ink); background: var(--surface-2); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink); flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-decoration: none; }
.link-arrow:hover { color: var(--accent); }
.link-arrow .od-icon { transition: transform var(--duration) var(--ease); }
.link-arrow:hover .od-icon { transform: translateX(3px); }

/* ---------- shared atoms ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 3px 11px; border-radius: var(--pill);
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: .82rem; font-weight: 500; white-space: nowrap;
}
.chip-accent { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.chip-navy { background: var(--navy); border-color: transparent; color: var(--on-navy); }
.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status-pending { color: var(--pending); background: var(--pending-bg); padding: 3px 10px; border-radius: var(--pill); }
.status-locked { color: var(--muted); background: var(--locked-bg); padding: 3px 10px; border-radius: var(--pill); }
.status-live { color: var(--success); }
.status-live::before { background: var(--success); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.divider { height: 1px; background: var(--line); border: 0; }
.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--navy); color: var(--on-navy);
  font-family: var(--font-condensed); font-weight: 600; font-size: .8rem;
  letter-spacing: .02em; flex: none;
}
.avatar-sm { width: 28px; height: 28px; font-size: .69rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1rem; }
.avatar[data-tone="orange"] { background: var(--accent); color: var(--on-accent); }
.avatar[data-tone="green"] { background: var(--game); color: var(--on-accent); }
.avatar[data-tone="quiet"] { background: var(--surface-3); color: var(--ink); }
.directory-main { min-height: 58vh; }
.directory-hero { padding: clamp(32px, 5vw, 64px) 0; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.directory-hero-inner { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.directory-hero-inner > div:first-child { display: block; }
.directory-hero .breadcrumb { margin-bottom: 28px; }
.directory-hero .eyebrow { color: var(--accent); }
.directory-hero h1 { margin: 8px 0; font-family: var(--font-display); font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -.035em; }
.directory-hero .sub { max-width: 60ch; margin: 0; color: var(--muted); }
.directory-count { display: grid; justify-items: end; gap: 2px; flex: none; color: var(--muted); }
.directory-count b { color: var(--ink); font-family: var(--font-mono); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.directory-section { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(48px, 7vw, 80px); }
.directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.directory-toolbar .search-field { width: min(100%, 420px); }
.directory-hint, .directory-disclaimer { color: var(--muted); font-size: .88rem; }
.directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.directory-player { min-width: 0; padding: 20px; background: var(--surface); }
.directory-player-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.directory-avatar { display: block; width: 68px; height: 68px; flex: none; border-radius: 50%; background: var(--surface-3); }
.directory-player-name { min-width: 0; }
.directory-player-name h2 { margin: 0; overflow-wrap: anywhere; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25; }
.directory-player-name > span { display: block; margin-top: 4px; color: var(--muted); }
.directory-games { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.directory-label { display: block; margin-bottom: 10px; color: var(--muted); font-size: .73rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.directory-game-list { display: flex; flex-wrap: wrap; gap: 8px; }
.directory-game-link { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface-2); color: var(--ink); font-size: .86rem; text-decoration: none; transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease); }
.directory-game-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.directory-game-dot { width: 9px; height: 9px; border-radius: 50%; background: #232d4b; flex: none; }
.directory-game-dot[data-game="eafc26"] { background: #1d5bdb; }
.directory-game-dot[data-game="eafc27"] { background: #00843e; }
.directory-game-dot[data-game="smash"] { background: #e8285b; }
.directory-game-dot[data-game="tennis"] { background: #7c5cbf; }
.directory-game-dot[data-game="tt"] { background: #ff6b5e; }
.directory-game-link .od-icon { color: var(--muted); }
.directory-empty { margin: 18px 0; padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); text-align: center; }
.directory-disclaimer { margin: 18px 0 0; }
.monogram {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: var(--surface-3); color: var(--ink);
  font-family: var(--font-condensed); font-weight: 700; font-size: .67rem;
  letter-spacing: .03em; flex: none;
}
.monogram[data-tone="orange"] { background: var(--accent-soft); color: var(--ink); }
.monogram[data-tone="navy"] { background: var(--navy); color: var(--on-navy); }
.monogram[data-tone="game"] { background: var(--game-soft); color: var(--ink); }
.monogram[data-tone="tennis"] { background: #0f2f24; color: #a58adc; }
.monogram[data-tone="smash"] { background: #101a30; color: #e8285b; }
.monogram[data-tone="tt"] { background: #102242; color: #ff6b5e; }
.player-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-cell .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-cell a { color: var(--ink); text-decoration: none; }
.player-cell a:hover { color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--ink); text-decoration: none; flex: none;
}
.brand:hover { color: var(--ink); }
.crest-plate {
  display: grid; place-items: center; width: 46px; height: 38px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; flex: none; overflow: hidden;
}
.crest-plate img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-word {
  font-family: var(--font-expanded); font-weight: 800;
  font-size: 1.12rem; letter-spacing: -.01em; line-height: 1;
}
.brand-word span { color: var(--accent); }
.brand-sub {
  display: block; margin-top: 3px;
  font-family: var(--font-condensed); font-size: .63rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 13px;
  border-radius: var(--pill); color: var(--muted); text-decoration: none;
  font-size: .92rem; font-weight: 500;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--ink); background: var(--surface-2); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-user { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 600; }
.header-user:hover { color: var(--accent); }
.menu-toggle { display: none; }
.mobile-nav { border-top: 1px solid var(--line); background: var(--bg); padding: 10px 0 16px; }
.mobile-nav a {
  display: flex; align-items: center; min-height: 46px; padding: 0 6px;
  color: var(--ink); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: 0; }

/* ---------- home hero ---------- */
.hero { padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 5vw, 64px); position: relative; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { max-width: 700px; }
.hero-title {
  font-size: clamp(3.05rem, 6.1vw, 6.2rem);
  line-height: .93; letter-spacing: -.042em; font-weight: 700;
  margin: 18px 0 22px;
}
.hero-title .accent { color: var(--accent); display: block; }
.hero-sub { font-size: 1.12rem; line-height: 1.55; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.hero-fact { display: grid; gap: 2px; min-width: 108px; }
.hero-fact b { font-family: var(--font-mono); font-size: 1rem; letter-spacing: -.02em; }
.hero-fact span { color: var(--muted); font-size: .78rem; }
.hero-visual { position: relative; }
.hero-panel {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--navy); color: var(--on-navy);
  border-radius: var(--radius-xl); padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-md);
}
.hero-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: url("../assets/brand/m-crest.png");
  background-repeat: no-repeat; background-position: 112% 118%;
  background-size: 58% auto; opacity: .06; filter: grayscale(1) brightness(3);
}
.hero-panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hero-panel-kicker { font-family: var(--font-condensed); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-navy-muted); }
.hero-panel-title { font-size: 1.35rem; margin-top: 3px; color: var(--on-navy); }
.hero-live {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: var(--pill); background: rgba(255, 255, 255, .1);
  font-size: .73rem; font-family: var(--font-condensed); letter-spacing: .08em; text-transform: uppercase;
}
.hero-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.board {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-md); padding: 8px 14px 10px;
}
.board-head {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 56px 42px;
  gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line);
  font-family: var(--font-condensed); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.board-row {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 56px 42px;
  gap: 8px; align-items: center; padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}
.board-row:last-child { border-bottom: 0; }
.board-row .rank { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.board-player { display: flex; align-items: center; gap: 8px; min-width: 0; }
.board-player .nm { font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-row .elo { font-family: var(--font-mono); font-weight: 700; font-size: .86rem; text-align: right; }
.board-row .move { font-size: .72rem; text-align: right; color: var(--success); font-weight: 600; }
.board-row:first-of-type .move { color: var(--accent); }
.hero-result {
  margin-top: 12px; padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(255, 255, 255, .055);
}
.hero-result-label { font-family: var(--font-condensed); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-muted); width: 100%; }
.result-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--on-navy); font-size: .86rem; }
.result-line .score { font-family: var(--font-mono); font-weight: 700; font-size: 1.06rem; }
.result-line .tag {
  font-family: var(--font-condensed); font-size: .62rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--on-navy-muted);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: 1px 7px;
}
.elo-pop { margin-left: auto; color: var(--accent); font-family: var(--font-mono); font-weight: 700; font-size: .9rem; }

/* ---------- home sections ---------- */
.section { padding: clamp(56px, 7vw, 92px) 0; }
.section-tight { padding: clamp(40px, 5vw, 64px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head .section-lede { margin-top: 10px; }
.section-head-side { flex: none; }
.wash { background: var(--bg-2); }

.games-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.game-card {
  grid-column: span 6;
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 300px; border-radius: var(--radius-xl);
  background: var(--tone-bg, var(--navy)); color: var(--tone-ink, #fff);
  padding: 26px; display: flex; flex-direction: column;
  text-decoration: none; border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--tone-ink, #fff); }
.game-card::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background:
    radial-gradient(circle at 88% 14%, color-mix(in srgb, var(--tone-accent, #0f0) 22%, transparent), transparent 42%),
    linear-gradient(150deg, transparent 52%, color-mix(in srgb, var(--tone-accent, #0f0) 9%, transparent));
}
.game-card::after {
  content: ""; position: absolute; z-index: -1; right: -34px; bottom: -64px;
  width: 220px; height: 220px; border-radius: 50%;
  border: 34px solid color-mix(in srgb, var(--tone-accent, #0f0) 22%, transparent);
  opacity: .55;
}
.game-card[data-tone="eafc"] { --tone-bg: #07130c; --tone-ink: #f2fbf5; --tone-accent: #00c25a; --tone-muted: #a9c8b4; }
.game-card[data-tone="eafc26"] { --tone-bg: #0b152b; --tone-ink: #f4f7ff; --tone-accent: #3b7bff; --tone-muted: #b7c2d8; }
.game-card[data-tone="smash"] { --tone-bg: #22122c; --tone-ink: #fff4fa; --tone-accent: #ef3f6b; --tone-muted: #d7b8c5; }
.game-card[data-tone="tennis"] { --tone-bg: #0f2f24; --tone-ink: #f2f7f3; --tone-accent: #a58adc; --tone-muted: #a7c0b3; }
.game-card[data-tone="tt"] { --tone-bg: #102242; --tone-ink: #f5f8ff; --tone-accent: #ff6b5e; --tone-muted: #b7c5dd; }
.game-card.large { grid-column: span 6; min-height: 342px; }
.game-card.small { grid-column: span 4; min-height: 238px; }
.game-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.game-logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.game-logo[src*="ea-fc"] { height: 38px; }
.game-icon {
  flex: none;
  height: 85px;
  min-width: 85px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.game-icon img {
  height: 100%;
  width: auto;
  display: block;
}
.game-badge {
  font-family: var(--font-condensed); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; padding: 5px 10px; border-radius: var(--pill);
  border: 1px solid color-mix(in srgb, var(--tone-ink, #fff) 26%, transparent);
  color: var(--tone-ink, #fff); white-space: nowrap;
}
.game-badge.live { background: color-mix(in srgb, var(--tone-accent, #0f0) 18%, transparent); border-color: transparent; }
.game-card-body { margin-top: auto; padding-top: 36px; }
.game-card h3 { font-size: clamp(1.5rem, 2.4vw, 2.05rem); color: var(--tone-ink, #fff); letter-spacing: -.03em; }
.game-card p { color: var(--tone-muted, rgba(255,255,255,.7)); font-size: .93rem; max-width: 42ch; margin-top: 7px; }
.game-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.game-card-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--tone-ink, #fff); }
.game-scoreline {
  display: flex; align-items: center; gap: 8px; margin-top: 20px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, #000 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone-ink, #fff) 12%, transparent);
  width: fit-content; max-width: 100%;
  font-size: .8rem; color: var(--tone-ink, #fff);
}
.game-scoreline .score { font-family: var(--font-mono); font-weight: 700; }
.game-scoreline .code {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  background: color-mix(in srgb, var(--tone-accent, #0f0) 22%, transparent);
  font-family: var(--font-condensed); font-weight: 700; font-size: .58rem;
}
.game-mini-mono { font-family: var(--font-condensed); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tone-muted); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step-card { padding: 26px; display: flex; flex-direction: column; min-height: 320px; }
.step-num {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; background: var(--navy); color: var(--on-navy);
  font-family: var(--font-mono); font-weight: 700; font-size: .82rem;
}
.step-card h3 { font-size: 1.45rem; margin-top: 22px; }
.step-card p { color: var(--muted); font-size: .94rem; margin-top: 8px; }
.step-art { margin-top: auto; padding-top: 26px; }
.mini-score {
  display: flex; align-items: center; gap: 8px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2);
  font-size: .78rem; flex-wrap: wrap;
}
.mini-score .score { font-family: var(--font-mono); font-weight: 700; font-size: 1rem; }
.mini-approve { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
.mini-approve .check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--success-soft); color: var(--success); flex: none; }
.mini-approve b { display: block; font-size: .8rem; }
.mini-approve span { display: block; font-size: .7rem; color: var(--muted); }
.mini-bars { display: flex; align-items: flex-end; gap: 7px; height: 74px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
.mini-bars i { display: block; flex: 1; border-radius: 3px 3px 0 0; background: var(--navy); opacity: .9; }
.mini-bars i:nth-child(1) { height: 34%; }
.mini-bars i:nth-child(2) { height: 50%; }
.mini-bars i:nth-child(3) { height: 44%; }
.mini-bars i:nth-child(4) { height: 66%; }
.mini-bars i:nth-child(5) { height: 82%; background: var(--accent); }
.mini-bars i:nth-child(6) { height: 74%; }

.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.format-card { padding: 24px; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease); }
.format-card:hover { border-color: var(--line-strong); transform: translateY(-2px); color: var(--ink); }
.format-card h3 { font-size: 1.35rem; }
.format-card p { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.format-art { margin-top: auto; padding-top: 24px; }
.format-art svg { width: 100%; height: auto; display: block; }

.record-band { background: var(--navy); color: var(--on-navy); padding: clamp(56px, 7vw, 88px) 0; }
.record-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.record-band .eyebrow { color: var(--on-navy-muted); }
.record-band .section-title { color: var(--on-navy); }
.record-band .section-lede { color: var(--on-navy-muted); }
.record-band .sample-tag { border-color: rgba(255, 255, 255, .28); color: var(--on-navy-muted); }
.record-table { background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.record-table .table-wrap { border: 0; box-shadow: none; background: transparent; }
.record-side { display: grid; gap: 14px; }
.snapshot-card {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-lg); padding: 22px;
}
.snapshot-card .label { font-family: var(--font-condensed); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-muted); }
.snapshot-card .big { font-family: var(--font-mono); font-weight: 700; font-size: 3rem; line-height: 1; margin-top: 8px; color: var(--on-navy); }
.snapshot-card .sub { color: var(--on-navy-muted); font-size: .86rem; margin-top: 4px; }
.snapshot-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .11); font-size: .86rem; }
.snapshot-row:last-child { border-bottom: 0; }
.snapshot-row span { color: var(--on-navy-muted); }
.snapshot-row b { color: var(--on-navy); }
.form-dots { display: inline-flex; gap: 4px; }
.form-dot {
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  border-radius: 6px; font-family: var(--font-mono); font-weight: 700; font-size: .6rem;
}
.form-dot.w { background: var(--success-soft); color: var(--success); }
.form-dot.d { background: var(--locked-bg); color: var(--muted); }
.form-dot.l { background: var(--danger-soft); color: var(--danger); }

.future-strip { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
.future-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.future-chip {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); color: var(--ink); text-decoration: none;
}
.future-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.future-swatch { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; color: #fff; font-family: var(--font-condensed); font-weight: 700; font-size: .64rem; }
.future-swatch[data-tone="smash"] { background: #22122c; color: #ef3f6b; }
.future-swatch[data-tone="tennis"] { background: #0f2f24; color: #b9a4e6; }
.future-swatch[data-tone="tt"] { background: #102242; color: #ff6b5e; }
.future-chip b { display: block; font-size: .86rem; }
.future-chip span { display: block; font-size: .7rem; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-navy); padding: 48px 0 32px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, .55fr)); gap: 32px; }
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-brand .brand-word { color: var(--on-navy); }
.footer-brand .brand-sub { color: var(--on-navy-muted); }
.footer-blurb { color: var(--on-navy-muted); font-size: .9rem; max-width: 38ch; margin-top: 14px; }
.footer-col h3 { font-family: var(--font-condensed); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-muted); margin-bottom: 12px; font-weight: 600; }
.footer-col a { display: flex; align-items: center; min-height: 34px; color: var(--on-navy); text-decoration: none; font-size: .88rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .13); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--on-navy-muted); font-size: .76rem; }
.footer-bottom p { max-width: 72ch; }

/* ---------- app shell ---------- */
.app-header .header-inner { min-height: 68px; }
.game-switcher { position: relative; }
.game-switcher > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 5px 12px 5px 8px; border: 1px solid var(--line);
  border-radius: var(--pill); background: var(--surface); cursor: pointer;
  font-weight: 600; font-size: .9rem; color: var(--ink);
}
.game-switcher > summary::-webkit-details-marker { display: none; }
.game-switcher > summary:hover { border-color: var(--line-strong); }
.logo-plate { display: grid; place-items: center; background: #fff; border-radius: 8px; padding: 4px 6px; flex: none; }
.logo-plate img { height: 20px; width: auto; }
.switcher-caret { color: var(--muted); transition: transform var(--duration) var(--ease); }
.game-switcher[open] .switcher-caret { transform: rotate(180deg); }
.switcher-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;
  width: 288px; padding: 8px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.switcher-menu a, .switcher-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 46px; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); text-decoration: none; text-align: left;
}
.switcher-menu a:hover, .switcher-menu button:hover { background: var(--surface-2); }
.switcher-menu a[aria-current="true"] { background: var(--accent-soft); }
.switcher-menu .sw-name { display: block; font-size: .86rem; font-weight: 600; }
.switcher-menu .sw-note { display: block; font-size: .7rem; color: var(--muted); }
.switcher-sep { height: 1px; background: var(--line); margin: 6px 4px; }

.app-body { display: grid; grid-template-columns: 252px minmax(0, 1fr); width: min(1440px, 100%); margin-inline: auto; }
.sidebar {
  padding: 26px 16px 40px; border-right: 1px solid var(--line);
  position: sticky; top: 68px; align-self: start;
  height: calc(100vh - 68px); overflow-y: auto;
}
.side-group + .side-group { margin-top: 24px; }
.side-label {
  padding: 0 12px 8px; font-family: var(--font-condensed); font-size: .65rem;
  letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.side-nav { display: grid; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 0 12px; border-radius: 11px; color: var(--muted);
  text-decoration: none; font-size: .91rem; font-weight: 500; border: 0; background: transparent;
  width: 100%; text-align: left;
}
.side-link .od-icon { color: var(--muted); }
.side-link:hover { background: var(--surface-2); color: var(--ink); }
.side-link:hover .od-icon { color: var(--ink); }
.side-link[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.side-link[aria-current="page"] .od-icon { color: var(--accent); }
.side-badge {
  margin-left: auto; display: inline-grid; place-items: center;
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: var(--pill);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-mono); font-size: .64rem; font-weight: 700;
}
.app-main { padding: 30px 32px 80px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(2rem, 3.2vw, 2.8rem); }
.page-head .sub { color: var(--muted); font-size: .95rem; margin-top: 6px; max-width: 62ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; margin-bottom: 10px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { opacity: .5; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 18px; }
.stat-card .label { font-family: var(--font-condensed); font-size: .65rem; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.stat-card .value { font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.55rem, 2.3vw, 2rem); line-height: 1.1; margin-top: 8px; letter-spacing: -.03em; }
.stat-card .foot { color: var(--muted); font-size: .76rem; margin-top: 6px; }
.stat-card .foot .up { color: var(--success); font-weight: 600; }
.stat-card .foot .accent { color: var(--accent); font-weight: 600; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .75fr); gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 1.08rem; letter-spacing: -.01em; }
.panel-head .sub { color: var(--muted); font-size: .78rem; margin-top: 3px; }
.panel-body { padding: 18px 20px 20px; }
.panel-body.flush { padding: 0; }
.panel-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-link { font-size: .84rem; font-weight: 600; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.panel-link:hover { color: var(--accent); }

.table-wrap { width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 620px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th {
  font-family: var(--font-condensed); font-size: .64rem; letter-spacing: .11em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
  background: var(--surface-2); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
td.r, th.r { text-align: right; }
td.c, th.c { text-align: center; }
.table-note { color: var(--muted); font-size: .78rem; padding: 12px 16px; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-actions .btn { min-height: 32px; padding: 0 10px; font-size: .78rem; }

.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); gap: 2px; }
.segmented button {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--pill);
  background: transparent; color: var(--muted); font-size: .82rem; font-weight: 600;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); }
.search-field { position: relative; min-width: 220px; flex: 1; max-width: 340px; }
.search-field .od-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field input { padding-left: 40px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .74rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: .92rem;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.textarea { min-height: 96px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .74rem; font-weight: 500; }
.field-error:empty { display: none; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; font-size: .88rem; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.check .check-copy { display: block; }
.check .check-copy b { display: block; font-weight: 600; }
.check .check-copy span { display: block; color: var(--muted); font-size: .76rem; margin-top: 1px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-section { display: grid; gap: 14px; }
.form-section + .form-section { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-section-title { font-size: .72rem; font-family: var(--font-condensed); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.demo-note {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px;
  border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px dashed var(--line-strong); color: var(--muted); font-size: .76rem;
}
.demo-note .od-icon { color: var(--accent); margin-top: 1px; }

/* ---------- match rows / dialogs ---------- */
.match-summary { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: .84rem; }
.match-summary .side { display: inline-flex; align-items: center; gap: 6px; }
.match-summary .score { font-family: var(--font-mono); font-weight: 700; font-size: .95rem; }
.match-summary .tag { font-family: var(--font-condensed); font-size: .6rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.delta-up { color: var(--success); font-weight: 700; font-family: var(--font-mono); }
.delta-down { color: var(--danger); font-weight: 700; font-family: var(--font-mono); }
.delta-flat { color: var(--muted); font-family: var(--font-mono); }

dialog.dialog {
  width: min(620px, calc(100% - 32px)); max-height: calc(100vh - 64px);
  margin: auto; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg); overflow: auto;
}
dialog.dialog::backdrop { background: rgba(8, 13, 26, .58); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.25rem; }
.dialog-head .sub { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.dialog-body { padding: 20px 22px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.dialog-close { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); flex: none; }
.dialog-close:hover { background: var(--surface-2); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 18px);
  z-index: 90; max-width: min(520px, calc(100% - 32px));
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--navy); color: var(--on-navy);
  box-shadow: var(--shadow-lg); font-size: .84rem; line-height: 1.45;
  opacity: 0; pointer-events: none; transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .od-icon { color: var(--accent); margin-top: 2px; }

/* ---------- game views ---------- */
.view { display: grid; gap: 16px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view-head h2 { font-size: 1.35rem; }
.view-head .sub { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.section-stack { display: grid; gap: 16px; }

.leader-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.leader-row:last-child { border-bottom: 0; }
.leader-rank { width: 26px; font-family: var(--font-mono); font-weight: 700; color: var(--muted); flex: none; }
.leader-row:first-child .leader-rank { color: var(--accent); }
.leader-name { flex: 1; min-width: 0; }
.leader-name b { display: block; font-size: .9rem; }
.leader-name span { display: block; font-size: .72rem; color: var(--muted); }
.leader-elo { font-family: var(--font-mono); font-weight: 700; font-size: .95rem; }
.leader-move { width: 52px; text-align: right; font-size: .72rem; color: var(--muted); }

.activity-list { display: grid; gap: 0; }
.activity-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); color: var(--muted); flex: none; }
.activity-copy { min-width: 0; flex: 1; }
.activity-copy b { display: block; font-size: .85rem; }
.activity-copy span { display: block; font-size: .74rem; color: var(--muted); margin-top: 2px; }
.activity-meta { font-size: .72rem; color: var(--muted); white-space: nowrap; }

.competition-card { display: flex; flex-direction: column; padding: 20px; color: var(--ink); text-decoration: none; gap: 10px; transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease); }
.competition-card:hover { border-color: var(--line-strong); transform: translateY(-2px); color: var(--ink); }
.competition-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.competition-card h3 { font-size: 1.18rem; }
.competition-card .meta { color: var(--muted); font-size: .8rem; }
.competition-progress { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: auto; }
.competition-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.competition-card-foot { display: flex; justify-content: space-between; gap: 10px; font-size: .74rem; color: var(--muted); }

.record-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 16px; align-items: start; }
.record-summary { position: sticky; top: 88px; }
.summary-match { padding: 18px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); }
.summary-club { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; }
.summary-score { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.summary-score .score { font-family: var(--font-mono); font-weight: 700; font-size: 2.1rem; line-height: 1; }
.summary-score .vs { color: var(--muted); font-size: .7rem; font-family: var(--font-condensed); letter-spacing: .1em; text-transform: uppercase; }
.summary-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.summary-meta { margin-top: 14px; display: grid; gap: 8px; font-size: .76rem; color: var(--muted); }
.summary-meta div { display: flex; justify-content: space-between; gap: 12px; }
.summary-meta b { color: var(--ink); font-weight: 600; }
.summary-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.summary-team { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .7rem; font-weight: 500; color: var(--muted); }
.summary-team .star-rating { font-size: .76rem; }
.star-rating { display: inline-flex; gap: 1px; line-height: 1; font-size: .74rem; letter-spacing: 0; }
.star-glyph { position: relative; display: inline-block; }
.star-glyph .base { opacity: .25; }
.star-glyph .on { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: var(--accent); }
.elo-projection { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.elo-projection[hidden] { display: none; }
.elo-projection-head { display: flex; justify-content: space-between; gap: 8px; font-family: var(--font-condensed); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.elo-projection-head span:last-child { color: var(--accent); }
.elo-projection-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 7px; font-size: .76rem; }
.elo-projection-row span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elo-projection-row b { font-family: var(--font-mono); font-size: .8rem; }
.elo-projection-note { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .64rem; color: var(--muted); }
.club-preview { display: flex; align-items: center; gap: 10px; min-height: 46px; margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); font-size: .8rem; }

/* ---------- bracket ---------- */
.bracket-scroll { overflow-x: auto; padding: 4px 2px 12px; }
.bracket { display: flex; gap: 26px; min-width: 760px; align-items: stretch; }
.bracket-round { min-width: 220px; display: flex; flex-direction: column; justify-content: space-around; gap: 14px; }
.bracket-round-title { font-family: var(--font-condensed); font-size: .64rem; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding-left: 2px; }
.bracket-node { position: relative; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.bracket-node p { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .8rem; padding: 3px 0; }
.bracket-node p + p { border-top: 1px solid var(--line); margin-top: 2px; padding-top: 6px; }
.bracket-node .winner { font-weight: 700; color: var(--success); }
.bracket-node .score { font-family: var(--font-mono); font-weight: 700; }
.bracket-node .bye { color: var(--muted); font-size: .72rem; }
.bracket-round:not(:last-child) .bracket-node::after {
  content: ""; position: absolute; right: -27px; top: 50%; width: 26px;
  border-top: 1px solid var(--line-strong);
}
.bracket-node.champion { border-color: var(--accent); background: var(--accent-soft); }
.bracket-node.champion::before {
  content: "Champion"; display: block; font-family: var(--font-condensed);
  font-size: .58rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}

/* ---------- player ---------- */
.player-hero { background: var(--navy); color: var(--on-navy); border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 36px); position: relative; overflow: hidden; isolation: isolate; }
.player-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: url("../assets/brand/m-crest.png");
  background-repeat: no-repeat; background-position: 104% 118%;
  background-size: 38% auto; opacity: .06; filter: grayscale(1) brightness(3);
}
.player-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.player-id { display: flex; align-items: center; gap: 16px; }
.player-id .avatar { width: 64px; height: 64px; font-size: 1.15rem; background: rgba(255,255,255,.12); color: var(--on-navy); }
.player-id h1 { font-size: clamp(2rem, 3.5vw, 2.9rem); color: var(--on-navy); }
.player-id .handle { color: var(--on-navy-muted); font-size: .84rem; margin-top: 3px; }
.player-flairs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.player-flairs .chip { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.16); color: var(--on-navy); }
.player-elo { text-align: right; }
.player-elo .value { font-family: var(--font-mono); font-weight: 700; font-size: clamp(2.8rem, 5vw, 4.2rem); line-height: 1; letter-spacing: -.04em; }
.player-elo .label { font-family: var(--font-condensed); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-muted); margin-top: 6px; }
.player-elo .peak { color: var(--on-navy-muted); font-size: .78rem; margin-top: 4px; }
.player-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.player-stat { min-width: 92px; }
.player-stat b { display: block; font-family: var(--font-mono); font-size: 1.15rem; color: var(--on-navy); }
.player-stat span { display: block; font-family: var(--font-condensed); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-navy-muted); margin-top: 2px; }
.spark-wrap { padding: 18px 20px 12px; }
.spark { width: 100%; height: auto; display: block; }
.spark-axis { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); }
.spark-label { font-family: var(--font-mono); font-size: 10px; fill: var(--ink); font-weight: 700; }
.player-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 16px; align-items: start; }

/* ---------- auth ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.auth-visual {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--navy); color: var(--on-navy);
  padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column;
}
.auth-visual::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: url("../assets/brand/m-crest.png");
  background-repeat: no-repeat; background-position: 110% 112%;
  background-size: 52% auto; opacity: .08; filter: grayscale(1) brightness(3);
}
.auth-visual .brand { color: var(--on-navy); }
.auth-visual .brand-word { color: var(--on-navy); }
.auth-visual .brand-sub { color: var(--on-navy-muted); }
.auth-visual .crest-plate { border-color: rgba(255,255,255,.18); }
.auth-headline { margin-top: auto; max-width: 620px; padding-top: 60px; }
.auth-headline h1 { font-size: clamp(2.5rem, 4.6vw, 4.4rem); line-height: .98; letter-spacing: -.035em; color: var(--on-navy); }
.auth-headline h1 span { color: var(--accent); display: block; }
.auth-headline p { color: var(--on-navy-muted); font-size: 1rem; max-width: 46ch; margin-top: 16px; }
.auth-board { margin-top: 36px; max-width: 460px; }
.auth-board .board { box-shadow: var(--shadow-lg); }
.auth-board .board-head, .auth-board .board-row { grid-template-columns: 24px minmax(0, 1fr) 56px; }
.auth-board .board-head span:last-child, .auth-board .board-row .elo { text-align: right; }
.auth-foot { margin-top: 34px; font-size: .72rem; color: var(--on-navy-muted); max-width: 52ch; }
.auth-main { display: grid; place-items: center; padding: clamp(24px, 5vw, 56px); background: var(--bg); }
.auth-card { width: min(440px, 100%); }
.auth-card .brand { display: none; }
.auth-card-head { margin-bottom: 22px; }
.auth-card-head h2 { font-size: 2rem; }
.auth-card-head p { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.auth-tabs { margin-bottom: 20px; }
.auth-form { display: grid; gap: 14px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; font-size: .78rem; }
.auth-links a { color: var(--muted); text-decoration: none; }
.auth-links a:hover { color: var(--ink); }
.auth-note { margin-top: 18px; }

/* ---------- account / admin ---------- */
.settings-tabs { margin: 18px 0 22px; overflow-x: auto; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.settings-card { padding: 22px; }
.settings-card h2 { font-size: 1.2rem; }
.settings-card .sub { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.settings-form { display: grid; gap: 14px; margin-top: 20px; max-width: 640px; }
.settings-side { display: grid; gap: 14px; position: sticky; top: 88px; }
.notice-card { padding: 18px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--line); }
.notice-card h3 { font-size: .95rem; }
.notice-card p { color: var(--muted); font-size: .8rem; margin-top: 6px; }
.flair-list { display: grid; gap: 12px; margin-top: 18px; }
.flair-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); flex-wrap: wrap; }
.flair-item .flair-name { font-size: .84rem; font-weight: 600; }
.flair-item .flair-value { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.role-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--pill); font-size: .68rem; font-weight: 600; background: var(--surface-3); color: var(--ink-2); }
.role-chip.site { background: var(--accent-soft); color: var(--ink); }
.role-chip.game { background: var(--game-soft); color: var(--ink); }
.toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.toggle input { width: 38px; height: 22px; appearance: none; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background var(--duration) var(--ease); }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform var(--duration) var(--ease); }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(16px); }
.catalog-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.catalog-row:last-child { border-bottom: 0; }
.catalog-row .code { font-family: var(--font-mono); font-weight: 700; font-size: .74rem; width: 38px; color: var(--muted); }
.catalog-row .club { flex: 1; min-width: 0; }
.catalog-row .stars { color: var(--accent); font-family: var(--font-mono); font-size: .72rem; }
.dropzone { display: grid; place-items: center; text-align: center; padding: 28px 18px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface-2); color: var(--muted); cursor: pointer; transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease); }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.dropzone .od-icon { color: var(--accent); margin-bottom: 8px; }
.dropzone b { display: block; color: var(--ink); font-size: .88rem; }
.dropzone span { display: block; font-size: .76rem; margin-top: 3px; }
.theme-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.theme-controls { display: grid; gap: 12px; }
.color-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.color-row:last-child { border-bottom: 0; }
.color-row input[type="color"] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.theme-preview {
  --preview-bg: #232d4b; --preview-surface: #ffffff; --preview-ink: #232d4b;
  --preview-accent: #e57200; --preview-radius: 20px;
  background: var(--preview-bg); border-radius: var(--radius-lg);
  padding: 18px; min-height: 260px; display: flex; flex-direction: column; gap: 10px;
}
.theme-preview .tp-card { background: var(--preview-surface); color: var(--preview-ink); border-radius: var(--preview-radius); padding: 14px; }
.theme-preview .tp-card h4 { font-size: 1rem; }
.theme-preview .tp-card p { font-size: .72rem; color: color-mix(in srgb, var(--preview-ink) 66%, var(--preview-surface)); margin-top: 4px; }
.theme-preview .tp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--preview-accent); color: var(--preview-ink); font-size: .72rem; font-weight: 700; margin-top: 10px; }
.theme-preview .tp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--preview-ink) 14%, var(--preview-surface)); font-size: .72rem; }
.theme-preview .tp-row:last-child { border-bottom: 0; }
.theme-preview .tp-note { font-family: var(--font-condensed); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, #fff 78%, transparent); }

/* ---------- misc ---------- */
.notice-strip { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.notice-strip .od-icon { color: var(--accent); margin-top: 1px; }
.empty-state { padding: 42px 20px; text-align: center; }
.empty-state .od-icon { color: var(--muted); margin-bottom: 10px; }
.empty-state h3 { font-size: 1.1rem; }
.empty-state p { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.stars { color: var(--accent); font-family: var(--font-mono); font-size: .72rem; letter-spacing: -.04em; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: 760px; }
  .hero-visual { max-width: 620px; }
  .dashboard-grid, .record-grid, .settings-layout, .player-grid { grid-template-columns: 1fr; }
  .settings-side, .record-summary { position: static; }
  .games-grid .game-card.large { grid-column: span 12; }
  .games-grid .game-card.small { grid-column: span 6; }
  .future-strip { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .app-body { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line);
    padding: 10px 16px 12px; overflow: visible;
  }
  .sidebar .side-group { margin: 0; }
  .sidebar .side-group + .side-group { margin-top: 0; }
  .sidebar .side-label { display: none; }
  .side-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-link { width: auto; flex: none; min-height: 40px; padding: 0 13px; border: 1px solid var(--line); background: var(--surface); }
  .side-link[aria-current="page"] { border-color: transparent; }
  .side-group:last-child .side-nav { margin-top: 8px; }
  .app-main { padding: 24px 20px 64px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-top .footer-col:last-child { grid-column: span 2; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { min-height: auto; padding: 32px 24px; }
  .auth-headline { padding-top: 34px; }
  .auth-headline h1 { font-size: clamp(2.1rem, 6vw, 3rem); }
  .auth-board { display: none; }
  .auth-main { padding: 40px 24px 64px; }
  .auth-card .brand { display: inline-flex; margin-bottom: 24px; }
  .theme-editor { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .header-actions .header-login { display: none; }
  .menu-toggle { display: inline-grid; }
  .header-actions { gap: 6px; }
  .header-actions .btn-primary { display: none; }
  .mobile-nav[data-open="true"] { display: block; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .steps, .formats { grid-template-columns: 1fr; }
  .step-card { min-height: 0; }
  .record-grid, .player-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .record-summary, .settings-side { position: static; }
  .record-band .record-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .footer-top .footer-col:last-child { grid-column: auto; }
  .settings-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .wrap, .narrow { width: calc(100% - 32px); }
  .directory-grid { grid-template-columns: minmax(0, 1fr); }
  .directory-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .directory-hero-inner { align-items: flex-start; }
  .hero { padding-top: 36px; }
  .hero-title { font-size: clamp(2.8rem, 13vw, 4.2rem); }
  .hero-actions .btn { width: 100%; }
  .hero-facts { gap: 14px 18px; }
  .hero-fact { min-width: 92px; }
  .games-grid { grid-template-columns: 1fr; }
  .games-grid .game-card.large, .games-grid .game-card.small { grid-column: span 1; min-height: 230px; }
  .game-card.large { min-height: 250px; }
  .future-chips { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .app-main { padding: 20px 16px 56px; }
  .page-head { align-items: flex-start; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .formats { grid-template-columns: 1fr; }
  .record-layout { grid-template-columns: 1fr; }
  .panel-head { padding: 14px 16px 12px; }
  .panel-body { padding: 16px; }
  .panel-body.flush { padding: 0; }
  .settings-card { padding: 18px; }
  .auth-main { padding: 28px 16px 48px; }
  .auth-visual { padding: 24px 16px; }
  .auth-headline h1 { font-size: 2.2rem; }
  .footer-top { grid-template-columns: 1fr; gap: 22px; }
  .footer-brand, .footer-top .footer-col:last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .dialog-head, .dialog-body, .dialog-foot { padding-left: 16px; padding-right: 16px; }
  .bracket { min-width: 680px; }
  .bracket-round { min-width: 200px; }
  .player-hero-grid { grid-template-columns: 1fr; }
  .player-elo { text-align: left; }
  .player-id { align-items: flex-start; }
  .leader-move { display: none; }
}
@media (max-width: 480px) {
  .brand-sub { display: none; }
  .brand-word { font-size: 1.02rem; }
  .crest-plate { width: 40px; height: 34px; }
  .header-actions .header-user span { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .hero-fact { min-width: 40%; }
  .game-card { padding: 20px; }
  .board { padding: 6px 10px 8px; }
  .board-head, .board-row { grid-template-columns: 20px minmax(0, 1fr) 48px; }
  .board-head span:last-child, .board-row .move { display: none; }
  .hero-result { gap: 8px; }
  .elo-pop { margin-left: 0; }
  .player-id .avatar { width: 52px; height: 52px; }
  .settings-tabs { margin-bottom: 16px; }
  .segmented { width: 100%; overflow-x: auto; }
  .segmented button { flex: 1; white-space: nowrap; }
  .flair-item { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* thin scrollbars inside tables and rails on desktop */
@supports (scrollbar-width: thin) {
  .table-wrap, .bracket-scroll, .side-nav, .od-rail { scrollbar-width: thin; }
}

/* ---------- minimal home gateway ---------- */
.avatar { overflow: hidden; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--bg); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-count { background: var(--surface-3); color: var(--ink); font-size: .62rem; letter-spacing: 0; }
.avatar-stack-dark .avatar { background: color-mix(in srgb, var(--tone-ink, #fff) 18%, transparent); color: var(--tone-ink, #fff); box-shadow: 0 0 0 2px var(--tone-bg, var(--navy)); }
.avatar-stack-dark .avatar-count { background: color-mix(in srgb, var(--tone-ink, #fff) 26%, transparent); color: var(--tone-ink, #fff); }

.home-hero { padding: clamp(44px, 7vw, 86px) 0 clamp(26px, 4vw, 46px); }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .62fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.home-title { font-size: clamp(3.4rem, 7.4vw, 6.2rem); line-height: .92; letter-spacing: -.045em; margin: 16px 0 18px; }
.home-sub { font-size: clamp(1rem, 1.5vw, 1.14rem); line-height: 1.55; color: var(--muted); max-width: 44ch; }
.home-players { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.home-players-copy { display: grid; gap: 2px; }
.home-players-copy b { font-size: .9rem; }
.home-players-copy span { color: var(--muted); font-size: .76rem; }
.home-mark { position: relative; display: grid; place-items: center; width: min(340px, 100%); aspect-ratio: 1; margin-left: auto; }
.home-mark::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 50%; }
.home-mark::after { content: ""; position: absolute; inset: 12%; border: 1px dashed var(--line-strong); border-radius: 50%; opacity: .75; }
.home-mark img { position: relative; z-index: 1; width: 56%; height: auto; filter: drop-shadow(0 22px 26px rgba(35, 45, 75, .16)); }

.gateway-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.gateway-head .section-title { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.gateway-note { color: var(--muted); font-size: .9rem; }
.game-card-foot .game-mini-mono { display: inline-flex; align-items: center; gap: 5px; }

.last-approved-band { background: var(--navy); color: var(--on-navy); padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.last-approved-band .hero-result { margin: 0; }
.last-approved-band .avatar { background: rgba(255, 255, 255, .14); color: var(--on-navy); }
.last-approved-band .result-line { color: var(--on-navy); }
.last-approved-band .result-line .tag { color: var(--on-navy-muted); }

@media (max-width: 1120px) and (min-width: 861px) {
  .games-grid .game-card.large { grid-column: span 6; }
  .games-grid .game-card.small { grid-column: span 4; }
}
@media (max-width: 760px) {
  .home-hero { padding-top: 38px; }
  .home-hero-grid { grid-template-columns: 1fr; }
  .home-mark { display: none; }
  .home-title { font-size: clamp(3rem, 14vw, 4.6rem); }
  .gateway-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .last-approved-band { padding: 18px 0; }
  .last-approved-band .hero-result { padding: 12px; }
}

/* ---------- app shell additions ---------- */
.app-head-inner { width: min(1440px, calc(100% - 48px)); margin-inline: auto; }
.competition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.segmented button[aria-selected="true"] { background: var(--navy); color: var(--on-navy); }

@media (max-width: 1120px) {
  .competition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .app-head-inner { width: calc(100% - 32px); }
  .competition-grid { grid-template-columns: 1fr; }
  .segmented { width: 100%; overflow-x: auto; }
  .segmented button { flex: 1; white-space: nowrap; }
}
@media (max-width: 520px) {
  .game-switcher > summary .logo-plate { display: none; }
  .header-actions .header-user > span:not(.avatar) { display: none; }
}
@media (max-width: 480px) {
  .header-actions .header-user .avatar { display: inline-grid; }
}

/* ---------- detail pages ---------- */
.detail-main { padding: 30px 0 80px; }
.player-hero h1 { color: var(--on-navy); }
.player-hero-sub { color: var(--on-navy-muted); font-size: .95rem; max-width: 58ch; margin-top: 12px; }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px; }
.group-grid .panel-head { padding: 14px 16px 12px; }
@media (max-width: 760px) {
  .detail-main { padding: 22px 0 56px; }
  .group-grid { grid-template-columns: 1fr; }
}

/* ---------- account avatar editor ---------- */
.avatar-editor { display: flex; align-items: flex-start; gap: 18px; margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); flex-wrap: wrap; }
.avatar-editor .avatar { width: 84px; height: 84px; font-size: 1.4rem; }
.avatar-editor .avatar img { border-radius: 50%; }
.avatar-editor-copy { flex: 1; min-width: 220px; }
.avatar-editor-copy b { display: block; font-size: .9rem; }
.avatar-editor-copy p { color: var(--muted); font-size: .78rem; margin-top: 3px; }
.avatar-editor-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- admin extras ---------- */
.theme-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--surface); }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-row .chip { cursor: pointer; }
.preset-row .chip[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); border-color: transparent; }

/* ---------- mobile header / auth fit ---------- */
.auth-card { width: 100%; max-width: 440px; min-width: 0; }
.auth-main { min-width: 0; }
.auth-tabs, .auth-form { min-width: 0; }
@media (max-width: 700px) {
  .app-header .brand-sub { display: none; }
  .app-header .header-actions .icon-btn { display: none; }
  .app-header .game-switcher > summary { min-height: 42px; }
  .game-switcher .switcher-menu { left: auto; right: 0; width: min(288px, calc(100vw - 32px)); }
}
@media (max-width: 480px) {
  .app-header .brand-word { font-size: 1rem; }
  .app-header .crest-plate { width: 38px; height: 32px; }
}

/* ---------- per-match teams ---------- */
.team-stack { display: inline-flex; align-items: center; }
.team-stack .monogram { width: 26px; height: 26px; font-size: .6rem; border-radius: 7px; }
.team-stack .monogram + .monogram { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.team-stack .team-more { margin-left: 6px; font-family: var(--font-mono); font-size: .68rem; color: var(--muted); }
.team-pair { display: inline-flex; align-items: center; gap: 5px; }
.team-pair .monogram { width: 24px; height: 24px; font-size: .56rem; border-radius: 6px; }
.team-pair .pair-v { font-family: var(--font-condensed); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.team-usage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.team-usage:first-child { border-top: 0; padding-top: 0; }
.team-usage:last-child { padding-bottom: 0; }
.team-usage .monogram { width: 28px; height: 28px; font-size: .62rem; border-radius: 8px; }
.team-usage .usage-name { font-weight: 600; font-size: .84rem; min-width: 0; }
.team-usage .usage-name b { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); }
.team-usage .usage-pct { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.team-usage .usage-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.team-usage .usage-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.team-usage.is-fav .monogram { background: var(--accent-soft); color: var(--ink); }
.usage-fav { font-family: var(--font-condensed); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }

.panel, .section-stack, .dashboard-grid > * { min-width: 0; }
.table-wrap { max-width: 100%; }

/* ---------- team picker ---------- */
dialog.dialog.team-dialog { width: min(880px, calc(100% - 32px)); display: flex; flex-direction: column; overflow: hidden; }
.team-dialog .dialog-body { overflow-y: auto; min-height: 0; }
.team-picker-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.team-picker-toolbar .segmented { flex: none; }
.team-picker-toolbar .search-field { flex: 1; min-width: 220px; max-width: none; }
.team-picker-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.team-picker-filters .field { gap: 5px; }
.team-quick { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.team-quick:empty { display: none; }
.team-quick-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; cursor: pointer; font: inherit; }
.team-quick-chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.team-quick-chip .monogram { width: 22px; height: 22px; border-radius: 6px; font-size: .54rem; }
.team-quick-chip span { font-size: .76rem; font-weight: 500; }
.team-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 18px; font-family: var(--font-condensed); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.team-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; max-height: 330px; overflow-y: auto; padding: 2px; }
.team-option { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.team-option:hover { border-color: var(--line-strong); background: var(--surface-2); }
.team-option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.team-option .monogram { width: 32px; height: 32px; border-radius: 9px; font-size: .6rem; }
.team-option-copy { min-width: 0; }
.team-option-copy b { display: block; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-option-copy span { display: block; font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.team-empty { grid-column: 1 / -1; padding: 34px 20px; text-align: center; color: var(--muted); font-size: .84rem; }
.team-picker-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.team-picker-btn:hover { border-color: var(--muted); }
.team-picker-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.team-picker-btn .monogram { width: 34px; height: 34px; border-radius: 9px; font-size: .62rem; }
.team-picker-btn .team-btn-copy { flex: 1; min-width: 0; }
.team-picker-btn b { display: block; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-picker-btn small { display: block; font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.team-picker-btn .switcher-caret { color: var(--muted); flex: none; }
@media (max-width: 720px) {
  .team-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  dialog.dialog.team-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .team-picker-filters { grid-template-columns: 1fr; }
  .team-results { grid-template-columns: 1fr; max-height: none; }
}

.competition-card-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 84%, #000); color: #fff; }
.btn-danger-quiet { color: var(--danger); }
.btn-danger-quiet:hover { background: var(--danger-soft); color: var(--danger); }
.comp-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

dialog.dialog.comp-create { width: min(760px, calc(100% - 32px)); }
.comp-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.comp-step { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: .76rem; font-weight: 600; }
.comp-step-dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-family: var(--font-mono); font-size: .68rem; flex: none; }
.comp-step[data-state="active"] { border-color: var(--line-strong); color: var(--ink); }
.comp-step[data-state="active"] .comp-step-dot { background: var(--navy); color: var(--on-navy); }
.comp-step[data-state="done"] .comp-step-dot { background: var(--accent); color: var(--on-accent); }

.format-options { display: grid; gap: 8px; }
.format-option { position: relative; display: block; cursor: pointer; }
.format-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.format-option-body { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease); }
.format-option:hover .format-option-body { border-color: var(--muted); }
.format-option input:checked + .format-option-body { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); box-shadow: inset 0 0 0 1px var(--accent); }
.format-option input:focus-visible + .format-option-body { outline: 3px solid color-mix(in srgb, var(--accent) 24%, transparent); outline-offset: 1px; }
.format-option-body .monogram { flex: none; margin-top: 1px; }
.format-option-copy { min-width: 0; }
.format-option-copy b { display: block; font-size: .9rem; }
.format-option-copy span { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }

.player-select { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.player-option { position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease); }
.player-option:hover { border-color: var(--muted); }
.player-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.player-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.player-option input:focus-visible ~ .player-option-check { outline: 3px solid color-mix(in srgb, var(--accent) 24%, transparent); outline-offset: 2px; }
.player-option-copy { display: grid; gap: 1px; min-width: 0; flex: 1; }
.player-option-copy b { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-option-copy span { color: var(--muted); font-size: .72rem; font-family: var(--font-mono); }
.player-option-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); color: transparent; flex: none; }
.player-option:has(input:checked) .player-option-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.comp-selection-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.comp-selection-actions .btn { min-height: 32px; padding: 0 9px; font-size: .78rem; }

.comp-preview { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); padding: 14px; }
.comp-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: .78rem; font-weight: 600; }
.comp-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.comp-preview-grid div { display: grid; gap: 2px; min-width: 0; }
.comp-preview-grid span { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-condensed); }
.comp-preview-grid b { font-family: var(--font-mono); font-size: 1rem; }
.comp-preview-note { color: var(--muted); font-size: .74rem; margin-top: 10px; }

.bracket-node .side-tbd { color: var(--muted); }

@media (max-width: 700px) {
  dialog.dialog.comp-create { width: calc(100% - 16px); max-height: calc(100vh - 16px); }
  .comp-steps { grid-template-columns: 1fr; }
  .player-select { grid-template-columns: 1fr; }
  .comp-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comp-actions { margin-left: 0; width: 100%; }
  .comp-actions .btn { flex: 1; }
  .format-option-body { padding: 11px 12px; }
}

/* ---------- tennis ---------- */
.identity-stack { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flag-chip {
  display: inline-grid; place-items: center; min-width: 34px; height: 22px; padding: 0 7px;
  border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line-strong);
  font-family: var(--font-condensed); font-weight: 700; font-size: .62rem; letter-spacing: .06em; color: var(--ink-2);
}
.tier-chip {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--pill);
  font-family: var(--font-condensed); font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700;
  background: var(--locked-bg); color: var(--muted);
}
.tier-chip[data-tier="elite"] { background: var(--accent-soft); color: var(--accent); }
.tier-chip[data-tier="contender"] { background: var(--success-soft); color: var(--success); }
.tier-chip[data-tier="challenger"] { background: var(--pending-bg); color: var(--pending); }
.tier-chip[data-tier="rookie"] { background: var(--locked-bg); color: var(--muted); }

.surface-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill);
  font-family: var(--font-condensed); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-2);
}
.surface-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-dot, #8892a6); }
.surface-chip[data-surface="grass"] { --surface-dot: #2e9e57; }
.surface-chip[data-surface="clay"] { --surface-dot: #c2571f; }
.surface-chip[data-surface="hardcourt"] { --surface-dot: #1d5bdb; }

.set-score { font-family: var(--font-mono); font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.tennis-set-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tennis-scoreboard { display: block; width: 100%; min-width: 0; margin: 14px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: .78rem; }
.tennis-score-row { display: grid; grid-template-columns: var(--tennis-score-columns); gap: 4px; align-items: center; min-height: 34px; }
.tennis-score-row + .tennis-score-row { border-top: 1px solid var(--line); }
.tennis-score-head { color: var(--muted); font-family: var(--font-condensed); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.tennis-score-head + .tennis-score-row { border-top: 1px solid var(--line); }
.tennis-score-player { display: flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; }
.tennis-score-player > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.tennis-score-cell { display: block; text-align: center; color: var(--ink-2); font-family: var(--font-mono); white-space: nowrap; }
.tennis-score-cell.set-winner { color: var(--ink); font-weight: 800; }
.tennis-score-cell sup { font-size: .58em; vertical-align: super; }
.tennis-score-row.match-winner .tennis-score-player { color: var(--ink); font-weight: 700; }
.tennis-score-total, .tennis-score-total-head { display: block; border-left: 1px solid var(--line); text-align: center; font-family: var(--font-mono); font-weight: 800; }
.tennis-score-total-head { color: var(--muted); font-family: var(--font-condensed); font-size: .58rem; letter-spacing: .04em; text-transform: uppercase; }
.record-summary .tennis-scoreboard { font-size: .84rem; }
.record-summary .tennis-score-row { min-height: 38px; }

.tennis-form .set-grid { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto minmax(0, 1fr) minmax(72px, .4fr); gap: 8px; align-items: center; }
.tennis-form .set-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto minmax(0, 1fr) minmax(72px, .4fr); gap: 8px; align-items: center; }
.tennis-form .set-head { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto minmax(0, 1fr) minmax(72px, .4fr); gap: 8px; margin-bottom: 6px; font-family: var(--font-condensed); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tennis-form .set-label { text-align: center; font-family: var(--font-condensed); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tennis-form .tb-in { width: 100%; }
.tennis-form .set-row-label { color: var(--muted); text-align: center; font-family: var(--font-mono); font-size: .75rem; }
.tennis-form .partner-label { color: var(--muted); font-size: .72rem; }
.tennis-summary { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.tennis-summary .sets-line { font-family: var(--font-mono); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.tennis-summary .meta-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tt-record-form .tt-game-head, .tt-record-form .tt-game-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr); gap: 9px; align-items: center; }
.tt-record-form .tt-game-head { margin-bottom: 6px; color: var(--muted); font-family: var(--font-condensed); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.tt-record-form .tt-game-row { margin-bottom: 7px; }
.tt-record-form .set-row-label { color: var(--muted); text-align: center; font-family: var(--font-mono); font-size: .75rem; }
.tt-scoreboard .tennis-score-row { --tt-player-col: minmax(96px, 1.8fr); }
@media (max-width: 700px) {
  .tennis-form .set-row, .tennis-form .set-head, .tennis-form .set-grid { grid-template-columns: 24px minmax(0, 1fr) auto minmax(0, 1fr) minmax(52px, .4fr); gap: 6px; }
  .tt-record-form .tt-game-head, .tt-record-form .tt-game-row { grid-template-columns: 25px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .tt-scoreboard .tennis-score-row { grid-template-columns: minmax(72px, 1.5fr) repeat(var(--tennis-set-count), minmax(22px, .4fr)) 28px !important; }
}

/* ---------- smash ---------- */
.char-tile {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px;
  border-radius: 7px; background: var(--surface-3); border: 1px solid var(--line-strong);
  font-family: var(--font-condensed); font-weight: 700; font-size: .56rem; letter-spacing: .02em;
  color: var(--ink-2); line-height: 1;
}
.char-tile + .char-tile { margin-left: 4px; }
.tag-chip {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--pill);
  background: var(--navy); color: var(--on-navy);
  font-family: var(--font-condensed); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
}
.smash-identity { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.smash-scoreboard { display: block; width: 100%; min-width: 0; margin: 14px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: .78rem; }
.smash-scoreboard .tennis-score-row + .tennis-score-row { border-top: 1px solid var(--line); }
.smash-scoreboard .tennis-score-cell sup.jv { font-size: .52em; font-weight: 800; color: var(--accent); vertical-align: super; margin-left: 1px; }
.smash-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .68rem; color: var(--muted); flex-wrap: wrap; }
.smash-chars { display: inline-flex; align-items: center; gap: 4px; }
.smash-stages { font-family: var(--font-condensed); letter-spacing: .04em; text-transform: uppercase; }
.record-summary .smash-scoreboard { font-size: .84rem; }

.smash-form .smash-game-head, .smash-form .smash-game-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) minmax(84px, auto) minmax(84px, auto) minmax(120px, auto) auto; gap: 9px; align-items: center; }
.smash-form .smash-game-head { margin-bottom: 6px; color: var(--muted); font-family: var(--font-condensed); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; }
.smash-form .smash-game-row { margin-bottom: 8px; }
.smash-form .set-row-label { color: var(--muted); text-align: center; font-family: var(--font-mono); font-size: .75rem; }
.smash-form .stock-in { width: 100%; text-align: center; }
.smash-form .char-pick, .smash-form .stage-pick { display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.smash-form .char-pick .char-tile { min-width: 22px; height: 22px; font-size: .5rem; }
.smash-form .jv-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: transparent; color: var(--muted); cursor: pointer; font-family: var(--font-condensed); font-size: .56rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; justify-self: center; line-height: 1; transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease), background var(--duration) var(--ease); }
.smash-form .jv-toggle:hover { border-color: var(--accent); color: var(--accent); }
.smash-form .jv-toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.char-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; padding: 4px 2px; }
.char-menu-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 6px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer;
  text-align: center; color: var(--ink); font-size: .66rem; line-height: 1.1;
}
.char-menu-item:hover { border-color: var(--accent); }
.char-menu-item.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.char-menu-item .char-num { font-family: var(--font-mono); font-size: .56rem; color: var(--muted); }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.stage-tile {
  display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; color: var(--ink);
  font-size: .72rem; line-height: 1.15;
}
.stage-tile:hover { border-color: var(--accent); }
.stage-tile.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.stage-tile .stage-glyph { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--navy); color: var(--on-navy); font-family: var(--font-condensed); font-weight: 700; font-size: .6rem; }

.de-bracket { display: flex; gap: 24px; min-width: 900px; align-items: stretch; }
.de-bracket .de-col { flex: none; display: flex; flex-direction: column; gap: 20px; }
.de-bracket .de-col-winners { width: 300px; }
.de-bracket .de-col-losers { width: 300px; }
.de-bracket .de-col-grand { width: 220px; }
.de-bracket .de-col-title { font-family: var(--font-condensed); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding-left: 2px; }
.de-bracket .bracket-round-title { font-size: .6rem; }
.de-bracket .bracket-round { min-width: 0; }
.de-bracket .bracket-node p { font-size: .76rem; }
.de-bracket .bracket-node.grand-node { border-color: var(--accent); background: var(--accent-soft); }
.de-bracket .bracket-node .reset-tag { display: inline-block; margin-top: 3px; font-family: var(--font-condensed); font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
@media (max-width: 900px) {
  .smash-form .smash-game-head, .smash-form .smash-game-row { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) minmax(76px, auto) minmax(76px, auto) minmax(110px, auto) auto; gap: 6px; }
}

.comp-seed-row { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); }
.comp-seed-row > span { flex:1; min-width:120px; overflow-wrap:anywhere; }
.comp-seed-row > div { display:flex; gap:8px; align-items:center; }
.comp-seed-row input { width:96px; }
