/* ============================================================
   סביבון ההפתעות של ל.מ — styles
   ============================================================ */

/* fonts (self-hosted, subsetted) */
@font-face { font-family: 'Frank Ruhl Libre'; font-weight: 900; font-display: swap; src: url(/assets/fonts/frank-ruhl-libre-hebrew-900-normal.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Frank Ruhl Libre'; font-weight: 900; font-display: swap; src: url(/assets/fonts/frank-ruhl-libre-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Heebo'; font-weight: 400; font-display: swap; src: url(/assets/fonts/heebo-hebrew-400-normal.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 400; font-display: swap; src: url(/assets/fonts/heebo-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Heebo'; font-weight: 500; font-display: swap; src: url(/assets/fonts/heebo-hebrew-500-normal.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 500; font-display: swap; src: url(/assets/fonts/heebo-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Heebo'; font-weight: 700; font-display: swap; src: url(/assets/fonts/heebo-hebrew-700-normal.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 700; font-display: swap; src: url(/assets/fonts/heebo-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Heebo'; font-weight: 800; font-display: swap; src: url(/assets/fonts/heebo-hebrew-800-normal.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 800; font-display: swap; src: url(/assets/fonts/heebo-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  --night-0: #03071a;
  --night-1: #071233;
  --night-2: #0d1f52;
  --night-3: #1a3175;
  --gold-0: #fff3c4;
  --gold-1: #ffd977;
  --gold-2: #f2b84b;
  --gold-3: #c8892a;
  --green-0: #b8f5b8;
  --green-1: #5fdc5f;
  --green-2: #3cc83c;
  --green-3: #1f9e2a;
  --green-4: #0f5c19;
  --ink: #f4f6ff;
  --ink-2: #c7cfee;
  --ink-3: #8e98c2;
  --glass: rgba(16, 30, 74, 0.55);
  --line: rgba(255, 214, 120, 0.2);
  --ui: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --display: 'Frank Ruhl Libre', 'David', 'Times New Roman', serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--ui);
  color: var(--ink);
  background: radial-gradient(120% 85% at 50% 32%, #1b3480 0%, #0d1f52 36%, #071233 64%, #03071a 100%) fixed;
  background-color: var(--night-1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body::before,
body::after {
  content: '';
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image: url(/assets/img/stars-a.svg), url(/assets/img/stars-b.svg);
  background-size: 420px 420px, 560px 560px;
  opacity: 0.55;
  animation: twinkle 7s ease-in-out infinite alternate;
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
}
body::after {
  background:
    radial-gradient(40% 30% at 85% 10%, rgba(60, 200, 60, 0.16), transparent 70%),
    radial-gradient(45% 35% at 10% 95%, rgba(242, 184, 75, 0.12), transparent 70%),
    radial-gradient(35% 25% at 15% 20%, rgba(120, 160, 255, 0.10), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.4; } to { opacity: 0.7; } }
@keyframes aurora { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-2%, 1.5%, 0) scale(1.06); } }

#scene, #fx, .vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
#scene { z-index: 1; }
.vignette { z-index: 2; background: radial-gradient(ellipse 85% 75% at 50% 50%, transparent 55%, rgba(2, 5, 18, 0.55) 100%); }
#fx { z-index: 60; }

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible { outline: 3px solid var(--gold-1); outline-offset: 3px; }

/* ------------------------------------------------------------ layout */
.app {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(14px + var(--safe-t)) 16px calc(14px + var(--safe-b));
  transition: opacity 0.6s ease;
}
.is-loading .app { opacity: 0; }

.hero { text-align: center; transition: opacity 0.5s ease, transform 0.5s ease; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.brand-logo { width: 30px; height: 30px; display: block; filter: drop-shadow(0 2px 6px rgba(60, 200, 60, 0.35)); }
.brand-tag { font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: 0.01em; }

.greet {
  margin: 12px 0 2px;
  font-size: clamp(15px, 4.2vw, 19px);
  font-weight: 500;
  color: #dfe6ff;
  min-height: 1.3em;
}

.title {
  margin: 0;
  line-height: 0.98;
  font-weight: 900;
}
.title .t1 {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(42px, 12.5vw, 84px);
  background: linear-gradient(178deg, #fffbe6 0%, #ffe08a 30%, #f2b84b 58%, #c8892a 78%, #ffe7a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(90, 50, 0, 0.35)) drop-shadow(0 0 26px rgba(255, 190, 80, 0.32));
  padding: 0 0.04em 0.06em;
}
.title .t2 {
  display: block;
  margin-top: 2px;
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 800;
  color: var(--green-1);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(60, 200, 60, 0.35);
}

.tagline { margin-top: 10px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  padding: 6px 18px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #63de63, #1f9e2a);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px rgba(60, 200, 60, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.pill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  transform: translateX(130%);
  animation: shine 4.2s ease-in-out 1.5s infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(130%); } 85%, 100% { transform: translateX(-130%); } }
.night {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-1);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(242, 184, 75, 0.08);
}

.stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 250px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.swipe-hint {
  position: absolute;
  inset-inline: 0;
  bottom: 4px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(220, 228, 255, 0.55);
  pointer-events: none;
  animation: hint 3.2s ease-in-out infinite;
  transition: opacity 0.4s;
}
.swipe-hint .arr { font-style: normal; display: inline-block; margin: 0 8px; color: var(--gold-1); font-weight: 700; }
@keyframes hint { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }
.swipe-hint.gone, .done .swipe-hint, .invalid .swipe-hint, .spinning .swipe-hint { opacity: 0 !important; animation: none; }

.dock {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.lead {
  margin: 0;
  font-size: clamp(14px, 3.8vw, 16.5px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
  text-shadow: 0 1px 12px rgba(3, 7, 26, 0.95), 0 0 2px rgba(3, 7, 26, 0.8);
  transition: opacity 0.4s, max-height 0.4s;
}
.spin-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px 16px;
  border-radius: 999px;
  font-size: clamp(18px, 5vw, 21px);
  font-weight: 800;
  color: #3a2300;
  background: linear-gradient(180deg, #ffeaa6 0%, #f6c65c 48%, #dc9a33 100%);
  box-shadow: 0 12px 34px rgba(242, 184, 75, 0.38), 0 0 0 1px rgba(255, 236, 170, 0.6) inset, inset 0 -4px 0 rgba(150, 90, 10, 0.32);
  transition: transform 0.18s ease, box-shadow 0.25s ease, opacity 0.4s ease;
  animation: pulse 2.6s ease-in-out infinite;
}
.spin-btn:hover { transform: translateY(-2px) scale(1.02); }
.spin-btn:active { transform: translateY(1px) scale(0.98); }
.spin-ico { width: 22px; height: 22px; fill: #3a2300; transition: transform 0.6s ease; }
.spin-btn:hover .spin-ico { transform: rotate(-20deg); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 12px 34px rgba(242, 184, 75, 0.38), 0 0 0 0 rgba(255, 217, 119, 0.45), 0 0 0 1px rgba(255, 236, 170, 0.6) inset, inset 0 -4px 0 rgba(150, 90, 10, 0.32); }
  50% { box-shadow: 0 12px 34px rgba(242, 184, 75, 0.38), 0 0 0 14px rgba(255, 217, 119, 0), 0 0 0 1px rgba(255, 236, 170, 0.6) inset, inset 0 -4px 0 rgba(150, 90, 10, 0.32); }
}
.note { margin: 0; font-size: 13px; color: var(--ink-2); text-shadow: 0 1px 10px rgba(3, 7, 26, 0.95), 0 0 2px rgba(3, 7, 26, 0.9); }

/* legend */
.legend {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 9px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.medal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-family: var(--display);
  font-weight: 900;
  font-size: 23px;
  line-height: 1;
  color: #0f4d18;
  background: radial-gradient(circle at 35% 30%, #fff4c4 0%, #f3c252 48%, #b97b22 100%);
  box-shadow: 0 4px 14px rgba(242, 184, 75, 0.3), inset 0 -3px 6px rgba(120, 70, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.medal { padding-top: 2px; }
.chip-art { display: none; }
.chip-text { display: flex; flex-direction: column; line-height: 1.2; }
.chip-text b { font-size: 13.5px; font-weight: 800; color: #fff; }
.chip-text small { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.chip[data-letter='hey'] .chip-text b { color: var(--gold-1); }
.chip.front { transform: translateY(-3px); border-color: rgba(255, 217, 119, 0.55); background: rgba(255, 217, 119, 0.1); }
.chip.front .medal { transform: scale(1.12); box-shadow: 0 0 0 4px rgba(255, 217, 119, 0.18), 0 6px 22px rgba(255, 200, 90, 0.55), inset 0 -3px 6px rgba(120, 70, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.6); }
.chip.win { border-color: rgba(95, 220, 95, 0.75); background: rgba(60, 200, 60, 0.16); box-shadow: 0 0 0 1px rgba(95, 220, 95, 0.35), 0 10px 28px rgba(60, 200, 60, 0.3); transform: translateY(-3px); }
.chip.win::after {
  content: 'זכייה!';
  position: absolute;
  top: -9px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  color: #fff;
  background: var(--green-3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* spinning: focus on the dreidel */
.spinning .lead, .spinning .spin-btn, .spinning .note,
.done .lead, .done .spin-btn, .done .note,
.invalid .spin-btn, .invalid .note { opacity: 0; pointer-events: none; }
.spinning .lead, .done .lead { max-height: 0; overflow: hidden; }
.spinning .spin-btn, .done .spin-btn { animation: none; transform: scale(0.94); }
.done .spin-btn, .done .note,
.revealed .spin-btn, .revealed .note, .revealed .lead { display: none; }

/* ------------------------------------------------------------ reveal */
.reveal[hidden] { display: none; }
.reveal { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.reveal-card {
  pointer-events: auto;
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin: 0 auto;
  width: min(100%, 560px);
  max-height: 62vh;
  max-height: 62dvh;
  overflow: auto;
  padding: 12px 20px calc(18px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(24, 42, 102, 0.94), rgba(8, 16, 46, 0.97));
  border: 1px solid rgba(255, 214, 120, 0.26);
  border-bottom: 0;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(105%);
  transition: transform 0.75s cubic-bezier(0.2, 1.15, 0.3, 1);
  outline: none;
  scrollbar-width: none;
}
.reveal-pending .reveal-card { visibility: hidden; }
.reveal.show .reveal-card { transform: none; }
.reveal.mini .reveal-card { transform: translateY(110%); }
.grip { display: block; width: 44px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, 0.18); margin: 0 auto 10px; }

.r-head { display: flex; align-items: center; gap: 14px; }
.medal-wrap { position: relative; flex: none; width: 76px; height: 76px; display: grid; place-items: center; }
.rays {
  position: absolute;
  inset: -38px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 217, 119, 0.32) 0deg 6deg, transparent 6deg 18deg);
  mask-image: radial-gradient(circle, #000 18%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 68%);
  opacity: 0;
  animation: spinrays 16s linear infinite;
}
.reveal.show .rays { opacity: 0.9; transition: opacity 1.2s ease 0.4s; }
.reveal-card[data-tier='0'] .rays { opacity: 0.35 !important; }
@keyframes spinrays { to { transform: rotate(360deg); } }
.medal-big {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 46px;
  line-height: 1;
  padding-top: 4px;
  color: #0f4d18;
  background: radial-gradient(circle at 35% 30%, #fff6cf 0%, #f3c252 46%, #b4761f 100%);
  box-shadow: 0 10px 30px rgba(242, 184, 75, 0.5), inset 0 -5px 10px rgba(120, 70, 0, 0.4), inset 0 3px 6px rgba(255, 255, 255, 0.65), 0 0 0 3px rgba(255, 236, 170, 0.25);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.reveal.show .medal-big { animation: pop 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) 0.25s both; }
@keyframes pop { from { transform: scale(0.2) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.r-titles { min-width: 0; }
.kicker { margin: 0 0 2px; font-size: 13.5px; font-weight: 800; color: var(--green-1); letter-spacing: 0.01em; }
.r-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(30px, 8.5vw, 42px);
  line-height: 1.05;
  background: linear-gradient(178deg, #fffbe6 0%, #ffe08a 35%, #f2b84b 65%, #d39634 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}
.r-body { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.r-art { flex: none; width: 96px; height: 96px; }
.r-art svg { width: 100%; height: 100%; display: block; }
.reveal.show .r-art { animation: rise 0.8s cubic-bezier(0.2, 1.3, 0.4, 1) 0.5s both; }
@keyframes rise { from { transform: translateY(18px) scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }
.r-text { min-width: 0; }
.r-prize { margin: 0; font-size: clamp(19px, 5.2vw, 23px); font-weight: 800; color: #fff; }
.r-blurb { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.r-meta { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); }
.r-meta:empty { display: none; }
.r-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, #4fd64f, #1f9e2a);
  box-shadow: 0 8px 20px rgba(60, 200, 60, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, filter 0.2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: rgba(255, 255, 255, 0.06); box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.14); color: var(--ink); }
.r-sign { margin: 14px 0 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--gold-1); opacity: 0.9; }

.reveal-card[data-tier='3'] { border-color: rgba(255, 217, 119, 0.55); box-shadow: 0 -18px 70px rgba(0, 0, 0, 0.5), 0 0 60px rgba(255, 200, 90, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.reveal-card[data-tier='3'] .kicker { color: var(--gold-1); }

.mini-pill {
  pointer-events: auto;
  position: absolute;
  bottom: calc(18px + var(--safe-b));
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  font-weight: 800;
  background: linear-gradient(180deg, rgba(24, 42, 102, 0.95), rgba(10, 20, 54, 0.95));
  border: 1px solid rgba(255, 214, 120, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, 160%);
  transition: transform 0.5s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.mini-star { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #3a2300; background: radial-gradient(circle at 35% 30%, #fff4c4, #f3c252 50%, #b97b22); font-size: 14px; }
.reveal.mini .mini-pill { transform: translate(-50%, 0); }

/* on phones the sheet takes the bottom: clear the hero & dock so the dreidel has the top */
.revealed .dock { opacity: 0; transform: translateY(20px); pointer-events: none; }
.revealed .hero, .landing .hero { opacity: 0; transform: translateY(-14px); pointer-events: none; }
body.revealed:has(.reveal.mini) .hero, body.revealed:has(.reveal.mini) .dock { opacity: 1; transform: none; pointer-events: auto; }

/* ------------------------------------------------------------ entrance: everything waits behind the welcome popup */
#scene { transition: opacity 1.1s ease; }
.awaiting #scene { opacity: 0; }
.awaiting .app { opacity: 0; }
.awaiting .welcome { background: rgba(3, 7, 26, 0.35); backdrop-filter: none; -webkit-backdrop-filter: none; }
.intro .hero, .intro .dock { animation: riseIn 0.9s cubic-bezier(0.2, 1, 0.3, 1) both; }
.intro .hero { animation-delay: 0.9s; }
.intro .dock { animation-delay: 1.5s; }
.intro .legend .chip { animation: riseIn 0.7s cubic-bezier(0.2, 1, 0.3, 1) both; }
.intro .legend .chip:nth-child(1) { animation-delay: 1.8s; }
.intro .legend .chip:nth-child(2) { animation-delay: 1.9s; }
.intro .legend .chip:nth-child(3) { animation-delay: 2s; }
.intro .legend .chip:nth-child(4) { animation-delay: 2.1s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ welcome popup */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(ellipse at 50% 40%, rgba(13, 31, 82, 0.72), rgba(3, 7, 26, 0.9));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: wfade 0.5s ease both;
}
.welcome.closing { animation: wout 0.45s ease both; }
.welcome-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 30px 26px 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(24, 42, 102, 0.96), rgba(8, 16, 46, 0.98));
  border: 1px solid rgba(255, 214, 120, 0.4);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 70px rgba(255, 200, 90, 0.16);
  animation: wpop 0.7s cubic-bezier(0.2, 1.3, 0.4, 1) 0.1s both;
}
.welcome-logo { width: 64px; height: 64px; display: block; margin: 0 auto 10px; filter: drop-shadow(0 6px 18px rgba(60, 200, 60, 0.4)); }
.welcome-kicker { margin: 0; font-size: 17px; font-weight: 800; color: var(--green-1); }
.welcome-title {
  margin: 6px 0 12px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.1;
  background: linear-gradient(178deg, #fffbe6 0%, #ffe08a 35%, #f2b84b 65%, #d39634 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}
.welcome-text { margin: 0 0 22px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.welcome-btn { animation: pulse 2.6s ease-in-out infinite; }
@keyframes wfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wout { to { opacity: 0; visibility: hidden; } }
@keyframes wpop { from { transform: translateY(24px) scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------ misc */
.sound {
  position: fixed;
  z-index: 50;
  top: calc(12px + var(--safe-t));
  left: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.sound svg { width: 20px; height: 20px; fill: currentColor; }
.sound .off { display: none; }
.sound.muted .on { display: none; }
.sound.muted .off { display: block; }

.toast {
  position: fixed;
  z-index: 70;
  top: calc(14px + var(--safe-t));
  left: 50%;
  transform: translate(-50%, -140%);
  max-width: calc(100% - 100px);
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
  background: rgba(10, 20, 54, 0.95);
  border: 1px solid rgba(255, 214, 120, 0.35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.toast.show { transform: translate(-50%, 0); }
.noscript { position: fixed; inset: auto 0 0; z-index: 99; padding: 16px; text-align: center; background: #0d1f52; }

.flat-dreidel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #55d955, #1a9a28);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 4px rgba(255, 214, 120, 0.7);
  font-family: var(--display);
  font-weight: 900;
  font-size: 92px;
  color: #fff;
}
.flat-dreidel.won { box-shadow: 0 0 60px rgba(255, 214, 120, 0.6), inset 0 0 0 4px rgba(255, 214, 120, 0.9); }

/* ------------------------------------------------------------ short phones */
@media (max-height: 700px) and (max-width: 899px) {
  .greet { margin-top: 8px; }
  .title .t1 { font-size: clamp(36px, 10.5vw, 60px); }
  .tagline { margin-top: 6px; }
  .lead { font-size: 13.5px; line-height: 1.45; }
  .spin-btn { padding: 13px 28px 14px; }
  .stage { min-height: 210px; }
  .medal { width: 32px; height: 32px; font-size: 20px; }
}
@media (max-height: 600px) and (max-width: 899px) {
  .lead { display: none; }
}

/* ------------------------------------------------------------ wide screens: text column + dreidel column */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .app {
    display: grid;
    grid-template-columns: minmax(400px, 0.92fr) 1.08fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: 'hero stage' 'dock stage';
    align-items: center;
    column-gap: 2vw;
    padding: 4vh 4vw;
    min-height: 100vh;
  }
  .hero { grid-area: hero; align-self: end; text-align: start; padding-inline-start: 1vw; }
  .tagline { justify-content: flex-start; }
  .stage { grid-area: stage; align-self: stretch; min-height: 72vh; }
  .dock { grid-area: dock; align-self: start; align-items: flex-start; text-align: start; max-width: 520px; padding-inline-start: 1vw; margin-top: 18px; gap: 14px; }
  .title .t1 { font-size: clamp(56px, 5.6vw, 92px); }
  .title .t2 { font-size: clamp(22px, 1.9vw, 30px); }
  .greet { font-size: 20px; }
  .lead { font-size: 17px; }
  .legend { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
  .chip { flex-direction: row; justify-content: flex-start; padding: 12px 14px; gap: 12px; text-align: start; border-radius: 18px; }
  .chip .medal { width: 44px; height: 44px; font-size: 27px; flex: none; }
  .chip-art { display: block; width: 52px; height: 52px; flex: none; order: 3; margin-inline-start: auto; }
  .chip-art svg { width: 100%; height: 100%; display: block; }
  .chip-text b { font-size: 16px; }
  .chip-text small { font-size: 13px; }
  .chip.win::after { inset-inline-start: auto; inset-inline-end: 14px; transform: none; }
  .swipe-hint { bottom: 2vh; }

  .reveal-card {
    inset-inline: auto;
    right: 4vw;
    left: auto;
    top: 50%;
    bottom: auto;
    width: min(460px, 40vw);
    max-height: 90vh;
    border-radius: 28px;
    border-bottom: 1px solid rgba(255, 214, 120, 0.26);
    padding: 26px 28px 24px;
    transform: translate(-30px, -50%) scale(0.96);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.2, 1.15, 0.3, 1), opacity 0.5s ease;
  }
  .reveal.show .reveal-card { transform: translate(0, -50%); opacity: 1; }
  .reveal.mini .reveal-card { transform: translate(-30px, -50%) scale(0.96); opacity: 0; pointer-events: none; }
  .grip { display: none; }
  .r-head { flex-direction: column; text-align: center; gap: 12px; }
  .medal-wrap { width: 110px; height: 110px; }
  .medal-big { width: 100px; height: 100px; font-size: 64px; }
  .rays { inset: -60px; }
  .r-title { font-size: 50px; }
  .r-body { flex-direction: column; text-align: center; }
  .r-art { width: 150px; height: 150px; }
  .r-prize { font-size: 26px; }
  .r-blurb { font-size: 16px; }
  .r-meta { text-align: center; }
  .mini-pill { left: auto; right: 4vw; transform: translate(0, 160%); }
  .reveal.mini .mini-pill { transform: none; }
  .revealed .hero { opacity: 0; transform: translateX(20px); }
  .revealed .dock { opacity: 0; transform: translateX(20px); }
}

/* ------------------------------------------------------------ OG poster (1200x630 capture) */
.poster .sound, .poster .swipe-hint, .poster .lead, .poster .spin-btn, .poster .note, .poster .greet { display: none !important; }
.poster .app { grid-template-columns: 0.86fr 1.14fr; padding: 34px 50px 34px 40px; column-gap: 0; }
.poster .hero { align-self: end; }
.poster .dock { margin-top: 4px; max-width: 470px; }
.poster .title .t1 { font-size: 94px; }
.poster .title .t2 { font-size: 34px; }
.poster .pill { font-size: 21px; padding: 7px 22px; }
.poster .legend { grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.poster .chip { flex-direction: column; padding: 10px 4px 9px; gap: 5px; text-align: center; }
.poster .chip-art { display: none; }
.poster .chip .medal { width: 40px; height: 40px; font-size: 25px; }
.poster .chip-text b { font-size: 15px; }
.poster .chip-text small { font-size: 12px; }
.poster .chip.front { transform: none; }
.poster .stage { min-height: 560px; }
.poster .brand-tag { font-size: 15px; }
.poster .brand-logo { width: 34px; height: 34px; }

@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .pill::after, .spin-btn, .swipe-hint, .rays { animation: none !important; }
}
