/* FF L app themes. Loaded after style.css. The theme is set on <html data-theme="..."> by the small script in
   index.html (from the last theme this browser used) and again by app.js once /api/me says which theme to use.
   Who may use which theme is decided by src/themes.js. Locker rooms keep their own artwork in every theme. */

/* ---------- Shared "locker room" polish (every theme) ---------- */
:root { --app-bg: none; --font-display: Inter, system-ui, sans-serif; --card-shadow: 0 10px 28px rgba(0,0,0,.28); --glow: rgba(47,191,113,.35);
  --hi: rgba(255,255,255,.05); --scrim: rgba(3,8,6,.7); color-scheme: dark; }
html { background: var(--bg); }
body { background: var(--app-bg), var(--bg); background-attachment: fixed; min-height: 100vh; }
body.mkt-page { background: #000; }
.topbar { background: var(--topbar); box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(0,0,0,.25); border-bottom: 0; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--turf) 50%, transparent); opacity: .55; pointer-events: none; }
.brand { font-family: var(--font-display); letter-spacing: .01em; }
.card, .tile, .menu, .modal { box-shadow: var(--card-shadow), inset 0 1px 0 var(--hi); }
.card { border-radius: 14px; background-image: linear-gradient(180deg, var(--hi), transparent 140px); }
main h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.card > h2:first-child, .card h2 { font-family: var(--font-display); }
button:not([class]), button.small:not(.ghost):not(.ph-x):not(.report) {
  background-image: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 60%); box-shadow: 0 3px 12px var(--glow); }
button:not(:disabled):hover { filter: brightness(1.08); }
input:focus, select:focus, textarea:focus, .ta:focus { outline: none; border-color: var(--turf); box-shadow: 0 0 0 3px var(--glow); }
.tabs { border-bottom-color: var(--line); gap: 2px; }
.tabs a { border-radius: 8px 8px 0 0; transition: color .15s, background .15s; }
.tabs a:hover { color: var(--text); background: var(--hi); }
.tabs a.on { color: var(--text); text-shadow: 0 0 14px var(--glow); box-shadow: inset 0 -2px 0 var(--turf); }
.league-item { transition: border-color .15s, transform .15s; } .league-item:hover { border-color: var(--turf-dim); transform: translateY(-1px); }
.modal-back { background: var(--scrim); }
.toast { box-shadow: var(--card-shadow); }

/* ---------- Football field (default) ---------- */
:root, [data-theme="field"] {
  --bg: #0b1711; --panel: rgba(18,32,25,.92); --panel2: #1a2b23; --line: #28402f; --line2: #1d3027; --hover: rgba(47,191,113,.07);
  --topbar: rgba(8,15,11,.97); --sel: #17331f;
  --app-bg: radial-gradient(ellipse 90% 55% at 50% -12%, rgba(255,246,214,.11), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 calc(10vw - 2px), rgba(255,255,255,.045) calc(10vw - 2px) 10vw),
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 5vw, transparent 5vw 10vw),
    linear-gradient(180deg, #0d1c14, #0b1711 40%, #0e2016);
}

/* ---------- Dark ---------- */
[data-theme="dark"] {
  --bg: #0e1013; --panel: #16191d; --panel2: #1d2126; --line: #2a2f36; --line2: #22262c; --hover: #1b1f24; --text: #e9ecef; --muted: #959ca6;
  --topbar: #0b0d10; --sel: #1c2a22; --faint: #59616b; --app-bg: none; --card-shadow: 0 6px 18px rgba(0,0,0,.3);
}

/* ---------- Light ---------- */
[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2ef; --panel: #ffffff; --panel2: #f4f7f5; --line: #d6dfd9; --line2: #e6ece8; --hover: #eef5f0; --text: #15221b; --muted: #5b6b62;
  --turf: #158a4f; --turf-dim: #8cc9a6; --gold: #9a6b00; --red: #c23a3a; --blue: #2766a8; --on-accent: #ffffff;
  --topbar: rgba(255,255,255,.97); --sel: #def1e5; --faint: #9aa8a0; --hi: rgba(255,255,255,.6); --glow: rgba(21,138,79,.22);
  --card-shadow: 0 2px 10px rgba(20,40,30,.08); --scrim: rgba(20,30,25,.45);
  --app-bg: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(21,138,79,.08), transparent 70%);
}
[data-theme="light"] main h1, [data-theme="marble"] main h1 { text-shadow: none; }[data-theme="light"] .topbar, [data-theme="marble"] .topbar { box-shadow: 0 1px 0 var(--line); }[data-theme="light"] .pill.live, [data-theme="light"] .rpill.bad, [data-theme="light"] .kind.red, [data-theme="marble"] .pill.live, [data-theme="marble"] .rpill.bad, [data-theme="marble"] .kind.red { background: #fde8e8; color: #a32020; border-color: #f2b8b8; }[data-theme="light"] .ann, [data-theme="light"] .counter-note, [data-theme="light"] .kind.blue, [data-theme="marble"] .ann, [data-theme="marble"] .counter-note, [data-theme="marble"] .kind.blue { background: #e7f0fb; border-color: #b9d0ec; color: var(--text); }[data-theme="light"] .ann.promo, [data-theme="light"] .todo, [data-theme="light"] .warnbox, [data-theme="light"] .autostart, [data-theme="light"] .pin-nudge, [data-theme="light"] .pill.wv, [data-theme="marble"] .ann.promo, [data-theme="marble"] .todo, [data-theme="marble"] .warnbox, [data-theme="marble"] .autostart, [data-theme="marble"] .pin-nudge, [data-theme="marble"] .pill.wv { background: #fdf5dc; border-color: #ecd48a; color: var(--text); }[data-theme="light"] .ann.alert, [data-theme="marble"] .ann.alert { background: #fde8e8; border-color: #f2b8b8; }[data-theme="light"] .summon, [data-theme="marble"] .summon { background: #e6f6f3; border-color: #9fd8cf; }[data-theme="light"] .toast, [data-theme="marble"] .toast { background: #fff0f0; color: #8a1f1f; border-color: #f2b8b8; }[data-theme="light"] .toast.ok, [data-theme="marble"] .toast.ok { background: #e6f6ec; color: #135c35; border-color: #9fd3b4; }[data-theme="light"] .ff-badge.big, [data-theme="marble"] .ff-badge.big { background: #e4effa; color: #1f4f80; border-color: #b9d0ec; }[data-theme="light"] .pos, [data-theme="marble"] .pos { color: #fff; }[data-theme="light"] .cadp, [data-theme="marble"] .cadp { color: #d02c2c; }[data-theme="light"] .badge.hot, [data-theme="marble"] .badge.hot { color: #b4521a; }[data-theme="light"] .badge.bust, [data-theme="marble"] .badge.bust { color: #4b5b6a; }[data-theme="light"] .msg .a, [data-theme="marble"] .msg .a { color: var(--turf); }[data-theme="light"] .menu-item.danger, [data-theme="marble"] .menu-item.danger { color: #c23a3a; }

/* ---------- 80s Neon ---------- */
[data-theme="neon"] {
  --bg: #07051a; --panel: rgba(17,12,46,.9); --panel2: #1a1347; --line: #3b2a80; --line2: #251b5c; --hover: rgba(255,43,214,.08);
  --text: #f3ecff; --muted: #a99bd8; --faint: #6a5ca0; --turf: #ff2bd6; --turf-dim: #8a2bb8; --gold: #ffd319; --red: #ff4f6d; --blue: #22e4ff;
  --on-accent: #1a0020; --topbar: rgba(9,6,30,.96); --sel: #2c1760; --glow: rgba(255,43,214,.45); --hi: rgba(34,228,255,.08);
  --font-display: Bungee, Inter, system-ui, sans-serif; --card-shadow: 0 0 0 1px rgba(255,43,214,.12), 0 10px 30px rgba(0,0,0,.5);
  --app-bg: linear-gradient(180deg, transparent 62%, rgba(255,43,214,.18) 62.2%, transparent 62.6%),
    radial-gradient(circle at 50% 64%, rgba(255,120,60,.35), rgba(255,43,214,.18) 14%, transparent 30%),
    linear-gradient(180deg, transparent 63%, rgba(34,228,255,.05) 63%),
    repeating-linear-gradient(180deg, transparent 0 34px, rgba(255,43,214,.14) 34px 35px),
    repeating-linear-gradient(90deg, transparent 0 60px, rgba(34,228,255,.10) 60px 61px),
    linear-gradient(180deg, #07051a 0%, #0f0a33 55%, #1b0a3a 100%);
}
[data-theme="neon"] main h1 { color: #fff; text-shadow: 0 0 6px #ff2bd6, 0 0 18px rgba(255,43,214,.7), 0 0 40px rgba(34,228,255,.35); font-weight: 400; letter-spacing: .02em; }
[data-theme="neon"] .card h2 { font-weight: 400; color: #e6fbff; text-shadow: 0 0 10px rgba(34,228,255,.5); }
[data-theme="neon"] .tabs a.on { color: #fff; text-shadow: 0 0 10px #ff2bd6; }
[data-theme="neon"] .code, [data-theme="neon"] .msg .a { text-shadow: 0 0 8px currentColor; }
[data-theme="neon"] .msg .a { color: var(--blue); }
[data-theme="neon"] .topbar::after { background: linear-gradient(90deg, #22e4ff, #ff2bd6, #ffd319); opacity: .9; height: 2px; }

/* ---------- Team colors (--c1 / --c2 and the accent are set by app.js) ---------- */
[data-theme="team"] {
  --bg: #0c0f14; --panel: rgba(20,24,31,.93); --panel2: #1d222b; --line: #2d3440; --line2: #232933; --hover: rgba(255,255,255,.04);
  --text: #eef1f5; --muted: #9aa3b0; --faint: #5d6672; --topbar: rgba(10,12,16,.97); --sel: rgba(255,255,255,.07);
  --app-bg: radial-gradient(ellipse 70% 60% at 0% 0%, color-mix(in srgb, var(--c1) 40%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, color-mix(in srgb, var(--c2) 22%, transparent), transparent 70%),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,.015) 22px 44px);
}
[data-theme="team"] .topbar { background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 55%, #0a0c10), #0a0c10 70%); }
[data-theme="team"] .topbar::after { background: linear-gradient(90deg, var(--c1), var(--c2)); opacity: 1; height: 3px; }

/* ---------- Chalkboard playbook ---------- */
[data-theme="chalk"] {
  --bg: #1f3a2d; --panel: rgba(30,56,43,.9); --panel2: rgba(0,0,0,.2); --line: rgba(240,240,225,.28); --line2: rgba(240,240,225,.13);
  --hover: rgba(255,255,255,.05); --text: #f4f3ea; --muted: #c4cdbf; --faint: #8f9c8c; --turf: #f5e27a; --turf-dim: #a99a4b; --gold: #ffd27a;
  --red: #ff9a8a; --blue: #a9d8ff; --on-accent: #23301f; --topbar: rgba(22,42,32,.97); --sel: rgba(245,226,122,.12); --glow: rgba(245,226,122,.25);
  --hi: rgba(255,255,255,.06); --card-shadow: none; --font-display: 'Permanent Marker', 'Comic Sans MS', cursive;
  --chalk-marks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='420' viewBox='0 0 520 420' fill='none' stroke='%23f4f3ea' stroke-width='3' stroke-linecap='round' opacity='.11'%3E%3Cpath d='M40 60l26 26M66 60L40 86'/%3E%3Ccircle cx='150' cy='72' r='15'/%3E%3Cpath d='M150 90c10 50 50 70 110 60' stroke-dasharray='8 8'/%3E%3Cpath d='M252 140l12 10-15 6'/%3E%3Cpath d='M330 50l24 24M354 50l-24 24'/%3E%3Ccircle cx='430' cy='70' r='15'/%3E%3Cpath d='M430 88v80c0 30 20 40 50 40'/%3E%3Cpath d='M470 198l12 10-14 7'/%3E%3Ccircle cx='80' cy='250' r='15'/%3E%3Cpath d='M80 268c0 40 40 70 120 70'/%3E%3Cpath d='M190 330l12 8-12 9'/%3E%3Cpath d='M300 250l26 26M326 250l-26 26'/%3E%3Cpath d='M313 280c-20 40-10 80 30 100' stroke-dasharray='8 8'/%3E%3Ccircle cx='420' cy='300' r='15'/%3E%3Cpath d='M30 400h460' stroke-dasharray='2 14'/%3E%3C/svg%3E");
  --app-bg: var(--chalk-marks), radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.07), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(255,255,255,.05), transparent 55%), linear-gradient(180deg, #23412f, #1b3427);
}
[data-theme="chalk"][data-variant="black"] { --bg: #1b1c1e; --topbar: rgba(20,21,23,.97); --panel: rgba(34,35,38,.9); --panel2: rgba(255,255,255,.05);
  --app-bg: var(--chalk-marks), radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.07), transparent 60%), linear-gradient(180deg, #222326, #18191b); }
[data-theme="chalk"] body { background-repeat: repeat, no-repeat, no-repeat, no-repeat; background-attachment: fixed; }
[data-theme="chalk"] .card, [data-theme="chalk"] .tile { border: 2px solid var(--line); border-radius: 6px 14px 8px 12px; }
[data-theme="chalk"] main h1, [data-theme="chalk"] .card h2, [data-theme="chalk"] .brand { font-weight: 400; letter-spacing: .02em; text-shadow: 0 0 1px rgba(255,255,255,.6); }
[data-theme="chalk"] main h1 { font-size: 30px; }
[data-theme="chalk"] .tabs a.on { box-shadow: inset 0 -3px 0 var(--turf); }
[data-theme="chalk"] button:not(.ghost) { border-radius: 4px 10px 6px 9px; }
[data-theme="chalk"] .topbar::after { background: repeating-linear-gradient(90deg, var(--line) 0 14px, transparent 14px 22px); opacity: 1; }

/* ---------- Stadium night ---------- */
[data-theme="stadium"] {
  --bg: #050912; --panel: rgba(13,20,34,.9); --panel2: #152036; --line: #263452; --line2: #1b2741; --hover: rgba(160,200,255,.05);
  --text: #eef3ff; --muted: #97a6c4; --faint: #56658a; --turf: #3fe08c; --turf-dim: #1f8a55; --gold: #ffd257; --blue: #7cc4ff;
  --topbar: rgba(5,9,18,.97); --sel: #14304a; --glow: rgba(63,224,140,.35); --hi: rgba(200,220,255,.06);
  --app-bg: radial-gradient(circle at 12% -4%, rgba(255,250,225,.55), rgba(255,250,225,.12) 6%, transparent 16%),
    radial-gradient(circle at 88% -4%, rgba(255,250,225,.55), rgba(255,250,225,.12) 6%, transparent 16%),
    conic-gradient(from 150deg at 12% -4%, transparent 0deg, rgba(255,248,215,.09) 10deg, rgba(255,248,215,.14) 22deg, transparent 34deg),
    conic-gradient(from 176deg at 88% -4%, transparent 0deg, rgba(255,248,215,.14) 12deg, rgba(255,248,215,.09) 24deg, transparent 34deg),
    radial-gradient(ellipse 120% 40% at 50% 112%, rgba(40,160,90,.45), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.0) 0 7vw, rgba(255,255,255,.03) 7vw 14vw),
    linear-gradient(180deg, #03060d 0%, #071022 55%, #0a2418 100%);
}
[data-theme="stadium"] main h1 { text-shadow: 0 0 22px rgba(255,248,215,.25), 0 2px 10px rgba(0,0,0,.6); }

/* ---------- Seasonal (data-theme="season" data-season="...") ---------- */
[data-season="halloween"] {
  --bg: #0f0818; --panel: rgba(28,14,40,.92); --panel2: #2a1540; --line: #4a2a63; --line2: #331c48; --hover: rgba(255,122,26,.06);
  --text: #fbefff; --muted: #c0a6d6; --faint: #7a6191; --turf: #ff7a1a; --turf-dim: #a14d10; --gold: #ffb020; --on-accent: #1b0a00;
  --topbar: rgba(14,7,22,.97); --sel: #3a1d24; --glow: rgba(255,122,26,.4); --font-display: Creepster, Inter, cursive;
  --app-bg: radial-gradient(circle at 85% 12%, #fff3c4 0, #ffd36b 3.5%, rgba(255,160,40,.25) 5%, transparent 14%),
    radial-gradient(ellipse 100% 40% at 50% 115%, rgba(255,122,26,.25), transparent 70%), linear-gradient(180deg, #0c0614, #1a0c2a);
}
[data-season="halloween"] main h1 { font-weight: 400; letter-spacing: .04em; color: #ff9a3d; }
[data-season="turkey"] {
  --bg: #170f0a; --panel: rgba(36,24,16,.92); --panel2: #33231a; --line: #5a3d25; --line2: #3d2a1c; --hover: rgba(232,138,46,.06);
  --text: #fff4e6; --muted: #d2b394; --faint: #8a6d52; --turf: #e88a2e; --turf-dim: #9a5615; --gold: #f6c453; --red: #e0553a; --on-accent: #1f1006;
  --topbar: rgba(22,14,9,.97); --sel: #45291a; --glow: rgba(232,138,46,.38);
  --app-bg: radial-gradient(ellipse 60% 40% at 10% 0%, rgba(214,90,40,.28), transparent 70%), radial-gradient(ellipse 60% 40% at 90% 100%, rgba(246,196,83,.18), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 calc(10vw - 2px), rgba(255,230,200,.035) calc(10vw - 2px) 10vw), linear-gradient(180deg, #1a110b, #140d08);
}
[data-season="holiday"] {
  --bg: #08140f; --panel: rgba(14,32,24,.92); --panel2: #173126; --line: #2c4d3d; --line2: #1e3a2e; --hover: rgba(226,59,59,.06);
  --text: #f4fbf6; --muted: #a9c6b5; --faint: #5f7d6c; --turf: #e23b3b; --turf-dim: #8c2020; --gold: #ffd257; --on-accent: #ffffff;
  --topbar: rgba(7,17,12,.97); --sel: #2a2020; --glow: rgba(226,59,59,.4);
  --app-bg: radial-gradient(circle, rgba(255,255,255,.55) 0 1.2px, transparent 1.6px) 0 0 / 46px 46px,
    radial-gradient(circle, rgba(255,255,255,.35) 0 1px, transparent 1.4px) 23px 17px / 46px 46px,
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(255,215,140,.12), transparent 70%), linear-gradient(180deg, #0a1a12, #07110c);
}
[data-season="holiday"] .topbar::after { background: repeating-linear-gradient(90deg, #e23b3b 0 16px, #fff 16px 32px, #2fbf71 32px 48px, #fff 48px 64px); opacity: .9; height: 3px; }
[data-season="playoffs"] {
  --bg: #0a0907; --panel: rgba(22,19,12,.93); --panel2: #241f13; --line: #4a3d1c; --line2: #2e2715; --hover: rgba(242,193,78,.06);
  --text: #fff9ea; --muted: #cbbd95; --faint: #7d724f; --turf: #f2c14e; --turf-dim: #8a6a1c; --gold: #ffe08a; --on-accent: #1a1206;
  --topbar: rgba(10,9,6,.97); --sel: #3a2f12; --glow: rgba(242,193,78,.4);
  --app-bg: radial-gradient(circle, rgba(242,193,78,.5) 0 1.5px, transparent 2px) 0 0 / 70px 70px,
    radial-gradient(circle, rgba(255,255,255,.35) 0 1px, transparent 1.5px) 35px 22px / 70px 70px,
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(242,193,78,.18), transparent 70%), linear-gradient(180deg, #0d0b07, #080705);
}
[data-season="playoffs"] main h1 { background: linear-gradient(180deg, #fff3c4, #f2c14e 55%, #b8861c); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Elite themes: each comes with its Elite locker room (src/themes.js) ---------- */
/* White Marble & Gold (light) and Black Marble & Gold (dark): marble from public/themes/, polished gold everywhere. */
[data-theme="marble"], [data-theme="onyx"] {
  --gold-grad: linear-gradient(180deg, #fff3c0 0%, #f2cd62 28%, #c8962e 55%, #9a6b16 78%, #e7c25c 100%);
  --gold-line: linear-gradient(90deg, transparent, #c8962e 15%, #fff1b8 50%, #c8962e 85%, transparent);
  --font-display: Cinzel, Georgia, 'Times New Roman', serif;
}
[data-theme="marble"] {
  color-scheme: light;
  --bg: #f3f0e9; --panel: rgba(255,255,253,.9); --panel2: rgba(250,247,240,.95); --line: #e2d3a8; --line2: #ece3c9; --hover: rgba(200,150,46,.08);
  --text: #1e1a12; --muted: #6f6650; --faint: #a89e86; --turf: #b8862a; --turf-dim: #dcc285; --gold: #a8761c; --red: #b8322a; --blue: #2a5f9a;
  --on-accent: #2a1c00; --topbar: rgba(255,255,252,.96); --sel: #f6ecd2; --glow: rgba(200,150,46,.28); --hi: rgba(255,255,255,.8);
  --card-shadow: 0 2px 4px rgba(120,90,30,.06), 0 12px 30px rgba(120,90,30,.10); --scrim: rgba(40,32,18,.45);
  --app-bg: radial-gradient(ellipse 90% 50% at 50% -10%, rgba(255,236,170,.35), transparent 70%), url('/themes/marble-white.jpg') center / 1200px auto;
}
[data-theme="onyx"] {
  --bg: #0b0b0d; --panel: rgba(16,15,18,.9); --panel2: rgba(26,24,28,.95); --line: #4b3d1d; --line2: #2c2618; --hover: rgba(242,205,98,.06);
  --text: #f7f1e1; --muted: #bfb294; --faint: #7a7058; --turf: #e2b84f; --turf-dim: #8a6a1c; --gold: #f2cd62; --red: #e0605a; --blue: #8fb8e6;
  --on-accent: #1e1400; --topbar: rgba(8,8,10,.96); --sel: #2a2312; --glow: rgba(242,205,98,.3); --hi: rgba(255,240,200,.05);
  --card-shadow: 0 0 0 1px rgba(242,205,98,.10), 0 14px 34px rgba(0,0,0,.6);
  --app-bg: radial-gradient(ellipse 90% 50% at 50% -10%, rgba(242,205,98,.12), transparent 70%), url('/themes/marble-black.jpg') center / 1200px auto;
}
:is([data-theme="marble"], [data-theme="onyx"]) .card, :is([data-theme="marble"], [data-theme="onyx"]) .tile { border: 1px solid var(--line); position: relative; }
:is([data-theme="marble"], [data-theme="onyx"]) .card::before { content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 2px; background: var(--gold-line); border-radius: 2px; pointer-events: none; }
:is([data-theme="marble"], [data-theme="onyx"]) .brand { color: var(--gold); text-shadow: none; font-weight: 700; letter-spacing: .04em; }
:is([data-theme="marble"], [data-theme="onyx"]) main h1 {
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; font-weight: 700; letter-spacing: .04em; }
[data-theme="marble"] main h1 { filter: drop-shadow(0 1px 0 rgba(120,80,10,.35)); }
[data-theme="onyx"] main h1 { filter: drop-shadow(0 0 14px rgba(242,205,98,.28)); }
:is([data-theme="marble"], [data-theme="onyx"]) .card h2 { font-weight: 700; letter-spacing: .05em; color: var(--gold); }
:is([data-theme="marble"], [data-theme="onyx"]) button:not(.ghost):not(.theme-opt):not(.team-chip):not(.ad-x):not(.mkt-btn):not(.report):not(.ph-x) {
  background: var(--gold-grad); color: #2a1c00; box-shadow: 0 2px 0 #7a5410, 0 4px 14px rgba(200,150,46,.35), inset 0 1px 0 rgba(255,255,255,.6); text-shadow: 0 1px 0 rgba(255,240,190,.6); }
:is([data-theme="marble"], [data-theme="onyx"]) .topbar::after { background: var(--gold-line); opacity: 1; height: 2px; }
:is([data-theme="marble"], [data-theme="onyx"]) .tabs a.on { box-shadow: inset 0 -2px 0 var(--turf); text-shadow: none; color: var(--gold); }
:is([data-theme="marble"], [data-theme="onyx"]) .card:hover, :is([data-theme="marble"], [data-theme="onyx"]) .league-item:hover { border-color: #d6ad4a; }
/* A slow shine that runs across the gold headings. */
@media (prefers-reduced-motion: no-preference) {
  :is([data-theme="marble"], [data-theme="onyx"]) main h1 { background-size: 100% 100%, 300% 100%;
    background-image: var(--gold-grad), linear-gradient(110deg, transparent 40%, rgba(255,255,255,.9) 50%, transparent 60%);
    animation: gold-shine 6s ease-in-out infinite; }
}
@keyframes gold-shine { 0%, 60% { background-position: 0 0, 120% 0; } 100% { background-position: 0 0, -120% 0; } }

/* Retrowave: the neon locker room behind a chrome-and-neon page, with a sunset grid on the floor. */
[data-theme="retrowave"] {
  --bg: #0a0416; --panel: rgba(18,8,36,.82); --panel2: rgba(30,12,58,.9); --line: #5b2a8c; --line2: #2f1652; --hover: rgba(255,60,200,.08);
  --text: #f6ecff; --muted: #c3a6e6; --faint: #7d62a6; --turf: #ff3cc8; --turf-dim: #8c1f78; --gold: #ffd36e; --red: #ff5577; --blue: #3fe6ff;
  --on-accent: #1a0016; --topbar: rgba(10,4,22,.9); --sel: #2d1050; --glow: rgba(255,60,200,.45); --hi: rgba(63,230,255,.07);
  --font-display: Orbitron, Bungee, Inter, sans-serif; --card-shadow: 0 0 0 1px rgba(63,230,255,.18), 0 0 24px rgba(255,60,200,.14), 0 14px 34px rgba(0,0,0,.55);
  --app-bg: linear-gradient(180deg, rgba(10,4,22,.78), rgba(10,4,22,.55) 45%, rgba(10,4,22,.85)),
    url('/stadiums/elite-retrowave.jpg') center / cover no-repeat;
}
[data-theme="retrowave"] body::before { content: ''; position: fixed; left: -50%; right: -50%; bottom: 0; height: 38vh; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(63,230,255,.45) 0 1px, transparent 1px 70px), repeating-linear-gradient(0deg, rgba(255,60,200,.5) 0 1px, transparent 1px 44px);
  transform: perspective(300px) rotateX(62deg); transform-origin: bottom; mask-image: linear-gradient(0deg, #000 10%, transparent 90%); -webkit-mask-image: linear-gradient(0deg, #000 10%, transparent 90%); }
@media (prefers-reduced-motion: no-preference) { [data-theme="retrowave"] body::before { animation: grid-run 1.6s linear infinite; } }
@keyframes grid-run { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 0 44px; } }
[data-theme="retrowave"] main, [data-theme="retrowave"] .sitefoot { position: relative; z-index: 1; }
[data-theme="retrowave"] main h1 { font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #d8e6ff 42%, #6b4bd1 50%, #ff8ad8 62%, #ffd0f0 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(255,60,200,.55)) drop-shadow(0 0 24px rgba(63,230,255,.25)); text-shadow: none; }
[data-theme="retrowave"] .card { border: 1px solid rgba(63,230,255,.28); backdrop-filter: blur(6px); }
[data-theme="retrowave"] .card h2 { color: #3fe6ff; text-shadow: 0 0 10px rgba(63,230,255,.6); letter-spacing: .04em; }
[data-theme="retrowave"] .topbar { backdrop-filter: blur(8px); }
[data-theme="retrowave"] .topbar::after { background: linear-gradient(90deg, #3fe6ff, #ff3cc8, #ffd36e); opacity: 1; height: 2px; box-shadow: 0 0 12px #ff3cc8; }
[data-theme="retrowave"] button:not(.ghost):not(.theme-opt):not(.team-chip):not(.ad-x):not(.mkt-btn) { background: linear-gradient(90deg, #ff3cc8, #8a4bff); color: #fff; box-shadow: 0 0 16px rgba(255,60,200,.55); }
[data-theme="retrowave"] .tabs a.on { color: #fff; text-shadow: 0 0 10px #ff3cc8, 0 0 20px #3fe6ff; box-shadow: inset 0 -2px 0 #3fe6ff; }
[data-theme="retrowave"] .brand { text-shadow: 0 0 10px #ff3cc8; }

/* Zombie Locker: the abandoned locker room, flickering light, toxic slime dripping off the top bar, and a hand that
   claws its way up now and then. Gross, but readable. */
[data-theme="zombie"] {
  --bg: #070806; --panel: rgba(16,18,13,.88); --panel2: rgba(26,28,20,.92); --line: #3b4129; --line2: #23271a; --hover: rgba(123,214,58,.06);
  --text: #e4e8d6; --muted: #a2aa88; --faint: #68704f; --turf: #7bd63a; --turf-dim: #3f7a17; --gold: #d9c36a; --red: #c3161f; --blue: #8fb0a0;
  --on-accent: #0c1404; --topbar: rgba(8,9,6,.95); --sel: #1f2a12; --glow: rgba(123,214,58,.35); --hi: rgba(200,255,150,.03);
  --font-display: Creepster, Inter, cursive; --card-shadow: 0 10px 30px rgba(0,0,0,.7), inset 0 0 40px rgba(0,0,0,.45);
  --app-bg: radial-gradient(ellipse 50% 40% at 66% 6%, rgba(220,255,200,.10), transparent 70%), linear-gradient(180deg, rgba(5,6,4,.72), rgba(5,6,4,.62) 50%, rgba(5,6,4,.9)),
    url('/stadiums/elite-zombie.jpg') center / cover no-repeat;
}
[data-theme="zombie"] main h1, [data-theme="zombie"] .card h2, [data-theme="zombie"] .brand { font-weight: 400; letter-spacing: .05em; }
[data-theme="zombie"] main h1 { color: #9be35a; text-shadow: 0 0 2px #000, 0 3px 0 #1d3a08, 0 0 18px rgba(123,214,58,.45); }
[data-theme="zombie"] .card h2 { color: #b7d98f; }
[data-theme="zombie"] .card, [data-theme="zombie"] .tile { border: 1px solid #3b4129; border-radius: 10px 16px 9px 14px; }
[data-theme="zombie"] button:not(.ghost):not(.theme-opt):not(.team-chip):not(.ad-x):not(.mkt-btn) { background: linear-gradient(180deg, #9be35a, #5aa81f 60%, #3f7a17); color: #0c1404;
  border-radius: 9px 12px 7px 11px; box-shadow: 0 3px 0 #23470b, 0 0 14px rgba(123,214,58,.35); }
[data-theme="zombie"] .tabs a.on { color: #9be35a; box-shadow: inset 0 -3px 0 #7bd63a; text-shadow: 0 0 10px rgba(123,214,58,.5); }
/* Slime dripping off the bottom of the top bar. */
[data-theme="zombie"] .topbar::after { height: 22px; bottom: -21px; opacity: 1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='22' viewBox='0 0 240 22'%3E%3Cpath fill='%237bd63a' d='M0 0h240v4c-6 0-8 3-9 8s-3 7-5 7-4-3-4-8-2-7-6-7c-5 0-6 2-7 5s-2 4-4 4-3-2-3-5-3-4-9-4c-8 0-9 3-10 10s-3 9-5 9-4-3-4-10-4-9-12-9c-6 0-8 2-8 5s-1 4-3 4-3-2-3-5-4-4-12-4-9 2-10 6-2 6-4 6-3-2-3-6-3-6-10-6c-6 0-7 3-8 9s-2 8-4 8-3-3-3-8-4-9-12-9-8 2-9 5-2 4-3 4-3-2-3-5-3-4-9-4c-5 0-7 2-7 6s-2 6-4 6-4-2-4-6-3-6-6-6H0z'/%3E%3C/svg%3E") 0 0 / 240px 22px repeat-x;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
@media (prefers-reduced-motion: no-preference) {
  [data-theme="zombie"] .topbar::after { animation: ooze 9s ease-in-out infinite alternate; }
  /* The broken light flickers. */
  [data-theme="zombie"] body::before { content: ''; position: fixed; inset: 0; z-index: 4; pointer-events: none; background: rgba(0,0,0,.55); opacity: 0; animation: flicker 7s infinite; }
  /* A zombie hand claws up from the bottom corner every so often. */
  [data-theme="zombie"] body::after { content: ''; position: fixed; left: 4vw; bottom: 0; width: 120px; height: 170px; z-index: 14; pointer-events: none; transform: translateY(100%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 170'%3E%3Cg fill='%236f8f4a' stroke='%23263a14' stroke-width='3' stroke-linejoin='round'%3E%3Cpath d='M38 170l4-62c-6-6-14-14-20-24-4-7 4-12 9-6l12 14 2-50c0-8 10-8 11 0l3 40 4-52c1-9 12-9 12 0l1 52 6-44c1-8 12-7 11 1l-4 48 9-30c3-8 13-5 10 3l-10 44c-3 14-8 24-16 30l2 36z'/%3E%3C/g%3E%3Cg fill='%23c3161f' opacity='.55'%3E%3Ccircle cx='60' cy='140' r='4'/%3E%3Ccircle cx='52' cy='122' r='2.5'/%3E%3C/g%3E%3Cg stroke='%23263a14' stroke-width='2' fill='none'%3E%3Cpath d='M50 100l10 4M66 96l8 6'/%3E%3C/g%3E%3C/svg%3E") bottom / contain no-repeat;
    animation: hand-rise 26s ease-in-out infinite; animation-delay: 6s; }
}
@keyframes ooze { from { background-position-x: 0; } to { background-position-x: 120px; } }
@keyframes flicker { 0%, 88%, 100% { opacity: 0; } 89% { opacity: .9; } 90% { opacity: .1; } 91% { opacity: .8; } 92%, 94% { opacity: 0; } 93% { opacity: .5; } }
@keyframes hand-rise { 0%, 70%, 100% { transform: translateY(100%) rotate(0deg); } 76% { transform: translateY(38%) rotate(-6deg); } 80% { transform: translateY(30%) rotate(4deg); }
  84% { transform: translateY(34%) rotate(-3deg); } 90% { transform: translateY(100%) rotate(0); } }
@media (max-width: 700px) { [data-theme="zombie"] body::after { width: 80px; height: 115px; } }

/* Dive Bar: dark wood, pool-table felt, and buzzing neon signs. */
[data-theme="divebar"] {
  --bg: #0d0806; --panel: rgba(28,18,12,.9); --panel2: rgba(40,26,17,.92); --line: #5a3a22; --line2: #34221a; --hover: rgba(255,80,60,.06);
  --text: #f6eadb; --muted: #c9ad8c; --faint: #7f6650; --turf: #ff4b3a; --turf-dim: #8f2318; --gold: #ffc45c; --red: #ff4b3a; --blue: #3fa3ff;
  --on-accent: #ffffff; --topbar: rgba(16,10,7,.95); --sel: #3a1d14; --glow: rgba(255,75,58,.4); --hi: rgba(255,220,180,.04);
  --font-display: Yellowtail, 'Brush Script MT', cursive; --card-shadow: 0 12px 30px rgba(0,0,0,.6);
  --wood: repeating-linear-gradient(92deg, rgba(0,0,0,.0) 0 18px, rgba(0,0,0,.18) 18px 19px, rgba(255,200,150,.03) 19px 46px, rgba(0,0,0,.25) 46px 47px);
  --app-bg: radial-gradient(ellipse 40% 30% at 76% 18%, rgba(255,60,40,.14), transparent 70%), radial-gradient(ellipse 30% 24% at 72% 36%, rgba(63,163,255,.10), transparent 70%),
    linear-gradient(180deg, rgba(10,6,4,.72), rgba(10,6,4,.62) 50%, rgba(10,6,4,.9)), url('/stadiums/elite-dive-bar.jpg') center / cover no-repeat;
}
[data-theme="divebar"] .card, [data-theme="divebar"] .tile { background-image: var(--wood), linear-gradient(180deg, rgba(255,200,150,.04), transparent 140px); border: 1px solid #4a2f1c; }
[data-theme="divebar"] main h1 { font-weight: 400; font-size: 38px; color: #fff0ee; letter-spacing: .01em;
  text-shadow: 0 0 4px #fff, 0 0 10px #ff4b3a, 0 0 22px #ff4b3a, 0 0 42px rgba(255,75,58,.6); }
@media (prefers-reduced-motion: no-preference) { [data-theme="divebar"] main h1 { animation: neon-buzz 9s infinite; } }
@keyframes neon-buzz { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .35; } 94% { opacity: 1; } 96% { opacity: .55; } 97% { opacity: 1; } }
[data-theme="divebar"] .card h2 { color: #8fd0ff; text-shadow: 0 0 6px rgba(63,163,255,.8), 0 0 16px rgba(63,163,255,.4); }
[data-theme="divebar"] button:not(.ghost):not(.theme-opt):not(.team-chip):not(.ad-x):not(.mkt-btn) { background: linear-gradient(180deg, #1f6b45, #145234); color: #f3fff6;
  box-shadow: 0 3px 0 #0b2f1e, 0 0 0 1px #2c8a5b inset; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
[data-theme="divebar"] .tabs a.on { color: #fff; text-shadow: 0 0 8px #ff4b3a, 0 0 16px #ff4b3a; box-shadow: inset 0 -2px 0 #ff4b3a; }
[data-theme="divebar"] .topbar { background-image: var(--wood); }
[data-theme="divebar"] .topbar::after { background: linear-gradient(90deg, #3fa3ff, #ff4b3a); opacity: .9; height: 2px; box-shadow: 0 0 10px #ff4b3a; }
[data-theme="divebar"] .brand { text-shadow: 0 0 8px rgba(255,75,58,.7); }
/* Phones get the tall versions of the room art. */
@media (max-width: 700px) and (orientation: portrait) {
  [data-theme="retrowave"] { --app-bg: linear-gradient(180deg, rgba(10,4,22,.78), rgba(10,4,22,.55) 45%, rgba(10,4,22,.85)), url('/lockers/elite-retrowave.jpg') center / cover no-repeat; }
  [data-theme="zombie"] { --app-bg: linear-gradient(180deg, rgba(5,6,4,.72), rgba(5,6,4,.62) 50%, rgba(5,6,4,.9)), url('/lockers/elite-zombie.jpg') center / cover no-repeat; }
  [data-theme="divebar"] { --app-bg: linear-gradient(180deg, rgba(10,6,4,.72), rgba(10,6,4,.62) 50%, rgba(10,6,4,.9)), url('/lockers/elite-dive-bar.jpg') center / cover no-repeat; }
}
.theme-opt .t-lock.elite { color: #f6a8ff; }
/* Locked Elite themes stay hidden until you own the room. */
.theme-opt.locked .sw-prev { filter: blur(6px) grayscale(.6) brightness(.5); }

/* ---------- Founders Club: Founding Members only (src/founders.js) ----------
   Old-school leather, brass and cream, with saddle stitching on the cards and a faint crest behind the page.
   Placeholder art (swap in Levi's): /themes/founders-leather.svg (background), /themes/founders-crest.svg (crest),
   /balls/founders.svg (header football). */
[data-theme="founders"] {
  --bg: #1d110b; --panel: rgba(40,25,17,.9); --panel2: rgba(52,33,22,.94); --line: #5a3e26; --line2: #3b2818; --hover: rgba(216,178,106,.07);
  --text: #f3e7cf; --muted: #c2ab88; --faint: #85705a; --turf: #d8b26a; --turf-dim: #8a6a2c; --gold: #e6c27a; --red: #e07a5f; --blue: #8fb3c9;
  --on-accent: #2a1808; --topbar: rgba(24,14,9,.97); --sel: #3d2a17; --glow: rgba(216,178,106,.3); --hi: rgba(255,236,200,.04);
  --card-shadow: 0 2px 0 rgba(0,0,0,.35), 0 14px 34px rgba(0,0,0,.5); --scrim: rgba(14,8,5,.72);
  --brass: linear-gradient(180deg, #f6dc9a 0%, #d8b26a 35%, #a9802f 70%, #e2c27c 100%);
  --stitch: rgba(243,231,207,.28);
  --font-display: Graduate, Georgia, 'Times New Roman', serif;
  --app-bg: radial-gradient(ellipse 80% 45% at 50% -8%, rgba(246,220,154,.14), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.55)),
    url('/themes/founders-leather.svg') center / 600px;
}
/* The crest sits faintly behind the page (body::before, so Levi's full-strength PNG can drop straight in). */
[data-theme="founders"] body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .13;
  background: url('/themes/founders-crest.svg') center 56% / min(72vw, 520px) auto no-repeat; }
[data-theme="founders"] main, [data-theme="founders"] .sitefoot { position: relative; z-index: 1; }
[data-theme="founders"] .card, [data-theme="founders"] .tile { border: 1px solid var(--line); outline: 1px dashed var(--stitch); outline-offset: -6px; }
[data-theme="founders"] .brand { color: var(--gold); text-shadow: 0 1px 0 #000; letter-spacing: .04em; }
[data-theme="founders"] main h1 { background: var(--brass); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  font-weight: 400; letter-spacing: .05em; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
[data-theme="founders"] .card h2 { color: var(--gold); font-weight: 400; letter-spacing: .04em; }
[data-theme="founders"] button:not(.ghost):not(.theme-opt):not(.team-chip):not(.ad-x):not(.mkt-btn):not(.report):not(.ph-x):not(.modal-x):not(.link-btn):not(.fg-opt) {
  background: var(--brass); color: #2a1808; box-shadow: 0 2px 0 #5c3f12, 0 4px 14px rgba(216,178,106,.25), inset 0 1px 0 rgba(255,248,220,.7); text-shadow: 0 1px 0 rgba(255,236,190,.55); }
[data-theme="founders"] .topbar { background-image: linear-gradient(180deg, rgba(60,36,22,.6), rgba(24,14,9,0)); }
[data-theme="founders"] .topbar::after { height: 0; bottom: 3px; opacity: 1; background: none; border-bottom: 2px dashed rgba(216,178,106,.55); }
[data-theme="founders"] .tabs a.on { color: var(--gold); text-shadow: none; box-shadow: inset 0 -2px 0 var(--turf); }
[data-theme="founders"] .card:hover, [data-theme="founders"] .league-item:hover { border-color: #8a6a2c; }
[data-theme="founders"] .brand .ball { display: inline-block; width: 28px; height: 28px; font-size: 0 !important; vertical-align: middle; background: url('/balls/founders.svg') center / contain no-repeat; }
.theme-opt .t-lock.founder { color: #f6dc9a; background: rgba(42,24,8,.85); }

/* ---------- Theme footballs (header logo) ----------
   Placeholder art in public/balls/<theme>.svg, one per Pro and Elite theme. To use real art, replace the file (or point
   the url at a .png). Free and seasonal themes keep the 🏈 emoji. */
:is([data-theme="neon"], [data-theme="chalk"], [data-theme="stadium"], [data-theme="team"], [data-theme="marble"], [data-theme="onyx"],
  [data-theme="retrowave"], [data-theme="zombie"], [data-theme="divebar"]) .brand .ball {
  display: inline-block; width: 28px; height: 28px; font-size: 0 !important; vertical-align: middle; background: var(--ball) center / contain no-repeat; }
[data-theme="neon"] { --ball: url('/balls/neon.svg'); }
[data-theme="chalk"] { --ball: url('/balls/chalk.svg'); }
[data-theme="stadium"] { --ball: url('/balls/stadium.svg'); }
[data-theme="marble"] { --ball: url('/balls/marble.svg'); }
[data-theme="onyx"] { --ball: url('/balls/onyx.svg'); }
[data-theme="retrowave"] { --ball: url('/balls/retrowave.svg'); }
[data-theme="zombie"] { --ball: url('/balls/zombie.svg'); }
[data-theme="divebar"] { --ball: url('/balls/divebar.svg'); }
[data-theme="founders"] { --ball: url('/balls/founders.svg'); }
/* Team colors: the team's two colors, cut to a football shape, with white laces on top. */
[data-theme="team"] .brand .ball { background: url('/balls/team-laces.svg') center / contain no-repeat, linear-gradient(125deg, var(--c1, #E31837) 50%, var(--c2, #FFB81C) 50%);
  -webkit-mask: url('/balls/mask.svg') center / contain no-repeat; mask: url('/balls/mask.svg') center / contain no-repeat; }
@media (prefers-reduced-motion: no-preference) {
  [data-theme="zombie"] .brand .ball { animation: ball-twitch 5s infinite; }
  [data-theme="divebar"] .brand .ball { animation: neon-buzz 7s infinite; }
}
@keyframes ball-twitch { 0%, 90%, 100% { transform: rotate(0); } 92% { transform: rotate(-12deg); } 94% { transform: rotate(9deg); } 96% { transform: rotate(-4deg); } }

/* ---------- Theme picker ---------- */
.theme-modal { max-width: 640px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 44%), 1fr)); gap: 10px; margin-top: 12px; }
.theme-opt { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; background: var(--panel2) !important; background-image: none !important;
  box-shadow: none !important; color: var(--text); border: 2px solid var(--line); border-radius: 12px; font-weight: 600; }
.theme-opt.on { border-color: var(--turf); box-shadow: 0 0 0 3px var(--glow) !important; }
.theme-opt .sw-prev { height: 78px; position: relative; background: var(--pv-bg); }
.theme-opt .sw-prev i { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 22px; border-radius: 6px; background: var(--pv-panel); border: 1px solid rgba(255,255,255,.15); }
.theme-opt .sw-prev b { position: absolute; left: 10px; top: 10px; width: 38px; height: 10px; border-radius: 99px; background: var(--pv-accent); box-shadow: 0 0 10px var(--pv-accent); }
.theme-opt .t-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.theme-opt .t-name { font-size: 14px; } .theme-opt .t-desc { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.35; }
.theme-opt .t-lock { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.72); color: #ffe08a; }
.theme-opt .t-lock.free { color: #b6f3cf; } .theme-opt .t-lock.own { color: #fff; }
.theme-sub { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.team-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 210px; overflow: auto; margin-top: 8px; }
.team-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  background: var(--panel) !important; background-image: none !important; box-shadow: none !important; color: var(--text); border: 1px solid var(--line); }
.team-chip.on { border-color: var(--turf); box-shadow: 0 0 0 2px var(--glow) !important; }
.team-chip i { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); border: 1px solid rgba(255,255,255,.3); }
.color-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.color-row input[type=color] { width: 44px; height: 32px; padding: 2px; }
.season-note { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); margin-top: 10px; font-size: 13.5px; }

/* ---------- Bottom ad banner (public/ads.js) ---------- */
.adbar { position: fixed; left: 50%; bottom: 8px; transform: translate(-50%, 0); z-index: 15; width: min(760px, calc(100vw - 16px)); height: 60px;
  display: flex; align-items: center; gap: 10px; padding: 0 8px 0 0; border-radius: 12px; overflow: hidden; background: var(--panel2); border: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(0,0,0,.45); transition: transform .28s ease, opacity .28s ease; color: var(--text); }
.adbar[hidden] { display: none; }
.adbar.away { transform: translate(-50%, calc(100% + 16px)); opacity: 0; pointer-events: none; }
.adbar .ad-link { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 10px; color: var(--text); }
.adbar .ad-link:hover .ad-cta { filter: brightness(1.1); }
.adbar .ad-img { height: 100%; width: auto; max-width: 30%; object-fit: cover; display: block; flex: none; }
.adbar.wide .ad-img { max-width: none; width: 100%; object-fit: contain; background: #000; }
.adbar.wide .ad-text, .adbar.wide .ad-cta { display: none; }
.adbar .ad-text { min-width: 0; flex: 1; padding-left: 4px; line-height: 1.25; }
.adbar .ad-text b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adbar .ad-text span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adbar .ad-cta { flex: none; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 8px; background: var(--turf); color: var(--on-accent); }
.adbar .ad-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding-left: 2px; }
.adbar .ad-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.adbar .ad-x { background: transparent !important; background-image: none !important; box-shadow: none !important; color: var(--muted); padding: 0 4px; font-size: 18px; line-height: 1; }
.adbar .ad-pro { font-size: 10.5px; color: var(--gold); white-space: nowrap; }
.adbar .ad-fade { animation: adIn .35s ease; }
@keyframes adIn { from { opacity: 0; transform: translateY(6px); } }
body.has-ad main { padding-bottom: 32px; } /* the footer (style.css) leaves room for the bar */
body.has-ad .toast { bottom: 80px; }
@media (max-width: 700px) {
  .adbar { height: 54px; bottom: 6px; } .adbar .ad-pro { display: none; } .adbar .ad-text span { display: none; }
}
/* Admin › Ads */
.ad-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ad-row:last-child { border-bottom: 0; } .ad-row.off { opacity: .6; }
.ad-thumb { width: 180px; height: 60px; border-radius: 8px; background: var(--panel2) center / contain no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 12px; overflow: hidden; }
.ad-stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; } .ad-stats b { color: var(--text); }
.ad-form .grid2 { gap: 0 14px; }
.ad-preview { position: relative; margin-top: 12px; }
.ad-preview .adbar { position: relative; left: 0; bottom: 0; transform: none; width: 100%; box-shadow: none; }
@media (max-width: 700px) { .ad-row { grid-template-columns: minmax(0, 1fr); } .ad-thumb { width: 100%; } }
/* Marketplace tile */
.mkt-tile:not(.soon) .mkt-tile-img i { filter: drop-shadow(0 6px 18px rgba(0,0,0,.6)); }
.mkt-tile[href="#/themes"] .mkt-tile-img { display: grid; place-items: center;
  background: linear-gradient(135deg, #1b0a3a 0 25%, #23412f 25% 50%, #E31837 50% 75%, #0a2418 75%); }

/* ---------- Team colors pop-up (theme-picker.js openTeamPop) ---------- */
.tc-back { z-index: 45; }
.tc-modal { max-width: 520px; display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
#tc-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#tc-pick { flex: 1; min-height: 124px; overflow: auto; overscroll-behavior: contain; }
.tc-bar { display: flex; align-items: center; gap: 12px; }
.tc-dot { width: 34px; height: 34px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); border: 2px solid rgba(255,255,255,.35); }
.tc-preview { flex: none; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); padding-bottom: 12px;
  background: radial-gradient(ellipse 80% 70% at 0% 0%, color-mix(in srgb, var(--c1) 50%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 60% at 100% 100%, color-mix(in srgb, var(--c2) 35%, transparent), transparent 70%), #0c0f14;
  transition: background .25s; color: #eef1f5; }
.tcp-top { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 60%, #0a0c10), #0a0c10 75%); font-size: 15px; }
.tcp-ball { width: 22px; height: 15px; border-radius: 50%; background: linear-gradient(125deg, var(--c1) 50%, var(--c2) 50%); box-shadow: 0 0 0 1px rgba(255,255,255,.4); }
.tcp-sp { flex: 1; }
.tcp-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--acc); color: var(--on); }
.tcp-stripe { height: 3px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.tcp-card { margin: 12px 12px 0; padding: 10px 12px; border-radius: 10px; background: rgba(20,24,31,.9); border: 1px solid #2d3440; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.tcp-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #9aa3b0; }
.tcp-row { display: flex; justify-content: space-between; }
.tcp-row.muted { color: #9aa3b0; }
.tcp-pts { color: var(--acc); font-weight: 800; }
.tcp-btn { align-self: flex-start; margin-top: 6px; padding: 5px 12px; border-radius: 8px; font-weight: 800; font-size: 12.5px; background: var(--acc); color: var(--on); box-shadow: 0 0 14px color-mix(in srgb, var(--acc) 45%, transparent); }
.tcp-name { font-weight: 800; font-size: 13px; padding: 2px 10px; border-radius: 99px; background: rgba(0,0,0,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.t-change { align-self: flex-start; margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--turf); }
.tc-tabs { display: flex; margin: 12px 0 8px; }
.tc-tabs button { flex: 1; }
.tc-search { width: 100%; margin: 0 0 4px; }
.tc-chips { max-height: none; overflow: visible; padding: 3px; }
.tc-custom { display: flex; align-items: flex-end; justify-content: center; gap: 14px; padding: 10px 0 4px; }
.tc-custom label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0; }
.tc-custom input[type=color] { width: 72px; height: 48px; padding: 2px; border-radius: 10px; }
.tc-swap { padding: 8px 12px; font-size: 18px; }
.tc-foot { flex: none; margin: 12px -22px 0; padding: 12px 22px calc(14px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.tc-lock { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.4; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--gold, #f2c14e) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gold, #f2c14e) 40%, transparent); }
.tc-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; width: 100%; }
@media (max-width: 640px) {
  .tc-foot { margin: 12px -16px 0; padding-left: 16px; padding-right: 16px; }
  .tc-foot > button, .tc-btns > * { flex: 1; text-align: center; }
  .tc-modal { max-height: 92vh; }
  .tcp-card { margin-top: 8px; padding: 8px 10px; gap: 2px; }
  .tcp-row.muted { display: none; }
  .tc-modal h2 + p { display: none; }
}
