/* מדליקים את הבית – עיצוב
   צבעי המותג: סגול חציל (בדיוק מהלוגו של נישה), שחור ולבן. זהב לאור הנרות, וצבעי משחק עליזים לכל אתגר. */
:root {
  --egg: #361126;
  --egg-2: #4E1F3A;
  --egg-3: #6B3354;
  --egg-deep: #1E0914;
  --ink: #141014;
  --white: #FFFFFF;
  --soft: #F7F1F5;
  --line: #E6DAE1;
  --gold: #F3B33D;
  --gold-2: #FFD77A;
  --rose: #E8798F;
  --teal: #2BA39A;
  --sky: #6FA8DC;
  --coral: #F07A5A;
  --lilac: #B89AD8;
  --mint: #8ED1B2;
  --ok: #1F9D61;
  --bad: #D63A4A;
  --topbar: 64px;
  --radius: 22px;
  --shadow: 0 18px 50px -18px rgba(30, 9, 20, .55);
  --shadow-sm: 0 8px 22px -10px rgba(30, 9, 20, .45);
  --font: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--egg-deep);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }

/* ---------- פס עליון ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--topbar);
  display: flex; align-items: center; justify-content: center;
  background: var(--egg);
  box-shadow: 0 2px 0 rgba(255, 215, 122, .35), 0 10px 30px -10px rgba(0, 0, 0, .6);
  cursor: pointer;
  transition: background .2s;
}
.topbar::before, .topbar::after {
  content: ''; position: absolute; top: 50%; width: 22%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 122, .55), transparent);
}
.topbar::before { right: 6%; } .topbar::after { left: 6%; }
.topbar:hover { background: var(--egg-2); }
.topbar img { height: calc(var(--topbar) - 18px); width: auto; }

.floating-tools {
  position: fixed; top: calc(var(--topbar) + 12px); left: 12px; z-index: 40;
  display: flex; gap: 8px;
}
.tool-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(30, 9, 20, .55); color: #fff; cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(8px);
  transition: transform .15s, background .2s;
}
.tool-btn:hover { background: rgba(78, 31, 58, .85); transform: scale(1.06); }
.tool-btn svg { width: 22px; height: 22px; }

main { padding-top: var(--topbar); min-height: 100dvh; }

/* כפתור וואטסאפ צף – רק העיגול הירוק */
.wa-fab {
  position: fixed; right: 18px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 60; /* מעל תווית Netlify */
  width: 60px; height: 60px; border-radius: 50%; background: #25D366;
  display: grid; place-items: center; box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .45);
  transition: transform .2s ease, box-shadow .2s;
  animation: waIn .5s .8s both cubic-bezier(.3, 1.5, .5, 1);
}
.wa-fab svg { width: 34px; height: 34px; }
.wa-fab:hover { transform: scale(1.08); box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .5); }
.wa-fab::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); animation: waPulse 2.8s 2s infinite; }
@keyframes waIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); } }

/* ---------- מסכים ---------- */
.screen {
  position: relative; min-height: calc(100dvh - var(--topbar));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px 20px 48px; text-align: center; overflow: hidden;
  animation: screenIn .5s ease both;
}
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bg-room { position: absolute; inset: 0; z-index: 0; }
.bg-room svg { width: 100%; height: 100%; }
.bg-shade { position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 40%, rgba(30, 9, 20, .15), rgba(30, 9, 20, .78) 75%); }
.screen > .content { position: relative; z-index: 2; width: 100%; max-width: 980px; display: flex; flex-direction: column; align-items: center; }
.screen.light { background: var(--soft); }

.eyebrow { color: var(--gold-2); font-weight: 700; letter-spacing: .02em; font-size: 17px; margin: 0 0 6px; }
.hero-title {
  font-weight: 900; color: #fff; margin: 4px 0 6px; line-height: 1.02;
  font-size: clamp(44px, 9vw, 104px); letter-spacing: -.01em;
  text-shadow: 0 6px 40px rgba(243, 179, 61, .35);
}
.hero-sub { color: #fff; font-weight: 300; font-size: clamp(20px, 3.2vw, 30px); margin: 0 0 10px; }
.hero-sub b { font-weight: 800; color: var(--gold-2); }
.hero-quote { color: rgba(255, 255, 255, .8); font-size: 18px; max-width: 520px; margin: 0 auto 26px; }

.title { font-weight: 900; font-size: clamp(30px, 5vw, 46px); line-height: 1.1; margin: 0 0 10px; color: var(--egg); }
.on-dark .title { color: #fff; }
.lead { font-size: 18px; color: #4b3d45; max-width: 560px; margin: 0 auto 22px; }
.on-dark .lead { color: rgba(255, 255, 255, .86); }

/* ---------- כפתורים ---------- */
.btn {
  --bg: var(--egg); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg); font-weight: 800; font-size: 18px; cursor: pointer;
  box-shadow: var(--shadow-sm); text-decoration: none;
  transition: transform .15s ease, box-shadow .2s, filter .2s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-gold { --bg: linear-gradient(135deg, #FFE29A, #F3B33D 55%, #D9922A); --fg: var(--egg-deep); }
.btn-white { --bg: #fff; --fg: var(--egg); }
.btn-ghost { --bg: transparent; --fg: var(--egg); box-shadow: inset 0 0 0 2px var(--egg); }
.on-dark .btn-ghost { --fg: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.btn-wa { --bg: #1FA855; }
.btn-xl { min-height: 64px; padding: 16px 44px; font-size: 22px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.link-btn { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font-size: 16px; padding: 8px; min-height: 44px; }
.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 122, .55), var(--shadow-sm); } 50% { box-shadow: 0 0 0 16px rgba(255, 215, 122, 0), var(--shadow-sm); } }

/* ---------- כרטיס ---------- */
.panel {
  background: #fff; border-radius: 28px; box-shadow: var(--shadow);
  padding: 34px 28px; width: 100%; max-width: 560px; text-align: center; position: relative;
}
.panel.wide { max-width: 760px; }

/* ---------- חנוכייה ---------- */
.menorah-wrap { position: relative; width: min(860px, 100%); margin: 4px auto 0; }
.menorah-svg { width: 100%; height: auto; overflow: visible; }
.menorah-svg .flame { opacity: 0; transform: scale(.2); transition: opacity .6s ease, transform .8s cubic-bezier(.3, 1.6, .5, 1); }
.menorah-svg .flame.on { opacity: 1; transform: scale(1); animation: flicker 1.6s ease-in-out infinite alternate; }
@keyframes flicker { 0% { transform: scale(1) rotate(-1.5deg); } 40% { transform: scale(1.04, .97) rotate(1deg); } 100% { transform: scale(.97, 1.04) rotate(-.5deg); } }
.menorah-svg .candle { cursor: default; transition: opacity .3s; }
.menorah-svg .candle .ring { opacity: 0; }
.menorah-svg .candle.off > rect:nth-of-type(2) { opacity: .45; }
.menorah-svg .candle.next, .menorah-svg .candle.lit:not(.shamash) { cursor: pointer; }
.menorah-svg .candle.next .ring { animation: ring 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ring { 0% { opacity: .9; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.35); } }
.menorah-svg .candle:focus { outline: none; }
.menorah-svg .candle.next:focus .ring, .menorah-svg .candle.lit:focus .ring { opacity: 1; animation: none; }

.candle-labels { position: relative; height: 92px; margin-top: -4px; }
.candle-labels button {
  position: absolute; top: 0; transform: translateX(50%); width: 10.5%;
  background: rgba(30, 9, 20, .6); color: #fff; border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px; padding: 6px 4px; font-size: 15px; font-weight: 700; line-height: 1.2; min-height: 56px; cursor: pointer;
  backdrop-filter: blur(6px); transition: background .2s, transform .2s;
}
.candle-labels button.next { background: var(--gold); color: var(--egg-deep); border-color: var(--gold); }
.candle-labels button.lit { background: rgba(255, 255, 255, .95); color: var(--egg); }
.candle-labels button.locked { opacity: .55; cursor: not-allowed; }
.candle-labels button:not(.locked):hover { transform: translateX(50%) translateY(-3px); }

.challenge-grid { display: none; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 14px; }
.challenge-grid button {
  display: flex; align-items: center; gap: 10px; text-align: right;
  min-height: 60px; padding: 8px 12px; border-radius: 16px; cursor: pointer;
  background: rgba(30, 9, 20, .62); color: #fff; border: 1px solid rgba(255, 255, 255, .18);
  font-size: 16px; font-weight: 700; line-height: 1.2; backdrop-filter: blur(6px);
}
.challenge-grid button .num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); font-weight: 900; }
.challenge-grid button.next { background: var(--gold); color: var(--egg-deep); }
.challenge-grid button.next .num { background: var(--egg); color: #fff; }
.challenge-grid button.lit { background: #fff; color: var(--egg); }
.challenge-grid button.lit .num { background: var(--gold); color: var(--egg-deep); }
.challenge-grid button.locked { opacity: .55; cursor: not-allowed; }

.stats-bar {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px;
}
.stat-pill {
  display: flex; align-items: center; gap: 10px; padding: 8px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px); font-size: 16px;
}
.stat-pill b { font-size: 26px; font-weight: 900; color: var(--gold-2); line-height: 1; }

/* כיתוב "משחק אינטראקטיבי" וגילאים */
.family-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 2px auto 10px; padding: 8px 20px; border-radius: 999px;
  background: rgba(255, 215, 122, .16); border: 1px solid rgba(255, 215, 122, .55); color: var(--gold-2);
  font-weight: 800; font-size: 18px; letter-spacing: .01em; backdrop-filter: blur(6px);
}
.family-badge::before, .family-badge::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.ages { display: block; font-size: 13px; font-weight: 500; opacity: .85; margin-top: 3px; line-height: 1.2; }
.challenge-grid button .txt { display: flex; flex-direction: column; }
.ages-chip { display: inline-block; margin: 8px 0 0; padding: 4px 14px; border-radius: 999px; background: var(--soft); color: var(--egg); font-weight: 800; font-size: 15px; }

.round-tag { display: table; margin: 0 auto 10px; padding: 5px 16px; border-radius: 999px; background: #fff; color: var(--gc, var(--egg)); border: 2px solid currentColor; font-weight: 800; font-size: 15px; }

/* ---------- הרשמה ---------- */
.google-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 22px;
  border-radius: 999px; border: 1px solid #dadce0; background: #fff; color: #1f1f1f;
  font-weight: 700; font-size: 18px; cursor: pointer; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .15s;
}
.google-btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.google-btn svg { width: 24px; height: 24px; }
.user-chip { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px; border-radius: 18px; background: var(--soft); margin: 4px auto 18px; text-align: right; }
.user-chip .av { width: 44px; height: 44px; border-radius: 50%; background: var(--egg); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 20px; }
.user-chip small { display: block; color: #6b5a64; direction: ltr; text-align: right; }
.consent {
  display: flex; gap: 12px; align-items: flex-start; text-align: right; padding: 16px; border-radius: 16px;
  border: 2px solid var(--line); margin: 16px 0; cursor: pointer; font-size: 16px; transition: border-color .2s, background .2s;
}
.consent:has(input:checked) { border-color: var(--egg); background: #FBF5F8; }
.consent input { width: 26px; height: 26px; flex: none; accent-color: var(--egg); margin: 2px 0 0; cursor: pointer; }
.legal { font-size: 15px; color: #6b5a64; }
.legal a { color: var(--egg); font-weight: 700; }
.steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.steps span { width: 34px; height: 6px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--egg); }

/* ---------- הזמנת חבר ---------- */
.lock-scene { display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin: 0 auto 8px; height: 170px; }
.lock-scene .big-lock { width: 120px; height: 120px; filter: drop-shadow(0 10px 20px rgba(243, 179, 61, .35)); }
.lock-scene .big-lock .shackle { transition: transform .7s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 70px 46px; }
.lock-scene.open .big-lock .shackle { transform: translateY(-16px) rotate(-28deg); }
.lock-scene .mini-menorah { width: 190px; }
.link-box {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 8px; border-radius: 16px;
  border: 2px dashed var(--egg-3); background: #FBF5F8; margin: 6px 0 16px;
}
.link-box input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: inherit; font-size: 16px; direction: ltr; text-align: left; color: var(--egg); font-weight: 700; padding: 8px; }
.progress { margin: 22px 0 4px; }
.progress .bar { height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--rose)); border-radius: 7px; transition: width .8s ease; }
.progress p { margin: 8px 0 0; font-weight: 700; color: var(--egg); }
.demo-note { margin-top: 18px; padding: 12px 16px; border-radius: 14px; background: #FFF6E0; color: #6b4a00; font-size: 15px; text-align: right; }

/* ---------- מסך משחק ---------- */
.game-screen { min-height: calc(100dvh - var(--topbar)); background: var(--soft); display: flex; flex-direction: column; animation: screenIn .4s ease both; }
.game-head {
  position: sticky; top: var(--topbar); z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 124px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.game-head .back { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--soft); cursor: pointer; display: grid; place-items: center; color: var(--egg); }
.game-head .back svg { width: 22px; height: 22px; }
.game-head .gtitle { flex: 1; min-width: 0; text-align: right; }
.game-head .gtitle small { display: block; color: var(--gc, var(--egg)); font-weight: 800; font-size: 14px; }
.game-head .gtitle b { display: block; font-size: 21px; font-weight: 900; line-height: 1.15; color: var(--egg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-head .ghud { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hud { min-width: 64px; padding: 4px 12px; border-radius: 14px; background: var(--soft); text-align: center; font-size: 13px; color: #6b5a64; line-height: 1.2; }
.hud b { display: block; font-size: 22px; font-weight: 900; color: var(--egg); }
.hud.warn b { color: var(--bad); }
.game-body { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
.game-intro { text-align: center; margin: 0 auto 18px; max-width: 640px; color: #4b3d45; font-size: 18px; }
.game-intro b { color: var(--egg); }

/* intro overlay לכל משחק */
.intro-card { max-width: 560px; margin: 30px auto; background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 30px 26px; text-align: center; border-top: 8px solid var(--gc, var(--egg)); }
.intro-card .ico { width: 110px; height: 110px; margin: -76px auto 8px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); display: grid; place-items: center; padding: 16px; }
.intro-card h2 { font-size: 34px; font-weight: 900; margin: 4px 0 6px; color: var(--egg); }
.intro-card ul { text-align: right; padding: 0 22px 0 0; margin: 12px 0 22px; color: #4b3d45; }
.intro-card li { margin: 6px 0; }

/* ---------- נר 1: הבדלים ---------- */
.diff-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.diff-img { position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); background: #fff; cursor: crosshair; touch-action: manipulation; }
.diff-img svg { width: 100%; height: auto; }
.diff-img .tag { position: absolute; top: 10px; right: 10px; background: var(--egg); color: #fff; font-weight: 800; font-size: 14px; padding: 4px 12px; border-radius: 999px; z-index: 2; }
.mark { position: absolute; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); z-index: 3; }
.mark.ok { border: 4px solid #22B36B; box-shadow: 0 0 0 3px rgba(255, 255, 255, .8); animation: popIn .35s cubic-bezier(.3, 1.6, .5, 1); }
.mark.no { width: 34px; height: 34px; background: rgba(214, 58, 74, .9); display: grid; place-items: center; color: #fff; font-weight: 900; animation: popIn .25s, fadeOut .4s 1s forwards; }
.mark.hint { border: 4px dashed var(--gold); animation: hintPulse 1s ease-in-out 3; }
@keyframes popIn { from { transform: translate(-50%, -50%) scale(0); } to { transform: translate(-50%, -50%) scale(1); } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes hintPulse { 50% { transform: translate(-50%, -50%) scale(1.25); } }
.diff-actions { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }

/* ---------- נר 2: זיכרון ---------- */
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: min(560px, calc((100dvh - 230px) / 1.38)); margin: 0 auto; perspective: 900px; }
.mem-card { aspect-ratio: 3/4; position: relative; border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.3, 1.3, .5, 1); border-radius: 16px; }
.mem-card.open, .mem-card.done { transform: rotateY(180deg); }
.mem-card .face { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.mem-card .back { background: radial-gradient(circle at 30% 20%, var(--egg-3), var(--egg) 60%, var(--egg-deep)); border: 3px solid rgba(255, 215, 122, .5); }
.mem-card .back img { width: 72%; opacity: .95; }
.mem-card .front { background: #fff; transform: rotateY(180deg); padding: 12%; }
.mem-card .front span { position: absolute; bottom: 6px; left: 0; right: 0; font-size: 13px; font-weight: 700; color: var(--egg); }
.mem-card.done .front { box-shadow: 0 0 0 4px #22B36B, var(--shadow-sm); }
.mem-card.shake { animation: shake .4s; }
@keyframes shake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }

/* ---------- נר 3: מי אני ---------- */
.riddle { max-width: 680px; margin: 0 auto; text-align: center; }
.riddle .qmark { width: 120px; height: 120px; margin: 0 auto 10px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, var(--teal), #17736C); color: #fff; font-size: 82px; font-weight: 900; display: grid; place-items: center; box-shadow: var(--shadow-sm); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(4deg); } }
.riddle .clue { font-size: clamp(21px, 3.4vw, 28px); font-weight: 800; color: var(--egg); margin: 8px 0 22px; line-height: 1.35; }
.riddle .meta { color: #6b5a64; font-weight: 700; }
.choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.choice { background: #fff; border: 3px solid transparent; border-radius: 20px; padding: 14px 10px 10px; cursor: pointer; box-shadow: var(--shadow-sm); font-weight: 800; font-size: 18px; color: var(--egg); transition: transform .15s, border-color .2s; min-height: 48px; }
.choice:hover { transform: translateY(-4px); }
.choice svg { width: 100%; max-width: 110px; margin: 0 auto 6px; aspect-ratio: 1; }
.choice.right { border-color: #22B36B; background: #ECFAF2; animation: popBig .5s; }
.choice.wrong { border-color: var(--bad); animation: shake .4s; opacity: .6; }
@keyframes popBig { 50% { transform: scale(1.08); } }

/* ---------- נר 4: סופגניות ---------- */
.donut-stage { position: relative; max-width: 720px; margin: 0 auto; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); touch-action: none; user-select: none; -webkit-user-select: none; }
.donut-stage canvas { width: 100%; height: auto; display: block; cursor: none; }
.donut-legend { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 12px 0 0; font-weight: 700; color: var(--egg); }
.donut-legend span { display: flex; align-items: center; gap: 6px; }
.donut-legend svg { width: 32px; height: 32px; }
.stage-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(30, 9, 20, .55); backdrop-filter: blur(3px); z-index: 3; }
.stage-over .panel { max-width: 420px; padding: 26px 22px; }

/* ---------- נר 5: מעצבים בדקה ---------- */
.designer { display: grid; grid-template-columns: 1fr 230px; gap: 16px; align-items: start; }
.room-canvas { position: relative; aspect-ratio: 16/10; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: #fff; touch-action: none; }
.room-canvas .room-bg { position: absolute; inset: 0; }
.room-canvas .room-bg svg { width: 100%; height: 100%; }
.room-canvas .empty-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #8d7a85; font-weight: 700; pointer-events: none; font-size: 18px; padding: 20px; }
.placed { position: absolute; width: 18%; aspect-ratio: 1; transform: translate(-50%, -50%); cursor: grab; touch-action: none; z-index: 2; }
.placed svg { width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .18)); }
.placed.sel { outline: 3px dashed var(--egg); outline-offset: 2px; border-radius: 10px; z-index: 5; }
.placed.dragging { cursor: grabbing; z-index: 6; }
.catalog { background: #fff; border-radius: 20px; box-shadow: var(--shadow-sm); padding: 14px; }
.catalog h3 { margin: 0 0 10px; font-size: 18px; color: var(--egg); }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-item { border: 2px solid var(--line); background: var(--soft); border-radius: 14px; padding: 6px 4px 4px; cursor: grab; touch-action: none; font-size: 14px; font-weight: 700; color: var(--egg); min-height: 48px; }
.cat-item svg { width: 60px; height: 60px; margin: 0 auto; pointer-events: none; }
.cat-item:hover { border-color: var(--coral); }
.tools { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.tools .btn { min-height: 48px; padding: 8px 16px; font-size: 16px; }
.drag-ghost { position: fixed; width: 90px; height: 90px; pointer-events: none; z-index: 100; transform: translate(-50%, -50%) scale(1.1); opacity: .9; }
.result-img { max-width: 640px; margin: 0 auto 16px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.result-img img { width: 100%; }

/* טיימר גדול במעצבים בדקה */
.big-timer { position: absolute; top: 10px; left: 10px; z-index: 20; width: 104px; height: 104px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); display: grid; place-items: center; pointer-events: none; }
.big-timer svg { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); transform: rotate(-90deg); }
.big-timer .bt-track { fill: none; stroke: #EEE4EA; stroke-width: 10; }
.big-timer .bt-arc { fill: none; stroke: var(--teal); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .9s linear, stroke .3s; }
.big-timer b { position: relative; font-size: 40px; font-weight: 900; color: var(--egg); line-height: 1; margin-top: 8px; }
.big-timer small { position: relative; font-size: 13px; color: #6b5a64; margin-top: -26px; }
.big-timer.warn .bt-arc { stroke: var(--gold); }
.big-timer.urgent .bt-arc { stroke: var(--bad); }
.big-timer.urgent b { color: var(--bad); }
.big-timer.urgent { animation: urgentGlow .5s ease-in-out infinite alternate; }
.big-timer.beat { animation: beat .35s ease; }
.big-timer.urgent.beat { animation: beat .35s ease, urgentGlow .5s ease-in-out infinite alternate; }
@keyframes beat { 40% { transform: scale(1.12); } }
@keyframes urgentGlow { to { box-shadow: 0 0 0 8px rgba(214, 58, 74, .25), var(--shadow-sm); } }
.hurry { position: absolute; top: 34%; left: 50%; z-index: 21; transform: translate(-50%, -50%) scale(.6); font-size: clamp(28px, 6vw, 54px); font-weight: 900; color: #fff; background: var(--bad); padding: 6px 26px; border-radius: 999px; opacity: 0; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow); }
.hurry.show { animation: hurryPop 1.2s ease forwards; }
@keyframes hurryPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }
.photo-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; border: 2px dashed var(--coral); background: #FFF4EF; color: var(--egg); cursor: pointer; text-align: right; }
.photo-btn svg { width: 30px; height: 30px; flex: none; color: var(--coral); }
.photo-btn b { display: block; font-size: 16px; }
.photo-btn small { display: block; font-size: 13px; color: #6b5a64; }
.photo-btn:hover { background: #FFE9E0; }
@media (max-width: 760px) { .big-timer { width: 84px; height: 84px; } .big-timer b { font-size: 30px; } .big-timer small { margin-top: -20px; font-size: 11px; } }

/* הודעת סיום סבב ושיתוף */
.round-done { display: inline-block; margin: 0 0 8px !important; padding: 4px 14px; border-radius: 999px; background: var(--soft); color: var(--egg) !important; font-weight: 800; font-size: 15px; }
.closing-line { font-size: 20px; font-weight: 800; color: var(--egg) !important; line-height: 1.4; }
.share-box { margin: 4px 0 18px; padding: 14px; border-radius: 18px; background: #FBF5F8; border: 2px dashed var(--egg-3); }
.share-box b { display: block; color: var(--egg); font-size: 18px; }
.share-box span { display: block; color: #4b3d45; font-size: 15px; margin: 2px 0 10px; }
.share-box .btn { min-height: 46px; padding: 8px 18px; font-size: 16px; }

/* ---------- נר 6: מי מכיר את מי ---------- */
.qcards { position: relative; max-width: 560px; height: 360px; margin: 10px auto 20px; perspective: 1200px; }
.qcard { position: absolute; inset: 0; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; color: #fff; box-shadow: var(--shadow); text-align: center; transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.3, 1.2, .5, 1), opacity .5s; }
.qcard .n { font-weight: 800; opacity: .85; margin-bottom: 10px; }
.qcard .q { font-size: clamp(26px, 4.6vw, 38px); font-weight: 900; line-height: 1.2; }
.qcard .emoji-ico { width: 84px; height: 84px; margin-bottom: 14px; }
.qcard.enter { transform: rotateX(-90deg); opacity: 0; }
.qcard.leave { transform: translateX(-120%) rotate(-12deg); opacity: 0; }
.dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
.dots i.on { background: var(--rose); transform: scale(1.2); }

/* ---------- נר 7: סביבון ---------- */
.dreidel-stage { display: flex; flex-direction: column; align-items: center; }
.dreidel-3d { width: 200px; height: 300px; position: relative; perspective: 900px; margin: 10px auto 20px; }
.dreidel-3d .spinner { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-20deg) rotateY(0deg); }
.dreidel-3d .side { position: absolute; left: 30px; top: 70px; width: 140px; height: 140px; display: grid; place-items: center; font-size: 84px; font-weight: 900; color: #fff; border-radius: 10px; backface-visibility: visible; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .3); }
.dreidel-3d .s1 { background: linear-gradient(135deg, #E8798F, #C34D69); transform: rotateY(0deg) translateZ(70px); }
.dreidel-3d .s2 { background: linear-gradient(135deg, #6FA8DC, #3D74B0); transform: rotateY(90deg) translateZ(70px); }
.dreidel-3d .s3 { background: linear-gradient(135deg, #F3B33D, #D18A13); transform: rotateY(180deg) translateZ(70px); }
.dreidel-3d .s4 { background: linear-gradient(135deg, #2BA39A, #177269); transform: rotateY(270deg) translateZ(70px); }
.dreidel-3d .top { position: absolute; left: 30px; top: 0px; width: 140px; height: 140px; background: #4E1F3A; transform: rotateX(90deg) translateZ(-0px); }
.dreidel-3d .handle { position: absolute; left: 88px; top: 6px; width: 24px; height: 72px; border-radius: 10px; background: linear-gradient(90deg, #361126, #6B3354, #361126); transform: translateZ(0); }
.dreidel-3d .tip { position: absolute; left: 30px; top: 210px; width: 0; height: 0; border-left: 70px solid transparent; border-right: 70px solid transparent; border-top: 80px solid #361126; }
.dreidel-3d .shadow { position: absolute; left: 40px; bottom: -6px; width: 120px; height: 18px; border-radius: 50%; background: rgba(30, 9, 20, .25); filter: blur(4px); }
.task-card { max-width: 560px; width: 100%; background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 26px 22px; border-top: 8px solid var(--sky); animation: popUp .5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes popUp { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.task-card .t { font-size: clamp(24px, 4vw, 32px); font-weight: 900; color: var(--egg); margin: 6px 0 14px; line-height: 1.25; }
.timer-ring { width: 110px; height: 110px; margin: 0 auto 14px; position: relative; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 900; color: var(--egg); }
.tasks-done { display: flex; gap: 10px; justify-content: center; margin: 6px 0 16px; }
.tasks-done i { width: 40px; height: 40px; border-radius: 50%; border: 3px dashed var(--line); display: grid; place-items: center; }
.tasks-done i.on { border: 0; background: var(--gold); box-shadow: 0 0 14px rgba(243, 179, 61, .7); }
.tasks-done i.on::after { content: ''; width: 12px; height: 18px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #fff; }

/* ---------- נר 8: תעלומת פך השמן ---------- */
.house-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.house-tabs button { min-height: 52px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-weight: 800; font-size: 16px; color: var(--egg); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.house-tabs button.cur { background: var(--egg); color: #fff; border-color: var(--egg); }
.house-tabs button:disabled { opacity: .5; cursor: not-allowed; }
.house-tabs button svg { width: 18px; height: 18px; }
.room { position: relative; aspect-ratio: 16/10; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); max-width: max(320px, calc((100dvh - 340px) * 1.6)); margin: 0 auto; }
.room .room-bg-svg { position: absolute; inset: 0; }
.room .room-bg-svg svg { width: 100%; height: 100%; }
.room .room-name { position: absolute; top: 12px; right: 14px; background: rgba(255, 255, 255, .9); padding: 4px 14px; border-radius: 999px; font-weight: 800; color: var(--egg); z-index: 3; }
.hotspot { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; cursor: pointer; transition: transform .2s; z-index: 2; }
.hotspot svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .18)); }
.hotspot:hover { transform: translate(-50%, -50%) scale(1.06); }
.hotspot.searched { animation: wiggle .5s; }
.hotspot.searched::after { content: ''; position: absolute; top: -4px; left: -4px; width: 22px; height: 22px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' stroke='%23361126' stroke-width='3' fill='none'/%3E%3C/svg%3E") center/70% no-repeat; box-shadow: var(--shadow-sm); }
@keyframes wiggle { 25% { transform: translate(-50%, -50%) rotate(-6deg); } 75% { transform: translate(-50%, -50%) rotate(6deg); } }
.code-slots { display: flex; gap: 10px; justify-content: center; direction: ltr; margin: 14px 0; }
.code-slots i { width: 56px; height: 66px; border-radius: 14px; background: #fff; border: 3px dashed var(--line); display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 34px; color: var(--egg); }
.code-slots i.on { border: 3px solid var(--gold); background: #FFF8E6; }
.code-input { display: flex; gap: 10px; justify-content: center; direction: ltr; margin: 10px 0 16px; }
.code-input input { width: 58px; height: 70px; text-align: center; font-size: 34px; font-weight: 900; border-radius: 14px; border: 3px solid var(--line); color: var(--egg); font-family: inherit; }
.code-input input:focus { border-color: var(--egg); outline: none; }
.clue-note { background: #FFF8E6; border-radius: 16px; padding: 14px 16px; margin-top: 14px; color: #5b4300; font-weight: 700; text-align: right; border-right: 6px solid var(--gold); }

/* ---------- סיום ---------- */
.finish-score { display: flex; gap: 14px; justify-content: center; margin: 10px 0 18px; flex-wrap: wrap; }
.finish-score div { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: 20px; padding: 10px 26px; color: #fff; backdrop-filter: blur(6px); }
.finish-score b { display: block; font-size: 44px; font-weight: 900; color: var(--gold-2); line-height: 1.1; }
.blessing { color: #fff; font-size: clamp(20px, 3vw, 26px); font-weight: 300; max-width: 640px; margin: 0 auto 6px; }
.signature { color: var(--gold-2); font-weight: 800; margin: 0 0 22px; }
.glow-burst { position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at 50% 45%, rgba(255, 215, 122, .55), transparent 55%); animation: burst 3s ease-out both; pointer-events: none; }
@keyframes burst { from { opacity: 0; transform: scale(.4); } 40% { opacity: 1; } to { opacity: .7; transform: scale(1.2); } }

/* ---------- חלונות ---------- */
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(20, 6, 14, .6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { background: #fff; border-radius: 28px; max-width: 480px; width: 100%; padding: 30px 24px 24px; text-align: center; box-shadow: var(--shadow); animation: popUp .4s cubic-bezier(.3, 1.4, .5, 1); max-height: 90dvh; overflow: auto; }
.modal h2 { margin: 6px 0 8px; font-size: 30px; font-weight: 900; color: var(--egg); }
.modal p { color: #4b3d45; margin: 0 0 18px; }
.modal .big-ico { width: 96px; height: 96px; margin: 0 auto; }
.field { display: block; text-align: right; margin: 0 0 12px; font-weight: 700; color: var(--egg); }
.field input { display: block; width: 100%; margin-top: 6px; min-height: 52px; border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 17px; font-family: inherit; }
.field input:focus { border-color: var(--egg); outline: none; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 140%); z-index: 120; background: var(--ink); color: #fff; padding: 14px 24px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; max-width: calc(100% - 32px); text-align: center; opacity: 0; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 110; }

.site-footer { position: relative; z-index: 2; margin-top: 28px; color: rgba(255, 255, 255, .7); font-size: 15px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.site-footer a, .site-footer button { color: rgba(255, 255, 255, .85); }
.light .site-footer, .light .site-footer a, .light .site-footer button { color: #6b5a64; }

.spinner-load { width: 54px; height: 54px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .2); border-top-color: var(--gold); animation: spin 1s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- רספונסיבי ---------- */
@media (max-width: 860px) {
  .designer { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .catalog { order: 2; }
}
@media (max-width: 760px) {
  :root { --topbar: 58px; }
  body { font-size: 16px; }
  .screen { padding: 28px 16px 90px; }
  .candle-labels { display: none; }
  .challenge-grid { display: grid; }
  .diff-wrap { grid-template-columns: 1fr; gap: 10px; }
  .choices { grid-template-columns: 1fr 1fr; }
  .game-head { padding: 8px 12px; }
  .game-head .gtitle b { font-size: 18px; }
  .hud { min-width: 54px; padding: 3px 8px; }
  .hud b { font-size: 18px; }
  .mem-grid { gap: 8px; }
  .panel { padding: 28px 18px; }
  .qcards { height: 320px; }
  .house-tabs button { font-size: 14px; padding: 0 4px; }
  .room { aspect-ratio: 4/3.4; }
  .code-input input { width: 54px; height: 64px; }
  .hotspot { min-width: 46px; }
  .floating-tools { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); left: 10px; }
  .tool-btn { width: 44px; height: 44px; background: rgba(30, 9, 20, .78); }
  .wa-fab { width: 54px; height: 54px; right: 12px; bottom: calc(58px + env(safe-area-inset-bottom)); }
  .wa-fab svg { width: 30px; height: 30px; }
  .game-body { padding-bottom: 80px; }
}
@media (max-width: 420px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-pill { padding: 6px 14px; }
  .stat-pill b { font-size: 22px; }
  .game-head .ghud .hud:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
