:root {
  --indigo: #0E1235;
  --indigo-2: #1B1638;
  --gold: #F4B63F;
  --gold-hi: #FFD27A;
  --marigold: #F07A1A;
  --maroon: #8C1C3A;
  --maroon-dk: #5A0F24;
  --ivory: #FFF3DC;
  --cream: #FFF0CF;
  --paper: #FFF8EC;
  --lav: #C9C3EA;
  --lav-2: #D9D4F2;
  --ink-soft: #4A4060;
  --line: #8A7F6A;
  --brown: #5C4630;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--indigo); }
body { font-family: 'Mukta', system-ui, sans-serif; color: var(--ivory); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
a { color: var(--gold); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; position: relative; overflow: hidden; }
.screen.dark { background: var(--indigo); color: var(--ivory); }
.screen.light { background: var(--paper); color: var(--indigo-2); align-items: stretch; }
.pad { padding: 18px 22px 24px; width: 100%; display: flex; flex-direction: column; flex: 1; }
.center { align-items: center; text-align: center; }

.toran { width: 100%; height: 34px; flex-shrink: 0; background:
  linear-gradient(var(--gold), var(--gold)) top/100% 2px no-repeat,
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='34'%3E%3Cpolygon points='0,4 30,4 15,28' fill='%23F07A1A'/%3E%3Cpolygon points='30,4 60,4 45,28' fill='%23F4B63F'/%3E%3C/svg%3E") top left/60px 34px repeat-x; }

.brand { width: 100%; padding: 12px 20px 0; display: flex; align-items: center; gap: 12px; }
.badge { width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.badge img { width: 84%; height: 84%; display: block; }
.badge-lg { width: 64px; height: 64px; margin-bottom: 14px; }
.badge-sm { width: 40px; height: 40px; border-width: 1.5px; }
.band-top { display: flex; justify-content: space-between; align-items: center; }
.ticket-logo { width: 52px; height: 52px; display: block; margin: 0 auto 8px; }
.hub-layer { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.hub { width: 18%; aspect-ratio: 1; border-radius: 50%; background: #fff; border: 3px solid var(--gold); box-shadow: 0 0 0 3px #5A0F24, 0 2px 6px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.hub img { width: 84%; height: 84%; display: block; }
.brand-name { font-size: 17px; font-weight: 700; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--lav); line-height: 1.3; }

.hero { text-align: center; padding: 16px 24px 0; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .22em; color: var(--gold); }
.display { font-family: 'Rozha One', serif; font-weight: 400; margin: 2px 0 0; font-size: 54px; line-height: 1; color: var(--ivory); }
.display.gold { color: var(--gold); }
.display.sm { font-size: 30px; line-height: 1.1; }
.light .display { color: var(--indigo-2); }
.lede { margin: 8px auto 0; font-size: 15px; line-height: 1.4; color: var(--lav-2); max-width: 310px; }

.wheel-wrap { position: relative; width: min(340px, 88vw); aspect-ratio: 1 / 1.04; margin-top: 14px; flex-shrink: 0; }
.wheel { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 1; transition: transform 5.2s cubic-bezier(.12,.72,.08,1); will-change: transform; }
.wheel svg { width: 100%; height: 100%; display: block; }
.pointer { position: absolute; left: 50%; top: 0; transform: translateX(-50%); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }

.cta-row { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 0 24px; }
.msg { min-height: 20px; margin: 0; font-size: 14px; color: var(--gold-hi); text-align: center; }

.btn { width: 100%; max-width: 320px; min-height: 54px; border-radius: 28px; border: 0; font-weight: 800; font-size: 18px; letter-spacing: .05em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; padding: 0 18px; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn-gold { background: var(--gold); color: #2B1200; }
.btn-gold:hover { background: var(--gold-hi); color: #2B1200; }
.btn-indigo { background: var(--indigo); color: var(--ivory); max-width: none; }
.btn-ghost { background: transparent; border: 1.5px solid var(--gold); color: var(--ivory); font-size: 15px; letter-spacing: 0; min-height: 48px; font-weight: 700; }

.foot { margin-top: auto; width: 100%; padding: 14px 14px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.foot p { margin: 0 0 4px; font-size: 12px; line-height: 1.5; color: var(--lav); text-align: center; }
.diya { width: 48px; height: 44px; flex-shrink: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 44'%3E%3Cpath d='M24 4 C28 12 29 17 24 21 C19 17 20 12 24 4 Z' fill='%23FFC94D'/%3E%3Cpath d='M24 10 C26 14 26 17 24 19 C22 17 22 14 24 10 Z' fill='%23FFF3DC'/%3E%3Cpath d='M4 24 H44 C42 34 34 40 24 40 C14 40 6 34 4 24 Z' fill='%23C2410C'/%3E%3Cpath d='M4 24 H44' stroke='%23F4B63F' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; animation: flicker 2.4s ease-in-out infinite; }
@keyframes flicker { 0%,100% { opacity: 1 } 50% { opacity: .82 } }

/* Win */
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.win-head { position: relative; text-align: center; padding: 56px 24px 0; display: flex; flex-direction: column; align-items: center; }
.win-head .display { font-size: 46px; }
.prize-card { position: relative; margin-top: 22px; width: min(340px, 88vw); border-radius: 24px; background: var(--cream); color: #2B1200; padding: 26px 22px 22px; text-align: center; border: 3px solid var(--gold); }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: .2em; color: var(--maroon); }
.prize-big { font-family: 'Rozha One', serif; font-size: 50px; line-height: 1.05; margin-top: 8px; }
.prize-sub { font-size: 19px; font-weight: 700; margin-top: 4px; line-height: 1.3; }
.dash { border-top: 2px dashed #C9A86A; margin: 16px 0 12px; }
.small { margin: 0; font-size: 14px; line-height: 1.45; color: var(--brown); }
.steps { position: relative; list-style: none; margin: 24px 0 28px; padding: 0; width: min(340px, 88vw); display: flex; gap: 8px; }
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px; line-height: 1.3; color: var(--lav-2); }
.num { width: 32px; height: 32px; border-radius: 16px; border: 2px solid var(--gold); color: var(--gold); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.num.on { background: var(--gold); color: #2B1200; }
.fine { position: relative; margin: 16px 0 20px; font-size: 12px; color: var(--lav); text-align: center; padding: 0 20px; line-height: 1.5; }
[data-screen="win"] .fine { margin-top: auto; }

/* Claim */
.band { background: var(--indigo); color: var(--ivory); padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.band .display { color: var(--ivory); }
.back { background: none; border: 0; padding: 4px 0; color: var(--gold); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; align-self: flex-start; min-height: 44px; }
.back.dark-text { color: var(--maroon); }
.chip-gold { align-self: flex-start; background: var(--gold); color: #2B1200; border-radius: 999px; padding: 4px 14px; font-size: 14px; font-weight: 800; }
.form { padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; border: 0; margin: 0; padding: 0; }
.field label, .field legend { font-size: 14px; font-weight: 700; padding: 0; }
.field legend { margin-bottom: 8px; }
.field input, .field select, .field textarea { height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: 16px; background: #fff; color: var(--indigo-2); width: 100%; }
.field textarea { height: 70px; padding: 10px 14px; resize: none; }
.field input:focus, .field select:focus, .field textarea:focus, .tel:focus-within, .otp-input:focus { outline: 3px solid rgba(244,182,63,.6); outline-offset: 1px; border-color: var(--indigo); }
.tel { display: flex; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.tel span { display: flex; align-items: center; padding: 0 12px; font-weight: 700; border-right: 1.5px solid #E2D8C4; color: var(--brown); }
.tel input { border: 0; height: auto; border-radius: 0; flex: 1; min-width: 0; outline: none !important; }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chips button { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--indigo-2); font-size: 15px; font-weight: 600; cursor: pointer; }
.chips button[aria-pressed="true"] { border: 2px solid var(--indigo); background: var(--indigo); color: var(--ivory); font-weight: 700; }
.consent { display: flex; gap: 10px; align-items: flex-start; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--indigo); flex-shrink: 0; }
.consent label { font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.consent a, .light a { color: var(--maroon); }
.err { min-height: 0; margin: 0; color: #A3122A; font-size: 14px; font-weight: 600; }
.err:empty { display: none; }

/* OTP */
.otp-head { margin-top: 36px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.otp-head p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.otp-head strong { color: var(--indigo-2); }
.otp-icon { width: 72px; height: 72px; border-radius: 36px; background: var(--indigo); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
#otpForm { display: flex; flex-direction: column; flex: 1; }
.otp-input { margin-top: 30px; height: 64px; width: 100%; text-align: center; font-size: 32px; font-weight: 800; letter-spacing: .5em; padding-left: .5em; border: 2px solid var(--indigo); border-radius: 14px; background: #fff; color: var(--indigo-2); }
.resend { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--ink-soft); min-height: 44px; }
.link { background: none; border: 0; color: var(--maroon); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: 15px; min-height: 44px; }
.otp-foot { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.note { display: flex; gap: 10px; align-items: flex-start; background: #F3E9D6; border-radius: 12px; padding: 12px 14px; color: var(--brown); font-size: 13px; line-height: 1.45; }
.note svg { flex-shrink: 0; margin-top: 2px; }

/* Voucher */
.verified { display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: 15px; font-weight: 700; margin-top: 8px; }
.ticket { margin-top: 16px; width: 100%; max-width: 360px; border-radius: 22px; background: var(--cream); color: #2B1200; overflow: hidden; }
.ticket-top { padding: 18px 22px 18px; }
.ticket-prize { font-family: 'Rozha One', serif; font-size: 36px; line-height: 1.1; margin-top: 8px; }
.ticket-sub { font-size: 14px; margin-top: 6px; color: var(--brown); }
.tear { position: relative; height: 24px; }
.tear::after { content: ""; position: absolute; left: 22px; right: 22px; top: 11px; border-top: 2px dashed #C9A86A; }
.tear i { position: absolute; top: 0; width: 24px; height: 24px; border-radius: 12px; background: var(--indigo); }
.tear i:first-child { left: -12px; } .tear i:last-child { right: -12px; }
.ticket-bottom { padding: 12px 22px 22px; }
.code-label { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--brown); }
.code { margin-top: 2px; font-size: 32px; font-weight: 800; letter-spacing: .12em; color: var(--indigo); user-select: all; }
.facts { margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; text-align: left; font-size: 14px; }
.facts dt { font-size: 12px; color: var(--brown); }
.facts dd { margin: 0; font-weight: 700; word-break: break-word; }
.small-lede { margin-top: 16px; }
.one-offer { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid #E6D3A8; font-size: 13px; font-weight: 700; color: var(--maroon); }
.actions { margin-top: auto; padding-top: 18px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.actions .btn { max-width: none; }
.actions .btn-gold { font-size: 17px; letter-spacing: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.actions .fine { margin: 6px 0 0; }
.closed { justify-content: center; gap: 18px; }
.closed .lede { margin: 0 auto; }

@media (min-width: 481px) {
  body { background: #070A22; }
  .app { box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
}
@media (prefers-reduced-motion: reduce) {
  .wheel { transition-duration: 1.2s; }
  .diya { animation: none; }
}
@media (max-height: 760px) {
  .hero { padding-top: 8px; }
  .hero .display { font-size: 46px; }
  .wheel-wrap { width: min(300px, 84vw); margin-top: 8px; }
  .cta-row { margin-top: 12px; }
}

.fallback { margin-top: 14px; border: 1.5px dashed #C9A86A; background: #FFF4DC; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.fb-title { font-weight: 800; font-size: 16px; color: var(--maroon); }
.fallback p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.btn-sm { min-height: 46px; font-size: 15px; letter-spacing: 0; max-width: none; }
.otp-tip { margin: 6px 0 0; text-align: center; font-size: 13px; color: var(--ink-soft); }
.pend-card { margin-top: 16px; }
[data-screen="pending"] .badge-lg { margin-top: 10px; }

.btn-wa { background: #25D366; color: #06331A; }
.btn-wa:hover { background: #3BE27A; color: #06331A; }
.step-label { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--maroon); }
.wa-code { font-size: 44px; font-weight: 800; letter-spacing: .3em; padding-left: .3em; color: var(--indigo); margin: 2px 0 6px; }
.wa-note { margin: 0; }
.wa-note b { color: var(--gold); }
