@font-face { font-family: "Teko"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/teko-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Teko"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/teko-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Teko"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/teko-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/mukta-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/mukta-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/mukta-latin-700-normal.woff2) format("woff2"); }
/* Layout: floodlit-ground app shell — scoreboard topbar, side nav (top strip on phones), scrollable main pane.
   Night match is the default look; a "day match" palette follows the viewer's light theme. */
:root {
  /* Floodlit night: the outfield after dark, chalk-white lines, a taped tennis ball for the accent */
  --bg: #0d211d; --surface: #13302a; --surface-2: #183a33; --surface-3: #1f463d; --line: #25493f; --line-2: #31594e;
  --fg: #f2f0e6; --muted: #a8bcb2; --faint: #6f8a7f;
  --accent: #ffd23f; --accent-press: #c99a10; --accent-ink: #172a24; --accent-text: #ffd23f;
  --red: #e5484d; --turf: #2fae6a; --turf-2: #238a53; --gold: #ffc93c; --led: #ffc93c;
  --win: #3ed38c; --loss: #ff6b6e; --draw: #e9c45a; --info: #5cc0ef;
  --a1: #ff6b6e; --a2: #f0a83a; --a3: #9ad25a; --a4: #3ed3a0;
  --shadow: 0 16px 40px rgba(2,14,10,.5);
  --display: "Teko", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Mukta", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --r: 16px; --r-btn: 10px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    /* Day match: the scorebook page */
    --bg: #eef2ea; --surface: #ffffff; --surface-2: #f6f8f2; --surface-3: #e7ece0; --line: #d8dfcf; --line-2: #c4cdb9;
    --fg: #10261f; --muted: #4c6157; --faint: #85978c;
    --accent: #ffcf2e; --accent-press: #d9a400; --accent-ink: #172a24; --accent-text: #8a6200;
    --red: #cf2f36; --turf: #1c8a52; --turf-2: #157043; --gold: #b07a00; --led: #9a6800;
    --win: #138a52; --loss: #cf2f36; --draw: #9a7310; --info: #1f74b8;
    --a1: #cf2f36; --a2: #b8730a; --a3: #4f9a2e; --a4: #108a6a;
    --shadow: 0 14px 30px rgba(20,50,35,.14);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eef2ea; --surface: #ffffff; --surface-2: #f6f8f2; --surface-3: #e7ece0; --line: #d8dfcf; --line-2: #c4cdb9;
  --fg: #10261f; --muted: #4c6157; --faint: #85978c;
  --accent: #ffcf2e; --accent-press: #d9a400; --accent-ink: #172a24; --accent-text: #8a6200;
  --red: #cf2f36; --turf: #1c8a52; --turf-2: #157043; --gold: #b07a00; --led: #9a6800;
  --win: #138a52; --loss: #cf2f36; --draw: #9a7310; --info: #1f74b8;
  --a1: #cf2f36; --a2: #b8730a; --a3: #4f9a2e; --a4: #108a6a;
  --shadow: 0 14px 30px rgba(20,50,35,.14);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--info); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; letter-spacing: .01em; margin: 0; text-wrap: balance; line-height: 1.05; }
h1 { font-size: 2.4rem; } h2 { font-size: 1.7rem; } h3 { font-size: 1.25rem; } h4 { font-size: 1.05rem; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
#app { min-height: 100%; display: grid; grid-template-columns: 216px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.topbar { grid-column: 1 / -1; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { font-family: var(--display); font-weight: 900; font-size: 1.55rem; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.top-date { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.top-date b { font-family: var(--display); font-size: 1.15rem; letter-spacing: .03em; }
.top-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-team .tn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-3); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.turf { background: var(--turf); border-color: var(--turf); color: #f3fff6; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: .85rem; border-radius: 7px; }
.btn.xs { padding: 2px 8px; font-size: .78rem; border-radius: 6px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-continue { font-family: var(--display); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; padding: 9px 20px; }
.nav { border-right: 1px solid var(--line); background: var(--surface); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(58px + env(safe-area-inset-top, 0px)); height: calc(100vh - 58px - env(safe-area-inset-top, 0px)); overflow-y: auto; padding-left: max(10px, env(safe-area-inset-left, 0px)); }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: transparent; padding: 9px 11px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; text-align: left; }
.nav button svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav button svg.ic { fill: currentColor; stroke: none; width: 20px; height: 20px; }
.nav button:hover { background: var(--surface-2); color: var(--fg); }
.nav button.on { background: var(--surface-3); color: var(--fg); box-shadow: inset 3px 0 0 var(--accent); }
.nav .cnt { margin-left: auto; background: var(--accent); color: var(--accent-ink); font-size: .7rem; padding: 0 6px; border-radius: 9px; font-weight: 700; }
.nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
main { min-width: 0; padding-block: 20px 60px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.view { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.vh { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.vh .sub { color: var(--muted); margin-top: 4px; }

/* ---------- building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card.flat { background: var(--surface-2); }
.card h3 { margin-bottom: 10px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-h h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.tbl-wrap { overflow-x: auto; border-radius: 8px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.tbl th.sortable { cursor: pointer; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl tr.me td { background: color-mix(in srgb, var(--turf) 14%, transparent); }
.tbl tr.sel td { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.tbl td.wrap { white-space: normal; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.pill.win { background: color-mix(in srgb, var(--win) 18%, transparent); color: var(--win); }
.pill.loss { background: color-mix(in srgb, var(--loss) 18%, transparent); color: var(--loss); }
.pill.draw { background: color-mix(in srgb, var(--draw) 18%, transparent); color: var(--draw); }
.pill.info { background: color-mix(in srgb, var(--info) 18%, transparent); color: var(--info); }
.pill.acc { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pill.gold { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }
.ovr { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 5px; border-radius: 6px; font-family: var(--display); font-weight: 800; font-size: 1rem; color: #fff; }
.form { display: inline-flex; gap: 2px; vertical-align: middle; }
.form i { width: 6px; height: 14px; border-radius: 2px; background: var(--surface-3); }
.badge { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: .72rem; letter-spacing: .02em; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.45); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
.badge.lg { width: 54px; height: 54px; font-size: 1.05rem; }
.flag { display: inline-block; width: 18px; height: 12px; border-radius: 2px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); flex: none; }
.bar { height: 7px; background: var(--surface-3); border-radius: 4px; overflow: hidden; flex: 1; min-width: 40px; }
.bar > i { display: block; height: 100%; border-radius: 4px; }
.attr { display: grid; grid-template-columns: 120px 32px minmax(0, 1fr); align-items: center; gap: 8px; font-size: .88rem; padding: 3px 0; }
.attr b { font-variant-numeric: tabular-nums; text-align: right; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface-2); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; font-weight: 600; color: var(--muted); font-size: .88rem; }
.seg button.on { background: var(--surface-3); color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 9px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--accent); }
select, input[type=text], input[type=search], input[type=number] { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; min-width: 0; }
input[type=text], input[type=search] { width: 100%; }
label.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.tile b { display: block; font-family: var(--display); font-size: 1.7rem; line-height: 1; margin-top: 4px; }
.meter { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.msgs { display: flex; flex-direction: column; max-height: 70vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.msg { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.msg:hover { background: var(--surface-2); }
.msg.on { background: var(--surface-3); }
.msg .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--faint); }
.msg.unread .t { font-weight: 700; }
.msg .t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg .d { font-size: .75rem; color: var(--muted); }
.k-board .dot { background: var(--gold); } .k-offer .dot, .k-job .dot { background: var(--info); } .k-res .dot { background: var(--turf); }
.k-world .dot { background: var(--accent); } .k-player .dot { background: var(--win); } .k-squad .dot { background: var(--a2); }
.msg-body { line-height: 1.6; max-width: 68ch; }

/* ---------- match centre ---------- */
.scoreboard { background: #0b0f0d; color: #f1f5ef; border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: center; box-shadow: var(--shadow); border: 1px solid #1d2a25; }
.sb-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sb-team.r { flex-direction: row-reverse; text-align: right; }
.sb-team .nm { font-family: var(--display); font-size: 1.3rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-team .sc { font-family: var(--display); color: #ffb83d; font-size: 2.3rem; line-height: 1; font-weight: 800; text-shadow: 0 0 14px rgba(255,184,61,.35); font-variant-numeric: tabular-nums; }
.sb-team .ov { color: #a9b6ae; font-size: .82rem; }
.sb-mid { text-align: center; color: #a9b6ae; font-size: .82rem; max-width: 260px; }
.sb-mid b { color: #f1f5ef; display: block; font-size: .95rem; }
.wp { height: 8px; border-radius: 5px; overflow: hidden; display: flex; margin-top: 8px; background: #26302c; }
.wp i { display: block; height: 100%; transition: width .4s; }
.match-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ground-wrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.ground-wrap svg { width: 100%; height: auto; display: block; max-width: 100%; }
.flash { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-family: var(--display); font-weight: 900; font-size: 4.2rem; letter-spacing: .04em; opacity: 0; }
.flash.go { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { opacity: 0; transform: scale(.7); } 20% { opacity: 1; transform: scale(1.05); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }
.batters { display: grid; gap: 6px; }
.bline { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: .92rem; }
.bline .rb { font-family: var(--display); font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.ch { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; background: var(--surface-3); color: var(--fg); border: 1px solid var(--line-2); }
.ch.c4 { background: var(--info); color: #fff; border-color: transparent; }
.ch.c6 { background: var(--turf); color: #fff; border-color: transparent; }
.ch.cW { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.ch.cL { background: var(--loss); color: #fff; border-color: transparent; }
.ch.cx { background: transparent; border-style: dashed; color: var(--muted); font-size: .68rem; }
.feed { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.feed div { padding: 5px 8px; border-radius: 6px; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; }
.feed div .o { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed .eW { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.feed .e4 { background: color-mix(in srgb, var(--info) 12%, transparent); }
.feed .e6 { background: color-mix(in srgb, var(--turf) 16%, transparent); }
.feed .einfo, .feed .eend { color: var(--gold); font-weight: 600; }
.feed .eeov { color: var(--muted); font-size: .8rem; }
.feed .edrop { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.decide { border: 1px solid var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--surface)); border-radius: 12px; padding: 14px; }
.decide .opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }

/* ---------- modal / overlay / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5,10,8,.62); z-index: 50; display: grid; place-items: center; padding-block: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; width: min(980px, 100%); max-height: 100%; overflow-y: auto; box-shadow: var(--shadow); padding: 20px; position: relative; }
.modal .x { position: absolute; right: 12px; top: 12px; z-index: 5; }
.simbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 10px 8px 18px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.simbar .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: sp .8s linear infinite; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.toast { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 9px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* ---------- title / new game ---------- */
.title-screen { min-height: 100%; display: grid; place-items: center; padding-block: 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--turf) 45%, transparent), transparent 60%), repeating-linear-gradient(90deg, transparent 0 60px, color-mix(in srgb, var(--turf) 7%, transparent) 60px 120px), var(--bg); }
.title-inner { width: min(980px, 100%); display: flex; flex-direction: column; gap: 22px; }
.wordmark { font-family: var(--display); font-weight: 900; font-size: clamp(4rem, 14vw, 9.5rem); line-height: .82; letter-spacing: .02em; text-transform: uppercase; }
.wordmark span { color: var(--accent); }
.tagline { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mode-card { text-align: left; border: 1px solid var(--line-2); background: var(--surface); border-radius: 14px; padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.mode-card:hover { border-color: var(--gold); }
.mode-card.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mode-card h3 { font-size: 1.6rem; }
.ladder { display: flex; gap: 6px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.ladder span { padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 999px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }


/* ---------- tutorial & achievements ---------- */
#tut { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.tut-shade { position: fixed; inset: 0; background: rgba(4,8,6,.6); pointer-events: auto; }
.tut-spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(4,8,6,.6); outline: 2px solid var(--gold); pointer-events: none; transition: all .25s ease; }
.tut-card { position: fixed; background: var(--surface); border: 1px solid var(--gold); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); pointer-events: auto; display: flex; flex-direction: column; gap: 6px; }
.tut-card h3 { margin: 0; } .tut-card p { margin: 0 0 6px; color: var(--muted); }
.ach-toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(70px + env(safe-area-inset-top, 0px)); z-index: 80; display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--gold); border-radius: 12px; padding: 10px 16px 10px 10px; box-shadow: var(--shadow); max-width: calc(100% - 32px); animation: achIn .45s ease-out; }
.ach-toast.out { opacity: 0; transition: opacity .6s; }
.ach-medal { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
@keyframes achIn { from { transform: translate(-50%, -16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
/* ---------- responsive ---------- */
/* ---- crests, kits ---- */
.crest-wrap { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 30px; flex: none; vertical-align: middle; }
.crest-wrap.lg { width: 48px; height: 54px; }
.crest-wrap svg, .crest-wrap img { display: block; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.35)); }
svg.crest, svg.jersey { flex: none; overflow: visible; }
svg.jersey { filter: drop-shadow(0 3px 5px rgba(0,0,0,.3)); }
.pl-shirt { flex: none; width: 96px; }
.kit-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; }
.kit-strip-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.kit-strip-j { display: flex; gap: 4px; }
.kit-strip .btn { margin-left: auto; }
/* ---- Google sign-in button (brand guidelines: white, logo left) ---- */
.gbtn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 12px; border-radius: 4px; border: 1px solid #747775; background: #fff; color: #1f1f1f; font: 500 14px/1 Roboto, "Segoe UI", Arial, sans-serif; cursor: pointer; letter-spacing: .25px; }
.gbtn:hover { background: #f6f8fb; box-shadow: 0 1px 2px rgba(60,64,67,.3); }
.gbtn:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.gbtn .g { width: 18px; height: 18px; flex: none; }
.gbtn[disabled] { opacity: .55; cursor: default; }
/* ---- the auction hall ---- */
.auc-hall { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #0a1f1d; margin-bottom: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.auc-hall svg { display: block; width: 100%; height: auto; min-width: 680px; }
.auc-hall .apad { transition: transform .28s cubic-bezier(.3,1.6,.5,1); transform-box: fill-box; transform-origin: 50% 100%; }
.auc-hall .apad.up { transform: translateY(-30px) rotate(-6deg); }
.auc-hall .apad.flick { animation: flick .45s ease-out; }
@keyframes flick { 0% { transform: translateY(-14px) rotate(4deg); } 55% { transform: translateY(-38px) rotate(-10deg); } 100% { transform: translateY(-30px) rotate(-6deg); } }
.auc-hall .atbl { transition: filter .25s; }
.auc-hall .atbl.lead { filter: drop-shadow(0 0 10px rgba(255,210,63,.75)); }
.auc-hall .atbl.mine .cloth { stroke: #ffd23f; stroke-width: 3; }
.auc-hall .gavel { transform-box: fill-box; transform-origin: 18% 92%; }
.auc-hall .gavel.strike { animation: strike .6s ease-in-out; }
@keyframes strike { 0% { transform: rotate(0); } 35% { transform: rotate(-38deg); } 60% { transform: rotate(16deg); } 100% { transform: rotate(0); } }
.auc-hall .stamp { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transform: scale(1.8); transition: opacity .18s, transform .32s cubic-bezier(.2,1.4,.4,1); pointer-events: none; }
.auc-hall .stamp.show { opacity: 1; transform: scale(1); }
.auc-hall #aucBid.bump { animation: bump .35s ease-out; }
@keyframes bump { 0% { fill: #ffffff; } 100% { fill: #ffd23f; } }
/* ====================== matchday design layer ====================== */
body { background-color: var(--bg); background-image: radial-gradient(1100px 520px at 72% -8%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 62%), radial-gradient(900px 600px at -10% 110%, color-mix(in srgb, var(--turf) 9%, transparent), transparent 60%), repeating-linear-gradient(90deg, transparent 0 96px, color-mix(in srgb, var(--fg) 1.6%, transparent) 96px 192px); background-attachment: fixed; font-size: 16px; line-height: 1.5; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: .01em; line-height: .95; }
h1 { font-size: 2.9rem; } h2 { font-size: 2.1rem; } h3 { font-size: 1.55rem; } h4 { font-size: 1.25rem; }
.lbl { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 600; color: var(--muted); }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: none; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: .02em; text-transform: none; line-height: 1; gap: 8px; }
.brand svg.mark { width: 30px; height: 30px; }
.top-date b { font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: .02em; }
.nav { background: var(--surface); }
.nav button { border-radius: var(--r-btn); font-weight: 600; transition: background .15s, color .15s; }
.nav button .ic { width: 20px; height: 20px; }
.nav button.on { background: var(--surface-3); color: var(--fg); box-shadow: inset 3px 0 0 var(--accent); }
.nav .cnt { background: var(--red); color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fg) 5%, transparent), 0 10px 30px -22px rgba(0,0,0,.6); }
.card.flat { background: var(--surface-2); }
.btn { border-radius: var(--r-btn); font-weight: 700; padding: 8px 14px; background: var(--surface-2); border: 1px solid var(--line-2); transition: background .15s, border-color .15s, transform .08s, box-shadow .08s; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary, .btn-continue { background: var(--accent) !important; color: var(--accent-ink) !important; border-color: transparent !important; box-shadow: 0 3px 0 var(--accent-press); }
.btn.primary:hover, .btn-continue:hover { filter: brightness(1.04); }
.btn.primary:active, .btn-continue:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-press); }
.btn.turf { background: var(--turf); color: #fff; border-color: transparent; box-shadow: 0 3px 0 var(--turf-2); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.big { font-family: var(--display); font-size: 1.55rem; font-weight: 600; letter-spacing: .02em; padding: 8px 22px 6px; line-height: 1.1; text-transform: none; }
.btn-continue { font-family: var(--display); font-size: 1.45rem; font-weight: 600; letter-spacing: .02em; padding: 6px 20px 4px; text-transform: none; line-height: 1.1; }
.btn.glass { background: color-mix(in srgb, var(--surface) 80%, transparent); border-color: var(--line-2); color: var(--fg); }
.seg { border-radius: var(--r-btn); }
.seg button.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.tabs button { font-weight: 700; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--accent); background: none; }
.pill { font-weight: 700; }
.pill.gold { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tile { background: var(--surface-2); border-radius: 12px; }
.tile b { font-family: var(--display); font-weight: 600; font-size: 2.2rem; line-height: .9; color: var(--fg); }
.ovr { font-family: var(--display); font-weight: 600; font-size: 1.15rem; padding-top: 2px; border-radius: 7px; }
.modal { border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); animation: pop .22s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-bg { background: rgba(4,16,12,.72); }
.scoreboard { background: #0a1a16; border: 1px solid #1d3a32; box-shadow: var(--shadow); }
.sb-team .nm { font-family: var(--display); font-weight: 600; font-size: 1.6rem; }
.sb-team .sc { font-family: var(--display); font-weight: 600; font-size: 3rem; color: var(--gold); text-shadow: none; }
.toast { border-radius: 12px; }
.view.enter { animation: viewIn .25s ease-out both; }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
.vh h1 { color: var(--fg); }
.vh .sub { color: var(--muted); }
a { color: var(--info); }
a[data-a="player"], a[data-a="team"] { color: var(--fg); text-decoration: none; font-weight: 600; background-image: linear-gradient(var(--line-2), var(--line-2)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }
a[data-a="player"]:hover, a[data-a="team"]:hover { color: var(--accent-text); background-image: linear-gradient(var(--accent), var(--accent)); }
.tbl th { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 700; }
/* ---------- brand ---------- */
.brand-in { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.brand-in svg.mark { width: 30px; height: 30px; flex: none; }
.brand-in span { padding-top: 4px; }
.brand-in i { font-style: normal; font-size: .62em; font-weight: 600; background: var(--red); color: #fff; padding: 2px 5px 0; margin: 0 1px; vertical-align: .32em; border-radius: 2px; }
.lockup { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; font-family: var(--display); font-weight: 700; line-height: .76; color: #f2f0e6; letter-spacing: .005em; }
.lockup .lk-l1 { position: relative; }
.lockup .lk-l2 { display: flex; align-items: center; }
.lockup .lk-tape { font-size: .3em; font-weight: 600; line-height: 1; color: #fff; background: var(--red); padding: .16em .34em .02em; margin: 0 .22em .2em .04em; transform: rotate(-6deg); clip-path: polygon(4% 0, 100% 6%, 96% 100%, 0 94%); box-shadow: inset 0 -.12em 0 rgba(0,0,0,.18); }
.lockup .lk-gold { color: var(--accent); }
.lockup .lk-ball { position: absolute; left: 100%; margin-left: .02em; top: -.08em; width: .4em; height: .4em; }
.lockup .lk-ball svg { width: 100%; height: 100%; display: block; }
.lockup.xl { font-size: clamp(5rem, 11.5vw, 10.5rem); }
.lockup.xl .lk-ball { animation: lkBall 1s cubic-bezier(.2,.9,.3,1.2) .2s both; }
@keyframes lkBall { from { transform: translate(-1.2em, .9em) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Googly ---------- */
.googly { overflow: visible; display: block; }
.googly .g-body { animation: gbob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.googly .g-eyes { animation: gblink 6s infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.googly .g-wave { animation: gwave 1.4s ease-in-out 3; transform-box: fill-box; transform-origin: 0% 100%; }
.googly.g-cheer .g-body { animation: gjump .9s ease-in-out 3; }
@keyframes gbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes gjump { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-10px) scale(1.03, .97); } }
@keyframes gblink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes gwave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-18deg); } }
.g-say { display: flex; align-items: flex-end; gap: 10px; }
.g-say .g-fig { flex: none; }
.g-bubble { position: relative; background: #f2f0e6; color: #172a24; border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: .95rem; line-height: 1.42; max-width: 560px; margin-bottom: 16px; animation: pop .3s cubic-bezier(.2,1.3,.4,1) both; }
.g-bubble b { color: #0d211d; }
.g-bubble::before { content: ""; position: absolute; left: -9px; bottom: 0; width: 0; height: 0; border-style: solid; border-width: 0 0 13px 10px; border-color: transparent transparent #f2f0e6 transparent; }
.g-say.inline { margin: 0; }
.home-tip { margin-bottom: -6px; }

/* ---------- tutorial card ---------- */
.tut-card { flex-direction: row; gap: 12px; align-items: flex-start; background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow); border-radius: 18px; padding: 12px 16px 14px 10px; animation: pop .28s cubic-bezier(.2,1.3,.4,1) both; }
.tut-g { flex: none; margin-top: 4px; }
.tut-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tut-spot { outline: 3px solid var(--accent); box-shadow: 0 0 0 9999px rgba(4,14,11,.68); }
.ach-medal { background: var(--accent); color: var(--accent-ink); font-size: 1.4rem; }
.ach-medal .ic { width: 26px; height: 26px; }
.ach-toast { border: 2px solid var(--accent); }

/* ---------- title ---------- */
.title-page { min-height: 100dvh; background: var(--bg); }
.hero { position: relative; min-height: min(100dvh, 980px); overflow: hidden; color: #f2f0e6; background: #0a1f1d; color-scheme: dark; display: flex; flex-direction: column; }
.hero-art { position: absolute; inset: 0; }
.hero-art svg.gully { width: 100%; height: 100%; display: block; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,24,21,.94) 0%, rgba(8,24,21,.82) 30%, rgba(8,24,21,.2) 58%, rgba(8,24,21,0) 70%), linear-gradient(0deg, rgba(8,24,21,.75), transparent 28%); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; flex: 1; width: min(1280px, 100%); margin: 0 auto; padding: max(16px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) 80px max(24px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; }
.hero-top { display: flex; align-items: center; gap: 12px; }
.acct { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(13,33,29,.86); border: 1px solid rgba(242,240,230,.14); border-radius: 14px; padding: 8px 12px; max-width: 640px; color: #f2f0e6; }
.acct .muted { color: #a8bcb2; }
.hero-main { margin: auto 0; padding: 4vh 0 2vh; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 620px; }
.hero-tag { font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.4; color: #d9e2dc; max-width: 32ch; margin: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-cta .btn.big { min-height: 54px; }
.hero-cta .btn.big small { font-family: var(--body); font-size: .85rem; font-weight: 600; opacity: .75; margin-left: 4px; }
.hero .btn:not(.primary) { background: rgba(13,33,29,.86); border-color: rgba(242,240,230,.22); color: #f2f0e6; }
.hero .btn.ghost { background: transparent; border-color: transparent; color: #d9e2dc; }
.hero .btn.ghost:hover { background: rgba(242,240,230,.08); }
.gully .g-blink { animation: blink 2.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.ticker { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; background: #081815; border-top: 1px solid rgba(242,240,230,.1); color: #d9e2dc; font-size: .9rem; overflow: hidden; white-space: nowrap; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
.tk-in { display: inline-block; animation: tick 60s linear infinite; }
.tk-in span { margin: 0 26px 0 0; }
.tk-in b { font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: .02em; background: var(--accent); color: var(--accent-ink); border-radius: 4px; padding: 2px 7px 0; margin-right: 9px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.title-below { width: min(1280px, 100%); margin: 0 auto; padding: 36px max(24px, env(safe-area-inset-right, 0px)) 40px max(24px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 20px; }
.tb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.tb-head h2 { font-size: clamp(2.2rem, 4vw, 3rem); }
.tb-head .g-bubble { margin-bottom: 12px; }
.hero-modes, .jr-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hm-card, .jr-mode { text-align: left; padding: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; display: flex; flex-direction: column; transition: border-color .2s, transform .2s cubic-bezier(.2,1,.3,1); }
.hm-card:hover, .jr-mode:hover { border-color: var(--accent); transform: translateY(-3px); }
.hm-card:active, .jr-mode:active { transform: translateY(0); }
.hm-art { aspect-ratio: 800 / 330; overflow: hidden; background: #0a1f1d; }
.hm-art svg { width: 100%; height: 100%; display: block; }
.hm-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.hm-body h3 { font-size: 2.1rem; }
.hm-body p { margin: 0; color: var(--muted); max-width: 60ch; }
.ladder { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.ladder span { padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.ladder span:last-of-type { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.ladder .ic { width: 12px; height: 12px; color: var(--faint); }
.hero-foot { display: flex; gap: 18px; flex-wrap: wrap; font-size: .85rem; color: var(--faint); padding-top: 8px; border-top: 1px solid var(--line); }
.hero-foot a { color: var(--muted); }

/* ---------- journey (new career) ---------- */
.journey { position: relative; min-height: 100dvh; background: var(--bg); color: var(--fg); overflow: hidden; }
.jr-bg { position: absolute; inset: 0 0 auto; height: 360px; opacity: .5; -webkit-mask-image: linear-gradient(#000 20%, transparent); mask-image: linear-gradient(#000 20%, transparent); pointer-events: none; }
.jr-bg svg { width: 100%; height: 100%; display: block; }
.jr-inner { position: relative; z-index: 2; width: min(1180px, 100%); margin: 0 auto; padding: max(16px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 60px max(20px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 18px; }
.jr-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.jr-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.jr-steps button { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 700; font-size: .86rem; cursor: default; }
.jr-steps button i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: .78rem; }
.jr-steps button i .ic { width: 13px; height: 13px; }
.jr-steps button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.jr-steps button.on i { background: rgba(23,42,36,.16); }
.jr-steps button.done { cursor: pointer; color: var(--fg); }
.jr-steps button.done i { background: var(--turf); color: #fff; }
.jr-h { font-size: clamp(2.6rem, 6vw, 4.2rem); color: var(--fg); }
.jr-say .g-bubble { max-width: 720px; }
.nat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.nat-card, .st-card, .club-card, .opt { text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 14px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, background .15s; }
.nat-card:hover, .st-card:hover, .club-card:hover, .opt:hover { border-color: var(--line-2); background: var(--surface-2); }
.nat-card.on, .st-card.on, .club-card.on, .opt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.nat-card .muted, .st-card .muted, .club-card .muted { font-size: .84rem; }
.nat-flag { width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--c1) 0 50%, var(--c2) 50%); margin-bottom: 4px; }
.nat-card b { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1; }
.nat-tr { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.nat-tr i { font-style: normal; font-size: .74rem; font-weight: 700; background: var(--surface-3); color: var(--fg); border-radius: 999px; padding: 1px 8px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.st-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.st-h b { font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1; }
.st-tags { font-size: .82rem; color: var(--accent-text); font-weight: 700; }
.st-cities { font-size: .8rem; color: var(--faint); }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.club-card { flex-direction: row; align-items: center; gap: 12px; }
.club-card > div { flex: 1; min-width: 0; }
.club-card b { font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1; display: block; margin-bottom: 2px; }
.you-grid { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.you-preview { width: 260px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.you-preview b { font-family: var(--display); font-weight: 600; font-size: 1.4rem; }
.you-svg { width: 100%; height: auto; border-radius: 12px; }
.sw-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.sw { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line-2); cursor: pointer; }
.sw.on { box-shadow: 0 0 0 3px var(--accent); border-color: var(--bg); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 4px; }
.opt b { font-weight: 700; }
.opt span { font-size: .82rem; color: var(--muted); }
.building { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 10px; background: color-mix(in srgb, var(--bg) 94%, transparent); color: var(--fg); text-align: center; padding: 24px; }
.building b { font-family: var(--display); font-weight: 600; font-size: 2.4rem; line-height: 1; } .building span { color: var(--muted); }

/* ---------- scenes ---------- */
.scene-wrap { position: relative; border-radius: 14px; overflow: hidden; margin: 6px 0 10px; background: #0a1f1d; }
.scene-wrap svg.scene { display: block; width: 100%; height: auto; }
.scene .sc-flash { opacity: 0; animation: scflash 3.6s infinite; }
@keyframes scflash { 0%, 86%, 100% { opacity: 0; } 88% { opacity: 1; } 92% { opacity: 0; } }
.scene .sc-asker { animation: gbob 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.scene .sc-ask { animation: pulse 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.scene .sc-coach { animation: breathe 3.5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.scene .sc-conf { animation: fall 3s linear infinite; }
.scene .sc-fw g { animation: burst 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.scene .sc-coin { transform-box: fill-box; transform-origin: center; }
.toss-wrap.flipping .sc-coin { animation: coin 1.4s cubic-bezier(.3,.7,.3,1) both; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.01, .995); } }
@keyframes fall { from { transform: translateY(-20px) rotate(0); } to { transform: translateY(420px) rotate(540deg); } }
@keyframes burst { 0% { transform: scale(.2); opacity: 0; } 20% { opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes coin { 0% { transform: translateY(0) scaleX(1); } 15% { transform: translateY(-60px) scaleX(.1); } 30% { transform: translateY(-90px) scaleX(1); } 45% { transform: translateY(-80px) scaleX(.1); } 60% { transform: translateY(-50px) scaleX(1); } 75% { transform: translateY(-20px) scaleX(.1); } 100% { transform: translateY(0) scaleX(1); } }
.bub { position: absolute; max-width: 46%; background: #f2f0e6; color: #172a24; border-radius: 14px; padding: 8px 12px; font-size: .94rem; line-height: 1.35; box-shadow: 0 8px 22px rgba(0,0,0,.3); animation: pop .3s cubic-bezier(.2,1.3,.4,1) both; }
.bub .who { display: block; font-size: .78rem; color: #4c6157; font-weight: 700; margin-bottom: 2px; }
.bub-q { bottom: 6%; transform: translateX(-50%); }
.bub-q::after { content: ""; position: absolute; left: 50%; top: -9px; border: 9px solid transparent; border-bottom-color: #f2f0e6; border-top: 0; }
.bub-a { left: 50%; top: 4%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); animation-delay: .1s; }
.bub-a .who { color: rgba(23,42,36,.7); }
.bub-a::after { content: ""; position: absolute; left: 50%; bottom: -9px; border: 9px solid transparent; border-top-color: var(--accent); border-bottom: 0; }
.bub .eff { display: block; margin-top: 4px; font-size: .8rem; color: #a92e33; font-weight: 700; }
.ans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; margin-top: 10px; }
.ans { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); cursor: pointer; transition: border-color .15s, background .15s; }
.ans:hover { border-color: var(--accent); background: var(--surface-3); }
.ans:active { transform: translateY(1px); }
.ans .t { font-weight: 600; } .ans .e { font-size: .8rem; color: var(--muted); }
.pq-dots { display: flex; gap: 6px; } .pq-dots i { width: 22px; height: 6px; border-radius: 4px; background: var(--surface-3); } .pq-dots i.on { background: var(--accent); } .pq-dots i.done { background: var(--turf); }
.g-row { margin-top: 8px; }
.celeb { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.celeb .scene-wrap { width: 100%; }
.celeb-h { font-size: clamp(2.6rem, 7vw, 4.6rem); color: var(--accent); animation: celebIn .7s cubic-bezier(.2,1.2,.3,1) both; }
@keyframes celebIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.celeb .g-say { justify-content: center; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px; animation: cfall 3s cubic-bezier(.3,.5,.6,1) forwards; }
@keyframes cfall { to { transform: translateY(110vh) rotate(720deg); } }
.pom-card { padding: 10px; }
.pom-card .g-say { margin-top: 6px; }

/* ---------- live: banners & DRS ---------- */
.banner { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 5; animation: bnIn .45s cubic-bezier(.2,1.4,.4,1) both; }
.banner.out { animation: bnOut .45s ease-in both; }
.bn-rays { display: none; }
.bn-in { position: relative; text-align: center; padding: 10px 28px 14px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); transform: rotate(-3deg); box-shadow: 0 10px 0 rgba(0,0,0,.25); clip-path: polygon(1.5% 0, 100% 3%, 98.5% 100%, 0 97%); }
.bn-in b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 9vw, 5.4rem); line-height: .86; padding-top: .08em; }
.bn-in span { font-weight: 700; }
.banner.tone-win .bn-in { background: var(--turf); color: #fff; }
.banner.tone-loss .bn-in { background: #2a3a35; color: #f2f0e6; }
.banner.tone-pink .bn-in { background: var(--red); color: #fff; }
.bn-g { position: absolute; right: 6%; bottom: 6%; }
@keyframes bnIn { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes bnOut { to { opacity: 0; transform: scale(1.1); } }
.flash { font-size: clamp(3rem, 10vw, 5.5rem); text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.drs-ask { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.drs-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.drs-ump { width: 170px; flex: none; border-radius: 10px; overflow: hidden; }
.drs-ump svg { width: 100%; height: auto; display: block; }
.drs-reveal { position: absolute; inset: 0; z-index: 6; background: rgba(6,18,15,.95); display: flex; flex-direction: column; gap: 8px; padding: 12px; color: #f2f0e6; animation: bnIn .3s ease-out both; cursor: pointer; }
.drs-reveal.out { animation: bnOut .45s ease-in both; }
.dr-head { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: #a8bcb2; }
.dr-head b { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--accent); }
.dr-svg { width: 100%; height: auto; border-radius: 10px; flex: 1; min-height: 0; }
.dr-path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1s ease-out .2s forwards; }
.dr-proj { opacity: 0; animation: fadeIn .4s ease-out 1.2s forwards; }
.dr-dot { opacity: 0; animation: fadeIn .3s ease-out forwards; } .dr-dot.d1 { animation-delay: .7s; } .dr-dot.d2 { animation-delay: 1.1s; } .dr-dot.d3 { animation-delay: 1.6s; }
.dr-wave { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.2s linear forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
.dr-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; }
.dr-box { border-radius: 8px; padding: 6px 8px; text-align: center; opacity: 0; animation: fadeIn .3s ease-out forwards; }
.dr-box span { display: block; font-size: .74rem; opacity: .88; }
.dr-box b { font-family: var(--display); font-weight: 600; font-size: 1.25rem; }
.dr-box.red { background: #b8323a; } .dr-box.green { background: #1c8a52; } .dr-box.amber { background: #a87a12; }
.dr-final { text-align: center; opacity: 0; animation: bnIn .4s cubic-bezier(.2,1.4,.4,1) 2.3s forwards; }
.dr-final b { font-family: var(--display); font-weight: 700; font-size: 3rem; display: block; line-height: .9; }
.dr-final.out b { color: #ff6b6e; } .dr-final.notout b { color: #3ed38c; }
.dr-final span { font-size: .84rem; color: #a8bcb2; }
.feed .eappeal { background: color-mix(in srgb, var(--a2) 16%, transparent); font-weight: 600; }
.feed .eimpact { background: color-mix(in srgb, var(--info) 16%, transparent); font-weight: 600; }
.feed .edrsok { background: color-mix(in srgb, var(--win) 16%, transparent); font-weight: 600; }

/* ---------- rulebook ---------- */
.rb-card { display: flex; flex-direction: column; gap: 10px; }
.rb-h { display: flex; gap: 12px; align-items: center; }
.rb-seal { flex: none; width: 58px; height: 64px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--accent-ink); background: var(--accent); clip-path: path('M29 0 L58 10 V36 C58 52 44 60 29 64 C14 60 0 52 0 36 V10 Z'); text-align: center; padding: 4px 4px 0; line-height: 1; }
.rb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.rb-rule { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.rb-rule p { margin: 0; color: var(--muted); font-size: .92rem; }
.rb-fx { font-size: .82rem; font-weight: 700; color: var(--accent-text); }

/* ---------- club banner on the home screen ---------- */
.club-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 20px; align-items: center; padding: 18px 22px; border-radius: var(--r); color: #fff; background: color-mix(in srgb, var(--c1) 78%, #08130f); }
.club-hero::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 48px, transparent 48px 96px); pointer-events: none; }
.club-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--c2); }
.club-hero > * { position: relative; }
.club-hero .lbl { color: rgba(255,255,255,.78); }
.club-hero h2 { font-size: clamp(2.2rem, 4vw, 3.3rem); line-height: .9; margin: 4px 0 2px; }
.ch-sub { color: rgba(255,255,255,.82); font-size: .92rem; }
.ch-person { width: 92px; height: auto; display: block; }
.ch-next { background: rgba(0,0,0,.26); border-radius: 14px; padding: 10px 16px; text-align: center; }
.ch-vs { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0; }
.ch-vs b { font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: #fff; }
.ch-opp { font-weight: 700; }
@media (max-width: 820px) { .club-hero { grid-template-columns: auto minmax(0, 1fr); } .ch-kit { display: none; } .ch-next { grid-column: 1 / -1; } }

@media (max-width: 820px) {
  .hero-modes, .jr-modes { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: auto; }
  .hero-art { position: relative; inset: auto; height: 46vh; min-height: 300px; }
  .hero-scrim { background: linear-gradient(0deg, #0a1f1d 0%, rgba(10,31,29,.6) 22%, transparent 46%); top: 0; bottom: auto; height: 46vh; min-height: 300px; }
  .hero-inner { position: absolute; inset: 0; padding-bottom: 0; }
  .hero-main { position: absolute; left: 0; right: 0; top: calc(46vh - 130px); padding: 0 20px 70px; margin: 0; }
  .hero { padding-bottom: 300px; }
  .bub { max-width: 70%; font-size: .84rem; padding: 6px 9px; }
  .you-preview { width: 100%; }
  .you-svg { max-width: 220px; }
  .drs-ump { width: 120px; }
  .tut-g svg { width: 54px; height: auto; }
}
@media (max-width: 520px) {
  .lockup.xl { font-size: 4.9rem; }
  .acct { width: 100%; }
  .bub-a { display: none; }
  .bub-q { max-width: 86%; }
  .hero-cta .btn.big { flex: 1 1 100%; }
}
/* ====================== matchday UX layer ====================== */
/* navigation and tabs: the hovered or selected item comes forward, the rest step back */
.nav button { transition: background .18s, color .18s, opacity .22s, filter .22s, translate .22s; }
.nav button.on { background: color-mix(in srgb, var(--accent) 13%, var(--surface-2)); color: var(--fg); }
.nav button.on .ic { color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .nav button:not(.on) { opacity: .74; }
  .nav:hover button:not(:hover):not(.on) { opacity: .42; filter: blur(.6px); }
  .nav button:hover { opacity: 1; color: var(--fg); background: var(--surface-2); translate: 3px 0; }
  .tabs:hover button:not(:hover):not(.on), .seg:hover button:not(:hover):not(.on) { opacity: .5; filter: blur(.5px); }
  .tabs button, .seg button { transition: opacity .2s, filter .2s, background .15s, color .15s; }
}
/* choice groups: unchosen cards blur back; hovering brings any of them forward */
:is(.hero-modes, .jr-modes, .nat-grid, .st-grid, .club-grid, .opt-grid, .ans-grid, .pick-grid) > * { transition: filter .28s ease, opacity .28s ease, scale .28s ease, border-color .2s, box-shadow .28s, transform .35s cubic-bezier(.2,.9,.3,1); }
@media (hover: hover) and (pointer: fine) {
  :is(.hero-modes, .jr-modes, .nat-grid, .st-grid, .club-grid, .opt-grid, .ans-grid, .pick-grid):hover > :not(:hover) { filter: blur(1.6px) saturate(.55) brightness(.82); opacity: .62; scale: .975; }
  .pick-grid:hover > :not(:hover) { filter: blur(.8px) saturate(.7); opacity: .74; scale: .99; }
  :is(.nat-grid, .st-grid, .club-grid, .opt-grid):has(> .on):not(:hover) > :not(.on) { filter: blur(1.2px) saturate(.6) brightness(.86); opacity: .66; scale: .985; }
}
@media not all and (hover: hover) {
  :is(.nat-grid, .st-grid, .club-grid, .opt-grid):has(> .on) > :not(.on) { opacity: .68; filter: saturate(.65); }
}
:is(.nat-card, .st-card, .club-card, .opt).on { box-shadow: inset 0 0 0 1px var(--accent), 0 14px 34px -12px color-mix(in srgb, var(--accent) 45%, transparent); }

/* 3D tilt with a soft glare that follows the pointer */
:is(.mode2, .club-card, .nat-card, .st-card, .pcard, .xi-tok, .ans, .pick-card, .nr-card, .sz-card) { position: relative; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); transform-style: preserve-3d; }
.tilting { --ty: -3px; transition: transform .08s linear, filter .28s, opacity .28s, scale .28s, border-color .2s, box-shadow .28s !important; }
.tilting::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.13), transparent 48%); }

/* pop-ups swing in on a hinge; the page behind blurs */
.modal-bg { -webkit-backdrop-filter: blur(7px) saturate(.75); backdrop-filter: blur(7px) saturate(.75); perspective: 1400px; }
.modal { animation: modal3d .46s cubic-bezier(.2,1.05,.3,1) both; transform-origin: 50% 0; }
@keyframes modal3d { from { opacity: 0; transform: rotateX(-14deg) translateY(26px) scale(.965); } to { opacity: 1; transform: none; } }

/* ---------- mode cards ---------- */
.mode2 { text-align: left; padding: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); cursor: pointer; display: flex; flex-direction: column; font: inherit; }
.mode2:hover, .mode2:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 30px 60px -18px color-mix(in srgb, var(--accent) 40%, transparent); }
.m2-art { position: relative; display: block; aspect-ratio: 960 / 400; overflow: hidden; background: #0a1f1d; }
.m2-art svg { width: 100%; height: 100%; display: block; transition: scale .6s cubic-bezier(.2,.9,.3,1); }
.mode2:hover .m2-art svg { scale: 1.04; }
.m2-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--surface) 0%, transparent 38%); pointer-events: none; }
.m2-chip { position: absolute; left: 16px; top: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1; padding: 7px 12px 4px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.m2-chip .ic { width: 18px; height: 18px; margin-top: -3px; }
.m2-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 20px 20px; margin-top: -26px; position: relative; z-index: 1; }
.m2-h { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 3.2vw, 2.7rem); line-height: .95; }
.m2-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.m2-feats span { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: .94rem; line-height: 1.35; }
.m2-feats .ic { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }
.m2-cta { align-self: flex-start; margin-top: 4px; }

/* ---------- press room ---------- */
.press-stage { border-radius: 16px; }
.press-stage svg.scene { aspect-ratio: 960 / 440; }
.press2 .sc-dim { opacity: .6; }
.press2 .rec { animation: blink 1.4s steps(1) infinite; }
.pr-live { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: stretch; border-radius: 6px; overflow: hidden; font-size: .84rem; box-shadow: 0 8px 24px rgba(0,0,0,.35); max-width: calc(100% - 28px); }
.pr-live b { background: var(--red); color: #fff; padding: 5px 9px 4px 22px; position: relative; font-weight: 800; }
.pr-live .pr-dot { position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #fff; z-index: 1; animation: blink 1.2s steps(1) infinite; }
.pr-live span:not(.pr-dot) { background: #f2f0e6; color: #172a24; padding: 5px 10px 4px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-live small { background: #172a24; color: #d9e2dc; padding: 5px 10px 4px; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; font-size: .9rem; }
.pr-mood { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.press .ans-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.press .ans { gap: 8px; padding: 12px 14px 14px; border-radius: 14px; }
.press .ans:hover { border-color: var(--accent); background: var(--surface-3); box-shadow: 0 18px 36px -16px rgba(0,0,0,.55); }
.ans-tone { align-self: flex-start; }
.ans-tone .ic { width: 14px; height: 14px; }
.press .ans .t { font-size: 1.02rem; line-height: 1.35; }
.fxs { display: flex; flex-wrap: wrap; gap: 5px; }
.fx { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; }
.fx.up { background: color-mix(in srgb, var(--win) 16%, transparent); color: var(--win); }
.fx.down { background: color-mix(in srgb, var(--loss) 16%, transparent); color: var(--loss); }
.fx.gold { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); }
.fx .ic { width: 12px; height: 12px; }

/* ---------- team sheet ---------- */
.xi-help { margin: -4px 0 10px; font-size: .88rem; }
.xi-pitch { position: relative; border-radius: 16px; padding: 12px 10px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; background: repeating-linear-gradient(90deg, #1f7343 0 42px, #23804b 42px 84px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), inset 0 0 60px rgba(0,0,0,.35); }
.xi-pitch::before { content: ""; position: absolute; left: 50%; top: 8%; bottom: 8%; width: 54px; margin-left: -27px; background: #d8c08a; opacity: .28; border-radius: 4px; }
.xi-pitch::after { content: ""; position: absolute; inset: 8px; border: 2px solid rgba(255,255,255,.22); border-radius: 50%; pointer-events: none; }
.xi-row { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.xi-lbl { font-size: .76rem; font-weight: 800; color: rgba(255,255,255,.85); padding-left: 4px; }
.xi-toks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.xi-row:first-child .xi-toks { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 76%; margin: 0 auto; }
.xi-tok { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px 7px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(8,24,21,.78); color: #f2f0e6; cursor: pointer; font: inherit; min-width: 0; transition: border-color .15s, background .15s, box-shadow .2s; }
.xi-tok:hover, .xi-tok:focus-visible { border-color: var(--accent); background: rgba(8,24,21,.92); box-shadow: 0 12px 26px -10px rgba(0,0,0,.6); }
.xi-tok.inj { border-color: var(--loss); }
.xi-tok.empty { border-style: dashed; background: rgba(8,24,21,.45); color: rgba(242,240,230,.8); }
.xt-av { width: 52px; height: 43px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.07); overflow: hidden; }
.xt-av svg.bust { width: 52px; height: 43px; display: block; }
.xt-av .ic { width: 22px; height: 22px; }
.xt-n { font-size: .8rem; font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.xt-r { font-size: .7rem; color: rgba(242,240,230,.66); }
.xt-o .ovr { min-width: 30px; height: 20px; font-size: .95rem; margin-top: 2px; }
.xt-no { position: absolute; left: 5px; top: 4px; font-style: normal; font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--accent); line-height: 1; }
.xt-c, .xt-wk { position: absolute; right: 5px; font-style: normal; font-size: .62rem; font-weight: 800; background: var(--accent); color: var(--accent-ink); border-radius: 4px; padding: 1px 4px; }
.xt-c { top: 5px; } .xt-wk { top: 22px; background: #f2f0e6; }
.bench { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bench-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.bench-chip:hover { border-color: var(--accent); }
.bench-chip.inj { opacity: .55; }
.bench-chip .ovr { min-width: 26px; height: 18px; font-size: .85rem; }
.bc-av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; }
.bc-av svg { width: 34px; height: 28px; margin-top: 4px; }
.pick-head { display: flex; gap: 14px; align-items: center; }
.pick-head h2 { margin: 2px 0; }
.pk-av { width: 56px; height: 46px; flex: none; border-radius: 10px; background: var(--surface-3); overflow: hidden; display: grid; place-items: center; }
.pk-av svg { width: 56px; height: 46px; }
.pk-av.lg { width: 84px; height: 70px; } .pk-av.lg svg { width: 84px; height: 70px; }
.pick-tools { margin-top: 12px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.pick-card { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: inherit; cursor: pointer; }
.pick-card:hover:not([disabled]) { border-color: var(--accent); background: var(--surface-3); }
.pick-card.in { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pick-card[disabled] { opacity: .5; cursor: not-allowed; }
.pk-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pk-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-main .muted { font-size: .8rem; }
.pk-tags { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 2px; }

/* ---------- office: season strip ---------- */
.season-strip { align-items: stretch; }
.sz-card .lbl { display: flex; align-items: center; gap: 6px; }
.sz-card .lbl .ic { color: var(--accent); }
.sz-big { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px; }
.sz-big b { font-family: var(--display); font-weight: 600; font-size: 3.4rem; line-height: .8; }
.sz-big span { color: var(--muted); font-weight: 600; }
.sz-track { display: flex; gap: 3px; }
.sz-track i { flex: 1; height: 12px; border-radius: 3px; background: var(--surface-3); position: relative; }
.sz-track i.tz { background: color-mix(in srgb, var(--win) 45%, var(--surface-3)); }
.sz-track i.me { background: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.sz-note { font-size: .86rem; margin-top: 10px; }
.mini-tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mini-tbl td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.mini-tbl tr:last-child td { border-bottom: 0; }
.mini-tbl tr.me td { background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 700; }
.mini-tbl .tn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.leaders { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ld { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fg); padding: 6px; border-radius: 12px; background: var(--surface-2); }
.ld:hover { background: var(--surface-3); }
.ld-av { width: 64px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--surface-3); flex: none; }
.ld-av svg { width: 64px; height: 52px; display: block; }
.ld-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ld-t .muted { font-size: .78rem; font-weight: 700; }
.ld-v { font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1; color: var(--accent-text); }
.ld-v small { font-family: var(--body); font-size: .8rem; color: var(--muted); font-weight: 600; margin-left: 2px; }

/* ---------- office: news desk ---------- */
.nd-item { grid-template-columns: 34px minmax(0, 1fr) !important; align-items: center; }
.nd-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--kc) 18%, transparent); color: var(--kc); }
.nd-ic .ic { width: 18px; height: 18px; }
.nd-item.unread .nd-ic { box-shadow: 0 0 0 2px var(--kc); }
.nd-act { color: var(--accent-text); font-weight: 800; }
.nr-card { border-top: 4px solid var(--kc); }
.nr-mast { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.nr-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--kc); color: #172a24; flex: none; }
.nr-ic .ic { width: 24px; height: 24px; }
.nr-src { display: flex; flex-direction: column; line-height: 1.15; }
.nr-src b { font-family: var(--display); font-weight: 600; font-size: 1.35rem; }
.nr-src small { color: var(--muted); }
.nr-art { display: block; width: 100%; height: 70px; border-radius: 10px; margin-top: 12px; }
.nr-h { font-size: clamp(2rem, 3vw, 2.6rem); margin: 14px 0 10px; }

/* ---------- player card ---------- */
.pc-wrap { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.pcard { width: 214px; flex: none; border-radius: 18px; padding: 12px 14px 14px; color: #fff; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 92%, #fff) 0%, var(--c1) 40%, color-mix(in srgb, var(--c1) 55%, #06120f) 100%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c2) 70%, transparent), 0 22px 44px -18px rgba(0,0,0,.6); display: flex; flex-direction: column; align-items: center; gap: 6px; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.pc-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.pc-ovr { font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: .8; padding-top: 6px; }
.pc-role { font-weight: 800; font-size: .86rem; flex: 1; }
.pc-av { width: 150px; height: 123px; border-radius: 14px; background: rgba(0,0,0,.18); overflow: hidden; }
.pc-av svg { width: 150px; height: 123px; display: block; }
.pc-name { font-family: var(--display); font-weight: 600; font-size: 1.9rem; line-height: 1; padding-top: 4px; }
.pc-fm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; border-top: 1px solid rgba(255,255,255,.25); padding-top: 8px; }
.pc-fm span { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.pc-fm small { font-size: .7rem; font-weight: 700; opacity: .85; }
.pc-fm b { font-family: var(--display); font-weight: 600; font-size: 1.5rem; }
.pc-info { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 4px; }
.radar { width: 100%; max-width: 320px; height: auto; margin-top: 4px; }
.radar .rd-fill { transform-origin: 120px 104px; animation: radarIn .7s cubic-bezier(.2,1.1,.3,1) both; }
@keyframes radarIn { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
svg.bust { overflow: visible; }

@media (max-width: 820px) {
  .news-desk > .card { order: -1; }
  .news-desk .msgs { max-height: 380px; }
  .m2-feats { grid-template-columns: minmax(0, 1fr); }
  .xi-toks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .xt-av, .xt-av svg.bust { width: 44px; height: 36px; }
  .pcard { width: 100%; max-width: 300px; margin: 0 auto; }
  .pr-live small { display: none; }
}
@media (max-width: 520px) {
  .xi-row:first-child .xi-toks { width: 100%; }
  .xt-n { font-size: .72rem; }
  .xt-r { display: none; }
  .pick-grid { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- match poster ---------- */
.scoreboard.poster { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 1.1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 26px 22px; border-radius: 20px; border: 0; color: #fff;
  background: linear-gradient(102deg, color-mix(in srgb, var(--h1) 62%, #06120f) 0 49.6%, color-mix(in srgb, var(--a1) 62%, #06120f) 50.4% 100%); box-shadow: 0 24px 50px -24px rgba(0,0,0,.7); }
.scoreboard.poster::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(102deg, rgba(255,255,255,.05) 0 2px, transparent 2px 26px), radial-gradient(ellipse at 50% 120%, rgba(255,210,63,.22), transparent 60%); pointer-events: none; }
.scoreboard.poster::after { content: ""; position: absolute; left: 50%; top: -10%; bottom: -10%; width: 6px; margin-left: -3px; transform: rotate(12deg); background: linear-gradient(var(--h2), var(--a2)); opacity: .85; }
.po-j { position: absolute; bottom: -34px; opacity: .22; pointer-events: none; }
.po-j.l { left: -24px; transform: rotate(-10deg); } .po-j.r { right: -24px; transform: rotate(10deg); }
.po-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.po-crest { display: block; animation: poFloat 5s ease-in-out infinite; filter: drop-shadow(0 14px 18px rgba(0,0,0,.45)); }
.po-side.a .po-crest { animation-delay: -2.5s; }
@keyframes poFloat { 0%, 100% { transform: perspective(500px) rotateY(-8deg) translateY(0); } 50% { transform: perspective(500px) rotateY(8deg) translateY(-6px); } }
.po-name { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 2.6vw, 2.5rem); line-height: .92; max-width: 100%; }
.po-meta { font-size: .86rem; color: rgba(255,255,255,.82); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.po-you { background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 1px 8px; font-size: .78rem; }
.po-mid { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; background: rgba(6,18,15,.72); border-radius: 16px; padding: 14px 16px; }
.po-comp { font-weight: 800; font-size: .86rem; color: rgba(255,255,255,.86); }
.po-vs { font-family: var(--display); font-weight: 700; font-size: 2.8rem; line-height: .8; padding-top: 6px; background: var(--red); color: #fff; padding: 8px 14px 2px; transform: rotate(-5deg); clip-path: polygon(4% 0, 100% 5%, 96% 100%, 0 95%); margin: 4px 0; }
.po-when { font-weight: 700; }
.po-where { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; color: rgba(255,255,255,.78); }
.po-where .ic { color: var(--accent); }
.po-wp { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; }
.po-wp b { font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1; }
.po-wp .wp { flex: 1; margin: 0; height: 10px; background: rgba(255,255,255,.15); }
.po-wpl { font-size: .74rem; color: rgba(255,255,255,.7); font-weight: 700; }
@media (max-width: 820px) { .scoreboard.poster { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .po-mid { grid-column: 1 / -1; order: 3; } .po-crest svg { width: 76px; height: auto; } }
/* ---------- board gauge ---------- */
.bd-hero { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: center; }
.bd-gauge { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gauge { width: 100%; max-width: 240px; height: auto; overflow: visible; }
.gauge .g-val { stroke-dasharray: 100; animation: gFill 1s cubic-bezier(.2,.9,.3,1) both; }
@keyframes gFill { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.gauge .g-needle { transform-origin: 100px 100px; transform: rotate(var(--deg)); animation: gNeedle 1.1s cubic-bezier(.2,1.3,.3,1) both; }
@keyframes gNeedle { from { transform: rotate(-90deg); } to { transform: rotate(var(--deg)); } }
.bd-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bd-rings { display: flex; gap: 18px; flex-wrap: wrap; }
.ring { display: flex; align-items: center; gap: 10px; }
.ring svg { width: 64px; height: 64px; flex: none; }
.ring .r-val { animation: rFill 1s cubic-bezier(.2,.9,.3,1) both; }
@keyframes rFill { from { stroke-dasharray: 0 200; } }
.ring span { display: flex; flex-direction: column; line-height: 1.2; }
.ring small { color: var(--muted); font-size: .78rem; }
.bd-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--muted); }
.bd-facts span { display: inline-flex; align-items: center; gap: 6px; }
.bd-facts b { color: var(--fg); }
.bd-facts .ic { color: var(--accent); }
@media (max-width: 820px) { .bd-hero { grid-template-columns: minmax(0, 1fr); } }
/* ---------- national squad board ---------- */
.sq-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.sq-col { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 10px; min-width: 0; }
.sq-h { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin-bottom: 2px; }
.sq-chip { display: flex; align-items: center; gap: 7px; padding: 3px 8px 3px 3px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; min-width: 0; }
.sq-chip:hover { border-color: var(--loss); }
.sq-chip .ovr { min-width: 26px; height: 18px; font-size: .85rem; margin-left: auto; }
.sq-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sq-empty { font-size: .84rem; }
.scoreboard.sb-tv { background: linear-gradient(90deg, color-mix(in srgb, var(--h1) 52%, #06120f) 0%, #0a1a16 34%, #0a1a16 66%, color-mix(in srgb, var(--a1) 52%, #06120f) 100%); border: 0; border-top: 3px solid var(--accent); border-radius: 14px; }
.scoreboard.sb-tv .sb-mid { background: rgba(0,0,0,.25); border-radius: 10px; padding: 6px 10px; }
/* ---------- journey: club brief ---------- */
.cc-tier { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.cc-tgt { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.cc-tgt .ic { width: 13px; height: 13px; color: var(--accent); }
.brief { display: flex; gap: 18px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); animation: modal3d .45s cubic-bezier(.2,1.05,.3,1) both; }
.br-main { flex: 1; min-width: 0; }
.br-main h3 { margin: 2px 0 4px; font-size: 1.9rem; }
.br-main > p { margin: 0 0 12px; }
.br-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.br-grid > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.br-grid span { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.br-grid span .ic { color: var(--accent); }
.br-grid b { font-size: .98rem; line-height: 1.3; }
.br-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
.br-note .ic { color: var(--accent); flex: none; margin-top: 2px; }

/* ---------- signings ---------- */
.win-slots .lbl, .reach .lbl { display: flex; align-items: center; gap: 6px; }
.ws-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 12px; }
.ws-slot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 8px; border-radius: 14px; border: 2px dashed var(--line-2); color: var(--muted); text-decoration: none; }
.ws-slot.done { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--fg); }
.ws-av { width: 72px; height: 60px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); overflow: hidden; }
.ws-av svg.bust { width: 72px; height: 60px; }
.ws-av .ic { width: 26px; height: 26px; }
.ws-slot small { font-size: .78rem; color: var(--muted); }
.win-money { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--muted); }
.win-money span { display: inline-flex; align-items: center; gap: 6px; }
.win-money b { color: var(--fg); }
.win-money .ic { color: var(--accent); }
.win-filters { gap: 8px; }
.sc-card .pk-av { width: 64px; height: 52px; } .sc-card .pk-av svg { width: 64px; height: 52px; }
.sc-cost { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.sc-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sc-side small { font-size: .74rem; font-weight: 800; color: var(--muted); }
.sc-side small.up { color: var(--win); } .sc-side small.down { color: var(--loss); }
.pk-msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--loss) 12%, var(--surface-2)); font-weight: 600; }
.win-banner { display: flex; align-items: center; gap: 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.wb-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; }
.wb-ic .ic { width: 26px; height: 26px; }
.wb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wb-t b { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1; }
.wb-t span { color: var(--muted); font-size: .9rem; }

/* ---------- academy & development ---------- */
.acad-hero { padding: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
.acad-art { width: 100%; height: 100%; min-height: 180px; display: block; }
.ah-t { padding: 18px 22px; }
.ah-t h2 { font-size: 2.3rem; margin-bottom: 6px; }
.ah-t p { margin: 0; color: var(--muted); max-width: 56ch; }
.acad-lvls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acad-lvls > * { filter: none !important; opacity: 1 !important; scale: 1 !important; }
.acad-lv { gap: 5px; cursor: default; }
.acad-lv b { font-family: var(--display); font-weight: 600; font-size: 1.45rem; }
.acad-lv .btn, .acad-lv .pill { align-self: flex-start; margin-top: 6px; }
.pros-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.pros-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.pr-av { width: 72px; height: 60px; border-radius: 12px; overflow: hidden; background: var(--surface-3); flex: none; }
.pr-av svg { width: 72px; height: 60px; display: block; }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pr-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-main .muted { font-size: .8rem; }
.pr-pot { display: flex; align-items: center; gap: 8px; }
.pr-pot small { font-size: .76rem; color: var(--muted); font-weight: 700; }
.pr-grow { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 3px; }
.pr-grow i { display: block; height: 100%; background: linear-gradient(90deg, var(--turf), var(--accent)); border-radius: 4px; }
.pr-act { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.prog-list { display: flex; flex-direction: column; gap: 8px; }
.prog-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; color: var(--fg); font: inherit; }
.prog-row.empty { border-style: dashed; cursor: pointer; }
.prog-row.empty:hover { border-color: var(--accent); }
.prog-row .pk-av .ic { width: 22px; height: 22px; }
.camp-box { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.camp-box > div { flex: 1; min-width: 220px; }
.camp-box b { display: inline-flex; align-items: center; gap: 6px; }
.camp-box b .ic { color: var(--accent); }
.camp-box p { margin: 4px 0 0; font-size: .88rem; }

/* ---------- your name in the game ---------- */
.rc-ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.rc-step { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 12px; background: var(--surface-2); opacity: .62; }
.rc-step.done { opacity: .85; }
.rc-step.on { opacity: 1; background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); box-shadow: inset 0 0 0 1px var(--accent); }
.rc-step b { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1; }
.rc-step small { font-size: .74rem; color: var(--muted); font-weight: 700; }
.rc-step span:not(.rc-bar) { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.rc-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-bottom: 4px; }
.rc-bar i { display: block; height: 100%; background: var(--accent); }
.rc-log { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.rc-row { display: flex; align-items: center; gap: 10px; }
.rc-what { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.rc-what small { color: var(--muted); font-size: .8rem; }
.rc-row b.up { color: var(--win); } .rc-row b.down { color: var(--loss); }
/* ---------- player career ---------- */
.fav-bar { position: relative; display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--loss), var(--surface-3) 45%, var(--win)); }
.fav-bar i { position: absolute; top: -4px; width: 6px; height: 18px; margin-left: -3px; border-radius: 3px; background: var(--fg); box-shadow: 0 0 0 2px var(--surface); }
.race-card h3 { display: flex; align-items: center; gap: 8px; }
.race-card h3 .ic { color: var(--accent); }
.gap { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; font-size: .88rem; color: var(--muted); font-weight: 700; }
.gap-bar { flex: 1; height: 10px; border-radius: 5px; background: var(--surface-3); position: relative; overflow: hidden; max-width: 420px; }
.gap-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--turf), var(--accent)); }
.gap-bar b { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--fg); opacity: .6; }
.gap strong { font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--fg); }
.gap strong.up { color: var(--win); } .gap strong.down { color: var(--loss); }
.depth { display: flex; flex-direction: column; gap: 4px; }
.dep { display: grid; grid-template-columns: 26px 48px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 4px 8px; border-radius: 10px; color: var(--fg); text-decoration: none; background: var(--surface-2); }
a.dep:hover { background: var(--surface-3); }
.dep.me { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); box-shadow: inset 0 0 0 1px var(--accent); }
.dep-n { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--muted); text-align: center; }
.dep-av { width: 48px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.dep-av svg { width: 48px; height: 40px; display: block; }
.dep-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.dep-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dep-t small { color: var(--muted); font-size: .78rem; }
.cut { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: .76rem; font-weight: 800; color: var(--loss); }
.cut::before, .cut::after { content: ""; flex: 1; border-top: 2px dashed color-mix(in srgb, var(--loss) 60%, transparent); }
.id-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.id-prev { position: relative; width: 214px; height: 134px; flex: none; }
.id-prev svg.jersey { position: absolute; left: 0; top: 0; }
.id-av { position: absolute; right: 0; bottom: 6px; width: 72px; height: 60px; border-radius: 12px; overflow: hidden; background: var(--surface-3); box-shadow: 0 0 0 3px var(--surface); }
.id-av svg { width: 72px; height: 60px; display: block; }
.deal { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.deal.offer { box-shadow: inset 0 0 0 1px var(--accent); }
.deal-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); flex: none; }
.deal-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.deal-t small { color: var(--muted); }
.opt .up { color: var(--win); } .opt .down { color: var(--loss); }
@media (max-width: 520px) { .dep { grid-template-columns: 22px 40px minmax(0, 1fr) auto; } .dep .form { display: none; } }
@media (max-width: 820px) { .pl-strip { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; } .pl-strip > .card { padding: 10px 12px; } .pl-strip .sz-note, .pl-strip .fav-bar, .pl-strip .meter, .pl-strip .sz-big span { display: none; } .pl-strip .sz-big { margin: 4px 0 0; } .pl-strip .sz-big b { font-size: 1.9rem; } .pl-strip .lbl { font-size: .74rem; } }
@media (max-width: 980px) { .rc-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acad-lvls { grid-template-columns: minmax(0, 1fr); } .acad-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .ws-row { gap: 6px; } .ws-av, .ws-av svg.bust { width: 56px; height: 46px; } .brief { flex-direction: column; } .win-banner { flex-wrap: wrap; } }
@media (max-width: 980px) { .sq-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g-side, .match-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  .nav { position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 15; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px max(10px, env(safe-area-inset-left, 0px)); }
  .nav button { width: auto; flex-direction: column; gap: 3px; padding: 6px 10px; font-size: .72rem; white-space: nowrap; }
  .nav button.on { box-shadow: inset 0 -2px 0 var(--accent); }
  .nav .sep { display: none; }
  .nav .cnt { margin-left: 0; position: absolute; transform: translate(10px, -6px); }
  .nav button { position: relative; }
  .inbox, .g2 { grid-template-columns: minmax(0, 1fr); }
  .top-team .tn { display: none; }
  .scoreboard { grid-template-columns: minmax(0, 1fr); }
  .sb-team.r { flex-direction: row; text-align: left; }
  .mode-cards { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 1.9rem; }
  main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
@media (max-width: 520px) {
  .g4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .top-date small { display: none; }
  .top-date b { font-size: .95rem; white-space: nowrap; }
  .topbar { gap: 8px; }
  .topbar .top-team, .topbar > .pill { display: none; }
  .brand-in span { display: none; }
  .btn-continue { padding: 8px 12px; font-size: 1rem; }
  .attr { grid-template-columns: 96px 30px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* ===================== MAIDAN: the game's own material =====================
   Painted boards, hanging tin plates, chalk lines and tape-ball yellow.
   Corners: boards 8px, keys 6px, plates 3px; only balls and knobs are round. */
:root { --plate: #0a1512; --paint: #f1e7c6; --groove: #08120f; --edge: rgba(0,0,0,.34); --board-hi: rgba(255,255,255,.045); --r: 8px; --r-btn: 6px; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --plate: #17261f; --paint: #f6edcf; --groove: #dde5d4; --edge: rgba(20,50,35,.18); --board-hi: rgba(255,255,255,.7); } }
:root[data-theme="light"] { --plate: #17261f; --paint: #f6edcf; --groove: #dde5d4; --edge: rgba(20,50,35,.18); --board-hi: rgba(255,255,255,.7); }

/* boards */
.card { border: 0; border-radius: var(--r); box-shadow: inset 0 1px 0 var(--board-hi), 0 2px 0 var(--edge); }
.card.flat { box-shadow: inset 0 1px 0 var(--board-hi); }

/* keys */
.btn { border: 0; border-radius: var(--r-btn); background: var(--surface-3); box-shadow: 0 2px 0 var(--edge), inset 0 1px 0 var(--board-hi); transition: transform .1s, box-shadow .1s, background .15s, filter .15s; }
.btn:hover { background: color-mix(in srgb, var(--surface-3) 86%, var(--fg)); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--edge), inset 0 1px 0 var(--board-hi); }
.btn.primary, .btn-continue { background: linear-gradient(104deg, transparent 0 13px, rgba(16,30,25,.78) 13px 16px, transparent 16px 20px, rgba(16,30,25,.78) 20px 22px, transparent 22px), var(--accent) !important; padding-left: 30px; }
.btn.primary.sm, .btn.primary.xs { background: var(--accent) !important; padding-left: 10px; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.turf { box-shadow: 0 2px 0 var(--turf-2); }

/* rails: a recessed groove, the chosen option is a raised tape-ball plate that slides across */
.seg { position: relative; isolation: isolate; gap: 2px; padding: 3px; border: 0 !important; border-radius: 8px; background: var(--groove); box-shadow: inset 0 2px 4px rgba(0,0,0,.38), 0 1px 0 var(--board-hi); overflow: visible; }
.seg button { position: relative; z-index: 1; border-radius: 5px; padding: 6px 12px; background: transparent !important; box-shadow: none !important; color: var(--muted); transition: color .25s, opacity .25s, filter .25s; }
.seg button:hover { color: var(--fg); }
.seg button.on { color: var(--accent-ink) !important; }
.seg:not(.rk) button.on { background: var(--accent) !important; }
.seg > .knob { position: absolute; z-index: 0; left: 0; top: 0; border-radius: 5px; pointer-events: none; background: linear-gradient(104deg, transparent 0 8px, rgba(16,30,25,.62) 8px 10px, transparent 10px), var(--accent); box-shadow: 0 2px 0 var(--accent-press), inset 0 1px 0 rgba(255,255,255,.45); transition: transform .42s cubic-bezier(.34,1.45,.5,1), width .42s cubic-bezier(.34,1.45,.5,1), height .3s, opacity .2s; }

/* tabs: a chalk stroke under the open one */
.tabs { position: relative; border-bottom: 1px solid var(--line); gap: 2px; }
.tabs button { position: relative; z-index: 1; border-bottom: 0 !important; padding: 9px 14px 12px; transition: color .2s, opacity .25s, filter .25s; }
.tabs button.on { color: var(--fg); }
.tabs:not(.rk) button.on::after, .tabs > .knob { content: ""; position: absolute; left: 0; bottom: -3px; height: 8px; background: var(--accent); pointer-events: none; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M3 5.4C18 3.6 34 6.3 52 4.6S92 3.2 117 4.9' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-dasharray='19 1.6 27 1.2 33 1.8 60'/%3E%3Cpath d='M9 6.6C30 5.6 60 6.4 110 5.8' fill='none' stroke='%23000' stroke-opacity='.45' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M3 5.4C18 3.6 34 6.3 52 4.6S92 3.2 117 4.9' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-dasharray='19 1.6 27 1.2 33 1.8 60'/%3E%3Cpath d='M9 6.6C30 5.6 60 6.4 110 5.8' fill='none' stroke='%23000' stroke-opacity='.45' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.tabs:not(.rk) button.on::after { left: 6px; right: 6px; }
.tabs > .knob { transition: transform .45s cubic-bezier(.34,1.3,.5,1), width .45s cubic-bezier(.34,1.3,.5,1), opacity .2s; }

/* plates, not pills */
.pill { border-radius: 3px; padding: 1px 7px 0; font-weight: 700; }
.nav .cnt { border-radius: 3px; }

/* fields sit in the groove */
select, input[type=text], input[type=search], input[type=number] { background-color: var(--groove); border: 0; border-radius: var(--r-btn); box-shadow: inset 0 2px 3px rgba(0,0,0,.32), 0 1px 0 var(--board-hi); }

/* side nav: the open page is a recessed slot with a yellow mark */
.nav button.on { background: var(--groove) !important; box-shadow: inset 0 2px 3px rgba(0,0,0,.4) !important; color: var(--fg); }
.nav button.on svg { color: var(--accent); }

/* ===================== the ball-by-ball screen ===================== */
.mx-h .sub { margin: 0 0 2px; }
.match-grid.mx { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }

/* pavilion scoreboard: always the dark painted board, in day or night */
.pav { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr); background: #10241f; color: #f2f0e6; border-radius: var(--r); box-shadow: 0 2px 0 var(--edge), inset 0 0 0 1px rgba(255,255,255,.05); overflow: hidden; margin-top: 14px; }
.pav::before { content: ""; position: absolute; left: 0; top: 0; width: 33%; height: 3px; background: var(--bt); }
.pav > div { padding: 14px 18px; min-width: 0; }
.pav > div + div { border-left: 1px solid rgba(255,255,255,.07); }
.pav a { color: #f2f0e6; text-decoration: none; }
.pav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.pav .muted, .pav small { color: #a9bab1; }
.pv-k { display: block; font-size: .74rem; font-weight: 600; color: #93a79d; }
.pv-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pv-team b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-team small { font-size: .82rem; }
.pv-team .nm-s { display: none; }
.pv-crest { flex: none; display: grid; }
.pv-crest svg { width: 40px; height: auto; display: block; }
.pv-crest.sm svg { width: 22px; }
.pv-nums { display: flex; gap: 18px; align-items: flex-end; margin-top: 12px; flex-wrap: wrap; }
.pv-cell { display: grid; gap: 4px; }
.plates { display: inline-flex; gap: 3px; vertical-align: middle; }
.plates .pl { width: 1.15em; height: 1.45em; display: grid; place-items: center; padding-top: .14em; font-family: var(--display); font-weight: 600; font-style: normal; font-size: 1.2rem; line-height: 1; color: var(--paint); border-radius: 3px; background: radial-gradient(circle at 50% 8%, #000 0 1.1px, transparent 1.5px), linear-gradient(180deg, #121d1a, #0a1310); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 1px 0 rgba(0,0,0,.6); transform-origin: 50% 0; }
.plates.lg .pl { font-size: 2.5rem; width: 1em; height: 1.24em; }
.plates .pl.bl { color: transparent; }
.plates .pl.fl { animation: plswing .6s cubic-bezier(.3,.7,.3,1) both; }
@keyframes plswing { 0% { transform: perspective(240px) rotateX(88deg); filter: brightness(1.6); } 55% { transform: perspective(240px) rotateX(-16deg); } 80% { transform: perspective(240px) rotateX(6deg); } 100% { transform: none; filter: none; } }
.plates-ov { display: inline-flex; align-items: flex-end; gap: 2px; }
.pl-dot { font-style: normal; font-family: var(--display); font-size: 2rem; line-height: .8; color: var(--paint); }
.pv-crease { display: grid; gap: 6px; align-content: center; }
.pv-b { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 30px; align-items: center; gap: 10px; min-height: 40px; }
.pv-b.empty { opacity: .6; }
.pv-av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: block; background: radial-gradient(circle at 50% 30%, #2a4a41, #142a24); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.pv-av svg { width: 100%; height: 100%; display: block; }
.pv-av.lg { width: 52px; height: 52px; }
.pv-n { min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-star { font-style: normal; color: var(--accent); font-family: var(--display); font-size: 1.5rem; line-height: 0; margin-left: 3px; vertical-align: -6px; }
.pv-b.me .pv-n a { color: var(--accent); }
.pv-bb { text-align: right; font-variant-numeric: tabular-nums; }
.pv-bb::before { content: "("; } .pv-bb::after { content: ")"; }
.pv-bowl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; margin-top: 6px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,.12); }
.pv-bowl .pv-k { display: inline; }
.pv-fig { font-family: var(--display); font-size: 1.3rem; font-weight: 600; color: var(--paint); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pv-state { display: grid; gap: 5px; align-content: center; }
.pv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .92rem; }
.pv-row .pv-k { font-size: .82rem; }
.pv-need { font-family: var(--display); font-size: 1.9rem; font-weight: 600; color: var(--accent); line-height: .9; }
.pv-res { font-family: var(--display); font-size: 1.3rem; font-weight: 600; color: var(--accent); line-height: 1.05; text-align: right; }
.pv-opp { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed rgba(255,255,255,.12); font-size: .9rem; color: #a9bab1; }
.pv-opp b { margin-left: auto; font-family: var(--display); font-size: 1.25rem; font-weight: 600; color: #f2f0e6; }
.pv-rope { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 10px 18px 12px !important; border-left: 0 !important; border-top: 1px solid rgba(255,255,255,.07); font-size: .8rem; color: #a9bab1; font-variant-numeric: tabular-nums; }
.rope { position: relative; flex: 1; height: 4px; border-radius: 2px; background: var(--ft); }
.rope i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--bt); transition: width .6s cubic-bezier(.3,.8,.3,1); }
.rope b { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: linear-gradient(115deg, transparent 0 5px, rgba(16,30,25,.7) 5px 7px, transparent 7px), var(--accent); box-shadow: 0 0 0 2px #10241f; transition: left .6s cubic-bezier(.3,.8,.3,1); }

/* the ground */
.ground-wrap { padding: 0; overflow: hidden; border: 0; border-radius: var(--r); background: #0e221e; box-shadow: 0 2px 0 var(--edge); perspective: 1100px; }
.ground-wrap svg.ground2 { max-height: min(62vh, 540px); margin: 0 auto; transform: rotateX(15deg) scale(1.04); transform-origin: 50% 62%; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ground-wrap:hover svg.ground2 { transform: rotateX(7deg) scale(1.02); }
.ground2 .bails-fly rect { transform-box: fill-box; transform-origin: center; animation: bails .7s cubic-bezier(.2,.7,.3,1) forwards; }
.ground2 .bails-fly rect + rect { animation-name: bails2; }
@keyframes bails { to { transform: translate(-9px, -14px) rotate(-160deg); opacity: 0; } }
@keyframes bails2 { to { transform: translate(10px, -12px) rotate(150deg); opacity: 0; } }
.ground2 .w-ring { transform-box: fill-box; transform-origin: center; animation: wring .8s ease-out forwards; }
@keyframes wring { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
.flash { text-shadow: none; }
.flash span { display: inline-block; font-family: var(--display); font-weight: 600; font-size: clamp(3rem, 9vw, 5.2rem); line-height: 1; padding: .12em .32em 0; border-radius: 4px; transform: rotate(-4deg); box-shadow: 0 4px 0 rgba(0,0,0,.4); }
.flash.f4 span { background: var(--paint); color: #172a24; }
.flash.f6 span { background: var(--accent); color: var(--accent-ink); }
.flash.fw span { background: var(--red); color: #fff; }

/* the over */
.ob-wrap, .sbk, .deck-wrap { background: var(--surface); border-radius: var(--r); box-shadow: inset 0 1px 0 var(--board-hi), 0 2px 0 var(--edge); }
.ob-wrap { padding: 14px 16px; }
.ob-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.ob-h h4 { font-size: 1.35rem; font-weight: 600; }
.ob-r { margin-left: auto; color: var(--muted); font-size: .88rem; }
.ob-cells { display: flex; flex-wrap: wrap; }
.oc { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 -1px -1px 0; border: 1px solid var(--line-2); font-style: normal; font-family: var(--display); font-size: 1.55rem; font-weight: 600; line-height: 1; padding-top: 4px; color: var(--fg); position: relative; }
.oc-d { color: var(--muted); }
.oc-4::after { content: ""; position: absolute; inset: 6px; border: 2px solid var(--fg); border-radius: 2px; }
.oc-6 { background: var(--accent); color: var(--accent-ink); }
.oc-w { background: var(--red); color: #fff; }
.oc-x { font-size: 1.2rem; color: var(--muted); }
.oc-x sub { font-size: .6em; }
.oc-nb b { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 50%; margin-top: -4px; }
.oc.nw { animation: chalkin .45s cubic-bezier(.2,.8,.3,1.3); }
@keyframes chalkin { from { transform: scale(1.5); opacity: 0; filter: blur(2px); } }
.ob-man { display: flex; align-items: stretch; gap: 3px; height: 58px; margin-top: 14px; }
.ob-man .mb { flex: 1; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.ob-man .mb i { align-self: end; display: block; background: color-mix(in srgb, var(--fg) 28%, transparent); border-radius: 2px 2px 0 0; }
.ob-man .mb.w i { box-shadow: inset 0 3px 0 var(--red); }
.ob-man small { text-align: center; font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* commentary scorebook */
.sbk { padding: 14px 0 6px; }
.sbk h4 { padding: 0 16px 8px; font-size: 1.2rem; font-weight: 600; }
.feed { gap: 0; font-size: .9rem; }
.feed .sbk-r { display: grid; grid-template-columns: 40px 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 7px 16px; border-radius: 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 6%, transparent); }
.feed .sbk-r .o { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; padding-right: 8px; border-right: 1px solid var(--line); align-self: stretch; }
.feed .sbk-r .t { min-width: 0; }
.g { width: 24px; height: 24px; display: grid; place-items: center; font-style: normal; font-family: var(--display); font-size: 1.05rem; font-weight: 600; line-height: 1; padding-top: 2px; border-radius: 3px; margin-top: -2px; }
.g-4 { box-shadow: inset 0 0 0 2px var(--fg); }
.g-6 { background: var(--accent); color: var(--accent-ink); }
.g-w { background: var(--red); color: #fff; }
.g-d, .g-x { color: var(--muted); }
.g-x { font-family: var(--body); font-size: .7rem; font-weight: 700; }
.g-a { color: var(--a2); }
.g-n::before { content: ""; width: 8px; height: 2px; background: var(--line-2); }
.feed .sbk-r.eW { background: color-mix(in srgb, var(--red) 9%, transparent); }
.feed .sbk-r.e6 { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.feed .sbk-r.einfo, .feed .sbk-r.eend { color: var(--gold); font-weight: 600; }
.feed .sbk-eov { display: flex; gap: 12px; align-items: baseline; padding: 7px 16px; border-radius: 0; background: var(--surface-2); font-size: .82rem; color: var(--muted); }
.feed .sbk-eov b { color: var(--fg); }
.feed .sbk-eov span:last-child { margin-left: auto; }

/* the control deck */
.deck-wrap { padding: 12px; }
.deck { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 8px; background: var(--groove); box-shadow: inset 0 2px 4px rgba(0,0,0,.38); }
.dk { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 64px; padding: 10px 12px 9px; border: 0; border-radius: 5px; background: var(--surface-3); color: var(--fg); text-align: left; cursor: pointer; box-shadow: 0 2px 0 var(--edge), inset 0 1px 0 var(--board-hi); transition: transform .1s, box-shadow .1s, background .15s; }
.dk b { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1; }
.dk:hover { background: color-mix(in srgb, var(--surface-3) 84%, var(--fg)); }
.dk:active { transform: translateY(2px); box-shadow: inset 0 1px 0 var(--board-hi); }
.dk[disabled] { opacity: .4; cursor: not-allowed; }
kbd { display: inline-block; font: 700 .68rem/1.5 var(--body); color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; min-width: 18px; text-align: center; }
.deck-2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.auto-sw { display: inline-flex; align-items: center; gap: 9px; border: 0; background: transparent; color: var(--fg); padding: 4px 2px; cursor: pointer; }
.auto-sw b { font-weight: 700; }
.auto-sw .sw { width: 42px; height: 22px; border-radius: 11px; background: var(--groove); box-shadow: inset 0 2px 3px rgba(0,0,0,.4); position: relative; transition: background .2s; }
.auto-sw .sw i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(115deg, transparent 0 5px, rgba(16,30,25,.65) 5px 7px, transparent 7px), var(--muted); transition: transform .35s cubic-bezier(.34,1.5,.5,1), background-color .2s; }
.auto-sw.on .sw { background: var(--turf); }
.auto-sw.on .sw i { transform: translateX(20px); background-color: var(--accent); background-image: linear-gradient(115deg, transparent 0 5px, rgba(16,30,25,.65) 5px 7px, transparent 7px); }
.deck-2 .seg { margin-left: auto; }
.deck-go { width: 100%; margin-top: 12px; }
.ctl-plans { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.ctl-plans .lbl { margin-bottom: 5px; }
.ctl-plans .seg { flex-wrap: nowrap; }
.ctl-plans .seg button { padding-inline: 11px; white-space: nowrap; }
.deck-bowler { display: grid; gap: 5px; margin-top: 12px; }
.deck-bowler select { width: 100%; }
.ctl-mine { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .92rem; cursor: pointer; }
.ctl-mine input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }

/* your decision */
.decide.dec { border: 0; background: var(--surface); border-radius: var(--r); padding: 14px 16px 16px; box-shadow: 0 0 0 2px var(--accent), 0 2px 0 var(--edge); transform-origin: 50% 0; animation: decIn .4s cubic-bezier(.2,.8,.2,1); }
@keyframes decIn { from { transform: perspective(900px) rotateX(-14deg) translateY(-6px); opacity: 0; } }
.dec-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.dec-h small { color: var(--muted); font-size: .84rem; }
.dec-h h3 { font-size: 1.5rem; font-weight: 600; margin-top: 2px; }
.dec-need { text-align: right; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.dec-need b { display: block; font-family: var(--display); font-size: 2rem; font-weight: 600; line-height: .9; color: var(--accent-text); }
.dec-foot { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.fan { display: flex; justify-content: center; margin-top: 16px; padding: 4px 14px 12px; perspective: 900px; }
.fan-c { position: relative; flex: 1 1 0; min-width: 0; max-width: 132px; margin: 0 -3px; display: grid; gap: 3px; justify-items: start; align-content: start; text-align: left; padding: 9px 10px 11px; border: 0; border-radius: 7px; background: var(--paint); color: #172a24; cursor: pointer; transform: rotate(var(--r)) translateY(var(--y)); transform-origin: 50% 130%; box-shadow: 0 3px 0 rgba(0,0,0,.28), inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .3s cubic-bezier(.3,1.3,.5,1), box-shadow .3s, filter .25s, opacity .25s; }
.fan-c svg { width: 100%; height: auto; color: #23453b; margin-bottom: 2px; }
.fan-c b { font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1; }
.fan-c kbd { position: absolute; top: 6px; right: 6px; color: #5c6f66; border-color: rgba(0,0,0,.18); background: rgba(255,255,255,.5); }
.fan-o { display: grid; gap: 1px; font-size: .76rem; line-height: 1.2; }
.fan-o i { font-style: normal; font-weight: 800; }
.fan-o span { color: #4b5f56; }
.fan-c.rk0 .fan-o i, .fan-c.rk1 .fan-o i { color: #1c7a48; }
.fan-c.rk2 .fan-o i { color: #946200; }
.fan-c.rk3 .fan-o i, .fan-c.rk4 .fan-o i { color: #c12f33; }
.fan-c:hover, .fan-c:focus-visible { z-index: 2; transform: translateY(-12px) rotate(0) scale(1.05); box-shadow: 0 14px 24px rgba(0,0,0,.35), 0 0 0 2px var(--accent); outline: none; }
.fan-c:active { transform: translateY(-6px) scale(1.01); }
@media (hover: hover) { .fan:hover > .fan-c:not(:hover) { filter: saturate(.6) brightness(.8); } }
/* the field note on each shot card, and the signature tag */
.fan-n { position: relative; display: block; margin-top: 2px; padding-left: 9px; font-size: .7rem; font-weight: 600; line-height: 1.2; color: #4b5f56; }
.fan-n::before { content: ""; position: absolute; left: 0; top: .34em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.fan-n.nb { color: #a3282c; } .fan-n.ng { color: #1c7a48; } .fan-n.nn { color: #865a00; }
.fan-sig { position: absolute; top: 6px; left: 7px; z-index: 1; padding: 1px 6px 2px; border-radius: 3px; background: #172a24; color: #ffd23f; font-style: normal; font-size: .64rem; font-weight: 800; line-height: 1.3; }
/* the run call */
.run-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; margin-top: 14px; }
.run-c { position: relative; display: grid; gap: 4px; align-content: start; padding: 12px 14px 13px; border: 0; border-radius: 7px; background: var(--paint); color: #172a24; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.28), inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .22s cubic-bezier(.3,1.3,.5,1), box-shadow .22s; }
.run-c b { font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1; }
.run-c > span:not(.run-m) { font-size: .84rem; color: #4b5f56; }
.run-c small { font-size: .78rem; font-weight: 700; }
.run-c kbd { position: absolute; top: 8px; right: 8px; color: #5c6f66; border-color: rgba(0,0,0,.18); background: rgba(255,255,255,.5); }
.run-c.go { background: #ffd23f; }
.run-c.go.ok small { color: #1c6b40; } .run-c.go.mid small { color: #6d4a00; } .run-c.go.hot small { color: #a3282c; }
.run-m { display: block; height: 7px; margin-top: 3px; border-radius: 4px; background: rgba(0,0,0,.14); overflow: hidden; }
.run-m i { display: block; height: 100%; border-radius: inherit; background: #1c7a48; }
.run-c.mid .run-m i { background: #a86f00; } .run-c.hot .run-m i { background: #c12f33; }
.run-c:hover, .run-c:focus-visible { transform: translateY(-4px); box-shadow: 0 10px 18px rgba(0,0,0,.32), 0 0 0 2px #172a24; outline: none; }
.run-c:active { transform: translateY(-1px); }
/* signature shot picker */
.sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; }
.sig-o { position: relative; display: grid; gap: 3px; align-content: start; padding: 10px 11px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.sig-o svg { width: 100%; max-width: 118px; height: auto; color: var(--muted); }
.sig-o b { font-family: var(--display); font-weight: 600; font-size: 1.2rem; line-height: 1.05; }
.sig-o small { color: var(--muted); font-size: .78rem; line-height: 1.32; }
.sig-o:hover { border-color: var(--line-2); }
.sig-o.on { border-color: var(--accent); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--accent); }
.sig-o.on svg { color: var(--fg); }
.sig-fit { position: absolute; top: 8px; right: 9px; color: var(--win); font-style: normal; font-size: .68rem; font-weight: 800; }
.pmap { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
.pm-svg { width: 100%; height: auto; color: var(--muted); display: block; }
.pm-mk { cursor: pointer; transform-box: fill-box; transform-origin: center; transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.pm-mk:hover { transform: scale(1.3); }
.pm-list { display: grid; gap: 6px; }
.pm-o { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r-btn); background: var(--surface-2); color: var(--fg); cursor: pointer; box-shadow: 0 2px 0 var(--edge), inset 0 1px 0 var(--board-hi); transition: transform .2s cubic-bezier(.3,1.4,.5,1), background .15s, filter .25s, opacity .25s; }
.pm-o b { font-weight: 700; }
.pm-o small { grid-column: 2; color: var(--muted); font-size: .78rem; }
.pm-n { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .78rem; background: var(--paint); color: #172a24; transition: background .2s; }
.pm-o:hover, .pm-o:focus-visible { background: var(--surface-3); transform: translateX(4px); outline: none; }
.pm-o:hover .pm-n, .pm-o:focus-visible .pm-n { background: var(--accent); }
.pmap:has(.pm-o:nth-child(1):hover) .pm-mk1, .pmap:has(.pm-o:nth-child(2):hover) .pm-mk2, .pmap:has(.pm-o:nth-child(3):hover) .pm-mk3, .pmap:has(.pm-o:nth-child(4):hover) .pm-mk4, .pmap:has(.pm-o:nth-child(5):hover) .pm-mk5, .pmap:has(.pm-o:nth-child(6):hover) .pm-mk6 { transform: scale(1.35); }
.pmap:has(.pm-o:nth-child(1):hover) .pm-mk1 circle, .pmap:has(.pm-o:nth-child(2):hover) .pm-mk2 circle, .pmap:has(.pm-o:nth-child(3):hover) .pm-mk3 circle, .pmap:has(.pm-o:nth-child(4):hover) .pm-mk4 circle, .pmap:has(.pm-o:nth-child(5):hover) .pm-mk5 circle, .pmap:has(.pm-o:nth-child(6):hover) .pm-mk6 circle { fill: var(--accent); }
@media (hover: hover) { .pm-list:hover > .pm-o:not(:hover) { opacity: .62; filter: blur(.5px); } }

@media (max-width: 820px) {
  .pav { grid-template-columns: minmax(0, 1fr); }
  .pav > div { padding: 12px 14px; }
  .pav > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.07); }
  .pv-team b { font-size: 1.3rem; }
  .pv-crest svg { width: 32px; }
  .pv-nums { margin-top: 10px; gap: 10px; flex-wrap: nowrap; justify-content: space-between; }
  .deck-2 .seg button { white-space: nowrap; font-size: .86rem; }
  .pv-state { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; }
  .pv-state .pv-opp { grid-column: 1 / -1; }
  .pv-state .pv-row { flex-direction: column; align-items: flex-start; gap: 0; }
  .pv-state .pv-need { font-size: 1.6rem; }
  .plates.lg .pl { font-size: 1.75rem; }
  .pl-dot { font-size: 1.5rem; }
  .match-grid.mx { grid-template-columns: minmax(0, 1fr); }
  .match-grid.mx > .stack { display: contents; }
  .match-grid.mx #decide { order: 1; } .match-grid.mx #decide:empty { display: none; } .match-grid.mx #groundWrap { order: 2; } .match-grid.mx #atCrease { order: 3; } .match-grid.mx #ctrls { order: 4; } .match-grid.mx .sbk { order: 5; }
  .ground-wrap svg.ground2 { transform: rotateX(10deg) scale(1.02); }
  .deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dk { min-height: 54px; }
  .deck-2 .seg { margin-left: 0; flex: 1; } .deck-2 .seg button { flex: 1; padding-inline: 4px; }
  .oc { width: 38px; height: 38px; }
  .fan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; }
  .fan-c { max-width: none; margin: 0; transform: none; }
  .fan-c kbd { display: none; }
  .run-c kbd { display: none; } .run-c b { font-size: 1.45rem; } .run-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .pmap { grid-template-columns: 116px minmax(0, 1fr); gap: 10px; }
  .dec-h { grid-template-columns: auto minmax(0, 1fr); } .dec-need { grid-column: 1 / -1; text-align: left; } .dec-need b { display: inline; margin-right: 4px; }
  .dk kbd, .auto-sw kbd { display: none; }
  .feed { max-height: 320px; }
}
@media (prefers-reduced-motion: reduce) { .plates .pl.fl, .oc.nw, .decide.dec, .ground2 .bails-fly rect, .ground2 .w-ring { animation: none; } .seg > .knob, .tabs > .knob, .fan-c, .run-c, .ground-wrap svg.ground2, .rope i, .rope b { transition: none; } }

/* night gully title art */
.gully .kid-swing { transform-box: view-box; transform-origin: 1112px 668px; animation: kidswing 6s infinite; }
@keyframes kidswing { 0%, 33% { transform: rotate(0deg); animation-timing-function: ease-in; } 35.5% { transform: rotate(-12deg); animation-timing-function: cubic-bezier(.5,0,.9,.6); } 37.5% { transform: rotate(160deg); animation-timing-function: ease-out; } 41%, 58% { transform: rotate(265deg); animation-timing-function: ease-in-out; } 72%, 100% { transform: rotate(360deg); } }
.gully .fw, .gully .kite { transform-box: view-box; }
.gully .fw { opacity: 0; animation: fwk 7s ease-out infinite; }
.gully .fw2 { animation-delay: 2.4s; } .gully .fw3 { animation-delay: 4.7s; }
@keyframes fwk { 0% { opacity: 0; transform: scale(.2); } 4% { opacity: 1; } 15% { opacity: .9; transform: scale(1); } 26% { opacity: 0; transform: scale(1.12) translateY(8px); } 100% { opacity: 0; transform: scale(.2); } }
.gully .tw { animation: twk 2.8s ease-in-out infinite alternate; }
.gully .tw1 { animation-delay: -1s; } .gully .tw2 { animation-delay: -1.9s; animation-duration: 3.6s; }
@keyframes twk { from { opacity: 1; } to { opacity: .4; } }
.gully .kite { animation: kite 4.2s ease-in-out infinite; }
@keyframes kite { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .gully .kid-swing, .gully .fw, .gully .tw, .gully .kite { animation: none; } }

/* a pulse that says: this is where you act */
.nudge { animation: nudge 1.6s ease-out; }
@keyframes nudge { 0% { outline: 3px solid rgba(255,210,63,.95); outline-offset: 2px; } 100% { outline: 3px solid rgba(255,210,63,0); outline-offset: 18px; } }
.tut-card { box-sizing: border-box; overflow-y: auto; }
@media (max-width: 640px) { .tut-card { padding: 10px 12px 12px 8px; gap: 8px; } .tut-card h3 { font-size: 1.1rem; } .tut-card p { font-size: .9rem; } .tut-card .row { gap: 6px; } .tut-g svg { width: 46px; } }

/* ratings are tin plates with a painted band */
.ovr { background: var(--plate) !important; color: var(--paint); border-radius: 3px; box-shadow: inset 0 -3px 0 var(--c, var(--a2)), inset 0 0 0 1px rgba(255,255,255,.06); padding-bottom: 2px; }
/* meters are strips of bulbs in a groove */
.bar, .meter { background: var(--groove); border-radius: 2px; box-shadow: inset 0 1px 2px rgba(0,0,0,.35); }
.bar > i, .meter i { border-radius: 0; -webkit-mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); }
/* potential: tape balls instead of stars */
.balls { display: inline-flex; gap: 3px; vertical-align: -1px; }
.balls i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--faint); }
.balls i.on { background: linear-gradient(115deg, transparent 0 3.6px, rgba(16,30,25,.72) 3.6px 5.2px, transparent 5.2px), var(--accent); box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); }
/* headline numbers sit on one scoreboard strip */
.stat-tiles { gap: 0; background: #10241f; border-radius: var(--r); overflow: hidden; box-shadow: 0 2px 0 var(--edge), inset 0 0 0 1px rgba(255,255,255,.05); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-tiles > .tile { background: transparent; border: 0; border-radius: 0; box-shadow: inset 1px 0 0 rgba(255,255,255,.07); color: #f2f0e6; padding: 12px 16px; }
.stat-tiles > .tile .lbl { color: #93a79d; }
.stat-tiles > .tile b { color: var(--paint); }
.stat-tiles > .tile .muted, .stat-tiles > .tile small { color: #a9bab1; }
/* links: chalk-underlined text, not web blue */
a { color: var(--fg); text-decoration-color: color-mix(in srgb, var(--accent) 80%, transparent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }

/* scorebook scorecards */
.scard { padding: 0 !important; overflow: hidden; }
.scard > .card-h { margin: 0; padding: 12px 16px !important; background: #10241f; color: #f2f0e6; }
.scard > .card-h h3 { color: #f2f0e6; }
.scard > .card-h > b { color: var(--paint); }
.scard .tbl-wrap { padding: 0 8px; }
.scard .tbl td { border-bottom: 1px solid color-mix(in srgb, var(--fg) 7%, transparent); }
.scard .tbl td .muted, .scard .tbl td.muted { font-style: italic; }
.scard .tbl td.no { color: var(--accent-text); font-style: normal; font-weight: 700; }
.scard .tbl td.n b { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.scard > p { margin: 8px 16px; }
/* new-career steps as one strip */
.jr-steps { gap: 3px; flex-wrap: nowrap; padding: 3px; border-radius: 8px; background: rgba(4,12,10,.72); box-shadow: inset 0 2px 4px rgba(0,0,0,.4); width: max-content; max-width: 100%; }
.jr-steps button { border: 0 !important; border-radius: 5px; background: transparent; padding: 4px 11px 4px 4px; color: #a8bcb2; }
.jr-steps button.on { background: linear-gradient(104deg, transparent 0 8px, rgba(16,30,25,.62) 8px 10px, transparent 10px), var(--accent); color: var(--accent-ink); box-shadow: 0 2px 0 var(--accent-press); }
.jr-steps button.done { color: #f2f0e6; }
.jr-steps button.done:hover { background: rgba(242,240,230,.08); }
@media (max-width: 640px) { .jr-steps button:not(.on) { font-size: 0; gap: 0; padding: 4px; } .jr-steps button:not(.on) i { font-size: .78rem; } }
/* board standing on plates */
.plates.md .pl { font-size: 1.75rem; }
.card .plates .pl { color: var(--paint); }
/* compact account card on phones */
@media (max-width: 520px) { .acct { padding: 6px 10px; gap: 6px; border-radius: 8px; font-size: .86rem; } .acct .muted { display: none; } }
/* flags in the crowd wave */
.scene .sc-flag { transform-box: fill-box; transform-origin: 0 50%; animation: flagw 1.4s ease-in-out infinite alternate; }
@keyframes flagw { from { transform: skewY(-8deg) scaleX(.92); } to { transform: skewY(6deg) scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .scene .sc-flag { animation: none; } }

/* charts on the scoreboard */
.chart-board { background: #10241f; color: #f2f0e6; border-radius: var(--r); padding: 14px 16px 10px; box-shadow: 0 2px 0 var(--edge), inset 0 0 0 1px rgba(255,255,255,.05); }
.chart-board + .chart-board { margin-top: 14px; }
.cb-h { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.cb-h h4 { font-size: 1.3rem; font-weight: 600; color: #f2f0e6; }
.cb-keys { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .82rem; color: #a9bab1; }
.cb-key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cb-key i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.cb-key i.w { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px #10241f, 0 0 0 3px rgba(255,255,255,.15); }
.cb-key i.w.sq { border-radius: 2px; }
.cb-key b { color: var(--paint); font-family: var(--display); font-size: 1.05rem; font-weight: 600; }
.cb-svg { width: 100%; height: auto; display: block; }
.cb-svg text { fill: #93a79d; font-size: 11px; font-family: var(--body); }
.cb-svg .cb-grid { stroke: rgba(242,240,230,.1); stroke-dasharray: 2 4; }
.cb-svg .cb-grid.v { stroke: rgba(242,240,230,.06); }
.cb-svg .cb-tgt { fill: #f1e7c6; font-weight: 700; }
.cb-svg .cb-end { fill: #0b1714; font-family: var(--display); font-size: 13px; font-weight: 600; }
.cb-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: cbdraw 1.4s cubic-bezier(.4,.1,.2,1) both; }
@keyframes cbdraw { from { stroke-dashoffset: 1; } }
.cb-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: cbrise .5s cubic-bezier(.3,1.3,.5,1) both; }
@keyframes cbrise { from { transform: scaleY(0); } }
.wg-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.wg-svg { width: 100%; max-width: 520px; margin: 0 auto; }
.wg-l { stroke-dasharray: 1; animation: cbdraw .7s ease-out both; }
.wg-side { display: grid; gap: 14px; align-content: center; }
.wg-team { display: flex; align-items: center; gap: 10px; }
.wg-team svg { width: 30px; height: auto; }
.wg-team b { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.wg-split { display: flex; height: 54px; border-radius: 4px; overflow: hidden; background: #0b1a16; }
.wg-split span { flex: 0 0 var(--w); min-width: 74px; display: grid; align-content: center; padding: 0 12px; font-size: .8rem; color: #a9bab1; }
.wg-split span:first-child { background: rgba(255,210,63,.16); }
.wg-split span + span { text-align: right; }
.wg-split b { font-family: var(--display); font-size: 1.6rem; font-weight: 600; color: var(--paint); line-height: 1; }
.wg-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.wg-facts div { border-top: 1px dashed rgba(255,255,255,.12); padding-top: 6px; }
.wg-facts dt { font-size: .76rem; color: #93a79d; }
.wg-facts dd { margin: 0; font-weight: 700; }
.wg-note { font-size: .8rem; margin: 0; color: #93a79d !important; }
@media (max-width: 820px) { .wg-grid { grid-template-columns: minmax(0, 1fr); } .chart-board { padding: 12px 10px 8px; } }
@media (prefers-reduced-motion: reduce) { .cb-line, .cb-bar, .wg-l { animation: none; } }

/* sound key in the deck */
.snd-btn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--muted); padding: 6px 4px; cursor: pointer; font-weight: 700; font-size: .9rem; }
.snd-btn .ic { width: 20px; height: 20px; }
.snd-btn.on { color: var(--fg); }
.snd-btn.on .ic { color: var(--accent); }
@media (max-width: 820px) { .snd-btn span { display: none; } }

.ob-man { gap: 4px; }
.ob-man .mb { flex: 0 1 24px; }
.ob-man .mb i { border-radius: 1px; -webkit-mask: repeating-linear-gradient(0deg, #000 0 4px, transparent 4px 5.5px); mask: repeating-linear-gradient(0deg, #000 0 4px, transparent 4px 5.5px); background: color-mix(in srgb, var(--fg) 42%, transparent); }

/* achievement medals */
.ach-tile { background: var(--surface-2); }
.ach-tile.got { box-shadow: inset 0 0 0 1.5px var(--gold); }
.ach-tile:not(.got) { opacity: .72; }
.ach-coin svg { width: 32px; height: 36px; display: block; }
.ach-tile.got .ach-coin svg { filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }

.pm-o:focus-visible, .dk:focus-visible { box-shadow: 0 0 0 2px var(--accent); outline: none; }
.pmap:has(.pm-o:nth-child(1):focus-visible) .pm-mk1, .pmap:has(.pm-o:nth-child(2):focus-visible) .pm-mk2, .pmap:has(.pm-o:nth-child(3):focus-visible) .pm-mk3, .pmap:has(.pm-o:nth-child(4):focus-visible) .pm-mk4, .pmap:has(.pm-o:nth-child(5):focus-visible) .pm-mk5, .pmap:has(.pm-o:nth-child(6):focus-visible) .pm-mk6 { transform: scale(1.35); }
.seg button:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 2; }

@media (max-width: 640px) {
  .deck-2 .seg { flex: 1 1 100%; order: 3; }
  .deck-2 .snd-btn { margin-left: auto; }
  .ach-toast { top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); margin-top: 0 !important; padding: 8px 12px 8px 8px; gap: 10px; }
  .ach-toast + .ach-toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .ach-toast .ach-medal { width: 36px; height: 36px; }
}


.mid-go { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 10px; padding: 12px 14px; border: 0; border-radius: var(--r); background: #ffd23f; color: #172a24; cursor: pointer; text-align: left; box-shadow: 0 3px 0 #b38f12; font: inherit; }
.mid-go .ic { width: 30px; height: 30px; flex: none; }
.mid-go b { display: block; font: 600 1.35rem/1 var(--display); }
.mid-go small { display: block; font-size: .8rem; color: #4b5f56; margin-top: 2px; }
.mid-go:hover { filter: brightness(1.05); } .mid-go:active { transform: translateY(1px); box-shadow: 0 2px 0 #b38f12; }
.mid-pre .ic { width: 18px; height: 18px; }
.mid-go.mid-top { margin: 0 0 12px; } .mid-go kbd { margin-left: auto; font: 600 1rem/1 var(--display); padding: 4px 8px 2px; border-radius: 4px; background: #172a24; color: #ffd23f; border: 0; }
.body-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.body-row b { display: block; font: 600 1.7rem/1 var(--display); }
.body-row span { font-size: .78rem; color: var(--muted); }
@media (max-width: 600px) { .body-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ============ the middle: 3D play ============ */
html.mid-open, html.mid-open body { overflow: hidden; }
.mid { position: fixed; inset: 0; z-index: 400; background: #06100d; color: #f2f0e6; font-family: var(--body); user-select: none; -webkit-user-select: none; touch-action: none; overflow: hidden; }
.mid-c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mid kbd { font: 600 .68rem/1 var(--body); padding: 2px 5px 1px; border-radius: 3px; border: 1px solid rgba(242,240,230,.28); background: rgba(255,255,255,.08); color: inherit; }
.md-bug { position: absolute; left: 16px; top: 16px; min-width: 214px; background: rgba(8,20,17,.9); border-radius: 8px; box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06); overflow: hidden; }
.bg-top { display: flex; align-items: baseline; gap: 10px; padding: 4px 10px 0 0; background: linear-gradient(#13302a, #0f2621); }
.bg-t { font: 600 1.25rem/1 var(--display); background: #ffd23f; color: #172a24; padding: 8px 10px 5px; letter-spacing: .02em; }
.bg-s { font: 600 2rem/1 var(--display); }
.bg-o { margin-left: auto; font: 500 1.1rem/1 var(--display); color: #a8bcb2; }
.bg-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 10px 0; font-size: .86rem; }
.bg-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
.bg-row.dim { color: #a8bcb2; }
.bg-row.bw { border-top: 1px solid rgba(255,255,255,.08); margin-top: 4px; padding-top: 5px; color: #d7e2dc; }
.bg-need { padding: 4px 10px 7px; font-size: .8rem; color: #ffd23f; font-weight: 700; }
.bg-need em { font-style: normal; background: #e5484d; color: #fff; border-radius: 3px; padding: 0 5px; margin-left: 4px; }
.md-tr { position: absolute; right: 16px; top: 16px; display: flex; gap: 8px; align-items: flex-start; }
.md-radar { width: 132px; height: 132px; border-radius: 50%; box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.md-btns { display: grid; gap: 8px; }
.md-ib { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(8,20,17,.9); color: #f2f0e6; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.md-ib .ic { width: 20px; height: 20px; }
.md-mid { position: absolute; left: 50%; top: 19%; transform: translateX(-50%); width: min(640px, 92vw); text-align: center; pointer-events: none; display: grid; justify-items: center; gap: 8px; }
.md-res { opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .2s, transform .25s cubic-bezier(.3,1.4,.5,1); display: grid; justify-items: center; gap: 4px; }
.md-res.on { opacity: 1; transform: none; }
.md-big { font: 600 clamp(3rem, 9vw, 5.6rem)/.86 var(--display); text-shadow: 0 4px 0 rgba(0,0,0,.35); color: #f2f0e6; }
.md-big.four { color: #bfe0ff; } .md-big.six { color: #ffd23f; } .md-big.out { color: #ff6b6f; }
.md-how { font: 600 1.4rem/1 var(--display); background: #e5484d; color: #fff; padding: 5px 10px 2px; border-radius: 4px; }
.md-line { background: rgba(8,20,17,.86); padding: 6px 12px; border-radius: 6px; font-size: .95rem; max-width: 100%; }
.md-tim { opacity: 0; transition: opacity .15s; display: grid; justify-items: center; gap: 4px; }
.md-tim.on { opacity: 1; }
.tm-l, .md-foot { font: 600 1.6rem/1 var(--display); padding: 6px 12px 2px; border-radius: 5px; background: rgba(8,20,17,.86); }
.tm-l.perf { color: #ffd23f; } .tm-l.good { color: #8fe0a8; } .tm-l.off, .tm-l.bad { color: #ff8a86; } .tm-l.warn { color: #ffcf7a; }
.tm-bar { position: relative; width: 200px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #e5484d, #ffb547 30%, #2fa36b 44%, #ffd23f 50%, #2fa36b 56%, #ffb547 70%, #e5484d); box-shadow: 0 0 0 2px rgba(8,20,17,.8); }
.tm-bar i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px #000; }
.tm-ends { display: flex; justify-content: space-between; width: 200px; font-size: .72rem; color: #d7e2dc; text-shadow: 0 1px 2px #000; }
.md-speed { position: absolute; right: 16px; top: 160px; opacity: 0; transition: opacity .2s; background: rgba(8,20,17,.9); padding: 6px 10px 4px; border-radius: 6px; font-size: .8rem; }
.md-speed.on { opacity: 1; } .md-speed b { font: 600 1.5rem/1 var(--display); color: #ffd23f; margin-right: 3px; } .md-speed em { font-style: normal; color: #ff8a86; font-weight: 700; }
.md-catch { position: absolute; width: 0; height: 0; pointer-events: none; }
.md-catch i { position: absolute; left: -30px; top: -30px; width: 60px; height: 60px; border-radius: 50%; border: 3px solid #ffd23f; box-shadow: 0 0 0 2px rgba(0,0,0,.4); }
.md-catch::after { content: ""; position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; }
.md-catch b { position: absolute; left: 50%; top: 34px; transform: translateX(-50%); font: 600 1.3rem/1 var(--display); color: #ffd23f; text-shadow: 0 2px 0 #000; white-space: nowrap; }
.md-bot { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(920px, calc(100vw - 32px)); display: grid; justify-items: center; gap: 8px; }
.md-row, .md-dels, .md-pick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.md-chip { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 6px; background: rgba(8,20,17,.9); color: #f2f0e6; padding: 7px 11px 6px; cursor: pointer; font: inherit; box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08); }
.md-chip b { font: 600 1.08rem/1 var(--display); }
.md-chip small { color: #a8bcb2; font-size: .74rem; }
.md-chip.on { background: #ffd23f; color: #172a24; } .md-chip.on kbd { border-color: rgba(0,0,0,.3); } .md-chip.on small { color: #4b5f56; }
.md-go { border: 0; border-radius: 6px; background: #ffd23f; color: #172a24; font: 600 1.25rem/1 var(--display); padding: 10px 16px 7px; cursor: pointer; box-shadow: 0 3px 0 #b38f12; display: inline-flex; gap: 8px; align-items: center; }
.md-go kbd { border-color: rgba(0,0,0,.3); background: rgba(255,255,255,.4); }
.md-sec { border: 0; border-radius: 6px; background: rgba(255,255,255,.08); color: #f2f0e6; font: 600 1.1rem/1 var(--display); padding: 10px 14px 7px; cursor: pointer; }
.md-hint { font-size: .82rem; color: #e8efe9; text-shadow: 0 1px 3px rgba(0,0,0,.8); background: rgba(8,20,17,.6); padding: 4px 10px; border-radius: 5px; }
.md-meter { position: relative; width: min(380px, 80vw); height: 16px; border-radius: 4px; background: rgba(8,20,17,.9); box-shadow: 0 0 0 2px rgba(8,20,17,.9); }
.md-meter i { position: absolute; top: 0; bottom: 0; }
.md-meter .z1 { left: 0; width: 42.8%; background: rgba(255,255,255,.18); border-radius: 4px 0 0 4px; } .md-meter .z2 { left: 42.8%; width: 42.9%; background: #2fa36b; } .md-meter .z3 { left: 85.7%; width: 6.7%; background: #ffb547; } .md-meter .nb { left: 92.4%; width: 7.6%; background: #e5484d; border-radius: 0 4px 4px 0; }
.md-meter .nd { position: absolute; top: -5px; width: 4px; height: 26px; margin-left: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px #000; }
.md-run { display: inline-flex; align-items: center; gap: 10px; background: rgba(8,20,17,.9); padding: 8px 12px; border-radius: 8px; }
.md-run b { font: 600 1.4rem/1 var(--display); }
.md-light { width: 16px; height: 16px; border-radius: 50%; background: #6f8a7f; box-shadow: 0 0 0 2px rgba(0,0,0,.4); }
.md-run.safe .md-light { background: #2fd07a; box-shadow: 0 0 12px #2fd07a; } .md-run.tight .md-light { background: #ffb547; box-shadow: 0 0 12px #ffb547; } .md-run.danger .md-light { background: #ff5a5f; box-shadow: 0 0 12px #ff5a5f; }
.md-pause, .md-card { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4,10,8,.6); padding: 16px; }
.md-card { z-index: 20; } .md-pause { z-index: 30; }
.mid:has(.md-card:not([hidden])) .md-tr { z-index: 25; }
.md-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.md-acts .md-go { flex: 1 0 100%; }
.md-card-in > .md-go:last-child { position: sticky; bottom: 0; box-shadow: 0 -14px 14px #0f2621, 0 3px 0 #b38f12; }
/* phones: keep the overlays from different modules off each other */
.mid.mid:has(.pd-rot:not([hidden])) .mc-cap { display: none; }
/* landscape phones: the caption takes the top centre, so the result and timing sit a little lower */
@media (orientation: landscape) and (max-height: 500px) { .mid.touch .md-mid { top: 33%; } }
@media (max-width: 700px) and (orientation: portrait) {
  .mid.mid .pd-tip.top { display: none; }
  .mid.mid .rp-l3 { top: 158px; bottom: auto; }
}
.md-pause[hidden], .md-card[hidden], .md-catch[hidden] { display: none; }
.md-card-in { width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: #0f2621; border-radius: 10px; padding: 18px 18px 16px; box-shadow: 0 6px 0 rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.07); display: grid; gap: 10px; }
.md-card-in h3 { font: 600 2rem/1 var(--display); margin: 0; }
.md-cs { margin: 0; color: #d7e2dc; }
.md-lbl { font-size: .8rem; color: #a8bcb2; font-weight: 700; margin-top: 4px; }
.md-col { display: grid; gap: 8px; margin-top: 6px; }
.md-tg { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.md-keys { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 6px; }
.md-keys th { text-align: left; vertical-align: top; padding: 5px 8px 5px 0; color: #ffd23f; font-weight: 700; white-space: nowrap; }
.md-keys td { padding: 5px 0; color: #d7e2dc; line-height: 1.7; }
.md-help { font-size: .85rem; color: #d7e2dc; margin: 4px 0 0; }
.md-mile { position: absolute; left: 50%; top: 9%; transform: translateX(-50%); background: #ffd23f; color: #172a24; border-radius: 8px; padding: 10px 18px 8px; display: grid; justify-items: center; animation: mdMile 3.2s ease both; box-shadow: 0 4px 0 #b38f12; pointer-events: none; }
.md-mile b { font: 600 1.8rem/1 var(--display); } .md-mile span { font-weight: 700; font-size: .85rem; }
@keyframes mdMile { 0% { opacity: 0; transform: translate(-50%, -12px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -8px); } }
.md-touch { position: absolute; right: 14px; bottom: 14px; display: grid; gap: 10px; justify-items: end; }
.mid:not(.touch) .md-touch { display: none; }
.tp-feet { display: flex; gap: 6px; }
.tp-feet button { border: 0; border-radius: 6px; background: rgba(8,20,17,.85); color: #f2f0e6; font: 600 1rem/1 var(--display); padding: 8px 12px 6px; }
.tp-shots { display: grid; grid-template-columns: repeat(2, auto); gap: 10px; align-items: center; }
.tp-shots button { width: 74px; height: 74px; border-radius: 50%; border: 0; background: rgba(8,20,17,.88); color: #f2f0e6; font: 600 1.15rem/1 var(--display); box-shadow: 0 3px 0 rgba(0,0,0,.4), inset 0 0 0 2px rgba(255,255,255,.12); }
.tp-shots button.big { width: 92px; height: 92px; background: #ffd23f; color: #172a24; font-size: 1.4rem; }
.md-stick { position: absolute; width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%; background: rgba(8,20,17,.35); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); pointer-events: none; }
.md-stick i { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,210,63,.9); }
.mid.touch .md-bot { bottom: auto; top: 50%; display: none; }
.mid.touch .md-bot:has(.md-dels), .mid.touch .md-bot:has(.md-meter), .mid.touch .md-bot:has(.md-run) { display: grid; top: auto; bottom: 120px; }
@media (max-width: 700px) {
  .md-bug { left: 10px; top: 10px; min-width: 0; width: 176px; }
  .bg-s { font-size: 1.6rem; } .bg-row { font-size: .78rem; }
  .md-tr { right: 10px; top: 10px; } .md-radar { width: 92px; height: 92px; } .md-ib { width: 38px; height: 38px; }
  .md-speed { top: auto; bottom: 120px; right: 10px; }
  .md-mid { top: 24%; }
  .md-bot { bottom: 10px; width: calc(100vw - 20px); }
}
.md-rev { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: min(300px, 80vw); background: #0f2621; border-radius: 10px; padding: 14px; display: grid; gap: 8px; box-shadow: 0 5px 0 rgba(0,0,0,.4), 0 0 0 2px #ffd23f; }
.md-rev[hidden] { display: none; }
.md-rev > b { font: 600 1.5rem/1 var(--display); } .md-rev > span { font-size: .8rem; color: #a8bcb2; }
.rv-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .9rem; }
.rv-row b.ok { color: #ff6b6f; } .rv-row b.no { color: #2fd07a; } /* TV style: red is the side that says out */ .rv-row b.uc { color: #ffb547; }
.rv-dec { font: 600 1.3rem/1.1 var(--display); padding: 8px 10px 5px; border-radius: 6px; text-align: center; }
.rv-dec.ov { background: #ffd23f; color: #172a24; } .rv-dec.st { background: rgba(255,255,255,.1); }
@media (prefers-reduced-motion: reduce) { .md-res, .md-mile { transition: none; animation: none; } }
body { margin: 0; } [hidden] { display: none !important; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); font-family: var(--body); padding: 24px; }
.boot-in { max-width: 640px; }
.boot h1 { font-family: var(--display); font-weight: 600; font-size: 3rem; color: var(--fg); margin: 0 0 8px; }
.boot ul { padding-left: 1.2em; line-height: 1.5; }
.boot-status { color: var(--accent-text); font-weight: 700; }
