:root {
  --bg: #08080b;
  --panel: #16161b;
  --panel-2: #1e1e25;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f4f6;
  --muted: #8d8d99;
  --accent: #ff6868;
  --accent-2: #8b7cf6;
  --gold: #f5c84c;
  --silver: #c9ced8;
  --bronze: #d98a5a;
  --radius: 20px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.r { text-align: right; }
.tbd { color: var(--gold); }
[hidden] { display: none !important; }

/* top bar */
.topbar { border-bottom: 1px solid var(--line); background: #0d0d11; position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 56px; }
.logo { font-weight: 800; letter-spacing: 0.02em; color: var(--accent); }
.logo-dot { color: var(--text); }
.topnav { display: flex; gap: 20px; font-size: 14px; }
.topnav a { text-decoration: none; color: var(--muted); }
.chip-poc { margin-left: auto; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; letter-spacing: 0.02em; cursor: pointer; text-decoration: none;
  transition: transform .15s, background .15s, opacity .15s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #ff5252; }
.btn-outline { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.04); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-ghost { background: rgba(255,255,255,.06); padding-right: 6px; color: var(--muted); }
.btn-arrow {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: conic-gradient(from 200deg, #ff6868, #8b7cf6, #3fc6d6, #ff6868);
}
.btn-mini { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.btn-mini:disabled { opacity: .35; cursor: default; }

/* hero */
.hero {
  padding: 72px 0 80px; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 70%, rgba(110, 72, 220, .45), transparent 70%),
    radial-gradient(600px 400px at 10% 110%, rgba(255, 104, 104, .18), transparent 70%),
    linear-gradient(180deg, #050507, #140f2a);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .04em; margin: 0 0 12px; }
.hero h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.02; font-weight: 900; margin: 0 0 20px; letter-spacing: -0.02em; }
.hero-period { color: #d7d7e0; font-weight: 600; margin: 0 0 14px; }
.hero-sub { color: #c4c4cf; max-width: 520px; line-height: 1.55; margin: 0 0 28px; }
.hero-sub b { color: var(--text); }
.hero-actions { display: flex; gap: 14px; margin-bottom: 44px; }
.countdown-row { display: flex; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.countdown-row .muted { margin: 0 0 10px; }
.countdown { display: flex; gap: 22px; }
.countdown b { font-size: 40px; font-weight: 800; }
.countdown i { font-style: normal; color: var(--muted); margin-left: 4px; font-size: 16px; }
.result-btn-wrap { display: flex; flex-direction: column; gap: 6px; }
.result-btn-wrap p { margin: 0; }
.btn-result { background: var(--accent); color: #fff; box-shadow: 0 0 0 0 rgba(255,104,104,.6); animation: pulse 2s infinite; }
.btn-result:disabled { background: rgba(255,255,255,.08); color: var(--muted); animation: none; box-shadow: none; }
.btn-result:not(:disabled) .lock { display: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,104,104,.5); } 70% { box-shadow: 0 0 0 14px rgba(255,104,104,0); } 100% { box-shadow: 0 0 0 0 rgba(255,104,104,0); } }

.pool-card {
  position: relative; margin-top: 90px; padding: 110px 28px 0; text-align: center;
  border-radius: 28px; border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  backdrop-filter: blur(14px);
}
.pool-ticket-art { position: absolute; left: 50%; top: -130px; transform: translateX(-50%); }
.ticket-3d {
  width: 200px; height: 170px; border-radius: 22px; transform: rotate(-8deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 2px, transparent 2px 12px),
    linear-gradient(145deg, #8b7cf6, #4b2fd6);
  box-shadow: 0 30px 60px rgba(75, 47, 214, .55), inset 0 0 30px rgba(255,255,255,.25);
  animation: float 5s ease-in-out infinite;
}
.ticket-3d span { font-size: 32px; font-weight: 900; letter-spacing: .04em; }
.ticket-3d small { font-size: 11px; letter-spacing: .3em; opacity: .8; }
@keyframes float { 50% { transform: rotate(-5deg) translateY(-8px); } }
.pool-label { margin: 0 0 6px; color: #d7d7e0; display: flex; gap: 8px; justify-content: center; align-items: center; }
.badge-est { font-size: 11px; font-weight: 700; color: var(--gold); border: 1px solid rgba(245,200,76,.4); border-radius: 999px; padding: 2px 8px; }
.badge-est.final { color: #5fd38d; border-color: rgba(95,211,141,.4); }
.pool-amount { margin: 0; font-size: clamp(44px, 6vw, 76px); font-weight: 900; letter-spacing: -0.01em; }
.pool-amount small { font-size: 18px; font-weight: 600; margin-left: 8px; }
#pool-asof { margin: 6px 0 0; }
.pool-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 24px; padding: 22px 0 26px; }
.pool-stats b { display: block; font-size: 30px; font-weight: 800; }
.pool-stats span { font-size: 13px; color: #c4c4cf; }

/* sections */
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: clamp(28px, 4vw, 44px); font-weight: 900; margin: 0 0 10px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 40px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); min-width: 0; }
.panel-lg { padding: 32px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head h3 { margin: 0; font-size: 22px; }

/* tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: 50px; }
.tier { background: var(--panel); border-radius: var(--radius); padding: 80px 20px 32px; text-align: center; position: relative; border: 1px solid var(--line); }
.medal {
  position: absolute; left: 50%; top: -48px; width: 100px; height: 100px; transform: translateX(-50%);
  display: grid; place-items: center;
}
.medal::before {
  content: ""; position: absolute; inset: 14px; border-radius: 18px; transform: rotate(45deg);
  background: var(--m); box-shadow: 0 16px 40px rgba(0,0,0,.5), inset 0 2px 6px rgba(255,255,255,.6), inset 0 -6px 12px rgba(0,0,0,.25);
}
.medal b { position: relative; font-size: 34px; font-weight: 900; color: rgba(0,0,0,.55); text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.medal.gold { --m: linear-gradient(135deg, #fff1a8, #f5c84c 45%, #b8861d); }
.medal.silver { --m: linear-gradient(135deg, #ffffff, #c9ced8 45%, #7d8492); }
.medal.bronze { --m: linear-gradient(135deg, #ffd2b0, #d98a5a 45%, #8c4a26); }
.tier h4 { margin: 0 0 12px; font-size: 22px; }
.tier .share { color: #a9a6ff; font-size: 14px; margin: 0 0 20px; }
.tier .amount { font-size: clamp(30px, 3.4vw, 46px); font-weight: 900; margin: 0; }
.tier .note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* tables */
.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.board-grid > * { min-width: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { color: var(--muted); font-weight: 500; text-align: left; padding: 12px 6px; font-size: 13px; }
.table th.r, .table td.r { text-align: right; }
.table td { padding: 14px 6px; border-top: 1px solid var(--line); white-space: nowrap; }
.table tr.top1 td { color: var(--gold); }
.table tr.top2 td { color: #9fd3ea; }
.table tr.top3 td { color: #f0b48d; }
.table tr.me td { background: rgba(255,104,104,.12); }
.table td.empty { text-align: center; color: var(--muted); padding: 40px 6px; white-space: normal; }
.rank-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 800; font-size: 13px; color: #111; transform: rotate(45deg); }
.rank-badge > span { transform: rotate(-45deg); }
.rank-badge.r1 { background: linear-gradient(135deg, #fff1a8, #f5c84c); }
.rank-badge.r2 { background: linear-gradient(135deg, #fff, #c9ced8); }
.rank-badge.r3 { background: linear-gradient(135deg, #ffd2b0, #d98a5a); }
.rank-n { color: var(--muted); font-style: italic; font-weight: 700; padding-left: 8px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* my stats */
.search { display: flex; gap: 10px; }
.search input {
  flex: 1 1 auto; min-width: 0; height: 54px; border-radius: 12px; border: 1px solid var(--line); background: #0e0e12;
  color: var(--text); padding: 0 18px; font: 16px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.search input:focus { outline: 2px solid rgba(255,104,104,.5); border-color: transparent; }
.search.small input, .search.small .btn { height: 42px; }
.sample-row { margin: 10px 0 0; }
.sample-row a { color: #a9a6ff; cursor: pointer; margin-right: 10px; }
.tabs { display: flex; gap: 28px; margin: 28px 0 22px; flex-wrap: wrap; }
.tab { background: none; border: 0; padding: 0; font-size: 22px; color: var(--muted); cursor: pointer; }
.tab.active { color: var(--text); }
.stats-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.stats-main {
  border-radius: 18px; padding: 28px 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px;
  background: linear-gradient(110deg, #4b3a96, #8b7cf6);
}
.stats-main span { display: block; font-size: 15px; opacity: .9; margin-bottom: 10px; }
.stats-main b { font-size: 30px; font-weight: 800; }
.progress-card { border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px; display: flex; gap: 22px; align-items: center; }
.ticket-icon {
  flex: none; width: 80px; height: 50px; border-radius: 8px; display: grid; place-items: center;
  font-weight: 900; font-size: 13px; letter-spacing: .1em; color: #5c4fd8;
  background: linear-gradient(135deg, #e6e2ff, #b9b1ff); box-shadow: 0 6px 20px rgba(139,124,246,.35);
}
.progress-card .grow { flex: 1; min-width: 0; }
.progress-card p { margin: 0; }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); margin: 14px 0; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 99px; transition: width .6s; }
.progress-foot { display: flex; justify-content: space-between; font-size: 14px; }
.progress-foot a { color: #a9a6ff; text-decoration: none; font-weight: 600; }
.stats-empty { color: var(--muted); padding: 30px 0 10px; text-align: center; }
.won { margin-top: 16px; padding: 14px 18px; border-radius: 12px; background: rgba(245,200,76,.12); color: var(--gold); font-weight: 600; }

/* rules */
.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 32px 0; }
.rules-grid.three { grid-template-columns: repeat(3, 1fr); }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,104,104,.15); color: var(--accent); font-weight: 800; }
.step h4 { margin: 14px 0 8px; font-size: 18px; }
.step p { margin: 0; color: #b4b4bf; line-height: 1.55; font-size: 14px; }
.rules-list { color: #b4b4bf; line-height: 1.8; padding-left: 20px; margin: 0; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: #b4b4bf; line-height: 1.6; margin: 12px 0 0; }
.footer { border-top: 1px solid var(--line); padding: 28px 0 80px; }

/* results */
.results { padding-top: 40px; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 24px 0 28px; }
.results-head .tabs { margin: 0; }
.results-head .tab { font-size: 16px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); }
.results-head .tab.active { background: var(--accent); border-color: var(--accent); }
.results-head .tab:disabled { opacity: .35; cursor: not-allowed; }
.results-title { font-size: clamp(30px, 4vw, 48px); font-weight: 900; margin: 0 0 6px; }
.results-head p { margin: 0; }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.res-stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.res-stats span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.res-stats b { font-size: 26px; font-weight: 800; }
.res-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw-all { background: #3a3a48; }
.sw-mine { background: #8b7cf6; }
.sw-win { background: var(--gold); }
#res-mine { min-height: 18px; margin: 10px 0; color: #c9c4ff; }
.canvas-wrap { position: relative; border-radius: 14px; overflow: hidden; background: #0b0b0f; border: 1px solid var(--line); }
#pool-canvas { display: block; width: 100%; }
.draw-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; text-align: center;
}
.draw-overlay .callout {
  background: rgba(8,8,11,.88); border: 1px solid rgba(245,200,76,.5); border-radius: 18px; padding: 18px 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: pop .4s cubic-bezier(.2,1.6,.4,1);
}
.draw-overlay .callout small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.draw-overlay .callout b { display: block; font-size: 24px; }
.draw-overlay .callout .mono { font-size: 18px; margin-top: 6px; display: block; }
.draw-overlay .status { background: rgba(8,8,11,.7); padding: 8px 16px; border-radius: 999px; font-weight: 700; letter-spacing: .08em; font-size: 13px; align-self: start; margin-top: 14px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.tooltip { position: absolute; pointer-events: none; background: #000; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.draw-controls { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.winner-slots { display: flex; flex-direction: column; gap: 12px; }
.slot { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); transition: border-color .3s, background .3s; }
.slot .medal { position: relative; left: auto; top: auto; transform: none; width: 52px; height: 52px; flex: none; }
.slot .medal::before { inset: 8px; border-radius: 10px; }
.slot .medal b { font-size: 18px; }
.slot .info { min-width: 0; flex: 1; }
.slot .info small { color: var(--muted); font-size: 12px; display: block; }
.slot .info .mono { display: block; margin: 4px 0 2px; font-size: 15px; }
.slot .prize { font-weight: 800; }
.slot.revealed { border-color: rgba(245,200,76,.45); }
.slot.me { background: rgba(139,124,246,.18); border-color: #8b7cf6; }
.slot .hidden-val { color: #555; letter-spacing: .2em; }
.seed { margin-top: 18px; }
.seed summary { cursor: pointer; }
.seed code { display: block; word-break: break-all; font-size: 12px; color: #a9a6ff; margin-top: 8px; }
.locked-box { text-align: center; padding: 60px 20px; }

/* QA panel */
.qa { position: fixed; right: 16px; bottom: 16px; z-index: 50; font-size: 13px; }
.qa-toggle { background: #23232b; border: 1px solid rgba(245,200,76,.4); color: var(--gold); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.qa-panel { position: absolute; bottom: 44px; right: 0; width: min(300px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow-y: auto; background: #18181e; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.qa-panel p { margin: 0 0 10px; }
.qa-list { display: flex; flex-direction: column; gap: 6px; }
.qa-list a { display: block; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); text-decoration: none; }
.qa-list a:hover { background: #2a2a34; }
.qa-list a small { display: block; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #23232b; border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; z-index: 60; font-size: 14px; }

/* responsive */
@media (max-width: 960px) {
  .hero-grid, .board-grid, .stats-grid, .res-grid { grid-template-columns: 1fr; }
  .rules-grid, .rules-grid.three { grid-template-columns: 1fr 1fr; }
  .tiers { grid-template-columns: 1fr; gap: 70px; }
  .pool-card { margin-top: 110px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 56px; }
  .countdown { gap: 14px; }
  .countdown b { font-size: 30px; }
  .rules-grid, .rules-grid.three { grid-template-columns: 1fr; }
  .panel, .panel-lg { padding: 20px 16px; }
  .table { font-size: 13px; }
  .table th, .table td { padding: 10px 4px; }
  .hide-sm { display: none; }
  .stats-main { grid-template-columns: 1fr; padding: 22px; }
  .tab { font-size: 17px; }
  .res-stats { grid-template-columns: 1fr; }
  .pool-stats b { font-size: 22px; }
  .topnav { display: none; }
  .search { flex-direction: column; }
  .search input { flex: none; width: 100%; }
  /* leaderboard / winners: nickname under the wallet so the table fits the phone width */
  .board-grid .table td.mono { white-space: normal; }
  .board-grid .nick { display: block; margin: 2px 0 0; }
  .board-grid .table th, .board-grid .table td { padding: 10px 3px; }
  .board-grid .rank-badge { width: 24px; height: 24px; font-size: 12px; }
  .board-grid .rank-n { padding-left: 6px; }
}

.nick { color: var(--muted); font-family: inherit; font-size: 12px; margin-left: 6px; }

/* Lucky Draw art (img/lucky-box.svg: glass question box with tickets) */
.hero-art { width: 250px; animation: float 5s ease-in-out infinite; }
.hero-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(139, 124, 246, .35)); }
.btn-join { margin-left: auto; white-space: nowrap; }
.stats-note { margin: 10px 0 0; }
.rules-grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .rules-grid.two { grid-template-columns: 1fr; } #stats-form { flex-wrap: wrap; } .btn-join { margin-left: 0; width: 100%; justify-content: center; } }
.slot.compact { padding-top: 8px; padding-bottom: 8px; }
.slot.compact .medal { transform: scale(.8); }
.tier .each { color: var(--muted); font-size: 13px; margin: 2px 0 0; }

/* Draw show: roulette, final banner, grand callout, confetti */
.draw-overlay .final-banner { font-size: clamp(34px, 6vw, 64px); font-weight: 900; letter-spacing: .08em; color: var(--gold);
  text-shadow: 0 0 30px rgba(245,200,76,.6); animation: banner 1.5s ease-out; }
.draw-overlay .final-banner small { display: block; font-size: 16px; letter-spacing: .1em; color: #fff; margin-top: 6px; }
@keyframes banner { 0% { transform: scale(2.2); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 85% { opacity: 1; } 100% { opacity: .9; } }
.draw-overlay .callout.grand { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245,200,76,.5), 0 0 80px rgba(245,200,76,.5); }
.draw-overlay .callout.grand b { font-size: 34px; color: var(--gold); }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

/* Public build (not localhost, no ?qa=1): hide QA tools and POC labels */
.public .qa-only, .public .qa { display: none !important; }
a.logo { text-decoration: none; }

/* Lucky box pull: a hand reaches into the box's slot, pulls the ticket out, the wallet spins on it */
.draw-overlay .pull { position: absolute; inset: 0; display: grid; place-items: center; --t: 1;
  background: radial-gradient(circle at 50% 60%, rgba(8,8,11,.82), rgba(8,8,11,.45) 70%); animation: fade .25s ease-out; }
.draw-overlay .pull.big { --t: 1.6; }
@keyframes fade { from { opacity: 0; } }
.pull-stage { position: relative; width: 280px; height: 300px; }
.pull-box { position: absolute; left: 50px; top: 120px; width: 180px; height: 180px; z-index: 2; }
.pull-box svg { display: block; width: 100%; height: 100%; }
.pull-box .peek { transition: opacity .1s; }
.pull-stage.rattle .pull-box { animation: rattle .12s linear 4; }
@keyframes rattle { 25% { transform: rotate(-3deg) translateX(-3px); } 75% { transform: rotate(3deg) translateX(3px); } }
.grab { position: absolute; left: 50%; top: 0; width: 230px; z-index: 1; display: flex; flex-direction: column; align-items: center;
  transform: translate(-50%, -280px); transition: transform calc(.5s * var(--t)) cubic-bezier(.3,.8,.4,1); }
.reach .grab { transform: translate(-50%, 52px); }
.pull-stage.out .grab { z-index: 3; transform: translate(-50%, -40px); transition: transform calc(.48s * var(--t)) cubic-bezier(.3,1.5,.5,1); }
.hand { width: 64px; height: 88px; margin-bottom: -14px; position: relative; z-index: 1; transition: transform .35s, opacity .35s; }
.hand svg { display: block; width: 100%; height: 100%; overflow: visible; }
.locked .hand { transform: translateY(-50px); opacity: 0; }
.pticket { width: 100%; padding: 14px 18px 12px; border-radius: 10px; color: #3a2405; text-align: center; opacity: 0;
  background: linear-gradient(135deg, #ffe9a3, #f5c84c 50%, #e09a2c);
  -webkit-mask: radial-gradient(circle 9px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 9px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  transform: scale(.25); transform-origin: 50% 0; transition: transform calc(.48s * var(--t)) cubic-bezier(.3,1.5,.5,1); }
.grabbed .pticket { opacity: 1; }
.pull-stage.out .pticket { transform: scale(1); }
.locked .pticket { transform: scale(1.1); }
.locked .grab { filter: drop-shadow(0 0 22px rgba(245,200,76,.75)); }
.pticket small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.pticket .mono { display: block; font-size: 17px; font-weight: 800; margin: 6px 0 4px; min-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pticket b { display: block; font-size: 20px; font-weight: 900; }
.pticket i { display: block; font-style: normal; font-size: 11px; margin-top: 4px; opacity: 0; transition: opacity .3s; border-top: 2px dashed rgba(58,36,5,.3); padding-top: 5px; }
.locked .pticket i { opacity: .8; }
.pull.big .pticket .mono { font-size: 19px; }
.pull.big .pull-stage::before { content: ""; position: absolute; left: 50%; top: 90px; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(245,200,76,.28) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 65%); mask: radial-gradient(circle, #000 15%, transparent 65%);
  opacity: 0; transition: opacity .5s; animation: spin 14s linear infinite; pointer-events: none; }
.pull.big .pull-stage.locked::before { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
section[id] { scroll-margin-top: 72px; }
#stats-form .btn { height: 54px; }
.pticket .spin { opacity: .35; filter: blur(.8px); }
.pticket .who-nick { display: block; font: 600 12px Inter, system-ui, sans-serif; opacity: .7; margin-top: 2px; }
.btn-green { background: #0ead82; color: #fff; box-shadow: 0 0 0 1px rgba(14,173,130,.5), 0 8px 24px rgba(14,173,130,.35); }
.btn-green:hover { background: #12c393; }
.hero-actions { flex-wrap: wrap; }
@media (max-width: 600px) { .hero-actions { flex-wrap: nowrap; gap: 8px; } .hero-actions .btn { flex: 1 1 auto; padding: 0 10px; font-size: 13px; height: 44px; white-space: nowrap; } }
/* pulled ticket colour by prize: 1st gold (default), 2nd silver, 3rd bronze */
.pull.p2 .pticket { background: linear-gradient(135deg, #ffffff, #dfe4ee 50%, #a9b1c0); color: #262b36; }
.pull.p2 .pticket i { border-top-color: rgba(38,43,54,.25); }
.pull.p2 .locked .grab { filter: drop-shadow(0 0 22px rgba(223,228,238,.7)); }
.pull.p3 .pticket { background: linear-gradient(135deg, #ffd2b0, #e0925e 50%, #a8592c); color: #3a1a06; }
.pull.p3 .pticket i { border-top-color: rgba(58,26,6,.3); }
.pull.p3 .locked .grab { filter: drop-shadow(0 0 22px rgba(224,146,94,.7)); }
