:root {
  --ink: #f5f1e7;
  --ink-strong: #fff9ef;
  --muted: #99a8a1;
  --bg-0: #090c0e;
  --bg-1: #0f1619;
  --bg-2: #162126;
  --bg-3: #213238;
  --panel: rgba(16, 24, 27, 0.9);
  --panel-strong: rgba(20, 31, 35, 0.96);
  --line: #2f4645;
  --line-strong: #547571;
  --accent: #d7a24a;
  --accent-strong: #f4c97a;
  --accent-2: #46b69a;
  --accent-3: #7bc4d7;
  --danger: #d05c5c;
  --success: #63d68c;
  --warning: #ffb74d;
  --info: #7bc4d7;
  --shadow: rgba(0, 0, 0, 0.34);
  --team-primary: #00338d;
  --team-secondary: #c60c30;
  --team-tertiary: #5bc2e7;
  --team-primary-rgb: 0, 51, 141;
  --team-secondary-rgb: 198, 12, 48;
  --team-tertiary-rgb: 91, 194, 231;
  --section-accent: #46b69a;
  --section-accent-strong: #7bc4d7;
  --section-wash-rgb: 70, 182, 154;
  --section-wash-2-rgb: 123, 196, 215;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg-0);
  font-family: "Bahnschrift", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  min-height: 100vh;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 14%, rgba(var(--team-primary-rgb), 0.18), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(var(--team-secondary-rgb), 0.22), transparent 24%),
    radial-gradient(circle at 52% 110%, rgba(var(--team-tertiary-rgb), 0.14), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent 28%),
    repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.015) 0,
      rgba(255, 255, 255, 0.015) 2px,
      transparent 2px,
      transparent 18px
    ),
    linear-gradient(155deg, #070a0c, #11181b 42%, #0c1215 100%);
}

body.game-body {
  --section-accent: var(--accent-2);
  --section-accent-strong: var(--accent-strong);
  --section-wash-rgb: var(--team-primary-rgb);
  --section-wash-2-rgb: var(--team-tertiary-rgb);
}

body.game-body[data-active-tab="contractsTab"] {
  --section-accent: #f3bb72;
  --section-accent-strong: #ffdca3;
  --section-wash-rgb: 215, 162, 74;
  --section-wash-2-rgb: 255, 125, 84;
}

body.game-body[data-active-tab="scoutingTab"] {
  --section-accent: #6fdc8c;
  --section-accent-strong: #d6f6a5;
  --section-wash-rgb: 58, 153, 88;
  --section-wash-2-rgb: 239, 194, 76;
}

body.game-body[data-active-tab="historyTab"] {
  --section-accent: #e1b35f;
  --section-accent-strong: #ffe6ae;
  --section-wash-rgb: 152, 88, 45;
  --section-wash-2-rgb: 215, 162, 74;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.3rem, 2.6vw, 1.95rem);
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  color: var(--ink-strong);
  text-wrap: balance;
}

h2 {
  font-size: 1.02rem;
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 0.82rem;
  color: #b9c7c1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.small {
  color: var(--muted);
  font-size: 0.74rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.row.compact {
  gap: 0.45rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  min-width: 120px;
}

input,
select,
button {
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(17, 26, 29, 0.95), rgba(11, 18, 20, 0.95));
  border: 1px solid #425957;
  border-radius: 12px;
  padding: 0.48rem 0.68rem;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

select option,
select optgroup {
  color: #132025;
  background: #f5f1e7;
}

button {
  cursor: pointer;
  background: linear-gradient(140deg, rgba(43, 62, 67, 0.96), rgba(26, 40, 44, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

button:hover {
  border-color: var(--section-accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button.warn {
  background: linear-gradient(145deg, #5c2a2a, #472222);
  border-color: #7b4141;
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--accent-2);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.chip {
  border: 1px solid #4d5a5d;
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  color: #bfcbc6;
  font-size: 0.74rem;
  background: linear-gradient(180deg, rgba(12, 19, 21, 0.76), rgba(8, 14, 16, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.panel,
.setup-card {
  background: linear-gradient(180deg, rgba(23, 34, 38, 0.94), rgba(14, 22, 25, 0.96));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 18px 40px var(--shadow);
  backdrop-filter: blur(10px);
}

.split {
  display: grid;
  gap: 0.85rem;
}

.stack {
  display: grid;
  gap: 0.5rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
}

.cards article {
  border: 1px solid #354b4a;
  border-radius: 14px;
  padding: 0.72rem;
  background:
    linear-gradient(180deg, rgba(18, 27, 31, 0.92), rgba(12, 18, 21, 0.9)),
    radial-gradient(circle at top right, rgba(215, 162, 74, 0.12), transparent 35%);
}

.cards p {
  margin: 0.14rem 0 0;
  font-size: 1.28rem;
  color: var(--accent-strong);
}

.record {
  border: 1px solid #334746;
  border-radius: 12px;
  padding: 0.56rem;
  background: rgba(13, 20, 23, 0.72);
}

.record strong {
  color: var(--accent-3);
}

.table-wrap {
  overflow: auto;
  border: 1px solid #304241;
  border-radius: 14px;
  background: rgba(10, 16, 18, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.77rem;
}

th,
td {
  border-bottom: 1px solid rgba(63, 79, 82, 0.55);
  padding: 0.35rem 0.42rem;
  white-space: nowrap;
}

th {
  background: rgba(18, 27, 31, 0.96);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b9c9c3;
  position: sticky;
  top: 0;
}

/* ── SETUP / MAIN MENU ─────────────────────────────────────────────── */

.setup-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.2rem;
  display: grid;
  gap: 1.2rem;
}

/* Hero */
.setup-hero {
  text-align: center;
  padding: 3.2rem 1.4rem 2.4rem;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(var(--team-primary-rgb), 0.28), transparent),
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(var(--team-secondary-rgb), 0.22), transparent),
    radial-gradient(ellipse 50% 60% at 20% 90%, rgba(var(--team-tertiary-rgb), 0.10), transparent),
    linear-gradient(175deg, rgba(16, 24, 28, 0.98), rgba(8, 13, 16, 0.99));
  border: 1px solid rgba(var(--team-tertiary-rgb), 0.18);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.setup-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.012) 3px,
      rgba(255, 255, 255, 0.012) 4px
    );
  pointer-events: none;
}

.setup-hero-inner {
  position: relative;
}

.setup-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.15rem;
  color: var(--ink-strong);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
  line-height: 1.05;
}

.setup-tagline {
  max-width: 52ch;
  margin: 0 auto 1.6rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.setup-hero-actions {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.setup-session-status {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  min-height: 1.2em;
}

/* Primary / secondary buttons */
.btn-lg {
  padding: 0.72rem 1.8rem;
  font-size: 0.92rem;
  border-radius: 14px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(145deg, var(--accent), #b8882e);
  color: #0a0e07;
  border: 1px solid var(--accent-strong);
  box-shadow: 0 0 18px rgba(215, 162, 74, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(145deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 28px rgba(215, 162, 74, 0.35), 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
  border-color: var(--accent-strong);
}

.btn-primary:disabled {
  background: linear-gradient(145deg, #3a3a2e, #2a2a22);
  color: #6b6b5d;
  border-color: #4a4a3e;
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(145deg, rgba(50, 70, 75, 0.9), rgba(30, 45, 50, 0.95));
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent-3);
  box-shadow: 0 0 16px rgba(123, 196, 215, 0.15), 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* Section blocks */
.setup-section {
  background: linear-gradient(180deg, rgba(20, 30, 34, 0.94), rgba(12, 19, 22, 0.96));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 12px 32px var(--shadow);
}

.setup-section-title {
  font-size: 1.1rem;
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
  color: var(--ink-strong);
}

.setup-section-subtitle {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 0 1rem;
}

/* Quick-start cards */
.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.quickstart-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.4rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--team-primary-rgb), 0.10), transparent),
    linear-gradient(180deg, rgba(18, 28, 32, 0.95), rgba(10, 16, 19, 0.98));
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.quickstart-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 20px rgba(215, 162, 74, 0.12);
}

.quickstart-card--featured {
  border-color: rgba(var(--team-tertiary-rgb), 0.35);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--team-tertiary-rgb), 0.14), transparent),
    linear-gradient(180deg, rgba(18, 28, 32, 0.95), rgba(10, 16, 19, 0.98));
}

.quickstart-era {
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-strong);
}

.quickstart-label {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Team row */
.setup-team-row {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.setup-team-label {
  flex: 1;
  min-width: 160px;
}

.setup-team-row .btn-primary {
  padding: 0.52rem 1.6rem;
  white-space: nowrap;
}

/* Collapsible details sections */
.setup-details {
  background: linear-gradient(180deg, rgba(20, 30, 34, 0.94), rgba(12, 19, 22, 0.96));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 32px var(--shadow);
}

.setup-details > .setup-details-toggle {
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  list-style: none;
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.setup-details > .setup-details-toggle::-webkit-details-marker {
  display: none;
}

.setup-details > .setup-details-toggle::before {
  content: "\25B6";
  font-size: 0.6rem;
  color: var(--muted);
  transition: transform 180ms ease;
}

.setup-details[open] > .setup-details-toggle::before {
  transform: rotate(90deg);
}

.setup-details-body {
  padding: 0 1.2rem 1.2rem;
}

.setup-details--nested {
  margin-top: 0.8rem;
  background: rgba(10, 16, 19, 0.5);
  border-color: rgba(var(--line), 0.5);
  box-shadow: none;
}

.setup-details--nested > .setup-details-toggle {
  font-size: 0.78rem;
  padding: 0.65rem 0.9rem;
}

.setup-details--nested .setup-details-body {
  padding: 0 0.9rem 0.9rem;
}

/* Footer */
.setup-footer {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
}

.setup-runtime-label {
  min-width: auto;
}

/* Responsive */
@media (max-width: 600px) {
  .quickstart-grid {
    grid-template-columns: 1fr;
  }

  .setup-hero {
    padding: 2rem 1rem 1.6rem;
  }

  .setup-title {
    font-size: 2rem;
  }

  .setup-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-lg {
    text-align: center;
  }
}

/* Form grid (shared) */
.form-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.game-topbar {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(280px, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
  padding: 1rem 1.1rem 0.8rem;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background:
    linear-gradient(180deg, rgba(7, 11, 14, 0.94), rgba(7, 11, 14, 0.68)),
    radial-gradient(circle at top left, rgba(var(--team-primary-rgb), 0.16), transparent 36%),
    radial-gradient(circle at top right, rgba(var(--section-wash-rgb), 0.14), transparent 32%);
  border-bottom: 1px solid rgba(var(--team-tertiary-rgb), 0.24);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.topbar-center {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
}

.topbar-actions {
  justify-content: flex-end;
}

.topbar-brand h1 {
  text-shadow: 0 8px 24px rgba(var(--team-primary-rgb), 0.18);
}

.boxscore-ticker {
  min-height: 44px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  border: 1px solid #314043;
  border-radius: 999px;
  padding: 0.42rem 0.5rem;
  background:
    linear-gradient(180deg, rgba(14, 21, 24, 0.88), rgba(8, 14, 16, 0.92)),
    radial-gradient(circle at right, rgba(215, 162, 74, 0.12), transparent 34%);
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  padding: 0.38rem 0.68rem;
  border: 1px solid #425156;
  background: linear-gradient(145deg, rgba(31, 48, 51, 0.96), rgba(17, 28, 31, 0.98));
}

.ticker-item strong {
  color: var(--accent-strong);
}

.game-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  padding: 0 1.1rem 1.1rem;
}

.game-footer {
  padding: 0 1rem 1rem;
}

.footer-guide-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.depth-share-cell,
.depth-action-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.depth-share-input {
  width: 68px;
  text-align: right;
}

.side-menu {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  position: sticky;
  top: 88px;
  background:
    linear-gradient(180deg, rgba(9, 14, 16, 0.92), rgba(8, 13, 15, 0.84)),
    radial-gradient(circle at top left, rgba(var(--team-primary-rgb), 0.14), transparent 34%);
  border: 1px solid rgba(var(--team-tertiary-rgb), 0.22);
  border-radius: 18px;
  padding: 0.65rem;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
}

.menu-section-label {
  margin: 0.2rem 0 0.1rem;
  padding: 0 0.2rem;
  color: rgba(var(--team-tertiary-rgb), 0.8);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.menu-btn {
  text-align: left;
  padding: 0.72rem 0.82rem;
  border-color: rgba(var(--team-tertiary-rgb), 0.16);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(22, 33, 37, 0.94), rgba(12, 20, 23, 0.98)),
    radial-gradient(circle at left, rgba(var(--team-primary-rgb), 0.08), transparent 28%);
}

.menu-btn::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(var(--team-primary-rgb), 0.2), rgba(var(--team-secondary-rgb), 0.75));
  opacity: 0;
  transition: opacity 120ms ease;
}

.menu-btn.active {
  border-color: rgba(var(--team-secondary-rgb), 0.62);
  background:
    linear-gradient(145deg, rgba(var(--team-primary-rgb), 0.84), rgba(16, 19, 31, 0.98)),
    radial-gradient(circle at right, rgba(var(--team-secondary-rgb), 0.28), transparent 36%);
  color: var(--ink-strong);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.menu-btn:hover::before,
.menu-btn.active::before {
  opacity: 1;
}

.tab-panels {
  min-width: 0;
}

.tab-panel {
  display: none;
  gap: 0.85rem;
}

.tab-panel.active {
  display: grid;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 40;
}

.modal.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.modal-card {
  width: min(1100px, 95vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(22, 33, 37, 0.98), rgba(12, 19, 22, 0.985)),
    radial-gradient(circle at top right, rgba(70, 182, 154, 0.08), transparent 28%);
  padding: 1rem;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

.guide-card {
  width: min(760px, 94vw);
}

.command-card {
  width: min(780px, 96vw);
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.4rem;
  z-index: 80;
}

.toast {
  border: 1px solid #486166;
  background: rgba(19, 30, 32, 0.95);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
}

.skeleton {
  background: linear-gradient(90deg, rgba(60, 77, 80, 0.25), rgba(92, 120, 126, 0.42), rgba(60, 77, 80, 0.25));
  background-size: 220% 100%;
  animation: pulse 1.1s ease-in-out infinite;
  border-radius: 8px;
  min-height: 14px;
}

.brand-kicker {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-3);
  margin-bottom: 0.2rem;
  opacity: 0.75;
}

.topbar-brand p {
  max-width: 58ch;
}

.player-modal-card {
  width: min(1240px, 96vw);
}

.boxscore-modal-card {
  width: min(1280px, 96vw);
}

.overview-hero-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(var(--team-secondary-rgb), 0.16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(var(--team-primary-rgb), 0.18), transparent 30%),
    linear-gradient(135deg, rgba(24, 36, 40, 0.98), rgba(11, 18, 21, 0.98));
  border-color: rgba(var(--team-tertiary-rgb), 0.22);
}

.overview-hero-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.overview-hero-copy,
.overview-hero-side {
  display: grid;
  gap: 0.85rem;
}

.overview-team-spotlight {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
  border: 1px solid rgba(var(--team-tertiary-rgb), 0.32);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 27, 0.84), rgba(9, 15, 17, 0.92)),
    radial-gradient(circle at top left, rgba(var(--team-primary-rgb), 0.12), transparent 28%);
}

.overview-team-mark {
  display: grid;
  gap: 0.2rem;
}

.overview-team-label {
  font-size: clamp(1.3rem, 3.2vw, 2.1rem);
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-strong);
}

.overview-team-meta {
  color: #c9d6d1;
}

.overview-team-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.overview-team-card {
  border: 1px solid rgba(61, 87, 85, 0.46);
  border-radius: 16px;
  padding: 0.72rem;
  background: rgba(10, 17, 19, 0.72);
}

.overview-team-card strong {
  display: block;
  margin-bottom: 0.24rem;
  color: var(--accent-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.71rem;
}

.overview-summary-cards {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.overview-pulse-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.overview-pulse-chip {
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(84, 117, 113, 0.54);
  background: rgba(9, 16, 18, 0.76);
  color: #d7e4df;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.control-hero-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(123, 196, 215, 0.12), transparent 34%),
    radial-gradient(circle at bottom left, rgba(215, 162, 74, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(24, 36, 40, 0.98), rgba(11, 18, 21, 0.98));
}

.control-hero-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.control-hero-copy,
.control-hero-side {
  display: grid;
  gap: 0.85rem;
}

.control-spotlight {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
  border: 1px solid rgba(84, 117, 113, 0.46);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 27, 0.84), rgba(9, 15, 17, 0.92)),
    radial-gradient(circle at top left, rgba(123, 196, 215, 0.08), transparent 28%);
}

.control-spotlight-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.control-spotlight-card {
  border: 1px solid rgba(61, 87, 85, 0.46);
  border-radius: 16px;
  padding: 0.72rem;
  background: rgba(10, 17, 19, 0.72);
}

.control-spotlight-card strong {
  display: block;
  margin-bottom: 0.24rem;
  color: var(--accent-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.71rem;
}

.control-pulse-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.control-pulse-chip {
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(84, 117, 113, 0.54);
  background: rgba(9, 16, 18, 0.76);
  color: #d7e4df;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.toggle-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 0.8rem;
}

.toggle-grid label {
  min-width: 0;
  border: 1px solid rgba(61, 87, 85, 0.42);
  border-radius: 14px;
  padding: 0.72rem 0.8rem;
  background: rgba(11, 18, 20, 0.74);
  color: #d7e2dd;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
}

.toggle-grid input[type="checkbox"] {
  inline-size: 16px;
  block-size: 16px;
}

.inline-form-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
}

.owner-spotlight {
  margin-bottom: 0.75rem;
}

.profile-hero-panel {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(25, 37, 42, 0.98), rgba(11, 18, 21, 0.98)),
    radial-gradient(circle at top right, rgba(215, 162, 74, 0.14), transparent 30%);
}

.player-hero {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

.player-portrait-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px solid rgba(84, 117, 113, 0.5);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(16, 24, 28, 0.88), rgba(10, 16, 18, 0.98));
  overflow: hidden;
}

.player-portrait-card::after {
  content: "";
  position: absolute;
  inset: auto -10% -24% -10%;
  height: 55%;
  background: radial-gradient(circle at top, rgba(70, 182, 154, 0.14), transparent 60%);
}

.player-portrait-svg {
  width: min(100%, 260px);
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.34));
}

.player-overview {
  display: grid;
  gap: 0.9rem;
}

.player-nameplate {
  display: grid;
  gap: 0.35rem;
}

.player-nameplate strong {
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  letter-spacing: 0.03em;
  color: var(--ink-strong);
}

.profile-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.profile-badge {
  padding: 0.34rem 0.64rem;
  border-radius: 999px;
  border: 1px solid rgba(84, 117, 113, 0.62);
  background: rgba(11, 19, 21, 0.74);
  color: #d7e4df;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.player-meta-grid {
  display: grid;
  gap: 0.65rem;
}

.player-meta-card {
  border: 1px solid rgba(60, 85, 83, 0.52);
  border-radius: 16px;
  padding: 0.8rem;
  background: rgba(10, 17, 19, 0.68);
}

.player-meta-card strong {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--accent-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.player-note {
  border-left: 3px solid var(--accent-2);
  padding-left: 0.8rem;
  color: #d9e5e1;
}

.player-statline {
  color: #d6e1dd;
  line-height: 1.55;
}

.subtab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.subtab-btn {
  padding-inline: 0.85rem;
}

.subtab-btn.active {
  border-color: var(--accent);
  background: linear-gradient(145deg, rgba(77, 57, 27, 0.98), rgba(36, 30, 22, 0.98));
  color: var(--ink-strong);
}

.subtab-panel {
  display: none;
  gap: 0.85rem;
}

.subtab-panel.active {
  display: grid;
}

.history-subpanel {
  display: grid;
  gap: 1rem;
}

.history-subtab-bar {
  margin-bottom: 1rem;
}

.history-spotlight {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(84, 117, 113, 0.46);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 27, 0.84), rgba(9, 15, 17, 0.92)),
    radial-gradient(circle at top left, rgba(123, 196, 215, 0.08), transparent 28%);
}

.history-spotlight-mark {
  display: grid;
  gap: 0.24rem;
}

.history-spotlight-label {
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-strong);
}

.history-spotlight-meta {
  color: #c9d6d1;
  font-size: 0.82rem;
}

.history-spotlight-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.history-spotlight-card {
  border: 1px solid rgba(61, 87, 85, 0.46);
  border-radius: 16px;
  padding: 0.72rem;
  background: rgba(10, 17, 19, 0.72);
}

.history-spotlight-card strong {
  display: block;
  margin-bottom: 0.24rem;
  color: var(--accent-strong);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.71rem;
}

.history-gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 0.85rem;
}

.history-gallery.compact {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.history-gallery.micro {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.history-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem;
  border: 1px solid rgba(61, 87, 85, 0.46);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 27, 31, 0.92), rgba(12, 18, 21, 0.9)),
    radial-gradient(circle at top right, rgba(215, 162, 74, 0.1), transparent 35%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.history-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: start;
}

.history-card-title {
  display: grid;
  gap: 0.2rem;
}

.history-card-title strong {
  color: var(--ink-strong);
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.history-card-meta {
  color: #c9d6d1;
  font-size: 0.76rem;
}

.history-number-plate {
  min-width: 58px;
  padding: 0.46rem 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(215, 162, 74, 0.5);
  background: linear-gradient(145deg, rgba(77, 57, 27, 0.88), rgba(24, 20, 16, 0.98));
  color: var(--accent-strong);
  text-align: center;
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.history-card-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-card-stat {
  border: 1px solid rgba(61, 87, 85, 0.38);
  border-radius: 14px;
  padding: 0.52rem 0.58rem;
  background: rgba(8, 14, 16, 0.58);
}

.history-card-stat strong {
  display: block;
  margin-bottom: 0.16rem;
  color: var(--accent-2);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.history-chip {
  padding: 0.3rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(84, 117, 113, 0.54);
  background: rgba(9, 16, 18, 0.76);
  color: #d7e4df;
  font-size: 0.69rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.history-card-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: center;
}

.history-empty {
  padding: 0.9rem;
  border: 1px dashed rgba(84, 117, 113, 0.5);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(10, 16, 18, 0.46);
}

.history-data-drawer {
  margin-top: 0.8rem;
  border: 1px solid rgba(61, 87, 85, 0.46);
  border-radius: 16px;
  background: rgba(9, 15, 17, 0.62);
  overflow: hidden;
}

.history-data-drawer summary {
  cursor: pointer;
  padding: 0.78rem 0.9rem;
  color: var(--ink-strong);
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(18, 27, 31, 0.94), rgba(12, 18, 21, 0.92));
  border-bottom: 1px solid rgba(61, 87, 85, 0.3);
}

.history-data-drawer[open] summary {
  color: var(--accent-strong);
}

.history-data-drawer .table-wrap {
  margin: 0.85rem;
}

.overview-team-card strong {
  color: var(--team-secondary);
}

.overview-pulse-chip {
  border-color: rgba(var(--team-tertiary-rgb), 0.32);
}

.control-hero-panel {
  border-color: rgba(var(--section-wash-2-rgb), 0.22);
}

.control-spotlight {
  border-color: rgba(var(--section-wash-2-rgb), 0.28);
  background:
    linear-gradient(180deg, rgba(15, 23, 27, 0.84), rgba(9, 15, 17, 0.92)),
    radial-gradient(circle at top left, rgba(var(--section-wash-rgb), 0.12), transparent 28%);
}

.control-spotlight-card strong {
  color: var(--section-accent-strong);
}

.control-pulse-chip {
  border-color: rgba(var(--section-wash-2-rgb), 0.3);
}

.contracts-hero-panel {
  background:
    radial-gradient(circle at top right, rgba(255, 153, 89, 0.2), transparent 32%),
    radial-gradient(circle at bottom left, rgba(215, 162, 74, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(38, 31, 24, 0.98), rgba(15, 18, 21, 0.98));
}

.scouting-hero-panel {
  background:
    radial-gradient(circle at top right, rgba(239, 194, 76, 0.2), transparent 34%),
    radial-gradient(circle at bottom left, rgba(58, 153, 88, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(22, 34, 26, 0.98), rgba(10, 18, 15, 0.98));
}

.history-hero-panel {
  background:
    radial-gradient(circle at top right, rgba(215, 162, 74, 0.22), transparent 32%),
    radial-gradient(circle at bottom left, rgba(152, 88, 45, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(38, 29, 24, 0.98), rgba(15, 17, 20, 0.98));
}

#historyTab .history-spotlight,
#historyTab .history-card {
  border-color: rgba(215, 162, 74, 0.28);
}

#historyTab .history-card {
  background:
    linear-gradient(180deg, rgba(31, 23, 18, 0.92), rgba(15, 14, 18, 0.92)),
    radial-gradient(circle at top right, rgba(215, 162, 74, 0.16), transparent 35%);
}

#scoutingTab .table-wrap {
  border-color: rgba(111, 220, 140, 0.24);
}

#contractsTab .table-wrap {
  border-color: rgba(243, 187, 114, 0.22);
}

.tone-positive {
  color: var(--success) !important;
}

.tone-negative {
  color: #ff8f8f !important;
}

.tone-warning {
  color: var(--warning) !important;
}

.tone-info {
  color: var(--info) !important;
}

.tone-accent {
  color: var(--accent-strong) !important;
}

.chip.tone-positive,
.chip.tone-negative,
.chip.tone-warning,
.chip.tone-info,
.chip.tone-accent {
  border-color: currentColor;
  background: linear-gradient(180deg, rgba(12, 19, 21, 0.92), rgba(8, 14, 16, 0.96));
}

td.tone-positive,
td.tone-negative,
td.tone-warning,
td.tone-info,
td.tone-accent {
  font-weight: 700;
}

td.tone-positive {
  background: rgba(99, 214, 140, 0.08);
}

td.tone-negative {
  background: rgba(208, 92, 92, 0.08);
}

td.tone-warning {
  background: rgba(255, 183, 77, 0.08);
}

td.tone-info {
  background: rgba(123, 196, 215, 0.08);
}

@keyframes pulse {
  0% { background-position: 0 0; }
  100% { background-position: -200% 0; }
}

@media (min-width: 980px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split.triple {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .overview-hero-grid {
    grid-template-columns: minmax(340px, 1.1fr) minmax(320px, 0.9fr);
  }

  .control-hero-grid {
    grid-template-columns: minmax(340px, 1.05fr) minmax(320px, 0.95fr);
  }

  .player-hero {
    grid-template-columns: minmax(240px, 280px) 1fr;
  }

  .player-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .history-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .game-shell {
    grid-template-columns: 1fr;
  }

  .side-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }

  .menu-btn {
    text-align: center;
  }

  .history-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .game-topbar {
    grid-template-columns: 1fr;
  }

  .overview-team-grid,
  .overview-summary-cards,
  .control-spotlight-grid,
  .player-meta-grid {
    grid-template-columns: 1fr;
  }

  .footer-guide-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .side-menu {
    grid-template-columns: 1fr;
  }

  .menu-btn {
    padding: 0.44rem 0.5rem;
  }

  .history-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .history-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .player-portrait-card {
    min-height: 220px;
  }

  label {
    min-width: 100%;
  }
}

.boxscore-modal-card .subtab-bar {
  position: sticky;
  top: -1rem;
  z-index: 3;
  margin-inline: -1rem;
  padding: 0.8rem 1rem 0.85rem;
  background: linear-gradient(180deg, rgba(18, 27, 31, 0.98), rgba(18, 27, 31, 0.84));
  border-bottom: 1px solid rgba(61, 87, 85, 0.44);
  backdrop-filter: blur(10px);
}

/* ── Narrative Feed ───────────────────────────────────────────────────────── */

.narrative-panel-header {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.narrative-panel-kicker {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.narrative-feed {
  display: grid;
  gap: 0.55rem;
}

.narrative-empty {
  padding: 0.8rem;
  border: 1px dashed rgba(84, 117, 113, 0.48);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.narrative-event {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.5rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  border-left: 3px solid transparent;
  background: rgba(10, 16, 18, 0.62);
  border: 1px solid rgba(61, 87, 85, 0.36);
}

.tone-border-positive { border-left-color: var(--success) !important; }
.tone-border-warning  { border-left-color: var(--warning) !important; }
.tone-border-negative { border-left-color: #ff8f8f !important; }
.tone-border-info     { border-left-color: var(--info) !important; }
.tone-border-accent   { border-left-color: var(--accent-strong) !important; }

.narrative-event-icon {
  font-size: 1.1rem;
  line-height: 1.4;
  text-align: center;
}

.narrative-event-body {
  display: grid;
  gap: 0.15rem;
}

.narrative-event-headline {
  font-size: 0.86rem;
  color: var(--ink-strong);
  font-weight: 600;
}

.narrative-event-detail {
  font-size: 0.77rem;
  color: #c9d6d1;
}

.narrative-event-impact {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
}

.narrative-event-time {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* ── Trade Deadline Alert ──────────────────────────────────────────────────── */

.trade-deadline-alert {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 183, 77, 0.44);
  background: linear-gradient(135deg, rgba(38, 30, 18, 0.94), rgba(18, 16, 10, 0.96));
  flex-wrap: wrap;
}

.trade-deadline-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.trade-deadline-role {
  margin-left: auto;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}

/* ── Rewind Timeline ──────────────────────────────────────────────────────── */

.rewind-timeline-list {
  display: grid;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.rewind-entry {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.62rem 0.75rem;
  border: 1px solid rgba(61, 87, 85, 0.42);
  border-radius: 14px;
  background: rgba(10, 16, 18, 0.6);
}

.rewind-entry-icon {
  font-size: 1rem;
  text-align: center;
}

.rewind-entry-body {
  display: grid;
  gap: 0.1rem;
}

.rewind-entry-label {
  font-size: 0.84rem;
  color: var(--ink-strong);
}

.rewind-entry-meta {
  font-size: 0.71rem;
  color: var(--muted);
}

.rewind-entry-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.small-btn {
  padding: 0.28rem 0.6rem;
  font-size: 0.72rem;
  border-radius: 8px;
  border: 1px solid rgba(84, 117, 113, 0.5);
  background: rgba(12, 20, 22, 0.8);
  color: var(--ink);
  cursor: pointer;
}

.small-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.small-btn.warn  { border-color: rgba(208, 92, 92, 0.5); color: #ff8f8f; }
.small-btn.warn:hover { border-color: #ff8f8f; }

/* ── War Room Board ───────────────────────────────────────────────────────── */

.war-room-board {
  display: grid;
  gap: 0.3rem;
  max-height: 420px;
  overflow-y: auto;
}

.wrb-row {
  display: grid;
  grid-template-columns: 3rem 3.5rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.42rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(61, 87, 85, 0.36);
  background: rgba(10, 16, 18, 0.55);
  font-size: 0.83rem;
}

.wrb-row.wrb-on-clock {
  border-color: var(--accent);
  background: rgba(var(--team-primary-rgb, 74, 143, 181), 0.12);
  font-weight: 700;
}

.wrb-row.wrb-made {
  opacity: 0.54;
}

.wrb-row.wrb-user-pick {
  border-color: rgba(var(--team-primary-rgb, 74, 143, 181), 0.5);
  background: rgba(var(--team-primary-rgb, 74, 143, 181), 0.06);
}

.wrb-row.wrb-user-next {
  border-color: rgba(var(--team-primary-rgb, 74, 143, 181), 0.3);
}

.wrb-pick-num { color: var(--muted); font-size: 0.75rem; }
.wrb-team     { font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; }
.wrb-selection { color: var(--ink-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrb-need      { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.wrb-clock-label { color: var(--accent-strong); animation: wrb-pulse 1s ease-in-out infinite; }

@keyframes wrb-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.war-room-clock {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid rgba(84, 117, 113, 0.44);
  border-radius: 14px;
  text-align: center;
  margin-bottom: 0.75rem;
}

.clock-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(61, 87, 85, 0.38);
  overflow: hidden;
}

.clock-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.25s linear;
}

.clock-normal .clock-bar-fill  { background: var(--success); }
.clock-warning .clock-bar-fill { background: var(--warning); }
.clock-urgent .clock-bar-fill  { background: #ff8f8f; }

.clock-seconds {
  font-size: 1.4rem;
  font-family: "Rockwell", "Bahnschrift SemiCondensed", serif;
  color: var(--ink-strong);
}

.clock-urgent .clock-seconds { color: #ff8f8f; }

.war-room-trade-call {
  padding: 0.9rem;
  border: 1px solid rgba(215, 162, 74, 0.44);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(38, 30, 18, 0.94), rgba(18, 16, 10, 0.96));
  display: grid;
  gap: 0.6rem;
}

.trade-call-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.trade-call-icon { font-size: 1.4rem; }
.trade-call-team { font-weight: 700; color: var(--accent-strong); }
.trade-call-body { font-size: 0.86rem; color: #c9d6d1; }

.trade-call-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── News Ticker ─────────────────────────────────────────────────────────── */

.news-ticker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(215, 162, 74, 0.08);
  border-bottom: 1px solid rgba(215, 162, 74, 0.2);
  padding: 0.35rem 1rem;
  font-size: 0.82rem;
  color: var(--ink);
  min-height: 2rem;
  overflow: hidden;
}

.news-ticker.hidden { display: none; }

.news-ticker-icon { font-size: 0.95rem; flex-shrink: 0; }

.news-ticker-content {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}

.news-ticker-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0 0.25rem;
  flex-shrink: 0;
}

/* ── GM Legacy Score Card ────────────────────────────────────────────────── */

.gm-legacy-card {
  border-color: rgba(215, 162, 74, 0.3) !important;
  background: rgba(215, 162, 74, 0.04) !important;
  cursor: default;
}

.gm-legacy-card:hover {
  border-color: var(--accent) !important;
}

/* ── Season Preview Panel ────────────────────────────────────────────────── */

.season-preview-panel {
  border-left: 3px solid var(--accent);
}

.season-preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.season-preview-icon { font-size: 1.4rem; }

.season-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.season-preview-tile {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.season-preview-tile-label {
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.season-preview-tile-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-strong);
}

.season-preview-tile-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ── Cap Casualty Predictor ──────────────────────────────────────────────── */

.cap-casualty-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cap-casualty-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px 100px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.84rem;
}

.cap-casualty-row:hover { border-color: var(--accent); }

.cut-risk-bar {
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}

.cut-risk-fill { height: 100%; border-radius: 3px; }
.cut-risk-high   .cut-risk-fill { background: var(--danger); }
.cut-risk-medium .cut-risk-fill { background: var(--warning); }
.cut-risk-low    .cut-risk-fill { background: var(--success); }

/* ── Cap Projection Bars ─────────────────────────────────────────────────── */

.cap-projection-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cap-proj-year-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.84rem;
}

.cap-proj-bar-wrap {
  height: 20px;
  background: var(--bg-3);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  gap: 1px;
}

.cap-proj-active  { background: var(--accent); }
.cap-proj-expiring { background: rgba(215,162,74,0.35); }
.cap-proj-space   { background: var(--bg-2); }

/* ── Draft Combine ───────────────────────────────────────────────────────── */

#combineResultsTable td:last-child {
  font-weight: 700;
}

.combine-grade-elite  { color: var(--success); }
.combine-grade-good   { color: var(--info); }
.combine-grade-avg    { color: var(--muted); }
.combine-grade-poor   { color: var(--danger); }

/* ── Coaching DNA Card ───────────────────────────────────────────────────── */

.coaching-dna-card {
  background: var(--bg-1);
  border: 1px solid rgba(70, 182, 154, 0.25);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.coaching-dna-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.coaching-dna-icon { font-size: 1.4rem; }

.coaching-dna-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-2);
}

.coaching-dna-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.coaching-dna-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.coaching-dna-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem;
  font-size: 0.82rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(46,51,71,0.4);
}

.coaching-dna-row:last-child { border-bottom: none; }

.coaching-dna-key { color: var(--muted); }
.coaching-dna-val { color: var(--ink); }

/* ── Commissioner / Multiplayer ──────────────────────────────────────────── */

.commissioner-lobby-status {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.84rem;
}

.lobby-player-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

.lobby-player-row:last-child { border-bottom: none; }

.lobby-ready-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lobby-ready-dot.ready { background: var(--success); }
.lobby-ready-dot.pending { background: var(--warning); }

/* ── Community & Discord Link ────────────────────────────────────────────── */

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.4);
  color: #8b9cf0;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.15s;
}

.btn-discord:hover {
  background: rgba(88, 101, 242, 0.25);
  color: #aab5ff;
}

/* ── Agent Negotiation Modal ─────────────────────────────────────────────── */

.agent-modal-card {
  max-width: 560px;
  width: 95%;
}

.agent-modal-header {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.agent-personality-box {
  background: rgba(215, 162, 74, 0.08);
  border: 1px solid rgba(215, 162, 74, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.75rem;
  font-size: 0.84rem;
  color: var(--accent);
}

.agent-demand-bar {
  margin-bottom: 0.75rem;
}

.agent-demand-numbers {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.agent-offer-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.agent-response-box {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  border: 1px solid var(--line);
}

.agent-response-box.accepted { border-color: var(--success); background: rgba(99,214,140,0.07); }
.agent-response-box.counter  { border-color: var(--warning); background: rgba(255,183,77,0.07); }
.agent-response-box.walked   { border-color: var(--danger);  background: rgba(208,92,92,0.07); }

.agent-history-box {
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
  max-height: 140px;
  overflow-y: auto;
}

/* ── Keyboard Shortcuts Modal ────────────────────────────────────────────── */

.shortcuts-card {
  max-width: 400px;
  width: 95%;
}

.shortcuts-table { width: 100%; border-collapse: collapse; }
.shortcuts-table th, .shortcuts-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}
.shortcuts-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; }

kbd {
  display: inline-block;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--accent);
}

/* ── Mobile Core Loop Overlay ────────────────────────────────────────────── */

.mobile-loop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-0);
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
}

.mobile-loop-overlay.hidden { display: none !important; }

body.mobile-loop-active .mobile-loop-overlay {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.ml-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  margin: auto;
}

.ml-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.ml-team { font-size: 1.2rem; font-weight: 700; color: var(--ink-strong); }
.ml-record { font-size: 1.4rem; font-weight: 900; color: var(--accent); }
.ml-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.75rem; text-transform: capitalize; }

.ml-news-ticker {
  background: rgba(215, 162, 74, 0.08);
  border: 1px solid rgba(215, 162, 74, 0.2);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ml-stats-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.ml-stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  flex: 1;
  min-width: 100px;
}

.ml-stat-label { font-size: 0.68rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.ml-stat-value { font-size: 1rem; font-weight: 700; color: var(--ink-strong); }
.ml-stat-value.negative { color: var(--danger); }

.ml-needs {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-left: 2px solid var(--accent);
}

.ml-decision-deck {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ml-decision-card {
  width: 100%;
  display: grid;
  gap: 0.16rem;
  text-align: left;
  padding: 0.72rem 0.78rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  color: var(--ink);
  cursor: pointer;
}

.ml-decision-card strong {
  color: var(--ink-strong);
  font-size: 0.92rem;
}

.ml-decision-card span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.ml-decision-card.danger { border-left-color: var(--danger); }
.ml-decision-card.warning { border-left-color: var(--warning); }
.ml-decision-card.primary { border-left-color: var(--accent); background: rgba(249, 195, 73, 0.12); }

.ml-decision-kicker {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ml-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ml-btn { padding: 0.65rem 1rem; border-radius: 8px; font-size: 0.88rem; font-weight: 600; border: 1px solid var(--line); cursor: pointer; flex: 1; }
.ml-btn.primary { background: var(--accent); color: #000; border-color: var(--accent); }
.ml-btn:not(.primary) { background: var(--bg-2); color: var(--ink); }
.ml-loading { color: var(--muted); font-size: 0.9rem; padding: 1rem; }

/* ── Mobile 375px fixes ───────────────────────────────────────────────────── */

@media (max-width: 420px) {
  .wrb-row {
    grid-template-columns: 2.4rem 2.8rem 1fr;
  }

  .wrb-need { display: none; }

  .rewind-entry {
    grid-template-columns: 2rem 1fr;
  }

  .rewind-entry-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .trade-deadline-alert {
    gap: 0.55rem;
  }

  .trade-deadline-role {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .history-gallery {
    grid-template-columns: 1fr;
  }

  .history-gallery.compact {
    grid-template-columns: 1fr;
  }

  .history-card-grid {
    grid-template-columns: 1fr;
  }

  .narrative-event {
    grid-template-columns: 1.6rem 1fr;
  }

  .narrative-event-icon {
    font-size: 0.9rem;
  }
}

/* ── GM Persona Arc ─────────────────────────────────────────────────────── */
.gm-grade-badge {
  font-size: 11px; font-weight: 800;
  background: rgba(210,153,34,.15); border: 1px solid rgba(210,153,34,.4);
  color: #d29922; padding: 1px 6px; border-radius: 8px;
  vertical-align: middle; margin-left: 4px;
}
.gm-persona-tier { margin-top: 8px; }
.gm-persona-name { font-size: 12px; font-weight: 700; color: #e6edf3; margin-bottom: 5px; }
.gm-tier-track { display: flex; gap: 4px; margin-bottom: 6px; }
.gm-tier-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #30363d; border: 1px solid #30363d;
  transition: background 0.2s;
}
.gm-tier-dot.active { background: #d29922; border-color: #d29922; }
.gm-persona-desc { font-size: 11px; color: #7d8590; line-height: 1.4; margin-bottom: 4px; }
.gm-persona-next { font-size: 11px; color: #58a6ff; }
.gm-legacy-card { grid-column: span 2; }

/* ── Cap Alert Banner ───────────────────────────────────────────────────── */
.cap-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.cap-alert-critical { background: rgba(248,81,73,.12); border: 1px solid rgba(248,81,73,.4); }
.cap-alert-warning  { background: rgba(210,153,34,.12); border: 1px solid rgba(210,153,34,.4); }
.cap-alert-info     { background: rgba(88,166,255,.10); border: 1px solid rgba(88,166,255,.3); }
.cap-alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.cap-alert-body { flex: 1; }
.cap-alert-body strong { display: block; font-size: 13px; margin-bottom: 3px; }
.cap-alert-detail { font-size: 11px; color: var(--muted, #7d8590); }
.cap-alert-count {
  font-size: 11px; font-weight: 700; color: var(--muted, #7d8590);
  background: rgba(255,255,255,.06); border-radius: 10px;
  padding: 2px 8px; white-space: nowrap; margin-top: 2px;
}

/* ── Cloud Sync / Gist ───────────────────────────────────────────────────── */
.cloud-sync-panel { border: 1px solid #30363d; border-radius: 8px; padding: 16px 20px; }
.gist-save-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #21262d; font-size: 12px;
}
.gist-save-row:last-child { border-bottom: none; }
.gist-save-desc { flex: 1; color: var(--text, #e6edf3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gist-save-date { color: var(--muted, #7d8590); white-space: nowrap; }
.btn-sm {
  font-size: 11px; padding: 3px 10px; border-radius: 4px;
  background: #21262d; border: 1px solid #30363d; color: #e6edf3;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-sm:hover { border-color: #58a6ff; color: #58a6ff; }

/* ── Feedback Widget ─────────────────────────────────────────────────────── */
.feedback-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
}
.feedback-widget a {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1c2330;
  border: 1px solid #30363d;
  border-radius: 20px;
  padding: 7px 14px 7px 10px;
  color: #7d8590;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.feedback-widget a:hover {
  background: #21262d;
  border-color: #58a6ff;
  color: #58a6ff;
}
.feedback-icon { font-size: 14px; }
@media (max-width: 480px) {
  .feedback-widget { bottom: 12px; right: 12px; }
  .feedback-label { display: none; }
  .feedback-widget a { padding: 8px; border-radius: 50%; }
}

/* ── Fan Sentiment Card ───────────────────────────────────────────────────── */
#fanSentimentCard {
  background: var(--panel, #1e2230);
  border: 1px solid var(--line, #2e3448);
  border-radius: 8px;
  padding: 12px 14px;
  min-width: 140px;
}
.fan-sentiment-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.fan-sentiment-label { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted, #7a8299); font-weight: 700; }
.fan-sentiment-trend { font-size: 12px; color: var(--muted, #7a8299); }
.fan-sentiment-approval { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fs-bar-track { flex: 1; height: 6px; background: var(--bg3, #222736); border-radius: 3px; overflow: hidden; }
.fs-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.tone-bg-positive { background: var(--success, #3dba7e); }
.tone-bg-warning  { background: var(--warn, #e8a840); }
.tone-bg-negative { background: var(--danger, #e05a5a); }
.fs-approval-num { font-size: 18px; font-weight: 800; min-width: 32px; }
.fan-sentiment-label-name { font-size: 13px; font-weight: 700; }
.fan-sentiment-reason { font-size: 11px; color: var(--muted, #7a8299); margin-top: 2px; }

/* ── Active Injury Overlay Card ──────────────────────────────────────────── */
#injuryOverlayCard {
  background: var(--panel, #1e2230);
  border: 1px solid var(--line, #2e3448);
  border-left: 3px solid var(--danger, #e05a5a);
  border-radius: 8px;
  padding: 12px 14px;
}
.injury-overlay-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--danger, #e05a5a); margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.inj-count-chip {
  background: rgba(224,90,90,0.15); color: var(--danger, #e05a5a);
  border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 700;
}
.injury-overlay-list { display: flex; flex-direction: column; gap: 5px; }
.injury-overlay-row {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
}
.inj-pos-chip {
  background: var(--bg3, #222736); color: var(--muted, #7a8299);
  border-radius: 4px; padding: 1px 5px; font-size: 10px; font-weight: 700; min-width: 28px; text-align: center;
}
.inj-name { flex: 1; font-weight: 600; }
.inj-status { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.inj-weeks { font-size: 11px; font-weight: 700; min-width: 24px; text-align: right; }
.inj-overflow { margin-top: 4px; font-size: 11px; }

/* ── Stat Leaders Strip ───────────────────────────────────────────────────── */
#statLeadersStrip {
  background: var(--panel, #1e2230);
  border: 1px solid var(--line, #2e3448);
  border-radius: 8px;
  padding: 10px 14px;
}
.stat-leaders-inner {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.stat-leader-cell {
  display: flex; flex-direction: column; gap: 2px; min-width: 100px;
}
.sl-cat { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted, #7a8299); font-weight: 700; }
.sl-name { font-size: 13px; font-weight: 700; }
.sl-val { font-size: 12px; color: var(--accent, #4f8ef7); font-weight: 600; }

/* ── Owner Ultimatum Banner ───────────────────────────────────────────────── */
#ownerUltimatumBanner {
  margin: 8px 0;
}
.ultimatum-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(224,90,90,0.1); border: 1px solid var(--danger, #e05a5a);
  border-radius: 8px; padding: 12px 16px;
}
.ultimatum-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.ultimatum-body { display: flex; flex-direction: column; gap: 3px; }
.ultimatum-body strong { font-size: 13px; color: var(--danger, #e05a5a); font-weight: 800; }
.ultimatum-body span { font-size: 13px; }
.ultimatum-detail { font-size: 11px; color: var(--muted, #7a8299); margin-top: 2px; }

/* ── Season Review Modal ─────────────────────────────────────────────────── */
#seasonReviewModal {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center;
}
#seasonReviewModal[hidden] { display: none; }
.season-review-card {
  background: var(--panel, #1e2230);
  border: 1px solid var(--line, #2e3448);
  border-top: 3px solid var(--accent, #4f8ef7);
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 480px; width: 92%;
  position: relative;
}
.sr-headline {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 16px;
}
.sr-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.sr-tile {
  background: var(--bg3, #222736); border-radius: 8px; padding: 10px 12px;
}
.sr-tile .sr-tile-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted, #7a8299); }
.sr-tile .sr-tile-val { font-size: 20px; font-weight: 800; margin-top: 2px; }
.sr-verdict {
  border: 1px solid var(--line, #2e3448); border-radius: 8px; padding: 10px 14px;
  margin-bottom: 12px; font-size: 13px;
}
.sr-reasons { font-size: 11px; color: var(--muted, #7a8299); margin-top: 4px; }
.sr-legacy { font-size: 13px; color: var(--muted, #7a8299); margin-bottom: 12px; }
.sr-call-to-action { font-size: 14px; font-style: italic; color: var(--accent, #4f8ef7); text-align: center; }
.season-review-actions { margin-top: 16px; display: flex; justify-content: center; }
#closeSeasonReviewBtn { min-width: 120px; }

/* ── Halftime / Tactical Adjust Modal ────────────────────────────────────── */
#halftimeAdjustModal {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center;
}
#halftimeAdjustModal[hidden] { display: none; }
.halftime-modal-card {
  background: var(--panel, #1e2230);
  border: 1px solid var(--line, #2e3448);
  border-top: 3px solid var(--accent2, #7c5cbf);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 420px; width: 92%;
}
.halftime-modal-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.halftime-modal-sub { font-size: 12px; color: var(--muted, #7a8299); margin-bottom: 16px; }
.tactic-options-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.tactic-option {
  border: 1px solid var(--line, #2e3448); border-radius: 8px;
  padding: 12px 14px; cursor: pointer; background: var(--bg2, #1a1e28);
  transition: border-color 0.15s;
}
.tactic-option:hover { border-color: var(--accent, #4f8ef7); }
.tactic-option.selected { border-color: var(--accent2, #7c5cbf); background: rgba(124,92,191,0.1); }
.tactic-option .to-icon { font-size: 20px; margin-bottom: 4px; }
.tactic-option .to-label { font-size: 13px; font-weight: 700; }
.tactic-option .to-desc { font-size: 11px; color: var(--muted, #7a8299); margin-top: 2px; }
.halftime-actions { display: flex; gap: 8px; }
.tactic-confirm-btn { flex: 1; }
.tactic-skip-btn { background: var(--bg2, #1a1e28); border: 1px solid var(--line, #2e3448); }

/* ── Draft Pick Reveal Modal ─────────────────────────────────────────────── */
#draftPickRevealModal {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center;
}
#draftPickRevealModal[hidden] { display: none; }
.draft-reveal-card {
  background: var(--panel, #1e2230);
  border: 1px solid var(--line, #2e3448);
  border-top: 3px solid var(--gold, #e8a840);
  border-radius: 12px; padding: 28px 32px;
  max-width: 380px; width: 92%; text-align: center;
}
.draft-reveal-clock { font-size: 12px; color: var(--muted, #7a8299); margin-bottom: 16px; }
.draft-reveal-pick { margin-bottom: 16px; }
.dr-pos-badge {
  display: inline-block; background: var(--accent, #4f8ef7); color: #fff;
  border-radius: 6px; padding: 2px 10px; font-size: 12px; font-weight: 800;
  letter-spacing: 1px; margin-bottom: 8px; text-transform: uppercase;
}
.dr-name { font-size: 26px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 4px; }
.dr-ovr { font-size: 14px; color: var(--accent, #4f8ef7); font-weight: 700; }
.draft-reveal-analyst { font-size: 13px; font-style: italic; color: var(--muted, #7a8299); margin-bottom: 20px; }
.dr-confirm-btn { min-width: 140px; }

/* ── Persona Tier Unlock Toast ────────────────────────────────────────────── */
#personaTierToast {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%) translateY(-20px);
  z-index: 9001; opacity: 0;
  background: linear-gradient(135deg, #1a1030, #1e2230);
  border: 1px solid var(--accent2, #7c5cbf); border-radius: 12px;
  padding: 14px 24px; text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
#personaTierToast[hidden] { display: none; }
#personaTierToast.active {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.persona-toast-kicker { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent2, #7c5cbf); font-weight: 700; }
.persona-toast-name { font-size: 20px; font-weight: 900; margin: 4px 0 2px; }
.persona-toast-tier { font-size: 12px; color: var(--muted, #7a8299); }

/* ── Veteran Mentorship Panel ────────────────────────────────────────────── */
#mentorshipPanel { padding: 4px 0; }
.mentorship-list { display: flex; flex-direction: column; gap: 8px; }
.mentorship-pair {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2, #1a1e28); border: 1px solid var(--line, #2e3448);
  border-radius: 8px; padding: 10px 12px; font-size: 13px;
}
.mp-pos-chip {
  background: var(--bg3, #222736); color: var(--muted, #7a8299);
  border-radius: 4px; padding: 2px 6px; font-size: 10px; font-weight: 700;
}
.mp-mentor { display: flex; align-items: center; gap: 6px; flex: 1; }
.mp-arrow { color: var(--accent, #4f8ef7); font-weight: 700; }
.mp-mentee { display: flex; align-items: center; gap: 6px; flex: 1; }
.mp-name { font-weight: 700; }
.mp-ovr, .mp-age { font-size: 11px; }
.mp-bonus { font-size: 12px; color: var(--success, #3dba7e); font-weight: 700; white-space: nowrap; }
.mentorship-note { margin-top: 8px; }

/* ── Franchise Brand Builder ─────────────────────────────────────────────── */
.brand-builder-card {
  background: var(--panel, #1e2230);
  border: 1px solid var(--line, #2e3448);
  border-radius: 10px; padding: 16px 18px; margin-top: 12px;
}
.brand-builder-title {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent, #4f8ef7); margin-bottom: 12px;
}
.brand-color-swatch {
  display: inline-block; width: 18px; height: 18px; border-radius: 4px;
  border: 1px solid var(--line, #2e3448); vertical-align: middle;
  margin-left: 4px; cursor: pointer;
}

/* ── Tone border helpers ─────────────────────────────────────────────────── */
.tone-border-positive { border-left: 3px solid var(--success, #3dba7e); }
.tone-border-warning  { border-left: 3px solid var(--warn, #e8a840); }
.tone-border-negative { border-left: 3px solid var(--danger, #e05a5a); }
.tone-border-info     { border-left: 3px solid var(--info, #4f8ef7); }

/* ── Speedrun Challenge Panel ───────────────────────────────────────────── */
#speedrunPanel .speedrun-status-card {
  background: var(--bg2, #1a1e28); border: 1px solid var(--line, #2e3448);
  border-radius: 8px; padding: 12px 16px; font-size: 13px;
}
#speedrunPanel .speedrun-active-badge {
  display: inline-block; background: var(--accent, #4f8ef7); color: #fff;
  border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px;
}
#speedrunPanel .speedrun-stat { margin: 4px 0; }
#speedrunPanel .speedrun-stat strong { color: var(--fg, #e4e6ef); }
#speedrunPanel .speedrun-lb-table {
  width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px;
}
#speedrunPanel .speedrun-lb-table th {
  text-align: left; font-weight: 700; color: var(--muted, #7a8299);
  border-bottom: 1px solid var(--line, #2e3448); padding: 4px 8px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
}
#speedrunPanel .speedrun-lb-table td {
  padding: 4px 8px; border-bottom: 1px solid var(--line, #2e3448);
}
#speedrunPanel .speedrun-lb-table tr.speedrun-highlight td {
  background: rgba(79, 142, 247, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SESSION 8 — NEW FEATURES CSS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Sidebar Tab Grouping (4 mode buckets) ─────────────────────────────── */
.side-menu .menu-group-header {
  font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px 4px; margin-top: 8px;
  border-top: 1px solid var(--line); user-select: none;
}
.side-menu .menu-group-header:first-child { border-top: none; margin-top: 0; }
.menu-btn.tab-bucket-active { background: rgba(var(--section-wash-rgb), 0.18); }

/* ── Priority Inbox ────────────────────────────────────────────────────── */
.inbox-bell-btn {
  position: relative; background: none; border: 1px solid var(--line);
  border-radius: 50%; width: 34px; height: 34px; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
  transition: border-color 120ms, background 120ms; font-size: 16px; padding: 0;
}
.inbox-bell-btn:hover { border-color: var(--accent); background: rgba(var(--team-primary-rgb),0.12); }
.inbox-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--warning); color: #111; border-radius: 10px;
  font-size: 9px; font-weight: 800; padding: 1px 4px; min-width: 14px;
  text-align: center; line-height: 14px; border: 1px solid var(--bg-0);
}
.inbox-badge-critical { background: var(--danger); color: #fff; }
#inboxDrawer {
  position: fixed; right: -360px; top: 0; width: 360px; height: 100vh;
  background: var(--bg-1); border-left: 1px solid var(--line);
  z-index: 999; display: flex; flex-direction: column;
  transition: right 280ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -6px 0 32px rgba(0,0,0,0.45);
}
#inboxDrawer.open { right: 0; }
.inbox-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.inbox-drawer-title { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; }
.inbox-close-btn {
  background: none; border: none; color: var(--muted); font-size: 18px;
  cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.inbox-close-btn:hover { color: var(--ink); background: var(--bg-3); }
#inboxList { flex: 1; overflow-y: auto; padding: 8px 0; }
.inbox-item {
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 120ms;
}
.inbox-item:hover { background: rgba(255,255,255,0.03); }
.inbox-tier-critical { border-left: 3px solid var(--danger); }
.inbox-tier-important { border-left: 3px solid var(--warning); }
.inbox-tier-flavor { border-left: 3px solid var(--line); }
.inbox-item-header { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.inbox-tier-dot { font-size: 10px; }
.inbox-type-icon { font-size: 13px; }
.inbox-headline { flex: 1; font-size: 0.82rem; font-weight: 600; }
.inbox-week { font-size: 0.7rem; color: var(--muted); }
.inbox-detail { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.inbox-quote { font-size: 0.75rem; color: var(--accent-2); font-style: italic; margin-top: 3px; }
.inbox-empty { padding: 24px 16px; color: var(--muted); font-size: 0.82rem; text-align: center; }

/* ── Franchise Moment Modal ─────────────────────────────────────────────── */
#franchiseMomentModal {
  position: fixed; bottom: 24px; right: 24px; z-index: 900;
  width: min(420px, calc(100vw - 32px)); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.55); padding: 20px 22px;
}
#franchiseMomentModal[hidden] { display: none; }
.fm-win { border-color: var(--success); box-shadow: 0 12px 48px rgba(99,214,140,0.2); }
.fm-loss { border-color: var(--danger); box-shadow: 0 12px 48px rgba(208,92,92,0.2); }
@keyframes fmSlideIn { from { opacity:0; transform: translateY(20px) scale(0.97); } to { opacity:1; transform: none; } }
.fm-animate-in { animation: fmSlideIn 0.4s ease-out; }
.fm-kicker { font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
#fmHeadline { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin: 0 0 10px; }
.fm-score-row { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 10px; }
#fmScore { font-size: 1.6rem; font-weight: 800; color: var(--accent-strong); font-family: "Rockwell", serif; }
#fmWeek { font-size: 0.78rem; color: var(--muted); }
.fm-highlight-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 3px; }
#fmHighlight { font-size: 0.83rem; color: var(--accent-2); margin-bottom: 6px; }
#fmTopPlay { font-size: 0.78rem; color: var(--muted); background: var(--bg-3); border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; }
.fm-actions { display: flex; gap: 8px; margin-top: 12px; }
.fm-close-btn { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 0.78rem; cursor: pointer; color: var(--muted); }
.fm-share-btn { background: var(--accent); border: none; border-radius: 8px; padding: 6px 14px; font-size: 0.78rem; cursor: pointer; color: #111; font-weight: 700; }
.fm-share-btn:hover { background: var(--accent-strong); }

/* ── GM Decision Modal ──────────────────────────────────────────────────── */
#gmDecisionModal {
  position: fixed; inset: 0; z-index: 950; display: flex;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(4px);
}
#gmDecisionModal[hidden] { display: none; }
.gm-decision-card {
  background: var(--bg-1); border: 1px solid var(--accent);
  border-radius: 18px; padding: 28px 30px; width: min(520px, calc(100vw - 32px));
  box-shadow: 0 16px 64px rgba(0,0,0,0.6);
}
.gm-decision-kicker { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.gm-decision-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 4px; }
#gmDecisionPrompt { font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }
#gmDecisionOptions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.gm-decision-option {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; text-align: left; cursor: pointer;
  transition: border-color 120ms, background 120ms; width: 100%;
}
.gm-decision-option:hover { border-color: var(--accent); background: rgba(var(--team-primary-rgb), 0.12); }
.gm-decision-opt-label { font-weight: 700; font-size: 0.88rem; margin-bottom: 3px; }
.gm-decision-opt-effect { font-size: 0.76rem; color: var(--muted); }
.gm-decision-dismiss { background: none; border: none; color: var(--muted); font-size: 0.8rem; cursor: pointer; padding: 4px 0; }

/* ── Sim-Watch Overlay ──────────────────────────────────────────────────── */
#simWatchOverlay {
  position: fixed; right: 24px; top: 80px; z-index: 850;
  width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 100px);
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; overflow: hidden;
}
#simWatchOverlay[hidden] { display: none; }
.sw-header-bar {
  padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.sw-kicker { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.sw-ctrl { display: flex; gap: 6px; }
.sw-skip-btn, .sw-close-btn {
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 3px 10px; font-size: 0.74rem; cursor: pointer; color: var(--muted);
}
.sw-skip-btn:hover, .sw-close-btn:hover { border-color: var(--accent); color: var(--ink); }
#simWatchHeader { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sw-matchup { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.sw-team { font-weight: 700; flex: 1; }
.sw-score { font-size: 1.4rem; font-weight: 800; color: var(--accent-strong); font-family: "Rockwell", serif; min-width: 28px; text-align: center; }
.sw-vs { color: var(--muted); font-size: 0.8rem; }
.sw-meta { font-size: 0.7rem; color: var(--muted); margin-top: 4px; }
#simWatchFeed { flex: 1; overflow-y: auto; padding: 8px 0; max-height: 340px; }
.sw-play {
  padding: 6px 14px; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.76rem; display: flex; gap: 8px; align-items: flex-start;
}
@keyframes swFadeIn { from { opacity:0; background: rgba(var(--team-primary-rgb),0.15); } to { opacity:1; } }
.sw-play { animation: swFadeIn 0.2s ease-out; }
.sw-play-qtr { color: var(--muted); min-width: 32px; font-size: 0.68rem; }
.sw-play-team { color: var(--accent-2); min-width: 28px; font-size: 0.68rem; font-weight: 700; }
.sw-play-desc { flex: 1; line-height: 1.4; }
.sw-play-tag { background: var(--accent); color: #111; border-radius: 4px; padding: 1px 5px; font-size: 0.64rem; font-weight: 800; white-space: nowrap; }
.sw-highlight { background: rgba(var(--section-wash-rgb), 0.08); }
.sw-scoring { background: rgba(99,214,140,0.08); }
.sw-scoring .sw-play-tag { background: var(--success); }
.sw-turnover { background: rgba(208,92,92,0.08); }
.sw-turnover .sw-play-tag { background: var(--danger); color: #fff; }
#simWatchFinal {
  padding: 10px 16px; background: var(--bg-2); border-top: 1px solid var(--line);
  font-weight: 700; font-size: 0.9rem; text-align: center;
}

/* ── Season Narrative Arcs Panel ────────────────────────────────────────── */
#seasonArcsContent { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.season-arc-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color 120ms;
}
.season-arc-card:hover { border-color: var(--line-strong); }
.season-arc-icon { font-size: 22px; }
.season-arc-body { flex: 1; }
.season-arc-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 3px; }
.season-arc-status { font-size: 0.74rem; font-weight: 700; }
.season-arc-type { font-size: 0.66rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Cap War Room ────────────────────────────────────────────────────────── */
#capWarRoomBars { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.cwr-year { display: grid; grid-template-columns: 52px 1fr 40px; gap: 8px; align-items: center; }
.cwr-year-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.cwr-bar-track { height: 10px; background: var(--bg-3); border-radius: 5px; overflow: hidden; }
.cwr-bar-fill { height: 100%; border-radius: 5px; transition: width 600ms ease-out; }
.cwr-zone-safe { background: var(--success); }
.cwr-zone-warning { background: var(--warning); }
.cwr-zone-critical { background: var(--danger); }
.cwr-pct { font-size: 0.78rem; font-weight: 700; text-align: right; }
.cwr-pct-safe { color: var(--success); }
.cwr-pct-warning { color: var(--warning); }
.cwr-pct-critical { color: var(--danger); }
.cwr-detail { grid-column: 1 / -1; display: flex; gap: 10px; font-size: 0.7rem; color: var(--muted); margin-top: -4px; }
.cwr-dead { color: var(--danger); }
.cwr-expiring { color: var(--warning); }
#capWarRoomHint { margin-top: 14px; font-size: 0.8rem; color: var(--muted); padding: 8px 12px; background: var(--bg-3); border-radius: 8px; }

/* ── Trade Breakdown Card ───────────────────────────────────────────────── */
#tradeBreakdownCard {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-top: 12px;
}
#tradeBreakdownCard[hidden] { display: none; }
.tbd-header { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; font-weight: 700; }
.tbd-row { display: flex; gap: 16px; margin-bottom: 14px; }
.tbd-side { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tbd-side-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.tbd-player { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; }
.tbd-pos { background: var(--bg-3); border-radius: 4px; padding: 1px 5px; font-size: 0.66rem; color: var(--muted); font-weight: 700; }
.tbd-grade { font-size: 0.8rem; font-weight: 800; margin-left: auto; }
.grade-a { color: var(--success); }
.grade-b { color: var(--accent-strong); }
.grade-c { color: var(--warning); }
.grade-d { color: var(--danger); }
.tbd-picks { font-size: 0.74rem; color: var(--accent-2); margin-top: 4px; }
.tbd-divider { display: flex; align-items: center; font-size: 1.4rem; color: var(--muted); padding: 0 4px; }
.tbd-verdict { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-3); border-radius: 10px; }
.tbd-fairness-grade { font-size: 1.4rem; font-weight: 800; min-width: 36px; text-align: center; }
.tbd-verdict-text { font-size: 0.84rem; font-weight: 600; }

/* ── Dynasty Records Board ──────────────────────────────────────────────── */
.records-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.record-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 14px; transition: border-color 120ms;
}
.record-card:hover { border-color: var(--accent); }
.record-cat { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.record-val { font-size: 1.35rem; font-weight: 800; color: var(--accent-strong); font-family: "Rockwell", serif; }
.record-player { font-size: 0.78rem; font-weight: 600; margin-top: 4px; }
.record-year { font-size: 0.68rem; color: var(--muted); }
.records-empty { color: var(--muted); font-size: 0.84rem; padding: 20px 0; }

/* ── Mentorship Badge ───────────────────────────────────────────────────── */
.mentorship-badge {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  background: rgba(70,182,154,0.1); border: 1px solid rgba(70,182,154,0.3);
  border-radius: 8px; font-size: 0.78rem; margin-top: 8px;
}
.mentorship-badge-icon { font-size: 14px; }
.mentorship-badge-bonus { color: var(--success); font-weight: 700; margin-left: auto; }

/* ── Mobile 375px overflow fixes ────────────────────────────────────────── */
@media (max-width: 480px) {
  .modal-content { overflow-x: hidden !important; max-width: 100vw !important; }
  .draft-war-room-grid { grid-template-columns: 1fr !important; }
  .tbd-row { flex-direction: column; }
  #simWatchOverlay { right: 8px; top: 70px; width: calc(100vw - 16px); max-height: 60vh; }
  #franchiseMomentModal { bottom: 8px; right: 8px; width: calc(100vw - 16px); }
  #inboxDrawer { width: 100vw; right: -100vw; }
  .gm-decision-card { width: calc(100vw - 24px); padding: 20px 18px; }
  .records-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── GM Persona Arc Enhanced ────────────────────────────────────────────── */
.gm-persona-progress-wrap { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.gm-persona-progress-track { flex: 1; height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.gm-persona-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 2px; transition: width 800ms ease-out;
}
.gm-persona-progress-pct { font-size: 0.7rem; color: var(--muted); min-width: 30px; text-align: right; }
@keyframes confettiBurst { 0% { opacity:1; transform:scale(1) translateY(0); } 100% { opacity:0; transform:scale(1.5) translateY(-30px); } }
.persona-tier-up-confetti { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); pointer-events:none; z-index:9999; font-size:48px; animation:confettiBurst 1s ease-out forwards; }

/* ── Rivalry DNA surfacing (S14) ────────────────────────────────────────── */
.rivalry-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 8px 0; padding: 8px 12px; border-radius: 6px;
  background: var(--bg-3); border-left: 3px solid var(--accent-3);
  font-size: 0.82rem;
}
.rivalry-strip.rs-heated { border-left-color: var(--accent); }
.rivalry-strip.rs-bitter { border-left-color: var(--danger); background: linear-gradient(90deg, rgba(208,92,92,0.12), var(--bg-3)); }
.rivalry-week-badge {
  background: var(--danger); color: #fff; font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.08em; padding: 2px 8px; border-radius: 3px;
  animation: rivalryPulse 2s ease-in-out infinite;
}
@keyframes rivalryPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }
.rivalry-label { font-weight: 700; color: var(--accent-strong); }
.rivalry-matchup { font-weight: 600; }
.rivalry-series, .rivalry-streak { color: var(--muted); }
.rivalry-heat-meter {
  flex: 1; min-width: 60px; max-width: 140px; height: 5px;
  background: var(--bg-2, rgba(255,255,255,0.08)); border-radius: 3px; overflow: hidden;
}
.rivalry-heat-fill {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--danger));
  transition: width 600ms ease-out;
}
.sw-rivalry-banner {
  margin-top: 6px; padding: 4px 8px; border-radius: 4px;
  background: rgba(208,92,92,0.15); font-size: 0.78rem;
  display: flex; align-items: center; gap: 8px;
}

/* ── Season Epilogue (S14) ──────────────────────────────────────────────── */
.season-epilogue { margin-top: 16px; }
.ep-divider {
  text-align: center; color: var(--accent); font-size: 0.7rem;
  letter-spacing: 0.25em; font-weight: 700; margin: 14px 0 10px;
}
.ep-champion {
  text-align: center; font-size: 1.1rem; font-weight: 800; color: var(--accent-strong);
  padding: 8px; margin-bottom: 10px; border: 1px solid var(--accent);
  border-radius: 6px; background: rgba(215,162,74,0.1);
}
.ep-arcs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ep-arc {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-radius: 5px; background: var(--bg-3); font-size: 0.82rem;
}
.ep-arc-won { border-left: 3px solid var(--accent-2); }
.ep-arc-lost { border-left: 3px solid var(--danger); opacity: 0.85; }
.ep-arc-title { flex: 1; }
.ep-arc-verdict { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.05em; }
.ep-arc-won .ep-arc-verdict { color: var(--accent-2); }
.ep-arc-lost .ep-arc-verdict { color: var(--danger); }
.ep-section-label {
  font-size: 0.68rem; letter-spacing: 0.12em; color: var(--muted);
  font-weight: 700; margin-bottom: 5px; text-transform: uppercase;
}
.ep-records { margin-bottom: 10px; }
.ep-record { font-size: 0.82rem; padding: 3px 0; }
.ep-fan { margin-bottom: 10px; }
.ep-fan-meter {
  height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden;
}
.ep-fan-fill {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--danger), var(--accent), var(--accent-2));
  transition: width 900ms ease-out;
}
.ep-fan-text { font-size: 0.75rem; color: var(--muted); margin-top: 3px; }
.ep-quote {
  margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--bg-3); border-radius: 0 6px 6px 0;
  font-style: italic; font-size: 0.88rem;
}
.ep-quote cite { display: block; margin-top: 6px; font-size: 0.72rem; color: var(--muted); font-style: normal; }

/* ── Challenge codes (S14) ──────────────────────────────────────────────── */
.challenge-code-row {
  display: flex; gap: 8px; margin-top: 10px; align-items: center;
}
.challenge-code-row input {
  flex: 1; font-size: 0.82rem; padding: 7px 10px;
  background: var(--bg-3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px; color: inherit;
}
.speedrun-rival {
  margin-top: 8px; padding: 6px 10px; border-radius: 5px;
  background: rgba(123,196,215,0.1); border-left: 3px solid var(--accent-3);
  font-size: 0.82rem;
}

/* ── Beta feedback (S14) ────────────────────────────────────────────────── */
.fm-feedback-link {
  margin-top: 8px; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.72rem; text-decoration: underline;
  opacity: 0.8;
}
.fm-feedback-link:hover { opacity: 1; color: var(--accent-3); }

/* ── Session 15 beta-readiness surfaces ─────────────────────────────────── */
#draftWarRoomPanel {
  margin: 14px 0;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.draft-war-room-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.draft-war-room-head h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}
.draft-pressure-tone {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 3px 9px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.draft-pressure-danger { color: var(--danger); border-color: var(--danger); }
.draft-pressure-warning { color: var(--warning); border-color: var(--warning); }
.draft-pressure-accent { color: var(--accent-strong); border-color: var(--accent); }
.draft-pressure-neutral { color: var(--muted); }
.draft-pressure-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.draft-pressure-chips span {
  background: var(--bg-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
}
.draft-target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.draft-target-card {
  background: var(--bg-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 0.78rem;
}
.draft-target-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--accent-strong);
}

/* Franchise Architect brand and public-site polish */
:root[data-theme="light"], body[data-theme="light"] {
  --ink: #132027;
  --ink-strong: #091116;
  --muted: #50636f;
  --bg-0: #f4f7f3;
  --bg-1: #e7eee8;
  --bg-2: #dbe7df;
  --bg-3: #c9d9d1;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: #b6c7bf;
  --line-strong: #76918a;
  --accent: #986b22;
  --accent-strong: #715016;
  --accent-2: #158466;
  --accent-3: #196f85;
  --shadow: rgba(16, 30, 38, 0.16);
}

body[data-theme="light"] .bg-layer,
html[data-theme="light"] .bg-layer {
  background:
    linear-gradient(135deg, rgba(21, 132, 102, 0.14), transparent 32%),
    linear-gradient(210deg, rgba(152, 107, 34, 0.12), transparent 34%),
    repeating-linear-gradient(120deg, rgba(16, 32, 39, 0.035) 0, rgba(16, 32, 39, 0.035) 2px, transparent 2px, transparent 22px),
    linear-gradient(155deg, #f7faf6, #e8f0eb 48%, #f3f7f3 100%);
}

.brand-lockup,
.topbar-logo-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 18px var(--shadow));
}

.brand-logo-wide {
  width: min(420px, 100%);
  height: auto;
  display: block;
  margin: 0 0 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px var(--shadow);
}

.brand-kicker.franchise-kicker {
  color: var(--accent-2);
}

.theme-toggle-btn {
  min-width: 42px;
  height: 38px;
  padding: 0 0.72rem;
  border-radius: 8px;
}

.legal-wrap {
  width: min(920px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.legal-panel {
  line-height: 1.6;
}

.footer-link-row {
  text-align: center;
  padding: 10px 0 14px;
  font-size: 11px;
  color: var(--muted);
}
.footer-link-row a { color: inherit; text-decoration: none; margin: 0 4px; }
.footer-link-row a:hover { color: var(--ink); text-decoration: underline; }

.trade-frenzy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.trade-frenzy-card {
  border: 1px solid var(--line);
  background: rgba(var(--section-wash-rgb), 0.08);
  border-radius: 8px;
  padding: 0.85rem;
}
.trade-frenzy-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }
.trade-frenzy-chip { color: var(--accent-strong); font-size: 0.72rem; font-weight: 700; }
.trade-frenzy-card button { margin-top: 0.65rem; }

.scout-reveal-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.42rem;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.04);
}
.scout-reveal-elite { color: var(--success); border-color: rgba(99, 214, 140, 0.55); }
.scout-reveal-strong { color: var(--accent-3); border-color: rgba(123, 196, 215, 0.55); }
.scout-reveal-partial { color: var(--warning); border-color: rgba(255, 183, 77, 0.55); }
.scout-reveal-blind { color: var(--danger); border-color: rgba(208, 92, 92, 0.55); }
.prospect-origin-note { margin-top: 0.45rem; color: var(--muted); }

.hof-ceremony-overlay[hidden] { display: none; }
.hof-ceremony-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 18px;
}
.hof-ceremony-card {
  width: min(760px, 100%);
  border: 1px solid rgba(247, 201, 72, 0.5);
  background: linear-gradient(135deg, var(--panel-strong), rgba(16, 24, 27, 0.98));
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 26px 80px rgba(0,0,0,0.45);
}
.hof-card-canvas { width: 100%; max-height: 360px; border-radius: 8px; border: 1px solid var(--line); background: #101820; }
.hof-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; margin-top: 0.9rem; }

.sw-field {
  margin: 10px 16px;
  height: 74px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.12) 0, rgba(255,255,255,0.12) 1px, transparent 1px, transparent 10%),
    linear-gradient(90deg, #174b2b, #20723f 50%, #174b2b);
}
.sw-field::before, .sw-field::after {
  content: "END";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.66);
  font-size: 0.62rem;
  font-weight: 800;
  writing-mode: vertical-rl;
  background: rgba(10, 24, 18, 0.55);
}
.sw-field::before { left: 0; }
.sw-field::after { right: 0; transform: rotate(180deg); }
.sw-ball {
  position: absolute;
  top: 26px;
  left: calc(var(--ball-x, 50) * 1%);
  width: 22px;
  height: 14px;
  margin-left: -11px;
  border-radius: 50%;
  background: #7a3f19;
  border: 2px solid #f7d7a1;
  box-shadow: 0 0 18px rgba(247, 201, 72, 0.7);
  transition: left 240ms ease;
}
.sw-field-meta {
  position: absolute;
  left: 44px;
  right: 44px;
  bottom: 7px;
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,0.82);
  font-size: 0.66rem;
  font-weight: 700;
}
