/* יום-יומי · אפליקציית הלימוד היומי (v20261005)
   ============================================================================
   ★ לשינוי גופנים וצבעים — רק כאן (ובשורת Google Fonts ב-limud-yomi.html) ★
   ============================================================================ */
:root {
  --ly-font-ui: 'Rubik', 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;   /* ממשק */
  /* טקסט הספר: אותו גופן כמו בקורא (assets/css/reader-fonts.css + בחירת הלומד בקורא) */
  --ly-font-text: var(--rd-font-pick, var(--rd-font-default, 'RD Heebo')), 'RD Heebo', 'Heebo', 'Arial Hebrew', Arial, sans-serif;
  --ly-text-size: 1.42rem;                 /* גודל טקסט הלימוד (משתנה בהגדרות) */

  --ly-primary: #E70F57;  --ly-primary-shadow: #B30A43;  --ly-primary-soft: #FDE7EF;   /* צבע האתר */
  --ly-gold: #D4A843;     --ly-gold-shadow: #A9822A;     --ly-gold-soft: #FBF3DF;
  --ly-navy: #15203A;     --ly-navy-shadow: #0A1222;
  --ly-flame: #FF8A00;    --ly-flame-soft: #FFF1DE;
  --ly-green: #2FBF84;    --ly-green-shadow: #1F9264;   --ly-green-soft: #E3F8EF;
  --ly-text: #2B2F3A;     --ly-text-2: #6B7385;  --ly-muted: #AEB4C0;
  --ly-border: #E5E7EB;   --ly-surface: #F6F7F9;  --ly-bg: #FFFFFF;
  --ly-radius: 16px;
  --u: var(--ly-primary); --us: var(--ly-primary-shadow);   /* צבע היחידה (מוחלף לכל יחידה במסלול) */
  --ly-top: 64px;          /* גובה הפס העליון בטלפון */
}

/* ---------- בסיס ---------- */
html, body.ly-body { background: var(--ly-bg); }
body.ly-body { margin: 0; font-family: var(--ly-font-ui); color: var(--ly-text); -webkit-font-smoothing: antialiased; }
.ly-body * { box-sizing: border-box; }
.ly-body button { font-family: inherit; }
.ly-body a { color: inherit; }
.ly-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ly-noanim *, .ly-noanim *::before, .ly-noanim *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .ly-body *, .ly-body *::before, .ly-body *::after { animation: none !important; transition: none !important; } }

/* ---------- כפתור תלת-ממדי ---------- */
.ly-btn { --c: var(--ly-primary); --cs: var(--ly-primary-shadow); appearance: none; border: 0; border-radius: var(--ly-radius);
  padding: 14px 22px; min-height: 50px; font-weight: 700; font-size: 1rem; letter-spacing: .02em; cursor: pointer;
  background: var(--c); color: #fff; box-shadow: 0 4px 0 var(--cs); transition: transform .08s, box-shadow .08s, filter .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; user-select: none; }
.ly-btn:hover { filter: brightness(1.06); }
.ly-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--cs); }
.ly-btn.wide { width: 100%; }
.ly-btn.gold { --c: var(--ly-gold); --cs: var(--ly-gold-shadow); }
.ly-btn.green { --c: var(--ly-green); --cs: var(--ly-green-shadow); }
.ly-btn.navy { --c: var(--ly-navy); --cs: var(--ly-navy-shadow); }
.ly-btn.ghost { background: #fff; color: var(--ly-text-2); border: 2px solid var(--ly-border); box-shadow: 0 3px 0 var(--ly-border); }
.ly-btn.ghost:active { box-shadow: 0 0 0 var(--ly-border); }
.ly-btn.white { background: #fff; color: var(--c); box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.ly-btn[disabled] { background: var(--ly-border); color: var(--ly-muted); box-shadow: none; cursor: default; filter: none; }
.ly-link { background: none; border: 0; color: var(--ly-primary); font-weight: 700; cursor: pointer; font-size: .95rem; padding: 6px; }

/* ---------- מבנה: תפריט צד | מרכז | עמודת כרטיסים ---------- */
.ly-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr) 360px; min-height: 100vh; }
.ly-side { position: sticky; top: 0; height: 100vh; border-inline-start: 2px solid var(--ly-border); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.ly-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.55rem; color: var(--ly-primary); text-decoration: none; padding: 4px 12px 18px; letter-spacing: -.01em; }
.ly-logo small { display: block; font-size: .72rem; color: var(--ly-text-2); font-weight: 600; letter-spacing: 0; }
.ly-nav { appearance: none; background: none; border: 2px solid transparent; border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 14px;
  font-weight: 700; font-size: 1rem; color: var(--ly-text-2); cursor: pointer; text-decoration: none; letter-spacing: .02em; text-align: start; }
.ly-nav:hover { background: var(--ly-surface); }
.ly-nav.on { background: var(--ly-primary-soft); border-color: #F7B4CB; color: var(--ly-primary); }
.ly-nav svg { width: 30px; height: 30px; flex: none; }
.ly-side .sep { flex: 1; }
.ly-main { min-width: 0; display: flex; justify-content: center; padding: 0 20px 120px; }
.ly-col { width: 100%; max-width: 560px; }
.ly-rail { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 18px 22px 30px 18px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1150px) { .ly-shell { grid-template-columns: 88px minmax(0, 1fr) 320px; } .ly-nav span, .ly-logo span { display: none; } .ly-nav { justify-content: center; } }
@media (max-width: 900px) {
  .ly-shell { display: block; }
  .ly-side, .ly-rail { display: none; }
  .ly-main { padding: 0 14px 110px; }
}

/* ---------- פס סטטיסטיקה עליון (רצף · נקודות · ספר) ---------- */
.ly-stats { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ly-stat { appearance: none; background: none; border: 0; border-radius: 12px; padding: 8px 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.05rem; cursor: pointer; color: var(--ly-text-2); }
.ly-stat:hover { background: var(--ly-surface); }
.ly-stat svg { width: 28px; height: 28px; }
.ly-stat.flame { color: var(--ly-flame); } .ly-stat.flame.off { color: var(--ly-muted); }
.ly-stat.xp { color: var(--ly-gold-shadow); }
.ly-stat.book { color: var(--ly-navy); font-size: .9rem; max-width: 46%; }
.ly-stat.book b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-top { display: none; }
@media (max-width: 900px) {
  .ly-top { display: block; position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 2px solid var(--ly-border); padding: 6px 10px; margin: 0 -14px 0; height: var(--ly-top); }
}

/* ---------- סרגל לשוניות תחתון (טלפון) ---------- */
.ly-tabs { display: none; }
@media (max-width: 900px) {
  .ly-tabs { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 2px solid var(--ly-border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .ly-tab { appearance: none; background: none; border: 2px solid transparent; border-radius: 12px; padding: 6px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 700; color: var(--ly-text-2); }
  .ly-tab svg { width: 30px; height: 30px; }
  .ly-tab.on { background: var(--ly-primary-soft); border-color: #F7B4CB; color: var(--ly-primary); }
}

/* ---------- כרטיסי עמודת הצד ---------- */
.ly-box { border: 2px solid var(--ly-border); border-radius: var(--ly-radius); padding: 18px 20px; background: #fff; }
.ly-box h3 { margin: 0 0 12px; font-size: 1.15rem; font-weight: 800; color: var(--ly-text); display: flex; justify-content: space-between; align-items: center; }
.ly-box h3 a, .ly-box h3 button { font-size: .85rem; font-weight: 800; color: var(--ly-primary); text-decoration: none; background: none; border: 0; cursor: pointer; letter-spacing: .03em; }
.ly-box p { margin: 0; color: var(--ly-text-2); line-height: 1.6; }

/* ---------- מסלול ---------- */
.ly-unit { position: relative; margin-bottom: 26px; }
.ly-unit-h { position: sticky; top: 14px; z-index: 20; border-radius: var(--ly-radius); color: #fff; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--u); box-shadow: 0 4px 0 var(--us); margin: 18px 0 10px; }
@media (max-width: 900px) { .ly-unit-h { top: calc(var(--ly-top) + 8px); } }
.ly-unit-h .k { display: block; font-size: .78rem; font-weight: 800; opacity: .85; letter-spacing: .05em; }
.ly-unit-h h2 { margin: 2px 0 0; font-size: 1.22rem; font-weight: 800; line-height: 1.3; }
.ly-unit-h .guide { flex: none; border: 2px solid rgba(255,255,255,.45); border-radius: 14px; padding: 9px 12px; color: #fff; text-decoration: none; font-weight: 800; font-size: .8rem; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 3px 0 var(--us); background: rgba(255,255,255,.08); }
.ly-unit-h .guide svg { width: 20px; height: 20px; }
.ly-path { position: relative; display: flex; flex-direction: column; align-items: center; padding: 18px 0 8px; }
.ly-step { position: relative; height: 96px; display: flex; align-items: center; justify-content: center; width: 100%; }
.ly-node { position: relative; width: 74px; height: 68px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--u); box-shadow: 0 7px 0 var(--us); display: flex; align-items: center; justify-content: center; transition: transform .1s, box-shadow .1s; }
.ly-node:active { transform: translateY(6px); box-shadow: 0 1px 0 var(--us); }
.ly-node svg { width: 38px; height: 38px; color: #fff; }
.ly-node.locked { background: #E5E7EB; box-shadow: 0 7px 0 #C8CCD3; } .ly-node.locked svg { color: #B4BAC5; }
.ly-node.skipped { background: #fff; box-shadow: 0 7px 0 var(--us); border: 4px solid var(--u); } .ly-node.skipped svg { color: var(--u); }
.ly-node.crown { background: var(--ly-gold); box-shadow: 0 7px 0 var(--ly-gold-shadow); }
.ly-step.act { margin-top: 34px; }
.ly-step.chest, .ly-step.trophy { height: 104px; }
.ly-node.chest, .ly-node.trophy { background: none; box-shadow: none; width: 78px; height: 72px; }
.ly-node.chest svg, .ly-node.trophy svg { width: 68px; height: 64px; }
.ly-ring { position: absolute; inset: -12px; border-radius: 50%; border: 7px solid #E9EBEF; pointer-events: none; }
.ly-ring::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 7px solid transparent; border-top-color: var(--u); border-inline-start-color: var(--u); transform: rotate(-20deg); }
.ly-start { position: absolute; top: -50px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--u); border: 2px solid var(--ly-border); border-radius: 12px;
  padding: 8px 14px; font-weight: 800; font-size: .95rem; letter-spacing: .04em; white-space: nowrap; animation: lyBob 1.1s ease-in-out infinite; pointer-events: none; z-index: 3; }
.ly-start::after { content: ''; position: absolute; bottom: -9px; left: 50%; margin-left: -8px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; filter: drop-shadow(0 2px 0 var(--ly-border)); }
@keyframes lyBob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -7px); } }
.ly-mascot-path { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; }
.ly-mascot-path.hop { animation: lyHop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes lyHop { 0% { transform: translateY(-50%) scale(.6); opacity: 0; } 100% { transform: translateY(-50%) scale(1); opacity: 1; } }
.ly-div { display: flex; align-items: center; gap: 14px; color: var(--ly-muted); font-weight: 700; font-size: 1rem; margin: 30px 0 4px; }
.ly-div::before, .ly-div::after { content: ''; flex: 1; height: 2px; background: var(--ly-border); }
.ly-jump { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px 0 0; }
.ly-jump .ly-node { --u: #0F9F8F; --us: #0B7569; }
.ly-jump-b { background: #fff; border: 2px solid var(--ly-border); border-radius: 12px; padding: 6px 12px; color: #0F9F8F; font-weight: 800; font-size: .85rem; letter-spacing: .04em; }

/* בועת שיעור */
.ly-pop { position: absolute; top: 84px; left: 50%; transform: translateX(-50%); width: min(320px, 86vw); z-index: 30; background: var(--u); color: #fff; border-radius: var(--ly-radius);
  padding: 16px 18px 18px; box-shadow: 0 10px 30px rgba(21,32,58,.18); animation: lyPopIn .16s ease-out; }
.ly-pop::before { content: ''; position: absolute; top: -10px; left: 50%; margin-left: -10px; border: 10px solid transparent; border-bottom-color: var(--u); border-top: 0; }
.ly-pop.locked { background: #fff; color: var(--ly-text); border: 2px solid var(--ly-border); }
.ly-pop.locked::before { border-bottom-color: #fff; filter: drop-shadow(0 -2px 0 var(--ly-border)); }
.ly-pop.noarrow::before { display: none; }
.ly-pop h4 { margin: 0 0 4px; font-size: 1.08rem; font-weight: 800; line-height: 1.4; }
.ly-pop p { margin: 0 0 14px; font-size: .9rem; opacity: .9; }
.ly-pop.locked p { color: var(--ly-text-2); }
@keyframes lyPopIn { from { opacity: 0; transform: translate(-50%, -6px) scale(.97); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* ---------- מסך מלא (שיעור / חגיגה / הצטרפות) ---------- */
.ly-full { position: fixed; inset: 0; z-index: 100; background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.ly-full-h { display: flex; align-items: center; gap: 16px; padding: 18px max(16px, calc((100vw - 980px) / 2)) 10px; flex: none; }
.ly-x { appearance: none; border: 0; background: none; color: var(--ly-muted); cursor: pointer; padding: 6px; display: flex; }
.ly-x svg { width: 26px; height: 26px; }
.ly-prog { flex: 1; height: 16px; border-radius: 16px; background: #E9EBEF; overflow: hidden; position: relative; }
.ly-prog i { position: absolute; inset: 0 0 0 auto; width: 0; border-radius: 16px; background: var(--ly-green); transition: width .35s cubic-bezier(.3,1.3,.5,1); }
.ly-prog i::after { content: ''; position: absolute; top: 4px; left: 10px; right: 10px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.35); }
.ly-prog.gold i { background: var(--ly-gold); }
.ly-full-b { flex: 1; overflow: auto; padding: 10px 16px 30px; display: flex; justify-content: center; }
.ly-full-in { width: 100%; max-width: 640px; }
.ly-full-f { flex: none; border-top: 2px solid var(--ly-border); padding: 16px max(16px, calc((100vw - 980px) / 2)) calc(16px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; }
.ly-full-f .ly-btn { min-width: 150px; }
@media (max-width: 560px) { .ly-full-f .ly-btn { flex: 1; } }

/* כרטיסי הקריאה */
.ly-chh { font-size: .95rem; font-weight: 800; color: var(--ly-text-2); margin: 18px 0 6px; letter-spacing: .03em; }
.ly-chh b { color: var(--ly-text); font-size: 1.35rem; display: block; letter-spacing: 0; }
.ly-chh span { display: block; font-family: var(--ly-font-text); font-weight: 500; color: #8A6A1D; font-size: 1.05rem; margin-top: 2px; letter-spacing: 0; }
.ly-subh { font-size: .95rem; font-weight: 800; color: #8A6A1D; margin: 14px 0 4px; }
.ly-card { font-family: var(--ly-font-text); font-size: var(--rd-px, var(--ly-text-size)); line-height: var(--rd-lhu, 2); letter-spacing: var(--rd-ls, 0); color: #15203A; margin: 14px 0; animation: lyCard .28s ease-out; }
.ly-card.past { color: #8C93A3; font-size: calc(var(--rd-px, var(--ly-text-size)) * .82); line-height: 1.9; animation: none; }
.ly-card small { font-size: .8em; color: #4A4F5C; }
.ly-card .n { font-family: var(--ly-font-ui); font-size: .78rem; font-weight: 800; color: #B38A24; margin-inline-end: 6px; vertical-align: 3px; }
@keyframes lyCard { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ly-cheer { position: fixed; bottom: 104px; inset-inline-start: 50%; transform: translateX(50%); display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--ly-border); border-radius: 18px; padding: 8px 16px 8px 10px; box-shadow: 0 8px 24px rgba(21,32,58,.12); z-index: 120; font-weight: 800; color: var(--ly-text); animation: lyCheer 2.2s ease forwards; }
@keyframes lyCheer { 0% { opacity: 0; transform: translate(50%, 20px); } 12%, 82% { opacity: 1; transform: translate(50%, 0); } 100% { opacity: 0; transform: translate(50%, 10px); } }
[dir="rtl"] .ly-cheer { transform: translateX(50%); }

/* ---------- מסכי חגיגה ---------- */
.ly-rw { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 4vh; }
.ly-rw h1 { margin: 14px 0 6px; font-size: 1.9rem; font-weight: 800; color: var(--ly-gold); }
.ly-rw h1.flame { color: var(--ly-flame); } .ly-rw h1.pink { color: var(--ly-primary); } .ly-rw h1.navy { color: var(--ly-navy); }
.ly-rw p.sub { color: var(--ly-text-2); font-size: 1.05rem; margin: 0 0 20px; max-width: 440px; line-height: 1.6; }
.ly-mascot-big { animation: lyJump .7s cubic-bezier(.3,1.7,.5,1); }
@keyframes lyJump { 0% { transform: scale(.4) translateY(40px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.ly-kpis { display: flex; gap: 14px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.ly-kpi { width: 150px; border-radius: var(--ly-radius); border: 2px solid var(--k); overflow: hidden; background: #fff; }
.ly-kpi .t { background: var(--k); color: #fff; font-size: .78rem; font-weight: 800; padding: 6px 4px; letter-spacing: .05em; }
.ly-kpi .v { padding: 14px 6px; font-size: 1.6rem; font-weight: 800; color: var(--k); display: flex; align-items: center; justify-content: center; gap: 6px; }
.ly-kpi .v svg { width: 26px; height: 26px; }
.ly-bigflame { width: 150px; height: 170px; animation: lyFlick 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes lyFlick { 0%,100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.04, .97) rotate(-2deg); } 60% { transform: scale(.97, 1.04) rotate(2deg); } }
.ly-bignum { font-size: 5.4rem; font-weight: 800; color: var(--ly-flame); line-height: 1; margin-top: -8px; }
.ly-week { border: 2px solid var(--ly-border); border-radius: var(--ly-radius); padding: 14px 18px; margin: 18px auto 0; display: inline-block; }
.ly-week-r { display: flex; gap: 10px; justify-content: center; }
.ly-wd { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; color: var(--ly-muted); }
.ly-wd i { width: 34px; height: 34px; border-radius: 50%; background: #E9EBEF; display: flex; align-items: center; justify-content: center; }
.ly-wd i svg { width: 20px; height: 20px; }
.ly-wd.on { color: var(--ly-flame); } .ly-wd.on i { background: var(--ly-flame); color: #fff; }
.ly-wd.rest i { background: var(--ly-gold-soft); color: var(--ly-gold-shadow); }
.ly-wd.frozen i { background: #DCEFFF; color: #2F86C9; }
.ly-wd.today i { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ly-flame); }
.ly-week p { margin: 12px 0 0; color: var(--ly-text-2); font-size: .92rem; border-top: 2px solid var(--ly-border); padding-top: 10px; }
.ly-chest { width: 150px; height: 140px; }
.ly-chest.open { animation: lyShake .5s ease 2; }
@keyframes lyShake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.ly-choices { display: grid; gap: 10px; width: 100%; max-width: 440px; margin: 10px auto; }
.ly-choice { appearance: none; text-align: start; background: #fff; border: 2px solid var(--ly-border); border-radius: var(--ly-radius); box-shadow: 0 3px 0 var(--ly-border); padding: 14px 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 1.02rem; color: var(--ly-text); }
.ly-choice b { font-weight: 800; } .ly-choice span { color: var(--ly-text-2); font-size: .88rem; }
.ly-choice:hover { background: var(--ly-surface); }
.ly-choice.on { background: var(--ly-primary-soft); border-color: #F59CBB; box-shadow: 0 3px 0 #F59CBB; color: var(--ly-primary); }
.ly-choice .ico { flex: none; width: 44px; height: 44px; }

/* בועת דיבור של הקמע */
.ly-say { display: flex; align-items: flex-end; gap: 12px; justify-content: center; margin: 4px 0 22px; }
.ly-bubble { position: relative; background: #fff; border: 2px solid var(--ly-border); border-radius: 18px; padding: 14px 16px; font-weight: 700; font-size: 1.08rem; color: var(--ly-text); max-width: 340px; text-align: start; line-height: 1.55; }
.ly-say > svg.nr { flex: none; }
.ly-bubble::after { content: ''; position: absolute; bottom: 18px; inset-inline-start: -20px; border: 10px solid transparent; border-inline-end-color: var(--ly-border); }
.ly-bubble::before { content: ''; position: absolute; bottom: 20px; inset-inline-start: -15px; border: 8px solid transparent; border-inline-end-color: #fff; z-index: 1; }
.ly-say.big { flex-direction: column-reverse; align-items: center; gap: 18px; margin-top: 6vh; }
.ly-say.big .ly-bubble { text-align: center; font-size: 1.2rem; max-width: 420px; }
.ly-say.big .ly-bubble::after { bottom: -20px; inset-inline-start: calc(50% - 10px); border-color: transparent; border-top-color: var(--ly-border); }
.ly-say.big .ly-bubble::before { bottom: -15px; inset-inline-start: calc(50% - 8px); border-color: transparent; border-top-color: #fff; }
.ly-say.big > svg.nr { animation: lyJump .7s cubic-bezier(.3,1.7,.5,1); }

/* ---------- חלונית (רצף / ספרים) ---------- */
.ly-sheet-bg { position: fixed; inset: 0; background: rgba(21,32,58,.35); z-index: 90; animation: lyFade .15s; }
.ly-sheet { position: fixed; z-index: 91; background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(21,32,58,.25); overflow: hidden; width: min(400px, calc(100vw - 24px));
  top: 70px; inset-inline-end: 24px; animation: lyPopIn2 .18s ease-out; max-height: calc(100vh - 100px); overflow: auto; }
@media (min-width: 901px) { .ly-sheet.center { top: 50%; left: 50%; right: auto; inset-inline-end: auto; translate: -50% -50%; width: min(440px, calc(100vw - 24px)); } }
@media (max-width: 900px) { .ly-sheet { top: auto; bottom: 0; inset-inline-end: 0; width: 100%; border-radius: 22px 22px 0 0; max-height: 85vh; padding-bottom: env(safe-area-inset-bottom); } }
@keyframes lyFade { from { opacity: 0; } } @keyframes lyPopIn2 { from { opacity: 0; transform: translateY(-8px); } }
.ly-sheet-h { background: var(--ly-flame-soft); padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ly-sheet-h h3 { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--ly-flame); }
.ly-sheet-h p { margin: 4px 0 0; color: var(--ly-text-2); }
.ly-sheet-h svg { width: 64px; height: 72px; flex: none; }
.ly-sheet-b { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.ly-row { display: flex; gap: 12px; align-items: center; border: 2px solid var(--ly-border); border-radius: 14px; padding: 12px 14px; }
.ly-row svg { width: 40px; height: 40px; flex: none; }
.ly-row b { display: block; font-weight: 800; } .ly-row span { color: var(--ly-text-2); font-size: .9rem; }
.ly-row .grow { flex: 1; min-width: 0; }

/* ---------- משימות ---------- */
.ly-quest { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.ly-quest + .ly-quest { border-top: 2px solid var(--ly-border); }
.ly-quest svg.qi { width: 42px; height: 42px; flex: none; }
.ly-quest .grow { flex: 1; min-width: 0; }
.ly-quest b { display: block; font-weight: 800; margin-bottom: 8px; }
.ly-qbar { height: 16px; border-radius: 16px; background: #E9EBEF; position: relative; overflow: hidden; }
.ly-qbar i { position: absolute; inset: 0 0 0 auto; background: var(--ly-gold); border-radius: 16px; }
.ly-qbar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; color: #6B5A2A; }
.ly-qbar span { direction: ltr; unicode-bidi: isolate; }
.ly-quest .gift { width: 38px; height: 38px; flex: none; }
.ly-page-h { display: flex; align-items: center; gap: 18px; background: var(--ly-gold-soft); border-radius: 20px; padding: 20px 22px; margin: 18px 0 20px; }
.ly-page-h h1 { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--ly-navy); }
.ly-page-h p { margin: 4px 0 0; color: var(--ly-text-2); }

/* ---------- פרופיל ---------- */
.ly-prof { display: flex; align-items: center; gap: 18px; padding: 24px 0 18px; border-bottom: 2px solid var(--ly-border); }
.ly-avatar { width: 96px; height: 96px; border-radius: 50%; background: var(--ly-primary-soft); color: var(--ly-primary); border: 3px dashed #F59CBB; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 800; flex: none; }
.ly-prof h1 { margin: 0; font-size: 1.6rem; font-weight: 800; }
.ly-prof p { margin: 4px 0 0; color: var(--ly-text-2); }
.ly-sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.ly-sbox { border: 2px solid var(--ly-border); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.ly-sbox svg { width: 30px; height: 30px; flex: none; }
.ly-sbox b { display: block; font-size: 1.25rem; font-weight: 800; } .ly-sbox span { color: var(--ly-text-2); font-size: .85rem; }
.ly-badges { display: grid; gap: 0; border: 2px solid var(--ly-border); border-radius: 16px; overflow: hidden; }
.ly-badge { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.ly-badge + .ly-badge { border-top: 2px solid var(--ly-border); }
.ly-badge .bi { width: 64px; height: 72px; flex: none; }
.ly-badge .grow { flex: 1; min-width: 0; }
.ly-badge b { font-weight: 800; } .ly-badge .grow > span { display: block; color: var(--ly-text-2); font-size: .88rem; margin: 2px 0 8px; }
.ly-h2 { font-size: 1.3rem; font-weight: 800; margin: 26px 0 12px; }

/* ---------- הגדרות ---------- */
.ly-set { border: 2px solid var(--ly-border); border-radius: 16px; overflow: hidden; margin-bottom: 18px; }
.ly-set-r { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.ly-set-r + .ly-set-r { border-top: 2px solid var(--ly-border); }
.ly-set-r b { font-weight: 700; } .ly-set-r span { display: block; color: var(--ly-text-2); font-size: .85rem; margin-top: 2px; }
.ly-sw { position: relative; width: 54px; height: 32px; flex: none; }
.ly-sw input { opacity: 0; width: 0; height: 0; }
.ly-sw i { position: absolute; inset: 0; background: #DADDE3; border-radius: 32px; transition: .2s; cursor: pointer; }
.ly-sw i::before { content: ''; position: absolute; width: 24px; height: 24px; top: 4px; right: 4px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 2px 4px rgba(0,0,0,.15); }
.ly-sw input:checked + i { background: var(--ly-green); }
.ly-sw input:checked + i::before { transform: translateX(-22px); }
.ly-sel { font: inherit; font-weight: 700; border: 2px solid var(--ly-border); border-radius: 12px; padding: 8px 10px; background: #fff; color: var(--ly-text); }

/* ---------- עמוד "אודות" (גם לגוגל) ---------- */
.ly-about { margin: 40px 0 10px; padding: 20px 0 0; border-top: 2px solid var(--ly-border); color: var(--ly-text-2); font-size: .95rem; line-height: 1.8; }
.ly-about h2 { font-size: 1.05rem; color: var(--ly-text); margin: 0 0 6px; }
.ly-about a { color: var(--ly-primary); font-weight: 700; }

/* ---------- קונפטי ---------- */
.ly-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 130; }

/* מצב גודל טקסט */
.ly-size-l { --ly-text-size: 1.65rem; } .ly-size-xl { --ly-text-size: 1.9rem; }

/* הדפסת תעודה */
.ly-cert { border: 6px double var(--ly-gold); border-radius: 16px; padding: 40px 26px; text-align: center; background: #FFFDF6; margin: 20px 0; }
.ly-cert h2 { font-family: var(--ly-font-text); font-size: 2.2rem; margin: 10px 0; }
@media print { .ly-full-h, .ly-full-f { display: none !important; } .ly-full { position: static; } }

/* כמה תגים בבת אחת */
.ly-badges-win { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; animation: lyJump .7s cubic-bezier(.3,1.7,.5,1); }
.ly-badges-win > div { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; font-weight: 800; color: var(--ly-text); }
.ly-badges-win svg { width: 84px; height: 94px; }

/* ---------- בחירת דמות וצלילים (הגדרות) ---------- */
.ly-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ly-charc { appearance: none; background: #fff; border: 2px solid var(--ly-border); border-radius: var(--ly-radius); box-shadow: 0 3px 0 var(--ly-border);
  padding: 12px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; color: var(--ly-text); }
.ly-charc.on { border-color: var(--ly-primary); background: var(--ly-primary-soft); box-shadow: 0 3px 0 #F7B4CB; color: var(--ly-primary); }
.ly-charc svg { width: 64px; height: 75px; }
.ly-sndc { display: flex; align-items: center; gap: 8px; flex: none; }
.ly-play { appearance: none; border: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--ly-primary); color: #fff; font-size: .8rem; cursor: pointer; box-shadow: 0 3px 0 var(--ly-primary-shadow); flex: none; }
.ly-play:active { transform: translateY(3px); box-shadow: none; }

/* ---------- הנפשות של הרב ---------- */
.rv .rv-all { transform-box: view-box; transform-origin: 60px 136px; animation: rvBob 3.2s ease-in-out infinite; }
.rv .rv-beard { transform-box: view-box; transform-origin: 60px 72px; animation: rvBeard 3.2s ease-in-out infinite; }
.rv .rv-wave { transform-box: view-box; transform-origin: 86px 104px; animation: rvWave 1.1s ease-in-out infinite; }
.rv .rv-blink { transform-box: view-box; transform-origin: 60px 60px; animation: rvBlink 4s infinite; }
.rv-cheer .rv-all { animation: rvJump .9s cubic-bezier(.3,1.4,.5,1) 3; }
.rv-sleep .rv-all { animation: rvBreath 3.6s ease-in-out infinite; }
.rv-think .rv-head { transform-box: view-box; transform-origin: 60px 80px; animation: rvTilt 3s ease-in-out infinite; }
.rv-read .rv-head { transform-box: view-box; transform-origin: 60px 80px; animation: rvNod 2.4s ease-in-out infinite; }
@keyframes rvBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes rvBeard { 0%,100% { transform: skewX(0); } 50% { transform: skewX(1.6deg); } }
@keyframes rvWave { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-16deg); } }
@keyframes rvBlink { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes rvJump { 0%,100% { transform: translateY(0) scale(1); } 35% { transform: translateY(-10px) scale(1.02,.98); } 60% { transform: translateY(0) scale(1.03,.96); } }
@keyframes rvBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.015,.985); } }
@keyframes rvTilt { 0%,100% { transform: rotate(0); } 50% { transform: rotate(4deg); } }
@keyframes rvNod { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-3deg) translateY(1px); } }

/* ---------- הנפשות של ספרי (ספר פתוח) ---------- */
.sf .sf-all, .sf .sf-body, .sf .sf-shadow, .sf .sf-ribbon, .sf .sf-blink, .sf .sf-pupil, .sf .sf-wavearm, .sf .sf-wag, .sf .sf-flip,
.sf .sf-scan, .sf .sf-spark, .sf .sf-legs, .sf .sf-b1, .sf .sf-b2, .sf .sf-b3, .sf .sf-z1, .sf .sf-z2, .sf .sf-snore { transform-box: view-box; }
.sf .sf-body { transform-origin: 60px 110px; animation: sfBreath 2.6s ease-in-out infinite; }
.sf .sf-ribbon { transform-origin: 60px 100px; animation: sfRibbon 1.8s ease-in-out infinite; }
.sf .sf-blink { transform-origin: 60px 65px; animation: sfBlink 4.2s infinite; }
.sf .sf-look .sf-pupil { animation: sfLook 6s ease-in-out infinite; }
.sf .sf-wavearm { transform-origin: 112px 68px; animation: sfWave .9s ease-in-out infinite; }
.sf .sf-wag { transform-origin: 112px 68px; animation: sfWag 1.6s ease-in-out infinite; }
.sf .sf-scan .sf-pupil { animation: sfScan 2.6s ease-in-out infinite; }          /* קורא מימין לשמאל */
.sf .sf-flip { transform-origin: 60px 72px; opacity: 0; animation: sfFlip 5.2s ease-in-out infinite; }  /* דף מתהפך משמאל לימין */
.sf-read .sf-flip { animation-duration: 2.6s; }
.sf-cheer .sf-flip { animation-duration: 1.3s; }
.sf .sf-spark { transform-origin: 60px 30px; animation: sfTwinkle 1.2s ease-in-out infinite; }
.sf .sf-b1 { animation: sfPop 2.4s infinite; } .sf .sf-b2 { animation: sfPop 2.4s .3s infinite; } .sf .sf-b3 { animation: sfPop 2.4s .6s infinite; }
.sf .sf-z1 { animation: sfZ 2.6s infinite; } .sf .sf-z2 { animation: sfZ 2.6s 1.3s infinite; }
.sf-cheer .sf-all { transform-origin: 60px 126px; animation: sfJump 1s cubic-bezier(.3,1.5,.5,1) infinite; }
.sf-cheer .sf-shadow { transform-origin: 60px 128px; animation: sfShadow 1s cubic-bezier(.3,1.5,.5,1) infinite; }
.sf-happy .sf-all, .sf-wink .sf-all { transform-origin: 60px 126px; animation: sfHop 3.4s ease-in-out infinite; }
.sf-sleep .sf-body { transform-origin: 60px 118px; animation: sfSleep 3.6s ease-in-out infinite; }
.sf-think .sf-body { animation: sfTilt 3s ease-in-out infinite; }
@keyframes sfBreath { 0%,100% { transform: scale(1,1); } 50% { transform: scale(1.015,.98); } }
@keyframes sfRibbon { 0%,100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes sfBlink { 0%,90%,100% { transform: scaleY(1); } 93% { transform: scaleY(.08); } 96% { transform: scaleY(1); } }
@keyframes sfLook { 0%,30%,100% { transform: translate(0,0); } 38%,52% { transform: translate(-2.2px,0); } 60%,74% { transform: translate(2.2px,-1px); } 82% { transform: translate(0,0); } }
@keyframes sfWave { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-22deg); } }
@keyframes sfWag { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(6deg); } }
@keyframes sfScan { 0% { transform: translateX(2.6px); } 70% { transform: translateX(-2.6px); } 80%,100% { transform: translateX(2.6px); } }
@keyframes sfFlip { 0%,62% { opacity: 0; transform: scaleX(1); } 64% { opacity: 1; transform: scaleX(1); } 74% { opacity: 1; transform: scaleX(.04) skewY(-8deg); } 84% { opacity: 1; transform: scaleX(-1); } 88%,100% { opacity: 0; transform: scaleX(-1); } }
@keyframes sfTwinkle { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.92); } }
@keyframes sfPop { 0%,15% { opacity: 0; } 30%,85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sfZ { 0% { opacity: 0; transform: translate(0,6px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(6px,-10px); } }
@keyframes sfJump { 0%,100% { transform: translateY(0) scale(1.04,.94); } 15% { transform: translateY(0) scale(.96,1.05); } 45% { transform: translateY(-14px) scale(.98,1.03); } 75% { transform: translateY(0) scale(1.05,.93); } }
@keyframes sfShadow { 0%,100%,15%,75% { transform: scale(1); opacity: 1; } 45% { transform: scale(.7); opacity: .6; } }
@keyframes sfHop { 0%,70%,100% { transform: translateY(0); } 78% { transform: translateY(0) scale(1.03,.96); } 86% { transform: translateY(-6px); } 94% { transform: translateY(0) scale(1.02,.98); } }
@keyframes sfSleep { 0%,100% { transform: scale(1); } 50% { transform: scale(1.025,.97); } }
@keyframes sfTilt { 0%,100% { transform: rotate(0); } 50% { transform: rotate(3deg); } }

/* ── ספריית ספרים גדולה: כותרות קטגוריה בבחירת ספר, וחלקים מקופלים במסלול ── */
.ly-cat { font-weight: 800; font-size: .86rem; color: #6B7385; margin: 14px 4px 2px; letter-spacing: .2px; }
.ly-cat:first-child { margin-top: 0; }
.ly-ucol { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; max-width: 420px; margin: 8px auto; padding: 13px 16px; border: 2px solid var(--ly-border); border-radius: 16px; background: #fff; color: var(--ly-text); font: inherit; cursor: pointer; text-align: start; }
.ly-ucol b { font-weight: 800; } .ly-ucol span { color: #8A93A6; font-size: .84rem; font-weight: 700; white-space: nowrap; }
.ly-ucol.done { border-color: #bfe6c9; background: #f4fbf6; } .ly-ucol.done span { color: #1f9d4a; }
.ly-ucol.cur { border-color: #E70F57; } .ly-ucol:hover { background: #fafbfd; }
/* ---------- מעבר ל"הסדר שלי" ---------- */
.ly-mode { display: block; margin: 22px auto 0; max-width: 420px; text-align: center; border: 2px dashed #E9CF98; background: #FBF3DF; border-radius: 16px; padding: 12px 16px; text-decoration: none; color: #15203A; }
.ly-mode b { display: block; } .ly-mode span { font-size: .88rem; color: #6b5a2c; }
a.ly-sederbox { display: block; text-decoration: none; background: #FBF3DF; border-color: #EBD9A8; }
a.ly-sederbox p { color: #6b5a2c; } a.ly-sederbox b { color: #E70F57; display: block; margin-top: 8px; }

/* ---------- פאנל "תצוגה" בשיעור ---------- */
.ly-lesson .ly-full-in { max-width: var(--rd-wu, 640px); }
.ly-aa { flex: none; width: 44px; height: 40px; border-radius: 12px; border: 2px solid var(--ly-border); background: #fff; font: 800 1rem Arial, sans-serif; color: var(--ly-text); cursor: pointer; }
.ly-aa:hover { background: var(--ly-surface); }
[data-just="plain"] .ly-card { text-align: start; }
