:root {
  color-scheme: dark;
  --ink: #07131f;
  --ink-soft: #0b2438;
  --paper: #ffffff;
  --yellow: #ffc400;
  --yellow-bright: #ffd633;
  --red: #e52b38;
  --green: #169b5b;
  --muted: rgba(255, 255, 255, 0.66);
  --line: rgba(255, 255, 255, 0.14);
  font-family: Arial, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: #050e17; }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--paper); background: #050e17; }
body.lead-is-open { overflow: hidden; }
button, input, a { font: inherit; -webkit-tap-highlight-color: transparent; }
button, a, canvas { outline: none; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #6aa9ff; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app {
  position: relative;
  isolation: isolate;
  width: min(100%, 1180px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding: max(20px, env(safe-area-inset-top)) clamp(18px, 4vw, 52px) max(26px, env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    radial-gradient(circle at 91% 4%, rgba(255, 196, 0, 0.2), transparent 28rem),
    radial-gradient(circle at 4% 44%, rgba(22, 155, 91, 0.12), transparent 24rem),
    linear-gradient(145deg, #0c2940 0%, var(--ink) 52%, #050e17 100%);
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.44);
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.road-lines {
  position: absolute;
  z-index: -2;
  right: -145px;
  top: 230px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 72px rgba(255,255,255,.025), 0 0 0 144px rgba(255,255,255,.018);
}

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; }
.brand-mark { display: flex; gap: 4px; }
.brand-mark i { width: 17px; height: 17px; display: block; border-radius: 50%; background: var(--red); }
.brand-mark i:nth-child(2) { background: var(--yellow); }
.brand-mark i:nth-child(3) { background: var(--green); }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 21px; letter-spacing: -0.7px; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.category-chip { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.055); }
.category-chip small { color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.category-chip strong { font-size: 12px; letter-spacing: .04em; }

.hero { min-height: 280px; display: grid; grid-template-columns: minmax(0, 1fr) 170px; align-items: center; gap: 36px; padding: clamp(44px, 7vw, 86px) 0 36px; }
.hero-copy { max-width: 820px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid rgba(255,196,0,.3); border-radius: 999px; color: #ffe17a; background: rgba(255,196,0,.08); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px rgba(255,196,0,.12); animation: pulse 1.6s ease-in-out infinite; }
.eyebrow { margin: 21px 0 10px; color: rgba(255,255,255,.58); font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
h1 { max-width: 900px; margin: 0; font-size: clamp(38px, 6.2vw, 76px); line-height: .95; letter-spacing: -.055em; text-transform: uppercase; }
h1 span { color: var(--yellow); }
.subtitle { max-width: 690px; margin: 22px 0 0; color: var(--muted); font-size: clamp(14px, 1.7vw, 18px); line-height: 1.55; }
.hero-sign { width: 160px; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; border: 9px solid var(--yellow); border-radius: 50%; color: var(--ink); background: var(--paper); box-shadow: 0 22px 60px rgba(0,0,0,.28); transform: rotate(5deg); }
.hero-sign span { font-size: 59px; font-weight: 900; line-height: .8; }
.hero-sign strong { margin-top: 7px; font-size: 20px; line-height: 1; }
.hero-sign small { margin-top: 5px; color: #59626c; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.ticket { position: relative; padding: clamp(18px, 3vw, 30px); border: 1px solid rgba(255,255,255,.22); border-radius: 28px; background: rgba(255,255,255,.075); box-shadow: 0 28px 80px rgba(0,0,0,.3); backdrop-filter: blur(16px); }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 90px; width: 24px; height: 48px; background: #07131f; }
.ticket::before { left: -1px; border-radius: 0 24px 24px 0; }
.ticket::after { right: -1px; border-radius: 24px 0 0 24px; }
.ticket-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 7px 18px; border-bottom: 1px dashed rgba(255,255,255,.2); }
.ticket-head > div:first-child { display: grid; gap: 6px; }
.ticket-head span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.ticket-head strong { font-size: 15px; }
.ticket-progress { min-width: 145px; display: grid; justify-items: end; gap: 4px; }
.ticket-progress strong { color: var(--yellow); font-size: 22px; }
.scratch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 20px; }
.scratch-card { position: relative; height: 178px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; background: rgba(2,10,17,.64); box-shadow: inset 0 0 0 1px rgba(255,255,255,.02); }
.scratch-card--featured { transform: translateY(-5px); box-shadow: 0 17px 35px rgba(0,0,0,.22); }
.scratch-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 2px solid transparent; border-radius: inherit; transition: border-color .2s ease; }
.scratch-card.revealed::after { border-color: var(--card-accent); }
.prize { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; text-align: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--card-accent) 22%, transparent), transparent 65%); }
.prize-index { position: absolute; top: 12px; left: 14px; color: var(--card-accent); font-size: 11px; font-weight: 900; }
.prize small { color: rgba(255,255,255,.57); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.prize strong { margin: 9px 0 5px; color: #fff; font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.055em; }
.prize > span:last-child { color: rgba(255,255,255,.52); font-size: 11px; }
.scratch-card canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; cursor: grab; touch-action: none; transition: opacity .25s ease; }
.scratch-card canvas:focus-visible { outline: 0; box-shadow: inset 0 0 0 4px #6aa9ff, inset 0 0 0 7px rgba(7, 19, 31, .72); }
.scratch-card canvas:active { cursor: grabbing; }
.scratch-card.revealed canvas { pointer-events: none; opacity: 0; }
.scratch-progress { position: absolute; z-index: 3; right: 14px; bottom: 10px; left: 14px; height: 3px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.13); pointer-events: none; }
.scratch-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--card-accent); transition: width .12s ease; }
.scratch-card.revealed .scratch-progress { opacity: 0; }
.gesture-hint { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; margin-top: 17px; color: rgba(255,255,255,.7); text-align: left; }
.gesture-hint > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink); background: var(--yellow); font-size: 18px; animation: swipe 1.5s ease-in-out infinite; }
.gesture-hint div { display: grid; gap: 2px; }
.gesture-hint strong { font-size: 12px; }
.gesture-hint small { color: rgba(255,255,255,.47); font-size: 10px; }

.result { margin-top: 24px; padding: clamp(28px, 5vw, 48px); border-radius: 28px; color: var(--ink); text-align: center; background: linear-gradient(120deg, #fff, #f4f6f7); box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: rise .55s ease both; }
.result > span { color: #6b737c; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.result > strong { display: block; margin: 9px 0 2px; color: #9a7300; font-size: clamp(48px, 8vw, 86px); letter-spacing: -.07em; }
.result p { margin: 0 0 22px; color: #4f5a65; font-size: 15px; }
.result button { width: min(100%, 440px); min-height: 54px; padding: 0 20px; border: 0; border-radius: 14px; color: var(--ink); background: linear-gradient(90deg, var(--yellow), var(--yellow-bright)); font-weight: 900; }
.result button b { float: right; font-size: 20px; }
.result button { cursor: pointer; box-shadow: 0 14px 30px rgba(197, 145, 0, .2); transition: transform .18s ease, box-shadow .18s ease; }
.result button:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(197, 145, 0, .28); }
.result small { display: block; margin-top: 10px; color: #707983; font-size: 10px; }
.trust { display: flex; justify-content: space-between; gap: 18px; padding: 22px 5px 0; color: rgba(255,255,255,.44); font-size: 10px; }
.trust nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 15px; }
.trust a { min-height: 28px; display: inline-flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.22); }
.trust a:hover { color: #fff; border-color: var(--yellow); }
.confetti { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 7px; height: 13px; animation: fall 2.8s linear forwards; }

.lead-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: rgba(3, 10, 17, .74);
  backdrop-filter: blur(10px);
  animation: fade-in .24s ease both;
}

.lead-panel {
  position: relative;
  width: min(100%, 550px);
  padding: 31px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255,196,0,.3);
  border-radius: 28px;
  background:
    radial-gradient(circle at 93% 4%, rgba(255,196,0,.18), transparent 34%),
    linear-gradient(150deg, #0d314b, #07131f 70%);
  box-shadow: 0 34px 100px rgba(0,0,0,.55);
  animation: modal-in .35s cubic-bezier(.2,.8,.2,1) both;
}

.lead-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.07);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.lead-badge { display: inline-flex; padding: 8px 11px; border-radius: 10px; color: var(--ink); background: var(--yellow); font-size: 12px; font-weight: 900; transform: rotate(-2deg); }
.lead-kicker { display: block; margin: 20px 0 7px; color: #ffe17a; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.lead-panel h2 { max-width: 430px; margin: 0; font-size: clamp(27px, 5vw, 38px); line-height: 1.04; letter-spacing: -.045em; }
.lead-panel > p { max-width: 440px; margin: 13px 0 21px; color: var(--muted); font-size: 13px; line-height: 1.52; }
.lead-panel form { display: grid; gap: 13px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.field input {
  width: 100%;
  height: 53px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 13px;
  color: #fff;
  background: rgba(0,0,0,.2);
  outline: none;
  font-size: 16px;
  font-weight: 700;
}
.field input:focus { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,196,0,.1); }
.field input[aria-invalid="true"] { border-color: #ff6c76; }
.field small { color: rgba(255,255,255,.46); font-size: 9px; line-height: 1.4; }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: start; color: rgba(255,255,255,.62); }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--yellow); }
.consent span { font-size: 9px; line-height: 1.5; }
.consent a { color: #ffe17a; text-decoration: underline; text-underline-offset: 2px; }
.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lead-submit { min-height: 54px; padding: 0 18px; border: 0; border-radius: 14px; color: var(--ink); background: linear-gradient(90deg, var(--yellow), var(--yellow-bright)); font-size: 12px; font-weight: 900; cursor: pointer; }
.lead-submit b { float: right; font-size: 20px; }
.lead-submit:disabled { cursor: wait; opacity: .65; }
.form-status { min-height: 17px; margin: 0; color: #ffe17a; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.45; }
.lead-panel.is-success form > :not(.form-status) { display: none; }
.lead-panel.is-success .form-status { padding: 20px; border: 1px solid rgba(255,196,0,.24); border-radius: 15px; background: rgba(255,196,0,.08); font-size: 14px; }

@keyframes pulse { 50% { opacity: .45; transform: scale(.72); } }
@keyframes swipe { 50% { transform: translateX(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }

@media (max-width: 760px) {
  .app { width: min(100%, 520px); padding-inline: 16px; }
  .category-chip { padding: 8px 10px; }
  .category-chip small { display: none; }
  .category-chip strong { font-size: 9px; }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 0; padding: 36px 2px 25px; }
  .hero-sign { display: none; }
  .subtitle { margin-top: 17px; font-size: 14px; }
  .ticket { padding: 16px 13px; border-radius: 22px; }
  .ticket::before, .ticket::after { top: 71px; width: 16px; height: 34px; }
  .ticket-head { align-items: center; padding: 0 5px 14px; }
  .ticket-head > div:first-child strong { font-size: 12px; }
  .ticket-progress { min-width: 108px; }
  .ticket-progress strong { font-size: 17px; }
  .scratch-grid { grid-template-columns: 1fr; gap: 9px; padding-top: 13px; }
  .scratch-card, .scratch-card--featured { height: 104px; transform: none; }
  .prize { align-items: flex-start; padding: 14px 21px 14px 62px; text-align: left; }
  .prize-index { top: 50%; left: 18px; font-size: 17px; transform: translateY(-50%); }
  .prize strong { margin: 5px 0 2px; font-size: 29px; }
  .scratch-progress { left: 62px; }
  .gesture-hint { margin-top: 11px; }
  .trust { flex-direction: column; align-items: center; gap: 7px; text-align: center; }
  .trust nav { justify-content: center; }
  .lead-overlay { align-items: end; padding: 0; }
  .lead-panel { width: min(100%, 520px); max-height: 100vh; max-height: 100dvh; padding: max(27px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 27px 27px 0 0; animation-name: sheet-in; }
  .lead-close { top: max(16px, env(safe-area-inset-top)); }
  .lead-panel h2 { padding-right: 28px; font-size: 28px; }
}

@media (max-width: 380px) {
  .brand-copy strong { font-size: 18px; }
  .brand-mark i { width: 14px; height: 14px; }
  h1 { font-size: 35px; }
  .scratch-card { height: 98px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@keyframes sheet-in { from { opacity: 0; transform: translateY(100%); } }
