:root {
  --red: #D3090B;
  --red-hi: #FF2A2A;
  --red-mid: #A8060A;
  --red-deep: #8A0008;
  --red-dark: #4A0004;
  --gold: #F7C548;
  --gold-hi: #FFE49A;
  --gold-deep: #B9850F;
  --cream: #FFF4DC;
  --ink: #3a0a06;
  --green: #1F7A3A;
  --muted: rgba(255, 244, 220, .74);
  --display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); color: var(--cream); min-height: 100vh; overflow-x: clip;
  background: var(--red-deep) url(../assets/v2/bg-tile.jpg) repeat;
  background-size: 256px 256px;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }

#snow, #confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#snow { z-index: 0; opacity: .55; }
#confetti { z-index: 60; }

.wrap { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; }
main { padding: 0 12px 32px; }

.demo-ribbon { position: relative; z-index: 2; font-size: 11px; text-align: center; padding: 6px 12px; background: var(--red-dark); color: var(--gold-hi); }
.demo-ribbon b { background: var(--gold); color: var(--ink); padding: 1px 6px; border-radius: 4px; margin-right: 6px; letter-spacing: .05em; }

/* ---------- top bar ---------- */
.top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; /* inside .hero */ display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; }
.brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.brand-chip {
  font-family: var(--display); font-size: 13px; letter-spacing: .04em; color: #fff; padding: 5px 10px 4px; border-radius: 8px;
  background: linear-gradient(180deg, var(--red-hi), var(--red) 60%, var(--red-mid)); box-shadow: 0 3px 0 var(--red-dark), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-txt { font-family: var(--display); font-size: 15px; color: var(--gold-hi); text-shadow: 0 2px 0 var(--red-dark); }
.top-actions { display: flex; gap: 6px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: inherit; text-decoration: none; font-size: 16px;
  background: rgba(74, 0, 4, .55); border: 1px solid rgba(247, 197, 72, .35); backdrop-filter: blur(4px); }

/* ---------- hero ---------- */
.hero { position: relative; aspect-ratio: 1080 / 1350; overflow: hidden; }
.hero-art { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 62%; animation: heroZoom 14s ease-in-out infinite alternate; will-change: transform; }
/* slow Ken Burns: gentle zoom in/out on the Codex hero */
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.07) translateY(-1%); } }
/* text zone in the art: x 60-1020, y 100-520 (the raised gift reaches ~y420, so text stays above it) */
.hero-copy { position: absolute; left: 5.5%; right: 5.5%; top: 9.5%; text-align: center; }
.kicker {
  display: inline-block; margin: 0 0 6px; font-weight: 900; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); background: linear-gradient(180deg, var(--gold-hi), var(--gold)); padding: 4px 12px; border-radius: 99px;
  box-shadow: 0 2px 0 var(--gold-deep);
}
.hero h1 {
  font-family: var(--display); font-weight: 400; margin: 0; font-size: clamp(42px, 13.2vw, 62px); line-height: .88; color: #fff;
  text-shadow: 0 3px 0 var(--red-dark), 0 6px 0 rgba(74, 0, 4, .55), 0 10px 28px rgba(0, 0, 0, .45);
}
.hero h1 span {
  background: linear-gradient(180deg, #fff6d0 0%, var(--gold-hi) 30%, var(--gold) 60%, #e39b12 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none; filter: drop-shadow(0 3px 0 var(--red-dark)) drop-shadow(0 6px 10px rgba(0, 0, 0, .4));
}
.hero h1 { animation: titleFloat 4.5s ease-in-out infinite; }
@keyframes titleFloat { 50% { transform: translateY(-4px) scale(1.015); } }
.hero h1 span { background-size: 100% 220%; animation: goldShine 5s ease-in-out infinite; }
@keyframes goldShine { 0%, 100% { background-position: 0 0; } 50% { background-position: 0 100%; } }

/* ---------- countdown plate (overlaps the hero's plain bottom band) ---------- */
.countdown {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: max-content; max-width: calc(100% - 24px); margin: -64px auto 0; padding: 8px 14px;
  background: linear-gradient(180deg, #fffaf0, var(--cream) 50%, #f3dfb4); color: var(--ink); border-radius: 14px;
  box-shadow: 0 0 0 2px var(--gold), 0 4px 0 2px var(--gold-deep), 0 10px 22px rgba(0, 0, 0, .35);
}
.cd-label { font-size: 11px; font-weight: 900; color: var(--red); text-transform: uppercase; letter-spacing: .08em; }
.cd-units { display: flex; gap: 6px; }
.cd-units span { display: flex; align-items: baseline; }
.cd-units b { font-family: var(--display); font-weight: 400; font-size: 21px; color: var(--red-deep); min-width: 2ch; text-align: right; }
.cd-units small { font-size: 10px; font-weight: 800; color: #9a6a3a; margin-left: 1px; }

/* ---------- grand prizes ---------- */
.grand { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 12px 0; }
.g-card {
  position: relative; text-align: center; border-radius: 16px; padding: 8px 4px 9px;
  background: linear-gradient(180deg, #fffaf0, var(--cream) 55%, #f1d9a6); color: var(--ink);
  box-shadow: 0 0 0 2px var(--gold), 0 4px 0 2px var(--gold-deep), 0 10px 18px rgba(0, 0, 0, .3);
}
.g-card.lead { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #e5a21c); }
.g-card .pic { height: 66px; }
.g-card .pic > i { font-size: 40px; }
.g-card b { display: block; font-size: 12.5px; font-weight: 900; margin-top: 4px; line-height: 1.1; }
.g-card small { display: block; font-size: 10.5px; font-weight: 800; color: #8a5a2a; margin-top: 2px; }
.g-card small.out { color: var(--red); }
.g-badge { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 900; letter-spacing: .08em; background: var(--red); color: #fff; padding: 2px 7px; border-radius: 99px; box-shadow: 0 2px 0 var(--red-dark); white-space: nowrap; }

/* image-with-emoji-fallback */
.pic { position: relative; display: grid; place-items: center; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pic > i { font-style: normal; line-height: 1; }
.pic.ok > i { visibility: hidden; }

/* ---------- sponsors: sticky bar at the very top (Codex gift tag, logo area x120-570 y50-210 of 600x260) ---------- */
.sponsors {
  position: sticky; top: 0; z-index: 20; padding: 5px 0 6px;
  background: linear-gradient(180deg, var(--red-dark) 0%, #6e0006 100%);
  box-shadow: 0 2px 0 var(--gold-deep), 0 0 0 0 var(--gold), 0 8px 16px rgba(0, 0, 0, .45);
  border-bottom: 2px solid var(--gold);
}
.sponsors h2 { font-family: var(--display); font-weight: 400; font-size: 13px; letter-spacing: .02em; text-align: center; margin: 0 12px 3px; color: #fff; text-shadow: 0 1px 0 var(--red-dark); }
.sponsors h2 b { color: var(--gold); font-weight: 400; }
.tags-track { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); padding: 3px 0 1px; }
.tags-move { display: flex; gap: 0; width: max-content; animation: tags 80s linear infinite; }
.tags-track:hover .tags-move { animation-play-state: paused; }
@keyframes tags { to { transform: translateX(-50%); } }
.gtag { position: relative; flex: none; width: 112px; aspect-ratio: 600 / 260; background: url(../assets/v2/gift-tag.png) center / 100% 100% no-repeat; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }
.gtag img { position: absolute; left: 21%; top: 21%; width: 73%; height: 57%; object-fit: contain; }
.gtag.new::after { content: 'NOVA'; position: absolute; right: 2px; top: -3px; font-size: 7.5px; font-weight: 900; letter-spacing: .06em; background: var(--red); color: #fff; padding: 1px 4px; border-radius: 99px; box-shadow: 0 1px 0 var(--red-dark); }
.gtag:nth-child(odd) { transform: rotate(-2deg) translateY(1px); }
.gtag:nth-child(even) { transform: rotate(1.5deg); }

/* ---------- plates (CSS: gradient + 3D shadow) ---------- */
.plate {
  margin-top: 18px; padding: 16px 14px; border-radius: 20px;
  background: linear-gradient(180deg, #b30a0e 0%, var(--red-deep) 100%);
  box-shadow: 0 0 0 2px var(--gold), 0 5px 0 2px var(--gold-deep), 0 14px 26px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.plate h2 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0 0 4px; color: #fff; text-shadow: 0 2px 0 var(--red-dark); }
.muted { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; line-height: 1.45; }
.hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.row { display: flex; gap: 8px; }
.row input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--gold-deep);
  background: var(--cream); color: var(--ink); font-weight: 800; font-size: 16px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15);
}
.row input::placeholder { color: #a88a68; }
.row input:focus { outline: 3px solid var(--gold-hi); outline-offset: 1px; }

.btn { height: 48px; padding: 0 18px; border-radius: 14px; border: 0; font-weight: 900; font-size: 15px; transition: transform .08s ease, filter .15s ease; }
.btn:active { transform: translateY(3px); }
.btn:disabled { filter: saturate(.3) brightness(.85); cursor: not-allowed; }
.btn.gold { background: linear-gradient(180deg, #fff3c4, var(--gold) 45%, #e5a21c); color: var(--ink); box-shadow: 0 4px 0 var(--gold-deep), 0 8px 14px rgba(0, 0, 0, .3), inset 0 1px 0 #fff; }
.btn.gold:active { box-shadow: 0 1px 0 var(--gold-deep); }
.btn.red { background: linear-gradient(180deg, #ff5a5a, var(--red-hi) 20%, var(--red) 60%, var(--red-mid)); color: #fff; text-shadow: 0 2px 0 var(--red-dark);
  box-shadow: 0 0 0 2px var(--gold), 0 6px 0 2px var(--gold-deep), 0 12px 22px rgba(0, 0, 0, .4), inset 0 2px 0 rgba(255, 255, 255, .35); }
.btn.red:active { box-shadow: 0 0 0 2px var(--gold), 0 2px 0 2px var(--gold-deep); }
.btn.ghost { background: rgba(74, 0, 4, .45); color: var(--cream); border: 2px solid rgba(247, 197, 72, .55); }
.btn.xl { height: 60px; font-size: 20px; width: 100%; font-family: var(--display); font-weight: 400; letter-spacing: .03em; }
.link { background: none; border: 0; color: var(--gold-hi); font-weight: 800; text-decoration: underline; padding: 4px; font-size: 13px; }

/* ---------- account ---------- */
.step { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 14px; margin: 12px 0 8px; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--gold); color: var(--ink); box-shadow: 0 2px 0 var(--gold-deep); }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pf {
  position: relative; height: 46px; border-radius: 10px; padding: 6px 8px; border: 0;
  background: linear-gradient(180deg, #fffaf0, var(--cream)); box-shadow: 0 3px 0 #d8bf8c, 0 5px 8px rgba(0, 0, 0, .2);
}
.pf img { width: 100%; height: 100%; object-fit: contain; }
.pf.on { box-shadow: 0 0 0 3px var(--gold), 0 3px 0 3px var(--gold-deep), 0 6px 12px rgba(0, 0, 0, .3); transform: translateY(-1px); }
.pf.on::after { content: '✓'; position: absolute; right: -5px; top: -6px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; background: var(--red); color: #fff; box-shadow: 0 1px 0 var(--red-dark); }
.pf.new::before { content: 'NOVA'; position: absolute; left: 4px; top: -6px; font-size: 8px; font-weight: 900; background: var(--red); color: #fff; padding: 1px 4px; border-radius: 99px; }
#pfMore { display: block; margin: 6px auto 0; }

.user-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.user-line b { color: #fff; }
.user-line .link { margin-left: auto; }
.me-pf { width: 92px; height: 34px; border-radius: 8px; background: var(--cream); padding: 4px 6px; box-shadow: 0 2px 0 #d8bf8c; flex: none; }
.me-pf img { width: 100%; height: 100%; object-fit: contain; }
.stats { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; margin: 12px 0 8px; }
.stat { display: flex; align-items: center; gap: 8px; border-radius: 14px; padding: 10px; background: rgba(74, 0, 4, .45); box-shadow: inset 0 0 0 1px rgba(247, 197, 72, .3); }
.stat.big { background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #e5a21c); color: var(--ink); box-shadow: 0 3px 0 var(--gold-deep); }
.stat-n { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--red); }
.stat-n.sm { font-size: 18px; color: #fff; }
.stat-l { font-size: 11.5px; font-weight: 800; color: var(--muted); line-height: 1.2; }
.stat.big .stat-l { color: #6b3a10; }
.stat.pop .stat-n { animation: pop .5s ease; }
@keyframes pop { 40% { transform: scale(1.35); } }
.next-tier { font-size: 13px; font-weight: 800; color: var(--gold-hi); margin: 4px 0 0; min-height: 1em; }

.sim { margin-top: 14px; padding: 12px; border-radius: 14px; border: 2px dashed rgba(247, 197, 72, .5); background: rgba(74, 0, 4, .35); }
.sim-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.tag { font-size: 10px; letter-spacing: .1em; background: var(--gold); color: var(--ink); padding: 2px 6px; border-radius: 4px; font-weight: 900; }
.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 8px; }
.chips button { height: 42px; border-radius: 10px; border: 0; padding: 0; font-weight: 900; font-size: 12.5px; color: var(--ink);
  background: linear-gradient(180deg, #fffaf0, var(--cream)); box-shadow: 0 3px 0 #d8bf8c; }
.chips button:active { transform: translateY(2px); box-shadow: 0 1px 0 #d8bf8c; }

/* ---------- scratch card: Codex frame 1200x860, window x100-1100 y170-790, plaque x410-790 y50-130 ---------- */
.stage-wrap { margin-top: 22px; }
.card { position: relative; aspect-ratio: 1200 / 860; margin: 0 -6px; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45)); }
.win {
  position: absolute; left: 8.333%; top: 19.767%; width: 83.333%; height: 72.093%; overflow: hidden;
  border-radius: 3.6% / 5.8%; touch-action: none; user-select: none; -webkit-user-select: none;
  background: var(--red) url(../assets/v2/foil-wrap.jpg) center / cover;
}
.frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* plaque: Codex's inner area measures x 331-854, y 33-160 (curved). A CSS cream plate covers it
   (hides the hard flat box Codex pasted at x 410-790) and the logo is pinned inside, never overflowing. */
.plaque {
  position: absolute; left: 28.5%; top: 4.884%; width: 41.75%; height: 12.79%; pointer-events: none;
  border-radius: 16.8% / 41.8%;
  background: radial-gradient(ellipse at 50% 35%, #fffdf6 0%, var(--cream) 55%, #f3e0bb 100%);
  box-shadow: inset 0 2px 3px rgba(185, 133, 15, .35), inset 0 -2px 3px rgba(255, 255, 255, .7);
}
.plaque img { position: absolute; left: 6%; top: 8%; width: 88%; height: 84%; object-fit: contain; }
.plaque span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); color: var(--red); font-size: clamp(11px, 3.6vw, 16px); letter-spacing: .02em; }

/* under the foil: light panel; prize zone x250-750 y60-460, name zone y470-600 (of 1000x620) */
.prize-layer { position: absolute; inset: 0; background: var(--cream) url(../assets/v2/light-panel.jpg) center / cover; color: var(--ink); }
.prize-layer.idle { background: none; display: grid; place-items: center; text-align: center; }
.idle-msg { font-family: var(--display); font-size: clamp(18px, 6vw, 26px); color: var(--gold-hi); text-shadow: 0 2px 0 var(--red-dark), 0 4px 10px rgba(0, 0, 0, .4); line-height: 1.05; padding: 0 12%; }
.idle-msg small { display: block; font-family: var(--body); font-weight: 800; font-size: 12px; color: #fff; margin-top: 6px; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.p-burst { position: absolute; left: 50%; top: 42%; width: 78%; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .9; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.p-pic { position: absolute; left: 27%; top: 8%; width: 46%; height: 62%; }
.p-pic > i { font-size: 64px; }
.p-plate {
  position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); max-width: 86%; display: flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 6px; border-radius: 99px; white-space: nowrap;
  background: linear-gradient(180deg, var(--red-hi), var(--red) 55%, var(--red-mid)); color: #fff;
  box-shadow: 0 0 0 2px var(--gold), 0 3px 0 2px var(--gold-deep), 0 6px 12px rgba(0, 0, 0, .3);
}
.p-plate .pl-logo { width: 54px; height: 22px; border-radius: 99px; background: var(--cream); padding: 2px 5px; flex: none; }
.p-plate .pl-logo img { width: 100%; height: 100%; object-fit: contain; }
.p-plate b { font-family: var(--display); font-weight: 400; font-size: clamp(14px, 4.8vw, 20px); text-shadow: 0 2px 0 var(--red-dark); overflow: hidden; text-overflow: ellipsis; }

#scratch { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; transition: none; } /* appear instantly: no fade-in that would show the prize */
#scratch.done { opacity: 0; pointer-events: none; transition: opacity .6s ease; } /* fade only when revealing */
.stage-hint { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); pointer-events: none; white-space: nowrap;
  background: rgba(74, 0, 4, .82); color: #fff; font-weight: 800; font-size: 12px; padding: 5px 12px; border-radius: 99px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -4px); } }
.stage-actions { display: grid; gap: 10px; margin-top: 14px; }
.stage-msg { text-align: center; font-size: 14px; font-weight: 800; color: var(--gold-hi); min-height: 1.2em; margin: 10px 0 0; }

/* ---------- ticker ---------- */
.ticker { display: flex; align-items: center; gap: 8px; margin-top: 16px; border-radius: 12px; padding: 7px 10px; overflow: hidden;
  background: linear-gradient(180deg, #fffaf0, var(--cream)); color: var(--ink); box-shadow: 0 0 0 2px var(--gold), 0 3px 0 2px var(--gold-deep); }
.ticker-tag { flex: none; font-size: 10px; font-weight: 900; letter-spacing: .1em; background: var(--red); color: #fff; padding: 3px 7px; border-radius: 4px; }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-move { display: inline-flex; align-items: center; white-space: nowrap; font-size: 13px; font-weight: 800; animation: tick 30s linear infinite; }
/* each item carries its own right padding (no flex gap), so the duplicated half loops exactly at -50% */
.ticker-move > span { flex: none; display: inline-flex; align-items: center; gap: 4px; padding-right: 28px; }
.ticker-move b { color: var(--red); }
.ticker-move img { height: 16px; width: auto; max-width: none; flex: none; display: block; }
.ticker-move.static { animation: none; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- history ---------- */
.history { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.history li { display: flex; align-items: center; gap: 10px; background: rgba(74, 0, 4, .45); padding: 8px 10px; border-radius: 12px; }
.history .pic { width: 40px; height: 40px; flex: none; }
.history .pic > i { font-size: 26px; }
.h-main { flex: 1; min-width: 0; }
.h-main b { display: block; font-size: 14px; }
.h-main small { color: var(--muted); font-size: 11.5px; }
.badge { font-size: 11px; font-weight: 900; padding: 4px 9px; border-radius: 99px; white-space: nowrap; border: 0; }
.badge.pending { background: var(--gold); color: var(--ink); }
.badge.verified { background: #fff; color: #14506b; }
.badge.shipped { background: #fff; color: #5a2a8a; }
.badge.delivered, .badge.credited { background: var(--green); color: #fff; }
.badge.rejected { background: var(--red-dark); color: #ffc2c8; }
.badge.todo { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--ink); box-shadow: 0 2px 0 var(--gold-deep); }

/* ---------- tiers / odds ---------- */
.tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tiers li { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 12px; font-weight: 800; font-size: 14px;
  background: linear-gradient(180deg, #fffaf0, var(--cream)); color: var(--ink); box-shadow: 0 3px 0 #d8bf8c; }
.tiers li span:last-child { color: var(--red); font-family: var(--display); font-weight: 400; font-size: 18px; }
.tiers li.me { box-shadow: 0 0 0 3px var(--gold), 0 3px 0 3px var(--gold-deep); }
.odds { display: grid; gap: 6px; }
.odd { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 12px; background: rgba(74, 0, 4, .45); }
.odd .pic { width: 42px; height: 42px; }
.odd .pic > i { font-size: 26px; }
.odd b { font-size: 14px; display: block; }
.odd small { font-size: 11.5px; color: var(--muted); }
.odd .pct { font-family: var(--display); font-size: 17px; color: var(--gold); text-align: right; }
.odd.out { opacity: .5; }
.odd.out .pct { font-family: var(--body); font-weight: 900; font-size: 11px; color: #ffc2c8; }

.rules details { border-top: 1px solid rgba(247, 197, 72, .3); padding: 10px 0; }
.rules details:first-of-type { border-top: 0; }
.rules summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.rules summary::-webkit-details-marker { display: none; }
.rules summary::after { content: '+'; color: var(--gold); font-weight: 900; }
.rules details[open] summary::after { content: '–'; }
.rules p { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 8px 0 0; }

.foot { text-align: center; padding: 10px 16px 40px; font-size: 13px; }
.foot p { margin: 4px 0; }
.foot b { background: var(--gold); color: var(--ink); padding: 1px 6px; border-radius: 4px; margin-right: 4px; }

/* ---------- result modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 14px; background: rgba(40, 0, 2, .82); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; width: 100%; max-width: 380px; max-height: calc(100vh - 28px); overflow: auto; text-align: center;
  background: linear-gradient(180deg, #fffaf0, var(--cream) 50%, #f3dfb4); color: var(--ink); border-radius: 24px; padding: 4px 16px 18px;
  box-shadow: 0 0 0 4px var(--gold), 0 8px 0 4px var(--gold-deep), 0 30px 60px rgba(0, 0, 0, .55);
  animation: zoomIn .45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes zoomIn { from { transform: scale(.6); opacity: 0; } }
.modal-x { position: absolute; z-index: 2; top: 8px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(138, 0, 8, .1); font-size: 22px; color: var(--ink); }
.m-stage { position: relative; height: 236px; margin: 0 -16px; }
.m-burst { position: absolute; left: 50%; top: 50%; width: 230px; height: 230px; margin: -115px 0 0 -115px; animation: spin2 16s linear infinite; }
@keyframes spin2 { to { transform: rotate(360deg); } }
.m-pic { position: absolute; left: 50%; top: 50%; width: 136px; height: 136px; margin: -68px 0 0 -68px; }
.m-pic .pic { width: 100%; height: 100%; }
.m-pic .pic > i { font-size: 80px; }
.m-kicker { margin: 0; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--red); font-size: 12px; }
.modal-card h3 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 4px 0 10px; line-height: 1; color: var(--red-deep); }
.m-where { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: #7a5532; margin-bottom: 8px; }
.m-where img { height: 20px; width: auto; }
.code-box { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 6px 0 8px; }
.code-box code { font-size: 16px; font-weight: 900; letter-spacing: .06em; background: #fff; border: 2px dashed var(--gold-deep); padding: 10px 10px; border-radius: 10px; }
.code-box .btn { height: 44px; }
.m-note { font-size: 13px; color: #6b4a2a; margin: 6px 0 14px; line-height: 1.45; }
.claim-form { display: grid; gap: 7px; text-align: left; margin-top: 6px; }
.claim-form label { font-size: 12px; font-weight: 800; color: #6b4a2a; }
.claim-form input[type=text], .claim-form input[type=tel] { width: 100%; height: 46px; border-radius: 10px; border: 2px solid #e2c98e; padding: 0 12px; font-weight: 700; font-size: 16px; background: #fff; color: var(--ink); }
.claim-form .chk { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; font-weight: 700; color: #6b4a2a; }
.claim-form .chk input { margin-top: 2px; }
.modal-card .btn.ghost { color: var(--ink); border-color: #e2c98e; background: #fff; }
.m-actions { display: grid; gap: 8px; margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 70; background: var(--cream); color: var(--ink); font-weight: 800; font-size: 14px; padding: 12px 16px; border-radius: 12px; box-shadow: 0 0 0 2px var(--gold), 0 10px 30px rgba(0, 0, 0, .4); max-width: calc(100% - 32px); text-align: center; animation: toastIn .3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

@media (min-width: 520px) {
  .wrap { box-shadow: 0 0 0 1px rgba(247, 197, 72, .2), 0 0 80px rgba(0, 0, 0, .5); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #snow { display: none; }
}
