/* ============ أحلامي وأهدافي — Dreamy Goals ============ */

:root{
  --plum:#3B3355;
  --muted:#8B84A8;
  --violet:#7C5CC4;
  --violet-soft:#F1EAFC;
  --lilac:#C9B8F0;
  --mint:#7FD6B4;
  --mint-soft:#E7F8F1;
  --butter:#FBE9A8;
  --gold1:#F3E0B0;
  --gold2:#D9B76B;
  --rose:#F7C8D8;
  --line:#EFE9FB;
  --card:#FFFFFF;
  --bg1:#EAF7FD;
  --bg2:#F7F3FF;
  --blob1:#C9B8F0;
  --blob2:#BFEBD9;
  --blob3:#FFF3C4;
  --shadow:0 10px 28px rgba(124,92,196,.08), inset 0 1px 0 #FFFFFF;
  --shadow-lg:0 18px 44px rgba(124,92,196,.16);
  --r-lg:26px;
  --r-md:18px;
}

html[data-theme="lilac"]{ --bg1:#F2ECFE; --bg2:#FBF7FF; --blob1:#D9C9F7; --blob2:#EBDDFF; --blob3:#FFF0C9; }
html[data-theme="mint"]{ --bg1:#E6FAF3; --bg2:#F7FFFC; --blob1:#BFEBD9; --blob2:#D6F5EA; --blob3:#FBF3C6; }
html[data-theme="yellow"]{ --bg1:#FFFAE6; --bg2:#FFF7FA; --blob1:#FFF0B8; --blob2:#FBDCE6; --blob3:#D9F2E6; }

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

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  min-height:100dvh;
  font-family:'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size:16px;
  line-height:1.6;
  color:var(--plum);
  background:linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 55%, #FDFCFF 100%);
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  user-select:none;
}
input,textarea,select{ user-select:text; }
body.modal-open{ overflow:hidden; }

h1,h2,h3,h4{ margin:0; font-family:'Baloo Bhaijaan 2','Tajawal',sans-serif; line-height:1.35; font-weight:700; }
p{ margin:0; }
button{ font-family:inherit; }
img,svg{ display:block; }

:focus-visible{ outline:3px solid rgba(124,92,196,.45); outline-offset:2px; border-radius:14px; }

/* ---------- خلفية السماء ---------- */
.sky{ position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
.blob{ position:absolute; border-radius:50%; filter:blur(60px); opacity:.35; }
.blob1{ width:320px; height:320px; background:var(--blob1); top:-90px; inset-inline-end:-70px; animation:drift1 28s ease-in-out infinite; }
.blob2{ width:280px; height:280px; background:var(--blob2); top:38%; inset-inline-start:-90px; animation:drift2 34s ease-in-out infinite; }
.blob3{ width:260px; height:260px; background:var(--blob3); bottom:-90px; inset-inline-end:6%; animation:drift3 30s ease-in-out infinite; }

@keyframes drift1{ 0%,100%{ transform:translate(0,0); } 50%{ transform:translate(-28px,42px); } }
@keyframes drift2{ 0%,100%{ transform:translate(0,0); } 50%{ transform:translate(34px,-30px); } }
@keyframes drift3{ 0%,100%{ transform:translate(0,0); } 50%{ transform:translate(-24px,-26px); } }

/* ---------- الهيكل ---------- */
.shell{
  position:relative;
  z-index:1;
  max-width:780px;
  margin:0 auto;
  padding:14px 16px 122px;
}

.topbar{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:4px 2px 14px; }
.brand{ display:flex; align-items:center; gap:10px; min-width:0; }
.brand-mark{
  width:42px; height:42px; flex:0 0 auto; display:grid; place-items:center;
  background:#fff; border-radius:15px; border:1px solid var(--line); box-shadow:var(--shadow);
}
.brand-text{ min-width:0; }
.brand h1{ font-size:17.5px; color:var(--plum); white-space:nowrap; }
.brand p{ font-size:11.5px; color:var(--muted); font-weight:500; white-space:nowrap; }
.topbar-actions{ display:flex; align-items:center; gap:8px; }

.save-dot{
  font-size:11px; font-weight:700; color:#2F8C6C; background:var(--mint-soft);
  border:1px solid #D6F2E7; padding:4px 9px; border-radius:999px;
  opacity:0; transition:opacity .3s ease; white-space:nowrap;
}
.save-dot.show{ opacity:1; }

/* ---------- الأزرار ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:48px; padding:0 18px; border-radius:16px; border:1px solid transparent;
  font-size:15px; font-weight:700; cursorld:pointer; cursor:pointer;
  background:#F4F0FC; color:var(--violet);
  transition:transform .14s ease, box-shadow .18s ease, background .18s ease;
}
.btn:active{ transform:scale(.97); }
.btn.primary{ background:linear-gradient(135deg,#9377DB,#7C5CC4); color:#fff; box-shadow:0 10px 22px rgba(124,92,196,.28); }
.btn.ghost{ background:#fff; border-color:var(--line); color:var(--violet); box-shadow:var(--shadow); }
.btn.danger{ background:linear-gradient(135deg,#EE92AE,#D9758F); color:#fff; box-shadow:0 10px 22px rgba(217,117,143,.25); }
.btn.block{ width:100%; }
.btn .ic{ width:18px; height:18px; }
.btn.sm-btn{ min-height:44px; padding:0 14px; font-size:13.5px; border-radius:14px; }

.icon-btn{
  width:44px; height:44px; display:grid; place-items:center;
  border-radius:16px; border:1px solid var(--line); background:#fff; color:var(--violet);
  box-shadow:var(--shadow); cursor:pointer; transition:transform .16s ease, background .16s ease;
}
.icon-btn:active{ transform:scale(.93); }
.icon-btn.sm{ width:42px; height:42px; border-radius:14px; box-shadow:none; background:#FAF8FF; }
.icon-btn.danger{ color:#C36A86; }
.icon-btn .ic{ width:20px; height:20px; }

.ic{ width:20px; height:20px; flex:0 0 auto; }

.link-btn{
  display:inline-flex; align-items:center; gap:4px; border:0; background:none;
  color:var(--violet); font-size:12.5px; font-weight:700; cursor:pointer;
  padding:8px 6px; border-radius:12px;
}
.link-btn .ic{ width:15px; height:15px; }

/* ---------- البطاقات ---------- */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow);
  padding:18px;
  margin-bottom:14px;
}
.card-title{ display:flex; align-items:center; gap:8px; font-size:15.5px; margin-bottom:4px; }
.card-title .ic{ width:18px; height:18px; color:var(--violet); }

.muted{ color:var(--muted); }
.small{ font-size:12.5px; line-height:1.65; }
.center{ text-align:center; }
.mt-8{ margin-top:8px; }
.mt-12{ margin-top:12px; }

.section-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin:6px 4px 12px; }
.section-head h2{ font-size:20px; }
.section-head h3{ font-size:16px; }
.section-head .sub{ font-size:12.5px; color:var(--muted); }

/* ---------- الشاشات ---------- */
.views{ position:relative; }
.view{ display:none; }
.view.active{ display:block; animation:viewIn .34s cubic-bezier(.22,1,.36,1) both; }
@keyframes viewIn{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }

/* ---------- البطاقة الترحيبية ---------- */
.hero{
  display:flex; align-items:center; gap:10px; overflow:hidden; position:relative;
  background:linear-gradient(135deg,#FFFFFF 0%,#FBF8FF 58%,#F2FBFF 100%);
}
.hero::after{
  content:''; position:absolute; top:-46px; inset-inline-start:-34px;
  width:150px; height:150px; border-radius:50%;
  background:radial-gradient(circle, rgba(201,184,240,.4), transparent 70%);
  pointer-events:none;
}
.hero-text{ flex:1; min-width:0; position:relative; z-index:1; }
.eyebrow{ font-size:13px; font-weight:700; color:var(--violet); }
.hero-title{ font-size:clamp(18px,5vw,23px); margin-top:4px; }
.hero-sub{ font-size:12px; color:var(--muted); margin-top:6px; }
.hero-mascot{ flex:0 0 auto; display:grid; place-items:center; position:relative; z-index:1; }

/* ---------- نور السحابة ---------- */
.mascot{ width:clamp(88px,25vw,116px); height:auto; overflow:visible; }
.mascot .mascot-body{ transform-origin:50% 62%; animation:floaty 3.8s ease-in-out infinite; }
.mascot[data-state="sleepy"] .mascot-body{ animation:floaty 6.5s ease-in-out infinite; }
.mascot[data-state="celebrate"] .mascot-body{ animation:hop .58s ease-in-out infinite; }
.mascot .zzz,.mascot .held-heart,.mascot .sparkles{ opacity:0; transition:opacity .3s ease; }
.mascot[data-state="sleepy"] .zzz{ opacity:1; animation:zzzPulse 2.4s ease-in-out infinite; }
.mascot[data-state="heart"] .held-heart{ opacity:1; }
.mascot[data-state="celebrate"] .sparkles{ opacity:1; }
@keyframes floaty{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-6px); } }
@keyframes hop{ 0%,100%{ transform:translateY(0) scale(1); } 42%{ transform:translateY(-9px) scale(1.03); } }
@keyframes zzzPulse{ 0%,100%{ opacity:.25; } 50%{ opacity:1; } }

/* ---------- الحلقات ---------- */
.rings{ display:flex; gap:8px; }
.ring-box{ flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:4px 2px; }
.ring-inner{ position:relative; width:104px; height:104px; display:grid; place-items:center; }
.ring-svg{ width:104px; height:104px; transform:rotate(-90deg); }
.ring-bg{ fill:none; stroke:#F3EFFB; stroke-width:11; }
.ring-fg{ fill:none; stroke-width:11; stroke-linecap:round; transition:stroke-dashoffset .8s cubic-bezier(.4,0,.2,1); }
.ring-num{ position:absolute; font-family:'Baloo Bhaijaan 2',sans-serif; font-size:21px; font-weight:700; color:var(--plum); }
.ring-label{ font-size:12.5px; font-weight:700; color:var(--plum); text-align:center; }
.ring-sub{ font-size:11px; color:var(--muted); text-align:center; }

/* ---------- النجوم والمستوى ---------- */
.stars-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.stars-count{ display:inline-flex; align-items:center; gap:6px; font-size:14px; color:var(--plum); }
.stars-count b{ font-family:'Baloo Bhaijaan 2',sans-serif; font-size:22px; color:#8A6A22; }
.stars-count span{ font-size:12px; color:var(--muted); font-weight:700; }
.stars-count .ic{ width:20px; height:20px; color:#D9B76B; fill:#F3E0B0; }
.level-pill{
  display:inline-flex; align-items:center; gap:5px; font-family:'Baloo Bhaijaan 2',sans-serif;
  font-weight:700; font-size:12.5px; padding:6px 12px; border-radius:999px; color:#75571A;
  background:linear-gradient(135deg,#F7EBCB,#EBD196); border:1px solid #EEDCB4;
  box-shadow:inset 0 1px 0 #FFF9E9; white-space:nowrap;
}
.stars-track{ position:relative; height:13px; background:#F3EEFB; border-radius:999px; overflow:hidden; margin-top:11px; }
.stars-fill{
  position:absolute; top:0; bottom:0; inset-inline-start:0; border-radius:999px;
  background:linear-gradient(90deg,#F3E0B0,#D9B76B);
  box-shadow:inset 0 0 0 1px rgba(217,183,107,.35);
  transition:width .7s cubic-bezier(.4,0,.2,1);
}
.stars-note{ font-size:12px; color:var(--muted); margin-top:8px; }
.stars-note b{ color:#8A6A22; }

/* ---------- الشيبس ---------- */
.chip{
  display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700;
  padding:5px 10px; border-radius:999px; background:#F7F4FD; color:var(--muted); border:1px solid var(--line);
}
.chip .ic{ width:14px; height:14px; }
.chip.tiny{ font-size:11px; padding:3px 8px; }
.chip.warn{ background:#FDF0F4; color:#C36A86; border-color:#F8DCE4; }
.chip.ok{ background:var(--mint-soft); color:#2F8C6C; border-color:#D6F2E7; }

.cat-badge{
  display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:700;
  padding:6px 11px; border-radius:999px; color:var(--c); background:var(--s);
}
.cat-badge .ic{ width:15px; height:15px; }

/* ---------- المهمة القادمة ---------- */
.next-card{ background:linear-gradient(150deg,#FFFFFF 0%,#F8FBFF 100%); }
.next-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.next-title{ font-family:'Baloo Bhaijaan 2','Tajawal',sans-serif; font-size:18px; line-height:1.5; margin-bottom:8px; }
.next-meta{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }

/* ---------- الأهداف المصغرة ---------- */
.mini-goal{ display:flex; align-items:center; gap:10px; padding:11px 0; border-top:1px dashed var(--line); }
.mini-goal:first-of-type{ border-top:0; padding-top:2px; }
.mini-main{ flex:1; min-width:0; }
.mini-main p{ font-size:14px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mini-main span{ font-size:11.5px; color:var(--muted); }
.mini-bar{ flex:0 0 62px; height:7px; border-radius:999px; background:#F3EEFB; overflow:hidden; }
.mini-bar span{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#A98BE8,#7C5CC4); }

/* ---------- أزرار التبويب ---------- */
.tabs{
  display:flex; gap:5px; background:#F7F4FD; border:1px solid var(--line);
  border-radius:18px; padding:5px; margin-bottom:14px;
}
.tabs button{
  flex:1; min-height:44px; border:0; background:transparent; border-radius:14px;
  font-size:13px; font-weight:700; color:var(--muted); cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:5px; transition:all .18s ease;
}
.tabs button.active{ background:#fff; color:var(--violet); box-shadow:0 6px 16px rgba(124,92,196,.12); }
.tabs .count{ font-size:10.5px; background:#EFE9FB; color:var(--violet); border-radius:999px; padding:1px 7px; font-weight:800; }

/* ---------- بطاقة الهدف ---------- */
.goal-card{ position:relative; }
.goal-card.is-done{ background:linear-gradient(160deg,#FFFFFF,#F7FFFC); border-color:#DCF3EA; }
.goal-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.goal-actions{ display:flex; gap:6px; }
.goal-title{ font-size:17px; margin-bottom:6px; word-break:break-word; }
.goal-title.done{ text-decoration:line-through; color:var(--muted); }
.goal-note{ font-size:12.5px; color:var(--muted); margin-bottom:10px; line-height:1.7; }
.meta-row{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.bar{ height:9px; border-radius:999px; background:#F3EEFB; overflow:hidden; margin-top:11px; }
.bar > span{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#A98BE8,#7C5CC4); transition:width .55s cubic-bezier(.4,0,.2,1); }
.bar.mint > span{ background:linear-gradient(90deg,#A6E8D2,#63C7A3); }

/* ---------- صفوف المهام ---------- */
.task-row{
  display:flex; align-items:flex-start; gap:8px; padding:10px 12px 10px 6px;
  background:#fff; border:1px solid var(--line); border-radius:20px;
  box-shadow:var(--shadow); margin-bottom:10px; transition:background .2s ease, border-color .2s ease;
}
.task-row.is-done{ background:#FBFFFD; border-color:#DCF3EA; }
.check{
  position:relative; width:44px; height:44px; flex:0 0 auto; border:0; background:none;
  padding:0; display:grid; place-items:center; cursor:pointer;
}
.check .box{
  width:30px; height:30px; border-radius:50%; border:2px solid #DCD4F0; background:#fff;
  display:grid; place-items:center; color:transparent; transition:all .2s ease;
}
.check .box .ic{ width:16px; height:16px; }
.task-row.is-done .check .box{ background:linear-gradient(135deg,#A6E8D2,#7FD6B4); border-color:#7FD6B4; color:#fff; }
.task-main{ flex:1; min-width:0; padding-top:6px; }
.task-title{ font-size:14.5px; font-weight:700; line-height:1.6; word-break:break-word; }
.task-row.is-done .task-title{ color:var(--muted); text-decoration:line-through; }
.task-meta{ display:flex; flex-wrap:wrap; gap:5px; margin-top:5px; }
.task-actions{ display:flex; flex-direction:column; gap:2px; flex:0 0 auto; }
.task-actions .icon-btn.sm{ width:38px; height:38px; background:transparent; }

/* ---------- الحالة الفارغة ---------- */
.empty{
  display:flex; flex-direction:column; align-items:center; text-align:center;
  gap:8px; padding:22px 16px 26px;
}
.empty .mascot{ width:96px; }
.empty p{ color:var(--muted); font-size:13px; max-width:270px; line-height:1.7; }
.empty h4{ font-size:15.5px; }

/* ---------- الإنجازات ---------- */
.ach-hero{ display:flex; align-items:center; gap:16px; }
.ach-hero .ring-inner{ width:118px; height:118px; flex:0 0 auto; }
.ach-hero .ring-svg{ width:118px; height:118px; }
.ach-hero .ring-num{ font-size:24px; }
.ach-hero h3{ font-size:17px; margin-bottom:4px; }
.ach-hero p{ font-size:12.5px; color:var(--muted); line-height:1.7; }

.stat-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:14px; }
.stat{
  display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:14px 6px; margin:0; text-align:center;
}
.stat .ic{ width:18px; height:18px; color:var(--lilac); margin-bottom:2px; }
.stat-num{ font-family:'Baloo Bhaijaan 2',sans-serif; font-size:23px; font-weight:700; color:var(--violet); line-height:1.2; }
.stat-label{ font-size:11px; color:var(--muted); font-weight:700; }

.levels{ display:flex; align-items:flex-start; justify-content:space-between; gap:4px; position:relative; margin-top:10px; }
.levels::before{
  content:''; position:absolute; top:21px; inset-inline:12%; height:2px;
  background:#F1ECFB; z-index:0; border-radius:2px;
}
.level-step{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
  text-align:center; opacity:.45; transition:opacity .3s ease; position:relative; z-index:1;
}
.level-step.on{ opacity:1; }
.level-dot{
  width:44px; height:44px; border-radius:50%; display:grid; place-items:center;
  font-size:19px; background:#F5F1FC; border:2px solid #EDE6FB;
}
.level-step.on .level-dot{
  background:linear-gradient(135deg,#F7EBCB,#EBD196); border-color:#E6CE9B;
  box-shadow:0 6px 14px rgba(217,183,107,.32);
}
.level-name{ font-size:11.5px; font-weight:700; }
.level-min{ font-size:10px; color:var(--muted); }

.log-item{ display:flex; gap:10px; align-items:flex-start; padding:11px 0; border-top:1px dashed var(--line); }
.log-item:first-child{ border-top:0; padding-top:2px; }
.log-dot{
  width:32px; height:32px; border-radius:11px; flex:0 0 auto;
  display:grid; place-items:center; background:var(--violet-soft); color:var(--violet);
}
.log-dot .ic{ width:16px; height:16px; }
.log-body p{ font-size:13.5px; font-weight:700; line-height:1.6; }
.log-body span{ font-size:11px; color:var(--muted); }

/* ---------- الإلهام ---------- */
.quote-card{
  position:relative; overflow:hidden; padding-top:32px;
  background:linear-gradient(160deg,#FFFCF0,#FCF4DA); border-color:#F6E9B8;
}
.q-mark{
  position:absolute; top:2px; inset-inline-start:16px; font-family:'Baloo Bhaijaan 2',serif;
  font-size:56px; line-height:1; color:#E9D69A;
}
.quote-text{
  font-family:'Baloo Bhaijaan 2','Tajawal',sans-serif;
  font-size:clamp(17px,4.8vw,21px); font-weight:600; line-height:1.8; color:#5A4A22;
}
.quote-actions{ display:flex; gap:9px; margin-top:16px; flex-wrap:wrap; }
.quote-actions .btn{ flex:1; min-width:130px; }
.btn.heart-off{ background:#fff; border-color:#F0E0B0; color:#997524; }
.btn.heart-on{ background:linear-gradient(135deg,#F7A8BE,#EE8AA6); color:#fff; border-color:#F7A8BE; box-shadow:0 10px 22px rgba(238,138,166,.28); }
.btn.heart-on .ic{ fill:#fff; stroke:#fff; }

.fav-item{ display:flex; align-items:center; gap:10px; padding:12px 14px; margin-bottom:10px; }
.fav-item p{ flex:1; font-size:13.5px; line-height:1.75; color:var(--plum); }
.fav-item .icon-btn.sm{ background:#FDF2F6; color:#C36A86; }

/* ---------- الإعدادات ---------- */
.field{ display:block; margin-bottom:14px; }
.field > span{ display:block; font-size:13px; font-weight:700; margin-bottom:6px; }
input[type="text"],input[type="date"],textarea,select{
  width:100%; min-height:50px; padding:12px 14px; border-radius:16px;
  border:1px solid var(--line); background:#FCFBFF; color:var(--plum);
  font-size:15px; font-family:inherit; transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea{ min-height:72px; resize:vertical; line-height:1.7; }
input:focus,textarea:focus,select:focus{
  outline:none; border-color:var(--lilac); background:#fff;
  box-shadow:0 0 0 4px rgba(201,184,240,.28);
}
input::placeholder,textarea::placeholder{ color:#B3ADC7; }

.cat-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.cat-chip{
  display:inline-flex; align-items:center; gap:6px; min-height:42px; padding:8px 13px;
  border-radius:14px; border:1.5px solid var(--line); background:#fff;
  font-size:12.5px; font-weight:700; color:var(--muted); cursor:pointer;
  transition:all .16s ease;
}
.cat-chip .ic{ width:16px; height:16px; }
.cat-chip.active{ border-color:var(--c,#7C5CC4); background:var(--s,#F1EAFC); color:var(--c,#7C5CC4); }
.quick-dates{ display:flex; gap:8px; }

.theme-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:10px; }
.theme-swatch{
  border:2px solid transparent; border-radius:16px; padding:9px 4px; background:#FBF9FF;
  cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:6px;
  font-size:10.5px; font-weight:700; color:var(--muted); font-family:inherit; transition:all .18s ease;
}
.theme-swatch .dots{ width:32px; height:32px; border-radius:50%; box-shadow:inset 0 0 0 1px rgba(59,51,85,.07); }
.theme-swatch.active{ border-color:var(--violet); background:#F6F1FF; color:var(--violet); }

.switch-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.switch{
  position:relative; width:54px; height:32px; border-radius:999px; flex:0 0 auto;
  background:#EDE6FB; border:0; cursor:pointer; transition:background .22s ease; padding:0;
}
.switch::after{
  content:''; position:absolute; top:4px; inset-inline-start:4px; width:24px; height:24px;
  border-radius:50%; background:#fff; box-shadow:0 2px 6px rgba(59,51,85,.22);
  transition:transform .22s cubic-bezier(.22,1,.36,1);
}
.switch[aria-checked="true"]{ background:linear-gradient(135deg,#A6E8D2,#63C7A3); }
.switch[aria-checked="true"]::after{ transform:translateX(-22px); }

.quote-foot{ text-align:center; background:linear-gradient(160deg,#FFFFFF,#F7F3FF); }
.quote-foot p:first-child{
  font-family:'Baloo Bhaijaan 2','Tajawal',sans-serif; font-size:15px; font-weight:600; color:var(--violet); line-height:1.8;
}

/* ---------- النوافذ ---------- */
.modal{
  position:fixed; inset:0; z-index:70; display:flex; align-items:flex-end; justify-content:center;
  background:rgba(59,51,85,.3); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  padding:12px; animation:fadeIn .2s ease;
}
.modal.hidden{ display:none !important; }
@keyframes fadeIn{ from{ opacity:0; } to{ opacity:1; } }
.sheet{
  width:100%; max-width:520px; background:#fff; border:1px solid var(--line);
  border-radius:26px; padding:18px; box-shadow:var(--shadow-lg);
  max-height:88dvh; overflow:auto;
  animation:sheetUp .3s cubic-bezier(.22,1,.36,1);
}
.sheet-sm{ max-width:430px; }
@keyframes sheetUp{ from{ transform:translateY(26px); opacity:0; } to{ transform:none; opacity:1; } }
@media (min-width:720px){ .modal{ align-items:center; } }
.sheet-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.sheet-head h2{ font-size:19px; }
.sheet-actions{ display:flex; gap:10px; margin-top:18px; }
.sheet-actions .btn{ flex:1; }
.confirm-title{ font-size:18px; margin-bottom:6px; }
.confirm-msg{ font-size:13.5px; line-height:1.8; }

/* ---------- التوست والاحتفال ---------- */
.toasts{
  position:fixed; inset-inline:0; bottom:98px; z-index:90;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  pointer-events:none; padding:0 16px;
}
.toast{
  max-width:360px; background:#fff; border:1px solid var(--line);
  box-shadow:0 14px 34px rgba(124,92,196,.2); border-radius:16px;
  padding:11px 16px; font-size:13.5px; font-weight:700; color:var(--plum);
  opacity:0; transform:translateY(10px); text-align:center;
  transition:opacity .3s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.toast.in{ opacity:1; transform:none; }

.burst{ position:fixed; inset:0; pointer-events:none; z-index:80; }
.spark{
  position:absolute; left:50%; top:30%; font-size:20px;
  animation:sparkFly .95s ease-out forwards;
}
@keyframes sparkFly{
  0%{ opacity:1; transform:translate(0,0) scale(.55); }
  100%{ opacity:0; transform:translate(var(--x),var(--y)) scale(1.15) rotate(70deg); }
}

/* ---------- شريط التنقل ---------- */
.tabbar{
  position:fixed; inset-inline:0; bottom:0; z-index:50; display:flex; justify-content:center;
  padding:10px 12px 12px; pointer-events:none;
  background:linear-gradient(to top, rgba(250,248,255,.94), rgba(250,248,255,0));
}
.tabbar-inner{
  pointer-events:auto; display:grid; grid-template-columns:repeat(5,1fr); gap:2px;
  width:100%; max-width:480px; padding:6px;
  background:rgba(255,255,255,.92); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  border:1px solid var(--line); border-radius:24px;
  box-shadow:0 12px 30px rgba(124,92,196,.16), inset 0 1px 0 #fff;
}
.tab{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  min-height:56px; padding:6px 2px; border:0; background:none; border-radius:18px;
  color:var(--muted); font-size:10.5px; font-weight:700; cursor:pointer; transition:all .18s ease;
}
.tab .ic{ width:22px; height:22px; }
.tab.active{ background:linear-gradient(180deg,#F5F0FF,#EAE2FB); color:var(--violet); box-shadow:inset 0 1px 0 #fff; }
.tab:active{ transform:scale(.95); }

/* ---------- تقليل الحركة ---------- */
body.reduce-motion .blob,
body.reduce-motion .mascot .mascot-body,
body.reduce-motion .mascot .zzz{ animation:none !important; }
body.reduce-motion .view.active{ animation:none; }
body.reduce-motion .spark{ display:none; }
body.reduce-motion *{ transition-duration:.08s !important; }

@media (prefers-reduced-motion: reduce){
  .blob,.mascot .mascot-body,.mascot .zzz{ animation:none !important; }
  .spark{ display:none; }
  *{ transition-duration:.08s !important; }
}

/* ---------- تجاوب ---------- */
@media (max-width:430px){
  .save-dot{ display:none; }
  .brand h1{ font-size:16.5px; }
  .shell{ padding:12px 13px 120px; }
  .card{ padding:16px; border-radius:24px; }
  .ring-inner,.ring-svg{ width:94px; height:94px; }
  .ach-hero{ gap:12px; }
  .ach-hero .ring-inner,.ach-hero .ring-svg{ width:104px; height:104px; }
  .task-actions .icon-btn.sm{ width:36px; height:36px; }
}
@media (max-width:359px){
  .brand p{ display:none; }
  .theme-grid{ grid-template-columns:repeat(2,1fr); }
  .stat-num{ font-size:20px; }
}
@media (min-width:680px){
  .hero{ padding:24px; }
  .stat-grid{ gap:14px; }
}