/* ============================================================
   آفرایدی مهروماه — بلک فرایدی ۱۴۰۵
   رنگ‌ها از دیزاین‌سیستم مهروماه، در حال‌وهوای شب و نئون
   ============================================================ */

@font-face { font-family: "Kalameh FaNum"; src: url("fonts/KalamehFaNum-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Kalameh FaNum"; src: url("fonts/KalamehFaNum-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Kook FaNum"; src: url("fonts/KookFaNum-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Kook FaNum"; src: url("fonts/KookFaNum-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Kook FaNum"; src: url("fonts/KookFaNum-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* پایه: شب مهروماه */
  --night: #020c18;
  --night-2: #041a2e;      /* surface تم تیره */
  --panel: #0a2d4a;        /* surface-raised تم تیره */
  --line: #1d4566;
  --line-strong: #5b7c9a;
  --ink: #f2edf6;          /* lavender-50 */
  --ink-muted: #a9bdd1;
  --navy-900: #052139;

  /* برند + نسخهٔ نئونی */
  --cyan: #01b4e5;
  --neon-cyan: #22c8ff;
  --plum: #8e2689;
  --neon-magenta: #ff3fd8;
  --sun: #fdcc50;
  --neon-sun: #ffc93a;

  --display: "Kalameh FaNum", "Kook FaNum", Tahoma, sans-serif;
  --text: "Kook FaNum", Tahoma, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-md: 14px;
  --radius-lg: 24px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--night);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.85;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--cyan);
  color: var(--navy-900);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.wrap {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
}

/* ---------- دکمه ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 26px;
  border: 0;
  border-radius: var(--radius-md);
  font-family: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn--primary {
  background: var(--cyan);
  color: var(--navy-900);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 10px 34px -6px rgba(1, 180, 229, .55);
}
.btn--primary:hover {
  background: #25c4f0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 12px 44px -4px rgba(34, 200, 255, .75);
  transform: translateY(-2px);
}
.btn--lg { min-height: 58px; padding: 12px 40px; font-size: 18px; }

/* ---------- نوار بالا ---------- */
.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
}
.topbar__brand img { width: auto; height: 62px; }
.topbar__shop {
  padding: 8px 18px;
  border: 1px solid rgba(242, 237, 246, .22);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: rgba(4, 26, 46, .5);
  backdrop-filter: blur(6px);
  transition: border-color .2s ease, color .2s ease;
}
.topbar__shop:hover { border-color: var(--neon-cyan); color: #fff; }

/* ============================================================
   ۱. هیرو — تابلوی نئون و ویترین سه جعبه
   ============================================================ */
.hero {
  /* اندازهٔ جعبه‌های ویترین؛ نورها هم با همین اعداد روی جعبه‌ها نشانه می‌روند */
  --main-w: clamp(150px, min(22vw, 27vh), 300px);
  --side-w: clamp(100px, min(14vw, 18vh), 196px);
  --side-off: calc((var(--main-w) + var(--side-w)) / 2 - 14px);
  --px: 0;   /* موقعیت اشاره‌گر، -۱ تا ۱ (از js/hero.js) */
  --py: 0;

  position: relative;
  isolation: isolate;
  /* هیرو همیشه دقیقاً یک صفحه است؛ بخش بعدی فقط با اسکرول یا دکمه دیده می‌شود */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(84px, 11vh, 130px) var(--gutter) 0;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(60% 38% at 50% 100%, rgba(1, 180, 229, .12), transparent 72%),
    radial-gradient(110% 70% at 50% 0%, #072440 0%, var(--night) 62%);
}

/* ---------- نورهای موضعی ----------
   هر نور یک مخروط نرم (conic-gradient) است که از سقف دقیقاً روی یک جعبه می‌تابد؛
   لبه‌ها با زاویه نرم می‌شوند و طول نور با mask محو می‌شود. بدون blur، پس تمیز و سبک. */
.hero__lights {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  translate: calc(var(--px) * -22px) calc(var(--py) * -6px);
}
.beam {
  --a: 15deg;                    /* نیم‌زاویهٔ مخروط */
  --soft: 7deg;                  /* نرمی لبه */
  --c: rgba(233, 246, 255, .2);
  position: absolute;
  top: -3%;
  left: 50%;
  width: 1200px;
  height: 104%;
  margin-left: -600px;
  transform-origin: 50% 0;
  background: conic-gradient(from 180deg at 50% 0%,
    var(--c) 0deg,
    var(--c) calc(var(--a) - var(--soft)),
    transparent var(--a),
    transparent calc(360deg - var(--a)),
    var(--c) calc(360deg - var(--a) + var(--soft)),
    var(--c) 360deg);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, #000 22%, rgba(0,0,0,.85) 62%, transparent 96%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, #000 22%, rgba(0,0,0,.85) 62%, transparent 96%);
  mix-blend-mode: screen;
  animation: beam-breathe 7s ease-in-out infinite alternate, beam-sway 11s ease-in-out infinite alternate;
}
.beam::before {               /* سرِ چراغ */
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 90px;
  height: 46px;
  margin-left: -45px;
  margin-top: -14px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .9), var(--c) 45%, transparent);
}
.beam--c { --a: 14deg; --c: rgba(236, 248, 255, .22); }
.beam--l { --a: 11deg; --c: rgba(34, 200, 255, .26); margin-left: calc(-600px - var(--side-off)); animation-delay: -2s, -4s; }
.beam--r { --a: 11deg; --c: rgba(255, 63, 216, .24); margin-left: calc(-600px + var(--side-off)); animation-delay: -5s, -7s; }
@keyframes beam-breathe { from { opacity: .78; } to { opacity: 1; } }
@keyframes beam-sway { from { rotate: -1.6deg; } to { rotate: 1.6deg; } }

.hero__dust { position: absolute; inset: 0; width: 100%; height: 100%; }

/* سایهٔ ملایم بالای صفحه تا متن روی نور خوانا بماند */
.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 46%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(2, 12, 24, .55), transparent);
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 880px;
  translate: calc(var(--px) * -12px) calc(var(--py) * -6px);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(8px, 1.6vh, 18px);
  padding: 4px 16px;
  border: 1px solid rgba(253, 204, 80, .4);
  border-radius: 999px;
  color: var(--sun);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
  text-shadow: 0 0 14px rgba(253, 204, 80, .45);
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  line-height: 1.22;
}

/* تابلوی نئون */
.neon {
  display: block;
  font-size: clamp(56px, min(12vw, 14.5vh), 156px);
  color: #eafcff;
  text-shadow:
    0 0 2px #fff,
    0 0 9px var(--neon-cyan),
    0 0 20px var(--neon-cyan),
    0 0 44px rgba(34, 200, 255, .8),
    0 0 96px rgba(34, 200, 255, .5);
  animation: neon-on 1.7s ease-out .2s both;
}
@keyframes neon-on {
  0%   { opacity: .08; text-shadow: none; }
  10%  { opacity: 1; }
  14%  { opacity: .25; text-shadow: none; }
  24%  { opacity: 1; }
  52%  { opacity: .55; }
  58%  { opacity: 1; }
  100% { opacity: 1; }
}

.hero__brand {
  display: block;
  margin-top: -.06em;
  font-size: clamp(38px, min(6.6vw, 8.6vh), 92px);
  color: var(--ink);
  text-shadow: 0 0 28px rgba(255, 63, 216, .35);
}

.hero__lede {
  max-width: 40em;
  margin: clamp(8px, 1.4vh, 14px) auto clamp(14px, 2.6vh, 24px);
  color: var(--ink-muted);
  font-size: clamp(15px, min(1.55vw, 2.1vh), 19px);
  line-height: 1.85;
}

/* ویترین سه جعبه */
.hero__stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  min-height: 0;
  margin-top: 8px;
  padding-bottom: clamp(34px, 5.2vh, 56px);
}
.hero__box { position: relative; z-index: 1; flex: none; height: auto; pointer-events: none; user-select: none; }
.hero__box--main {
  z-index: 2;
  width: var(--main-w);
  filter: drop-shadow(0 0 36px rgba(34, 200, 255, .26));
  translate: calc(var(--px) * 46px) calc(var(--py) * 12px);
  animation: bob 6s ease-in-out infinite;
}
.hero__box--side {
  width: var(--side-w);
  margin: 0 -14px 1.5%;
  filter: brightness(.82) saturate(.95);
  translate: calc(var(--px) * 28px) calc(var(--py) * 8px);
}
/* دایره‌های نور روی زمین، زیر هر جعبه */
.pool {
  position: absolute;
  bottom: clamp(28px, 4.4vh, 48px);
  left: 50%;
  height: clamp(40px, 7vh, 70px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.pool--c { width: calc(var(--main-w) * 1.5); margin-left: calc(var(--main-w) * -.75); background: radial-gradient(closest-side, rgba(220, 244, 255, .42), rgba(34, 200, 255, .14) 55%, transparent); translate: calc(var(--px) * 46px) 0; }
.pool--l { width: calc(var(--side-w) * 1.5); margin-left: calc(var(--side-w) * -.75 - var(--side-off)); background: radial-gradient(closest-side, rgba(34, 200, 255, .38), transparent); translate: calc(var(--px) * 28px) 0; }
.pool--r { width: calc(var(--side-w) * 1.5); margin-left: calc(var(--side-w) * -.75 + var(--side-off)); background: radial-gradient(closest-side, rgba(255, 63, 216, .34), transparent); translate: calc(var(--px) * 28px) 0; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* راهنمای اسکرول پایین صفحه */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(6px, 1.6vh, 16px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border-radius: 50%;
  color: var(--ink-muted);
  animation: scroll-cue 2.2s ease-in-out 3.2s infinite both;
}
.hero__scroll svg { width: 26px; height: 26px; }
.hero__scroll:hover { color: var(--ink); }
@keyframes scroll-cue {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50%      { transform: translateY(8px); opacity: 1; }
}

/* ============================================================
   ۲. جعبه‌ها
   ============================================================ */
.boxes {
  position: relative;
  padding: clamp(80px, 11vw, 140px) var(--gutter) clamp(72px, 9vw, 120px);
  background: linear-gradient(to bottom, var(--night), #031326 40%, var(--night));
}
/* نور موضعی که دنبال اشاره‌گر می‌آید */
.boxes::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 35%), rgba(233, 251, 255, .06), transparent 70%);
}

.boxes__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-bottom: clamp(80px, 11vw, 130px);
}

.h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(28px, 4.3vw, 52px);
  line-height: 1.4;
  text-wrap: balance;
}

/* نوار زرد کج — زبان هایلایت مهروماه */
.hl {
  display: inline-block;
  padding: 0 .28em;
  border-radius: var(--radius-md);
  background: var(--sun);
  color: var(--navy-900);
  transform: rotate(-2deg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .45), 0 0 30px rgba(253, 204, 80, .35);
}

.boxes__hint {
  max-width: 34em;
  margin-top: 10px;
  color: var(--ink-muted);
}
/* کاربرِ واردنشده: پیام ورود کنار تیتر جعبه‌ها */
.login-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(253, 204, 80, .35);
  border-radius: var(--radius-md);
  background: rgba(253, 204, 80, .07);
  color: var(--ink);
  font-size: 15px;
}
.login-note[hidden] { display: none; }
.login-note__btn {
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--navy-900);
  font-weight: 700;
  text-decoration: none;
}
.login-note__btn:hover { filter: brightness(1.06); }

.meter { display: flex; align-items: center; gap: 14px; }
.meter__label { color: var(--ink-muted); font-size: 15px; white-space: nowrap; }
.meter__label b { color: var(--ink); font-size: 18px; }
.meter__slots {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.meter__slots li {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.meter__slots li.is-A { border: 0; background: var(--sun); color: var(--navy-900); box-shadow: 0 0 18px rgba(253, 204, 80, .6); }
.meter__slots li.is-B { border: 0; background: var(--cyan); color: var(--navy-900); box-shadow: 0 0 18px rgba(34, 200, 255, .5); }
.meter__slots li.is-C { border: 1.5px solid var(--line); background: var(--panel); color: var(--ink-muted); }

/* شبکهٔ جعبه‌ها */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(60px, 9vw, 116px) clamp(10px, 3.4vw, 48px);
}
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.box {
  --glow: var(--neon-cyan);
  --glow-a: rgba(34, 200, 255, .55);

  position: relative;
  container-type: inline-size;
  aspect-ratio: 1 / .86;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease var(--d, 0ms), transform .6s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms), filter .4s ease;
}
.grid.is-in .box { opacity: 1; transform: none; }

/* شش نسخهٔ جعبه، همه با بدنهٔ اصلی؛ المان کتاب‌ها روی سر یا کنار جعبه — رندر Blender.
   --al/--at/--aw/--ah: جای قاب رندر نسبت به خانه، طوری که خود جعبه در همهٔ نسخه‌ها ۷۴٪ عرض خانه باشد. */
.box[data-variant="dice"] { --al: 6.48cqi; --at: -41.16cqi; --aw: 93.57cqi; --ah: 142.48cqi; --closed: url("assets/boxes/closed-dice.webp"); --sprite: url("assets/boxes/sprite-dice.webp"); --glow: var(--neon-cyan); --glow-a: rgba(34, 200, 255, .55); }
.box[data-variant="twenty"] { --al: 6.48cqi; --at: -53.70cqi; --aw: 91.56cqi; --ah: 147.00cqi; --closed: url("assets/boxes/closed-twenty.webp"); --sprite: url("assets/boxes/sprite-twenty.webp"); --glow: #ff5fae; --glow-a: rgba(255, 95, 174, .5); }
.box[data-variant="astro"] { --al: 6.48cqi; --at: -54.71cqi; --aw: 91.56cqi; --ah: 148.00cqi; --closed: url("assets/boxes/closed-astro.webp"); --sprite: url("assets/boxes/sprite-astro.webp"); --glow: #ff9a3a; --glow-a: rgba(255, 138, 31, .5); }
.box[data-variant="allinone"] { --al: 6.48cqi; --at: -56.46cqi; --aw: 91.56cqi; --ah: 149.76cqi; --closed: url("assets/boxes/closed-allinone.webp"); --sprite: url("assets/boxes/sprite-allinone.webp"); --glow: var(--neon-cyan); --glow-a: rgba(34, 200, 255, .55); }
.box[data-variant="dicetop"] { --al: 6.48cqi; --at: -47.43cqi; --aw: 91.56cqi; --ah: 140.73cqi; --closed: url("assets/boxes/closed-dicetop.webp"); --sprite: url("assets/boxes/sprite-dicetop.webp"); --glow: var(--neon-magenta); --glow-a: rgba(255, 63, 216, .5); }
.box[data-variant="astroside"] { --al: -3.81cqi; --at: -41.16cqi; --aw: 101.84cqi; --ah: 134.45cqi; --closed: url("assets/boxes/closed-astroside.webp"); --sprite: url("assets/boxes/sprite-astroside.webp"); --glow: var(--neon-sun); --glow-a: rgba(255, 201, 58, .5); }

/* نورِ سقفیِ هر جعبه */
.box__spot {
  position: absolute;
  left: 50%;
  bottom: 6cqi;
  width: 120cqi;
  height: 190cqi;
  transform: translateX(-50%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  background: linear-gradient(to bottom, transparent, var(--glow-a) 92%);
  filter: blur(12px);
  mix-blend-mode: screen;
  opacity: .16;
  pointer-events: none;
  transition: opacity .35s ease;
}
.box__podium {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 104cqi;
  height: 20cqi;
  transform: translate(-50%, 34%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-a), transparent);
  opacity: .5;
  pointer-events: none;
  transition: opacity .35s ease;
}

.box__art {
  position: absolute;
  left: var(--al);
  top: var(--at);
  width: var(--aw);
  height: var(--ah);
  background: var(--closed) center / 100% 100% no-repeat;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), filter .35s ease;
}

.box:hover .box__spot,
.box:focus-visible .box__spot { opacity: .42; }
.box:hover .box__podium,
.box:focus-visible .box__podium { opacity: .9; }
.box:hover .box__art,
.box:focus-visible .box__art {
  transform: translateY(-3cqi);
  filter: drop-shadow(0 0 3cqi var(--glow-a));
}
.box:focus-visible { outline-offset: 6px; }

/* باز شدن: تکان، بعد اسپرایت ۲۰ فریمی */
.box.is-shaking .box__art { animation: shake .42s ease-in-out both; }
/* تا جواب سرور برسد، جعبه پشت‌سرهم تکان می‌خورد */
.box.is-waiting .box__art { animation: shake .42s ease-in-out infinite; }
.grid[aria-busy="true"] .box:not(.is-open):not(.is-waiting) { cursor: progress; }
@keyframes shake {
  0%, 100% { transform: rotate(0) translateY(0); }
  20% { transform: rotate(-4deg) translateY(-1cqi); }
  40% { transform: rotate(3.5deg) translateY(-2cqi); }
  60% { transform: rotate(-3deg) translateY(-1cqi); }
  80% { transform: rotate(2deg); }
}

/* اسپرایت ۱۶ فریمی باز شدن در */
.box.is-opening .box__art {
  background-image: var(--sprite);
  background-size: 1600% 100%;
  animation: lid .8s steps(16, jump-none) forwards;
}
@keyframes lid {
  from { background-position: 0% 0; }
  to   { background-position: 100% 0; }
}

.box.is-open .box__art { background-image: var(--sprite); background-size: 1600% 100%; background-position: 100% 0; }
.box.is-open .box__spot { opacity: .5; }
.box.is-open .box__podium { opacity: .9; }
.box.is-open { cursor: default; }
.box.is-open:hover .box__art { transform: none; }

/* برچسب جایزه روی جعبهٔ بازشده */
.box__ticket {
  position: absolute;
  left: 50%;
  top: 4cqi;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 116cqi;
  padding: 1.6cqi 6cqi 2cqi;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: clamp(11px, 8.4cqi, 16px);
  line-height: 1.55;
  text-align: center;
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .7);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}
.box__ticket b {
  font-size: .78em;
  font-weight: 700;
  opacity: .85;
}
.box__ticket span { font-weight: 700; }
.box__ticket.t-A { background: var(--sun); border-color: transparent; color: var(--navy-900); box-shadow: 0 0 34px rgba(253, 204, 80, .65), 0 14px 30px -8px rgba(0, 0, 0, .7); }
.box__ticket.t-B { background: var(--cyan); border-color: transparent; color: var(--navy-900); box-shadow: 0 0 28px rgba(34, 200, 255, .5), 0 14px 30px -8px rgba(0, 0, 0, .7); }
.box__ticket.t-C b { display: none; }

.box.is-revealed .box__ticket { opacity: 1; }
.box.is-fresh .box__ticket { animation: ticket-up .6s cubic-bezier(.2, .8, .25, 1.25) both; }
@keyframes ticket-up {
  from { opacity: 0; transform: translate(-50%, 26cqi) scale(.5); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* جعبه‌ای که جایزهٔ ویژه داشت */
.box.is-jackpot .box__spot { --glow-a: rgba(253, 204, 80, .75); opacity: .75; }
.box.is-jackpot .box__podium { --glow-a: rgba(253, 204, 80, .8); opacity: 1; }

/* بعد از سه انتخاب */
.grid.is-complete .box:not(.is-open) {
  filter: grayscale(.75) brightness(.45);
  cursor: default;
}
.grid.is-complete .box:not(.is-open):hover .box__art { transform: none; filter: none; }
.grid.is-complete .box:not(.is-open) .box__spot { opacity: 0; }

.boxes__done {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-top: clamp(56px, 8vw, 88px);
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(4, 26, 46, .7);
  text-align: center;
}
.boxes__done[hidden] { display: none; }

/* ============================================================
   ۳. جایزه‌ها
   ============================================================ */
.prizes {
  position: relative;
  padding: clamp(72px, 10vw, 128px) var(--gutter) clamp(80px, 10vw, 136px);
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(253, 204, 80, .07), transparent 70%),
    linear-gradient(to bottom, var(--night), #041a2e 55%, var(--night));
}

.prizes__head {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
}
.prizes__art {
  flex: none;
  width: clamp(92px, 13vw, 150px);
  margin-block: -40px -10px;
  filter: drop-shadow(0 0 30px rgba(253, 204, 80, .25));
}
.prizes__lede {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: clamp(15px, 1.5vw, 18px);
}
.h2:focus { outline: none; }

.tickets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: clamp(32px, 5vw, 48px) 0 clamp(40px, 6vw, 56px);
  padding: 0;
  list-style: none;
}
@media (max-width: 880px) {
  .tickets { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
}

.ticket {
  --tc: var(--line);
  --notch: 62px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 240px;
  padding: 18px 24px 22px;
  border-radius: 22px;
  background: var(--panel);
  overflow: hidden;
  /* بریدگی‌های بلیت */
  -webkit-mask:
    radial-gradient(circle 12px at 0 var(--notch), #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% var(--notch), #0000 98%, #000) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle 12px at 0 var(--notch), #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% var(--notch), #0000 98%, #000) right / 51% 100% no-repeat;
}
.ticket::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--tc);
  box-shadow: 0 0 22px 2px var(--tc);
}
.ticket--A { --tc: var(--sun); background: linear-gradient(to bottom, #2a2a3c, var(--panel) 45%); }
.ticket--B { --tc: var(--neon-cyan); }
.ticket--C { --tc: var(--line-strong); background: var(--night-2); }
.ticket--empty { --tc: transparent; background: rgba(10, 45, 74, .35); }
.ticket--fresh { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.ticket__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: calc(var(--notch) - 26px);
}
.ticket__n { color: var(--ink-muted); font-size: 14px; font-weight: 500; }
.ticket__tier {
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
  background: rgba(242, 237, 246, .08);
  color: var(--ink-muted);
}
.ticket--A .ticket__tier { background: var(--sun); color: var(--navy-900); }
.ticket--B .ticket__tier { background: var(--cyan); color: var(--navy-900); }

.ticket__perf {
  margin: 4px -24px 10px;
  border-top: 2px dashed rgba(169, 189, 209, .25);
}
.ticket__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 2.3vw, 28px);
  line-height: 1.45;
}
.ticket--C .ticket__title,
.ticket--empty .ticket__title { color: var(--ink-muted); }
.ticket__desc { color: var(--ink-muted); font-size: 15px; line-height: 1.8; }
.ticket__desc p, .ticket__desc ul, .ticket__desc ol { margin: 0 0 .4em; }
.ticket__desc ul, .ticket__desc ol { padding-inline-start: 1.2em; }
.ticket__desc a { color: inherit; text-decoration: underline; }
.ticket__desc b, .ticket__desc strong { color: var(--ink); }
.ticket__note {
  margin-top: auto;
  padding: 8px 12px;
  border: 1.5px dashed var(--tc);
  border-radius: 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.code {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 6px;
  padding-inline-end: 14px;
  border: 1.5px dashed var(--tc);
  border-radius: 12px;
  background: rgba(2, 12, 24, .45);
}
.code code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  direction: ltr;
  text-align: left;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
}
.code__copy {
  flex: none;
  min-height: 40px;
  padding: 6px 16px;
  border: 0;
  border-radius: 9px;
  background: var(--tc);
  color: var(--navy-900);
  font-family: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.code__copy:hover { filter: brightness(1.08); }

.prizes__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.fine { max-width: 40em; color: var(--ink-muted); font-size: 14px; }

/* ---------- پایین صفحه ---------- */
.foot {
  padding: 28px var(--gutter) 36px;
  border-top: 1px solid rgba(29, 69, 102, .6);
  color: var(--ink-muted);
  font-size: 14px;
  text-align: center;
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- پیام خطا ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: #3a1424;
  border: 1px solid #ff7a7a;
  color: var(--ink);
  font-size: 15px;
  transform: translateX(-50%);
}
.toast[hidden] { display: none; }
.toast--info { background: #0b3a57; border-color: var(--neon-cyan); }

.confetti {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- تبلت عمودی: متن و ویترین با هم وسط صفحه ---------- */
@media (orientation: portrait) and (min-width: 721px) {
  .hero { --main-w: clamp(150px, 26vw, 300px); --side-w: clamp(100px, 16vw, 196px); justify-content: center; }
  .hero__stage { flex: none; margin-top: clamp(24px, 4vh, 56px); }
}

/* ---------- موبایل ---------- */
@media (max-width: 720px) {
  .topbar { padding-top: 14px; }
  .topbar__brand img { height: 50px; }
  .hero { --main-w: 52vw; --side-w: 30vw; --side-off: calc((52vw + 30vw) / 2 - 7vw); justify-content: center; padding-top: 92px; }
  .hero__eyebrow { font-size: 13px; }
  .hero__stage { flex: none; min-height: 0; margin-top: 36px; }
  .hero__box--side { margin-inline: -3.5vw; }
  .beam { height: 100%; }
  .beam--c { --a: 17deg; }
  .beam--l, .beam--r { --a: 13deg; }
  .boxes__head { margin-bottom: 72px; }
  .meter { width: 100%; justify-content: space-between; }
  .box__ticket { border-radius: 9px; }
}

/* ---------- حرکت کمتر ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
