  /* =========================================================================
     Dirilis League — "Broadcast Arena" theme
     A premium sports-broadcast look (think Champions League / Sky Sports
     on-screen graphics): frosted glass panels instead of flat boxed cards,
     a signature green gradient for primary actions and links (the club
     color that anchors the single background glow), and a warm gold
     gradient reserved for trophies. Every selector below is unchanged
     from before — app.js and index.html don't know any of this happened —
     only the colors, surfaces, shadows and a few small animations changed.
     ========================================================================= */
  :root{
    /* ---- Light theme: still glassy, just on a bright arena-daylight base ---- */
    --bg:#EEF1F8;
    --surface:rgba(255,255,255,0.72);
    --surface-2:rgba(255,255,255,0.5);
    --surface-3:rgba(255,255,255,0.34);
    --border:rgba(15,23,42,0.10);
    --text:#0F1729;
    --text-muted:#5B6577;
    --accent:var(--text);
    --accent-2:var(--text-muted);
    --accent-gradient:linear-gradient(135deg,#333846 0%,#14161B 100%);
    --accent-soft:rgba(15,23,42,0.06);
    --accent-contrast:#F5F6F8;
    --win:#158A4C;
    --win-soft:rgba(21,138,76,0.12);
    --gold:#B9862C;
    --gold-2:#8A5F17;
    --gold-gradient:linear-gradient(135deg,#F3D48A 0%,#C89536 55%,#93691C 100%);
    --gold-soft:rgba(185,134,44,0.14);
    --info:#5B6577;
    --info-soft:rgba(91,101,119,0.10);
    --danger:#C13434;
    --danger-soft:rgba(193,52,52,0.10);
    --card-header:rgba(15,23,42,0.035);
    --card-header-lit:rgba(255,255,255,0.85);
    --focus:var(--text);
    --dot-color:rgba(15,23,42,0.05);
    --glass-blur:16px;
    --glass-hairline:rgba(255,255,255,0.7);
    --shadow-ambient:0 1px 2px rgba(15,23,42,0.06), 0 10px 30px rgba(15,23,42,0.08);
    --shadow-lift:0 4px 10px rgba(15,23,42,0.08), 0 20px 40px rgba(15,23,42,0.12);
    --shadow-glow-accent:0 0 0 1px rgba(15,23,42,0.14), 0 8px 22px rgba(15,23,42,0.16);
    --shadow-glow-gold:0 0 0 1px rgba(185,134,44,0.25), 0 8px 22px rgba(185,134,44,0.22);
    --font-display:'Outfit',system-ui,sans-serif;
    --font-body:'Manrope',system-ui,-apple-system,'Segoe UI',sans-serif;
    --font-mono:'JetBrains Mono','SFMono-Regular',Consolas,monospace;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      /* ---- Dark theme: the real showcase — arena floodlights on a near-black pitch ---- */
      --bg:#0A0D11;
      --surface:#0F141A;
      --surface-2:#151B23;
      --surface-3:#1C2530;
      --border:rgba(255,255,255,0.11);
      --text:#F3F6FC;
      --text-muted:#CED4E3;
      --accent:var(--text);
      --accent-2:var(--text-muted);
      --accent-gradient:linear-gradient(135deg,#333846 0%,#14161B 100%);
      --accent-soft:rgba(255,255,255,0.08);
      --accent-contrast:#F5F6F8;
      --win:#3DDC97;
      --win-soft:rgba(61,220,151,0.14);
      --gold:#F0C067;
      --gold-2:#C99A34;
      --gold-gradient:linear-gradient(135deg,#FFE8B8 0%,#F0C067 45%,#B4801F 100%);
      --gold-soft:rgba(240,192,103,0.16);
      --info:#9AA5B8;
      --info-soft:rgba(154,165,184,0.14);
      --danger:#FF7285;
      --danger-soft:rgba(255,114,133,0.15);
      --card-header:rgba(255,255,255,0.03);
      --card-header-lit:rgba(255,255,255,0.075);
      --focus:var(--text);
      --dot-color:rgba(255,255,255,0.05);
      --glass-blur:20px;
      --glass-hairline:rgba(255,255,255,0.09);
      --shadow-ambient:0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 30px rgba(0,0,0,0.45);
      --shadow-lift:0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 48px rgba(0,0,0,0.55);
      --shadow-glow-accent:0 0 0 1px rgba(255,255,255,0.14), 0 8px 24px rgba(0,0,0,0.4);
      --shadow-glow-gold:0 0 0 1px rgba(240,192,103,0.4), 0 8px 24px rgba(240,192,103,0.22);
    }
  }
  :root[data-theme="dark"]{
    --bg:#0A0D11;
    --surface:#0F141A;
    --surface-2:#151B23;
    --surface-3:#1C2530;
    --border:rgba(255,255,255,0.11);
    --text:#F3F6FC;
    --text-muted:#8C97AE;
    --accent:var(--text);
    --accent-2:var(--text-muted);
    --accent-gradient:linear-gradient(135deg,#333846 0%,#14161B 100%);
    --accent-soft:rgba(255,255,255,0.08);
    --accent-contrast:#F5F6F8;
    --win:#3DDC97;
    --win-soft:rgba(61,220,151,0.14);
    --gold:#F0C067;
    --gold-2:#C99A34;
    --gold-gradient:linear-gradient(135deg,#FFE8B8 0%,#F0C067 45%,#B4801F 100%);
    --gold-soft:rgba(240,192,103,0.16);
    --info:#9AA5B8;
    --info-soft:rgba(154,165,184,0.14);
    --danger:#FF7285;
    --danger-soft:rgba(255,114,133,0.15);
    --card-header:rgba(255,255,255,0.03);
    --card-header-lit:rgba(255,255,255,0.075);
    --focus:var(--text);
    --dot-color:rgba(255,255,255,0.05);
    --glass-blur:20px;
    --glass-hairline:rgba(255,255,255,0.09);
    --shadow-ambient:0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 30px rgba(0,0,0,0.45);
    --shadow-lift:0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 48px rgba(0,0,0,0.55);
    --shadow-glow-accent:0 0 0 1px rgba(255,255,255,0.14), 0 8px 24px rgba(0,0,0,0.4);
    --shadow-glow-gold:0 0 0 1px rgba(240,192,103,0.4), 0 8px 24px rgba(240,192,103,0.22);
  }
  *,*::before,*::after{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  html{scrollbar-color:var(--border) transparent;scrollbar-width:thin;}
  ::selection{background:var(--accent);color:#fff;}
  ::-webkit-scrollbar{width:10px;height:10px;}
  ::-webkit-scrollbar-track{background:transparent;}
  ::-webkit-scrollbar-thumb{background:var(--border);border-radius:6px;}
  ::-webkit-scrollbar-thumb:hover{background:var(--accent);}
  body{
    position:relative;
    background-color:var(--bg);
    /* Just the fine dot texture here; the full-bleed artwork + its scrim live
       on body::after (a position:fixed layer, which behaves on mobile where
       background-attachment:fixed does not). Front-to-back the stack is:
       page colour, ::after (artwork + scrim), ::before (champion glow),
       content — so the glow stays visible on top of the image. */
    background-size:3px 3px;
    background-repeat:repeat;
    background-position:0 0;
    background-attachment:fixed;
    color:var(--text);
    font-family:var(--font-body);
    font-size:14.5px;
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
    min-height:100vh;
  }
  body::after{
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background-image:
      linear-gradient(color-mix(in srgb, var(--bg) 32%, transparent), color-mix(in srgb, var(--bg) 32%, transparent)),
      url("assets/app-bg.jpg");
    background-size:cover, cover;
    background-repeat:no-repeat, no-repeat;
    background-position:center, center;
  }
  @media (prefers-reduced-motion: reduce){
    *{animation-duration:0.001ms !important;animation-iteration-count:1 !important;transition-duration:0.001ms !important;}
  }
  a{color:var(--accent);}
  button{font-family:inherit;}
  .wrap{position:relative;z-index:1;max-width:1056px;margin:0 auto;padding:36px 22px 48px;}

  /* =======================================================================
     Dashboard shell — persistent sidebar + topbar, full width. Replaces the
     old centered .wrap + masthead + top tab-bar for every screen; only the
     Home tab's own content (below) gets the new widget-dashboard look — the
     other tabs still render their existing content, just inside this frame.
     ======================================================================= */
  .app-shell{position:relative;z-index:1;display:flex;min-height:100vh;align-items:stretch;padding-bottom:96px;}
  /* True position:fixed, not sticky — sticky's containing block is bounded
     by the flex container's own box, which (being sized by its tallest
     child) always ends exactly where the page's content ends. That meant
     the sidebar detached and rode along with the final stretch of scroll
     instead of staying planted, however precisely the container height was
     tuned. Fixed removes it from the scroll equation entirely: it never
     moves, full stop, regardless of how tall the page content grows. */
  .sidebar{
    width:232px;flex:none;
    display:flex;flex-direction:column;gap:4px;
    padding:22px 14px 20px;
    /* Opaque, not the usual translucent glass panel — this sits directly in
       front of the fixed background artwork for the entire page height, and
       a translucent fill there renders as a solid black block in some
       browsers' compositors. Flat + a hairline border reads fine here. */
    background:var(--bg);
    border-right:1px solid var(--glass-hairline);
    position:fixed;left:0;top:0;bottom:0;z-index:2;overflow-y:auto;
  }
  /* Reserves the fixed sidebar's width in normal flow so main-col's content
     doesn't render underneath it. */
  .app-shell::before{content:"";flex:0 0 232px;width:232px;}
  .sidebar-brand{
    display:flex;align-items:center;justify-content:center;
    background:none;border:none;cursor:pointer;padding:10px 8px 24px;color:var(--text);text-align:center;
  }
  .sidebar-brand-logo{width:125px;max-width:100%;height:auto;display:block;filter:drop-shadow(0 2px 5px rgba(0,0,0,0.35));}
  .sidebar-nav{display:flex;flex-direction:column;gap:10px;flex:1;}
  .side-link{
    display:flex;align-items:center;gap:12px;
    background:none;border:none;border-radius:6px;cursor:pointer;
    padding:11px 12px;color:var(--text-muted);font-family:var(--font-body);font-size:14px;font-weight:600;
    text-align:left;white-space:nowrap;
    transition:background .14s ease,color .14s ease;
  }
  .side-link svg{width:19px;height:19px;flex:none;}
  .side-link:hover{color:var(--text);background:var(--surface-2);}
  .side-link.active{color:var(--accent-contrast);background:var(--accent-gradient);box-shadow:var(--shadow-glow-accent);}
  .sidebar-foot{
    padding:14px 10px 4px;font-family:var(--font-mono);font-size:10.5px;letter-spacing:0.08em;
    text-transform:uppercase;color:var(--text-muted);opacity:0.55;line-height:1.6;
  }
  .main-col{flex:1;min-width:0;display:flex;flex-direction:column;}
  .main-col > #app{padding:26px 28px 20px;}
  /* Every tab now runs full width, same as the dashboard homepage — no
     capped reading column. */
  .main-col > footer.notes{padding:16px 28px 32px;}
  @media (max-width:900px){
    .main-col > #app{padding:20px 18px 16px;}
    .main-col > footer.notes{padding:12px 18px 28px;}
  }
  .topbar{
    display:flex;align-items:center;gap:22px;flex-wrap:wrap;
    padding:20px 28px;position:relative;z-index:1;
  }
  .topbar-brandline{flex:none;}
  .topbar-greeting{
    font-size:13px;letter-spacing:0.08em;text-transform:uppercase;color:var(--text-muted);margin-bottom:2px;
  }
  .topbar-date{
    font-size:14px;font-weight:600;letter-spacing:0.01em;line-height:1.2;color:var(--text);
  }
  .topbar-search{
    flex:1 1 260px;max-width:420px;position:relative;display:flex;align-items:center;
  }
  .topbar-search svg{position:absolute;left:12px;width:16px;height:16px;color:var(--text-muted);pointer-events:none;}
  .topbar-search input{
    width:100%;box-sizing:border-box;font:inherit;font-size:13.5px;
    padding:9px 12px 9px 36px;border-radius:6px;border:1px solid var(--border);
    background:var(--surface-2);color:var(--text);
  }
  .topbar-search input::placeholder{color:var(--text-muted);}
  .topbar-search input:focus{outline:none;border-color:var(--accent);box-shadow:var(--shadow-glow-accent);}
  .topbar-actions{display:flex;align-items:center;gap:6px;flex:none;position:relative;margin-left:auto;}
  .topbar-actions .header-utility-link{position:static;opacity:0.6;}
  .topbar-actions .edit-lock-panel{position:absolute;top:44px;right:0;}
  .sidebar-toggle-btn{display:none;position:static;opacity:0.7;}
  .sidebar-scrim{display:none;}
  @media (max-width:900px){
    .sidebar-toggle-btn{display:flex;}
    .sidebar{position:fixed;left:0;top:0;bottom:0;z-index:40;transform:translateX(-100%);transition:transform .2s ease;box-shadow:var(--shadow-lift);background:var(--bg);}
    .sidebar.open{transform:translateX(0);}
    .app-shell::before{content:none;width:0;}
    .sidebar-scrim:not([hidden]){display:block;position:fixed;inset:0;z-index:30;background:rgba(0,0,0,0.45);border:none;padding:0;cursor:default;}
    .topbar{padding:16px 18px;}
    .topbar-search{order:3;flex-basis:100%;max-width:none;}
  }
  header.masthead{margin-bottom:22px;position:relative;}
  .header-utility-link{
    position:absolute;top:2px;right:0;
    display:flex;align-items:center;justify-content:center;
    width:38px;height:38px;padding:0;
    background:none;border:none;border-radius:5px;cursor:pointer;
    color:var(--text-muted);opacity:0.4;
    transition:opacity .15s ease,background .15s ease,color .15s ease;
  }
  .header-utility-link svg{width:21px;height:21px;}
  .header-utility-link:hover,.header-utility-link:focus-visible{
    opacity:1;background:var(--surface-2);color:var(--accent);outline:none;
  }
  /* Backup gear stays flush right; the edit-lock icon sits just to its
     left, so both fit along the same top edge of the masthead. */
  #edit-lock-btn{right:44px;}
  #calendar-btn{right:88px;}
  #edit-lock-btn.unlocked{color:var(--win);opacity:0.75;}
  #edit-lock-btn.unlocked:hover,#edit-lock-btn.unlocked:focus-visible{opacity:1;}
  .edit-lock-panel{position:absolute;top:44px;right:0;z-index:20;width:240px;}
  .edit-lock-panel-inner{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:7px;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    padding:14px;box-shadow:var(--shadow-lift);
    display:flex;flex-direction:column;gap:8px;
    animation:tabEnter .22s cubic-bezier(.22,.8,.22,1);
  }
  .edit-lock-label{font-size:12.5px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.06em;}
  .edit-lock-panel-inner input[type="password"]{
    font-family:inherit;font-size:14px;padding:8px 10px;
    border:1px solid var(--border);border-radius:5px;background:var(--surface-2);color:var(--text);
    width:100%;box-sizing:border-box;
  }
  .edit-lock-error{color:var(--danger);font-size:12.5px;font-weight:600;margin:0;}
  .edit-lock-actions{display:flex;gap:8px;margin-top:2px;}
  .backup-page{max-width:520px;}
  .backup-page .section-title{margin-top:0;}
  /* Winners calendar — a month grid of past game nights, reached from the
     small calendar icon in the header. Read-only view over the seasons.
     The page fills the full content column so the day cells scale up with it. */
  .calendar-page{max-width:none;}
  .calendar-page .section-title{margin-top:0;}
  .cal-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:6px 0 14px;}
  .cal-nav-label{font-family:var(--font-mono);font-weight:600;font-size:16px;letter-spacing:0.03em;color:var(--text);}
  .cal-nav-btns{display:flex;gap:6px;flex:none;}
  .cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;}
  .cal-dow{text-align:center;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:var(--text-muted);padding:2px 0 6px;}
  .cal-cell{box-sizing:border-box;aspect-ratio:1;border:1px solid var(--glass-hairline);border-radius:7px;padding:6px;display:flex;flex-direction:column;gap:2px;background:var(--surface-2);min-width:0;font:inherit;color:inherit;text-align:left;}
  button.cal-cell{cursor:pointer;transition:border-color .15s ease,background .15s ease;}
  .cal-cell.empty{background:transparent;border-color:transparent;}
  .cal-cell.muted{background:var(--surface);opacity:0.55;}
  .cal-cell.has-wins{background:var(--surface-3);}
  .cal-cell.has-start{background:var(--surface-2);border-color:color-mix(in srgb, var(--gold) 40%, var(--glass-hairline));}
  .cal-cell.has-played{background:var(--surface-2);}
  .cal-cell.has-note{background:var(--surface-2);border-style:dashed;border-color:var(--border);}
  .cal-cell.today{border-color:var(--accent);}
  button.cal-cell:hover,button.cal-cell:focus-visible{border-color:var(--accent);outline:none;}
  .cal-cell.selected{border-color:var(--accent);box-shadow:var(--shadow-glow-accent);}
  .cal-daynum{font-size:12px;font-weight:600;color:var(--text-muted);line-height:1;flex:none;}
  .cal-badges{display:flex;flex-wrap:wrap;gap:3px;align-items:center;justify-content:center;flex:1;overflow:hidden;}
  .cal-badges .club-badge{width:30px;height:30px;}
  .cal-more{font-size:11px;font-weight:700;color:var(--text-muted);}
  .cal-start-pill{
    flex:1;display:flex;align-items:center;justify-content:center;text-align:center;
    font-size:9.5px;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;
    color:var(--gold);line-height:1.3;
  }
  .cal-played-dot{
    flex:1;display:flex;align-items:center;justify-content:center;
  }
  .cal-played-dot::before{
    content:"";width:6px;height:6px;border-radius:50%;background:var(--text-muted);opacity:0.7;
  }
  .cal-day-note-row{padding:8px 0;border-top:1px solid var(--glass-hairline);font-size:13px;color:var(--text-muted);}
  .cal-day-note-row:first-child{border-top:none;}
  @media (max-width:640px){
    .cal-grid{gap:4px;}
    .cal-cell{border-radius:5px;padding:4px;}
    .cal-badges{gap:2px;}
    .cal-badges .club-badge{width:20px;height:20px;}
  }
  @media (max-width:460px){
    .cal-grid{gap:3px;}
    .cal-cell{border-radius:5px;padding:3px;}
    .cal-badges{gap:1px;}
    .cal-badges .club-badge{width:15px;height:15px;}
    .cal-daynum{font-size:10px;}
    .cal-nav{flex-wrap:wrap;gap:8px;}
  }
  .cal-day-detail{margin-top:18px;border:1px solid var(--glass-hairline);border-radius:7px;padding:6px 16px 12px;background:var(--surface-2);}
  .cal-day-detail h3{margin:12px 0 4px;font-size:14px;}
  .cal-winner-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid var(--glass-hairline);}
  .cal-winner-row:first-of-type{border-top:none;}
  .cal-winner-row .club-badge{width:34px;height:34px;flex:none;}
  .cal-winner-meta{min-width:0;}
  .cal-winner-season{font-size:11.5px;color:var(--text-muted);font-weight:600;text-transform:uppercase;letter-spacing:0.04em;}
  .cal-winner-name{font-weight:700;}
  .cal-empty-note{color:var(--text-muted);font-size:14px;line-height:1.5;}
  .cal-note-hint{margin:2px 0 14px;font-size:12.5px;color:var(--text-muted);line-height:1.5;}
  .cal-note-row{display:flex;align-items:flex-start;gap:8px;margin-bottom:8px;}
  .cal-note-row label{flex:none;min-width:74px;padding-top:9px;font-size:11.5px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.04em;}
  .cal-note-badge{flex:none;margin-top:4px;display:flex;}
  .cal-note-badge .club-badge{width:30px;height:30px;}
  .cal-note-field{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;}
  .cal-note-row input,.cal-note-row select{width:100%;box-sizing:border-box;font:inherit;font-size:14px;padding:8px 10px;border:1px solid var(--border);border-radius:5px;background:var(--surface-2);color:var(--text);}
  .cal-note-row select{appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:26px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;background-size:11px;}
  .cal-note-row input:focus,.cal-note-row select:focus{outline:none;border-color:var(--accent);}
  .cal-note-remove{flex:none;width:30px;height:30px;margin-top:3px;border:none;border-radius:5px;background:var(--surface-2);color:var(--text-muted);cursor:pointer;font-size:17px;line-height:1;}
  .cal-note-remove:hover{background:var(--surface-3);color:var(--danger);}
  .cal-note-add{margin-top:4px;}
  .cal-note-actions{display:flex;gap:8px;margin-top:14px;}
  /* Small "— PES 2020" kicker above the title — a short rule, then muted,
     letter-spaced mono text, matching a broadcast title card's eyebrow. */
  .masthead-eyebrow{
    display:flex;align-items:center;gap:10px;margin-bottom:6px;
    font-family:var(--font-mono);font-size:12px;font-weight:600;
    letter-spacing:0.28em;color:var(--text-muted);
  }
  .masthead-eyebrow-rule{width:22px;height:1px;background:var(--text-muted);opacity:0.6;flex:none;}
  .masthead-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;margin-bottom:10px;}
  header.masthead h1{
    font-family:var(--font-display);
    font-size:clamp(46px,7.5vw,64px);
    letter-spacing:0.02em;
    line-height:0.95;
    margin:0;
    text-wrap:balance;
    color:#FFFFFF;
  }
  /* First word (the club-agnostic "brand" half of the title) gets a cool
     metallic silver treatment; the rest ("LEAGUE '26") gets the accent
     green — same two-tone split as the reference title card. */
  header.masthead h1 .title-mono{
    background:linear-gradient(180deg,#FFFFFF 0%,#B9C2CE 55%,#8A93A0 100%);
    -webkit-background-clip:text;background-clip:text;color:transparent;
  }
  header.masthead h1 .title-accent{
    background:linear-gradient(180deg,#FFFFFF 0%,var(--accent) 55%,var(--accent-2) 100%);
    -webkit-background-clip:text;background-clip:text;color:transparent;
  }
  /* Dark bordered pill, not a filled color chip — "SEASON N" in plain
     white, a faint separator dot, then the status word tinted per state
     (reusing the same win/pending/ended palette other badges use). */
  .season-badge-pill{
    position:relative;top:2px;white-space:nowrap;
    display:inline-flex;align-items:center;gap:8px;
    font-family:var(--font-mono);font-size:12px;font-weight:600;letter-spacing:0.08em;
    color:var(--text);background:rgba(255,255,255,0.03);
    border:1px solid var(--glass-hairline);border-radius:5px;padding:8px 14px;
  }
  .season-badge-sep{color:var(--text-muted);opacity:0.5;}
  .season-badge-status.win{color:var(--win);}
  .season-badge-status.pending{color:var(--info);}
  .season-badge-status.ended{color:var(--danger);}
  header.masthead .tagline{
    color:var(--text-muted);
    opacity:0.72;
    font-family:var(--font-display);
    font-size:16.5px;
    font-weight:400;
    letter-spacing:0.06em;
    text-transform:uppercase;
    max-width:62ch;
  }
  /* On phones the title is big enough to run under the three top-right
     utility icons — reserve their width on the rows that sit level with
     them so the text wraps before it reaches them. */
  @media (max-width:560px){
    .header-utility-link{top:0;}
    .masthead-eyebrow,
    .masthead-title-row{padding-right:148px;}
  }
  /* Tab bar — a single bordered card with a clipped top-right/bottom-left
     corner (like a broadcast lower-third's angled frame), tabs separated by
     hairline dividers rather than gaps, and the active tab marked by a
     short green underline instead of a filled chip. Still sticky, so it
     carries a translucent blurred background — without that, the row has
     nothing behind it once pinned to the top and scrolled content just
     shows through underneath it, unreadable. */
  .tabbar{
    position:sticky;top:0;z-index:5;
    display:flex;align-items:stretch;gap:0;
    border:1px solid var(--glass-hairline);border-radius:7px;
    margin-bottom:28px;overflow-x:auto;overflow-y:hidden;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
  }
  @media (max-width:520px) {
    .tabbar{
      background:#05070d
    }
  }

  .tab-btn{
    font-family:var(--font-display);
    font-size:18px;
    letter-spacing:0.051em;
    background:none;border:none;cursor:pointer;
    padding:16px 20px;
    color:var(--text-muted);
    position:relative;
    white-space:nowrap;flex:none;
    transition:color .15s ease;
  }
  .tab-btn + .tab-btn::before{
    content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
    width:1px;height:18px;background:var(--glass-hairline);
  }
  .tab-btn::after{
    content:"";position:absolute;left:18px;right:18px;bottom:0;height:2px;
    background:var(--accent);border-radius:2px 2px 0 0;
    transform:scaleX(0);transform-origin:center;
    transition:transform .18s cubic-bezier(.22,.8,.22,1),box-shadow .18s ease;
  }
  .tab-btn:hover{color:var(--text);}
  .tab-btn.active{color:var(--text);}
  /* The underline glows, and that glow reaches back up into the label
     itself (a soft text-shadow in the same accent color) so the active tab
     reads as lit from below rather than just marked with a line. */
  .tab-btn.active::after{
    transform:scaleX(1);
    box-shadow:0 0 8px 1px var(--accent),0 0 16px 3px color-mix(in srgb, var(--accent) 55%, transparent);
  }
  .tab-btn.active{text-shadow:0 0 12px color-mix(in srgb, var(--accent) 65%, transparent);}
  .tab-btn.home-btn{
    display:flex;align-items:center;justify-content:center;
    padding:28px 28px;color:var(--text-muted);flex:none;
  }
  .tab-btn.home-btn svg{width:18px;height:18px;display:block;}
  .tab-btn.home-btn:hover{color:var(--text);}
  .tab-btn.home-btn.active{color:var(--accent);}
  .tab-btn.home-btn::after{left:14px;right:14px;}
  /* Home / main menu */
  .home-page{margin-top:6px;}
  .champion-banner{
    position:relative;overflow:hidden;border-radius:10px;
    padding:30px 26px;margin-bottom:30px;min-height:150px;
    display:flex;align-items:center;justify-content:space-between;gap:20px;
    background:linear-gradient(135deg, var(--champ-bg,var(--surface-2)) 0%, var(--champ-bg2,var(--surface-2)) 100%);
    color:var(--champ-text,var(--text));
    border:1px solid var(--glass-hairline);
    box-shadow:var(--shadow-lift);
  }
  .champion-banner::after{
    content:'';position:absolute;inset:0;pointer-events:none;
    background:linear-gradient(120deg, rgba(255,255,255,0.16) 0%, transparent 32%);
  }
  .champion-banner.empty{background:var(--surface-2);color:var(--text-muted);}
  .champion-blur{
    position:absolute;top:-70px;right:-50px;opacity:0.24;filter:blur(24px);
    pointer-events:none;transform:rotate(-6deg);line-height:0;
  }
  .champion-content{position:relative;z-index:1;}
  /* Same crown glyph as the Trophy Cabinet, sitting just above the eyebrow. */
  .champion-crown{
    display:block;width:22px;height:22px;margin-bottom:10px;
    color:var(--gold);filter:drop-shadow(0 2px 5px rgba(0,0,0,0.4));
  }
  .champion-crown svg{width:100%;height:100%;display:block;}
  .champion-banner.empty .champion-crown{opacity:0.45;}
  .champion-eyebrow{
    text-transform:uppercase;font-size:12px;letter-spacing:0.16em;font-weight:700;
    color:var(--champ-fg,inherit);opacity:0.92;margin-bottom:6px;
  }
  .champion-name{
    font-family:var(--font-display);font-size:clamp(30px,6vw,46px);
    line-height:1;letter-spacing:0.02em;
  }
  .champion-club{font-size:16px;font-weight:700;margin-top:5px;opacity:0.92;}
  .champion-sub{font-size:12.5px;margin-top:9px;opacity:0.8;}
  .champion-crest{position:relative;z-index:1;flex:none;filter:drop-shadow(0 10px 20px rgba(0,0,0,0.35));}
  /* Home showcase — one bordered block: season label, reigning-champion
     banner, then the four award cells butted straight against it (2-up,
     hairline dividers, no gaps). */
  .season-showcase{
    margin-bottom:30px;
    border:1px solid var(--glass-hairline);border-radius:10px;overflow:hidden;
    background:var(--surface);
  }
  .season-showcase-bare{border:none;background:none;box-shadow:none;overflow:visible;}
  .season-showcase-eyebrow{
    text-transform:uppercase;font-size:12px;letter-spacing:0.16em;font-weight:700;
    color:var(--text-muted);padding:16px 22px 12px;
  }
  .season-showcase .champion-banner{
    margin:0;border-radius:0;border-left:0;border-right:0;border-top:0;
    border-bottom:1px solid var(--glass-hairline);box-shadow:none;
  }
  .season-awards-grid{
    display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--glass-hairline);
  }
  .award-card{
    display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;
    background:#0b0d1696;border:none;border-radius:0;padding:20px 22px;min-width:0;
  }
  .award-card-empty{opacity:0.5;}
  .award-text{min-width:0;}
  .award-icon-wrap{
    width:92px;height:92px;flex:none;display:flex;align-items:center;justify-content:center;
    filter:drop-shadow(0 6px 14px rgba(0,0,0,0.35));
  }
  .award-icon{max-width:100%;max-height:100%;display:block;}
  .award-card-empty .award-icon{filter:grayscale(1);opacity:0.7;}
  .award-label{
    font-family:var(--font-display);font-size:14px;letter-spacing:0.07em;text-transform:uppercase;
    color:var(--accent);
  }
  .award-name{font-weight:700;font-size:15.5px;line-height:1.2;margin-top:3px;word-break:break-word;}
  .award-stat{font-size:11.5px;color:var(--text-muted);line-height:1.3;margin-top:3px;}
  @media (max-width:600px){
    .season-awards-grid{grid-template-columns:1fr;}
    .award-icon-wrap{width:74px;height:74px;}
    .award-card{padding:16px 18px;}
    .season-showcase-eyebrow{padding:14px 18px 10px;}
  }

  /* ---- Home dashboard widgets ---- */
  .dash{display:flex;flex-direction:column;gap:20px;}
  /* Bleeds the header artwork up behind the topbar the same way every
     page-hero does, plus reserves real height of its own so more of the
     image shows before the hero cards start (which, coming after it in the
     DOM, paint over the ::before naturally — no z-index needed). */
  .home-hero-cover{position:relative;margin:-26px -28px 22px;padding:34px 28px 22px;border-bottom:1px solid var(--glass-hairline);}
  .home-hero-cover::before{
    content:"";position:absolute;inset:-96px 0 0 0;z-index:0;pointer-events:none;
    background-image:url("assets/header-cover.jpg");
    background-repeat:no-repeat;background-position:right top;background-size:cover;
  }
  .home-hero-content{position:relative;z-index:1;max-width:60ch;}
  @media (max-width:900px){
    .home-hero-cover{margin:-20px -18px 22px;padding:26px 20px 20px;}
  }
  .dash-hero{display:grid;grid-template-columns:1.7fr 1fr;gap:20px;align-items:stretch;}
  .dash-hero .champion-banner{margin-bottom:0;height:100%;}
  .dash-hero-side{min-height:150px;}
  .dash-row-3{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:16px;align-items:stretch;}
  .dash-row-4{display:grid;grid-template-columns:1.3fr 1fr 1fr 1.3fr;gap:20px;align-items:stretch;}
  .dash-panel{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:7px;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    padding:14px 16px;min-width:0;
  }
  /* Dashboard chrome (panel titles, table headers, meta labels) is
     deliberately plain body-weight sans, not the big display face — that's
     reserved for hero numbers and names, not dense UI labels. */
  .dash-panel-head{
    display:flex;align-items:center;justify-content:space-between;gap:10px;
    margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid var(--glass-hairline);
  }
  .dash-panel-head-left{display:flex;align-items:center;gap:8px;min-width:0;}
  .dash-panel-head-icon{width:15px;height:15px;flex:none;color:var(--text-muted);display:flex;}
  .dash-panel-head-icon svg{width:100%;height:100%;display:block;}
  .dash-panel-head h3{
    font-family:var(--font-body);font-size:13px;letter-spacing:0.03em;margin:0;font-weight:700;color:var(--text);
    text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  .dash-panel-sub{font-family:var(--font-body);font-size:11.5px;color:var(--text-muted);font-weight:600;white-space:nowrap;}
  .dash-panel-link{
    background:none;border:none;cursor:pointer;color:var(--accent);font-size:12px;font-weight:700;padding:0;
    display:inline-flex;align-items:center;gap:4px;white-space:nowrap;
  }
  .dash-panel-link svg{width:13px;height:13px;}
  .dash-panel-link:hover{text-decoration:underline;}
  .dash-standings{padding:12px 0 2px;display:flex;flex-direction:column;}
  .dash-standings .dash-panel-head{padding:0 16px 10px;}
  .dash-standings .table-scroll{border:none;border-radius:0;background:none;overflow-x:auto;flex:1;}
  .dash-standings table{font-size:12px;}
  .dash-standings th,.dash-standings td{padding:9px 10px;}
  .dash-standings td .club{max-width:74px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:middle;}
  /* Compact widget: drop the raw goals-for/against columns so the table
     fits without needing to scroll (the full breakdown is one click away
     via "View Full Table") — everything else, including Form, stays. */
  .dash-standings th:nth-child(8),.dash-standings td:nth-child(8),
  .dash-standings th:nth-child(9),.dash-standings td:nth-child(9){display:none;}
  .table-club-cell{text-align:center;}
  .table-club-cell .club-badge{display:block;margin:0 auto;}
  .table-form-cell{text-align:center;}
  .table-form-row{display:inline-flex;gap:3px;}
  .table-form-empty{color:var(--text-muted);}
  .dash-standings .form-dot{width:20px;height:20px;font-size:9.5px;}
  /* Next Match — stretches to match the standings panel's height (grid
     align-items:stretch on .dash-row-3), with its own content spread across
     that height instead of huddled at the top. */
  .dash-panel-nextmatch{display:flex;flex-direction:column;}
  .dash-next-match{
    flex:1;display:flex;align-items:center;justify-content:center;gap:18px;padding:10px 0;
  }
  .dash-next-side{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;min-width:0;flex:1;}
  .dash-next-side .club-badge{width:52px;height:52px;}
  .dash-next-club{font-size:11px;color:var(--text-muted);font-weight:600;}
  .dash-next-name{font-weight:700;font-size:14.5px;}
  .dash-next-vs{font-size:12px;color:var(--text-muted);font-weight:700;letter-spacing:0.04em;flex:none;}
  .dash-next-meta{
    display:flex;align-items:center;gap:16px;padding:10px 2px;
    border-top:1px solid var(--glass-hairline);font-size:12px;color:var(--text-muted);
  }
  .dash-next-meta-item{display:flex;align-items:center;gap:6px;}
  .dash-next-meta-item svg{width:14px;height:14px;flex:none;opacity:0.8;}
  .dash-cta{
    width:100%;text-align:center;text-transform:uppercase;letter-spacing:0.04em;font-size:13px;
    padding:12px 16px;display:flex;align-items:center;justify-content:center;gap:8px;
  }
  .dash-cta svg{width:15px;height:15px;}
  .dash-result-list{display:flex;flex-direction:column;gap:10px;flex:1;}
  /* Badges flank the score in the middle (not paired with their own name
     out at the edges) — date, home name, home badge, score, away badge,
     away name, each column the same gap apart. */
  .dash-result-row{
    display:grid;grid-template-columns:44px 1fr auto auto auto 1fr;align-items:center;gap:10px;
    padding:10px 2px;border-top:1px solid var(--glass-hairline);font-size:12px;line-height:1.5;
  }
  .dash-result-row:first-child{border-top:none;}
  .dash-result-date{font-family:var(--font-body);font-size:10.5px;color:var(--text-muted);font-weight:600;}
  .dash-result-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;}
  .dash-result-name-home{text-align:right;}
  .dash-result-name-away{text-align:left;}
  .dash-result-badge{display:flex;flex:none;}
  .dash-result-badge .club-badge{width:20px;height:20px;}
  .dash-result-score{font-weight:700;font-family:var(--font-body);flex:none;text-align:center;font-variant-numeric:tabular-nums;}
  .dash-insights{display:flex;flex-direction:column;}
  .dash-insights-grid{display:grid;grid-template-columns:repeat(4,1fr);flex:1;align-items:center;}
  .dash-insight{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
    text-align:center;padding:4px 10px;border-left:1px solid var(--glass-hairline);
  }
  .dash-insight:first-child{border-left:none;}
  .dash-insight .v{font-family:var(--font-display);font-size:32px;line-height:1;color:var(--accent);}
  .dash-insight .l{font-size:11px;color:var(--text-muted);}
  .dash-season-progress{display:flex;flex-direction:column;}
  .dash-progress-caption{font-size:11px;color:var(--text-muted);font-weight:600;margin-bottom:6px;}
  .dash-progress-track{
    height:6px;border-radius:999px;background:var(--surface-3);overflow:hidden;margin:2px 0 14px;
  }
  .dash-progress-fill{
    height:100%;border-radius:999px;background:linear-gradient(90deg, var(--text-muted) 0%, var(--text) 100%);
  }
  .dash-progress-stats{display:grid;grid-template-columns:repeat(3,1fr);flex:1;align-items:center;}
  @media (max-width:980px){
    .dash-row-3{grid-template-columns:1fr;}
    .dash-row-4{grid-template-columns:1fr 1fr;}
  }
  @media (max-width:640px){
    .dash-hero{grid-template-columns:1fr;}
    .dash-row-4{grid-template-columns:1fr;}
    .dash-insights-grid{grid-template-columns:1fr 1fr;row-gap:10px;}
    .dash-insight{border-left:none;}
    .dash-insight:nth-child(2n){border-left:1px solid var(--glass-hairline);}
    .dash-result-row{grid-template-columns:1fr auto auto auto 1fr;gap:6px;font-size:11px;padding:8px 2px;}
    .dash-result-date{display:none;}
  }
  /* The Home hero's Cup card is sometimes a live link ("In Progress") — reset
     the <button> chrome so it reads exactly like the plain champion-banner
     it sits beside. */
  .dash-hero-link{font:inherit;text-align:left;width:100%;cursor:pointer;}

  /* Dirilis Cup hero card — deliberately neutral/gold rather than
     club-tinted like the champion banner, so the two read as two different
     kinds of honour at a glance. */
  .cup-winner-card{
    position:relative;overflow:hidden;border-radius:10px;
    padding:28px 26px;min-height:150px;
    display:flex;flex-direction:column;justify-content:center;gap:7px;
    background:linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%), var(--surface-2);
    border:1px solid var(--glass-hairline);
    box-shadow:var(--shadow-lift);
    cursor:pointer;
    transition:box-shadow .18s ease;
  }
  .cup-winner-card:hover{box-shadow:var(--shadow-lift), var(--shadow-glow-gold);}
  .cup-winner-hero{margin-bottom:30px;}
  .cup-winner-ghost{
    position:absolute;right:-6%;bottom:-18%;height:150%;max-width:52%;
    object-fit:contain;object-position:bottom right;
    opacity:0.14;filter:grayscale(1) brightness(1.8);
    pointer-events:none;
  }
  .cup-winner-arrow{
    position:absolute;top:18px;right:18px;z-index:2;
    width:30px;height:30px;border-radius:50%;flex:none;
    background:rgba(255,255,255,0.07);border:1px solid var(--glass-hairline);
    color:var(--text);display:flex;align-items:center;justify-content:center;cursor:pointer;
    transition:background .15s ease;
  }
  .cup-winner-arrow:hover{background:rgba(255,255,255,0.15);}
  .cup-winner-arrow svg{width:16px;height:16px;}
  .cup-winner-head{display:flex;align-items:center;gap:8px;position:relative;z-index:1;}
  .cup-winner-icon{width:19px;height:19px;flex:none;color:var(--gold);}
  .cup-winner-icon svg{width:100%;height:100%;display:block;}
  .cup-winner-label{
    text-transform:uppercase;font-size:12px;letter-spacing:0.16em;font-weight:700;color:var(--gold);
  }
  .cup-winner-name{
    font-family:var(--font-display);font-size:clamp(26px,4.4vw,38px);line-height:1;letter-spacing:0.02em;
    color:var(--text);position:relative;z-index:1;
  }
  .cup-winner-name-sm{font-size:22px;}
  .cup-winner-meta{
    display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-muted);position:relative;z-index:1;
  }
  .cup-winner-meta .club-badge{width:24px;height:24px;flex:none;}
  .cup-winner-club{color:var(--text);font-weight:700;text-transform:uppercase;letter-spacing:0.04em;font-size:12.5px;}
  .cup-winner-dot{opacity:0.5;}
  .cup-winner-season{text-transform:uppercase;letter-spacing:0.04em;font-size:12.5px;}
  .cup-winner-meta-muted{font-size:13px;}

  /* ---- Dirilis Cup tab ---- */
  .super-cup-section{
    margin-bottom:26px;padding-bottom:22px;border-bottom:1px solid var(--glass-hairline);
  }
  .super-cup-match{max-width:420px;}
  .doubles-section{margin-top:30px;padding-top:22px;border-top:1px solid var(--glass-hairline);}
  .cup-history-section{margin-bottom:28px;}
  .cup-history-section .subsection-title{margin:0 0 10px;}
  .chaos-section{margin-top:30px;padding-top:22px;border-top:1px solid var(--glass-hairline);}
  .doubles-pairs-row{display:flex;align-items:center;gap:16px;max-width:520px;}
  .doubles-pair-card{
    flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:7px;padding:16px 14px;
  }
  .doubles-pair-names{font-weight:700;font-size:14px;}
  .doubles-vs{font-family:var(--font-mono);font-size:12px;color:var(--text-muted);flex:none;}
  .doubles-club-input{
    width:100%;text-align:center;padding:6px 8px;border-radius:5px;border:1px solid var(--border);
    background:var(--surface-2);color:var(--text);font-size:13px;
  }
  .doubles-pair-club-ro{font-size:13px;color:var(--text-muted);}
  .doubles-pair-club-ro.muted{opacity:0.6;font-style:italic;}
  .doubles-series-score{margin-top:14px;font-family:var(--font-mono);font-size:12.5px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.04em;}
  .doubles-game-row{display:flex;align-items:center;gap:10px;margin-top:8px;font-size:13.5px;}
  .doubles-game-label{color:var(--text-muted);min-width:60px;}
  .doubles-game-score{font-family:var(--font-mono);font-weight:600;}
  .doubles-game-entry{display:flex;align-items:center;gap:10px;margin-top:12px;}
  .doubles-game-pending{margin-top:12px;font-size:13px;color:var(--text-muted);}
  .cup-sub{color:var(--text-muted);font-size:14px;margin:-6px 0 20px;}
  .cup-bracket{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
  .cup-round-label{
    font-family:var(--font-display);font-size:15px;letter-spacing:0.05em;text-transform:uppercase;
    color:var(--text-muted);margin-bottom:10px;
  }
  .cup-match{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:7px;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    padding:16px;display:flex;flex-direction:column;gap:10px;
  }
  .cup-match-pending{color:var(--text-muted);font-size:13px;text-align:center;padding:28px 12px;}
  .cup-match-side{
    display:flex;align-items:center;gap:10px;padding:6px;border-radius:5px;cursor:pointer;
    transition:background .12s ease;
  }
  .cup-match-side:hover{background:var(--surface-2);}
  .cup-match-side .club-badge{flex:none;}
  .cup-side-name{flex:1;font-weight:700;font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .cup-match-side.cup-side-winner .cup-side-name{color:var(--win);}
  .cup-match-side.cup-side-loser{opacity:0.5;}
  .cup-seed{font-family:var(--font-mono);font-size:10.5px;color:var(--text-muted);flex:none;}
  .cup-side-country{opacity:0.7;}
  .cup-match-score{display:flex;align-items:center;justify-content:center;gap:8px;padding:2px 0;}
  .cup-score-input{
    width:44px;text-align:center;font-family:var(--font-mono);font-size:16px;font-weight:700;
    border:1px solid var(--border);border-radius:5px;background:var(--surface-2);color:var(--text);padding:6px 4px;
  }
  .cup-score-input:focus{outline:none;border-color:var(--accent);}
  .cup-score-sep{color:var(--text-muted);font-weight:700;}
  .cup-score-ro{font-family:var(--font-mono);font-size:18px;font-weight:800;min-width:22px;text-align:center;}
  .cup-save-btn{align-self:center;}
  .cup-pen-row{
    display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;
    font-size:12.5px;color:var(--text-muted);text-align:center;
  }
  .cup-pen-pending{color:var(--danger);font-weight:700;}
  .cup-pen-note{text-align:center;font-size:12px;color:var(--text-muted);}
  @media (max-width:800px){
    .cup-bracket{grid-template-columns:1fr;}
  }

  /* ---- Cup match records (stats + goal times) and the Cup → Matches tab ---- */
  .cup-details{margin-top:8px;}
  .cup-details-toggle{
    display:flex;align-items:center;gap:8px;width:100%;padding:8px 12px;border-radius:6px;
    border:1px dashed var(--glass-hairline);background:transparent;color:var(--text-muted);
    font-size:12.5px;font-weight:600;cursor:pointer;text-align:left;
  }
  .cup-details-toggle > span{flex:1;}
  .cup-details-toggle:hover{color:var(--text);border-color:var(--accent);}
  .cup-details-toggle svg{width:14px;height:14px;flex:none;transition:transform .15s ease;}
  .cup-details-toggle.is-open svg{transform:rotate(180deg);}
  .cup-details-dot{width:7px;height:7px;border-radius:50%;background:var(--win);flex:none;}
  .cupm-nostats{font-style:normal;font-size:11.5px;font-weight:500;opacity:0.7;}
  .cup-details-body{margin-top:10px;padding:14px;border:1px solid var(--glass-hairline);border-radius:8px;background:var(--surface);}
  .cup-stat-head{
    display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:6px;
    font-size:11.5px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:var(--text-muted);
  }
  .cup-stat-head span:last-child{text-align:right;}
  .cupm-filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px;}
  .cupm-filter{
    font-size:12.5px;font-weight:600;padding:7px 14px;border-radius:999px;cursor:pointer;
    border:1px solid var(--glass-hairline);background:var(--surface-2);color:var(--text-muted);
  }
  .cupm-filter span{opacity:0.6;margin-left:4px;font-family:var(--font-mono);}
  .cupm-filter:hover{color:var(--text);}
  .cupm-filter.active{color:var(--text);border-color:var(--accent);}
  .cupm-list{display:flex;flex-direction:column;gap:12px;}
  .cupm-row{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:14px 16px;}
  .cupm-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:12px;color:var(--text-muted);margin-bottom:10px;}
  .cupm-comp{font-size:10.5px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;padding:2px 8px;border-radius:999px;background:var(--info-soft);color:var(--info);}
  .cupm-comp.is-cup{background:var(--win-soft);color:var(--win);}
  .cupm-comp.is-chaos{background:var(--danger-soft);color:var(--danger);}
  .cupm-line{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-bottom:8px;}
  .cupm-side{display:flex;align-items:center;gap:8px;min-width:0;font-weight:700;font-size:14px;}
  .cupm-side.is-away{justify-content:flex-end;flex-direction:row-reverse;text-align:right;}
  .cupm-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .cupm-side.is-winner .cupm-name{color:var(--win);}
  .cupm-score{font-family:var(--font-mono);font-weight:800;font-size:18px;}
  .cupm-pen{text-align:center;font-size:12px;color:var(--text-muted);margin-bottom:8px;}
  /* ---- Cup page → Bracket tab ---- */
  .cup-comp-pills{margin-bottom:18px;}
  .cupb-panel{
    display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:0;margin-bottom:20px;
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:12px;overflow:hidden;
  }
  .cupb-main{padding:22px 24px;min-width:0;}
  .cupb-champ{display:flex;border-left:1px solid var(--glass-hairline);background:linear-gradient(160deg,var(--surface-2),var(--surface));}
  .cupb-bracket{display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);align-items:center;}
  .cupb-bracket.is-single{grid-template-columns:minmax(0,420px);}
  .cupb-col-title{font-size:11px;font-weight:700;letter-spacing:0.07em;text-transform:uppercase;color:var(--text-muted);margin-bottom:12px;}
  .cupb-semis{display:flex;flex-direction:column;gap:26px;}
  .cupb-col-final{align-self:center;}
  .cupb-col-final .cupb-stage{display:none;}
  .cupb-conn{position:relative;align-self:stretch;margin-top:26px;}
  .cupb-conn i{position:absolute;background:var(--glass-hairline);}
  .cupb-conn i:nth-child(1){left:0;top:25%;width:50%;height:2px;}
  .cupb-conn i:nth-child(2){left:0;top:75%;width:50%;height:2px;}
  .cupb-conn i:nth-child(3){left:50%;top:25%;width:2px;height:50%;}
  .cupb-conn i:nth-child(4){left:50%;top:50%;width:50%;height:2px;}
  .cupb-match{
    display:block;width:100%;text-align:left;font:inherit;color:inherit;
    background:var(--surface-2);border:1px solid var(--glass-hairline);border-radius:10px;padding:10px 12px 8px;
  }
  button.cupb-match{cursor:pointer;transition:border-color .15s ease,transform .1s ease;}
  button.cupb-match:hover{border-color:var(--accent);}
  .cupb-match.is-selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);}
  .cupb-match.is-await{opacity:0.55;}
  .cupb-stage{font-size:10.5px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);margin-bottom:6px;}
  .cupb-row{display:flex;align-items:center;gap:10px;padding:6px 4px;border-top:1px solid var(--glass-hairline);}
  .cupb-stage + .cupb-row{border-top:none;}
  .cupb-name{flex:1;min-width:0;font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .cupb-score{font-family:var(--font-mono);font-weight:800;font-size:16px;min-width:22px;text-align:right;}
  .cupb-row.is-winner .cupb-name{color:var(--win);}
  .cupb-row.is-tbd{opacity:0.55;}
  .cupb-tbd-crest{width:28px;height:28px;border-radius:50%;border:1.5px dashed var(--glass-hairline);flex:none;display:inline-block;}
  .cupb-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px;font-size:11.5px;color:var(--text-muted);}
  .cupb-status{display:inline-flex;align-items:center;gap:4px;font-weight:600;}
  .cupb-status svg{width:12px;height:12px;}
  .cupb-status.is-done{color:var(--win);}
  .cupb-status.is-next{color:var(--accent);}
  .cupc-card{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:22px 16px;text-align:center;}
  .cupc-kicker{font-size:11px;font-weight:700;letter-spacing:0.3em;text-transform:uppercase;color:var(--text-muted);}
  .cupc-name{font-family:var(--font-display);font-size:22px;line-height:1.1;}
  .cupc-sub{font-size:11px;font-weight:700;letter-spacing:0.22em;text-transform:uppercase;color:var(--text-muted);}
  .cupc-empty{display:flex;flex-direction:column;align-items:center;gap:8px;color:var(--text-muted);font-size:13px;}
  .cupc-empty svg{width:40px;height:40px;opacity:0.5;}
  .cupt-panel{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:12px;margin-bottom:20px;overflow:hidden;}
  .cupt-head{display:flex;align-items:baseline;justify-content:space-between;padding:16px 20px;}
  .cupt-head h3{margin:0;font-size:18px;}
  .cupt-head span{font-size:12.5px;color:var(--text-muted);}
  .cupt-cols,.cupt-row{display:grid;grid-template-columns:110px 150px minmax(0,1fr) 60px 130px;align-items:center;gap:12px;padding:0 20px;}
  .cupt-cols{padding-top:9px;padding-bottom:9px;border-top:1px solid var(--glass-hairline);border-bottom:1px solid var(--glass-hairline);font-size:11.5px;font-weight:600;color:var(--text-muted);}
  .cupt-row{width:100%;text-align:left;font:inherit;color:inherit;background:none;border:none;border-bottom:1px solid var(--glass-hairline);padding-top:13px;padding-bottom:13px;}
  .cupt-row:last-child{border-bottom:none;}
  button.cupt-row{cursor:pointer;}
  button.cupt-row:hover{background:var(--surface-2);}
  .cupt-row.is-selected{background:var(--surface-2);box-shadow:inset 3px 0 0 var(--accent);}
  .cupt-row.is-static{opacity:0.6;}
  .cupt-date{font-size:13px;color:var(--text-muted);}
  .cupt-stage{display:flex;align-items:center;gap:8px;font-size:13.5px;}
  .cupt-stage svg{width:16px;height:16px;color:var(--accent);flex:none;}
  .cupt-fix{display:grid;grid-template-columns:minmax(0,1fr) 64px minmax(0,1fr);align-items:center;gap:8px;min-width:0;}
  .cupt-side{display:flex;align-items:center;gap:8px;min-width:0;font-weight:600;font-size:14px;}
  .cupt-side.is-away{flex-direction:row-reverse;text-align:right;}
  .cupt-side.is-tbd{opacity:0.55;}
  .cupt-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .cupt-score{text-align:center;font-family:var(--font-mono);font-weight:800;}
  .cupt-stats svg{width:18px;height:18px;color:var(--text-muted);opacity:0.4;}
  .cupt-stats.is-on svg{color:var(--info);opacity:1;}
  .cupt-status{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--text-muted);}
  .cupt-status i{width:9px;height:9px;border-radius:50%;background:var(--text-muted);opacity:0.5;flex:none;}
  .cupt-status.is-done{color:var(--text);}
  .cupt-status.is-done i{background:var(--win);opacity:1;}
  .cupt-status.is-next{color:var(--accent);}
  .cupt-status.is-next i{background:var(--accent);opacity:1;}
  .cupp-panel{background:var(--surface);border:1px solid var(--accent);border-radius:12px;margin-bottom:20px;overflow:hidden;}
  .cupp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--glass-hairline);}
  .cupp-head h3{margin:2px 0 0;font-size:18px;}
  .cupp-kicker{font-size:11px;font-weight:700;letter-spacing:0.07em;text-transform:uppercase;color:var(--accent);}
  .cupp-close{background:none;border:none;color:var(--text-muted);font-size:24px;line-height:1;cursor:pointer;padding:0 4px;}
  .cupp-close:hover{color:var(--text);}
  .cupp-body{padding:20px;}
  .cupp-board{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:16px;margin-bottom:16px;}
  .cupp-side{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;min-width:0;}
  .cupp-side b{font-size:15px;}
  .cupp-side small{font-size:11px;color:var(--text-muted);}
  .cupp-score{display:flex;align-items:center;gap:10px;font-size:26px;font-weight:800;color:var(--text-muted);}
  .cupp-score-input{
    width:64px;height:64px;text-align:center;font-family:var(--font-mono);font-size:28px;font-weight:800;
    border:1px solid var(--border);border-radius:8px;background:var(--surface-2);color:var(--text);padding:0 14px 0 4px;
  }
  .cupp-score-input:focus{outline:none;border-color:var(--accent);}
  .cupp-score .num-stepper{display:inline-block;}
  .cupp-datewrap{display:flex;justify-content:center;margin-bottom:12px;}
  .cupp-actions{display:flex;flex-direction:column;align-items:flex-end;gap:10px;margin-top:20px;}
  .cups-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:var(--surface);border:1px solid var(--glass-hairline);border-radius:12px;margin-bottom:20px;}
  .cups-tile{display:flex;align-items:center;gap:14px;padding:20px;border-left:1px solid var(--glass-hairline);}
  .cups-tile:first-child{border-left:none;}
  .cups-ic{width:44px;height:44px;border-radius:50%;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--info);flex:none;}
  .cups-ic svg{width:22px;height:22px;}
  .cups-val{font-size:26px;font-weight:800;line-height:1.1;}
  .cups-label{font-size:13px;color:var(--text-muted);}
  .cups-sub{font-size:12px;color:var(--text-muted);opacity:0.8;}
  @media (max-width:900px){
    .cupb-panel{grid-template-columns:1fr;}
    .cupb-champ{border-left:none;border-top:1px solid var(--glass-hairline);}
    .cups-row{grid-template-columns:repeat(2,minmax(0,1fr));}
    .cups-tile:nth-child(3){border-left:none;}
    .cups-tile:nth-child(n+3){border-top:1px solid var(--glass-hairline);}
  }
  @media (max-width:720px){
    .cupb-bracket{grid-template-columns:1fr;}
    .cupb-conn{display:none;}
    .cupb-semis{gap:12px;margin-bottom:16px;}
    .cupt-cols{display:none;}
    .cupt-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"stage status" "fix fix" "date stats";row-gap:8px;}
    .cupt-stage{grid-area:stage;} .cupt-status{grid-area:status;justify-self:end;}
    .cupt-fix{grid-area:fix;} .cupt-date{grid-area:date;} .cupt-stats{grid-area:stats;justify-self:end;}
    .cupp-board{grid-template-columns:1fr;gap:10px;}
    .cupp-score-input{width:56px;height:56px;font-size:24px;}
  }
  .cupm-table{min-width:640px;font-size:14px;}
  .cupm-table th,.cupm-table td{padding:11px 14px;}
  @media (max-width:520px){
    .cupm-line{grid-template-columns:1fr;gap:6px;justify-items:center;}
    .cupm-side,.cupm-side.is-away{justify-content:center;flex-direction:row;text-align:center;}
  }
  /* Home hero controls — the "Kickoff" button (left) and the collapsible
     "Main Menu" (right) share one row. */
  .home-menu-row{display:flex;align-items:stretch;margin-bottom:26px;}
  .hud-div{width:1px;align-self:stretch;margin:14px 0;flex:none;background:currentColor;opacity:0.22;}
  .kickoff-btn{
    flex:0 0 clamp(158px, 27%, 200px);
    position:relative;display:flex;align-items:center;gap:13px;overflow:hidden;
    padding:0 18px;border:none;border-radius:8px 0 0 8px;cursor:pointer;
    background:var(--accent-gradient);color:var(--accent-contrast);
    font-family:var(--font-display);text-transform:uppercase;letter-spacing:0.1em;
    font-size:21px;font-weight:500;line-height:1;
    box-shadow:var(--shadow-glow-accent), inset 0 1px 0 rgba(255,255,255,0.22);
    transition:filter .15s ease, box-shadow .15s ease, transform .1s ease;
  }
  .kickoff-btn > *{position:relative;z-index:1;}
  .kickoff-btn::after{
    content:"";position:absolute;inset:0;pointer-events:none;
    background:linear-gradient(118deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 46%);
  }
  .kickoff-btn:hover{filter:brightness(1.05);box-shadow:var(--shadow-glow-accent), var(--shadow-lift);}
  .kickoff-btn:active{transform:translateY(1px);}
  .kickoff-ball{width:24px;height:24px;flex:none;display:block;}
  .kickoff-label{white-space:nowrap;}
  .kickoff-arrow{margin-left:auto;display:flex;flex:none;}
  .kickoff-arrow svg{width:22px;height:22px;display:block;}
  /* Main Menu — collapsed shows just the "Main Menu" bar; the panel is
     absolutely positioned so opening it OVERLAYS the content below instead
     of pushing it down. */
  .home-menu-dd{flex:1;min-width:0;position:relative;z-index:20;}
  .home-menu-toggle{
    position:relative;display:flex;align-items:center;gap:16px;width:100%;height:100%;
    padding:14px 20px;cursor:pointer;text-align:left;
    border:1px solid var(--glass-hairline);border-radius:0 8px 8px 0;background:rgb(19, 22, 27);
    color:var(--text);font-family:var(--font-display);text-transform:uppercase;
    transition:background .2s ease;
  }
  .home-menu-toggle:hover{background:rgb(25, 29, 35);}
  .hmt-icon{display:flex;flex:none;color:var(--text-muted);transition:color .2s ease;}
  .hmt-icon svg{width:22px;height:22px;display:block;}
  .home-menu-dd.open .hmt-icon{color:var(--accent);}
  .hmt-text{display:flex;flex-direction:column;gap:3px;margin-right:auto;min-width:0;}
  .hmt-title{font-size:20px;font-weight:500;letter-spacing:0.14em;color:var(--text-muted);transition:color .2s ease;}
  .home-menu-dd.open .hmt-title{color:var(--text);}
  .hmt-sub{
    font-size:11px;font-style:italic;letter-spacing:0.11em;color:var(--text-muted);opacity:0.7;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  .home-menu-toggle-chevron{
    display:flex;flex:none;color:var(--text-muted);
    transition:transform .32s cubic-bezier(.4,0,.2,1),color .2s ease;
  }
  .home-menu-toggle-chevron svg{width:16px;height:16px;}
  .home-menu-dd.open .home-menu-toggle-chevron{transform:rotate(180deg);color:var(--accent);}
  .home-menu-panel{
    position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:2;
    border:1px solid var(--glass-hairline);border-radius:8px;background:rgb(10, 13, 19);
    box-shadow:var(--shadow-lift);
    overflow:hidden;max-height:0;opacity:0;pointer-events:none;
    transform:translateY(-6px);
    transition:max-height .34s cubic-bezier(.4,0,.2,1),opacity .22s ease,transform .28s cubic-bezier(.4,0,.2,1);
  }
  .home-menu-dd.open .home-menu-panel{
    max-height:800px;opacity:1;pointer-events:auto;transform:translateY(0);
  }
  .home-menu-panel-inner .menu-link:first-child{border-top:none;}
  @media (max-width:460px){
    .kickoff-btn{flex:0 0 64px;padding:0;justify-content:center;}
    .kickoff-label,.kickoff-arrow,.kickoff-btn .hud-div{display:none;}
    .home-menu-toggle{padding:12px 16px;gap:12px;}
    .hmt-title{font-size:17px;letter-spacing:0.1em;}
    .hmt-sub{font-size:10px;}
  }
  .menu-link{
    position:relative;
    display:flex;align-items:center;gap:18px;width:100%;text-align:left;
    background:none;border:none;border-top:1px solid var(--border);
    padding:20px 22px;cursor:pointer;color:var(--text);
    transition:color .25s ease;
  }
  /* Left-edge accent bar that lights on hover — the tab strip's underline
     glow, rotated to run down the left side and dialled back to a whisper.
     No background fill, nothing shifts. */
  .menu-link::before{
    content:"";position:absolute;left:0;top:14px;bottom:14px;width:2px;
    background:var(--accent);border-radius:0 2px 2px 0;
    transform:scaleY(0);transform-origin:center;
    transition:transform .22s cubic-bezier(.22,.8,.22,1),box-shadow .22s ease;
  }
  .menu-link:hover::before{
    transform:scaleY(1);
    box-shadow:0 0 6px 1px color-mix(in srgb, var(--accent) 38%, transparent);
  }
  .menu-link:hover .menu-label{
    color:var(--accent);
    text-shadow:0 0 14px color-mix(in srgb, var(--accent) 42%, transparent);
  }
  .menu-link:hover .menu-arrow{color:var(--accent-2);}
  .menu-index{font-family:var(--font-mono);font-size:14px;color:var(--text-muted);min-width:28px;}
  .menu-text{display:flex;flex-direction:column;gap:2px;flex:1;}
  .menu-label{
    font-family:var(--font-display);font-size:clamp(18px,5.5vw,28px);
    letter-spacing:0.03em;line-height:1;color:var(--text);
    transition:color .25s ease,text-shadow .25s ease;
  }
  .menu-sub{font-size:13px;color:#5E6475;}
  .menu-arrow{
    font-family:var(--font-display);font-size:28px;color:var(--text-muted);
    transition:color .25s ease;
  }
  section{margin-bottom:44px;}
  h2.section-title{
    font-family:var(--font-display);
    font-size:28px;
    letter-spacing:0.03em;
    margin:0 0 16px;
    color:var(--text);
  }
  h3.subsection-title{
    font-family:var(--font-display);
    font-size:19px;
    letter-spacing:0.03em;
    margin:0 0 12px;
    color:var(--text);
  }
  /* Career record: all-time / by-league toggle */
  .view-toggle{display:inline-flex;border:1px solid var(--border);border-radius:6px;overflow:hidden;flex:none;background:var(--surface);-webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));}
  .view-toggle .toggle-btn{
    font-family:var(--font-body);font-size:13px;font-weight:700;
    padding:8px 14px;border:none;background:transparent;color:var(--text-muted);cursor:pointer;
    transition:color .12s ease,background .12s ease;
  }
  .view-toggle .toggle-btn + .toggle-btn{border-left:1px solid var(--border);}
  .view-toggle .toggle-btn:hover{color:var(--text);}
  .view-toggle .toggle-btn.active{background:var(--accent-gradient);color:var(--accent-contrast);box-shadow:inset 0 1px 0 rgba(255,255,255,0.25);}
  .league-nav{display:flex;align-items:center;justify-content:center;gap:18px;margin:14px 0 18px;text-align:center;}
  .league-nav-btn{
    width:36px;height:36px;border-radius:5px;border:1px solid var(--border);flex:none;
    background:var(--surface);color:var(--text);cursor:pointer;font-size:18px;line-height:1;
    display:flex;align-items:center;justify-content:center;
    transition:border-color .12s ease,color .12s ease,box-shadow .12s ease;
  }
  .league-nav-btn:hover:not(:disabled){border-color:var(--accent);color:var(--accent);box-shadow:var(--shadow-glow-accent);}
  .league-nav-btn:disabled{opacity:0.35;cursor:default;}
  .league-nav-label{font-family:var(--font-display);font-size:23px;letter-spacing:0.02em;min-width:160px;}
  .career-record-viewport{position:relative;overflow:hidden;}
  .career-record-viewport.is-sliding{transition:height .38s cubic-bezier(.22,.8,.22,1);}
  .career-record-pane{width:100%;}
  .career-record-pane.is-sliding{transition:transform .38s cubic-bezier(.22,.8,.22,1);}
  /* Stats tab */
  /* One uniform tile size — every card is half the grid's width on
     anything wider than a phone, full width below that. No more "wide"
     cards spanning two columns: a mix of quarter- and half-width tiles is
     what made the old grid feel cramped and inconsistent, so match-up
     cards (Biggest Win, Highest-Scoring Match, etc.) now get exactly the
     same footprint as a plain leader card. */
  .stats-grid{display:grid;grid-template-columns:repeat(2, 1fr);gap:20px;}
  @media (max-width: 640px){
    .stats-grid{grid-template-columns:1fr;}
  }
  .stat-card{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:8px;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    padding:24px 26px;display:flex;flex-direction:column;min-height:116px;
    transition:box-shadow .18s ease,transform .18s ease;
  }
  .stat-card:hover{box-shadow:var(--shadow-lift);transform:translateY(-2px);}
  /* Header: label pinned top-left, the number + its unit pinned top-right.
     Nothing below this row unless a card has supporting context to show —
     .stat-card-body's auto top margin below shoves that context down to
     the bottom of the card, so whatever's left in between reads as
     deliberate breathing room rather than a leftover gap. */
  .stat-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;}
  .stat-card-label{
    text-transform:uppercase;font-size:12.5px;letter-spacing:0.07em;font-weight:800;
    color:#CCD1DC;max-width:56%;line-height:1.35;padding-top:6px;
  }
  .stat-card-metric{flex:none;text-align:right;}
  .stat-card-value{font-family:var(--font-display);font-size:52px;line-height:1;letter-spacing:0.01em;color:var(--accent);}
  .stat-card-unit{font-size:12.5px;font-weight:600;color:var(--text-muted);margin-top:4px;}
  .stat-card-body{margin-top:auto;padding-top:20px;}
  .stat-card-body-empty{display:flex;justify-content:flex-end;}
  .stat-names{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;}
  .stat-chip{
    display:inline-flex;align-items:center;gap:6px;font-size:13.5px;font-weight:700;
    background:var(--surface-2);border-radius:999px;padding:6px 14px 6px 8px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);
    transition:background .12s ease,box-shadow .12s ease;
  }
  /* Any club/team cross-link, wherever it appears — standings rows, stat-card
     match sides, opponent chips — shares this one hover/click affordance. */
  [data-action="goto-team"]{cursor:pointer;}
  .stat-chip[data-action="goto-team"]:hover{background:var(--surface-3);box-shadow:inset 0 1px 0 rgba(255,255,255,0.14), 0 0 0 1px var(--accent-soft);}
  .stat-match-side[data-action="goto-team"]{border-radius:6px;transition:background .12s ease;}
  .stat-match-side[data-action="goto-team"]:hover{background:var(--surface-2);}
  .stat-empty{color:var(--text-muted);font-size:13.5px;font-weight:600;}
  .stat-haul-list{display:flex;flex-direction:column;gap:9px;}
  .stat-haul-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
  .stat-haul-row .stat-league-tag{margin-left:auto;text-align:right;}
  .stat-match{display:flex;align-items:center;justify-content:center;gap:26px;margin-bottom:12px;}
  .stat-match-side{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:13.5px;font-weight:700;max-width:130px;text-align:center;}
  .stat-match-side.winner{color:var(--win);}
  .stat-match-side.loser{color:var(--danger);}
  .stat-match-score{font-family:var(--font-mono);font-size:23px;font-weight:600;flex:none;}
  .stat-league-tag{font-size:12px;color:var(--text-muted);text-align:right;}
  /* ---- Page hero — the masthead used at the top of a redesigned tab:
     small devised eyebrow, big display title, one-line subtitle, a faint
     shield built from the app's own unnamed-club crest shape (no separate
     artwork), and a small vertical tagline in the corner. ---- */
  /* Deliberately no background/border/radius of its own — it sits on the
     same plain page background as the topbar right above it, so the two
     read as one continuous strip rather than a boxed card under a separate
     bar. The thin rule at the bottom is what actually separates the hero
     from the toolbar/list below, not a card edge. */
  .page-hero{
    position:relative;margin:-26px -28px 22px;padding:34px 28px 22px;
    border-bottom:1px solid var(--glass-hairline);
  }
  /* The header artwork — extended upward past the hero's own top edge so it
     reaches behind the topbar too (z-index keeps the topbar's own content
     on top of it), and clipped to the hero's actual width/bottom. */
  .page-hero::before{
    content:"";position:absolute;inset:-96px 0 0 0;z-index:0;pointer-events:none;
    background-image:url("assets/header-cover.jpg");
    background-repeat:no-repeat;background-position:right top;background-size:cover;
  }
  .page-hero-content{position:relative;z-index:1;max-width:70ch;}
  .page-hero-eyebrow{
    display:flex;align-items:center;gap:10px;margin-bottom:10px;
    font-family:var(--font-mono);font-size:12px;font-weight:600;
    letter-spacing:0.28em;text-transform:uppercase;color:var(--text-muted);
  }
  .page-hero-eyebrow-rule{width:22px;height:1px;background:var(--text-muted);opacity:0.6;flex:none;}
  .page-hero-title{
    font-family:var(--font-display);font-size:clamp(40px,7vw,60px);letter-spacing:0.04em;
    line-height:0.95;margin:0 0 12px;text-wrap:balance;
    background:linear-gradient(180deg,#FFFFFF 0%,#B9C2CE 55%,#8A93A0 100%);
    -webkit-background-clip:text;background-clip:text;color:transparent;
  }
  .page-hero-sub{margin:0;color:var(--text-muted);font-size:14.5px;max-width:60ch;}
  .page-hero-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:16px;}
  .page-hero-tagline{
    position:absolute;right:28px;top:-42px;z-index:1;
    font-family:var(--font-mono);font-size:10.5px;letter-spacing:0.22em;text-transform:uppercase;
    color:var(--text-muted);text-align:right;line-height:1.9;opacity:0.7;
  }
  @media (max-width:640px){
    .page-hero{padding:26px 20px 20px;margin:-20px -18px 22px;}
    .page-hero::before{display:none;}
    .page-hero-tagline{display:none;}
  }
  /* ---- Teams tab ---- */
  .teams-toolbar{
    display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
    margin-bottom:14px;
  }
  .teams-toolbar-count{
    font-family:var(--font-mono);font-size:12px;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);
  }
  .teams-toolbar-actions{display:flex;align-items:center;gap:10px;}
  .teams-sort{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text-muted);}
  .teams-sort select{
    font:inherit;font-size:12.5px;color:var(--text);background:var(--surface-2);
    border:1px solid var(--border);border-radius:5px;padding:6px 10px;cursor:pointer;
  }
  .teams-sort select:focus{outline:none;border-color:var(--accent);}
  .teams-view-toggle{display:flex;border:1px solid var(--border);border-radius:5px;overflow:hidden;flex:none;}
  .teams-view-btn{
    width:34px;height:32px;display:flex;align-items:center;justify-content:center;
    background:var(--surface-2);color:var(--text-muted);border:none;cursor:pointer;
  }
  .teams-view-btn + .teams-view-btn{border-left:1px solid var(--border);}
  .teams-view-btn svg{width:16px;height:16px;}
  .teams-view-btn.active{background:var(--surface-3);color:var(--text);}
  .teams-view-btn:hover{color:var(--text);}

  .team-list{display:flex;flex-direction:column;gap:10px;}
  .team-row{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:6px;overflow:hidden;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    transition:box-shadow .18s ease;cursor:pointer;
  }
  .team-row:hover{box-shadow:var(--shadow-lift);}
  .team-row:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
  .team-row-summary{
    display:flex;align-items:center;gap:16px;padding:16px 20px;
    background:linear-gradient(100deg, color-mix(in srgb, var(--team-tint) 16%, var(--surface)) 0%, var(--surface) 60%);
    transition:background .15s ease;
  }
  .team-row-summary:hover{background:linear-gradient(100deg, color-mix(in srgb, var(--team-tint) 26%, var(--surface)) 0%, var(--surface) 60%);}
  .team-row-rank{
    font-family:var(--font-mono);font-size:13px;color:var(--text-muted);flex:none;width:22px;
  }
  .team-row-crest{flex:none;display:flex;}
  .team-row-crest .club-badge{width:52px;height:52px;display:block;}
  .team-row-id{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;}
  .team-row-name{
    font-family:var(--font-display);font-size:18px;letter-spacing:0.02em;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .team-row-player{font-size:12px;color:var(--text-muted);font-weight:600;text-transform:uppercase;letter-spacing:0.04em;}
  .team-row-winrate{display:flex;flex-direction:column;align-items:flex-end;gap:2px;flex:none;text-align:right;}
  .team-row-winrate-val{font-family:var(--font-display);font-size:22px;line-height:1;color:var(--text);}
  .team-row-label{font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.1em;font-weight:600;}
  .team-row-form-wrap{display:flex;flex-direction:column;align-items:flex-end;gap:5px;flex:none;}
  .team-row-form-wrap .team-card-form{flex-direction:row;}
  .team-card-form-empty{font-size:12px;color:var(--text-muted);}
  .team-row-chevron{color:var(--text-muted);transition:transform .22s ease;flex:none;display:flex;}
  .team-row-chevron svg{width:16px;height:16px;}
  .team-row[open] .team-row-chevron{transform:rotate(90deg);color:var(--accent);}
  /* Last-6-results form guide — oldest on the left, most recent on the right. */
  .team-card-form{display:flex;align-items:center;gap:5px;flex:none;}
  .form-dot{
    width:25px;height:25px;border-radius:50%;flex:none;
    display:flex;align-items:center;justify-content:center;
    font-family:var(--font-display);font-size:12px;font-weight:400;letter-spacing:0;
    line-height:1;
    box-shadow:0 1px 2px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.22);
  }
  .form-dot.form-w{background:var(--win-soft);color:var(--win);border-color:var(--win);}
  .form-dot.form-d{background:var(--info-soft);color:var(--info);border-color:var(--info);}
  .form-dot.form-l{background:var(--danger-soft);color:var(--danger);border-color:var(--danger);}
  @media (max-width:640px){
    .team-row-summary{flex-wrap:wrap;row-gap:10px;padding:14px 16px;}
    .team-row-form-wrap{order:4;flex-basis:100%;align-items:flex-start;}
    .team-row-form-wrap .team-card-form{gap:4px;}
    .form-dot{width:19px;height:19px;font-size:10px;}
  }
  .team-card-body{padding:16px 18px 22px;}
  /* Grid layout — same row markup, laid out as tiles; an open tile spans
     the full grid width so its expanded record/fixtures read at normal
     width instead of squeezed into one column. */
  .team-list-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));gap:12px;}
  .team-list-grid .team-row{grid-column:span 1;}
  .team-list-grid .team-row[open]{grid-column:1 / -1;}
  .team-list-grid .team-row-summary{flex-wrap:wrap;row-gap:10px;align-items:flex-start;}
  .team-list-grid .team-row-id{flex-basis:100%;order:1;}
  .team-list-grid .team-row-winrate{order:2;align-items:flex-start;text-align:left;}
  .team-list-grid .team-row-form-wrap{order:3;align-items:flex-start;}
  .team-list-grid .team-row-chevron{position:absolute;top:14px;right:14px;}
  .team-list-grid .team-row-summary{position:relative;}
  /* Trophy Cabinet — a curated "display case": a header with a totals pill,
     then a framed list of shelves. Each shelf = one honour type, with a
     count strip (a crown per league title, a mini award icon for the rest)
     and a big ×N tally. */
  .cabinet{
    margin:2px 0 10px;
    border:1px solid color-mix(in srgb, var(--accent) 20%, var(--glass-hairline));
    border-radius:10px;
    /* Front to back: the accent glow at the top, a scrim that keeps the
       shelves legible, then the pitch artwork over the surface colour.
       Clipped to the rounded box. */
    background:
      radial-gradient(130% 90% at 50% -18%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 62%),
      linear-gradient(180deg, color-mix(in srgb, #05070d 58%, transparent) 0%, color-mix(in srgb, #05070d 82%, transparent) 100%),
      url("assets/cabinet-bg.jpg") var(--surface-2);
    background-size:cover,cover,cover;
    background-position:center,center,center;
    background-repeat:no-repeat,no-repeat,no-repeat;
    padding:18px;
  }
  .cabinet-head{
    display:flex;align-items:center;gap:14px;
    padding:0 4px 16px;margin-bottom:16px;
    border-bottom:1px solid var(--glass-hairline);
  }
  .cabinet-head-icon{width:38px;height:38px;flex:none;display:block;filter:drop-shadow(0 4px 9px rgba(0,0,0,0.35));}
  .cabinet-head-text{display:flex;flex-direction:column;gap:4px;min-width:0;}
  .cabinet-head-title{
    font-family:var(--font-display);font-size:20px;letter-spacing:0.14em;text-transform:uppercase;color:var(--text);
  }
  .cabinet-head-sub{
    font-size:10px;letter-spacing:0.2em;text-transform:uppercase;color:var(--text-muted);
  }
  .cabinet-head-count{
    margin-left:auto;flex:none;white-space:nowrap;
    font-family:var(--font-mono);font-size:10.5px;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;
    color:var(--text-muted);
    border:1px solid color-mix(in srgb, var(--accent) 32%, transparent);
    border-radius:999px;padding:6px 14px;
  }
  .cabinet-head-count b{color:var(--accent);font-size:14px;margin-right:3px;}
  .cabinet-shelves{border:1px solid var(--glass-hairline);border-radius:7px;overflow:hidden;}
  .cabinet-shelf{
    display:flex;align-items:stretch;gap:16px;
    padding:16px 20px;border-top:1px solid var(--glass-hairline);
  }
  .cabinet-shelf:first-child{border-top:none;}
  .cabinet-shelf-idx{
    flex:none;width:34px;align-self:center;text-align:center;
    font-family:var(--font-display);font-size:24px;letter-spacing:0.04em;color:var(--text-muted);line-height:1;
  }
  .cabinet-shelf-idx::after{
    content:"";display:block;width:20px;height:2px;margin:8px auto 0;
    background:currentColor;opacity:0.45;border-radius:2px;
  }
  .cabinet-shelf-art{
    width:92px;height:92px;flex:none;align-self:center;display:flex;align-items:center;justify-content:center;
    filter:drop-shadow(0 8px 16px rgba(0,0,0,0.42));
  }
  .cabinet-shelf-icon{max-width:100%;max-height:100%;display:block;}
  .cabinet-shelf-body{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:6px;}
  .cabinet-shelf-name{
    font-family:var(--font-display);font-size:17px;letter-spacing:0.12em;text-transform:uppercase;color:var(--text);
  }
  .cabinet-shelf.is-bottler .cabinet-shelf-name{color:var(--text-muted);}
  .cabinet-shelf-sub{font-size:12px;color:var(--text-muted);}
  .cabinet-count-strip{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:3px;}
  .cabinet-count-icon{width:18px;height:18px;flex:none;display:flex;align-items:center;justify-content:center;}
  .cabinet-count-icon.is-crown svg{width:100%;height:100%;color:var(--gold);filter:drop-shadow(0 1px 2px rgba(0,0,0,0.45));}
  .cabinet-count-icon img{max-width:100%;max-height:100%;display:block;}
  .cabinet-count-more{font-size:11px;color:var(--text-muted);font-weight:600;margin-left:4px;}
  .cabinet-shelf-tally{
    flex:none;align-self:stretch;display:flex;align-items:center;gap:8px;
    padding-left:22px;border-left:1px solid var(--glass-hairline);
  }
  .cabinet-shelf-x{font-family:var(--font-mono);font-size:18px;color:var(--text-muted);}
  .cabinet-shelf-n{font-family:var(--font-display);font-size:46px;line-height:0.8;color:var(--text);}
  .cabinet-shelf-tally.is-gold .cabinet-shelf-n{color:var(--gold);}
  .cabinet-empty{display:flex;align-items:center;gap:12px;color:var(--text-muted);font-size:13.5px;padding:6px 2px 2px;line-height:1.5;}
  .cabinet-empty-icon{width:44px;height:44px;flex:none;filter:grayscale(1);opacity:0.5;}

  /* ---- Trophy Cabinet v2 — spotlighted display-case carousel ---- */
  .cabinet-v2{
    margin:2px 0 10px;
    border:1px solid color-mix(in srgb, var(--accent) 20%, var(--glass-hairline));
    border-radius:10px;
    background:#03060b;
    background-size:cover,cover,cover;
    background-position:center,center,center;
    background-repeat:no-repeat,no-repeat,no-repeat;
    padding:18px;
  }
  .cabinet-head-v2{display:flex;align-items:center;gap:12px;padding:0 4px 16px;margin-bottom:18px;border-bottom:1px solid var(--glass-hairline);}
  .cabinet-head-v2-icon{width:26px;height:26px;flex:none;color:var(--gold);filter:drop-shadow(0 3px 7px rgba(0,0,0,0.4));}
  .cabinet-head-v2-text{display:flex;flex-direction:column;gap:3px;min-width:0;}
  .cabinet-head-v2-title{font-family:var(--font-display);font-size:18px;letter-spacing:0.12em;text-transform:uppercase;color:var(--text);}
  .cabinet-head-v2-sub{font-size:10px;letter-spacing:0.18em;text-transform:uppercase;color:var(--text-muted);}
  .cabinet-head-v2-count{
    margin-left:auto;flex:none;display:flex;align-items:center;gap:10px;white-space:nowrap;
    font-family:var(--font-mono);font-size:11px;letter-spacing:0.1em;text-transform:uppercase;color:var(--text-muted);
  }
  .cabinet-head-v2-count .rule{width:22px;height:1px;background:var(--text-muted);opacity:0.5;}
  .cabinet-head-v2-count b{color:var(--gold);font-family:var(--font-display);font-size:16px;font-weight:400;margin-right:2px;}
  /* Real trophies: a wrapping grid, capped at 5 per row (not a horizontal
     scroller) so every case is visible at once at a size big enough to
     actually read. */
  .cabinet-case-grid{
    display:grid;grid-template-columns:repeat(5, 1fr);gap:18px;
  }
  .cabinet-case{
    position:relative;overflow:hidden;
    background:linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 45%), var(--surface-2);
    padding:30px 16px 20px;text-align:center;
  }
  .cabinet-case-spot{
    position:absolute;top:-40px;left:50%;transform:translateX(-50%);pointer-events:none;
    width:180px;height:180px;border-radius:50%;
    background:radial-gradient(circle, color-mix(in srgb, var(--gold) 24%, transparent) 0%, transparent 70%);
  }
  .cabinet-case-art{position:relative;width:88px;height:88px;margin:0 auto 18px;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 10px 18px rgba(0,0,0,0.5));}
  .cabinet-case-icon{max-width:100%;max-height:100%;display:block;}
  /* The text block — always its own clear space below the art/photo, never
     overlaid on top of it, so the trophy is never fought for legibility. */
  .cabinet-case-info{position:relative;}
  .cabinet-case-count{font-family:var(--font-display);font-size:38px;line-height:1;color:var(--text);}
  .cabinet-case-count.is-gold{color:var(--gold);}
  .cabinet-case-label{margin-top:7px;font-size:11px;letter-spacing:0.08em;text-transform:uppercase;color:var(--text-muted);}
  .cabinet-case.is-bottler .cabinet-case-label{color:var(--danger);opacity:0.85;}
  .cabinet-case-years{
    margin-top:12px;padding-top:10px;border-top:1px solid var(--glass-hairline);
    font-family:var(--font-mono);font-size:10px;color:var(--text-muted);line-height:1.7;
  }
  .cabinet-case-years .more{opacity:0.7;display:block;}
  /* Real photographed display-case shots (trophy + case + lighting already
     baked in) — the photo fills the whole tile, and the count/label/years
     sit directly on it, anchored to the bottom (the case's own pedestal
     area in the shot) with a scrim for legibility — text and image read as
     one object, not a picture with a caption stuck on afterwards. */
  .cabinet-case.has-photo{
    aspect-ratio:2/3;padding:16px;
    background-size:cover;background-position:center top;background-repeat:no-repeat;
    display:flex;flex-direction:column;justify-content:flex-end;
  }
  .cabinet-case.has-photo::before{
    content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
    background:linear-gradient(180deg, transparent 0%, transparent 58%, rgba(4,6,10,0.92) 100%);
  }
  .cabinet-case.has-photo .cabinet-case-info{position:relative;z-index:1;}
  /* Season awards — not trophies, so a visually smaller row of its own
     underneath, clearly not part of the main silverware count. */
  .cabinet-award-label{
    margin:26px 0 12px;font-family:var(--font-mono);font-size:11px;letter-spacing:0.14em;
    text-transform:uppercase;color:var(--text-muted);
  }
  .cabinet-case-grid.is-small{grid-template-columns:repeat(6, 1fr);gap:12px;}
  .cabinet-case-grid.is-small .cabinet-case{padding:20px 10px 14px;}
  .cabinet-case-grid.is-small .cabinet-case-spot{width:120px;height:120px;top:-28px;}
  .cabinet-case-grid.is-small .cabinet-case-art{width:56px;height:56px;margin-bottom:12px;}
  .cabinet-case-grid.is-small .cabinet-case-count{font-size:26px;}
  .cabinet-case-grid.is-small .cabinet-case-label{font-size:9.5px;}
  .cabinet-case-grid.is-small .cabinet-case-years{font-size:9px;margin-top:8px;padding-top:7px;}

  /* ---- Club full page (opened from a Teams row or any "View in Teams" link) ---- */
  .team-detail-back{
    display:inline-flex;align-items:center;gap:8px;margin-bottom:18px;
    background:none;border:none;cursor:pointer;padding:0;
    font-size:12.5px;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);
  }
  .team-detail-back svg{width:16px;height:16px;flex:none;}
  .team-detail-back:hover{color:var(--text);}
  .team-detail-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:22px;}
  .team-detail-id{display:flex;align-items:center;gap:16px;min-width:0;}
  .team-detail-crest{flex:none;display:flex;filter:drop-shadow(0 6px 14px rgba(0,0,0,0.45));}
  .team-detail-crest .club-badge{width:64px;height:64px;display:block;}
  .team-detail-text{min-width:0;}
  .team-detail-name{
    font-family:var(--font-display);font-size:clamp(26px,4vw,36px);letter-spacing:0.01em;line-height:1.05;margin:0 0 8px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .team-detail-meta{display:flex;align-items:center;gap:8px;}
  .team-detail-player{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text-muted);font-weight:600;}
  .team-detail-player svg{width:15px;height:15px;flex:none;opacity:0.8;}
  .team-detail-stats{display:flex;align-items:center;gap:26px;flex:none;}
  .team-detail-stat{display:flex;flex-direction:column;align-items:flex-end;gap:4px;}
  .team-detail-stat .l{font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.1em;font-weight:600;}
  .team-detail-stat .v{font-family:var(--font-display);font-size:24px;line-height:1;color:var(--text);}
  .team-detail-stat .team-card-form{flex-direction:row;}
  .team-detail-subnav{
    display:flex;gap:6px;flex-wrap:wrap;
    border-bottom:1px solid var(--glass-hairline);margin-bottom:24px;
  }
  .team-detail-tab{
    background:none;border:none;cursor:pointer;
    padding:10px 4px;margin-right:18px;
    font-size:14px;font-weight:600;color:var(--text-muted);
    border-bottom:2px solid transparent;transition:color .15s ease,border-color .15s ease;
  }
  .team-detail-tab:hover{color:var(--text);}
  .team-detail-tab.active{color:var(--text);border-color:var(--accent);}
  .team-detail-body{min-height:120px;}
  .team-squad-card{
    display:flex;align-items:center;gap:18px;
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:9px;padding:20px 22px;
  }
  .team-squad-avatar{flex:none;width:72px;height:72px;border-radius:50%;overflow:hidden;background:var(--surface-2);display:flex;align-items:center;justify-content:center;}
  .team-squad-avatar .avatar-img{width:100%;height:100%;object-fit:cover;display:block;}
  .team-squad-avatar .avatar-placeholder{width:60%;height:60%;color:var(--text-muted);}
  .team-squad-info{min-width:0;}
  .team-squad-name{font-family:var(--font-display);font-size:20px;margin-bottom:10px;}
  .team-squad-row{display:flex;align-items:baseline;gap:8px;font-size:13.5px;margin-top:4px;}
  .team-squad-row .l{color:var(--text-muted);min-width:150px;}
  .team-squad-row .v{color:var(--text);font-weight:600;}
  /* PES 2020 squad (Teams -> Squad tab) — read-only reference data: an isometric-ish
     pitch with an auto-picked Starting XI on the left, the full squad table on the right. */
  .pes-squad-source{display:inline-block;margin-left:10px;font-size:11px;font-weight:600;letter-spacing:0.02em;color:var(--text-muted);text-transform:none;}
  .pes-squad-layout{display:grid;grid-template-columns:minmax(280px,1.1fr) minmax(300px,1fr);gap:26px;align-items:start;}
  .pes-squad-pitch-col{position:sticky;top:16px;}
  .pes-fine{font-size:11.5px;color:var(--text-muted);margin:8px 2px 0;line-height:1.5;}

  /* --- the pitch: the green/markings layer is a real tilted 3D plane (the isometric
     look); the player layer is a plain flat 2D overlay on top, positioned by the same
     percentages. Nesting the tokens INSIDE the 3D plane (with a counter-rotation to
     keep them upright) looked right in theory but silently failed to paint their own
     text in practice, so the token layer stays out of the 3D context entirely. */
  .pes-pitch-stage{
    position:relative;width:100%;aspect-ratio:68/105;max-width:380px;margin:0 auto;
    perspective:1400px;
  }
  .pes-pitch{
    position:absolute;inset:0;
    transform:rotateX(52deg);
    border-radius:6px;overflow:visible;
    background:
      repeating-linear-gradient(180deg, rgba(255,255,255,0.05) 0 9.5%, rgba(0,0,0,0.05) 9.5% 19%),
      linear-gradient(180deg,#1c7a3e,#146030);
    box-shadow:0 46px 60px -18px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(255,255,255,0.08);
  }
  .pes-pitch-lines{position:absolute;inset:0;width:100%;height:100%;color:rgba(255,255,255,0.55);}
  .pes-pitch-lines *{fill:none;stroke:currentColor;stroke-width:0.35;vector-effect:non-scaling-stroke;}
  .pes-pitch-boundary{stroke-width:0.5;}
  .pes-pitch-players{position:absolute;inset:0;}
  .pes-token{position:absolute;transform:translate(-50%,-50%);}
  .pes-token-btn{
    display:flex;flex-direction:column;align-items:center;gap:2px;background:none;border:none;padding:2px;cursor:pointer;
    filter:drop-shadow(0 6px 8px rgba(0,0,0,0.55));
  }
  .pes-token-dot{
    width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;
    background:var(--surface);border:2px solid var(--accent);color:var(--text);
    font-family:var(--font-mono);font-weight:800;font-size:12px;line-height:1;
    transition:transform .12s ease,border-color .12s ease;
  }
  .pes-token-btn:hover .pes-token-dot{transform:scale(1.12);border-color:var(--text);}
  .pes-token-name{
    font-size:10.5px;font-weight:800;letter-spacing:0.02em;color:#fff;white-space:nowrap;
    max-width:84px;overflow:hidden;text-overflow:ellipsis;
    background:rgba(0,0,0,0.55);border-radius:4px;padding:1px 6px;margin-top:1px;
  }
  .pes-token-pos{font-size:8px;font-weight:700;color:rgba(255,255,255,0.75);text-transform:uppercase;letter-spacing:0.05em;}
  @media (max-width:900px){ .pes-squad-layout{grid-template-columns:1fr;} .pes-squad-pitch-col{position:static;} }

  /* --- the full-squad table --- */
  .pes-squad-table{display:flex;flex-direction:column;gap:20px;}
  .pes-pos-group-title{display:flex;align-items:baseline;gap:8px;font-family:var(--font-display);font-size:15px;margin-bottom:6px;}
  .pes-pos-group-count{font-family:var(--font-mono);font-size:12px;color:var(--text-muted);}
  .pes-player-header,.pes-player-row{
    display:grid;grid-template-columns:1fr 52px 44px 52px 1.2fr 56px;gap:10px;align-items:center;padding:8px 4px;
  }
  .pes-player-header{font-size:10.5px;text-transform:uppercase;letter-spacing:0.08em;color:var(--text-muted);font-weight:700;border-bottom:1px solid var(--border);}
  .pes-player-btn{width:100%;background:none;border:none;text-align:left;cursor:pointer;font:inherit;color:inherit;}
  .pes-player-row{border-bottom:1px solid var(--border);font-size:13.5px;transition:background .1s ease;}
  .pes-player-row:hover{background:var(--surface-2);}
  .pes-player-row:last-child{border-bottom:none;}
  .pes-player-row.is-starter .pes-player-name::after{content:'●';color:var(--accent);font-size:8px;margin-left:6px;vertical-align:middle;}
  .pes-player-name{font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .pes-player-pos{font-family:var(--font-mono);font-size:12px;color:var(--text-muted);}
  .pes-player-age,.pes-player-foot{color:var(--text-muted);font-size:12.5px;}
  .pes-player-style{color:var(--text-muted);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .pes-player-rating{font-family:var(--font-mono);font-weight:700;color:var(--accent);text-align:right;}
  @media (max-width:640px){
    .pes-player-header,.pes-player-row{grid-template-columns:1fr 40px 32px 50px;}
    .pes-player-foot,.pes-player-style{display:none;}
    .pes-player-header span:nth-child(4),.pes-player-header span:nth-child(5){display:none;}
  }

  /* --- player detail modal ("full PES card") --- */
  .pes-modal-backdrop{position:fixed;inset:0;z-index:80;background:rgba(6,8,10,0.72);backdrop-filter:blur(2px);display:flex;align-items:flex-start;justify-content:center;padding:5vh 16px;overflow-y:auto;}
  .pes-modal{width:100%;max-width:560px;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:24px;position:relative;box-shadow:var(--shadow-lift);}
  .pes-modal-close{position:absolute;top:14px;right:14px;width:32px;height:32px;border-radius:50%;border:1px solid var(--border);background:var(--surface-2);color:var(--text-muted);display:flex;align-items:center;justify-content:center;cursor:pointer;}
  .pes-modal-close svg{width:16px;height:16px;}
  .pes-modal-close:hover{color:var(--text);border-color:var(--accent);}
  .pes-modal-head{display:flex;align-items:center;gap:16px;margin-bottom:18px;padding-right:32px;}
  .pes-modal-ovr{
    flex:none;width:58px;height:58px;border-radius:14px;display:flex;align-items:center;justify-content:center;
    background:var(--surface-2);border:2px solid var(--accent);color:var(--text);font-family:var(--font-mono);font-weight:800;font-size:22px;
  }
  .pes-modal-id h2{font-family:var(--font-display);font-size:21px;margin:0 0 4px;}
  .pes-modal-meta{font-size:12.5px;color:var(--text-muted);}
  .pes-modal-style{color:var(--text);font-weight:600;}
  .pes-attr-groups{display:grid;grid-template-columns:1fr 1fr;gap:18px 22px;margin-bottom:4px;}
  .pes-attr-group-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.07em;color:var(--text-muted);margin-bottom:8px;}
  .pes-attr-row{display:grid;grid-template-columns:1fr 70px 26px;align-items:center;gap:8px;margin-bottom:5px;font-size:12px;}
  .pes-attr-label{color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .pes-attr-bar{height:5px;border-radius:3px;background:var(--surface-2);overflow:hidden;}
  .pes-attr-fill{display:block;height:100%;background:var(--accent);}
  .pes-attr-fill.is-hi{background:#3ecf6a;}
  .pes-attr-fill.is-lo{background:var(--text-muted);}
  .pes-attr-val{font-family:var(--font-mono);font-weight:700;text-align:right;}
  .pes-modal-section{margin-top:16px;padding-top:14px;border-top:1px solid var(--border);}
  .pes-chip-row{display:flex;flex-wrap:wrap;gap:6px;}
  .pes-chip{font-size:11px;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--surface-2);border:1px solid var(--border);color:var(--text);}
  .pes-chip.is-com{border-color:var(--accent);color:var(--accent);}
  @media (max-width:520px){ .pes-attr-groups{grid-template-columns:1fr;} .pes-modal{padding:20px;} }
  @media (max-width:640px){
    .team-detail-top{flex-direction:column;}
    .team-detail-stats{align-self:stretch;justify-content:space-between;}
    .team-detail-tab{margin-right:12px;font-size:13px;}
  }

  /* Reputation — recurring-trait badges at the foot of the cabinet */
  .cabinet-rep{margin-top:16px;padding-top:14px;border-top:1px solid var(--glass-hairline);}
  .cabinet-rep-head{
    font-family:var(--font-mono);font-size:10px;letter-spacing:0.22em;text-transform:uppercase;
    color:var(--text-muted);margin-bottom:12px;
  }
  .cabinet-rep-empty{margin:0;font-size:12.5px;font-style:italic;color:var(--text-muted);}
  .rep-chips{display:flex;flex-direction:column;gap:1px;border:1px solid var(--glass-hairline);border-radius:7px;overflow:hidden;}
  .rep-chip{
    display:flex;gap:12px;align-items:flex-start;padding:12px 14px;
    background:color-mix(in srgb, var(--surface-2) 62%, transparent);
  }
  .rep-chip.is-gold{background:color-mix(in srgb, var(--gold) 12%, var(--surface-2));}
  .rep-chip.is-red{background:color-mix(in srgb, #c0392b 12%, var(--surface-2));}
  .rep-chip-icon{flex:none;width:20px;height:20px;margin-top:1px;color:var(--text-muted);}
  .rep-chip.is-gold .rep-chip-icon{color:var(--gold);}
  .rep-chip.is-red .rep-chip-icon{color:#d5674f;}
  .rep-chip-icon svg{width:100%;height:100%;display:block;}
  .rep-chip-main{display:flex;flex-direction:column;gap:3px;min-width:0;}
  .rep-chip-label{
    font-family:var(--font-display);font-size:14px;letter-spacing:0.1em;text-transform:uppercase;color:var(--text);
  }
  .rep-chip.is-gold .rep-chip-label{color:var(--gold);}
  .rep-chip.is-red .rep-chip-label{color:#e08069;}
  .rep-chip-text{font-size:12.5px;line-height:1.5;color:var(--text);}
  .rep-chip-ev{font-size:11px;color:var(--text-muted);font-family:var(--font-mono);}
  @media (max-width:900px){
    .cabinet-case-grid{grid-template-columns:repeat(3, 1fr);}
    .cabinet-case-grid.is-small{grid-template-columns:repeat(4, 1fr);}
  }
  @media (max-width:600px){
    .cabinet{padding:14px;}
    .cabinet-v2{padding:14px;}
    .cabinet-case-grid{grid-template-columns:repeat(2, 1fr);gap:12px;}
    .cabinet-case-grid.is-small{grid-template-columns:repeat(3, 1fr);}
    .cabinet-case{padding:20px 12px 14px;}
    .cabinet-shelf{gap:10px;padding:14px 12px;}
    .cabinet-shelf-idx{width:22px;font-size:16px;}
    .cabinet-shelf-idx::after{width:14px;margin-top:5px;}
    .cabinet-shelf-art{width:56px;height:56px;}
    .cabinet-shelf-name{font-size:15px;letter-spacing:0.08em;}
    .cabinet-shelf-tally{padding-left:12px;gap:4px;}
    .cabinet-shelf-x{font-size:14px;}
    .cabinet-shelf-n{font-size:32px;}
    .cabinet-count-icon{width:15px;height:15px;}
  }
  .team-fixture-filter{margin-bottom:10px;}
  .team-fixture-filter-toggle{
    display:inline-flex;align-items:center;gap:7px;padding:6px 12px;
    background:var(--surface-2);border:1px solid var(--border);border-radius:10px;
    color:var(--text-muted);font-size:12.5px;font-weight:600;cursor:pointer;
    transition:background .12s ease,color .12s ease,border-color .12s ease;
  }
  .team-fixture-filter-toggle:hover{background:var(--surface-3);color:var(--text);}
  .team-fixture-filter-toggle svg{width:13px;height:13px;flex:none;transition:transform .15s ease;}
  .team-fixture-filter-toggle[aria-expanded="true"] svg{transform:rotate(180deg);}
  .team-fixture-filter-toggle.active{background:var(--accent-soft);border-color:var(--accent);color:var(--accent);box-shadow:inset 0 1px 0 rgba(255,255,255,0.12);}
  .team-fixture-filter-panel{
    margin-top:8px;padding:12px;border:1px solid var(--border);border-radius:7px;
    background:var(--surface-2);display:flex;flex-direction:column;gap:10px;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    animation:tabEnter .24s cubic-bezier(.22,.8,.22,1);
  }
  .team-fixture-filter-list{display:flex;flex-wrap:wrap;gap:8px;}
  .team-fixture-filter-opt{
    display:inline-flex;align-items:center;gap:6px;padding:5px 10px 5px 8px;
    background:var(--surface);border:1px solid var(--border);border-radius:8px;
    font-size:12.5px;font-weight:500;cursor:pointer;user-select:none;
  }
  .team-fixture-filter-opt:has(input:checked){border-color:var(--accent);color:var(--accent);background:var(--accent-soft);}
  .team-fixture-filter-opt input{width:14px;height:14px;flex:none;accent-color:var(--accent);cursor:pointer;}
  .team-fixture-filter-opt svg{width:16px;height:16px;flex:none;}
  .team-fixture-filter-panel .btn.small{align-self:flex-start;}
  .team-fixture-list{display:flex;flex-direction:column;gap:2px;}
  .team-fixture-row{
    display:grid;grid-template-columns:24px 1fr 64px auto;align-items:center;gap:10px;
    padding:8px 0;border-bottom:1px solid var(--border);font-size:13.5px;
  }
  .team-fixture-row:last-child{border-bottom:none;}
  .team-fixture-result{
    width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;
    font-size:11px;font-weight:800;background:var(--surface-2);color:var(--text-muted);
  }
  .team-fixture-result.result-w{background:var(--win-soft);color:var(--win);}
  .team-fixture-result.result-d{background:var(--info-soft);color:var(--info);}
  .team-fixture-result.result-l{background:var(--danger-soft);color:var(--danger);}
  .team-fixture-opp{display:flex;align-items:center;gap:8px;font-weight:600;min-width:0;}
  .team-fixture-opp-link{
    display:flex;align-items:center;gap:8px;font:inherit;font-weight:inherit;color:inherit;
    background:none;border:none;padding:2px 4px;margin:-2px -4px;border-radius:4px;cursor:pointer;min-width:0;
    transition:background .12s ease,color .12s ease;
  }
  .team-fixture-opp-link:hover{background:var(--surface-2);color:var(--accent);}
  .team-fixture-opp .who{color:var(--text-muted);font-weight:500;font-size:12px;}
  .team-fixture-score{font-family:var(--font-mono);font-weight:700;text-align:center;}
  .team-fixture-meta{color:var(--text-muted);font-size:12px;text-align:right;white-space:nowrap;}
  .team-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:12px;}
  .team-fixture-row.has-report{cursor:pointer;border-radius:5px;transition:background .12s ease;}
  .team-fixture-row.has-report:hover{background:var(--surface-2);}
  .team-pager-label{font-size:13px;color:var(--text-muted);}
  @media (max-width:600px){
    .team-fixture-row{grid-template-columns:20px 1fr 50px;}
    .team-fixture-meta{grid-column:1 / -1;text-align:left;margin-top:2px;}
  }
  .eyebrow{
    text-transform:uppercase;
    font-size:11.5px;
    font-weight:700;
    letter-spacing:0.09em;
    color:var(--text-muted);
  }
  /* Head-to-Head tab */
  .h2h-picker-label{
    display:none;text-transform:uppercase;font-size:11.5px;letter-spacing:0.08em;font-weight:700;
    color:var(--text-muted);margin-bottom:10px;text-align:center;
  }
  /* Fighter-select picker: big photo + big name per side, prev/next arrows
     flanking the photo. --face-color (that player's current club color)
     rings the photo tile — a subtle identity cue even though the picture
     itself is the person, not the badge. */
  .h2h-select-row{padding-top: 30px;display:grid;grid-template-columns:1fr auto 1fr;align-items:start;justify-items:center;column-gap:18px;margin-bottom:8px;}
  .h2h-select-unit{display:flex;flex-direction:column;align-items:center;width:100%;min-width:0;}
  .h2h-select-face-row{display:flex;align-items:center;gap:5px;}
  .h2h-arrow{
    flex:none;width:38px;height:38px;border-radius:50%;
    border:0px solid var(--border);background:rgba(255, 255, 255, 0);color:var(--text-muted);cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    transition:border-color .12s ease,color .12s ease,box-shadow .12s ease,background .12s ease;
  }
  .h2h-arrow svg{width:18px;height:18px;}
  .h2h-arrow:hover{border-color:#3DDC9700;color:var(--accent);}
  .h2h-select-face{
    flex:none;width:118px;height:178px;border-radius:11px;overflow:hidden;
    background:var(--surface-2);
    box-shadow:0 0 0 3px var(--face-color,var(--accent)), var(--shadow-lift);
  }
  .h2h-select-photo{display:flex;width:100%;height:100%;align-items:center;justify-content:center;}
  .h2h-select-photo .avatar-img{width:100%;height:100%;object-fit:cover;display:block;}
  .h2h-select-photo .avatar-placeholder svg{width:44%;height:44%;color:var(--text-muted);}
  .h2h-select-name{
    display:none;font-family:var(--font-display);font-size:24px;letter-spacing:0.02em;
    margin-top:14px;text-align:center;
  }
  /* Sits between the two portrait tiles (not the labels), so the swap
     reads as flipping the matchup rather than as a third header. */
  .h2h-swap-col{
    display:flex;align-items:center;justify-content:center;
    height:178px;margin-top:27px;
  }
  .h2h-swap-btn{
    width:44px;height:44px;padding:0;border-radius:50%;cursor:pointer;
    border:1px solid var(--border);background:var(--surface);color:var(--text-muted);
    display:flex;align-items:center;justify-content:center;
    box-shadow:var(--shadow-ambient);
    transition:color .12s ease,border-color .12s ease,background .12s ease,box-shadow .12s ease;
  }
  .h2h-swap-btn svg{width:20px;height:20px;display:block;}
  .h2h-swap-btn:hover{color:var(--accent);border-color:var(--accent);box-shadow:var(--shadow-glow-accent);}
  .h2h-summary-card{
    position:relative;overflow:hidden;
    border:1px solid var(--glass-hairline);border-bottom-width:10px;border-radius:10px;
    /* Gold-beam artwork behind the W/D/L trio, with a scrim over it so the
       numbers and labels stay readable. Clipped to the rounded card. */
    background-color:var(--surface);
    background-image:
      linear-gradient(180deg, color-mix(in srgb, #05070d 58%, transparent) 0%, color-mix(in srgb, #05070d 78%, transparent) 100%),
      url("assets/h2h-bg.jpg");
    background-size:cover,cover;
    background-position:center,center;
    background-repeat:no-repeat,no-repeat;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    padding:30px 26px 26px;margin-top:24px;
  }
  /* Small centered kicker with an accent underline — the "broadcast lower
     third" title treatment the rest of this card borrows from. */
  .h2h-vs-eyebrow{
    display:none;text-align:center;margin-bottom:22px;
    font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:0.3em;
    color:var(--text-muted);
  }
  .h2h-vs-eyebrow span{position:relative;padding-bottom:10px;}
  .h2h-vs-eyebrow span::after{
    content:"";position:absolute;left:50%;bottom:0;transform:translateX(-50%);
    width:28px;height:2px;background:var(--accent);
  }
  /* Names flank the Wins/Draws/Losses trio — small given-name caption over
     a big bold surname, mirrored on each side, no photo or crest since this
     tab is about the two people and the picker above already showed faces. */
  .h2h-vs-top{display:flex;align-items:center;justify-content:space-between;gap:14px;}
  .h2h-vs-side{flex:1 1 0;min-width:0;}
  .h2h-vs-side-b{text-align:right;}
  .h2h-vs-first{font-size:16px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.1em;font-weight:600;}
  .h2h-vs-last{
    font-family:var(--font-display);font-size:clamp(28px,4.2vw,30px);
    line-height:1;letter-spacing:0.01em;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .h2h-vs-trio{display:flex;align-items:center;gap:18px;flex:none;}
  .h2h-vs-stat{display:flex;flex-direction:column;align-items:center;min-width:44px;}
  .h2h-vs-stat-num{font-family:var(--font-display);font-size:44px;line-height:1;color:var(--text);}
  .h2h-vs-stat-lbl{font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.08em;margin-top:4px;}
  .h2h-vs-divider{width:1px;align-self:stretch;background:var(--glass-hairline);}
  /* Win-percentage bar: a color-coded, faintly striped pill with each
     side's % pinned right next to it rather than stacked below as a second
     headline — the trio above is already the card's headline. */
  .h2h-vs-bar-row{display:flex;align-items:center;gap:14px;margin-top:26px;}
  .h2h-vs-bar-pct{font-family:var(--font-display);font-size:18px;color:var(--text);flex:none;min-width:3.2ch;}
  .h2h-vs-bar-pct-b{text-align:right;}
  .h2h-vs-bar-row .h2h-bar{flex:1;margin-top:0;}
  .h2h-bar{display:flex;height:14px;border-radius:999px;overflow:hidden;background:var(--surface-3);}
  .h2h-bar-seg{height:100%;position:relative;}
  .h2h-bar-seg.h2h-bar-d{background:var(--border);}
  /* Straight-stripe texture on every bar segment — a lighter tint of
     whatever color the segment already has (each side's own club color, set
     inline by JS), so it works regardless of which color lands there rather
     than hardcoding one. Kept vertical (an angle at this stripe width just
     anti-aliases into a jagged edge) and thin/faint so it reads as texture
     rather than a pattern. */
  .h2h-bar-seg::after,
  .h2h-metric-bar-seg::after{
    content:"";
    position:absolute;inset:0;
    background-image:repeating-linear-gradient(-45deg,
      rgba(255,255,255,0.12) 0px, rgba(255,255,255,0.12) 1px,
      transparent 2px, transparent 5px);
    pointer-events:none;
    mix-blend-mode:lighten;
  }
  .h2h-vs-hr{height:1px;background:var(--glass-hairline);margin-top:24px;}
  /* Bottom strip: icon-led stat groups (total meetings, avg goals, recent
     form) separated by hairline dividers, like a broadcast graphic's lower
     row of facts. */
  .h2h-vs-footer{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:20px;flex-wrap:wrap;}
  .h2h-vs-footer-stat{display:flex;flex-direction:column;align-items:center;gap:6px;}
  .h2h-vs-footer-top{display:flex;align-items:center;gap:8px;}
  .h2h-vs-icon{width:28px;height:28px;color:var(--text-muted);flex:none;}
  .h2h-vs-footer-num{font-family:var(--font-display);font-size:26px;line-height:1;color:var(--text);}
  .h2h-vs-footer-lbl{font-size:10.5px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.07em;}
  .h2h-vs-footer-div{width:1px;align-self:stretch;background:var(--glass-hairline);}
  .h2h-vs-footer-dots{display:flex;align-items:center;gap:4px;}
  .h2h-vs-footer-dots .form-dot{width:24px;height:24px;font-size:11px;}
  .h2h-streak-note{
    margin-top:16px;text-align:center;font-size:13px;font-weight:700;
    color:var(--gold);background:var(--gold-soft);border-radius:6px;padding:8px 12px;
  }
  @media (max-width:520px){
    .h2h-vs-top{flex-wrap:wrap;justify-content:center;text-align:center;}
    .h2h-vs-side-b{text-align:center;}
    .h2h-vs-side{flex-basis:100%;order:1;}
    .h2h-vs-side-b{order:3;}
    .h2h-vs-trio{order:2;width:100%;justify-content:center;margin-top:12px;}
    .h2h-vs-stat-num{font-size:36px;}
    .h2h-vs-footer{gap:16px;}
  }
  /* Key Metrics: slim, full-width comparison rows (a value+photo on each
     outer edge, the label and a two-color proportional bar centered) —
     one per metric, stacked, rather than a grid of square tiles. */
  .h2h-metric-list{display:flex;flex-direction:column;gap:8px;}
  .h2h-metric-row{
    display:flex;align-items:center;gap:18px;
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:7px;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    padding:16px 22px;
  }
  .h2h-metric-end{display:flex;align-items:center;gap:10px;flex:0 0 auto;}
  .h2h-metric-end-b{flex-direction:row-reverse;}
  .h2h-metric-avatar{
    width:32px;height:32px;border-radius:50%;overflow:hidden;flex:none;
    background:var(--surface-2);display:flex;align-items:center;justify-content:center;
  }
  .h2h-metric-avatar .avatar-img{width:100%;height:100%;object-fit:cover;display:block;}
  .h2h-metric-avatar .avatar-placeholder svg{width:46%;height:46%;color:var(--text-muted);}
  .h2h-metric-value{font-family:var(--font-display);font-size:32px;letter-spacing:0.02em;min-width:2.4ch;text-align:center;}
  .h2h-metric-mid{flex:1;min-width:0;text-align:center;}
  .h2h-metric-label{font-family:var(--font-display);font-size:18px;font-weight:400;text-transform:uppercase;letter-spacing:0.08em;color:var(--text-muted);}
  .h2h-metric-bar{display:flex;height:8px;border-radius:999px;overflow:hidden;margin-top:8px;background:var(--surface-3);}
  .h2h-metric-bar-seg{height:100%;position:relative;}
  .h2h-meeting-opp{justify-content:left;}
  .h2h-meeting-opp .who{color:var(--text-muted);font-weight:500;}
  .h2h-venue{
    display:inline-block;min-width:15px;text-align:center;
    font-family:var(--font-mono);font-size:10px;font-weight:600;line-height:1.3;
    border-radius:5px;padding:0 3px;margin-right:5px;vertical-align:1px;
  }
  .h2h-venue.is-home{background:var(--win-soft);color:var(--win);}
  .h2h-venue.is-away{background:var(--surface-3);color:var(--text-muted);}
  @media (max-width:640px){
    .h2h-select-row{column-gap:8px;}
    .h2h-select-face{width:98px;height:158px;border-radius:10px;}
    .h2h-swap-col{height:100%;margin-top:0px;align-items: end;}
    .h2h-swap-btn{width:38px;height:38px;}
    .h2h-swap-btn svg{width:17px;height:17px;}
    .h2h-select-name{font-size:19px;margin-top:10px;}
    .h2h-summary-top{flex-direction:column;gap:18px;}
    .h2h-record-trio{gap:36px;}
    .h2h-record-num{font-size:32px;}
    .h2h-bar-pct{font-size:28px;}
    .h2h-summary-stats{gap:26px;}
    .h2h-summary-stat-num{font-size:26px;}
    .h2h-metric-row{flex-wrap:wrap;justify-content:center;gap:10px;padding:14px;}
    .h2h-metric-mid{flex-basis:100%;order:3;}
    .h2h-metric-value{font-size:26px;}
  }

  /* ---------- Head-to-Head: Player Intelligence comparison ---------- */
  .h2h-metric-list + .pprof-hex{margin-top:18px;max-width:340px;margin-left:auto;margin-right:auto;}
  .h2h-trait-compare{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px;}
  @media (max-width:560px){ .h2h-trait-compare{grid-template-columns:1fr;} }
  .h2h-trait-col{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:14px 16px;}
  .h2h-trait-col-name{font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:var(--text-muted);margin-bottom:10px;}
  .h2h-trait-empty{margin:0;font-size:12px;color:var(--text-muted);font-style:italic;}
  /* Trophy cards */
  .trophy-grid{display:flex;flex-wrap:wrap;gap:16px;}
  .club-badge{flex:none;display:block;}
  /* ---- Hall of Fame trophy card v2 ---- */
  .trophy-card-v2{
    position:relative;overflow:hidden;border-radius:12px;
    flex:1 1 320px;min-width:280px;min-height:222px;
    padding:18px 20px 16px;
    display:flex;flex-direction:column;gap:16px;
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--tc-bg) 26%, transparent) 0%, transparent 60%),
      var(--surface);
    border:1px solid var(--glass-hairline);
    transition:box-shadow .18s ease,transform .18s ease;
  }
  .trophy-card-v2.is-link{cursor:pointer;}
  .trophy-card-v2:hover{transform:translateY(-2px);box-shadow:var(--shadow-lift);}
  .trophy-card-v2.is-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
  .trophy-card-v2.leader{
    border-color:var(--gold);
    box-shadow:0 0 0 1px var(--gold), 0 8px 22px color-mix(in srgb, var(--gold) 26%, transparent);
  }
  /* Real supplied cover art instead of the generated diagonal tint — the
     artwork already carries its own crest + fade-to-dark, so the card just
     needs enough height to show it properly and a touch more left padding
     to keep text clear of the crest baked into the image. */
  .trophy-card-v2.has-cover{
    min-height:252px;justify-content:space-between;
    padding-left:26px;
    background-size:cover;background-position:left center;background-repeat:no-repeat;
  }
  .trophy-card-v2.has-cover .tcv2-info{padding-left:38%;}
  .trophy-card-v2.has-cover .tcv2-breakdown{
    background:rgba(6,8,12,0.55);margin:0 -20px -16px;padding:14px 20px;
    -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  }
  .tcv2-rank{
    align-self:flex-end;
    display:flex;align-items:center;gap:6px;
    font-family:var(--font-mono);font-size:15px;font-weight:700;letter-spacing:0.04em;
    color:var(--text-muted);
  }
  .tcv2-stars{display:flex;align-items:center;gap:2px;}
  .gold-star-icon{width:17px;height:17px;flex:none;filter:drop-shadow(0 1px 2px rgba(0,0,0,0.35));}
  .tcv2-row{display:flex;align-items:center;gap:18px;}
  .tcv2-crest{flex:none;line-height:0;filter:drop-shadow(0 6px 16px rgba(0,0,0,0.45));}
  .tcv2-info{min-width:0;}
  .tcv2-club{
    font-family:var(--font-mono);font-size:10.5px;letter-spacing:0.14em;text-transform:uppercase;
    color:var(--text-muted);margin-bottom:4px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .tcv2-name{font-size:22px;font-weight:800;line-height:1.15;margin-bottom:10px;}
  .tcv2-count{display:flex;align-items:baseline;gap:7px;}
  .tcv2-count .v{font-family:var(--font-display);font-size:60px;line-height:1;color:var(--gold);}
  .tcv2-count .l{font-size:10.5px;letter-spacing:0.08em;text-transform:uppercase;color:var(--text-muted);}
  .tcv2-breakdown{
    display:flex;flex-wrap:wrap;gap:14px;
    padding-top:14px;border-top:1px solid var(--glass-hairline);
  }
  .tcv2-stat{
    display:flex;align-items:center;gap:7px;
    padding-right:14px;border-right:1px solid var(--glass-hairline);
  }
  .tcv2-stat:last-child{border-right:none;padding-right:0;}
  .tcv2-stat-icon{width:17px;height:17px;flex:none;color:var(--text-muted);opacity:0.85;}
  .tcv2-stat .n{font-family:var(--font-display);font-size:16px;color:var(--text);margin-right:1px;}
  .tcv2-stat .l{font-size:9px;letter-spacing:0.07em;text-transform:uppercase;color:var(--text-muted);}
  .empty-note{
    color:var(--text-muted);
    font-size:14px;
    background:var(--surface-2);
    border:1px dashed var(--border);
    border-radius:7px;
    padding:14px 16px;
  }
  /* Career table */
  .table-scroll{
    overflow-x:auto;border:1px solid var(--glass-hairline);border-radius:7px;background:var(--surface);
    box-shadow:var(--shadow-ambient);
  }
  table{border-collapse:collapse;width:100%;min-width:560px;font-size:16px;}
  th,td{padding:15px 18px;text-align:left;border-bottom:1px solid var(--border);white-space:nowrap;}
  thead th{
    font-size:12.5px;letter-spacing:0.01em;color:var(--text-muted);font-weight:500;
  }
  tbody tr:last-child td{border-bottom:none;}
  /* Flat throughout, deliberately — no zebra striping and no leader-row
     tint. Every row (including the leader) shares the same plain
     background; the rank number and any per-row accents (e.g. form dots)
     are the only things that vary. */
  td.num,th.num{font-family:var(--font-mono);font-variant-numeric:tabular-nums;text-align:right;}
  /* Leading rank column — a plain serial number ahead of the player, not
     bundled into their name. */
  th.rank-cell,td.rank-cell{
    font-family:var(--font-mono);font-variant-numeric:tabular-nums;
    color:var(--text-muted);text-align:left;width:46px;white-space:nowrap;
    padding-right:6px;
  }
  td:first-child, th:first-child{padding-left:18px;}
  tbody td{background:transparent;}
  .club-cell{display:flex;align-items:center;gap:12px;}
  .club-cell .club-text{display:flex;flex-direction:column;line-height:1.3;}
  .club-cell .club{font-weight:700;font-size:16.5px;transition:color .12s ease;}
  .club-cell .who{font-size:12px;color:var(--text-muted);font-weight:500;}
  tbody tr[data-action="goto-team"]{cursor:pointer;}
  tbody tr[data-action="goto-team"]:hover td{background:var(--surface-2);}
  tbody tr[data-action="goto-team"]:hover .club-cell .club{color:var(--accent);}
  /* Players / current league */
  .league-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px;}
  .league-head .meta{color:var(--text-muted);font-size:14px;}
  .btn{
    font-size:14.5px;font-weight:700;border-radius:6px;border:1px solid var(--border);
    background:var(--surface);color:var(--text);padding:10px 16px;cursor:pointer;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    transition:border-color .15s ease,box-shadow .15s ease,transform .1s ease,filter .15s ease;
  }
  .btn:hover{border-color:var(--accent);box-shadow:var(--shadow-ambient);}
  .btn:active{transform:translateY(1px);}
  .btn:focus-visible, input:focus-visible, summary:focus-visible{outline:2px solid var(--focus);outline-offset:2px;}
  .btn.primary{
    background:var(--accent-gradient);border-color:transparent;color:var(--accent-contrast);
    box-shadow:var(--shadow-glow-accent), inset 0 1px 0 rgba(255,255,255,0.22);
  }
  .btn.primary:hover{filter:brightness(1.08);box-shadow:var(--shadow-glow-accent), var(--shadow-lift);}
  .btn.small{padding:5px 10px;font-size:12.5px;}
  .btn.danger{background:var(--danger-soft);border-color:color-mix(in srgb, var(--danger) 45%, transparent);color:var(--danger);}
  .btn.danger:hover{border-color:var(--danger);box-shadow:none;}
  .btn.success{
    background:linear-gradient(135deg, var(--win) 0%, color-mix(in srgb, var(--win) 70%, var(--accent-2)) 100%);
    border-color:transparent;color:var(--accent-contrast);
    display:inline-flex;align-items:center;gap:8px;
    box-shadow:0 0 0 1px color-mix(in srgb, var(--win) 40%, transparent), 0 8px 22px color-mix(in srgb, var(--win) 28%, transparent), inset 0 1px 0 rgba(255,255,255,0.22);
  }
  .btn.success:hover{filter:brightness(1.08);}
  .btn.success svg{width:16px;height:16px;flex:none;}
  .confirm-box{
    background:var(--danger-soft);border:1px solid var(--danger);border-radius:6px;
    padding:10px 12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px;font-size:13.5px;
  }
  .players-row{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px;}
  .player-slot{
    border:1px solid var(--glass-hairline);border-radius:7px;padding:10px 12px;background:var(--surface);
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    display:flex;flex-direction:column;gap:8px;flex:1 1 150px;position:relative;
  }
  .remove-slot{
    position:absolute;top:8px;right:8px;width:22px;height:22px;border-radius:50%;
    border:1px solid var(--border);background:var(--surface-2);color:var(--text-muted);
    font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;
    transition:color .12s ease,border-color .12s ease;
  }
  .remove-slot:hover{color:var(--danger);border-color:var(--danger);}
  .player-field{display:flex;flex-direction:column;gap:4px;}
  .player-field label{font-size:11.5px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.05em;}
  .player-field input[type="text"],.player-field input[type="date"]{
    font-family:var(--font-body);font-weight:700;font-size:15.5px;
    padding:9px 11px;border-radius:5px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
  }
  .player-field input[type="number"]{
    font-family:var(--font-mono);font-weight:700;font-size:15.5px;width:100%;
    padding:9px 32px 9px 11px;border-radius:5px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
  }
  .player-field input[type="date"]{color-scheme:light;}
  :root[data-theme="dark"] .player-field input[type="date"]{color-scheme:dark;}
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]) .player-field input[type="date"]{color-scheme:dark;}
  }
  .player-slot .readonly-name{font-weight:700;font-size:15.5px;}
  .readonly-club-row{display:flex;align-items:center;gap:8px;margin-bottom:2px;}
  .player-slot .readonly-club{color:var(--text-muted);font-size:13px;}
  .club-input-row{display:flex;align-items:center;gap:8px;}
  .club-input-row input{flex:1;min-width:0;}
  .badge-preview{flex:none;display:flex;}
  /* Squad list — one full-width row per player (Squad & Clubs tab) */
  .squad-list{display:flex;flex-direction:column;margin-bottom:16px;}
  .squad-row{
    position:relative;display:flex;align-items:flex-start;gap:16px;
    padding:18px 4px;border-top:1px solid var(--border);
  }
  .squad-row:last-child{border-bottom:1px solid var(--border);}
  .avatar-btn{
    flex:none;width:64px;height:64px;border-radius:50%;
    border:2px solid var(--border);background:var(--surface-2);
    display:flex;align-items:center;justify-content:center;
    overflow:hidden;cursor:pointer;padding:0;color:var(--text-muted);
    transition:border-color .12s ease,color .12s ease,box-shadow .12s ease;
  }
  .avatar-btn:hover{border-color:var(--accent);color:var(--accent);box-shadow:var(--shadow-glow-accent);}
  .avatar-btn:disabled{cursor:default;}
  .avatar-btn:disabled:hover{border-color:var(--border);color:var(--text-muted);box-shadow:none;}
  .avatar-img{width:100%;height:100%;object-fit:cover;display:block;}
  .avatar-placeholder{display:flex;}
  .avatar-placeholder svg{width:28px;height:28px;display:block;}
  .visually-hidden-file{
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;
    overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
  }
  .squad-fields{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px;padding-top:4px;}
  .squad-line-1,.squad-line-2{display:flex;gap:14px;flex-wrap:wrap;}
  .squad-line-1 .player-field,.squad-line-2 .player-field{flex:1 1 200px;min-width:160px;}
  .squad-row .readonly-name{font-weight:700;font-size:16.5px;}
  .squad-row .readonly-club{color:var(--text-muted);font-size:13px;}
  .squad-row .readonly-meta{color:var(--text-muted);font-size:13px;margin-top:2px;}
  /* Squad & Clubs tab for the current, already-started league: a big
     photo tile on the left with a little breathing room top and bottom,
     name and (locked) club on one line beside it. Scoped to
     .squad-row-live so the roster checklist and first-time setup rows
     keep their smaller circular avatar + editable club field untouched. */
  .squad-row.squad-row-live{align-items:stretch;padding:14px 4px;min-height:112px;}
  .squad-row-live .avatar-btn{
    flex:0 0 24%;max-width:130px;min-width:76px;align-self:stretch;
    width:auto;height:auto;border-radius:7px;
  }
  .squad-row-live .avatar-placeholder svg{width:34%;height:34%;max-width:44px;max-height:44px;}
  .squad-row-live .squad-fields{padding:0 4px 0 0;justify-content:center;}
  .squad-identity-row{display:flex;align-items:center;gap:12px;row-gap:4px;flex-wrap:wrap;}
  .squad-identity-row .readonly-name{font-size:18px;}
  .squad-identity-row .readonly-club-row{display:flex;align-items:center;gap:6px;}
  .squad-identity-row .readonly-club{font-size:14px;}
  /* Roster checklist (season setup) + inline rename */
  .checklist-name-row{display:flex;align-items:center;gap:8px;margin-bottom:2px;flex-wrap:wrap;}
  .rename-btn{
    flex:none;width:26px;height:26px;border-radius:50%;border:1px solid var(--border);
    background:var(--surface-2);color:var(--text-muted);cursor:pointer;padding:0;
    display:flex;align-items:center;justify-content:center;transition:color .12s ease,border-color .12s ease;
  }
  .rename-btn:hover{color:var(--accent);border-color:var(--accent);}
  .rename-btn svg{width:13px;height:13px;display:block;}
  .roster-rename-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
  .roster-rename-row input[type="text"]{
    font-family:var(--font-body);font-weight:700;font-size:15.5px;
    padding:7px 9px;border-radius:5px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
  }
  .club-edit-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
  .club-edit-row input[type="text"]{
    font-family:var(--font-body);font-size:14px;
    padding:7px 9px;border-radius:5px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
  }
  .add-player-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:2px;}
  .add-player-row input[type="text"]{
    font-family:var(--font-body);font-weight:700;font-size:15.5px;flex:1 1 200px;min-width:160px;
    padding:9px 11px;border-radius:5px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
  }
  .squad-row.checklist-row{align-items:flex-start;}
  .squad-row.checklist-row .squad-fields{transition:opacity .12s ease;}
  .squad-row.unchecked .squad-fields{opacity:0.5;}
  .toggle-switch{position:relative;display:inline-flex;align-items:center;flex:none;width:42px;height:24px;cursor:pointer;margin-top:2px;}
  .toggle-switch input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer;}
  .toggle-slider{
    position:absolute;inset:0;background:var(--surface-2);border:1px solid var(--border);
    border-radius:999px;transition:background .12s ease,border-color .12s ease;
  }
  .toggle-slider::before{
    content:'';position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;
    background:var(--surface);box-shadow:0 1px 2px rgba(0,0,0,0.3);transition:transform .12s ease;
  }
  .toggle-switch input:checked + .toggle-slider{background:var(--accent-gradient);border-color:transparent;}
  .toggle-switch input:checked + .toggle-slider::before{transform:translateX(18px);background:var(--accent-contrast);}
  .toggle-switch input:disabled + .toggle-slider{opacity:0.5;cursor:default;}
  .toggle-switch input:focus-visible + .toggle-slider{outline:2px solid var(--focus);outline-offset:2px;}
  /* Season setup — "what are we playing tonight" competition console */
  .comp-toggle-list{display:flex;flex-direction:column;gap:2px;}
  .comp-toggle-row{
    display:flex;align-items:flex-start;gap:12px;padding:11px 4px;cursor:pointer;
    border-bottom:1px solid var(--glass-hairline);
  }
  .comp-toggle-row:last-child{border-bottom:none;}
  .comp-toggle-row.disabled{cursor:default;}
  .comp-toggle-text{display:flex;flex-direction:column;gap:2px;}
  .comp-toggle-text b{font-size:14px;font-weight:700;}
  .comp-toggle-text span{font-size:12.5px;color:var(--text-muted);}
  .comp-toggle-row.disabled .comp-toggle-text span{color:var(--danger);opacity:0.85;}
  /* Fixtures */
  .matchday{margin-bottom:14px;}
  .matchday h3{
    font-family:var(--font-display);
    font-size:14px;text-transform:uppercase;letter-spacing:0.09em;color:var(--text-muted);
    margin:0 0 8px;font-weight:400;
  }
  .fixture-row{
    display:grid;grid-template-columns:1fr 52px 16px 52px 1fr;align-items:center;gap:10px;
    padding:9px 0;border-bottom:1px solid var(--border);background:transparent;
  }
  .fixture-row.reorderable{grid-template-columns:26px 1fr 52px 16px 52px 1fr;}
  .matchday .fixture-row:last-child{border-bottom:none;}
  .fixture-row.dragging{
    box-shadow:var(--shadow-lift);border-radius:6px;background:var(--surface);
    border-bottom-color:transparent;
  }
  .fixture-row-placeholder{
    border:2px dashed var(--border);border-radius:6px;box-sizing:border-box;margin:4px 0;
  }
  .fixture-reorder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;}
  .reorder-btn{
    width:22px;height:17px;padding:0;border:none;background:transparent;color:var(--text-muted);
    cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:5px;
  }
  .reorder-btn svg{width:11px;height:11px;display:block;}
  .reorder-btn:hover{color:var(--accent);background:var(--surface-2);}
  .reorder-btn:disabled{opacity:0.25;cursor:default;}
  .reorder-btn:disabled:hover{color:var(--text-muted);background:transparent;}
  .fixture-drag-handle{
    width:22px;height:20px;padding:0;border:none;background:transparent;color:var(--text-muted);
    cursor:grab;display:flex;align-items:center;justify-content:center;border-radius:5px;
    touch-action:none;-webkit-user-select:none;user-select:none;
  }
  .fixture-drag-handle svg{width:14px;height:14px;display:block;}
  .fixture-drag-handle:hover{color:var(--accent);background:var(--surface-2);}
  .fixture-row .home,.fixture-row .away{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:700;line-height:1.25;}
  .fixture-row .home{justify-content:flex-end;}
  .fixture-row .away{justify-content:flex-start;}
  .fixture-row .home .club-text,.fixture-row .away .club-text{display:flex;flex-direction:column;}
  .fixture-row .home .club-text{align-items:flex-end;text-align:right;}
  .fixture-row .away .club-text{align-items:flex-start;text-align:left;}
  .fixture-row .who{font-size:11.5px;color:var(--text-muted);font-weight:500;display:none;}
  .fixture-row .sep{text-align:center;color:var(--text-muted);font-weight:700;}
  /* Custom number-input steppers — replaces every native OS spin button in
     the app with two real buttons, since the native widget can't be given
     a transparent/gray look or a gap between its up and down halves in
     every browser. Reuses the chevron icons already used for fixture
     reordering. enhanceNumberSteppers() in app.js wraps each
     input[type="number"] in a .num-stepper span and appends these
     buttons; contexts with tight fixed widths (fixture rows, stat grids)
     override the sizing below to fit their column. */
  .num-stepper{position:relative;display:inline-flex;vertical-align:middle;max-width:100%;}
  .num-stepper input[type="number"]{-moz-appearance:textfield;}
  .num-stepper input[type="number"]::-webkit-inner-spin-button,
  .num-stepper input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}
  .num-stepper-btns{
    position:absolute;top:3px;bottom:3px;right:3px;width:20px;
    display:flex;flex-direction:column;justify-content:center;gap:3px;
  }
  .num-step{
    flex:1;display:flex;align-items:center;justify-content:center;min-height:0;
    background:none;border:none;padding:0;margin:0;cursor:pointer;
    color:var(--text-muted);border-radius:5px;
    transition:background .12s ease,color .12s ease;
  }
  .num-step:hover{background:var(--surface-3);color:var(--accent);}
  .num-step:active{background:var(--border);}
  .num-step svg{width:12px;height:12px;display:block;pointer-events:none;}
  .fixture-row input[type="number"]{
    width:52px;text-align:right;font-family:var(--font-mono);font-size:19px;font-weight:700;
    padding:7px 19px 7px 4px;border-radius:5px;border:1px solid var(--border);background:var(--surface);color:var(--text);
  }
  .fixture-row .num-stepper-btns{width:16px;right:2px;top:2px;bottom:2px;gap:2px;}
  .fixture-row .num-step svg{width:9px;height:9px;}
  .fixture-row.has-report{cursor:pointer;transition:background .12s ease;border-radius:5px;}
  .fixture-row.has-report:hover{background:var(--surface-2);}
  .fixture-report{
    grid-column:1/-1;
    display:grid;grid-template-rows:0fr;opacity:0;
    margin-top:0;padding-top:0;border-top:1px solid transparent;
    transition:grid-template-rows .3s cubic-bezier(.22,.8,.22,1),opacity .22s ease,margin-top .3s ease,padding-top .3s ease,border-color .3s ease;
  }
  .fixture-report.is-open{
    grid-template-rows:1fr;opacity:1;
    margin-top:8px;padding-top:10px;border-top:1px dashed var(--border);
  }
  .fixture-report > .fixture-report-inner{min-height:0;overflow:hidden;}
  .match-report-date{
    display:flex;align-items:center;justify-content:center;gap:6px;
    margin-top:6px;font-size:12.5px;color:var(--text-muted);
  }
  .match-report-date svg{width:13px;height:13px;flex:none;opacity:0.8;}
  .fixture-report-inner .fixture-row{background:transparent;border-bottom:none;padding:0 0 4px;}

  /* ---------- Match Report Card (radar + mini stat bars) ---------- */
  .match-report-card{
    --mrc-home:#5AA9FF;--mrc-away:#FF6B6B;
    margin-top:14px;padding:16px;border-radius:10px;
    border:1px solid var(--glass-hairline);background:var(--surface-2);
  }
  .mrc-head-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px;flex-wrap:wrap;}
  .mrc-head-left{display:flex;flex-direction:column;gap:2px;}
  .pap-subtitle{font-size:11px;color:var(--text-muted);}
  .mrc-head-legend{display:flex;gap:18px;flex-wrap:wrap;}
  .mrc-md-tag{
    font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;
    color:var(--text-muted);background:var(--surface-3);border:1px solid var(--glass-hairline);
    border-radius:20px;padding:3px 10px;
  }
  .mrc-bar-card{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:8px;
    padding:8px 10px 9px;
  }
  .mrc-bar-vals{display:flex;align-items:baseline;justify-content:space-between;gap:4px;margin-bottom:6px;}
  .mrc-bar-val{font-family:var(--font-mono);font-weight:700;font-size:14px;}
  .mrc-bar-val.is-home{color:var(--mrc-home);}
  .mrc-bar-val.is-away{color:var(--mrc-away);}
  .mrc-bar-lbl{font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.03em;text-align:center;flex:1;}
  .mrc-bar-track{display:flex;height:5px;border-radius:3px;overflow:hidden;background:var(--surface-3);}
  .mrc-bar-fill-home{background:var(--mrc-home);}
  .mrc-bar-fill-away{background:var(--mrc-away);}

  .mrc-body{display:flex;gap:26px;align-items:flex-start;flex-wrap:wrap;}
  .mrc-radar-wrap{display:flex;flex-direction:column;align-items:center;flex:1 1 340px;min-width:300px;}
  .mrc-full-stats-wrap{flex:1 1 220px;min-width:200px;}
  .mrc-full-stats-head{
    font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;
    color:var(--text-muted);margin-bottom:8px;
  }
  .mrc-full-stats{display:flex;flex-direction:column;gap:6px;}
  @media (max-width:640px){ .mrc-body{flex-direction:column;} .mrc-radar-wrap,.mrc-full-stats-wrap{flex-basis:auto;width:100%;} }

  .mrc-radar-who{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;}
  .mrc-radar-who.is-home{color:var(--mrc-home);}
  .mrc-radar-who.is-away{color:var(--mrc-away);}
  .mrc-dot{width:8px;height:8px;border-radius:50%;flex:none;}
  .mrc-dot.is-home{background:var(--mrc-home);}
  .mrc-dot.is-away{background:var(--mrc-away);}
  .mrc-radar{width:100%;max-width:260px;height:auto;overflow:visible;}
  .mrc-radar.mrc-radar-lg{max-width:340px;}
  .mrc-radar-ring{fill:none;stroke:var(--glass-hairline);stroke-width:1;}
  .mrc-radar-spoke{stroke:var(--glass-hairline);stroke-width:1;}
  .mrc-radar-label{fill:var(--text-muted);font-size:9px;text-transform:uppercase;letter-spacing:0.03em;transition:fill .15s;}
  .mrc-radar-vals{font-size:9.5px;text-transform:none;letter-spacing:0;}
  .mrc-radar-val{font-family:var(--font-mono);font-weight:700;}
  .mrc-radar-val.is-home{fill:var(--mrc-home);}
  .mrc-radar-val.is-away{fill:var(--mrc-away);}
  .mrc-radar-val-sep{fill:var(--text-muted);}
  .mrc-radar-poly{stroke-width:1.75;fill-opacity:0.18;}
  .mrc-radar-home{stroke:var(--mrc-home);fill:var(--mrc-home);}
  .mrc-radar-away{stroke:var(--mrc-away);fill:var(--mrc-away);}
  .mrc-radar-hit{fill:transparent;}
  .mrc-radar-pt{stroke-width:1.5;opacity:0;transition:opacity .15s,r .15s;}
  .mrc-radar-pt.is-home{stroke:var(--surface);fill:var(--mrc-home);}
  .mrc-radar-pt.is-away{stroke:var(--surface);fill:var(--mrc-away);}
  .mrc-radar-axis:hover .mrc-radar-pt{opacity:1;r:5.5;}
  .mrc-radar-axis:hover .mrc-radar-label{fill:var(--text);}

  /* ---------- Match Profile: headline title, Match Control bar, profile cards ---------- */
  .pap-title{
    font-size:11px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:var(--text);
  }

  .pap-match-control{width:100%;max-width:340px;margin-top:14px;}
  .pap-match-control-lbl{font-size:10px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:var(--text-muted);text-align:center;margin-bottom:6px;}
  .pap-match-control-bar{display:flex;height:6px;border-radius:3px;overflow:hidden;background:var(--surface-3);}
  .pap-mc-fill-home{background:var(--mrc-home);}
  .pap-mc-fill-away{background:var(--mrc-away);}
  .pap-match-control-vals{display:flex;justify-content:space-between;margin-top:4px;font-family:var(--font-mono);font-size:12px;font-weight:700;}
  .pap-match-control-vals .is-home{color:var(--mrc-home);}
  .pap-match-control-vals .is-away{color:var(--mrc-away);}

  .pap-reads{flex:1 1 320px;min-width:280px;display:flex;flex-direction:column;gap:14px;}
  .pap-dot.is-home{background:var(--mrc-home);}
  .pap-dot.is-away{background:var(--mrc-away);}
  .pap-dot{width:8px;height:8px;border-radius:50%;flex:none;display:inline-block;}

  .pap-pcard{border:1px solid var(--glass-hairline);border-radius:10px;padding:14px 15px;background:var(--surface);}
  .pap-pcard-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;}
  .pap-pcard-name{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:700;color:var(--text);}
  .pap-pcard-score{display:flex;align-items:center;gap:8px;padding:5px 10px 5px 6px;border-radius:20px;background:var(--surface-3);border:1px solid var(--glass-hairline);}
  .pap-pcard-score-num{font-family:var(--font-mono);font-size:19px;font-weight:800;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:none;color:#fff;}
  .pap-pcard-score.is-home .pap-pcard-score-num{background:var(--mrc-home);}
  .pap-pcard-score.is-away .pap-pcard-score-num{background:var(--mrc-away);}
  .pap-pcard-score-txt{display:flex;flex-direction:column;line-height:1.25;}
  .pap-pcard-score-lbl{font-size:10.5px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:var(--text);}
  .pap-pcard-score-sub{font-size:9.5px;color:var(--text-muted);}

  .pap-pcard-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:12px;}
  @media (max-width:420px){ .pap-pcard-cols{grid-template-columns:1fr;} }
  .pap-pcard-col-head{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;margin-bottom:8px;}
  .pap-pcard-col-arrow{font-size:9px;line-height:1;}
  .pap-pcard-col-head.is-pos{color:var(--win, #3DDC97);}
  .pap-pcard-col-head.is-neg{color:#d5674f;}
  .pap-pcard-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;}
  .pap-pcard-list li{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text);}
  .pap-pcard-ic{width:15px;height:15px;flex:none;color:var(--text-muted);display:inline-flex;}
  .pap-pcard-ic svg{width:100%;height:100%;}

  .pap-pcard-overall{padding-top:12px;border-top:1px dashed var(--glass-hairline);}
  .pap-pcard-overall-head{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;color:var(--text-muted);margin-bottom:5px;}
  .pap-pcard-overall-head .pap-pcard-ic{color:var(--text-muted);}
  .pap-pcard-overall-text{margin:0;font-size:12.5px;line-height:1.5;color:var(--text-muted);}

  /* ---------- Match Narrative ---------- */
  .pap-narrative{
    margin-top:14px;padding:16px;border-radius:8px;
    border:1px solid var(--glass-hairline);background:var(--surface);
  }
  .pap-narrative-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:14px;}
  .pap-narrative-title{font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:var(--text);}
  .pap-narrative-sub{font-size:10.5px;color:var(--text-muted);}

  .pap-nm-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;}
  @media (max-width:700px){ .pap-nm-grid{grid-template-columns:1fr;} }

  .pap-nm2-card{
    background:var(--surface-2);border:1px solid var(--glass-hairline);border-radius:10px;
    padding:16px 16px 14px;display:flex;flex-direction:column;
  }
  .pap-nm2-head{display:flex;align-items:center;gap:11px;margin-bottom:18px;}
  .pap-nm2-num{
    width:30px;height:30px;border-radius:7px;background:var(--surface-3);flex:none;
    display:flex;align-items:center;justify-content:center;
    font-family:var(--font-mono);font-weight:800;font-size:12px;color:var(--text-muted);
  }
  .pap-nm2-icon{
    width:30px;height:30px;border-radius:50%;background:var(--accent-soft);color:var(--accent);flex:none;
    display:flex;align-items:center;justify-content:center;
  }
  .pap-nm2-icon svg{width:15px;height:15px;}
  .pap-nm2-headtxt{display:flex;flex-direction:column;gap:1px;}
  .pap-nm2-title{font-size:13px;font-weight:700;color:var(--text);}
  .pap-nm2-q{font-size:10.5px;color:var(--text-muted);}

  .pap-nm2-callout{
    margin-top:auto;padding-top:14px;display:flex;align-items:center;gap:10px;
    font-size:11.5px;line-height:1.4;color:var(--text);
  }
  .pap-nm2-callout-ic{
    width:24px;height:24px;border-radius:6px;background:var(--surface-3);color:var(--text-muted);flex:none;
    display:flex;align-items:center;justify-content:center;
  }
  .pap-nm2-callout-ic svg{width:13px;height:13px;}

  /* Possession gauge */
  .pap-nm2-body{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;}
  .pap-nm2-side{display:flex;flex-direction:column;align-items:center;flex:none;}
  .pap-nm2-big{font-family:var(--font-mono);font-weight:800;font-size:24px;}
  .pap-nm2-side.is-home .pap-nm2-big{color:var(--mrc-home);}
  .pap-nm2-side.is-away .pap-nm2-big{color:var(--mrc-away);}
  .pap-nm2-name{font-size:10.5px;font-weight:600;color:var(--text);margin-top:2px;}
  .pap-nm-gauge-wrap{position:relative;display:flex;justify-content:center;flex:1 1 160px;max-width:200px;}
  .pap-nm-gauge{width:100%;height:auto;overflow:visible;}
  .pap-nm-gauge path{fill:none;stroke-width:18;}
  .pap-nm-gauge-track{stroke:var(--surface-3);}
  .pap-nm-gauge-home{stroke:var(--mrc-home);stroke-linecap:round;}
  .pap-nm-gauge-away{stroke:var(--mrc-away);stroke-linecap:round;}
  .pap-nm-gauge-label{position:absolute;left:50%;bottom:2px;transform:translateX(-50%);text-align:center;}
  .pap-nm-gauge-lbl-top{display:block;font-size:8.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.04em;color:var(--text-muted);}
  .pap-nm-gauge-lbl-main{display:block;font-size:12px;font-weight:700;color:var(--text);margin-top:2px;max-width:120px;}

  /* Attacking Threat funnels */
  .pap-nm-funnel-body{display:flex;gap:18px;}
  .pap-nm-funnel-col{flex:1;min-width:0;}
  .pap-nm-funnel-name{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--text);margin-bottom:10px;}
  .pap-nm-funnel-stack{display:flex;flex-direction:column;gap:4px;}
  .pap-nm-funnel-row{display:flex;align-items:center;gap:8px;height:38px;}
  .pap-nm-funnel-shape-wrap{flex:0 0 58%;display:flex;justify-content:center;height:100%;}
  .pap-nm-funnel-shape{
    height:100%;display:flex;align-items:center;justify-content:center;
    font-family:var(--font-mono);font-weight:800;font-size:13px;color:#fff;
    clip-path:polygon(0 0,100% 0,88% 100%,12% 100%);
  }
  .pap-nm-funnel-row:first-child .pap-nm-funnel-shape.is-home{background:var(--mrc-home);}
  .pap-nm-funnel-row:nth-child(2) .pap-nm-funnel-shape.is-home{background:color-mix(in srgb, var(--mrc-home) 82%, black);}
  .pap-nm-funnel-row:nth-child(3) .pap-nm-funnel-shape.is-home{background:color-mix(in srgb, var(--mrc-home) 62%, black);}
  .pap-nm-funnel-row:first-child .pap-nm-funnel-shape.is-away{background:var(--mrc-away);}
  .pap-nm-funnel-row:nth-child(2) .pap-nm-funnel-shape.is-away{background:color-mix(in srgb, var(--mrc-away) 82%, black);}
  .pap-nm-funnel-row:nth-child(3) .pap-nm-funnel-shape.is-away{background:color-mix(in srgb, var(--mrc-away) 62%, black);}
  .pap-nm-funnel-lbl{flex:1;font-size:10px;color:var(--text-muted);border-left:1px dashed var(--glass-hairline);padding-left:8px;}

  /* Directness */
  .pap-nm-direct-body{display:flex;gap:20px;}
  .pap-nm-direct-col{flex:1;display:flex;flex-direction:column;align-items:flex-start;min-width:0;}
  .pap-nm-direct-col + .pap-nm-direct-col{border-left:1px solid var(--glass-hairline);padding-left:20px;}
  .pap-nm-direct-name{font-size:12px;font-weight:700;color:var(--text);}
  .pap-nm-direct-big{font-family:var(--font-mono);font-weight:800;font-size:24px;margin-top:6px;}
  .pap-nm-direct-big.is-home{color:var(--mrc-home);}
  .pap-nm-direct-big.is-away{color:var(--mrc-away);}
  .pap-nm-direct-sub{font-size:9px;text-transform:uppercase;letter-spacing:0.03em;color:var(--text-muted);margin-top:1px;}
  .pap-nm-direct-track{display:flex;align-items:center;gap:4px;margin-top:14px;flex-wrap:wrap;}
  .pap-nm-direct-dot{width:6px;height:6px;border-radius:50%;background:var(--glass-hairline);flex:none;}
  .pap-nm-direct-track.is-home .pap-nm-direct-dot{background:var(--mrc-home);}
  .pap-nm-direct-track.is-away .pap-nm-direct-dot{background:var(--mrc-away);}
  .pap-nm-direct-end{width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:none;margin-left:2px;color:#fff;}
  .pap-nm-direct-end svg{width:11px;height:11px;}
  .pap-nm-direct-end.is-home{background:var(--mrc-home);}
  .pap-nm-direct-end.is-away{background:var(--mrc-away);}
  .pap-nm-direct-badge{
    margin-top:10px;font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.03em;
    padding:4px 10px;border-radius:12px;
  }
  .pap-nm-direct-badge.is-home{background:color-mix(in srgb, var(--mrc-home) 22%, transparent);color:var(--mrc-home);}
  .pap-nm-direct-badge.is-away{background:color-mix(in srgb, var(--mrc-away) 22%, transparent);color:var(--mrc-away);}

  /* Conversion */
  .pap-nm-conv-list{display:flex;flex-direction:column;gap:16px;}
  .pap-nm-conv-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
  .pap-nm-conv-row + .pap-nm-conv-row{padding-top:16px;border-top:1px solid var(--glass-hairline);}
  .pap-nm-conv-name{flex:0 0 auto;min-width:110px;font-size:12px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:6px;}
  .pap-nm-conv-balls{display:flex;flex-wrap:wrap;gap:5px;flex:1;}
  .pap-nm-conv-ball{
    width:24px;height:24px;border-radius:50%;border:1.5px solid var(--glass-hairline);color:var(--text-muted);flex:none;
    display:flex;align-items:center;justify-content:center;
  }
  .pap-nm-conv-ball svg{width:13px;height:13px;}
  .pap-nm-conv-ball.is-filled{
    background:color-mix(in srgb, var(--win, #3DDC97) 22%, transparent);
    border-color:var(--win, #3DDC97);color:var(--win, #3DDC97);
  }
  .pap-nm-conv-none{font-size:11px;color:var(--text-muted);font-style:italic;}
  .pap-nm-conv-frac{text-align:right;margin-left:auto;}
  .pap-nm-conv-frac-num{display:block;font-family:var(--font-mono);font-weight:800;font-size:14px;color:var(--text);}
  .pap-nm-conv-frac-lbl{display:block;font-size:8.5px;color:var(--text-muted);margin-top:1px;}

  .pap-dna{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px solid var(--glass-hairline);}
  .pap-dna-lbl{font-size:10px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:var(--text-muted);margin-right:2px;}
  .pap-dna-chip{
    display:flex;align-items:center;gap:5px;font-size:11px;font-weight:600;
    background:var(--surface-2);border:1px solid var(--glass-hairline);border-radius:20px;padding:3px 10px 3px 4px;
  }
  .pap-dna-chip-lbl{
    font-size:8.5px;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;color:var(--text-muted);
    background:var(--surface-3);border-radius:10px;padding:2px 6px;
  }
  .pap-dna-chip.is-home{color:var(--mrc-home);}
  .pap-dna-chip.is-away{color:var(--mrc-away);}
  .pap-dna-chip.is-even{color:var(--text-muted);}

  .pap-insight{margin-top:14px;padding-top:14px;border-top:1px dashed var(--glass-hairline);}
  .pap-insight-headline{font-family:var(--font-display);font-size:15px;letter-spacing:0.02em;text-transform:uppercase;color:var(--text);}
  .pap-insight-text{margin:5px 0 0;font-size:12.5px;line-height:1.5;color:var(--text-muted);}

  /* ---------- Match Flow timeline ---------- */
  .pap-flow{
    margin-top:14px;padding:18px 18px 14px;border-radius:8px;
    border:1px solid var(--glass-hairline);background:var(--surface);
  }
  .pap-flow-head{
    display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:10px 20px;
    margin-bottom:34px;
  }
  .pap-flow-head-text{display:flex;flex-direction:column;gap:3px;}
  .pap-flow-title{font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:var(--text);}
  .pap-flow-sub{font-size:10.5px;color:var(--text-muted);}
  .pap-flow-legend{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
  .pap-flow-leg{display:flex;align-items:center;gap:5px;font-size:10.5px;color:var(--text-muted);white-space:nowrap;}
  .pap-flow-leg-dot{width:7px;height:7px;border-radius:50%;flex:none;display:inline-block;}
  .pap-flow-leg-dot.is-home{background:var(--mrc-home);}
  .pap-flow-leg-dot.is-away{background:var(--mrc-away);}
  .pap-flow-leg-dot.is-draw{background:var(--text-muted);}

  .pap-flow-body{position:relative;padding:0 8px;}
  .pap-flow-halftime{position:absolute;top:0;bottom:22px;left:50%;width:0;border-left:1px dashed var(--glass-hairline);}
  .pap-flow-halftime-lbl{
    text-align:center;margin-top:6px;font-size:9.5px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;
    color:var(--text-muted);
  }

  .pap-flow-events{position:relative;height:58px;}
  .pap-flow-event{
    position:absolute;top:0;bottom:0;transform:translateX(-50%);
    display:flex;flex-direction:column;align-items:center;cursor:default;
  }
  .pap-flow-event-label{
    text-align:center;white-space:nowrap;font-size:10px;line-height:1.35;color:var(--text-muted);margin-bottom:3px;
  }
  .pap-flow-event-label b{color:var(--text);font-weight:700;}
  .pap-flow-event-score{font-family:var(--font-mono);font-weight:700;font-size:10.5px;}
  .pap-flow-event.is-home .pap-flow-event-score{color:var(--mrc-home);}
  .pap-flow-event.is-away .pap-flow-event-score{color:var(--mrc-away);}
  .pap-flow-event-stem{flex:1;width:1px;min-height:6px;background:var(--glass-hairline);}
  .pap-flow-event-icon{
    flex:none;width:22px;height:22px;border-radius:50%;margin-bottom:-11px;
    display:flex;align-items:center;justify-content:center;
    border:2px solid var(--surface);box-shadow:0 0 0 1px var(--glass-hairline);
  }
  .pap-flow-event-icon-svg{width:11px;height:11px;color:#fff;}
  .pap-flow-event.is-home .pap-flow-event-icon{background:var(--mrc-home);}
  .pap-flow-event.is-away .pap-flow-event-icon{background:var(--mrc-away);}

  .pap-flow-ribbon{
    position:relative;height:22px;border-radius:5px;margin-bottom:8px;
    background:var(--surface-3);
  }
  .pap-flow-axis{display:flex;justify-content:space-between;font-size:10px;color:var(--text-muted);font-family:var(--font-mono);}

  .pap-flow-arc{
    display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:12px;
    border-top:1px solid var(--glass-hairline);
  }
  .pap-flow-arc-lbl{font-size:10px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:var(--text-muted);flex:none;}
  .pap-flow-arc-chain{font-size:12px;font-weight:600;color:var(--text);}

  /* ---------- Match Character (temporal player traits) ---------- */
  .pap-mc{
    margin-top:12px;padding:16px;border-radius:10px;
    border:1px solid var(--glass-hairline);background:var(--surface-2);
  }
  .pap-mc-confidence{font-size:11.5px;color:var(--text-muted);font-style:italic;margin-bottom:12px;}
  .pap-mc-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
  .pap-mc-stat{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:8px;padding:10px 10px 9px;}
  .pap-mc-stat-lbl{font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.03em;margin-bottom:4px;}
  .pap-mc-stat-val{font-family:var(--font-mono);font-weight:700;font-size:17px;color:var(--text);}
  .pap-mc-stat-sub{font-size:10.5px;color:var(--text-muted);margin-top:2px;}
  .pap-mc-traits{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;}
  .pap-mc-trait{
    font-size:11px;font-weight:700;letter-spacing:0.02em;color:var(--accent);
    background:var(--accent-soft);border:1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius:20px;padding:4px 12px;cursor:default;
  }
  @media (max-width:640px){ .pap-mc-stats{grid-template-columns:repeat(2,1fr);} }

  /* ---------- Performance Identity (season / recent form / career) ---------- */
  .pap-identity{
    --mrc-home:#5AA9FF;--mrc-away:#FF6B6B;
    display:flex;gap:24px;align-items:flex-start;flex-wrap:wrap;margin-top:14px;
    padding:16px;border-radius:10px;border:1px solid var(--glass-hairline);background:var(--surface-2);
  }
  .pap-identity-hex{flex:1 1 220px;min-width:200px;display:flex;flex-direction:column;align-items:center;}
  .pap-id-legend{display:flex;gap:16px;margin-bottom:8px;}
  .pap-id-leg{display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:var(--text-muted);}
  .pap-dot.is-career{background:var(--mrc-home);}
  .pap-dot.is-recent{background:var(--mrc-away);}
  .pap-identity-table{flex:1 1 260px;min-width:240px;}
  .pap-id-row{display:grid;grid-template-columns:1fr 56px 56px 56px;align-items:center;gap:4px;padding:6px 0;border-bottom:1px solid var(--glass-hairline);}
  .pap-id-row:last-child{border-bottom:none;}
  .pap-id-row.pap-id-head{color:var(--text-muted);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.04em;border-bottom:1px solid var(--glass-hairline);}
  .pap-id-row-lbl{font-size:12.5px;color:var(--text);}
  .pap-id-row-val{font-family:var(--font-mono);font-size:13px;font-weight:700;text-align:center;color:var(--text);}
  .pap-id-row-val.is-career{color:var(--mrc-home);}
  .pap-id-row-val.is-recent{color:var(--mrc-away);}
  .pap-trend{font-weight:700;}
  .pap-trend.is-up{color:var(--win, #3DDC97);}
  .pap-trend.is-down{color:#d5674f;}
  @media (max-width:640px){ .pap-identity{flex-direction:column;} .pap-identity-hex,.pap-identity-table{flex-basis:auto;width:100%;} }

  /* Setup form */
  .setup-card{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:7px;padding:24px;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    box-shadow:var(--shadow-ambient);
  }
  .setup-card p{color:var(--text-muted);font-size:14px;margin-top:0;}
  /* History */
  /* ---------- Season Story ---------- */
  .season-story{
    margin:22px 0 4px;padding:20px 20px 18px;
    border:1px solid color-mix(in srgb, var(--accent) 20%, var(--glass-hairline));
    border-radius:10px;
    background:
      radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 60%),
      var(--surface);
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
  }
  .season-story-head{margin-bottom:16px;}
  .season-story-eyebrow{
    display:inline-block;font-family:var(--font-mono);font-size:10px;letter-spacing:0.24em;
    text-transform:uppercase;color:var(--accent);margin-bottom:6px;
  }
  .season-story-title{
    margin:0;font-family:var(--font-display);font-size:24px;letter-spacing:0.06em;
    text-transform:uppercase;line-height:1.05;color:var(--text);
  }
  .season-story-sub{margin:4px 0 0;font-size:12.5px;color:var(--text-muted);font-style:italic;}
  .season-story-beats{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px;
    border:1px solid var(--glass-hairline);border-radius:7px;overflow:hidden;}
  .story-beat{
    display:flex;gap:13px;align-items:flex-start;padding:13px 15px;
    background:color-mix(in srgb, var(--surface-2) 70%, transparent);
  }
  .story-beat.is-title{background:color-mix(in srgb, var(--gold) 12%, var(--surface-2));}
  .story-beat.is-tight{background:color-mix(in srgb, var(--accent) 11%, var(--surface-2));}
  .story-beat.is-fall{background:color-mix(in srgb, #c0392b 12%, var(--surface-2));}
  .story-beat-icon{flex:none;width:20px;height:20px;margin-top:1px;color:var(--text-muted);}
  .story-beat.is-title .story-beat-icon{color:var(--gold);}
  .story-beat.is-tight .story-beat-icon{color:var(--accent);}
  .story-beat.is-fall .story-beat-icon{color:#d5674f;}
  .story-beat-icon svg{width:100%;height:100%;display:block;}
  .story-beat-text{font-size:13.5px;line-height:1.5;color:var(--text);}
  .story-beat.is-title .story-beat-text{font-weight:600;}
  .season-notes-head{
    margin:18px 0 8px;font-family:var(--font-mono);font-size:10px;letter-spacing:0.22em;
    text-transform:uppercase;color:var(--text-muted);
  }
  .season-story-notes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px;
    border:1px solid var(--glass-hairline);border-radius:7px;overflow:hidden;}
  .club-note{
    display:flex;gap:11px;align-items:flex-start;padding:11px 14px;
    background:color-mix(in srgb, var(--surface-2) 55%, transparent);
  }
  .club-note .club-badge{flex:none;margin-top:1px;}
  .club-note-text{font-size:13px;line-height:1.5;color:var(--text);}
  .spc-wrap{margin-top:16px;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .season-pos-chart{display:block;width:100%;min-width:440px;height:auto;}
  .season-pos-chart .spc-grid{stroke:var(--glass-hairline);stroke-width:1;}
  .season-pos-chart .spc-axis{fill:var(--text-muted);font-family:var(--font-mono);font-size:9px;}
  .season-pos-chart .spc-axis.is-future{opacity:0.4;}
  .season-pos-chart .spc-future{fill:color-mix(in srgb, var(--text-muted) 8%, transparent);}
  .season-pos-chart .spc-cap{fill:var(--text-muted);font-family:var(--font-mono);font-size:8.5px;letter-spacing:0.18em;}
  .season-pos-chart .spc-name{fill:var(--text-muted);font-family:var(--font-display);font-size:11px;letter-spacing:0.04em;}
  .season-pos-chart .spc-name.is-champ{fill:var(--gold);}
  @media (max-width:600px){
    .season-story{padding:16px 14px;}
    .season-story-title{font-size:20px;}
    .story-beat-text{font-size:12.5px;}
  }

  /* ---------- Season Story aggregates: Stats tab ---------- */
  .story-sample-note{margin:2px 0 12px;font-size:12px;font-style:italic;color:var(--text-muted);}
  .story-records{
    display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1px;
    border:1px solid var(--glass-hairline);border-radius:7px;overflow:hidden;
    background:var(--glass-hairline);
  }
  .story-record{
    display:flex;flex-direction:column;gap:3px;padding:12px 14px;
    background:color-mix(in srgb, var(--surface-2) 65%, var(--surface));
  }
  .story-record-label{font-family:var(--font-mono);font-size:9.5px;letter-spacing:0.16em;text-transform:uppercase;color:var(--accent);}
  .story-record-val{font-family:var(--font-display);font-size:17px;letter-spacing:0.04em;color:var(--text);}
  .story-record-ctx{font-size:12px;color:var(--text-muted);}

  /* ---------- Season Story aggregates: Teams tab ---------- */
  .club-journeys{
    margin:2px 0 10px;padding:16px 18px;
    border:1px solid var(--glass-hairline);border-radius:8px;
    background:color-mix(in srgb, var(--surface-2) 45%, var(--surface));
  }
  .club-journeys .cabinet-head{margin-bottom:14px;}
  .journey-charts{display:flex;flex-direction:column;gap:2px;}
  .journey-row{
    display:flex;align-items:center;gap:12px;padding:6px 8px;border-radius:5px;
  }
  .journey-row:hover{background:color-mix(in srgb, var(--surface-3) 55%, transparent);}
  .journey-season{
    flex:none;width:34px;font-family:var(--font-mono);font-size:11px;color:var(--text-muted);
  }
  .mini-spark{flex:1;min-width:0;height:34px;display:block;}
  .mini-spark-top{stroke:var(--gold-soft);stroke-width:1;stroke-dasharray:2 3;}
  .journey-finish{
    flex:none;min-width:56px;text-align:right;font-family:var(--font-display);
    font-size:13px;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);
  }
  .journey-finish.is-win{color:var(--gold);}
  .journey-finish.is-open{opacity:0.6;font-style:italic;}
  .journey-facts{
    margin-top:14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:1px;
    border:1px solid var(--glass-hairline);border-radius:6px;overflow:hidden;background:var(--glass-hairline);
  }
  .journey-fact{
    display:flex;flex-direction:column;gap:2px;padding:9px 12px;
    background:color-mix(in srgb, var(--surface-2) 60%, var(--surface));
  }
  .journey-fact-k{font-family:var(--font-mono);font-size:9px;letter-spacing:0.14em;text-transform:uppercase;color:var(--text-muted);}
  .journey-fact-v{font-size:12.5px;color:var(--text);line-height:1.4;}
  .journey-notes{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:1px;
    border:1px solid var(--glass-hairline);border-radius:6px;overflow:hidden;}
  .journey-note{
    display:flex;gap:10px;align-items:flex-start;padding:10px 13px;
    background:color-mix(in srgb, var(--surface-2) 55%, transparent);
  }
  .journey-note.is-title{background:color-mix(in srgb, var(--gold) 11%, var(--surface-2));}
  .journey-note-season{flex:none;font-family:var(--font-mono);font-size:10px;color:var(--text-muted);margin-top:2px;width:26px;}
  .journey-note-text{font-size:12.5px;line-height:1.5;color:var(--text);}
  @media (max-width:600px){
    .club-journeys{padding:13px 12px;}
    .journey-season{width:26px;}
    .journey-finish{min-width:46px;font-size:11px;}
  }

  /* ---------- Match Story (per-fixture report) ---------- */
  .match-story{
    margin:14px 0 4px;padding:14px 15px;
    border:1px solid color-mix(in srgb, var(--accent) 18%, var(--glass-hairline));
    border-radius:7px;
    background:color-mix(in srgb, var(--surface-2) 55%, var(--surface));
  }
  .match-story-head{display:flex;align-items:center;gap:10px;margin-bottom:10px;flex-wrap:wrap;}
  .match-story-eyebrow{
    font-family:var(--font-mono);font-size:9.5px;letter-spacing:0.2em;text-transform:uppercase;color:var(--accent);
  }
  .match-char{
    font-family:var(--font-display);font-size:12px;letter-spacing:0.12em;text-transform:uppercase;
    color:var(--gold);border:1px solid color-mix(in srgb, var(--gold) 42%, transparent);
    border-radius:999px;padding:2px 10px;line-height:1.4;
  }
  .match-beats{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px;
    border:1px solid var(--glass-hairline);border-radius:5px;overflow:hidden;}
  .match-beat{
    display:flex;gap:10px;align-items:flex-start;padding:9px 12px;
    background:color-mix(in srgb, var(--surface-2) 70%, transparent);
  }
  .match-beat.is-tight{background:color-mix(in srgb, var(--accent) 10%, var(--surface-2));}
  .match-beat.is-fall{background:color-mix(in srgb, #c0392b 11%, var(--surface-2));}
  .match-beat-icon{flex:none;width:17px;height:17px;margin-top:1px;color:var(--text-muted);}
  .match-beat.is-tight .match-beat-icon{color:var(--accent);}
  .match-beat.is-fall .match-beat-icon{color:#d5674f;}
  .match-beat-icon svg{width:100%;height:100%;display:block;}
  .match-beat-text{font-size:12.5px;line-height:1.5;color:var(--text);}
  .match-story-hint{margin:9px 0 0;font-size:11px;font-style:italic;color:var(--text-muted);}

  /* ---------- Rivalry Character (Head-to-Head) ---------- */
  .rivalry-character{
    margin:14px 0 0;padding:16px 18px;
    border:1px solid color-mix(in srgb, var(--accent) 20%, var(--glass-hairline));
    border-radius:8px;
    background:
      radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 60%),
      color-mix(in srgb, var(--surface-2) 45%, var(--surface));
  }
  .rivalry-character-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
  .rivalry-character-eyebrow{
    font-family:var(--font-mono);font-size:9.5px;letter-spacing:0.2em;text-transform:uppercase;color:var(--accent);
  }
  .rivalry-character-verdict{
    font-family:var(--font-display);font-size:16px;letter-spacing:0.05em;text-transform:uppercase;color:var(--gold);
  }
  .riv-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px;
    border:1px solid var(--glass-hairline);border-radius:6px;overflow:hidden;}
  .riv-item{
    display:grid;grid-template-columns:auto auto;grid-template-areas:"tag count" "text text";
    gap:4px 10px;align-items:center;padding:11px 13px;
    background:color-mix(in srgb, var(--surface-2) 65%, transparent);
  }
  .riv-item-tag{
    grid-area:tag;justify-self:start;
    font-family:var(--font-display);font-size:12px;letter-spacing:0.1em;text-transform:uppercase;color:var(--gold);
    border:1px solid color-mix(in srgb, var(--gold) 40%, transparent);border-radius:999px;padding:2px 10px;line-height:1.4;
  }
  .riv-item-count{grid-area:count;justify-self:end;font-family:var(--font-mono);font-size:11px;color:var(--text-muted);}
  .riv-item-text{grid-area:text;font-size:12.5px;line-height:1.5;color:var(--text);}
  .riv-note{margin:0;font-size:12.5px;line-height:1.5;color:var(--text-muted);font-style:italic;}

  details.history-item{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:7px;margin-bottom:10px;overflow:hidden;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
  }
  details.history-item summary{
    cursor:pointer;padding:35px 16px;font-weight:700;font-size:15px;list-style:none;
    display:flex;justify-content:space-between;gap:10px;align-items:center;
  }
  details.history-item summary::-webkit-details-marker{display:none;}
  details.history-item summary .arrow{color:var(--text-muted);transition:transform .22s ease;}
  details.history-item[open] summary .arrow{transform:rotate(90deg);color:var(--accent);}
  details.history-item .history-body{padding:0 16px 16px;}
  .history-date-row{margin-bottom:12px;}
  /* Condensed fixture list inside a Season History item — same fixture-row
     component the live Season tab uses, just tightened up (smaller crests,
     less padding) since this is a quick past-season recap, not something
     you're meant to edit or reorder. */
  .history-fixtures .matchday{margin-bottom:10px;}
  .history-fixtures .matchday:last-child{margin-bottom:0;}
  .history-fixtures .matchday h3{font-size:11.5px;margin-bottom:2px;}
  .history-fixtures .fixture-row{padding:5px 0;gap:8px;}
  .history-fixtures .club-badge{width:19px;height:19px;}
  .history-fixtures .home .who,.history-fixtures .away .who{display:none;}
  .badge{
    font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;
    padding:6px 13px;border-radius:100px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.14);
  }
  .badge.win{background:var(--win-soft);color:var(--win);}
  .badge.pending{background:var(--info-soft);color:var(--info);}
  .badge.abandoned{background:var(--danger-soft);color:var(--danger);}
  .badge.ended{background:var(--danger-soft);color:var(--danger);}
  .closed-early-tag{font-size:12px;color:var(--text-muted);font-style:italic;}
  .inline-date-edit{display:inline-flex;align-items:center;gap:6px;color:var(--text-muted);font-size:13px;}
  .inline-date-edit input[type="date"]{
    font-family:var(--font-body);font-weight:600;font-size:13px;
    padding:4px 8px;border-radius:4px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
    color-scheme:light;
  }
  :root[data-theme="dark"] .inline-date-edit input[type="date"]{color-scheme:dark;}
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]) .inline-date-edit input[type="date"]{color-scheme:dark;}
  }
  .fixture-row.not-played{opacity:0.6;}
  .fixture-row .not-played-note{
    grid-column:2 / 5;text-align:center;font-size:12px;color:var(--text-muted);
    text-transform:uppercase;letter-spacing:0.05em;font-weight:600;
  }
  /* Matchday tab */
  @keyframes heroGlowPulse{
    0%,100%{box-shadow:0 0 0 1px var(--accent-soft), 0 0 40px 0 var(--accent-soft);}
    50%{box-shadow:0 0 0 1px var(--accent-soft), 0 0 64px 6px var(--accent-soft);}
  }
  @keyframes tabEnter{
    from{opacity:0;transform:translateY(12px);}
    to{opacity:1;transform:none;}
  }
  #tab-panel.tab-leave{
    opacity:0;transform:translateY(8px);
    transition:opacity .16s ease,transform .16s ease;
    pointer-events:none;
  }
  #tab-panel.tab-enter{animation:tabEnter .36s cubic-bezier(.22,.8,.22,1) both;}
  .reveal-on-scroll{
    opacity:0;transform:translateY(14px);
    transition:opacity .42s cubic-bezier(.22,.8,.22,1),transform .42s cubic-bezier(.22,.8,.22,1);
    transition-delay:var(--reveal-delay,0ms);
  }
  .reveal-on-scroll.is-in{opacity:1;transform:none;}
  .stat-card.reveal-on-scroll.is-in:hover,
  .trophy-card-v2.reveal-on-scroll.is-in:hover{transform:translateY(-2px);}
  @supports (interpolate-size: allow-keywords){
    html{interpolate-size:allow-keywords;}
    details.team-row::details-content,
    details.history-item::details-content,
    details.md-row::details-content{
      overflow:clip;
      transition:block-size .34s cubic-bezier(.22,.8,.22,1),content-visibility .34s allow-discrete;
    }
    details.team-row:not([open])::details-content,
    details.history-item:not([open])::details-content,
    details.md-row:not([open])::details-content{block-size:0;}
  }
  .md-hero{
    position:relative;
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:8px;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    padding:28px 30px;margin-bottom:22px;
  }
  .md-hero-top-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:20px;}
  .md-hero-eyebrow{
    font-family:var(--font-mono);font-size:13px;text-transform:uppercase;letter-spacing:0.14em;
    color:var(--gold);font-weight:700;
  }
  .md-hero-nav{display:flex;align-items:center;gap:12px;}
  .md-hero-nav-btn{
    width:26px;height:26px;padding:0;flex:none;border:1px solid var(--border);border-radius:4px;
    background:var(--surface-2);color:var(--text-muted);cursor:pointer;
    display:flex;align-items:center;justify-content:center;
  }
  .md-hero-nav-btn svg{width:14px;height:14px;display:block;}
  .md-hero-nav-btn:hover{background:var(--surface-3);color:var(--text);}
  .md-hero-nav-btn:disabled{opacity:0.25;cursor:default;}
  .md-hero-nav-btn:disabled:hover{background:var(--surface-2);color:var(--text-muted);}
  .md-hero-date-pill{
    display:flex;align-items:center;gap:8px;flex:none;
    font-family:var(--font-mono);font-size:12px;font-weight:700;letter-spacing:0.06em;color:var(--text-muted);
    border:1px solid var(--border);border-radius:6px;padding:7px 12px;background:var(--surface-2);
  }
  .md-hero-date-pill svg{width:14px;height:14px;flex:none;opacity:0.8;}
  .md-hero-date-row{
    display:flex;align-items:center;justify-content:center;gap:8px;
    font-family:var(--font-mono);font-size:12px;font-weight:700;letter-spacing:0.06em;color:var(--text-muted);
  }
  .md-hero-date-row svg{width:14px;height:14px;flex:none;opacity:0.8;}
  .md-hero-date-input{
    font:inherit;font-size:12px;font-weight:700;letter-spacing:0.06em;color:var(--text);background:none;border:none;padding:0;
  }
  .md-hero-date-input:focus{outline:none;}
  .md-hero-date-ro{color:var(--text-muted);}
  .md-live-match{
    display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:20px;
    margin-bottom:22px;text-align:center;
  }
  .md-live-side{display:flex;flex-direction:column;align-items:center;gap:10px;flex:1;min-width:0;}
  .md-live-crest{width:110px;height:110px;flex:none;filter:drop-shadow(0 10px 22px rgba(0,0,0,0.4));}
  .md-live-crest svg{width:100%;height:100%;display:block;}
  .md-live-club{
    font-family:var(--font-display);font-size:clamp(16px,3.8vw,21px);font-weight:700;
    letter-spacing:0.03em;line-height:1.15;max-width:100%;text-transform:uppercase;
  }
  .md-live-player{font-size:12.5px;color:var(--text-muted);font-weight:500;}
  .md-live-score{display:flex;align-items:center;gap:12px;flex:none;}
  .md-score-input{
    width:70px;height:70px;text-align:center;font-family:var(--font-mono);font-size:clamp(24px,6vw,30px);
    font-weight:800;border-radius:8px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
    padding:0 16px;
  }
  .md-live-score .num-stepper-btns{width:18px;right:4px;top:6px;bottom:6px;gap:5px;}
  .md-live-score .num-step svg{width:11px;height:11px;}
  .md-score-val{
    display:inline-block;min-width:48px;font-family:var(--font-mono);font-size:clamp(28px,8vw,38px);
    font-weight:800;
  }
  .md-score-sep{font-size:clamp(20px,5vw,24px);font-weight:700;color:var(--text-muted);}
  /* "Match Stats" section header — same icon+title(+hint) pattern as the
     dashboard panel headers, for consistency across the app. */
  .md-stats-head{
    display:flex;align-items:center;justify-content:space-between;gap:10px;
    margin:18px 0 10px;padding-bottom:10px;border-bottom:1px solid var(--glass-hairline);
  }
  .md-stats-head-left{display:flex;align-items:center;gap:8px;}
  .md-stats-head-left svg{width:15px;height:15px;color:var(--text-muted);flex:none;}
  .md-stats-head-left h3{
    font-family:var(--font-body);font-size:13px;letter-spacing:0.03em;margin:0;font-weight:700;
    text-transform:uppercase;color:var(--text);
  }
  .md-stats-head-hint{font-size:12.5px;color:var(--text-muted);}
  /* Editing locked: the same match-entry layout stays on screen (nothing
     swapped for a dead-end message) but reads as visibly inert — desaturated
     and dimmed, with every input/button already disabled server-side so
     there's nothing to click through to anyway. */
  .view-only-wrap{filter:saturate(0.4) brightness(0.92);opacity:0.78;}
  .view-only-wrap input:disabled,.view-only-wrap button:disabled{cursor:not-allowed;}
  .view-only-note{
    display:flex;align-items:center;gap:10px;margin-bottom:16px;padding:12px 14px;
    background:var(--surface-2);border:1px solid var(--border);border-radius:7px;
    color:var(--text-muted);font-size:13px;
  }
  .view-only-note svg{width:17px;height:17px;flex:none;opacity:0.8;}
  .md-hero-commit-row{
    display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
    margin-top:18px;padding-top:16px;border-top:1px solid var(--border);
  }
  .md-commit-hint{display:flex;align-items:center;}
  .md-commit-hint-text{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text-muted);}
  .md-commit-hint-text svg{width:15px;height:15px;flex:none;opacity:0.8;}
  .md-commit-warning{color:var(--danger);font-size:13px;font-weight:600;}
  .md-commit-warning:not([hidden]) + .md-commit-hint-text{display:none;}
  .md-hero-commit-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
  .md-hero-clear-btn{color:var(--danger);}
  .md-hero-clear-btn:hover{border-color:var(--danger);}
  .md-hero-commit-row .confirm-box{width:100%;}
  /* "Up Next" list below the hero */
  .md-up-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;}
  .md-up-sub{color:var(--text-muted);font-size:13px;margin:4px 0 14px;}
  .md-up-row{
    display:flex;align-items:center;gap:14px;padding:12px 16px;margin-bottom:8px;
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:6px;
  }
  .md-up-tag{
    font-family:var(--font-mono);font-size:10.5px;letter-spacing:0.08em;text-transform:uppercase;
    color:var(--text-muted);flex:0 0 90px;
  }
  .md-up-side{display:flex;align-items:center;gap:10px;flex:1;min-width:0;font-weight:700;font-size:14px;}
  .md-up-side .club-badge{width:26px;height:26px;flex:none;}
  .md-up-side b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .md-up-home{justify-content:flex-end;text-align:right;}
  .md-up-away{justify-content:flex-start;text-align:left;}
  .md-up-vs{
    flex:0 0 28px;text-align:center;font-family:var(--font-mono);font-size:11px;
    color:var(--text-muted);text-transform:uppercase;
  }
  .md-up-date{
    display:flex;align-items:center;gap:6px;flex:0 0 auto;font-size:12px;color:var(--text-muted);
    font-family:var(--font-mono);white-space:nowrap;
  }
  .md-up-date svg{width:13px;height:13px;opacity:0.8;}
  @media (max-width:640px){
    .md-up-row{flex-wrap:wrap;}
    .md-up-tag{flex-basis:100%;}
    .md-up-date{flex-basis:100%;justify-content:flex-end;}
  }
  @media (max-width:520px){
    .md-hero{padding: 20px;}
    .md-hero-commit-row{justify-content:stretch;}
    .md-hero-commit-row .btn.success{width:100%;justify-content:center;}
    .md-hero-eyebrow{text-align: center;}
  }
  .md-stats-grid{display:flex;flex-direction:column;gap:2px;}
  .md-stat-row{
    display:grid;grid-template-columns:70px 1fr 70px;align-items:center;gap:10px;
    padding:8px 0;border-bottom:1px solid var(--border);
  }
  .md-stat-row:last-child{border-bottom:none;}
  .md-stat-label{
    text-align:center;font-family:var(--font-display);font-size:18px;letter-spacing:0.03em;
    color:var(--text-muted);font-weight:400;
  }
  .md-stat-val{text-align:center;font-family:var(--font-mono);font-weight:600;}
  .md-stat-input{
    width:70px;text-align:right;font-family:var(--font-mono);font-size:15px;font-weight:600;
    padding:6px 20px 6px 4px;border-radius:4px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
  }
  .md-stat-row .num-stepper-btns{width:16px;right:2px;top:2px;bottom:2px;gap:2px;}
  .md-stat-row .num-step svg{width:9px;height:9px;}
  .md-row{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;margin-bottom:8px;overflow:hidden;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
  }
  .md-row-summary{
    cursor:pointer;padding:10px 14px;list-style:none;position:relative;
  }
  .md-row-summary .fixture-row{padding:0;border-bottom:none;background:transparent;}
  details.md-row summary::-webkit-details-marker{display:none;}
  .md-row-body{padding:2px 14px 16px;}
  /* Goal times — one minute field per goal in the scoreline, home / away */
  .md-live-goals{font-family:var(--font-mono);font-size:12px;font-weight:600;color:var(--accent);letter-spacing:0.02em;}
  .md-goals-none{font-size:13px;color:var(--text-muted);}
  .md-goals-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px;}
  .md-goal-col{display:flex;flex-direction:column;gap:6px;min-width:0;}
  .md-goal-col-head{display:flex;align-items:center;gap:6px;font-family:var(--font-display);font-size:13px;letter-spacing:0.03em;color:var(--text-muted);}
  .md-goal-ball{width:15px;height:15px;flex:none;color:var(--text-muted);}
  .md-goal-dash{color:var(--text-muted);font-family:var(--font-mono);font-weight:600;padding:4px 2px;}
  .md-goal-row{display:flex;align-items:center;gap:8px;}
  .md-goal-num{flex:none;width:14px;text-align:center;font-family:var(--font-mono);font-size:11px;font-weight:600;color:var(--text-muted);}
  .md-goal-row .num-stepper{flex:1;min-width:0;}
  .md-goal-row .num-stepper-btns{width:16px;right:2px;top:2px;bottom:2px;gap:2px;}
  .md-goal-row .num-step svg{width:9px;height:9px;}
  .md-goal-min{width:100%;min-width:0;font-family:var(--font-mono);font-size:14px;font-weight:600;text-align:left;padding:6px 20px 6px 8px;border-radius:4px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);}
  .md-goal-min:focus{outline:none;border-color:var(--accent);}
  .md-goal-timeline{display:flex;flex-direction:column;gap:5px;margin-bottom:4px;}
  .md-goal-line{display:flex;align-items:center;gap:8px;font-size:13px;}
  .md-goal-line-ball{width:16px;height:16px;flex:none;color:var(--text-muted);}
  .md-goal-line-min{font-family:var(--font-mono);font-weight:700;color:var(--accent);min-width:34px;}
  .md-goal-line.is-away{flex-direction:row-reverse;text-align:right;}
  @media (max-width: 520px){
    .md-stat-row{grid-template-columns:56px 1fr 56px;gap:6px;}
    .md-stat-input{width:56px;font-size:14px;padding:5px 17px 5px 3px;}
    .md-stat-row .num-stepper-btns{width:13px;right:1px;top:1px;bottom:1px;}
    .md-stat-row .num-step svg{width:7px;height:7px;}
    .md-live-match{gap:10px;}
    .md-live-crest{width:100%;height:100%;}
    .md-score-input{width:56px;height:76px;padding:0 16px;font-size:26px;}
    .md-live-score .num-stepper-btns{width:14px;right:3px;top:5px;bottom:5px;gap:3px;}
    .md-live-score .num-step svg{width:8px;height:8px;}
    .md-goals-grid{gap:8px;}
  }
  /* Banners */
  .banner{border-radius:7px;padding:11px 14px;font-size:13.5px;margin-bottom:20px;}
  .banner.info{background:var(--info-soft);color:var(--info);border:1px solid var(--info);}
  .banner.readonly{display:none;background:var(--surface-2);color:var(--text-muted);border:1px solid var(--border);}
  /* Sticky, not just inline — this has to survive scrolling through a whole
     season without disappearing, since mistaking sandbox for the real
     ledger is exactly the mistake this exists to prevent. */
  .banner.sandbox{
    display:flex;align-items:center;gap:9px;
    position:sticky;top:0;z-index:50;
    background:var(--gold-soft);color:var(--gold);border:1px solid var(--gold);
    font-weight:600;
  }
  .banner.sandbox svg{width:17px;height:17px;flex:none;}
  footer.notes{color:#565A63;font-size:12.5px;border-top:0px solid var(--border);padding-top:16px;}
  .backup-row{display:flex;align-items:center;gap:10px;margin-bottom:8px;flex-wrap:wrap;padding-top:16px;}
  .backup-status{font-size:12.5px;color:var(--text-muted);}
  .backup-hint{margin:0;}
  .backup-panel{
    margin-top:12px;background:var(--surface);border:1px solid var(--glass-hairline);border-radius:7px;padding:14px;
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    box-shadow:var(--shadow-ambient);
  }
  .backup-panel textarea{
    width:100%;min-height:160px;font-family:var(--font-mono);font-size:12px;line-height:1.5;
    padding:10px;border-radius:5px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);
    resize:vertical;box-sizing:border-box;
  }
  .restore-error{color:var(--danger);font-size:13px;font-weight:600;margin:10px 0 0;}
  /* Save bar */
  #savebar{
    position:fixed;left:0;right:0;bottom:0;
    /* Above .wrap (z-index:1) and every in-page stacking context — without
       this the fixed bar paints behind page content and is unclickable
       except past the end of the page. */
    z-index:1000;
    display:flex;justify-content:center;
    transform:translateY(120%);transition:transform .25s cubic-bezier(.2,.8,.2,1);
    pointer-events:none;
  }
  #savebar.show{transform:translateY(0);}
  #savebar .inner{
    pointer-events:auto;
    margin:0 16px 16px;max-width:976px;width:100%;
    background:var(--surface);color:var(--text);
    border:1px solid var(--glass-hairline);
    -webkit-backdrop-filter:blur(var(--glass-blur));backdrop-filter:blur(var(--glass-blur));
    border-radius:8px;padding:12px 16px;
    display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
    box-shadow:var(--shadow-lift);
  }
  :root[data-theme="dark"] #savebar .inner, .savebar-dark{background:var(--surface);color:var(--text);border:1px solid var(--glass-hairline);}
  #savebar .msg{font-size:13.5px;}
  #savebar .msg .err{color:var(--danger);display:block;font-size:12.5px;margin-top:2px;}
  #savebar .actions{display:flex;gap:8px;}
  #savebar .btn.primary{border-color:transparent;}
  #savebar .inner.saved{background:var(--accent-gradient);color:var(--accent-contrast);border-color:transparent;transition:background .2s ease;}
  @media (prefers-reduced-motion: reduce){
    #savebar{transition:none;}
    details.history-item summary .arrow{transition:none;}
    .home-menu-panel{transition-duration:0s;}
    .home-menu-toggle-chevron{transition:none;}
    .md-hero{animation:none;}
    #tab-panel.tab-enter,#tab-panel.tab-leave{animation:none;opacity:1;transform:none;transition:none;}
    .reveal-on-scroll,.reveal-on-scroll.is-in{opacity:1;transform:none;transition:none;}
    .team-fixture-filter-panel,.edit-lock-panel-inner{animation:none;}
    .fixture-report,.fixture-report.is-open{transition:none;}
    .career-record-viewport.is-sliding,.career-record-pane.is-sliding{transition:none;}
  }
  @media (max-width:520px){
    .fixture-row{grid-template-columns:1fr 42px 12px 42px 1fr;gap:6px;}
    .fixture-row.reorderable{grid-template-columns:22px 1fr 42px 12px 42px 1fr;}
    .fixture-row .home,.fixture-row .away{font-size:14px;gap:5px;}
    .fixture-row input[type="number"]{width:42px;font-size:16px;padding:6px 15px 6px 3px;}
    .fixture-row .num-stepper-btns{width:13px;right:1px;top:1px;bottom:1px;gap:1px;}
    .fixture-row .num-step svg{width:7px;height:7px;}
    .fixture-row .club-badge{width:20px;height:20px;}
  }
  /* Mobile paint cost: frosted glass + a fixed, tiled background make
     scrolling hitch on phones. Desktop keeps the broadcast look; phones
     get opaque surfaces, no backdrop blur, and a scrolling (not fixed)
     glow with the 3px dot grid dropped. The full-bleed artwork (body::after)
     stays — it's a position:fixed layer, cheap enough, and worth keeping. */
  @media (max-width: 768px){
    :root{
      --glass-blur:0px;
      --surface:#F4F6FB;
      --surface-2:#ECEFF6;
      --surface-3:#E4E8F2;
    }
    @media (prefers-color-scheme: dark){
      :root:not([data-theme="light"]){
        --surface:#0F141A;
        --surface-2:#151B23;
        --surface-3:#1C2530;
      }
    }
    :root[data-theme="dark"]{
      --surface:#0F141A;
      --surface-2:#151B23;
      --surface-3:#1C2530;
    }
    body{background-image:none;}
    .edit-lock-panel-inner,
    .tabbar,
    .view-toggle,
    .stat-card,
    .team-card,
    .team-fixture-filter-panel,
    .h2h-summary-card,
    .h2h-metric-row,
    .trophy-card-v2,
    .table-scroll,
    .btn,
    .player-slot,
    .setup-card,
    details.history-item,
    .md-hero,
    .md-score-input,
    .md-row,
    .backup-panel,
    #savebar .inner{
      -webkit-backdrop-filter:none;
      backdrop-filter:none;
    }
  }

  /* ---------- Settings page ---------- */
  .settings-subnav{
    display:flex;gap:6px;flex-wrap:wrap;
    border-bottom:1px solid var(--glass-hairline);margin-bottom:24px;
  }
  .settings-tab{
    background:none;border:none;cursor:pointer;
    padding:10px 4px;margin-right:18px;
    font-size:14px;font-weight:600;color:var(--text-muted);
    border-bottom:2px solid transparent;transition:color .15s ease,border-color .15s ease;
  }
  .settings-tab:hover{color:var(--text);}
  .settings-tab.active{color:var(--text);border-color:var(--accent);}
  .settings-body{min-height:120px;}
  .settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;}
  .settings-card{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:9px;padding:16px 18px;}
  .settings-card-title{font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);margin-bottom:10px;}
  .settings-card-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0;font-size:13.5px;}
  .settings-card-row .l{color:var(--text-muted);}
  .settings-card-row .v{color:var(--text);font-weight:600;}
  .settings-players-note{font-size:13px;line-height:1.5;color:var(--text-muted);max-width:640px;margin-bottom:12px;}
  .settings-players-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;}

  /* ---------- Players tab: profile selector row ---------- */
  .ppick-row{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 26px;}
  .ppick{
    display:flex;align-items:center;gap:10px;text-align:left;
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;
    padding:9px 14px 9px 9px;cursor:pointer;transition:border-color .15s ease,background .15s ease;
    flex:1 1 220px;max-width:280px;
  }
  .ppick:hover{border-color:var(--accent);}
  .ppick.active{border-color:var(--accent);background:var(--surface-2);}
  .ppick-avatar{flex:none;width:40px;height:40px;border-radius:50%;overflow:hidden;background:var(--surface-2);display:flex;align-items:center;justify-content:center;}
  .ppick-avatar .avatar-img{width:100%;height:100%;object-fit:cover;display:block;}
  .ppick-avatar .avatar-placeholder{width:60%;height:60%;color:var(--text-muted);}
  .ppick-info{min-width:0;flex:1 1 auto;display:flex;flex-direction:column;gap:2px;}
  .ppick-name{font-size:13.5px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .ppick-club{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .ppick-club svg,.ppick-club img{width:15px;height:15px;flex:none;}
  .ppick-meta{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:2px;}
  .ppick-dscore{font-family:var(--font-mono);font-weight:800;font-size:16px;color:var(--accent);}
  .ppick-dscore.is-empty{color:var(--text-muted);font-weight:600;}
  .ppick-trait{font-size:9.5px;font-weight:600;text-transform:uppercase;letter-spacing:0.03em;color:var(--text-muted);white-space:nowrap;}

  /* ---------- Player Profile page ---------- */
  .pprof-hero{display:flex;align-items:center;gap:18px;margin-bottom:22px;flex-wrap:wrap;}
  .pprof-tab-body{min-height:160px;}
  .pprof-hero-avatar{flex:none;width:84px;height:84px;border-radius:50%;overflow:hidden;background:var(--surface-2);border:1px solid var(--glass-hairline);display:flex;align-items:center;justify-content:center;}
  .pprof-hero-avatar .avatar-img{width:100%;height:100%;object-fit:cover;display:block;}
  .pprof-hero-avatar .avatar-placeholder{width:55%;height:55%;color:var(--text-muted);}
  .pprof-hero-id{min-width:0;}
  .pprof-hero-name{font-family:var(--font-display);font-size:28px;line-height:1.1;color:var(--text);}
  .pprof-hero-club{display:flex;align-items:center;gap:7px;font-size:13.5px;color:var(--text-muted);margin-top:5px;}
  .pprof-hero-club svg,.pprof-hero-club img{width:20px;height:20px;flex:none;}
  .pprof-hero-trophies{margin-left:6px;padding:2px 8px;border-radius:10px;background:var(--surface-3);font-size:11px;font-weight:600;color:var(--text);}
  .pprof-hero-tagline{margin:8px 0 0;font-size:14.5px;line-height:1.5;color:var(--text);max-width:60ch;font-style:italic;}

  .pprof-grid{display:grid;grid-template-columns:1.65fr 1fr;gap:20px;align-items:start;}
  @media (max-width:900px){ .pprof-grid{grid-template-columns:1fr;} }
  .pprof-col-main,.pprof-col-side{display:flex;flex-direction:column;gap:18px;min-width:0;}

  .pprof-hex{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:18px;display:flex;flex-direction:column;align-items:center;}
  .pprof-hex-head{align-self:flex-start;font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);margin-bottom:10px;}

  .pprof-identity{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:18px 20px;}
  .pprof-identity-title{font-family:var(--font-display);font-size:19px;letter-spacing:0.02em;text-transform:uppercase;color:var(--text);}
  .pprof-identity-text{margin:8px 0 0;font-size:13.5px;line-height:1.6;color:var(--text-muted);}

  .pprof-traits{display:flex;flex-direction:column;gap:14px;}
  .pprof-trait-block{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:14px 16px;}
  .pprof-trait-title{font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;margin-bottom:9px;}
  .pprof-trait-block.is-pos .pprof-trait-title{color:var(--win,#3DDC97);}
  .pprof-trait-block.is-neg .pprof-trait-title{color:#d5674f;}
  .pprof-trait-block.is-neu .pprof-trait-title{color:var(--text-muted);}
  .pprof-trait-chips{display:flex;flex-wrap:wrap;gap:7px;}
  .pprof-chip{
    padding:5px 11px;border-radius:14px;font-size:12px;font-weight:600;
    background:var(--surface-2);border:1px solid var(--glass-hairline);color:var(--text);cursor:help;
  }
  .pprof-trait-block.is-pos .pprof-chip{border-color:color-mix(in srgb, var(--win,#3DDC97) 45%, var(--glass-hairline));}
  .pprof-trait-block.is-neg .pprof-chip{border-color:color-mix(in srgb, #d5674f 45%, var(--glass-hairline));}

  .pprof-dscore{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:18px 20px;}
  .pprof-dscore-lbl{font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);}
  .pprof-dscore-num{font-family:var(--font-mono);font-weight:800;font-size:44px;line-height:1.05;color:var(--text);margin-top:4px;}
  .pprof-dscore-max{font-size:16px;font-weight:600;color:var(--text-muted);margin-left:2px;}
  .pprof-dscore-ctx{margin-top:8px;display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--text-muted);}
  .pprof-dscore-delta{margin-left:6px;font-family:var(--font-mono);font-weight:700;}
  .pprof-dscore-delta.is-up{color:var(--win,#3DDC97);}
  .pprof-dscore-delta.is-down{color:#d5674f;}
  .pprof-dscore-delta.is-flat{color:var(--text-muted);}

  .pprof-risk{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:18px 20px;}
  .pprof-risk-head{font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);}
  .pprof-risk-score{font-family:var(--font-mono);font-weight:800;font-size:28px;color:var(--text);margin-top:4px;}
  .pprof-risk-max{font-size:13px;font-weight:600;color:var(--text-muted);margin-left:2px;}
  .pprof-risk-bar{height:6px;border-radius:3px;background:var(--surface-3);overflow:hidden;margin-top:10px;}
  .pprof-risk-fill{height:100%;background:linear-gradient(90deg, var(--win,#3DDC97), #e0b23d, #d5674f);}
  .pprof-risk-label{margin-top:8px;font-size:12.5px;font-weight:700;color:var(--text);}
  .pprof-risk-text{margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--text-muted);}

  .pprof-setup{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:18px 20px;}
  .pprof-setup-head{font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);margin-bottom:12px;}
  .pprof-setup-body{display:flex;align-items:center;gap:16px;}
  .pprof-setup-pitch-wrap{flex:none;width:84px;}
  .pprof-pitch{width:100%;height:auto;display:block;}
  .pprof-pitch-outline{fill:none;stroke:var(--glass-hairline);stroke-width:1.5;}
  .pprof-pitch-dot{fill:#e5484d;}
  .pprof-pitch-empty{
    width:84px;height:118px;border:1.5px dashed var(--glass-hairline);border-radius:6px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
    color:var(--text-muted);text-align:center;font-size:10px;padding:6px;
  }
  .pprof-pitch-empty svg{width:20px;height:20px;opacity:0.6;}
  .pprof-setup-info{min-width:0;}
  .pprof-setup-formation{font-family:var(--font-display);font-size:26px;line-height:1.1;color:var(--text);}
  .pprof-setup-style{margin-top:4px;font-size:13px;color:var(--text-muted);}

  .pprof-metrics{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:14px 16px;display:grid;grid-template-columns:1fr 1fr;gap:12px 10px;}
  .pprof-metric{display:flex;flex-direction:column;gap:2px;}
  .pprof-metric-val{font-family:var(--font-mono);font-weight:700;font-size:16px;color:var(--text);}
  .pprof-metric-lbl{font-size:10px;color:var(--text-muted);}

  .pprof-trend{margin-top:20px;background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:16px 18px;}
  .pprof-trend-head{font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);margin-bottom:12px;}
  .ptrend-row{display:flex;align-items:flex-end;gap:8px;overflow-x:auto;padding-bottom:2px;}
  .ptrend-col{display:flex;flex-direction:column;align-items:center;gap:5px;flex:none;width:22px;}
  .ptrend-bar-track{width:10px;height:64px;display:flex;align-items:flex-end;}
  .ptrend-bar{width:100%;border-radius:2px 2px 0 0;background:var(--text-muted);}
  .ptrend-bar.is-w{background:var(--win,#3DDC97);}
  .ptrend-bar.is-l{background:#d5674f;}
  .ptrend-bar.is-d{background:var(--text-muted);}
  .ptrend-res{font-size:9px;font-weight:700;color:var(--text-muted);}
  .ptrend-res.is-w{color:var(--win,#3DDC97);}
  .ptrend-res.is-l{color:#d5674f;}

  .pprof-history{margin-top:0;}
  .pmh-head-row,.pmh-row{display:grid;grid-template-columns:70px 1fr 70px 40px 56px;gap:10px;align-items:center;}
  .pmh-head-row{padding:0 14px 8px;font-size:10px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:var(--text-muted);}
  .pmh-list{display:flex;flex-direction:column;gap:6px;}
  .pmh-row{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:8px;padding:10px 14px;cursor:pointer;transition:border-color .15s ease;}
  .pmh-row:hover{border-color:var(--accent);}
  .pmh-md{font-size:11.5px;color:var(--text-muted);font-weight:600;}
  .pmh-opp{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .pmh-opp svg,.pmh-opp img{width:18px;height:18px;flex:none;}
  .pmh-score{font-family:var(--font-mono);font-weight:700;font-size:13.5px;color:var(--text);}
  .pmh-result{font-size:11.5px;font-weight:800;text-align:center;border-radius:4px;padding:2px 0;}
  .pmh-result.is-w{background:color-mix(in srgb, var(--win,#3DDC97) 20%, transparent);color:var(--win,#3DDC97);}
  .pmh-result.is-l{background:color-mix(in srgb, #d5674f 20%, transparent);color:#d5674f;}
  .pmh-result.is-d{background:var(--surface-3);color:var(--text-muted);}
  .pmh-dscore{font-family:var(--font-mono);font-weight:700;font-size:13.5px;color:var(--text);text-align:right;}
  @media (max-width:560px){
    .pmh-head-row{display:none;}
    .pmh-row{grid-template-columns:56px 1fr 60px 34px 46px;font-size:12px;}
  }

  /* ---------- Goal Flow & Game Behaviour: detailed (collapsed) grid ---------- */
  .pprof-goalflow{margin-top:0;}
  .gflow-head{margin-bottom:4px;}
  .gflow-head-sub{margin:2px 0 0;font-size:12.5px;color:var(--text-muted);}
  .gflow-conf{font-size:11.5px;color:var(--text-muted);opacity:0.85;margin:6px 0 18px;}
  .gflow-details{margin-top:18px;}
  .gflow-details > summary{
    cursor:pointer;font-size:12px;font-weight:600;color:var(--text-muted);
    list-style:none;display:inline-flex;align-items:center;gap:5px;
  }
  .gflow-details > summary::-webkit-details-marker{display:none;}
  .gflow-details > summary::before{content:'▸';font-size:10px;transition:transform .15s ease;}
  .gflow-details[open] > summary::before{transform:rotate(90deg);}
  .gflow-details > summary:hover{color:var(--text);}
  .gflow-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-top:14px;}
  .gflow-card{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:9px;padding:14px 16px;}
  .gflow-card-title{font-size:10.5px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:var(--text-muted);margin-bottom:8px;}
  .gflow-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:4px 0;font-size:12.5px;}
  .gflow-row .l{color:var(--text-muted);}
  .gflow-row .v{color:var(--text);font-weight:700;font-family:var(--font-mono);text-align:right;}

  /* ---------- Goal Flow & Game Behaviour: the five visual stories ---------- */
  .gflow-stories{
    display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;
    grid-template-areas:
      "opening response"
      "gamestate gamestate"
      "tempo closing";
  }
  .gflow-opening{grid-area:opening;}
  .gflow-response{grid-area:response;}
  .gflow-gamestate{grid-area:gamestate;}
  .gflow-tempo{grid-area:tempo;}
  .gflow-closing{grid-area:closing;}
  @media (max-width:820px){
    .gflow-stories{grid-template-columns:1fr;grid-template-areas:"opening" "response" "gamestate" "tempo" "closing";}
  }

  .gflow-story{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:12px;padding:22px 24px;min-width:0;}
  .gflow-story-head{display:flex;flex-direction:column;gap:2px;margin-bottom:16px;}
  .gflow-story-title{font-size:12px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);}
  .gflow-story-sub{font-size:11px;color:var(--text-muted);opacity:0.75;}
  .gflow-headline{font-family:var(--font-display);font-size:21px;letter-spacing:0.01em;color:var(--text);}
  .gflow-support{margin:5px 0 18px;font-size:12.5px;line-height:1.5;color:var(--text-muted);max-width:44ch;}
  .gflow-caption{margin:12px 0 0;font-size:11.5px;color:var(--text-muted);}

  /* shared timeline track + dot, reused by Opening Behaviour and Scoring Tempo */
  .gflow-track{position:relative;height:8px;border-radius:4px;background:var(--surface-3);flex:1 1 auto;min-width:0;}
  .gflow-track-late{position:absolute;top:0;right:0;bottom:0;width:16.67%;background:color-mix(in srgb, var(--text-muted) 16%, transparent);border-radius:0 4px 4px 0;}
  .gflow-dot{
    position:absolute;top:50%;width:11px;height:11px;border-radius:50%;
    transform:translate(-50%,-50%);border:2px solid var(--surface);cursor:default;
  }
  .gflow-dot.is-pos{background:var(--win,#3DDC97);}
  .gflow-dot.is-neg{background:#d5674f;}

  /* Story 1: Opening Behaviour */
  .gflow-open-list{display:flex;flex-direction:column;gap:12px;}
  .gflow-open-row{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:12px;}
  .gflow-open-mno{font-family:var(--font-mono);font-size:10px;color:var(--text-muted);}
  .gflow-open-tag{font-size:10.5px;font-weight:700;white-space:nowrap;letter-spacing:0.02em;}
  .gflow-open-tag.is-pos{color:var(--win,#3DDC97);}
  .gflow-open-tag.is-neg{color:#d5674f;}

  /* Story 2: Response Profile */
  .gflow-resp-flow{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:4px;}
  .gflow-resp-start{
    flex:none;background:var(--surface-3);border-radius:10px;padding:12px 16px;text-align:center;
    font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.03em;
  }
  .gflow-resp-start span{display:block;font-family:var(--font-mono);font-size:22px;font-weight:800;color:var(--text);margin-top:4px;text-transform:none;letter-spacing:0;}
  .gflow-resp-arrow{flex:none;font-size:20px;color:var(--text-muted);}
  .gflow-resp-branches{display:flex;gap:10px;flex-wrap:wrap;flex:1 1 auto;}
  .gflow-resp-branch{flex:1 1 80px;border-radius:10px;padding:10px 12px;text-align:center;background:var(--surface-3);}
  .gflow-resp-branch-num{font-family:var(--font-mono);font-weight:800;font-size:20px;color:var(--text);}
  .gflow-resp-branch-lbl{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.03em;color:var(--text-muted);margin-top:2px;}
  .gflow-resp-branch-pct{font-size:10px;color:var(--text-muted);margin-top:2px;}
  .gflow-resp-branch.is-win{background:color-mix(in srgb, var(--win,#3DDC97) 16%, var(--surface-3));}
  .gflow-resp-branch.is-win .gflow-resp-branch-num{color:var(--win,#3DDC97);}
  .gflow-resp-branch.is-loss{background:color-mix(in srgb, #d5674f 16%, var(--surface-3));}
  .gflow-resp-branch.is-loss .gflow-resp-branch-num{color:#d5674f;}

  /* Story 3: Game State */
  .gflow-state-bar{display:flex;height:34px;border-radius:8px;overflow:hidden;}
  .gflow-state-seg{height:100%;transition:width .2s ease;}
  .gflow-state-seg.is-lead{background:var(--win,#3DDC97);}
  .gflow-state-seg.is-level{background:var(--surface-3);}
  .gflow-state-seg.is-trail{background:#d5674f;}
  .gflow-state-legend{display:flex;gap:18px;flex-wrap:wrap;margin-top:12px;font-size:12px;color:var(--text-muted);}
  .gflow-state-legend span::before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:middle;}
  .gflow-state-legend .is-lead::before{background:var(--win,#3DDC97);}
  .gflow-state-legend .is-level::before{background:var(--surface-3);border:1px solid var(--glass-hairline);}
  .gflow-state-legend .is-trail::before{background:#d5674f;}

  /* Story 4: Scoring Tempo */
  .gflow-tempo-axis{display:flex;justify-content:space-between;font-size:10px;color:var(--text-muted);margin-bottom:8px;padding:0 1px;}
  .gflow-tempo-lane{display:flex;align-items:center;gap:10px;margin-top:10px;}
  .gflow-tempo-lbl{flex:none;width:56px;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.02em;color:var(--text-muted);}

  /* Story 5: Closing Profile */
  .gflow-close-track{position:relative;height:14px;border-radius:7px;background:var(--surface-3);overflow:hidden;}
  .gflow-close-fill{height:100%;background:linear-gradient(90deg, color-mix(in srgb, var(--win,#3DDC97) 40%, transparent), var(--win,#3DDC97));border-radius:7px;}
  .gflow-close-zone-lbl{position:absolute;right:6px;top:50%;transform:translateY(-50%);font-size:9px;font-weight:700;color:var(--text-muted);letter-spacing:0.02em;}
  .gflow-close-caption{margin-top:10px;font-size:12px;color:var(--text-muted);}

  @media (max-width:480px){
    .gflow-story{padding:18px 16px;}
    .gflow-headline{font-size:18px;}
    .gflow-resp-flow{flex-direction:column;align-items:stretch;}
    .gflow-resp-arrow{transform:rotate(90deg);align-self:center;}
    .gflow-tempo-lbl{width:48px;font-size:9.5px;}
  }

  /* ---------- Players: Profiles / Landscape toggle ---------- */
  .players-main-toggle{display:flex;gap:8px;margin:18px 0 22px;}
  .players-main-btn{
    padding:9px 18px;border-radius:20px;font-size:13px;font-weight:600;
    background:var(--surface);border:1px solid var(--glass-hairline);color:var(--text-muted);cursor:pointer;
    transition:color .15s ease,border-color .15s ease,background .15s ease;
  }
  .players-main-btn:hover{color:var(--text);}
  .players-main-btn.active{color:var(--text);border-color:var(--accent);background:var(--surface-2);}

  /* ---------- Player Landscape ---------- */
  .landscape-page{display:flex;flex-direction:column;gap:18px;}
  .landscape-presets{display:flex;gap:8px;flex-wrap:wrap;}
  .landscape-preset-btn{
    padding:7px 14px;border-radius:16px;font-size:12px;font-weight:600;
    background:var(--surface);border:1px solid var(--glass-hairline);color:var(--text-muted);cursor:pointer;
    transition:color .15s ease,border-color .15s ease;
  }
  .landscape-preset-btn:hover{color:var(--text);}
  .landscape-preset-btn.active{color:var(--text);border-color:var(--accent);background:var(--surface-2);}

  .landscape-axes-row{display:flex;gap:24px;flex-wrap:wrap;}
  .landscape-axis-label{display:flex;flex-direction:column;gap:6px;font-size:10.5px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:var(--text-muted);}
  .landscape-axis-label select{
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:8px;
    color:var(--text);font-size:13px;font-weight:600;padding:8px 12px;min-width:190px;
  }

  .landscape-matrix{
    position:relative;min-height:460px;box-sizing:border-box;
    background:var(--surface);border:1px solid var(--glass-hairline);border-radius:14px;
    margin:16px 8px 44px 40px;
  }
  .landscape-quad{position:absolute;padding:12px 14px;pointer-events:none;}
  .landscape-quad span{
    font-size:10.5px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;
    color:var(--text-muted);opacity:0.55;
  }
  .landscape-gridline{position:absolute;background:var(--glass-hairline);}
  .landscape-gridline.is-v{top:0;bottom:0;width:1px;}
  .landscape-gridline.is-h{left:0;right:0;height:1px;}

  .landscape-marker{
    position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;
    background:var(--surface-2);border:2px solid var(--dot-color);cursor:pointer;
    display:flex;align-items:center;justify-content:center;padding:0;
    transition:width .15s ease,height .15s ease,box-shadow .15s ease;
  }
  .landscape-marker > svg{width:84%;height:84%;pointer-events:none;flex:none;}
  .landscape-marker:hover{z-index:20;}
  .landscape-marker.is-selected{
    width:56px;height:56px;box-shadow:0 0 0 5px color-mix(in srgb, var(--dot-color) 32%, transparent);
  }

  .landscape-tip{
    position:absolute;bottom:130%;left:50%;transform:translateX(-50%);
    background:var(--surface-3);border:1px solid var(--glass-hairline);border-radius:9px;
    padding:10px 13px;min-width:160px;text-align:left;opacity:0;pointer-events:none;
    transition:opacity .15s ease;z-index:5;
  }
  .landscape-marker:hover .landscape-tip,.landscape-marker:focus-visible .landscape-tip{opacity:1;}
  .landscape-tip b{display:block;font-size:12.5px;color:var(--text);}
  .landscape-tip small{display:block;font-size:10.5px;color:var(--text-muted);margin-bottom:6px;}
  .landscape-tip-row{display:flex;justify-content:space-between;gap:14px;font-size:11.5px;color:var(--text-muted);padding:2px 0;}
  .landscape-tip-row span:last-child{font-family:var(--font-mono);font-weight:700;color:var(--text);}
  .landscape-tip-tendency{display:block;margin-top:6px;padding-top:6px;border-top:1px dashed var(--glass-hairline);font-size:10.5px;font-weight:700;color:var(--text);}
  .landscape-tip-note{display:block;margin-top:4px;font-size:10px;color:var(--text-muted);font-style:italic;}

  .landscape-axis-x{
    position:absolute;left:50%;bottom:-26px;transform:translateX(-50%);
    font-size:10px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:var(--text-muted);white-space:nowrap;
  }
  .landscape-axis-y{
    position:absolute;left:-14px;top:50%;transform-origin:left center;transform:translateY(-50%) rotate(-90deg);
    font-size:10px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:var(--text-muted);white-space:nowrap;
  }

  .landscape-context{display:flex;gap:16px;flex-wrap:wrap;font-size:12.5px;color:var(--text-muted);}
  .landscape-context span{position:relative;padding-left:14px;}
  .landscape-context span::before{content:'';position:absolute;left:0;top:50%;transform:translateY(-50%);width:5px;height:5px;border-radius:50%;background:var(--glass-hairline);}

  .landscape-position{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:12px;padding:20px 22px;}
  .landscape-position-head{font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);}
  .landscape-position-head span{margin-left:8px;color:var(--text);font-weight:600;text-transform:none;letter-spacing:0;}
  .landscape-position-headline{font-family:var(--font-display);font-size:19px;color:var(--text);margin-top:6px;}
  .landscape-position-text{margin:6px 0 0;font-size:13px;line-height:1.55;color:var(--text-muted);max-width:60ch;}

  .landscape-mini-wrap{margin:10px 0;}
  .landscape-matrix.is-mini{width:100%;min-height:140px;margin:0;border-radius:10px;}
  .landscape-matrix.is-mini .landscape-marker{width:30px;height:30px;border-width:1.5px;}
  .landscape-matrix.is-mini .landscape-marker.is-selected{width:40px;height:40px;box-shadow:0 0 0 3px color-mix(in srgb, var(--dot-color) 32%, transparent);}
  .landscape-matrix.is-mini .landscape-marker.is-dim{opacity:0.5;}

  .pprof-landscape-mini{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:16px 18px;}
  .pprof-landscape-mini-head{font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);}
  .pprof-landscape-mini-sub{font-size:11px;color:var(--text-muted);margin-top:2px;}
  .pprof-landscape-mini-result{margin-top:8px;font-size:12.5px;font-weight:600;color:var(--text);}
  .pprof-landscape-mini-link{
    display:inline-block;margin-top:10px;background:none;border:none;padding:0;
    font-size:12px;font-weight:600;color:var(--accent);cursor:pointer;
  }
  .pprof-landscape-mini-link:hover{text-decoration:underline;}

  .dash-panel-sub-text{margin:2px 0 12px;font-size:12px;color:var(--text-muted);}
  .dash-row-5{margin-top:18px;}

  @media (max-width:720px){
    .landscape-matrix{min-height:380px;margin:16px 4px 40px 30px;}
    .landscape-axis-label select{min-width:0;width:100%;}
    .landscape-axes-row{gap:14px;}
    .landscape-axis-label{flex:1 1 140px;}
  }
  @media (max-width:420px){
    .landscape-matrix{min-height:320px;}
    .landscape-preset-btn{font-size:11px;padding:6px 11px;}
    .landscape-quad span{font-size:9px;}
    .landscape-marker{width:36px;height:36px;}
    .landscape-marker.is-selected{width:46px;height:46px;}
  }

  /* ---- Season History (Season page → History tab) ---- */
  .sh-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:18px;}
  .sh-note{margin:0;font-size:12.5px;color:var(--text-muted);max-width:68ch;}
  .sh-filter{
    font-size:12.5px;font-weight:600;padding:7px 14px;border-radius:999px;cursor:pointer;
    border:1px solid var(--glass-hairline);background:var(--surface-2);color:var(--text-muted);
  }
  .sh-filter:hover{color:var(--text);}
  .sh-filter.active{color:var(--text);border-color:var(--accent);}
  .sh-trend{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:16px 18px;margin-bottom:18px;}
  .sh-trend-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
  .sh-trend-title{margin:0;font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted);}
  .sh-trend-select{
    font-size:12.5px;font-weight:600;color:var(--text);background:var(--surface-2);
    border:1px solid var(--glass-hairline);border-radius:6px;padding:5px 8px;
  }
  .sh-trend-scroll{overflow-x:auto;padding-bottom:4px;}
  .sh-bars{display:flex;align-items:flex-end;gap:8px;min-width:100%;width:max-content;height:150px;}
  .sh-bar-col{display:flex;flex-direction:column;align-items:center;gap:4px;width:34px;height:100%;}
  .sh-bar-val{font-family:var(--font-mono);font-size:10.5px;color:var(--text-muted);height:14px;}
  .sh-bar-track{flex:1;width:100%;display:flex;align-items:flex-end;}
  .sh-bar{width:100%;background:var(--accent);border-radius:3px 3px 0 0;min-height:0;}
  .sh-bar-col.is-muted .sh-bar{background:var(--text-muted);opacity:0.35;}
  .sh-bar-label{font-size:10.5px;color:var(--text-muted);font-family:var(--font-mono);}
  .sh-table{min-width:1080px;font-size:14px;}
  .sh-table th,.sh-table td{padding:12px 14px;vertical-align:top;}
  .sh-table td.num{text-align:right;}
  .sh-table td strong{display:block;font-weight:700;}
  .sh-table td.num strong{font-family:var(--font-mono);}
  .sh-sub{display:block;font-size:11.5px;font-weight:500;color:var(--text-muted);margin-top:2px;font-family:var(--font-body, inherit);}
  .sh-dim{color:var(--text-muted);}
  .sh-season{position:sticky;left:0;background:var(--surface);z-index:1;}
  .sh-season-num{font-weight:700;margin-bottom:4px;}
  .sh-status{display:inline-block;font-size:10.5px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;padding:2px 7px;border-radius:999px;background:var(--info-soft);color:var(--info);}
  .sh-status.is-complete{background:var(--win-soft);color:var(--win);}
  .sh-status.is-abandoned{background:var(--danger-soft);color:var(--danger);}
  .sh-champ{display:inline-flex;align-items:center;gap:8px;}
  .sh-champ-name{font-weight:600;}
  .sh-split{width:72px;height:6px;border-radius:999px;background:var(--surface-3);overflow:hidden;margin-bottom:4px;}
  .sh-split-draw{display:block;height:100%;background:var(--info);}
  .sh-row.is-muted td{opacity:0.5;}
  .sh-row.is-muted td.sh-season{opacity:1;}
  .sh-row.is-muted .sh-season-num{opacity:0.5;}
  .sh-table td.is-top{color:var(--accent);}
  .sh-table td.is-top strong{color:var(--accent);}
  .sh-sub.is-top-text{color:var(--accent);}
  @media (max-width:720px){
    .sh-toolbar{flex-direction:column;}
  }

  /* ---- Match Scatter (Team page — raw per-match stats, one dot per game) ---- */
  .mscat-card{background:var(--surface);border:1px solid var(--glass-hairline);border-radius:10px;padding:18px 20px;}
  .mscat-desc{font-size:12.5px;color:var(--text-muted);margin-bottom:12px;max-width:60ch;}
  .mscat-presets{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px;}
  .mscat-preset-btn{
    font-size:12px;font-weight:600;padding:6px 12px;border-radius:999px;
    border:1px solid var(--glass-hairline);background:var(--surface-2);color:var(--text-muted);cursor:pointer;
  }
  .mscat-preset-btn:hover{color:var(--text);}
  .mscat-preset-btn.active{color:var(--text);border-color:var(--accent);background:var(--surface-3);}
  .mscat-axes-row{display:flex;gap:20px;flex-wrap:wrap;margin-bottom:14px;}
  .mscat-axis-label-inline{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:700;color:var(--text-muted);}
  .mscat-axis-select{
    font-size:12.5px;font-weight:600;color:var(--text);background:var(--surface-2);
    border:1px solid var(--glass-hairline);border-radius:6px;padding:5px 8px;
  }
  .mscat-svg{width:100%;height:auto;max-width:460px;display:block;margin:0 auto;overflow:visible;}
  .mscat-grid{stroke:var(--glass-hairline);stroke-width:1;}
  .mscat-tick{fill:var(--text-muted);font-size:10px;}
  .mscat-axis-label{fill:var(--text-muted);font-size:10.5px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;}
  .mscat-dot{stroke:var(--surface);stroke-width:1.5;fill-opacity:0.9;}
  .mscat-dot.is-win{fill:var(--win);}
  .mscat-dot.is-draw{fill:var(--info);}
  .mscat-dot.is-loss{fill:var(--danger);}
  .mscat-legend{display:flex;gap:16px;justify-content:center;margin-top:12px;}
  .mscat-leg-item{display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:var(--text-muted);}
  .mscat-leg-dot{width:8px;height:8px;border-radius:50%;flex:none;display:inline-block;}
  .mscat-leg-dot.is-win{background:var(--win);}
  .mscat-leg-dot.is-draw{background:var(--info);}
  .mscat-leg-dot.is-loss{background:var(--danger);}
  @media (max-width:420px){
    .mscat-card{padding:14px 12px;}
    .mscat-preset-btn{font-size:11px;padding:5px 10px;}
    .mscat-axes-row{gap:12px;}
  }
