.progress-wrap{ padding-top:10px; padding-bottom:60px; display:flex; flex-direction:column; gap:20px; }
.progress-note{ font-size:.8rem; color:var(--text-dim); margin-bottom:14px; line-height:1.8; }

.level-card, .tree-card, .week-card, .share-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); text-align:center;
}
.level-icon{ font-size:3rem; margin-bottom:6px; }
.level-name{ font-family: var(--font-display); font-size:1.4rem; color: var(--gold-bright); margin-bottom:12px; }
.level-bar-wrap{ height:10px; border-radius:6px; background: var(--surface-2); overflow:hidden; margin-bottom:8px; }
.level-bar{ height:100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width .6s ease; }
.level-sub{ font-size:.78rem; color: var(--text-dim); }
.points-breakdown{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px 18px; margin-top:14px; padding-top:14px; border-top:1px dashed var(--border); }
.pb-row{ font-size:.72rem; color: var(--text-dim); display:flex; flex-direction:column; align-items:center; gap:2px; }
.pb-row b{ color: var(--gold-bright); font-size:.95rem; }

.garden-grid{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:10px; }
@media (max-width:480px){ .garden-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; } }
.garden-plant{
  position:relative;
  background: radial-gradient(120% 75% at 50% 0%, color-mix(in srgb, var(--pc, var(--gold)) 15%, transparent), transparent 70%), var(--surface-2);
  border:1px solid color-mix(in srgb, var(--pc, var(--gold)) 30%, var(--border)); border-radius:14px;
  padding:10px 8px 12px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:5px;
}
.plant-art-wrap{ width:100%; display:flex; justify-content:center; }
.plant-art{ width:92px; height:92px; overflow:visible; transform-origin:50% 90%; filter:drop-shadow(0 4px 5px rgba(0,0,0,.22)); }
.plant-label{ font-size:.8rem; font-weight:800; color: var(--text); }
.plant-stage{ font-size:.7rem; font-weight:700; color:color-mix(in srgb, var(--pc, var(--gold)) 72%, var(--text)); min-height:1.2em; }
.plant-dots{ display:flex; gap:3px; justify-content:center; margin:1px 0 2px; }
.plant-dots i{ width:6px; height:6px; border-radius:50%; background:color-mix(in srgb, var(--text) 16%, transparent); }
.plant-dots i.on{ background:var(--pc, var(--gold)); }
.plant-bar-wrap{ width:100%; height:6px; border-radius:5px; background: var(--surface); overflow:hidden; }
.plant-bar{ height:100%; border-radius:5px; transition: width .5s ease; }
.plant-val{ font-size:.65rem; color: var(--text-dim); }
/* آخر مرحلة: توهّج + هزّة خفيفة (مكافأة) */
.garden-plant.gp-max{ border-color:var(--pc); box-shadow:0 0 18px color-mix(in srgb, var(--pc) 32%, transparent); }
.garden-plant.gp-max .plant-art{ animation: plantSway 6s ease-in-out infinite; }
@keyframes plantSway{ 0%,100%{ transform:rotate(-1.4deg); } 50%{ transform:rotate(1.4deg); } }
[data-reduce-motion="1"] .garden-plant.gp-max .plant-art{ animation:none; }
@media (prefers-reduced-motion:reduce){ .garden-plant.gp-max .plant-art{ animation:none; } }

.streak-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 14px 20px; box-shadow: var(--shadow); display:flex; align-items:center; justify-content:center; gap:10px;
}
.streak-icon{ font-size:1.6rem; }
.streak-text{ font-size:.9rem; color: var(--text); font-weight:600; }
.streak-text span{ color: var(--gold-bright); font-family: var(--font-display); font-size:1.1rem; }

.missions-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.missions-card h2{ font-family: var(--font-display); font-size:1.2rem; color: var(--gold-bright); text-align:right; margin-bottom:4px; }
.missions-card .progress-note{ text-align:right; }
.missions-list{ display:flex; flex-direction:column; gap:12px; }
.mission-item{
  display:flex; align-items:center; gap:12px; background: var(--surface-2); border:1px solid var(--border);
  border-radius:14px; padding:12px 14px; transition: opacity .2s ease;
}
.mission-item.done{ opacity:.65; }
.mission-icon{ font-size:1.5rem; flex-shrink:0; width:32px; text-align:center; }
.mission-body{ flex:1; min-width:0; }
.mission-title{ font-size:.85rem; font-weight:700; margin-bottom:6px; }
.mission-bar-wrap{ height:7px; border-radius:5px; background: var(--surface); overflow:hidden; margin-bottom:4px; }
.mission-bar{ height:100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width .5s ease; }
.mission-sub{ font-size:.68rem; color: var(--text-dim); }
.mission-points{ font-weight:800; color: var(--gold-bright); font-size:.85rem; flex-shrink:0; }

.tree-card h2, .week-card h2, .share-card h2{ font-family: var(--font-display); font-size:1.2rem; color: var(--gold-bright); text-align:right; margin-bottom:4px; }
.tree-card .progress-note, .week-card .progress-note, .share-card .progress-note{ text-align:right; }
#treeSvgWrap{ display:flex; justify-content:center; }
#treeSvgWrap svg{ max-width:220px; }

#weekChart{ width:100%; height:auto; max-width:600px; }
.week-stats{ display:flex; flex-wrap:wrap; justify-content:center; gap:16px; margin-top:14px; font-size:.82rem; color:var(--text-dim); }
.week-stats b{ color: var(--gold-bright); font-size:1rem; display:block; }

.badges-card, .cert-card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.badges-card h2, .cert-card h2{ font-family: var(--font-display); font-size:1.2rem; color: var(--gold-bright); text-align:right; margin-bottom:4px; }
.badges-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.badges-head h2{ margin-bottom:0; }
.badges-toggle{ border:1px solid var(--gold); background:transparent; color:var(--gold-bright); border-radius:999px; padding:6px 14px; font:inherit; font-size:.8rem; font-weight:700; cursor:pointer; white-space:nowrap; transition:background .2s, color .2s; }
.badges-toggle:hover, .badges-toggle[aria-expanded="true"]{ background:color-mix(in srgb, var(--gold) 18%, transparent); }
[data-theme="light"] .badges-toggle{ color:color-mix(in srgb, var(--gold-bright) 55%, #000); }
.badges-bar{ height:6px; border-radius:99px; background:var(--surface-2); margin:8px 0 10px; overflow:hidden; }
.badges-bar span{ display:block; height:100%; width:0; border-radius:99px; background:linear-gradient(90deg, var(--gold), var(--gold-bright)); transition:width .6s ease; }
.badges-peek{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.peek-badge{ width:34px; height:34px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:1.05rem; background:var(--surface-2); border:1.5px solid var(--border); }
.peek-badge.tier-bronze{ border-color:#cd7f32; } .peek-badge.tier-silver{ border-color:#c0c0c0; } .peek-badge.tier-gold{ border-color:#d4af37; }
.peek-badge.tier-platinum{ border-color:#5fb3d9; } .peek-badge.tier-diamond{ border-color:#b388ff; box-shadow:0 0 8px rgba(179,136,255,.45); }
.peek-more{ font-size:.78rem; color:var(--text-dim); font-weight:700; padding:0 4px; }
.peek-empty{ font-size:.8rem; color:var(--text-dim); }
.badges-empty{ grid-column:1 / -1; text-align:center; padding:18px 8px; font-size:.85rem; color:var(--text-dim); }
.badges-body[hidden], .badges-peek[hidden], .badges-bar[hidden]{ display:none; }
.badges-card .progress-note, .cert-card .progress-note{ text-align:right; }

.badges-grid{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; }
.badge-item{
  display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center;
  padding:10px 4px; border-radius:12px; background: var(--surface-2); border:1px solid var(--border);
  transition: transform .2s ease;
}
.badge-item.unlocked:hover{ transform: translateY(-3px); }
.badge-item .badge-icon{ font-size:1.6rem; }
.badge-item.locked{ opacity:.3; filter: grayscale(1); }
.badge-item .badge-name{ font-size:.62rem; line-height:1.3; }
.badge-item .badge-tier{ font-size:.55rem; color: var(--text-dim); }
.badge-item.unlocked.tier-bronze{ border-color:#cd7f32; box-shadow:0 0 8px rgba(205,127,50,.35); }
.badge-item.unlocked.tier-bronze .badge-tier{ color:#cd7f32; font-weight:700; }
.badge-filters{ display:flex; flex-wrap:wrap; gap:6px; margin:10px 0 12px; justify-content:flex-end; }
.badge-filters button{ border:1px solid var(--border, rgba(128,128,128,.35)); background:var(--surface-2); color:inherit; border-radius:999px; padding:5px 11px; font:inherit; font-size:.8rem; cursor:pointer; }
.badge-filters button.on{ background:var(--gold-bright, #d4af37); color:#1a1a1a; border-color:transparent; font-weight:700; }
.badges-count{ text-align:right; font-weight:700; margin:6px 0 0; }
.badge-item.hidden-b{ display:none; }
.badge-item.unlocked.tier-silver{ border-color:#c0c0c0; box-shadow:0 0 8px rgba(192,192,192,.35); }
.badge-item.unlocked.tier-gold{ border-color:#d4af37; box-shadow:0 0 10px rgba(212,175,55,.4); }
.badge-item.unlocked.tier-platinum{ border-color:#5fb3d9; background: linear-gradient(160deg, var(--surface-2), rgba(95,179,217,.14)); box-shadow:0 0 12px rgba(95,179,217,.45); }
.badge-item.unlocked.tier-platinum .badge-tier{ color:#5fb3d9; font-weight:700; }
.badge-item.unlocked.tier-diamond{ border-color:#b388ff; background: linear-gradient(160deg, var(--surface-2), rgba(179,136,255,.16)); box-shadow:0 0 16px rgba(179,136,255,.55); }
.badge-item.unlocked.tier-diamond .badge-tier{ color:#b388ff; font-weight:700; }

.achievements-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(0,220px)); gap:14px; }
.achievement-card{
  background: var(--surface-2); border:1px solid var(--border); border-radius: 14px;
  padding: 18px; text-align:center; transition: transform .25s cubic-bezier(.34,1.56,.64,1), border-color .25s ease;
}
.achievement-card:hover{ transform: translateY(-4px); border-color: var(--gold); }
.achievement-card .ach-emoji{ font-size:2.2rem; margin-bottom:8px; }
.achievement-card .ach-title{ font-weight:700; margin-bottom:4px; }
.achievement-card .ach-progress{ font-size:.75rem; color: var(--text-dim); margin-bottom:12px; }
.achievement-card.locked{ opacity:.55; }

/* ---------------- شخصيتك الإيمانية ---------------- */
.personality-card{
  background: linear-gradient(135deg, var(--surface), var(--surface-2)); border:1px solid var(--gold);
  border-radius: var(--radius); padding:16px 20px; box-shadow: var(--shadow); text-align:center;
}
.personality-title{ font-family: var(--font-display); color: var(--gold-bright); font-size:1.1rem; margin-bottom:6px; }
.personality-desc{ font-size:.82rem; color: var(--text-dim); line-height:1.7; }

/* ---------------- ملخص الشهر ---------------- */
.summary-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); padding:18px 20px; box-shadow: var(--shadow); }
.summary-card h2{ font-family: var(--font-display); font-size:1.1rem; color: var(--gold-bright); margin-bottom:12px; text-align:right; }
.summary-grid{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; }
.summary-cell{ text-align:center; background: var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:12px 6px; }
.summary-val{ font-family: var(--font-display); font-size:1.3rem; color: var(--gold-bright); }
.summary-label{ font-size:.68rem; color: var(--text-dim); margin-top:4px; }

/* ---------------- حديقة تنمو أول ما تفتح الصفحة ---------------- */
.grow-in{ animation: gardenGrow .5s ease backwards; }
@keyframes gardenGrow{ from{ opacity:0; transform: scale(.4) translateY(10px); } to{ opacity:1; transform: scale(1) translateY(0); } }

/* ---------------- وردي اليومي ---------------- */
.wird-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); padding:20px; box-shadow: var(--shadow); }
.wird-card h2{ font-family: var(--font-display); font-size:1.15rem; color: var(--gold-bright); text-align:right; margin-bottom:4px; }
.wird-quick-add{ display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.wird-chip{
  border:1px solid var(--border); background: var(--surface-2); color: var(--text-dim);
  font-size:.75rem; padding:6px 12px; border-radius:20px; cursor:pointer; font-family:inherit;
}
.wird-chip:hover{ border-color: var(--gold); color: var(--text); }
.wird-add-row{ display:flex; gap:8px; margin-bottom:14px; }
.wird-add-row input{ flex:1; }
.wird-list{ display:flex; flex-direction:column; gap:8px; }
.wird-item{
  display:flex; align-items:center; justify-content:space-between; background: var(--surface-2);
  border:1px solid var(--border); border-radius:10px; padding:10px 12px;
}
.wird-item.done{ opacity:.55; }
.wird-item.done .wird-check-label span{ text-decoration: line-through; }
.wird-check-label{ display:flex; align-items:center; gap:10px; font-size:.85rem; cursor:pointer; }
.wird-check{ width:18px; height:18px; accent-color: var(--gold); }
.wird-remove{ background:none; border:none; color: var(--text-dim); cursor:pointer; font-size:.9rem; }
.wird-remove:hover{ color: var(--danger); }
.wird-empty{ text-align:center; color: var(--text-dim); font-size:.82rem; padding:14px 0; }

/* ---------------- خطاب لنفسك بعد سنة ---------------- */
.letter-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); padding:20px; box-shadow: var(--shadow); }
.letter-card h2{ font-family: var(--font-display); font-size:1.15rem; color: var(--gold-bright); text-align:right; margin-bottom:12px; }
.letter-card textarea{ width:100%; resize:vertical; font-family:inherit; }
.letter-locked, .letter-unlocked{ text-align:center; }
.letter-locked-icon, .letter-unlocked-icon{ font-size:2rem; margin-bottom:8px; }
.letter-locked p, .letter-unlocked p{ font-size:.85rem; color: var(--text-dim); line-height:1.7; }
.letter-text{
  background: var(--surface-2); border:1px solid var(--gold); border-radius:12px; padding:16px;
  font-size:.88rem; line-height:1.8; text-align:right; white-space:pre-wrap; margin-top:10px;
}

/* شجرة الحسنات */
.tree-main #treeWrap{ display:flex; justify-content:center; overflow:hidden; border-radius:18px; border:1px solid var(--border); }
.tree-svg{
  width:100%; max-width:380px; height:auto; display:block; border-radius:18px; overflow:hidden;
  /* ألوان المشهد (دارك) */
  --t-sky1:#0d1626; --t-sky2:#26405a; --t-orb:#f1ecd2; --t-star:.9;
  --t-hill1:#1b3a30; --t-hill2:#27503a; --t-soil:#3c2a18; --t-grass:#5aa845;
  --t-bark1:#4f381c; --t-bark2:#8d6c3a; --t-bark-dark:#2d1f0e; --t-wood:#7d5c2e; --t-wood-dark:#3d2a14;
  --t-leaf1:#86cf62; --t-leaf2:#56ab42; --t-leaf3:#3b8a31; --t-leaf4:#1f5a22;
  --t-fruit:#f3c95a; --t-medal:#131b29; --t-halo:rgba(9,13,22,.9);
}
[data-theme="light"] .tree-svg{
  --t-sky1:#bfe3f6; --t-sky2:#f7efd3; --t-orb:#ffd35e; --t-star:0;
  --t-hill1:#a9d58a; --t-hill2:#86bf6c; --t-soil:#8a6a42; --t-grass:#4d9a3a;
  --t-bark1:#6a4a24; --t-bark2:#a67f45; --t-bark-dark:#3f2a12; --t-wood:#8a6532; --t-wood-dark:#5a3d1b;
  --t-leaf1:#9bdc6e; --t-leaf2:#5db04a; --t-leaf3:#3f9035; --t-leaf4:#2a6f2b;
  --t-medal:#fffaf0; --t-halo:rgba(255,255,255,.92);
}
/* الجمعة: من غير أخضر — أوراق دهبية */
html.is-friday .tree-svg{
  --t-hill1:#3a2f19; --t-hill2:#4d3d1d; --t-grass:#c9a24b;
  --t-leaf1:#f6dd8d; --t-leaf2:#e0b64a; --t-leaf3:#bf8f2a; --t-leaf4:#8a6418; --t-fruit:#fff4cf;
}
html.is-friday [data-theme="light"] .tree-svg{
  --t-hill1:#f0dfa8; --t-hill2:#e4cb85; --t-grass:#b98c2a;
  --t-leaf1:#f8e49b; --t-leaf2:#e6bd50; --t-leaf3:#c79830; --t-leaf4:#946b1c; --t-fruit:#fff4cf;
}
.ts-sky1{ stop-color:var(--t-sky1); } .ts-sky2{ stop-color:var(--t-sky2); }
.ts-bark1{ stop-color:var(--t-bark1); } .ts-bark2{ stop-color:var(--t-bark2); }
.ts-orb{ stop-color:var(--t-orb); }
.tree-orb{ fill:var(--t-orb); }
.tree-star{ fill:#fff; opacity:var(--t-star); }
.tree-hill1{ fill:var(--t-hill1); } .tree-hill2{ fill:var(--t-hill2); }
.tree-soil{ fill:var(--t-soil); }
.tree-shadow{ fill:#000; opacity:.22; }
.tree-grass{ stroke:var(--t-grass); stroke-width:1.6; stroke-linecap:round; }
.tree-root{ stroke:var(--t-bark1); stroke-width:5; stroke-linecap:round; }
.tree-bark-line{ stroke:var(--t-bark-dark); stroke-width:1.5; stroke-linecap:round; opacity:.4; }
.tree-stem{ stroke:var(--t-leaf2); stroke-width:3; stroke-linecap:round; }
.t-leaf1{ fill:var(--t-leaf1); } .t-leaf2{ fill:var(--t-leaf2); } .t-leaf3{ fill:var(--t-leaf3); } .t-leaf4{ fill:var(--t-leaf4); }
.tree-fruit{ fill:var(--t-fruit); }
.tree-medal{ fill:var(--t-medal); stroke-width:2.6; }
.tree-label{ font-family: var(--font-body, 'Tajawal', sans-serif); font-size:10.5px; font-weight:800; fill: var(--text); paint-order:stroke; stroke:var(--t-halo); stroke-width:3.2px; stroke-linejoin:round; }
.tree-count{ margin-top:10px; font-size:.82rem; color: var(--text-dim); }
.tree-next{ margin-top:6px; font-size:.8rem; color: var(--text-dim); }
.tree-next b{ color: var(--gold-bright); font-weight:800; }
[data-theme="light"] .tree-next b{ color: color-mix(in srgb, var(--gold-bright) 60%, #000); }
.tree-next span{ opacity:.85; }

.branch-line{ stroke-linecap:round; }
.branch-shade{ stroke:var(--t-wood-dark); stroke-width:6.6; }
.branch-wood{ stroke:var(--t-wood); stroke-width:4.2; }
.tree-branch .branch-line{ stroke-dasharray:1; stroke-dashoffset:1; animation: branchDraw .7s ease forwards; }
.tree-branch .branch-leaf, .tree-branch .branch-leafy{ opacity:0; transform-box: fill-box; transform-origin:center; animation: leafPop .5s ease forwards; }
.tree-branch.is-new .tree-medal{ animation: leafGlow 1.6s ease-in-out 3; }
.tree-crown{ animation: crownSway 7s ease-in-out infinite; }
.tree-sprout{ animation: crownSway 3.4s ease-in-out infinite; }
.tree-fall{ opacity:0; animation: treeFall 11s linear infinite; }
@keyframes branchDraw{ to{ stroke-dashoffset:0; } }
@keyframes leafPop{ from{ opacity:0; transform:scale(.3); } to{ opacity:1; transform:scale(1); } }
@keyframes leafGlow{ 0%,100%{ filter:none; } 50%{ filter: drop-shadow(0 0 6px #ffe08a); } }
@keyframes crownSway{ 0%,100%{ transform:rotate(-.9deg); } 50%{ transform:rotate(.9deg); } }
@keyframes treeFall{
  0%{ opacity:0; transform:translate(0,0) rotate(0deg); }
  12%{ opacity:.85; }
  85%{ opacity:.7; }
  100%{ opacity:0; transform:translate(30px,150px) rotate(260deg); }
}
[data-reduce-motion="1"] .tree-branch .branch-line, [data-reduce-motion="1"] .tree-branch .branch-leaf, [data-reduce-motion="1"] .tree-branch .branch-leafy{ animation:none; stroke-dashoffset:0; opacity:1; }
[data-reduce-motion="1"] .tree-crown, [data-reduce-motion="1"] .tree-sprout, [data-reduce-motion="1"] .tree-branch.is-new .tree-medal{ animation:none; }
[data-reduce-motion="1"] .tree-fall{ display:none; }
@media (prefers-reduced-motion: reduce){
  .tree-crown, .tree-sprout, .tree-branch.is-new .tree-medal{ animation:none; }
  .tree-fall{ display:none; }
}

/* حفظ التقدّم */
.backup-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); padding:22px; box-shadow: var(--shadow); }
.backup-card h2{ font-family: var(--font-display); font-size:1.2rem; color: var(--gold-bright); text-align:right; margin-bottom:4px; }
.backup-card .progress-note{ text-align:right; }
.backup-status{ font-size:.78rem; color: var(--text-dim); margin-bottom:12px; text-align:right; }
.backup-actions{ display:flex; gap:10px; flex-wrap:wrap; }

/* شارات: 3 في الصف */
.badge-item{ min-width:0; }
.badge-name{ font-size:.72rem; line-height:1.4; word-break:break-word; }
.badge-tier{ font-size:.65rem; }

/* ===================================================================
   كارت رحلتي الكبير: حلقة المستوى + سلّم المستويات + ٣ مربعات
=================================================================== */
.level-card.lv-hero{
  padding:20px 18px 14px; text-align:start;
  border-color: color-mix(in srgb, var(--gold) 38%, var(--border));
  background:
    radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 70%),
    var(--surface);
}
.lv-top{ display:flex; align-items:center; gap:16px; }
.lv-ring{ position:relative; flex:none; width:122px; height:122px; display:grid; place-items:center; }
.lv-ring svg{ position:absolute; inset:0; width:100%; height:100%; transform:rotate(-90deg); overflow:visible; }
.lv-ring::before{
  content:''; position:absolute; inset:15px; border-radius:50%;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--gold) 20%, var(--surface-2)), var(--surface-2) 75%);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.16), 0 0 0 1px var(--border);
}
.lv-bg{ fill:none; stroke: color-mix(in srgb, var(--gold) 16%, var(--surface-2)); stroke-width:8; }
.lv-fg{
  fill:none; stroke: var(--gold); stroke: url(#lvGrad); stroke-width:8; stroke-linecap:round;
  transition: stroke-dashoffset 1.1s cubic-bezier(.22,.9,.3,1);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--gold) 55%, transparent));
}
.lg-a{ stop-color: color-mix(in srgb, var(--gold) 80%, #6b3f00); }
.lg-b{ stop-color: var(--gold-bright); }
.lv-ring .level-icon{ position:relative; z-index:1; font-size:2.6rem; margin:0; line-height:1; }
.lv-pct{
  position:absolute; z-index:2; bottom:-4px; left:50%; transform:translateX(-50%);
  padding:2px 10px; border-radius:12px; font-size:.7rem; font-weight:800; white-space:nowrap;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright)); color:#171203;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.lv-info{ min-width:0; display:flex; flex-direction:column; gap:4px; }
.lv-chip{
  align-self:flex-start; padding:3px 11px; border-radius:12px; font-size:.7rem; font-weight:800; color: var(--text-dim);
  background: color-mix(in srgb, var(--gold) 10%, var(--surface-2)); border:1px solid color-mix(in srgb, var(--gold) 30%, var(--border));
}
.lv-hero .level-name{ font-size:1.75rem; line-height:1.25; margin:0; }
.lv-score{ display:flex; align-items:baseline; gap:6px; color: var(--text-dim); font-size:.8rem; }
.lv-score b{ font-family: var(--font-display); font-size:1.5rem; color: var(--text); font-weight:700; }
.lv-hero .level-sub{ margin:14px 2px 12px; text-align:center; font-size:.8rem; line-height:1.8; text-wrap:balance; }
.lv-score b, .lv-tile b, .lv-pct{ font-variant-numeric: tabular-nums; }

.lv-ladder{ display:flex; align-items:center; gap:3px; margin:0 2px 14px; }
.lv-ladder i{ flex:1; height:6px; border-radius:4px; background: color-mix(in srgb, var(--text) 13%, transparent); }
.lv-ladder i.done{ background: var(--gold); }
.lv-ladder i.cur{
  height:11px; background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent);
}

.lv-tiles{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; }
.lv-tile{
  display:flex; flex-direction:column; align-items:center; gap:2px; padding:10px 4px 9px; text-align:center;
  background: var(--surface-2); border:1px solid var(--border); border-radius:16px;
}
.lt-ico{ font-size:1.25rem; line-height:1; margin-bottom:2px; }
.lv-tile b{ font-family: var(--font-display); font-size:1.35rem; color: var(--text); line-height:1.15; }
.lv-tile b u{ text-decoration:none; font-size:.78rem; color: var(--text-dim); font-family: var(--font-body); font-weight:700; }
.lv-tile small{ font-size:.66rem; color: var(--text-dim); font-weight:700; }
.lt-bar{ display:block; width:70%; height:4px; border-radius:4px; margin-top:4px; background: color-mix(in srgb, var(--gold) 18%, var(--surface)); overflow:hidden; }
.lt-bar i{ display:block; height:100%; border-radius:4px; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }

.lv-more{ margin-top:12px; border-top:1px dashed var(--border); text-align:center; }
.lv-more summary{
  list-style:none; cursor:pointer; padding:11px 8px 4px; font-size:.78rem; font-weight:700; color: var(--text-dim);
  -webkit-tap-highlight-color:transparent;
}
.lv-more summary::-webkit-details-marker{ display:none; }
.lv-more[open] summary{ color: var(--text); }
.lv-more .points-breakdown{ margin-top:8px; padding-top:8px; border-top:0; }

[data-theme="light"] .lv-hero .level-name,
[data-theme="light"] .pb-row b{ color: color-mix(in srgb, var(--gold-bright) 62%, #000); }
@media (max-width:380px){
  .lv-ring{ width:104px; height:104px; }
  .lv-hero .level-name{ font-size:1.5rem; }
}
@media (prefers-reduced-motion:reduce){ .lv-fg{ transition:none; } }
[data-reduce-motion="1"] .lv-fg{ transition:none; }

/* ---------- كارت الإنجاز للمشاركة ---------- */
.lv-share{
  display:block; width:100%; margin-top:14px; padding:11px 14px; border-radius:14px; cursor:pointer; font-family:inherit; font-weight:800; font-size:.9rem;
  border:1px solid var(--gold); color:var(--gold-bright); background:color-mix(in srgb, var(--gold) 10%, transparent);
  transition:background .2s ease, transform .15s ease;
}
.lv-share:hover{ background:color-mix(in srgb, var(--gold) 20%, transparent); }
.lv-share:active{ transform:scale(.98); }
[data-theme="light"] .lv-share{ color:color-mix(in srgb, var(--gold-bright) 55%, #000); }

.sc-modal{ position:fixed; inset:0; z-index:9800; display:grid; place-items:center; padding:16px; background:rgba(0,0,0,.72); }
.sc-modal[hidden]{ display:none; }
.sc-card{
  position:relative; width:min(420px, 100%); max-height:calc(100dvh - 24px); overflow-y:auto; padding:14px 14px 12px; border-radius:var(--radius, 18px);
  background:var(--surface); border:1px solid var(--gold); box-shadow:var(--shadow); text-align:center;
}
.sc-x{ position:absolute; top:8px; left:8px; z-index:2; width:34px; height:34px; border-radius:50%; border:1px solid var(--border); background:var(--surface-2); color:var(--text); cursor:pointer; font-size:1rem; }
.sc-img-wrap{ position:relative; aspect-ratio:1080 / 1350; border-radius:14px; overflow:hidden; background:var(--surface-2); margin-top:30px; }
.sc-img{ width:100%; height:100%; display:block; object-fit:contain; -webkit-touch-callout:default; user-select:none; }
.sc-img:not([src]){ visibility:hidden; }
.sc-loading{ position:absolute; inset:0; display:grid; place-items:center; color:var(--text-dim); font-size:.9rem; }
.sc-loading[hidden]{ display:none; }
.sc-actions{ display:flex; gap:10px; margin-top:12px; }
.sc-actions .btn{ flex:1; padding:11px 8px; font-size:.88rem; }
.sc-actions .btn[hidden]{ display:none; }
.sc-actions .btn:disabled{ opacity:.55; cursor:default; }
.sc-hint{ margin:10px 0 0; font-size:.72rem; color:var(--text-dim); line-height:1.7; }
