:root {
  --bg: #070a11;
  --bg-2: #0b0f1a;
  --panel: #10151f;
  --panel-2: #151c2a;
  --panel-3: #1a2333;
  --border: #263247;
  --border-soft: #1b2436;
  --text: #eaf0fa;
  --text-dim: #94a3bd;
  --text-faint: #5c6b86;
  --accent: #5ce0c8;     /* cyan  */
  --accent-2: #8b7bff;   /* purple */
  --accent-3: #4c9dff;   /* blue  */
  --good: #34d399;
  --bad: #ff5c72;
  --warn: #ffb454;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --shadow: 0 24px 60px -28px rgba(0,0,0,.8);
  --shadow-glow: 0 10px 40px -12px rgba(124,92,255,.45);
  --grad: linear-gradient(135deg, #8b7bff 0%, #4c9dff 52%, #5ce0c8 100%);
  --grad-soft: linear-gradient(135deg, rgba(139,123,255,.16), rgba(76,157,255,.12) 55%, rgba(92,224,200,.1));
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

.aurora {
  position: fixed; inset: -25% -10% auto -10%; height: 80vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 55% at 18% 12%, rgba(139,123,255,.24), transparent 62%),
    radial-gradient(40% 52% at 82% 8%, rgba(76,157,255,.20), transparent 62%),
    radial-gradient(34% 46% at 55% 26%, rgba(92,224,200,.14), transparent 60%);
  filter: blur(24px);
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px clamp(16px, 4vw, 44px);
  max-width: 1040px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 46px; height: 46px; display: grid; place-items: center; font-size: 23px;
  border-radius: 14px; background: var(--grad);
  box-shadow: 0 10px 26px -8px rgba(124,92,255,.6), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.14; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand-name .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 12.5px; color: var(--text-dim); }
.topbar-actions { display: flex; gap: 10px; }

/* ---------- Layout ---------- */
.wrap {
  position: relative; z-index: 1; max-width: 1040px; margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 44px) 60px;
  display: flex; flex-direction: column; gap: 22px;
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow);
  position: relative;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 30%);
}
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.card-head-text h2 { margin: 0; font-size: 19px; letter-spacing: -.015em; }
.card-sub { margin: 3px 0 0; font-size: 13px; color: var(--text-dim); }
.step-pill {
  width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center;
  border-radius: 10px; font-weight: 800; font-size: 14px; margin-top: 1px;
  background: var(--grad-soft); color: #cfe0ff; border: 1px solid rgba(124,92,255,.32);
}

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.muted { color: var(--text-faint); font-weight: 400; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon {
  position: absolute; left: 14px; font-size: 14px; color: var(--text-faint);
  pointer-events: none; display: grid; place-items: center;
}
.input-wrap > input { padding-left: 40px; }
.in-btn {
  position: absolute; right: 7px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text-dim); border-radius: 8px;
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; cursor: pointer;
  transition: all .15s;
}
.in-btn:hover { color: var(--text); border-color: var(--accent-3); }

input[type="text"], input[type="password"], input[type="search"], textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font: inherit; padding: 13px 14px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, textarea:focus {
  outline: none; border-color: var(--accent-3);
  box-shadow: 0 0 0 3px rgba(76,157,255,.18); background: #0c1220;
}
textarea { min-height: 108px; resize: vertical; font-size: 13.5px; }
::placeholder { color: var(--text-faint); }

/* Requirement chips */
.reqs { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px;
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer; user-select: none;
  font-size: 13.5px; font-weight: 600; background: var(--bg-2);
  transition: all .16s ease; position: relative;
}
.chip input { display: none; }
.chip .chip-i { font-size: 15px; line-height: 1; filter: grayscale(.4); transition: filter .16s; }
.chip .chip-t { color: var(--text-dim); transition: color .16s; }
.chip:hover { border-color: var(--border); background: var(--panel-2); transform: translateY(-1px); }
.chip:has(input:checked) {
  border-color: transparent; color: var(--text);
  background:
    linear-gradient(var(--panel-2), var(--panel-2)) padding-box,
    var(--grad) border-box;
  box-shadow: 0 6px 20px -10px rgba(124,92,255,.6);
}
.chip:has(input:checked) .chip-i { filter: none; }
.chip:has(input:checked) .chip-t { color: var(--text); }

/* Source cards */
.source-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.source-card {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-2); border-radius: 14px; padding: 15px 16px;
  font: inherit; color: var(--text); transition: all .16s ease; position: relative; overflow: hidden;
}
.source-card:hover { border-color: var(--border); background: var(--panel-2); transform: translateY(-1px); }
.source-card .sc-icon { font-size: 20px; line-height: 1; margin-top: 1px; }
.source-card .sc-body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.source-card .sc-title { font-weight: 700; font-size: 14.5px; }
.source-card .sc-desc { font-size: 12.5px; color: var(--text-dim); }
.source-card .sc-desc strong { color: var(--accent); }
.source-card .sc-check {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 999px; display: grid; place-items: center;
  border: 1.5px solid var(--border); color: transparent; font-size: 12px; font-weight: 800; transition: all .16s;
}
.source-card.active {
  border-color: transparent;
  background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--grad) border-box;
  box-shadow: 0 10px 30px -14px rgba(124,92,255,.6);
}
.source-card.active .sc-check { background: var(--grad); border-color: transparent; color: #08101c; }

.mode-panel { margin-top: 2px; }
.note { font-size: 12.5px; color: var(--text-dim); margin: 6px 0 14px; }
.note code { background: var(--bg); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.note.info {
  background: var(--grad-soft); border: 1px solid rgba(76,157,255,.22);
  padding: 12px 14px; border-radius: 12px; color: #c8d6ef;
}
.note.info strong { color: #fff; }

.manual-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.manual-box { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.actions, .draw-actions, .modal-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions { margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; font: inherit; font-weight: 650; font-size: 14px;
  padding: 12px 20px; cursor: pointer; transition: transform .08s, filter .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn .i { font-size: 13px; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); color: #08101c; box-shadow: 0 8px 22px -10px rgba(124,92,255,.55); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 12px 30px -10px rgba(124,92,255,.7); }
.btn.primary.glow { box-shadow: 0 0 0 0 rgba(124,92,255,.4), 0 10px 30px -8px rgba(124,92,255,.6); }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn.ghost:hover { color: var(--text); border-color: var(--border); background: var(--panel-2); }
.btn.ghost.danger { color: #ff8a99; border-color: rgba(255,92,114,.35); }
.btn.ghost.danger:hover { color: #fff; background: rgba(255,92,114,.16); border-color: rgba(255,92,114,.5); }
.btn.sm { padding: 9px 14px; font-size: 13px; border-radius: 10px; }
.btn.tiny { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn.big { padding: 15px 30px; font-size: 15.5px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.3); }
.btn:focus-visible, .chip:focus-within, .source-card:focus-visible, .seg-btn:focus-visible, .step-btn:focus-visible {
  outline: 2px solid var(--accent-3); outline-offset: 2px;
}

.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(8,16,28,.35); border-top-color: #08101c; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Warnings ---------- */
.warnings { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.warn-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(255,180,84,.09); border: 1px solid rgba(255,180,84,.26); color: #ffdca6;
  padding: 11px 14px; border-radius: 11px; font-size: 13px;
}

/* ---------- Stats ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.stat {
  flex: 1 1 120px; background: linear-gradient(180deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--border-soft); border-radius: 14px; padding: 15px 17px; position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--text-faint); opacity: .5; }
.stat .num { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.stat .lab { font-size: 12px; color: var(--text-dim); }
.stat.eligible::after { background: var(--grad); opacity: 1; }
.stat.eligible .num { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- List ---------- */
.list-tools { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.search-wrap { flex: 1 1 220px; }
.seg-mini { display: inline-flex; gap: 3px; padding: 3px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; }
.seg-mini-btn { border: 0; background: transparent; color: var(--text-dim); font: inherit; font-weight: 600; font-size: 12.5px; padding: 8px 14px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.seg-mini-btn.active { background: var(--panel-3); color: var(--text); }

.people { display: flex; flex-direction: column; gap: 7px; max-height: 470px; overflow-y: auto; padding-right: 4px; }
.people::-webkit-scrollbar { width: 8px; }
.people::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.person {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 13px;
  transition: opacity .15s, border-color .15s, background .15s, transform .1s;
}
.person:hover { border-color: var(--border); background: var(--panel-2); }
.person.excluded { opacity: .5; }
.person.excluded .p-name { text-decoration: line-through; }
.person.ineligible { opacity: .6; }
.p-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px;
  background: linear-gradient(135deg, var(--panel-3), var(--panel-2)); object-fit: cover;
  display: grid; place-items: center; font-weight: 700; color: var(--accent-3); overflow: hidden;
  border: 1px solid var(--border-soft);
}
.p-avatar img { width: 100%; height: 100%; object-fit: cover; }
.p-main { min-width: 0; flex: 1; }
.p-name { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-handle { font-size: 12.5px; color: var(--text-dim); text-decoration: none; }
a.p-handle:hover { color: var(--accent-3); }
.p-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.badge {
  font-size: 14px; line-height: 1; width: 25px; height: 25px; display: grid; place-items: center;
  border-radius: 8px; background: var(--panel-3); opacity: .34; filter: grayscale(1);
  transition: all .15s;
}
.badge.met { opacity: 1; filter: none; background: rgba(52,211,153,.16); box-shadow: inset 0 0 0 1px rgba(52,211,153,.3); }
.badge.pending { opacity: .9; filter: none; background: rgba(76,157,255,.14); box-shadow: inset 0 0 0 1px rgba(76,157,255,.28); }
.p-toggle {
  border: 1px solid var(--border); background: transparent; color: var(--text-dim);
  border-radius: 9px; padding: 7px 12px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.p-toggle:hover { color: var(--text); border-color: var(--border); background: var(--panel-3); }
.person.excluded .p-toggle { color: var(--good); border-color: rgba(52,211,153,.4); }
.empty { color: var(--text-faint); text-align: center; padding: 30px; font-size: 14px; }

/* ---------- Draw configuration ---------- */
.draw-config {
  display: flex; flex-wrap: wrap; gap: 22px 30px; align-items: flex-start;
  padding: 4px 0 22px; margin-bottom: 4px; border-bottom: 1px solid var(--border-soft);
}
.cfg-block { display: flex; flex-direction: column; gap: 9px; }
.cfg-label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
.hint { cursor: help; color: var(--text-faint); font-size: 12px; }

.stepper { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 5px; }
.step-btn {
  width: 38px; height: 38px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  border-radius: 9px; font-size: 20px; font-weight: 600; line-height: 1; cursor: pointer; transition: all .14s;
  display: grid; place-items: center;
}
.step-btn:hover { border-color: var(--accent-3); background: var(--panel-3); color: #fff; }
.step-btn:disabled { opacity: .4; cursor: not-allowed; }
.step-val { width: 56px; text-align: center; font-weight: 800; font-size: 17px; padding: 8px 4px; background: transparent; border: 0; border-radius: 8px; }
.step-val:focus { box-shadow: none; background: var(--panel-2); }

.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; }
.seg-btn { border: 0; background: transparent; color: var(--text-dim); font: inherit; font-weight: 600; font-size: 13px; padding: 9px 15px; border-radius: 9px; cursor: pointer; transition: all .15s; }
.seg-btn.active { background: var(--panel-3); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.35); }

/* ---------- Reels ---------- */
.reels { display: grid; gap: 16px; margin: 22px 0; grid-template-columns: 1fr; }
.reels.cols-2 { grid-template-columns: repeat(2, 1fr); }
.reels.cols-3 { grid-template-columns: repeat(3, 1fr); }
.reels.cols-many { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.reel-unit {
  background: linear-gradient(180deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--border-soft); border-radius: 16px; padding: 14px; transition: border-color .25s, box-shadow .25s, opacity .25s;
}
.reel-unit.dim { opacity: .5; }
.reel-unit.active { border-color: rgba(124,92,255,.5); box-shadow: 0 0 0 1px rgba(124,92,255,.25), 0 14px 40px -18px rgba(124,92,255,.5); }
.reel-unit.won { border-color: rgba(92,224,200,.5); box-shadow: 0 0 0 1px rgba(92,224,200,.25), 0 14px 40px -18px rgba(92,224,200,.45); }
.reel-unit.lost { border-color: rgba(255,92,114,.4); }
.reel-unit-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); margin-bottom: 10px; letter-spacing: .01em; }
.ru-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 8px rgba(124,92,255,.7); }
.reel-unit:nth-child(even) .ru-dot { background: linear-gradient(135deg, #5ce0c8, #4c9dff); }
.reel-unit-label .ru-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; color: var(--text-faint); background: var(--panel-3); }
.reel-unit.won .ru-badge { color: #08101c; background: linear-gradient(135deg,#5ce0c8,#34d399); }

.reel-wrap { position: relative; }
.reel-mask {
  height: 216px; overflow: hidden; position: relative; border: 1px solid var(--border); border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 50%, var(--panel-3), var(--bg) 82%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent);
}
.reel { will-change: transform; }
.reel-row { height: 72px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 16px; }
.reel-row .p-avatar { width: 44px; height: 44px; flex: 0 0 44px; font-size: 17px; }
.reel-row .r-name { font-size: 18px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.reel-row .r-handle { font-size: 13px; color: var(--text-dim); }
.reel-indicator {
  position: absolute; left: 8px; right: 8px; top: 50%; height: 72px; transform: translateY(-50%);
  border: 2px solid var(--accent); border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 26px -6px rgba(92,224,200,.55), inset 0 0 22px -10px rgba(92,224,200,.5);
}
.reel-unit:nth-child(even) .reel-indicator { border-color: var(--accent-2); box-shadow: 0 0 26px -6px rgba(139,123,255,.55), inset 0 0 22px -10px rgba(139,123,255,.5); }
.reel-unit.won .reel-indicator { border-color: var(--good); box-shadow: 0 0 30px -4px rgba(52,211,153,.7), inset 0 0 22px -10px rgba(52,211,153,.55); }

/* Inline verification under a reel */
.reel-verify { margin-top: 12px; }
.verify-slot { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; }
.verify-slot.pass { border-color: rgba(52,211,153,.45); }
.verify-slot.fail { border-color: rgba(255,92,114,.45); }
.verify-slot-head { display: flex; align-items: center; gap: 10px; }
.verify-slot-head .p-avatar { width: 34px; height: 34px; flex: 0 0 34px; font-size: 14px; }
.verify-slot-head .p-main { flex: 1; min-width: 0; }
.verify-status { font-size: 12px; font-weight: 700; white-space: nowrap; margin-left: auto; }
.verify-status.checking { color: var(--accent-3); }
.verify-status.pass { color: var(--good); }
.verify-status.fail { color: var(--bad); }
.verify-checks { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.vcheck { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.vcheck .vc-icon { width: 16px; text-align: center; flex: 0 0 16px; }
.vcheck.checking { color: var(--text-dim); }
.vcheck.pass { color: var(--text); }
.vcheck.fail { color: #ff8a99; }
.vcheck.manual { color: var(--warn); }
.vcheck .vc-label { flex: 1; }
.vcheck .vc-manual-btns { display: flex; gap: 6px; }
.vc-mini { border: 1px solid var(--border); background: transparent; color: var(--text-dim); border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 11.5px; cursor: pointer; transition: all .14s; }
.vc-mini.ok:hover { color: var(--good); border-color: rgba(52,211,153,.5); }
.vc-mini.no:hover { color: var(--bad); border-color: rgba(255,92,114,.5); }
.vspin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent-3); animation: spin .7s linear infinite; display: inline-block; }
.slot-note { margin: 9px 0 0; font-size: 11.5px; color: var(--warn); }

/* ---------- Draw actions ---------- */
.draw-actions { justify-content: center; margin-top: 4px; }
.pool-count { color: var(--text-dim); font-size: 13px; flex-basis: 100%; text-align: center; }
.draw-status { text-align: center; color: var(--warn); font-size: 13px; margin: 12px 0 0; }

/* ---------- Usage panel ---------- */
.usage-panel { margin-top: 22px; padding: 16px; background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; text-align: left; }
.usage-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.usage-head span { font-size: 13px; font-weight: 700; color: var(--text-dim); }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.usage-stat { background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 11px; padding: 11px 13px; }
.u-num { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.usage-stat:last-child .u-num { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.u-lab { font-size: 11.5px; color: var(--text-dim); }
.usage-note { margin: 12px 0 0; font-size: 11.5px; color: var(--text-faint); }

/* ---------- Winner modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(4,7,12,.74); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative; overflow: hidden; width: min(500px, 100%);
  background: linear-gradient(180deg, var(--panel-2), var(--bg-2)); border: 1px solid var(--border);
  border-radius: 24px; padding: 34px 28px 26px; text-align: center; box-shadow: 0 40px 100px -24px rgba(0,0,0,.85);
  animation: pop .35s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes pop { from { transform: scale(.88); opacity: 0; } }
.winner-eyebrow { color: var(--text-dim); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 16px; font-weight: 700; }
.winner-avatar-ring {
  width: 112px; height: 112px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); padding: 4px; box-shadow: 0 0 46px -8px rgba(124,92,255,.7);
}
.winner-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--panel); display: block; }
.winner-name { font-size: 29px; font-weight: 850; margin: 16px 0 2px; letter-spacing: -.02em; }
.winner-handle { display: inline-block; color: var(--accent-3); text-decoration: none; font-weight: 650; margin-bottom: 22px; }
.winner-handle:hover { text-decoration: underline; }
.modal-actions { justify-content: center; }

.winner-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; margin-bottom: 22px; text-align: left; }
.winner-list::-webkit-scrollbar { width: 8px; }
.winner-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.winner-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 13px; }
.winner-row .p-avatar { width: 38px; height: 38px; flex: 0 0 38px; }
.winner-row .rank { color: #08101c; font-weight: 800; font-size: 12px; width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 8px; background: var(--grad); }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; opacity: .9; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(640px) rotate(720deg); opacity: 0; } }

/* ---------- Footer ---------- */
.foot { text-align: center; color: var(--text-faint); font-size: 12.5px; padding: 24px; position: relative; z-index: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .reels.cols-2, .reels.cols-3 { grid-template-columns: 1fr; }
  .source-cards { grid-template-columns: 1fr; }
  .draw-config { gap: 18px; }
}
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; }
  .brand-sub { display: none; }
  .card-head h2 { font-size: 17px; }
  .card-sub { display: none; }
  .reel-row .r-name { font-size: 16px; }
  .stat .num { font-size: 22px; }
  .winner-name { font-size: 24px; }
  .btn.sm .i { display: none; }
  .modal { padding: 28px 16px 20px; }
  .winner-list { overflow-x: hidden; }
  .winner-row { gap: 8px; padding: 8px 9px; }
  .winner-row .rank { width: 21px; height: 21px; flex-basis: 21px; }
  .winner-row .p-avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .winner-row .p-main { overflow: hidden; }
  .winner-row .wr-copy { padding: 6px 10px; font-size: 11.5px; }
  .draw-config { gap: 16px; }
  .stepper, .seg { width: 100%; }
  .seg-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
