/* ==========================================================
   العقل الثاني — أسود وذهبي
   خفيف وسلس: خطوط رفيعة، مساحات، وحركات ناعمة.
   Hail للعناوين والأرقام، وIBM Plex Sans Arabic للنص.
   ========================================================== */

@font-face {
  font-family: 'Hail';
  src: url('fonts/hail.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --surface: #131315;
  --surface-2: #1b1b1e;
  --surface-3: #232327;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eeeae4;
  --muted: #9a958e;
  --faint: #625f5a;

  --gold: #cfae6c;
  --gold-2: #e9d09a;
  --gold-deep: #9c7a3c;
  --gold-soft: rgba(207, 174, 108, .12);
  --gold-line: rgba(207, 174, 108, .35);
  --gold-grad: linear-gradient(135deg, #ecd5a2 0%, #cba65e 55%, #9c7a3c 100%);
  --on-gold: #0a0a0b;

  --danger: #d27a6a;
  --danger-soft: rgba(210, 122, 106, .12);

  --display: 'Hail', 'IBM Plex Sans Arabic', serif;
  --body: 'IBM Plex Sans Arabic', 'Segoe UI', system-ui, sans-serif;

  --r: 22px;
  --r-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tabbar-h: 66px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  background:
    radial-gradient(90% 50% at 100% 0%, rgba(207, 174, 108, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; touch-action: manipulation; text-align: inherit; }
a { color: inherit; }

.ic { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.display { font-family: var(--display); font-weight: 400; font-synthesis: none; }

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
}

/* ---------- الرئيسية ---------- */
.home { display: flex; flex-direction: column; gap: 14px; animation: fadeIn .35s var(--ease); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 2px 0; }
.top-text { min-width: 0; }
.eyebrow { color: var(--muted); font-size: 13px; letter-spacing: .01em; }
.greet {
  margin: 2px 0 6px;
  font-family: var(--display); font-weight: 400; font-synthesis: none;
  font-size: 38px; line-height: 1.2;
  background: linear-gradient(180deg, #f4efe7, #cfc6b8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.sync.ok .sync-dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.sync.busy .sync-dot { background: var(--gold-2); animation: pulse 1s ease-in-out infinite; }
.sync.bad { color: var(--danger); }
.sync.bad .sync-dot { background: var(--danger); }
.sync.demo { color: var(--gold); }
.sync.demo .sync-dot { background: var(--gold); }

.ring { position: relative; width: 76px; height: 76px; flex-shrink: 0; }
.ring svg { width: 76px; height: 76px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: var(--line-2); }
.ring .bar { stroke: url(#goldGrad); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring-label b { font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 24px; color: var(--gold-2); }
.ring-label span { font-size: 10px; color: var(--muted); margin-top: 3px; }

/* بطاقة «من أنا» */
.identity {
  position: relative;
  display: block;
  width: 100%;
  padding: 14px 18px 14px 40px;
  border-right: 2px solid var(--gold);
  border-radius: 4px 16px 16px 4px;
  background: linear-gradient(270deg, var(--gold-soft), transparent 85%);
  transition: transform .2s var(--ease);
}
.identity:active { transform: scale(.985); }
.identity .q { font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 22px; line-height: 1.4; color: var(--text); }
.identity .p { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.identity .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--gold); opacity: .7; }

/* البطاقات الأربع */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 148px;
  padding: 14px 15px 14px;
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .18s var(--ease), border-color .2s;
}
.tile:active { transform: scale(.965); border-color: var(--gold-line); }
.tile-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.tile-head .ic { width: 17px; height: 17px; color: var(--gold); }
.tile-big { margin-top: auto; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 40px; line-height: 1.15; color: var(--text); }
.tile-big small { font-size: 20px; color: var(--muted); }
.tile-big.name { font-size: 25px; line-height: 1.3; }
.tile-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub.gold { color: var(--gold); }
.tile-bar { height: 3px; margin-top: 10px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.tile-bar > div { height: 100%; border-radius: 99px; background: var(--gold-grad); transition: width .6s var(--ease); }
.tile.done { border-color: var(--gold-line); }

/* زر اليومية */
.journal {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px;
  border-radius: 99px;
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold-2);
  font-size: 16px; font-weight: 500;
  transition: transform .15s var(--ease);
}
.journal:active { transform: scale(.98); }
.journal .ic { width: 19px; height: 19px; }
.journal.done { border-color: var(--line); background: transparent; color: var(--muted); }

.demo-link { align-self: center; color: var(--faint); font-size: 12px; padding: 6px 10px; }

/* ---------- صفحة القسم ---------- */
.panel {
  position: fixed; inset: 0;
  z-index: 15;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  transform: translateX(-100%);
  transition: transform .34s var(--ease);
  padding-bottom: calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom));
}
.panel.open { transform: none; }
.panel-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  max-width: 520px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.back {
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
}
.back .ic { width: 20px; height: 20px; }
.panel-titles h1 { margin: 0; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 30px; line-height: 1.2; }
.panel-titles p { margin: 0; font-size: 13px; color: var(--muted); }
.panel-body { max-width: 520px; margin: 0 auto; padding: 4px 18px 0; display: flex; flex-direction: column; gap: 14px; }

.group { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); padding: 6px 16px; }
.group-title { margin: 6px 4px 0; font-size: 12.5px; color: var(--muted); }

/* ---------- الأسطر ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-height: 56px;
  padding: 8px 0;
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
}
.row + .row::before { content: ""; position: absolute; top: 0; inset-inline: 38px 0; height: 1px; background: var(--line); }
.row.no-tap { cursor: default; }
.row-text { flex: 1; min-width: 0; line-height: 1.5; transition: color .25s; }
.row.is-done .row-text { color: var(--faint); }
.task.is-done .row-text { text-decoration: line-through; text-decoration-color: var(--faint); }

.check {
  width: 24px; height: 24px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--faint);
  color: transparent;
  transition: background .25s var(--ease), border-color .25s, transform .25s var(--ease);
}
.check .ic { width: 14px; height: 14px; stroke-width: 3; transform: scale(.3); transition: transform .3s var(--ease); }
.check.auto { border-style: dashed; }
.row:active .check { transform: scale(.88); }
.row.is-done .check { background: var(--gold-grad); border-color: transparent; border-style: solid; color: var(--on-gold); }
.row.is-done .check .ic { transform: scale(1); }

.badge { padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.badge .ic { width: 12px; height: 12px; }

.value { min-width: 56px; padding: 6px 12px; border-radius: 12px; background: var(--surface-2); color: var(--muted); text-align: center; font-size: 13px; }
.value.set { background: var(--gold-soft); color: var(--gold-2); font-family: var(--display); font-synthesis: none; font-size: 19px; padding: 2px 12px; }
.value small { font-size: 12px; opacity: .7; }

.dots { display: flex; gap: 6px; }
.dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-family: var(--display); font-synthesis: none; font-size: 17px; line-height: 1;
  transition: all .2s var(--ease);
}
.dot.on { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); }

.icon-btn { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; color: var(--faint); text-decoration: none; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn .ic { width: 18px; height: 18px; }

.fold {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 48px;
  padding: 0 4px;
  color: var(--muted); font-size: 13.5px;
}
.fold .ic { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.fold.open .ic { transform: rotate(180deg); }

.bar { height: 3px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar > div { height: 100%; border-radius: 99px; background: var(--gold-grad); transition: width .6s var(--ease); }

.empty { color: var(--faint); font-size: 14px; padding: 16px 4px; text-align: center; }
.all-done { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 0; color: var(--gold); font-size: 14px; }
.all-done .ic { width: 18px; height: 18px; }

/* إضافة مهمة */
.add { display: flex; align-items: center; gap: 10px; min-height: 56px; }
.add .plus { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; color: var(--gold); }
.add input {
  flex: 1; min-width: 0;
  height: 44px;
  border: none; outline: none;
  background: none;
  font-size: 16px;
  color: var(--text);
}
.add input::placeholder { color: var(--faint); }
.add button { color: var(--gold); font-weight: 500; padding: 8px 4px; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  border-radius: 99px;
  font-weight: 500; font-size: 15.5px;
  transition: transform .15s var(--ease), opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--gold-grad); color: var(--on-gold); }
.btn.ghost { color: var(--muted); }
.btn.outline { border: 1px solid var(--gold-line); color: var(--gold-2); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 13.5px; }
.btn.block { width: 100%; }

.text-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--muted); font-size: 13px; }
.text-btn .ic { width: 15px; height: 15px; }

/* ---------- التمرين ---------- */
.w-hero { padding: 18px 16px; border-radius: var(--r); background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); }
.segs { display: flex; gap: 5px; margin-bottom: 14px; }
.seg { flex: 1; height: 3px; border-radius: 99px; background: var(--line-2); }
.seg.past { background: var(--gold-deep); }
.seg.now { background: var(--gold-2); }
.w-name { font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 32px; line-height: 1.25; }
.w-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.w-top { display: flex; align-items: center; gap: 12px; }
.w-top .w-text { flex: 1; min-width: 0; }
.play { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold-line); color: var(--gold); }

.w-list { margin: 0; padding: 4px 16px; list-style: none; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.w-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; }
.w-list li + li { border-top: 1px solid var(--line); }
.ex-name { min-width: 0; }
.ex-sets { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ex-tag { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; font-style: normal; font-size: 10.5px; font-weight: 600; background: var(--surface-3); color: var(--muted); }
.ex-tag.t-h { background: var(--gold-soft); color: var(--gold-2); }
.ex-tag.t-m { background: rgba(255, 255, 255, .06); color: var(--text); }

.success { display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: var(--r); border: 1px solid var(--gold-line); background: var(--gold-soft); }
.success > .ic { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--gold-grad); color: var(--on-gold); stroke-width: 3; }
.success b { display: block; font-weight: 500; }
.success span { color: var(--muted); font-size: 13px; }

/* ---------- العادات ---------- */
.habit { display: flex; align-items: center; gap: 16px; padding: 18px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.h-streak { min-width: 74px; text-align: center; line-height: 1; }
.h-streak b { display: block; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 50px; color: var(--gold-2); }
.h-streak span { font-size: 12px; color: var(--muted); }
.h-streak.zero b { color: var(--faint); }
.h-info { flex: 1; min-width: 0; }
.h-name { font-weight: 500; line-height: 1.45; }
.h-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.h-meta em { font-style: normal; color: var(--danger); }

/* ---------- الشريط السفلي ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 20;
  display: flex; justify-content: center;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 10px env(safe-area-inset-bottom);
  background: rgba(10, 10, 11, .82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tab { flex: 1; max-width: 116px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 11px; }
.tab-ic { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 99px; transition: background .25s; }
.tab-ic .ic { width: 21px; height: 21px; }
.tab.active { color: var(--gold); }
.tab.active .tab-ic { background: var(--gold-soft); }

/* ---------- النافذة السفلية ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .6); animation: fadeIn .2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  max-width: 520px; max-height: 92dvh; margin: 0 auto;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #121214;
  border-top: 1px solid var(--line-2);
  animation: up .36s var(--ease);
}
.grab { width: 38px; height: 4px; border-radius: 99px; background: var(--line-2); margin: 0 auto 18px; }
.sheet h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 28px; line-height: 1.25; }
.sheet .sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.sheet .sub bdi { white-space: nowrap; }
.sheet-actions {
  position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom));
  display: flex; gap: 8px;
  margin: 0 -20px; padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, #121214 30%);
}
.sheet-actions .btn.primary { flex: 1; }

.num-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.num { height: 60px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--display); font-synthesis: none; font-size: 26px; transition: all .15s var(--ease); }
.num.on { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); }

.steps { margin: 0 0 8px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding: 14px 46px 14px 0; line-height: 1.75; }
.steps li + li { border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(step, arabic-indic);
  position: absolute; right: 0; top: 13px;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--gold-line);
  color: var(--gold-2); font-family: var(--display); font-size: 18px;
}

.q { margin-bottom: 20px; }
.q label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13.5px; }
.q textarea {
  width: 100%; min-height: 96px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 16px; line-height: 1.85;
  resize: vertical; outline: none;
  transition: border-color .2s;
}
.q textarea:focus { border-color: var(--gold-line); }
.q textarea.big { min-height: 48dvh; }
.q textarea::placeholder { color: var(--faint); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); }
.choice.on { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); }
.att-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.att-actions .btn .ic { width: 17px; height: 17px; }
.att-actions .rec.on { background: var(--danger-soft); border-color: transparent; color: var(--danger); animation: pulse 1.4s ease-in-out infinite; }
.att-status { font-size: 13px; color: var(--gold); }
.att-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.att-grid:empty { display: none; }
.att { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.att img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att.audio { grid-column: 1 / -1; aspect-ratio: auto; display: flex; align-items: center; padding: 8px 44px 8px 8px; }
.att.audio audio { width: 100%; height: 40px; }
.att-load { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--faint); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.att.audio .att-load { position: static; background: none; animation: none; padding: 10px; }
.att-del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; }
.att-del .ic { width: 14px; height: 14px; }

.q .note { padding: 14px; border-radius: 16px; border: 1px dashed var(--line-2); color: var(--faint); font-size: 13.5px; }

.id-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.id-item { padding: 16px 18px; border-radius: 18px; background: var(--surface); border-right: 2px solid var(--gold); }
.id-item b { display: block; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 21px; line-height: 1.45; }
.id-item span { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--gold); font-size: 13px; }
.id-item span .ic { width: 14px; height: 14px; }

.files pre { direction: rtl; white-space: pre-wrap; word-break: break-word; background: var(--surface); border-radius: 12px; padding: 12px; font-size: 12px; line-height: 1.6; max-height: 240px; overflow: auto; color: var(--muted); }
.files h3 { font-size: 13px; margin: 16px 0 6px; color: var(--gold); direction: ltr; text-align: right; font-weight: 500; }

/* ---------- التنبيه ---------- */
.toast {
  position: fixed; left: 50%;
  bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
  z-index: 40;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  width: max-content; max-width: calc(100% - 32px);
  padding: 13px 18px;
  border-radius: 16px;
  background: #1f1f23;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  animation: pop .28s var(--ease);
}
.toast button { color: var(--gold); font-weight: 500; white-space: nowrap; min-height: 32px; }

/* ---------- الدخول والتحميل ---------- */
.gate { min-height: 78dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; color: var(--muted); }
.gate h2 { margin: 18px 0 2px; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 44px; color: var(--text); }
.gate p { margin: 0 0 26px; max-width: 290px; }
.gate .btn { max-width: 320px; }
.gate-icon { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 30px; border: 1px solid var(--gold-line); background: var(--gold-soft); color: var(--gold-2); }
.gate-icon .ic { width: 44px; height: 44px; stroke-width: 1.5; }

.sk { border-radius: 10px; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.sk-line { height: 14px; margin: 8px 0; }
.sk-title { height: 34px; width: 190px; margin: 8px 0; }
.sk-ring { width: 76px; height: 76px; border-radius: 50%; }
.w30 { width: 30%; } .w50 { width: 50%; } .w70 { width: 70%; }
.tile .sk-line { width: 60%; }
.tile .sk-big { height: 36px; width: 50%; margin-top: auto; }

/* ---------- الصفحات ---------- */
.page { display: flex; flex-direction: column; gap: 14px; animation: fadeIn .3s var(--ease); }
.page-head { padding: 6px 2px 2px; }
.page-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 38px; line-height: 1.2; color: var(--text); }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.page-note { margin: 0; text-align: center; color: var(--faint); font-size: 12.5px; }
.group.pad { padding: 16px; }
.sec-title { margin: 0; font-size: 15px; font-weight: 500; color: var(--text); }
.sec-sub { margin: 2px 0 10px; font-size: 12.5px; color: var(--muted); }
.empty:not(div) { margin: 6px 0 0; text-align: start; padding: 0; }

/* شخصيتي */
.identity .q.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 19px; }
.identity .p { margin: 0 0 4px; color: var(--gold); }
.belief-card { padding: 20px 18px; border-radius: var(--r); border: 1px solid var(--gold-line); background: linear-gradient(160deg, rgba(207, 174, 108, .10), var(--surface) 70%); }
.belief-card .label { font-size: 12.5px; color: var(--gold); margin-bottom: 8px; }
.belief p { margin: 0 0 12px; font-size: 18px; line-height: 2.05; color: var(--text); }
.belief-card .btn { margin-top: 6px; }
.read-done { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; color: var(--gold); font-size: 14px; }
.read-done .ic { width: 18px; height: 18px; }
.id-points { margin: 10px 0 0; padding: 0 20px 0 0; display: flex; flex-direction: column; gap: 8px; line-height: 1.8; }
.id-points li::marker { color: var(--gold); }

/* التقويم */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 26px; }
.cal-head .icon-btn { color: var(--muted); }
.cal-head .icon-btn:disabled { opacity: .25; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow span { font-size: 10.5px; color: var(--faint); padding-bottom: 6px; }
.cal-grid .sk { grid-column: 1 / -1; }
.cal-day {
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--display); font-synthesis: none; font-size: 19px;
  color: var(--muted);
  text-align: center;
  transition: transform .15s var(--ease);
}
.cal-day:active { transform: scale(.9); }
.cal-day:disabled { color: var(--faint); opacity: .4; }
.cal-day.has { background: var(--gold-grad); color: var(--on-gold); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold-2); }
.cal-day.has.today { color: var(--on-gold); }
.j-read p { margin: 0 0 12px; font-size: 16.5px; line-height: 2; }
.j-q { margin: 14px 0 4px; font-size: 13px; font-weight: 500; color: var(--gold); }

/* الأداء */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 14px 15px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { margin-top: 6px; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 40px; line-height: 1.1; color: var(--text); }
.stat-sub { font-size: 12px; color: var(--faint); }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 10px; font-family: var(--body); }
.chart .col { fill: var(--gold-deep); transition: fill .15s; }
.chart .col.now { fill: var(--gold-2); }
.chart .hit { fill: transparent; }
.chart .bar-g:hover .col, .chart .bar-g:active .col { fill: var(--gold); }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--gold-2); stroke: var(--surface); stroke-width: 2; }
.chart .end-label { fill: var(--text); font-size: 12px; font-family: var(--body); }
.chart .tip {
  position: absolute; top: -6px;
  transform: translate(-50%, -100%);
  padding: 6px 10px;
  border-radius: 10px;
  background: #26262b;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

.inline-link { color: var(--gold); text-decoration: none; font-size: 13.5px; white-space: nowrap; }

/* ---------- قريبًا ---------- */
.soon { text-align: center; padding: 100px 20px; color: var(--muted); animation: fadeIn .3s var(--ease); }
.soon-icon { width: 76px; height: 76px; margin: 0 auto; display: grid; place-items: center; border-radius: 24px; border: 1px solid var(--gold-line); color: var(--gold); }
.soon-icon .ic { width: 32px; height: 32px; stroke-width: 1.5; }
.soon h2 { margin: 16px 0 4px; color: var(--text); font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 34px; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes shimmer { to { background-position: -200% 0; } }

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