/* ============================================================
   מי כיבה את השמש? חדר בריחה לחנוכה
   בוידעם בלילה: חושך בגוון דיו, קרטון, טוש שחור, וחמשת הצבעים
   של קופסת הנרות. צבע פעולה אחד בלבד: ענבר של להבה.
   ============================================================ */

@font-face{ font-family:"Karantina"; font-weight:400; font-display:swap; src:url("../fonts/karantina-400-hebrew.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:"Karantina"; font-weight:400; font-display:swap; src:url("../fonts/karantina-400-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+2000-206F }
@font-face{ font-family:"Karantina"; font-weight:700; font-display:swap; src:url("../fonts/karantina-700-hebrew.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:"Karantina"; font-weight:700; font-display:swap; src:url("../fonts/karantina-700-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+2000-206F }
@font-face{ font-family:"Assistant"; font-weight:300 800; font-display:swap; src:url("../fonts/assistant-hebrew.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:"Assistant"; font-weight:300 800; font-display:swap; src:url("../fonts/assistant-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+2000-206F,U+20AC }

:root{
  /* החושך */
  --night:#12131a;      /* הרקע של החדר */
  --bar:#191922;        /* הסרגל העליון והתחתון */
  --card:#22212b;       /* משטח של חידה */
  --card-0:#18171e;     /* שקע בתוך משטח */
  --card-2:#2f2d3a;     /* כפתור, בועת דיבור */
  --card-3:#3c3a49;     /* ריחוף מעל כפתור */
  --line:rgba(236,231,218,.16);
  --line-2:rgba(236,231,218,.34);
  /* הטקסט */
  --ink:#ece7da;        /* טקסט ראשי על חושך */
  --ink-2:#bdb6a6;      /* טקסט משני על חושך */
  --moon:#cfdcf2;       /* אור ירח: מיקוד, הדרכה, בחירה */
  /* קרטון, נייר וטוש */
  --kraft:#b98f5f;
  --kraft-2:#a57f52;
  --tape:#e4dbc4;
  --paper:#f4ecd9;
  --marker:#191613;
  --paper-2:#57493a;
  /* צבע הפעולה היחיד: להבה */
  --flame:#ffb133;
  --flame-hi:#ffc457;
  --on-flame:#1d1303;
  /* חמשת הצבעים של קופסת הנרות */
  --c-white:#f1ede2; --c-yellow:#f1c232; --c-orange:#ee7d32; --c-pink:#e04a6c; --c-blue:#3f7fd4;
  --thread:#c9463b;
  --metal:#878c98; --metal-hi:#b4b9c5; --metal-lo:#565a66;

  --on-scene:var(--ink);
  --on-scene-2:var(--ink-2);

  --disp:"Karantina","Assistant","Arial Hebrew",Arial,sans-serif;
  --body:"Assistant","Segoe UI","Arial Hebrew",Arial,sans-serif;
  --ease-out:cubic-bezier(.23,1,.32,1);
  --ease-in-out:cubic-bezier(.77,0,.175,1);
  --side:12px;
  --sx:40vh;            /* כמה מהבוידעם נדחק ימינה, כדי שבמסך צר יישאר קיר נקי מאחורי החנוכייה */
}

*,*::before,*::after{ box-sizing:border-box }
html{ font-size:clamp(16px, 11px + .55vw, 21px); -webkit-text-size-adjust:100% }
body{ margin:0; background:var(--night); color:var(--ink); font:400 1.05rem/1.55 var(--body); overflow-x:hidden }
h1,h2,p,ol,ul,figure{ margin:0 }
ol,ul{ padding:0; list-style:none }
button,input{ font:inherit; color:inherit }
button{ cursor:pointer; -webkit-tap-highlight-color:transparent; touch-action:manipulation }
img,svg{ display:block; max-width:100% }
[hidden]{ display:none !important }
::selection{ background:var(--moon); color:#12131a }
html{ scrollbar-color:#3c3a49 #12131a }
h1,h2,.lead{ text-wrap:balance }
:focus{ outline:none }
:focus-visible{ outline:3px solid var(--moon); outline-offset:3px; border-radius:6px }
[data-focus]:focus-visible,.dlg-h:focus-visible{ outline:none }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap }
.skip{ position:absolute; inset-inline-start:8px; top:-80px; z-index:50; background:var(--paper); color:var(--marker); padding:.6rem 1rem; border-radius:8px; font-weight:600 }
.skip:focus{ top:8px }
.nojs{ padding:2rem; text-align:center }

/* ---------- המסגרת ---------- */
.app{ position:relative; min-height:100vh; min-height:100dvh; display:grid; grid-template-rows:auto 1fr auto; isolation:isolate }
.scene,.dark,.warm,.moon,.dust,.eggs{ position:fixed; inset:0; pointer-events:none; overflow:hidden }
.scene{ z-index:0 }
/* קופסת המיפוי: כל שכבות הבוידעם יושבות באותה מערכת צירים של 1600 על 900, מעוגנת למטה ומימין */
.scn{ position:absolute; bottom:0; right:calc(var(--sx) * -1); width:max(calc(100% + var(--sx)), calc(100vh * 16 / 9)); aspect-ratio:16 / 9 }
.scn > svg{ display:block; width:100%; height:100% }
.art-defs{ position:absolute; width:0; height:0; overflow:hidden }

/* אור וחושך. המשתנים האלה הם מפרט האור של art.js */
.app, dialog.dlg{ --rim:#b9cdf0; --rim-o:.8; --br:#7d6c44; --br2:#a99b72; --br3:#3d3424; --br-e:#2e271b; --br-hi:#dbe6fa; --pat:#3f5f58;
  --d-body:#2b2e44; --d-plane:#3d4260; --d-shade:#1b1d2c; --tagp:#e6dfcc; --wx-o:.5; --wf:#231d27; --wf2:#17131d; --wf-rim:#9fb4dc }
.app[data-light="lit"]{ --rim:#ffe2a6; --rim-o:.7; --br:#c2902f; --br2:#f3d476; --br3:#7a5416; --br-e:#6b4810; --br-hi:#fff6cc; --pat:#6fa58e;
  --tagp:#f6efdc; --wx-o:1; --wf:#6a4a2e; --wf2:#4d3420; --wf-rim:#e8c48e }

/* החושך. כשהאור נדלק הוא נסוג כגל שיוצא מהחנוכייה, ולא נמוג בבת אחת */
@property --wave{ syntax:"<length>"; inherits:false; initial-value:0px }
.dark{ z-index:1; opacity:.89; --lx:50%; --ly:55%;
  background:radial-gradient(circle at var(--lx) var(--ly), rgba(9,13,31,0) calc(var(--wave) - 30vmax), rgba(48,28,20,.5) calc(var(--wave) - 13vmax), #090d1f var(--wave));
  transition:--wave .7s var(--ease-out), opacity 1s linear 2.2s }
.app[data-light="lit"] .dark{ --wave:230vmax; opacity:0; transition:--wave 3s cubic-bezier(.45,.05,.3,1), opacity 1s linear 2.2s }
.no-prop .dark{ background:#090d1f; transition:opacity 2.4s var(--ease-in-out) }
/* אחרי ההדלקה האור לא אחיד: הוא חזק ליד החנוכייה ונחלש לקראת הפינות */
.warm{ z-index:1; opacity:0; --lx:50%; --ly:55%; transition:opacity 2.4s var(--ease-in-out) 1.2s;
  background:radial-gradient(circle at var(--lx) var(--ly), rgba(60,32,12,0) 34vmax, rgba(60,32,12,.2) 72vmax, rgba(46,24,10,.46) 125vmax) }
.app[data-light="lit"] .warm{ opacity:1 }
.app[data-light="lit"]{ --on-scene:#221a12; --on-scene-2:#4a3a28 }
/* כשהאור נדלק, גם המשטחים שבתוך החדר הופכים לנייר בהיר. הסרגל נשאר כהה */
.app[data-light="lit"] .stage{ --card:#f6efdc; --card-0:#ebe1c9; --card-2:#e8dcc1; --card-3:#dccdae; --ink:#221a12; --ink-2:#5a4a38;
  --line:rgba(34,26,18,.2); --line-2:rgba(34,26,18,.45); --moon:#221a12 }

/* שכבת הירח, מעל החושך: קרן, שפות קרות, והחלון עצמו */
.moon{ z-index:2 }
.rl{ fill:none; stroke:#b9cdf0; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; opacity:.36 }
.rl2{ fill:none; stroke:#b9cdf0; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; opacity:.28 }
.r-cool{ transition:opacity 1.6s var(--ease-in-out) }
.app[data-light="lit"] .r-cool{ opacity:0 }
.wf{ fill:var(--wf); transition:fill 1.6s } .wf-d{ fill:var(--wf2); transition:fill 1.6s }
.wf-s{ stroke:var(--wf); transition:stroke 1.6s }
.wf-rim{ fill:none; stroke:var(--wf-rim); stroke-width:1.6; stroke-linecap:round; opacity:.7; transition:stroke 1.6s }
/* אבק. בחושך הוא נראה רק בתוך קרן הירח, וכשהאור נדלק הוא מזהיב ומתפזר */
.motes{ position:absolute; inset:0 }
.motes i,.dust i{ position:absolute; width:4px; height:4px; border-radius:50%; background:#dfe8fa; opacity:0; animation:mote 13s linear infinite; transition:background-color 1.6s }
.app[data-light="lit"] .motes i{ background:#ffe9a8 }
.dust{ z-index:2; opacity:0; transition:opacity 2s 1.4s }
.app[data-light="lit"] .dust{ opacity:1 }
.dust i{ width:5px; height:5px; background:#ffe9a8; animation-duration:11s }
.dust i:nth-child(1){ left:8%; top:70% } .dust i:nth-child(2){ left:19%; top:42%; animation-delay:-3s } .dust i:nth-child(3){ left:31%; top:82%; animation-delay:-6s }
.dust i:nth-child(4){ left:44%; top:30%; animation-delay:-1.5s } .dust i:nth-child(5){ left:57%; top:64%; animation-delay:-8s } .dust i:nth-child(6){ left:66%; top:22%; animation-delay:-4.5s }
.dust i:nth-child(7){ left:74%; top:76%; animation-delay:-9.5s } .dust i:nth-child(8){ left:83%; top:48%; animation-delay:-2.5s } .dust i:nth-child(9){ left:91%; top:86%; animation-delay:-7s }
.dust i:nth-child(10){ left:14%; top:18%; animation-delay:-5.5s } .dust i:nth-child(11){ left:50%; top:90%; animation-delay:-10s } .dust i:nth-child(12){ left:96%; top:30%; animation-delay:-.8s }
@keyframes mote{ 0%{ opacity:0; transform:translate(0,0) } 15%{ opacity:.6 } 85%{ opacity:.45 } 100%{ opacity:0; transform:translate(-22px,-70px) } }

/* חפצים שמחליפים צבע בין חושך לאור: צללית עם שפה קרה, ואחר כך הצבע האמיתי */
.pc,.pc2,.pc3{ fill:var(--d-body); transition:fill 1.5s var(--ease-in-out) .5s }
.pc2{ fill:var(--d-plane) } .pc3{ fill:var(--d-shade) }
.ps{ fill:none; stroke:var(--d-plane); stroke-linecap:round; stroke-linejoin:round; transition:stroke 1.5s var(--ease-in-out) .5s }
.app[data-light="lit"] .pc,.app[data-light="lit"] .pc2,.app[data-light="lit"] .pc3{ fill:var(--c) }
.app[data-light="lit"] .ps{ stroke:var(--c) }
.rim{ fill:none; stroke:var(--rim); stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; opacity:var(--rim-o); transition:stroke 1.5s, opacity 1.5s }
/* פליז */
.bf{ fill:var(--br) } .bf2{ fill:var(--br2) } .bf3{ fill:var(--br3) }
.brs{ fill:none; stroke:var(--br3) } .brb{ fill:none; stroke:var(--br) } .brh{ fill:none; stroke:var(--br2); stroke-linecap:round } .bre{ fill:none; stroke:var(--br-e); stroke-linecap:round; opacity:.7 }
.bf,.bf2,.bf3{ transition:fill 1.5s var(--ease-in-out) } .brs,.brb,.brh,.bre{ transition:stroke 1.5s var(--ease-in-out) }
.pat{ fill:var(--pat); opacity:.5; transition:fill 1.5s }
.gl{ fill:var(--br-hi); opacity:.9; transition:fill 1.5s }
.wx{ fill:var(--c); opacity:var(--wx-o); transition:opacity 1.5s }
.cup-in{ fill:#14110f }
.cup-next{ fill:none; stroke:var(--moon); stroke-width:3; stroke-dasharray:9 7; stroke-linecap:round }

.top,.stage,.foot{ position:relative; z-index:5 }
.top{ background:var(--bar); border-bottom:1px solid var(--line) }
.bar{ display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.3rem var(--side); padding-inline-end:calc(var(--side) + 56px) }
.bar-title{ position:relative; background:none; border:0; padding:.2rem .3rem; min-height:44px; font:700 1.7rem/1 var(--disp); color:var(--ink); border-radius:6px; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; touch-action:manipulation; white-space:nowrap }
.bar-title .hold{ position:absolute; inset-inline:.3rem; bottom:4px; height:2px; background:var(--ink-2); transform:scaleX(0); transform-origin:100% 50% }
.bar-title.holding .hold{ transform:scaleX(1); transition:transform 2s linear }
.bar-tools{ display:flex; gap:.2rem }
.tool{ display:inline-flex; align-items:center; gap:.4rem; min-width:44px; min-height:44px; justify-content:center; background:none; border:0; border-radius:8px; color:var(--ink-2); padding:0 .5rem; font-weight:600; font-size:.95rem; transition:background-color .15s, color .15s, transform .12s var(--ease-out) }
.tool:hover{ background:var(--card-2); color:var(--ink) }
.tool:active{ transform:scale(.94) }
.tool svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round }
.tool .off{ display:none }
.tool[data-off] .on{ display:none }
.tool[data-off] .off{ display:inline }
.tool-lbl{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap }
.tool-txt{ display:none }
.sub{ display:flex; align-items:center; gap:.8rem; min-height:44px; padding:0 var(--side) .3rem; padding-inline-end:0 }
.step{ flex:1; font-weight:600; font-size:.95rem; color:var(--ink) }
.pips{ display:flex; gap:4px }
.pips li{ width:7px; height:16px; border-radius:3px; background:var(--card-3) }
.pips li.now{ background:var(--moon) }
.pips li.done.c-white{ background:var(--c-white) } .pips li.done.c-yellow{ background:var(--c-yellow) }
.pips li.done.c-orange{ background:var(--c-orange) } .pips li.done.c-blue{ background:var(--c-blue) }

/* החוט האדום והתווית: המוטיב של החנות. קטן ושקט */
.thread{ position:relative; width:calc(var(--side) + 56px); height:44px; flex:none }
.thread::before{ content:""; position:absolute; left:calc(var(--side) + 21px); width:2px; top:-140px; height:155px; background:var(--thread) }
.tag{ position:absolute; left:var(--side); top:2px; width:44px; height:54px; background:none; border:0; padding:0; transform-origin:50% 0; transition:transform .25s var(--ease-out) }
.tag svg{ width:44px; height:52px }
.tag svg path{ fill:var(--paper) }
.tag svg circle{ fill:var(--bar); stroke:var(--thread); stroke-width:2 }
.tag-txt{ position:absolute; inset-inline:0; top:21px; text-align:center; font-weight:700; font-size:13px; line-height:1; color:var(--marker) }
.tag:hover{ transform:rotate(-4deg) }
.tag:active{ transform:rotate(-4deg) scale(.96) }

.stage{ display:grid; align-content:start; padding:1.5rem var(--side) 1.2rem; min-width:0; color:var(--ink); overflow-x:clip; pointer-events:none }
.stage > *{ pointer-events:auto }
.stage > *{ width:100%; max-width:64rem; margin-inline:auto; min-width:0 }
.stage.enter > *{ animation:rise .34s var(--ease-out) both }
.stage.leave > *{ opacity:0; transition:opacity .14s ease-in }
@keyframes rise{ from{ opacity:0; transform:translateY(10px) } to{ opacity:1; transform:none } }
.scr-opening,.scr-team,.scr-how,.scr-letter,.scr-hub,.scr-boidem,.scr-finale,.scr-cert{ align-content:center }

.foot{ background:var(--bar); border-top:1px solid var(--line); padding:.45rem var(--side); text-align:center; font-size:.82rem; color:var(--ink-2) }

.toast{ position:fixed; z-index:40; inset-inline:var(--side); bottom:4.2rem; margin-inline:auto; max-width:30rem; background:var(--card-3); color:var(--ink); border:1px solid var(--line-2); border-radius:10px; padding:.7rem 1rem; text-align:center; opacity:0; transform:translateY(8px); pointer-events:none; transition:opacity .2s, transform .2s var(--ease-out) }
.toast.show{ opacity:1; transform:none }

/* ---------- כפתורים ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:.5em; min-height:48px; padding:.5em 1.15em; border-radius:10px; border:1.5px solid var(--line-2); background:var(--card-2); color:var(--ink); font:600 1rem/1.25 var(--body); text-decoration:none; text-align:center; transition:transform .12s var(--ease-out), background-color .15s, border-color .15s }
.btn:hover{ background:var(--card-3); border-color:var(--ink-2) }
.btn:active{ transform:scale(.97) }
.btn.primary{ background:var(--flame); color:var(--on-flame); border-color:transparent; font-weight:700 }
.btn.primary:hover{ background:var(--flame-hi) }
.btn.big{ min-height:56px; font-size:1.15rem; padding-inline:1.7em }
.btn.small{ min-height:44px; padding:.3em .9em }
.btn:disabled{ opacity:.7; cursor:default }
.btn:disabled:hover{ background:var(--card-2); border-color:var(--line-2) }
.btn svg{ width:1.25em; height:1.25em; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }

/* ---------- טיפוגרפיה ---------- */
.h-disp{ font:700 clamp(2.8rem, 7vw, 4.4rem)/1 var(--disp); color:var(--on-scene); transition:color 1.6s }
.h-disp.sm{ font-size:clamp(2.2rem, 5vw, 3rem) }
.lead{ font-size:1.15rem; color:var(--on-scene); transition:color 1.6s; max-width:34rem }
.lbl{ display:block; font-size:.9rem; font-weight:700; color:var(--ink-2); letter-spacing:0 }
.mini-h{ font-size:.9rem; font-weight:700; color:var(--ink-2); margin-bottom:.35rem }
.dim{ color:var(--ink-2) }
.num{ font-variant-numeric:tabular-nums; direction:ltr; unicode-bidi:isolate }
.card{ background:var(--card); border:1px solid var(--line); border-radius:16px; padding:clamp(1.2rem, 4vw, 2.2rem) }
.card .h-disp,.card .lead{ color:var(--ink) }
.bubble{ text-wrap:pretty; position:relative; background:var(--card-2); border-radius:14px; padding:.65rem 1rem; color:var(--ink) }
.fb{ border:1.5px solid var(--moon); background:var(--card-0); border-radius:8px; padding:.55rem .8rem; color:var(--ink) }
.fb:empty{ display:none }
.fb.show{ animation:rise .24s var(--ease-out) both }
.fb.info{ border-color:var(--line-2) }
.fb span{ display:block }

/* ---------- חלונות קופצים ---------- */
.dlg{ border:1px solid var(--line-2); border-radius:16px; background:var(--card); color:var(--ink); padding:0; width:min(34rem, calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto }
.dlg::backdrop{ background:rgba(8,8,14,.72) }
.dlg[open]{ animation:pop .26s var(--ease-out) }
@keyframes pop{ from{ opacity:0; transform:translateY(12px) scale(.98) } to{ opacity:1; transform:none } }
.dlg-in{ position:relative; padding:1.4rem clamp(1.1rem, 4vw, 1.8rem) 1.3rem }
.dlg-x{ position:absolute; inset-inline-end:.5rem; top:.5rem; width:44px; height:44px; display:grid; place-items:center; background:none; border:0; border-radius:8px; color:var(--ink-2) }
.dlg-x:hover{ background:var(--card-2); color:var(--ink) }
.dlg-x svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round }
.dlg-h{ font:700 2.3rem/1.05 var(--disp); margin-bottom:.8rem; padding-inline-end:2.6rem }
.dlg-actions{ display:flex; flex-wrap:wrap; gap:.6rem; margin-top:1.1rem }
.how-list{ display:grid; gap:.7rem }
.how-list li{ display:grid; grid-template-columns:1.2rem 1fr; gap:.7rem; align-items:start }
/* סימן לכל שורה: נר קטן בצבע מקופסת הנרות, לא מספר */
.how-n{ width:.7rem; height:1.9rem; margin:.15rem auto 0; border-radius:3px; background:var(--c-white) }
.how-n.c1{ background:var(--c-yellow) } .how-n.c2{ background:var(--c-orange) } .how-n.c3{ background:var(--c-blue) }
.tagcard{ display:grid; gap:.35rem }
.tagcard img{ width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; object-position:50% 0; border-radius:10px; margin-bottom:.4rem; background:var(--card-0) }
.tagcard-teaser{ font-weight:600 }
.tagcard-line,.tagcard-who{ color:var(--ink-2) }
.fac{ display:grid; gap:.5rem; justify-items:start }
.fac-h{ font-size:.84rem; font-weight:700; color:var(--ink-2); margin-top:.6rem }
.fac-jump{ display:flex; flex-wrap:wrap; gap:.4rem }
.fac-jump .btn{ min-width:44px }
.fac-ans{ background:var(--card-0); border-radius:8px; padding:.6rem .8rem }
.fac-none{ color:var(--ink-2) }
/* משפט הפרטיות של המעקב האנונימי. בתפריט המנחה תמיד, ובשאר המקומות רק כשבאמת נשלח מידע */
.fac-track,.track-note{ font-size:.88rem; line-height:1.45; color:var(--ink-2); max-width:32rem }
.dlg-how .track-note{ margin-top:.9rem }
/* במסך למורה המשפט יושב על הבוידעם עצמו, ולכן הוא מקבל משטח משלו */
.teach .track-note{ background:var(--card); border:1px solid var(--line); border-radius:10px; padding:.55rem .9rem; justify-self:start }
.why{ display:grid; grid-template-columns:auto 1fr; gap:1rem; align-items:start }
.why-cdl{ width:3.4rem }
.why-txt{ display:grid; gap:.8rem }
.fact{ background:var(--card-0); border-radius:10px; padding:.6rem .8rem }

/* ---------- נר ---------- */
.cdl{ width:100%; height:auto; overflow:visible }
.cdl .flame-pos{ opacity:0; transition:opacity .35s }
.cdl.is-lit .flame-pos{ opacity:1 }
.flame{ transform-box:fill-box; transform-origin:50% 100% }
.cdl.is-lit .flame{ animation:flick 2.8s ease-in-out infinite }
.cdl.catch .flame{ animation:catch .5s var(--ease-out), flick 2.8s ease-in-out .5s infinite }
.fl-o{ fill:var(--flame) } .fl-m{ fill:#ffd36b } .fl-i{ fill:#fff6d0 } .fl-b{ fill:#6fa2ff; opacity:.7 }
.c-halo,.c-glow{ opacity:0; transition:opacity .6s var(--ease-out) }
.cdl.is-lit .c-halo{ opacity:1 }
.cdl.is-lit .c-glow{ opacity:.5 }
.c-wick{ stroke:#2a2420; stroke-width:2.2; stroke-linecap:round; fill:none }
.c-eye{ fill:#1b1714 } .c-white{ fill:#fffdf4 }
.c-brow{ stroke:#1b1714; stroke-width:2.6; stroke-linecap:round; fill:none }
.c-lid{ stroke:#1b1714; stroke-width:2.2; stroke-linecap:round; fill:none }
.c-bag{ stroke:#1b1714; stroke-width:1.2; stroke-linecap:round; fill:none; opacity:.5 }
.c-thread{ stroke:var(--thread); stroke-width:2; stroke-linecap:round; fill:none }
.c-thread.thin{ stroke-width:1.3 }
.c-knot{ fill:var(--thread) }
.c-tagp{ fill:var(--tagp); transition:fill 1.5s }
/* האות על התווית נכתבת בגופן הגוף: בגופן הכותרת נ ו-ו דומות מדי */
.c-letter{ font:800 34px/1 var(--body); fill:var(--marker) }
/* חיים שקטים: כל נר ממצמץ מדי פעם, מציץ לכיוון הלחיצה, ומגיב לתשובה */
.c-eyes{ transform-box:fill-box; transform-origin:50% 50%; animation:idleblink 6s steps(1, end) infinite }
@keyframes idleblink{ 0%,95%{ transform:scaleY(1) } 96%{ transform:scaleY(.1) } 99%{ transform:scaleY(1) } }
.cdl.blink .c-eyes{ animation:blink .22s ease-in-out }
@keyframes blink{ 0%,100%{ transform:scaleY(1) } 45%,60%{ transform:scaleY(.1) } }
.c-look{ transition:transform .16s var(--ease-out) }
.cdl.look-l .c-look{ transform:translateX(-1.8px) }
.cdl.look-r .c-look{ transform:translateX(1.8px) }
@keyframes flick{ 0%,100%{ transform:scale(1) rotate(-1.5deg) } 35%{ transform:scale(1.04,.96) rotate(1.5deg) } 70%{ transform:scale(.97,1.05) rotate(-.5deg) } }
@keyframes catch{ 0%{ transform:scale(.2) } 60%{ transform:scale(1.25) } 100%{ transform:scale(1) } }

/* ---------- פתיחה ---------- */
.open{ display:grid; justify-items:center; text-align:center; gap:.9rem; padding-block:1rem }
.open-sky{ position:relative; width:7.5rem; height:7.5rem }
.open-sun,.open-stub{ position:absolute; inset:0; display:grid; place-items:center }
.sun{ width:100%; height:100% }
.sun circle{ fill:var(--c-yellow) }
.sun .sun-halo{ opacity:.13 }
.sun-hi{ fill:none; stroke:#fff6c8; stroke-width:3; stroke-linecap:round; opacity:.85 }
.sun-rays path{ stroke:var(--c-yellow); stroke-width:5; stroke-linecap:round }
.open-sun{ transition:transform .9s var(--ease-in-out), opacity .5s .45s }
.open-stub{ opacity:0; transform:translateY(10px); transition:opacity .5s .6s, transform .6s var(--ease-out) .6s }
.open-stub .stub{ width:3.4rem }
.open.is-go .open-sun,.open.is-done .open-sun{ transform:scale(.2) translateY(-60%); opacity:0 }
.open.is-go .open-stub,.open.is-done .open-stub{ opacity:1; transform:none }
.open.is-done .open-sun,.open.is-done .open-stub,.open.is-done .w-plain,.open.is-done .w-nikud{ transition:none }
.open-title{ font:700 clamp(3.4rem, 11vw, 6rem)/1.05 var(--disp); color:var(--on-scene); padding-bottom:.12em }
/* בחושך הכותרת מוארת מהחלון: קו בהיר דק בצד ימין למעלה, וצל בצד השני */
.app[data-light="dark"] .open-title{ text-shadow:.02em -.02em 0 rgba(185,205,240,.35), -.03em .05em 0 rgba(4,5,12,.7) }
.open-word{ position:relative; display:inline-block }
.w-nikud{ position:absolute; inset:0; opacity:0; transition:opacity .5s .5s }
.w-plain{ transition:opacity .5s .5s }
.open.is-go .w-nikud,.open.is-done .w-nikud{ opacity:1 }
.open.is-go .w-plain,.open.is-done .w-plain{ opacity:0 }
.open-sub{ font-size:1.25rem; color:var(--on-scene) }
.open-go{ display:flex; flex-wrap:wrap; gap:.7rem; justify-content:center; margin-top:.6rem }
.open-teacher{ margin-top:1rem; max-width:30rem; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:.6rem 1rem; color:var(--ink-2); font-size:.95rem }

/* ---------- שם הצוות, איך משחקים ---------- */
.team,.how{ max-width:34rem; display:grid; gap:1rem }
.team form{ display:grid; gap:.9rem; justify-items:start }
.field{ caret-color:var(--flame); width:100%; min-height:56px; padding:.4rem .9rem; background:var(--card-0); border:1.5px solid var(--line-2); border-radius:10px; font:700 2rem/1.1 var(--disp); color:var(--ink) }
.field:focus-visible{ outline-offset:1px }
.how .btn{ justify-self:start }

/* ---------- קופסאות הקרטון ---------- */
/* קרטון: פס מכסה כהה למעלה, צל בצד הרחוק מהחלון, ושפה דקה בצד שפונה אליו */
.box{ position:relative; display:grid; place-items:center; min-height:5.6rem; padding:1.3rem .8rem .8rem; background-color:var(--kraft); border-radius:3px; isolation:isolate; border:0; width:100%; font:inherit; color:inherit;
  background-image:linear-gradient(180deg, rgba(255,255,255,.3) 0 .3rem, rgba(0,0,0,.18) .3rem 1.1rem, rgba(0,0,0,0) 1.1rem, rgba(0,0,0,0) calc(100% - .5rem), rgba(0,0,0,.12) calc(100% - .5rem)),
    linear-gradient(90deg, rgba(0,0,0,.2), rgba(0,0,0,0) 20%, rgba(0,0,0,0) 84%, rgba(255,255,255,.08)) }
.box::before{ content:""; position:absolute; inset:0; z-index:-1; border-radius:3px; background:#0a0b12; opacity:.55; transition:opacity 2s var(--ease-in-out) .4s }
.app[data-light="lit"] .box::before{ opacity:0 }
.box::after{ content:""; position:absolute; inset:0; border-radius:3px; border-top:2px solid var(--rim); border-right:2px solid var(--rim); opacity:.5; pointer-events:none; transition:border-color 1.5s, opacity 1.5s }
.app[data-light="lit"] .box::after{ opacity:.35 }
.box-tape{ position:absolute; z-index:-1; inset-block:0; inset-inline-start:50%; width:1.7rem; margin-inline-start:-.85rem; background:linear-gradient(90deg, #d9c9a0, #efe2bd 30%, #e2d3ac); opacity:.4 }
.box-label{ position:relative; background:var(--tape); color:var(--marker); padding:.15rem .7rem .2rem; font:700 1.45rem/1.15 var(--disp); text-align:center; text-wrap:balance; transform:rotate(-1.2deg); max-width:100%; box-shadow:0 2px 0 rgba(0,0,0,.25) }
.box.b1 .box-label,.box.b3 .box-label{ transform:rotate(1deg) }
.box.b1{ background-color:var(--kraft-2) } .box.b2{ background-color:#c39a69 } .box.b3{ background-color:#ad8556 }
button.box{ cursor:pointer; text-align:center; transition:transform .12s var(--ease-out) }
button.box:active{ transform:scale(.985) }
.box.poke .box-prop{ animation:poke .55s var(--ease-out) }
@keyframes poke{ 0%,100%{ transform:none } 20%{ transform:rotate(-8deg) } 45%{ transform:rotate(6deg) } 70%{ transform:rotate(-3deg) } }
.p1.poke .box-prop{ animation:rattle .5s linear }
@keyframes rattle{ 0%,100%{ transform:none } 10%,50%,90%{ transform:rotate(-7deg) translateY(-3px) } 30%,70%{ transform:rotate(7deg) translateY(-3px) } }
.p0.poke .box-prop,.p3.poke .box-prop{ animation:lift .5s var(--ease-out) }
@keyframes lift{ 0%,100%{ transform:none } 40%{ transform:translateY(-9px) rotate(3deg) } }
.p5.poke .box-prop{ animation:squeak .42s var(--ease-out) }
@keyframes squeak{ 0%,100%{ transform:none } 35%{ transform:scale(1.08, .8) } 70%{ transform:scale(.97, 1.06) } }
/* מה שמציץ מהקופסה */
.box-prop{ position:absolute; bottom:calc(100% - 3px); inset-inline-start:8%; width:5.4rem; height:auto; overflow:visible; pointer-events:none; transform-origin:50% 100% }
.p1 .box-prop,.p3 .box-prop,.p5 .box-prop{ inset-inline-start:auto; inset-inline-end:6% }
.p2 .box-prop{ inset-inline-start:22% } .p4 .box-prop{ inset-inline-start:30% }
.boidem{ display:grid; gap:1.4rem }
.boidem-txt{ display:grid; gap:.3rem }
.boxes{ display:grid; grid-template-columns:repeat(2, 1fr); gap:2.3rem .5rem; align-items:stretch; padding-top:1.4rem }
.boxes .box{ min-height:4.4rem }
/* ערימה אמיתית אף פעם לא מיושרת */
.boxes .p0{ rotate:-.5deg } .boxes .p3{ rotate:.6deg } .boxes .p5{ rotate:-.45deg } .boxes .p1,.boxes .p4{ margin-top:.4rem } .boxes .p6{ rotate:.3deg }
.box-open{ grid-column:1 / -1; order:-1; gap:.8rem; padding-top:1.6rem; background-color:#c8a06f; min-height:5.6rem }
.box-open::before{ opacity:.34 }
.box-open .box-label{ font-size:2.2rem; transform:none }
.box-open .box-prop{ width:8rem; inset-inline-start:auto; inset-inline-end:10% }
/* שתי כנפיים פתוחות */
.box-flap{ position:absolute; z-index:-1; inset-inline-start:-.5rem; top:-.95rem; width:34%; height:1.1rem; background:linear-gradient(180deg, #7d5f3e, #a57f52); transform:skewX(-34deg); border-radius:2px }
.box-flap.f2{ inset-inline-start:auto; inset-inline-end:-.5rem; transform:skewX(34deg) }
[dir="rtl"] .box-flap{ transform:skewX(34deg) } [dir="rtl"] .box-flap.f2{ transform:skewX(-34deg) }
/* הקופסה שעליה עומדת החנוכייה */
.box-base{ min-height:3.4rem; padding:.9rem .8rem .5rem; width:100% }
.box-base .box-label{ font-size:1.5rem }

/* ---------- המכתב ---------- */
.letter-wrap{ display:grid; gap:1.1rem; justify-items:center; max-width:36rem }
/* נייר מכתבים: שני קפלים, פינה שמתרוממת וחותם שעווה */
.letter{ position:relative; width:100%; background-color:var(--paper); color:var(--marker); padding:clamp(1.2rem, 5vw, 2.2rem); padding-top:clamp(1rem, 4vw, 1.6rem); border-radius:2px 2px 2px 14px; transform:rotate(-.6deg); font-size:1.12rem; display:grid; gap:.3rem; box-shadow:0 14px 30px #0008, 0 2px 0 #cfc4a6;
  background-image:linear-gradient(180deg, rgba(0,0,0,0) calc(33.3% - 1px), rgba(0,0,0,.1) calc(33.3% - 1px) 33.3%, rgba(255,255,255,.6) 33.3% calc(33.3% + 1.5px), rgba(0,0,0,0) calc(33.3% + 1.5px), rgba(0,0,0,0) calc(66.6% - 1px), rgba(0,0,0,.1) calc(66.6% - 1px) 66.6%, rgba(255,255,255,.6) 66.6% calc(66.6% + 1.5px), rgba(0,0,0,0) calc(66.6% + 1.5px)),
    linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,0) 12%, rgba(0,0,0,0) 30%, rgba(0,0,0,.04) 33.3%, rgba(0,0,0,0) 37%, rgba(0,0,0,0) 63%, rgba(0,0,0,.04) 66.6%, rgba(0,0,0,0) 70%, rgba(0,0,0,.07)) }
.lhead{ width:100%; height:1.2rem; margin-bottom:.5rem }
.letter-regards{ margin-top:.8rem }
.letter-sign{ font:700 2.4rem/1 var(--disp) }
.letter-ps{ margin-top:.7rem; font-size:1rem; color:var(--paper-2); max-width:calc(100% - 5rem) }
.letter-seal{ position:absolute; inset-inline-end:clamp(.9rem, 4vw, 1.8rem); bottom:clamp(.9rem, 4vw, 1.6rem); width:4rem; transform:rotate(8deg) }
.letter-seal svg{ width:100%; height:auto }
.letter-curl{ position:absolute; left:0; bottom:0; width:1.5rem; height:1.5rem; border-radius:0 12px 0 14px; background:linear-gradient(45deg, #b9ad8f 0 46%, #e9dfc6 54%, #f8f1df); box-shadow:2px -2px 3px rgba(0,0,0,.16) }

/* ---------- החנוכייה ---------- */
.hk{ --cw:max(2.75rem, min(7.4vw, 4.2rem, 7.6vh)); --ch:calc(var(--cw) * 2.8334); --gapc:calc(var(--cw) * .28);
  position:relative; display:grid; justify-items:center; width:max-content; max-width:100%; margin-inline:auto; padding-top:calc(var(--cw) * 1.3) }
.hk-row{ position:relative; z-index:1; display:flex; align-items:flex-end }
.hk-slot{ flex:none; width:var(--cw); display:grid; justify-items:center }
.hk-gap{ margin-inline-start:var(--gapc) }
.hk-cdl{ display:block; width:100%; height:var(--ch); padding:0; background:none; border:0; position:relative }
.hk-cdl .cdl{ height:100%; width:100% }
/* גוף הפליז מצויר מעל שורת הנרות, כדי שכל נר ייראה עומד בתוך הכוסית שלו */
.hk-base{ position:relative; z-index:2; width:100%; margin-top:calc(var(--cw) * -.1); pointer-events:none; isolation:isolate }
.hk-body{ display:block; width:100%; height:auto; overflow:visible }
.hk-body .rim{ stroke-width:2.6 }
.hk-w{ display:none }
.hk-sham{ position:absolute; z-index:-1; left:50%; bottom:calc(100% + var(--cw) * 1.01); width:calc(var(--cw) * .9); margin-left:calc(var(--cw) * -.45) }
.hk-sham-cdl{ display:block; width:100% }
.hk.sham-in .cup-in-s,.hk.is-lit .cup-in-s{ display:none }
/* האור החם שמאחורי החנוכייה אחרי ההדלקה. גם מפריד אותה מהקרטון שמאחור */
.hk-glow{ position:absolute; z-index:0; left:50%; top:34%; width:150%; aspect-ratio:1.35; transform:translate(-50%, -50%); pointer-events:none; opacity:0; transition:opacity 2s var(--ease-out) .3s;
  background:radial-gradient(closest-side, rgba(255,243,196,.95), rgba(255,226,150,.6) 42%, rgba(255,205,110,.2) 72%, rgba(255,200,100,0)) }
.app[data-light="lit"] .hk-glow{ opacity:1 }
/* נר חדש קופץ אל הכוסית שלו */
.hk-cdl.drop .cdl{ animation:hop .62s var(--ease-out) both }
@keyframes hop{ 0%{ opacity:0; transform:translate(16px, -64px) rotate(9deg) } 50%{ opacity:1; transform:translate(0, 3px) rotate(0deg) } 70%{ transform:translateY(-7px) } 100%{ transform:none } }
/* קופסת 44 הנרות: המכסה מתרומם לרגע, ושתי עיניים מציצות */
.peek{ position:absolute; left:8%; bottom:0; width:calc(var(--cw) * 1.1); min-width:44px; min-height:44px; display:grid; align-content:end; padding:0; background:none; border:0; border-radius:6px; pointer-events:auto }
.peek svg{ display:block; width:100%; height:auto; overflow:visible }
.pk-lid{ transform-box:fill-box; transform-origin:0% 100%; transition:transform .3s var(--ease-out) }
.pk-eyes{ opacity:0; transition:opacity .12s }
.peek.open .pk-lid{ transform:translateY(-9px) rotate(-4deg) }
.peek.open .pk-eyes{ opacity:1; transition-delay:.12s }
.peek.snap .pk-lid{ transition-duration:.07s }
.peek.snap svg{ animation:snapb .22s var(--ease-out) }
@keyframes snapb{ 0%,100%{ transform:none } 40%{ transform:translateY(2px) scale(1.04, .94) } }
@keyframes dropin{ 0%{ opacity:0; transform:translateY(-46px) } 70%{ opacity:1; transform:translateY(3px) } 100%{ transform:none } }
.hk-btn{ border-radius:8px; transition:transform .15s var(--ease-out), background-color .15s }
.hk.is-open:not(.is-lit) .hk-btn:hover{ background:rgba(207,220,242,.1) }
.hk.is-open .hk-btn:active{ transform:scale(.97) }
.hk-btn.chosen{ background:rgba(207,220,242,.16); transform:translateY(-6px) }
.hk-ord{ position:absolute; inset-inline:0; top:0; text-align:center; font:800 1.3rem/1 var(--body); color:var(--moon) }
.hk.sham-in .hk-sham-cdl .cdl,.hk.is-lit .hk-sham-cdl .cdl{ animation:dropin .55s var(--ease-out) both }

.hub{ display:grid; gap:1.2rem; justify-items:center; text-align:center }
.hub-txt{ display:grid; gap:.6rem; justify-items:center }
.hub-mid{ display:grid; justify-items:center; width:100% }
.hub-mid .box-base,.fin-mid .box-base{ max-width:min(100%, 34rem) }
.hub-go{ margin-top:.4rem }

/* ---------- מסך תחנה ---------- */
.st{ display:grid; gap:.9rem; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:.9rem; padding-bottom:0; box-shadow:inset -1.5px 1.5px 0 rgba(185,205,240,.2), 0 18px 34px rgba(4,5,12,.4) }
.st-head{ display:grid; grid-template-columns:3.2rem 1fr; gap:.7rem; align-items:start }
.st-cdl{ height:5.2rem; overflow:hidden }
.st-say{ display:grid; gap:.4rem }
.st-title{ font:700 2.5rem/1 var(--disp) }
.st-brief{ display:grid; gap:.5rem }
.what-t{ display:block; font-size:1.08rem }
.form{ justify-self:start; border:1px dashed var(--line-2); border-radius:8px; padding:.25rem .7rem; font-weight:600; font-size:.95rem }
.st-play{ position:relative; background:var(--card-0); border-radius:12px; padding:.8rem; min-width:0; container-type:inline-size; box-shadow:inset 0 3px 6px rgba(0,0,0,.45), inset 0 -1px 0 rgba(185,205,240,.1) }
.st-hints{ display:grid; gap:.5rem }
.st-hints:empty{ display:none }
.hint{ border:1px dashed var(--line-2); border-radius:10px; padding:.5rem .8rem; animation:rise .24s var(--ease-out) both }
.hint-n{ display:block; font-size:.9rem; font-weight:700; color:var(--ink-2) }
.st-actions{ position:sticky; bottom:0; z-index:6; display:grid; gap:.5rem; background:var(--card); margin-inline:-.9rem; padding:.6rem .9rem .8rem; border-top:1px solid var(--line); border-radius:0 0 16px 16px }
.btns{ display:flex; flex-wrap:wrap; gap:.5rem }
.btns .primary{ flex:1 1 6rem }
.btns .btn:not(.primary){ padding-inline:.8em }
.coach-ring{ position:relative }
.coach-ring::after{ content:""; position:absolute; inset:-5px; border:3px solid var(--moon); border-radius:12px; pointer-events:none; animation:ring 1.7s var(--ease-out) infinite }
@keyframes ring{ 0%{ opacity:1; transform:scale(.94) } 80%,100%{ opacity:0; transform:scale(1.14) } }
.coach-tip{ display:flex; align-items:center; gap:.5rem; margin-bottom:.7rem; color:var(--moon); font-weight:600 }
.coach-tip svg{ width:1.4rem; height:1.4rem; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round }
/* נשאר במקומו, כדי שהחידה לא תקפוץ מתחת לאצבע בנגיעה הראשונה */
.coach-tip.gone{ visibility:hidden }

/* חוגה */
.dial{ display:inline-grid; justify-items:center; gap:.2rem }
.dial-b{ width:3.4rem; height:2.75rem; min-height:44px; display:grid; place-items:center; background:var(--card-2); border:1.5px solid var(--line-2); border-radius:8px; transition:transform .12s var(--ease-out), background-color .15s }
.dial-b:hover{ background:var(--card-3) }
.dial-b:active{ transform:scale(.94) }
.dial-b svg{ width:1.5rem; height:1.5rem; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round }
.dial-v{ width:3.4rem; height:4.2rem; display:grid; place-items:center; background:var(--paper); color:var(--marker); border-radius:6px; font:800 3rem/1 var(--body); font-variant-numeric:tabular-nums }
.dial-v.bump{ animation:bump .2s var(--ease-out) }
.dial-v.bump-d{ animation:bumpd .2s var(--ease-out) }
@keyframes bump{ from{ transform:translateY(22%); opacity:.3 } to{ transform:none; opacity:1 } }
@keyframes bumpd{ from{ transform:translateY(-22%); opacity:.3 } to{ transform:none; opacity:1 } }

/* 1 */
.s1{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:1rem; align-items:center }
.s1-box{ max-width:26rem; justify-self:center; width:100% }
.cb{ width:100%; height:auto }
.cb-title{ font:700 34px/1 var(--disp); fill:var(--marker) }
.cb-sub{ font:600 13px/1 var(--body); fill:#3b3229 }
.cb-note{ font:700 24px/1 var(--disp); fill:var(--marker) }
.s1-lock{ display:grid; justify-items:center }

/* 2 */
.s2{ display:grid; gap:.9rem }
.s2-rules ul{ display:grid; grid-template-columns:1fr 1fr; gap:.35rem .8rem }
.s2-rules li{ display:flex; gap:.5rem; align-items:center; font-size:.98rem }
/* אותיות שהן חלק מחידה נכתבות בגופן הגוף, כדי שנ, ו וג לא יתבלבלו */
.chip{ flex:none; width:2rem; height:2rem; display:grid; place-items:center; background:var(--paper); color:var(--marker); border-radius:6px; font:800 1.3rem/1 var(--body) }
.s2-pot{ display:flex; flex-wrap:wrap; gap:.2rem 1.2rem; font-weight:600; margin-bottom:.5rem }
.s2-players{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:.35rem }
.pl{ display:grid; justify-items:center; gap:.15rem; padding:.45rem .2rem .5rem; background:var(--card); border:1.5px solid var(--line); border-radius:10px; text-align:center; font-size:.86rem; line-height:1.3 }
.pl.now{ border-color:var(--moon) }
.pl-turn{ color:var(--ink-2); font-size:.9rem }
.pl-name{ font:700 1.7rem/1 var(--disp) }
.pl-drd{ width:3.4rem; min-height:4.25rem; padding:0; background:none; border:0; border-radius:8px; position:relative; transition:transform .12s var(--ease-out) }
/* הריחוף מזיז את הציור ולא את הכפתור, כדי שהכפתור לא יברח מתחת לסמן */
.pl-drd:hover .drd{ transform:translateY(-2px) }
.pl-drd:active{ transform:scale(.94) }
.pl-drd.spin{ animation:spin .46s var(--ease-out) }
@keyframes spin{ from{ transform:rotateY(0deg) } to{ transform:rotateY(720deg) } }
.drd{ width:100%; height:auto; transition:transform .12s var(--ease-out) }
.drd-letter{ font:800 32px/1 var(--body); fill:var(--marker) }
.pl-end{ font-weight:700 }
.pl-res{ display:inline-flex; align-items:center; gap:.2rem; font-weight:600 }
.pl-res svg{ width:1.1rem; height:1.1rem; fill:none; stroke:currentColor; stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round }
.pl.bad{ border-style:dashed; border-color:var(--ink) }
.s2-now{ min-height:1.6em; margin-top:.5rem; font-weight:600; color:var(--moon) }

/* 3 */
.s3{ display:grid; gap:.6rem; justify-items:center }
.s3-frame{ width:100%; max-width:27rem; background-color:#7c6a4d; padding:.7rem; border-radius:4px; box-shadow:inset 0 0 0 3px #3b2f1f, inset 2px 2px 0 4px rgba(255,255,255,.1), 0 10px 22px #0008;
  background-image:repeating-linear-gradient(90deg, #0000 0 14px, #4d3f2b 14px 16px), repeating-linear-gradient(0deg, #0000 0 14px, #4d3f2b 14px 16px), linear-gradient(135deg, #94805c, #5e4f38) }
.s3-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:3px; background:#4d3f2b; box-shadow:0 0 0 2px #3b2f1f }
.ms{ position:relative; aspect-ratio:1; padding:6%; border:0; border-radius:0; background-color:#cdb891; background-image:repeating-linear-gradient(90deg, #0000 0 11px, #b9a47c66 11px 12px), repeating-linear-gradient(0deg, #0000 0 11px, #b9a47c66 11px 12px); transition:transform .12s var(--ease-out), filter .15s }
.ms svg{ width:100%; height:100% }
.ms:hover{ filter:brightness(1.08) }
.ms:active{ transform:scale(.97) }
.ms:focus-visible{ outline-offset:-4px; outline-color:#12131a }
.ms.is-bad{ box-shadow:inset 0 0 0 4px #2b2118 }
.ms-tag{ position:absolute; inset-inline:0; bottom:4px; margin-inline:auto; width:max-content; max-width:94%; padding:.05rem .5rem .1rem; border-radius:4px; font-size:.9rem; font-weight:700; line-height:1.3; transform:rotate(-2deg); animation:stamp .26s var(--ease-out) both }
@keyframes stamp{ 0%{ opacity:0; transform:scale(1.5) rotate(-7deg) } 70%{ opacity:1; transform:scale(.96) rotate(-2deg) } 100%{ transform:rotate(-2deg) } }
.ms.wob svg{ animation:wob .32s var(--ease-out) }
@keyframes wob{ 0%,100%{ transform:none } 30%{ transform:rotate(-3deg) scale(.96) } 65%{ transform:rotate(2deg) } }
.ms.is-bad .ms-tag{ background:#2b2118; color:#f4ecd9 }
.ms.is-true .ms-tag{ background:#f4ecd9; color:#2b2118 }
.ms-letter{ font:800 40px/1 var(--body) }
.ms-year{ font:800 31px/1 var(--body); fill:#2b2118 }
.ms-date{ font:800 14.5px/1 var(--body); fill:#2b2118 }
.s3-frame figcaption{ margin-top:.5rem; background:#f4ecd9; color:#2b2118; padding:.3rem .6rem; font-size:.92rem; text-align:center; border-radius:2px }
.s3-count{ font-weight:700 }

/* 4 */
.s4{ display:grid; gap:1rem }
.s4-top{ display:grid; gap:.5rem; justify-items:center }
/* קרש עץ עם סיבים, שני מסמרים, ואריחי נייר עם צל */
.s4-sign{ position:relative; display:flex; align-items:flex-end; justify-content:center; padding:2.1rem .6rem .8rem; background-color:#6b4a2e; border-radius:8px; border-bottom:5px solid #4d3420; max-width:100%; box-shadow:inset 0 2px 0 rgba(255,255,255,.16), 0 8px 16px #0007;
  background-image:radial-gradient(circle at .6rem .6rem, #c9cdd6 0 .14rem, #2b2118 .15rem .22rem, #0000 .23rem), radial-gradient(circle at calc(100% - .6rem) .6rem, #c9cdd6 0 .14rem, #2b2118 .15rem .22rem, #0000 .23rem), repeating-linear-gradient(91deg, rgba(0,0,0,.1) 0 2px, #0000 2px 11px, rgba(255,255,255,.05) 11px 12px, #0000 12px 19px), linear-gradient(180deg, rgba(255,255,255,.1), #0000 20%, rgba(0,0,0,.2)) }
.s4-tile{ width:2.75rem; height:3.9rem; display:grid; place-items:center; background-color:var(--paper); background-image:linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 28%, rgba(0,0,0,.07)); color:var(--marker); border-radius:4px; font:700 3rem/1 var(--disp); box-shadow:0 3px 0 #b9ad8f, 0 6px 8px rgba(0,0,0,.4); transition:transform .28s var(--ease-out) }
.s4-tile.pa{ transform:translateX(9px) }
.s4-tile.pb{ transform:translateX(-9px) }
.s4-gap{ position:relative; z-index:1; flex:none; width:44px; height:3.9rem; margin-inline:-15px; background:none; border:0; border-radius:6px; color:var(--paper) }
.s4-gap::before{ content:""; position:absolute; left:50%; top:-.2rem; bottom:-.2rem; border-left:2px dashed var(--paper); opacity:.75; margin-left:-1px }
.s4-gap svg{ position:absolute; left:50%; top:-1.75rem; width:1.4rem; height:1.4rem; margin-left:-.7rem; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; transition:transform .15s var(--ease-out) }
.s4-gap:hover svg{ transform:scale(1.2) }
.s4-gap[aria-pressed="true"]::before{ border-left:3px solid var(--moon); opacity:1; margin-left:-1.5px }
.s4-gap[aria-pressed="true"]{ color:var(--moon) }
.s4-parts{ min-height:1.6em; font-weight:600; text-align:center }
.s4-lock{ display:grid; justify-items:center }
.s4-dials{ display:flex; direction:ltr; gap:.7rem }
.s4-d{ display:grid; justify-items:center; gap:.2rem; font-size:.84rem; color:var(--ink-2); direction:rtl }
.s4-strip ul{ display:grid; grid-template-columns:repeat(auto-fill, minmax(2.7rem, 1fr)); gap:4px }
.s4-strip li{ display:grid; justify-items:center; background:var(--card); border-radius:6px; padding:.15rem 0 .2rem; line-height:1.1 }
.g-l{ font:700 1.3rem/1.15 var(--body) }
.g-n{ font-size:.9rem; color:var(--ink-2); font-variant-numeric:tabular-nums }

/* 5 */
.s5{ display:grid; gap:.8rem }
.s5-info{ display:grid; gap:.2rem; font-size:.98rem }
.s5-main{ display:grid; gap:1rem; justify-items:center }
.s5-glasswrap{ --air:2.7rem; --oil:4.5rem; --water:5.1rem; --honey:5.1rem; display:grid; grid-template-columns:auto 11rem; gap:.6rem }
.s5-labels{ display:grid; grid-template-rows:var(--air) var(--oil) var(--water) var(--honey); text-align:end; font-size:.92rem; line-height:1.2 }
.s5-labels > span{ display:grid; align-content:center; justify-items:end }
/* כוס זכוכית: דפנות בהירות, תחתית עבה, ושלושה נוזלים שלכל אחד מהם פני שטח משלו */
.s5-glass{ position:relative; height:17.4rem; display:grid; grid-template-rows:var(--air) var(--oil) var(--water) var(--honey); border:3px solid #b4c4dc; border-top:0; border-bottom-width:9px; border-radius:0 0 18px 18px; overflow:hidden; box-shadow:0 8px 0 -3px rgba(0,0,0,.4) }
.ly{ position:relative }
.ly::before{ content:""; position:absolute; inset-inline:-2px; top:-4px; height:8px; border-radius:50% }
.ly-air::before{ display:none }
.ly-oil{ background:linear-gradient(90deg, #77691a, #a8962e 28%, #94822a 68%, #b8a53c) } .ly-oil::before{ background:#d6c458 }
.ly-water{ background:linear-gradient(90deg, #2c4459, #45647e 28%, #3a566d 68%, #4f7089) } .ly-water::before{ background:#6f8fab; opacity:.75 }
.ly-honey{ background:linear-gradient(90deg, #643a0b, #96600f 28%, #7d4c12 68%, #a56a1a) } .ly-honey::before{ background:#b97a1c; opacity:.8 }
/* דבש סמיך: הבהקה איטית ורחבה */
.ly-honey::after{ content:""; position:absolute; inset-inline-start:10%; top:26%; width:30%; height:20%; border-radius:50%; background:rgba(255,214,130,.2) }
.ly-oil::after{ content:""; position:absolute; inset:0; background:radial-gradient(circle at 22% 70%, rgba(255,248,200,.5) 0 2px, #0000 3px), radial-gradient(circle at 74% 38%, rgba(255,248,200,.4) 0 1.5px, #0000 2.5px), radial-gradient(circle at 58% 82%, rgba(255,248,200,.4) 0 1.5px, #0000 2.5px) }
.s5-over{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none }
.zone{ position:absolute; inset-inline:6px; height:3rem; min-height:44px; display:grid; place-items:center; padding:0 .2rem; background:rgba(18,19,26,.86); border:1.5px dashed rgba(236,231,218,.75); border-radius:8px; color:var(--ink); transition:background-color .15s, transform .12s var(--ease-out) }
.zone:hover{ background:rgba(47,45,58,.9) }
.zone:active{ transform:scale(.97) }
.z0{ top:calc(var(--air) - 1.5rem) } .z1{ top:calc(var(--air) + var(--oil) - 1.5rem) } .z2{ top:calc(var(--air) + var(--oil) + var(--water) - 1.5rem) } .z3{ bottom:5px }
.zone-l{ font-size:.9rem; font-weight:600; line-height:1.1 }
.zone.has .zone-l{ display:none }
.zone-t{ display:flex; gap:1px; justify-content:center }
.zone-t:empty{ display:none }
.tok{ width:2.2rem; height:2.2rem; display:block }
.tok svg{ width:100%; height:100% }
.tok.fall{ animation:fall .7s var(--ease-out) both }
@keyframes fall{ 0%{ transform:translateY(var(--fall, -120px)) } 62%{ transform:translateY(5px) } 82%{ transform:translateY(-3px) } 100%{ transform:none } }
.tok.reject{ animation:reject .65s var(--ease-in-out) both }
@keyframes reject{ 0%{ transform:none; opacity:1 } 35%{ transform:translateY(7px) } 100%{ transform:translateY(-34px); opacity:0 } }
.ripple{ position:absolute; left:15%; top:20%; width:70%; height:60%; border:2px solid rgba(220,235,250,.85); border-radius:50%; pointer-events:none; animation:ripple .6s var(--ease-out) forwards }
@keyframes ripple{ from{ transform:scale(.2); opacity:.9 } to{ transform:scale(1.25); opacity:0 } }
.s5-tray{ width:100%; max-width:24rem }
.s5-objs{ display:grid; grid-template-columns:1fr 1fr; gap:.45rem }
.obj{ position:relative; display:grid; grid-template-columns:2.4rem 1fr; grid-template-rows:auto auto; column-gap:.5rem; align-items:center; text-align:start; min-height:3.4rem; padding:.35rem .6rem; background:var(--card-2); border:1.5px solid var(--line-2); border-radius:10px; line-height:1.2; transition:transform .12s var(--ease-out), background-color .15s, border-color .15s }
.obj:hover{ background:var(--card-3) }
.obj:active{ transform:scale(.97) }
.obj-i{ grid-row:1 / 3 }
.obj-i svg{ width:2.4rem; height:2.4rem }
.obj-n{ font-weight:600; font-size:.95rem }
.obj .num{ justify-self:start; color:var(--ink-2) }
.obj[aria-pressed="true"]{ border-color:var(--moon); background:var(--card-3); box-shadow:inset 0 0 0 1.5px var(--moon) }
.obj.is-placed{ border-style:dashed }
.obj:disabled{ opacity:.78; cursor:default }

/* 6 */
.s6{ display:grid }
/* משקוף עץ עם עומק: צד בהיר שפונה לחדר, וצל פנימי על הזכוכית */
.s6-win{ position:relative; height:8.6rem; border:.6rem solid #5d3f27; border-color:#7a5636 #5d3f27 #5d3f27 #6f4d30; border-bottom:0; border-radius:5px 5px 0 0; overflow:hidden; box-shadow:0 0 0 2px #3b2817 }
.s6-win::after{ content:""; position:absolute; inset:0; box-shadow:inset 0 5px 0 rgba(0,0,0,.4), inset 4px 0 0 rgba(0,0,0,.22); pointer-events:none }
.s6-win svg{ width:100%; height:100% }
.s6-row{ display:grid; grid-template-columns:repeat(8, minmax(0,1fr)); margin-top:-2.6rem; position:relative }
.tl{ position:relative; display:grid; justify-items:center; align-content:end; width:100%; min-width:44px; min-height:5.4rem; padding:0; background:none; border:0; border-radius:6px; transition:transform .12s var(--ease-out) }
.tl .tea{ width:min(84%, 3.2rem) }
.tl:hover .tea{ transform:translateY(-3px) }
.tl .tea{ transition:transform .15s var(--ease-out) }
.tl:active{ transform:scale(.95) }
/* נר שכבה משאיר חוט עשן */
.tl .smoke{ position:absolute; left:50%; bottom:58%; width:1rem; height:2rem; margin-left:-.5rem; pointer-events:none; transform-origin:50% 100%; animation:smoke .9s ease-out forwards }
.smoke path{ fill:none; stroke:#aab0bb; stroke-width:2; stroke-linecap:round }
@keyframes smoke{ 0%{ opacity:.85; transform:translateY(4px) scaleY(.5) } 100%{ opacity:0; transform:translateY(-14px) scaleY(1.1) } }
.tl-n{ display:block; width:100%; margin-top:2px; background:#6f4d30; color:#f4ecd9; font:700 1.15rem/1.6 var(--body); text-align:center; box-shadow:inset 0 2px 0 #8a6440, inset 1px 0 0 rgba(0,0,0,.18) }
.s6-sill{ height:.75rem; margin-inline:-.35rem; background:linear-gradient(180deg, #8a6440 0 22%, #5d3f27 22% 72%, #3b2817 72%); border-radius:0 0 4px 4px; box-shadow:0 6px 10px #0007 }
.s6-info,.s7-info,.s8-info{ display:flex; gap:1.2rem; margin-top:.7rem; font-weight:600 }
.s6-info span:last-child{ color:var(--ink-2) }
.st-6 .st-play{ margin-inline:-.7rem; padding-inline:0 }

/* 7 */
.s7-jugs{ display:flex; justify-content:center; align-items:flex-end; gap:clamp(.3rem, 3vw, 2rem) }
.s7-jugs .j8{ width:clamp(7.2rem, 22vw, 10.5rem) } .s7-jugs .j5{ width:clamp(6.1rem, 18vw, 8.6rem) } .s7-jugs .j3{ width:clamp(5rem, 14vw, 6.9rem) }
.jugb{ position:relative; display:grid; justify-items:center; gap:.1rem; width:100%; padding:.4rem .2rem; background:none; border:2px solid transparent; border-radius:12px; line-height:1.25; transition:transform .18s var(--ease-out), background-color .15s, border-color .15s }
.jugb:hover{ background:rgba(207,220,242,.06) }
.jugb:active{ transform:scale(.97) }
.jugb[aria-pressed="true"]{ border-color:var(--moon); background:rgba(207,220,242,.1); transform:translateY(-6px) }
.jug{ width:100%; height:auto }
.jug-oil{ transform-box:fill-box; transform-origin:50% 100%; transition:transform .55s var(--ease-out) }
.jugb.tilt .jug{ animation:tilt .6s var(--ease-out) }
@keyframes tilt{ 0%,100%{ transform:none } 35%,60%{ transform:rotate(calc(var(--dir, -1) * 13deg)) } }
/* זרם השמן שיוצא מהכד בזמן המזיגה */
.jug-stream{ opacity:0; transform-origin:50px 0 }
.jugb.pour-l .jug-stream{ transform:scaleX(-1) }
.jugb.tilt .jug-stream{ animation:stream .6s ease-out }
@keyframes stream{ 0%,12%{ opacity:0 } 30%,62%{ opacity:1 } 100%{ opacity:0 } }
.jug-cap{ font-size:.9rem; color:var(--ink-2) }
/* ספרות שנושאות מידע של חידה נכתבות בגופן הגוף: בגופן הכותרת 8 ו-0 דומים מדי */
.jug-has{ font:700 1.3rem/1.2 var(--body); font-variant-numeric:tabular-nums }
.s7-info{ justify-content:center }

/* 8 */
.s8{ display:grid; justify-items:center }
.s8-grid{ position:relative; display:grid; grid-template-columns:repeat(var(--w), minmax(0,1fr)); direction:ltr; width:100%; max-width:27rem; touch-action:none; user-select:none; -webkit-user-select:none }
.cell{ position:relative; z-index:1; aspect-ratio:1; padding:6% 9% 5%; background:none; border:0; border-radius:10px; transition:background-color .15s }
.cell:hover{ background:rgba(207,220,242,.07) }
.cell .mini{ width:100%; height:100% }
.cell.head::after{ content:""; position:absolute; inset:5%; border:2px solid var(--moon); border-radius:10px; pointer-events:none }
.cell:focus-visible{ outline-offset:-3px }
.cell-box{ aspect-ratio:1; padding:14% }
.cell-box span{ display:block; width:100%; height:100%; border-radius:3px; box-shadow:inset -2px 2px 0 rgba(185,205,240,.3), 0 4px 0 rgba(0,0,0,.35);
  background:linear-gradient(90deg, #0000 40%, #e9d9ae77 40% 60%, #0000 60%), linear-gradient(180deg, rgba(255,255,255,.14) 0 7%, rgba(0,0,0,.24) 7% 24%, #0000 24%), linear-gradient(90deg, rgba(0,0,0,.24), #0000 24%), #8b6c47 }
.s8-path{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none }
.s8-path polyline{ fill:none; stroke:var(--flame); stroke-opacity:.3; stroke-width:9; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke }

@container (min-width:30rem){
  .s5-main{ grid-template-columns:auto 12.5rem; justify-content:center; align-items:center; gap:1.4rem }
  .s5-objs{ grid-template-columns:1fr }
  .s2-rules ul{ grid-template-columns:repeat(4, auto); justify-content:start; gap:.4rem 1.4rem }
}

/* ---------- הסיום ---------- */
.fin{ display:grid; gap:1rem }
.fin-side{ display:grid; gap:.8rem }
.fin-side .h-disp{ text-align:center }
.fin-sham{ display:grid; grid-template-columns:auto 1fr; gap:.8rem; align-items:end }
/* קופסת הנרות שהשמש מציץ ממנה, עם שלט קטן על מקל */
.cbox{ position:relative; width:7rem; isolation:isolate }
.cbox::before{ content:""; position:absolute; z-index:-1; inset-inline:.3rem; bottom:3.3rem; height:2.4rem; background:linear-gradient(180deg, #cfc4a6, #a89c80); border-radius:3px 3px 0 0; transform:perspective(220px) rotateX(-24deg); transform-origin:50% 100% }
.cbox-pop{ height:7rem; overflow:hidden; display:flex; justify-content:center; align-items:flex-end; gap:.15rem }
.cbox-sham{ width:2.7rem; flex:none; transform:translateY(100%); transition:transform .6s var(--ease-out) }
.cbox.pop .cbox-sham{ transform:translateY(34%) }
.cbox.is-empty .cbox-sham{ transform:translateY(100%); transition-duration:.3s }
.cbox-sign{ display:grid; justify-items:center; flex:none; transform:translateY(100%) rotate(7deg); transform-origin:50% 100%; transition:transform .6s var(--ease-out) .2s }
.cbox-sign::after{ content:""; width:3px; height:2rem; background:#8a6a45 }
.cbox-sign-t{ display:block; padding:.1rem .35rem .15rem; background:#f4ecd9; color:#191613; font:700 1rem/1.1 var(--disp); border-radius:2px; box-shadow:0 2px 0 rgba(0,0,0,.35); white-space:nowrap }
.cbox.pop .cbox-sign{ transform:rotate(7deg) }
.cbox.is-empty .cbox-sign{ transform:translateY(100%) rotate(7deg); transition-duration:.3s; transition-delay:0s }
.cbox-front{ position:relative; display:grid; justify-items:center; align-content:center; gap:.2rem; height:3.6rem; background-color:#e2d8be; color:var(--marker); border-radius:2px 2px 4px 4px; border-top:4px solid #f1e9d2; box-shadow:0 6px 10px #0007;
  background-image:linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,0) 24%, rgba(0,0,0,0) 84%, rgba(255,255,255,.3)) }
.cbox-stripes{ display:flex; gap:3px }
.cbox-stripes i{ width:7px; height:16px; border-radius:2px; background:var(--c-white); outline:1px solid #0002 }
.cbox-stripes i:nth-child(2){ background:var(--c-yellow) } .cbox-stripes i:nth-child(3){ background:var(--c-orange) } .cbox-stripes i:nth-child(4){ background:var(--c-pink) } .cbox-stripes i:nth-child(5){ background:var(--c-blue) }
.cbox-t{ font:700 1.3rem/1 var(--disp) }
.fin-talk{ display:grid; gap:.6rem; justify-items:start; align-self:center }
.fin-talk .bubble{ font-size:1.12rem }
.bubble.swap{ animation:rise .24s var(--ease-out) both }
.fin-task{ background:var(--card); border:1px solid var(--line); border-radius:12px; padding:.8rem }
.fin-mid{ display:grid; justify-items:center; min-width:0 }
.fin .hk{ --cw:max(2.75rem, min(7.4vw, 4.2rem, 6.4vh)) }
.fin-boxes{ display:grid; grid-template-columns:1fr 1fr; gap:.4rem; width:100%; max-width:34rem; margin-top:2.3rem }
.fin-boxes .box{ min-height:3.6rem; padding:.6rem .5rem }
.fin-boxes .box-label{ font-size:1.15rem }
.fin-boxes .box:nth-child(n+3){ display:none }
.fin-act,.fin-end,.fin-task,.fin .bubble{ transition:background-color 1.6s, color 1.6s, border-color 1.6s }
.fin-act{ position:sticky; bottom:0; z-index:6; display:grid; gap:.5rem; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:.7rem .8rem }
.fin-phrase{ display:grid; gap:.1rem }
.phrase{ font:700 2.4rem/1.1 var(--disp); min-height:1.1em; letter-spacing:.04em }
.phrase.empty{ font:400 1rem/1.6 var(--body); color:var(--ink-2); letter-spacing:0; min-height:2.64rem; display:grid; align-items:center }
.phrase.right{ letter-spacing:0 }
.fin-act .btn{ justify-self:start }
.fin-end{ display:grid; gap:.7rem; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:.9rem }
.fin-door{ display:grid; grid-template-columns:5rem 1fr; gap:.9rem; align-items:center }
.door{ width:100%; height:auto; overflow:visible }
/* כשהדלת נפתחת, נשפך ממנה משולש של אור על הרצפה */
.door-wedge{ opacity:0 }
.fin-end.go .door-wedge{ opacity:1; transition:opacity 1s var(--ease-out) .9s }
.fin-end.instant .door-wedge{ transition:none }
.door-panel{ transform-box:fill-box; transform-origin:0% 50% }
.fin-end.go .door-panel{ transform:scaleX(.2); transition:transform 1.2s var(--ease-in-out) .3s }
.fin-doorline{ font:700 2.2rem/1 var(--disp) }
.fin-outro{ display:grid; gap:.4rem }
.fin-end.go .fin-outro .bubble{ animation:rise .5s var(--ease-out) both; animation-delay:calc(var(--i) * .8s + .9s) }
.fin-end.instant .door-panel{ transition:none }
.fin-end.instant .fin-outro .bubble{ animation:none }
.fin-end .btn{ justify-self:start }

/* ---------- התעודה ---------- */
.cert-wrap{ display:grid; gap:1rem; justify-items:center }
.cert{ width:100%; max-width:44rem; background:var(--paper); color:var(--marker); padding:clamp(1.4rem, 5vw, 2.6rem); border-radius:4px; text-align:center; display:grid; gap:.45rem; justify-items:center; outline:2px solid var(--marker); outline-offset:-.8rem; box-shadow:0 16px 36px #0006 }
.cert-h{ font:700 clamp(3.2rem, 11vw, 5.6rem)/1.15 var(--disp); padding-bottom:.1em }
.cert-given{ color:var(--paper-2) }
.cert-team{ font:700 clamp(2.2rem, 8vw, 3.4rem)/1.1 var(--disp); border-bottom:2px solid var(--thread); padding:0 1rem .1rem; max-width:100%; overflow-wrap:anywhere }
.cert-line{ font-size:1.2rem; font-weight:600; margin-top:.5rem }
.cert-row{ display:flex; gap:.25rem; align-items:flex-end; margin-top:.2rem }
.cert-c{ width:1.7rem }
.cert-c.c4{ width:2rem; margin-bottom:.5rem }
.cert-time{ font-variant-numeric:tabular-nums }
.cert-credit{ font-size:.84rem; color:var(--paper-2); margin-top:.4rem }
.cert-actions{ display:flex; flex-wrap:wrap; gap:.6rem; justify-content:center }

/* ---------- למורה ---------- */
.teach{ display:grid; gap:1rem }
.prods{ display:grid; gap:.9rem }
.prod{ display:flex; flex-direction:column; background:var(--paper); color:var(--marker); border-radius:10px; overflow:hidden }
.prod-img img{ width:100%; height:auto; aspect-ratio:16/10; object-fit:cover; object-position:50% 0; background:#d9cfb8 }
.prod-body{ flex:1; display:grid; gap:.3rem; padding:.8rem 1rem 1rem; grid-template-rows:auto auto 1fr auto }
.prod-h{ font:700 2rem/1.05 var(--disp) }
.prod-line{ font-weight:600; line-height:1.4 }
.prod-who{ color:var(--paper-2); font-size:.95rem; line-height:1.4 }
.prod-foot{ display:flex; margin-top:.7rem }
.prod-foot .btn{ flex:1 }
.prod .btn:focus-visible{ outline-color:var(--marker) }
.teach-more{ display:flex; flex-wrap:wrap; gap:.6rem }

/* ---------- תגובות קטנות ללחיצה ---------- */
.fxl{ position:fixed; inset:0; z-index:30; pointer-events:none; overflow:hidden }
.puff{ position:absolute; width:0; height:0 }
.puff i{ position:absolute; left:-3px; top:-3px; width:6px; height:6px; border-radius:50%; background:#cfc8b8; opacity:0; animation:puff .42s var(--ease-out) forwards }
.puff-saw i{ width:5px; height:3px; border-radius:1px; background:#d2ad78 }
.puff-drop i{ width:5px; height:5px; background:#a9c8e6 }
.puff-oil i{ background:#e9d67a }
.puff-spark i{ width:4px; height:4px; background:var(--flame) }
@keyframes puff{ 0%{ opacity:.9; transform:translate(0, 0) scale(.6) } 100%{ opacity:0; transform:translate(var(--dx), var(--dy)) scale(1.25) } }
.fly{ position:absolute; width:12px; height:12px; margin:-6px 0 0 -6px; border-radius:50% }
.fly.coin{ background:#e3b84a; box-shadow:inset -2px -2px 0 #a37f24, inset 2px 2px 0 #f6e08a }
.fly.spark{ width:10px; height:10px; margin:-5px 0 0 -5px; background:#fff0b8; box-shadow:0 0 0 3px rgba(255,177,51,.55), 0 0 0 7px rgba(255,177,51,.2) }

/* ---------- חפצים בבוידעם שמגיבים ללחיצה ---------- */
.eggs{ z-index:3 }
.egg{ position:absolute; padding:0; background:none; border:0; border-radius:8px; pointer-events:auto; cursor:pointer }
.eggs.off .egg{ pointer-events:none; cursor:default }
.egg svg{ display:block; width:100%; height:100%; overflow:visible }
.egg-moon svg,.egg-spider svg{ overflow:hidden }
.eg-m{ transform-box:fill-box; transform-origin:50% 100% }
.egg-bulb .eg-m{ transform-origin:50% 0% }
.egg-bulb.go .eg-m{ animation:swing 1.25s ease-in-out }
@keyframes swing{ 0%,100%{ transform:rotate(0deg) } 18%{ transform:rotate(10deg) } 40%{ transform:rotate(-7deg) } 62%{ transform:rotate(4deg) } 82%{ transform:rotate(-2deg) } }
.egg-spider.go .eg-m{ animation:spider 1.6s var(--ease-in-out) }
@keyframes spider{ 0%,100%{ transform:translateY(0) } 35%,55%{ transform:translateY(96px) } }
.egg-moon.go .eg-m{ animation:cloud 2.9s linear }
@keyframes cloud{ from{ transform:translateX(0) } to{ transform:translateX(-170px) } }
.egg-lulav .eg-m{ transform-origin:40% 100% }
.egg-lulav.go .eg-m{ animation:sway .7s ease-in-out }
@keyframes sway{ 0%,100%{ transform:none } 25%{ transform:rotate(-5deg) } 60%{ transform:rotate(4deg) } 85%{ transform:rotate(-1.5deg) } }
.egg-raashan .eg-m{ transform-origin:65% 100% }
.egg-raashan.go .eg-m{ animation:rattle .5s linear }
.egg-hammer.go .eg-m{ animation:squeak .45s var(--ease-out) }
.egg-fan .eg-m{ transform-origin:50% 50% }
.egg-fan.go .eg-m{ animation:whirl .95s var(--ease-out) }
@keyframes whirl{ to{ transform:rotate(720deg) } }

/* טלפונים צרים: הסרגל העליון נכנס גם ברוחב 320 */
@media (max-width:399px){
  .bar{ gap:.1rem; min-width:0; padding-inline-start:8px; padding-inline-end:58px }
  .bar-title{ font-size:1.15rem; padding-inline:.1rem; min-width:0 }
  .bar-tools{ gap:0 }
  .tool{ padding:0 }
}
/* סרגל הפעולות הדביק לא מסתיר את מה שגוללים אליו או ממקדים בו */
@media (max-width:899px){
  html{ scroll-padding-bottom:6.5rem }
}

/* ---------- רוחב ---------- */
@media (min-width:600px){
  :root{ --side:20px }
  .tool-txt{ display:inline }
  .boxes{ grid-template-columns:repeat(4, 1fr) }
  .box-open{ grid-column:3 / span 2; grid-row:2 / span 2; align-content:center }
  .boxes .box:nth-child(7){ grid-column:1 / span 2 }
  .hk{ --gapc:calc(var(--cw) * 1.2) }
  .hk-n{ display:none }
  .hk-w{ display:block }
  :root{ --sx:26vh }
  .pl{ font-size:.95rem; padding:.6rem .4rem .7rem }
  .pl-drd{ width:4rem }
  .prods{ grid-template-columns:repeat(3, minmax(0,1fr)) }
  .fin-boxes{ grid-template-columns:repeat(4, 1fr); max-width:44rem }
  .fin-boxes .box:nth-child(n+3){ display:grid }
  .s4{ grid-template-columns:1fr auto; align-items:center }
  .s4-tile{ width:3.25rem }
  .s4-sign{ padding-inline:.9rem }
  .s4-strip{ grid-column:1 / -1 }
  .st{ padding:1.2rem; padding-bottom:0 }
  .st-6 .st-play{ margin-inline:0; padding-inline:.8rem }
  .st-actions{ margin-inline:-1.2rem; padding-inline:1.2rem }
}
@media (min-width:900px){
  :root{ --sx:14vh }
  .top{ display:grid; grid-template-columns:auto 1fr auto auto auto; align-items:center; column-gap:1rem; padding-inline-start:var(--side) }
  .bar,.sub{ display:contents }
  .bar-title{ order:1 }
  .step{ order:2; font-size:1rem; padding-inline-start:1rem; border-inline-start:1px solid var(--line-2) }
  .pips{ order:3 }
  .bar-tools{ order:4; margin-inline-start:1rem }
  .thread{ order:5; height:56px }
  .thread::before{ height:161px }
  .tag{ top:8px }
  .st{ grid-template-columns:minmax(15rem, 19rem) minmax(0, 1fr); grid-template-rows:auto auto auto 1fr; column-gap:1.4rem; padding:1.4rem; align-items:start }
  .st-head,.st-brief,.st-hints,.st-actions{ grid-column:1 }
  .st-play{ grid-column:2; grid-row:1 / -1; align-self:stretch; display:grid; align-content:center; padding:1.2rem }
  .st-actions{ margin:0; padding:.6rem 0 1.4rem; border:0; border-radius:0 }
  .st{ padding-bottom:0 }
  .st-play{ margin-bottom:1.4rem }
  .hub{ grid-template-columns:minmax(15rem, 20rem) minmax(0, 1fr); align-items:center; text-align:start; column-gap:2rem }
  .hub-txt{ justify-items:start }
  .fin{ grid-template-columns:minmax(17rem, 23rem) minmax(0, 1fr); grid-template-rows:auto auto 1fr; column-gap:2rem; align-items:start }
  .fin-side,.fin-act,.fin-end{ grid-column:1 }
  .fin-side .h-disp{ text-align:start }
  .fin-mid{ grid-column:2; grid-row:1 / -1; align-self:center }
  .fin-act{ position:static }
  .boidem{ grid-template-columns:minmax(14rem, 18rem) 1fr; align-items:center; column-gap:2rem }
}
@media (min-width:1100px){
  :root{ --side:6.8rem }
  .top{ padding-inline-start:1.4rem }
  .thread{ width:calc(1.4rem + 56px) }
  .thread::before{ left:calc(1.4rem + 21px) }
  .tag{ left:1.4rem }
  .foot{ padding-inline:1.4rem }
  .tool-lbl{ position:static; width:auto; height:auto; overflow:visible; clip-path:none }
  :root{ --sx:0px }
}

@media (max-height:820px) and (min-width:900px){
  .stage{ padding-top:1rem }
  .st{ padding-top:1rem; row-gap:.6rem }
}

/* ---------- השהיית תנועה: לפי המכשיר או לפי הכפתור ---------- */
[data-motion="off"] *,[data-motion="off"] *::before,[data-motion="off"] *::after{ animation:none !important; transition:none !important; scroll-behavior:auto !important }
[data-motion="off"] .dust,[data-motion="off"] .motes{ display:none }
[data-hidden] *,[data-hidden] *::before,[data-hidden] *::after{ animation-play-state:paused !important }

/* ---------- הדפסת התעודה: רקע בהיר, עמוד אחד ---------- */
@media print{
  @page{ size:A4 landscape; margin:14mm }
  html{ font-size:15px }
  body{ background:#fff }
  .scene,.dark,.warm,.moon,.dust,.eggs,.fxl,.top,.foot,.toast,.cert-actions,.skip{ display:none !important }
  .app{ display:block; min-height:0 }
  .stage{ padding:0; display:block }
  *,*::before,*::after{ animation:none !important; transition:none !important }
  .cert{ max-width:none; width:100%; background:#fff; box-shadow:none; break-inside:avoid; -webkit-print-color-adjust:exact; print-color-adjust:exact; padding:14mm 12mm }
}

/* ---------- רשימת התפוצה (18.11.2026): שורה שקטה עם ברקוד. הברקוד שחור על לבן עם שוליים, כדי שאפשר יהיה לסרוק אותו מהמקרן ---------- */
.nextroom{ display:flex; align-items:center; gap:.9rem; justify-self:start; max-width:30rem; margin-top:.4rem; padding:.7rem .9rem; background:var(--card); border:1px solid var(--line); border-radius:12px; color:var(--ink-2) }
.nr-qr{ flex:none; display:block; width:clamp(112px, 11vw, 168px); aspect-ratio:1; border-radius:6px; overflow:hidden }
.nr-qr svg{ display:block; width:100%; height:100% }
.nr-t{ margin:0; display:flex; flex-direction:column; align-items:flex-start; gap:.1rem; font-size:.95rem; line-height:1.35 }
.nr-a{ display:inline-flex; align-items:center; min-height:44px; color:var(--ink); font-weight:700; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.2em }
@media (hover:hover){ .nr-a:hover{ text-decoration-thickness:2px } }
.nr-a:focus-visible,.nr-qr:focus-visible{ outline:2px solid var(--moon, var(--ink)); outline-offset:3px; border-radius:4px }
.dlg-fac .nextroom{ margin-top:1rem }
@media print{ .nextroom{ display:none !important } }
