:root {
  --bg: #0b0c10; --panel: #14161d; --panel2: #1b1e27; --line: #272b36; --text: #eef0f5; --muted: #8d93a3;
  --accent: #35d0c4; --accent-ink: #062a27; --danger: #ff5a5f; --ok: #3ddc84; --warn: #f5c542;
  --radius: 14px; --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f5f8; --panel: #ffffff; --panel2: #f0f2f6; --line: #dfe2ea; --text: #14161d; --muted: #5d6475;
  --accent: #109a90; --accent-ink: #ffffff; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 60px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #7b5cff); display: grid; place-items: center; color: #fff; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; text-decoration: none; font-weight: 600; font-size: 14px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 14px; }
.toggle input { display: none; }
.toggle .sw { width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: .2s; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle input:checked + .sw { background: var(--accent); }
.toggle input:checked + .sw::after { left: 19px; }

/* ---------- public batch page ---------- */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #ff5a5f88; } 100% { box-shadow: 0 0 0 9px #ff5a5f00; } }
.head { padding: 34px 0 26px; border-bottom: 1px solid var(--line); }
.head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.streamer { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.streamer .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #7b5cff); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.streamer b { color: var(--text); font-weight: 600; }
.head h1 { font-size: 40px; line-height: 1.08; margin: 12px 0 8px; max-width: 760px; }
.head .sub { color: var(--muted); max-width: 640px; }
.watch { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.watch .live-dot { background: var(--danger); }
.meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 22px; font-size: 13px; color: var(--muted); align-items: center; }
.meta b { color: var(--text); font-weight: 600; }
.remain { flex: 1 1 260px; max-width: 360px; }
.remain .bar { height: 6px; border-radius: 9px; background: var(--panel2); overflow: hidden; margin-top: 6px; }
.remain .bar i { display: block; height: 100%; background: var(--accent); border-radius: 9px; transition: width .4s; }
.odds-wrap { padding: 24px 0 6px; }
.odds-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.odds-title h2 { font-size: 18px; }
.oddsbar { display: flex; height: 14px; border-radius: 9px; overflow: hidden; gap: 2px; background: var(--panel2); }
.oddsbar i { background: var(--c); min-width: 3px; transition: flex-grow .4s; }
.legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.leg { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s; }
.leg:hover { border-color: var(--c); }
.leg .n { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--c); }
.leg .n::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.leg .p { font-family: var(--display); font-size: 22px; font-weight: 700; }
.leg .l { font-size: 12px; color: var(--muted); }
.fine { font-size: 12px; color: var(--muted); margin-top: 10px; }
.pulls-head { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 4px; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--line); }
.pulls-head h2 { font-size: 22px; }
.tier { padding: 26px 0 6px; scroll-margin-top: 70px; }
.tier-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.tier-name { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.tier-name::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.tier-sub { font-size: 13px; color: var(--muted); }
.tier-line { flex: 1; height: 1px; background: var(--line); min-width: 30px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 14px; }
.card { aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--panel2); position: relative; cursor: zoom-in; box-shadow: 0 0 0 1px var(--line); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--c), 0 10px 28px -10px var(--c); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.pulled { cursor: default; }
.card.pulled img { filter: grayscale(1) brightness(.4); }
.card.pulled::after { content: "Pulled"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-12deg); border: 2px solid #fff; color: #fff; border-radius: 6px; padding: 4px 12px; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.empty { padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 14px; }
.lightbox { position: fixed; inset: 0; background: #000d; display: none; place-items: center; z-index: 50; padding: 20px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 12px; }
.yourpull { margin: 22px 0 0; padding: 16px; display: flex; gap: 16px; align-items: center; border-color: var(--c); }
.yourpull img { width: 90px; border-radius: 8px; }
.footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 26px 0 40px; color: var(--muted); font-size: 13px; }

.batches { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 24px 0; }
.bcard { text-decoration: none; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bcard .cover { aspect-ratio: 4/3; border-radius: 10px; background: var(--panel2) center/cover; }

@media (max-width: 760px) {
  .head { padding: 22px 0 20px; }
  .head h1 { font-size: 28px; }
  .watch { width: 100%; justify-content: center; }
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leg .p { font-size: 18px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .pulls-head h2 { font-size: 18px; }
  .odds-title span, #updated { display: none; }
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f8; --panel: #ffffff; --panel2: #f0f2f6; --line: #dfe2ea; --text: #14161d; --muted: #5d6475;
    --accent: #109a90; --accent-ink: #ffffff; color-scheme: light;
  }
}
