/* ═══════════════════════════════════════════════════════════════
   יער הקריאה של בוקי — style.css
   RTL · עברית · ידידותי לכיתה א'
═══════════════════════════════════════════════════════════════ */

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

:root {
  /* עודכן למערכת המותג החדשה (פילון) — ר' תוכנית "מותג Booki", סעיף 1.
     שמות הטוקנים נשארו זהים בכוונה כדי שכל מאות מקומות השימוש הקיימים בקוד
     יורשו את הפלטה החדשה בלי לגעת בהם בנפרד; רק הערכים עצמם השתנו. */
  --green:   #477B52; /* ירוק יער */
  --green2:  #76A97A; /* ירוק רך */
  --blue:    #2AA8AE; /* כחול-אגם/טורקיז */
  --blue2:   #4FBFC4; /* טורקיז בהיר */
  --orange:  #F47A5E; /* קורל */
  --orange2: #F89B85; /* קורל בהיר */
  --purple:  #5A3478; /* סגול ענבים */
  --purple2: #7C5299; /* סגול ענבים בהיר */
  --teal:    #16A085; /* ללא שינוי — שימוש נדיר בלבד */
  --teal2:   #1ABC9C;
  --yellow:  #F3BE45; /* צהוב שמש */
  --red:     #E74C3C; /* ללא שינוי — שגיאה/מערכת, לא צבע-דמות */
  --bg:      #FFF8E8; /* שמנת נייר */
  --card:    #FFFDF6; /* לבן חם, לא סטרילי */
  --text:    #26354D; /* כחול כהה לטקסט */
  --muted:   #5F6B70; /* הוחשך מ-#7F8C8D — הערך הקודם ירד ל-3.28:1 מול הרקע החדש (נכשל ב-WCAG AA לטקסט רגיל); הערך הזה עומד על כ-5.18:1 */
  --border:  #E0E0E0; /* ללא שינוי */
  --radius:  16px;
  --shadow:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
}

/* overflow-x:hidden חייב להיות גם על html, לא רק על body — position:fixed
   (למשל .booki-nav, .chooser-overlay) לא תמיד נחתך ע"י overflow של body בלבד,
   וזו הדרך הסטנדרטית למנוע פס-גלילה אופקי רפאים בלי קשר למקור הספציפי. */
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }

body {
  font-family: 'Heebo', 'Arial', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Screens ───────────────────────────────────────────────────── */
.screen { display: none; min-height: 100vh; min-height: 100dvh; padding: 0 0 80px; animation: fadeUp 0.3s ease; }
.screen.active { display: block; }

/* זיהוי route של כניסה-מקישור-כיתה, מוגדר סינכרונית ב-<head> — לפני showScreen()
   הראשון של routing.js. מבטיח שהצביעה הראשונה של הדפדפן היא screen-club-welcome,
   בלי תלות בטיימר/timeout ובלי לגעת ב-active הקבוע היום על screen-splash. */
/* !important נדרש כאן בכוונה: יש כללי display:flex ספציפיים-לפי-ID על מסכים
   בודדים (למשל #screen-splash.active, #screen-home.active) שה-specificity
   הרגיל שלהם (ID+class) גובר על תרכובת class רגילה — כל עוד זו הדרך היחידה
   שמבטיחה שהמסך הזה תמיד ינצח בלי מרוץ-specificity עתידי מול כל מסך אחר. */
html.boot-route-club .screen.active { display: none !important; }
html.boot-route-club #screen-club-welcome { display: block !important; }

#screen-teacher-boot { padding:0;align-items:center;justify-content:center;min-height:100dvh;background:linear-gradient(180deg,#f4fbf6,#e8f7ed); }
.teacher-boot-card { display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;color:#285f3d; }
.teacher-boot-icon { font-size:3.3rem; }
.teacher-boot-card strong { font-size:1.2rem;font-weight:900; }
.teacher-boot-card span { font-size:.9rem;color:#5e7767; }
.teacher-boot-dots { display:flex;gap:6px;margin-top:8px; }
.teacher-boot-dots i { width:8px;height:8px;border-radius:50%;background:#20a858;animation:teacherBootPulse 1s infinite ease-in-out; }
.teacher-boot-dots i:nth-child(2){animation-delay:.15s}.teacher-boot-dots i:nth-child(3){animation-delay:.3s}
@keyframes teacherBootPulse { 0%,80%,100%{opacity:.25;transform:scale(.8)} 40%{opacity:1;transform:scale(1)} }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Sticky Header ─────────────────────────────────────────────── */
.sticky-header {
  position: sticky; top: 0;
  background: var(--bg); z-index: 10;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.header-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.header-row h2 { font-size: 1.5rem; font-weight: 800; flex: 1; }
.header-sub { font-size: 0.95rem; color: var(--muted); margin-top: 2px; }

/* ─── Buttons ───────────────────────────────────────────────────── */
button { cursor: pointer; font-family: inherit; border: none; }

.btn-giant {
  display: inline-block; width: 100%;
  padding: 18px 24px; font-size: 1.3rem; font-weight: 700;
  border-radius: 50px; transition: transform .15s, box-shadow .15s;
  box-shadow: 0 5px 20px rgba(0,0,0,.18); color: #fff; text-align: center;
}
.btn-giant:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.btn-giant:active { transform: scale(.97); box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.btn-green  { background: linear-gradient(135deg, var(--green), var(--green2)); }
.btn-splash {
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  box-shadow: 0 6px 24px rgba(255,107,53,.45);
  font-size: 1.5rem;
  letter-spacing: .03em;
}
.btn-splash:hover { box-shadow: 0 10px 32px rgba(255,107,53,.55); }
.btn-orange { background: linear-gradient(135deg, var(--orange), var(--orange2)); }
.btn-white-on-purple { background: rgba(255,255,255,.2); border: 3px solid rgba(255,255,255,.7); color: #fff; }
.btn-back { background: none; font-size: 1rem; font-weight: 700; color: var(--blue2); padding: 6px 0; white-space: nowrap; }
.btn-footer-link {
  display: block; margin: 4px auto 16px; background: none; border: none;
  color: var(--muted); font-family: inherit; font-size: .85rem; font-weight: 600;
  padding: 8px; opacity: .8;
}
.btn-footer-link:hover { opacity: 1; text-decoration: underline; }
.btn-switch-reader {
  font-size: .78rem; font-weight: 700; color: var(--booki-turquoise);
  background: color-mix(in srgb, var(--booki-turquoise) 10%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--booki-turquoise) 25%, transparent);
  border-radius: 20px; padding: 6px 12px; white-space: nowrap;
}

/* ─── SPLASH (screen-home — מסך "מתחילים" למכשיר מוכר, ללא שינוי) ──── */
#screen-home {
  display: none;
  background: linear-gradient(160deg, #1a7a3b 0%, #4CAF50 50%, #8BC34A 100%);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
}
#screen-home.active { display: flex; align-items: center; justify-content: center; }

/* ─── מסך פתיחה (screen-splash) — רקע בהיר, לוגו קומפקטי, פעולה אחת ── */
#screen-splash {
  display: none;
  position: relative;
  background: #FAFBF6;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
}
#screen-splash.active { display: flex; }
.splash2-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 48px 24px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
}

/* ─── קונפטי-ספרים — עיטור עדין ברקע מסך הפתיחה, לא מתחרה בכפתורים ─── */
.splash-book-confetti { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sbc-book { position: absolute; font-size: 1.6rem; opacity: 0; filter: drop-shadow(0 3px 6px rgba(0,0,0,.08)); }
.sbc-1 { top: 9%;  left: 10%; }
.sbc-2 { top: 16%; right: 9%;  font-size: 1.3rem; }
.sbc-3 { top: 52%; left: 7%;   font-size: 1.4rem; }
.sbc-4 { top: 60%; right: 12%; }
.sbc-5 { top: 33%; right: 24%; font-size: 1.2rem; }
.sbc-6 { top: 76%; left: 18%;  font-size: 1.3rem; }
@media (prefers-reduced-motion: no-preference) {
  .sbc-book { animation: sbc-float 7s ease-in-out infinite; }
  .sbc-1 { animation-delay: 0s;   } .sbc-2 { animation-delay: .9s;  }
  .sbc-3 { animation-delay: 1.8s; } .sbc-4 { animation-delay: 2.7s; }
  .sbc-5 { animation-delay: 3.6s; } .sbc-6 { animation-delay: 4.5s; }
}
@media (prefers-reduced-motion: reduce) { .sbc-book { opacity: .35; } }
@keyframes sbc-float {
  0%, 100% { opacity: 0;   transform: translateY(0)     rotate(-5deg) scale(.88); }
  15%      { opacity: .5;  }
  50%      { opacity: .65; transform: translateY(-16px) rotate(5deg)  scale(1);   }
  85%      { opacity: .25; }
}
.splash2-logo { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.splash2-owl { font-size: 3.6rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,.08)); }
.splash2-title { font-size: 2.1rem; font-weight: 900; color: var(--green); margin: 6px 0 0; }
.splash2-tagline { font-size: 1rem; color: var(--muted); margin: 0; }

.splash2-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.splash2-primary {
  width: 100%; max-width: 300px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--green2), var(--booki-green));
  color: #fff; border: none; border-radius: 24px;
  padding: 26px 20px; box-shadow: 0 8px 24px color-mix(in srgb, var(--booki-green) 35%, transparent);
  font-family: inherit;
}
.splash2-primary-icon  { font-size: 2.4rem; }
.splash2-primary-label { font-size: 1.25rem; font-weight: 900; }

.splash2-secondary-row { display: flex; gap: 10px; width: 100%; max-width: 300px; }
.splash2-secondary {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 16px;
  padding: 14px 10px; font-family: inherit; font-size: .78rem; font-weight: 700;
  color: var(--text); box-shadow: var(--shadow-sm);
}
.splash2-secondary-icon { font-size: 1.3rem; }

.splash2-teacher-link {
  background: none; border: none; color: var(--muted);
  font-family: inherit; font-size: .85rem; font-weight: 600;
  padding: 8px; opacity: .75;
}

/* ─── כפתורי מסך הבית ───────────────────────────────────────────── */
.home-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 10px auto 0;
}

.btn-home-start {
  background: #fff;
  color: #1a5c35;
  border: none;
  border-radius: 18px;
  padding: 18px 28px;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
  transition: transform .18s, box-shadow .18s;
}
.btn-home-start:hover { transform: translateY(-3px); box-shadow: 0 8px 26px rgba(0,0,0,.24); }

.splash-bg { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 40px 24px; text-align: center; color: #fff; width: 100%; max-width: 420px; }
.big-tree { font-size: 110px; line-height: 1; filter: drop-shadow(0 8px 24px rgba(0,0,0,.3)); }
.floating-leaves { display: flex; gap: 12px; font-size: 1.8rem; margin-top: -20px; }
.leaf { animation: float 3s ease-in-out infinite; }
.l1{animation-delay:0s} .l2{animation-delay:.4s} .l3{animation-delay:.8s} .l4{animation-delay:1.2s} .l5{animation-delay:1.6s}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.splash-title { font-size: 2.4rem; font-weight: 900; line-height: 1.2; text-shadow: 0 3px 10px rgba(0,0,0,.25); }
.splash-sub { font-size: 2rem; }
.splash-tagline { font-size: 1.1rem; opacity: .9; }

/* ─── HOME (screen-main) — כותרת קומפקטית + פעולה ראשית אחת ────────── */
.home-header { display: flex; align-items: center; justify-content: space-between; padding: calc(18px + env(safe-area-inset-top)) 20px 0; position: relative; z-index: 1; }
.home-header-id { display: flex; align-items: center; gap: 10px; }
.greeting-avatar { font-size: 2rem; }
.greeting-name { font-size: clamp(1.65rem, 6vw, 2.05rem); font-weight: 900; line-height:1.05; }
.home-encouragement { font-size: .85rem; color: var(--muted); margin: 2px 20px 0; }

/* "החלף" — אייקון קטן בלבד, מוצג רק כשיש קורא אחר אמיתי להחליף אליו */
.btn-switch-icon {
  background: #f0f0f0; border: none; border-radius: 50%;
  width: 34px; height: 34px; font-size: 1.05rem; line-height: 1;
  color: var(--muted); flex-shrink: 0;
}
.btn-switch-icon:active { background: #e4e4e4; }

/* מסך הבית כעמודת flex: כותרת/באנר נשארים למעלה, קונסולת הקריאה תופסת ומרכזת
   את השטח האנכי שנשאר — כדי שלא יהיה חלל מת גדול מתחת לקונסולה ומעל הניווט. */
#screen-main.active { display: flex; flex-direction: column; }

/* קונסולת הקריאה — בוקי מחובר לקונסולה, ושלוש פעולות ישירות (לא בורר-ביניים) */
.home-console-wrap {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 16px 4px;
}
.home-console-stage {
  margin-bottom: -20px; /* בוקי "יושב" חלקית מעל שפת הקונסולה — קומפוזיציה אחת */
  position: relative; z-index: 2;
}
.home-console-stage .booki-character-stage { min-height: auto; }
.home-console-stage .booki-character-stage::before { bottom: -2%; }
.home-console-char { width: min(46vw, 195px) !important; height: auto !important; }

.console-surface {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px; box-sizing: border-box;
  background: linear-gradient(160deg, #FFF3D6 0%, #FFE9B0 55%, #FFF3D6 100%);
  border: 2px solid color-mix(in srgb, var(--booki-green) 18%, transparent);
  border-radius: 32px;
  padding: 28px 12px 18px;
  display: flex; align-items: flex-start; justify-content: center; gap: 6px;
  box-shadow: 0 10px 28px rgba(38,53,77,.16), inset 0 2px 0 rgba(255,255,255,.6);
  overflow: hidden;
}
.console-sparkle {
  position: absolute; color: var(--booki-grape); opacity: .55; font-size: .9rem; z-index: 0;
}
.console-sparkle-1 { top: 12px; right: 18px; }
.console-sparkle-2 { bottom: 14px; left: 22px; font-size: .7rem; }

/* כל כפתור הוא עכשיו רק "במה" ויזואלית לדמות בוקי — בלי טקסט בפנים; הטקסט
   יושב כתובית ממוזערת מתחת לכפתור (console-item), לא בתוך הצורה הצבעונית. */
.console-item {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
}
.console-item-main { flex: 0 0 auto; }
.console-item-label { font-size: .74rem; font-weight: 900; line-height: 1.15; color: var(--booki-text); text-align: center; }
.console-item-sublabel { font-size: .64rem; font-weight: 700; color: var(--booki-muted); margin-top: -3px; }

.console-btn {
  position: relative; z-index: 1;
  border: none; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.console-btn-side {
  width: 100%; max-width: 112px; aspect-ratio: 1;
  border-radius: 28px;
  box-shadow: 0 4px 0 rgba(0,0,0,.16), inset 0 2px 0 rgba(255,255,255,.35), inset 0 -3px 6px rgba(0,0,0,.12);
}
.console-btn-side:active { transform: translateY(2px) scale(.97); box-shadow: 0 1px 0 rgba(0,0,0,.16), inset 0 2px 5px rgba(0,0,0,.2); }
/* צבעים בולטים/רוויים יותר מהטוקנים הפסטליים הרגילים — מכוונים במפורש להיות
   הכי "צעקניים" על המסך (יעד: קונסולת הקריאה מושכת את העין ראשונה). מקומי
   לכפתורי הקונסולה בלבד, לא נוגע בטוקנים הגלובליים (--green2/--booki-green וכו'
   עדיין משמשים בכל שאר האפליקציה). */
.console-btn-right { background: linear-gradient(160deg, #6EE08A 0%, #14A34A 100%); }
.console-btn-left  { background: linear-gradient(160deg, #FFB25C 0%, #F0502B 100%); }

.console-btn-clock {
  width: 158px; height: 158px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #7CEEF2 0%, #0B8F97 80%);
  box-shadow: 0 6px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.4), inset 0 -4px 8px rgba(0,0,0,.15);
  border: 4px solid #FFD34D;
}
.console-btn-clock:active { transform: translateY(2px) scale(.97); box-shadow: 0 2px 0 rgba(0,0,0,.18), inset 0 3px 7px rgba(0,0,0,.22); }

.console-btn-icon { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.15)); }
.console-btn-clock-icon { width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); }

/* ═══ Home Screen V3 — שכבת קסם: רקע חי, בוקי-חי, בועת דיבור, פס התקדמות,
   כרטיס הישג, מסגרת קונסולה זוהרת, ואנימציות כניסה. שכבה עיצובית נוספת
   בלבד — לא נוגעת בניווט/onclick/Firestore/לוגיקה עסקית. ═══ */

@property --booki-sweep-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* ─── רקע חי — נצנוצים עדינים, ענני-אור רכים, זוהר נודד. z-index:0, מתחת לכול ─── */
.home-ambient { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient-sparkle {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--booki-yellow); opacity: 0;
}
.as-1 { top: 14%; right: 12%; }
.as-2 { top: 26%; left: 18%; }
.as-3 { top: 60%; right: 22%; }
.as-4 { top: 72%; left: 10%; }
.ambient-cloud {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.55), rgba(255,255,255,0) 70%);
  filter: blur(2px);
}
.ac-1 { width: 140px; height: 60px; top: 8%; left: -20px; }
.ac-2 { width: 100px; height: 44px; top: 42%; right: -10px; }
.ambient-glow {
  position: absolute; inset: -20%;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--booki-yellow) 14%, transparent), transparent 60%);
}
@media (prefers-reduced-motion: no-preference) {
  .ambient-sparkle { animation: ambient-twinkle 5s ease-in-out infinite; }
  .as-1 { animation-delay: 0s; } .as-2 { animation-delay: 1.2s; }
  .as-3 { animation-delay: 2.4s; } .as-4 { animation-delay: 3.4s; }
  .ambient-cloud { animation: ambient-drift 42s linear infinite; }
  .ac-2 { animation-direction: reverse; animation-duration: 54s; }
  .ambient-glow { animation: ambient-glow-shift 14s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-sparkle, .ambient-cloud, .ambient-glow { display: none; }
}
@keyframes ambient-twinkle { 0%,100%{opacity:0; transform:scale(.6)} 50%{opacity:.55; transform:scale(1)} }
@keyframes ambient-drift { from{transform:translateX(0)} to{transform:translateX(60px)} }
@keyframes ambient-glow-shift { 0%,100%{opacity:.5; transform:translateY(0)} 50%{opacity:.8; transform:translateY(10px)} }

/* ─── בוקי חי — נשימה/ריחוף/הטיה עדינה, וצל-קרקע פועם יחד איתו (קונסולת הבית בלבד) ─── */
@media (prefers-reduced-motion: no-preference) {
  .home-console-stage .booki-character-stage > img {
    animation: booki-home-idle 6s ease-in-out infinite;
  }
  .home-console-stage .booki-character-stage::before {
    animation: booki-home-shadow-pulse 6s ease-in-out infinite;
  }
}
@keyframes booki-home-idle {
  0%, 100% { transform: translateY(0)    rotate(-.3deg) scale(1); }
  30%      { transform: translateY(-6px) rotate(.4deg)  scale(1.008); }
  55%      { transform: translateY(-2px) rotate(-.2deg) scale(1); }
  80%      { transform: translateY(-7px) rotate(.3deg)  scale(1.006); }
}
@keyframes booki-home-shadow-pulse {
  0%, 100% { opacity: .55; transform: scaleX(1); }
  30%      { opacity: .4;  transform: scaleX(.94); }
  80%      { opacity: .42; transform: scaleX(.95); }
}
.home-console-stage {
  position: relative;
}
.home-console-stage::before {
  content: ""; position: absolute; z-index: -1; inset: -20% -30%;
  background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--booki-yellow) 18%, transparent), transparent 65%);
  filter: blur(6px);
  pointer-events: none;
}

/* בוקי הוא אזור הלחיצה עצמו: ההילה נוצרת מן האלפא של תמונת ה-PNG ולכן
   עוקבת אחרי קווי הדמות ואינה מלבן. */
.home-booki-message-trigger { cursor:pointer; touch-action:manipulation; }
.home-booki-message-trigger .booki-character-stage > img {
  filter: drop-shadow(0 0 2px rgba(255,255,255,.95))
          drop-shadow(0 5px 9px rgba(78,63,139,.28));
  transition: filter .18s ease, transform .16s ease;
}
.home-booki-message-trigger:active .booki-character-stage > img {
  filter: drop-shadow(0 1px 2px rgba(78,63,139,.14));
}
.home-booki-message-trigger:focus-visible { outline:none; }
.home-booki-message-trigger:focus-visible .booki-character-stage > img {
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 7px #f1bf3b);
}
.booki-unread-cue {
  position:absolute; z-index:8; left:50%; bottom:7px; translate:-50% 0;
  display:flex; flex-direction:column; align-items:center; gap:3px;
  width:max-content; max-width:240px; pointer-events:none;
}
.booki-unread-envelope { position:relative; display:block; font-size:2rem; line-height:1; filter:drop-shadow(0 4px 5px rgba(43,47,70,.25)); }
.booki-unread-envelope i {
  position:absolute; top:-2px; right:-5px; width:10px; height:10px;
  border:2px solid #fff; border-radius:50%; background:#ef3f50;
  box-shadow:0 1px 4px rgba(90,20,30,.28);
}
.booki-unread-cue strong {
  padding:5px 11px; border-radius:999px; background:#fff; color:#34435c;
  box-shadow:0 5px 15px rgba(38,53,77,.18); font-size:.72rem; font-weight:900;
  white-space:nowrap;
}
@media (prefers-reduced-motion:no-preference) {
  .home-console-stage.has-booki-unread .booki-character-stage > img { animation:bookiUnreadNudge 3.4s ease-in-out infinite; }
  .booki-unread-envelope { animation:bookiEnvelopeFloat 1.7s ease-in-out infinite; }
}
@keyframes bookiUnreadNudge {
  0%,72%,100%{transform:translateY(0) rotate(0)}
  78%{transform:translateY(-3px) rotate(-2deg)}
  84%{transform:translateY(-4px) rotate(2deg)}
  90%{transform:translateY(-2px) rotate(-1deg)}
}
@keyframes bookiEnvelopeFloat { 0%,100%{transform:translateY(0) rotate(-3deg)} 50%{transform:translateY(-5px) rotate(3deg)} }

body.booki-personal-message-open { overflow:hidden; }
.booki-personal-message {
  position:fixed; inset:0; z-index:12700; align-items:center; justify-content:center;
  padding:22px; background:rgba(24,34,52,.58);
  backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
  animation:bookiMessageBackdropIn .24s ease both;
}
.booki-personal-message.is-closing { animation:bookiMessageBackdropOut .23s ease both; }
.booki-text-message {
  width:min(100%,370px); box-sizing:border-box; padding:19px 20px 17px;
  border:1px solid rgba(255,255,255,.9); border-radius:25px;
  background:rgba(255,255,255,.97); color:#293d5d; direction:rtl;
  box-shadow:0 24px 70px rgba(10,20,38,.38), inset 0 1px 0 #fff;
  cursor:pointer; outline:none; animation:bookiTextMessageIn .36s cubic-bezier(.2,.9,.25,1.12) both;
}
.is-closing .booki-text-message { animation:bookiTextMessageOut .2s ease both; }
.booki-text-message-head { display:flex; align-items:center; gap:11px; padding-bottom:11px; border-bottom:1px solid #e8ebef; }
.booki-text-message-avatar { display:grid; place-items:center; width:43px; height:43px; flex:0 0 43px; border-radius:50%; background:#fff0c8; font-size:1.35rem; }
.booki-text-message-head div { display:flex; flex-direction:column; text-align:right; }
.booki-text-message-head strong { font-size:1rem; }
.booki-text-message-head small { color:#8a949d; font-size:.7rem; }
.booki-text-message p { margin:17px 0 12px; white-space:pre-line; font-size:1.08rem; font-weight:750; line-height:1.72; text-align:right; }
.booki-text-message footer { color:#7254a3; font-weight:900; text-align:right; }
.booki-text-message-dismiss { display:block; margin-top:17px; color:#929aa1; font-size:.68rem; font-weight:700; text-align:center; }
@keyframes bookiMessageBackdropIn { from{opacity:0} to{opacity:1} }
@keyframes bookiMessageBackdropOut { from{opacity:1} to{opacity:0} }
@keyframes bookiTextMessageIn { from{opacity:0;transform:translateY(18px) scale(.92)} to{opacity:1;transform:none} }
@keyframes bookiTextMessageOut { from{opacity:1;transform:none} to{opacity:0;transform:translateY(10px) scale(.96)} }
@media (prefers-reduced-motion:reduce) {
  .booki-personal-message,.booki-text-message,.is-closing .booki-text-message,.booki-unread-envelope { animation:none; }
}

/* ─── בועת דיבור — עוטפת את home-encouragement הקיים, לא נוגעת ב-id/בלוגיקה ─── */
.home-speech-bubble {
  position: relative; z-index: 2;
  max-width: 300px; margin: 0 auto 10px;
  background: var(--booki-surface);
  border: 1px solid var(--booki-border);
  border-radius: 18px;
  padding: 8px 14px;
  box-shadow: 0 6px 14px rgba(38,53,77,.10);
  backdrop-filter: blur(8px);
}
.home-speech-bubble .home-encouragement {
  margin: 0; font-size: .82rem; font-weight: 700; color: var(--booki-text); text-align: center;
  transition: opacity .26s ease;
}
.home-encouragement.speech-fade-out { opacity: 0; }
.home-speech-tail {
  position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 14px; height: 14px;
  background: var(--booki-surface);
  border-inline-end: 1px solid var(--booki-border);
  border-block-end: 1px solid var(--booki-border);
}

/* ─── פס התקדמות — דקות השבוע / רצף / דרגה, מנתונים אמיתיים בלבד ─── */
.home-progress-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px; box-sizing: border-box;
  margin: 0 0 12px;
  padding: 10px 16px;
  border-radius: 20px;
  background: var(--booki-surface);
  border: 1px solid var(--booki-border);
  box-shadow: var(--booki-shadow);
  backdrop-filter: blur(10px);
}
.home-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; font-weight: 800; color: var(--booki-text); }
.home-progress-row-bottom { margin-top: 6px; }
.home-progress-streak { color: var(--booki-coral); }
.home-progress-rank { color: var(--booki-green); }
.home-progress-remaining { color: var(--booki-muted); font-weight: 700; font-size: .74rem; }
.home-progress-bar-track {
  margin-top: 8px; height: 8px; border-radius: 5px; overflow: hidden;
  background: color-mix(in srgb, var(--booki-green) 12%, transparent);
}
.home-progress-fill {
  height: 100%; border-radius: 5px; transform-origin: right center;
  background: linear-gradient(90deg, var(--booki-green), var(--booki-turquoise));
  transition: width .5s ease;
}

/* ─── מסגרת קסומה סביב קונסולת הקריאה — טבעת זוהרת, מטאטא-אור נודד, נצנוצי-פינה ─── */
.console-frame { position: relative; z-index: 1; width: 100%; max-width: 420px; }
.console-frame::before {
  content: ""; position: absolute; inset: -5px; z-index: 0;
  border-radius: 36px; padding: 5px;
  background: conic-gradient(from var(--booki-sweep-angle, 0deg),
    var(--booki-yellow),
    var(--booki-turquoise) 25%,
    var(--booki-yellow) 50%,
    var(--booki-turquoise) 75%,
    var(--booki-yellow) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.console-frame::after {
  content: ""; position: absolute; inset: -14px; z-index: -1; border-radius: 40px;
  pointer-events: none;
  box-shadow: 0 0 34px color-mix(in srgb, var(--booki-yellow) 32%, transparent);
}
.console-corner-sparkle {
  position: absolute; z-index: 2; color: var(--booki-yellow); font-size: .8rem;
  opacity: 0; pointer-events: none;
}
.ccs-1 { top: -6px; right: 10%; }
.ccs-2 { bottom: -6px; left: 14%; font-size: .65rem; }
.ccs-3 { top: 30%; right: -6px; color: var(--booki-turquoise); }
@media (prefers-reduced-motion: no-preference) {
  .console-frame::before { animation: console-sweep 7s linear infinite; }
  .console-frame::after  { animation: console-glow-breathe 4s ease-in-out infinite; }
  .console-corner-sparkle { animation: corner-twinkle 5s ease-in-out infinite; }
  .ccs-1 { animation-delay: .6s; } .ccs-2 { animation-delay: 2.1s; } .ccs-3 { animation-delay: 3.4s; }
}
@media (prefers-reduced-motion: reduce) {
  .console-frame::before, .console-frame::after, .console-corner-sparkle { animation: none; }
}
.console-frame.console-fx-pulse::after { animation: console-glow-pulse .38s ease-out !important; }
@keyframes console-sweep { from{--booki-sweep-angle:0deg} to{--booki-sweep-angle:360deg} }
@keyframes console-glow-breathe {
  0%, 100% { box-shadow: 0 0 34px color-mix(in srgb, var(--booki-yellow) 32%, transparent); }
  50%      { box-shadow: 0 0 44px color-mix(in srgb, var(--booki-turquoise) 38%, transparent); }
}
@keyframes console-glow-pulse {
  0%   { box-shadow: 0 0 34px color-mix(in srgb, var(--booki-yellow) 32%, transparent); }
  50%  { box-shadow: 0 0 58px color-mix(in srgb, var(--booki-yellow) 55%, transparent); }
  100% { box-shadow: 0 0 34px color-mix(in srgb, var(--booki-yellow) 32%, transparent); }
}
@keyframes corner-twinkle { 0%,100%{opacity:0; transform:scale(.6)} 50%{opacity:.8; transform:scale(1)} }

/* ─── משוב לחיצה על כפתורי הקונסולה — ריפל + קפיצה קטנה, מתחת ל-400ms ─── */
.console-btn.btn-fx-press { animation: console-btn-bounce .38s ease; }
.console-btn.btn-fx-press::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255,255,255,.55), transparent 70%);
  animation: console-btn-ripple .38s ease-out;
  pointer-events: none;
}
@keyframes console-btn-bounce {
  0%{transform:scale(1)} 40%{transform:scale(.94)} 70%{transform:scale(1.03)} 100%{transform:scale(1)}
}
@keyframes console-btn-ripple { from{opacity:.9; transform:scale(.4)} to{opacity:0; transform:scale(1.15)} }
@media (prefers-reduced-motion: reduce) {
  .console-btn.btn-fx-press, .console-btn.btn-fx-press::after { animation: none; }
}

/* ─── כרטיס הישג קומפקטי — הישג אחרון/רצף/עידוד, מיד מתחת לקונסולה ─── */
.home-achievement-card {
  position: relative; z-index: 1;
  width: calc(100% - 32px); max-width: 420px; margin: 0 auto 10px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--booki-surface);
  border: 1px solid var(--booki-border);
  box-shadow: 0 6px 16px rgba(38,53,77,.08);
}
.home-achievement-icon { font-size: 1.3rem; flex-shrink: 0; }
.home-achievement-text { margin: 0; font-size: .8rem; font-weight: 800; color: var(--booki-text); }

/* ─── "חדש על המדף" — קיצור אחד, מדף-ספרים ויזואלי (לא מתחרה בכפתורי הקונסולה) ─── */
.home-shelf-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 300px; box-sizing: border-box; margin: 0 auto 10px;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 14px 8px;
  border: none; background: none; font-family: inherit;
  transition: transform .12s ease;
}
.home-shelf-card:active { transform: scale(.97); }
.home-shelf-books { display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.home-shelf-book { font-size: 1.6rem; line-height: 1; filter: drop-shadow(0 2px 2px rgba(38,53,77,.18)); }
.hsb-1 { transform: rotate(-6deg) translateY(1px); }
.hsb-2 { transform: rotate(3deg); }
.hsb-3 { transform: rotate(-2deg); }
.hsb-4 { transform: rotate(7deg) translateY(1px); }
.home-shelf-plank {
  width: 100%; height: 8px; margin-top: -2px; border-radius: 3px;
  background: linear-gradient(180deg, var(--booki-coral) 0%, #c15f3f 100%);
  box-shadow: 0 4px 8px rgba(38,53,77,.22);
}
.home-shelf-label { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.home-shelf-title { font-size: .82rem; font-weight: 900; color: var(--booki-text); }
.home-shelf-count { font-size: .72rem; font-weight: 700; color: var(--booki-coral); }

/* ─── כרטיס חנות קבוע — נקודות/התקדמות ליעד, אותה משפחה חזותית כמו פאנל
   ההתקדמות האישי, בגוון זהב-חנות. קליקבילי — פותח את showShop() בכל מצב. ─── */
.home-shop-teaser {
  position: relative; z-index: 1;
  width: calc(100% - 32px); max-width: 420px; margin: 0 auto 10px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--booki-yellow) 14%, var(--booki-surface));
  border: 1px solid color-mix(in srgb, var(--booki-yellow) 45%, var(--booki-border));
  box-shadow: 0 6px 16px rgba(38,53,77,.08);
  font-family: inherit; text-align: right; cursor: pointer;
  transition: transform .12s ease;
}
.home-shop-teaser:active { transform: scale(.98); }
.home-shop-teaser-stage { flex-shrink: 0; }
.home-shop-teaser-stage .booki-character-stage { min-height: auto; display: flex; }
.home-shop-teaser-stage .booki-character-stage::before { display: none; }
.home-shop-teaser-char { width: 36px !important; height: auto !important; filter: none !important; animation: none !important; }
.home-shop-teaser-body { flex: 1; min-width: 0; }
.home-shop-teaser-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-shop-teaser-label { font-size: .8rem; font-weight: 800; color: var(--booki-text); }
.home-shop-teaser-points { font-size: .74rem; font-weight: 700; color: var(--booki-muted); }
.home-shop-teaser-bar-track {
  margin-top: 6px; height: 7px; border-radius: 5px; overflow: hidden;
  background: color-mix(in srgb, var(--booki-yellow) 20%, transparent);
}
.home-shop-teaser-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--booki-yellow), var(--booki-coral));
  transition: width .5s ease;
}
.home-shop-teaser-remaining { display: block; margin-top: 4px; font-size: .72rem; font-weight: 700; color: var(--booki-muted); }

/* ─── אנימציית כניסה — בוקי/כפתורים/פס/טקסטים, מקסימום 900ms, מופעלת מ-JS
   (_playHomeEntranceAnimation) בכל כניסה למסך הבית, לא בטעינה גורפת ─── */
.home-enter-play #home-console-stage    { animation: home-fade-in  .5s  ease        both; }
.home-enter-play .home-speech-bubble    { animation: home-fade-in  .45s ease .05s   both; }
.home-enter-play .home-shelf-card       { animation: home-slide-up .45s ease .08s   both; }
.home-enter-play .home-progress-panel   { animation: home-fade-in  .45s ease .1s    both; }
.home-enter-play .console-frame         { animation: home-slide-up .5s  ease .18s   both; }
.home-enter-play .home-progress-fill    { animation: home-bar-fill .5s  ease .32s   both; }
.home-enter-play .home-shop-teaser      { animation: home-slide-up .45s ease .34s   both; }
.home-enter-play .home-achievement-card { animation: home-slide-up .45s ease .38s   both; }
@keyframes home-fade-in  { from{opacity:0} to{opacity:1} }
@keyframes home-slide-up { from{opacity:0; transform:translateY(16px)} to{opacity:1; transform:translateY(0)} }
@keyframes home-bar-fill { from{transform:scaleX(0)} to{transform:scaleX(1)} }

/* מסך מעבר — "בוקי פותח לך את המועדון" (כניסה מקישור מועדון) */
.club-welcome-content {
  position: relative; z-index: 1;
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
  opacity: 1; transition: opacity .35s ease;
}
.club-welcome-content.fade-out { opacity: 0; }
.club-welcome-title { font-size: 1.6rem; font-weight: 900; color: var(--booki-text); margin: 4px 0 0; }
.club-welcome-text { font-size: 1.05rem; font-weight: 700; color: var(--booki-text); margin: 0; max-width: 300px; }
.club-welcome-subline { font-size: .88rem; color: var(--booki-muted); margin: 0; }
.club-welcome-error { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 8px; }
.club-welcome-error p { color: var(--booki-muted); font-size: .95rem; margin: 0; }

/* בורר קריאה — נפתח מ"מתחילים לקרוא", שלוש האפשרויות הקיימות בלבד */
.chooser-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.42);
  display: flex; align-items: flex-end; justify-content: center;
}
.chooser-sheet {
  width: 100%; max-width: 420px;
  background: var(--booki-bg); border-radius: 28px 28px 0 0;
  padding: 14px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 -8px 30px rgba(0,0,0,.18);
}
.chooser-header { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 2px; }
.chooser-header-stage .booki-character-stage { min-height: auto; display: flex; }
.chooser-header-stage .booki-character-stage::before { display: none; }
.chooser-header-char { width: 38px !important; height: auto !important; filter: none !important; animation: none !important; }
.chooser-title { text-align: center; font-size: 1rem; font-weight: 800; margin: 0; color: var(--booki-text); }
.chooser-option {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 16px;
  padding: 10px 14px; font-family: inherit; font-size: .96rem; font-weight: 700;
  color: var(--booki-text); transition: background .15s;
}
.chooser-option:active, .chooser-option:focus-visible { background: #f2ecd9; }
.chooser-option:focus-visible { outline: 2px solid var(--booki-turquoise); outline-offset: 2px; }
.chooser-option-thumb { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #fff; }
.chooser-option small{margin-right:auto;color:var(--booki-muted);font-size:.7rem}.chooser-letter-thumb{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#fff2ae;color:#684c00;font-size:1.5rem;font-weight:900;flex-shrink:0}.letters-new-badge{position:absolute;top:-7px;left:-7px;padding:3px 9px;border-radius:999px;background:#ef5b5b;color:#fff;font-size:.68rem;font-weight:900;box-shadow:0 3px 8px rgba(166,45,45,.25);transform:rotate(-7deg)}.letters-new-badge[hidden]{display:none}.chooser-option-letters{position:relative}
.chooser-cancel {
  background: none; border: none; color: var(--booki-muted);
  font-family: inherit; font-size: .92rem; font-weight: 700; padding: 8px;
}
.chooser-cancel:focus-visible { outline: 2px solid var(--booki-turquoise); outline-offset: 2px; }

/* ─── LIBRARY ───────────────────────────────────────────────────── */
.library-tabs { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-top: 8px; padding-bottom: 4px; }
.library-tabs::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; padding: 7px 16px; border-radius: 20px; font-family: inherit; font-size: .9rem; font-weight: 600; background: #fff; border: 2px solid var(--border); color: var(--text); transition: all .2s; white-space: nowrap; }
.tab-btn.active { background: var(--green); border-color: var(--green); color: #fff; }
.library-tabs-simple{display:grid;grid-template-columns:1fr 1fr;overflow:visible;padding:4px 0}.library-tabs-simple .tab-btn{white-space:normal;min-height:44px;padding:7px 9px}.library-search{display:flex;align-items:center;gap:8px;margin:10px 0 12px;padding:10px 14px;border:2px solid var(--border);border-radius:16px;background:#fff}.library-search input{width:100%;border:0;outline:0;background:transparent;font:700 .95rem inherit;color:var(--text)}.library-show-more{display:block;margin:16px auto 28px;border:0;border-radius:16px;padding:12px 22px;background:#eaf7ee;color:var(--green);font-family:inherit;font-weight:900}.library-empty{text-align:center;padding:40px 20px;color:var(--muted)}.library-empty span{display:block;font-size:2.5rem}.library-empty strong{display:block;color:var(--text);font-size:1.05rem;margin-top:8px}.library-empty p{margin:4px}
.library-category-view{padding:16px 16px 34px}.library-welcome{display:grid;gap:3px;margin-bottom:14px;text-align:center}.library-welcome strong{font-size:1.12rem}.library-welcome span{font-size:.82rem;color:var(--muted)}.library-category-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:650px;margin:auto}.library-category-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-height:172px;padding:16px;border:0;border-radius:22px;background:#fff;box-shadow:0 5px 16px rgba(35,67,45,.1);text-align:right;font-family:inherit}.library-category-emoji{font-size:2.4rem}.library-category-copy{display:grid;gap:3px;margin-top:auto}.library-category-copy strong{font-size:1rem;color:var(--text)}.library-category-copy small{min-height:35px;color:var(--muted);font-size:.72rem;line-height:1.35}.library-category-copy b{color:var(--green);font-size:.76rem}.library-category-coming-soon{cursor:default;filter:saturate(.72);opacity:.86}.library-category-coming-soon .library-category-copy b{color:var(--muted)}.library-coming-soon-label{position:absolute;top:12px;left:10px;padding:4px 9px;border-radius:999px;background:#6d7782;color:#fff;font-size:.66rem;font-weight:900;box-shadow:0 2px 6px rgba(35,45,55,.18)}.library-category-starter{background:#eff9e9}.library-category-familiar{background:#fff5d9}.library-category-booki{background:#eaf8f7}.library-category-adventure{background:#eaf3ff}.library-category-science{background:#f1edff}.library-category-heritage{background:#fff0e8}.library-category-holidays{background:#fff0f4}.library-category-advanced{background:#edf0f7}.library-all-categories{margin:12px 16px 6px;padding:9px 14px;border-radius:14px;background:#edf6ef;color:var(--green);font-family:inherit;font-weight:900}

.story-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.story-card { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--card); border: 2px solid #e8f5e9; border-radius: var(--radius); transition: all .2s; width: 100%; font-family: inherit; text-align: right; cursor: pointer; }
.story-card:hover { border-color: var(--green); transform: translateX(-2px); box-shadow: var(--shadow-sm); }
.story-card-left { display: flex; align-items: center; gap: 12px; }
.story-emoji  { font-size: 2rem; flex-shrink: 0; }
.story-title  { font-size: 1.05rem; font-weight: 700; display: block; }
.story-new-label { display:inline-block;margin-right:7px;padding:2px 7px;border-radius:999px;background:#ef5b5b;color:#fff;font-size:.62rem;font-weight:900;vertical-align:middle;box-shadow:0 2px 5px rgba(166,45,45,.18); }

/* הודעת "חוזרים ללימודים" — חגיגית, ממוקדת ונוחה גם במסך טלפון קטן. */
body.back-to-school-promo-open { overflow:hidden; }
.back-to-school-promo { position:fixed;inset:0;z-index:12500;align-items:center;justify-content:center;padding:20px;background:rgba(30,45,70,.55);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px); }
.back-to-school-promo-card { position:relative;overflow:hidden;width:min(100%,390px);padding:27px 22px 20px;border:4px solid #fff;border-radius:32px;background:linear-gradient(160deg,#fff7c8 0%,#dff6ff 48%,#e7f9e7 100%);box-shadow:0 24px 70px rgba(22,42,70,.32);text-align:center;direction:rtl; }
.back-to-school-promo-card::before,.back-to-school-promo-card::after { content:'';position:absolute;border-radius:50%;opacity:.35;pointer-events:none; }
.back-to-school-promo-card::before { width:170px;height:170px;right:-80px;top:-75px;background:#ffcf4a; }
.back-to-school-promo-card::after { width:150px;height:150px;left:-80px;bottom:-85px;background:#59cbe8; }
.back-to-school-promo-close { position:absolute;z-index:3;left:13px;top:10px;width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.8);color:#52616b;font:900 1.6rem/1 inherit;cursor:pointer; }
.school-confetti span { position:absolute;z-index:1;font-size:1.35rem;filter:drop-shadow(0 2px 2px rgba(0,0,0,.08));animation:schoolFloat 2.7s ease-in-out infinite; }
.school-confetti span:nth-child(1){right:18px;top:67px;transform:rotate(18deg)}
.school-confetti span:nth-child(2){left:24px;top:71px;animation-delay:.25s}
.school-confetti span:nth-child(3){right:31px;top:165px;animation-delay:.5s}
.school-confetti span:nth-child(4){left:22px;top:178px;animation-delay:.75s}
.school-confetti span:nth-child(5){right:28px;bottom:92px;animation-delay:1s}
.school-confetti span:nth-child(6){left:28px;bottom:104px;animation-delay:1.25s}
@keyframes schoolFloat{0%,100%{translate:0 0}50%{translate:0 -7px}}
.school-backpack { position:relative;z-index:2;font-size:5rem;line-height:1;margin:4px 0 7px;filter:drop-shadow(0 8px 8px rgba(70,80,100,.17));animation:schoolBackpackPop .7s cubic-bezier(.2,.9,.3,1.25) both; }
@keyframes schoolBackpackPop{from{opacity:0;transform:scale(.4) rotate(-12deg)}to{opacity:1;transform:scale(1) rotate(0)}}
.school-new-new { position:relative;z-index:2;margin:0;color:#ef4e4e;font-size:1.05rem;font-weight:1000;letter-spacing:.02em; }
.back-to-school-promo-card h2 { position:relative;z-index:2;margin:6px auto 10px;max-width:300px;color:#263a59;font-size:1.55rem;line-height:1.25;font-weight:1000; }
.school-promo-ribbon { position:relative;z-index:2;display:inline-block;padding:7px 22px;border-radius:999px;background:linear-gradient(135deg,#30c879,#159e58);color:#fff;font-size:1.25rem;font-weight:1000;box-shadow:0 5px 0 #087e40;transform:rotate(-1deg); }
.school-promo-copy { position:relative;z-index:2;margin:18px auto 16px;max-width:310px;color:#52616b;font-size:.92rem;font-weight:750;line-height:1.55; }
.school-promo-action { position:relative;z-index:2;width:100%;min-height:61px;border:0;border-radius:18px;background:linear-gradient(180deg,#407ee8,#245ec5);color:#fff;font:900 1.03rem inherit;box-shadow:0 6px 0 #174797,0 10px 20px rgba(36,94,197,.22);cursor:pointer; }
.school-promo-action:active { transform:translateY(3px);box-shadow:0 3px 0 #174797; }
.school-promo-later { position:relative;z-index:2;margin-top:15px;border:0;background:transparent;color:#64727c;font:800 .88rem inherit;cursor:pointer; }
.school-promo-action:focus-visible,.back-to-school-promo-close:focus-visible,.school-promo-later:focus-visible{outline:4px solid #f0bd35;outline-offset:3px}
.story-meta   { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.read-badge { background: #E8F5E9; color: var(--green); padding: 4px 10px; border-radius: 20px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.new-badge  { background: #EBF5FB; color: var(--blue2); padding: 4px 10px; border-radius: 20px; font-size: .85rem; font-weight: 700; white-space: nowrap; }

/* ─── READER ────────────────────────────────────────────────────── */
.reader-screen { padding-bottom: 20px; }
.reader-header { display: flex; align-items: center; justify-content: space-between; }
.reader-title { font-size: 1.3rem; font-weight: 800; text-align: center; padding: 0 20px 10px; }
.page-counter { font-size: .85rem; color: var(--muted); background: #f0f0f0; padding: 4px 12px; border-radius: 20px; white-space: nowrap; }

.reader-content { margin: 0 16px 16px; min-height: 240px; background: #FFFEF8; border: 3px solid #FAD7A0; border-radius: 24px; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.reader-text { font-size: 1.65rem; line-height: 2.4; text-align: center; font-weight: 600; white-space: pre-line; letter-spacing: .3px; }
.booki-local-listening { width:min(92%,420px); margin:8px auto 14px; padding:4px 12px 4px 6px; border-radius:22px; background:#eefaf6; color:#176f5b; display:flex; align-items:center; justify-content:center; gap:8px; font-family:Arial,sans-serif; font-weight:700; }
.booki-local-listening[hidden] { display:none; }
.booki-listening-character { width:54px; height:54px; object-fit:contain; flex:0 0 auto; transition:transform .12s ease,filter .15s ease; }
.booki-local-listening.voice-active .booki-listening-character { transform:scale(1.07) rotate(-2deg); filter:drop-shadow(0 4px 8px rgba(24,184,174,.25)); }
.booki-listening-meter { display:flex; direction:ltr; align-items:center; gap:3px; height:20px; margin-right:3px; }
.booki-listening-meter i { width:4px; height:5px; border-radius:8px; background:#18b8ae; transform:scaleY(var(--meter,1)); transition:transform 70ms linear; }
.reader-word,.reader-space { display:inline; padding:.08em 0; transition:color .16s ease,background .16s ease; box-decoration-break:clone;-webkit-box-decoration-break:clone; }
.reader-word.is-heard,.reader-space.is-heard { color:#16865f; background:#e1f7e9; }
.reader-word.is-landing,.reader-space.is-landing{color:#6f5a12;background:#fff0a8}
.reader-word.is-heard { border-radius:0; }
.reader-word.is-listening-now { background:#fff0a8; }
.reader-word.is-preview:not(.is-heard) { background:#f1eef7; }
.reader-space{white-space:pre-wrap}
.reader-word.is-heard:first-child{border-radius:.22em 0 0 .22em}
.reader-text.reader-shared-turn{background:#fffdf8!important;border:3px solid #f0d49a!important;padding:24px 20px!important;display:block!important;text-align:center}
.shared-reading-parent-note{margin:0 0 26px;color:#718078;font-size:13px;font-weight:800;line-height:1.5;text-align:center}
.shared-reading-sentence{font-size:clamp(24px,6vw,36px);line-height:2.15;font-weight:700;direction:rtl;text-align:center}
.shared-reading-parent{color:#9aa29d;font-weight:650}
.shared-reading-word{display:inline-block;vertical-align:middle;margin:0 .16em;padding:.08em .22em;border-radius:.28em;background:#fff2ae;color:#24334f;font-size:1.65em;font-weight:950;line-height:1.25;box-shadow:0 3px 9px rgba(104,76,0,.09);transition:background .18s,color .18s,transform .18s}
.shared-reading-word .reader-word.is-heard,.shared-reading-word .reader-space.is-heard{background:#e1f7e9;color:#16865f}
.shared-reading-word .reader-word.is-landing,.shared-reading-word .reader-space.is-landing{background:#fff0a8;color:#6f5a12}
@media(max-width:420px){.reader-text.reader-shared-turn{padding:20px 14px!important}.shared-reading-parent-note{margin-bottom:20px;font-size:12px}.shared-reading-sentence{font-size:23px;line-height:2.1}.shared-reading-word{font-size:1.75em}}

.reader-word.is-page-success{animation:bookiPageSuccess 1s ease-out}
.reader-text.reader-page-success{animation:bookiPageGlow 1s ease-out}
@keyframes bookiPageSuccess{0%{background:#e8f4eb;transform:scale(1)}40%{background:#ccefd8;transform:scale(1.045)}72%{background:#e1f6e8;transform:scale(1.018)}100%{background:#e8f4eb;transform:scale(1)}}
@keyframes bookiPageGlow{0%,100%{filter:none}42%{filter:drop-shadow(0 0 10px rgba(79,160,107,.28))}}
.booki-local-listening.booki-listening-quiet { background:#f7f4ea;color:#6b655a; }
.booki-local-listening.booki-listening-quiet .booki-listening-character { opacity:.8; }
.reader-niqud-toolbar { display:flex;gap:9px;justify-content:center;align-items:center;flex-wrap:wrap;margin:0 16px 14px; }
.reader-pause-btn{display:block;margin:-3px auto 14px;padding:9px 16px;border:2px solid #cfd9df;border-radius:999px;background:#fff;color:#52616b;font:800 .82rem inherit;box-shadow:0 3px 8px rgba(35,55,70,.08)}.reader-pause-btn:active{transform:translateY(2px);box-shadow:none}
.booki-reading-aloud-btn{display:block;margin:-5px auto 14px;min-height:48px;padding:10px 22px;border:2px solid #8fcab4;border-radius:999px;background:#eefaf6;color:#176f5b;font:900 .92rem Arial,sans-serif;box-shadow:0 3px 8px rgba(35,90,70,.1)}.booki-reading-aloud-btn[hidden]{display:none}.booki-reading-aloud-btn[aria-pressed="true"]{background:#176f5b;color:#fff}.booki-reading-aloud-btn:active{transform:translateY(2px)}
.reader-pause-saved-notice{position:fixed;z-index:14000;left:50%;bottom:calc(92px + env(safe-area-inset-bottom));translate:-50% 0;width:max-content;max-width:calc(100vw - 32px);padding:12px 18px;border-radius:999px;background:#33445e;color:#fff;font-size:.88rem;font-weight:900;box-shadow:0 10px 30px rgba(20,35,55,.28);animation:pauseSavedNotice 2.6s ease both}@keyframes pauseSavedNotice{0%{opacity:0;transform:translateY(10px)}12%,82%{opacity:1;transform:none}100%{opacity:0;transform:translateY(6px)}}
.reader-niqud-mode-btn,.reader-niqud-help-btn { min-height:43px;border:0;border-radius:999px;padding:9px 15px;font:800 .86rem inherit;cursor:pointer; }
.reader-niqud-mode-btn { background:#273d61;color:#fff;box-shadow:0 4px 0 #172741; }
.reader-niqud-help-btn { background:#fff5c8;color:#725b08;border:2px solid #f0d363; }
.reader-niqud-help-btn:disabled { opacity:.8;cursor:default; }
.niqud-mode-dialog { position:fixed;inset:0;z-index:13000;align-items:center;justify-content:center;padding:20px;background:rgba(28,43,65,.62);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px); }
.niqud-mode-card { width:min(100%,390px);border:4px solid #fff;border-radius:30px;padding:24px;background:linear-gradient(160deg,#fff9df,#e8f7ee);box-shadow:0 22px 60px rgba(20,35,55,.35);text-align:center;direction:rtl; }
.niqud-mode-card h2 { margin:0;color:#263a59;font-size:1.55rem; }
.niqud-mode-card>p { margin:7px 0 17px;color:#607078;font-weight:700; }
.niqud-mode-options { display:grid;grid-template-columns:repeat(3,1fr);gap:10px;direction:rtl; }
.niqud-mode-options button { display:flex;min-width:0;min-height:116px;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:11px 5px;border:2px solid #dbe6df;border-radius:20px;background:#fff;color:#263a59;cursor:pointer;box-shadow:0 5px 12px rgba(40,65,75,.1); }
.niqud-mode-options button:active { transform:translateY(3px);box-shadow:0 2px 5px rgba(40,65,75,.1); }
.niqud-mode-options b { display:flex;align-items:center;justify-content:center;gap:3px;width:64px;height:64px;border-radius:18px;background:#e8f4ff;color:#245ec5;font-size:2rem;line-height:1; }
.niqud-mode-options b span { font-size:1.45rem; }
.niqud-mode-options small { color:#556770;font-size:.73rem;font-weight:900;line-height:1.2; }
.complete-bonus-breakdown { display:flex;flex-direction:column;gap:7px;width:min(100%,390px);margin:16px auto;padding:14px 17px;border:2px solid #f4d66d;border-radius:18px;background:#fff9d9;color:#47545b;text-align:right; }
.complete-bonus-breakdown span { display:flex;justify-content:space-between;gap:12px;font-weight:750; }
.complete-bonus-breakdown strong { margin-top:5px;color:#17834b;text-align:center; }
.complete-bonus-breakdown small { color:#69767c;text-align:center;line-height:1.4; }

.page-dots-wrap { display: flex; justify-content: center; margin-bottom: 12px; }
.page-dots { display: flex; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd; transition: background .2s; }
.dot-active { background: var(--blue2); }

.reader-nav { display: flex; justify-content: space-between; padding: 0 16px; margin-bottom: 16px; }
.btn-nav { padding: 12px 22px; border-radius: 25px; font-size: 1.05rem; font-weight: 700; font-family: inherit; background: #f0f0f0; color: var(--text); transition: all .2s; }
.btn-nav:hover { background: var(--blue2); color: #fff; }
.btn-nav-primary { background: var(--blue2); color: #fff; }
.btn-nav-primary:hover { background: var(--blue); }

.finish-reading { text-align: center; padding: 0 16px 20px; }
.hidden { display: none !important; }

/* ─── קוראים אותיות ─────────────────────────────────────────────── */
.letters-screen{background:linear-gradient(180deg,#fffdf5,#f1faf4)}.letters-intro{display:flex;align-items:center;gap:12px;margin:18px 16px 10px;padding:14px;border-radius:18px;background:#fff;border:1px solid var(--border)}.letters-booki{font-size:2.6rem}.letters-intro strong{font-size:1.08rem}.letters-intro p{margin:3px 0 0;color:var(--muted);font-size:.82rem}.letters-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;padding:12px 16px 24px}.letters-grid button{aspect-ratio:1;border:2px solid #dce9df;border-radius:16px;background:#fff;color:#285f3d;font:900 1.7rem inherit;box-shadow:0 3px 8px rgba(41,78,53,.08)}.letters-grid button:active{background:#fff2ae;transform:scale(.96)}.letter-practice{position:relative;flex-direction:column;align-items:center;gap:10px;margin:0 16px 30px;padding:22px 14px;border-radius:24px;background:#fff;box-shadow:0 8px 26px rgba(41,78,53,.15)}.letter-practice-close{position:absolute;left:12px;top:10px;border:0;background:none;font-size:1.7rem;color:var(--muted)}.letter-focus{display:grid;place-items:center;width:104px;height:104px;border:0;border-radius:50%;background:#fff2ae;color:#684c00;font:900 4.3rem inherit;cursor:pointer}.letter-focus:active{transform:scale(.96)}.letter-practice h3{margin:2px 26px 0;text-align:center;font-size:1.08rem;color:var(--text)}.letter-practice-help{margin:0 0 8px!important;color:var(--muted);font-size:.82rem;font-weight:700!important;text-align:center}.letter-niqqud-groups{display:flex;flex-direction:column;gap:18px;width:100%}.letter-niqqud-group h4{margin:0 0 8px;text-align:center;color:#285f3d;font-size:.95rem}.letter-niqqud-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.letter-niqqud-card{position:relative;display:flex;min-height:94px;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:2px solid #dce9df;border-radius:16px;background:#f8fbf9;color:var(--text);font-family:inherit;cursor:pointer}.letter-niqqud-card strong{font-size:2.3rem;line-height:1.15;color:#285f3d}.letter-niqqud-card span{font-size:.68rem;font-weight:800}.letter-niqqud-card small{position:absolute;left:6px;top:5px;font-size:.67rem}.letter-niqqud-card:active{background:#fff2ae;transform:scale(.97)}.letter-niqqud-card:focus-visible,.letter-focus:focus-visible{outline:3px solid #f3be45;outline-offset:2px}@media(max-width:370px){.letter-niqqud-grid{grid-template-columns:repeat(2,1fr)}}
.celebrate-btn { animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.04)} }

/* ─── BOOK STEPS ────────────────────────────────────────────────── */
.step-bar { height: 6px; background: #e0e0e0; border-radius: 10px; margin: 8px 0 4px; overflow: hidden; }
.step-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange2)); border-radius: 10px; }
.step-indicator { font-size: .85rem; color: var(--muted); }

.form-card { display: flex; flex-direction: column; gap: 14px; padding: 0 16px; }
label { font-weight: 700; font-size: 1rem; }
.required { color: var(--red); }
.optional  { font-weight: 400; color: var(--muted); font-size: .85rem; }
.input-field { width: 100%; padding: 14px 16px; border: 2px solid var(--border); border-radius: 12px; font-size: 1rem; font-family: inherit; direction: rtl; background: #fff; color: var(--text); transition: border-color .2s; }
.input-field:focus { outline: none; border-color: var(--blue2); }
.textarea-field { min-height: 80px; resize: vertical; }

.pages-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 16px; }
.btn-pages { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 14px; border: 3px solid var(--border); border-radius: 20px; background: #fff; font-family: inherit; transition: all .2s; cursor: pointer; }
.btn-pages:hover    { border-color: var(--orange); background: #FFF5EC; }
.btn-pages.selected { border-color: var(--booki-coral); background: #FFF5EC; box-shadow: 0 0 0 4px color-mix(in srgb, var(--booki-coral) 20%, transparent); }
.pages-count { font-size: 2rem; font-weight: 900; color: var(--orange); }
.pages-mins  { font-size: .85rem; color: var(--muted); }

/* ─── קריאה עם בוקי (Sprint 8) ──────────────────────────────────── */
.booki-read-card {
  margin: 4px 16px 6px; padding: 22px 20px 20px; text-align: center;
  background: linear-gradient(135deg, #fff3d6, #ffe9b0);
  border-radius: 24px; box-shadow: var(--shadow);
}
.booki-read-icons { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.booki-read-clock { font-size: 2.6rem; }
.booki-read-book  { font-size: 2.1rem; }
.booki-read-owl   { font-size: 2.6rem; }
.booki-read-title { font-size: 1.4rem; font-weight: 900; color: #6b4a00; margin: 2px 0 2px; }
.booki-read-sub   { font-size: .92rem; color: #8a6a1f; margin-bottom: 16px; }
.btn-booki-read   { background: linear-gradient(135deg, #FF9A56, #FF6B6B); width: 100%; }
.class-shop-entry { margin: 4px 0 14px; }

.booki-resume-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0 16px 14px; padding: 12px 16px; text-align: center;
  background: #FFFDE7; border: 2px solid var(--yellow); border-radius: var(--radius);
}
.booki-resume-banner-body { flex: 1; min-width: 0; }
.booki-resume-banner-stage { flex-shrink: 0; }
.booki-resume-banner-stage .booki-character-stage { min-height: auto; display: flex; }
.booki-resume-banner-stage .booki-character-stage::before { display: none; }
.booki-resume-banner-char { width: 44px !important; height: auto !important; filter: none !important; animation: none !important; }
.booki-resume-banner p { font-size: .92rem; font-weight: 700; margin-bottom: 10px; }
.booki-resume-actions { display: flex; gap: 10px; justify-content: center; }
.btn-resume, .btn-discard { padding: 8px 16px; border-radius: 20px; font-family: inherit; font-weight: 700; font-size: .85rem; }
.btn-resume  { background: var(--green); color: #fff; }
.btn-discard { background: none; border: 2px solid var(--border); color: var(--muted); }

.booki-reading-screen { background: #FFFEF8; padding-bottom: 20px; min-height: 100%; }

.booki-say-moment { display: flex; align-items: flex-start; gap: 12px; margin: 20px 16px; }
.booki-say-face { font-size: 2.6rem; flex-shrink: 0; animation: bookiFacePulse 2.6s ease-in-out infinite; }
.booki-say-bubble {
  background: linear-gradient(145deg, #fff6e0, #ffedc2); border: 2px solid #f4d78a;
  border-radius: 6px 18px 18px 18px; padding: 14px 18px; font-size: 1rem; font-weight: 700;
  color: #5a4520; line-height: 1.6;
}

/* אובייקט דינמי אחד: גם כפתור ההתחלה וגם תצוגת הטיימר (לא שני כפתורים נפרדים) */
.booki-timer-circle {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; margin: 30px auto; width: 200px; height: 200px; border-radius: 50%; border: 3px solid transparent;
  box-sizing: border-box; padding: 0 22px; font-family: inherit; box-shadow: var(--shadow);
  transition: background .4s ease, border-color .4s ease, transform .15s ease;
}
.booki-timer-idle {
  background: linear-gradient(135deg, #FF9A56, #FF6B6B); cursor: pointer;
  animation: bookiTimerInvite 2.2s ease-in-out infinite;
}
.booki-timer-idle:active { transform: scale(.96); }
.booki-timer-starting { background: var(--card); cursor: default; }
@keyframes bookiTimerInvite { 0%, 100% { box-shadow: var(--shadow); } 50% { box-shadow: 0 6px 26px rgba(255,107,107,.45); } }

/* מצב "קוראים כרגע" — מסגרת ירוקה + רקע ירוק בהיר מאוד, עם פעימה עדינה שלא מסיחה דעת */
.booki-timer-running {
  background: #EAF9EE; border-color: var(--booki-green); cursor: default;
  animation: bookiTimerActivePulse 2.8s ease-in-out infinite;
}
@keyframes bookiTimerActivePulse {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 0 color-mix(in srgb, var(--booki-green) 35%, transparent); }
  50%      { box-shadow: var(--shadow), 0 0 0 7px color-mix(in srgb, var(--booki-green) 0%, transparent); }
}

.booki-timer-icon  { font-size: 2.1rem; }
.booki-timer-label { font-size: 1.1rem; font-weight: 900; color: #fff; text-align: center; line-height: 1.25; }
.booki-timer-sublabel { font-size: 1.35rem; font-weight: 900; color: var(--text); }
.booki-timer-help{max-width:340px;margin:18px auto 0;padding:12px 15px;border-radius:15px;background:#eef8f1;color:#285f3d;text-align:center;font-size:.86rem;line-height:1.55;font-weight:700}
.booki-timer-running .booki-timer-label { color: var(--booki-green); font-size: 1rem; }
.booki-timer-running .booki-timer-icon  { color: var(--booki-green); }
.booki-timer-starting .booki-timer-icon { opacity: 0; }

/* ניצוצות — האובייקט הדינמי שמלווה את המעבר מ"התחל" למספר הדקות (~1.2s) */
.booki-timer-sparkles { position: absolute; inset: 0; pointer-events: none; }
.timer-sparkle { position: absolute; font-size: 1.5rem; opacity: 0; }
.timer-sparkle.ts-1 { top: 2%;  left: 50%; }
.timer-sparkle.ts-2 { top: 20%; left: 90%; }
.timer-sparkle.ts-3 { top: 66%; left: 92%; }
.timer-sparkle.ts-4 { top: 92%; left: 50%; }
.timer-sparkle.ts-5 { top: 66%; left: 8%;  }
.timer-sparkle.ts-6 { top: 20%; left: 10%; }
.booki-timer-starting .timer-sparkle { animation: bookiSparklePop 1.1s ease-out forwards; }
.booki-timer-starting .ts-2 { animation-delay: .1s;  }
.booki-timer-starting .ts-3 { animation-delay: .2s;  }
.booki-timer-starting .ts-4 { animation-delay: .3s;  }
.booki-timer-starting .ts-5 { animation-delay: .4s;  }
.booki-timer-starting .ts-6 { animation-delay: .5s;  }
@keyframes bookiSparklePop {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(.3); }
  40%  { opacity: 1; transform: translate(-50%,-50%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(.9); }
}
@media (prefers-reduced-motion: reduce) {
  .booki-timer-idle, .booki-timer-running { animation: none; }
  .timer-sparkle { animation: none !important; opacity: 0 !important; }
}

.booki-finish-wrap  { text-align: center; padding: 10px 16px 20px; }
.btn-skip { display: block; margin: 4px auto 0; background: none; font-size: .9rem; font-weight: 600; color: var(--muted); padding: 8px; }

@keyframes bookiFacePulse { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.06) rotate(-3deg); } }

/* ─── SESSION COMPLETE ──────────────────────────────────────────── */
.complete-screen { padding: 0 !important; }
#screen-session-complete { display: none; background: linear-gradient(145deg, var(--booki-grape), var(--purple2)); color: #fff; }
#screen-session-complete.active { display: flex; align-items: center; justify-content: center; }
.complete-content { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 40px 24px; text-align: center; position: relative; z-index: 1; max-width: 420px; width: 100%; }
.complete-star { font-size: 90px; }
.animate-bounce { animation: bounce 1s ease infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-18px)} }
.complete-title { font-size: 3rem; font-weight: 900; }
.complete-sub   { font-size: 1.1rem; opacity: .9; }
.complete-stats { display: flex; gap: 16px; }
.stat-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 22px; border-radius: 20px; min-width: 120px; }
.stat-blue   { background: color-mix(in srgb, var(--booki-turquoise) 35%, transparent); border: 2px solid rgba(255,255,255,.3); }
.stat-yellow { background: color-mix(in srgb, var(--booki-yellow) 35%, transparent);  border: 2px solid rgba(255,255,255,.3); }
.stat-icon   { font-size: 1.6rem; }
.stat-number { font-size: 2.8rem; font-weight: 900; }
.stat-label  { font-size: .9rem; opacity: .9; }
.complete-msg { font-size: 1rem; opacity: .9; }
.complete-tree-msg { font-size: .95rem; font-weight: 700; opacity: .95; }
.complete-encouragement { font-size: 1rem; font-weight: 700; opacity: .95; }
.levelup-banner { background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.4); border-radius: 16px; padding: 10px 18px; font-size: 1.05rem; font-weight: 700; }
.levelup-icon { font-size: 1.3rem; margin-inline-end: 4px; }

.confetti-area { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.confetti-piece { position: absolute; top: -20px; width: 10px; height: 10px; border-radius: 2px; animation: confettiFall linear forwards; }
@keyframes confettiFall { to { transform: translateY(110vh) rotate(720deg); opacity: 0; } }

/* ─── READER CARD ───────────────────────────────────────────────── */
.reader-card-content { display: flex; flex-direction: column; gap: 16px; padding: 0 16px 20px; }
.card-hero { position: relative; text-align: center; padding: 28px 20px; background: linear-gradient(135deg, #EBF5FB, #D6EAF8); border-radius: 22px; }

.card-avatar { font-size: 4rem; }
.card-name   { font-size: 2rem; font-weight: 900; margin-top: 6px; }
.card-rank   { font-size: 1.2rem; font-weight: 700; margin-top: 6px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-box { background: var(--card); border-radius: var(--radius); padding: 16px 12px; text-align: center; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; gap: 5px; }
.stat-box-highlight { border: 2px solid var(--yellow); background: #FFFDE7; }
.stat-box-wide { grid-column: 1 / -1; }
.stat-icon-big { font-size: 1.5rem; }
.stat-num { font-size: 1.9rem; font-weight: 900; }
.stat-lbl { font-size: .8rem; color: var(--muted); }

.badges-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badge-chip { display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; width: 42px; height: 42px; border-radius: 50%; background: var(--card); border: 2px solid; box-shadow: var(--shadow-sm); }

.progress-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); font-size: .95rem; }
.progress-bar  { height: 12px; background: #eee; border-radius: 10px; margin-top: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--green2)); border-radius: 10px; transition: width .6s ease; }
.max-rank { text-align: center; background: linear-gradient(135deg, #f093fb, #f5576c); color: #fff; font-weight: 700; font-size: 1.05rem; padding: 18px; border-radius: var(--radius); }

.history-section { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.history-section h3 { font-size: 1rem; font-weight: 800; margin-bottom: 10px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; background: #f9f9f9; border-radius: 10px; }
.history-icon  { font-size: 1.2rem; flex-shrink: 0; }
.history-title { font-weight: 700; font-size: .9rem; display: block; }
.history-meta  { font-size: .78rem; color: var(--muted); display: block; }
.no-history    { text-align: center; color: var(--muted); padding: 8px 24px 20px; font-size: .95rem; }
.btn-rc-read   { display: block; width: 100%; padding: 16px; background: var(--booki-green); color: #fff; border: none; border-radius: 14px; font-size: 1.1rem; font-weight: 700; cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════
   CLUB SYSTEM — SCREENS (splash, who-reads, create, join, onboard)
═══════════════════════════════════════════════════════════════ */

/* ─── Splash — שני כפתורים ראשיים ──────────────────────────── */
.splash-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  margin: 10px auto 0;
}

.btn-splash-action {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  text-align: right;
  transition: transform .18s, box-shadow .18s;
  width: 100%;
}
.btn-splash-action:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }

.btn-sa-create { background: #fff; color: var(--text); }
.btn-sa-reader { background: rgba(255,255,255,.28); color: #fff; border: 2px solid rgba(255,255,255,.6); }

.splash-secondary-actions { text-align: center; margin-top: 2px; }
.btn-splash-secondary {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.45);
  color: rgba(255,255,255,.85);
  border-radius: 12px;
  padding: 10px 26px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.btn-splash-secondary:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.75);
}
.splash-secondary-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.btn-solo-card { border-color: rgba(100,255,150,.5); color: rgba(180,255,210,.95); }
.btn-solo-card:hover { background: rgba(100,255,150,.1); border-color: rgba(100,255,150,.8); }

/* ─── Share App ──────────────────────────────────────────────────────────────── */
.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-share-app {
  font-size: 0.8rem; padding: 0.3rem 0.7rem;
  border-radius: 20px; border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.15); color: inherit; cursor: pointer;
  font-family: inherit;
}
.btn-share-app:hover { background: rgba(255,255,255,.28); }
.share-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.share-modal {
  background: #fff; border-radius: 1.2rem 1.2rem 0 0;
  padding: 1.5rem 1.2rem; width: 100%; max-width: 480px;
  text-align: center; position: relative;
}
.share-modal-close {
  position: absolute; top: 0.75rem; left: 0.75rem;
  background: none; border: none; font-size: 1.1rem; cursor: pointer; color: #888;
}
.share-modal-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.3rem; }
.share-modal-text  { color: #666; margin-bottom: 1rem; font-size: 0.9rem; }
.btn-share-wa {
  display: block; background: #25D366; color: #fff !important;
  border-radius: 12px; padding: 0.75rem; margin: 0 auto 0.6rem;
  font-size: 1rem; font-weight: 700; text-decoration: none; max-width: 280px;
}
.btn-share-copy {
  display: block; background: #f2f2f2; color: #333;
  border: none; border-radius: 12px; padding: 0.7rem 1.5rem;
  font-size: 0.95rem; cursor: pointer; font-family: inherit;
  margin: 0 auto; max-width: 280px; width: 100%;
}
.btn-share-copy:hover { background: #e5e5e5; }
.share-copy-ok { color: var(--booki-green); font-weight: 600; margin-top: 0.5rem; font-size: 0.9rem; }

.sa-icon  { font-size: 2.2rem; flex-shrink: 0; }
.sa-text  { display: flex; flex-direction: column; gap: 2px; }
.sa-label { font-size: 1.15rem; font-weight: 800; }
.sa-sub   { font-size: .82rem; opacity: .75; }

/* ─── Club Select ────────────────────────────────────────────── */
.club-select-list { display: flex; flex-direction: column; gap: 12px; padding: 16px; }

.club-select-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: right;
  transition: all .2s;
  width: 100%;
}
.club-select-card:hover { border-color: var(--green); background: #f0fff4; transform: translateY(-2px); box-shadow: var(--shadow); }
.csc-emoji { font-size: 2.2rem; }
.csc-info  { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.csc-name  { font-size: 1.1rem; font-weight: 800; }
.csc-meta  { font-size: .82rem; color: var(--muted); }
.csc-arrow { font-size: 1.2rem; color: var(--green); }

/* ─── Who Reads — Profile Picker ────────────────────────────── */
.who-reads-title { font-size: 1.5rem; font-weight: 900; text-align: center; padding-top: 4px; }
.who-reads-club  { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 2px; }

.who-reads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 14px;
  padding: 20px 16px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 8px 14px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
}
.profile-card:hover { border-color: var(--booki-green); background: #f0fff4; transform: translateY(-4px); box-shadow: 0 6px 18px color-mix(in srgb, var(--booki-green) 20%, transparent); }
.profile-card[hidden] { display: none !important; }
.profile-avatar { font-size: 2.4rem; }
.profile-name   { font-size: .82rem; font-weight: 700; text-align: center; color: var(--text); }
.profile-pts    { font-size: .72rem; color: var(--muted); background: #f3f3f3; padding: 2px 8px; border-radius: 20px; }

.who-reads-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 20px; font-size: .95rem; }
.who-reads-footer {
  text-align: center;
  padding: 8px 20px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.who-reads-search-label { font-size: 1rem; font-weight: 900; color: var(--text); }
.who-reads-search {
  width: min(100%, 420px);
  min-height: 52px;
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  color: var(--text);
  font: 700 1rem/1.4 inherit;
  text-align: right;
  outline: none;
}
.who-reads-search:focus { border-color: var(--booki-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--booki-green) 16%, transparent); }
.btn-join-another {
  background: none;
  border: 2px dashed var(--border);
  border-radius: 30px;
  color: var(--muted);
  padding: 10px 24px;
  font-size: .9rem;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn-join-another:hover { border-color: var(--green); color: var(--green); }
.who-reads-not-found { color: var(--muted); font-size: .85rem; line-height: 1.5; margin: 0; }
.who-reads-hidden { grid-column: 1 / -1; text-align: center; padding: 3rem 24px; color: var(--muted); font-size: 1rem; line-height: 2; }
.od-hidden-badge { background: #e67e22; color: #fff; font-size: .7rem; padding: 2px 7px; border-radius: 10px; vertical-align: middle; margin-right: 4px; }
.od-row--hidden { opacity: .55; }
.od-btn-sm { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; font-size: .75rem; cursor: pointer; color: var(--muted); font-family: inherit; white-space: nowrap; }
.od-btn-sm:hover { border-color: var(--text); color: var(--text); }
.od-btn-sm--warn { border-color: #e67e22; color: #e67e22; }
.od-btn-sm--warn:hover { background: #e67e22; color: #fff; }
.od-badge--active { background: var(--green); color: #fff; font-size: .7rem; padding: 2px 7px; border-radius: 10px; vertical-align: middle; margin-right: 4px; }

/* ─── Create Club — shared form styles ──────────────────────── */
.type-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 16px;
}

.type-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 18px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: right;
  transition: all .2s;
  width: 100%;
}
.type-card:hover { border-color: var(--green); background: #f0fff4; transform: translateY(-2px); box-shadow: var(--shadow); }
.type-emoji { font-size: 2.2rem; flex-shrink: 0; }
.type-label { display: block; font-size: 1.1rem; font-weight: 800; }
.type-sub   { display: block; font-size: .82rem; color: var(--muted); }

.emoji-picker-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 20px; }
.emoji-opt {
  font-size: 1.6rem;
  padding: 8px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: all .15s;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
}
.emoji-opt.selected { border-color: var(--green); background: #e6f7ee; transform: scale(1.12); }
.emoji-opt:hover    { border-color: var(--green2); background: #f0fff4; }

/* ─── Members ────────────────────────────────────────────────── */
.add-mode-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.add-mode-btn {
  flex: 1; padding: 10px 6px;
  border: 2px solid var(--border); border-radius: 10px;
  background: none; font-size: .88rem; font-weight: 700;
  cursor: pointer; font-family: inherit; color: var(--muted);
  transition: all .15s;
}
.add-mode-btn.active { border-color: var(--green); background: #e8f8ef; color: var(--green); }

.add-member-row { display: flex; gap: 10px; margin-bottom: 4px; }
.btn-add-member {
  padding: 0 18px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .15s;
}
.btn-add-member:hover { background: var(--green2); }

.member-count-label { font-size: .85rem; color: var(--green); font-weight: 700; min-height: 20px; margin-bottom: 8px; }

.member-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; min-height: 32px; }
.member-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e8f8ef;
  border: 1.5px solid var(--green);
  border-radius: 20px;
  padding: 5px 12px;
}
.member-chip-name   { font-size: .9rem; font-weight: 700; color: #1a5c35; }
.member-chip-remove { background: none; border: none; color: #999; cursor: pointer; font-size: .85rem; padding: 0; line-height: 1; }
.member-chip-remove:hover { color: var(--red); }

/* ─── Review ─────────────────────────────────────────────────── */
.review-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 16px 16px 20px; padding: 20px; }
.review-club-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.review-club-emoji  { font-size: 3rem; }
.review-club-name   { font-size: 1.3rem; font-weight: 900; }
.review-club-type   { font-size: .85rem; color: var(--muted); }
.review-count       { font-size: .9rem; color: var(--green); font-weight: 700; margin-bottom: 12px; }
.review-member-list { display: flex; flex-wrap: wrap; gap: 8px; }
.review-member      { background: #f0f0f0; border-radius: 20px; padding: 4px 12px; font-size: .88rem; }

/* ─── Success ────────────────────────────────────────────────── */
.success-club-header { text-align: center; padding: 20px 16px 8px; }
.success-big-emoji   { font-size: 3.5rem; }
.success-club-header h3 { font-size: 1.5rem; font-weight: 900; margin-top: 6px; }
.success-inst { text-align: center; color: var(--muted); font-size: .9rem; margin: 4px 0 12px; }

.success-code-block { text-align: center; padding: 16px 24px 8px; }
.success-code-label { font-size: .9rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.success-code-value {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 8px;
  color: var(--green);
  font-family: 'Courier New', monospace;
  direction: ltr;
  background: #e8f8ef;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 4px;
}
.success-link-value {
  font-size: .78rem;
  color: var(--blue2);
  word-break: break-all;
  direction: ltr;
  text-align: left;
  background: #f0f4ff;
  border-radius: 10px;
  padding: 8px 12px;
}

.success-next-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 8px 16px 4px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: .93rem;
  line-height: 1.5;
}
.success-next-ok     { background: #e8f8ef; border: 1.5px solid #b7e5cb; }
.success-next-notice { background: #fff8e6; border: 1.5px solid #f5d97a; }
.success-next-icon   { font-size: 1.5rem; flex-shrink: 0; margin-top: 1px; }
.success-next-step strong { display: block; margin-bottom: 3px; }
.success-next-step p { margin: 0; color: #555; }

.success-actions { padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 0; }
.btn-blue { background: linear-gradient(135deg, var(--blue), var(--blue2)); }

.btn-outline-green {
  background: none;
  border: 2px solid var(--green);
  color: var(--green);
  border-radius: var(--radius);
  padding: 14px 24px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: all .2s;
}
.btn-outline-green:hover { background: #e8f8ef; }

/* ─── Join ───────────────────────────────────────────────────── */
.join-code-section { padding: 24px 16px 16px; }
.join-label        { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }

.join-code-input {
  display: block;
  width: 100%;
  padding: 18px 16px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 8px;
  text-align: center;
  direction: ltr;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-family: 'Courier New', monospace;
  margin-bottom: 8px;
  text-transform: uppercase;
  outline: none;
  transition: border-color .2s;
}
.join-code-input:focus { border-color: var(--blue); }

.join-error { color: var(--red); font-size: .88rem; min-height: 20px; margin-bottom: 10px; font-weight: 600; }

.join-invite-label {
  font-size: .9rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.join-club-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #e8f8ef;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--green-dark, #1a5c35);
}
/* שדה הזנת שם — פונט קטן יותר מקוד המועדון */
#join-name-input {
  font-size: 1.3rem;
  letter-spacing: 0;
  font-family: inherit;
  text-align: right;
  direction: rtl;
  text-transform: none;
}

/* ─── OWNER DASHBOARD ────────────────────────────────────────────── */
#screen-owner-dashboard { background: #0d1117; color: #e6edf3; direction: rtl; }
.od-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #30363d; position: sticky; top: 0;
  background: #0d1117; z-index: 10;
}
.od-header h2  { font-size: 1.1rem; margin: 0; }
.od-status     { font-size: .72rem; color: #8b949e; flex: 1; text-align: center; }
.od-close      { background: none; border: none; color: #8b949e; font-size: 1.2rem; cursor: pointer; padding: 4px 8px; }
.od-body       { padding: 16px; overflow-y: auto; max-height: calc(100vh - 54px); }
.od-section    { margin-bottom: 24px; }
.od-section-title {
  font-size: .72rem; color: #8b949e; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #21262d;
}
.od-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.od-metric {
  background: #161b22; border: 1px solid #30363d; border-radius: 8px;
  padding: 12px 8px; text-align: center;
}
.od-val  { display: block; font-size: 1.9rem; font-weight: 900; color: #58a6ff; line-height: 1.1; }
.od-lbl  { display: block; font-size: .7rem; color: #8b949e; margin-top: 4px; line-height: 1.3; }
.od-row  {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #21262d; gap: 8px;
}
.od-row-label { font-size: .88rem; flex: 1; }
.od-badge {
  background: #21262d; border-radius: 20px; padding: 3px 10px;
  font-size: .72rem; color: #58a6ff; white-space: nowrap; flex-shrink: 0;
}
.od-error-row {
  display: flex; gap: 8px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid #21262d; font-size: .78rem;
}
.od-err-ts  { color: #8b949e; flex-shrink: 0; }
.od-err-ctx { color: #f85149; font-weight: 700; flex-shrink: 0; }
.od-err-msg { color: #e6edf3; }
.od-empty   { color: #8b949e; font-size: .83rem; text-align: center; padding: 14px 0; }
.od-refresh {
  width: 100%; background: #21262d; border: 1px solid #30363d; color: #e6edf3;
  border-radius: 8px; padding: 10px; font-size: .9rem; cursor: pointer;
  margin-top: 8px; font-family: inherit;
}
.od-refresh:hover { background: #30363d; }

.od-danger-zone {
  border: 2px solid #c0392b !important;
  margin-top: 16px;
}
.btn-dev-reset {
  width: 100%; background: #c0392b; color: #fff; border: none;
  border-radius: 8px; padding: 10px; font-size: .9rem; cursor: pointer;
  font-family: inherit;
}
.btn-dev-reset:hover { background: #a93226; }
.btn-dev-reset:disabled { opacity: .5; cursor: not-allowed; }

.join-divider { text-align: center; color: var(--muted); font-size: .85rem; margin: 20px 0 12px; }

/* ─── Profile Wizard v3 ──────────────────────────────────────── */

/* Screen layout */
.wiz-screen { display: none; flex-direction: column; overflow: hidden; padding: 0; }
.wiz-screen.active { display: flex; }

/* Progress bar */
.wizard-progress {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 10px; background: #fff; flex-shrink: 0;
  border-bottom: 1px solid #f0f0f0;
}
.wizard-progress-track {
  flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden;
}
.wizard-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--booki-green), var(--green2));
  border-radius: 4px;
  transition: width .45s cubic-bezier(.4,0,.2,1), background .5s;
}
.wizard-progress-label {
  font-size: .78rem; font-weight: 700; color: #bbb; white-space: nowrap;
}

/* Content area */
.wizard-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Animations */
@keyframes wiz-slide-next {
  from { opacity: 0; transform: translateX(-22px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes wiz-slide-back {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wiz-anim-next { animation: wiz-slide-next .22s ease; }
.wiz-anim-back { animation: wiz-slide-back .22s ease; }

/* Step wrapper */
.wiz-step {
  display: flex; flex-direction: column;
  min-height: 88vh; padding-bottom: 24px;
}

/* Back button row */
.wiz-top-row {
  display: flex; align-items: center;
  padding: 6px 16px 0; min-height: 40px;
}
.wiz-back-btn {
  background: none; border: none; font-size: .9rem; font-weight: 700;
  color: #888; cursor: pointer; padding: 6px 4px; font-family: inherit;
  transition: color .15s;
}
.wiz-back-btn:hover { color: var(--booki-green); }

/* Hero */
.wiz-hero { text-align: center; padding: 10px 24px 18px; }
.wiz-step-icon {
  font-size: 4.5rem; line-height: 1.1; margin-bottom: 10px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.1));
}
.wiz-step-title {
  font-size: 1.8rem; font-weight: 900; color: #1a1a2e; margin: 0 0 6px;
}
.wiz-step-sub { font-size: 1.05rem; color: #777; margin: 0; }

/* Body */
.wiz-body {
  flex: 1; padding: 4px 16px 8px;
  display: flex; flex-direction: column; gap: 10px;
}

/* Footer */
.wiz-footer { padding: 12px 16px 6px; }
.wiz-error {
  text-align: center; color: #e74c3c; font-size: .88rem;
  min-height: 1.1em; margin: 0 0 8px;
}

/* Name input */
.wiz-name-input {
  width: 100%; padding: 17px 20px;
  font-size: 1.25rem; font-weight: 700; font-family: inherit;
  border: 3px solid #eee; border-radius: 18px; outline: none;
  text-align: center; color: #1a1a2e; background: #fafafa;
  transition: border-color .2s, box-shadow .2s; box-sizing: border-box;
}
.wiz-name-input:focus {
  border-color: var(--booki-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--booki-green) 10%, transparent);
}

/* Grade buttons */
.wiz-grade-row { display: flex; gap: 12px; justify-content: center; padding: 8px 0; }
.wiz-grade-btn {
  flex: 1; max-width: 120px; padding: 26px 8px;
  font-size: 2.2rem; font-weight: 900; font-family: inherit;
  border: 3px solid #eee; border-radius: 22px;
  background: #fafafa; cursor: pointer; transition: all .18s; color: #1a1a2e;
}
.wiz-grade-btn:hover  { border-color: var(--booki-green); background: #f0fff4; }
.wiz-grade-btn.selected {
  border-color: var(--booki-green); background: var(--booki-green); color: #fff;
  transform: scale(1.06); box-shadow: 0 4px 16px color-mix(in srgb, var(--booki-green) 35%, transparent);
}

/* Card options */
.wiz-card-opt {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border: 3px solid #eee; border-radius: 18px;
  background: #fafafa; cursor: pointer; transition: all .16s;
  font-family: inherit; width: 100%; text-align: right;
}
.wiz-card-opt:hover   { border-color: var(--booki-green); background: #f0fff4; }
.wiz-card-opt.selected {
  border-color: var(--booki-green); background: #e8f8ee;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--booki-green) 18%, transparent);
}
.wiz-card-emoji { font-size: 2.1rem; flex-shrink: 0; }
.wiz-card-label { font-size: 1.05rem; font-weight: 700; color: #1a1a2e; }

/* Topic chips */
.wiz-chips-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.wiz-chip {
  padding: 11px 17px; font-size: .92rem; font-weight: 700;
  border: 2.5px solid #eee; border-radius: 24px;
  background: #fafafa; cursor: pointer; font-family: inherit;
  color: #1a1a2e; transition: all .14s;
}
.wiz-chip:hover    { border-color: var(--booki-green); }
.wiz-chip.selected { border-color: var(--booki-green); background: #e8f8ee; color: var(--booki-green); }
.wiz-hint-text { text-align: center; color: #bbb; font-size: .8rem; margin: 4px 0 0; }

/* Next button */
.wiz-next-btn {
  width: 100%; padding: 20px 24px;
  font-size: 1.18rem; font-weight: 800; font-family: inherit;
  border: none; border-radius: 16px;
  background: var(--wiz-btn-color, var(--booki-green));
  color: #fff; cursor: pointer;
  transition: transform .14s, box-shadow .14s, opacity .14s;
  box-shadow: 0 4px 18px rgba(0,0,0,.18); line-height: 1;
}
.wiz-next-btn:hover:not(:disabled) {
  transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.24);
}
.wiz-next-btn:active:not(:disabled) { transform: translateY(0); }
.wiz-next-btn:disabled { opacity: .36; cursor: not-allowed; box-shadow: none; }

/* Completion screen */
.wiz-complete {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 32px 24px 40px; gap: 20px;
  min-height: 88vh; justify-content: center;
}
.wiz-complete-burst { font-size: 2.4rem; letter-spacing: .12em; }
.wiz-complete-title { font-size: 1.5rem; font-weight: 900; color: #1a1a2e; margin: 0; }
.wiz-reader-card {
  background: linear-gradient(135deg, #f0fff4 0%, #e8f0ff 100%);
  border: 2px solid #cce8cc; border-radius: 24px; padding: 28px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 100%; max-width: 280px;
  box-shadow: 0 8px 32px color-mix(in srgb, var(--booki-green) 12%, transparent);
}
.wiz-card-avatar { font-size: 5rem; line-height: 1; }
.wiz-card-name   { font-size: 1.5rem; font-weight: 900; color: #1a1a2e; }
.wiz-card-grade  { font-size: .88rem; color: #777; font-weight: 600; }
.wiz-card-topics { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.wiz-topic-tag   {
  background: var(--booki-green); color: #fff; border-radius: 20px;
  padding: 4px 11px; font-size: .76rem; font-weight: 700;
}
.wiz-complete-text { color: #777; font-size: .92rem; line-height: 1.6; margin: 0; }
.wiz-start-btn { --wiz-btn-color: var(--booki-green); }

/* Avatar — category picker */
.avatar-cat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 0;
}
.avatar-cat-btn {
  display: flex; align-items: center; gap: 10px;
  background: #f8f8f8; border: 2px solid #eee; border-radius: 14px;
  padding: 12px 14px; font-family: inherit; cursor: pointer;
  transition: background .15s, border-color .15s; text-align: start;
}
.avatar-cat-btn:hover { background: #eef6ee; border-color: var(--booki-green); }
.avatar-cat-emoji { font-size: 2.2rem; flex-shrink: 0; }
.avatar-cat-name  { font-size: .88rem; font-weight: 700; color: #333; line-height: 1.2; }
.avatar-cat-title { font-size: 1rem; font-weight: 700; color: #555; text-align: center; margin: 0 0 10px; }
/* Avatar — emoji grid (large) */
.avatar-grid-lg   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.avatar-opt-lg {
  font-size: 2.4rem; line-height: 1; padding: 10px;
  border: 3px solid transparent; border-radius: 12px;
  background: #f8f8f8; cursor: pointer;
  transition: border-color .12s, transform .1s, background .1s;
}
.avatar-opt-lg:hover    { border-color: var(--green); transform: scale(1.1); }
.avatar-opt-lg.selected { border-color: var(--green); background: #e8f8ee; transform: scale(1.1); }
.avatar-opt-lg.avatar-taken { opacity: .28; cursor: not-allowed; }
/* Legacy avatar grid (kept for backward compat) */
.avatar-sections { display: flex; flex-direction: column; gap: 18px; }
.avatar-cat-label {
  font-size: .75rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid #eee;
}
.avatar-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.avatar-opt {
  font-size: 1.75rem; line-height: 1; padding: 6px;
  border: 3px solid transparent; border-radius: 12px;
  background: var(--card, #fff); cursor: pointer;
  transition: border-color .12s, transform .1s;
}
.avatar-opt:hover    { border-color: var(--green); transform: scale(1.08); }
.avatar-opt.selected { border-color: var(--green); background: #e8f8ee; transform: scale(1.12); }
.avatar-opt.avatar-taken { opacity: .28; cursor: not-allowed; }

/* Niqqud step */
.wiz-niqqud-opt { flex-direction: column; gap: 6px; min-height: 80px; }
.wiz-niqqud-example { font-size: 1.5rem; font-weight: 700; direction: rtl; color: #333; letter-spacing: .03em; }

/* Love-of-reading slider */
.wiz-slider-wrap { padding: 12px 8px 4px; }
.wiz-slider-emoji-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 1.8rem; text-align: center; line-height: 1.2; }
.wiz-slider-emoji-row small { font-size: .7rem; color: #999; display: block; }
.wiz-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, var(--booki-green), var(--green2));
  cursor: pointer; outline: none;
}
.wiz-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 3px solid var(--booki-green);
  box-shadow: 0 2px 6px rgba(0,0,0,.15); cursor: pointer;
}
.wiz-slider-value-display { text-align: center; margin-top: 16px; }
.wiz-slider-value { font-size: 3rem; font-weight: 900; color: var(--booki-green); line-height: 1; }
.wiz-slider-scale { font-size: .9rem; color: #aaa; margin-right: 4px; }

/* ─── "במיוחד בשבילך" ────────────────────────────────────────── */

.for-you-section  { padding: 16px 0 0; }
.for-you-header   {
  font-size: 1.1rem; font-weight: 700;
  color: var(--text); padding: 0 16px 10px;
}
.for-you-list     { margin-bottom: 4px; }
.for-you-card     { border-right: 4px solid #f1c40f; }
.for-you-divider  {
  font-size: .85rem; color: var(--muted);
  text-align: center; padding: 16px 0 8px;
  border-top: 1px solid #eee; margin-top: 8px;
}

.join-channels { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.join-channel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: not-allowed;
  opacity: .6;
  font-size: .95rem;
  font-family: inherit;
  width: 100%;
}
.badge-soon { background: #f3e5ff; color: var(--purple); font-size: .72rem; font-weight: 700; border-radius: 20px; padding: 3px 10px; }

.existing-clubs-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 32px; }
.existing-club-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: right;
  transition: all .2s;
  width: 100%;
}
.existing-club-card:hover { border-color: var(--green); background: #f0fff4; box-shadow: var(--shadow); }
.exc-emoji { font-size: 2rem; }
.exc-info  { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.exc-name  { font-size: 1rem; font-weight: 800; }
.exc-type  { font-size: .8rem; color: var(--muted); }
.exc-arrow { font-size: 1.1rem; color: var(--green); }

/* ─── Welcome Full Screen ────────────────────────────────────── */
.welcome-full-screen {
  background: linear-gradient(160deg, var(--booki-green) 0%, var(--booki-green) 55%, var(--green2) 100%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.welcome-full-screen.active { display: flex; }

.welcome-content { text-align: center; padding: 40px 24px; color: #fff; }
.welcome-icon    { font-size: 4rem; margin-bottom: 16px; }
.welcome-title   { font-size: 2.2rem; font-weight: 900; }
.welcome-sub     { font-size: 1.1rem; margin-top: 8px; opacity: .9; }
.welcome-hint    { font-size: .95rem; margin-top: 10px; opacity: .75; }

/* ─── Onboarding Steps ───────────────────────────────────────── */
.onboard-header   { padding: 16px 16px 0; }
.ob-back-row      { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ob-back-btn      {
  background: none; border: none; font-size: .85rem; font-weight: 700;
  color: #888; cursor: pointer; padding: 4px 0; font-family: inherit;
  transition: color .15s;
}
.ob-back-btn:hover { color: var(--booki-green); }
.onboard-step     { font-size: .82rem; color: var(--muted); font-weight: 600; margin: 0; text-align: center; }
.onboard-progress { height: 6px; background: #e0e0e0; border-radius: 10px; overflow: hidden; }
.onboard-fill     { height: 100%; background: linear-gradient(90deg, var(--green), var(--green2)); border-radius: 10px; transition: width .4s ease; }
.onboard-question { font-size: 1.35rem; font-weight: 900; text-align: center; padding: 20px 20px 0; }

/* Grade */
.grade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 16px; }
.grade-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 8px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
}
.grade-btn:hover  { border-color: var(--booki-green); background: #f0fff4; transform: scale(1.04); }
.grade-btn.selected { border-color: var(--booki-green); background: #e6f7ee; box-shadow: 0 0 0 3px color-mix(in srgb, var(--booki-green) 20%, transparent); }
.grade-letter { font-size: 1.8rem; font-weight: 900; }
.grade-sub    { font-size: .8rem; color: var(--muted); }

/* Reading Level */
.level-cards { display: flex; flex-direction: column; gap: 12px; padding: 20px 16px; }
.level-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 16px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: right;
  transition: all .2s;
  width: 100%;
}
.level-card:hover   { border-color: var(--booki-turquoise); background: #ebf5fb; transform: translateX(-2px); }
.level-card.selected { border-color: var(--booki-turquoise); background: #d6eaf8; box-shadow: 0 0 0 3px color-mix(in srgb, var(--booki-turquoise) 20%, transparent); }
.level-icon  { font-size: 2rem; flex-shrink: 0; }
.level-label { display: block; font-size: 1.1rem; font-weight: 800; }
.level-desc  { display: block; font-size: .82rem; color: var(--muted); }

/* Niqqud */
.niqqud-cards { display: flex; flex-direction: column; gap: 12px; padding: 20px 16px; }
.niqqud-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}
.niqqud-card:hover   { border-color: var(--booki-grape); background: #f5eef8; }
.niqqud-card.selected { border-color: var(--booki-grape); background: #e8daef; box-shadow: 0 0 0 3px color-mix(in srgb, var(--booki-grape) 20%, transparent); }
.niqqud-example { font-size: 1.6rem; font-weight: 900; direction: rtl; }
.niqqud-label   { font-size: .9rem; color: var(--muted); }

/* Interests */
.interests-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px 16px 4px; }
.interest-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
}
.interest-card:hover   { border-color: var(--booki-coral); background: #fef9f0; transform: scale(1.03); }
.interest-card.selected { border-color: var(--booki-coral); background: #fdebd0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--booki-coral) 20%, transparent); }
.int-emoji { font-size: 2rem; }
.int-label { font-size: .82rem; font-weight: 700; text-align: center; }

/* ─── Onboard Complete ────────────────────────────────────────── */
.complete-full-screen {
  background: linear-gradient(145deg, var(--booki-grape), var(--purple2));
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.complete-full-screen.active { display: flex; }

.complete-new-content { text-align: center; padding: 40px 24px; color: #fff; }
.complete-new-star    { font-size: 4.5rem; margin-bottom: 12px; }
.complete-new-title   { font-size: 2.8rem; font-weight: 900; margin-bottom: 8px; }
.complete-new-sub     { font-size: 1.2rem; opacity: .92; }
.complete-new-hint    { font-size: 1rem; opacity: .75; margin-top: 8px; }


/* ─── CLASS VIEW ─────────────────────────────────────────────────── */
.class-content { display: flex; flex-direction: column; gap: 16px; padding: 0 16px 20px; }
.class-hero { background: linear-gradient(135deg, #d4fc79, #96e6a1); border-radius: 22px; padding: 24px 20px 18px; text-align: center; }
.class-hero-row { display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.class-tree-visual { position: relative; width: 80px; height: 80px; }
.class-big-tree { font-size: 80px; line-height: 1; }
/* עלים/פירות/פרחים מונחים ישירות על צמרת ה-🌳 (קואורדינטות ב-_TREE_*_SPOTS), לא
   בשורה מתחתיו — ר' _treeDecorHtml ב-script.js. קירוב ויזואלי עם אימוג'י קיים,
   לא נכס איור. */
.tree-decor-layer { position: absolute; inset: 0; pointer-events: none; }
.tree-deco       { position: absolute; transform: translate(-50%, -50%); line-height: 1; }
.tree-deco-leaf     { font-size: 15px; }
.tree-deco-fruit    { font-size: 17px; }
.tree-deco-blossom  { font-size: 16px; }
.class-hero-booki-stage { margin-bottom: -6px; }
.class-hero-booki-stage .booki-character-stage { min-height: auto; }
.class-hero-booki-stage .booki-character-stage::before { display: none; }
.class-hero-booki-char { width: min(24vw, 100px) !important; height: auto !important; }
/* legacy club view בלבד (_renderClassContent) — שורת אימוג'י פשוטה מתחת לעץ, לא
   הפיזור על הצמרת שלמעלה. שמור לתאימות אחורה, לא בשימוש ב-_renderNewClubView. */
.tree-leaves    { font-size: 1.2rem; margin-top: 4px; word-break: break-all; min-height: 28px; }
.tree-fruits    { font-size: 1.2rem; min-height: 28px; }
.tree-bloom     { font-size: 1.6rem; margin-top: 6px; }
.total-num      { font-size: 3.2rem; font-weight: 900; color: #1a5c2a; display: block; line-height: 1; margin-top: 8px; }
.total-lbl      { font-size: 1rem; color: #2d7a40; font-weight: 700; }
.class-tree-legend { display: flex; gap: 16px; justify-content: center; margin-top: 8px; font-size: .85rem; color: #2d7a40; font-weight: 600; }

.class-stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.class-stat { background: var(--card); border-radius: 12px; padding: 12px 6px; text-align: center; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 3px; font-size: .8rem; }
.class-stat strong { font-size: 1.2rem; color: var(--text); }

.goal-section { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.goal-section p { font-weight: 600; font-size: .95rem; margin-bottom: 8px; }

.leaderboard { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.leaderboard h3 { font-size: 1rem; font-weight: 800; margin-bottom: 10px; }

.class-motivation-panel { background: linear-gradient(135deg, #fff9e6, #fff3cc); border-radius: var(--radius); padding: 18px 16px; text-align: center; box-shadow: var(--shadow-sm); }
.class-motivation-panel h3 { font-size: 1rem; font-weight: 800; margin-bottom: 8px; color: #7a5c00; }
.class-motivation-msg { font-size: 1rem; font-weight: 600; color: #6b4a00; }

.class-shop-nudge { background: linear-gradient(135deg, #ffe1ec, #ffd4e5); border-radius: var(--radius); padding: 18px 16px; text-align: center; box-shadow: var(--shadow-sm); margin: 14px 0; }
.class-shop-nudge p { font-size: 1rem; font-weight: 700; color: #9c1155; margin: 0 0 12px; }
.class-shop-nudge p:last-child { margin-bottom: 0; }
.class-shop-nudge button { margin: 0; }
.leader-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; margin-bottom: 6px; background: #f9f9f9; }
.leader-first  { background: linear-gradient(135deg, #FFF9C4, #FFE082); }
.leader-second { background: linear-gradient(135deg, #F5F5F5, #CFD8DC); }
.leader-third  { background: linear-gradient(135deg, #FFF3E0, #FFCC80); }
.leader-pos    { font-size: 1.2rem; min-width: 28px; text-align: center; }
.leader-avatar { font-size: 1.2rem; }
.leader-name   { flex: 1; font-weight: 700; font-size: .95rem; }
.leader-rank   { font-size: 1rem; }
.leader-pts    { font-size: .85rem; font-weight: 700; color: var(--orange); white-space: nowrap; }


/* ─── Club Dashboard ──────────────────────────────────────── */
.club-dash-hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 16px 16px; gap: 8px;
}
.club-dash-emoji   { font-size: 4rem; line-height: 1; }
.club-dash-members { font-size: 1rem; font-weight: 600; color: var(--muted); margin: 0; }
.club-dash-stats   { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.club-dash-stat-card {
  background: #f6fdf9; border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  font-size: 1rem; font-weight: 700; color: #1a5c35;
  min-height: 48px;
}
.club-dash-stat-card:empty { display: none; }
.club-dash-actions { padding: 8px 16px; }


/* ═══════════════════════════════════════════════════════════════
   TAB BAR — 3 עוגני ניווט
   🏘️ המועדונים  /  📖 מי קורא?  /  🏠 הבית שלי
   מוצג כשיש מועדון פעיל במכשיר (body.nav-visible)
═══════════════════════════════════════════════════════════════ */

.booki-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  min-height: 62px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: none;
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
  background: linear-gradient(180deg, #FFFDF4 0%, #FFF6E0 100%);
  border-top: none;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 22px rgba(38,53,77,.14), inset 0 1px 0 rgba(255,255,255,.7);
  z-index: 200;
  backdrop-filter: blur(8px);
}

/* ─── Teacher Auth ──────────────────────────────────────────────── */
.auth-container { padding: 24px 20px; max-width: 360px; margin: 0 auto; }
.teacher-auth-intro { display:flex;flex-direction:column;gap:5px;text-align:center;margin:0 0 18px;padding:16px;border-radius:18px;background:#eef8f1;color:#285f3d; }
.teacher-auth-intro strong { font-size:1.18rem; }.teacher-auth-intro span,.auth-mode-help{font-size:.86rem;line-height:1.55;color:var(--muted);}
.auth-mode-title{text-align:center;font-size:1.08rem;font-weight:900;margin-bottom:3px}.auth-mode-help{text-align:center;margin:0 0 12px}
.auth-icon { font-size: 3.5rem; text-align: center; margin-bottom: 16px; }
.auth-form  { display: flex; flex-direction: column; gap: 14px; }
.auth-tabs  { display: flex; gap: 8px; margin-bottom: 4px; }
.auth-tab   { flex: 1; padding: 10px; border: 2px solid var(--green); border-radius: 10px; background: #fff; color: var(--green); font-size: .95rem; cursor: pointer; font-weight: 700; font-family: inherit; }
.auth-tab.active { background: var(--green); color: #fff; }
.auth-error { color: var(--red); font-size: .85rem; min-height: 1.2em; text-align: center; }
.auth-error.encourage-success { color: var(--booki-green); font-weight: 800; }
.auth-remember { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.auth-show-password { display:flex;align-items:center;gap:8px;font-size:.86rem;color:var(--muted);cursor:pointer;margin-top:-7px; }
.auth-status { color: var(--booki-green); font-size: .88rem; font-weight: 800; min-height: 1.2em; text-align: center; }
.auth-forgot-link { align-self: center; border: 0; background: none; color: #315ea8; font-size: .92rem; font-weight: 700; font-family: inherit; text-decoration: underline; cursor: pointer; padding: 4px 10px; }
.auth-first-time-heading { padding: 12px 14px; border-radius: 14px; text-align: center; background: linear-gradient(135deg, #fff8d9, #fff0a8); border: 2px solid #f1c40f; color: #684c00; font-weight: 900; line-height: 1.45; }
.auth-first-account { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; margin-top: 8px; padding: 18px 16px 15px; border: 3px solid #f1c40f; border-radius: 18px; background: linear-gradient(135deg, #fffdf1, #fff3b8); color: #4e3b00; cursor: pointer; font-family: inherit; box-shadow: 0 7px 20px rgba(241,196,15,.22); }
.auth-first-account strong { font-size: 1.08rem; }
.auth-first-account > span:last-child { font-size: .85rem; font-weight: 700; color: #7b650b; }
.auth-first-account:active { transform: scale(.985); }
.auth-new-badge { position: absolute; top: -12px; right: 14px; padding: 3px 10px; border-radius: 999px; background: #f1c40f; color: #513d00; font-size: .76rem; font-weight: 900; }

/* בית הילד 2026 — פעולה אחת בלבד. רכיבי הקונסולה הישנים נשמרים ב-DOM לתאימות
   עם לוגיקת הנתונים, אך אינם מוצגים ואינם תופסים מקום. */
#screen-main .home-console-wrap { justify-content: flex-start; padding: 2px 20px 18px; }
#screen-main .home-console-stage { margin-top: 0; }
#screen-main .home-console-char { width: min(55vw, 220px) !important; }
#screen-main .home-speech-bubble { width: min(100%, 340px); margin-top: -16px; padding: 16px 22px; }
#screen-main .home-speech-bubble .home-encouragement { font-size: 1.12rem; font-weight: 900; }
.home-start-reading { width: min(100%, 390px); display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; padding: 20px 18px; border: 0; border-radius: 24px; background: linear-gradient(160deg,#43dd7c,#10a84a); color:#fff; font: 900 1.35rem Arial,sans-serif; box-shadow: 0 8px 0 #0d873c,0 15px 25px rgba(16,168,74,.3); cursor:pointer; }
.home-start-reading:active { transform: translateY(4px); box-shadow: 0 4px 0 #0d873c,0 9px 18px rgba(16,168,74,.25); }
.home-start-play { direction:ltr; font-size:1.55rem; }
.home-start-hint { margin: 16px 0 0; color:var(--booki-text); font-size:.83rem; font-weight:800; text-align:center; }
#screen-main .home-shelf-card,#screen-main .home-progress-panel,#screen-main .console-frame,#screen-main .home-shop-teaser,#screen-main .home-achievement-card,#screen-main > .btn-footer-link { display:none !important; }

.home-class-goal {
  width:min(100%,390px); box-sizing:border-box; display:flex; align-items:center; gap:11px;
  margin:18px 0 0; padding:13px 14px; border:1px solid #bfdcc7; border-radius:20px;
  background:rgba(255,255,255,.9); color:var(--booki-text); text-align:right;
  box-shadow:0 7px 18px rgba(38,92,57,.11); font-family:Arial,sans-serif; cursor:pointer;
}
.home-class-goal-tree { display:grid; place-items:center; width:48px; height:48px; flex:0 0 48px; border-radius:15px; background:#e7f6e9; font-size:1.75rem; }
.home-class-goal-body { min-width:0; flex:1; display:grid; gap:6px; }
.home-class-goal-topline { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.home-class-goal-topline strong { font-size:.98rem; }
.home-class-goal-topline b { color:#277642; font-size:.72rem; white-space:nowrap; }
.home-class-goal-track { height:8px; overflow:hidden; border-radius:999px; background:#e4ece5; }
.home-class-goal-track i { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#39bd69,#8bcf55); transition:width .35s ease; }
.home-class-goal-body small { color:var(--muted); font-size:.72rem; font-weight:700; }
.home-class-goal-arrow { color:#277642; font-size:1.1rem; font-weight:900; }

.class-library-body,.teacher-stories-groundwork { padding:18px 18px 40px; text-align:center; }
.class-library-hero,.teacher-stories-groundwork { max-width:560px; margin:0 auto; }
.class-library-goal-card { width:100%; max-width:560px; margin:0 auto 20px; padding:18px; display:grid; grid-template-columns:58px 1fr auto; align-items:center; gap:12px; border:0; border-radius:23px; background:linear-gradient(145deg,#dcf5df,#f8fff7); color:var(--booki-text); text-align:right; box-shadow:0 9px 24px rgba(37,113,60,.17); font-family:Arial,sans-serif; }
.class-library-goal-tree { display:grid; place-items:center; width:58px; height:58px; border-radius:18px; background:#fff; font-size:2.2rem; }
.class-library-goal-card > span:nth-child(2) { display:grid; gap:4px; }
.class-library-goal-card strong { font-size:1.12rem; }
.class-library-goal-card small { color:#477356; line-height:1.35; }
.class-library-goal-card b { color:#23703d; font-size:.78rem; white-space:nowrap; }
.class-library-hero { display:flex; align-items:center; justify-content:center; gap:12px; padding:12px 14px; border-top:1px solid #e5e0d5; text-align:right; }
.class-library-hero img { width:76px; height:76px; object-fit:contain; }
.teacher-stories-groundwork img { object-fit:contain; }
.class-library-hero h3,.teacher-stories-groundwork h3 { margin:0 0 3px; font-size:1.02rem; }
.class-library-hero p,.teacher-stories-groundwork p { margin:0; color:var(--muted); line-height:1.45; font-size:.82rem; }
.active-class-stories{display:grid;gap:9px;margin:12px auto;max-width:560px}.active-story-card{display:flex;align-items:center;gap:10px;width:100%;padding:11px 13px;border:1px solid #e7dfc5;border-radius:16px;background:#fffdf6;box-shadow:none;text-align:right}.active-story-card>span{font-size:1.65rem}.active-story-card div{display:grid;gap:1px}.active-story-card strong{color:#7a681e;font-size:.68rem}.active-story-card b{font-size:.94rem}.active-story-card small{color:var(--muted);font-size:.72rem}
.teacher-stories-live{text-align:right}.story-create-form{display:grid;gap:12px;padding:17px;background:#fff;border:2px solid #e4eee6;border-radius:20px;box-shadow:0 5px 18px rgba(0,0,0,.06)}.story-create-form label{display:grid;gap:6px;font-weight:900}.story-create-form input,.story-create-form textarea{box-sizing:border-box;width:100%;padding:12px;border:2px solid var(--border);border-radius:12px;font:inherit}.story-create-form textarea{min-height:85px;resize:vertical}.teacher-story-list-title{margin-top:26px!important}.teacher-story-card{display:flex;align-items:center;gap:12px;width:100%;margin:9px 0;padding:14px;border:1px solid var(--border);border-radius:16px;background:#fff;text-align:right}.teacher-story-card>span{font-size:2rem}.teacher-story-card div{display:grid;flex:1}.teacher-story-card small{color:var(--muted)}
.story-source-heading{margin-top:4px}.story-source-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}.story-source-choice{padding:12px;border:2px solid var(--border);border-radius:14px;background:#fff;font:800 .9rem inherit}.story-source-choice.active{border-color:var(--green);background:#edf8ef;color:var(--green)}.story-create-form select{box-sizing:border-box;width:100%;padding:12px;border:2px solid var(--border);border-radius:12px;background:#fff;font:inherit}.story-member-count{padding:12px;border-radius:14px;background:#edf6ff;color:#315e8d;font-weight:800}.story-division-plan{display:grid;gap:4px;padding:13px;border-radius:14px;background:#fff7d8}.story-division-plan span,.story-division-plan small{color:var(--muted)}.assigned-story-part{display:grid;gap:8px;margin:15px 0;padding:22px;border:3px dashed #efc94c;border-radius:20px;background:#fff9d9;text-align:center}.assigned-story-part span{color:#866600;font-weight:800}.assigned-story-part strong{font-size:1.45rem;line-height:1.7}.story-retry-note{padding:10px;border-radius:12px;background:#fff0ee;color:#a33;font-weight:800}.review-part-empty{display:grid;place-items:center;width:92px;height:75px;border-radius:10px;background:#f0f2f1;color:var(--muted);font-size:.72rem}.review-part>div b{font-size:.75rem;color:var(--green)}
.story-workshop-body,.teacher-review-body{max-width:620px;margin:auto;padding:20px 16px 90px}.story-opening,.teacher-review-help{padding:16px;border-radius:18px;background:#fff8d8;line-height:1.6}.part-size-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.part-size-grid button{display:grid;place-items:center;gap:5px;min-height:112px;border:2px solid #dce9df;border-radius:20px;background:#fff;font:inherit}.part-size-grid span{font-size:2rem}.handwriting-guide{display:grid;gap:5px;margin:15px 0;padding:15px;border-radius:16px;background:#eef9f1}.story-camera-btn{display:block;padding:18px;border-radius:18px;background:var(--green);color:#fff;text-align:center;font-weight:900;font-size:1.1rem}.story-camera-btn input{position:absolute;opacity:0;pointer-events:none}#class-story-photo-preview img{display:block;width:100%;margin:14px 0;border-radius:14px}.story-submitted{display:grid;place-items:center;text-align:center;padding:40px 15px}.story-submitted span{font-size:4rem}
.teacher-review-help{display:grid;gap:4px;margin-bottom:14px}.review-part{display:grid;grid-template-columns:92px 1fr;gap:11px;margin:12px 0;padding:12px;border:2px solid var(--border);border-radius:16px;background:#fff}.review-part.approved{border-color:#68bf7b}.review-part.rejected{opacity:.6}.review-part img{width:92px;height:75px;object-fit:cover;border-radius:10px}.review-part>div{display:grid}.review-part small{color:var(--muted)}.review-actions{grid-column:1/-1;display:flex;gap:6px}.review-actions button{flex:1;padding:8px 4px;border-radius:10px;background:#edf6ef;font-weight:800}.published-story-book{max-width:760px;margin:auto;padding:24px 16px}.published-story-book header{text-align:center;padding:28px;border-bottom:2px solid #ddd}.published-story-book h1{font-size:2.2rem}.published-story-book figure{margin:26px auto;page-break-inside:avoid;text-align:center}.published-story-book img{max-width:100%;max-height:70vh;object-fit:contain}.published-story-book figcaption{font-weight:800;color:var(--muted)}
@media print{body{background:#fff!important}.screen{display:none!important}#screen-published-class-story{display:block!important}.no-print,.booki-nav,.btn-bug-report,.btn-niqud-toggle,.app-copyright{display:none!important}.published-story-book{max-width:none;padding:0}.published-story-book figure{page-break-after:always}.published-story-book img{max-height:85vh}}
.class-story-shelf { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.class-story-book { background:rgba(255,255,255,.76); border:1px solid #e8e2d6; border-radius:15px; padding:11px; box-shadow:none; display:flex; flex-direction:column; gap:4px; }
.class-story-cover { min-height:62px; display:grid; place-items:center; border-radius:10px; background:#f4f2e9; font-size:2rem; }
.class-story-book span { color:var(--muted); font-size:.78rem; }
.class-story-empty { margin:12px auto; padding:15px; border:1px dashed #d9cfbd; border-radius:16px; background:rgba(255,255,255,.55); display:flex; flex-direction:column; gap:5px; }
.class-story-empty > span { font-size:1.8rem; }.class-story-empty p { margin:0;color:var(--muted);font-size:.78rem; }
@media (max-width:430px) {
  .class-library-goal-card { grid-template-columns:50px 1fr; padding:14px; }
  .class-library-goal-tree { width:50px; height:50px; font-size:1.9rem; }
  .class-library-goal-card > b { grid-column:2; }
}
.class-progress-link { border:0;background:none;color:#315ea8;font:800 .9rem Arial,sans-serif;text-decoration:underline;cursor:pointer; }
.feature-coming-badge { margin-inline-start:auto;background:#fff0a8;color:#684c00;border-radius:999px;padding:4px 9px;font-size:.72rem;font-weight:900; }
.story-status-preview { display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin:20px 0; }
.story-status-preview span { padding:10px;border-radius:12px;background:#f5f1e8;font-size:.82rem;font-weight:800; }
.teacher-step-help { margin:0 0 14px;padding:12px 14px;border-radius:12px;background:#eef8f1;color:#285f3d;font-size:.88rem;font-weight:700;line-height:1.5; }
.tc-share-panel { grid-template-columns:1fr auto;gap:8px;align-items:center;background:#fff8d9;border:2px solid #f1c40f;border-radius:18px;padding:14px;margin-bottom:14px; }
.tc-share-panel > div { display:flex;flex-direction:column;gap:3px;text-align:right; }.tc-share-panel > div span{font-size:.78rem;color:#6f6131;}
.tc-share-panel button { border:0;border-radius:12px;background:#1fad58;color:#fff;padding:10px 12px;font-family:inherit;font-weight:900;cursor:pointer; }
.tc-share-panel .tc-copy-link { grid-column:2;background:#fff;color:#315ea8;border:1px solid #9db4d9; }
.tc-share-feedback{grid-column:1/-1}.tc-save-guide{grid-column:1/-1;text-align:right;border-top:1px solid rgba(104,76,0,.18);padding-top:10px}.tc-save-guide summary{cursor:pointer;font-weight:900;color:#684c00}.tc-save-guide div{padding-top:7px}.tc-save-guide p{margin:7px 0;font-size:.82rem;line-height:1.55;color:#574d2c}.tc-save-guide .tc-web-note{background:#fff;border-radius:12px;padding:10px;color:#315ea8}
.tc-save-guide-row{grid-column:1/-1;display:grid;grid-template-columns:1fr auto;gap:9px;align-items:start;border-top:1px solid rgba(104,76,0,.18);padding-top:10px}.tc-save-guide-row .tc-save-guide{grid-column:auto;border-top:0;padding-top:4px}.tc-copy-guide{white-space:nowrap;background:#315ea8!important;padding:9px 11px!important;font-size:.78rem}@media(max-width:390px){.tc-save-guide-row{grid-template-columns:1fr}.tc-copy-guide{width:100%}}
.tc-share-feedback { grid-column:1/-1;min-height:1.1em;color:#285f3d;font-size:.78rem;font-weight:800; }
.teacher-dashboard-guide { display:flex;flex-direction:column;gap:4px;margin-bottom:14px;padding:14px 16px;border-radius:16px;background:#eef8f1;color:#285f3d; }.teacher-dashboard-guide span{font-size:.82rem;line-height:1.5;}
.teacher-management-only{display:flex;flex-direction:column;gap:3px;margin-bottom:12px;padding:12px 14px;border:1px solid #c8d7ef;border-radius:14px;background:#f2f6fc;color:#315783}.teacher-management-only span{font-size:.8rem;line-height:1.5}
.btn-td-primary{width:100%;border:0;border-radius:18px;padding:16px;background:linear-gradient(135deg,#20b85c,#128d45);color:#fff;font:900 1rem inherit;box-shadow:0 7px 18px rgba(31,173,88,.24);cursor:pointer}.td-section-title{font-size:1rem;margin:22px 2px 10px;color:var(--text)}

/* ─── Teacher Dashboard ──────────────────────────────────────────── */
.td-subtitle   { font-size: .9rem; color: var(--muted); text-align: center; margin: 0; padding: 4px 0 8px; }
.btn-logout    { background: none; border: 1.5px solid var(--muted); color: var(--muted); border-radius: 8px; padding: 6px 12px; font-size: .8rem; cursor: pointer; font-family: inherit; }
.td-body       { padding: 16px; }
.td-clubs-list { display: flex; flex-direction: column; gap: 14px; }
.td-empty      { text-align: center; padding: 40px 20px; color: var(--muted); }
.td-empty p    { margin-bottom: 20px; }
.td-loading    { text-align: center; color: var(--muted); padding: 20px; }
/* "יצירת מועדון חדש" — secondary, unobtrusive */
.btn-td-secondary {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 12px 18px; margin-bottom: 18px;
  background: none; border: 2px dashed #ccc; border-radius: 14px;
  color: #888; font-size: .95rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: border-color .15s, color .15s;
}
.btn-td-secondary:hover { border-color: var(--green); color: var(--green); }
/* Club cards — larger, dashboard feel */
.teacher-club-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 2px solid var(--border);
  border-radius: 20px; padding: 20px 22px;
  box-shadow: 0 4px 18px rgba(0,0,0,.09);
  cursor: pointer; transition: box-shadow .18s, border-color .18s, transform .12s;
}
.teacher-club-card:hover  { box-shadow: 0 8px 28px color-mix(in srgb, var(--booki-green) 18%, transparent); border-color: var(--booki-green); transform: translateY(-2px); }
.teacher-club-card:active { transform: scale(.98); box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.tc-emoji { font-size: 2.8rem; line-height: 1; flex-shrink: 0; }
.tc-info  { flex: 1; min-width: 0; }
.tc-name  { display: block; font-weight: 900; font-size: 1.1rem; }
.tc-meta  { display: block; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.btn-small { padding: 8px 14px; border-radius: 8px; font-size: .85rem; font-weight: 700; cursor: pointer; border: none; font-family: inherit; }
.btn-tc-delete {
  background: none; border: 1.5px solid #ddd; color: var(--muted);
  border-radius: 8px; padding: 6px 9px; font-size: .9rem;
  cursor: pointer; transition: border-color .15s, color .15s;
  line-height: 1;
}
.btn-tc-delete:hover { border-color: var(--red); color: var(--red); background: #fff0ee; }

/* ─── Teacher Club Screen ────────────────────────────────────── */
.tc-body { padding: 20px 20px 40px; display: flex; flex-direction: column; gap: 20px; }
.tc-assistant-card{display:flex;flex-direction:column;gap:10px;background:#fff;border:1px solid #dce6df;border-radius:22px;padding:18px;box-shadow:0 5px 18px rgba(41,78,53,.12)}.tc-assistant-badge{align-self:flex-start;background:#fff2ae;color:#684c00;border-radius:20px;padding:5px 10px;font-size:.75rem;font-weight:900}.tc-assistant-card h3{font-size:1.3rem;margin:2px 0 5px}.tc-action-choice{display:flex;align-items:center;gap:12px;width:100%;padding:13px;border:0;border-radius:15px;background:#f3f7f4;color:var(--text);text-align:right;font-family:inherit;cursor:pointer}.tc-action-choice:active{transform:scale(.98)}.tc-choice-icon{font-size:1.65rem}.tc-action-choice>span:last-child{display:flex;flex-direction:column;gap:2px}.tc-action-choice strong{font-size:1rem}.tc-action-choice small{font-size:.78rem;color:var(--muted)}.tc-more-management{border-top:1px solid var(--border);padding-top:12px}.tc-more-management summary{cursor:pointer;text-align:center;color:var(--muted);font-weight:800}.tc-more-management button{display:block;width:100%;margin-top:8px;padding:11px;border:1px solid var(--border);border-radius:12px;background:#fff;font-family:inherit;text-align:right}.tc-more-management small{color:var(--muted)}
.tc-hero { text-align: center; padding: 12px 0 4px; }
.tc-hero-emoji { font-size: 5rem; line-height: 1; }
.tc-class-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 2px solid var(--booki-green);
  border-radius: 18px; padding: 20px 22px;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--booki-green) 15%, transparent);
  cursor: pointer; width: 100%; text-align: right;
  font-family: inherit; transition: box-shadow .18s, transform .12s;
}
.tc-class-card:hover  { box-shadow: 0 6px 24px color-mix(in srgb, var(--booki-green) 25%, transparent); }
.tc-class-card:active { transform: scale(.97); }
.tc-card-icon  { font-size: 3rem; }
.tc-card-text  { display: flex; flex-direction: column; gap: 4px; }
.tc-card-title { font-size: 1.3rem; font-weight: 900; color: var(--text); }
.tc-card-sub   { font-size: .9rem; color: var(--muted); }
.tc-class-card--sm { padding: 12px 16px; border-radius: 14px; box-shadow: none; border-width: 1.5px; }
.tc-class-card--sm .tc-card-icon  { font-size: 2rem; }
.tc-class-card--sm .tc-card-title { font-size: 1.05rem; }
.tc-class-card--sm .tc-card-sub   { font-size: .82rem; }

/* ─── Class Screen / Member List ──────────────────────────────── */
.class-loading { text-align: center; padding: 30px; color: var(--muted); font-size: 1.1rem; }
.class-empty   { text-align: center; padding: 30px; color: var(--muted); }
/* Legacy goal card (kept for backward compat) */
.class-goal-card { margin: 0; background: #fff; border-radius: 16px; padding: 18px 18px 14px; box-shadow: var(--shadow-sm); border: 1.5px solid var(--border); }
.class-goal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.class-goal-label { font-weight: 800; font-size: 1rem; }
.btn-edit-goal { background: none; border: 1.5px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: .8rem; cursor: pointer; color: var(--muted); font-family: inherit; transition: border-color .15s, color .15s; }
.btn-edit-goal:hover { border-color: var(--orange); color: var(--orange); }
.class-goal-nums { font-size: .95rem; margin-bottom: 8px; color: var(--muted); }
.class-goal-nums strong { font-size: 1.4rem; color: var(--text); font-weight: 900; }
.class-goal-track { background: #f0f0f0; border-radius: 99px; height: 12px; overflow: hidden; }
.class-goal-fill { background: linear-gradient(90deg, var(--green2), var(--green)); height: 100%; border-radius: 99px; transition: width .6s ease; }
.class-goal-pct { text-align: left; font-size: .82rem; color: var(--muted); margin-top: 4px; font-weight: 700; }
.class-members-list { padding: 8px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.class-member-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.class-m-avatar { font-size: 1.8rem; flex-shrink: 0; }
.class-m-info   { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.class-m-name   { font-weight: 800; font-size: .95rem; }
.class-m-sub    { font-size: .78rem; color: var(--muted); }
.class-m-stats  { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.class-m-mins   { font-weight: 700; font-size: .85rem; color: var(--green); }

/* ─── Teacher Class Dashboard (tcd-*) — Admin redesign (compact, single hero) ─── */
.tcd-stats-row {
  display: flex; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-sm); padding: 4px; gap: 4px; margin-bottom: 10px;
}
.ui-stat-chip {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 4px; border-radius: 10px;
}
.ui-stat-chip + .ui-stat-chip { border-inline-start: 1px solid var(--border); }
.ui-stat-icon { font-size: 1.1rem; line-height: 1; }
.ui-stat-num  { font-size: 1.05rem; font-weight: 900; color: var(--text); line-height: 1; }
.ui-stat-lbl  { font-size: .68rem; color: var(--muted); font-weight: 600; white-space: nowrap; }

.tcd-goal-card {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 3px 14px color-mix(in srgb, var(--booki-green) 12%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--booki-green) 25%, transparent);
  margin-bottom: 10px;
}
.tcd-goal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.tcd-goal-label { font-weight: 800; font-size: .92rem; color: #1a5c35; }
.tcd-goal-nums  { margin-bottom: 8px; line-height: 1; }
.tcd-goal-done  { font-size: 1.7rem; font-weight: 900; color: #1a5c35; }
.tcd-goal-sep   { font-size: 1rem; color: #4a8c5c; margin: 0 4px; }
.tcd-goal-target { font-size: .92rem; color: #4a8c5c; }
.tcd-progress-track {
  background: rgba(255,255,255,.7); border-radius: 99px;
  height: 10px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.1);
}
.tcd-progress-fill {
  background: linear-gradient(90deg, var(--booki-green), var(--green2));
  height: 100%; border-radius: 99px; transition: width .6s ease;
}
.tcd-goal-pct { text-align: left; font-size: .78rem; color: #2d7a40; margin-top: 5px; font-weight: 700; }

/* מצב מכווץ — כשהיעד עבר לניהול בחנות (שורה אחת, לא כרטיס-הרו מלא) */
.tcd-goal-card-compact {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px;
}
.tcd-goal-hero-link {
  background: none; border: none; color: var(--green); font-family: inherit;
  font-weight: 800; font-size: .85rem; cursor: pointer; white-space: nowrap;
}

/* Quick Actions — מחליף שני כרטיסים מלאים (תצוגה + הודעה) בשורה אחת קומפקטית */
.tcd-quick-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border-radius: 14px; padding: 8px 10px;
  box-shadow: var(--shadow-sm); margin-bottom: 10px;
}
.tcd-qa-view { display: flex; align-items: center; gap: 6px; }
.tcd-qa-view-lbl { font-size: .72rem; color: var(--muted); font-weight: 700; }
.tcd-qa-btn {
  background: #f5f5f5; border: 1.5px solid var(--border); border-radius: 9px;
  width: 32px; height: 32px; font-size: 1rem; cursor: pointer; transition: all .15s;
}
.tcd-qa-btn.active { background: var(--booki-green); border-color: var(--booki-green); box-shadow: 0 2px 6px color-mix(in srgb, var(--booki-green) 30%, transparent); }
.tcd-qa-announce {
  background: none; border: none; color: var(--orange); font-family: inherit;
  font-weight: 700; font-size: .82rem; cursor: pointer; white-space: nowrap;
}
.tcd-announce-composer {
  background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
}

.tcd-leaderboard {
  background: #fff; border-radius: 16px; padding: 14px 14px 8px;
  box-shadow: var(--shadow-sm);
}
.tcd-lb-title { font-size: .95rem; font-weight: 900; margin-bottom: 10px; color: var(--text); }
/* Scale: כיתה עם הרבה תלמידים גוללת בתוך פאנל קבוע, לא מותחת את כל הדף */
.tcd-lb-scroll { max-height: 55vh; overflow-y: auto; padding-inline-end: 2px; }
.tcd-member-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 12px; margin-bottom: 6px;
  background: #f9f9f9;
}
.tcd-gold   { background: linear-gradient(135deg, #FFF9C4, #FFE082); }
.tcd-silver { background: linear-gradient(135deg, #F5F5F5, #CFD8DC); }
.tcd-bronze { background: linear-gradient(135deg, #FFF3E0, #FFCC80); }
.tcd-m-pos    { font-size: 1.3rem; min-width: 28px; text-align: center; flex-shrink: 0; }
.tcd-m-avatar { font-size: 1.5rem; flex-shrink: 0; }
.tcd-m-info   { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tcd-m-name   { font-weight: 800; font-size: .95rem; }
.tcd-m-last   { font-size: .75rem; color: var(--muted); }
.tcd-m-stat   { text-align: center; flex-shrink: 0; }
.tcd-m-mins   { font-size: 1.15rem; font-weight: 900; color: var(--green); display: block; line-height: 1; }
.tcd-m-lbl    { font-size: .68rem; color: var(--muted); display: block; }
.tcd-m-delete { background: none; border: none; font-size: 1rem; cursor: pointer; opacity: .35; padding: 4px; border-radius: 6px; flex-shrink: 0; transition: opacity .15s; }
.tcd-m-delete:hover { opacity: 1; }

/* ─── Teacher: Add Student ──────────────────────────────────────────────────── */
.add-student-section {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.btn-add-student-toggle {
  background: none;
  border: 2px dashed var(--green);
  color: var(--green);
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.btn-add-student-toggle:hover { background: color-mix(in srgb, var(--booki-green) 7%, transparent); }
.add-student-form { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.add-student-confirm {
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

/* ─── Mini Personalization (כרטיסי pre_) ──────────────────────────────────── */
.mini-person-card { grid-column: 1 / -1; padding: 8px 0 16px; }

.mini-avatar-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.mini-tab {
  flex: 1; max-width: 160px;
  padding: 9px 12px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #f8f8f8;
  font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.mini-tab.active {
  border-color: var(--booki-green);
  background: color-mix(in srgb, var(--booki-green) 10%, transparent);
  color: var(--booki-green);
}

.mini-person-emojis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 12px 8px 16px;
}
.mini-emoji-btn {
  font-size: 2rem;
  background: none;
  border: 2.5px solid transparent;
  border-radius: 14px;
  padding: 6px 8px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  line-height: 1;
}
.mini-emoji-btn.selected {
  border-color: var(--booki-green);
  background: color-mix(in srgb, var(--booki-green) 12%, transparent);
}
.mini-emoji-btn:hover { border-color: var(--border); }

/* ─── Canvas drawing tool ───────────────────────────────────────────────────── */
.draw-canvas {
  display: block;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid #ddd;
  background: #fff;
  cursor: crosshair;
  max-width: 220px; max-height: 220px;
}
.draw-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 4px 8px;
}
.draw-color-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .12s, border-color .12s;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.draw-color-btn:hover    { transform: scale(1.15); }
.draw-color-btn.active   { border-color: #333; transform: scale(1.2); }
.draw-eraser-btn         { background: #f0f0f0 !important; border-color: #ccc; }
.draw-clear-btn {
  display: block; margin: 8px auto 0;
  background: none; border: 1.5px solid #ddd;
  border-radius: 10px; padding: 5px 16px;
  font-size: .82rem; cursor: pointer; color: #888;
}
.draw-clear-btn:hover { background: #ffeaea; border-color: #e74c3c; color: #e74c3c; }

/* ─── Avatar image (when drawn) ─────────────────────────────────────────────── */
.av-img {
  border-radius: 50%;
  object-fit: cover;
  width: 1em; height: 1em;
  vertical-align: middle;
}
/* _setAvatarEl: img inside parent (descendant selector) */
.greeting-avatar .av-img { width: 2.5rem; height: 2.5rem; }
/* card-avatar: both patterns used — inside element or img itself has the class */
.card-avatar .av-img, .card-avatar.av-img, .card-avatar-wrap .av-img { width: 4rem; height: 4rem; }
/* _avatarHtml: img IS the element with both classes (combined selector, no space) */
.profile-avatar.av-img  { width: 2.4rem; height: 2.4rem; }
.tcd-m-avatar.av-img    { width: 1.6rem; height: 1.6rem; }
.leader-avatar.av-img   { width: 1.4rem; height: 1.4rem; }

.card-avatar-wrap { position: relative; display: inline-block; }
.btn-change-avatar {
  display: block; margin: 8px auto 0;
  background: none; border: 1.5px solid #ddd;
  border-radius: 20px; padding: 4px 14px;
  font-size: .78rem; cursor: pointer; color: #888;
}
.btn-change-avatar:hover { border-color: var(--green); color: var(--green); }

/* ─── Change-avatar modal ───────────────────────────────────────────────────── */
.av-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 16px;
}
.av-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 20px 16px 24px;
  width: 100%; max-width: 360px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
}
.av-modal-close {
  position: absolute; top: 12px; left: 14px;
  background: none; border: none;
  font-size: 1.3rem; cursor: pointer; color: #aaa;
}
.av-modal-title { text-align: center; font-weight: 800; font-size: 1.1rem; margin: 0 0 14px; }

/* ─── כרטיס תלמיד חדש ──────────────────────────────────────────────────────── */
@keyframes cardNewPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--booki-green) 70%, transparent), var(--shadow); }
  60%  { box-shadow: 0 0 0 10px color-mix(in srgb, var(--booki-green) 0%, transparent), var(--shadow); }
  100% { box-shadow: var(--shadow); }
}
.card-new-highlight {
  outline: 2.5px solid var(--green);
  outline-offset: 2px;
  animation: cardNewPulse 1.4s ease-out 2;
}


body.nav-visible .booki-nav { display: flex; }

/* מסכים מרוחקים מהתחתית כשה-Tab Bar מוצג */
body.nav-visible .screen { padding-bottom: calc(142px + env(safe-area-inset-bottom)); }

/* ─── כפתור Tab — פילה עגולה עם הצבעים הרוויים של קונסולת הבית (עקביות
   חזותית עם הכפתורים שעוצבו מחדש), לא עוד קו-מחוון דק על רקע אפור שטוח ─── */
.booki-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 4px;
  border-radius: 18px;
  transition: background .18s ease, transform .12s ease, color .18s ease;
  position: relative;
  color: var(--booki-muted, var(--muted));
}
.booki-tab:hover  { background: color-mix(in srgb, var(--booki-yellow, #F3BE45) 12%, transparent); }
.booki-tab:active { transform: scale(.93); }

.btab-icon  { font-size: 1.3rem; line-height: 1; transition: transform .18s ease; }
.btab-label { font-size: .62rem; font-weight: 800; letter-spacing: .01em; }

/* טאב פעיל — פילה צבעונית מלאה (אותה משפחת גרדיאנטים כמו כפתורי הקונסולה) */
.booki-nav[data-tab="home"]  [data-for="home"] {
  background: linear-gradient(160deg, #6EE08A 0%, #14A34A 100%); color: #fff;
  box-shadow: 0 4px 10px rgba(20,163,74,.35);
}
.booki-nav[data-tab="card"]  [data-for="card"] {
  background: linear-gradient(160deg, #FFB25C 0%, #F0502B 100%); color: #fff;
  box-shadow: 0 4px 10px rgba(240,80,43,.32);
}
.booki-nav[data-tab="class"] [data-for="class"] {
  background: radial-gradient(circle at 35% 30%, #7CEEF2 0%, #0B8F97 80%); color: #fff;
  box-shadow: 0 4px 10px rgba(11,143,151,.32);
}
.booki-nav[data-tab="home"]  [data-for="home"]  .btab-icon,
.booki-nav[data-tab="card"]  [data-for="card"]  .btab-icon,
.booki-nav[data-tab="class"] [data-for="class"] .btab-icon { transform: translateY(-1px) scale(1.08); }

/* ═══════════════════════════════════════════════════════════════
   מסך ברוכים הבאים — חד-פעמי
═══════════════════════════════════════════════════════════════ */
.welcome-bg {
  background: linear-gradient(145deg, var(--green) 0%, #1a6b3a 50%, var(--blue) 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}
.welcome-card {
  background: #fff;
  border-radius: 24px;
  padding: 36px 28px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.welcome-wave  { font-size: 3rem; margin-bottom: 4px; }
.welcome-title { font-size: 2rem; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.welcome-sub   { font-size: 1.1rem; font-weight: 700; color: var(--green); margin-bottom: 20px; }
.welcome-body  { text-align: right; line-height: 1.9; color: var(--text); margin-bottom: 28px; font-size: .95rem; }
.welcome-body p { margin-bottom: 8px; }
.btn-welcome-enter {
  display: block; width: 100%;
  padding: 18px;
  background: var(--green); color: #fff;
  border: none; border-radius: 14px;
  font-size: 1.1rem; font-weight: 800;
  cursor: pointer; font-family: inherit;
  transition: background .15s, transform .1s;
}
.btn-welcome-enter:hover  { background: var(--green2); transform: translateY(-2px); }
.btn-welcome-enter:active { transform: scale(.98); }

/* ═══════════════════════════════════════════════════════════════
   כפתור דיווח באג + קרדיט
═══════════════════════════════════════════════════════════════ */
.btn-bug-report {
  position: fixed;
  bottom: calc(70px + env(safe-area-inset-bottom)); left: 12px;
  background: rgba(255,255,255,.92);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 7px 12px;
  font-size: .75rem; font-weight: 700;
  color: var(--muted);
  cursor: pointer; font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
  z-index: 300;
  backdrop-filter: blur(4px);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-bug-report:hover { background: #fff; color: var(--text); }
body:not(.nav-visible) .btn-bug-report { bottom: calc(14px + env(safe-area-inset-bottom)); }

/* כפתור הנגשת ניקוד — קומפקטי ועגול (לא פס טקסט רחב) כדי לא להפריע במסכים
   צרים/מלאי-תוכן במובייל; מודגש (רקע זהב) כשהניקוד פעיל. אותה פינה כמו קודם
   (ימין-תחתונה) — מראה כפתור דיווח-הבאג (שמאל-תחתונה), בלי התנגשות ביניהם. */
.btn-niqud-toggle {
  position: fixed;
  bottom: calc(70px + env(safe-area-inset-bottom)); right: 12px;
  width: 40px; height: 40px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
  z-index: 300;
  backdrop-filter: blur(4px);
  transition: background .15s, border-color .15s, transform .12s;
}
.btn-niqud-toggle:active { transform: scale(.93); }
.btn-niqud-toggle.niqud-active {
  background: var(--booki-yellow, #F3BE45); border-color: transparent;
}
.niqud-toggle-marks { font-size: .58rem; font-weight: 700; letter-spacing: -1px; color: var(--muted); line-height: 1; white-space: nowrap; }
.btn-niqud-toggle.niqud-active .niqud-toggle-marks { color: #6b4a00; }
body:not(.nav-visible) .btn-niqud-toggle { bottom: calc(14px + env(safe-area-inset-bottom)); }

.app-copyright {
  position: fixed;
  bottom: 2px; left: 0; right: 0;
  text-align: center;
  font-size: .62rem;
  color: rgba(0,0,0,.22);
  pointer-events: none;
  z-index: 50;
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════
   חנות הכיתה — ניהול פרסים (מורה)
═══════════════════════════════════════════════════════════════ */
.shop-teacher-content { padding: 4px 20px 40px; }

.reward-empty-banner {
  text-align: center;
  background: linear-gradient(145deg, #fff8e1, #fff);
  border: 2px dashed var(--yellow);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--text);
}

/* .reward-card base (still used by student-facing browsing/voting/winner-picker
   cards — reward-card-browse, reward-card-pickable, reward-card-voted, etc.) */
.reward-card {
  position: relative;
  background: var(--card);
  border: 2px solid #ffe9b3;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.reward-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.reward-card-visual { display: flex; align-items: center; justify-content: center; min-height: 56px; }
.reward-card-emoji { font-size: 3rem; line-height: 1; }
.reward-card-img   { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; }
.reward-card-name  {
  font-weight: 800; font-size: .95rem; color: var(--text); line-height: 1.3; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em; /* שתי שורות תמיד — שומר על גובה שורה אחיד בגריד גם עם שמות ארוכים מאוד */
}
.reward-cost-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(145deg, #fff3cd, #ffe082);
  color: #7a5b00;
  border-radius: 20px;
  padding: 4px 12px;
  font-weight: 800; font-size: .95rem;
}

/* ─── Rewards Management — admin list (Redesign) ────────────────────────────── */
.mgmt-toolbar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.mgmt-search-input {
  flex: 2; min-width: 120px; padding: 9px 12px; border-radius: 10px;
  border: 1.5px solid var(--border); font-family: inherit; font-size: .85rem; background: #fff;
}
.mgmt-sort-select {
  flex: 1; min-width: 100px; padding: 9px 8px; border-radius: 10px;
  border: 1.5px solid var(--border); font-family: inherit; font-size: .8rem; background: #fff; color: var(--text);
}
.btn-mgmt-add {
  background: var(--green); color: #fff; border-radius: 10px; padding: 9px 16px;
  font-family: inherit; font-weight: 700; font-size: .85rem; white-space: nowrap;
}

/* Scale: הרשימה גוללת בתוך פאנל בגובה קבוע — 40-50 פרסים לא מותחים את כל הדף */
.mgmt-list-scroll { max-height: 60vh; overflow-y: auto; padding-inline-end: 2px; }

.mgmt-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 8px 10px; margin-bottom: 8px; position: relative;
}
.mgmt-row-inactive { opacity: .55; }
.mgmt-row-winner { font-size: 1.1rem; flex-shrink: 0; }
.mgmt-row-visual { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.mgmt-row-emoji { font-size: 1.6rem; line-height: 1; }
.mgmt-row-img { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.mgmt-row-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: none; border: none; font-family: inherit; text-align: start; cursor: pointer; padding: 0;
}
.mgmt-row-name { font-weight: 700; font-size: .88rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgmt-row-cost { font-size: .78rem; font-weight: 700; color: #b8860b; white-space: nowrap; flex-shrink: 0; }
.mgmt-row-status { font-size: .72rem; font-weight: 700; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.mgmt-row-reorder { display: flex; flex-direction: column; flex-shrink: 0; }
.mgmt-row-reorder button {
  background: none; border: none; font-size: .7rem; color: var(--muted); padding: 1px 4px; line-height: 1.2;
}
.mgmt-row-reorder button:disabled { opacity: .25; }
.mgmt-row-reorder button:not(:disabled):hover { color: var(--orange); }

.mgmt-overflow { position: relative; flex-shrink: 0; }
.mgmt-overflow-btn {
  background: none; border: none; font-size: 1.1rem; color: var(--muted);
  width: 30px; height: 30px; border-radius: 8px;
}
.mgmt-overflow-btn:hover { background: #f5f5f5; }
.mgmt-menu {
  position: absolute; inset-inline-end: 0; top: 34px; z-index: 5;
  background: #fff; border: 1.5px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); min-width: 150px; overflow: hidden;
}
.mgmt-menu button {
  display: block; width: 100%; text-align: start; background: none; border: none;
  padding: 10px 14px; font-family: inherit; font-size: .82rem; font-weight: 600; color: var(--text);
}
.mgmt-menu button:hover { background: #f7f7f7; }
.mgmt-menu-danger { color: var(--red) !important; }

/* ─── Reward editor modal ───────────────────────────────────────────────────── */
.reward-modal-box { max-width: 400px; text-align: right; }
.reward-modal-box .input-field,
.reward-modal-box .textarea-field { margin-bottom: 14px; }
.reward-field-label { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

.reward-modal-emoji-preview {
  text-align: center; font-size: 3.2rem; margin-bottom: 8px;
}
.reward-emoji-grid { margin-bottom: 16px; }

.reward-cost-stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.reward-cost-stepper .reward-cost-input { text-align: center; font-weight: 800; font-size: 1.1rem; }
.reward-cost-stepper button {
  flex-shrink: 0; width: 44px; height: 44px;
  border-radius: 12px; border: 2px solid var(--border);
  background: #fff; font-size: 1.3rem; font-weight: 700; color: var(--text);
}
.reward-cost-stepper button:active { transform: scale(.94); background: #fff8e1; }

.reward-active-row {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 600; color: var(--text);
  margin-bottom: 16px; cursor: pointer;
}
.reward-active-row input { width: 18px; height: 18px; }

.reward-delete-btn {
  display: block; width: 100%; margin-top: 10px;
  background: none; border: none;
  color: var(--red); font-weight: 700; font-size: .9rem;
  padding: 8px; font-family: inherit;
}
.reward-delete-btn:hover { text-decoration: underline; }

/* ─── יעדי הכיתה (Sprint 9 — Task 1/2/3/5) ──────────────────────────────────── */
.goals-card {
  background: var(--card); border: 2px solid var(--border); border-radius: 20px;
  padding: 20px; margin-bottom: 20px;
}
.goals-card h3 { font-size: 1.05rem; margin-bottom: 14px; }
.goals-section { margin-bottom: 16px; }
.goals-section:last-child { margin-bottom: 0; }
.goals-label { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.goals-toggle-group { display: flex; gap: 8px; flex-wrap: wrap; }
.goals-toggle-btn {
  flex: 1; min-width: 140px; padding: 9px 12px; border-radius: 12px;
  border: 2px solid var(--border); background: #fff;
  color: var(--text); font-family: inherit; font-weight: 700; font-size: .82rem;
  transition: all .2s; cursor: pointer;
}
.goals-toggle-btn.active { background: var(--booki-green); border-color: var(--booki-green); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--booki-green) 25%, transparent); }
.goals-toggle-btn:disabled { cursor: default; opacity: .55; }
.goals-toggle-btn:disabled.active { opacity: 1; }
.goals-edit-row { display: flex; align-items: center; gap: 8px; }
.goals-edit-row .input-field { text-align: center; font-weight: 800; flex: 1; min-width: 0; }
.goals-edit-row span { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.btn-small-save {
  padding: 10px 16px; border-radius: 10px; background: var(--green); color: #fff;
  font-family: inherit; font-weight: 700; font-size: .85rem; white-space: nowrap;
}
.goals-progress-line { font-size: .9rem; font-weight: 700; margin-top: 8px; }
.goals-progress-line span { font-weight: 400; color: var(--muted); }
.goals-target-msg { font-size: .8rem; color: var(--muted); min-height: 1.1em; margin-top: 4px; }

/* ─── Goal Settings screen (Redesign) — שורות קומפקטיות, לא כרטיס אחד גדול ──── */
.goal-settings-content { padding: 12px 20px 40px; }
.goals-row {
  background: var(--card); border: 1.5px solid var(--border); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px;
}
.goals-row-label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.goals-row .goals-edit-row { margin-bottom: 0; }

/* Goal Management slider */
.goal-slider-head { text-align: center; margin-bottom: 6px; }
.goal-slider-target-num { font-size: 2rem; font-weight: 900; color: var(--green); line-height: 1; }
.goal-slider-target-lbl { display: block; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.goal-slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 8px; border-radius: 99px; background: #e6e6e6; margin: 14px 0 12px; cursor: pointer;
}
.goal-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--booki-green); border: 3px solid #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--booki-green) 40%, transparent);
}
.goal-slider::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff;
  background: var(--booki-green); box-shadow: 0 2px 8px color-mix(in srgb, var(--booki-green) 40%, transparent);
}
.goal-slider-stats { display: flex; gap: 8px; margin-bottom: 4px; }
.goal-slider-stat {
  flex: 1; text-align: center; background: #f7f7f7; border-radius: 10px; padding: 8px 4px;
}
.goal-slider-stat strong { display: block; font-size: 1.05rem; font-weight: 900; color: var(--text); }
.goal-slider-stat span { display: block; font-size: .68rem; color: var(--muted); margin-top: 2px; }

/* Toggle switch — מחליף שני כפתורים מלאים בפקד דו-מצבי קומפקטי אחד */
.ui-toggle {
  display: flex; background: #f0f0f0; border-radius: 10px; padding: 3px; gap: 2px;
}
.ui-toggle-opt {
  flex: 1; padding: 8px 10px; border-radius: 8px; border: none; background: none;
  color: var(--muted); font-family: inherit; font-weight: 700; font-size: .8rem;
  cursor: pointer; transition: all .15s;
}
.ui-toggle-opt.active { background: var(--booki-green); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--booki-green) 30%, transparent); }

/* כפתור אייקון קטן בכותרת מסך (⚙️ וכד') — לצד btn-back/h2 ב-header-row */
.btn-header-icon {
  background: #f5f5f5; border: 1.5px solid var(--border); border-radius: 10px;
  width: 34px; height: 34px; font-size: 1rem; flex-shrink: 0;
}

/* ─── בחירת היעד הבא — quick-picks (Sprint 9 — Task 4) ──────────────────────── */
.next-goal-picker { margin: 12px 0; text-align: right; }
.next-goal-quick-picks { display: flex; flex-direction: column; gap: 8px; }
.quick-pick-btn {
  padding: 10px 14px; border-radius: 12px; border: 2px solid var(--border); background: #fff;
  color: var(--text); font-family: inherit; font-weight: 700; font-size: .85rem;
  text-align: center; transition: all .2s; cursor: pointer;
}
.quick-pick-btn.active { background: var(--booki-coral); border-color: var(--booki-coral); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--booki-coral) 25%, transparent); }
.next-goal-custom-row { margin-top: 4px; }

/* ─── חנות הכיתה — הפעלה ראשונית + סטטוס יעד (מורה) ────────────────────────── */
.shop-setup-card, .shop-status-card {
  background: linear-gradient(145deg, #fff6e0, #ffedc2);
  border: 2px solid #f4d78a;
  border-radius: 20px;
  padding: 22px 20px;
  margin-bottom: 20px;
  text-align: center;
}
.shop-setup-icon, .shop-status-icon { font-size: 2.4rem; margin-bottom: 6px; }
.shop-setup-card h3, .shop-status-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.shop-setup-card p, .shop-status-card p { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.shop-setup-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.shop-setup-row .input-field { text-align: center; font-weight: 800; font-size: 1.1rem; }
.shop-setup-row span { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.shop-status-nums { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.shop-status-nums span { font-weight: 400; color: var(--muted); font-size: .85rem; }
.shop-status-celebrate {
  background: linear-gradient(145deg, #fff3b0, #ffe37a);
  border-color: var(--gold, #C99A3E);
}
.shop-status-celebrate h3 { font-size: 1.2rem; }
.shop-status-celebrate p { color: #7a5b00; }

/* גרסת חגיגה של רגע-בוקי — כשהיעד הושג */
.shop-booki-moment-celebrate .shop-booki-bubble {
  background: linear-gradient(145deg, #fff3b0, #ffe37a);
  border-color: #e0b84a;
  font-weight: 800;
  font-size: 1rem;
}
.shop-booki-moment-celebrate .shop-booki-face {
  font-size: 2.9rem;
  animation: shopFacePulse 1.1s ease-in-out infinite;
}

/* ─── הצבעה (Milestone 5) ───────────────────────────────────────────────────── */
.shop-status-round {
  font-size: .8rem; font-weight: 700; color: var(--leather, #8B4A2B);
  background: #fff; display: inline-block; padding: 3px 12px; border-radius: 20px; margin-bottom: 10px;
}
.shop-refresh-btn {
  display: block; margin: 10px auto 0; background: none; border: none;
  color: var(--muted); font-size: .8rem; font-family: inherit;
}
.shop-refresh-btn:hover { text-decoration: underline; }
.shop-winner-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 2px solid var(--gold, #C99A3E); border-radius: 20px;
  padding: 6px 16px; font-weight: 800; font-size: 1rem; margin-bottom: 10px;
}

/* אישור הצבעה + כרטיס "כבר הצבעתי" */
.shop-vote-confirmed {
  text-align: center; background: linear-gradient(145deg, #e8f5e9, #d5ecd7);
  border: 2px solid var(--booki-green); border-radius: 16px;
  padding: 12px; margin: 0 0 16px; font-weight: 800; color: var(--booki-green);
}
.reward-vote-btn {
  display: block; width: calc(100% - 24px); margin: 0 12px 14px;
  background: linear-gradient(145deg, var(--green2), var(--booki-green));
  color: #fff; border: none; border-radius: 12px;
  padding: 9px 6px; font-size: .8rem; font-weight: 800; font-family: inherit;
}
.reward-vote-btn:active { transform: scale(.96); }
.reward-vote-btn:disabled { opacity: .6; }
.reward-vote-mine {
  margin: 0 12px 14px; text-align: center; font-size: .82rem; font-weight: 800;
  color: var(--booki-green);
}
.reward-card-voted { border-color: var(--booki-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--booki-green) 18%, transparent); }

/* כרטיס המנצח — מסך תלמיד, אחרי סגירת הצבעה */
.shop-winner-card {
  text-align: center; background: linear-gradient(145deg, #fff3b0, #ffe37a);
  border: 2px solid var(--gold, #C99A3E); border-radius: 20px; padding: 28px 20px; margin-top: 4px;
  position: relative;
}
.shop-winner-emoji { font-size: 4rem; margin-bottom: 8px; }
.shop-winner-img { width: 120px; height: 120px; object-fit: cover; border-radius: 18px; margin-bottom: 10px; }
.shop-winner-name { font-size: 1.2rem; font-weight: 800; color: #5a4520; }
.shop-winner-desc { font-size: .88rem; color: #8a6a1f; margin-top: 6px; }
.shop-winner-badge {
  display: inline-block; background: var(--gold, #C99A3E); color: #fff;
  font-size: .78rem; font-weight: 800; border-radius: 20px; padding: 4px 14px; margin-bottom: 12px;
}

/* Sprint 10 — Part 10: מצב ההצבעה (פתוחה/סגורה), גלוי לתלמיד ולמורה */
.voting-status-banner {
  display: inline-block; margin: 0 auto 14px; padding: 6px 18px; border-radius: 20px;
  font-weight: 800; font-size: .85rem;
}
.voting-status-open   { background: #e1f5e6; color: var(--booki-green); }
.voting-status-closed { background: #fde3e1; color: #a33b2e; }

/* Sprint 10 — Part 2: לוח מחוונים לצפייה בהצבעה (מורה) */
.vote-dash-rewards { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; text-align: right; }
.vote-dash-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow-sm);
}
.vote-dash-visual { font-size: 2rem; flex-shrink: 0; }
.vote-dash-visual .reward-card-img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.vote-dash-info { flex: 1; min-width: 0; }
.vote-dash-name { font-weight: 800; font-size: .92rem; }
.vote-dash-desc { font-size: .75rem; color: var(--muted); margin: 2px 0 6px; }
.vote-dash-count { font-size: 1.3rem; font-weight: 900; color: var(--orange); flex-shrink: 0; min-width: 28px; text-align: center; }

.not-voted-section { margin: 14px 0; text-align: right; }
.not-voted-section h4 { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.not-voted-row { font-size: .88rem; padding: 4px 0; color: var(--text); }

/* Sprint 10 — Part 3: בחירת זוכה (מורה) — כרטיסים לחיצים, ברירת מחדל מודגשת */
.winner-pick-shelf { margin: 16px 0; }
.reward-card-pickable { cursor: pointer; }
.reward-card-picked { border-color: var(--gold, #C99A3E); box-shadow: 0 0 0 3px rgba(201,154,62,.25); }
.winner-suggested-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--gold, #C99A3E); color: #fff; font-size: .68rem; font-weight: 800;
  border-radius: 20px; padding: 2px 10px;
}

/* Sprint 10 — Part 10: תג קבוע על הפרס שזכה, בלוח ניהול הפרסים של המורה */
.class-winner-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--gold, #C99A3E); color: #fff; font-size: .68rem; font-weight: 800;
  border-radius: 20px; padding: 3px 10px;
}

/* Sprint 10 — Part 4: הזוכה נשאר גלוי בעיון הרגיל של התלמיד/ה עד המחזור הבא */
.last-winner-callout {
  text-align: center; background: linear-gradient(145deg, #fff9e6, #fff3cc);
  border: 2px solid var(--gold, #C99A3E); border-radius: 16px;
  padding: 10px; margin: 0 0 16px; font-weight: 800; color: #7a5c00; font-size: .92rem;
}

/* הודעת "הגענו ליעד / החנות נפתחה" — modal חד-פעמי, לא כרטיס קבוע בגוף המסך */
.shop-celebration-overlay {
  display: none; /* JS עובר ל-flex דרך _reconcileHomeBanners כשזה "זוכה" בעדיפות */
  position: fixed; inset: 0; z-index: 520;
  background: rgba(38,53,77,.42);
  align-items: center; justify-content: center;
  padding: 20px;
}
.shop-celebration-modal {
  position: relative; overflow: hidden;
  width: 100%; max-width: 340px;
  padding: 22px 20px calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  background: linear-gradient(135deg, #FFE082, #FFCA28);
  border-radius: 28px; box-shadow: var(--booki-shadow, var(--shadow));
}
.shop-celebration-stage { position: relative; z-index: 1; margin-bottom: 4px; }
.shop-celebration-stage .booki-character-stage { min-height: auto; }
.shop-celebration-stage .booki-character-stage > img { width: min(46vw, 180px); }
.shop-celebration-modal h3 { position: relative; z-index: 1; font-size: 1.25rem; font-weight: 900; color: #6b4a00; margin-bottom: 6px; }
.shop-celebration-modal p  { position: relative; z-index: 1; font-size: .92rem; color: #7a5c00; margin-bottom: 16px; line-height: 1.5; }
.shop-celebration-numbers { font-weight: 800; font-size: 1rem; }

/* הודעות (מפושט) — באנר חד-פעמי בעמוד הבית, בלי תיבה/מסך/thread */
.booki-message-banner {
  display: flex; align-items: center; gap: 8px;
  width: calc(100% - 32px); margin: 0 16px 14px;
  background: linear-gradient(135deg, #EBF5FB, #D6EAF8); border: 2px solid var(--blue2);
  border-radius: 16px; padding: 8px 14px; font-family: inherit;
}
.booki-message-banner-stage { flex-shrink: 0; }
.booki-message-banner-stage .booki-character-stage { min-height: auto; display: flex; }
.booki-message-banner-stage .booki-character-stage::before { display: none; }
.booki-message-banner-char { width: 44px !important; height: auto !important; filter: none !important; animation: none !important; }
.booki-message-banner-text { flex: 1; margin: 0; font-weight: 700; font-size: .9rem; color: var(--blue2); line-height: 1.4; }
.booki-message-banner-close {
  background: none; border: none; font-size: .9rem; color: var(--blue2); opacity: .6;
  flex-shrink: 0; padding: 2px;
}
.booki-message-banner-close:hover { opacity: 1; }

/* Booki mail — exact child-facing language: two small tactile envelopes beside Booki. */
#screen-main #booki-story-recommendations{display:flex!important;position:absolute;z-index:18;top:190px;right:18px;gap:10px;width:auto}
.booki-message-banner.booki-envelope-notice{position:absolute;z-index:18;top:190px;left:18px;width:112px;height:76px;margin:0;padding:0;border:0;background:linear-gradient(145deg,#fffdf5,#f6e4bf);border-radius:14px;box-shadow:0 8px 18px #7d5b2630;display:grid;place-items:center;cursor:pointer;transform-origin:center}
.booki-recommend-home.booki-envelope-notice{width:112px;height:76px;padding:0;border:0;background:linear-gradient(145deg,#fffdf5,#f6e4bf);border-radius:14px;box-shadow:0 8px 18px #7d5b2630;display:grid;place-items:center;font-size:0;cursor:pointer;position:relative;transform-origin:center}
.booki-envelope-notice::before{content:"";position:absolute;inset:8px;border:2px solid #d8bd86;border-radius:8px;clip-path:polygon(0 0,50% 52%,100% 0,100% 100%,0 100%);background:#fff8e9}
.booki-envelope-notice::after{position:relative;z-index:2;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#fff;box-shadow:0 2px 7px #755b3030;font-size:23px}
.booki-envelope-heart::after{content:"❤️"}.booki-envelope-book::after{content:"📖"}
.booki-envelope-notice:not(.is-open){animation:bookiEnvelopeShake 2.2s ease-in-out infinite}
.booki-envelope-notice:not(.is-open):hover,.booki-envelope-notice:not(.is-open):focus-visible{animation-duration:.8s;outline:3px solid #f1c84a;outline-offset:4px}
.booki-message-banner.booki-envelope-notice .booki-message-banner-text{font-size:0;position:relative;z-index:3}
.booki-message-banner.booki-envelope-notice.is-open{width:min(320px,calc(100vw - 36px));height:auto;min-height:82px;padding:16px;background:#fffaf0;border:2px solid #e8d09c;animation:none}
.booki-message-banner.booki-envelope-notice.is-open::before,.booki-message-banner.booki-envelope-notice.is-open::after{display:none}
.booki-message-banner.booki-envelope-notice.is-open .booki-message-banner-text{font-size:16px;color:#285b46;line-height:1.45}
@keyframes bookiEnvelopeShake{0%,72%,100%{transform:rotate(0) translateY(0)}76%{transform:rotate(-5deg) translateY(-2px)}80%{transform:rotate(5deg) translateY(-2px)}84%{transform:rotate(-4deg)}88%{transform:rotate(4deg)}92%{transform:rotate(0)}}
@media(max-width:420px){#screen-main #booki-story-recommendations{top:185px;right:12px}.booki-message-banner.booki-envelope-notice{top:185px;left:12px}.booki-envelope-notice,.booki-recommend-home.booki-envelope-notice{width:96px!important;height:66px!important}}

/* לב עידוד בטבלת הקוראים — שליחה בלבד, אין יותר "תגובה שלא נקראה" */
.tcd-m-encourage { background: none; border: none; font-size: 1rem; cursor: pointer; opacity: .5; padding: 4px; border-radius: 6px; flex-shrink: 0; transition: opacity .15s; }
.tcd-m-encourage:hover { opacity: 1; }

.encourage-presets { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.encourage-preset-btn {
  padding: 10px 14px; border-radius: 12px; border: 2px solid var(--border); background: #fff;
  color: var(--text); font-family: inherit; font-weight: 700; font-size: .85rem; text-align: right;
  transition: all .2s; cursor: pointer;
}
.encourage-preset-btn.selected { background: var(--blue2); border-color: var(--blue2); color: #fff; }

/* ─── חנות הכיתה — עיון (תלמיד) — "חנות צעצועים קטנה וקסומה" ────────────────── */
.shop-student-content {
  padding: 4px 20px 40px;
  background: linear-gradient(180deg, #fffaf0 0%, #fdf1da 100%);
  border-radius: 24px;
}

/* רגע של בוקי — הבעה + סיפור קטן בן 2-3 שורות קצרות. ציפייה, לא הסבר. */
.shop-booki-moment {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 12px 0 22px;
}
.shop-booki-face {
  font-size: 2.4rem; flex-shrink: 0;
  animation: shopFacePulse 2.6s ease-in-out infinite;
}
@keyframes shopFacePulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.1) rotate(-4deg); }
}
.shop-booki-bubble {
  background: linear-gradient(145deg, #fff6e0, #ffedc2);
  border: 2px solid #f4d78a;
  border-radius: 6px 18px 18px 18px;
  padding: 12px 16px;
  font-size: .95rem; font-weight: 700; color: #5a4520; line-height: 1.6;
  box-shadow: 0 4px 10px rgba(180,130,30,.14);
}

/* המדף — כל כרטיס פרס "יושב" על שפת עץ קטנה, עם צל חם ופינות עגולות וידידותיות */
.reward-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 26px 16px;
  padding: 4px 2px 14px;
}

.reward-card-browse {
  cursor: default;
  background: linear-gradient(180deg, #fffdf7, #fff6df);
  border: 2px solid #f0d9a8;
  border-radius: 20px;
  box-shadow: 0 6px 14px rgba(120,80,20,.14), inset 0 2px 0 rgba(255,255,255,.7);
  position: relative;
  margin-bottom: 8px; /* מקום לשפת המדף שמציצה מתחת */
}
.reward-card-browse:hover { transform: none; }
.reward-card-browse::after {
  /* שפת מדף עץ קטנה מציצה מתחת לכרטיס */
  content: '';
  position: absolute;
  left: 10%; right: 10%; bottom: -7px;
  height: 8px;
  background: linear-gradient(180deg, #dba564, #b57e3d);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 6px rgba(120,80,20,.2);
  z-index: -1;
}

.reward-card-browse .reward-card-visual,
.reward-card-browse .reward-card-name {
  padding-left: 12px; padding-right: 12px;
}
.reward-card-browse .reward-card-visual { padding-top: 18px; }
.reward-card-desc {
  font-size: .78rem; color: var(--muted); text-align: center;
  padding: 0 12px; margin-bottom: 8px; line-height: 1.4;
}

/* תג מחיר קטן — כמו תווית מחיר אמיתית שתלויה על המוצר */
.reward-card-browse .reward-cost-badge {
  position: relative;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #f7c873, #e8a33d);
  color: #5a3400;
  border-radius: 6px 14px 14px 6px;
  transform: rotate(-3deg);
  box-shadow: 0 3px 6px rgba(150,100,30,.3);
}
.reward-card-browse .reward-cost-badge::before {
  content: '';
  position: absolute;
  right: -3px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px;
  background: #fffdf7;
  border-radius: 50%;
  box-shadow: -1px 0 0 rgba(150,100,30,.45);
}

/* שלט עץ קטן — "החנות של בוקי" */
.shop-wood-sign {
  display: inline-block;
  background: linear-gradient(160deg, #c8895a, #a5673a);
  color: #fff8e8;
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 3px 0 rgba(0,0,0,.15), 0 4px 8px rgba(0,0,0,.15);
  transform: rotate(-1.5deg);
  border: 2px solid #8a5a34;
}

/* פינה חמימה — ספרים ונרות עדינים ברקע, לא מתחרים עם המדף עצמו */
.shop-cozy-corner {
  text-align: center; font-size: 1.1rem;
  opacity: .4; letter-spacing: 6px;
  margin-top: 18px;
}

/* ─── אישור כרטיס קורא ───────────────────────────────────────────────────── */
body.reader-confirm-open { overflow: hidden; }
.reader-confirm-overlay {
  position: fixed; inset: 0; z-index: 12000;
  align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(30, 45, 58, .48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.reader-confirm-card {
  width: min(100%, 390px);
  padding: 30px 24px 22px;
  border-radius: 30px;
  background: #fffdf7;
  box-shadow: 0 22px 60px rgba(25, 43, 55, .28);
  text-align: center;
  direction: rtl;
}
.reader-confirm-avatar {
  width: 96px; height: 96px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 50%; background: #edf8e9;
  font-size: 3.6rem;
}
.reader-confirm-avatar .profile-avatar { font-size: 3.6rem; }
.reader-confirm-avatar img.profile-avatar { width: 78px; height: 78px; object-fit: contain; }
.reader-confirm-card h2 { margin: 0 0 8px; color: var(--text); font-size: clamp(1.7rem, 7vw, 2.15rem); }
.reader-confirm-card p { margin: 0 0 24px; color: var(--muted); font-weight: 700; line-height: 1.5; }
.reader-confirm-yes,
.reader-confirm-no {
  width: 100%; min-height: 58px; border-radius: 18px;
  font-family: inherit; font-size: 1.15rem; font-weight: 900; cursor: pointer;
}
.reader-confirm-yes {
  border: 0; background: linear-gradient(180deg, #35d56e, #18b957); color: #fff;
  box-shadow: 0 6px 0 #0b9140, 0 10px 20px rgba(20, 170, 78, .2);
}
.reader-confirm-yes:disabled { opacity: .65; cursor: wait; }
.reader-confirm-no { margin-top: 16px; border: 0; background: transparent; color: #53616b; }
.reader-confirm-yes:focus-visible,
.reader-confirm-no:focus-visible { outline: 4px solid #f7c84a; outline-offset: 4px; }


/* ══ סיפורי מילה אחת — איור גדול + מילה אחת בכל עמוד ═════════════ */
.reader-content.reader-content-illustrated {
  width: min(92vw, 620px);
  margin: 12px auto 4px;
  padding: clamp(16px, 4vw, 26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 4vw, 24px);
  background: linear-gradient(180deg, #fffef8, #fff9e8);
  border: 2px solid rgba(100, 72, 160, .12);
  border-radius: 30px;
  box-shadow: 0 14px 34px rgba(70, 46, 110, .12);
}

.reader-illustration {
  width: min(100%, 420px);
  min-height: clamp(190px, 38vh, 300px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 26px;
  font-size: clamp(7rem, 30vw, 12rem);
  line-height: 1;
  filter: drop-shadow(0 10px 12px rgba(50, 45, 70, .16));
  animation: one-word-illustration-in .36s ease-out both;
}

.reader-illustration[hidden] { display: none; }

.reader-illustration[data-scene="sky"] {
  background: linear-gradient(180deg, #bfe9ff 0 70%, #8ed06c 70% 100%);
}
.reader-illustration[data-scene="sun"] {
  background: linear-gradient(180deg, #fff2a8, #bfe9ff);
}
.reader-illustration[data-scene="grass"],
.reader-illustration[data-scene="garden"] {
  background: linear-gradient(180deg, #c8efff 0 58%, #9ddd76 58% 100%);
}
.reader-illustration[data-scene="rain"] {
  background: linear-gradient(180deg, #cfd9e8, #eaf2f8);
}
.reader-illustration[data-scene="earth"] {
  background: linear-gradient(180deg, #dff2ff 0 55%, #a97955 55% 100%);
}
.reader-illustration[data-scene="home"] {
  background: linear-gradient(145deg, #fff0cf, #f7d7c4);
}
.reader-illustration[data-scene="school"] {
  background: linear-gradient(145deg, #e8f3ff, #fff3c9);
}
.reader-illustration[data-scene="night"] {
  background: radial-gradient(circle at 28% 24%, #fff4a8 0 8%, transparent 9%),
              linear-gradient(180deg, #24345e, #536da0);
}
.reader-illustration[data-scene="celebration"] {
  background: radial-gradient(circle, #fff7b8, #d8f6ff 62%, #b8e48c);
}

.reader-content-illustrated .reader-text {
  width: 100%;
  min-height: 0;
  padding: 8px 12px 4px;
  font-size: clamp(3.2rem, 15vw, 6rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: .02em;
  text-align: center;
  color: #34235f;
  background: transparent;
  border: 0;
  box-shadow: none;
}

@keyframes one-word-illustration-in {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .reader-illustration { animation: none; }
}

/* Completion is a self-contained viewport: summary and return stay together. */
body.session-complete-active{overflow:hidden}
body.session-complete-active .booki-nav,body.session-complete-active .btn-bug-report,body.session-complete-active .btn-niqud-toggle,body.session-complete-active .app-copyright{display:none!important}
#screen-session-complete.active{position:fixed;inset:0;z-index:100;min-height:0;height:100vh;height:100dvh;padding:0!important;overflow:visible}
#screen-session-complete .complete-content{height:100%;max-width:480px;padding:calc(12px + env(safe-area-inset-top)) 20px calc(14px + env(safe-area-inset-bottom));gap:clamp(6px,1.2dvh,12px);justify-content:center}
#screen-session-complete .complete-content>p,#screen-session-complete .complete-title{margin:0;line-height:1.3}
#screen-session-complete .complete-mascot{min-height:0;flex:none;display:grid;place-items:center;width:100%;height:clamp(64px,15dvh,130px);margin:0;padding:0;background:none}
#screen-session-complete .complete-mascot::before{display:none}
#screen-session-complete .complete-mascot>img{position:absolute;inset:0;margin:auto;display:block;width:auto;height:100%;max-height:100%;max-width:100%;object-fit:contain;animation:none}
#screen-session-complete .complete-title{font-size:clamp(26px,4.8dvh,38px)}
#screen-session-complete .complete-sub{font-size:16px}
#screen-session-complete .complete-stats{width:100%;gap:12px}
#screen-session-complete .stat-card{flex:1;min-width:0;padding:10px 12px;gap:2px;border-radius:18px}
#screen-session-complete .stat-icon{font-size:20px;line-height:1.1}
#screen-session-complete .stat-number{font-size:clamp(30px,5dvh,42px);line-height:1.15}
#screen-session-complete .stat-label{font-size:14px;line-height:1.3}
#screen-session-complete .complete-encouragement,#screen-session-complete .complete-tree-msg,#screen-session-complete .complete-msg{font-size:14px}
#screen-session-complete .complete-encouragement:empty{display:none}
#screen-session-complete .complete-bonus-breakdown{flex:none;width:100%;margin:0;padding:9px 12px;gap:3px;font-size:14px;line-height:1.25;border-radius:14px}
#screen-session-complete .complete-bonus-breakdown strong{margin:2px 0 0}
#screen-session-complete .complete-bonus-breakdown small{font-size:13px;line-height:1.25}
#screen-session-complete .levelup-banner{padding:5px 10px;font-size:14px;line-height:1.3}
#screen-session-complete .btn-giant{flex:none;padding:12px 18px;min-height:48px;font-size:17px;line-height:1.3;margin-top:2px}
@media(max-height:700px){
 #screen-session-complete .complete-content{gap:5px;padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:calc(8px + env(safe-area-inset-bottom))}
 #screen-session-complete .complete-mascot{height:60px}
 #screen-session-complete .complete-title{font-size:26px}
 #screen-session-complete .stat-card{padding:7px 10px}
 #screen-session-complete .stat-number{font-size:30px}
 #screen-session-complete .complete-bonus-breakdown{padding:7px 10px;font-size:13px;gap:2px}
 #screen-session-complete .complete-tree-msg,#screen-session-complete .complete-msg{font-size:13px}
}
@media(max-height:480px) and (min-width:600px){
 #screen-session-complete .complete-content{max-width:760px;display:grid;grid-template-columns:1fr 1fr;gap:5px 18px;align-content:center}
 #screen-session-complete .complete-mascot{grid-column:1;grid-row:1/4;height:90px}
 #screen-session-complete .complete-title,#screen-session-complete .complete-sub,#screen-session-complete .levelup-banner{grid-column:2}
 #screen-session-complete .complete-stats{grid-column:1;grid-row:4/6}
 #screen-session-complete .complete-bonus-breakdown{grid-column:2;grid-row:4/8}
 #screen-session-complete .complete-encouragement,#screen-session-complete .complete-tree-msg,#screen-session-complete .complete-msg{grid-column:1}
 #screen-session-complete .btn-giant{grid-column:1/-1}
}
@media(max-height:620px){
 #screen-session-complete .complete-content{gap:4px;padding-inline:16px}
 #screen-session-complete .complete-mascot{height:44px}
 #screen-session-complete .stat-card{padding:4px 8px}
 #screen-session-complete .stat-number{font-size:28px}
 #screen-session-complete .complete-title{font-size:24px}
}

