/*
 * league_detail.css — scoped stylesheet for the PUBLIC team + game detail
 * pages (Wave 6b step 1, 2026-07-31).
 *
 * WHY THIS FILE EXISTS
 *   The public /leagues/:slug/team/:teamId and /leagues/:slug/game/:scheduleId
 *   pages used to render through league_view.pug (extends layout_app), which
 *   loads ALL of dashboard.css — whose :root token block silently clobbers
 *   the marketing.css tokens on any page that also carries the marketing
 *   chrome (the exact bug Wave 6a fixed for the public player page with
 *   player_detail.css). The pages now render through
 *   templates/public/league_team_view.pug + league_game_view.pug
 *   (extends layout_marketing) and load THIS file instead of dashboard.css.
 *
 * PROVENANCE / DUPLICATION NOTE — DO NOT "DEDUPE" AGAINST THE ORIGINALS
 *   The rules below are verbatim copies of:
 *     - league_view.pug block styles sections: GAME DETAIL, TEAM HERO,
 *       TEAM GAMES LIST (incl. team-stats grid), ROSTER CONTROLS,
 *       MOBILE DEPTH-CHART STACK, STARTING LINEUP, KEY PLAYERS GRID,
 *       ROSTER SECTIONS, EMPTY STATE, ANIMATIONS
 *     - dashboard.css regions: CARD SYSTEM (.modern-card*), RATING BAND
 *       COLORS (99-club + 9-band), EMPTY STATE, BOX SCORE TABLES
 *   Wave 6b step 2 (2026-07-31): league_view.pug (the authed dashboard
 *   league hub) dropped dashboard.css and now loads THIS file too — its
 *   `block content` is wrapped in .lvd-scope and its own style block keeps
 *   verbatim copies of the team/game sections (identical rules double-load
 *   as a no-op, same contract as player_detail.css).
 *   Wave 6b step 3 (2026-07-31): dashboard.css DELETED (last consumer
 *   layout.pug retired) — THIS FILE is now the canonical home of the
 *   copied regions.
 *
 * SCOPING CONTRACT (same as player_detail.css)
 *   - Token DEFINITIONS live on .lvd-scope (never :root). Both public
 *     templates wrap their content in a .lvd-scope element.
 *   - --text is deliberately NOT pinned: marketing.css uses the same
 *     #f4f1ea.
 *   - Rating band values use the dashboard.css rebalanced ramp (bright
 *     green at the top) — the same ramp the public PLAYER page ships via
 *     player_detail.css — so the public league pages read as one system.
 *   - Rule SELECTORS stay unscoped (verbatim copies) so specificity and
 *     the cascade match the league_view render exactly.
 *   - A small utility shim (grid / spacing / badge / table) reproduces the
 *     app.css utilities the copied markup uses, because layout_marketing
 *     does not load app.css. Values mirror app.css.
 *
 * Cache busting: hosts append ?v=<cssVersion>; safe_pug.ts hashes this file
 * together with player_detail.css so edits here roll the token
 * automatically.
 */

/* ─── LEAGUE-DETAIL DESIGN TOKENS (scoped — the whole point) ────── */
.lvd-scope {
  /* Surfaces (dashboard.css values) */
  --bg-base:   #08090d;
  --bg-elev-1: #0e1118;
  --bg-elev-2: #161a23;
  --bg-elev-3: #1c2030;

  /* Strokes */
  --line:        rgba(244, 241, 234, 0.07);
  --line-strong: rgba(244, 241, 234, 0.14);

  /* Type */
  --text-muted: #8e93a3;
  --text-dim:   #7e8499;

  /* Accents / state */
  --accent-color: #e63946;
  --gold:         #fdb913;
  --success:      #4cd5a3;

  /* Typography stacks */
  --font-display: "Saira Semi Condensed", "Arial Black", system-ui, sans-serif;
  --font-heading: "Saira Semi Condensed", "Arial Black", system-ui, sans-serif;
  --font-body:    "Manrope", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "Manrope", system-ui, -apple-system, sans-serif;

  /* Rating bands — dashboard.css rebalanced ramp (matches player_detail.css) */
  --rating-elite:    #5be38a;
  --rating-great:    #36c168;
  --rating-good:     #28a94f;
  --rating-fair:     #9ad12e;
  --rating-avg:      #e8c628;
  --rating-below:    #e89328;
  --rating-poor:     #dc5a35;
  --rating-bad:      #c92e2e;
  --rating-terrible: #7a1d1d;
  --rating-elite-fg:    #ffffff;
  --rating-great-fg:    #ffffff;
  --rating-good-fg:     #ffffff;
  --rating-fair-fg:     #1a2806;
  --rating-avg-fg:      #2b220a;
  --rating-below-fg:    #ffffff;
  --rating-poor-fg:     #ffffff;
  --rating-bad-fg:      #ffffff;
  --rating-terrible-fg: #ffffff;
}
/* Light-theme inversion parity (Wave 6b step 2 — mirrors player_detail.css):
   league_view.pug (authed, layout_app) now loads this file, and layout_app
   pages CAN run light theme. app.css re-aliases the --bg-elev-* legacy
   tokens to canon surfaces under html[data-theme="light"], which always
   outranked dashboard's :root pins — reproduce exactly that (and ONLY that)
   inside the scope so light mode keeps behaving as it did with dashboard.css
   loaded. Marketing hosts never set data-theme="light", so this block is
   inert on the public team/game pages. */
html[data-theme="light"] .lvd-scope {
  --bg-elev-1: var(--surface);
  --bg-elev-2: var(--surface-2);
  --bg-elev-3: var(--surface-3);
}

/* ─── UTILITY SHIM (app.css equivalents; layout_marketing has none) ─── */
.lvd-scope .row { display: flex; flex-wrap: wrap; margin-left: -0.75rem; margin-right: -0.75rem; }
.lvd-scope .row > [class*="col"] { flex-shrink: 0; width: 100%; max-width: 100%; padding-left: 0.75rem; padding-right: 0.75rem; }
.lvd-scope .col-12 { width: 100%; }
@media (min-width: 768px) { .lvd-scope .col-md-6 { width: 50%; } }
.lvd-scope .row.g-3 { row-gap: 1rem; }
.lvd-scope .row.g-4 { row-gap: 1.5rem; }
.lvd-scope .mb-0 { margin-bottom: 0 !important; }
.lvd-scope .mb-2 { margin-bottom: 0.5rem !important; }
.lvd-scope .mb-3 { margin-bottom: 1rem !important; }
.lvd-scope .mb-4 { margin-bottom: 1.5rem !important; }
.lvd-scope .mt-3 { margin-top: 1rem !important; }
.lvd-scope .mt-4 { margin-top: 1.5rem !important; }
.lvd-scope .me-2 { margin-right: 0.5rem !important; }
.lvd-scope .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.lvd-scope .py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.lvd-scope .p-0 { padding: 0 !important; }
.lvd-scope .h-100 { height: 100% !important; }
.lvd-scope .badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase;
  line-height: 1; white-space: nowrap; color: #fff;
}
.lvd-scope .bg-warning { background-color: var(--gold) !important; }
.lvd-scope .text-dark { color: #1a1207 !important; }
.lvd-scope .visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.lvd-scope .table { width: 100%; border-collapse: collapse; vertical-align: top; color: var(--text, #f4f1ea); caption-side: bottom; }
.lvd-scope .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── BREADCRUMB HEADER (portal-family pattern; mirrors
       league_view_public.pug's Franchises ▸ League ▸ Page chain) ─── */
.lvd-scope .lvd-header { margin: 0 0 1.25rem; }
.lvd-scope .lvd-breadcrumb {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  gap: 0.5rem; min-width: 0;
  font-family: var(--font-mono); font-size: 0.88rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-muted);
}
.lvd-scope .lvd-breadcrumb a {
  color: var(--text-muted); text-decoration: none;
  transition: color 140ms ease;
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 44px; padding: 0.18rem 0.1rem;
}
.lvd-scope .lvd-breadcrumb a:hover { color: var(--text, #f4f1ea); }
.lvd-scope .lvd-breadcrumb-sep { opacity: 0.45; }
.lvd-scope .lvd-breadcrumb-current {
  color: var(--text, #f4f1ea);
  padding: 0.28rem 0.55rem;
  background: rgba(244, 241, 234, 0.06);
  border: 1px solid rgba(244, 241, 234, 0.1);
  border-radius: 4px;
  font-weight: 700;
  white-space: normal; word-break: break-word;
}
@media (max-width: 380px) {
  .lvd-scope .lvd-breadcrumb { font-size: 0.81rem; gap: 0.35rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   VERBATIM COPIES — dashboard.css regions
   ═══════════════════════════════════════════════════════════════════ */
/* ─── CARD SYSTEM ──────────────────────────────────────────────── */
.modern-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.modern-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.6);
}

.modern-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 234, 0.02);
  display: flex;
  /* BPV2-68: wrap at every viewport, not just <576px. Cards with a long
     title plus a trailing button group were overflowing across the
     576-1199px tablet range; promoting flex-wrap to the base rule fixes
     the overlap without breaking any larger desktop layouts. */
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.modern-card-header h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.modern-card-header h5 i {
  color: var(--accent-color);
  font-size: 1rem;
}

.modern-card-body {
  padding: 1.25rem;
  color: var(--text);
}

/* 99 OVR — Madden 99 Club. Multi-stop gold gradient that reads as
   metallic + glossy: dark amber rim on top edge, bright "leaf gold"
   highlight band 30% in, deeper amber center, second highlight near
   the bottom — mimics the bevel-and-emboss treatment Madden Ultimate
   Team uses on its 99-OVR cards. A pseudo-element ::after sweeps a
   diagonal sheen across the badge for the live-shine effect.
   The classifier emits .rating-band-99 only when value === 99. */
.rating-band-99 {
  position: relative;
  background: linear-gradient(
    180deg,
    #a8740c 0%,
    #fdd23a 18%,
    #fff4a8 35%,
    #fdb913 55%,
    #c9890a 75%,
    #f7d04e 92%,
    #8a5e08 100%
  ) !important;
  color: #3a2200 !important;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 -1px 0 rgba(0, 0, 0, 0.25) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 0 0 1px #a8740c,
    0 0 26px -2px rgba(253, 185, 19, 0.7),
    0 6px 18px -6px rgba(0, 0, 0, 0.6) !important;
  overflow: hidden;
  isolation: isolate;
}
/* Glossy diagonal sweep — runs from top-left to bottom-right every
   3.2s so the badge looks like a polished gold inlay catching light. */
.rating-band-99::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.55) 52%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: rating99-sweep 3.2s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}
/* Subtle horizontal highlight band locked at the bevel midline. */
.rating-band-99::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 28%,
    rgba(255, 255, 255, 0.35) 35%,
    transparent 42%
  );
  pointer-events: none;
}
@keyframes rating99-sweep {
  0%      { transform: translateX(-100%); }
  60%     { transform: translateX(100%); }
  100%    { transform: translateX(100%); }
}
.rating-band-elite    { background: var(--rating-elite)    !important; color: var(--rating-elite-fg)    !important; }
.rating-band-great    { background: var(--rating-great)    !important; color: var(--rating-great-fg)    !important; }
.rating-band-good     { background: var(--rating-good)     !important; color: var(--rating-good-fg)     !important; }
.rating-band-fair     { background: var(--rating-fair)     !important; color: var(--rating-fair-fg)     !important; }
.rating-band-avg      { background: var(--rating-avg)      !important; color: var(--rating-avg-fg)      !important; }
.rating-band-below    { background: var(--rating-below)    !important; color: var(--rating-below-fg)    !important; }
.rating-band-poor     { background: var(--rating-poor)     !important; color: var(--rating-poor-fg)     !important; }
.rating-band-bad      { background: var(--rating-bad)      !important; color: var(--rating-bad-fg)      !important; }
.rating-band-terrible { background: var(--rating-terrible) !important; color: var(--rating-terrible-fg) !important; }
/* Reverse-direction variant for left-side comparison rows. */
/* ─── EMPTY STATE ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  color: var(--accent-color);
}

.empty-state h5 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* BOX SCORE TABLES */
.box-score-table { margin: 0; }
.box-score-table th {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.7rem 0.85rem;
  background: rgba(244, 241, 234, 0.02);
}
.box-score-table th.stat { text-align: center; }
.box-score-table td {
  padding: 0.7rem 0.85rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
}
.box-score-table td.stat {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-feature-settings: "tnum";
}
.box-score-table td.stat.is-good { color: var(--success); }
.box-score-table td.stat.is-bad  { color: var(--accent-color); }
.box-score-table td.stat.is-good.is-zero,
.box-score-table td.stat.is-bad.is-zero { color: var(--text-dim); }
.box-score-player {
  display: inline-flex; align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.box-score-player:hover { color: var(--accent-color); }
.box-score-table .position-cell {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--accent-color);
  letter-spacing: 0.1em;
  font-weight: 700;
}

@media (max-width: 767.98px) {
  .box-score-table th,
  .box-score-table td { padding: 0.55rem 0.6rem; font-size: 0.82rem; }
  .box-score-table th { font-size: 0.76rem; }
  .box-score-table th:first-child,
  .box-score-table td:first-child {
    position: sticky; left: 0; z-index: 1;
    min-width: 132px; max-width: 132px;
    background: var(--bg-elev-2);
    border-right: 1px solid var(--line-strong);
    box-shadow: 6px 0 8px -8px rgba(0,0,0,0.6);
  }
  .box-score-table thead th:first-child {
    background: rgba(244, 241, 234, 0.04);
    z-index: 2;
  }
  .box-score-player { font-size: 0.78rem; gap: 0.4rem; }
  .box-score-player span {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 88px;
  }
}
@media (max-width: 419.98px) {
  .box-score-table .is-secondary,
  .box-score-table .position-cell { display: none; }
  .box-score-table th,
  .box-score-table td { padding: 0.5rem 0.45rem; }
  .box-score-table th:first-child,
  .box-score-table td:first-child {
    min-width: 110px; max-width: 110px;
  }
  .box-score-player span { max-width: 70px; }
}

/* ================================================================
   VERBATIM COPIES - league_view.pug block styles sections
   ================================================================ */
/* ═══════════════ GAME DETAIL (Phase 7 slot A+B) ═══════════════ */
.game-detail-topnav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.game-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 200ms ease, color 200ms ease;
}
.game-detail-back:hover { border-color: var(--accent-color); color: var(--text); }
.game-detail-week-badge {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-color);
  padding: 0.45rem 0.85rem;
  background: rgba(230, 57, 70, 0.10);
  border: 1px solid rgba(230, 57, 70, 0.30);
  border-radius: 8px;
}
.game-detail-siblings { display: flex; gap: 0.4rem; margin-left: auto; }
.game-detail-sibling {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 200ms ease, color 200ms ease;
}
.game-detail-sibling:hover { border-color: var(--accent-color); color: var(--text); }
.game-detail-sibling.is-disabled { opacity: 0.4; cursor: not-allowed; }

.game-detail-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--bg-elev-1);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.game-detail-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent-color), var(--gold), transparent);
}
.game-detail-hero-side {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.game-detail-hero-side:last-child { flex-direction: row-reverse; text-align: right; }
.game-detail-hero-side.is-loser { opacity: 0.55; }
.game-detail-hero-logo {
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
  flex-shrink: 0;
}
.game-detail-hero-team { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.game-detail-hero-team.is-home { align-items: flex-end; }
.game-detail-hero-loc {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.game-detail-hero-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}
/* Pre-kickoff record (e.g. "5-2") under the team name. Mono so the
   numerals tabular-align across the two sides of the hero. */
.game-detail-hero-record {
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.game-detail-hero-score {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.02em;
  color: var(--text-muted);
  font-feature-settings: "tnum";
  line-height: 1;
  margin-left: auto;
}
.game-detail-hero-side:last-child .game-detail-hero-score { margin-left: 0; margin-right: auto; }
.game-detail-hero-score.is-winner { color: var(--accent-color); }
.game-detail-hero-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.game-detail-hero-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--accent-color);
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--accent-color);
  background: rgba(230, 57, 70, 0.10);
  border-radius: 4px;
}
.game-detail-hero-status.is-pending {
  color: var(--text-dim);
  border-color: var(--line-strong);
  background: var(--bg-base);
}
@media (max-width: 767.98px) {
  .game-detail-hero { grid-template-columns: 1fr; gap: 1rem; padding: 1.5rem 1rem; }
  .game-detail-hero-side, .game-detail-hero-side:last-child { flex-direction: row; text-align: left; justify-content: flex-start; }
  .game-detail-hero-team.is-home { align-items: flex-start; }
  .game-detail-hero-vs { order: 2; }
  .game-detail-hero-side:first-of-type { order: 1; }
  .game-detail-hero-side:last-of-type { order: 3; }
}

/* AI recap card */
.recap-source-tag {
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.16em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-left: auto;
}
.recap-source-tag.is-recap {
  background: rgba(76, 213, 163, 0.10);
  color: var(--success);
  border: 1px solid rgba(76, 213, 163, 0.30);
}
.recap-source-tag.is-newswire {
  background: rgba(244, 241, 234, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--line);
}
.game-recap-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.game-recap-meta {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}
.game-recap-persona { color: var(--accent-color); font-weight: 600; }
.game-recap-body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-line;
}

/* Box score tables — F3-3 refactor (2026-05-14): .box-score-table*,
   .box-score-player*, and their responsive variants moved to
   _player_detail_styles.pug. Partial also adds .wk-link styles for
   the weekly-stats WK column which league_view didn't have. */

/* ═══════════════ TEAM HERO (Phase 7) ═══════════════ */
.team-hero {
  border: 0;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
}
.team-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent-color), var(--gold), transparent);
}
.team-hero-inner {
  padding: 2rem 1.75rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem;
  align-items: center;
}
.team-hero-logo {
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}
/* Strip the mixin's team-color bezel inside the team hero — the
   hero backdrop already carries the team color via radial-gradient,
   so a second bezel reads as a glitch. */
.team-hero-logo .mp-team-logo {
  background: transparent !important;
  border: 0 !important;
}
.team-hero-logo .mp-team-logo img {
  width: 64px !important;
  height: 64px !important;
}
.team-hero-info { min-width: 0; }
.team-hero-eyebrow {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.team-hero-div { color: var(--text-muted); }
.team-hero-conf {
  color: var(--accent-color);
  padding: 0.2rem 0.55rem;
  background: rgba(230, 57, 70, 0.10);
  border: 1px solid rgba(230, 57, 70, 0.30);
  border-radius: 4px;
  font-weight: 600;
}
.team-hero-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1;
}
.team-hero-name span {
  color: var(--text);
  display: block;
}
.team-hero-stats {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.team-hero-stat { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; min-width: 36px; }
.team-hero-stat-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 0.9;
  color: var(--text);
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}
.team-hero-stat-num.is-mono { font-family: var(--font-mono); font-size: 1.4rem; }
.team-hero-stat-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.team-hero-stat-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  min-height: 36px;
}
@media (max-width: 575.98px) {
  .team-hero-inner { grid-template-columns: 1fr; gap: 1rem; text-align: left; }
  .team-hero-stats { flex-wrap: wrap; }
}

/* ═══════════════ TEAM GAMES LIST (Phase 7) ═══════════════ */
.team-games-list { display: flex; flex-direction: column; gap: 0.4rem; }
/* Team stats grid — 2 cols on phones, 3 on tablet, 4 on desktop.
   Each cell is a label + chunky number. Positive/negative variants
   tint the diff/cap/streak values for at-a-glance scan. */
.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 600px) { .team-stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .team-stats-grid { grid-template-columns: repeat(4, 1fr); } }
.team-stats-cell {
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  background:
    radial-gradient(ellipse 110% 130% at 50% 50%,
      rgba(28,32,48,0.55) 0%,
      rgba(28,32,48,0.25) 70%,
      rgba(28,32,48,0) 100%);
  border: 0;
}
.team-stats-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}
.team-stats-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1;
  font-feature-settings: "tnum";
}
.team-stats-value.is-positive { color: var(--success, #4cd5a3); }
.team-stats-value.is-negative { color: var(--accent-color, #e63946); }
.team-game-row {
  display: grid;
  grid-template-columns: 36px 50px 28px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 200ms ease, background 200ms ease;
}
.team-game-row:hover { border-color: var(--line-strong); }
/* Anchor variant — when the row links to the game-detail page. */
a.team-game-row {
  text-decoration: none;
  color: inherit;
}
a.team-game-row:hover {
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 8%, var(--bg-elev-2));
}
.team-game-result {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0;
}
.team-game-row.is-win .team-game-result {
  background: rgba(76, 213, 163, 0.15);
  color: var(--success);
  border: 1px solid rgba(76, 213, 163, 0.40);
}
.team-game-row.is-loss .team-game-result {
  background: rgba(230, 57, 70, 0.12);
  color: var(--accent-color);
  border: 1px solid rgba(230, 57, 70, 0.35);
}
.team-game-row.is-tie .team-game-result {
  background: var(--bg-base);
  color: var(--text-muted);
  border: 1px solid var(--line-strong);
}
.team-game-result.is-upcoming {
  background: var(--bg-base);
  color: var(--text-dim);
  border: 1px solid var(--line);
  font-size: 1rem;
}
.team-game-week {
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.team-game-vs {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-align: center;
}
.team-game-opponent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.team-game-opp-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-game-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.team-game-score.is-upcoming {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  font-weight: 500;
}
.team-game-score-sep { color: var(--text-dim); margin: 0 0.2rem; }

/* ═══════════════ ROSTER CONTROLS (Phase 7) ═══════════════ */
.roster-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--bg-elev-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.6rem;
}
.roster-controls-search {
  position: relative;
  display: flex;
  align-items: center;
}
.roster-controls-search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-dim);
  pointer-events: none;
}
.roster-controls-search-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 0.5rem 0.85rem 0.5rem 2.2rem;
  border-radius: 8px;
}
.roster-controls-search-input::placeholder { color: var(--text-dim); }
.roster-controls-search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}
.roster-controls-pills {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-base);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 8px;
}
.roster-pill {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.roster-pill:hover { color: var(--text); }
.roster-pill.is-active {
  background: var(--accent-color);
  color: var(--text);
}
.roster-controls-sort { display: flex; align-items: center; gap: 0.5rem; }
.roster-controls-sort-label {
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0;
}
.roster-controls-sort-select {
  background: var(--bg-base);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}
.roster-controls-sort-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}
.roster-result-count {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}
.roster-result-count.is-hidden { display: none; }
.roster-section.is-hidden { display: none; }
.roster-player-row.is-hidden { display: none; }
@media (max-width: 767.98px) {
  .roster-controls {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .roster-controls-pills { overflow-x: auto; }
}

/* ═══════════════ MOBILE DEPTH-CHART STACK ═══════════════
   Compact alternate to the football-field formation. Renders only
   at ≤575.98px; the field is hidden there. Single column of flat
   rows so every starter is fully legible without zooming. */
.lineup-stack { display: none; flex-direction: column; gap: 0.4rem; }
.lineup-stack.is-hidden { display: none !important; }
.lineup-stack-head {
  display: flex;
  justify-content: flex-end;
  padding: 0.15rem 0.3rem 0.5rem;
}
.lineup-stack-personnel {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253, 185, 19, 0.85);
}
.lineup-row {
  display: grid;
  grid-template-columns: 50px 48px 1fr 48px;
  gap: 0.65rem;
  align-items: center;
  padding: 0.5rem 0.7rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.lineup-row:hover {
  border-color: var(--accent-color);
  background: var(--bg-elev-3);
  color: var(--text);
  transform: translateY(-1px);
}
.lineup-row.is-empty { opacity: 0.45; pointer-events: none; }
.lineup-row-pos {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-color);
  text-align: center;
}
.lineup-row-portrait {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.06), transparent 60%),
    var(--bg-base);
  border: 1px solid var(--line-strong);
}
.lineup-row-portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.lineup-row-portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1.2rem;
}
.lineup-row-portrait-dev {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}
.lineup-row-info { min-width: 0; }
.lineup-row-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lineup-row-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 0.1rem;
  display: flex;
  gap: 0.5rem;
}
.lineup-row-ovr {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  background: var(--rating-bad);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
@media (max-width: 575.98px) {
  .lineup-stack { display: flex; }
  .lineup-stack.is-hidden { display: none !important; }
  /* Hide the football field on small phones — the stacked list
     above renders instead. Tablet/desktop keep the formation view. */
  .lineup-formation { display: none !important; }
  .lineup-body { padding: 0.85rem 0.85rem !important; }
}

/* ═══════════════ STARTING LINEUP (Phase 7) ═══════════════ */
/* Formation-style depth chart on the team detail page. Three
   tabs (offense / defense / special) toggle the visible formation
   block. Each tile shows a face-scan portrait with rating-band
   OVR badge, position label, and last name + jersey number. */
.lineup-tabs {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  background: var(--bg-base);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 8px;
}
.lineup-tab {
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.lineup-tab:hover { color: var(--text); }
.lineup-tab.is-active {
  background: var(--accent-color);
  color: var(--text);
}

/* Field-style container: subtle green vignette + faint horizontal
   yard-line markers behind the formation. The body padding shrinks
   on mobile so tiles fill the viewport. */
.lineup-body {
  padding: 1rem 0.5rem !important;
  position: relative;
  overflow: hidden;
}
/* Phase 7 polish (2026-05-09): coordinate-positioned tiles on top of
   an SVG football field. Each tile sets `--tx`/`--ty` (0–100 grid)
   and positions absolutely. SVG markings stay crisp at any size. */
.lineup-formation {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center 35%, rgba(46,134,77,0.22), transparent 70%),
    linear-gradient(180deg, #0d1f17 0%, #0a1812 100%);
  box-shadow:
    inset 0 0 0 1px rgba(244,241,234,0.06),
    inset 0 30px 60px -30px rgba(0,0,0,0.6);
  isolation: isolate;
  contain: layout paint;
}
@media (max-width: 767.98px) {
  .lineup-formation { aspect-ratio: 5 / 4.5; min-height: 440px; }
}
@media (max-width: 575.98px) {
  .lineup-formation { aspect-ratio: 1 / 1; min-height: 460px; }
}
@media (max-width: 419.98px) {
  .lineup-formation { aspect-ratio: 4 / 4.4; min-height: 440px; }
}
.lineup-formation.is-hidden { display: none; }
.lineup-field-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.lineup-field-label {
  position: absolute;
  top: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.55);
  z-index: 2;
  padding: 0.18rem 0.55rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(244,241,234,0.08);
  border-radius: 4px;
  pointer-events: none;
}
.lineup-field-personnel {
  position: absolute;
  top: 0.6rem;
  right: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253, 185, 19, 0.85);
  z-index: 2;
  pointer-events: none;
}

/* Coordinate-positioned tile. Caller sets `--tx` and `--ty` to
   0–100 percentages. Tiles anchor by their center so coordinates
   describe the helmet position, not the bounding box. */
.lineup-tile-pos {
  position: absolute;
  left: calc(var(--tx, 50) * 1%);
  top: calc(var(--ty, 50) * 1%);
  transform: translate(-50%, -50%);
  width: clamp(58px, 11vw, 92px);
  z-index: 1;
}
/* Subtle elevation so tiles read "above" the field markings. */
.lineup-tile-pos > .lineup-tile {
  box-shadow:
    0 6px 14px -4px rgba(0,0,0,0.5),
    0 0 0 1px rgba(244,241,234,0.08);
}
/* Star-skill players get a slightly larger, gold-trimmed tile so
   the eye reads the formation. QB / HB / WR1-2 get this. */
.lineup-tile-pos.is-star {
  width: clamp(64px, 12.5vw, 100px);
  z-index: 2;
}
.lineup-tile-pos.is-star > .lineup-tile {
  box-shadow:
    0 8px 18px -4px rgba(0,0,0,0.6),
    0 0 0 1px rgba(253,185,19,0.4);
}

/* Compact tile presentation when on the field — a tighter layout
   than the depth-chart tiles since 11 of them have to share space. */
.lineup-formation .lineup-tile {
  padding: 0.35rem 0.25rem 0.45rem;
  gap: 0.15rem;
  background: rgba(28, 32, 48, 0.92);
  border-radius: 8px;
}
.lineup-formation .lineup-tile-portrait {
  width: 46px;
  height: 46px;
  margin-bottom: 0.15rem;
}
.lineup-formation .lineup-tile-portrait-fallback { font-size: 1.2rem; }
.lineup-formation .lineup-tile-ovr {
  min-width: 22px;
  height: 18px;
  font-size: 0.88rem;
  padding: 0 0.25rem;
  bottom: -2px;
  right: -2px;
}
.lineup-formation .lineup-tile-pos {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}
.lineup-formation .lineup-tile-name { font-size: 0.86rem; }
.lineup-formation .lineup-tile-num { font-size: 0.75rem; }

/* Mobile: bigger tiles than before, but still tight. The square
   aspect-ratio gives the tiles more vertical room so portraits +
   name + position all read clearly without overlap. */
@media (max-width: 767.98px) {
  .lineup-tile-pos { width: clamp(64px, 17vw, 86px); }
  .lineup-tile-pos.is-star { width: clamp(72px, 19vw, 96px); }
  .lineup-formation .lineup-tile { padding: 0.4rem 0.3rem 0.5rem; }
  .lineup-formation .lineup-tile-portrait { width: 50px; height: 50px; margin-bottom: 0.2rem; }
  .lineup-formation .lineup-tile-portrait-fallback { font-size: 1.15rem; }
  .lineup-formation .lineup-tile-ovr { min-width: 22px; height: 18px; font-size: 0.88rem; }
  .lineup-formation .lineup-tile-name { font-size: 0.86rem; line-height: 1.05; }
  .lineup-formation .lineup-tile-num { font-size: 0.75rem; }
  /* Pull wide-split receivers inward so they don't clip the edges
     when the field shrinks. We override the inline `--tx` only on
     the WR1/WR2 indices via a wrapper class set in the markup. */
  .lineup-formation .lineup-tile-pos[style*="--tx:10"],
  .lineup-formation .lineup-tile-pos[style*="--tx: 10"] { left: 14% !important; }
  .lineup-formation .lineup-tile-pos[style*="--tx:90"],
  .lineup-formation .lineup-tile-pos[style*="--tx: 90"] { left: 86% !important; }
  .lineup-formation .lineup-tile-pos[style*="--tx:12"],
  .lineup-formation .lineup-tile-pos[style*="--tx: 12"] { left: 16% !important; }
  .lineup-formation .lineup-body, .lineup-body { padding: 0.85rem 0.65rem !important; }
}
@media (max-width: 575.98px) {
  .lineup-tile-pos { width: clamp(60px, 19vw, 76px); }
  .lineup-tile-pos.is-star { width: clamp(66px, 21vw, 84px); }
  .lineup-formation .lineup-tile-portrait { width: 42px; height: 42px; }
  .lineup-formation .lineup-tile-portrait-fallback { font-size: 1rem; }
  .lineup-formation .lineup-tile-ovr { min-width: 20px; height: 16px; font-size: 0.82rem; }
  .lineup-formation .lineup-tile-name { font-size: 0.78rem; }
  .lineup-formation .lineup-tile-num { display: none; }
}
@media (max-width: 419.98px) {
  .lineup-tile-pos { width: clamp(54px, 21vw, 64px); }
  .lineup-tile-pos.is-star { width: clamp(58px, 22vw, 70px); }
  .lineup-formation .lineup-tile-portrait { width: 36px; height: 36px; }
  .lineup-formation .lineup-tile-portrait-fallback { font-size: 0.9rem; }
}

.lineup-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.5rem 0.7rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  width: 100%;
  max-width: 130px;
  transition: border-color 200ms ease, transform 200ms ease;
}
.lineup-tile:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  color: var(--text);
}
.lineup-tile.is-empty {
  opacity: 0.45;
  pointer-events: none;
}

.lineup-tile-portrait {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--bg-base);
  border: 1px solid var(--line-strong);
  margin-bottom: 0.3rem;
}
.lineup-tile-portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lineup-tile-portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1.9rem;
}
.lineup-tile-ovr {
  position: absolute;
  bottom: -1px;
  right: -1px;
  min-width: 26px;
  height: 22px;
  padding: 0 0.35rem;
  border-radius: 6px 0 9px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.82rem;
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.lineup-tile-dev {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.lineup-tile-pos {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--accent-color);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0.1rem;
}
/* Hide the red position label INSIDE field-formation tiles —
   the position is already implied by the formation slot, and
   on tight tiles the label was getting cut off / overlapping
   the player name. Mobile depth-chart still shows the position
   via its dedicated `.lineup-row-pos` cell. */
.lineup-formation .lineup-tile > .lineup-tile-pos { display: none; }
.lineup-tile-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--text);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  padding: 0 0.15rem;
}
.lineup-tile-num {
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

@media (max-width: 575.98px) {
  .lineup-tabs {
    margin-left: 0;
    margin-top: 0.5rem;
    /* 2026-07-22 fix: was `width: 100%`, which stretched the pill
       past its 3 buttons' actual content width. Because the row is
       left-packed (default flex-start, no justify-content), that
       left over-width just sat empty on the right — most visible
       whenever "SPECIAL TEAMS" (the widest label) was the active/
       highlighted segment, since the dead space then trailed a
       highlighted pill instead of a plain one. Sizing to content
       removes the gap; overflow-x stays as a safety net for the
       narrowest phones where even the 3 labels don't fit. */
    width: auto;
    max-width: 100%;
    overflow-x: auto;
  }
  .lineup-tile-portrait { width: 60px; height: 60px; }
  .lineup-tile-portrait-fallback { font-size: 1.5rem; }
}

/* ═══════════════ KEY PLAYERS GRID (Phase 7) ═══════════════ */
.key-players-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
@media (max-width: 991.98px) {
  .key-players-grid { grid-template-columns: repeat(3, 1fr); }
  .key-players-grid > .key-player-card:nth-child(n+4) { display: none; }
}
@media (max-width: 575.98px) {
  .key-players-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .key-players-grid > .key-player-card:nth-child(n+5) { display: none; }
}

/* Tiny pending-FA flag overlaid on the key-player portrait so the
   at-a-glance roster scan flags contract years before the eye
   reaches the row-level detail. */
.key-player-fa {
  position: absolute;
  top: 4px;
  left: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.85);
  color: #fff;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2;
}
.key-player-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.75rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 200ms ease, transform 200ms ease;
  position: relative;
  overflow: hidden;
}
.key-player-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 22px;
  height: 1px;
  background: var(--gold);
}
.key-player-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.key-player-portrait {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--bg-base);
  border: 1px solid var(--line-strong);
}
.key-player-portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.key-player-portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 2.4rem;
}
.key-player-portrait-ovr {
  position: absolute;
  bottom: -1px;
  right: -1px;
  min-width: 34px;
  height: 34px;
  padding: 0.15rem 0.4rem 0.25rem;
  border-radius: 6px 0 11px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: -0.01em;
  background: var(--rating-bad);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
/* Tiny "OVR" caption above the number so the badge doesn't read as an
   ambiguous bare number — mirrors the .stat-lbl mono/uppercase pattern
   used elsewhere (e.g. team_owner/panel.pug .story-stat .stat-lbl). */
.key-player-portrait-ovr::before {
  content: "OVR";
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.42rem;
  letter-spacing: 0.12em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: none;
}

.key-player-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.key-player-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.key-player-pos {
  color: var(--accent-color);
  font-weight: 700;
}
.key-player-age {
  color: var(--text-dim);
}

/* ═══════════════ ROSTER SECTIONS (Phase 7) ═══════════════ */
.roster-section {
  margin-top: 1.75rem;
}
.roster-position-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 0.6rem;
  position: relative;
}
.roster-position-header::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 24px;
  height: 1px;
  background: var(--gold);
}
.roster-position-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  background: var(--accent-color);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  color: var(--text);
  min-width: 50px;
  text-align: center;
}
.roster-position-count {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.roster-player-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  background: var(--bg-elev-2);
  border-radius: 8px;
  margin-bottom: 0.4rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 200ms ease, background 200ms ease;
  border: 1px solid var(--line);
}
.roster-player-row:hover {
  background: var(--bg-elev-3);
  border-color: var(--accent-color);
}

/* OVR badge — uses the same continuous bad→good gradient as the
   comparison bars, but rendered as a chunky tile. The hue is
   computed from --stat-value so a 95 OVR is a green tile and a 65
   OVR is amber-red. */
.roster-player-ovr {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: #fff;
  flex-shrink: 0;
  background: var(--rating-bad);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.5);
}

/* Face-scan portrait — between the OVR badge and the name. Falls
   back to a person-icon when the face-scan PNG isn't bundled for
   this player. The 56x56 tile gives the row real visual presence
   without crowding the action column on the right. */
.roster-player-portrait {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.06), transparent 60%),
    var(--bg-base);
  border: 1px solid var(--line-strong);
}
.roster-player-portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.roster-player-portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1.45rem;
}
.roster-player-portrait-dev {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.roster-player-portrait-jersey {
  position: absolute;
  bottom: 0;
  right: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  padding: 0.08rem 0.3rem 0.08rem 0.35rem;
  border-radius: 4px 0 9px 0;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
}
@media (max-width: 575.98px) {
  .roster-player-portrait { width: 46px; height: 46px; }
  .roster-player-portrait-fallback { font-size: 1.2rem; }
  .roster-player-portrait-dev { width: 13px; height: 13px; }
  .roster-player-portrait-jersey { font-size: 0.75rem; }
}

.roster-player-info { flex: 1; min-width: 0; }
.roster-player-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.roster-player-meta {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
/* Contract-year chip — gold tint indicating where the player is
   in their current deal. Renders inline with age + experience so
   the eye picks up tenure context without leaving the row. */
.roster-contract-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: rgba(253, 185, 19, 0.12);
  border: 1px solid rgba(253, 185, 19, 0.32);
  color: var(--gold, #fdb913);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}
/* Tenure chip — when did the player join THIS team. Comes from
   the joinedTeam* checkpoint roster_notifier stamps on the doc
   at every teamId change, or the rookie-deal era as fallback. */
.roster-tenure-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: rgba(76, 213, 163, 0.10);
  border: 1px solid rgba(76, 213, 163, 0.30);
  color: var(--success, #4cd5a3);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}
/* Pending-free-agent icon — walk-year flag. Tinted red so it
   reads as "watch this contract" without being alarming. */
.roster-fa-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: rgba(230, 57, 70, 0.14);
  border: 1px solid rgba(230, 57, 70, 0.4);
  color: #ff9faa;
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
}
.roster-fa-icon i { font-size: 0.86rem; }
@media (max-width: 575.98px) {
  .roster-contract-chip, .roster-fa-icon { font-size: 0.75rem; padding: 0.03rem 0.32rem; }
}
.roster-player-arrow {
  color: var(--text-dim);
  font-size: 1.1rem;
  transition: color 200ms ease, transform 200ms ease;
}
.roster-player-row:hover .roster-player-arrow {
  color: var(--accent-color);
  transform: translateX(2px);
}

/* F3-3 refactor (2026-05-14): .attributes-panel*, .attr-bar-single*,
   .upgrade-row*, and .contract-row* rules moved to
   _player_detail_styles.pug (included at top of `block sidebar`).
   Partial's .attributes-panel-header now styles `h3, h4` so the
   pdt-fix heading hierarchy correction applies to this page too. */


/* ═══════════════ EMPTY STATE ═══════════════ */
.empty-state-pro {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-pro i {
  font-size: 4rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.empty-state-pro h4 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.empty-state-pro p {
  color: var(--text-dim);
  max-width: 400px;
  margin: 0 auto;
}

/* ═══════════════ ANIMATIONS ═══════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

