/* =============================================================================
   Bagel Bytes Scouting — styles.css
   Team 702 colors: primary #5bbde2 (cyan), secondary #ffc718 (yellow)
   Fonts: Orbitron (display/brand/stats) + Rajdhani (UI/body/tables)
   ========================================================================== */

/* ---- Tokens: DARK (default) ------------------------------------------------ */
:root {
  --primary:      #5bbde2;
  --primary-deep: #2a93c4;
  --secondary:    #ffc718;
  --secondary-deep:#d99e00;

  --bg:        #0a0e13;
  --bg-2:      #0e141c;
  --surface:   #141d27;
  --surface-2: #1b2734;
  --elevated:  #22303f;

  --text:      #e9f1f6;
  --text-dim:  #9fb2c0;
  --text-mut:  #6d8291;

  --border:    #24333f;
  --border-strong: #33475a;

  --on-primary:   #06131a;
  --on-secondary: #1a1400;

  --success: #4ade80;
  --warning: #fbbf24;
  --danger:  #f87171;

  --ring: var(--primary);
  --shadow: 0 8px 30px rgba(0,0,0,.45);
  --radius: 14px;
  --radius-sm: 9px;

  --font-display: "Orbitron", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Rajdhani", ui-sans-serif, system-ui, "Segoe UI", sans-serif;

  --sidebar-w: 248px;
  --content-max: 1600px;
  color-scheme: dark;
}

/* ---- Tokens: LIGHT --------------------------------------------------------- */
:root[data-theme="light"] {
  --primary:      #1f8fbf;
  --primary-deep: #14688c;
  --secondary:    #d99e00;
  --secondary-deep:#a87b00;

  --bg:        #eef4f8;
  --bg-2:      #e4edf3;
  --surface:   #ffffff;
  --surface-2: #f4f8fb;
  --elevated:  #ffffff;

  --text:      #0c1922;
  --text-dim:  #40566380;
  --text-dim:  #435866;
  --text-mut:  #6a808e;

  --border:    #d5e2ea;
  --border-strong: #b9cddb;

  --on-primary:   #ffffff;
  --on-secondary: #241a00;

  --shadow: 0 6px 22px rgba(31,110,150,.12);
  color-scheme: light;
}

/* ---- Reset / base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--secondary) 8%, transparent), transparent 55%);
  background-attachment: fixed;
}
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: .02em; margin: 0 0 .4em; line-height: 1.15; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em; }
h3 { font-size: 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: var(--font-ui); }
::selection { background: var(--primary); color: var(--on-primary); }

/* ---- Alliance selection board -------------------------------------------- */
.alliance-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
/* Let the wide alliance table scroll inside its own wrapper instead of forcing the
   grid column past the viewport (which caused horizontal page scroll on mobile). */
.alliance-layout > * { min-width: 0; }
@media (max-width: 900px) { .alliance-layout { grid-template-columns: 1fr; } }
.ab-wrap { padding: 8px; }
.ab-table { width: 100%; border-collapse: separate; border-spacing: 6px; }
.ab-table thead th { background: transparent; text-align: center; padding: 4px; border: none;
  font-family: var(--font-display); font-size: .68rem; letter-spacing: .06em; color: var(--text-dim); position: static; }
.ab-table td { padding: 0; border: none; }
.ab-num { font-family: var(--font-display); font-weight: 800; color: var(--secondary); text-align: center; width: 28px; }
.ab-slot { height: 52px; border-radius: var(--radius-sm); text-align: center; vertical-align: middle; }
.ab-slot.empty { border: 1.5px dashed var(--border-strong); color: var(--text-mut); font-size: 1.2rem; cursor: pointer; }
.ab-slot.empty:hover { border-color: var(--primary); }
.ab-slot.empty.target { border-color: var(--secondary); border-style: solid;
  color: var(--secondary); background: color-mix(in srgb, var(--secondary) 12%, transparent); font-weight: 800; }
.ab-slot.over { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 14%, transparent); }
.ab-slot.filled { position: relative; border: 1.5px solid var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  cursor: grab; padding: 4px 6px; text-align: center; white-space: nowrap; }
.ab-slot.filled .team-avatar { width: 28px; height: 28px; vertical-align: middle; margin-right: 5px; }
.ab-slot .ab-team { font-family: var(--font-display); font-weight: 800; font-size: .92rem; vertical-align: middle; }
.slot-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border: none; border-radius: 5px;
  background: color-mix(in srgb, var(--danger) 20%, transparent); color: var(--danger); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.slot-x .ico { width: 12px; height: 12px; }

.pool-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pool-filters select, .pool-filters input { width: auto; min-width: 120px; min-height: 38px; padding: 6px 10px; font-size: .85rem; }
.pool-list { display: flex; flex-direction: column; gap: 7px; max-height: 560px; overflow-y: auto; }
.pool-team { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface-2); cursor: grab; transition: border-color .15s, transform .15s; }
.pool-team:hover { border-color: var(--primary); }
.pool-team.sel { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 14%, var(--surface-2)); }
.pool-team.dragging { opacity: .4; }
.pool-team .team-avatar { width: 34px; height: 34px; }
.pool-team .pt-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pool-team .pt-num { font-family: var(--font-display); font-weight: 800; }
.pool-team .pt-name { font-size: .78rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-team .pt-epa { font-family: var(--font-display); font-weight: 800; color: var(--primary); font-size: .95rem; }
.pool-team .pt-dnp { width: 26px; height: 26px; border: none; border-radius: 6px; background: transparent; color: var(--text-mut); cursor: pointer; flex: none; }
.pool-team .pt-dnp:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.pool-team .pt-dnp .ico { width: 15px; height: 15px; }
/* "+" add-to-slot button — the primary way to place a team on touch devices. */
.pt-add, .tt-add { flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; border-radius: 8px; color: #10233a;
  background: var(--secondary); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.pt-add { width: 30px; height: 30px; }
.tt-add { width: 26px; height: 26px; border-radius: 6px; }
.pt-add .ico, .tt-add .ico { width: 17px; height: 17px; }
.tt-add .ico { width: 15px; height: 15px; }
.pt-add:hover, .tt-add:hover { filter: brightness(1.08); }
.pt-add:active, .tt-add:active { transform: translateY(1px); }
.tier-team.sel { outline: 2px solid var(--secondary); outline-offset: 1px; }
/* "Placing team X" instruction banner (shown after tapping +). */
.place-banner { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--secondary) 16%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--secondary) 45%, var(--border));
  color: var(--text); font-size: .9rem; }
.place-banner b { color: var(--secondary); font-family: var(--font-display); }
.link-btn { background: none; border: none; padding: 0; color: var(--primary);
  font: inherit; cursor: pointer; text-decoration: underline; }

.dnp-zone { display: flex; flex-direction: column; gap: 6px; min-height: 48px; border-radius: var(--radius-sm); }
.dnp-zone.over { outline: 2px dashed var(--danger); outline-offset: 2px; }
.dnp-item { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); cursor: pointer; }
.dnp-item .team-avatar { width: 24px; height: 24px; }
.dnp-item span { font-family: var(--font-display); font-weight: 700; flex: 1; }

/* Match scouting — robot picker (live mode) */
.robot-picker { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.robot-group .rg-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); margin-bottom: 6px; display: flex; align-items: center; }
.robot-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.robot-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 10px 6px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong); background: var(--surface-2);
  color: var(--text); cursor: pointer; transition: transform .18s cubic-bezier(.34,1.7,.5,1), border-color .15s ease; }
.robot-pick:hover { transform: translateY(-2px); border-color: var(--primary); }
.robot-pick.sel { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 16%, var(--surface-2)); }
.robot-pick .team-avatar { width: 40px; height: 40px; }
.robot-pick .rp-num { font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
.robot-pick .rp-name { font-size: .74rem; color: var(--text-dim); line-height: 1.1; max-height: 2.2em; overflow: hidden; }
@media (max-width: 560px) { .robot-pick .rp-name { display: none; } }

/* Team avatars (TBA) */
.team-avatar { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex: none;
  background: var(--surface-2); border: 1px solid var(--border); vertical-align: middle; }
.team-avatar.no-avatar { opacity: .5; }
.lb-team { display: inline-flex; align-items: center; gap: 8px; }
.lb-team .team-chip { margin-right: 0; }
.tc-avatar { width: 46px; height: 46px; border-radius: 9px; }

/* Theme-swapped logos: white logo in dark mode, black logo in light mode */
.logo-light { display: none; }
.logo-dark { display: block; }
:root[data-theme="light"] .logo-light { display: block; }
:root[data-theme="light"] .logo-dark { display: none; }

/* Focus visibility (accessibility) */
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

/* ---- App shell ------------------------------------------------------------ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 14px; gap: 6px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 6px 14px; }
.brand img { width: 46px; height: 46px; object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand .team { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  color: var(--text); letter-spacing: .01em; }
.brand .team .team-accent { color: var(--secondary); }
.brand .sub { font-size: .72rem; color: var(--text-mut); text-transform: uppercase; letter-spacing: .14em; }

.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav .nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--text-mut); padding: 12px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; transition: all .15s ease; text-decoration: none;
  cursor: pointer;
}
.nav a .ico { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  color: var(--text);
}
.nav a.active .ico { color: var(--primary); }

.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; }
.event-chip { font-size: .8rem; color: var(--text-dim); padding: 8px 10px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.event-chip b { color: var(--secondary); font-family: var(--font-display); }
.event-chip .ec-season { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut); }
.event-chip .ec-season.alt { color: var(--primary); }

/* Settings → Season tiles */
.season-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.season-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; min-height: 112px;
  border-radius: var(--radius); border: 1.5px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  cursor: pointer; text-align: left; font: inherit; transition: border-color .2s ease, transform .15s ease, background .2s ease; }
.season-tile:hover { border-color: var(--primary); transform: translateY(-2px); }
.season-tile .st-year { font-family: var(--font-display); font-weight: 900; font-size: 2rem; line-height: 1; }
.season-tile .st-name { font-family: var(--font-display); font-weight: 700; font-size: .85rem; letter-spacing: .14em; color: var(--text-dim); }
.season-tile .st-state { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; color: var(--text-mut); }
.season-tile .st-state .ico { width: 16px; height: 16px; }
.season-tile.on { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 10%, var(--surface-2)); cursor: default; transform: none; }
.season-tile.on .st-year { color: var(--secondary); }
.season-tile.on .st-state { color: var(--secondary); }

/* ---- Main / topbar -------------------------------------------------------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 26px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  /* keep the bar's contents aligned with the centered content column */
  max-width: var(--content-max); width: 100%; margin: 0 auto;
}
.topbar .menu-btn { display: none; }
.topbar h1 { margin: 0; font-size: 1.25rem; }
.topbar .spacer { flex: 1; }
.topbar .scout-tag { font-size: .82rem; color: var(--text-dim); }
.topbar .scout-tag b { color: var(--text); }

.content { padding: 24px 32px 90px; max-width: var(--content-max); width: 100%; margin: 0 auto; }

/* ---- Cards / grid --------------------------------------------------------- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1.5px solid color-mix(in srgb, var(--primary) 40%, var(--border));
  border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--primary) 60%, var(--border)); }
/* nested / secondary cards: quieter border, no shadow */
.card.flush { border-color: var(--border); box-shadow: none; background: var(--surface-2); }
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.section { margin-bottom: 26px; }
.section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; flex-wrap: wrap; }

/* ---- KPI tiles ------------------------------------------------------------ */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .kpi-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-mut); }
.kpi .kpi-value { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--text);
  font-variant-numeric: tabular-nums; }
.kpi .kpi-value.cyan { color: var(--primary); }
.kpi .kpi-value.yellow { color: var(--secondary); }
.kpi .kpi-sub { font-size: .8rem; color: var(--text-dim); }

/* ---- Buttons -------------------------------------------------------------- */
/* Bouncy easing shared by interactive controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1.5px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .95rem;
  cursor: pointer; text-transform: uppercase; letter-spacing: .04em; min-height: 44px;
  transition: transform .24s cubic-bezier(.34,1.7,.5,1), box-shadow .2s ease,
              background .16s ease, border-color .16s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); border-color: var(--primary); background: var(--elevated); }
.btn:active { transform: translateY(1px) scale(.97); transition-duration: .07s; }
.btn .ico { width: 18px; height: 18px; }

/* Primary = bagel yellow, with the layered "sit-on-the-page" depth */
.btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--secondary) 90%, white), var(--secondary));
  color: var(--on-secondary); border-color: transparent;
  box-shadow: 0 4px 0 var(--secondary-deep), 0 10px 20px -8px color-mix(in srgb, var(--secondary) 65%, transparent);
}
.btn.primary:hover { transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--secondary-deep), 0 18px 28px -10px color-mix(in srgb, var(--secondary) 70%, transparent); }
.btn.primary:active { transform: translateY(2px) scale(.99);
  box-shadow: 0 1px 0 var(--secondary-deep), 0 6px 12px -8px color-mix(in srgb, var(--secondary) 55%, transparent); }

/* Secondary = cyan/blue, same depth treatment */
.btn.secondary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 90%, white), var(--primary));
  color: var(--on-primary); border-color: transparent;
  box-shadow: 0 4px 0 var(--primary-deep), 0 10px 20px -8px color-mix(in srgb, var(--primary) 60%, transparent);
}
.btn.secondary:hover { transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--primary-deep), 0 18px 28px -10px color-mix(in srgb, var(--primary) 65%, transparent); }
.btn.secondary:active { transform: translateY(2px) scale(.99);
  box-shadow: 0 1px 0 var(--primary-deep), 0 6px 12px -8px color-mix(in srgb, var(--primary) 50%, transparent); }

.btn.ghost { background: transparent; box-shadow: none;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border-strong)); }
.btn.ghost:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); border-color: var(--primary); }
.btn.danger { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); box-shadow: none; background: transparent; }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 16%, transparent); }
.btn.sm { padding: 7px 13px; min-height: 36px; font-size: .82rem; border-radius: 10px; }
.btn.sm.primary, .btn.sm.secondary { box-shadow: 0 3px 0 var(--secondary-deep); }
.btn.sm.secondary { box-shadow: 0 3px 0 var(--primary-deep); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Forms ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: .9rem; color: var(--text); letter-spacing: .02em; }
.field .help { display: block; font-size: .8rem; color: var(--text-mut); }
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
/* Toggle fields stack the switch UNDER the label/help text (not off to the side). */
.field.bool-field { align-items: flex-start; gap: 8px; }
.field.bool-field .switch { margin-top: 2px; }
input[type="text"], input[type="number"], input[type="password"], input[type="search"],
select, textarea {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text);
  font-family: var(--font-ui); font-size: 1rem; min-height: 44px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 20px; }

/* Toggle switch */
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: var(--elevated);
  border: 1px solid var(--border-strong); border-radius: 999px; transition: .2s; }
.switch .slider::before { content:""; position:absolute; height:22px; width:22px; left:3px; top:3px;
  background: var(--text-dim); border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(22px); background: var(--primary); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent); }

/* Counter (big +/- for fast pit-side entry) */
.counter { display: flex; align-items: center; gap: 10px; }
.counter button { width: 48px; height: 48px; border-radius: var(--radius-sm); font-size: 1.5rem;
  border: 1.5px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  cursor: pointer; font-family: var(--font-display); line-height: 1;
  transition: transform .22s cubic-bezier(.34,1.7,.5,1), border-color .16s, background .16s; }
.counter button:hover { border-color: var(--primary); transform: translateY(-2px); }
.counter button:active { transform: scale(.88); transition-duration:.07s; background: color-mix(in srgb, var(--primary) 14%, var(--surface-2)); }
.counter .count { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem;
  width: 72px; min-width: 60px; text-align: center; color: var(--secondary); font-variant-numeric: tabular-nums;
  background: var(--surface-2); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 6px 4px; -moz-appearance: textfield; min-height: 48px; }
.counter .count:focus { outline: none; border-color: var(--primary); }
.counter .count::-webkit-outer-spin-button, .counter .count::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Rating stars */
.rating { display: flex; gap: 6px; }
.rating .star { width: 34px; height: 34px; cursor: pointer; color: var(--border-strong); background: none; border: none; padding: 0; }
.rating .star.on { color: var(--secondary); }
.rating .star:hover { color: color-mix(in srgb, var(--secondary) 80%, white); }

/* ---- Tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
thead th { position: sticky; top: 0; background: var(--surface-2); text-align: left;
  padding: 12px 14px; font-family: var(--font-display); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-dim); border-bottom: 1px solid var(--border-strong); cursor: pointer; white-space: nowrap; }
thead th:hover { color: var(--primary); }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
tbody tr:last-child td { border-bottom: none; }
td .team-num { font-family: var(--font-display); font-weight: 700; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---- Badges / chips ------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-dim); }
.badge.cyan { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 50%, transparent);
  background: color-mix(in srgb, var(--primary) 12%, transparent); }
.badge.yellow { color: var(--secondary); border-color: color-mix(in srgb, var(--secondary) 50%, transparent);
  background: color-mix(in srgb, var(--secondary) 12%, transparent); }
.badge.red { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent); }
.badge.green { color: var(--success); border-color: color-mix(in srgb, var(--success) 50%, transparent);
  background: color-mix(in srgb, var(--success) 12%, transparent); }
.badge.dot::before { content:""; width:7px; height:7px; border-radius:50%; background: currentColor; }

.alliance-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align: middle; }
.alliance-red { background:#f2555a; } .alliance-blue { background:#4d8bf0; }

/* Team color swatch (from frc-colors) */
.swatch { display:inline-flex; border-radius:5px; overflow:hidden; border:1px solid var(--border-strong);
  width: 34px; height: 18px; vertical-align: middle; }
.swatch i { display:block; width:50%; height:100%; }

/* ---- Team cards (event roster) -------------------------------------------- */
.team-card { display:flex; flex-direction: column; gap: 8px; cursor: pointer; }
.team-card:hover { transform: translateY(-3px); border-color: var(--primary);
  box-shadow: 0 14px 26px -12px rgba(0,0,0,.55); }
.team-card .tc-top { display:flex; align-items:center; gap:10px; }
.team-card .tc-bar { height: 6px; border-radius: 999px; background: var(--border); overflow:hidden; display:flex; }
.team-card .tc-num { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.team-card .tc-name { color: var(--text-dim); font-size: .9rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.team-card .tc-meta { display:flex; gap:6px; flex-wrap:wrap; margin-top: 2px; }
.team-card .tc-epa { display:flex; align-items:baseline; gap:8px; margin-top: 8px;
  padding: 8px 12px; border-radius: 12px; background: rgba(91,189,226,.12);
  border: 1px solid rgba(91,189,226,.35); }
.team-card .tc-epa-label { font-family: var(--font-display); font-weight: 700; font-size: .7rem;
  letter-spacing: .08em; color: var(--primary); text-transform: uppercase; }
.team-card .tc-epa-val { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  line-height: 1; color: var(--text); margin-left: auto; }

/* ---- Pick list ------------------------------------------------------------ */
.pick-cols { display:grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.pick-list { display:flex; flex-direction: column; gap: 8px; min-height: 60px; }
.pick-item { display:flex; align-items:center; gap:10px; padding:10px 12px; background: var(--surface-2);
  border:1px solid var(--border); border-radius: var(--radius-sm); cursor: grab; }
.pick-item.dragging { opacity:.4; }
.pick-item.over { border-color: var(--primary); }
.pick-item .rank { font-family: var(--font-display); font-weight:800; color: var(--secondary); width: 28px; text-align:center; }
.pick-item .pi-team { font-family: var(--font-display); font-weight:700; }
.pick-item .pi-name { color: var(--text-dim); font-size:.85rem; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dropzone { border:2px dashed var(--border-strong); border-radius: var(--radius); padding:14px; }
.dropzone.dnp { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

/* ---- Empty states / helpers ---------------------------------------------- */
.empty { text-align:center; color: var(--text-mut); padding: 40px 20px; }
.empty .ico { width: 46px; height: 46px; opacity:.5; margin-bottom: 10px; }
.muted { color: var(--text-mut); }
.hint { font-size:.85rem; color: var(--text-dim); }
.row { display:flex; gap:10px; align-items:center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.divider { height:1px; background: var(--border); margin: 16px 0; }
.pill-toggle { display:inline-flex; background: var(--bg-2); border:1px solid var(--border-strong); border-radius:999px; padding:3px; }
.pill-toggle button { border:none; background:none; color: var(--text-dim); padding:6px 14px; border-radius:999px; cursor:pointer; font-weight:700; font-size:.85rem; }
.pill-toggle button.on { background: var(--primary); color: var(--on-primary); }

/* ---- Toast ---------------------------------------------------------------- */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100;
  display:flex; flex-direction: column; gap:8px; align-items:center; }
.toast { background: var(--elevated); border:1px solid var(--border-strong); color: var(--text);
  padding: 12px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-weight:600;
  display:flex; align-items:center; gap:10px; animation: toastin .25s ease; max-width: 92vw; }
.toast.ok { border-color: color-mix(in srgb, var(--success) 60%, transparent); }
.toast.err { border-color: color-mix(in srgb, var(--danger) 60%, transparent); }
@keyframes toastin { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- Modal ---------------------------------------------------------------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  display:flex; align-items:center; justify-content:center; z-index: 90; padding: 18px; }
.modal { background: var(--surface); border:1px solid var(--border-strong); border-radius: var(--radius);
  max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal .modal-head { display:flex; align-items:center; justify-content:space-between; padding:18px 20px;
  border-bottom:1px solid var(--border); position: sticky; top:0; background: var(--surface); }
.modal .modal-body { padding: 20px; }
.modal .x { background:none; border:none; color: var(--text-dim); cursor:pointer; width:36px; height:36px; border-radius:8px; }
.modal .x:hover { background: var(--surface-2); color: var(--text); }

/* ---- Progress bar (RP thresholds) ---------------------------------------- */
.meter { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; border:1px solid var(--border); }
.meter > i { display:block; height:100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); }

/* ---- Mobile nav (hidden on desktop) --------------------------------------- */
.scrim { display:none; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 1200px) {
  .grid.cols-4 { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 980px) {
  .grid.cols-4 { grid-template-columns: repeat(2,1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2,1fr); }
  .pick-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 82%; max-width: 300px;
    height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; padding-bottom: 28px;
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display:block; position: fixed; inset:0; background: rgba(0,0,0,.5); z-index: 50;
    overscroll-behavior: contain; touch-action: none; }
  /* lock the page behind the open drawer so dragging scrolls the drawer, not the page */
  body.nav-lock { overflow: hidden; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 16px 16px 96px; }
  .topbar { padding: 12px 16px; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  /* keep the card wall two-up on phones instead of one giant column */
  .grid.auto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  h1 { font-size: 1.2rem; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .grid.auto { grid-template-columns: 1fr; }
}

/* Icon-button (needs aria-label in markup) */
.icon-btn { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px;
  border-radius: var(--radius-sm); border:1.5px solid var(--border-strong); background: var(--surface-2);
  color: var(--text); cursor:pointer; flex:none;
  transition: transform .24s cubic-bezier(.34,1.7,.5,1), border-color .16s ease, background .16s ease; }
.icon-btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.9); transition-duration:.07s; }
.icon-btn.sm { width:32px; height:32px; }
.icon-btn.sm .ico { width:16px; height:16px; }
.icon-btn .ico { width:20px; height:20px; }
.ico { display:inline-block; width:20px; height:20px; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* ---- Auth screen (log in / register / approval / password) ---------------- */
.auth-screen { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; overflow-y: auto; background-color: var(--bg);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--primary) 26%, transparent) 1px, transparent 1.6px);
  background-size: 26px 26px; animation: fadein .3s ease; }
.auth-screen.bye { animation: fadeout .26s ease forwards; }
.auth-card { position: relative; width: 100%; max-width: 440px; margin: auto; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 22px; padding: 30px 26px 22px; overflow: hidden;
  box-shadow: 0 30px 80px -24px rgba(0,0,0,.6); }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--secondary); }
.auth-card.shake { animation: shake .4s cubic-bezier(.36,.07,.19,.97); }
.auth-card.auth-done { animation: authDone .5s cubic-bezier(.2,.8,.2,1) forwards; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-logo { width: 58px; height: 58px; object-fit: contain; display: none; flex: none; }
:root:not([data-theme="light"]) .auth-logo.logo-dark, :root[data-theme="light"] .auth-logo.logo-light { display: block; }
.auth-title { font-family: var(--font-display); font-weight: 900; font-size: 1.55rem; margin: 0; line-height: 1.1; }
.auth-title span { color: var(--secondary); }
.auth-tag { margin: 4px 0 0; font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mut); }

.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 20px;
  border-radius: 13px; background: var(--bg-2); border: 1px solid var(--border); }
.auth-tabs button { position: relative; z-index: 1; min-height: 42px; border: 0; background: none; border-radius: 9px; cursor: pointer;
  color: var(--text-dim); font-family: var(--font-display); font-weight: 800; font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; transition: color .25s; }
.auth-tabs button:hover { color: var(--text); }
.auth-tabs button.on { color: var(--on-primary); }
.auth-tab-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px;
  background: var(--primary); transition: transform .38s cubic-bezier(.2,.8,.2,1); }
.auth-tab-pill.right { transform: translateX(100%); }

.auth-view { animation: authIn .38s cubic-bezier(.2,.8,.2,1) both; }
.auth-view.from-right { animation-name: authInRight; }
.auth-view.from-left { animation-name: authInLeft; }
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-lead { margin: 0; color: var(--text-dim); font-size: 1rem; line-height: 1.45; }
.auth-lead b { color: var(--text); }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .auth-row { grid-template-columns: 1fr; } }
.auth-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.auth-label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input > .ico { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--text-mut); pointer-events: none; transition: color .2s; }
.auth-input:focus-within > .ico { color: var(--primary); }
.auth-input input { min-height: 50px; padding-left: 42px; border-radius: 12px; font-size: 1.05rem; font-weight: 600; }
.auth-input:has(.auth-eye) input { padding-right: 46px; }
.auth-eye { position: absolute; right: 6px; width: 38px; height: 38px; border: 0; border-radius: 9px; background: none;
  color: var(--text-mut); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.auth-eye:hover { color: var(--text); background: var(--surface-2); }
.auth-eye .ico { width: 18px; height: 18px; }

.auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 4px;
  border: 0; border-radius: 13px; cursor: pointer; background: var(--secondary); color: var(--on-secondary);
  font-family: var(--font-display); font-weight: 800; font-size: .9rem; letter-spacing: .07em; text-transform: uppercase;
  box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--secondary) 90%, transparent);
  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease; }
.auth-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.auth-btn:active { transform: translateY(1px) scale(.99); }
.auth-btn .ico { width: 18px; height: 18px; transition: transform .2s ease; }
.auth-btn:hover .ico { transform: translateX(3px); }
.auth-btn:disabled { cursor: progress; transform: none; filter: saturate(.7) brightness(.92); }
.auth-btn.loading .ico { display: none; }
.auth-btn.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: authSpin .7s linear infinite; }
.auth-btn:focus-visible, .auth-tabs button:focus-visible, .auth-link:focus-visible, .auth-eye:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; }
.auth-link { align-self: center; border: 0; background: none; cursor: pointer; padding: 8px 10px; border-radius: 8px;
  color: var(--text-dim); font: inherit; font-weight: 700; font-size: .9rem; }
.auth-link:hover { color: var(--primary); }
.auth-inline { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; }
.auth-micro { margin: 0; font-size: .86rem; color: var(--text-mut); text-align: center; }
.auth-note { padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .92rem;
  background: color-mix(in srgb, var(--primary) 14%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent); }
.auth-error { padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); }

.auth-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.auth-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); }
.auth-steps li::before { content: ""; position: absolute; top: 16px; left: -50%; right: 50%; height: 2px; background: var(--border-strong);
  transition: background .4s ease; }
.auth-steps li:first-child::before { display: none; }
.auth-steps li.on::before, .auth-steps li.done::before { background: var(--secondary); }
.auth-step-dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; background: var(--bg-2); border: 2px solid var(--border-strong);
  font-family: var(--font-display); font-weight: 800; font-size: .85rem; transition: all .35s ease; }
.auth-step-dot .ico { width: 16px; height: 16px; stroke-width: 3; }
.auth-steps li.on { color: var(--text); }
.auth-steps li.on .auth-step-dot { border-color: var(--secondary); color: var(--secondary);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--secondary) 18%, transparent); }
.auth-steps li.done { color: var(--text-dim); }
.auth-steps li.done .auth-step-dot { background: var(--secondary); border-color: var(--secondary); color: var(--on-secondary); }

.auth-wait { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding-top: 4px; }
.auth-wait .login-pending { margin: 0; }
.auth-h { font-family: var(--font-display); font-size: 1.15rem; margin: 0; }
.auth-radar { position: relative; width: 78px; height: 78px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--secondary); background: color-mix(in srgb, var(--secondary) 14%, var(--surface));
  border: 2px solid color-mix(in srgb, var(--secondary) 60%, transparent); }
.auth-radar .ico { width: 32px; height: 32px; animation: authBell 2.4s ease-in-out infinite; transform-origin: 50% 15%; }
.auth-radar::before, .auth-radar::after { content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--secondary); opacity: 0; animation: authPulse 2.4s ease-out infinite; }
.auth-radar::after { animation-delay: 1.2s; }
.auth-burst { width: 78px; height: 78px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--success); color: #062413; animation: authPop .55s cubic-bezier(.2,1.5,.4,1) both; }
.auth-burst .ico { width: 38px; height: 38px; stroke-width: 3; }
.auth-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; margin-bottom: 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary);
  font-family: var(--font-display); font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.auth-badge .ico { width: 16px; height: 16px; }
.auth-who { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--border); font-family: var(--font-display); font-weight: 700; }
.auth-who .ico { width: 18px; height: 18px; color: var(--primary); flex: none; }
.auth-reqs { list-style: none; margin: -2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.auth-reqs li { display: flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 600; color: var(--text-mut); transition: color .2s; }
.auth-reqs li .ico { width: 17px; height: 17px; padding: 2px; border-radius: 50%; border: 1.5px solid currentColor; stroke-width: 3; transition: all .2s; }
.auth-reqs li.ok { color: var(--success); }
.auth-reqs li.ok .ico { background: var(--success); border-color: var(--success); color: #062413; }

@keyframes authIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes authInRight { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes authInLeft { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes authPulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes authBell { 0%, 55%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
@keyframes authPop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes authSpin { to { transform: rotate(360deg); } }
@keyframes authDone { to { transform: scale(1.03); opacity: .0; } }
@media (prefers-reduced-motion: reduce) {
  .auth-view, .auth-radar .ico, .auth-radar::before, .auth-radar::after, .auth-burst, .auth-card.auth-done { animation: none !important; }
  .auth-tab-pill { transition: none; }
}
.login-error { display: block; background: color-mix(in srgb, var(--danger) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger);
  padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: .88rem; margin-bottom: 12px; }
.login-pending { display: block; background: color-mix(in srgb, var(--secondary) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--secondary) 55%, transparent); color: color-mix(in srgb, var(--secondary) 85%, var(--text));
  padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: .88rem; margin-bottom: 12px; text-align: left; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes shake { 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)}
  30%,50%,70%{transform:translateX(-5px)} 40%,60%{transform:translateX(5px)} }

/* ---- Admin panel ---------------------------------------------------------- */
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
  padding: 0 5px; margin-left: auto; border-radius: 999px; background: var(--secondary); color: var(--on-secondary);
  font-family: var(--font-display); font-weight: 800; font-size: .72rem; }
.request-banner { border-color: color-mix(in srgb, var(--secondary) 55%, var(--border)) !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--secondary) 12%, var(--surface)), var(--surface-2)); }
.request-banner .ico { color: var(--secondary); width: 24px; height: 24px; }
.req-list { display: flex; flex-direction: column; gap: 10px; }
.req-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.req-item .ico { color: var(--primary); }

/* ---- User chip (sidebar) -------------------------------------------------- */
.user-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .86rem; font-weight: 600; }
.user-chip .ico { width: 18px; height: 18px; color: var(--primary); flex: none; }
.user-chip span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip #userChipName { cursor: pointer; }
.user-chip #userChipName:hover { text-decoration: underline; color: var(--primary); }

/* ---- BagelStats leaderboard ---------------------------------------------- */
table.lb tbody tr { cursor: pointer; }
table.lb .team-chip { display: inline-block; min-width: 54px; text-align: center; padding: 4px 9px;
  border-radius: 8px; background: var(--surface); border: 1px solid var(--border-strong);
  font-family: var(--font-display); font-weight: 800; font-size: .85rem; margin-right: 9px; vertical-align: middle;
  transition: background .2s ease, color .2s ease; }
table.lb .rank-cell { font-family: var(--font-display); font-weight: 800; color: var(--text-dim); }
table.lb .epa-cell { font-family: var(--font-display); font-weight: 800; color: var(--primary); }
.lb-name { font-size: .9rem; }
tr.focus-row { background: color-mix(in srgb, var(--secondary) 18%, transparent) !important;
  outline: 2px solid var(--secondary); outline-offset: -2px; }
@media (max-width: 640px) { .hide-sm { display: none; } .lb-name { display: none; } }

/* EPA card in the team modal */
.epa-card { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.epa-ranks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.epa-rank { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; position: relative;
  padding: 12px 40px 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); cursor: pointer;
  transition: transform .2s cubic-bezier(.34,1.7,.5,1), border-color .16s ease; }
.epa-rank:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--primary); }
.epa-rank:disabled { opacity: .55; cursor: default; }
.epa-rank .er-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mut);
  display: flex; align-items: center; gap: 5px; }
.epa-rank .er-label .ico { width: 14px; height: 14px; }
.epa-rank .er-val { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--primary); }
.epa-rank .er-sub { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-mut); }
.epa-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.epa-mode { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; text-align: center; }
.epa-mode .em-label { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mut); margin-bottom: 4px; }
.epa-mode .em-val { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--secondary); }
@media (max-width: 520px) { .epa-ranks, .epa-modes { grid-template-columns: 1fr; } }

/* ---- Dashboard event hero ------------------------------------------------- */
.event-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.event-hero .eh-left { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.event-hero .eh-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-mut);
  display: flex; align-items: center; gap: 6px; }
.event-hero .eh-label .ico { width: 15px; height: 15px; color: var(--secondary); }
.event-hero .eh-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--text); }
.event-hero .eh-btn { flex: none; }
@media (max-width: 560px) { .event-hero .eh-btn { width: 100%; } .event-hero .eh-name { font-size: 1.2rem; } }

/* clickable sidebar event chip */
.event-chip.clickable { cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.event-chip.clickable:hover { border-color: var(--primary); }
.event-chip.clickable:hover b { text-decoration: underline; }

/* ---- Event picker modal --------------------------------------------------- */
.ep-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.ep-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 11px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); cursor: pointer;
  transition: transform .18s cubic-bezier(.34,1.7,.5,1), border-color .15s ease; }
.ep-item:hover { transform: translateY(-2px); border-color: var(--primary); }
.ep-item .ep-name { font-weight: 700; }
.ep-item .ep-meta { font-size: .8rem; color: var(--text-mut); }
.ep-row { display: flex; gap: 8px; align-items: stretch; }
.ep-row .ep-item { flex: 1; }
.ep-row.live .ep-item { border-color: color-mix(in srgb, var(--success) 55%, transparent);
  background: color-mix(in srgb, var(--success) 10%, var(--surface-2)); }
.ep-row.pinned .ep-item { border-color: color-mix(in srgb, var(--secondary) 55%, transparent);
  background: color-mix(in srgb, var(--secondary) 10%, var(--surface-2)); }
.ep-pinmark .ico { width: 13px; height: 13px; color: var(--secondary); fill: var(--secondary); vertical-align: -1px; margin-right: 3px; }
.ep-pin { flex: none; width: 44px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-mut); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .2s cubic-bezier(.34,1.7,.5,1), color .15s, border-color .15s; }
.ep-pin:hover { transform: translateY(-2px); border-color: var(--secondary); color: var(--secondary); }
.ep-pin.on { color: var(--secondary); border-color: var(--secondary); }
.ep-pin.on .ico { fill: var(--secondary); }
.ep-pin .ico { width: 18px; height: 18px; }

/* ---- Dashboard countdowns (carousel) ------------------------------------- */
.cd-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  overflow: hidden; border-color: color-mix(in srgb, var(--secondary) 40%, var(--border)); padding-left: 24px; }
.cd-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--secondary); }
.cd-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cd-info { flex: 1 1 260px; min-width: 0; }
.cd-slide { display: flex; flex-direction: column; gap: 3px; }
.cd-label { display: flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-mut); }
.cd-label .ico { width: 15px; height: 15px; color: var(--secondary); }
.cd-count { margin-left: 2px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-dim);
  font-family: var(--font-display); font-size: .64rem; letter-spacing: .06em; }
.cd-event { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; line-height: 1.2; color: var(--text); }
.cd-sub { color: var(--text-dim); font-weight: 600; }
.cd-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-mut); font-size: .88rem; font-weight: 600; }
.cd-meta .ico { width: 14px; height: 14px; }
.cd-dots { display: flex; gap: 6px; margin-top: 10px; }
.cd-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; background: var(--border-strong);
  transition: width .3s ease, background .3s ease; }
.cd-dot:hover { background: var(--text-mut); }
.cd-dot.on { width: 24px; background: var(--secondary); }
.cd-right { display: flex; align-items: center; gap: 10px; }
.cd-arrow { width: 42px; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.cd-arrow:hover { border-color: var(--secondary); color: var(--secondary); transform: translateY(-1px); }
.cd-arrow:active { transform: scale(.94); }
.cd-arrow .ico { width: 20px; height: 20px; }
.cd-num { min-width: 150px; }
.cd-num .cd-slide { align-items: center; gap: 2px; }
.cd-days { font-family: var(--font-display); font-weight: 900; font-size: 3.1rem; line-height: 1; color: var(--secondary);
  font-variant-numeric: tabular-nums; }
.cd-unit { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.cd-clock { margin-top: 4px; font-family: var(--font-display); font-size: .8rem; letter-spacing: .06em; color: var(--text-mut);
  font-variant-numeric: tabular-nums; }
.cd-in-right { animation: cdInRight .45s cubic-bezier(.2,.8,.2,1) both; }
.cd-in-left { animation: cdInLeft .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cdInRight { from { opacity: 0; transform: translateX(38px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes cdInLeft { from { opacity: 0; transform: translateX(-38px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 560px) { .cd-right { width: 100%; justify-content: space-between; } }
@media (prefers-reduced-motion: reduce) { .cd-in-right, .cd-in-left { animation: none; } .cd-dot { transition: none; } }

/* ---- Team detail grid spacing (Match performance / Pit scouting) ---------- */
.team-detail-grid { gap: 16px; margin-top: 16px; }

/* ---- Nexus pit map -------------------------------------------------------- */
.pit-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 4px; }
.pit-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 62px; border-radius: var(--radius-sm); cursor: pointer; padding: 8px 6px;
  border: 1.5px solid transparent; font-family: var(--font-display); font-weight: 800;
  transition: transform .18s cubic-bezier(.34,1.7,.5,1), filter .15s ease; }
.pit-cell:hover { transform: translateY(-2px); filter: brightness(1.1); }
.pit-cell .pc-team { font-size: 1.05rem; }
.pit-cell .pc-addr { font-family: var(--font-ui); font-weight: 600; font-size: .72rem; opacity: .8; }
/* Scouted = 702 blue, Not-yet = red — easy to tell apart */
.pit-cell.done { background: color-mix(in srgb, var(--primary) 30%, var(--surface));
  border-color: var(--primary); color: var(--primary); }
.pit-cell.todo { background: color-mix(in srgb, #ff5a5f 22%, var(--surface));
  border-color: #ff5a5f; color: #ff7377; }
:root[data-theme="light"] .pit-cell.done { color: var(--primary-deep); }
:root[data-theme="light"] .pit-cell.todo { color: #c0392b; background: color-mix(in srgb, #ff5a5f 16%, #fff); }

/* ---- Sortable leaderboard headers ---------------------------------------- */
table.lb th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.lb th.sortable:hover { color: var(--primary); }

/* ---- EPA trend line chart ------------------------------------------------- */
.epa-trend { margin-top: 4px; }
.epa-chart { width: 100%; height: auto; display: block; }
.epa-chart .cp { fill: none; stroke: var(--primary); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.epa-chart .ca { fill: color-mix(in srgb, var(--primary) 16%, transparent); stroke: none; }
.epa-chart .cd { fill: var(--secondary); }
.epa-chart .cg { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.epa-chart .cl { fill: var(--text-mut); font-size: 10px; font-family: var(--font-ui); }

/* ===========================================================================
   Subtabs (Members / Pick List / Data viewer)
   ======================================================================== */
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px; width: fit-content; max-width: 100%; }
.subtabs a, .subtabs button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: .82rem; letter-spacing: .02em;
  color: var(--text-dim); background: transparent; border: none; cursor: pointer; text-decoration: none; transition: color .15s ease, background .15s ease; }
.subtabs a:hover, .subtabs button:hover { color: var(--text); }
.subtabs a.on, .subtabs button.on { color: var(--on-primary); background: var(--primary); }
.subtabs.inline { margin-bottom: 0; }

/* ---- Consolidated multiselect trait filter -------------------------------- */
.filter-multi { position: relative; }
.filter-multi > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong); background: var(--surface-2);
  color: var(--text); font-family: var(--font-ui); font-weight: 600; font-size: .9rem; }
.filter-multi > summary::-webkit-details-marker { display: none; }
.filter-multi[open] > summary { border-color: var(--primary); }
.filter-multi .fm-panel { position: absolute; z-index: 40; left: 0; margin-top: 8px;
  min-width: 252px; max-width: min(320px, calc(100vw - 32px)); max-height: 340px; overflow-y: auto;
  background: var(--elevated); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28); padding: 8px; display: flex; flex-direction: column; gap: 2px;
  overscroll-behavior: contain; }
.filter-multi .fm-opt { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  cursor: pointer; font-size: .9rem; font-weight: 500; line-height: 1.25; color: var(--text-dim);
  transition: background .12s ease, color .12s ease; }
.filter-multi .fm-opt:hover { background: var(--surface); color: var(--text); }
.filter-multi .fm-opt:has(input:checked) { background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--text); font-weight: 600; }
.filter-multi .fm-opt input { appearance: none; -webkit-appearance: none; flex: none;
  width: 20px; height: 20px; min-width: 20px; min-height: 20px; max-width: 20px; padding: 0;
  border: 1.5px solid var(--border-strong); border-radius: 6px; background: var(--surface-2); cursor: pointer;
  position: relative; transition: background .12s ease, border-color .12s ease; }
.filter-multi .fm-opt input:checked { background: var(--primary); border-color: var(--primary); }
.filter-multi .fm-opt input:checked::after { content: ""; position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px; border: solid #0d2436; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.pool-team .pt-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; background: none; border: none; padding: 0; cursor: pointer; text-align: left; color: inherit; }
.pool-team.sel { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface-2)); }

/* ===========================================================================
   Tier list (S–F)
   ======================================================================== */
.tier-board { display: flex; flex-direction: column; gap: 8px; }
.tier-row { display: flex; align-items: stretch; gap: 0; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); min-height: 62px; }
.tier-row.over { outline: 2px dashed var(--primary); outline-offset: 1px; }
.tier-label { flex: none; width: 62px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: #08131a; }
.tier-slots { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; align-content: flex-start; min-height: 42px; cursor: pointer; }
.tier-row.static { background: transparent; border: none; min-height: 0; margin-bottom: 6px; }
.tier-row.static .tier-label { width: 40px; height: 40px; border-radius: 8px; font-size: 1.05rem; }
.tier-row.static .tier-slots { padding: 6px 10px; align-items: center; }
.tier-S .tier-label, .tier-S { }
.tier-label.tier-S { background: #ff5a68; }
.tier-label.tier-A { background: #ff9f43; }
.tier-label.tier-B { background: #ffd23f; }
.tier-label.tier-C { background: #7bd67b; }
.tier-label.tier-D { background: #5bbde2; }
.tier-label.tier-F { background: #9aa7b2; }
.tier-team { display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 5px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border-strong); cursor: grab; }
.tier-team.dragging { opacity: .5; }
.tier-team .tt-main { display: flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; cursor: pointer; color: inherit; }
.tier-team .team-avatar { width: 26px; height: 26px; }
.tier-team .tt-num { font-family: var(--font-display); font-weight: 700; font-size: .9rem; }
.tier-team .tt-x { width: 22px; height: 22px; border: none; border-radius: 5px; background: transparent; color: var(--text-mut); cursor: pointer; flex: none; }
.tier-team .tt-x:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.tier-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }

/* ===========================================================================
   Members — profile / leaderboard / scouters
   ======================================================================== */
.cloud-note { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--text-dim); font-size: .9rem; }
.cloud-note .ico { flex: none; width: 22px; height: 22px; color: var(--primary); }

.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--text-mut); flex: none; }
.status-dot.on { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 30%, transparent); }
.status-dot.inline { width: 8px; height: 8px; margin-left: 4px; vertical-align: middle; }

.sc-avatar, .ph-avatar, .lb-avatar { border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.sc-avatar-fallback { display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; color: var(--on-primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-deep)); }

.profile-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ph-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ph-avatar { width: 92px; height: 92px; font-size: 2.4rem; }
.ph-info { flex: 1; min-width: 160px; }
.ph-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-status { display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: .92rem; margin-top: 6px; }
/* Profile photo cropper */
.crop-stage { position: relative; margin: 6px auto 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); touch-action: none; user-select: none; -webkit-user-select: none; }
.crop-stage #cropImg { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.crop-box { position: absolute; box-sizing: border-box; border: 2px solid color-mix(in srgb, var(--primary) 90%, #fff); box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.crop-handle { position: absolute; width: 16px; height: 16px; background: var(--primary); border: 2px solid #fff; border-radius: 50%; touch-action: none; }
.crop-handle.nw { top: -9px; left: -9px; cursor: nwse-resize; }
.crop-handle.ne { top: -9px; right: -9px; cursor: nesw-resize; }
.crop-handle.sw { bottom: -9px; left: -9px; cursor: nesw-resize; }
.crop-handle.se { bottom: -9px; right: -9px; cursor: nwse-resize; }
.ph-bb { text-align: right; }
.bb-big { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; color: var(--secondary); line-height: 1; }
.bb-unit { font-family: var(--font-display); font-weight: 700; color: var(--secondary); margin-left: 4px; }

.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; transition: border-color .15s ease, transform .12s ease; }
.lb-row:hover { border-color: var(--primary); transform: translateX(2px); }
.lb-rank { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--text-mut); width: 26px; flex: none; text-align: center; }
.lb-row:nth-child(1) .lb-rank { color: var(--secondary); }
.lb-avatar { width: 46px; height: 46px; font-size: 1.2rem; flex: none; }
.lb-name { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 1rem; display: flex; align-items: center; }
.lb-bbwrap { text-align: right; flex: none; }
.lb-bb-row { display: flex; align-items: baseline; gap: 4px; justify-content: flex-end; }
.lb-bb { font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; color: var(--secondary); line-height: 1; }
.lb-bb-unit { font-family: var(--font-display); font-weight: 700; font-size: .85rem; color: var(--secondary); }
.lb-sub { font-size: .78rem; color: var(--text-dim); margin-top: 3px; letter-spacing: .02em; }

.sc-list { display: flex; flex-direction: column; gap: 6px; }
.sc-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 16px; transition: border-color .15s ease; }
.sc-row:hover { border-color: var(--primary); }
.sc-avatar { width: 40px; height: 40px; font-size: 1.05rem; flex: none; }
.sc-avatar.sm { width: 28px; height: 28px; font-size: .8rem; }
.sc-name { flex: 1; font-weight: 600; font-size: 1rem; }
.sc-status { display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: .85rem; }

/* ---- Data page: always-on tables ----------------------------------------- */
.table-wrap.scroll-y { max-height: 460px; overflow-y: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; text-align: left;
  font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); padding: 9px 11px; white-space: nowrap; }
.data-table td { padding: 8px 11px; border-top: 1px solid var(--border); white-space: nowrap; }
.data-table td.num, .data-table th.num { text-align: right; }
.data-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.data-table tbody tr:hover { background: var(--surface); }
.data-table td .team-num { color: var(--primary); font-weight: 700; }
.data-table td:nth-child(2), .data-table.sortable td:first-child { font-weight: 600; }
/* sortable headers */
.data-table.sortable th[data-sortkey] { cursor: pointer; user-select: none; transition: color .12s ease; }
.data-table.sortable th[data-sortkey]:hover { color: var(--text); }
.data-table.sortable th.sorted { color: var(--primary); }
/* data viewer controls (search / scouter / sort) */
.data-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.data-controls input[type="search"] { flex: 1; min-width: 150px; }
.data-controls select { min-width: 150px; }
.data-empty { padding: 8px 0; }

.sl-table td .team-num { color: var(--primary); font-weight: 700; }

@media (max-width: 720px) {
  .profile-hero { flex-direction: column; text-align: center; }
  .ph-bb { text-align: center; }
  .grid.cols-2 { grid-template-columns: 1fr; }
}
.epa-chart .cdv { stroke: var(--secondary); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; vector-effect: non-scaling-stroke; }
.epa-chart .cev { fill: var(--secondary); font-size: 9px; font-family: var(--font-ui); font-weight: 600; }
.epa-record { margin-top: 12px; font-size: .95rem; color: var(--text-dim); }
.epa-record b { font-family: var(--font-display); color: var(--text); font-size: 1.05rem; }

/* ---- Robot photos (pit) --------------------------------------------------- */
.photo-preview { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.photo-preview img { max-width: 100%; max-height: 200px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); }
.pit-thumb { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 8px; border: 1px solid var(--border); }
.pit-photo { width: 100%; max-height: 240px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 12px; background: var(--bg-2); }

/* ---- Pit map image -------------------------------------------------------- */
.pit-map-img { width: 100%; max-height: 380px; object-fit: contain; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-2); }

/* ---- Dashboard live section ---------------------------------------------- */
.nm-label { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--secondary); margin: 6px 0 10px; }
.nm-alliance { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--radius-sm); margin-bottom: 6px; }
.nm-alliance.red { background: color-mix(in srgb, #f2555a 12%, transparent); }
.nm-alliance.blue { background: color-mix(in srgb, #4d8bf0 14%, transparent); }
.nm-alliance .team-num { font-family: var(--font-display); font-weight: 700; }
.team-num.hl702 { color: var(--secondary); text-decoration: underline; }

/* ---- Compare page --------------------------------------------------------- */
.cmp-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1.5px solid var(--border-strong); font-family: var(--font-display);
  font-weight: 700; font-size: .9rem; }
.cmp-chip i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cmp-chip button { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 0; display: inline-flex; }
.cmp-chip button:hover { color: var(--danger); }
.cmp-chip .ico { width: 15px; height: 15px; }
.cmp-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.cmp-leg { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: .85rem; color: var(--text-dim); }
.cmp-leg i { width: 14px; height: 3px; border-radius: 2px; }
.cmp-th { font-family: var(--font-display); font-weight: 800; }
.cmp-chartwrap { position: relative; }
.cmp-svg { width: 100%; height: auto; display: block; cursor: crosshair; }
.epa-chart .cxl { fill: var(--text-mut); font-size: 9px; font-family: var(--font-ui); }
.epa-chart .cxt { fill: var(--text-dim); font-size: 9px; font-family: var(--font-ui); font-weight: 600; }
.cmp-guide { position: absolute; width: 1px; background: var(--secondary); opacity: .7; pointer-events: none; }
.cmp-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%);
  pointer-events: none; box-shadow: 0 0 0 2px var(--surface); }
.cmp-tip { position: absolute; pointer-events: none; z-index: 5; background: var(--elevated);
  border: 1px solid var(--border-strong); border-radius: 9px; padding: 7px 9px; box-shadow: var(--shadow); min-width: 96px; }
.cmp-tip .tip-h { font-family: var(--font-display); font-weight: 800; font-size: .8rem; margin-bottom: 4px; color: var(--text); }
.cmp-tip .tip-r { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-dim); }
.cmp-tip .tip-r i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cmp-tip .tip-r b { margin-left: auto; font-family: var(--font-display); color: var(--text); padding-left: 10px; }

/* ---- Global scout popup (cloud activity) --------------------------------- */
.scout-pops { position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 1200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw; }
.scout-pop { display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--elevated); border: 1px solid var(--primary); border-radius: 999px;
  box-shadow: var(--shadow); color: var(--text); font-size: .9rem;
  opacity: 0; transform: translateY(-10px); transition: opacity .25s ease, transform .25s ease; }
.scout-pop.in { opacity: 1; transform: translateY(0); }
.scout-pop .sp-ico { display: inline-flex; color: var(--primary); }
.scout-pop .sp-ico .ico { width: 18px; height: 18px; }
.scout-pop .sp-bb { font-family: var(--font-display); font-weight: 800; color: var(--secondary);
  background: color-mix(in srgb, var(--secondary) 16%, transparent); padding: 2px 8px; border-radius: 999px; }

/* ---- Match robot-claim lock ---------------------------------------------- */
.robot-pick.claimed { opacity: .55; filter: grayscale(.3); cursor: not-allowed; border-color: var(--border); }
.robot-pick .rp-claim { display: block; margin-top: 4px; font-size: .68rem; font-weight: 700;
  color: var(--danger); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.robot-pick.claimed .rp-claim { color: var(--text-mut); }

/* ---- SoCal Showdown pit map --------------------------------------------- */
.socal-map-scroll { overflow-x: auto; padding: 4px 2px 8px; }
.socal-map { display: flex; justify-content: center; align-items: stretch; gap: 26px; min-width: min-content;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; }
.socal-side { display: flex; align-items: flex-start; gap: 16px; }
.socal-col { display: flex; flex-direction: column; gap: 8px; }
.socal-row { display: flex; gap: 8px; }
.pit-cell.socal { width: 56px; height: 48px; border-radius: 11px; margin: 0;
  border: 1.5px solid transparent; font-size: .84rem; font-weight: 700;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease; }
.pit-cell.socal:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.pit-cell.socal .pc-team { font-size: .82rem; letter-spacing: -.01em; }
.pit-cell.socal.done { background: color-mix(in srgb, var(--primary) 20%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 55%, transparent); color: var(--text); }
.pit-cell.socal.todo { background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: color-mix(in srgb, var(--danger) 80%, var(--text)); }
.socal-field { align-self: stretch; display: flex; align-items: center; justify-content: center;
  min-width: 96px; border-radius: 14px;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--primary) 7%, var(--surface-2)) 0 22px, color-mix(in srgb, var(--primary) 11%, var(--surface-2)) 22px 44px);
  border: 1.5px dashed color-mix(in srgb, var(--primary) 38%, var(--border)); }
.socal-field span { font-family: var(--font-display); font-weight: 800; letter-spacing: .32em;
  color: color-mix(in srgb, var(--primary) 70%, var(--text-dim)); writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 1.05rem; }
@media (max-width: 560px) { .socal-map { gap: 16px; padding: 16px; } .socal-side { gap: 10px; }
  .pit-cell.socal { width: 46px; height: 42px; font-size: .76rem; } .socal-field { min-width: 60px; } }

/* ---- Teams list (Events > Teams) ---------------------------------------- */
.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 12px; cursor: pointer; color: inherit; transition: border-color .15s ease, transform .1s ease; }
.team-row:hover { border-color: var(--primary); }
.team-row:active { transform: scale(.995); }
.team-row .tr-icon { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.tr-robot { width: 52px; height: 40px; flex: none; border-radius: 8px; overflow: hidden; background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.tr-robot img { width: 100%; height: 100%; object-fit: cover; }
.tr-robot .tr-robot-ph { color: var(--text-mut); opacity: .5; }
.tr-robot .tr-robot-ph .ico { width: 18px; height: 18px; }
.tr-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tr-id .tr-num { font-family: var(--font-display); font-weight: 800; }
.tr-id .tr-name { font-size: .8rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-stat { display: flex; flex-direction: column; align-items: center; min-width: 46px; flex: none; }
.tr-stat .trs-val { font-family: var(--font-display); font-weight: 800; font-size: .95rem; color: var(--text); }
.tr-stat .trs-label { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mut); }
@media (max-width: 520px) { .tr-robot { width: 42px; height: 34px; } .tr-stat { min-width: 38px; } .team-row { gap: 8px; padding: 7px 9px; } }

/* ---- Schedule ------------------------------------------------------------ */
.sched-list { display: flex; flex-direction: column; gap: 6px; }
.sched-row { display: grid; grid-template-columns: 46px 1fr auto 1fr; align-items: center; gap: 8px;
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; cursor: pointer; color: inherit; transition: border-color .15s ease; }
.sched-row:hover { border-color: var(--primary); }
.sched-row .sr-label { font-family: var(--font-display); font-weight: 800; color: var(--text-dim); font-size: .9rem; }
.sched-row .sr-alliance { display: flex; gap: 4px; flex-wrap: wrap; }
.sched-row .sr-alliance.blue { justify-content: flex-end; }
.sched-row .sr-team { font-family: var(--font-display); font-weight: 700; font-size: .84rem; padding: 2px 6px;
  border-radius: 6px; background: var(--surface-2); }
.sched-row .sr-alliance.red .sr-team { color: #ff8a8a; }
.sched-row .sr-alliance.blue .sr-team { color: #7fb4ff; }
.sched-row .sr-alliance.won .sr-team { outline: 1.5px solid currentColor; }
.sched-row .sr-score { font-family: var(--font-display); font-weight: 800; text-align: center; min-width: 58px; }
.sched-row .sr-score .sr-dash { color: var(--text-mut); margin: 0 3px; font-weight: 400; }
.sched-row .sr-time { font-size: .76rem; color: var(--text-mut); font-weight: 400; }

/* ---- Match detail modal -------------------------------------------------- */
.md-prob-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.md-prob-red { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: #ff8a8a; }
.md-prob-blue { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: #7fb4ff; }
.md-prob-mid { font-size: .78rem; color: var(--text-mut); text-transform: uppercase; letter-spacing: .06em; }
.md-prob-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.md-prob-bar .mpb-red { background: linear-gradient(90deg,#e0564f,#ff8a8a); }
.md-prob-bar .mpb-blue { background: linear-gradient(90deg,#7fb4ff,#3f7fe0); }
.md-final { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0;
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.md-final .mf-red { color: #ff8a8a; } .md-final .mf-blue { color: #7fb4ff; }
.md-final .mf-vs { font-size: .7rem; color: var(--text-mut); text-transform: uppercase; letter-spacing: .1em; }
.md-alliances { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 560px) { .md-alliances { grid-template-columns: 1fr; } }
.md-ally-head { font-family: var(--font-display); font-weight: 800; font-size: .9rem; margin-bottom: 8px;
  display: flex; align-items: center; gap: 7px; }
.md-team { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px;
  margin-bottom: 6px; color: inherit; }
.md-team:hover { border-color: var(--primary); }
.md-team .team-avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.md-tinfo { display: flex; flex-direction: column; min-width: 0; width: 72px; flex: none; }
.md-tnum { font-family: var(--font-display); font-weight: 800; font-size: .85rem; }
.md-tname { font-size: .68rem; color: var(--text-mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-ebar { flex: 1; height: 7px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.md-ebar-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.md-ally.red .md-ebar-fill { background: #e0564f; }
.md-ally.blue .md-ebar-fill { background: #3f7fe0; }
.md-eval { font-family: var(--font-display); font-weight: 800; font-size: .82rem; min-width: 34px; text-align: right; }

/* ---- Matchup page -------------------------------------------------------- */
.mu-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 560px) { .mu-pickers { grid-template-columns: 1fr; } }
.mu-ally { display: flex; flex-direction: column; gap: 8px; }
.mu-ally.red { border-color: color-mix(in srgb, #e0564f 40%, var(--border)); }
.mu-ally.blue { border-color: color-mix(in srgb, #3f7fe0 40%, var(--border)); }
.mu-ally-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.mu-ally-head.red { color: #ff8a8a; } .mu-ally-head.blue { color: #7fb4ff; }
.mu-ally.red .mu-ally-head { color: #ff8a8a; } .mu-ally.blue .mu-ally-head { color: #7fb4ff; }
.mu-team { width: 100%; min-height: 44px; font-size: 1rem; font-weight: 600; }
.mu-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mu-head-hint { font-size: .8rem; }
/* picker rows: avatar + control + team name fill the whole width */
.mu-pick { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.mu-pick:last-child { margin-bottom: 0; }
.mu-pick-av { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.mu-pick-av .team-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.mu-pick-ph { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1.5px dashed var(--border-strong); color: var(--text-mut); font-family: var(--font-display); font-weight: 800; }
.mu-pick input.mu-team { flex: none; width: 96px; text-align: center; font-family: var(--font-display); font-size: 1.1rem; }
.mu-pick select.mu-team { flex: 1; min-width: 0; height: 46px; padding: 0 40px 0 14px;
  font-family: var(--font-ui); font-size: .95rem; font-weight: 600; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer;
  text-overflow: ellipsis; white-space: nowrap;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235bbde2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center; }
.mu-pick select.mu-team:hover { border-color: var(--primary); }
.mu-pick select.mu-team option { font-family: var(--font-ui); font-weight: 500; color: var(--text); background: var(--bg-2); padding: 8px; }
.mu-pick:has(select) .mu-pick-name { display: none; }
.mu-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.mu-time { margin-bottom: 14px; }
.mu-time-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.mu-time-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mut); }
.mu-time-val { font-family: var(--font-display); font-weight: 800; color: var(--secondary); }
.mu-time input[type="range"] { width: 100%; accent-color: var(--primary); }
.mu-score { margin-bottom: 14px; }
.mu-score-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.mu-score-side { display: flex; flex-direction: column; align-items: center; }
.mu-sc-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mut); }
.mu-sc-val { font-family: var(--font-display); font-weight: 800; font-size: 3rem; line-height: 1; }
.mu-score-side.red .mu-sc-val { color: #ff8a8a; }
.mu-score-side.blue .mu-sc-val { color: #7fb4ff; }
.mu-score-mid { text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mut);
  display: flex; flex-direction: column; gap: 2px; font-weight: 700; }
.mu-av-strip { display: flex; justify-content: center; gap: 14px; margin-top: 12px; }
.mu-av-strip .team-avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border); }
.mu-score-side.red .mu-av-strip .team-avatar { border-color: color-mix(in srgb, #e0564f 55%, transparent); }
.mu-score-side.blue .mu-av-strip .team-avatar { border-color: color-mix(in srgb, #3f7fe0 55%, transparent); }
.mu-prob { margin: 16px 0 6px; }
.mu-breakdown { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .9rem; }
.mu-breakdown th, .mu-breakdown td { padding: 7px 10px; text-align: right; border-top: 1px solid var(--border); }
.mu-breakdown th:first-child, .mu-breakdown td:first-child { text-align: left; font-weight: 600; }
.mu-breakdown thead th { border-top: none; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mut); }
.mu-breakdown td.red, .mu-breakdown th.red { color: #ff8a8a; }
.mu-breakdown td.blue, .mu-breakdown th.blue { color: #7fb4ff; }
.mu-breakdown tr.mu-total td { border-top: 2px solid var(--border-strong); font-family: var(--font-display); font-weight: 800; }
.mu-pergrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .mu-pergrid { grid-template-columns: 1fr; } }
.mu-teamcard.red { border-color: color-mix(in srgb, #e0564f 35%, var(--border)); }
.mu-teamcard.blue { border-color: color-mix(in srgb, #3f7fe0 35%, var(--border)); }
.mu-trow { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--border); cursor: pointer; }
.mu-trow:hover { background: var(--surface); border-radius: 8px; }
.mu-trow:first-of-type { border-top: none; }
.mu-trow .mu-tav { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.mu-trow .mu-tnum { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--primary); flex: none; min-width: 48px; }
.mu-trow .mu-tname { width: 90px; flex: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font-size: .82rem; }
.mu-trow .mu-tbar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 30px; }
.mu-trow .mu-tbar-fill { display: block; height: 100%; border-radius: 999px; }
.mu-trow .mu-tbar-fill.red { background: linear-gradient(90deg, #e0564f, #ff8a8a); }
.mu-trow .mu-tbar-fill.blue { background: linear-gradient(90deg, #3f7fe0, #7fb4ff); }
.mu-trow .mu-tepa { font-family: var(--font-display); font-weight: 800; font-size: 1rem; flex: none; min-width: 42px; text-align: right; }
.mu-trow .mu-tepa.red { color: #ff8a8a; } .mu-trow .mu-tepa.blue { color: #7fb4ff; }

/* Match shift-order tag (1st/2nd shift) */
.shift-tag { font-family: var(--font-ui); font-weight: 700; font-size: .66rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--primary); background: color-mix(in srgb, var(--primary) 15%, transparent);
  padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* =========================================================================
   Data → Search (team & scouter browser)
   ========================================================================= */
.subtabs a .ico, .subtabs button .ico { width: 16px; height: 16px; }
.ds-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.ds-search { position: relative; flex: 1 1 340px; display: flex; align-items: center; }
.ds-search > .ico { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--text-mut); pointer-events: none; }
.ds-search:focus-within > .ico { color: var(--primary); }
.ds-search input { min-height: 54px; padding-left: 48px; border-radius: 14px; font-size: 1.1rem; font-weight: 600; }
.ds-modes { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); }
.ds-modes button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px;
  background: none; color: var(--text-dim); font-family: var(--font-display); font-weight: 800; font-size: .76rem;
  letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: background .2s ease, color .2s ease; }
.ds-modes button .ico { width: 16px; height: 16px; }
.ds-modes button b { padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-dim); font-size: .7rem; }
.ds-modes button.on { background: var(--primary); color: var(--on-primary); }
.ds-modes button.on b { background: color-mix(in srgb, var(--on-primary) 18%, transparent); color: var(--on-primary); }
.ds-section { margin-bottom: 22px; }
.ds-section h3 { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 0 0 12px; }
.ds-section h3 .ico { width: 18px; height: 18px; color: var(--secondary); }
.ds-section h3 .muted { font-family: var(--font-ui); font-weight: 700; }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.ds-team { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px;
  align-items: center; text-align: left; padding: 13px 14px; min-height: 92px; border-radius: 14px; cursor: pointer; overflow: hidden;
  font: inherit; color: var(--text); background: var(--surface-2); border: 1.5px solid var(--border-strong);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; animation: dsIn .4s cubic-bezier(.2,.8,.2,1) both; }
.ds-team::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 2px, transparent 2px 12px); opacity: 0; transition: opacity .2s ease; }
.ds-team.has-tc { background: var(--tc); color: var(--tcf); border-color: color-mix(in srgb, var(--tc2) 75%, transparent); }
.ds-team.has-tc::after { opacity: 1; }
.ds-team:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -16px rgba(0,0,0,.6); border-color: var(--secondary); }
.ds-team:active { transform: translateY(0) scale(.98); }
.ds-team:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.ds-team .team-avatar { grid-row: 1 / span 2; width: 42px; height: 42px; border-radius: 10px; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); }
.ds-num { font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; line-height: 1; }
.ds-name { font-weight: 700; font-size: .92rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .92; }
.ds-meta { grid-column: 1 / -1; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; opacity: .8; }
.ds-meta .ico { width: 13px; height: 13px; stroke-width: 3; }
.ds-team.dim { opacity: .55; }
.ds-team.dim:hover { opacity: .9; }
.ds-sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ds-scouter { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; text-align: left; padding: 12px 14px;
  border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease; animation: dsIn .4s cubic-bezier(.2,.8,.2,1) both; }
.ds-scouter:hover { transform: translateY(-2px); border-color: var(--primary); }
.ds-scouter .sc-avatar { grid-row: 1 / span 2; width: 46px; height: 46px; }
.ds-sname { font-family: var(--font-display); font-weight: 800; font-size: .95rem; }
.ds-scouter .ds-meta { grid-column: 2; margin-top: 2px; color: var(--text-dim); opacity: 1; }
.ds-crumbs { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ds-shero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.ds-shero-id { display: flex; flex-direction: column; flex: 1 1 180px; }
.ds-shero-name { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; }
.ds-shero-sub { color: var(--text-mut); font-weight: 600; }
.ds-shero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.ds-shero-stats div { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 10px 12px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--border); }
.ds-shero-stats b { font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; color: var(--secondary); }
.ds-shero-stats span { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); }
.ds-split { align-items: start; }
.ds-feed { display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow: auto; }
.ds-feed-row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; text-align: left; padding: 9px 10px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; cursor: pointer; }
.ds-feed-row:hover { border-color: var(--primary); }
.ds-feed-q { min-width: 46px; padding: 4px 8px; border-radius: 8px; text-align: center; font-family: var(--font-display); font-weight: 800;
  font-size: .78rem; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; }
.ds-feed-q.red { background: color-mix(in srgb, #e0564f 22%, transparent); color: #ff9a94; }
.ds-feed-q.blue { background: color-mix(in srgb, #3f7fe0 22%, transparent); color: #8fbcff; }
.ds-feed-q .ico { width: 16px; height: 16px; }
.ds-feed-t { font-family: var(--font-display); font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-feed-t .muted { font-family: var(--font-ui); font-weight: 600; }
.ds-feed-when { color: var(--text-mut); font-size: .8rem; font-weight: 600; }
.ds-feed-note { grid-column: 2 / -1; color: var(--text-dim); font-size: .88rem; }
.ds-feed-photo { width: 46px; height: 34px; object-fit: cover; border-radius: 7px; }
@keyframes dsIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Team banner (Data report + profile hero) ---- */
.thero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 22px 24px 26px;
  border-radius: var(--radius); background: var(--surface-2); border: 1.5px solid var(--border-strong); color: var(--text); margin-bottom: 18px; }
.thero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 2px, transparent 2px 14px); }
.thero.has-tc { background: var(--tc); color: var(--tcf); border-color: color-mix(in srgb, var(--tc2) 70%, transparent); }
.thero-mark { position: absolute; right: -8px; bottom: -34px; z-index: -1; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(6rem, 16vw, 11rem); line-height: 1; opacity: .13; letter-spacing: -.02em; pointer-events: none; }
.thero-accent { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--primary); }
.thero.has-tc .thero-accent { background: var(--tc2); }
.thero-av { width: 76px; height: 76px; border-radius: 18px; flex: none; border: 3px solid color-mix(in srgb, currentColor 30%, transparent);
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.7); }
.thero-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.thero-num { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 6vw, 3rem); line-height: 1; }
.thero-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; opacity: .92; }
.thero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.thero-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  background: color-mix(in srgb, currentColor 14%, transparent); }
.thero-chip .ico { width: 14px; height: 14px; }

/* ---- Scouting report ---- */
.sr { display: flex; flex-direction: column; gap: 16px; }
.sr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.sr-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1.5px solid var(--border-strong); animation: dsIn .4s cubic-bezier(.2,.8,.2,1) both; }
.sr-tile span { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut); }
.sr-tile b { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; color: var(--secondary); line-height: 1.1; }
.sr-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .sr-cols { grid-template-columns: 1fr; } }
.sr-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sr-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; }
.sr-head h3 .ico { width: 18px; height: 18px; color: var(--secondary); }
.sr-pit-body { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 520px) { .sr-pit-body { grid-template-columns: 1fr; } }
.sr-photo { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in;
  border: 1.5px solid var(--border-strong); background: var(--bg-2); }
.sr-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.sr-photo:hover img { transform: scale(1.05); }
.sr-photo.empty { cursor: default; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-mut); font-weight: 600; font-size: .85rem; }
.sr-photo.empty .ico { width: 28px; height: 28px; }
.sr-photo-full { width: 100%; max-height: 75vh; object-fit: contain; border-radius: 12px; display: block; }
.sr-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.sr-fact { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); min-width: 0; }
.sr-fact > span { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mut); }
.sr-fact b { font-weight: 700; overflow-wrap: anywhere; }
.sr-yn { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 2px 9px 2px 6px; border-radius: 999px; font-weight: 800; font-size: .85rem; }
.sr-yn .ico { width: 14px; height: 14px; stroke-width: 3; }
.sr-yn.yes { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.sr-yn.no { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.sr-quote { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--secondary); border-radius: 0 10px 10px 0;
  background: var(--bg-2); color: var(--text); font-size: .95rem; line-height: 1.45; }
.sr-quote > span { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mut); margin-bottom: 3px; }
.sr-phases { display: flex; flex-direction: column; gap: 16px; }
.sr-phase h4 { margin: 0 0 8px; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--secondary); }
.sr-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(70px, 1fr) auto; align-items: center; gap: 10px; padding: 6px 0;
  border-top: 1px solid var(--border); }
.sr-row:first-of-type { border-top: 0; }
.sr-label { font-weight: 600; font-size: .92rem; min-width: 0; }
.sr-bar { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--border); }
.sr-bar i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transform-origin: left; animation: srGrow .7s cubic-bezier(.2,.8,.2,1) both; }
.sr-bar.num i { background: var(--secondary); }
.sr-val { font-family: var(--font-display); font-weight: 800; font-size: .95rem; text-align: right; min-width: 52px; }
.sr-val small { display: block; font-family: var(--font-ui); font-weight: 600; font-size: .7rem; color: var(--text-mut); }
.sr-dots { display: flex; gap: 4px; }
.sr-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--bg-2); border: 1.5px solid var(--border-strong); }
.sr-dots i.on { background: var(--secondary); border-color: var(--secondary); }
.sr-dots i.half { background: color-mix(in srgb, var(--secondary) 45%, var(--bg-2)); border-color: var(--secondary); }
.sr-row.sel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.sr-chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.sr-chip { padding: 3px 9px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border-strong); font-size: .82rem; font-weight: 600; }
.sr-chip b { color: var(--secondary); }
.sr-timeline { display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow: auto; }
.sr-match { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); }
.sr-match[open] { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.sr-match summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; list-style: none; }
.sr-match summary::-webkit-details-marker { display: none; }
.sr-match summary > .ico:last-child { margin-left: auto; width: 16px; height: 16px; color: var(--text-mut); transition: transform .2s ease; }
.sr-match[open] summary > .ico:last-child { transform: rotate(90deg); }
.sr-q { min-width: 46px; padding: 3px 8px; border-radius: 8px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: .8rem; background: var(--surface-2); }
.sr-q.red { background: color-mix(in srgb, #e0564f 22%, transparent); color: #ff9a94; }
.sr-q.blue { background: color-mix(in srgb, #3f7fe0 22%, transparent); color: #8fbcff; }
.sr-mby { color: var(--text-dim); font-weight: 600; font-size: .88rem; }
.sr-note-flag { color: var(--secondary); display: inline-flex; }
.sr-note-flag .ico { width: 15px; height: 15px; }
.sr-mbody { padding: 0 12px 12px; animation: dsIn .3s ease both; }
.sr-kvs { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-kv, .sr-tag { padding: 4px 9px; border-radius: 8px; font-size: .82rem; font-weight: 600; background: var(--surface); border: 1px solid var(--border); }
.sr-kv b { color: var(--secondary); margin-left: 3px; }
.sr-tag { background: color-mix(in srgb, var(--primary) 16%, transparent); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
@keyframes srGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* =========================================================================
   Team profile page (#/team/<n>)
   ========================================================================= */
.tp-open { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; margin-bottom: 16px; cursor: pointer; text-align: left;
  border-radius: 14px; border: 1.5px solid var(--secondary); background: color-mix(in srgb, var(--secondary) 12%, var(--surface));
  color: var(--text); font: inherit; transition: transform .15s ease, box-shadow .2s ease; }
.tp-open:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--secondary) 90%, transparent); }
.tp-open-ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--secondary); color: var(--on-secondary); }
.tp-open-txt { display: flex; flex-direction: column; flex: 1; }
.tp-open-txt b { font-family: var(--font-display); font-size: .95rem; letter-spacing: .03em; }
.tp-open-txt span { color: var(--text-dim); font-size: .88rem; font-weight: 600; }
.tp-open > .ico:last-child { width: 20px; height: 20px; color: var(--secondary); transition: transform .2s ease; }
.tp-open:hover > .ico:last-child { transform: translateX(4px); }

.tp-hero { flex-wrap: wrap; justify-content: space-between; align-items: stretch; padding: 26px 26px 30px; min-height: 190px;
  animation: tpRise .5s cubic-bezier(.2,.8,.2,1) both; }
.tp-hero-main { display: flex; align-items: center; gap: 20px; min-width: 0; flex: 1 1 340px; }
.tp-av { width: 108px; height: 108px; border-radius: 24px; }
.tp-hero .thero-num { font-size: clamp(2.6rem, 8vw, 4.2rem); }
.tp-hero .thero-name { font-size: 1.3rem; }
.tp-loc { display: block; font-weight: 600; opacity: .85; margin-top: 4px; }
.tp-loc .ico { width: 15px; height: 15px; vertical-align: -2px; margin-right: 3px; }
.tp-hero-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 12px; }
@media (max-width: 700px) { .tp-hero-side { align-items: flex-start; } }
.tp-robot { width: 190px; aspect-ratio: 4 / 3; padding: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in;
  border: 3px solid color-mix(in srgb, currentColor 35%, transparent); background: rgba(0,0,0,.25); box-shadow: 0 16px 32px -18px rgba(0,0,0,.8); }
.tp-robot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.tp-robot:hover img { transform: scale(1.06); }
.tp-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.tp-link, .tp-year { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 10px;
  font-weight: 700; font-size: .85rem; color: inherit; text-decoration: none;
  background: color-mix(in srgb, currentColor 14%, transparent); border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  transition: background .2s ease; }
.tp-link:hover { background: color-mix(in srgb, currentColor 24%, transparent); }
.tp-link .ico, .tp-year .ico { width: 15px; height: 15px; }
.tp-year select { width: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; cursor: pointer; box-shadow: none; }
.tp-year select option { color: var(--text); background: var(--surface); }

.tp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tp-tile { display: flex; flex-direction: column; gap: 3px; min-height: 104px; padding: 15px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--border-strong); animation: tpRise .5s cubic-bezier(.2,.8,.2,1) both; }
.tp-tile:nth-child(2) { animation-delay: .04s; } .tp-tile:nth-child(3) { animation-delay: .08s; } .tp-tile:nth-child(4) { animation-delay: .12s; }
.tp-tile:nth-child(5) { animation-delay: .16s; } .tp-tile:nth-child(6) { animation-delay: .2s; }
.tp-tile.hl { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 10%, var(--surface)); }
.tp-tile-l { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut); }
.tp-tile-v { font-family: var(--font-display); font-weight: 900; font-size: 1.85rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tp-tile.hl .tp-tile-v { color: var(--secondary); }
.tp-tile-s { color: var(--text-dim); font-size: .82rem; font-weight: 600; }
.tp-tile.skel { background: var(--surface-2); border-color: var(--border); position: relative; overflow: hidden; }
.tp-tile.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 6%, transparent), transparent); animation: tpShimmer 1.2s infinite; }
.tp-note { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-weight: 600; grid-column: 1 / -1; }
.tp-note .ico { color: var(--secondary); flex: none; }
.tp-epa { margin-bottom: 18px; }
.tp-stack { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--bg-2); gap: 3px; }
.tp-seg { transform-origin: left; animation: srGrow .8s cubic-bezier(.2,.8,.2,1) both; }
.tp-seg.a, .tp-key.a { background: var(--secondary); }
.tp-seg.t, .tp-key.t { background: var(--primary); }
.tp-seg.e, .tp-key.e { background: var(--success); }
.tp-phases { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.tp-phase { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.tp-key { width: 12px; height: 12px; border-radius: 4px; }
.tp-phase-l { font-weight: 700; }
.tp-phase b { font-family: var(--font-display); font-size: 1.15rem; }
.tp-pct { grid-column: 2 / -1; color: var(--text-mut); font-size: .78rem; font-weight: 700; }

.tp-tabbar { position: relative; display: flex; gap: 2px; overflow-x: auto; margin-bottom: 16px; border-bottom: 1.5px solid var(--border); scrollbar-width: none; }
.tp-tabbar::-webkit-scrollbar { display: none; }
.tp-tabbar button { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 48px; padding: 0 16px; border: 0; background: none; cursor: pointer;
  color: var(--text-dim); font-family: var(--font-display); font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; transition: color .2s ease; }
.tp-tabbar button .ico { width: 17px; height: 17px; }
.tp-tabbar button b:empty { display: none; }
.tp-tabbar button b { padding: 1px 7px; border-radius: 999px; background: var(--surface-2); font-size: .68rem; }
.tp-tabbar button:hover { color: var(--text); }
.tp-tabbar button.on { color: var(--secondary); }
.tp-ink { position: absolute; left: 0; bottom: -1.5px; height: 3px; border-radius: 3px 3px 0 0; background: var(--secondary);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1); }
.tp-panel { min-height: 160px; }
.tp-panel.in { animation: dsIn .35s ease both; }
.tp-panel.in-right { animation: cdInRight .4s cubic-bezier(.2,.8,.2,1) both; }
.tp-panel.in-left { animation: cdInLeft .4s cubic-bezier(.2,.8,.2,1) both; }
.tp-loading { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-weight: 600; }
.tp-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--primary); border-right-color: transparent; animation: authSpin .7s linear infinite; }

.tp-timeline { position: relative; display: flex; flex-direction: column; gap: 16px; padding-left: 26px; }
.tp-timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--border-strong); }
.tp-event { position: relative; animation: tpRise .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 70ms); }
.tp-ev-dot { position: absolute; left: -26px; top: 22px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--primary); }
.tp-event.winner .tp-ev-dot { border-color: var(--secondary); background: var(--secondary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--secondary) 22%, transparent); }
.tp-ev-card { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--border-strong); transition: border-color .2s ease; }
.tp-ev-card:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--border-strong)); }
.tp-event.winner .tp-ev-card { border-color: var(--secondary); }
.tp-ev-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tp-ev-week { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.tp-ev-name { margin: 2px 0 2px; font-size: 1.1rem; }
.tp-ev-loc { display: inline-flex; align-items: center; gap: 5px; color: var(--text-mut); font-weight: 600; font-size: .88rem; }
.tp-ev-loc .ico { width: 14px; height: 14px; }
.tp-po { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .82rem;
  background: var(--surface-2); border: 1px solid var(--border-strong); }
.tp-po .ico { width: 15px; height: 15px; }
.tp-po.gold { background: var(--secondary); color: var(--on-secondary); border-color: var(--secondary); }
.tp-ev-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 14px; }
.tp-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.tp-stat > span { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); }
.tp-stat b { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; }
.tp-stat b small { font-size: .75rem; color: var(--text-mut); margin-left: 1px; }
.tp-stat b.small { font-family: var(--font-ui); font-size: .95rem; font-weight: 800; }
.tp-stat.wide { grid-column: span 2; }
.tp-stat.ring { flex-direction: row; align-items: center; gap: 8px; }
.tp-ring { width: 46px; height: 46px; flex: none; }
.tp-ring-bg { fill: none; stroke: var(--border-strong); stroke-width: 6; }
.tp-ring-fg { fill: none; stroke: var(--secondary); stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%;
  animation: tpRing .9s cubic-bezier(.2,.8,.2,1) both; }
.tp-ring text { fill: var(--text); font-family: var(--font-display); font-weight: 800; font-size: 12px; }
.tp-awards { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tp-award { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-weight: 700; font-size: .84rem;
  background: color-mix(in srgb, var(--secondary) 16%, transparent); color: var(--secondary); border: 1px solid color-mix(in srgb, var(--secondary) 45%, transparent); }
.tp-award .ico { width: 14px; height: 14px; }
.tp-matches { margin-top: 12px; }
.tp-matches summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 7px 12px; border-radius: 10px;
  font-weight: 800; font-size: .86rem; background: var(--surface-2); border: 1px solid var(--border-strong); }
.tp-matches summary::-webkit-details-marker { display: none; }
.tp-matches summary .ico { width: 15px; height: 15px; }
.tp-matches summary .ico:last-child { transition: transform .2s ease; }
.tp-matches[open] summary .ico:last-child { transform: rotate(90deg); }
.tp-matches .table-wrap { margin-top: 10px; animation: dsIn .3s ease both; }
.tp-mtable td { vertical-align: middle; }
.tp-mtable tr.red td:first-child { box-shadow: inset 3px 0 0 #e0564f; }
.tp-mtable tr.blue td:first-child { box-shadow: inset 3px 0 0 #3f7fe0; }
.tp-ml { font-family: var(--font-display); font-weight: 800; white-space: nowrap; }
.tp-ally { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tp-tchip { min-width: 46px; padding: 3px 7px; border-radius: 7px; cursor: pointer; font: inherit; font-weight: 700; font-size: .82rem;
  border: 1px solid transparent; transition: transform .12s ease; }
.tp-tchip:hover { transform: translateY(-1px); text-decoration: underline; }
.tp-ally.red .tp-tchip { background: color-mix(in srgb, #e0564f 16%, transparent); color: #ff9a94; }
.tp-ally.blue .tp-tchip { background: color-mix(in srgb, #3f7fe0 16%, transparent); color: #8fbcff; }
.tp-tchip.me { font-weight: 900; border-color: currentColor; }
:root[data-theme="light"] .tp-ally.red .tp-tchip { color: #b8322b; }
:root[data-theme="light"] .tp-ally.blue .tp-tchip { color: #1f5fbf; }
.tp-score { font-family: var(--font-display); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tp-score i { font-style: normal; color: var(--text-mut); margin: 0 4px; }
.tp-score .win { font-weight: 900; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.tp-res { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; font-family: var(--font-display); font-weight: 900; font-size: .8rem; }
.tp-res.W { background: color-mix(in srgb, var(--success) 20%, transparent); color: var(--success); }
.tp-res.L { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.tp-res.T { background: var(--surface-2); color: var(--text-dim); }
.tp-award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tp-award-card { display: flex; flex-direction: column; gap: 6px; animation: tpRise .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 60ms); }
.tp-award-card .ico { width: 26px; height: 26px; color: var(--secondary); }
.tp-award-card b { font-family: var(--font-display); }
.tp-award-card span { color: var(--text-dim); font-weight: 600; }
.tp-evbar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 2fr) auto; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); }
.tp-evbar:first-child { border-top: 0; }
.tp-evbar-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-evbar-track { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.tp-evbar-track i { display: block; height: 100%; border-radius: 999px; background: var(--secondary); transform-origin: left; animation: srGrow .8s cubic-bezier(.2,.8,.2,1) both; }
.tp-evbar b { font-family: var(--font-display); }
.tp-actions { margin-top: 20px; }
@keyframes tpRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tpShimmer { to { transform: translateX(100%); } }
@keyframes tpRing { from { stroke-dasharray: 0 999; } }
@media (max-width: 560px) {
  .thero { gap: 12px; padding: 16px 16px 22px; }
  .thero-av { width: 60px; height: 60px; border-radius: 14px; }
  .tp-hero { padding: 18px 16px 24px; }
  .tp-hero-main { flex-direction: column; align-items: flex-start; gap: 12px; }
  .tp-av { width: 76px; height: 76px; border-radius: 18px; }
  .tp-hero-side { width: 100%; align-items: stretch; }
  .tp-robot { width: 100%; }
  .tp-links { justify-content: flex-start; }
  .tp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-tile-v { font-size: 1.5rem; }
  .tp-stat.wide { grid-column: 1 / -1; }
  .tp-timeline { padding-left: 20px; }
  .tp-ev-dot { left: -20px; }
  .tp-ev-card { padding: 14px; }
  .ds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ds-team { padding: 11px; min-height: 86px; }
  .ds-team .team-avatar { width: 34px; height: 34px; }
  .ds-num { font-size: 1.15rem; }
  .ds-modes { width: 100%; }
  .ds-modes button { flex: 1; justify-content: center; }
}

/* =========================================================================
   REVAMP · shared pieces
   ========================================================================= */
.pg-hero, .db-hero, .ev-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-strong); animation: tpRise .45s cubic-bezier(.2,.8,.2,1) both; }
.pg-hero::before, .db-hero::before, .ev-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--primary) 24%, transparent) 1px, transparent 1.6px);
  background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); }
.pg-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 18px; }
.pg-hero-ico { width: 54px; height: 54px; flex: none; border-radius: 15px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--primary) 16%, var(--surface-2)); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); }
.pg-hero-ico .ico { width: 26px; height: 26px; }
.pg-hero-txt { flex: 1 1 240px; min-width: 0; }
.pg-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); }
.pg-eyebrow .ico { width: 14px; height: 14px; }
.pg-title { margin: 3px 0 2px; font-size: clamp(1.3rem, 3.2vw, 1.8rem); font-weight: 900; line-height: 1.15; }
.pg-sub { margin: 0; color: var(--text-dim); }
.pg-sub b { color: var(--text); }
.pg-hero-side { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pg-hero-side .tp-ring { width: 64px; height: 64px; }
.subtabs a .ico, .subtabs button .ico { width: 16px; height: 16px; }
.subtabs a.on, .subtabs button.on { box-shadow: 0 6px 16px -10px var(--primary); }
.seg { display: inline-flex; gap: 3px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); max-width: 100%; }
.seg.wrap { flex-wrap: wrap; }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: none; cursor: pointer;
  color: var(--text-dim); font-family: var(--font-display); font-weight: 800; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; transition: background .2s ease, color .2s ease; }
.seg button .ico { width: 16px; height: 16px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--primary); color: var(--on-primary); }
.ds-team.mini { min-height: 0; padding: 9px 10px; row-gap: 0; }
.ds-team.mini .team-avatar { width: 34px; height: 34px; }
.ds-team.mini .ds-num { font-size: 1.05rem; }
.ds-team.mini .ds-name { font-size: .8rem; }
.ds-meta { flex-wrap: wrap; }

/* ---- Members ---- */
.mb-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 24px; margin-bottom: 16px; animation: tpRise .45s cubic-bezier(.2,.8,.2,1) both; }
.mb-hero-av { position: relative; flex: none; }
.mb-hero-av .ph-avatar { width: 108px; height: 108px; border: 4px solid var(--surface); box-shadow: 0 0 0 3px var(--secondary), 0 14px 30px -14px rgba(0,0,0,.7); }
.mb-online { position: absolute; right: 6px; bottom: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-mut); border: 3px solid var(--surface); }
.mb-online.on { background: var(--success); }
.mb-online.sm { width: 13px; height: 13px; right: -1px; bottom: -1px; border-width: 2px; }
.mb-pic { position: absolute; left: -4px; bottom: -2px; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); cursor: pointer;
  background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; transition: transform .15s ease; }
.mb-pic:hover { transform: scale(1.08); }
.mb-pic .ico { width: 16px; height: 16px; }
.mb-hero-id { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mb-name { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 900; line-height: 1.1; }
.mb-status { color: var(--text-dim); font-weight: 600; }
.mb-bb { display: flex; flex-direction: column; align-items: center; padding: 14px 24px; border-radius: 18px;
  background: color-mix(in srgb, var(--secondary) 14%, var(--surface-2)); border: 1.5px solid var(--secondary); }
.mb-bb-num { font-family: var(--font-display); font-weight: 900; font-size: 2.5rem; color: var(--secondary); line-height: 1; font-variant-numeric: tabular-nums; }
.mb-bb-unit { margin-top: 5px; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.mb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mb-empty { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 12px; border: 1.5px dashed var(--border-strong); color: var(--text-mut); font-weight: 600; }
.mb-empty .ico { width: 20px; height: 20px; }
.mb-lists { align-items: start; }
@media (max-width: 560px) { .mb-stats { grid-template-columns: 1fr 1fr; } .mb-bb { width: 100%; } }

.lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; margin-bottom: 18px; }
.lb-pod { --medal: #c7d3dd; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px 0; overflow: hidden; cursor: pointer;
  border-radius: 20px 20px 14px 14px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit;
  animation: tpRise .55s cubic-bezier(.2,.8,.2,1) both; transition: transform .2s ease, border-color .2s ease; }
.lb-pod:hover { transform: translateY(-4px); border-color: var(--medal); }
.lb-pod.gold { --medal: #ffc718; } .lb-pod.bronze { --medal: #d9915b; }
:root[data-theme="light"] .lb-pod.silver { --medal: #8a99a6; }
:root[data-theme="light"] .lb-pod.gold { --medal: #d99e00; }
.lb-pod.me { box-shadow: 0 0 0 2px var(--primary); }
.lb-pod-av { position: relative; }
.lb-pod .lb-avatar { width: 66px; height: 66px; border: 3px solid var(--medal); }
.lb-pod.gold .lb-avatar { width: 88px; height: 88px; }
.lb-medal { position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--medal); color: #1a1300; font-family: var(--font-display); font-weight: 900; font-size: .82rem; border: 3px solid var(--surface); }
.lb-pod-name { margin-top: 6px; font-family: var(--font-display); font-weight: 800; font-size: .92rem; text-align: center; line-height: 1.15; }
.lb-pod-bb { color: var(--text-dim); font-weight: 700; }
.lb-pod-bb b { font-family: var(--font-display); font-weight: 900; font-size: 1.45rem; color: var(--medal); }
.lb-pod-sub { color: var(--text-mut); font-size: .78rem; font-weight: 600; text-align: center; }
.lb-pod-step { align-self: stretch; margin-top: 10px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--medal) 16%, transparent); border-top: 3px solid var(--medal); font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: var(--medal); }
.lb-pod.gold .lb-pod-step { height: 72px; font-size: 2rem; } .lb-pod.silver .lb-pod-step { height: 50px; }
.lb-row { animation: dsIn .35s cubic-bezier(.2,.8,.2,1) both; }
.lb-row.me { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.lb-av-wrap { position: relative; display: inline-flex; flex: none; }
.lb-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.lb-track { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.lb-track i { display: block; height: 100%; border-radius: 999px; background: var(--secondary); transform-origin: left; animation: srGrow .8s cubic-bezier(.2,.8,.2,1) both; }
@media (max-width: 560px) { .lb-pod .lb-avatar { width: 52px; height: 52px; } .lb-pod.gold .lb-avatar { width: 66px; height: 66px; } .lb-pod-sub { display: none; } }

/* ---- Settings ---- */
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.st-theme { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-theme-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1.5px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; transition: border-color .2s ease, transform .15s ease; }
.st-theme-opt:hover { transform: translateY(-2px); }
.st-theme-opt.on { border-color: var(--secondary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary) 22%, transparent); }
.st-theme-opt span { color: var(--text-mut); font-size: .82rem; font-weight: 600; }
.st-swatch { width: 100%; height: 46px; margin-bottom: 6px; border-radius: 9px; border: 1px solid var(--border); }
.st-theme-opt.dark .st-swatch { background: #0e141c; box-shadow: inset 0 -14px 0 #1b2734, inset 14px 0 0 #141d27; }
.st-theme-opt.light .st-swatch { background: #eef4f8; box-shadow: inset 0 -14px 0 #ffffff, inset 14px 0 0 #ffffff; }
.st-acct { display: flex; align-items: center; gap: 12px; }
.st-acct > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---- Dashboard ---- */
.db-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 24px 26px; margin-bottom: 16px; }
.db-hello { margin: 4px 0 2px; font-size: clamp(1.6rem, 4.4vw, 2.4rem); font-weight: 900; line-height: 1.1; }
.db-hello span { color: var(--secondary); }
.db-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.db-chip { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-strong); transition: transform .15s ease, border-color .2s ease; }
.db-chip:hover { transform: translateY(-2px); border-color: var(--primary); }
.db-chip b { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.db-chip.y b { color: var(--secondary); }
.db-chip span { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); }
.db-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.db-act { --tone: var(--secondary); display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border-strong); animation: tpRise .45s cubic-bezier(.2,.8,.2,1) both;
  transition: transform .18s ease, border-color .2s ease, box-shadow .2s ease; }
.db-act:hover { transform: translateY(-3px); border-color: var(--tone); box-shadow: 0 16px 30px -20px var(--tone); }
.db-act.c { --tone: var(--primary); } .db-act.g { --tone: var(--success); } .db-act.v { --tone: #a78bfa; }
.db-act-ico { width: 46px; height: 46px; flex: none; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--tone); color: #0a0e13; }
.db-act-ico .ico { width: 22px; height: 22px; }
.db-act-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.db-act-txt b { font-family: var(--font-display); font-size: .95rem; }
.db-act-txt span { color: var(--text-mut); font-size: .84rem; font-weight: 600; }
.db-act > .ico:last-child { color: var(--text-mut); transition: transform .2s ease, color .2s ease; }
.db-act:hover > .ico:last-child { transform: translateX(3px); color: var(--tone); }
.db-event { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.db-event-txt { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.db-event-name { font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; line-height: 1.2; }
.db-event-kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.db-event-kpis div { display: flex; flex-direction: column; align-items: center; min-width: 68px; padding: 8px 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.db-event-kpis b { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; }
.db-event-kpis span { font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mut); }
.db-event-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sl-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.sl-head h3 .ico { width: 18px; height: 18px; color: var(--secondary); }
.sl-ctrl { display: flex; align-items: center; gap: 6px; }
.cd-arrow.sm { width: 36px; height: 36px; border-radius: 10px; }
.sl-stage { position: relative; overflow: hidden; border-radius: var(--radius); }
.sl-card { flex-direction: column; align-items: stretch; margin: 0; min-height: 236px; padding: 22px 24px 24px; }
.sl-main { display: flex; align-items: center; gap: 16px; }
.sl-main .thero-id { flex: 1; }
.sl-photo { width: 156px; aspect-ratio: 4 / 3; object-fit: cover; flex: none; border-radius: 12px; border: 3px solid color-mix(in srgb, currentColor 30%, transparent); }
.sl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.sl-stat { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, currentColor 11%, transparent); }
.sl-stat span { font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }
.sl-stat b { font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; line-height: 1.15; }
.sl-stat small { font-size: .75rem; font-weight: 600; opacity: .78; }
.sl-open { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent); background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; font: inherit; font-weight: 800; }
.sl-open .ico { width: 16px; height: 16px; }
.sl-bar { height: 4px; margin-top: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.sl-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--secondary); }
@media (max-width: 640px) { .sl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sl-photo { display: none; } }

/* ---- Pick list: team colors ---- */
.ab-slot.filled.has-tc { background: var(--tc); color: var(--tcf); border-color: color-mix(in srgb, var(--tc2) 70%, transparent); }
.ab-slot.filled.has-tc .slot-x { color: inherit; }
.pool-team.has-tc { box-shadow: inset 4px 0 0 var(--tc); }
.tier-team.has-tc { background: var(--tc); color: var(--tcf); border-color: color-mix(in srgb, var(--tc2) 60%, transparent); }
.tier-team.has-tc .tt-x { color: inherit; opacity: .8; }
.dnp-item.has-tc { box-shadow: inset 4px 0 0 var(--tc); }

/* ---- Match scouting ---- */
.ms-pre { margin-bottom: 16px; }
.ms-pre-fields { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-strong); }
.robot-group.red .rg-label { color: #ff8a8a; } .robot-group.blue .rg-label { color: #7fb4ff; }
.robot-pick { --ally: var(--primary); position: relative; overflow: hidden; border-width: 2px; padding-bottom: 14px; }
.robot-pick.red { --ally: #e0564f; } .robot-pick.blue { --ally: #3f7fe0; }
.robot-pick::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--ally); }
.robot-pick.has-tc { background: var(--tc); color: var(--tcf); border-color: color-mix(in srgb, var(--ally) 60%, transparent); }
.robot-pick.has-tc .rp-name { color: inherit; opacity: .85; }
.rp-station { position: absolute; top: 6px; left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--ally); color: #fff;
  font-family: var(--font-display); font-weight: 900; font-size: .62rem; letter-spacing: .04em; }
.robot-pick.sel { border-color: var(--ally); transform: translateY(-3px); box-shadow: 0 0 0 3px var(--ally), 0 14px 26px -12px var(--ally); }
.robot-pick.sel::before { content: "✓"; position: absolute; top: 5px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--ally); color: #fff; font-weight: 900; font-size: .78rem; }
.ms-banner { --ally: var(--primary); position: sticky; top: 72px; z-index: 15; margin-bottom: 16px; padding: 14px 18px 16px 28px; gap: 14px;
  box-shadow: 0 18px 36px -22px rgba(0,0,0,.8); animation: dsIn .3s ease both; }
.ms-banner.red { --ally: #e0564f; } .ms-banner.blue { --ally: #3f7fe0; }
.ms-banner .thero-av { width: 56px; height: 56px; border-radius: 14px; }
.ms-banner .thero-num { font-size: 2rem; }
.ms-banner .thero-mark { display: none; }
.ms-band { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--ally); }
.ms-eyebrow { font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .82; }
.ms-ally-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 0;
  background: var(--ally); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
button.ms-ally-pill { cursor: pointer; background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; font: inherit; font-weight: 800; text-transform: none; letter-spacing: 0; }
button.ms-ally-pill .ico { width: 15px; height: 15px; }
.ms-ally-pill.red { background: #e0564f; } .ms-ally-pill.blue { background: #3f7fe0; }
.ms-phase h3 { display: flex; align-items: center; gap: 9px; }
.ms-phase-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent); }
.ms-form[data-ally="red"] .ms-phase { border-top: 4px solid #e0564f; }
.ms-form[data-ally="red"] .ms-phase-dot { background: #e0564f; box-shadow: 0 0 0 4px rgba(224,86,79,.2); }
.ms-form[data-ally="blue"] .ms-phase { border-top: 4px solid #3f7fe0; }
.ms-form[data-ally="blue"] .ms-phase-dot { background: #3f7fe0; box-shadow: 0 0 0 4px rgba(63,127,224,.2); }
.ms-savebar { position: sticky; bottom: 12px; z-index: 10; display: flex; gap: 10px; width: fit-content; max-width: 100%; padding: 10px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border-strong); box-shadow: 0 14px 30px -16px rgba(0,0,0,.6); }
.pill-toggle.ally button[data-v="red"].on { background: #e0564f; color: #fff; }
.pill-toggle.ally button[data-v="blue"].on { background: #3f7fe0; color: #fff; }

/* ---- Pit scouting ---- */
.pf-pick, .pf-fields { margin-bottom: 16px; }
.pf-fields h3 { display: flex; align-items: center; gap: 8px; }
.pf-fields h3 .ico, .pf-pick h3 .ico { color: var(--secondary); }
.pf-drop { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; cursor: pointer; border: 1.5px dashed var(--border-strong); background: var(--bg-2); transition: border-color .2s ease, background .2s ease; }
.pf-drop:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--bg-2)); }
.pf-drop > .ico { width: 30px; height: 30px; color: var(--primary); }
.pf-drop span { display: flex; flex-direction: column; } .pf-drop small { color: var(--text-mut); font-weight: 600; }
.pm-card { margin-bottom: 16px; }
.pm-filters { display: inline-flex; gap: 3px; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); }
.pm-filters button { padding: 7px 11px; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--text-dim);
  font-family: var(--font-display); font-weight: 800; font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; transition: background .2s ease, color .2s ease; }
.pm-filters button b { margin-left: 3px; opacity: .8; }
.pm-filters button.on { background: var(--primary); color: var(--on-primary); }
.pm-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pm-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.pm-bar i { display: block; height: 100%; border-radius: 999px; background: var(--success); transform-origin: left; animation: srGrow .9s cubic-bezier(.2,.8,.2,1) both; }
.pm-progress b { font-family: var(--font-display); }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pm-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 12px; cursor: pointer;
  color: var(--text); font: inherit; background: var(--surface-2); border: 1.5px dashed var(--border-strong); transition: transform .18s ease, opacity .25s ease, box-shadow .2s ease, border-color .2s ease; }
.pm-cell:hover { transform: translateY(-2px); border-color: var(--primary); }
.pm-cell .team-avatar { width: 28px; height: 28px; border-radius: 8px; border: 0; }
.pm-num { font-family: var(--font-display); font-weight: 800; font-size: .85rem; }
.pm-cell.done { border-style: solid; border-color: transparent; background: color-mix(in srgb, var(--success) 18%, var(--surface-2)); }
.pm-cell.done.has-tc { background: var(--tc); color: var(--tcf); }
.pm-check { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--success); color: #062413; border: 2px solid var(--surface); }
.pm-check .ico { width: 12px; height: 12px; stroke-width: 3.5; }
.pm-cell.sel { box-shadow: 0 0 0 3px var(--secondary); transform: translateY(-2px); }
.pm-cell.out { opacity: .16; transform: scale(.94); }
.socal-map.pm .socal-row { gap: 6px; }
.socal-map.pm .pm-cell { min-width: 72px; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pl-card { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--border-strong);
  animation: dsIn .4s cubic-bezier(.2,.8,.2,1) both; transition: transform .18s ease, border-color .2s ease; }
.pl-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.pl-card.has-tc { border-top: 5px solid var(--tc); }
.pl-photo { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: var(--bg-2); color: var(--text-mut); overflow: hidden; }
.pl-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.pl-card:hover .pl-photo img { transform: scale(1.05); }
.pl-photo .ico { width: 32px; height: 32px; }
.pl-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.pl-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pl-id .team-avatar { width: 28px; height: 28px; border-radius: 8px; }
.pl-id b { font-family: var(--font-display); font-size: 1.1rem; }
.pl-id span { color: var(--text-dim); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---- Events ---- */
.ev-hero { display: flex; align-items: stretch; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 24px 26px 24px 30px; margin-bottom: 16px; }
.ev-hero::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--secondary); }
.ev-hero-main { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-status { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border-strong); }
.ev-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ev-status.live { color: var(--success); border-color: color-mix(in srgb, var(--success) 50%, transparent); background: color-mix(in srgb, var(--success) 12%, transparent); }
.ev-status.live i { animation: evPulse 1.6s ease-in-out infinite; }
.ev-status.done { color: var(--secondary); border-color: color-mix(in srgb, var(--secondary) 50%, transparent); }
.ev-name { margin: 0; font-size: clamp(1.4rem, 3.6vw, 2.1rem); font-weight: 900; line-height: 1.15; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-dim); font-weight: 600; }
.ev-meta .ico { width: 15px; height: 15px; vertical-align: -2px; }
.ev-hero-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ev-hero-stats { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.ev-hero-stats > div { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 98px; padding: 12px 14px; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--border); }
.ev-hero-stats b { font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ev-hero-stats b small { font-size: .9rem; color: var(--text-mut); }
.ev-hero-stats span { font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); }
.ev-ring .tp-ring { width: 54px; height: 54px; }
@keyframes evPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 70%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.ev-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px; }
.ev-toolbar .ds-search { flex: 1 1 220px; }
.ev-toolbar .ds-search input { min-height: 44px; font-size: 1rem; }
.ev-pill { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border-radius: 999px; font-size: .72rem; background: color-mix(in srgb, currentColor 14%, transparent); }
.ev-pill .ico { width: 11px; height: 11px; }
.team-row.has-tc { box-shadow: inset 5px 0 0 var(--tc); }
.sched-row { position: relative; grid-template-columns: 58px 1fr auto 1fr; padding-bottom: 12px; transition: border-color .2s ease, transform .15s ease; }
.sched-row:hover { transform: translateX(2px); }
.sched-row .sr-label { display: flex; flex-direction: column; line-height: 1.15; }
.sched-row .sr-label small { font-family: var(--font-ui); font-weight: 600; font-size: .68rem; color: var(--text-mut); }
.sched-row.ours { border-color: color-mix(in srgb, var(--secondary) 60%, var(--border)); background: color-mix(in srgb, var(--secondary) 7%, var(--surface-2)); }
.sched-row .sr-team.hl { background: var(--secondary); color: var(--on-secondary) !important; }
.sched-row .sr-score b.w { text-decoration: underline; text-underline-offset: 3px; }
.sr-vs { color: var(--text-mut); font-size: .74rem; font-weight: 800; text-transform: uppercase; }
.sr-prob { position: absolute; left: 12px; right: 12px; bottom: 4px; height: 3px; border-radius: 3px; overflow: hidden; background: #3f7fe0; opacity: .8; }
.sr-prob i { display: block; height: 100%; background: #e0564f; }
.sched-row.flash { animation: evFlash 1.6s ease; }
@keyframes evFlash { 0%, 100% { box-shadow: none; } 25%, 60% { box-shadow: 0 0 0 3px var(--secondary); } }
.er-list { display: flex; flex-direction: column; gap: 6px; }
.er-row { display: grid; grid-template-columns: 40px 32px minmax(0, 1.4fr) minmax(100px, 1fr) 70px 64px; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; text-align: left;
  border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; animation: dsIn .35s ease both; transition: border-color .2s ease, transform .15s ease; }
.er-row:hover { border-color: var(--primary); transform: translateX(2px); }
.er-row.has-tc { box-shadow: inset 4px 0 0 var(--tc); }
.er-row.cap .er-rank { color: var(--secondary); }
.er-row.ours { border-color: var(--secondary); }
.er-rank { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; text-align: center; color: var(--text-dim); }
.er-row .team-avatar { width: 30px; height: 30px; border-radius: 8px; }
.er-id { display: flex; flex-direction: column; min-width: 0; }
.er-id b { font-family: var(--font-display); }
.er-id span { color: var(--text-dim); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.er-rp { display: flex; align-items: center; gap: 6px; }
.er-track { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.er-track i { display: block; height: 100%; border-radius: 999px; background: var(--secondary); transform-origin: left; animation: srGrow .8s cubic-bezier(.2,.8,.2,1) both; }
.er-rp b { font-family: var(--font-display); font-size: .9rem; }
.er-rp small, .er-epa small { margin-left: 2px; font-size: .62rem; font-weight: 800; color: var(--text-mut); }
.er-rec { font-family: var(--font-display); font-weight: 700; font-size: .86rem; text-align: center; color: var(--text-dim); }
.er-epa { font-family: var(--font-display); font-weight: 800; text-align: right; }
@media (max-width: 640px) { .er-row { grid-template-columns: 30px 28px minmax(0, 1fr) 54px 50px; } .er-rp { display: none; } }
a.tp-tile { text-decoration: none; color: var(--text); transition: transform .15s ease, border-color .2s ease; } a.tp-tile:hover { transform: translateY(-2px); border-color: var(--secondary); }

/* =========================================================================
   REVAMP · team profile — blue banners + history
   ========================================================================= */
.tp-banners { margin-bottom: 18px; }
.bb-strip { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.bb-banner { --bb: #0b5bb0; position: relative; flex: none; width: 176px; min-height: 236px; padding: 18px 14px 40px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center; text-decoration: none; color: #fff; background: var(--bb);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%);
  box-shadow: inset 0 6px 0 rgba(255,255,255,.18); transform-origin: top center;
  animation: bbHang .7s cubic-bezier(.2,1.3,.4,1) both; animation-delay: calc(var(--i) * 80ms); transition: transform .2s ease, filter .2s ease; }
.bb-banner::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: #08417f; }
.bb-banner:hover { transform: rotate(-1.5deg) translateY(-2px); filter: brightness(1.12); }
.bb-badge { width: 92px; height: 66px; margin-top: 4px; display: flex; align-items: center; justify-content: center; flex: none; }
.bb-badge img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.bb-banner b { font-family: var(--font-display); font-weight: 900; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; }
.bb-year { font-family: var(--font-display); font-weight: 900; font-size: 1.85rem; line-height: 1; }
.bb-banner small { font-size: .8rem; font-weight: 600; opacity: .88; line-height: 1.25; }
@keyframes bbHang { from { opacity: 0; transform: translateY(-16px) rotate(4deg); } to { opacity: 1; transform: none; } }
.th-tiles { margin-bottom: 16px; }
.th-chart-card { margin-bottom: 16px; }
.th-chart-wrap { overflow-x: auto; }
.th-chart { width: 100%; min-width: 520px; height: auto; display: block; }
.th-avg { stroke: var(--text-mut); stroke-dasharray: 5 5; stroke-width: 1.2; }
.th-axis { fill: var(--text-mut); font-size: 11px; font-family: var(--font-ui); font-weight: 700; }
.th-bar { cursor: pointer; }
.th-bar rect { fill: color-mix(in srgb, var(--primary) 70%, transparent); transform-box: fill-box; transform-origin: bottom; animation: thGrow .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 35ms); transition: fill .2s ease; }
.th-bar:hover rect { fill: var(--primary); }
.th-bar.best rect { fill: var(--secondary); }
.th-bar.cur rect { stroke: var(--text); stroke-width: 2; }
.th-flag { fill: #2f7fe0; }
@keyframes thGrow { from { transform: scaleY(0); } to { transform: none; } }
.th-list { display: flex; flex-direction: column; gap: 8px; }
.th-year { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 20px; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--text); text-decoration: none; animation: dsIn .4s ease both; transition: border-color .2s ease, transform .15s ease; }
.th-year:hover { border-color: var(--primary); transform: translateX(3px); }
.th-year.cur { border-color: var(--secondary); }
.th-year > .ico { color: var(--text-mut); }
.th-y { display: flex; flex-direction: column; }
.th-y b { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.th-y span { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-top: 4px; }
.th-mid { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.th-evs, .th-aws { display: flex; flex-wrap: wrap; gap: 5px; }
.th-ev { padding: 3px 9px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); font-size: .8rem; font-weight: 600; }
.tp-award.blue { background: color-mix(in srgb, #2f7fe0 20%, transparent); color: #7fb4ff; border-color: color-mix(in srgb, #2f7fe0 50%, transparent); }
:root[data-theme="light"] .tp-award.blue { color: #1f5fbf; }
.th-stats { display: flex; gap: 8px; }
.th-stats div { display: flex; flex-direction: column; align-items: center; min-width: 70px; padding: 7px 8px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.th-stats b { font-family: var(--font-display); font-weight: 900; font-size: 1rem; }
.th-stats span { font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mut); }
.th-stats .bn b { color: #7fb4ff; }
@media (max-width: 760px) { .th-year { grid-template-columns: minmax(0, 1fr) 20px; } .th-mid, .th-stats { grid-column: 1; } .th-stats { flex-wrap: wrap; } .th-year > .ico { grid-row: 1; grid-column: 2; } }

/* =========================================================================
   REVAMP · BagelStats
   ========================================================================= */
.bs-year, .bs-region { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text); }
.bs-year .ico, .bs-region .ico { width: 16px; height: 16px; color: var(--primary); flex: none; }
.bs-year select, .bs-region select { width: auto; min-height: 0; padding: 6px 2px; border: 0; background: transparent; color: inherit; font-family: var(--font-display); font-weight: 800; box-shadow: none; cursor: pointer; }
.bs-year.off { opacity: .5; }
.bs-region.grow { flex: 1 1 260px; } .bs-region.grow select { flex: 1; font-family: var(--font-ui); }
.bs-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; margin-bottom: 16px; }
.bs-pod { --medal: #c7d3dd; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px 18px; cursor: pointer; overflow: hidden;
  border-radius: 20px; border: 2px solid var(--medal); background: var(--surface); color: var(--text); font: inherit;
  animation: tpRise .55s cubic-bezier(.2,.8,.2,1) both; transition: transform .2s ease; }
.bs-pod:hover { transform: translateY(-4px); }
.bs-pod::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 2px, transparent 2px 12px); }
.bs-pod.has-tc { background: var(--tc); color: var(--tcf); }
.bs-pod.gold { --medal: #ffc718; padding-top: 34px; } .bs-pod.bronze { --medal: #d9915b; }
.bs-pod-medal { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--medal); color: #1a1300; font-family: var(--font-display); font-weight: 900; }
.bs-pod .team-avatar { width: 58px; height: 58px; border-radius: 16px; border: 3px solid color-mix(in srgb, currentColor 30%, transparent); }
.bs-pod.gold .team-avatar { width: 72px; height: 72px; }
.bs-pod-num { font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; line-height: 1; margin-top: 4px; }
.bs-pod-name { font-weight: 700; font-size: .86rem; opacity: .9; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-pod-epa { font-weight: 700; opacity: .9; }
.bs-pod-epa b { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; }
.bs-card { padding: 10px; }
.bs-list { display: flex; flex-direction: column; gap: 5px; }
.bs-row { display: grid; grid-template-columns: 52px 34px minmax(0, 1.3fr) minmax(90px, 1.6fr) 74px 92px; align-items: center; gap: 12px; padding: 8px 12px; cursor: pointer; text-align: left;
  border-radius: 12px; border: 1px solid transparent; background: var(--bg-2); color: var(--text); font: inherit; animation: dsIn .35s ease both; transition: border-color .2s ease, transform .15s ease, background .2s ease; }
.bs-row:hover { border-color: var(--primary); transform: translateX(3px); }
.bs-row.has-tc { box-shadow: inset 5px 0 0 var(--tc); }
.bs-row.ours { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 9%, var(--bg-2)); }
.bs-row.flash { animation: evFlash 1.8s ease; }
.bs-rank { font-family: var(--font-display); font-weight: 900; font-size: 1.05rem; text-align: center; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.bs-row .team-avatar { width: 34px; height: 34px; border-radius: 9px; }
.bs-id { display: flex; flex-direction: column; min-width: 0; }
.bs-id b { font-family: var(--font-display); font-weight: 900; }
.bs-id span { color: var(--text-dim); font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.bs-bar i { display: block; height: 100%; transform-origin: left; animation: srGrow .7s cubic-bezier(.2,.8,.2,1) both; }
.bs-bar i.a { background: var(--secondary); } .bs-bar i.t { background: var(--primary); } .bs-bar i.e { background: var(--success); }
.bs-epa, .bs-rec { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.bs-epa b { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; }
.bs-rec { font-family: var(--font-display); font-weight: 700; font-size: .9rem; }
.bs-epa small, .bs-rec small { font-family: var(--font-ui); font-size: .66rem; font-weight: 700; color: var(--text-mut); }
.bs-more { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 6px 4px; }
@media (max-width: 760px) { .bs-row { grid-template-columns: 38px 30px minmax(0, 1fr) 64px; } .bs-bar, .bs-rec { display: none; } .bs-row .team-avatar { width: 30px; height: 30px; } }
@media (max-width: 560px) { .bs-podium { gap: 8px; } .bs-pod { padding: 18px 6px 12px; } .bs-pod-num { font-size: 1.25rem; } .bs-pod .team-avatar { width: 44px; height: 44px; } .bs-pod.gold .team-avatar { width: 54px; height: 54px; } }

/* =========================================================================
   REVAMP · Compare + Charts
   ========================================================================= */
.cmp-add .ds-search { flex: 1 1 200px; }
.cmp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.cmp-tile { position: relative; }
.cmp-tile .ds-team { width: 100%; height: 100%; box-shadow: inset 0 -5px 0 var(--line); }
.cmp-line { display: inline-block; width: 18px; height: 4px; border-radius: 2px; background: var(--line); margin-right: 4px; vertical-align: middle; }
.cmp-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 8px; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); color: #fff; }
.cmp-x:hover { background: var(--danger); }
.cmp-x .ico { width: 14px; height: 14px; }
.cmp-card { margin-bottom: 16px; }
.cmp-split { align-items: start; }
.cmp-table td.best { color: var(--success); font-weight: 800; }
.cmp-th { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); }
.cmp-th i { width: 10px; height: 10px; border-radius: 50%; }
.cmp-break { display: flex; flex-direction: column; gap: 10px; }
.cmp-brow { display: grid; grid-template-columns: 80px minmax(0, 1fr) 56px; align-items: center; gap: 10px; }
.cmp-bteam { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 800; }
.cmp-bteam i { width: 10px; height: 10px; border-radius: 50%; }
.cmp-brow b { font-family: var(--font-display); text-align: right; }
.cmp-stack { height: 14px; }
.cmp-legend .tp-key { display: inline-block; margin-right: 4px; vertical-align: middle; }
.ch-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px; }
.ch-sel { display: inline-flex; flex-direction: column; gap: 2px; }
.ch-sel span { font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); }
.ch-sel select { width: auto; min-height: 38px; padding: 6px 10px; font-weight: 700; }
.ch-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--text-dim); user-select: none; }
.ch-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.ch-switch { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--border-strong); transition: background .2s ease; flex: none; }
.ch-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.ch-toggle input:checked + .ch-switch { background: var(--primary); }
.ch-toggle input:checked + .ch-switch::after { transform: translateX(18px); }
.ch-toggle input:focus-visible + .ch-switch { outline: 2px solid var(--primary); outline-offset: 2px; }
.ch-find { flex: 0 1 200px; }
.ch-find input { min-height: 40px; font-size: .95rem; }
.ch-card { margin-bottom: 16px; }
.ch-wrap { position: relative; }
.ch-svg { width: 100%; height: auto; display: block; }
.ch-svg .cg { stroke: var(--border); stroke-width: 1; }
.ch-ax { fill: var(--text-mut); font-size: 11px; font-weight: 700; font-family: var(--font-ui); }
.ch-axt { fill: var(--text-dim); font-size: 12px; font-weight: 800; font-family: var(--font-display); letter-spacing: .04em; }
.ch-b { fill: var(--primary); fill-opacity: .32; stroke: var(--primary); stroke-opacity: .55; stroke-width: 1; cursor: pointer; transition: fill-opacity .15s ease, r .15s ease; }
.ch-b.ev { fill: var(--secondary); fill-opacity: .75; stroke: var(--secondary); }
.ch-b.us { fill: var(--secondary); fill-opacity: 1; stroke: var(--text); stroke-width: 2.5; }
.ch-b.cmp { fill: var(--c); fill-opacity: .95; stroke: var(--text); stroke-width: 2; }
.ch-b.find { fill: #fff; fill-opacity: 1; stroke: var(--danger); stroke-width: 3; }
.ch-b.hov { fill-opacity: 1; stroke: var(--text); stroke-width: 2.5; }
.ch-lbl { fill: var(--text); font-size: 12px; font-weight: 800; font-family: var(--font-display); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; pointer-events: none; }
.ch-tip { position: absolute; z-index: 5; min-width: 180px; max-width: 220px; padding: 9px 12px; border-radius: 12px; pointer-events: none;
  background: var(--elevated); border: 1px solid var(--border-strong); box-shadow: 0 14px 30px -14px rgba(0,0,0,.7); display: flex; flex-direction: column; gap: 3px; font-size: .86rem; }
.ch-tip > b { font-family: var(--font-display); font-size: 1.05rem; }
.ch-tip span { color: var(--text-dim); }
.ch-tip span b { color: var(--text); }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .84rem; font-weight: 700; color: var(--text-dim); }
.ch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ch-key { width: 12px; height: 12px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 45%, transparent); border: 1px solid var(--primary); }
.ch-key.ev { background: var(--secondary); border-color: var(--secondary); }
.ch-key.us { background: var(--secondary); border: 2px solid var(--text); }
.ch-key.cmp { background: #f2555a; border: 2px solid var(--text); }
.ch-key.find { background: #fff; border: 2px solid var(--danger); }
.ch-hbar { fill: color-mix(in srgb, var(--primary) 65%, transparent); transform-box: fill-box; transform-origin: bottom; animation: thGrow .6s cubic-bezier(.2,.8,.2,1) both; }
.ch-hbar:hover { fill: var(--primary); }
.ch-mark { stroke-width: 2.5; stroke-dasharray: 4 3; }
.ch-mark.us { stroke: var(--secondary); }
.ch-top { display: flex; flex-direction: column; gap: 5px; }
.ch-trow { display: grid; grid-template-columns: 26px 54px minmax(0, 1fr) 52px; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; border: 0; cursor: pointer;
  background: none; color: var(--text); font: inherit; text-align: left; animation: dsIn .35s ease both; }
.ch-trow:hover { background: var(--bg-2); }
.ch-trow.ours { background: color-mix(in srgb, var(--secondary) 12%, transparent); }
.ch-tr { color: var(--text-mut); font-weight: 800; text-align: right; }
.ch-tn { font-family: var(--font-display); font-weight: 800; }
.ch-trow b { font-family: var(--font-display); text-align: right; }
.ch-tstack { height: 12px; }

/* =========================================================================
   REVAMP · Matchup arena
   ========================================================================= */
.mu-arena { display: grid; grid-template-columns: minmax(0, 1fr) 240px minmax(0, 1fr); gap: 14px; align-items: stretch; margin-bottom: 16px; }
.mu-side { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface);
  border: 1.5px solid var(--border-strong); border-top: 5px solid var(--ally); animation: tpRise .45s cubic-bezier(.2,.8,.2,1) both; }
.mu-side.red { --ally: #e0564f; } .mu-side.blue { --ally: #3f7fe0; animation-delay: .08s; }
.mu-side-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 900; font-size: .95rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ally); margin-bottom: 2px; }
.mu-teamcard.red { --ally: #e0564f; } .mu-teamcard.blue { --ally: #3f7fe0; }
.mu-side-total { margin-left: auto; font-size: .78rem; color: var(--text-dim); letter-spacing: .02em; }
.mu-slot { position: relative; display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 8px 10px; border-radius: 13px; animation: dsIn .35s ease both; }
.mu-slot.empty { border: 1.5px dashed var(--border-strong); background: var(--bg-2); }
.mu-slot.empty:focus-within { border-color: var(--ally); }
.mu-slot.filled { background: var(--surface-2); border: 1.5px solid transparent; box-shadow: inset 5px 0 0 var(--ally); }
.mu-slot.filled.has-tc { background: var(--tc); color: var(--tcf); }
.mu-slot-n { width: 34px; height: 34px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--ally); color: #fff; font-family: var(--font-display); font-weight: 900; font-size: .8rem; }
.mu-slot.empty select, .mu-slot.empty input { flex: 1; min-width: 0; min-height: 42px; border-radius: 10px; }
.mu-slot .team-avatar { width: 42px; height: 42px; border-radius: 11px; flex: none; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); }
.mu-slot-id { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.mu-slot-id b { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; line-height: 1.1; }
.mu-slot-id span { font-size: .8rem; font-weight: 600; opacity: .85; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-slot-epa { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.mu-slot-epa b { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; }
.mu-slot-epa small { font-size: .62rem; font-weight: 800; opacity: .75; }
.mu-slot-x { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; }
.mu-slot-x:hover { background: var(--danger); color: #fff; }
.mu-slot-x .ico { width: 14px; height: 14px; }
.mu-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px 12px; text-align: center;
  border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--border-strong); }
.mu-vs { font-family: var(--font-display); font-weight: 900; font-size: .8rem; letter-spacing: .3em; color: var(--text-mut); }
.mu-scores { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-weight: 900; font-variant-numeric: tabular-nums; }
.mu-scores b { font-size: 2.8rem; line-height: 1; }
.mu-scores b.red { color: #ff8a8a; } .mu-scores b.blue { color: #7fb4ff; }
:root[data-theme="light"] .mu-scores b.red { color: #c9372f; } :root[data-theme="light"] .mu-scores b.blue { color: #1f5fbf; }
.mu-scores span { color: var(--text-mut); font-size: 1.4rem; }
.mu-pred { font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mut); }
.mu-probbar { width: 100%; height: 10px; margin-top: 8px; border-radius: 999px; background: #3f7fe0; overflow: hidden; }
.mu-probbar i { display: block; height: 100%; background: #e0564f; border-right: 2px solid var(--surface); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.mu-probtxt { width: 100%; display: flex; justify-content: space-between; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--text-dim); }
.mu-probtxt .red { color: #ff8a8a; font-family: var(--font-display); } .mu-probtxt .blue { color: #7fb4ff; font-family: var(--font-display); }
.mu-time-label { display: inline-flex; align-items: center; gap: 6px; }
.mu-time-label .ico { width: 15px; height: 15px; }
.mu-ticks { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 700; color: var(--text-mut); margin-top: 4px; }
.mu-phases { margin-bottom: 16px; }
.mu-ph { display: grid; grid-template-columns: 64px minmax(0, 1fr) 90px minmax(0, 1fr) 64px; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.mu-ph:first-of-type { border-top: 0; }
.mu-ph.tot { border-top: 2px solid var(--border-strong); }
.mu-ph-l { text-align: center; font-family: var(--font-display); font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.mu-ph-bar { height: 12px; border-radius: 999px; background: var(--bg-2); overflow: hidden; display: flex; }
.mu-ph-bar.red { justify-content: flex-end; }
.mu-ph-bar i { display: block; height: 100%; border-radius: 999px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.mu-ph-bar.red i { background: #e0564f; } .mu-ph-bar.blue i { background: #3f7fe0; }
.mu-ph-val { font-family: var(--font-display); font-weight: 800; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.mu-ph-val.red { text-align: right; } .mu-ph-val.win { color: var(--text); }
.mu-ph-val.red.win { color: #ff8a8a; } .mu-ph-val.blue.win { color: #7fb4ff; }
.mu-ph.tot .mu-ph-val { font-size: 1.1rem; }
button.mu-trow { width: 100%; background: none; border: 0; border-top: 1px solid var(--border); color: var(--text); font: inherit; text-align: left; border-radius: 0; }
button.mu-trow.has-tc { box-shadow: inset 4px 0 0 var(--tc); padding-left: 10px; }
@media (max-width: 900px) { .mu-arena { grid-template-columns: 1fr; } .mu-center { order: -1; } }

/* =========================================================================
   REVAMP · Admin
   ========================================================================= */
.ad-lock { max-width: 420px; margin: 40px auto; padding: 30px 26px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.ad-lock.shake { animation: shake .4s cubic-bezier(.36,.07,.19,.97); }
.ad-lock h2 { margin: 0; }
.ad-lock .hint { margin: 0; }
.ad-lock .auth-field { text-align: left; }
.ad-lock-ico { align-self: center; width: 70px; height: 70px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--secondary) 16%, var(--surface-2)); color: var(--secondary); border: 2px solid color-mix(in srgb, var(--secondary) 55%, transparent); }
.ad-lock-ico .ico { width: 32px; height: 32px; }
.ad-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-stats a { display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border-strong); transition: border-color .2s ease, transform .15s ease; }
.ad-stats a:hover { border-color: var(--primary); transform: translateY(-2px); }
.ad-stats a.hot { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 12%, var(--bg-2)); }
.ad-stats b { font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; line-height: 1.1; }
.ad-stats a.hot b { color: var(--secondary); }
.ad-stats span { font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); }
.ad-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--secondary); color: var(--on-secondary); font-size: .7rem; font-weight: 900; }

/* ==== v85: universal search, notices, required fields, Event search, Data stats ==== */

/* ---- Universal search (top bar) ---- */
.gsearch { position: relative; flex: 0 1 380px; min-width: 0; }
.gs-open { display: none; }
.gs-box { position: relative; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 8px 0 38px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.gs-box > .ico { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--text-mut); pointer-events: none; transition: color .18s ease; }
.gs-box:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.gs-box:focus-within > .ico { color: var(--primary); }
.gs-box input[type="search"] { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
  box-shadow: none; color: var(--text); font-size: .98rem; font-weight: 600; }
.gs-box input[type="search"]:focus { box-shadow: none; }
.gs-box input::-webkit-search-cancel-button { cursor: pointer; }
.gsearch kbd, .gs-foot kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text-mut); font: 700 .7rem/1 var(--font-ui); }
.gs-box:focus-within .gs-kbd { opacity: 0; }
.gs-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: min(460px, calc(100vw - 24px)); max-height: min(72vh, 540px);
  overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); animation: gsIn .16s ease both; }
.gs-panel[hidden] { display: none; }
@keyframes gsIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.gs-sec { display: flex; align-items: center; gap: 6px; padding: 10px 10px 4px; font-family: var(--font-display); font-weight: 800; font-size: .64rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-mut); }
.gs-sec .ico { width: 13px; height: 13px; }
.gs-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 11px;
  color: var(--text); text-decoration: none; box-shadow: inset 3px 0 0 var(--tc, transparent); transition: background .12s ease; }
.gs-item.on, .gs-item:hover { background: color-mix(in srgb, var(--primary) 13%, transparent); }
.gs-item .team-avatar { width: 38px; height: 38px; border-radius: 10px; }
.gs-main { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.gs-main b { font-family: var(--font-display); font-weight: 800; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-main span { color: var(--text-dim); font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-item mark { background: color-mix(in srgb, var(--secondary) 34%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.gs-ev-ico { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  background: color-mix(in srgb, var(--secondary) 14%, var(--surface-2)); color: var(--secondary); }
.gs-ev-ico .ico { width: 18px; height: 18px; }
.gs-ev-ico b { position: absolute; right: -4px; bottom: -4px; padding: 1px 4px; border-radius: 6px; background: var(--secondary); color: var(--on-secondary);
  font: 800 .6rem/1.2 var(--font-display); }
.gs-tag { padding: 3px 8px; border-radius: 999px; font-family: var(--font-display); font-weight: 800; font-size: .66rem; white-space: nowrap;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 13%, transparent); }
.gs-tag.mine { color: var(--secondary); background: color-mix(in srgb, var(--secondary) 14%, transparent); }
.gs-empty { display: flex; align-items: center; gap: 10px; padding: 18px 14px; color: var(--text-dim); font-weight: 600; }
.gs-foot { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 4px; padding: 9px 10px 5px; border-top: 1px solid var(--border);
  color: var(--text-mut); font-size: .78rem; }
.gs-empty .tp-spin, .gs-foot .tp-spin { width: 14px; height: 14px; border-width: 2px; }
@media (max-width: 1100px) { .gsearch { flex-basis: 280px; } .gs-kbd { display: none; } }
@media (max-width: 760px) {
  .gsearch { flex: none; position: static; }
  .gs-open { display: inline-flex; }
  .gs-box { display: none; }
  .gsearch.open .gs-box { display: flex; position: fixed; left: 10px; right: 10px; top: 9px; z-index: 46; height: 48px; background: var(--surface);
    border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent), var(--shadow); }
  .gsearch.open .gs-box input[type="search"] { font-size: 16px; } /* no iOS zoom */
  .topbar:has(.gsearch.open) > :not(.gsearch) { visibility: hidden; }
  .gs-panel { position: fixed; left: 10px; right: 10px; top: 64px; width: auto; max-height: calc(100dvh - 80px); }
}

/* signed-in name opens your profile */
.topbar .scout-tag .st-me { color: var(--text); font-weight: 700; text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--primary) 60%, transparent);
  transition: color .15s ease, border-color .15s ease; }
.topbar .scout-tag .st-me:hover, .topbar .scout-tag .st-me:focus-visible { color: var(--primary); border-bottom-color: var(--primary); outline: none; }

/* ---- Notice banner (an admin changed a form) ---- */
.nb-host { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 120; width: min(560px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.nb { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-radius: 16px; background: var(--elevated);
  border: 1px solid color-mix(in srgb, var(--secondary) 55%, var(--border)); box-shadow: 0 18px 40px -16px rgba(0,0,0,.65);
  animation: nbIn .34s cubic-bezier(.2,.9,.3,1.15) both; }
.nb.out { animation: nbOut .25s ease forwards; }
@keyframes nbIn { from { opacity: 0; transform: translateY(-16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes nbOut { to { opacity: 0; transform: translateY(-12px) scale(.97); } }
.nb-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--secondary);
  background: color-mix(in srgb, var(--secondary) 16%, transparent); }
.nb-ico .ico { width: 20px; height: 20px; animation: authBell 1.4s ease .2s 2; transform-origin: 50% 10%; }
.nb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nb-txt b { font-weight: 700; line-height: 1.3; }
.nb-txt span { color: var(--text-dim); font-size: .84rem; }
.nb-act { flex: none; }
.nb-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--text-mut); cursor: pointer; }
.nb-x:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.nb-x .ico { width: 18px; height: 18px; }
@media (max-width: 520px) { .nb { flex-wrap: wrap; } .nb-act { order: 3; flex: 1 1 100%; } }

/* ---- Required fields ---- */
.req { color: var(--danger); font-weight: 800; margin-left: 2px; }
.field.missing > label { color: var(--danger); }
.field.missing input, .field.missing select, .field.missing textarea, .field.missing .rating {
  border-color: var(--danger) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.field.missing .rating { border: 1px solid; border-radius: 12px; padding: 4px; width: fit-content; }
.field.missing { animation: shake .4s ease; }
.field.missing::after { content: "Required"; color: var(--danger); font-size: .78rem; font-weight: 700; }
.switch.sm { display: inline-block; vertical-align: middle; width: 40px; height: 24px; }
.switch.sm .slider::before { width: 16px; height: 16px; }
.switch.sm input:checked + .slider::before { transform: translateX(16px); }
.switch input:disabled + .slider { opacity: .35; cursor: not-allowed; }

/* hold-to-repeat counters: no double-tap zoom or text selection while holding */
.counter button { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* ---- Match scouting: deselect ---- */
.ms-desel { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent); background: color-mix(in srgb, currentColor 10%, transparent); color: inherit;
  font-family: var(--font-display); font-weight: 800; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; transition: background .15s ease, transform .1s ease; }
.ms-desel:hover { background: color-mix(in srgb, currentColor 20%, transparent); }
.ms-desel:active { transform: scale(.94); }
.ms-desel .ico { width: 15px; height: 15px; }
.ms-banner .thero-id + .ms-desel { margin-left: auto; }
@media (max-width: 560px) { .ms-desel span { display: none; } .ms-desel { padding: 0 10px; } }

/* ---- Event: Event search ---- */
.es-tools { position: sticky; top: 72px; z-index: 12; }
.es-group { margin-bottom: 22px; }
.es-month { display: flex; align-items: center; gap: 9px; margin: 6px 2px 12px; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; }
.es-month .ico { width: 18px; height: 18px; color: var(--secondary); }
.es-month .muted { font-family: var(--font-ui); font-size: .85rem; color: var(--text-mut); text-transform: none; letter-spacing: 0; }
.es-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.es-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 14px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; animation: dsIn .35s ease both; }
.es-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); opacity: .55; transition: opacity .18s ease, width .18s ease; }
.es-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 16px 30px -20px rgba(0,0,0,.7); }
.es-card:hover::before { opacity: 1; width: 6px; }
.es-card.mine { border-color: color-mix(in srgb, var(--secondary) 60%, var(--border)); background: color-mix(in srgb, var(--secondary) 6%, var(--surface)); }
.es-card.mine::before { background: var(--secondary); opacity: 1; }
.es-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.es-top .ev-status { padding: 3px 9px; font-size: .62rem; }
.es-type { font-family: var(--font-display); font-weight: 800; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.es-name { font-family: var(--font-display); font-weight: 800; font-size: 1rem; line-height: 1.25; }
.es-meta { display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: .86rem; font-weight: 600; min-width: 0; }
.es-meta .ico { width: 14px; height: 14px; flex: none; color: var(--text-mut); }
.es-mine { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--secondary); font-family: var(--font-display); font-weight: 800; font-size: .66rem;
  letter-spacing: .08em; text-transform: uppercase; }
.es-mine .ico { width: 13px; height: 13px; }
.ex-winners { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-weight: 700; color: var(--text-dim); }
.ex-winners > .ico { width: 18px; height: 18px; color: var(--secondary); }
.ex-chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; font-family: var(--font-display); font-weight: 800; font-size: .8rem;
  color: var(--text); text-decoration: none; background: var(--surface-2); border: 1px solid var(--border-strong); transition: border-color .15s ease, color .15s ease; }
.ex-chip:hover { border-color: var(--primary); color: var(--primary); }
.ex-winners .ex-chip { border-color: color-mix(in srgb, var(--secondary) 50%, var(--border)); }
.tp-award-card .ex-chip { margin: 2px 2px 2px 0; }
.sched-row.static { cursor: default; }
.sched-row.static:hover { border-color: var(--border); }

/* ---- Data: Search has Teams | Data ---- */
.ds-views { margin-bottom: 14px; }
.seg a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 9px; text-decoration: none;
  color: var(--text-dim); font-family: var(--font-display); font-weight: 800; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; transition: background .2s ease, color .2s ease; }
.seg a .ico { width: 16px; height: 16px; }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--primary); color: var(--on-primary); }

/* ---- Data: rank teams by any scouted stat ---- */
.dst { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.dst-pick { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; padding: 14px; }
.dst-pick .ds-search { flex: none; margin-bottom: 12px; }
.dst-pick .ds-search input { min-height: 46px; font-size: 1rem; }
.dst-group { margin-bottom: 14px; }
.dst-group h4 { margin: 0 0 8px 2px; font-family: var(--font-display); font-weight: 800; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mut); }
.dst-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dst-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 11px; border-radius: 10px; text-decoration: none;
  color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: .88rem; line-height: 1.15;
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .12s ease; }
.dst-chip .ico { width: 14px; height: 14px; flex: none; color: var(--text-mut); }
.dst-chip:hover { color: var(--text); border-color: var(--primary); transform: translateY(-1px); }
.dst-chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.dst-chip.on .ico { color: currentColor; }
.dst-chip[hidden], .dst-group[hidden] { display: none; }
.dst-main { min-width: 0; }
.dst-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; position: relative; overflow: hidden; padding-left: 24px; }
.dst-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--primary); }
.dst-title { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dst-title h3 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.dst-row .bs-bar i.a { background: var(--primary); }
.dst-sel { margin-bottom: 12px; }
.dst-sel .sr-head h3 { font-size: 1.05rem; }
.dst-main .bs-podium { margin-bottom: 14px; }
@media (max-width: 900px) {
  .dst { grid-template-columns: 1fr; }
  .dst-pick { position: static; max-height: none; }
  .dst-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .dst-chip { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gs-panel, .nb, .nb.out, .es-card, .field.missing, .nb-ico .ico { animation: none !important; }
}

/* hidden username for password managers (must stay in layout flow, not display:none) */
.auth-user { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; overflow: hidden; clip-path: inset(50%); }

/* ==== v89: Bagel Bets (match pools, alliance picks, bracket, fantasy) ==== */
:root { --pool-higher: #a78bfa; --pool-accurate: var(--success); --pool-lower: var(--primary); --pool-upset: #fb7185; }

/* ---- hero + wallet ---- */
.bt-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 22px 24px 22px 30px; margin-bottom: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.bt-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--secondary); }
.bt-hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--secondary) 16%, transparent), transparent 70%); pointer-events: none; }
.bt-hero-txt { flex: 1 1 320px; min-width: 0; position: relative; z-index: 1; }
.bt-hero .pg-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--secondary); }
.bt-hero .pg-eyebrow .ico { width: 15px; height: 15px; }
.bt-hero .pg-title { margin: 4px 0 4px; }
.bt-hero .pg-sub { margin: 0; color: var(--text-dim); max-width: 640px; }
.bt-wallet { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; min-width: 250px; border-radius: 16px;
  background: var(--bg-2); border: 1px solid color-mix(in srgb, var(--secondary) 45%, var(--border)); }
.bt-w-main { display: flex; align-items: center; gap: 12px; }
.bt-w-main > .ico { width: 34px; height: 34px; padding: 7px; border-radius: 12px; color: var(--on-secondary); background: var(--secondary); flex: none; }
.bt-w-main b { display: block; font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; line-height: 1; color: var(--secondary); }
.bt-w-main span { font-size: .78rem; color: var(--text-mut); font-weight: 700; }
.bt-w-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bt-w-row > div { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 10px; background: var(--surface); }
.bt-w-row b { font-family: var(--font-display); font-weight: 800; font-size: .95rem; }
.bt-w-row span { font-size: .68rem; color: var(--text-mut); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.bt-w-row .up b { color: var(--success); } .bt-w-row .down b { color: var(--danger); }
.bt-tabs { margin-bottom: 14px; }
.bt-closed .ico { color: var(--secondary); }

/* ---- how it works ---- */
.bt-how { margin-bottom: 12px; padding: 0; overflow: hidden; }
.bt-how summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; cursor: pointer; font-weight: 700; list-style: none; }
.bt-how summary::-webkit-details-marker { display: none; }
.bt-how summary .ico { width: 18px; height: 18px; color: var(--primary); }
.bt-how summary .hint { margin-left: auto; }
.bt-how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; padding: 0 16px 16px; }
.bt-how-grid > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.bt-how-grid b { font-family: var(--font-display); font-size: .78rem; letter-spacing: .04em; color: var(--secondary); }
.bt-how-grid span { color: var(--text-dim); font-size: .9rem; line-height: 1.4; }

.bt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px; margin-bottom: 14px; }
.bt-count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 999px; font-size: .62rem;
  background: color-mix(in srgb, currentColor 16%, transparent); }
.bt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.bt-more { display: flex; justify-content: center; margin-top: 14px; }

/* ---- match card ---- */
.bt-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; transition: border-color .18s ease, box-shadow .18s ease; }
[data-intro] .bt-card, [data-intro] .br-match, [data-intro] .fx-row, [data-intro] .fx-card, [data-intro] .fx-league { animation: dsIn .35s ease both; }
.bt-card.open:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.bt-card.has-mine { border-color: color-mix(in srgb, var(--secondary) 55%, var(--border)); box-shadow: inset 0 3px 0 var(--secondary); }
.bt-card.final { opacity: .96; }
.bt-head { display: flex; align-items: center; gap: 8px; }
.bt-label { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; }
.bt-2x { padding: 3px 8px; border-radius: 999px; font-family: var(--font-display); font-weight: 800; font-size: .62rem; letter-spacing: .06em;
  color: var(--on-secondary); background: var(--secondary); }
.bt-when { margin-left: auto; font-size: .86rem; color: var(--text-dim); font-weight: 700; }
.bt-when b { font-family: var(--font-display); color: var(--text); }
.bt-live { display: inline-flex; align-items: center; gap: 4px; color: var(--warning); }
.bt-live .ico { width: 14px; height: 14px; animation: btBlink 1.4s ease-in-out infinite; }
.bt-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.bt-side { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; border: 1px solid transparent; }
.bt-side.red { background: rgba(224, 86, 79, .1); align-items: flex-start; }
.bt-side.blue { background: rgba(63, 127, 224, .1); align-items: flex-end; }
.bt-side.fav.red { border-color: rgba(224, 86, 79, .45); } .bt-side.fav.blue { border-color: rgba(63, 127, 224, .45); }
.bt-side.won { box-shadow: 0 0 0 2px var(--secondary); }
.bt-avs { display: flex; gap: 4px; }
.bt-avs .team-avatar { width: 30px; height: 30px; border-radius: 8px; cursor: pointer; }
.bt-nums { display: flex; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: .78rem; }
.bt-side.red .bt-nums { color: #ff9b95; } .bt-side.blue .bt-nums { color: #8fb8ff; }
.bt-nums .us { color: var(--secondary); }
.bt-pred { font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; line-height: 1; }
.bt-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 78px; }
.bt-conf { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; color: var(--secondary); }
.bt-line { font-weight: 700; font-size: .84rem; color: var(--text); }
.bt-lock { display: inline-flex; align-items: center; gap: 3px; font-size: .68rem; color: var(--text-mut); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.bt-lock .ico { width: 11px; height: 11px; }
.bt-prob { height: 6px; border-radius: 999px; overflow: hidden; background: #3f7fe0; }
.bt-prob i { display: block; height: 100%; background: #e0564f; transition: width .5s ease; }
.bt-pools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bt-pool { --pc: var(--primary); position: relative; display: flex; flex-direction: column; gap: 5px; padding: 10px 11px; text-align: left; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit;
  transition: border-color .15s ease, transform .12s ease, background .15s ease, box-shadow .15s ease; }
.bt-pool.higher { --pc: var(--pool-higher); } .bt-pool.accurate { --pc: var(--pool-accurate); } .bt-pool.lower { --pc: var(--pool-lower); } .bt-pool.upset { --pc: var(--pool-upset); }
.bt-pool::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.bt-pool:not(:disabled):hover { border-color: var(--pc); transform: translateY(-2px); }
.bt-pool:disabled { cursor: default; }
.bt-pool.on, .bt-pool.mine { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 13%, var(--surface-2)); box-shadow: 0 0 0 1px var(--pc); }
.bt-pool.win { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 20%, var(--surface-2)); box-shadow: 0 0 0 2px var(--pc); }
.bt-pool.lose { opacity: .45; }
.bt-pool-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.bt-pool-top b { font-family: var(--font-display); font-weight: 800; font-size: .82rem; color: var(--pc); letter-spacing: .02em; }
.bt-pool-top em { font-style: normal; font-family: var(--font-display); font-weight: 800; font-size: .8rem; }
.bt-pool-top .ico { width: 16px; height: 16px; color: var(--pc); }
.bt-pool-cond { font-size: .8rem; color: var(--text-dim); font-weight: 600; line-height: 1.25; min-height: 2.5em; }
.bt-pool-bar { height: 4px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.bt-pool-bar i { display: block; height: 100%; background: var(--pc); transition: width .4s ease; }
.bt-pool-foot { display: flex; justify-content: space-between; gap: 6px; font-size: .72rem; color: var(--text-mut); font-weight: 700; }
.bt-stake { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--border-strong); animation: dsIn .2s ease both; }
.bt-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.bt-chips button { min-height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-family: var(--font-display); font-weight: 800; font-size: .72rem; cursor: pointer; }
.bt-chips button:hover, .bt-chips button.on { border-color: var(--secondary); color: var(--secondary); }
.bt-amt-wrap { position: relative; flex: 1 1 110px; display: flex; align-items: center; }
.bt-amt-wrap .ico { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--secondary); pointer-events: none; }
.bt-amt-wrap input { padding-left: 34px; min-height: 40px; font-family: var(--font-display); font-weight: 800; }
.bt-place { flex: 1 1 100%; justify-content: center; flex-wrap: wrap; gap: 2px 8px; }
.bt-place small { font-family: var(--font-ui); font-weight: 700; text-transform: none; letter-spacing: 0; opacity: .8; }
.bt-mine { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; border-radius: 11px; font-size: .9rem;
  background: color-mix(in srgb, var(--secondary) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--secondary) 35%, transparent); }
.bt-mine > .ico { width: 16px; height: 16px; color: var(--secondary); }
.bt-mine-res { margin-left: auto; font-family: var(--font-display); font-weight: 800; }
.bt-mine.won { background: color-mix(in srgb, var(--success) 12%, var(--surface-2)); border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.bt-mine.won .bt-mine-res { color: var(--success); }
.bt-mine.lost { background: color-mix(in srgb, var(--danger) 9%, var(--surface-2)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.bt-mine.lost .bt-mine-res { color: var(--danger); }
.bt-cancel { border: 0; background: none; color: var(--text-mut); font-weight: 700; cursor: pointer; text-decoration: underline; padding: 4px; }
.bt-cancel:hover { color: var(--danger); }
.bt-void { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 11px; color: var(--text-dim); background: var(--surface-2); font-weight: 600; }
.bt-void .ico { width: 16px; height: 16px; color: var(--danger); }
.bt-noline { margin: 0; text-align: center; }
.bt-pav { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }

/* ---- alliance picks ---- */
.ap-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.ap-title { display: flex; align-items: center; gap: 12px; }
.ap-title > .ico { width: 42px; height: 42px; padding: 9px; border-radius: 12px; color: var(--secondary); background: color-mix(in srgb, var(--secondary) 15%, transparent); flex: none; }
.ap-title h3 { margin: 0 0 2px; }
.ap-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ap-legend > div { --c: var(--text-mut); display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.ap-legend .exact { --c: var(--success); } .ap-legend .role { --c: var(--primary); } .ap-legend .on { --c: var(--secondary); }
.ap-legend b { font-family: var(--font-display); font-weight: 900; color: var(--c); }
.ap-legend span { font-size: .78rem; color: var(--text-dim); font-weight: 600; }
.ap-status { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); color: var(--text-dim); font-weight: 600; }
.ap-status .ico { width: 18px; height: 18px; flex: none; color: var(--primary); }
.ap-status.ok { color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent); border: 1px solid color-mix(in srgb, var(--success) 35%, transparent); }
.ap-status.ok .ico { color: var(--success); }
.ap-status.warn { color: var(--warning); background: color-mix(in srgb, var(--warning) 9%, transparent); }
.ap-status.warn .ico { color: var(--warning); }
.ap-status b { color: var(--text); }
.ap-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 22px; margin-bottom: 14px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.ap-hero.scored { background: color-mix(in srgb, var(--success) 14%, var(--surface)); border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.ap-hero-l { display: flex; align-items: center; gap: 14px; }
.ap-hero-l .tp-ring { width: 64px; height: 64px; }
.ap-hero-ic { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.ap-hero-ic .ico { width: 28px; height: 28px; }
.ap-hero-l > div > span, .ap-hero-r > span { display: block; font-size: .8rem; color: var(--text-dim); font-weight: 700; }
.ap-hero b { font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; }
.ap-hero-r { text-align: right; }
.ap-hero-r b { font-size: 1.25rem; color: var(--secondary); }
.ap-ranks { margin-bottom: 14px; padding: 0; overflow: hidden; }
.ap-ranks summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; cursor: pointer; font-weight: 700; list-style: none; }
.ap-ranks summary::-webkit-details-marker { display: none; }
.ap-ranks summary .ico { width: 18px; height: 18px; color: var(--secondary); }
.ap-ranks summary .hint { margin-left: auto; }
.ap-rank-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; padding: 0 12px 14px; max-height: 420px; overflow-y: auto; }
.ap-rank, .ap-pick { display: grid; grid-template-columns: 36px 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  box-shadow: inset 3px 0 0 var(--tc, transparent); transition: border-color .15s ease; }
.ap-rank:hover, .ap-pick:hover { border-color: var(--primary); }
.ap-rk { font-family: var(--font-display); font-weight: 900; color: var(--text-mut); font-size: .82rem; }
.ap-rank .team-avatar, .ap-pick .team-avatar { width: 30px; height: 30px; border-radius: 8px; }
.ap-rt { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.ap-rt b { font-family: var(--font-display); font-size: .86rem; }
.ap-rt span { font-size: .78rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-rr { font-size: .76rem; color: var(--text-mut); font-weight: 700; }
.ap-grid-card { overflow: hidden; margin-bottom: 14px; }
.ap-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ap-save { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; color: var(--success); }
.ap-save .ico { width: 15px; height: 15px; }
.ap-save .tp-spin { width: 13px; height: 13px; border-width: 2px; }
.ap-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.ap-table th { padding: 10px 8px; font-family: var(--font-display); font-weight: 800; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut);
  background: var(--bg-2); border-bottom: 1px solid var(--border); }
.ap-table td { padding: 6px; border-bottom: 1px solid var(--border); }
.ap-table tr:last-child td { border-bottom: 0; }
.ap-num { width: 44px; text-align: center; font-family: var(--font-display); font-weight: 900; color: var(--text-dim); }
.ap-slot { position: relative; width: 100%; min-height: 54px; display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 11px; font: inherit; color: var(--text);
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; text-align: left; transition: border-color .15s ease, transform .12s ease; }
.ap-slot.empty { justify-content: center; color: var(--text-mut); border-style: dashed; font-weight: 700; }
.ap-slot.empty .ico { width: 15px; height: 15px; }
.ap-slot:not(:disabled):hover { border-color: var(--primary); transform: translateY(-1px); }
.ap-slot:disabled { cursor: default; }
.ap-slot.filled { box-shadow: inset 4px 0 0 var(--tc, var(--primary)); }
.ap-slot .team-avatar { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.ap-tn { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; flex: 1; }
.ap-tn b { font-family: var(--font-display); font-weight: 800; }
.ap-tn span { font-size: .76rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-trk { font-family: var(--font-display); font-size: .66rem; font-weight: 800; color: var(--text-mut); }
.ap-x { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--text-mut); flex: none; }
.ap-x:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.ap-x .ico { width: 14px; height: 14px; }
.ap-cell { --c: var(--text-mut); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; border-radius: 11px; text-align: center;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.ap-cell.exact { --c: var(--success); } .ap-cell.role { --c: var(--primary); } .ap-cell.on { --c: var(--secondary); } .ap-cell.none { --c: var(--danger); }
.ap-ct { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 800; }
.ap-ct .team-avatar { width: 22px; height: 22px; border-radius: 6px; }
.ap-pts { font-family: var(--font-display); font-weight: 900; color: var(--c); font-size: .9rem; }
.ap-actual { font-size: .72rem; color: var(--text-dim); font-weight: 700; }
.ap-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; font-size: .84rem; color: var(--text-dim); font-weight: 600; background: var(--bg-2); }
.ap-board .ap-brow, .br-board .ap-brow { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.ap-brow:last-child { border-bottom: 0; }
.ap-brow.me { background: color-mix(in srgb, var(--secondary) 8%, transparent); border-radius: 10px; }
.ap-bpos { width: 26px; text-align: center; font-family: var(--font-display); font-weight: 900; color: var(--text-mut); }
.ap-brow .hint { margin-left: auto; }
.ap-bbb { font-family: var(--font-display); font-weight: 800; color: var(--secondary); min-width: 74px; text-align: right; }
.ap-pick-search { margin-bottom: 10px; }
.ap-pick-search input { min-height: 46px; font-size: 1rem; }
.ap-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
.ap-pick[hidden] { display: none; }
.ap-pick.used { opacity: .55; }

/* ---- bracket ---- */
.br-top { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.br-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.br-stats > div { display: flex; flex-direction: column; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.br-stats b { font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; }
.br-stats small { font-size: .75rem; color: var(--text-mut); }
.br-stats span { font-size: .7rem; color: var(--text-mut); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.br-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.br-cta .hint { display: inline-flex; align-items: center; gap: 5px; }
.br-cta .hint .ico { width: 14px; height: 14px; color: var(--success); }
.br-rules { margin: 0; }
.br-wrap { margin-bottom: 14px; }
.br-lbl { display: flex; align-items: center; gap: 7px; margin: 6px 2px 10px; font-family: var(--font-display); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.br-lbl .ico { width: 15px; height: 15px; color: var(--secondary); }
.br-grid { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; }
.br-col { display: flex; flex-direction: column; min-width: 210px; }
.br-ch { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 0 4px 8px; }
.br-ch b { font-family: var(--font-display); font-size: .78rem; letter-spacing: .06em; }
.br-ch span { font-size: .72rem; color: var(--secondary); font-weight: 800; }
.br-cb { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.br-match { display: flex; flex-direction: column; gap: 5px; padding: 8px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); }
.br-match.lower { background: color-mix(in srgb, var(--surface) 82%, var(--bg)); }
.br-match.right { border-color: color-mix(in srgb, var(--success) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--success) 40%, transparent); }
.br-match.wrong { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.br-mh { display: flex; justify-content: space-between; align-items: center; padding: 0 3px; font-family: var(--font-display); font-weight: 800; font-size: .64rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-mut); }
.br-mh em { font-style: normal; color: var(--text-mut); }
.br-plus { color: var(--success); } .br-miss { color: var(--danger); text-transform: none; letter-spacing: 0; }
.br-team { position: relative; display: grid; grid-template-columns: 30px 28px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  box-shadow: inset 3px 0 0 var(--tc, transparent); transition: border-color .15s ease, background .15s ease, transform .12s ease; }
.br-team:not(:disabled):hover { border-color: var(--primary); transform: translateX(2px); }
.br-team:disabled { cursor: default; }
.br-team.picked { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 12%, var(--surface-2)); }
.br-team.real-lose { opacity: .5; }
.br-team.real-win { border-color: var(--success); }
.br-team.tbd { grid-template-columns: 30px 1fr; cursor: default; color: var(--text-mut); border-style: dashed; }
.br-seed { font-family: var(--font-display); font-weight: 900; font-size: .72rem; color: var(--secondary); }
.br-team .team-avatar { width: 28px; height: 28px; border-radius: 7px; }
.br-tn { min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.br-tn b { font-family: var(--font-display); font-weight: 800; font-size: .84rem; }
.br-tn span { font-size: .7rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-check { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--secondary); color: var(--on-secondary); }
.br-check .ico { width: 12px; height: 12px; }
.br-names { display: flex; flex-wrap: wrap; gap: 8px; }
.br-name { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); font-weight: 700; }

/* ---- fantasy ---- */
.fx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fx-hl { display: flex; align-items: center; gap: 12px; }
.fx-hl h3 { margin: 2px 0; }
.fx-crest { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; flex: none; color: var(--on-secondary); background: var(--secondary); box-shadow: 0 8px 20px -10px var(--secondary); }
.fx-crest .ico { width: 24px; height: 24px; }
.fx-crest.big { width: 64px; height: 64px; border-radius: 18px; } .fx-crest.big .ico { width: 34px; height: 34px; }
.fx-tabs { flex-wrap: wrap; }
.fx-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-family: var(--font-display); font-weight: 800; font-size: .6rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--success); background: color-mix(in srgb, var(--success) 13%, transparent); }
.fx-pill .ico { width: 11px; height: 11px; }
.fx-pill.live { color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); }
.fx-pill.live .ico { animation: btBlink 1.4s ease-in-out infinite; }
.fx-pill.wait { color: var(--primary); background: color-mix(in srgb, var(--primary) 13%, transparent); }
.fx-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 14px; }
.fx-intro-l { display: flex; gap: 16px; align-items: flex-start; }
.fx-intro-l h3 { margin: 4px 0 6px; font-size: 1.35rem; }
.fx-intro-l p { margin: 0 0 10px; color: var(--text-dim); }
.fx-ko { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.fx-ko .ico { width: 16px; height: 16px; color: var(--secondary); }
.fx-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fx-rules li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: 11px; background: var(--surface-2); color: var(--text-dim); font-size: .92rem; }
.fx-rules .ico { width: 18px; height: 18px; color: var(--secondary); flex: none; margin-top: 1px; }
.fx-rules b { color: var(--text); }
.fx-leagues { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fx-league { display: flex; flex-direction: column; gap: 12px; transition: transform .18s ease, border-color .18s ease; }
.fx-league:hover { transform: translateY(-3px); border-color: var(--primary); }
.fx-league.mine { border-color: var(--secondary); }
.fx-lh { display: flex; align-items: baseline; justify-content: space-between; }
.fx-lh b { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; }
.fx-faces { display: flex; flex-wrap: wrap; min-height: 34px; align-items: center; }
.fx-face { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); margin-right: -8px; background: var(--surface-2); }
.fx-face.sm { width: 26px; height: 26px; margin: 0; }
.fx-callout { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fx-callout > .ico { width: 40px; height: 40px; padding: 9px; border-radius: 12px; color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); flex: none; }
.fx-callout > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.fx-callout > div span { color: var(--text-dim); }
.fx-callout.live { border-color: color-mix(in srgb, var(--warning) 55%, var(--border)); }
.fx-callout.live > .ico { color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); animation: btBlink 1.6s ease-in-out infinite; }
.fx-matchup { margin-bottom: 14px; }
.fx-mu-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.fx-mu-h b { font-family: var(--font-display); font-size: 1.05rem; }
.fx-mu { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.fx-vs { align-self: center; font-family: var(--font-display); font-weight: 900; color: var(--text-mut); font-size: 1.1rem; }
.fx-mu-side { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; border-radius: 14px; background: var(--surface-2); text-align: center; }
.fx-mu-side.me { background: color-mix(in srgb, var(--secondary) 10%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--secondary) 45%, transparent); }
.fx-mu-side.bye { justify-content: center; color: var(--text-mut); }
.fx-mu-av { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.fx-mu-name { font-weight: 700; }
.fx-mu-pts { font-family: var(--font-display); font-weight: 900; font-size: 2rem; line-height: 1; color: var(--secondary); }
.fx-mu-teams { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.fx-mu-teams span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 3px; border-radius: 999px; background: var(--surface); font-family: var(--font-display);
  font-weight: 700; font-size: .72rem; box-shadow: inset 0 0 0 1px var(--tc, var(--border)); }
.fx-mu-teams .team-avatar { width: 20px; height: 20px; border-radius: 50%; }
.fx-mu-teams em { font-style: normal; color: var(--secondary); }
.fx-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.fx-table { width: 100%; border-collapse: collapse; }
.fx-table th { padding: 8px; font-family: var(--font-display); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); text-align: left; border-bottom: 1px solid var(--border); }
.fx-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.fx-table .num { text-align: right; font-family: var(--font-display); font-weight: 700; }
.fx-table .dim { opacity: .4; }
.fx-table tr.me td { background: color-mix(in srgb, var(--secondary) 8%, transparent); }
.fx-pos { width: 30px; font-family: var(--font-display); font-weight: 900; color: var(--text-mut); }
.fx-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.fx-who .team-avatar { width: 24px; height: 24px; border-radius: 6px; }
.fx-wk { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.fx-wk:last-child { border-bottom: 0; }
.fx-wk.cur { background: color-mix(in srgb, var(--primary) 8%, transparent); border-radius: 10px; }
.fx-wk b { font-family: var(--font-display); font-size: .8rem; min-width: 64px; }
.fx-wk-opp { flex: 1; min-width: 0; color: var(--text-dim); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-wk-sc { font-family: var(--font-display); font-weight: 800; }
.fx-w, .fx-l, .fx-t { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-family: var(--font-display); font-weight: 900; font-size: .7rem; }
.fx-w { color: var(--on-primary); background: var(--success); } .fx-l { color: #fff; background: var(--danger); } .fx-t { color: var(--on-secondary); background: var(--secondary); }
.fx-rosters { margin-bottom: 14px; }
.fx-rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.fx-r { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.fx-r.me { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--secondary) 45%, transparent); }
.fx-rh { display: flex; align-items: center; gap: 8px; }
.fx-rh .hint { margin-left: auto; }
.fx-rt { display: flex; flex-wrap: wrap; gap: 5px; }
.fx-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 700; font-size: .74rem; color: var(--text); cursor: pointer; box-shadow: inset 3px 0 0 var(--tc, transparent); }
.fx-chip .team-avatar { width: 22px; height: 22px; border-radius: 50%; }
.fx-chip.bench { opacity: .5; border-style: dashed; }
.fx-clock { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fx-clock.mine { border-color: var(--secondary); box-shadow: 0 0 0 1px var(--secondary), 0 14px 30px -18px var(--secondary); }
.fx-clock > .ico { width: 40px; height: 40px; padding: 9px; border-radius: 12px; color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.fx-clock > div:not(.fx-fp) { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; }
.fx-clock > div span { color: var(--text-dim); }
.fx-fp { display: flex; flex-direction: column; align-items: flex-end; }
.fx-fp b { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; color: var(--secondary); line-height: 1; }
.fx-fp span { font-size: .72rem; font-weight: 700; color: var(--text-mut); text-transform: uppercase; }
.fx-fp em { font-style: normal; font-size: .76rem; color: var(--text-dim); }
.fx-board-card { overflow: hidden; margin-bottom: 14px; }
.fx-board { width: 100%; border-collapse: collapse; min-width: 520px; }
.fx-board th { padding: 10px 6px; font-size: .72rem; font-weight: 700; color: var(--text-dim); background: var(--bg-2); border-bottom: 1px solid var(--border); }
.fx-board th > * { vertical-align: middle; }
.fx-board th span { display: block; margin-top: 3px; }
.fx-board th.clock { color: var(--warning); box-shadow: inset 0 -3px 0 var(--warning); }
.fx-board td { padding: 6px; border-bottom: 1px solid var(--border); text-align: center; }
.fx-pick { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; min-width: 76px; border-radius: 10px; background: var(--surface-2);
  box-shadow: inset 0 3px 0 var(--tc, transparent); }
.fx-pick .team-avatar { width: 28px; height: 28px; border-radius: 7px; }
.fx-pick b { font-family: var(--font-display); font-size: .8rem; }
.fx-pick em { font-style: normal; font-size: .64rem; color: var(--text-mut); }
.fx-pick.now { flex-direction: row; color: var(--warning); font-weight: 700; font-size: .72rem; background: color-mix(in srgb, var(--warning) 10%, transparent); }
.fx-pick.now .ico { width: 14px; height: 14px; }
.fx-pick.empty { color: var(--text-mut); background: none; font-size: .72rem; }
.fx-avail-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.fx-avail-tools .ds-search { flex: 1 1 240px; }
.fx-avail-tools .ds-search input, .fx-fa .ds-search input { min-height: 44px; font-size: 1rem; }
.fx-fa .ds-search { margin-bottom: 10px; }
.fx-list { display: flex; flex-direction: column; gap: 6px; }
.fx-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 76px 64px auto; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 11px;
  background: var(--surface-2); box-shadow: inset 3px 0 0 var(--tc, transparent); }
.fx-row .team-avatar { width: 34px; height: 34px; border-radius: 9px; }
.fx-rn { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.fx-rn b { font-family: var(--font-display); font-weight: 800; }
.fx-rn span { font-size: .78rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-rk { display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 800; font-size: .78rem; color: var(--text-dim); }
.fx-rk small { font-family: var(--font-ui); font-weight: 600; font-size: .7rem; color: var(--text-mut); }
.fx-price { font-family: var(--font-display); font-weight: 900; color: var(--secondary); text-align: right; }
.fx-price small { font-size: .62rem; margin-left: 2px; color: var(--text-mut); }
.fx-price.over { color: var(--text-mut); }
.fx-lineup { margin-bottom: 14px; }
.fx-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.fx-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 12px; border-radius: 14px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: inset 0 4px 0 var(--tc, var(--primary)); }
.fx-card.bench { opacity: .65; border-style: dashed; box-shadow: none; }
.fx-role { position: absolute; top: 8px; left: 8px; font-family: var(--font-display); font-weight: 800; font-size: .56rem; letter-spacing: .1em; text-transform: uppercase; color: var(--success); }
.fx-card.bench .fx-role { color: var(--text-mut); }
.fx-card .team-avatar { width: 54px; height: 54px; border-radius: 14px; margin-top: 6px; }
.fx-cn { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; }
.fx-cname { font-size: .82rem; color: var(--text-dim); font-weight: 600; min-height: 1.2em; }
.fx-cmeta { font-size: .74rem; color: var(--text-mut); font-weight: 700; }
.fx-card .btn, .fx-cbtn { margin-top: 6px; }
.fx-pts { margin-bottom: 14px; }
.fx-offer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.fx-offer > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.fx-offer.in { border: 1px solid color-mix(in srgb, var(--secondary) 50%, transparent); }
.fx-offer-btns { margin-left: auto; display: flex; gap: 6px; }
.fx-propose { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 12px; border-radius: 12px; border: 1px dashed var(--border-strong); margin: 6px 0 10px; }
.fx-propose label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 110px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mut); }
.fx-propose select { min-height: 40px; }
.fx-hist { font-size: .84rem; color: var(--text-dim); padding: 4px 2px; }
.fx-drop { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fx-drop .fx-chip { padding: 6px 12px 6px 6px; font-size: .82rem; }
.fx-drop .fx-chip:hover { border-color: var(--danger); color: var(--danger); }

@media (max-width: 900px) {
  .fx-intro, .fx-cols { grid-template-columns: 1fr; }
  .fx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .br-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .bt-grid { grid-template-columns: 1fr; }
  .bt-wallet { min-width: 0; width: 100%; }
  .bt-teams { grid-template-columns: 1fr; }
  .bt-side.blue { align-items: flex-start; }
  .bt-mid { flex-direction: row; gap: 8px; justify-content: center; }
  .fx-mu { grid-template-columns: 1fr; }
  .fx-row { grid-template-columns: 34px minmax(0, 1fr) 54px auto; }
  .fx-row .fx-rk { display: none; }
  .ap-slot { min-height: 46px; padding: 6px; }
  .ap-tn span, .ap-trk { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bt-card, .br-match, .fx-league, .fx-row, .fx-card, .bt-stake { animation: none !important; }
}
@keyframes btBlink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* team profile: event names open the event in Event search */
.tp-ev-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: color .15s ease; }
.tp-ev-link .ico { width: 18px; height: 18px; opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease; color: var(--primary); flex: none; }
.tp-ev-link:hover, .tp-ev-link:focus-visible { color: var(--primary); }
.tp-ev-link:hover .ico, .tp-ev-link:focus-visible .ico { opacity: 1; transform: none; }
@media (hover: none) { .tp-ev-link .ico { opacity: .7; transform: none; } }
.ap-hero b small { font-size: .9rem; color: var(--text-dim); font-weight: 700; }

/* ==== v91: Prime 702 (Admin fun mode) ==== */
.prime-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; }
.prime-card.on { border-color: color-mix(in srgb, var(--secondary) 65%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--secondary) 40%, transparent), 0 20px 50px -30px var(--secondary); }
.prime-card.on::after { content: ""; position: absolute; right: -80px; top: -90px; width: 300px; height: 300px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--secondary) 22%, transparent), transparent 70%); }
.prime-hero { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.prime-crest { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; flex: none; background: var(--surface-2); color: var(--text-mut);
  border: 1px solid var(--border-strong); transition: background .3s ease, color .3s ease; }
.prime-crest .ico { width: 32px; height: 32px; }
.prime-card.on .prime-crest { background: var(--secondary); color: var(--on-secondary); border-color: var(--secondary); animation: primeGlow 2.2s ease-in-out infinite; }
.prime-txt { flex: 1 1 320px; min-width: 0; }
.prime-txt h3 { margin: 2px 0 4px; font-size: 1.5rem; }
.prime-card.on .prime-txt h3 { color: var(--secondary); }
.prime-txt p { margin: 0; color: var(--text-dim); max-width: 720px; }
.prime-switch { transform: scale(1.25); transform-origin: right center; }
.prime-switch input:checked + .slider { background: color-mix(in srgb, var(--secondary) 40%, transparent); border-color: var(--secondary); }
.prime-switch input:checked + .slider::before { background: var(--secondary); }
.prime-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.prime-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.prime-stats span { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mut); }
.prime-stats b { font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; }
.prime-card.on .prime-stats b { color: var(--secondary); }
.prime-stats small { font-size: .78rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prime-list { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.prime-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-dim); font-size: .92rem; }
.prime-list .ico { width: 18px; height: 18px; flex: none; color: var(--secondary); margin-top: 1px; }
.prime-list b { color: var(--text); }
@keyframes primeGlow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--secondary) 55%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
/* 702 shows off everywhere while Prime is on */
.prime-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 3px 10px; border-radius: 999px; vertical-align: middle;
  font-family: var(--font-display); font-weight: 900; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-secondary); background: var(--secondary); box-shadow: 0 6px 18px -8px var(--secondary); animation: primeGlow 2.2s ease-in-out infinite; }
.prime-badge .ico { width: 13px; height: 13px; }
.tp-hero.prime { box-shadow: 0 0 0 2px var(--secondary), 0 24px 60px -30px var(--secondary); }
body.prime-on .bs-row.ours, body.prime-on .bs-pod.ours { box-shadow: inset 5px 0 0 var(--secondary), 0 0 0 1px var(--secondary), 0 10px 30px -16px var(--secondary); }
@media (max-width: 760px) { .prime-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .prime-badge, .prime-card.on .prime-crest { animation: none; } }

/* ==== v92: match betting on Match Scouting, games on Pick List, Fantasy page + simulator ==== */
.ms-bets { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; border-color: color-mix(in srgb, var(--secondary) 45%, var(--border)); }
.ms-bets.open { box-shadow: inset 0 3px 0 var(--secondary); }
.ms-bets.locked { border-color: var(--border-strong); }
.ms-bets.host { border-style: dashed; }
.msb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.msb-head > .ico { width: 38px; height: 38px; padding: 8px; border-radius: 11px; flex: none; color: var(--on-secondary); background: var(--secondary); }
.msb-head > div { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msb-head > div b { font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
.msb-head > div span { color: var(--text-dim); font-size: .86rem; font-weight: 600; }
.msb-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-family: var(--font-display); font-weight: 800;
  font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); background: var(--surface-2); }
.msb-pill .ico { width: 13px; height: 13px; }
.msb-pill.open { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.msb-pill.open .ico { animation: btBlink 1.4s ease-in-out infinite; }
.msb-pill.locked { color: var(--warning); background: color-mix(in srgb, var(--warning) 13%, transparent); }
.msb-pill.final { color: var(--secondary); background: color-mix(in srgb, var(--secondary) 13%, transparent); }
.msb-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-dim); font-size: .88rem; font-weight: 600; }
.msb-note .ico { width: 16px; height: 16px; flex: none; color: var(--primary); }
.msb-host { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--border-strong); }
.msb-host > .ico { width: 18px; height: 18px; color: var(--primary); }
.msb-host > span { flex: 1 1 180px; color: var(--text-dim); font-weight: 600; }
.msb-host b { color: var(--text); }
[data-intro] .ms-bets { animation: dsIn .35s ease both; }

/* alliance prediction game on Pick List */
.ap-game { margin-bottom: 16px; }
.ap-game .ap-title { flex-wrap: wrap; }
.ap-game .ap-title > div:not(.ap-score) { flex: 1 1 280px; }
.ap-score { display: flex; flex-direction: column; align-items: flex-end; }
.ap-score b { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: var(--secondary); line-height: 1; }
.ap-score span { font-size: .78rem; color: var(--text-dim); font-weight: 700; }
.ap-results { border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.ap-results summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-weight: 700; list-style: none; background: var(--surface-2); }
.ap-results summary::-webkit-details-marker { display: none; }
.ap-results summary .ico { width: 16px; height: 16px; color: var(--success); }
.ap-results summary .hint { margin-left: auto; }
.ap-game .ap-board h4 { margin: 4px 0; display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.ap-game .ap-board h4 .ico { width: 15px; height: 15px; color: var(--secondary); }
.ap-count { margin: 0; }

/* Admin → Betting: hosts */
.ab-hostq { margin-bottom: 10px; }
.ab-hostq input { min-height: 44px; font-size: 1rem; }
.ab-hosts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; max-height: 420px; overflow-y: auto; }
.ab-host { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; font-weight: 600; }
.ab-host > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-host.on { border-color: color-mix(in srgb, var(--success) 50%, var(--border)); background: color-mix(in srgb, var(--success) 8%, var(--surface-2)); }

/* Admin → Fantasy: simulator */
.sim-card .sr-head .ico { color: var(--secondary); }
.sim-setup { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.sim-setup .ch-sel select { min-height: 42px; }
.sim-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sim-bot { width: 26px; height: 26px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; color: var(--on-primary); background: var(--primary); }
.sim-bot .ico { width: 14px; height: 14px; }
.fx-board th .sim-bot { margin: 0 auto; }
.sim-clock { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; margin-bottom: 12px; border-radius: 12px; background: var(--surface-2); }
.sim-clock span { color: var(--text-dim); font-weight: 600; flex: 1 1 220px; }
.sim-clock.mine { box-shadow: inset 0 0 0 1px var(--secondary); background: color-mix(in srgb, var(--secondary) 9%, var(--surface-2)); }
.sim-q { margin: 12px 0 8px; }
.sim-q input { min-height: 44px; }
.sim-season { display: flex; flex-direction: column; gap: 12px; }
.sim-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.sim-ctl > b { font-family: var(--font-display); }
.sim-ctl .ch-sel select { min-height: 36px; }
.sim-week { padding: 12px; border-radius: 12px; border: 1px solid var(--border); }
.sim-week h4 { margin: 0 0 8px; }
.sim-game { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.sim-game:last-child { border-bottom: 0; }
.sim-game > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-dim); min-width: 0; }
.sim-game > span:nth-of-type(2) { justify-content: flex-end; }
.sim-game > span.w { color: var(--text); }
.sim-game > span.w b { color: var(--success); }
.sim-game b { font-family: var(--font-display); }
.sim-game em { font-style: normal; color: var(--text-mut); font-size: .8rem; }
.sim-game small { grid-column: 1 / -1; text-align: center; color: var(--secondary); font-weight: 700; font-size: .76rem; }
.sim-roster { display: flex; flex-wrap: wrap; gap: 4px; }
.sim-champ { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--secondary) 12%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--secondary) 55%, transparent); }
.sim-champ > .ico { width: 40px; height: 40px; padding: 8px; border-radius: 12px; color: var(--on-secondary); background: var(--secondary); flex: none; }
.sim-champ > div { display: flex; flex-direction: column; }
.sim-champ span { color: var(--text-dim); font-weight: 600; }
.sim-draft { margin-top: 12px; }
.sim-draft summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.sim-draft summary .ico { width: 16px; height: 16px; }

/* ==== v94: match bet result popup ==== */
.bpop-back { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; background: rgba(4, 8, 12, .55);
  backdrop-filter: blur(3px); animation: fadein .2s ease both; }
.bpop-back.out { animation: fadeout .2s ease forwards; }
.bpop { --c: var(--primary); position: relative; overflow: hidden; width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 24px 22px; border-radius: 22px; text-align: center; background: var(--elevated); border: 1px solid color-mix(in srgb, var(--c) 55%, var(--border));
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.8), 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); animation: bpopIn .42s cubic-bezier(.2,.9,.3,1.25) both; }
.bpop.won { --c: var(--secondary); } .bpop.lost { --c: var(--danger); } .bpop.refund { --c: var(--primary); }
.bpop::before { content: ""; position: absolute; left: 50%; top: -120px; width: 320px; height: 220px; transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 30%, transparent), transparent); }
.bpop > * { position: relative; }
.bpop-ic { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 4px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.bpop.won .bpop-ic { color: var(--on-secondary); background: var(--secondary); animation: primeGlow 1.8s ease-in-out infinite; }
.bpop-ic .ico { width: 34px; height: 34px; }
.bpop-eyebrow { font-family: var(--font-display); font-weight: 800; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mut); }
.bpop h3 { margin: 0; font-size: 1.5rem; }
.bpop-amt { font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; line-height: 1.05; color: var(--c); }
.bpop p { margin: 4px 0 2px; color: var(--text-dim); }
.bpop p b { color: var(--text); }
.bpop-score { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 6px; padding: 5px 14px; border-radius: 999px; background: var(--surface-2);
  font-family: var(--font-display); font-weight: 900; }
.bpop-score .r { color: #ff8a8a; font-style: normal; } .bpop-score .b { color: #7fb4ff; font-style: normal; } .bpop-score em { font-style: normal; color: var(--text-mut); }
.bpop .btn { margin-top: 8px; min-width: 150px; justify-content: center; }
@keyframes bpopIn { from { opacity: 0; transform: translateY(18px) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bpop, .bpop-back { animation: none !important; } .bpop.won .bpop-ic { animation: none; } }

/* ==== v96: Pick List → Mashup (head-to-head robot picks + leaderboard) ==== */
.mx-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mx-tabs a { min-height: 40px; padding: 0 16px; }
.mx-count { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-weight: 600; font-size: .9rem; }
.mx-count .ico { width: 15px; height: 15px; color: var(--success); }
.mx-count b { color: var(--text); font-family: var(--font-display); }
.mx-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; }
.mx-sel { display: flex; align-items: center; gap: 8px; flex: 1 1 420px; min-width: 0; }
.mx-s { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; }
.mx-s .ico { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--text-mut); pointer-events: none; }
.mx-s select { width: 100%; min-height: 42px; padding-left: 32px; font-weight: 700; }
.mx-s.red select { box-shadow: inset 3px 0 0 #e0564f; } .mx-s.blue select { box-shadow: inset 3px 0 0 #3f7fe0; }
.mx-svs { font-family: var(--font-display); font-weight: 900; color: var(--text-mut); font-size: .8rem; }
.mx-acts { display: flex; gap: 6px; }

/* the arena: two robots, big photos, one VS */
.mx-arena { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: stretch; margin-bottom: 14px; }
.mx-card { --tc: var(--primary); --tc2: var(--primary); --tcf: var(--on-primary); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px;
  padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: inset 0 5px 0 var(--tc), 0 20px 50px -34px var(--tc); transition: transform .28s cubic-bezier(.2,.9,.3,1.2), opacity .25s ease, filter .25s ease, box-shadow .25s ease; }
.mx-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--tc) 22%, transparent), transparent 70%); }
.mx-card > * { position: relative; }
.mx-card.won { transform: scale(1.03); box-shadow: inset 0 5px 0 var(--tc), 0 0 0 3px var(--secondary), 0 24px 60px -20px var(--secondary); }
.mx-card.lost { transform: scale(.96); opacity: .45; filter: grayscale(.7); }
.mx-photo { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border-radius: 16px; overflow: hidden; cursor: zoom-in;
  background: var(--bg-2); border: 0; box-shadow: 0 0 0 3px var(--tc), 0 18px 40px -22px var(--tc); }
.mx-photo img:not(.team-avatar) { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.mx-photo:hover img:not(.team-avatar) { transform: scale(1.04); }
.mx-photo.none { cursor: pointer; background: repeating-linear-gradient(135deg, var(--surface-2) 0 14px, var(--bg-2) 14px 28px); }
.mx-nophoto { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text-mut); }
.mx-nophoto .team-avatar { width: 72px; height: 72px; border-radius: 18px; }
.mx-nophoto > .ico { width: 20px; height: 20px; }
.mx-nophoto b { color: var(--text-dim); font-size: .95rem; }
.mx-nophoto small { font-size: .78rem; }
.mx-rankpill { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: baseline; gap: 4px; padding: 5px 11px; border-radius: 999px;
  background: rgba(6, 10, 14, .78); backdrop-filter: blur(6px); color: #fff; font-family: var(--font-display); font-weight: 900; font-size: 1rem; }
.mx-rankpill small { font-family: var(--font-ui); font-weight: 700; font-size: .7rem; opacity: .8; }
.mx-zoom { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(6, 10, 14, .7); color: #fff; opacity: 0; transition: opacity .2s ease; }
.mx-zoom .ico { width: 16px; height: 16px; }
.mx-photo:hover .mx-zoom, .mx-photo:focus-visible .mx-zoom { opacity: 1; }
.mx-id { display: flex; align-items: center; gap: 10px; }
.mx-id .team-avatar { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.mx-id > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.mx-id > div b { font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; }
.mx-id > div span { color: var(--text-dim); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-power { display: flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 12px; background: color-mix(in srgb, var(--secondary) 13%, var(--surface-2));
  font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; color: var(--secondary); line-height: 1; }
.mx-power small { font-family: var(--font-ui); font-weight: 700; font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mut); margin-top: 3px; }
.mx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mx-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .84rem; }
.mx-chips .ico { width: 14px; height: 14px; color: var(--tc); }
.mx-pick { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--tc); color: var(--tcf); font-family: var(--font-display); font-weight: 800; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 10px 24px -12px var(--tc); transition: transform .15s ease, filter .15s ease; }
.mx-pick b { font-weight: 900; }
.mx-pick .ico { width: 18px; height: 18px; }
.mx-pick:hover { transform: translateY(-2px); filter: brightness(1.08); }
.mx-pick:active { transform: scale(.97); }
.mx-vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.mx-vs span { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-display); font-weight: 900; font-size: 1.25rem;
  color: var(--on-secondary); background: var(--secondary); box-shadow: 0 0 0 6px var(--bg), 0 14px 30px -10px var(--secondary); }
.mx-vs small { max-width: 80px; text-align: center; color: var(--text-mut); font-size: .72rem; font-weight: 700; }
[data-intro] .mx-card.left { animation: mxInL .45s cubic-bezier(.2,.9,.3,1.1) both; }
[data-intro] .mx-card.right { animation: mxInR .45s cubic-bezier(.2,.9,.3,1.1) both; }
[data-intro] .mx-vs span { animation: mxPop .5s .15s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes mxInL { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes mxInR { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes mxPop { from { opacity: 0; transform: scale(.3) rotate(-20deg); } to { opacity: 1; transform: none; } }

/* the tale of the tape */
.mx-table { padding: 8px 14px 14px; margin-bottom: 10px; }
.mx-thead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, 180px) minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mx-thead span { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; }
.mx-thead span:first-child { justify-self: end; }
.mx-thead span:first-child, .mx-thead span:last-child { padding-bottom: 3px; box-shadow: inset 0 -3px 0 var(--tc, var(--primary)); }
.mx-grp { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 4px; font-family: var(--font-display); font-weight: 800; font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-mut); }
.mx-grp .ico { width: 14px; height: 14px; color: var(--secondary); }
.mx-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, 180px) minmax(0, 1fr); gap: 10px; align-items: center; padding: 3px 0; }
.mx-lbl { text-align: center; color: var(--text-dim); font-weight: 700; font-size: .86rem; line-height: 1.2; }
.mx-v { position: relative; display: flex; align-items: baseline; gap: 6px; min-height: 34px; padding: 6px 10px; border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.mx-v.a { justify-content: flex-end; }
.mx-v i { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--text) 9%, transparent); border-radius: 10px; }
.mx-v.a i { right: 0; } .mx-v.b i { left: 0; }
.mx-v b { position: relative; font-family: var(--font-display); font-weight: 800; font-size: .95rem; }
.mx-v small { position: relative; color: var(--text-mut); font-size: .72rem; font-weight: 700; }
.mx-v.win { background: color-mix(in srgb, var(--success) 12%, var(--bg-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 45%, transparent); }
.mx-v.win i { background: color-mix(in srgb, var(--success) 22%, transparent); }
.mx-v.win b { color: var(--success); }
.mx-more { margin-top: 10px; }
.mx-more summary { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; cursor: pointer; border-radius: 10px; font-weight: 700; color: var(--text-dim); list-style: none; }
.mx-more summary::-webkit-details-marker { display: none; }
.mx-more summary:hover { background: var(--surface-2); color: var(--text); }
.mx-more summary .ico { width: 15px; height: 15px; }
.mx-keys { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mx-keys .ico { width: 15px; height: 15px; color: var(--primary); }
.mx-keys kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--bg-2); font: 700 .74rem/1 var(--font-ui); color: var(--text-dim); }
.mx-big { display: block; width: 100%; max-height: 72vh; object-fit: contain; border-radius: 14px; }

/* leaderboard */
.mx-lbhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mx-lbstats { display: flex; gap: 8px; }
.mx-lbstats > div { display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.mx-lbstats b { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; }
.mx-lbstats b small { font-size: .72rem; color: var(--text-mut); }
.mx-lbstats span { font-size: .68rem; font-weight: 700; color: var(--text-mut); text-transform: uppercase; letter-spacing: .06em; }
.mx-podium { margin-bottom: 14px; }
.mx-podium .bs-pod-epa b { color: var(--secondary); }
.mx-list { padding: 8px; }
.mx-lhead, .mx-lrow { display: grid; grid-template-columns: 44px 38px minmax(0, 1.3fr) minmax(140px, 1.6fr) 76px 84px; align-items: center; gap: 12px; }
.mx-lhead { padding: 6px 12px; font-family: var(--font-display); font-weight: 800; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mut); }
.mx-lrow { width: 100%; padding: 8px 12px; margin-bottom: 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit;
  text-align: left; cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.mx-lrow:hover { border-color: var(--primary); transform: translateX(3px); }
.mx-lrow.has-tc { box-shadow: inset 5px 0 0 var(--tc); }
.mx-lrow.ours { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 9%, var(--bg-2)); }
[data-intro] .mx-lrow { animation: dsIn .35s ease both; }
.mx-lrow .team-avatar { width: 38px; height: 38px; border-radius: 10px; }
.mx-pw { display: flex; align-items: center; gap: 10px; }
.mx-pwbar { position: relative; flex: 1; height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mx-pwbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: color-mix(in srgb, var(--tc, var(--secondary)) 78%, #fff 22%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 30%, transparent); transform-origin: left; animation: srGrow .7s cubic-bezier(.2,.8,.2,1) both; }
.mx-lrow:not(.has-tc) .mx-pwbar i { background: var(--secondary); }
.mx-pwbar em { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--text-mut); opacity: .55; }
.mx-pw b { min-width: 32px; text-align: right; font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; color: var(--secondary); }
.mx-ep, .mx-rc { display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 800; }
.mx-ep small, .mx-rc small { font-family: var(--font-ui); font-weight: 700; font-size: .7rem; color: var(--text-mut); }
.mx-unr { margin: 8px 4px 2px; }
@media (max-width: 900px) {
  .mx-arena { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .mx-vs { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; }
  .mx-vs small { display: none; }
  .mx-vs span { width: 48px; height: 48px; font-size: 1rem; }
  .mx-card { padding: 10px; gap: 10px; }
  .mx-id > div b { font-size: 1.3rem; }
  .mx-chips span { font-size: .76rem; padding: 3px 8px; }
  .mx-lhead, .mx-lrow { grid-template-columns: 34px 34px minmax(0, 1fr) minmax(90px, 1.2fr) 60px; }
  .mx-lhead span:last-child, .mx-lrow .mx-rc { display: none; }
}
@media (max-width: 560px) {
  .mx-sel { flex-basis: 100%; }
  .mx-id .team-avatar { display: none; }
  .mx-power { padding: 4px 8px; font-size: 1.1rem; }
  .mx-chips span:nth-child(2) { display: none; }
  .mx-pick { min-height: 46px; font-size: .74rem; }
  .mx-row, .mx-thead { grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr); gap: 6px; }
  .mx-lbl { font-size: .76rem; }
  .mx-v { padding: 5px 7px; }
  .mx-lhead, .mx-lrow { grid-template-columns: 28px 30px minmax(0, 1fr) 96px; gap: 8px; }
  .mx-lhead span:nth-child(5), .mx-lrow .mx-ep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mx-card, .mx-photo img { transition: none !important; }
  [data-intro] .mx-card, [data-intro] .mx-vs span, [data-intro] .mx-lrow { animation: none !important; }
}
