/* FB27 legacy component layer: derived from the mockup's app.css with gradients, blur and
   shadows removed (STYLE.md section 6). Colours resolve to STYLE.md tokens through fb27.css. */
/* FB27 application components */

/* ---------- Header / navigation ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
}

.app-nav {
  min-height: 64px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink) !important;
  text-decoration: none !important;
  margin-right: 1.25rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
}

.brand-word {
  font-size: 1.38rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.brand-twenty {
  color: var(--red);
}

.brand-sub {
  font-size: 0.58rem;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  max-width: 68px;
  padding-left: 0.55rem;
  border-left: 1px solid var(--border);
  margin-left: 0.15rem;
  white-space: normal;
}

.app-nav-links {
  gap: 0.08rem;
}

.app-nav-links .nav-link {
  color: var(--ink-2);
  font-size: 0.705rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  padding: 0.62rem 0.64rem;
  border-radius: 0.45rem;
  position: relative;
}

.app-nav-links .nav-link:hover {
  color: var(--ink);
  background: var(--surface-2);
  text-decoration: none;
}

.app-nav-links .nav-link.active {
  color: var(--ink);
}

.app-nav-links .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.62rem;
  right: 0.62rem;
  bottom: 0.18rem;
  height: 3px;
  border-radius: 3px;
  background: var(--red);
}

.navbar-toggler {
  border-color: var(--border-strong);
}

[data-bs-theme="dark"] .navbar-toggler-icon {
  filter: invert(1);
}

.app-account {
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--ink-2);
  background: var(--surface);
}

.btn-icon:hover {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.theme-toggle .ico-sun {
  display: none;
}

[data-bs-theme="dark"] .theme-toggle .ico-sun {
  display: block;
}

[data-bs-theme="dark"] .theme-toggle .ico-moon {
  display: none;
}

.theme-toggle svg {
  fill: currentColor;
}

.btn-account {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  border-radius: 999px;
  padding-left: 0.6rem;
  padding-right: 0.7rem;
}

.account-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: none;
}

.app-dropdown {
  min-width: 215px;
}

/* ---------- Header score ticker ---------- */
.app-nav {
  position: relative;
}

.app-ticker {
  background: var(--bg);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
}

.score-ticker-shell {
  display: flex;
  align-items: stretch;
  min-height: 61px;
}

.score-ticker-week {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 43px;
  padding: 0 0.35rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.score-ticker-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.12s ease, color 0.12s ease;
}

.score-ticker-arrow:last-child {
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.score-ticker-arrow:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.score-ticker-arrow:disabled {
  opacity: 0.22;
  pointer-events: none;
}

.score-ticker-track {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.score-ticker-track::-webkit-scrollbar {
  display: none;
}

.score-ticker-game {
  display: flex;
  flex: 0 0 174px;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  padding: 0.35rem 0.65rem;
  border-left: 1px solid rgba(255, 255, 255, 0.075);
  color: #fff;
  text-decoration: none !important;
}

.score-ticker-game:hover {
  background: rgba(255, 255, 255, 0.075);
}

.score-ticker-team {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  gap: 0.3rem;
  align-items: center;
  min-width: 0;
  font-size: 0.67rem;
  line-height: 1.3;
}

.score-ticker-logo,
.score-ticker-logo .team-mark {
  display: block;
}

.score-ticker-abbr {
  overflow: hidden;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-ticker-rec {
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.56rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.score-ticker-score {
  min-width: 1.2rem;
  color: #fff;
  font-size: 0.73rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.score-ticker-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 24px;
}

.score-ticker-time {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.network-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 14px;
  padding: 0 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.network-badge.net-twitch {
  border-color: var(--panel-raised);
  background: var(--panel-raised);
  color: #fff;
}

.network-badge.net-youtube {
  border-color: var(--panel-raised);
  background: var(--panel-raised);
  color: #fff;
}

/* ---------- Teams mega menu ---------- */
.mega-nav {
  position: static;
}

.mega-nav > .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-chevron {
  opacity: 0.55;
  transition: transform 0.15s ease;
}

.mega-nav:hover .nav-chevron,
.mega-nav:focus-within .nav-chevron {
  transform: rotate(180deg);
}

.mega-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 50%;
  z-index: 1045;
  width: min(980px, calc(100vw - 2rem));
  max-height: calc(100vh - 5.5rem);
  overflow: auto;
  padding: 1rem 1.15rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.mega-nav:hover > .mega-menu,
.mega-nav:focus-within > .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.mega-menu-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.mega-menu-title {
  margin-top: 0.1rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.mega-conferences {
  display: grid;
  gap: 0.85rem;
}

.mega-conf-title {
  margin-bottom: 0.35rem;
  color: var(--red);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mega-div-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.mega-div-title {
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mega-team {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.22rem 0.25rem;
  border-radius: 0.35rem;
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: none !important;
}

.mega-team:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.mega-team > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mega-menu-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 800;
}

.mega-menu-foot a {
  color: var(--ink-2);
}

@media (max-width: 1199.98px) {
  .mega-menu,
  .nav-chevron {
    display: none !important;
  }
}

/* ---------- Next-game countdown ---------- */
.countdown-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1.5rem;
  align-items: center;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: 1.1rem 1.35rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 1rem;
  background-color: #F2C14E;
  background-image:
    radial-gradient(circle at 16% 0%, rgba(255, 244, 181, 0.6), transparent 42%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0 10px, transparent 10px 20px),
    linear-gradient(120deg, #e2b42a 0%, #c79511 58%, #b98409 100%);
  box-shadow: var(--shadow-sm);
  color: #1b1404;
}

.countdown-banner::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 320px;
  height: 320px;
  border: 34px solid rgba(27, 20, 4, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.countdown-promo,
.countdown-clock,
.countdown-actions {
  position: relative;
  z-index: 1;
}

.countdown-eyebrow {
  margin-bottom: 0.2rem;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.78;
}

.countdown-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
  color: #1b1404;
  font-size: clamp(1.3rem, 2.6vw, 2.05rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  text-transform: uppercase;
}

.countdown-team {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.countdown-vs {
  margin: 0 0.1rem;
  font-size: 0.62em;
  font-weight: 900;
  opacity: 0.58;
}

.countdown-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  color: rgba(27, 20, 4, 0.78);
  font-size: 0.72rem;
  font-weight: 650;
}

.countdown-banner .network-badge {
  color: #fff;
  box-shadow: 0 1px 2px rgba(27, 20, 4, 0.22);
}

.countdown-clock {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(27, 20, 4, 0.17);
  border-radius: 0.75rem;
  background: rgba(27, 20, 4, 0.1);
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.05rem;
}

.countdown-number {
  color: #171204;
  font-size: clamp(1.7rem, 3.4vw, 2.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.countdown-label {
  margin-top: 0.2rem;
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  opacity: 0.66;
  text-transform: uppercase;
}

.countdown-colon {
  align-self: flex-start;
  margin-top: 0.1rem;
  font-size: 1.6rem;
  font-weight: 900;
  opacity: 0.38;
}

.countdown-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.countdown-kicker {
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  opacity: 0.72;
  text-transform: uppercase;
}

.countdown-btn {
  border: 1px solid #1b1404;
  background: #1b1404;
  color: #fff7df;
  font-weight: 800;
}

.countdown-btn:hover {
  border-color: #34270d;
  background: #34270d;
  color: #fff7df;
}

.countdown-btn-ghost {
  border: 1px solid rgba(27, 20, 4, 0.34);
  background: transparent;
  color: #1b1404;
  font-weight: 800;
}

.countdown-btn-ghost:hover {
  border-color: rgba(27, 20, 4, 0.6);
  background: rgba(27, 20, 4, 0.08);
  color: #1b1404;
}

@media (max-width: 991.98px) {
  .countdown-banner {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .countdown-clock {
    justify-self: start;
  }

  .countdown-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .score-ticker-week,
  .score-ticker-arrow {
    display: none;
  }

  .score-ticker-game {
    flex-basis: 164px;
  }

  .countdown-banner {
    padding: 1rem;
  }

  .countdown-clock {
    width: 100%;
    justify-content: center;
  }

  .countdown-unit {
    min-width: 2.5rem;
  }
}

/* ---------- Buttons / forms ---------- */
.btn-accent {
  --bs-btn-color: var(--on-accent);
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: var(--on-accent);
  --bs-btn-hover-bg: var(--accent-strong);
  --bs-btn-hover-border-color: var(--accent-strong);
  --bs-btn-active-color: var(--on-accent);
  --bs-btn-active-bg: var(--accent-strong);
  --bs-btn-active-border-color: var(--accent-strong);
  font-weight: 750;
}

.btn-red {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--red);
  --bs-btn-border-color: var(--red);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--red-strong);
  --bs-btn-hover-border-color: var(--red-strong);
  font-weight: 750;
}

.btn-ghost,
.btn-soft {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.btn-ghost:hover,
.btn-soft:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-soft {
  background: var(--surface-2);
}

.btn-danger-soft {
  border: 1px solid color-mix(in srgb, var(--red) 42%, transparent);
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
}

.btn-danger-soft:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-success-soft {
  border: 1px solid color-mix(in srgb, var(--green) 42%, transparent);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}

.btn-success-soft:hover {
  background: var(--green);
  color: #fff;
}

.btn-xs {
  font-size: 0.74rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.42rem;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--ink-2);
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Page shell ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.28rem;
}

.page-title {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.05;
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.page-sub {
  color: var(--muted);
  margin: 0.42rem 0 0;
  max-width: 70ch;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.5rem 0 0.7rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.95rem;
  box-shadow: none;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.panel-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

.panel-body {
  padding: 1rem;
}

.panel-body-tight {
  padding: 0.45rem;
}

.panel-foot {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.link-quiet {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.link-quiet:hover {
  color: var(--accent);
}

.hr-tight {
  margin: 0.75rem 0;
}

/* ---------- Team marks / chips ---------- */
.team-mark {
  flex: 0 0 auto;
  border-radius: 9px;
  vertical-align: middle;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none !important;
  min-width: 0;
}

.team-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-link {
  color: var(--ink);
  font-weight: 700;
}

.team-link:hover {
  color: var(--accent);
}

/* ---------- Badges / ratings ---------- */
.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  padding: 0.18rem 0.34rem;
  border-radius: 0.35rem;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--border);
}

.pos-qb { background: color-mix(in srgb, var(--red) 13%, var(--surface)); color: var(--red); border-color: color-mix(in srgb, var(--red) 32%, var(--border)); }
.pos-rb { background: color-mix(in srgb, #c77b1e 14%, var(--surface)); color: #9a6200; border-color: color-mix(in srgb, #c77b1e 34%, var(--border)); }
.pos-wr { background: color-mix(in srgb, #2f78c4 13%, var(--surface)); color: #2364a8; border-color: color-mix(in srgb, #2f78c4 30%, var(--border)); }
.pos-te { background: color-mix(in srgb, #7c5bb8 13%, var(--surface)); color: #6b4ca3; border-color: color-mix(in srgb, #7c5bb8 30%, var(--border)); }
.pos-ol { background: color-mix(in srgb, #64748b 13%, var(--surface)); color: var(--ink-2); border-color: color-mix(in srgb, #64748b 30%, var(--border)); }
.pos-dl { background: color-mix(in srgb, #a14b2c 13%, var(--surface)); color: #8d3e22; border-color: color-mix(in srgb, #a14b2c 30%, var(--border)); }
.pos-lb { background: color-mix(in srgb, #2c8a6e 13%, var(--surface)); color: #1e735a; border-color: color-mix(in srgb, #2c8a6e 30%, var(--border)); }
.pos-db { background: color-mix(in srgb, #8a6b15 14%, var(--surface)); color: #806313; border-color: color-mix(in srgb, #8a6b15 30%, var(--border)); }
.pos-st { background: color-mix(in srgb, #6d28d9 10%, var(--surface)); color: #6d28d9; border-color: color-mix(in srgb, #6d28d9 26%, var(--border)); }

[data-bs-theme="dark"] .pos-rb { color: #f0b35d; }
[data-bs-theme="dark"] .pos-wr { color: #79b6f5; }
[data-bs-theme="dark"] .pos-te { color: #b79aee; }
[data-bs-theme="dark"] .pos-dl { color: #e48a68; }
[data-bs-theme="dark"] .pos-lb { color: #67c9ab; }
[data-bs-theme="dark"] .pos-db { color: #e0bd55; }
[data-bs-theme="dark"] .pos-st { color: #b69bff; }

.rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.12rem 0.32rem;
  border-radius: 0.35rem;
  font-size: 0.76rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: #fff;
}

.rating.r-elite { background: var(--rating-elite); color: #1d1602; }
.rating.r-great { background: var(--rating-great); }
.rating.r-good { background: var(--rating-good); }
.rating.r-solid { background: var(--rating-solid); }
.rating.r-avg { background: var(--rating-avg); }
.rating.r-low { background: var(--rating-low); }

.rating-row {
  display: grid;
  grid-template-columns: 6.8rem minmax(4rem, 1fr) 2.7rem;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.42rem;
}

.rating-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.rating-bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
}

.rating-track { fill: var(--surface-3); }
.rating-pot { fill: var(--rating-pot); }
.rating-bar .r-elite { fill: var(--rating-elite); }
.rating-bar .r-great { fill: var(--rating-great); }
.rating-bar .r-good { fill: var(--rating-good); }
.rating-bar .r-solid { fill: var(--rating-solid); }
.rating-bar .r-avg { fill: var(--rating-avg); }
.rating-bar .r-low { fill: var(--rating-low); }

.rating-num {
  font-size: 0.78rem;
  font-weight: 900;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rating-num.r-elite { color: var(--rating-elite); }
.rating-num.r-great { color: var(--rating-great); }
.rating-num.r-good { color: var(--rating-good); }
.rating-num.r-solid { color: var(--rating-solid); }
.rating-num.r-avg { color: var(--rating-avg); }
.rating-num.r-low { color: var(--rating-low); }

.rating-pot-num {
  color: var(--muted);
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--ink-2);
  white-space: nowrap;
}

.pill-red { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 32%, transparent); color: var(--red); }
.pill-green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 32%, transparent); color: var(--green); }
.pill-amber { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 32%, transparent); color: var(--amber); }
.pill-blue { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 32%, transparent); color: var(--accent); }

.record-pill {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

/* ---------- Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.7rem;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 0.85rem 0.95rem;
  box-shadow: none;
  min-width: 0;
}

.stat-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.18rem;
}

.stat-value {
  display: block;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat-foot {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.18rem;
}

.draft-clock-panel {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: none;
}

.on-clock-row {
  background: color-mix(in srgb, var(--amber) 12%, var(--surface));
}

.on-clock-row td {
  border-color: color-mix(in srgb, var(--amber) 30%, var(--border));
}

.stat-value-sm {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.roster-snap {
  border-color: var(--border) !important;
  color: var(--ink);
}

.roster-snap:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.stat-tile.accent {
  background: var(--panel);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}

.stat-tile.red {
  background: var(--panel);
  border-color: color-mix(in srgb, var(--red) 28%, var(--border));
}

/* ---------- Tables ---------- */
.table-app {
  margin-bottom: 0;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.table-app thead th {
  font-size: 0.63rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.65rem;
  white-space: nowrap;
}

.table-app tbody td,
.table-app tbody th {
  padding: 0.52rem 0.65rem;
  vertical-align: middle;
  border-color: var(--border);
}

.table-app tbody tr:hover {
  background: var(--surface-2);
}

.table-app .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-app .team-cell {
  min-width: 13rem;
}

.table-app caption {
  caption-side: top;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.65rem;
}

.rank-cell {
  width: 2.2rem;
  color: var(--muted);
  font-weight: 800;
}

.pos-num { color: var(--green); }
.neg-num { color: var(--red); }

.table-responsive {
  border-radius: inherit;
}

/* ---------- Home / heroes ---------- */
.home-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--panel);
  box-shadow: none;
  padding: 1.35rem;
  margin-bottom: 1.1rem;
}

.home-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 310px;
  height: 310px;
  border: 34px solid var(--stripe);
  border-radius: 50%;
  pointer-events: none;
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--red);
  margin-bottom: 0.4rem;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: none;
}

.home-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin: 0 0 0.55rem;
  max-width: 12ch;
}

.home-sub {
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 1rem;
}

.hero-scoreboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: none;
}

.hero-score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--border);
}

.hero-score-row:last-child {
  border-bottom: 0;
}

.hero-score-team {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.hero-score-name {
  font-weight: 800;
  line-height: 1.1;
}

.hero-score-record {
  font-size: 0.7rem;
  color: var(--muted);
}

.hero-score-points {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.hero-score-points.winner {
  color: var(--green);
}

.game-status {
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.game-status.final {
  color: var(--ink-2);
}

.game-status.live {
  color: var(--red);
}

/* ---------- Score cards / ticker ---------- */
.week-strip {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}

.week-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.38rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
}

.week-pill:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.week-pill.active {
  background: var(--ink);
  color: var(--app-bg);
  border-color: var(--ink);
}

.week-pill.future {
  opacity: 0.6;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 0.75rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  box-shadow: none;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none !important;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: none;
}

.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.game-card-top-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.game-card-team {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.62rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.game-card-team:last-of-type {
  border-bottom: 0;
}

.game-card-team.winner .game-card-name {
  color: var(--ink);
}

.game-card-name {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  min-width: 0;
  font-weight: 750;
}

.game-card-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card-score {
  font-size: 1.28rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.game-card-foot {
  padding: 0.38rem 0.8rem;
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.65rem;
  color: var(--muted);
}

/* ---------- Game of the Night vote ---------- */
.gotn-panel {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
}

.gotn-leaders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.gotn-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none !important;
}

.gotn-card:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.gotn-card-matchup {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gotn-card-votes {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.gotn-signin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.gotn-vote-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
  box-shadow: none;
}

.ticker {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.55rem 0 0.65rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.ticker-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none !important;
  white-space: nowrap;
}

.ticker-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.ticker-score {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* ---------- Team page ---------- */
.team-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--panel);
  box-shadow: none;
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
}

.team-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--panel);
}

.team-hero-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.team-hero-copy {
  min-width: 0;
}

.team-hero-name {
  font-size: clamp(1.55rem, 3.4vw, 2.5rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.045em;
  margin: 0;
}

.team-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.player-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--panel);
  border: 2px solid var(--border-strong);
  box-shadow: none;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.player-avatar small {
  position: absolute;
  bottom: -0.25rem;
  right: -0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.16rem 0.35rem;
  border-radius: 0.45rem;
  background: var(--ink);
  color: var(--app-bg);
  font-size: 0.68rem;
  font-weight: 900;
  border: 2px solid var(--surface);
}

.player-overall {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 0.9rem;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: #fff;
  margin-bottom: 0.25rem;
}

.player-overall.r-elite { background: var(--rating-elite); color: #1d1602; }
.player-overall.r-great { background: var(--rating-great); }
.player-overall.r-good { background: var(--rating-good); }
.player-overall.r-solid { background: var(--rating-solid); }
.player-overall.r-avg { background: var(--rating-avg); }
.player-overall.r-low { background: var(--rating-low); }

.dev-x,
.dev-super,
.dev-star {
  background: var(--amber-soft);
  border-color: color-mix(in srgb, var(--amber) 40%, transparent);
  color: var(--amber);
}

.dev-super {
  background: color-mix(in srgb, #8b5cf6 14%, var(--surface));
  border-color: color-mix(in srgb, #8b5cf6 36%, var(--border));
  color: #7c3aed;
}

.dev-star {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
  color: var(--accent);
}

[data-bs-theme="dark"] .dev-super { color: #c4a9ff; }

.team-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.mini-stat-label {
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: block;
}

.mini-stat-value {
  font-size: 1.15rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.cap-meter-svg {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 0.45rem;
  overflow: hidden;
}

.cap-track { fill: var(--surface-3); }
.cap-fill { fill: var(--green); }
.cap-meter-svg.warn .cap-fill { fill: var(--amber); }
.cap-meter-svg.over .cap-fill { fill: var(--red); }

.min-w-0 {
  min-width: 0;
}

.tabbar {
  display: flex;
  gap: 0.2rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.tabbar a {
  flex: 0 0 auto;
  padding: 0.6rem 0.8rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid transparent;
  text-decoration: none !important;
}

.tabbar a:hover {
  color: var(--ink);
  border-bottom-color: var(--border-strong);
}

.tabbar a.active {
  color: var(--ink);
  border-bottom-color: var(--red);
}

/* ---------- Roster / depth ---------- */
.roster-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.roster-column {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.6rem;
  min-height: 15rem;
}

.roster-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0.25rem 0.55rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.55rem;
}

.roster-column-title {
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roster-count {
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.roster-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 3rem;
}

.roster-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  box-shadow: none;
  cursor: grab;
  min-width: 0;
}

.roster-card:active {
  cursor: grabbing;
}

.roster-card.dragging {
  opacity: 0.45;
}

.roster-card-main {
  min-width: 0;
  flex: 1;
}

.roster-card-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.roster-card-meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.66rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.roster-empty {
  border: 1px dashed var(--border-strong);
  border-radius: 0.55rem;
  padding: 0.8rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
}

.depth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.8rem;
}

.depth-position {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  overflow: hidden;
}

.depth-position-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.7rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.depth-pos-name {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.depth-list {
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 3rem;
}

.depth-player {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--surface-2);
  font-size: 0.76rem;
  cursor: grab;
}

.depth-readonly .depth-player {
  cursor: default;
}

.depth-player .depth-rank {
  width: 1.2rem;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 900;
  color: var(--muted);
}

.depth-player .depth-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.depth-player .rating {
  min-width: 1.8rem;
  font-size: 0.68rem;
}

.drag-handle {
  color: var(--muted);
  cursor: grab;
  font-size: 0.9rem;
  line-height: 1;
}

.drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
  background: var(--accent-soft);
}

/* ---------- Game page ---------- */
.scoreboard {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--panel);
  box-shadow: none;
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.scoreboard-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.scoreboard-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.score-team {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.score-team.away {
  justify-content: flex-end;
  text-align: right;
}

.score-team-copy {
  min-width: 0;
}

.score-team-name {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.score-team-record {
  font-size: 0.72rem;
  color: var(--muted);
}

.score-middle {
  text-align: center;
  min-width: 7.5rem;
}

.score-number {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
}

.score-dash {
  color: var(--muted);
  font-weight: 500;
  margin: 0 0.2rem;
}

.score-final {
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 0.3rem;
}

.quarter-table {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
  overflow-x: auto;
}

.quarter-table table {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.quarter-table th,
.quarter-table td {
  padding: 0.25rem 0.45rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.quarter-table th:first-child,
.quarter-table td:first-child {
  text-align: left;
}

.drive-block {
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: var(--surface);
}

.drive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.7rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 750;
}

.drive-head .drive-team {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.drive-meta {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
}

.drive-result {
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.play-row {
  display: grid;
  grid-template-columns: 4.2rem 1fr auto;
  gap: 0.6rem;
  padding: 0.48rem 0.7rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.79rem;
}

.play-row:last-child {
  border-bottom: 0;
}

.play-clock {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.play-desc {
  color: var(--ink-2);
  line-height: 1.38;
}

.play-desc strong {
  color: var(--ink);
}

.play-tags {
  display: flex;
  gap: 0.25rem;
  align-items: start;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.play-chip {
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.32rem;
  border-radius: 0.25rem;
  background: var(--surface-3);
  color: var(--muted);
  white-space: nowrap;
}

.play-chip.score { background: var(--green-soft); color: var(--green); }
.play-chip.turnover { background: var(--red-soft); color: var(--red); }
.play-chip.big { background: var(--amber-soft); color: var(--amber); }

.score-log {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.score-log-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.7rem;
}

.pbp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.pbp-filters .btn {
  font-size: 0.68rem;
  padding: 0.22rem 0.55rem;
  border-radius: 0.4rem;
}

.pbp-filters .btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--app-bg);
}

/* ---------- Leaders / stats ---------- */
.leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0.8rem;
}

.leader-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  box-shadow: none;
  overflow: hidden;
}

.leader-list {
  display: flex;
  flex-direction: column;
}

.leader-row {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

.leader-row:last-child {
  border-bottom: 0;
}

.leader-row:hover {
  background: var(--surface-2);
}

.leader-rank {
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--muted);
  text-align: center;
}

.leader-name {
  font-size: 0.8rem;
  font-weight: 750;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-sub {
  display: block;
  font-size: 0.64rem;
  color: var(--muted);
  font-weight: 500;
}

.leader-value {
  font-size: 0.94rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.leader-row:first-child .leader-rank {
  color: var(--rating-elite);
}

/* ---------- Draft ---------- */
.draft-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.6fr);
  gap: 0.9rem;
}

.draft-board {
  display: flex;
  flex-direction: column;
  max-height: 65vh;
  overflow: auto;
}

.draft-pick {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
}

.draft-pick.on-clock {
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
}

.draft-pick.made {
  color: var(--muted);
}

.draft-pick-no {
  font-size: 0.68rem;
  font-weight: 900;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.draft-pick-name {
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.draft-pick-team {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.prospect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.6rem;
}

.prospect-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.prospect-card:hover {
  border-color: var(--border-strong);
}

.prospect-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.prospect-name {
  font-weight: 800;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prospect-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.66rem;
  color: var(--muted);
}

/* ---------- Auth / forms ---------- */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 1rem;
  align-items: start;
  max-width: 1050px;
  margin: 1rem auto;
}

.auth-aside {
  padding: 1.4rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: none;
}

.auth-aside h1 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: none;
  padding: 1.25rem;
}

.auth-card h2 {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.auth-feature {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-top: 0.9rem;
}

.auth-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 0.5rem;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 900;
  flex: 0 0 auto;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Empty / misc ---------- */
.empty-state {
  max-width: 560px;
  margin: 3rem auto;
  padding: 2rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: none;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  margin-bottom: 0.8rem;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 900;
  font-size: 1.2rem;
}

.text-tabular {
  font-variant-numeric: tabular-nums;
}

.nowrap {
  white-space: nowrap;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.app-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  font-size: 0.78rem;
}

.footer-brand {
  font-weight: 900;
  letter-spacing: -0.03em;
}

.app-footer a {
  color: var(--muted);
  font-weight: 700;
}

.app-footer a:hover {
  color: var(--accent);
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.toast-note {
  padding: 0.6rem 0.85rem;
  border-radius: 0.55rem;
  background: var(--ink);
  color: var(--app-bg);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: none;
}

.toast-note.error {
  background: var(--red);
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .app-account {
    border-left: 0;
    padding-left: 0;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 991.98px) {
  .roster-columns {
    grid-template-columns: 1fr;
  }

  .draft-layout {
    grid-template-columns: 1fr;
  }

  .draft-board {
    max-height: 45vh;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .page-head {
    align-items: flex-start;
  }

  .scoreboard-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    text-align: center;
  }

  .score-team,
  .score-team.away {
    justify-content: center;
    text-align: center;
  }

  .score-team.away {
    flex-direction: row-reverse;
  }

  .play-row {
    grid-template-columns: 3.4rem 1fr;
  }

  .play-tags {
    grid-column: 2;
    justify-content: flex-start;
  }

  .home-title {
    max-width: none;
  }

  .table-app .team-cell {
    min-width: 10rem;
  }
}

@media (max-width: 575.98px) {
  .app-nav {
    min-height: 58px;
  }

  .brand-sub {
    display: none !important;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .page-title {
    font-size: 1.55rem;
  }

  .hero-score-row {
    padding: 0.65rem 0.7rem;
  }

  .hero-score-points {
    font-size: 1.25rem;
  }
}

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