/* free-time.css — "זמן חופשי": הכפתור בבית, מסך הדלתות, השביל, המשחקים והפרידה
   (state/free-time-zone.js, שלב 2א 1.10.26). שפת home.css: קרם חם, Fredoka,
   עיגולים רכים. z-index 30: מעל הבית (≤5), **מתחת** לחלונות-הווידאו של
   המשחקים (40), לתווית-ההורים (850), לשער (1000) ולשירים/סיפור (1000). */

:root { --ft-ring:#1d9e75; --ft-teal:#D6F0EE; }

/* ═══ הכפתור בבית — סימטרי ל"היום" (אותם hero-btn/hero-disc), רק האייקון והמצב שונים ═══ */
.ft-btn-emoji { position:relative; z-index:1; align-self:center; line-height:1;
  font-size:calc(var(--today) * .5); filter:drop-shadow(0 8px 12px rgba(80,60,40,.18)); }
.ft-hero .hero-disc { place-items:center; }
/* ★ סבב 3 — כל הדלתות נעולות / 0 דק' ⇒ "זמן חופשי" נעלם מהבית; "היום" נשאר לבד, במרכז. */
.ft-hero[hidden] { display:none !important; }
.ft-lock { position:absolute; z-index:2; bottom:4%; inset-inline-start:2%;
  width:30%; height:30%; border-radius:50%; background:#F3EEE6; display:none; place-items:center;
  font-size:calc(var(--today) * .14); box-shadow:var(--shadow-soft), 0 0 0 4px #fff; }
.ft-done-v { display:none; }
.ft-hero .hero-sub[hidden] { display:none; }
.ft-hero .ft-sub { max-width:24ch; text-align:center; line-height:1.25; font-size: 2.3vh; font-size:clamp(.64rem,2.3vh,.82rem); }
.ft-hero.is-locked .hero-disc { animation:none; filter:grayscale(.65) opacity(.7); }
.ft-hero.is-locked .hero-label { color:var(--ink-soft); }
.ft-hero.is-locked .ft-lock { display:grid; }
.ft-hero.is-locked.is-shaking .hero-stage { animation:ftShake .45s ease; }
.ft-hero.is-done { cursor:default; }
.ft-hero.is-done .hero-disc { animation:none;
  background:radial-gradient(circle at 50% 34%, #F5F3EF 0%, #E4E0D8 62%, #D2CDC3 100%);
  box-shadow:var(--shadow-soft), inset 0 4px 10px rgba(255,255,255,.55); }
.ft-hero.is-done .ft-done-v { display:grid; }
/* כשהזמן החופשי נגמר — כל הבית אפור ולא לחיץ, חוץ מכפתור-ההורים */
.home.is-ft-done .hero-btn { pointer-events:none; }
.home.is-ft-done #btnDaily .hero-disc { animation:none; filter:grayscale(.5) opacity(.75); }
@keyframes ftShake { 0%,100% { transform:translateX(0); } 20% { transform:translateX(-7px); } 40% { transform:translateX(7px); } 60% { transform:translateX(-5px); } 80% { transform:translateX(5px); } }

/* ═══ המסך ═══ */
.ft-overlay { position:fixed; top:0; right:0; bottom:0; left:0; inset:0; z-index:30;
  background:radial-gradient(120% 90% at 50% 12%, #F3F0FB 0%, #EDF4F2 60%, #E8EFE6 100%);
  font-family:'Fredoka', system-ui, sans-serif; direction:rtl; overflow:hidden;
  -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
.ft-overlay.is-games, .ft-overlay.is-video { background:#fbf7ef; }
.ft-overlay.is-video { background:#000; }
.ft-view { position:absolute; top:0; right:0; bottom:0; left:0; }
.ft-home { position:absolute; z-index:5; top:max(12px, env(safe-area-inset-top)); right:max(12px, env(safe-area-inset-right));
  width:clamp(48px,7vw,62px); height:clamp(48px,7vw,62px); border-radius:50%; border:none; background:#fff;
  box-shadow:0 6px 14px rgba(80,60,40,.2); font-size:clamp(22px,3.4vw,30px); line-height:1; cursor:pointer;
  display:grid; place-items:center; padding:0; -webkit-tap-highlight-color:transparent; }
.ft-home:active { transform:scale(.94); }

/* שעון-החול — **אמיתי** (החול = הזמן שנשאר בפועל), למעלה משמאל, מעל הכל (גם מעל
   השירים/הסיפור). מהבהב בדקה האחרונה ואחרי סוף הזמן, עד שטולי מופיע. בלי ספרות.
   ★ התווית "תפריט הורים · לחיצה ארוכה" (גם היא למעלה משמאל) זזה **לימינו**
   (משמאל-לימין: שעון-חול ⇒ תווית) כדי שלעולם לא יחפפו. */
.ft-timer { position:fixed; z-index:1060; top:max(10px, env(safe-area-inset-top)); left:max(12px, env(safe-area-inset-left));
  padding:6px 9px; border-radius:16px; background:rgba(255,255,255,.92); box-shadow:0 6px 14px rgba(80,60,40,.18);
  pointer-events:none; --sand:#F2C14E; --glass:#EFE7D8; }
.ft-timer[hidden] { display:none; }
/* (16) שעון-החול לעולם לא מעל חלון-הורה (שער/תפריט): מוסתר כל עוד חלון כזה פתוח */
.ft-timer.is-under-parent { display:none; }
.ft-timer.is-last { --sand:#F59A2E; animation:ftBlink 1s steps(2, jump-none) infinite; }
@keyframes ftBlink { 0% { opacity:1; } 50% { opacity:.25; } 100% { opacity:1; } }
.ft-hourglass { position:relative; width:30px; display:flex; flex-direction:column; align-items:center; }
.ft-hg-cap { width:120%; height:4px; border-radius:3px; background:#A85F1E; }
.ft-hg-bulb { position:relative; width:100%; height:22px; background:var(--glass); overflow:hidden; }
.ft-hg-top { clip-path:polygon(0 0, 100% 0, 56% 100%, 44% 100%); }
.ft-hg-bot { clip-path:polygon(44% 0, 56% 0, 100% 100%, 0 100%); }
.ft-sand { position:absolute; left:0; right:0; bottom:0; display:block; background:var(--sand); transition:height .5s linear; }
.ft-hg-stream { width:2px; height:0; background:var(--sand); }
.ft-timer.is-flowing .ft-hg-stream { position:absolute; top:24px; height:22px; animation:ftStream .6s linear infinite; }
@keyframes ftStream { 0% { opacity:.55; } 50% { opacity:1; } 100% { opacity:.55; } }
/* כרטיס-המידע להורה (סבב 3) — **ליד** שעון-החול (שעון ~48px + מרווח), באותו גובה
   (הכרעת אורן 3.10: ליד, לא מתחתיו). "עם הורה" — אין שעון-חול, ולכן בפינה עצמה. */
body.ft-on .pc-hint { z-index:1070; top:max(10px, env(safe-area-inset-top)); left:calc(max(12px, env(safe-area-inset-left)) + 60px); }
body.ft-on.ft-with-parent .pc-hint { left:max(12px, env(safe-area-inset-left)); }

/* ★ ee-v309 (ממצאים 34/52/55) — אין יותר כפתור-הורים קבוע (.ft-pbtn) במילים ובמשחקים: נגיעה קצרה ⇒ כרטיס-המידע,
   לחיצה ארוכה ⇒ שער-החשבון, כמו בשאר הדלתות. */

/* ★ ee-v309 (ממצאים 44/49/51/53) — נגני השירים ומפגשי הגן: לחיצה ארוכה ⇒ פס-גלילה + "לתפריט ההורים" בצד,
   בתחתית (לא עולה על שעון-החול ולא על 🏠). מוסתר מהילד כברירת-מחדל; נעלם אחרי 4 ש' בלי נגיעה. */
.ft-overlay.is-video { touch-action:none; }
.ft-scrub { position:absolute; z-index:8; left:50%; bottom:max(16px, env(safe-area-inset-bottom)); transform:translate(-50%,12px);
  width:min(94vw, 760px); display:flex; align-items:center; gap:clamp(8px,2vw,14px); direction:rtl;
  opacity:0; visibility:hidden; pointer-events:none; transition:opacity .2s ease, transform .2s ease, visibility .2s; }
.ft-scrub.is-visible { opacity:1; visibility:visible; pointer-events:auto; transform:translate(-50%,0); }
.ft-scrub-parent { flex:0 0 auto; border:none; cursor:pointer; border-radius:999px; padding:clamp(10px,2vw,14px) clamp(14px,2.6vw,22px);
  background:#A85F1E; color:#fff; font-family:'Heebo', system-ui, sans-serif; font-weight:800; font-size:clamp(.9rem,2.4vmin,1.08rem);
  box-shadow:0 6px 14px rgba(0,0,0,.28); white-space:nowrap; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
.ft-scrub-parent:active { transform:scale(.96); }
.ft-scrub-bar { flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:clamp(8px,2vw,14px); direction:ltr;
  padding:clamp(10px,2vw,14px) clamp(14px,3vw,20px); background:rgba(255,255,255,.94); border-radius:999px;
  box-shadow:0 6px 14px rgba(0,0,0,.25); font-family:'Fredoka', system-ui, sans-serif; }
.ft-scrub .pc-scrub-time { font-weight:700; font-variant-numeric:tabular-nums; color:#A85F1E; min-width:4.6ch; text-align:center;
  font-size:clamp(.82rem,2.4vmin,1rem); }
.ft-scrub .pc-scrub-range { flex:1; min-width:0; height:8px; -webkit-appearance:none; appearance:none; border-radius:999px; background:#FFE4CC;
  cursor:pointer; touch-action:none; }
.ft-scrub .pc-scrub-range::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:26px; height:26px; border-radius:50%;
  background:#F59A2E; box-shadow:0 2px 6px rgba(0,0,0,.25); }
.ft-scrub .pc-scrub-range::-moz-range-thumb { width:26px; height:26px; border:none; border-radius:50%; background:#F59A2E; }

/* טולי מנופף לשלום — 10 ש' לפני שיר ה-"Bye bye"; גדול, למעלה באמצע, מעל הכל */
.ft-tuli { position:fixed; z-index:1065; top:2vh; left:50%; transform:translateX(-50%); pointer-events:none;
  width:min(46vh, 60vw); display:flex; justify-content:center;
  animation:ftTuliIn .45s cubic-bezier(.3,1.5,.5,1) both; }
/* ★ (סקירה 6, 1) מושהה מתחת לחלון-הורה (שער / חלון-הקורא / הקראת-הורה) — display:flex למעלה גבר על hidden */
.ft-tuli[hidden] { display:none; }
.ft-tuli-img { width:100%; height:auto; max-height:72vh; object-fit:contain; transform-origin:50% 100%;
  filter:drop-shadow(0 12px 18px rgba(80,60,40,.25)); animation:ftWave 1.2s ease-in-out .45s infinite; }
@keyframes ftTuliIn { from { opacity:0; transform:translate(-50%,-30%) scale(.7); } to { opacity:1; transform:translate(-50%,0) scale(1); } }
@keyframes ftWave { 0%,100% { transform:rotate(0); } 25% { transform:rotate(-6deg); } 75% { transform:rotate(6deg); } }

/* דלתות */
.ft-doors { position:absolute; left:0; right:0; top:0; bottom:0; display:flex; align-items:center; justify-content:center;
  flex-wrap:wrap; gap:clamp(12px,3vw,34px); padding:70px 4vw 4vh; }
.ft-door { border:none; background:none; padding:0; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:6px;
  -webkit-tap-highlight-color:transparent; }
.ft-door:active { transform:scale(.95); }
.ft-door-disc { width:clamp(84px,17vw,150px); height:clamp(84px,17vw,150px); max-width:30vh; max-height:30vh; min-width:72px; min-height:72px;
  border-radius:50%; display:grid; place-items:center; overflow:hidden; box-shadow:0 10px 24px rgba(80,60,40,.14); }
.ft-door-img { width:100%; height:100%; object-fit:cover; display:block; }
.ft-door-icon { font-size:clamp(40px,8vw,72px); line-height:1; }
.ft-door-label { font-weight:600; color:#7C746C; font-size:clamp(.7rem,2.6vh,.9rem); }
.ft-tone-teal .ft-door-disc { background:radial-gradient(circle at 50% 36%, #E7F7F5, #D6F0EE); }
.ft-tone-purple .ft-door-disc { background:radial-gradient(circle at 50% 36%, #F3EFFB, #E9E3F7); }
.ft-tone-peach .ft-door-disc { background:radial-gradient(circle at 50% 36%, #FFF1E4, #FFE4CC); }
.ft-tone-mustard .ft-door-disc { background:radial-gradient(circle at 50% 36%, #FFF6DB, #F9E4A6); }
.ft-tone-green .ft-door-disc { background:radial-gradient(circle at 50% 36%, #EEF8E6, #D6EEC6); }

/* מפגשי גן — העצירות על הדרך (הדרך עצמה והמיקום: paths.css .ft-road, ★ ee-v309) */
.ft-station { border:none; background:none; padding:0; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:6px; flex:0 0 auto; }
.ft-station:active { transform:scale(.95); }
.ft-station-disc { position:relative; width:clamp(70px,13vw,120px); height:clamp(70px,13vw,120px); max-width:26vh; max-height:26vh;
  border-radius:50%; background:radial-gradient(circle at 50% 36%, #FFF6EA, #FFE4CC); display:grid; place-items:center;
  box-shadow:0 8px 18px rgba(80,60,40,.16); overflow:visible; }
.ft-station-img { position:absolute; top:15%; left:15%; width:70%; height:70%; object-fit:contain; }
.ft-station-play { position:absolute; bottom:-4px; inset-inline-start:-4px; width:34%; height:34%; border-radius:50%;
  background:#5BB55B; color:#fff; display:grid; place-items:center; font-size:clamp(12px,2vw,18px); box-shadow:0 0 0 3px #fff; }
.ft-station-label { font-weight:600; color:#7C746C; font-size:clamp(.7rem,2.6vh,.9rem); }
.ft-empty { color:#7C746C; font-weight:600; }
.ft-video { position:absolute; top:0; left:0; width:100%; height:100%; object-fit:contain; background:#000; }

/* מילים — המכל של רכבת המילים (word-train.css), על כל המסך (ee-v274; היה כרטיס "בקרוב") */
.ft-words { position:absolute; top:0; right:0; bottom:0; left:0; }


/* משחקים */
.ft-games-frame { position:absolute; top:0; left:0; width:100%; height:100%; border:0; display:block; background:#fbf7ef; }
.ft-star { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-size:clamp(80px,22vh,180px);
  animation:ftStar .9s ease both; }
@keyframes ftStar { 0% { transform:translate(-50%,-50%) scale(.2); opacity:0; } 50% { transform:translate(-50%,-50%) scale(1.15); opacity:1; } 100% { transform:translate(-50%,-50%) scale(1); opacity:1; } }

/* פרידה — בלי טקסט לילד: טולי מנופף, גדול, למעלה באמצע */
.ft-bye { position:absolute; top:0; left:0; right:0; bottom:0; display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  padding-top:4vh; background:#E9DFCC; }
.ft-bye-static { height:62vh; width:auto; margin-top:4vh; }
.ft-bye-video { width:auto; height:78vh; max-width:94vw; border-radius:28px; background:#E9DFCC; object-fit:cover;
  box-shadow:0 14px 34px rgba(80,60,40,.18); }

@media (prefers-reduced-motion: reduce) {
  .ft-star, .ft-hg-stream, .ft-tuli, .ft-tuli-img { animation:none !important; }
  .ft-timer.is-last { animation:none; outline:3px solid #F59A2E; }
}

/* במסך ה-"Bye bye" אין לאן לחזור — בלי 🏠 */
.ft-overlay.is-bye .ft-home { display:none; }
/* ★ ee-v306 — "זמן בלתי מוגבל": בלי שעון-חול. סוף הזמן בשירים/במפגשי הגן: fade out של 10 ש' (ממצא 57). */
.ft-timer.is-unlimited { display:none !important; }
.ft-video[data-fade], .ft-song-video[data-fade] { transition:opacity .5s linear; }
