/* جسدي — نظام التصميم */
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url(../fonts/plex-arabic-400.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: 'Plex Arabic'; font-weight: 500; font-display: swap; src: url(../fonts/plex-arabic-500.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url(../fonts/plex-arabic-600.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: 'Plex Arabic'; font-weight: 700; font-display: swap; src: url(../fonts/plex-arabic-700.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url(../fonts/plex-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Arabic'; font-weight: 500; font-display: swap; src: url(../fonts/plex-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url(../fonts/plex-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex Arabic'; font-weight: 700; font-display: swap; src: url(../fonts/plex-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alexandria'; font-weight: 600; font-display: swap; src: url(../fonts/alexandria-arabic-600.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011; }
@font-face { font-family: 'Alexandria'; font-weight: 800; font-display: swap; src: url(../fonts/alexandria-arabic-800.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011; }
@font-face { font-family: 'Alexandria'; font-weight: 600; font-display: swap; src: url(../fonts/alexandria-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Alexandria'; font-weight: 800; font-display: swap; src: url(../fonts/alexandria-latin-800.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  color-scheme: light;
  --bg: #F6FBFA;
  --bg-tint-1: rgba(25, 195, 156, .16);
  --bg-tint-2: rgba(255, 138, 92, .13);
  --bg-tint-3: rgba(140, 123, 247, .14);
  --surface: #FFFFFF;
  --surface-2: #EFF6F4;
  --surface-3: #E3EFEC;
  --ink: #0F2A2B;
  --ink-2: #3D5859;
  --ink-3: #5B7474;
  --line: #D9E7E4;
  --shadow: 0 1px 2px rgba(15, 42, 43, .06), 0 8px 24px -12px rgba(15, 42, 43, .18);
  --shadow-lg: 0 2px 6px rgba(15, 42, 43, .06), 0 24px 48px -20px rgba(15, 42, 43, .28);

  /* اللوحة الحيوية */
  --mint: #19C39C; --mint-soft: #D5F6EC; --mint-ink: #07715A;
  --teal: #13AFC2; --teal-soft: #D3F3F7; --teal-ink: #07697A;
  --coral: #FF6F59; --coral-soft: #FFE3DD; --coral-ink: #B23A26;
  --sun: #FFC23D; --sun-soft: #FFF1CC; --sun-ink: #7F5300;
  --lav: #8C7BF7; --lav-soft: #E9E5FF; --lav-ink: #5540C8;
  --pink: #F76CA6; --pink-soft: #FDE1EE; --pink-ink: #A92A63;

  --ok: #08704C; --ok-soft: #D6F5E7;
  --near: #946000; --near-soft: #FFF0C7;
  --out: #AE2A1F; --out-soft: #FFE1DC;
  --urgent: #B3121F;

  --stage-move: #D5F6EC; --stage-needs: #F4F3FF; --stage-plan: #FFF8F5;
  --primary: var(--mint);
  --primary-ink: #04221B;
  --focus: #1A73E8;

  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-xl: 32px;
  --font: 'Plex Arabic', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --font-head: 'Alexandria', 'Plex Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --fs-xs: .8125rem; --fs-sm: .9rem; --fs: 1.0625rem; --fs-md: 1.125rem; --fs-lg: 1.35rem; --fs-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); --fs-2xl: clamp(2rem, 1.3rem + 3vw, 3.2rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
  --nav-h: 0px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1416; --bg-tint-1: rgba(25, 195, 156, .14); --bg-tint-2: rgba(255, 111, 89, .10); --bg-tint-3: rgba(140, 123, 247, .14);
  --surface: #122023; --surface-2: #182A2E; --surface-3: #203639;
  --ink: #EAF6F3; --ink-2: #B3CBC7; --ink-3: #8EAAA6; --line: #27403F;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 48px -20px rgba(0,0,0,.7);
  --mint: #2EDDB3; --mint-soft: #123A33; --mint-ink: #6BF0CD;
  --teal: #2CC6DA; --teal-soft: #0F3339; --teal-ink: #7FE3F0;
  --coral: #FF8570; --coral-soft: #3D1F1B; --coral-ink: #FFAA9A;
  --sun: #FFCE5C; --sun-soft: #3A2F12; --sun-ink: #FFD980;
  --lav: #A294FF; --lav-soft: #28244A; --lav-ink: #C3B9FF;
  --pink: #FF85B8; --pink-soft: #3E1D2D; --pink-ink: #FFB0D1;
  --ok: #5FE3A8; --ok-soft: #133A2A; --near: #FFD36B; --near-soft: #3A2F12; --out: #FF8C80; --out-soft: #3F1D1A; --urgent: #FF6B6B;
  --primary-ink: #03201A;
  --focus: #8AB4F8;
  --stage-move: #123A33; --stage-needs: #1A1833; --stage-plan: #2A1715;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0B1416; --bg-tint-1: rgba(25, 195, 156, .14); --bg-tint-2: rgba(255, 111, 89, .10); --bg-tint-3: rgba(140, 123, 247, .14);
    --surface: #122023; --surface-2: #182A2E; --surface-3: #203639;
    --ink: #EAF6F3; --ink-2: #B3CBC7; --ink-3: #8EAAA6; --line: #27403F;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 48px -20px rgba(0,0,0,.7);
    --mint: #2EDDB3; --mint-soft: #123A33; --mint-ink: #6BF0CD;
    --teal: #2CC6DA; --teal-soft: #0F3339; --teal-ink: #7FE3F0;
    --coral: #FF8570; --coral-soft: #3D1F1B; --coral-ink: #FFAA9A;
    --sun: #FFCE5C; --sun-soft: #3A2F12; --sun-ink: #FFD980;
    --lav: #A294FF; --lav-soft: #28244A; --lav-ink: #C3B9FF;
    --pink: #FF85B8; --pink-soft: #3E1D2D; --pink-ink: #FFB0D1;
    --ok: #5FE3A8; --ok-soft: #133A2A; --near: #FFD36B; --near-soft: #3A2F12; --out: #FF8C80; --out-soft: #3F1D1A; --urgent: #FF6B6B;
    --primary-ink: #03201A;
    --focus: #8AB4F8;
  --stage-move: #123A33; --stage-needs: #1A1833; --stage-plan: #2A1715;
  }
}

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs); line-height: 1.7; color: var(--ink); background: var(--bg);
  background-image:
    radial-gradient(60vmax 50vmax at 100% -10%, var(--bg-tint-1), transparent 60%),
    radial-gradient(50vmax 45vmax at -10% 20%, var(--bg-tint-3), transparent 60%),
    radial-gradient(55vmax 45vmax at 90% 90%, var(--bg-tint-2), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh; overflow-x: hidden;
  padding-bottom: var(--nav-h);
}
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; margin: 0 0 .4em; font-weight: 800; letter-spacing: 0; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); font-weight: 600; }
h4 { font-size: var(--fs-md); font-weight: 600; }
p { margin: 0 0 .8em; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
img, svg, video, canvas { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; z-index: 100; }
.skip:focus { top: 12px; }
bdi, .ltr { unicode-bidi: isolate; }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
[hidden] { display: none !important; }

/* ---------- الترويسة والتنقل ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; }
.brand svg { width: 34px; height: 34px; }
.brand small { display: block; font-family: var(--font); font-weight: 500; font-size: .7rem; color: var(--ink-3); line-height: 1; margin-top: 2px; }
.nav { display: flex; gap: 6px; margin-inline-start: auto; }
.nav a {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.nav a[data-sec="move"][aria-current="page"] { background: var(--mint); color: var(--primary-ink); }
.nav a[data-sec="needs"][aria-current="page"] { background: var(--coral); color: #2A0A04; }
.nav a[data-sec="plan"][aria-current="page"] { background: var(--lav); color: #150B45; }
.header-tools { display: flex; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .15s var(--ease), background .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

@media (max-width: 820px) {
  :root { --header-h: 58px; --nav-h: 72px; }
  /* backdrop-filter يجعل الترويسة حاوية للعناصر الثابتة، فنلغيه حتى يلتصق شريط التنقل بأسفل الشاشة */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav {
    position: fixed; inset: auto 0 0 0; z-index: 45; margin: 0; justify-content: space-around; gap: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .nav a { flex-direction: column; gap: 2px; padding: 6px 10px; font-size: .72rem; border-radius: 16px; min-width: 64px; }
  .nav a svg { width: 22px; height: 22px; }
  .brand small { display: none; }
  .header-tools { margin-inline-start: auto; }
}

/* ---------- العناصر العامة ---------- */
main { display: block; }
.view { padding-block: 24px 64px; animation: viewIn .5s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero { display: grid; gap: 8px; margin-bottom: 20px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); }
.hero .eyebrow i { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); display: inline-block; }
.hero h1 { margin: 0; }
.hero p { max-width: 62ch; color: var(--ink-2); font-size: var(--fs-md); margin: 0; }

.btn {
  --b: var(--surface); --c: var(--ink); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px;
  background: var(--b); color: var(--c); border: 1px solid var(--bd); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { --b: var(--primary); --c: var(--primary-ink); --bd: transparent; }
.btn.dark { --b: var(--ink); --c: var(--bg); --bd: transparent; }
.btn.coral { --b: var(--coral); --c: #2A0A04; --bd: transparent; }
.btn.lav { --b: var(--lav); --c: #150B45; --bd: transparent; }
.btn.ghost { --b: transparent; --bd: transparent; }
.btn.sm { min-height: 36px; padding: 6px 14px; font-size: var(--fs-sm); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 600; line-height: 1.3;
}
.chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--mint)); flex: none; }
button.chip { cursor: pointer; }
button.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .x { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 10%, transparent); font-size: 12px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow);
  position: relative;
}
.card.accent { border-top: 5px solid var(--c, var(--mint)); }
.card h3 { margin-bottom: .2em; }
.lead { font-size: var(--fs-md); font-weight: 600; color: var(--ink); margin-bottom: .6em; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 40px 0 14px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }
.section-title p { margin: 0; color: var(--ink-2); }
.list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list-dot { padding-inline-start: 1.1em; margin: 0; display: grid; gap: 6px; }
.list-dot li::marker { color: var(--c, var(--mint)); }

/* ---------- الكشف التدريجي ---------- */
details.more { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 8px; }
details.more > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--teal-ink); padding: 6px 0; min-height: 36px;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ""; width: 8px; height: 8px; border-inline-start: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-2px); transition: transform .2s var(--ease); }
details.more[open] > summary::after { transform: rotate(135deg) translateY(-2px); }
details.more .body { display: grid; gap: 12px; padding-top: 6px; animation: viewIn .35s var(--ease); }

/* ---------- التبويبات ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: var(--surface-2); border-radius: 999px; scrollbar-width: none; width: fit-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a {
  border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 600; color: var(--ink-2); white-space: nowrap; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; gap: 6px;
}
.tabs [aria-selected="true"], .tabs [aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- شارات ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ev-strong { background: var(--ok-soft); color: var(--ok); }
.ev-moderate { background: var(--near-soft); color: var(--near); }
.ev-limited { background: var(--surface-3); color: var(--ink-2); }
.lv-1 { background: var(--mint-soft); color: var(--mint-ink); }
.lv-2 { background: var(--sun-soft); color: var(--sun-ink); }
.lv-3 { background: var(--coral-soft); color: var(--coral-ink); }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-near { background: var(--near-soft); color: var(--near); }
.st-out { background: var(--out-soft); color: var(--out); }
.badge.plain::before { display: none; }

/* ---------- المسرح ثلاثي الأبعاد ---------- */
.stage {
  position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 420px; height: min(78vh, 760px);
  background:
    radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--surface) 90%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--mint-soft) 80%, var(--surface)), color-mix(in srgb, var(--lav-soft) 85%, var(--surface)));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  touch-action: none;
}
.stage canvas { width: 100% !important; height: 100% !important; cursor: grab; }
.stage canvas.dragging { cursor: grabbing; }
.stage canvas.pointing { cursor: pointer; }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); font-weight: 600; }
.stage-loading .spin { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--mint); animation: spin 1s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-tools { position: absolute; top: 12px; inset-inline: 12px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; flex-wrap: wrap; }
.stage-tools > * { pointer-events: auto; }
.seg { display: inline-flex; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); border-radius: 999px; padding: 3px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.zoom { position: absolute; bottom: 14px; inset-inline-end: 12px; display: grid; gap: 6px; }
.zoom .icon-btn { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); }
.stage-hint { position: absolute; bottom: 16px; inset-inline-start: 16px; font-size: var(--fs-xs); color: var(--ink-2); background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 6px 10px; border-radius: 999px; max-width: 60%; }
.tip3d {
  position: absolute; pointer-events: none; z-index: 5; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: var(--fs-sm);
  transform: translate(-50%, calc(-100% - 14px)); white-space: nowrap; box-shadow: var(--shadow); display: flex; align-items: center; gap: 6px; opacity: 0; transition: opacity .15s;
}
.tip3d.show { opacity: 1; }
.tip3d i { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- القسم الأول ---------- */
.move-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; align-items: start; }
.move-layout .stage-col { position: sticky; top: calc(var(--header-h) + 12px); }
@media (max-width: 980px) {
  .move-layout { grid-template-columns: 1fr; }
  .move-layout .stage-col { position: relative; top: 0; }
  .stage { height: 64vh; min-height: 380px; }
}
.tray {
  margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tray .label { font-weight: 800; font-family: var(--font-head); display: flex; align-items: center; gap: 6px; }
.tray .chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.tray .empty { color: var(--ink-3); font-size: var(--fs-sm); }

.muscle-card { animation: viewIn .45s var(--ease); }
.muscle-card .head { display: flex; gap: 12px; align-items: flex-start; }
.muscle-card .dot { width: 48px; height: 48px; border-radius: 16px; background: var(--c); flex: none; display: grid; place-items: center; box-shadow: inset 0 -6px 12px rgba(0,0,0,.12); }
.muscle-card .dot svg { width: 30px; height: 30px; color: rgba(0,0,0,.55); }
.muscle-card .sci { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 500; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .signs { grid-template-columns: 1fr; } }
.signs > div { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }
.signs h4 { font-size: var(--fs-sm); margin-bottom: 4px; }
.pill-note svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--teal-ink); }
.pill-note { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); padding: 10px 14px; border-radius: var(--r); font-size: var(--fs-sm); }

.ex-card { display: grid; grid-template-columns: 148px 1fr; gap: 14px; padding: 12px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid transparent; align-items: start; }
.ex-card:hover { border-color: var(--line); }
@media (max-width: 520px) { .ex-card { grid-template-columns: 1fr; } }
.ex-card h4 { margin: 0 0 2px; }
.ex-card .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.ex-card ol { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; font-size: var(--fs-sm); }

.media { margin: 0;
  position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: #EEF6F3;
  isolation: isolate;
}
:root[data-theme="dark"] .media { background: #EEF6F3; }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }
.media .play {
  position: absolute; inset-inline-end: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(15, 42, 43, .78); color: #fff; display: grid; place-items: center;
}
.media .play svg { width: 18px; height: 18px; }
.media .pending { position: absolute; inset: auto 6px 6px 6px; font-size: .68rem; background: rgba(255,255,255,.9); color: #3D5859; border-radius: 8px; padding: 2px 6px; text-align: center; }

.muscle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.m-tile {
  display: grid; gap: 6px; justify-items: center; text-align: center; padding: 12px 10px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s var(--ease); position: relative; color: var(--ink);
}
.m-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.m-tile svg { width: 72px; height: 132px; }
.m-tile b { font-size: var(--fs-sm); }
.m-tile .add { position: absolute; top: 8px; inset-inline-end: 8px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; font-weight: 800; }
.m-tile .add[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- المؤقت والجلسة ---------- */
.player {
  position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: grid; grid-template-rows: auto 1fr auto; animation: viewIn .35s var(--ease);
}
.player header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.player .progress { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.player .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--teal)); width: 0; transition: width .4s var(--ease); }
.player .body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 8px 24px; width: min(1100px, 100%); margin: 0 auto; overflow: auto; }
@media (max-width: 820px) { .player .body { grid-template-columns: 1fr; gap: 12px; padding: 4px 16px; } }
.player .media { max-width: 440px; width: 100%; margin: 0 auto; box-shadow: var(--shadow-lg); }
@media (max-width: 820px) { .player .media { max-width: min(360px, 46vh); } }
.player .info { display: grid; gap: 10px; justify-items: center; text-align: center; }
.player .phase { font-weight: 700; color: var(--ink-2); }
.player .ex-name { font-size: var(--fs-xl); font-family: var(--font-head); font-weight: 800; margin: 0; }
.ring { position: relative; width: 180px; height: 180px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 3rem; }
.ring .num small { display: block; font-size: .9rem; font-family: var(--font); color: var(--ink-2); font-weight: 600; text-align: center; margin-top: -8px; }
.player footer { display: flex; justify-content: center; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
.next-up { font-size: var(--fs-sm); color: var(--ink-2); }

/* ---------- الاحتفال ---------- */
.celebrate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); }
.celebrate canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.celebrate .card { text-align: center; max-width: 420px; animation: pop .5s var(--ease); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.medal { width: 96px; height: 96px; margin: 0 auto 8px; }

/* ---------- القسم الثاني ---------- */
.needs-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.needs-layout .stage-col { position: sticky; top: calc(var(--header-h) + 12px); }
@media (max-width: 980px) { .needs-layout { grid-template-columns: 1fr; } .needs-layout .stage-col { position: relative; top: 0; } }
.organ-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.basics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 620px) { .basics { grid-template-columns: 1fr; } }
.basics > div { border-radius: var(--r); padding: 12px 14px; background: var(--surface-2); display: grid; gap: 4px; }
.basics b { display: flex; align-items: center; gap: 8px; }
.basics svg { width: 22px; height: 22px; }
.nut-card .top { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.nut-card .use { font-size: var(--fs-sm); color: var(--ink-2); }
.forms { display: grid; gap: 8px; }
.form-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); }
.form-row .tag { font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.tag-best { background: var(--ok-soft); color: var(--ok); }
.tag-ok { background: var(--surface-3); color: var(--ink-2); }
.tag-weak { background: var(--out-soft); color: var(--out); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: var(--fs-sm); }
.kv dt { font-weight: 700; color: var(--ink-2); }
.kv dd { margin: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; } }
.warn { border-radius: var(--r); padding: 12px 14px; background: var(--out-soft); color: var(--ink); border-inline-start: 4px solid var(--out); }
.warn h4 { color: var(--out); font-size: var(--fs-sm); margin-bottom: 4px; }
.info-box { border-radius: var(--r); padding: 12px 14px; background: var(--teal-soft); border-inline-start: 4px solid var(--teal); }

table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
table.data th, table.data td { padding: 10px 12px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data th { background: var(--surface-2); font-weight: 700; position: sticky; top: 0; }
table.data tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.en { font-size: .82em; color: var(--ink-3); }

.ages-track { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.ages-track button { flex: 1 0 auto; min-width: 88px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 12px; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; }
.ages-track button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 820px) { .cols3 { grid-template-columns: 1fr; } }
.col-box { border-radius: var(--r-lg); padding: 16px; }
.col-box h4 { display: flex; align-items: center; gap: 8px; }
.col-box.rec { background: var(--ok-soft); }
.col-box.chk { background: var(--teal-soft); }
.col-box.skip { background: var(--out-soft); }

/* ---------- القسم الثالث ---------- */
.wizard { max-width: 860px; margin: 0 auto; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps i { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); }
.steps i.on { background: linear-gradient(90deg, var(--lav), var(--pink)); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.opt {
  position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface); cursor: pointer; text-align: start;
  transition: border-color .2s, transform .15s var(--ease), background .2s;
}
.opt:hover { transform: translateY(-1px); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt b { font-size: var(--fs-md); }
.opt span { font-size: var(--fs-sm); color: var(--ink-2); }
.opt:has(input:checked) { border-color: var(--lav); background: var(--lav-soft); }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt.flag:has(input:checked) { border-color: var(--out); background: var(--out-soft); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.input, select.input { min-height: 46px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); width: 100%; }
input[type="range"] { width: 100%; accent-color: var(--lav); }
.age-out { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; line-height: 1; }
.bodymap-wrap { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
@media (max-width: 620px) { .bodymap-wrap { grid-template-columns: 1fr; justify-items: center; } }
.bodymap { width: 220px; }
.bodymap svg { width: 100%; height: auto; }
.bodymap .rg { cursor: pointer; transition: opacity .2s, filter .2s; }
.bodymap .rg:hover { filter: brightness(1.08) saturate(1.2); }
.bodymap .rg:focus-visible { outline: none; stroke: var(--focus); stroke-width: 3; }
.alert { border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 6px; }
.alert.urgent { background: var(--urgent); color: #fff; }
.alert.urgent a { color: #fff; }
.alert.caution { background: var(--out-soft); border: 2px solid var(--out); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1080px) { .week { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); } }
.day { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); padding: 12px; display: grid; gap: 8px; align-content: start; box-shadow: var(--shadow); }
.day .dn { font-family: var(--font-head); font-weight: 800; }
.day .type { font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: 99px; width: fit-content; }
.t-stretch { background: var(--mint-soft); color: var(--mint-ink); }
.t-strength { background: var(--coral-soft); color: var(--coral-ink); }
.t-recovery { background: var(--lav-soft); color: var(--lav-ink); }
.day ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.day li { display: flex; gap: 8px; align-items: center; }
.day li img { width: 34px; height: 34px; border-radius: 10px; flex: none; background: #EEF6F3; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .phases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .phases { grid-template-columns: 1fr; } }
.phase-card { border-radius: var(--r-lg); padding: 14px; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--c); }
.result-row { display: grid; grid-template-columns: 1.4fr 1fr .8fr auto; gap: 8px; align-items: end; }
@media (max-width: 720px) { .result-row { grid-template-columns: 1fr 1fr; } }
.result-out { border-radius: var(--r); padding: 12px 14px; background: var(--surface-2); display: grid; gap: 4px; }
.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + 12px); z-index: 20; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow-lg); width: fit-content; margin: 20px auto 0; backdrop-filter: blur(10px); }

/* ---------- المتعة ---------- */
.fact { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, var(--sun-soft), var(--pink-soft)); border-radius: var(--r-lg); padding: 16px 18px; }
.fact .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--sun); display: grid; place-items: center; flex: none; color: #3A2600; }
.fact .ic svg { width: 26px; height: 26px; }
.quiz .q { font-weight: 700; font-size: var(--fs-md); }
.quiz .opts { display: grid; gap: 8px; margin-top: 10px; }
.quiz .opts button { text-align: start; padding: 12px 14px; border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); font-weight: 600; min-height: 48px; }
.quiz .opts button.right { border-color: var(--ok); background: var(--ok-soft); }
.quiz .opts button.wrong { border-color: var(--out); background: var(--out-soft); }
.quiz .why { margin-top: 10px; }
.badges-row { display: flex; gap: 10px; flex-wrap: wrap; }
.bdg { display: grid; justify-items: center; gap: 4px; width: 92px; text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.bdg .m { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); }
.bdg .m svg { width: 28px; height: 28px; }
.bdg.on .m { background: conic-gradient(from 200deg, var(--mint), var(--teal), var(--lav), var(--pink), var(--sun), var(--mint)); color: #10292A; box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--lav) 60%, transparent); }
.bdg.on { color: var(--ink); }
.challenge { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.challenge button { aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; display: grid; place-items: center; }
.challenge button.done { background: var(--mint); color: var(--primary-ink); border-color: var(--mint); }
.challenge button.today { border-color: var(--ink); }

/* ---------- التذييل ---------- */
.src-line { margin-top: 36px; text-align: center; font-size: var(--fs-sm); color: var(--ink-2); }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; margin-top: 40px; font-size: var(--fs-sm); color: var(--ink-2); }
.site-footer .wrap { display: grid; gap: 12px; }
.disclaimer { display: flex; gap: 10px; align-items: flex-start; }
.disclaimer svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--teal-ink); }
.toast { position: fixed; bottom: calc(var(--nav-h) + 20px); left: 50%; transform: translateX(-50%); z-index: 95; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-lg); animation: viewIn .3s var(--ease); max-width: calc(100% - 32px); text-align: center; }

/* ---------- ظهور تدريجي ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
:root.no-motion *, :root.no-motion *::before, :root.no-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
:root.no-motion .reveal { opacity: 1; transform: none; }

/* =====================================================================
   تصميم v2 (Claude Design — «استوديو الحركة» + خريطة العضلات)
   ===================================================================== */
.brand-word { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; color: var(--ink); text-decoration: none; }
.brand-word i { width: 11px; height: 11px; border-radius: 50%; background: var(--mint); display: inline-block; box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 25%, transparent); }
.nav a.text-link { font-weight: 500; }
.pill-btn { height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 8px; }
.pill-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 820px) { .pill-btn .lbl { display: none; } .pill-btn { width: 42px; padding: 0; justify-content: center; } }

/* ---------- الافتتاح ---------- */
.hero2 { position: relative; overflow: hidden; padding-block: 28px 12px; }
.hero2 .wordmark { position: absolute; inset-inline: 0; top: -2vw; text-align: center; font-family: var(--font-head); font-weight: 800; font-size: clamp(9rem, 26vw, 24rem); line-height: 1; color: color-mix(in srgb, var(--mint) 7%, transparent); pointer-events: none; user-select: none; z-index: 0; }
.hero2 .grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) auto minmax(0, .5fr); gap: 32px; align-items: center; }
.hero2 h1 { font-size: clamp(2.4rem, 1.2rem + 3.2vw, 4rem); line-height: 1.12; margin: 0 0 14px; text-wrap: balance; }
.hero2 h1 span { color: var(--mint-ink); }
.hero2 .sub { font-size: var(--fs-md); color: var(--ink-2); max-width: 36ch; margin: 0 0 22px; }
.orb { width: clamp(280px, 34vw, 480px); aspect-ratio: 1; border-radius: 50%; background: var(--surface); box-shadow: 0 40px 80px -48px rgba(15, 42, 43, .45); display: grid; grid-template-columns: 1fr 1fr; gap: 6%; padding: 11% 15%; position: relative; }
.orb::after { content: ""; position: absolute; inset: auto 12% -9% 12%; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, var(--stage-move), transparent); z-index: -1; }
.orb svg { width: 100%; height: 100%; }
.hero-index { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hero-index a { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.hero-index .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); }
.hero-index b { display: block; line-height: 1.2; }
.hero-index small { color: var(--ink-3); font-size: var(--fs-xs); }
@media (max-width: 980px) {
  .hero2 .grid { grid-template-columns: 1fr; justify-items: start; }
  .hero2 .orb { justify-self: center; width: min(78vw, 340px); order: -1; }
  .hero-index { grid-template-columns: repeat(3, 1fr); width: 100%; }
  .hero-index a { grid-template-columns: 1fr; justify-items: start; }
}

/* ---------- مساحة العمل: قائمة | منصة | لوحة ---------- */
.ws-section { padding-block: 20px 8px; }
.workspace {
  display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(0, 420px); min-height: min(86vh, 860px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden;
}
.ws-nav { padding: 22px 18px; border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ws-nav .eyebrow { font-size: var(--fs-sm); color: var(--mint-ink); font-weight: 600; }
.ws-nav h2 { font-size: clamp(1.7rem, 1.2rem + 1.2vw, 2.3rem); margin: 0; line-height: 1.15; }
.m-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.m-list button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 14px; border: 0; background: transparent; color: var(--ink); text-align: start; font-weight: 500; min-height: 42px; }
.m-list button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.m-list button .tick { margin-inline-start: auto; color: var(--mint-ink); font-weight: 800; }
.m-list button:hover { background: var(--surface-2); }
.m-list button[aria-current="true"] { background: color-mix(in srgb, var(--c) 22%, var(--surface)); font-weight: 700; }
.ws-stage { position: relative; background: linear-gradient(180deg, var(--surface-2), color-mix(in srgb, var(--stage-move) 55%, var(--surface))); display: flex; flex-direction: column; min-width: 0; }
.ws-stage .toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 16px 16px 0; flex-wrap: wrap; position: relative; z-index: 3; }
.ws-stage .toolbar .grp { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ws-stage .stage { flex: 1; border: 0; border-radius: 0; background: transparent; box-shadow: none; height: auto; min-height: 460px; }
.map-stage { position: absolute; inset: 8px 8% 96px; display: grid; grid-template-columns: 1fr 1fr; gap: 6%; align-items: center; }
.map-stage figure { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; justify-items: center; min-height: 0; }
.map-stage svg { height: 100%; width: auto; max-width: 100%; }
.map-stage figcaption { font-size: var(--fs-xs); color: var(--ink-3); }
.mm .rg { cursor: pointer; transition: opacity .18s var(--ease), filter .18s var(--ease); }
.mm .rg:hover { filter: saturate(1.25) brightness(1.04); }
.mm .rg:focus-visible { outline: none; }
.mm .rg:focus-visible > * { stroke: var(--focus) !important; stroke-width: 5; }
.map-tip { position: absolute; z-index: 5; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: var(--fs-sm); box-shadow: var(--shadow); pointer-events: none; display: flex; gap: 6px; align-items: center; transform: translate(-50%, -130%); white-space: nowrap; }
.map-tip i { width: 10px; height: 10px; border-radius: 50%; }
.tray2 { position: absolute; inset-inline: 16px; bottom: 16px; z-index: 4; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 22px; background: #10292A; color: #EAF6F3; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .55); }
.tray2 .label { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; }
.tray2 .chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.tray2 .chip { background: rgba(255, 255, 255, .08); color: #EAF6F3; border-color: rgba(255, 255, 255, .14); }
.tray2 .chip.mint { color: #6BF0CD; }
.tray2 .empty { color: #A9C2BF; font-size: var(--fs-sm); }
.tray2 select { background: rgba(255, 255, 255, .08); color: #EAF6F3; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; padding: 6px 12px; min-height: 38px; }
.tray2 select option { color: #10292A; }
.tray2 .btn.primary { --b: #2EDDB3; --c: #03201A; }
.ws-panel { border-inline-start: 1px solid var(--line); padding: 22px 22px 22px; overflow-y: auto; max-height: min(86vh, 860px); background: var(--surface); min-width: 0; }
.ws-panel .close { display: none; }
@media (max-width: 1180px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); }
  .ws-nav { grid-column: 1 / -1; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .m-list { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: thin; }
  .m-list button { width: auto; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; min-height: 40px; padding: 6px 14px; }
}
@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; border-radius: var(--r-lg); min-height: 0; }
  .ws-stage .stage { min-height: 62vh; }
  .ws-panel {
    position: fixed; inset: auto 0 0 0; z-index: 60; max-height: 86vh; border-radius: 28px 28px 0 0; border: 0; box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .35);
    transform: translateY(105%); transition: transform .32s var(--ease); padding: 12px 18px calc(24px + env(safe-area-inset-bottom));
  }
  .ws-panel.open { transform: none; }
  .ws-panel::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 10px; }
  .ws-panel .close { display: grid; }
  .ws-panel .intro-card { display: none; }
}

/* ---------- بطاقة العضلة (لوح) ---------- */
.pcard h2 { font-size: clamp(1.8rem, 1.3rem + 1.3vw, 2.4rem); margin: 0; line-height: 1.15; }
.pcard .title-row { display: flex; gap: 12px; align-items: flex-start; }
.pcard .title-row .bar { width: 8px; align-self: stretch; min-height: 44px; border-radius: 99px; background: var(--c); flex: none; }
.pcard .sci { color: var(--ink-3); font-size: var(--fs-sm); }
.pcard .func { color: var(--ink-2); margin: 10px 0 12px; }
.sign-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.sign-boxes > div { border-radius: 16px; padding: 12px 14px; }
.sign-boxes h4 { font-size: var(--fs-sm); margin: 0 0 4px; }
.sign-boxes ul { margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); display: grid; gap: 2px; }
.sign-boxes .tight { background: var(--sun-soft); } .sign-boxes .tight h4 { color: var(--sun-ink); }
.sign-boxes .weak { background: var(--pink-soft); } .sign-boxes .weak h4 { color: var(--pink-ink); }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pill-tabs button { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 7px 14px; border-radius: 999px; font-weight: 600; min-height: 40px; }
.pill-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg-lv { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.seg-lv button { border: 0; background: transparent; padding: 8px; border-radius: 999px; font-weight: 600; color: var(--ink-2); min-height: 40px; }
.seg-lv button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--surface); text-align: start; padding: 0; color: var(--ink); display: grid; cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .anim { aspect-ratio: 1.05; background: var(--surface-2); display: grid; place-items: center; padding: 6px; }
.tile .anim jasadi-move { width: 100%; height: 100%; }
.tile .meta2 { padding: 10px 12px 12px; display: grid; gap: 2px; }
.tile .meta2 b { font-size: var(--fs-sm); line-height: 1.35; }
.tile .meta2 span { color: var(--ink-3); font-size: var(--fs-xs); }
.panel-cta { position: sticky; bottom: -22px; padding: 14px 0 0; background: linear-gradient(transparent, var(--surface) 30%); margin-top: 12px; }
.panel-cta .btn { width: 100%; min-height: 50px; }

/* ---------- نافذة التمرين ---------- */
.exm .card { width: min(820px, 100% - 24px); max-height: 90vh; overflow: auto; text-align: start; padding: 0; }
.exm .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.exm .vis { background: var(--stage-move); display: grid; place-items: center; padding: 18px; min-height: 280px; position: relative; }
.exm .vis jasadi-move { width: 100%; max-width: 340px; aspect-ratio: 1; }
.exm .vis .media { width: 100%; max-width: 340px; }
.exm .txt { padding: 22px; display: grid; gap: 10px; align-content: start; }
.exm .txt h2 { font-size: var(--fs-xl); margin: 0; }
.exm .switch { position: absolute; top: 12px; inset-inline-start: 12px; }
@media (max-width: 680px) { .exm .cols { grid-template-columns: 1fr; } }

/* ---------- المشغّل الداكن ---------- */
.player { background: #0E2224; color: #EAF6F3; --ink: #EAF6F3; --ink-2: #B3CBC7; --surface: #152B2E; --surface-2: #1B3336; --surface-3: #24403F; --line: #2B4747; }
.player .btn { --b: #1B3336; --c: #EAF6F3; --bd: #2B4747; }
.player .btn.dark, .player .btn.play-main { --b: #2EDDB3; --c: #03201A; --bd: transparent; }
.player .icon-btn { background: #1B3336; color: #EAF6F3; border-color: #2B4747; }
.player .progress { background: rgba(255, 255, 255, .1); }
.player .body { grid-template-columns: minmax(0, 260px) minmax(0, 1fr) minmax(0, 1fr); }
.player .plist { display: grid; gap: 8px; align-content: start; max-height: 70vh; overflow: auto; }
.player .plist h3 { font-size: var(--fs-md); margin: 0 0 4px; }
.player .plist .it { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; }
.player .plist .it img { width: 46px; height: 46px; border-radius: 10px; background: #EEF6F3; }
.player .plist .it.on { background: rgba(46, 221, 179, .14); outline: 1px solid rgba(46, 221, 179, .45); }
.player .plist .it small { color: #A9C2BF; display: block; font-size: var(--fs-xs); }
.player .info { justify-items: start; text-align: start; }
.player .steps-ol { margin: 0; padding-inline-start: 1.2em; color: #B3CBC7; display: grid; gap: 4px; }
.player .ctrl-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.player .ring { width: 150px; height: 150px; }
@media (max-width: 1080px) { .player .body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .player .plist { display: none; } }
@media (max-width: 820px) { .player .body { grid-template-columns: 1fr; } .player .info { justify-items: center; text-align: center; } .player .ring { width: 130px; height: 130px; } }

/* ---------- القسم الثاني ---------- */
.stage-needs-bg { background: color-mix(in srgb, var(--stage-needs) 70%, var(--bg)); }
.stage-plan-bg { background: color-mix(in srgb, var(--stage-plan) 80%, var(--bg)); }
.workspace.needs { grid-template-columns: 320px minmax(0, 1fr) minmax(0, 420px); }
.workspace.needs .ws-nav .eyebrow { color: var(--lav-ink); }
.workspace.needs .ws-nav .stage { min-height: 360px; height: 380px; border-radius: 22px; background: linear-gradient(180deg, var(--surface), var(--stage-needs)); }
.ws-mid { padding: 22px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; background: color-mix(in srgb, var(--stage-needs) 45%, var(--surface)); }
.nut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ncard { border: 2px solid transparent; border-radius: 20px; padding: 14px 16px; background: var(--surface); text-align: start; color: var(--ink); display: grid; gap: 4px; box-shadow: var(--shadow); cursor: pointer; }
.ncard b { font-size: 1.05rem; font-family: var(--font-head); line-height: 1.3; }
.ncard span.use { color: var(--ink-3); font-size: var(--fs-xs); }
.ncard .badge { justify-self: start; }
.ncard[aria-current="true"] { border-color: var(--lav); }
.dose-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dose-tiles > div { border-radius: 18px; padding: 12px 14px; background: var(--surface-2); }
.dose-tiles > div:first-child { background: var(--lav-soft); }
.dose-tiles small { color: var(--ink-2); display: block; font-size: var(--fs-xs); }
.dose-tiles b { font-family: var(--font-head); font-size: 1.05rem; line-height: 1.35; display: block; }
.form-line { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.form-line.best { background: var(--mint-soft); border-color: transparent; }
.row-kv { display: flex; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.row-kv span { color: var(--ink-2); }
.org-sum { background: var(--surface); border-radius: 20px; padding: 14px 16px; border-top: 5px solid var(--c); box-shadow: var(--shadow); }
@media (max-width: 1180px) { .workspace.needs { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); } .workspace.needs .ws-nav { grid-column: 1 / -1; } .workspace.needs .ws-nav .stage { height: 320px; min-height: 0; } }
@media (max-width: 820px) { .workspace.needs { grid-template-columns: 1fr; } .nut-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .nut-grid, .tiles { grid-template-columns: 1fr 1fr; gap: 8px; } }

/* ---------- القسم الثالث ---------- */
.wizard .card { border-radius: var(--r-xl); padding: clamp(18px, 3vw, 32px); }
.wizard h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.6rem) !important; line-height: 1.2; }
.steps i { height: 8px; }
.steps i.on { background: var(--coral); }
.opt { border-radius: 18px; }
.opt:has(input:checked) { border-color: var(--coral); background: var(--coral-soft); }
.plan-head { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); line-height: 1.1; margin: 0; }
.plan-head small { display: block; font-size: var(--fs-sm); color: var(--coral-ink); font-family: var(--font); font-weight: 600; }
.phase-card { border-top: 0; background: color-mix(in srgb, var(--coral) calc(var(--k, 1) * 18%), var(--surface)); }

/* ---------- المصادر ---------- */
.src-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.src-side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 8px; }
.src-side a { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.src-side a:hover, .src-side a.on { background: var(--mint-soft); color: var(--mint-ink); font-weight: 700; }
.src-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 820px) { .src-layout { grid-template-columns: 1fr; } .src-side { position: static; grid-template-columns: repeat(2, 1fr); } .src-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .player .body > .media-box { order: -1; } }
a.chip { text-decoration: none; }
.dose-tiles b { font-family: var(--font); font-weight: 700; font-size: .95rem; line-height: 1.55; }
.wz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; max-width: 1100px; margin: 0 auto; }
.wz-side { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 18px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.wz-side .kv { grid-template-columns: max-content 1fr; }
.wz-side .maps { display: flex; gap: 10px; justify-content: center; }
.wz-side .maps svg { width: 90px; height: auto; }
@media (max-width: 980px) { .wz-grid { grid-template-columns: 1fr; } .wz-side { display: none; } }
.wizard { max-width: none; }
#wz-title:focus { outline: none; }
@media (max-width: 820px) { .ws-panel.open { box-shadow: 0 0 0 100vmax rgba(8, 20, 22, .35), 0 -20px 60px -20px rgba(0,0,0,.35); } }
