/* V1.5.7 palettes + multi-category projection picker */

body.v151-theme-royal-dark {
  color-scheme: dark;
  --bg: #120b22;
  --surface: #1b1230;
  --surface-2: #25183f;
  --surface-3: #332154;
  --text: #faf6ff;
  --muted: #b9a8cc;
  --line: rgba(235,220,255,.13);
  --brand: #c084fc;
  --brand-rgb: 192,132,252;
  --accent: var(--brand);
  --accent-2: #ead4ff;
  --good: #72e3ad;
  --warn: #ffd27c;
  --bad: #ff829f;
  --surface-glass: rgba(27,18,48,.94);
  --shadow: 0 18px 52px rgba(5,0,14,.4);
  --soft-shadow: 0 10px 30px rgba(5,0,14,.28);
}

body.v151-theme-crimson-dark {
  color-scheme: dark;
  --bg: #1b0b10;
  --surface: #271017;
  --surface-2: #35161f;
  --surface-3: #47202b;
  --text: #fff6f7;
  --muted: #c9a4aa;
  --line: rgba(255,224,229,.13);
  --brand: #fb7185;
  --brand-rgb: 251,113,133;
  --accent: var(--brand);
  --accent-2: #ffc7d0;
  --good: #75d8a8;
  --warn: #ffcf73;
  --bad: #ff6079;
  --surface-glass: rgba(39,16,23,.94);
  --shadow: 0 18px 52px rgba(12,0,3,.42);
  --soft-shadow: 0 10px 30px rgba(12,0,3,.3);
}

body.light.v151-theme-ocean-light {
  color-scheme: light;
  --bg: #e7f2f4;
  --surface: #f8fcfc;
  --surface-2: #edf7f8;
  --surface-3: #dcecef;
  --text: #17333b;
  --muted: #5f7880;
  --line: rgba(23,51,59,.12);
  --brand: #167c91;
  --brand-rgb: 22,124,145;
  --accent: var(--brand);
  --accent-2: #126476;
  --good: #2d7b61;
  --warn: #936616;
  --bad: #a64053;
  --surface-glass: rgba(248,252,252,.95);
  --shadow: 0 14px 38px rgba(25,69,78,.1);
  --soft-shadow: 0 8px 24px rgba(25,69,78,.08);
}

body.light.v151-theme-rose-light {
  color-scheme: light;
  --bg: #f5e9ec;
  --surface: #fff9fa;
  --surface-2: #faeef1;
  --surface-3: #efdde2;
  --text: #3e252d;
  --muted: #80636c;
  --line: rgba(62,37,45,.12);
  --brand: #a94766;
  --brand-rgb: 169,71,102;
  --accent: var(--brand);
  --accent-2: #8c3853;
  --good: #3f765b;
  --warn: #95651f;
  --bad: #ad405d;
  --surface-glass: rgba(255,249,250,.95);
  --shadow: 0 14px 38px rgba(89,44,58,.1);
  --soft-shadow: 0 8px 24px rgba(89,44,58,.08);
}

body.v151-theme-royal-dark,
body.v151-theme-crimson-dark,
body.light.v151-theme-ocean-light,
body.light.v151-theme-rose-light {
  background:
    radial-gradient(circle at 50% -16%, rgba(var(--league-rgb),.09), transparent 34rem),
    var(--bg);
  background-attachment: fixed;
}

body[data-league="cfb"] {
  --accent: var(--brand);
  --accent-2: #efffaf;
  --sport-accent: #f2b544;
  --league-rgb: 242,181,68;
}
body.light[data-league="cfb"] { --league-rgb: 166,113,35; }
body[data-league="cfb"] .home-hero::before { background-image: url("assets/sports/cfb.svg"); }

.v150-aesthetic .league-switcher { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Restore the floating command shell removed by the V1.5 mobile rebuild. */
.v150-aesthetic .floating-command-shell {
  position: sticky;
  top: 0;
  z-index: 140;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}
body.light.v150-aesthetic .floating-command-shell {
  background: color-mix(in srgb, var(--bg) 95%, transparent);
}

.v157-category-control {
  position: relative;
  display: grid !important;
  align-content: start;
  overflow: visible !important;
}
.v157-category-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.v157-category-heading strong { font: inherit; color: var(--text); }
.v157-category-heading small { color: var(--muted); font-size: .64rem; font-weight: 700; }
.v157-category-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.v157-category-picker { position: relative; min-width: 0; }
.v157-category-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface-2);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.v157-category-trigger:hover,
.v157-category-picker.open .v157-category-trigger {
  border-color: color-mix(in srgb, rgb(var(--league-rgb)) 38%, var(--line));
  background: color-mix(in srgb, rgb(var(--league-rgb)) 7%, var(--surface-2));
}
.v157-category-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v157-category-trigger b { transition: transform .16s ease; }
.v157-category-picker.open .v157-category-trigger b { transform: rotate(180deg); }
.v157-category-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 260px);
  max-height: min(390px, 55vh);
  display: none;
  gap: 4px;
  padding: 7px;
  overflow: auto;
  border: 1px solid color-mix(in srgb, rgb(var(--league-rgb)) 28%, var(--line));
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.v157-category-picker.open .v157-category-menu,
.v157-category-menu.open { display: grid; }
.v157-category-menu-head {
  position: sticky;
  z-index: 2;
  top: -7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -1px -1px 4px;
  padding: 8px 8px 9px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.v157-category-menu-head > span { display: grid; gap: 2px; }
.v157-category-menu-head strong { color: var(--text); font-size: .78rem; }
.v157-category-menu-head small { color: var(--muted); font-size: .63rem; }
.v157-category-menu-head button {
  min-width: 64px;
  min-height: 36px;
  padding: 7px 12px;
  border: 0;
  border-radius: 10px;
  color: #0a0c09;
  background: var(--brand);
  font: inherit;
  font-size: .72rem;
  font-weight: 950;
  cursor: pointer;
}
.v157-category-option {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0 9px !important;
  align-items: center;
  min-height: 47px;
  padding: 7px 9px !important;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}
.v157-category-option:hover { background: var(--surface-2); }
.v157-category-option:has(input:checked) {
  border-color: color-mix(in srgb, rgb(var(--league-rgb)) 30%, var(--line));
  background: color-mix(in srgb, rgb(var(--league-rgb)) 9%, var(--surface-2));
}
.v157-category-option input { grid-row: 1 / span 2; width: 17px; height: 17px; accent-color: rgb(var(--league-rgb)); }
.v157-category-option span { color: var(--text); font-size: .78rem; font-weight: 850; }
.v157-category-option small { color: var(--muted); font-size: .64rem; }

.v157-football-sample {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--warn) 34%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--warn) 8%, var(--surface-2));
}
.v157-football-sample span { color: var(--warn); font-size: .62rem; font-weight: 950; letter-spacing: .08em; }
.v157-football-sample small { color: var(--muted); font-size: .66rem; text-align: right; }

@media (max-width: 720px) {
  .v150-aesthetic .floating-command-shell {
    position: sticky;
    top: 0;
    z-index: 140;
    margin: 0 -2px 10px;
    padding: 0 2px 7px;
    background: color-mix(in srgb, var(--bg) 95%, transparent);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
  }
  .v157-category-menu {
    position: fixed;
    z-index: 220;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    top: 50%;
    bottom: auto;
    width: min(420px, calc(100% - 24px));
    max-height: min(360px, 48vh);
    margin-inline: auto;
    padding: 8px;
    border-radius: 18px;
    transform: translateY(-50%);
  }
  .v157-category-menu-head { top: -8px; }
  .v157-category-option { min-height: 46px; }
}


/* V1.5.11 Games archive status filter */
.v150-aesthetic #gamesPanel .controls-card.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .v150-aesthetic #gamesPanel .controls-card.compact { grid-template-columns: 1fr; }
}
