/* =====================================================================
   בורסה וירטואלית — עיצוב
   גוף Rubik, כותרות Frank Ruhl Libre. מובייל-first, RTL.
   מצב כהה (ברירת מחדל) + מצב בהיר דרך body.light
   ===================================================================== */

:root {
  --obsidian:   #0A1020;   /* נייבי עמוק — רקע ראשי */
  --onyx:       #111A30;   /* נייבי כרטיסים */
  --onyx-2:     #16223C;   /* משטח מוגבה */
  --line:       #243353;   /* קווי הפרדה עדינים */
  --gold:       #C2A360;   /* זהב מרוסן — חתימת המותג */
  --gold-soft:  #E0C583;   /* הדגשת זהב */
  --emerald:    #5BB58F;   /* רווח — ירוק רגוע */
  --garnet:     #C76B6B;   /* הפסד — אדום מאופק */
  --parchment:  #EAEEF6;   /* טקסט ראשי בהיר קריר */
  --muted:      #8A93A8;   /* טקסט משני */
  --muted-2:    #5C6B85;
  --bar-bg:     rgba(10,16,32,.94);
  --glow-gold:  rgba(194,163,96,.07);
  --glow-green: rgba(91,181,143,.04);
  --shadow:     0 20px 60px rgba(0,0,0,.5);
  --r:          18px;
}

body.light {
  --obsidian:   #F1F3F8;   /* רקע בהיר קריר */
  --onyx:       #FFFFFF;
  --onyx-2:     #F7F9FC;
  --line:       #DDE3EE;
  --gold:       #9C7C32;   /* זהב כהה לקריאות על בהיר */
  --gold-soft:  #C2A360;
  --emerald:    #2E9E6B;
  --garnet:     #C44D4B;
  --parchment:  #16203A;   /* נייבי כהה כטקסט */
  --muted:      #5E6B85;
  --muted-2:    #97A1B5;
  --bar-bg:     rgba(255,255,255,.94);
  --glow-gold:  rgba(156,124,50,.10);
  --glow-green: rgba(46,158,107,.05);
  --shadow:     0 14px 40px rgba(22,32,58,.10);
}

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

html, body {
  background: var(--obsidian);
  color: var(--parchment);
  font-family: "Rubik", system-ui, sans-serif;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}

body {
  min-height: 100dvh;
  background-image:
    radial-gradient(1100px 600px at 80% -10%, var(--glow-gold), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, var(--glow-green), transparent 55%);
}

/* מספרים תמיד LTR עם ספרות מיושרות */
.num {
  font-family: "Rubik", system-ui, sans-serif;
  direction: ltr;
  unicode-bidi: isolate;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.up   { color: var(--emerald); }
.down { color: var(--garnet); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input  { font-family: inherit; }

.app { max-width: 560px; margin: 0 auto; padding: 0 16px 110px; }

/* ---------- כותרת עליונה ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 4px 18px;
}
.brand {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 700; font-size: 26px; letter-spacing: .5px;
  color: var(--parchment);
}
.brand b { color: var(--gold); }
.brand-sub { font-size: 11px; color: var(--muted-2); letter-spacing: 3px; margin-top: 2px; }
.logout {
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  transition: .2s;
}
.logout:hover { color: var(--parchment); border-color: var(--gold); }

.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--gold);
  display: grid; place-items: center; transition: .2s;
}
.icon-btn:hover { border-color: var(--gold); background: rgba(194,163,96,.08); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- כרטיס תיק (חתימת העיצוב) ---------- */
.equity-card {
  position: relative;
  border-radius: var(--r);
  padding: 32px 28px 28px;
  background: linear-gradient(165deg, var(--onyx-2) 0%, var(--onyx) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
/* מסגרת זהב עדינה ומאופקת */
.equity-card::before {
  content: "";
  position: absolute; inset: 0; border-radius: var(--r); padding: 1px;
  background: linear-gradient(140deg, rgba(224,197,131,.45), rgba(194,163,96,.08) 45%, transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

.equity-label { font-size: 11px; color: var(--muted); letter-spacing: 3px; }
.equity-value {
  font-size: 46px; font-weight: 600; line-height: 1.05; margin: 12px 0 8px;
  color: var(--parchment); letter-spacing: -.5px;
}
.equity-delta { font-size: 15px; display: flex; align-items: center; gap: 10px; }
.equity-delta .chip {
  font-size: 11px; padding: 4px 11px; border-radius: 999px;
  background: rgba(255,255,255,.04); color: var(--muted); letter-spacing: .5px;
}
.equity-foot {
  display: flex; justify-content: space-between; margin-top: 24px;
  padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted); letter-spacing: .3px;
}
.equity-foot .num { color: var(--parchment); font-size: 14px; }

/* קו זהב — sparkline */
.spark { width: 100%; height: 46px; margin-top: 20px; display: block; }

/* ---------- כותרת סקשן ---------- */
.section-title {
  font-family: "Frank Ruhl Libre", serif;
  font-size: 21px; font-weight: 700;
  margin: 34px 4px 16px; color: var(--parchment);
}
.section-title small { font-family: "Rubik"; font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: .3px; }

/* ---------- שורת מניה ---------- */
.row {
  display: flex; align-items: center; gap: 14px;
  background: var(--onyx); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
  transition: .18s; cursor: pointer;
}
.row:hover { border-color: rgba(194,163,96,.5); transform: translateY(-1px); }
.row .sym { font-family: "Rubik", sans-serif; font-weight: 700; font-size: 15px; }
.row .name { font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .grow { flex: 1; min-width: 0; }
.row .price { text-align: left; }
.row .price .p { font-size: 15px; }
.row .price .d { font-size: 12px; margin-top: 2px; }

.pill {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--onyx-2), var(--onyx));
  border: 1px solid var(--line);
  font-family: "Rubik", sans-serif; font-weight: 700; font-size: 13px;
  color: var(--gold);
}

/* ---------- מצב ריק ---------- */
.empty {
  text-align: center; color: var(--muted); padding: 40px 20px;
  border: 1px dashed var(--line); border-radius: 16px;
}
.empty b { color: var(--parchment); display: block; margin-bottom: 6px; font-size: 16px; }

/* ---------- חיפוש ---------- */
.search-wrap { position: relative; margin-bottom: 6px; }
.search {
  width: 100%; background: var(--onyx); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 46px 14px 16px; color: var(--parchment);
  font-size: 15px; outline: none; transition: .2s;
}
.search:focus { border-color: var(--gold); }
.search::placeholder { color: var(--muted-2); }
.search-icon { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: var(--muted); }

.preset-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.preset {
  font-family: "Rubik", sans-serif; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  color: var(--parchment); transition: .18s;
}
.preset:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- טבלת מובילים ---------- */
.lb-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px; margin-bottom: 9px;
  background: var(--onyx); border: 1px solid var(--line);
}
.lb-row.me { border-color: var(--gold); background: linear-gradient(150deg, rgba(194,163,96,.12), var(--onyx)); }
.lb-rank {
  width: 30px; text-align: center; font-family: "Rubik", sans-serif;
  font-weight: 700; font-size: 16px; color: var(--muted);
}
.lb-row:nth-child(1) .lb-rank,
.lb-rank.gold { color: var(--gold); }
.lb-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-eq { font-size: 15px; }

/* ---------- ניווט תחתון ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: 560px; margin: 0 auto;
  background: var(--bar-bg);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 0; color: var(--muted-2); font-size: 11px; transition: .18s;
}
.tab.active { color: var(--gold); }
.tab svg { width: 22px; height: 22px; }

/* ---------- מסך מניה (גיליון תחתון) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px); z-index: 40; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-width: 560px; margin: 0 auto;
  background: var(--onyx); border-radius: 24px 24px 0 0;
  border-top: 1.5px solid var(--gold);
  padding: 10px 20px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  max-height: 92dvh; overflow-y: auto;
}
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 42px; height: 4px; background: var(--line); border-radius: 99px; margin: 4px auto 18px; }

.sheet-head { display: flex; align-items: baseline; justify-content: space-between; }
.sheet-sym { font-family: "Rubik", sans-serif; font-weight: 700; font-size: 24px; }
.sheet-name { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sheet-price { font-size: 34px; font-weight: 700; margin: 14px 0 4px; }
.sheet-delta { font-size: 15px; }

.chart-box { width: 100%; height: 150px; margin: 18px 0 8px; }
canvas { width: 100%; height: 100%; display: block; }

.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 14px 0 20px; }
.stat { background: var(--onyx-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat .l { font-size: 11px; color: var(--muted); }
.stat .v { font-size: 15px; margin-top: 4px; }

.holding-note {
  font-size: 13px; color: var(--muted); background: rgba(194,163,96,.07);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
}
.holding-note .num { color: var(--parchment); }

/* קלט כמות + כפתורים */
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.qty-input {
  flex: 1; background: var(--obsidian); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; color: var(--parchment);
  font-family: "Rubik", sans-serif; font-size: 18px; text-align: center; outline: none;
}
.qty-input:focus { border-color: var(--gold); }
.qty-label { font-size: 13px; color: var(--muted); }
.est { text-align: center; font-size: 13px; color: var(--muted); margin: 4px 0 16px; }
.est .num { color: var(--parchment); font-size: 15px; }

.trade-btns { display: flex; gap: 12px; }
.btn {
  flex: 1; padding: 16px; border-radius: 14px; font-size: 16px; font-weight: 700;
  transition: .18s;
}
.btn-buy  { background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: #1A130A; }
.btn-buy:hover  { filter: brightness(1.06); }
.btn-sell { background: transparent; border: 1.5px solid var(--garnet); color: var(--garnet); }
.btn-sell:hover { background: rgba(208,107,107,.1); }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }

.toast {
  position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--onyx-2); border: 1px solid var(--gold);
  color: var(--parchment); padding: 13px 22px; border-radius: 12px; font-size: 14px;
  z-index: 60; opacity: 0; transition: .3s; max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--garnet); }

/* ---------- מסך התחברות ---------- */
.auth-screen {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 28px; text-align: center;
}
.auth-brand { font-family: "Frank Ruhl Libre", serif; font-size: 46px; font-weight: 700; letter-spacing: .5px; }
.auth-brand b { color: var(--gold); }
.auth-tag { color: var(--muted); margin: 14px 0 40px; font-size: 15px; max-width: 320px; line-height: 1.7; }
.auth-card {
  width: 100%; max-width: 370px; background: linear-gradient(165deg, var(--onyx-2), var(--onyx));
  border: 1px solid var(--line); border-radius: 22px; padding: 30px 26px; box-shadow: var(--shadow);
  position: relative; isolation: isolate;
}
.auth-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 22px; padding: 1px;
  background: linear-gradient(140deg, rgba(224,197,131,.4), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.auth-card input {
  width: 100%; background: var(--obsidian); border: 1px solid var(--line);
  border-radius: 12px; padding: 15px 16px; color: var(--parchment);
  font-size: 15px; margin-bottom: 12px; outline: none; transition: .2s;
}
.auth-card input:focus { border-color: var(--gold); }
.auth-card input::placeholder { color: var(--muted-2); }
.auth-btn {
  width: 100%; padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 600;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: #15110A;
  margin-top: 6px; transition: .18s; letter-spacing: .3px;
}
.auth-btn:hover { filter: brightness(1.06); }
.auth-switch { margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-switch button { color: var(--gold); font-weight: 600; }
.auth-err { color: var(--garnet); font-size: 13px; margin-top: 12px; min-height: 18px; }

.auth-divider {
  display: flex; align-items: center; gap: 14px; margin: 22px 0 18px;
  color: var(--muted-2); font-size: 12px;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.google-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border-radius: 12px; background: var(--onyx-2); border: 1px solid var(--line);
  color: var(--parchment); font-size: 15px; font-weight: 500; transition: .2s;
}
.google-btn:hover { border-color: var(--muted); background: var(--onyx); }

.auth-disclaimer {
  max-width: 360px; margin: 18px auto 0;
  font-size: 11px; line-height: 1.6; color: var(--muted-2); text-align: center;
}

.app-disclaimer {
  margin: 32px 4px 8px; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px; line-height: 1.7; color: var(--muted-2); text-align: center;
}

.hidden { display: none !important; }
.skeleton { background: linear-gradient(90deg, var(--onyx) 25%, var(--onyx-2) 50%, var(--onyx) 75%);
  background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 14px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important; }
}

/* ---------- פיזור התיק (לימוד ויזואלי) ---------- */
.alloc-card {
  background: linear-gradient(165deg, var(--onyx-2), var(--onyx));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px 24px; margin-top: 16px; box-shadow: var(--shadow);
}
.alloc-title {
  font-size: 11px; color: var(--muted); letter-spacing: 3px; margin-bottom: 18px;
}
.alloc-body { display: flex; align-items: center; gap: 22px; }
.alloc-ring-wrap { position: relative; width: 116px; height: 116px; flex-shrink: 0; }
.alloc-ring-wrap svg { width: 100%; height: 100%; display: block; }
.alloc-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.alloc-center-num { font-size: 26px; font-weight: 600; color: var(--parchment); line-height: 1; }
.alloc-center-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; letter-spacing: 1px; }

.alloc-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.leg-item { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.leg-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.leg-name { flex: 1; color: var(--parchment); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg-pct { color: var(--muted); font-size: 13px; }

/* שורת אחזקה — קו אחוז ויזואלי */
.sym-line { display: flex; align-items: baseline; gap: 8px; }
.share { font-size: 12px; color: var(--gold); font-weight: 500; }
.alloc-bar {
  height: 4px; border-radius: 99px; background: var(--line);
  margin-top: 8px; overflow: hidden;
}
.alloc-bar span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

/* הבזק כיווני על שווי התיק */
.flash-up { animation: flashUp .9s ease-out; }
.flash-down { animation: flashDown .9s ease-out; }
@keyframes flashUp {
  0% { color: var(--emerald); text-shadow: 0 0 18px rgba(91,181,143,.5); }
  100% { color: var(--parchment); text-shadow: none; }
}
@keyframes flashDown {
  0% { color: var(--garnet); text-shadow: 0 0 18px rgba(199,107,107,.5); }
  100% { color: var(--parchment); text-shadow: none; }
}

/* ---------- שכבת הצלחה ---------- */
.toast.success { border-color: var(--gold); }
.t-check {
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; background: var(--emerald); color: #0B0E14;
  font-size: 13px; font-weight: 700; margin-left: 4px;
}

.celebrate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(6,10,20,.78); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s; padding: 24px;
}
.celebrate.show { opacity: 1; }
.celebrate-card {
  position: relative; width: 100%; max-width: 360px; text-align: center;
  background: linear-gradient(165deg, var(--onyx-2), var(--onyx));
  border: 1px solid var(--line); border-radius: 24px; padding: 38px 28px 28px;
  box-shadow: var(--shadow); overflow: hidden; isolation: isolate;
  transform: scale(.86) translateY(10px); transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.celebrate.show .celebrate-card { transform: scale(1) translateY(0); }
.celebrate-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 24px; padding: 1.5px;
  background: linear-gradient(140deg, var(--gold-soft), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.celebrate-icon { font-size: 60px; line-height: 1; margin-bottom: 16px; animation: pop .5s cubic-bezier(.2,.9,.3,1.4) both; }
.celebrate-title {
  font-family: "Frank Ruhl Libre", serif; font-size: 24px; font-weight: 700;
  color: var(--parchment); margin-bottom: 10px;
}
.celebrate-sub { font-size: 15px; line-height: 1.7; color: var(--muted); margin-bottom: 24px; }
.celebrate-btn { width: 100%; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* קונפטי זהב */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.cf {
  position: absolute; top: -12px; width: 8px; height: 8px; border-radius: 1px;
  opacity: 0; animation-name: fall; animation-timing-function: ease-in; animation-fill-mode: forwards;
}
@keyframes fall {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(420px) rotate(540deg); opacity: 0; }
}

/* ---------- תחרות / ליגות ---------- */
.seg {
  display: flex; gap: 4px; background: var(--onyx); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px; margin: 0 4px 16px;
}
.seg-btn {
  flex: 1; padding: 10px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--muted); transition: .2s;
}
.seg-btn.active { background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: #15110A; }

.season-note { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 14px; letter-spacing: .2px; }

.league-actions { margin-bottom: 18px; }
.join-row { display: flex; gap: 8px; margin-top: 10px; }
.join-row input {
  flex: 1; background: var(--onyx); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; color: var(--parchment); font-size: 15px; outline: none;
  text-align: center; letter-spacing: 3px; text-transform: uppercase;
}
.join-row input:focus { border-color: var(--gold); }
.join-row input::placeholder { letter-spacing: 1px; color: var(--muted-2); }
.btn-ghost {
  padding: 0 20px; border-radius: 12px; border: 1px solid var(--gold);
  color: var(--gold); font-size: 14px; font-weight: 500; transition: .2s;
}
.btn-ghost:hover { background: rgba(194,163,96,.08); }

.league-card {
  display: flex; align-items: center; gap: 12px; background: var(--onyx);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 10px;
  cursor: pointer; transition: .18s;
}
.league-card:hover { border-color: rgba(194,163,96,.5); transform: translateY(-1px); }
.lg-name { font-size: 16px; font-weight: 600; color: var(--parchment); }
.lg-meta { font-size: 12px; color: var(--muted); margin-top: 3px; letter-spacing: .3px; }
.lg-arrow { color: var(--gold); font-size: 22px; }

.league-head { margin: 6px 0 18px; }
.lg-title { font-family: "Frank Ruhl Libre", serif; font-size: 24px; font-weight: 700; color: var(--parchment); }
.lg-code-line { font-size: 13px; color: var(--muted); margin-top: 6px; }
.lg-code-line b { color: var(--gold); letter-spacing: 2px; font-size: 15px; }
.copy-btn {
  font-size: 12px; color: var(--gold); border: 1px solid var(--line);
  border-radius: 8px; padding: 3px 10px; margin-right: 6px; transition: .2s;
}
.copy-btn:hover { border-color: var(--gold); }

/* ---------- מסלול לימוד ---------- */
.learn-head { margin-bottom: 22px; }
.learn-bar {
  height: 8px; border-radius: 99px; background: var(--onyx);
  border: 1px solid var(--line); overflow: hidden;
}
.learn-bar span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transition: width .5s ease;
}
.learn-count { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }

.learn-level {
  font-family: "Frank Ruhl Libre", serif; font-size: 15px; font-weight: 700;
  color: var(--gold); margin: 22px 4px 12px; letter-spacing: .5px;
}

.learn-step {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: var(--onyx); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; margin-bottom: 10px;
  text-align: right; transition: .18s; color: var(--parchment);
}
.learn-step.open { cursor: pointer; }
.learn-step.open:hover { border-color: rgba(194,163,96,.5); transform: translateY(-1px); }
.learn-step.locked { opacity: .45; cursor: not-allowed; }
.learn-step.done { border-color: rgba(79,178,134,.35); }

.learn-icon {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  border: 1.5px solid var(--line); color: var(--muted);
}
.learn-step.done .learn-icon { background: var(--emerald); border-color: var(--emerald); color: #0B0E14; }
.learn-step.open .learn-icon { border-color: var(--gold); color: var(--gold); }
.learn-title { flex: 1; font-size: 15px; font-weight: 500; }
.learn-arrow { color: var(--gold); font-size: 22px; }

/* ---------- מסך שיעור ---------- */
.lesson-modal {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-width: 560px; margin: 0 auto;
  background: var(--onyx); border-radius: 24px 24px 0 0;
  border-top: 1.5px solid var(--gold);
  padding: 10px 24px calc(28px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  max-height: 90dvh; overflow-y: auto;
}
.lesson-modal.open { transform: translateY(0); }
.lesson-level { font-size: 12px; color: var(--gold); letter-spacing: 2px; margin-top: 6px; }
.lesson-title {
  font-family: "Frank Ruhl Libre", serif; font-size: 24px; font-weight: 700;
  margin: 8px 0 14px; color: var(--parchment);
}
.lesson-body { font-size: 16px; line-height: 1.8; color: var(--parchment); }
.lesson-task {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: rgba(194,163,96,.08); border: 1px solid var(--line);
  font-size: 14px; line-height: 1.6; color: var(--gold-soft);
}
.lesson-btn { margin-top: 22px; width: 100%; }
.lesson-btn2 {
  margin-top: 10px; width: 100%; padding: 14px; border-radius: 14px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font-size: 14px; transition: .18s;
}
.lesson-btn2:hover { border-color: var(--gold); color: var(--gold); }
