:root {
  --bg: #f2f2ef;
  --panel: #ffffff;
  --panel-2: #ecece8;
  --line: #deded9;
  --text: #12151b;
  --muted: #5d636d;
  --accent: #cf4318;
  --accent-2: #a8460a;
  --green: #157f3c;
  --blue: #2563eb;
  --gold: #9c7615;
  --red: #c92a2a;
  --radius: 4px;
  --ink: #11151c;
  --ink-2: #1c222c;
  --ink-rule: #2a303b;
  --ink-mute: #aab1bd;
  --font-display: "Barlow Condensed", "Inter", system-ui, sans-serif;
  --font-num: "Inter", system-ui, sans-serif;
  --font-serif: "Barlow Condensed", "Inter", system-ui, sans-serif;   /* legacy name: display face */
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
}
.brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; cursor: pointer; }
.brand:hover h1 { filter: brightness(1.12); }
.brand:active { transform: translateY(1px); }
.logo-mark { width: 30px; height: 30px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.08; }
.brand h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.tag { color: var(--muted); font-size: 11px; letter-spacing: 0.2px; margin-top: 1px; font-weight: 400; }
.header-right { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.meta-cluster {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
}
.season { color: var(--accent-2); font-weight: 600; }
.mode-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 9px; border-radius: 12px; }
.mode-badge.preseason { background: rgba(245,158,11,0.18); color: var(--accent-2); border: 1px solid var(--accent-2); }
.mode-badge.season { background: rgba(63,185,80,0.18); color: var(--green); border: 1px solid var(--green); }
.mode-badge.archived { background: rgba(139,152,165,0.16); color: var(--muted); border: 1px solid var(--muted); }
.season-select {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.season-select:hover { border-color: var(--accent); }
.locked-note { background: rgba(63,185,80,0.10); border: 1px solid var(--line); border-left: 3px solid var(--green); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; color: var(--muted); }
.preseason-note { background: rgba(245,158,11,0.10); border: 1px solid var(--line); border-left: 3px solid var(--accent-2); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; color: var(--muted); }
.season-note { background: rgba(245,158,11,0.10); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 8px; margin: 6px 0 16px; color: var(--muted); font-size: 13px; }
.sync-label { color: var(--muted); font-size: 12px; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tabs { padding: 0 14px; gap: 2px; }
.tab {
  background: none;
  border: none;
  color: var(--muted);
  padding: 13px 12px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); background: none; }

main { padding: 24px; max-width: 1100px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; }

h2 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 40px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

button.btn {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
button.btn:hover { border-color: var(--accent); }
button.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a1109; font-weight: 600; }
button.btn.primary:hover { background: var(--accent-2); }
button.btn.danger { color: var(--red); }
button.btn:disabled { opacity: 0.5; cursor: not-allowed; }
button.btn.small { padding: 4px 10px; font-size: 12px; }

input, select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: 0.01em; }
tr:hover td { background: rgba(0,0,0,0.025); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.rank { font-weight: 600; font-size: 14px; color: var(--muted); width: 40px; font-variant-numeric: tabular-nums; }
.total { font-weight: 600; font-size: 16px; color: var(--green); font-variant-numeric: tabular-nums; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: #d2d6dd; box-shadow: 0 2px 8px rgba(16,24,40,0.07); }
.card h3 { margin: 0 0 13px; display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em; font-size: 18px; }
.card h3 .muted, .card h3 span[class="muted"] { font-family: "Inter", sans-serif; }

.team-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 10px 3px 4px;
  font-size: 13px;
  margin: 3px;
}
.team-pill { transition: transform 0.12s ease, border-color 0.12s ease; }
.team-pill:hover { transform: translateY(-1px); border-color: var(--muted); }
.team-pill img { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--line); object-fit: cover; }
.team-pill.dropped { opacity: 0.5; text-decoration: line-through; }
.team-pill.added { border-color: var(--green); }
.badge { font-size: 10px; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.badge.q { background: rgba(63,185,80,0.18); color: var(--green); }
.badge.drop { background: rgba(255,123,114,0.18); color: var(--red); }
.badge.add { background: rgba(59,130,246,0.18); color: var(--blue); }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.grow { flex: 1; }

.team-logo { width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; margin-right: 8px; background: #fff2; }

.search-results {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 6px;
  background: var(--panel);
}
.search-results div {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.search-results div:hover { background: var(--panel-2); }
.search-results div.owned { opacity: 0.4; cursor: not-allowed; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: 8px;
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 50;
  max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { border-color: var(--red); }
.toast.ok { border-color: var(--green); }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 16px 24px;
  text-align: center;
}
.progress { color: var(--muted); font-size: 13px; }
.pts { color: var(--accent-2); font-weight: 600; }
small.dim { color: var(--muted); }

/* clickable participant links */
.plink { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: pointer; }
.plink:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* horizontal-scroll wrapper for tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* participant avatars */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; font-weight: 700; flex: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
  letter-spacing: 0.5px;
}
.part-cell { display: flex; align-items: center; gap: 9px; }
.part-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }

/* standings podium */
.podium {
  display: flex; align-items: flex-end; justify-content: center; gap: 14px;
  margin: 8px 0 26px; flex-wrap: nowrap;
}
.podium-card {
  position: relative; flex: 1 1 0; max-width: 230px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-top-width: 3px;
  border-radius: 12px; padding: 18px 12px 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.podium-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.35); }
.podium-card .crown { position: absolute; top: -20px; font-size: 26px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5)); }
.podium-medal { font-size: 22px; line-height: 1; }
.podium-name { font-weight: 600; font-size: 15px; text-align: center; }
.podium-total { font-size: 30px; font-weight: 700; color: var(--green); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.podium-sub { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.podium-card.place-1 { border-color: var(--gold); padding-top: 30px; box-shadow: 0 0 22px rgba(245,196,81,0.12); }
.podium-card.place-1 .podium-total { color: var(--gold); }
.podium-card.place-2 { border-color: #c7d0d8; }
.podium-card.place-3 { border-color: #cd8e57; }

/* medal-tinted ranks in the table */
.rank.medal-1 { color: var(--gold); }
.rank.medal-2 { color: #8b929c; }
.rank.medal-3 { color: #cd8e57; }

/* animated chart draw */
.chart polyline.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* league history */
.history-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 18px; margin-bottom: 18px; }
.history-awards .card { margin-bottom: 0; }
.award-card h3 { margin-bottom: 10px; }
.award-card.champ { border-color: var(--gold); box-shadow: 0 0 18px rgba(245,196,81,0.10); }
.award-card.joke { border-color: var(--red); }
.award-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.award-row:last-child { border-bottom: none; }
.award-season { font-size: 12px; color: var(--muted); width: 52px; flex: none; }
.award-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.award-pts { font-size: 13px; flex: none; margin-left: auto; white-space: nowrap; }
.award-card .avatar-img, .award-card .avatar { flex: none; }
.record-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.record-row:last-child { border-bottom: none; }
.record-row span { color: var(--muted); }

/* segmented toggle */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.seg button { background: var(--panel); border: none; color: var(--muted); padding: 7px 14px; cursor: pointer; font-size: 13px; }
.seg button:not(:last-child) { border-right: 1px solid var(--line); }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--accent); color: #1a1109; font-weight: 600; }
.badge.slot { background: rgba(245,158,11,0.16); color: var(--accent-2); margin-left: 4px; }

/* trends chart */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }

#participant-view { padding: 24px; max-width: 1100px; margin: 0 auto; }

/* ---- mobile pass ---- */
@media (max-width: 640px) {
  header { padding: 12px 14px; }
  .brand h1 { font-size: 22px; }
  .logo-mark { width: 36px; height: 36px; }
  .tag { display: none; }
  header { padding: 12px 12px; }
  .header-right { gap: 6px; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  /* The year selector already says "· current" / the past year, so drop the
     redundant status pill (Season / Past season) on phones to save the row. */
  .meta-cluster { display: none; }
  /* Tighten the three controls just enough to share one row on a phone;
     flex-wrap above still catches any narrower device gracefully. */
  .season-select { font-size: 12px; padding: 5px 10px; }
  #sync-btn { padding: 7px 12px; font-size: 13px; }
  .account > button { padding: 7px 11px; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .season { font-size: 13px; }
  main, #participant-view { padding: 14px; }
  .tabs { padding: 0 8px; }
  .tab { padding: 12px 12px; font-size: 13px; }
  .card { padding: 14px; }
  h2 { font-size: 18px; }
  th, td { padding: 8px 9px; }
  /* let wide tables scroll instead of crushing */
  .table-wrap table { width: auto; min-width: 100%; }
  .table-wrap th, .table-wrap td { white-space: nowrap; }
  .team-pill { font-size: 12px; }
  footer { padding: 14px; }
  .podium { gap: 7px; margin-bottom: 18px; }
  .podium-card { padding: 14px 6px 10px; gap: 4px; }
  .podium-total { font-size: 22px; }
  .podium-name { font-size: 12px; }
  .podium-card .avatar { width: 40px !important; height: 40px !important; font-size: 15px !important; }
}

/* ---- Game Day -------------------------------------------------------------- */
.gd-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; margin: 6px 0 4px; }
.gd-arrow { background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 13px; }
.gd-arrow:hover:not([disabled]) { border-color: var(--accent); }
.gd-arrow[disabled] { opacity: 0.35; cursor: default; }
.gd-date { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.gd-date strong { font-size: 15px; }
.gd-datepicker { background: var(--bg); color: var(--muted); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 6px; font-size: 11px; color-scheme: light; }
.gd-count { font-size: 12px; margin: 2px 0 10px; display: flex; align-items: center; gap: 12px; }
.gd-refresh { background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 7px; padding: 4px 11px; cursor: pointer; font-size: 12px; font-weight: 600; }
.gd-refresh:hover:not([disabled]) { border-color: var(--accent); }
.gd-refresh[disabled] { opacity: 0.5; cursor: default; }
.gd-livepill { display: inline-flex; align-items: center; gap: 6px; color: #ff5a5a; font-weight: 700; font-size: 12px; }

.gd-h { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; font-size: 16px; }
.gd-h-count { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 11px; padding: 1px 9px; font-size: 12px; font-weight: 700; }
.gd-h-sub { color: var(--muted); font-size: 12px; font-weight: 400; }

.gd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; }
.gd-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 15px 11px; position: relative; }
.gd-h2h { border-left: 3px solid var(--accent); background: linear-gradient(90deg, rgba(255,122,24,0.07), var(--panel) 55%); }
.gd-intra { border-left: 3px solid var(--blue); }
.gd-other { border-left: 3px solid var(--line); }

.gd-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gd-team-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.gd-team-row .gd-team-name { flex: 1; }
.gd-team-row .team-logo { margin-right: 0; }
.gd-card > .gd-side:last-child .gd-team-row,
.gd-card > .gd-side:last-child .gd-owner { flex-direction: row-reverse; }
.gd-card > .gd-side:last-child { text-align: right; }
.gd-team-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-owner { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; }
.gd-owner span { overflow: hidden; text-overflow: ellipsis; }
.gd-unowned { font-style: italic; opacity: 0.7; }
.gd-side.lose { opacity: 0.48; }
.gd-side.win .gd-team-name { color: var(--green); }
.gd-result { font-weight: 800; font-size: 11px; padding: 1px 6px; border-radius: 5px; flex: none; }
.gd-side.win .gd-result { background: rgba(63,185,80,0.18); color: var(--green); }
.gd-side.lose .gd-result { background: rgba(139,152,165,0.14); color: var(--muted); }
.gd-score { font-weight: 700; font-size: 16px; flex: none; font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; letter-spacing: -0.01em; }
.gd-card > .gd-side:last-child .gd-score { text-align: left; }
.gd-score.win { color: var(--green); }
.gd-score.lose { color: var(--muted); }
.gd-score.live { color: var(--text); }
.gd-vs { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; text-align: center; flex: none; white-space: nowrap; }
.gd-live { color: #ff5a5a; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.gd-livedot { width: 7px; height: 7px; border-radius: 50%; background: #ff5a5a; animation: gdpulse 1.4s ease-in-out infinite; }
@keyframes gdpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.gd-islive { border-color: #ff5a5a55; box-shadow: 0 0 0 1px #ff5a5a33; }
.gd-opp .gd-team-name { font-weight: 500; color: var(--muted); }

.badge.phase { vertical-align: middle; position: absolute; top: -8px; left: 13px;
  background: var(--panel-2); border: 1px solid var(--line); }
.badge.phase.ncaa, .badge.phase.first_four { background: rgba(255,122,24,0.2); color: var(--accent-2); border-color: var(--accent); }

@media (max-width: 560px) {
  .gd-list { grid-template-columns: 1fr; }
}

/* ---- Auth: account menu, login modal, members panel ----------------------- */
.account { position: relative; display: inline-flex; }
.account-menu { position: absolute; right: 0; top: 110%; z-index: 30;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 150px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.account-menu .btn { width: 100%; text-align: left; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; width: min(360px, 92vw); box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
.modal h3 { margin: 0 0 14px; }
.modal-form { display: flex; flex-direction: column; gap: 10px; }
.modal-form input { width: 100%; }
.modal-err { color: var(--red); font-size: 13px; margin: 2px 0 0; min-height: 16px; }

.userlist { display: flex; flex-direction: column; gap: 8px; }
.userrow { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap; }

/* ---- Standings NCAA mark + Team Tracker elimination ----------------------- */
.ncaa-dot { display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; margin-left: 5px; vertical-align: middle;
  background: rgba(255,122,24,0.16); color: var(--accent); flex: none;
  border: 1px solid rgba(255,122,24,0.5); }

.tracker-legend { font-size: 12px; margin: -4px 0 14px; }
.elim-key { color: var(--muted); opacity: 0.55; }
tr.elim td { opacity: 0.42; }
tr.elim td.pts { color: var(--muted); }
small.live-ok { color: var(--green); font-weight: 600; }

/* ---- Standings: compact leaderboard + expandable rosters ------------------ */
.standings-controls { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.team-toggle { background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 1px 8px; font-size: 11px; cursor: pointer; margin-left: 10px;
  display: inline-flex; align-items: center; gap: 4px; }
.team-toggle:hover { border-color: var(--accent); color: var(--text); }
.team-toggle .chev { font-size: 9px; }
.standings-row td { vertical-align: middle; }
.roster-detail td { background: rgba(0,0,0,0.03); border-bottom: 1px solid var(--line);
  padding: 8px 12px 10px; }
.roster-detail .team-pill { margin: 3px; }

/* ---- Photo avatars (fall back to .avatar initials if image missing) ------- */
.avatar-img { border-radius: 50%; object-fit: cover; vertical-align: middle; flex: none;
  background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15); }
.podium-card .avatar-img { width: 58px !important; height: 58px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4); }

/* ---- History repeat-award medallion (2nd title, 3rd Joke, ...) ------------- */
.repeat-badge { display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px; margin-left: 6px; border-radius: 10px;
  font-size: 11px; font-weight: 800; line-height: 1; flex: none;
  font-variant-numeric: tabular-nums; }
.repeat-badge.champ { background: rgba(245,196,81,0.18); color: var(--gold); border: 1px solid var(--gold)66; }
.repeat-badge.joke  { background: rgba(255,123,114,0.16); color: var(--red); border: 1px solid var(--red)55; }
.repeat-badge.juice { background: rgba(245,158,11,0.16); color: var(--accent-2); border: 1px solid #f59e0b55; }

/* ---- History streak tags + tight-margin highlight ------------------------- */
.streak-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px;
  margin-left: 6px; white-space: nowrap; }
.streak-tag.champ { background: rgba(245,196,81,0.16); color: var(--gold); }
.streak-tag.joke  { background: rgba(255,123,114,0.16); color: var(--red); }
.by-tight { color: var(--accent-2); font-weight: 700; }

/* ---- Rules / How It Works -------------------------------------------------- */
.rules-card { max-width: 720px; }
.rules-card h3 { display: block; }
.rules-list { margin: 0; padding-left: 20px; }
.rules-list li { margin: 7px 0; color: var(--text); }
.rules-card table td { padding: 9px 12px; }
.rules-card table tr:last-child td { border-bottom: none; }

/* ---- Trivia -------------------------------------------------------------- */
.trivia-score {
  display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.trivia-stat {
  flex: 1; min-width: 78px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.trivia-stat .ts-val {
  font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums;
}
.trivia-stat .ts-label {
  font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.trivia-stat.hot .ts-val { color: var(--accent); }

.trivia-card { max-width: 680px; }
.trivia-cat {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--accent-2); background: rgba(214,69,26,0.10);
  border: 1px solid rgba(214,69,26,0.25); border-radius: 999px; padding: 3px 11px; margin-bottom: 12px;
}
.trivia-q {
  font-family: var(--font-serif); font-size: 22px; font-weight: 600; line-height: 1.3;
  color: var(--text); margin-bottom: 18px;
}
.trivia-choices { display: flex; flex-direction: column; gap: 9px; }
.trivia-choice {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--text); font-size: 15px; font-weight: 500;
  cursor: pointer; transition: border-color .12s, background .12s, transform .06s;
}
.trivia-choice:not(:disabled):hover { border-color: var(--accent); background: rgba(214,69,26,0.04); }
.trivia-choice:not(:disabled):active { transform: scale(0.995); }
.trivia-choice .tc-key {
  flex: none; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
  background: var(--panel-2); color: var(--muted); font-weight: 700; font-size: 13px;
}
.trivia-choice.correct {
  border-color: var(--green); background: rgba(21,127,60,0.10);
}
.trivia-choice.correct .tc-key { background: var(--green); color: #fff; }
.trivia-choice.wrong {
  border-color: var(--red); background: rgba(201,42,42,0.08);
}
.trivia-choice.wrong .tc-key { background: var(--red); color: #fff; }
.trivia-choice.dim { opacity: 0.55; }
.trivia-choice:disabled { cursor: default; }

.trivia-explain {
  margin-top: 16px; padding: 13px 15px; border-radius: 10px; border: 1px solid var(--line);
  border-left-width: 3px;
}
.trivia-explain.good { border-left-color: var(--green); background: rgba(21,127,60,0.06); }
.trivia-explain.bad { border-left-color: var(--red); background: rgba(201,42,42,0.05); }
.trivia-verdict { font-weight: 700; font-size: 15px; margin-bottom: 7px; }
.trivia-explain.good .trivia-verdict { color: var(--green); }
.trivia-explain.bad .trivia-verdict { color: var(--red); }
.trivia-explain-body { display: flex; align-items: center; gap: 11px; color: var(--text); font-size: 14px; line-height: 1.45; }
.trivia-explain-body .avatar-img, .trivia-explain-body .avatar { flex: none; border-radius: 50%; }
.trivia-next { margin-top: 16px; }

/* ---- The Ledger (head-to-head) ------------------------------------------- */
.ledger-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.ledger-card { padding: 14px; }
.ledger-card:hover { transform: none; }
.lc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lc-head .avatar-img, .lc-head .avatar { flex: none; border-radius: 50%; }
.lc-name { font-weight: 700; font-size: 15px; color: var(--text); }
.lc-rec { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lc-lines { display: flex; flex-direction: column; gap: 6px; }
.lc-line { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.lc-line strong { font-variant-numeric: tabular-nums; }
.lc-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.lc-tag.good { color: var(--green); background: rgba(21,127,60,0.10); }
.lc-tag.bad { color: var(--red); background: rgba(201,42,42,0.09); }

.ledger-grid { font-variant-numeric: tabular-nums; border-collapse: separate; border-spacing: 0; }
.ledger-grid th, .ledger-grid td {
  padding: 5px 8px; text-align: center; font-size: 12px; border-bottom: 1px solid var(--line);
}
.ledger-grid .lg-corner { position: sticky; left: 0; z-index: 3; background: var(--panel); }
.ledger-grid .lg-colhead { vertical-align: bottom; }
.ledger-grid .lg-colhead .avatar-img, .ledger-grid .lg-colhead .avatar {
  border-radius: 50%; display: inline-block;
}
.ledger-grid .lg-rowhead {
  position: sticky; left: 0; z-index: 2; background: var(--panel);
  text-align: left; white-space: nowrap; font-weight: 600;
}
.ledger-grid .lg-rowhead .part-cell { display: flex; align-items: center; gap: 7px; }
.ledger-grid .lg-rowhead .avatar-img, .ledger-grid .lg-rowhead .avatar {
  border-radius: 50%; flex: none;
}
.ledger-grid .lg-cell { font-weight: 600; }
.ledger-grid .lg-cell.win { color: var(--green); background: rgba(21,127,60,0.07); }
.ledger-grid .lg-cell.loss { color: var(--red); background: rgba(201,42,42,0.06); }
.ledger-grid .lg-cell.even { color: var(--muted); }
.ledger-grid .lg-self { color: var(--line); }
.ledger-grid tr:hover .lg-cell { filter: brightness(0.97); }

/* ---- Owner trophy case (profile page) ------------------------------------ */
.tc-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.tc-stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 6px; text-align: center; }
.tc-stat.gold { background: rgba(245,197,66,0.13); border-color: rgba(156,118,21,0.4); }
.tc-val { font-size: 25px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.tc-stat.gold .tc-val { color: #9c7615; }
.tc-lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 3px; }
.tc-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; margin-top: 14px; }
.tc-badge { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfbfc; }
.tc-badge.gold { background: rgba(245,197,66,0.10); border-color: rgba(156,118,21,0.32); }
.tc-badge.bad { background: rgba(201,42,42,0.05); }
.tc-badge-e { font-size: 21px; line-height: 1.1; flex: none; }
.tc-badge-t { font-weight: 700; font-size: 13.5px; color: var(--text); }
.tc-badge-d { font-size: 12px; color: var(--muted); margin-top: 1px; }
.tc-timeline { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.tc-year { flex: none; width: 54px; text-align: center; padding: 8px 4px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line); }
.tc-year-rank { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text); }
.tc-year-lbl { font-size: 10px; color: var(--muted); margin-top: 2px; letter-spacing: 0.02em; }
.tc-year.first { background: rgba(245,197,66,0.20); border-color: #9c7615; }
.tc-year.first .tc-year-rank { color: #9c7615; }
.tc-year.second { background: rgba(139,152,165,0.18); }
.tc-year.third { background: rgba(205,127,50,0.16); }
.tc-year.last { background: rgba(201,42,42,0.10); border-color: rgba(201,42,42,0.4); }
.tc-year.last .tc-year-rank { color: var(--red); }
@media (max-width: 640px) { .tc-stats { grid-template-columns: repeat(3, 1fr); } }

/* ---- Dynasty Grid (History heatmap) -------------------------------------- */
.dg-legend { display: flex; align-items: center; gap: 8px; font-size: 12px;
  color: var(--muted); margin: -4px 0 12px; }
.dg-ramp { width: 110px; height: 11px; border-radius: 6px; border: 1px solid var(--line);
  background: linear-gradient(90deg, rgb(201,138,26), rgb(239,239,241), rgb(201,42,42)); }
.dynasty { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.dynasty th, .dynasty td { padding: 0; border: 0; }
.dynasty .dg-corner { position: sticky; left: 0; z-index: 3; background: var(--panel);
  text-align: left; padding: 4px 10px; font-size: 12px; color: var(--muted); }
.dynasty .dg-col { font-size: 11px; color: var(--muted); font-weight: 600;
  padding: 4px 3px 6px; text-align: center; white-space: nowrap; }
.dynasty .dg-owner { position: sticky; left: 0; z-index: 2; background: var(--panel);
  text-align: left; padding: 3px 12px 3px 6px; white-space: nowrap; }
.dynasty .dg-owner .part-cell { display: flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 12.5px; }
.dynasty .dg-owner .avatar-img, .dynasty .dg-owner .avatar { border-radius: 50%; flex: none; }
.dg-cell { width: 34px; min-width: 34px; height: 30px; text-align: center;
  font-size: 12.5px; font-weight: 700; border: 2px solid var(--panel); border-radius: 6px; }
.dg-cell.dg-champ { box-shadow: inset 0 0 0 1.5px rgba(90,66,8,0.55); }
.dg-empty { background: repeating-linear-gradient(45deg, transparent, transparent 4px,
  rgba(0,0,0,0.035) 4px, rgba(0,0,0,0.035) 5px); border-color: var(--panel); }

/* ---- Team profile modal (Team History click-through) --------------------- */
.modal.wide { width: min(800px, 94vw); max-height: 88vh; overflow-y: auto; }
.tp-row { cursor: pointer; }
.tp-row:hover td { background: rgba(214,69,26,0.06); }
.tp-head { display: flex; align-items: center; gap: 14px; margin: -6px 0 14px; }
.tp-logo { width: 54px; height: 54px; flex: none; border-radius: 50%; background: #fff;
  border: 2px solid var(--line); object-fit: contain; }
.tp-note { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px;
  margin-bottom: 14px; }
.tp-owner { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.tp-fin { color: var(--muted); font-size: 11.5px; margin: -1px 0 4px 27px; }
.tp-champ { color: var(--gold); font-weight: 700; }
.modal.wide th, .modal.wide td { padding: 7px 9px; font-size: 13px; white-space: nowrap; }
.modal.wide .table-wrap { margin: 0 -8px; }

/* ---- Nav groups + team click-through ------------------------------------- */
.tab-sep { width: 1px; flex: none; align-self: center; height: 18px; background: var(--line); margin: 0 6px; }
.tlink { color: inherit; text-decoration: none; border-bottom: 1px dotted transparent; }
.tlink:hover { color: var(--accent); border-bottom-color: var(--accent); }
.team-pill.clickable { cursor: pointer; }
.team-pill.clickable:hover { border-color: var(--accent); }

/* ---- Standings: roster strip, trend sparkline, movement ------------------ */
.standings-table th.hide-m, .standings-table td.hide-m { }
.roster-strip-cell { padding-top: 6px; padding-bottom: 6px; }
.logo-strip { display: flex; flex-wrap: wrap; gap: 3px; max-width: 330px; }
.logo-strip .chip { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line);
  object-fit: contain; cursor: pointer; transition: transform 0.12s ease, border-color 0.12s ease; position: relative; }
.logo-strip .chip:hover { transform: scale(1.3); border-color: var(--accent); z-index: 1; }
.logo-strip .chip.dim { opacity: 0.28; filter: grayscale(1); }
.logo-strip .chip.dim:hover { opacity: 0.8; filter: none; }
.logo-strip .chip-txt { display: inline-flex; align-items: center; justify-content: center; font-size: 8px;
  font-weight: 700; color: var(--muted); background: var(--panel-2); }
.trend-cell { width: 96px; }
.spark { display: block; width: 84px; height: 22px; margin-left: auto; overflow: visible; }
.spark polyline { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; opacity: 0.8; }
.spark circle { fill: var(--accent); }
.standings-table td.behind { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.mover { display: inline-flex; align-items: baseline; font-size: 11px; font-weight: 700; margin-left: 8px;
  padding: 1px 7px; border-radius: 9px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.mover.up { color: var(--green); background: rgba(21,127,60,0.10); }
.mover.down { color: var(--red); background: rgba(201,42,42,0.09); }
.mover-pts { font-weight: 500; opacity: 0.85; }
@media (max-width: 640px) {
  .hide-m { display: none !important; }
  .mover-pts { display: none; }
}

/* ---- Wide-screen layout: one shared column -------------------------------- */
/* Header, tabs and content all hang off the same centered column (--page), so
   on a big monitor the nav lines up with the content instead of hugging the
   far-left edge. The Draft Board gets a wider column: 5 owners across. */
:root { --page: 1280px; }
body:has(#tab-draftboard.active) { --page: 1680px; }
main, #participant-view { max-width: var(--page); }
header { padding-left: max(24px, calc((100% - var(--page)) / 2 + 24px));
         padding-right: max(24px, calc((100% - var(--page)) / 2 + 24px)); }
.tabs { padding-left: max(12px, calc((100% - var(--page)) / 2 + 12px));
        padding-right: max(12px, calc((100% - var(--page)) / 2 + 12px)); }
@media (max-width: 640px) {
  header { padding-left: 12px; padding-right: 12px; }
  .tabs { padding-left: 8px; padding-right: 8px; }
}
body.tv main { max-width: none; }
/* ---- Post-sale broadcast graphic (shown only after SOLD) ------------------ */
.db-splash { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.db-splash.show { opacity: 1; }
.db-splash.bc { background: rgba(9,11,16,0.84); }
.bc-card { --tc: #d6451a; --tci: #fff; --tct: #a8460a; position: relative; display: grid;
  grid-template-columns: clamp(190px, 21vw, 290px) 1fr; width: min(1240px, 95vw); max-height: 94vh;
  background: #f5f5f2; color: #11151c; overflow: hidden; border-radius: 4px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.65); font-family: "Barlow Condensed", "Inter", sans-serif;
  transform: translateY(26px) scale(0.985); opacity: 0;
  transition: transform 0.5s cubic-bezier(.2,.9,.2,1), opacity 0.3s ease; }
.bc.show .bc-card { transform: none; opacity: 1; }

.bc-slab { position: relative; background: var(--tc); color: var(--tci); display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; gap: 14px; padding: 24px 14% 24px 18px;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%); }
.bc-slab::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,0.08) 0 16px, transparent 16px 32px),
              linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.28)); }
.bc-slab > * { position: relative; }
.bc-bug { text-align: center; font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; font-size: 15px; line-height: 1.2; }
.bc-bug small { display: block; font-weight: 600; letter-spacing: 0.12em; font-size: 11.5px; opacity: 0.85; margin-top: 2px; }
.bc-plate { width: clamp(118px, 12.5vw, 176px); aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 34px rgba(0,0,0,0.4), 0 0 0 7px rgba(255,255,255,0.22);
  animation: bc-pop 0.65s 0.2s both cubic-bezier(.2,1.5,.4,1); }
.bc-plate img { width: 74%; height: 74%; object-fit: contain; }
.bc-pick { text-align: center; font-weight: 800; line-height: 1; text-transform: uppercase; }
.bc-pick small { display: block; font-size: 12px; letter-spacing: 0.22em; opacity: 0.85; font-weight: 700; }
.bc-pick b { display: block; font-size: clamp(38px, 4.4vw, 60px); margin: 2px 0; font-variant-numeric: tabular-nums; }

.bc-body { min-width: 0; padding: 24px 30px 18px 6px; display: flex; flex-direction: column; }
.bc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; }
.bc-id { min-width: 0; }
.bc-sold { display: inline-block; background: #11151c; color: #fff; transform: skewX(-14deg); padding: 3px 16px; }
.bc-sold span { display: block; transform: skewX(14deg); font-weight: 800; letter-spacing: 0.28em; font-size: 15px; text-transform: uppercase; }
.bc-team { font-weight: 800; text-transform: uppercase; font-size: clamp(42px, 6vw, 90px); line-height: 0.9; letter-spacing: -0.005em;
  margin-top: 10px; animation: bc-slide 0.55s 0.3s both cubic-bezier(.2,.9,.2,1); overflow-wrap: anywhere; }
.bc-mascot { font-weight: 600; text-transform: uppercase; letter-spacing: 0.24em; font-size: clamp(13px, 1.25vw, 18px); color: #5b616b; margin-top: 6px;
  animation: bc-slide 0.55s 0.38s both cubic-bezier(.2,.9,.2,1); }
.bc-to { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 700; text-transform: uppercase;
  font-size: clamp(20px, 2.2vw, 31px); line-height: 1; animation: bc-slide 0.55s 0.46s both cubic-bezier(.2,.9,.2,1); }
.bc-to small { font-size: 0.5em; letter-spacing: 0.24em; color: #5b616b; }
.bc-price { flex: none; text-align: right; animation: bc-slide 0.55s 0.4s both cubic-bezier(.2,.9,.2,1); }
.bc-price small { display: block; font-weight: 700; letter-spacing: 0.24em; font-size: 12.5px; color: #5b616b; text-transform: uppercase; }
.bc-price b { display: block; font-weight: 800; font-size: clamp(66px, 9.4vw, 148px); line-height: 0.84; color: var(--tct);
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.bc-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #11151c; color: #fff;
  margin-top: 18px; border-left: 7px solid var(--tc); }
.bc-stat { padding: 9px 16px 10px; border-left: 1px solid #2a303b; opacity: 0; animation: bc-fade 0.45s both; animation-delay: calc(var(--i) * 70ms + 550ms); }
.bc-stat:first-child { border-left: 0; }
.bc-stat b { display: block; font-weight: 800; font-size: clamp(26px, 2.9vw, 42px); line-height: 1; font-variant-numeric: tabular-nums; }
.bc-stat small { display: block; font-weight: 600; font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: #aab1bd; margin-top: 3px; }

.bc-lower { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; padding-top: 16px; min-height: 0; }
.bc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 800; letter-spacing: 0.2em; font-size: 12.5px;
  text-transform: uppercase; border-bottom: 2px solid #11151c; padding-bottom: 4px; margin-bottom: 10px; }
.bc-h span:last-child:not(:first-child) { font-weight: 600; letter-spacing: 0.12em; font-size: 11px; color: #5b616b; }
.bc-bars, .bc-axis { display: flex; gap: 4px; }
.bc-bars { align-items: flex-end; height: clamp(110px, 13.5vw, 178px); border-bottom: 2px solid #11151c; }
.bc-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.bc-val { font-weight: 700; font-size: 14px; line-height: 1; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.bc-tag { font-weight: 800; font-size: 9.5px; letter-spacing: 0.04em; line-height: 1; background: #11151c; color: #fff; padding: 2px 3px; margin-bottom: 2px; }
.bc-tag.champ { background: #b8860b; }
.bc-bar { width: 100%; background: var(--tc); opacity: 0.45; border-radius: 2px 2px 0 0; transform-origin: bottom;
  animation: bc-grow 0.6s both cubic-bezier(.2,.9,.2,1); animation-delay: calc(var(--i) * 38ms + 700ms); }
.bc-bar.best { opacity: 1; }
.bc-bar.title { box-shadow: inset 0 4px 0 #d4a017; }
.bc-stub { width: 100%; height: 3px; background: repeating-linear-gradient(90deg, #c4c7cd 0 3px, transparent 3px 6px); }
.bc-axis { padding-top: 5px; }
.bc-tick { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bc-tick .avatar, .bc-tick .avatar-img { width: 20px !important; height: 20px !important; font-size: 8px !important; }
.bc-noav { width: 20px; height: 20px; display: block; }
.bc-yr { font-weight: 700; font-size: 12.5px; line-height: 1; color: #11151c; }
.bc-tick.off .bc-yr { color: #a3a8b0; }
.bc-cost { font-weight: 600; font-size: 11.5px; line-height: 1; color: #5b616b; min-height: 12px; font-variant-numeric: tabular-nums; }

.bc-facts { min-width: 0; }
.bc-fact { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid #dcddd9;
  font-family: "Inter", sans-serif; font-size: 13px; line-height: 1.32; color: #2b3038; }
.bc-fact strong { color: #11151c; }
.bc-fl { font-family: "Barlow Condensed", sans-serif; font-weight: 800; letter-spacing: 0.14em; font-size: 12.5px; text-transform: uppercase; color: var(--tct); padding-top: 1px; }
.bc-owners { display: flex; flex-wrap: wrap; gap: 5px 10px; padding-top: 9px; }
.bc-own { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.bc-own b { color: var(--tct); font-weight: 800; }

.bc-never { margin-top: 22px; padding: 26px 0 30px; border-top: 3px solid #11151c; }
.bc-never-big { font-weight: 800; text-transform: uppercase; font-size: clamp(34px, 5vw, 76px); line-height: 0.95; color: var(--tct); }
.bc-never-sub { font-family: "Inter", sans-serif; font-size: clamp(14px, 1.4vw, 19px); color: #2b3038; margin-top: 10px; }

.bc-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(17,21,28,0.10); }
.bc-progress-fill { height: 100%; width: 100%; background: var(--tc); transition: width 10s linear; }

.bc-done .bc-plate, .bc-done .bc-team, .bc-done .bc-mascot, .bc-done .bc-to, .bc-done .bc-price, .bc-done .bc-stat {
  animation: none !important; opacity: 1 !important; transform: none !important; }
.bc-done .bc-bar { animation: none !important; transform: none !important; }
@keyframes bc-pop { from { transform: scale(0.5); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bc-slide { from { transform: translateX(-26px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bc-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bc-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (max-width: 760px) {
  .bc-card { grid-template-columns: 1fr; overflow-y: auto; width: 94vw; }
  .bc-slab { flex-direction: row; clip-path: none; padding: 12px 16px; }
  .bc-plate { width: 64px; box-shadow: 0 0 0 4px rgba(255,255,255,0.22); }
  .bc-bug { text-align: left; font-size: 12px; } .bc-bug small { font-size: 10px; }
  .bc-pick b { font-size: 26px; } .bc-pick small { font-size: 9.5px; }
  .bc-body { padding: 14px 14px 16px; }
  .bc-head { align-items: flex-start; gap: 10px; }
  .bc-team { font-size: 38px; } .bc-price b { font-size: 58px; }
  .bc-stats { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
  .bc-stat { padding: 7px 10px; } .bc-stat b { font-size: 22px; } .bc-stat small { font-size: 9.5px; letter-spacing: 0.1em; }
  .bc-lower { grid-template-columns: 1fr; gap: 14px; }
  .bc-bars { height: 96px; gap: 2px; } .bc-axis { gap: 2px; }
  .bc-tick .avatar, .bc-tick .avatar-img, .bc-noav, .bc-cost { display: none !important; }
  .bc-val { font-size: 10px; } .bc-yr { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .bc-plate, .bc-team, .bc-mascot, .bc-to, .bc-price, .bc-stat, .bc-bar { animation: none; opacity: 1; }
  .bc-bar { opacity: 0.45; } .bc-bar.best { opacity: 1; }
}

/* ---- Draft Board: broadcast look ------------------------------------------ */
.bd { --ink: #11151c; --ink2: #1c222c; --rule: #2a303b; --mute: #aab1bd; font-family: "Barlow Condensed", "Inter", sans-serif; }
.bd-bug { display: flex; align-items: stretch; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 4px; overflow: hidden;
  border-bottom: 3px solid var(--accent); margin-bottom: 10px; }
.bd-brand { background: var(--accent); padding: 8px 30px 8px 16px; display: flex; flex-direction: column; justify-content: center;
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%); }
.bd-brand b { font-weight: 800; font-size: 21px; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1; }
.bd-brand small { font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.92; margin-top: 3px; }
.bd-cell { padding: 7px 18px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.bd-brand + .bd-cell { border-left: 0; }
.bd-cell b { font-weight: 800; font-size: 25px; line-height: 1; text-transform: uppercase; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-cell small { font-weight: 600; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); margin-top: 3px; white-space: nowrap; }
.bd-pickcell { min-width: 128px; }
.bd-prog { height: 3px; background: var(--rule); margin-top: 5px; }
.bd-prog div { height: 100%; background: var(--accent); transition: width 0.5s ease; }
.bd-upnext { flex-direction: row; align-items: center; gap: 10px; margin-left: auto; }
.bd-upnext b { font-size: 22px; } .bd-upnext small { margin: 0 0 2px; color: #ffb38f; }
.bd-tools { display: flex; align-items: center; gap: 6px; padding: 0 12px; border-left: 1px solid var(--rule); }
.bd-tool { background: transparent; color: #fff; border: 1px solid #3a4150; border-radius: 3px; cursor: pointer; padding: 5px 10px;
  font: 700 12px "Barlow Condensed", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.bd-tool:hover { border-color: var(--accent); }
.bd-tool.dark { color: var(--ink); border-color: #c4c7cd; }

.bd-stage { display: flex; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 10px; min-height: 98px; }
.bd-hero { flex: 1.4; min-width: 0; display: flex; align-items: center; gap: 18px; color: #fff; padding: 12px 46px 12px 18px;
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink2) 62%, #2b3342 100%); border-radius: 3px 0 0 3px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 100%, 0 100%); animation: bd-wipe 0.5s both cubic-bezier(.2,.9,.2,1); }
.bd-hero-plate { width: 74px; height: 74px; flex: none; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.16); animation: bc-pop 0.55s 0.1s both cubic-bezier(.2,1.5,.4,1); }
.bd-hero-plate img { width: 74%; height: 74%; object-fit: contain; }
.bd-hero-text { min-width: 0; }
.bd-kicker span { display: inline-block; background: var(--accent); color: #fff; transform: skewX(-14deg); padding: 2px 11px;
  font-weight: 800; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; }
.bd-hero-team { font-weight: 800; font-size: clamp(32px, 4.2vw, 58px); line-height: 0.95; text-transform: uppercase; margin-top: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-hero-sub { font-weight: 600; font-size: 13.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin-top: 2px; }
.bd-idle { flex: 1.4; padding: 14px 20px; display: flex; flex-direction: column; justify-content: center; }
.bd-idle-text { font-weight: 800; font-size: clamp(24px, 2.8vw, 38px); line-height: 1; text-transform: uppercase; color: var(--ink); margin-top: 7px; }
.bd-finale { border-color: var(--gold); background: linear-gradient(90deg, rgba(245,197,66,0.16), #fff 70%); }
.bd-ops { flex: 1; display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px 16px; font-family: "Inter", sans-serif; }
.bd-ops label { display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.bd-ops small { font: 700 11px "Barlow Condensed", sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.bd-ops .db-owner { min-width: 230px; }
.bd-ops .search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; box-shadow: 0 12px 30px rgba(0,0,0,0.18); }
.db-price { width: 98px; font: 800 26px "Barlow Condensed", sans-serif; text-align: center; padding: 3px 6px; }
.db-sold { background: var(--accent); color: #fff; border: 0; border-radius: 3px; cursor: pointer; padding: 9px 28px;
  font: 800 21px "Barlow Condensed", sans-serif; letter-spacing: 0.2em; text-transform: uppercase; }
.db-sold:hover { background: var(--accent-2); }

.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 8px; }
@media (min-width: 1150px) { .bd-grid { grid-template-columns: repeat(5, 1fr); } }
.bd-panel { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.bd-panel.bought { border-color: var(--ink); }
.bd-ph { display: flex; align-items: center; gap: 9px; background: var(--ink); color: #fff; padding: 6px 10px; transition: background 0.3s ease; }
.bd-panel.up .bd-ph { background: var(--accent); }
.bd-ph .avatar, .bd-ph .avatar-img { box-shadow: 0 0 0 2px rgba(255,255,255,0.25); }
.bd-ph-name { flex: 1; min-width: 0; font-weight: 800; font-size: 18.5px; line-height: 1; text-transform: uppercase; letter-spacing: 0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-ph-name small { display: block; font-weight: 700; font-size: 10px; letter-spacing: 0.22em; margin-top: 2px; opacity: 0.95; }
.bd-ph-money { font-weight: 800; font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.bd-gauge { height: 4px; background: #e3e4e0; }
.bd-gauge-fill { height: 100%; background: var(--accent); transition: width 0.6s cubic-bezier(.2,.9,.2,1); }
.bd-meta { display: flex; justify-content: space-between; padding: 3px 10px; border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #5b616b; }
.bd-meta b { color: var(--ink); font-weight: 800; }
.bd-rows { padding: 1px 0 2px; }
.bd-row { display: flex; align-items: center; gap: 7px; height: 21px; padding: 0 10px; cursor: pointer;
  font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink); }
.bd-row:nth-child(even) { background: #f5f5f2; }
.bd-row:hover { background: #ebebe7; }
.bd-row img, .bd-nologo { width: 17px; height: 17px; flex: none; object-fit: contain; }
.bd-row-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-row-cost { font-weight: 800; font-variant-numeric: tabular-nums; }
.bd-row.open { cursor: default; } .bd-row.open:hover { background: inherit; }
.bd-row.open:nth-child(even):hover { background: #f5f5f2; }
.bd-slotn { width: 17px; text-align: center; font-weight: 700; font-size: 11px; color: #c4c7cd; }
.bd-row.new { animation: bd-flash 2.6s ease-out; }

.bd-ticker { display: flex; align-items: stretch; background: var(--ink); color: #fff; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.bd-ticker-label { background: var(--accent); display: flex; align-items: center; padding: 0 22px 0 14px; flex: none;
  font-weight: 800; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.bd-tick-track { display: flex; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.bd-tick-track::-webkit-scrollbar { display: none; }
.bd-tick { flex: none; display: flex; align-items: center; gap: 7px; background: none; border: 0; border-right: 1px solid var(--rule); color: #fff;
  padding: 7px 14px; cursor: pointer; font: 600 15px "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 0.03em; }
.bd-tick:hover { background: var(--ink2); }
.bd-tick img { width: 20px; height: 20px; border-radius: 50%; background: #fff; object-fit: contain; }
.bd-tick-n { color: var(--mute); font-size: 12px; font-weight: 700; }
.bd-tick-owner { color: var(--mute); }
.bd-tick-cost { font-weight: 800; color: #ffb38f; }

.db-ops-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.db-order-row { display: flex; gap: 8px; padding: 4px 0; font-weight: 600; }
.db-order-n { color: var(--muted); width: 22px; }
.db-pool { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

@keyframes bd-wipe { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); } to { clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 100%, 0 100%); } }
@keyframes bd-flash { 0% { background: var(--accent); color: #fff; } 100% { background: transparent; } }

/* Big screen (TV) mode */
body.tv header, body.tv .tabs, body.tv footer { display: none; }
body.tv { background: #e7e7e3; }
body.tv main { max-width: none; padding: 10px 14px; }
body.tv .bd-brand b { font-size: 24px; } body.tv .bd-cell b { font-size: 29px; } body.tv .bd-cell small { font-size: 11.5px; }
body.tv .bd-ph-name { font-size: 21px; } body.tv .bd-ph-money { font-size: 33px; }
body.tv .bd-meta { font-size: 13px; }
body.tv .bd-row { height: 22.5px; font-size: 17px; }
body.tv .bd-row img, body.tv .bd-nologo { width: 19px; height: 19px; }
body.tv .bd-tick { font-size: 17px; }
body.tv .bd-hero-plate { width: 84px; height: 84px; }

@media (max-width: 760px) {
  .bd-cell { padding: 6px 12px; } .bd-cell b { font-size: 19px; } .bd-cell small { font-size: 9.5px; letter-spacing: 0.1em; }
  .bd-brand b { font-size: 17px; } .bd-upnext { margin-left: 0; }
  .bd-tools { padding: 6px 10px; border-left: 0; }
  .bd-stage { flex-direction: column; }
  .bd-hero { clip-path: none; animation: none; padding: 12px 14px; border-radius: 3px 3px 0 0; }
  .bd-hero-plate { width: 56px; height: 56px; }
  .bd-ops .db-owner { min-width: 0; width: 100%; } .bd-ops label { flex: 1 1 100%; } .bd-ops label.bd-ops-price { flex: 0 0 auto; }
  .bd-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .bd-ph { padding: 5px 7px; gap: 6px; } .bd-ph .avatar, .bd-ph .avatar-img { width: 24px !important; height: 24px !important; font-size: 10px !important; }
  .bd-ph-name { font-size: 14.5px; } .bd-ph-money { font-size: 21px; }
  .bd-meta { font-size: 10px; letter-spacing: 0.06em; padding: 3px 7px; }
  .bd-row { font-size: 13px; padding: 0 7px; gap: 5px; height: 20px; }
}
.bd-upnext > div { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 760px) {
  .bc-tag { font-size: 7px; padding: 1px 1.5px; letter-spacing: 0; }
  .bc-val { margin-bottom: 2px; }
}


/* ==========================================================================
   DESIGN SYSTEM — one identity across the site (matches the Draft Board):
   ink-dark structure, a single orange accent, Barlow Condensed for display,
   labels and numerals, Inter for reading. Crisp 4px corners, hairline rules,
   no drop-shadow cards, no emoji.
   ========================================================================== */

/* ---- Masthead ------------------------------------------------------------ */
header { background: var(--ink); border-bottom: 3px solid var(--accent); color: #fff; padding-top: 12px; padding-bottom: 12px; }
.brand h1 { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: 0.07em; text-transform: uppercase; color: #fff; line-height: 0.95; }
.brand:hover h1 { filter: none; color: #ffd9c9; }
.tag { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute); margin-top: 3px; }
.logo-mark { width: 38px; height: 38px; }
.season-select { background: var(--ink-2); border-color: var(--ink-rule); color: #fff; border-radius: 3px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 10px; color-scheme: dark; }
.meta-cluster { background: transparent; border: 0; border-left: 1px solid var(--ink-rule); border-radius: 0; padding: 2px 0 2px 14px; }
.sync-label { color: var(--ink-mute); font-family: var(--font-display); font-weight: 600; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; }
.mode-badge { font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.18em; border-radius: 2px; padding: 2px 8px; border: 0 !important; }
.mode-badge.season { background: #1f7a45; color: #fff; }
.mode-badge.preseason { background: var(--accent); color: #fff; }
.mode-badge.archived { background: var(--ink-rule); color: #d5d9e0; }
header .btn, header .account > button { background: transparent; color: #fff; border: 1px solid #3a4150; border-radius: 3px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; }
header .btn:hover, header .account > button:hover { border-color: var(--accent); }
header .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
header .btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.account-menu { border-radius: 4px; }
.account-menu .btn { color: var(--text); background: var(--panel); border-color: var(--line); text-transform: none; letter-spacing: 0; font-family: inherit; font-weight: 500; font-size: 13px; }

/* ---- Tab rail ------------------------------------------------------------- */
.tabs { background: var(--panel); border-bottom: 1px solid var(--line); gap: 0; }
.tab { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 13px 13px 11px; border-bottom: 3px solid transparent; color: var(--muted); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
.tab-sep { height: 16px; margin: 0 8px; }

/* ---- Page titles & section headers ---------------------------------------- */
h2 { font-family: var(--font-display); font-weight: 800; font-size: 46px; line-height: 0.95; letter-spacing: 0.005em; text-transform: uppercase; margin: 6px 0 14px; }
h2::before { content: ""; display: block; width: 46px; height: 5px; background: var(--accent); margin-bottom: 12px; }
main > .panel > p.muted:first-of-type, .panel > h2 + p.muted { font-size: 15.5px; max-width: 760px; margin-top: -4px; }
.panel > h3, main h3 { font-family: var(--font-display); }
.panel > h3 { font-weight: 800; font-size: 17px; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 2px solid var(--text); padding-bottom: 5px; margin: 22px 0 12px; }

/* ---- Cards ---------------------------------------------------------------- */
.card { border-radius: var(--radius); box-shadow: none; padding: 16px 18px 14px; transition: none; }
.card:hover { border-color: var(--line); box-shadow: none; }
.card h3 { font-family: var(--font-display); font-weight: 800; font-size: 16.5px; letter-spacing: 0.15em; text-transform: uppercase;
  border-bottom: 2px solid var(--text); padding-bottom: 6px; margin-bottom: 12px; align-items: baseline; gap: 12px; }
.card h3 .muted, .card h3 span.muted, .card h3 > span[style] { font-family: var(--font-display) !important; font-weight: 600 !important; font-size: 12.5px !important;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.card h4 { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---- Tables --------------------------------------------------------------- */
th { font-family: var(--font-display); font-weight: 700; font-size: 12.5px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid var(--text); padding-top: 7px; padding-bottom: 6px; }
td { border-bottom-color: var(--line); }
tr:hover td { background: rgba(17,21,28,0.03); }
td.num, .rank, .total, .pts, .behind { font-variant-numeric: tabular-nums; }
.rank { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--muted); }
.rank.medal-1 { color: var(--accent); } .rank.medal-2, .rank.medal-3 { color: var(--text); }
.total { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--text); letter-spacing: -0.005em; }
td.pts, .pts { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--text); }
.team-pill .pts { font-size: 14px; color: var(--accent-2); }
.standings-table td.behind { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.standings-row strong { font-weight: 700; font-size: 15.5px; }
.plink { border-bottom: 0; }
.plink:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Controls ------------------------------------------------------------- */
button.btn { border-radius: 3px; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 7px 14px; }
button.btn.small { font-size: 12.5px; padding: 4px 10px; }
button.btn.primary { color: #fff; }
.seg { border-radius: 3px; border-color: var(--text); }
.seg button { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 14px; }
.seg button:not(:last-child) { border-right-color: var(--text); }
.seg button.active { background: var(--text); color: #fff; }
.team-toggle { border-radius: 3px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 11.5px; }
input, select { border-radius: 3px; }
.badge { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 2px; padding: 1px 6px; }
.team-pill { border-radius: 3px; }
.empty { border-radius: var(--radius); font-size: 15px; }
.toast { border-radius: 3px; background: var(--ink); color: #fff; border: 0; border-left: 4px solid var(--accent); font-weight: 500; }
.toast.ok { border-left-color: #2fa35d; } .toast.error { border-left-color: #e5484d; }
.locked-note, .preseason-note, .season-note { border-radius: 3px; }
.modal { border-radius: 4px; box-shadow: 0 30px 90px rgba(0,0,0,0.5); }
.modal h3 { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.modal-overlay { background: rgba(9,11,16,0.72); }

/* ---- Stat tiles (trophy case, team modal, trivia) -------------------------- */
.tc-stat, .trivia-stat { border-radius: 3px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--text); }
.tc-stat.gold { background: var(--panel); border-color: var(--line); border-top-color: var(--accent); }
.tc-val, .trivia-stat b, .trivia-stat .v { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1; letter-spacing: -0.005em; color: var(--text); }
.tc-stat.gold .tc-val { color: var(--accent); }
.tc-lbl { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.tc-badge { border-radius: 3px; background: var(--panel); border: 1px solid var(--line); padding: 9px 12px; gap: 11px; align-items: stretch; }
.tc-badge-bar { width: 4px; border-radius: 1px; background: var(--text); flex: none; }
.tc-badge.gold .tc-badge-bar { background: #b8860b; } .tc-badge.bad .tc-badge-bar { background: var(--red); }
.tc-badge.gold, .tc-badge.bad { background: var(--panel); border-color: var(--line); }
.tc-badge-t { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---- "Final" hero (replaces the podium) ------------------------------------ */
.final { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; margin: 4px 0 22px; }
.final-champ { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px 22px 16px; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k k" "who pts"; align-items: end; row-gap: 12px; border-bottom: 4px solid var(--accent); }
.final-champ::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0 18px, transparent 18px 36px); }
.final-champ > * { position: relative; }
.final-champ .final-kicker { grid-area: k; }
.final-kicker { font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.final-champ .final-kicker span { display: inline-block; background: var(--accent); color: #fff; padding: 2px 12px; transform: skewX(-14deg); }
.final-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.final-champ .final-row { grid-area: who; }
.final-champ .avatar, .final-champ .avatar-img { box-shadow: 0 0 0 3px rgba(255,255,255,0.22); }
.final-name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: 0.95; color: inherit; display: block; }
.final-champ .final-name { font-size: clamp(30px, 3.4vw, 46px); color: #fff; }
.final-champ .final-name:hover { color: #ffd9c9; }
.final-place .final-name { font-size: 24px; }
.final-sub { font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); margin-top: 5px; }
.final-pts { font-family: var(--font-display); font-weight: 800; line-height: 0.85; font-variant-numeric: tabular-nums; text-align: right; }
.final-champ .final-pts { grid-area: pts; font-size: clamp(64px, 7vw, 96px); }
.final-pts small { display: block; font-weight: 600; font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); margin-top: 6px; }
.final-place { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--text); border-radius: var(--radius); padding: 14px 16px 12px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.final-place .final-pts { font-size: 46px; text-align: left; display: flex; align-items: baseline; gap: 10px; }
.final-place .final-pts small { display: inline; color: var(--muted); margin: 0; font-size: 15px; letter-spacing: 0.06em; }

/* ---- Page-specific tidy-ups ------------------------------------------------ */
.award-card.champ { border-color: var(--line); box-shadow: none; border-top: 4px solid #b8860b; }
.award-card.joke { border-color: var(--line); border-top: 4px solid var(--red); }
.award-card { border-top: 4px solid var(--text); }
.award-season { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.award-pts { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text) !important; }
.lc-tag { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 2px; }
.lc-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: 0.03em; text-transform: uppercase; }
.trivia-cat { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.16em; border-radius: 2px; }
.trivia-q { font-family: var(--font-display); font-weight: 700; font-size: 27px; line-height: 1.12; letter-spacing: 0.005em; }
.trivia-choice { border-radius: 3px; }
.trivia-verdict { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: 0.1em; text-transform: uppercase; }
.tp-champ { color: #8a6508; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.gd-nav, .gd-card { border-radius: var(--radius); }
.gd-date strong { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: 0.04em; text-transform: uppercase; }
.gd-h { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.gd-score { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.dg-cell { font-family: var(--font-display); font-weight: 700; font-size: 15px; border-radius: 3px; }
.part-header h2 { font-size: 40px; } .part-header h2::before { display: none; }

@media (max-width: 760px) {
  .final { grid-template-columns: 1fr 1fr; }
  .final-champ { grid-column: 1 / -1; padding: 14px 16px 12px; }
  .final-place .final-name { font-size: 19px; } .final-place .final-pts { font-size: 34px; }
}
@media (max-width: 640px) {
  header { padding-top: 10px; padding-bottom: 10px; }
  .brand h1 { font-size: 26px; } .logo-mark { width: 32px; height: 32px; }
  h2 { font-size: 34px; } h2::before { width: 36px; height: 4px; margin-bottom: 9px; }
  .tab { font-size: 14.5px; padding: 11px 10px 9px; }
  .total { font-size: 21px; }
}
.logo-strip { max-width: 372px; }
.dynasty .dg-owner, .dynasty .dg-owner .part-cell { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.05em; color: var(--text); text-transform: uppercase; }
.dynasty th { border-bottom: 0; }
.dynasty .dg-col { font-size: 13px; letter-spacing: 0.04em; }
.ledger-grid th, .ledger-grid .lg-rowhead { border-bottom-width: 1px; }
.gd-arrow, .gd-refresh { border-radius: 3px; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; background: var(--panel); }
.gd-arrow { font-size: 14px; } .gd-refresh { font-size: 12.5px; }
.gd-h-count { border-radius: 2px; font-family: var(--font-display); }
.gd-team-name { font-size: 14px; }
.gd-datepicker { border-radius: 3px; }
/* Owner profile hero */
.part-header { background: var(--ink); color: #fff; border-radius: var(--radius); border-bottom: 4px solid var(--accent); padding: 18px 22px; gap: 18px; position: relative; overflow: hidden; }
.part-header::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0 18px, transparent 18px 36px); }
.part-header > * { position: relative; }
.part-header .avatar, .part-header .avatar-img { width: 76px !important; height: 76px !important; font-size: 28px !important; box-shadow: 0 0 0 3px rgba(255,255,255,0.22); }
.part-header h2 { color: #fff; font-size: clamp(34px, 4vw, 52px); margin: 0 !important; }
.part-header p.muted { color: var(--ink-mute); font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 6px !important; }
.part-header .total { color: #fff; font-size: 26px; }
#participant-view a.btn.small, #participant-view .btn.small { font-family: var(--font-display); }
a.btn { display: inline-block; text-decoration: none; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 7px 14px; cursor: pointer; }
a.btn.small { font-size: 12.5px; padding: 4px 10px; }
a.btn:hover { border-color: var(--accent); }
@media (max-width: 640px) { .part-header { padding: 14px 16px; gap: 14px; } .part-header .avatar, .part-header .avatar-img { width: 60px !important; height: 60px !important; } .part-header p.muted { font-size: 14px; letter-spacing: 0.1em; } }

/* ---- Trends: the race (bump chart / points) -------------------------------- */
.tr-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.tr-holder { width: 100%; overflow: hidden; }
.tr-chart { display: block; max-width: 100%; height: auto; font-family: var(--font-display); }
.tr-grid { stroke: var(--line); stroke-width: 1; }
.tr-axis { fill: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
.tr-line { fill: none; stroke: #bfc2c8; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; transition: stroke 0.15s ease, stroke-width 0.15s ease, opacity 0.15s ease; }
.tr-line.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease forwards; }
.tr-hit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; }
.tr-dot { fill: #bfc2c8; transition: fill 0.15s ease; }
.tr-conn { fill: none; stroke: #d3d5d9; stroke-width: 1; }
.tr-label { fill: var(--muted); font-size: 15.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; transition: fill 0.15s ease; }
.tr-label-n { fill: #a3a8b0; font-weight: 700; }
.tr-label-v { font-weight: 800; }
.tr-s.lead .tr-line { stroke: var(--accent); stroke-width: 3; }
.tr-s.lead .tr-dot, .tr-s.lead .tr-label { fill: var(--accent); }
.tr-s.lead .tr-conn { stroke: var(--accent); opacity: 0.5; }
.tr-chart.has-hot .tr-s:not(.hot) .tr-line { stroke: #dcddd9; }
.tr-chart.has-hot .tr-s:not(.hot) .tr-dot { fill: #dcddd9; }
.tr-chart.has-hot .tr-s:not(.hot) .tr-label { fill: #b4b8bf; }
.tr-chart.has-hot .tr-s.lead:not(.hot) .tr-line { stroke: #f0b9a5; }
.tr-s.hot .tr-line { stroke: var(--text); stroke-width: 3.6; }
.tr-s.hot .tr-dot, .tr-s.hot .tr-label { fill: var(--text); }
.tr-s.hot .tr-label { font-weight: 800; }
.tr-s.hot.lead .tr-line { stroke: var(--accent); } .tr-s.hot.lead .tr-dot, .tr-s.hot.lead .tr-label { fill: var(--accent); }
@media (max-width: 640px) { .tr-label { font-size: 13.5px; } .tr-axis { font-size: 11.5px; } }
.tab { font-size: 15.5px; letter-spacing: 0.055em; padding-left: 11px; padding-right: 11px; }
.tab-sep { margin: 0 6px; }
.tab { padding-left: 10px; padding-right: 10px; }

/* ---- Game Day: view modes, by-owner grouping, team log ------------------- */
.gd-modes { display: flex; align-items: center; gap: 12px; margin: -4px 0 12px; }
.gd-ocards { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 10px; }
.gd-ocard { margin-bottom: 0; padding: 12px 14px 10px; }
.gd-ocard h3 { font-size: 15px; letter-spacing: 0.1em; margin-bottom: 8px; align-items: center; }
.gd-ocard h3 .part-cell { text-transform: none; letter-spacing: 0; font-size: 16px; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.gd-ocard.idle { opacity: 0.55; }
.gd-ocard.idle h3 { border-bottom-color: var(--line); margin-bottom: 0; }
.gd-mini { padding: 12px 12px 9px; margin-bottom: 8px; }
.gd-mini:last-child { margin-bottom: 0; }
.gd-pickrow { justify-content: flex-start; gap: 14px; }
.gd-picklabel { font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.gd-teampick { min-width: 280px; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.gd-teamhead { display: flex; align-items: center; gap: 16px; background: var(--ink); color: #fff; border-radius: var(--radius); border-bottom: 4px solid var(--accent); padding: 14px 20px; margin: 10px 0 12px; }
.gd-teamhead img { width: 60px; height: 60px; border-radius: 50%; background: #fff; object-fit: contain; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.2); }
.gd-teamhead-text { flex: 1; min-width: 0; }
.gd-teamhead-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3vw, 38px); line-height: 1; text-transform: uppercase; }
.gd-teamhead-name .tlink { color: #fff; } .gd-teamhead-name .tlink:hover { color: #ffd9c9; }
.gd-teamhead-sub { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-top: 6px; }
.gd-teamhead-pts { font-family: var(--font-display); font-weight: 800; font-size: 54px; line-height: 0.9; text-align: right; font-variant-numeric: tabular-nums; }
.gd-teamhead-pts small { display: block; font-weight: 600; font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); margin-top: 5px; }
.gd-log td { padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
.gd-log-date { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.03em; white-space: nowrap; color: var(--muted); }
.gd-res { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gd-res.win { color: var(--green); } .gd-res.lose { color: var(--muted); } .gd-res.pend { color: var(--muted); font-weight: 600; font-size: 13px; }
.gd-pts { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--text); }
.gd-log-unowned td { color: #9aa0a8; } .gd-log-unowned .gd-res.win { color: #9aa0a8; }
.gd-log-pending td { color: var(--muted); }
.gd-log-bonus td { background: rgba(207,67,24,0.06); }
.badge.phase.inline { position: static; margin: 0; }
@media (max-width: 640px) {
  .gd-ocards { grid-template-columns: 1fr; }
  .gd-teamhead { padding: 12px 14px; gap: 12px; } .gd-teamhead img { width: 44px; height: 44px; }
  .gd-teamhead-pts { font-size: 38px; }
  .gd-teampick { min-width: 0; flex: 1; }
}

/* Auction years in League History: a faint tinted column through the grid,
   a thin accent underline on the year, and the same underline on award seasons. */
.dg-yr { display: inline-block; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.dg-col.auction .dg-yr { border-bottom-color: var(--accent); color: var(--text); }
.dynasty .dg-cell.auction { border-color: #f4e6e0; }
.dynasty .dg-empty.auction { background: rgba(207,67,24,0.055); border-color: rgba(207,67,24,0.055); }
.dg-legend-auction { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; color: var(--muted); }
.dg-legend-col { width: 14px; height: 11px; background: rgba(207,67,24,0.10); border-bottom: 2px solid var(--accent); }
.award-season { white-space: nowrap; }
.award-season.auction { box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 1px; }
/* Award lists: auction seasons as a faint band across the row, like the grid columns. */
.award-row.auction { background: rgba(207,67,24,0.055); margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.award-row.auction + .award-row.auction { border-top: 1px solid var(--panel); }
.hist-legend { display: flex; justify-content: flex-end; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 600;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 8px; }
@media (max-width: 640px) { .award-row.auction { margin: 0 -14px; padding-left: 14px; padding-right: 14px; } }
/* Award rows: typographic repeat tally instead of colored chips. */
.repeat-badge, .repeat-badge.champ, .repeat-badge.joke, .repeat-badge.juice { background: none; border: 0; padding: 0; margin-left: 2px;
  font-family: var(--font-display); font-weight: 700; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.award-row { gap: 10px; padding: 8px 0; }
.award-season { width: 58px; color: var(--muted); }
.award-row.auction .award-season { color: var(--text); }
.award-name { font-size: 14.5px; }
.award-pts { font-size: 17px; min-width: 34px; text-align: right; }
/* ---- Share the standings (card preview modal) ----------------------------- */
.modal:has(.share-body) { width: min(520px, 94vw); }
.share-preview { display: block; width: 100%; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.share-actions .btn, .share-actions a.btn { flex: 1 1 auto; text-align: center; }
