/* GOLD RUSH – הבהלה לזהב. שפה חזותית לפי המוקאפים: שחור-זהב, מטיל על סלע, כפתורי זהב. */

:root {
  --bg: #0b0805;
  --ink: #f4ead6;
  --muted: #cdbf9f;
  --gold: #f2c14e;
  --gold-light: #ffe7a3;
  --gold-deep: #b5801f;
  --gold-text: linear-gradient(180deg, #fff3c4 0%, #ffd66b 38%, #e0a52e 70%, #b87c16 100%);
  --btn-gold: linear-gradient(180deg, #ffe9a6 0%, #f5c85a 42%, #d9a13a 78%, #c38a26 100%);
  --radius: 14px;
  --col: min(100%, 560px);
}

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

/* אין גלילה באתר (בקשת הלקוחה, 2026-09-25): הדף נעול לגובה החלון, וכל מסך נכנס בו.
   מה שלא נכנס גם אחרי ההתאמות לגובה שלמטה — מוקטן כולו (fitScreen ב-script.js). */
html { -webkit-text-size-adjust: 100%; height: 100%; overflow: hidden; }

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Heebo', 'Segoe UI', Tahoma, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.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;
}

/* ---------- רקע המכרה ---------- */
.mine-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
/* שתי הגרסאות של הסצנה יושבות זו על זו ומתחלפות בהצלבה: המוארת במסך הכניסה ובהרשמה
   (body.scene-bright, script.js), הכהה בזמן המשחק. */
.mine-bg__img {
  position: absolute;
  inset: 0;
  background: center 55% / cover no-repeat;
  transition: opacity 0.9s ease;
}
.mine-bg__img--bright { background-image: url('assets/bg/mine-bright.webp'); opacity: 0; }
.mine-bg__img--dark { background-image: url('assets/bg/mine-dark.webp'); }
.scene-bright .mine-bg__img--bright { opacity: 1; }
.scene-bright .mine-bg__img--dark { opacity: 0; }
/* טלפון/חלון לאורך: תמונה לאורך. הגרסה הכהה שלה היא אותה תמונה עם הכהיה. */
@media (max-aspect-ratio: 4/5) {
  .mine-bg__img { background-image: url('assets/bg/mine-portrait.webp'); background-position: center 60%; }
  .mine-bg__img--dark { filter: brightness(0.5) saturate(0.9); }
}
/* הצללה לקריאות: כהה סביב עמודת הטקסט במרכז ובשוליים, כדי שהאור בקצה המנהרה לא יבלע את הכותרות. */
.mine-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 46% 60% at 50% 50%, rgba(8, 5, 2, 0.5), transparent 75%),
    radial-gradient(ellipse 90% 80% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}
.scene-bright .mine-bg::after {
  background:
    radial-gradient(ellipse 50% 62% at 50% 50%, rgba(8, 5, 2, 0.62), transparent 78%),
    radial-gradient(ellipse 90% 80% at 50% 45%, transparent 35%, rgba(0, 0, 0, 0.7) 100%);
}
.mine-bg__smoke {
  position: absolute;
  width: 90vmax; height: 50vmax;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(170, 150, 130, 0.09), transparent 65%);
  filter: blur(20px);
}
.mine-bg__smoke--1 { left: -30vmax; top: 10%; animation: smoke-drift 26s ease-in-out infinite alternate; }
.mine-bg__smoke--2 { right: -35vmax; bottom: 5%; animation: smoke-drift 32s ease-in-out infinite alternate-reverse; }
.mine-bg__dust {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 214, 120, 0.7), transparent),
    radial-gradient(1px 1px at 78% 34%, rgba(255, 214, 120, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 36% 72%, rgba(255, 214, 120, 0.5), transparent),
    radial-gradient(1px 1px at 88% 80%, rgba(255, 214, 120, 0.55), transparent),
    radial-gradient(1px 1px at 58% 14%, rgba(255, 214, 120, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 22% 88%, rgba(255, 214, 120, 0.4), transparent);
  animation: dust-float 14s linear infinite;
}
@keyframes smoke-drift { to { transform: translate(18vmax, -4vmax); } }
@keyframes dust-float { from { transform: translateY(0); } to { transform: translateY(-40px); } }

/* ---------- במה ומסכים ---------- */
.stage {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100svh;
  /* העשן, ההילה והחלקיקים יוצאים בכוונה מגבולות המטיל. clip ולא hidden — כדי שגם פוקוס לא יגלול. */
  overflow: hidden;
  overflow: clip;
  display: grid;
  place-items: center;
  /* מסך גבוה מהחלון נצמד למעלה, ומשם מוקטן (transform-origin של .screen) — כך הוא נכנס בדיוק. */
  align-items: safe center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
.screen {
  width: var(--col);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  /* --fit < 1 רק כשהמסך לא נכנס בגובה החלון (fitScreen ב-script.js). */
  scale: var(--fit, 1);
  transform-origin: 50% 0;
  animation: screen-in 0.55s ease both;
}
@keyframes screen-in { from { opacity: 0; transform: translateY(14px); } }

.title, .logo {
  margin: 0;
  font-weight: 900;
  line-height: 1.05;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(90, 55, 5, 0.55)) drop-shadow(0 0 18px rgba(255, 190, 70, 0.28));
}
.title { font-size: clamp(2rem, 8.5vw, 2.9rem); text-wrap: balance; }
.title--xl { font-size: clamp(2.5rem, 11vw, 3.6rem); }
.title--sub { font-size: clamp(1.7rem, 7vw, 2.3rem); }
.title:focus { outline: none; }

.lede { margin: 0; font-size: clamp(1.1rem, 4.4vw, 1.3rem); color: var(--ink); }
.lede--strong { font-weight: 700; font-size: clamp(1.25rem, 5vw, 1.5rem); }

/* ---------- כפתורים ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  width: min(100%, 380px);
  min-height: 58px;
  padding: 12px 26px;
  border: 1px solid #fff0bf;
  border-radius: var(--radius);
  background: var(--btn-gold);
  color: #1d1205;
  font-size: clamp(1.1rem, 4.6vw, 1.3rem);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -3px 0 rgba(120, 72, 8, 0.35),
    0 6px 20px rgba(0, 0, 0, 0.5),
    0 0 26px rgba(255, 196, 80, 0.3);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn__arrow { font-size: 1.15em; line-height: 1; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 0 rgba(120, 72, 8, 0.35), 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 36px rgba(255, 196, 80, 0.45); }
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .bar-slot:focus-visible, .copy-btn:focus-visible, .sound-toggle:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}
.btn:disabled { cursor: progress; filter: saturate(0.6) brightness(0.85); transform: none; }
.btn--dark {
  background: linear-gradient(180deg, rgba(30, 22, 12, 0.92), rgba(10, 7, 4, 0.95));
  color: var(--gold-light);
  border-color: rgba(242, 193, 78, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 231, 163, 0.15), 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 196, 80, 0.14);
}
.actions { display: flex; gap: 12px; width: 100%; justify-content: center; }
.actions .btn { flex: 1 1 0; width: auto; padding-inline: 14px; white-space: nowrap; font-size: clamp(1.05rem, 4.4vw, 1.25rem); }
.actions--stack { flex-direction: column; align-items: center; }
.actions--stack .btn { width: 100%; flex: none; }

/* ---------- מסך 1 ---------- */
.screen--entry { gap: 10px; }
.entry__bar {
  width: min(62%, 300px);
  margin-bottom: 4px;
  filter: drop-shadow(0 10px 28px rgba(255, 170, 40, 0.35));
  animation: float 5s ease-in-out infinite;
}
.logo {
  font-size: clamp(3.2rem, 16vw, 5.6rem);
  letter-spacing: 0.02em;
  direction: ltr;
}
.entry__tagline { margin: 0; font-size: clamp(1.2rem, 5vw, 1.5rem); font-weight: 700; color: var(--gold-light); }
.entry__lede { margin: 6px 0 14px; font-size: clamp(1.15rem, 4.6vw, 1.35rem); }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- הרשמה ---------- */
.lead-form {
  width: 100%;
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding: 20px;
  border: 1px solid rgba(242, 193, 78, 0.4);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(28, 20, 10, 0.82), rgba(12, 9, 5, 0.9));
  box-shadow: 0 0 40px rgba(255, 180, 60, 0.1), 0 20px 40px rgba(0, 0, 0, 0.45);
  text-align: start;
}
.field { display: grid; gap: 4px; }
.field label { font-weight: 600; font-size: 0.95rem; color: var(--gold-light); }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(242, 193, 78, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--ink);
  font: inherit;
  text-align: right;
}
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.22); }
.field input[aria-invalid='true'] { border-color: #ff8a6b; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--gold); }
.form-error { margin: 0; color: #ffb199; font-weight: 600; font-size: 0.95rem; }
.lead-form .btn { justify-self: center; margin-top: 4px; }

/* ---------- מטילים ---------- */
.bars {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 3vw, 20px);
  width: 100%;
  margin-top: clamp(10px, 4vh, 36px);
  perspective: 900px;
}
.bar-slot {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 12px;
}
.bar {
  position: relative;
  display: block;
  container-type: inline-size;
  transform-style: preserve-3d;
  transition: transform 0.35s ease, filter 0.35s ease, opacity 0.35s ease;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.55));
}
.bar__img { width: 100%; }
.bar-slot:not(:disabled) .bar { animation: bar-idle 3.2s ease-in-out infinite; }
.bar-slot:nth-child(2) .bar { animation-delay: -1.1s; }
.bar-slot:nth-child(3) .bar { animation-delay: -2.2s; }
@keyframes bar-idle { 50% { transform: translateY(-4px); } }
@media (hover: hover) {
  .bar-slot:not(:disabled):hover .bar {
    animation: none;
    transform: translateY(-10px) scale(1.04);
    filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 22px rgba(255, 196, 80, 0.55));
  }
}
.bar-slot:disabled { cursor: default; }
.bars.is-busy .bar-slot .bar { animation: none; }
.bar-slot.is-dim .bar { opacity: 0.35; filter: grayscale(0.4) brightness(0.6); transform: scale(0.94); }
.bar-slot.is-chosen .bar {
  animation: none;
  transform: translateY(-22px) scale(1.12);
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 30px rgba(255, 200, 90, 0.75));
}
.bar-slot.is-tense .bar { animation: tense 0.14s linear infinite; }
@keyframes tense {
  0% { transform: translateY(-22px) scale(1.12) rotate(-1.2deg); }
  50% { transform: translateY(-23px) scale(1.12) rotate(1.2deg); }
  100% { transform: translateY(-22px) scale(1.12) rotate(-1.2deg); }
}
.bar-slot.is-flip .bar { animation: flip 0.7s ease-in-out both; }
@keyframes flip {
  0% { transform: translateY(-22px) scale(1.12) rotateY(0); }
  50% { transform: translateY(-30px) scale(1.18) rotateY(90deg); }
  100% { transform: translateY(-22px) scale(1.12) rotateY(0); }
}
/* הסכום על המטיל. המיקום מכוון לפאה העליונה של bar-front.webp (ראו tools/prepare_assets.py). */
.bar__value, .big-bar__value {
  position: absolute;
  left: 50%;
  top: 30%;
  translate: -50% -50%;
  display: flex;
  align-items: baseline;
  gap: 0.08em;
  font-weight: 900;
  line-height: 1;
  color: #1a1004;
  text-shadow: 0 1px 0 rgba(255, 240, 190, 0.6);
  white-space: nowrap;
  pointer-events: none;
}
.bar__value { font-size: 24cqw; }
.bar__value small, .big-bar__value small { font-size: 0.45em; font-weight: 800; }
.bar-slot .bar__value { animation: value-pop 0.45s 0.3s ease-out both; }
@keyframes value-pop { from { opacity: 0; scale: 0.5; } }

.sparkle {
  position: absolute;
  left: 50%; top: 35%;
  width: 150%; aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 245, 200, 0.95) 0%, rgba(255, 206, 90, 0.5) 18%, transparent 52%);
  animation: sparkle 0.9s ease-out both;
}
@keyframes sparkle { 0% { opacity: 0; scale: 0.2; } 25% { opacity: 1; } 100% { opacity: 0; scale: 1.5; } }

.rock {
  position: relative;
  width: 108%;
  height: clamp(28px, 7vw, 44px);
  margin-top: calc(clamp(28px, 7vw, 44px) * -0.6);
  border-radius: 50%;
  /* צל רך מתחת למטילים — הרצפה עצמה כבר בתמונת הרקע. */
  background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.35) 45%, transparent 72%);
  filter: blur(4px);
}
.pick-hint { margin: 0; min-height: 1.5em; color: var(--gold-light); font-weight: 700; }

/* ---------- מטיל גדול (מצאת / מזויף / ניצחון) ---------- */
.showcase {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 6px 0 4px;
}
.showcase .rock { width: min(92%, 440px); z-index: 0; }
.big-bar {
  position: relative;
  z-index: 1;
  width: min(80%, 380px, 36svh);
  container-type: inline-size;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 34px rgba(255, 190, 70, 0.4));
  animation: bar-rise 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.big-bar__img { width: 100%; }
.big-bar__value { font-size: 23cqw; }
@keyframes bar-rise { from { opacity: 0; transform: translateY(26px) scale(0.85); } }
.big-bar.is-sinking { animation: bar-sink 0.8s ease-in both; }
@keyframes bar-sink { to { opacity: 0; transform: translateY(40px) scale(0.6); filter: blur(2px); } }
.shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask: url('assets/bars/bar-front.webp') center / 100% 100% no-repeat;
  mask: url('assets/bars/bar-front.webp') center / 100% 100% no-repeat;
}
.shine::after {
  content: '';
  position: absolute;
  top: -20%; bottom: -20%;
  width: 22%;
  left: -40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 240, 0.65), transparent);
  transform: skewX(-18deg);
  animation: shine 3.4s 0.8s ease-in-out infinite;
}
@keyframes shine { 0% { left: -40%; } 45%, 100% { left: 130%; } }
.question { margin: 4px 0 6px; font-size: clamp(1.05rem, 4.3vw, 1.25rem); font-weight: 600; }

/* ---------- זהב מזויף ---------- */
.screen--fake { min-height: 60svh; justify-content: center; }
.search-note { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--gold-light); animation: pulse-text 1s ease-in-out infinite; }
@keyframes pulse-text { 50% { opacity: 0.45; } }
.search-note.is-steady { animation: none; }
.fake-reveal { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fake-reveal > :not(.showcase) { opacity: 0; transition: opacity 0.5s ease, transform 0.5s ease; transform: translateY(8px); }
.fake-reveal.is-cracked > :not(.showcase) { opacity: 1; transform: none; }
.fake-reveal.is-cracked > :nth-child(2) { transition-delay: 0.25s; }
.fake-reveal.is-cracked > :nth-child(4) { transition-delay: 0.7s; }
.fake-reveal.is-cracked > :nth-child(5) { transition-delay: 0.95s; }
.big-bar--fake .big-bar__img { transition: filter 1.1s ease; }
.big-bar--fake.is-cracked { animation: bar-rise 0.7s both, crack-shake 0.45s 0.05s linear; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.7)); }
.big-bar--fake.is-cracked .big-bar__img { filter: grayscale(0.92) brightness(0.52) contrast(1.25) sepia(0.15); }
@keyframes crack-shake {
  20% { translate: -5px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } 100% { translate: 0; }
}
.cracks {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
.cracks__lines path {
  fill: none;
  stroke: #120c06;
  stroke-width: 1.1;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  filter: drop-shadow(0 0.4px 0 rgba(230, 210, 170, 0.45));
}
.is-cracked .cracks__lines path { transition: stroke-dashoffset 0.9s ease-out; stroke-dashoffset: 0; }
.is-cracked .cracks__lines path:nth-child(n + 2) { transition-delay: 0.25s; }
.smoke {
  position: absolute;
  bottom: 30%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 190, 175, 0.4), transparent 65%);
  filter: blur(10px);
  opacity: 0;
  pointer-events: none;
}
.smoke--a { left: -18%; }
.smoke--b { right: -18%; }
.is-cracked .smoke { animation: smoke-up 3.5s 0.3s ease-out infinite; }
.is-cracked .smoke--b { animation-delay: 1.4s; }
@keyframes smoke-up { 0% { opacity: 0; transform: translateY(20px) scale(0.6); } 30% { opacity: 0.8; } 100% { opacity: 0; transform: translateY(-80px) scale(1.4); } }

/* ---------- ניצחון ---------- */
.burst {
  position: absolute;
  left: 50%; top: 42%;
  width: min(150%, 720px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 230, 150, 0.55) 0%, rgba(255, 190, 70, 0.22) 26%, transparent 58%),
    repeating-conic-gradient(from 0deg, rgba(255, 214, 110, 0.2) 0deg 6deg, transparent 6deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%);
  mask: radial-gradient(circle, #000 20%, transparent 68%);
  animation: burst-in 0.9s ease-out both, spin 24s linear infinite;
  pointer-events: none;
}
@keyframes burst-in { from { opacity: 0; scale: 0.3; } }
@keyframes spin { to { rotate: 360deg; } }
.big-bar--win { width: min(88%, 420px, 40svh); animation: bar-rise 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
.particles { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.particle {
  position: absolute;
  left: 50%; top: 40%;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle, #fff6d0, #ffc94d 55%, rgba(255, 170, 40, 0));
  animation: particle-fly var(--t) var(--d) cubic-bezier(0.15, 0.7, 0.35, 1) both;
}
.particle--star { border-radius: 0; background: #ffe39a; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
@keyframes particle-fly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(var(--r)); }
}

/* ---------- קופון ---------- */
.screen--coupon { gap: 26px; }
.coupon-layout {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
}
.coupon-text { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.coupon-amount { margin: 0; font-size: clamp(1.2rem, 4.8vw, 1.45rem); font-weight: 600; line-height: 1.45; }
.coupon-amount b { color: var(--gold-light); font-weight: 900; }
.coupon-label { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
.coupon-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 22px;
  border: 1.5px solid rgba(242, 193, 78, 0.7);
  border-radius: 12px;
  background: rgba(8, 6, 3, 0.8);
  box-shadow: 0 0 22px rgba(255, 190, 70, 0.18), inset 0 0 18px rgba(255, 190, 70, 0.06);
}
.coupon-code {
  font-size: clamp(1.5rem, 6.5vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  user-select: all;
}
.copy-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid rgba(242, 193, 78, 0.45);
  border-radius: 10px;
  background: rgba(242, 193, 78, 0.08);
  color: var(--gold-light);
  cursor: pointer;
}
.copy-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-status { margin: -4px 0 0; min-height: 1.4em; font-size: 0.92rem; color: var(--gold-light); }
.coupon-fine { margin: 0; font-size: 0.92rem; color: var(--muted); }
/* "לשחק שוב" — משני למימוש, ולכן קטן ממנו. */
.btn--again { width: auto; min-height: 46px; padding: 8px 30px; font-size: 1.05rem; }

.bag { position: relative; width: min(66vw, 300px, 26svh); flex: none; }
.bag__img { width: 100%; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 30px rgba(255, 180, 60, 0.25)); }
/* המטבע נח בפתח השק, משמאל למטיל שבולט ממנו. */
.bag__coin {
  position: absolute;
  left: 8%;
  top: 6%;
  width: 36%;
  rotate: -12deg;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 16px rgba(255, 200, 80, 0.6));
}
.bag.is-dropping .bag__coin { animation: coin-drop 1s cubic-bezier(0.3, 0.6, 0.4, 1.2) both; }
.bag.is-dropping .bag__img { animation: sack-squash 0.5s 0.7s ease-out both; transform-origin: 50% 100%; }
@keyframes coin-drop { 0% { opacity: 0; transform: translateY(-160%) scale(1.4) rotate(-200deg); } 35% { opacity: 1; } 100% { transform: none; } }
@keyframes sack-squash { 40% { transform: scale(1.05, 0.94); } 100% { transform: none; } }

@media (min-width: 760px) {
  :root { --col: min(100%, 640px); }
  .screen--coupon { --col: min(100%, 860px); }
  .coupon-layout { flex-direction: row; justify-content: center; gap: 36px; }
  .coupon-text { flex: 1 1 0; max-width: 440px; }
  .bag { width: min(330px, 42svh); }
}

/* ---------- חלון האישור ---------- */
.confirm {
  width: min(92vw, 440px);
  padding: 26px 22px 22px;
  border: 1px solid rgba(242, 193, 78, 0.6);
  border-radius: 18px;
  background: linear-gradient(180deg, #1c140a, #0c0905);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 0 50px rgba(255, 180, 60, 0.2), 0 30px 60px rgba(0, 0, 0, 0.6);
}
.confirm[open] { animation: screen-in 0.3s ease both; }
.confirm::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(3px); }
.confirm__text { margin: 0 0 6px; font-size: 1.3rem; font-weight: 800; color: var(--gold-light); text-wrap: balance; }
.confirm__sub { margin: 0 0 18px; color: var(--muted); }
.confirm .btn { font-size: 1.08rem; min-height: 54px; padding-inline: 14px; white-space: normal; text-wrap: balance; }

/* ---------- שונות ---------- */
.sound-toggle {
  position: fixed;
  z-index: 5;
  top: max(12px, env(safe-area-inset-top));
  inset-inline-end: 12px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid rgba(242, 193, 78, 0.45);
  border-radius: 50%;
  background: rgba(10, 7, 4, 0.7);
  color: var(--gold-light);
  cursor: pointer;
}
.sound-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle__body { fill: currentColor; }
.sound-toggle[aria-pressed='true'] .sound-toggle__off,
.sound-toggle[aria-pressed='false'] .sound-toggle__on { display: none; }

/* שק הזהב בפינה השמאלית התחתונה (left פיזי — הדף RTL). מוצג רק בזמן המשחק (script.js). */
.hud-bag {
  position: fixed;
  z-index: 5;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  width: clamp(192px, 19vw, 332px);
  pointer-events: none;
  animation: screen-in 0.5s ease both;
}
.hud-bag__img { width: 100%; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 18px rgba(255, 180, 60, 0.3)); }
/* מטבע הסכום נח בפתח השק — באותו מקום כמו בשק של מסך הקופון. */
.hud-bag__coin {
  position: absolute;
  left: 8%;
  top: 6%;
  width: 36%;
  rotate: -12deg;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 12px rgba(255, 200, 80, 0.6));
}
.hud-bag.is-bump .hud-bag__img { animation: bag-bump 0.55s ease-out; transform-origin: 50% 100%; }
.hud-bag.is-bump .hud-bag__coin { animation: value-pop 0.45s ease-out; }
@keyframes bag-bump { 30% { transform: scale(1.14, 0.9); } 60% { transform: scale(0.96, 1.06); } 100% { transform: none; } }
/* בטלפון השק קטן יותר (לפי גובה החלון), ומפנים לו מקום בתחתית כדי שלא יסתיר את הכפתורים. */
@media (max-width: 600px) {
  body { --hud: clamp(104px, 19svh, 154px); }
  .hud-bag { width: var(--hud); }
  .has-hud .stage { padding-bottom: calc(var(--hud) * 1.02 + 16px + max(12px, env(safe-area-inset-bottom))); }
}
.coin-fly {
  position: fixed;
  z-index: 20;
  left: 0;
  top: 0;
  pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 22px rgba(255, 200, 80, 0.7));
}

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  translate: -50% 0;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border: 1px solid rgba(255, 150, 120, 0.6);
  border-radius: 12px;
  background: #22120c;
  color: #ffd8cc;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.screen--loading { min-height: 40svh; justify-content: center; }
.spinner {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(242, 193, 78, 0.2);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

/* ---------- קרדיט (כמו בתיק קסטרו) ---------- */
footer.credit {
  --credit-name: 1.1rem;
  --credit-cyan: rgba(34, 211, 238, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  text-align: center;
  line-height: 1.5;
  color: #eaf2ff;
}
footer.credit p { margin: 0; }
.credit__mark {
  width: calc(var(--credit-name) * 3.6);
  height: auto;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.55)) drop-shadow(0 0 20px rgba(56, 130, 246, 0.45)) drop-shadow(0 0 42px rgba(59, 130, 246, 0.28));
}
.credit__name {
  margin-top: calc(var(--credit-name) * 0.5) !important;
  font-size: var(--credit-name);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.3px;
  color: #fff;
  text-shadow: 0 0 18px rgba(120, 190, 255, 0.45), 0 2px 6px rgba(0, 0, 0, 0.7);
}
.credit__tagline {
  margin-top: calc(var(--credit-name) * 0.35) !important;
  font-size: calc(var(--credit-name) * 0.62);
  line-height: 1.6;
  color: #aebbd2;
}
.credit__sep { color: var(--credit-cyan); font-weight: 300; padding: 0 0.25em; }
.credit__rule {
  width: calc(var(--credit-name) * 9);
  max-width: 100%;
  height: 2px;
  margin-top: calc(var(--credit-name) * 0.55);
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0) 0%, rgba(34, 211, 238, 0.75) 35%, rgba(91, 91, 240, 0.75) 65%, rgba(91, 91, 240, 0) 100%);
}
.credit__mail {
  margin-top: calc(var(--credit-name) * 0.5);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  direction: ltr;
  padding: 0.4em 1.1em;
  border-radius: 999px;
  border: 1.5px solid rgba(80, 180, 255, 0.3);
  background: linear-gradient(180deg, rgba(30, 70, 140, 0.35), rgba(12, 26, 60, 0.35));
  font-size: calc(var(--credit-name) * 0.66);
  font-weight: 500;
  color: #a9e4fb;
  text-decoration: none;
}
.credit__mail svg { width: 1.2em; height: 1.2em; flex: none; display: block; }

/* ---------- מסכים נמוכים / צרים ---------- */
/* בטלפון כפתור ההשתקה (fixed בפינה) יושב מעל שורת הכותרת — מפנים לו מקום. */
@media (max-width: 600px) {
  .stage { padding-top: max(64px, env(safe-area-inset-top)); }
}
@media (max-width: 400px) {
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; flex: none; }
  .lead-form { padding: 16px 14px; }
}
/* בטלפון: הקרדיט והמרווחים במסך הקופון קטנים יותר, כדי שהכול ייכנס בגובה החלון. */
@media (max-width: 600px) {
  .screen--coupon { gap: 12px; }
  .coupon-text { gap: 8px; }
  footer.credit { --credit-name: 0.95rem; margin-top: 0; }
}
@media (max-height: 760px) {
  .screen { gap: 10px; }
  .title { font-size: clamp(1.8rem, min(8.5vw, 5.6svh), 2.9rem); }
  .title--xl { font-size: clamp(2.1rem, min(11vw, 6.6svh), 3.6rem); }
  .lead-form { gap: 8px; padding: 14px 16px; margin-top: 0; }
  .field input { min-height: 42px; padding-block: 8px; }
  .btn { min-height: 52px; }
  .question { margin: 0; }
  .showcase { margin: 0; }
  .bars { margin-top: clamp(6px, 2svh, 20px); }
}
@media (max-height: 700px) {
  .big-bar { width: min(64%, 320px, 36svh); }
  .entry__bar { width: min(48%, 240px); }
  .entry__lede { margin: 2px 0 8px; }
}

/* ---------- הפחתת תנועה ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
