/* ==========================================================
   منصة «أثر في كل بيت» — ملف التصميم
   ========================================================== */

/* ---------- الخط العربي المرفق (Cairo Play) ---------- */
@font-face { font-family: "Cairo Play"; src: url("assets/fonts/CairoPlay-light.woff") format("woff"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Cairo Play"; src: url("assets/fonts/CairoPlay-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cairo Play"; src: url("assets/fonts/CairoPlay-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cairo Play"; src: url("assets/fonts/CairoPlay-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cairo Play"; src: url("assets/fonts/CairoPlay-bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cairo Play"; src: url("assets/fonts/CairoPlay-extrabold.woff") format("woff"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Cairo Play"; src: url("assets/fonts/CairoPlay-black.woff") format("woff"); font-weight: 900; font-display: swap; }

:root {
  --ink: #0E3B4F;
  --ink-2: #3D5A6B;
  --ink-3: #6A8190;
  --sky: #1FA5DD;
  --sky-d: #0F7FB0;
  --sky-l: #E3F4FB;
  --leaf: #8CC63F;
  --leaf-d: #2D8F5B;
  --leaf-l: #EEF7E2;
  --sand: #F6EBD9;
  --sand-d: #E9CFA6;
  --cream: #FBF8F2;
  --sun: #F2B544;
  --rose: #E46F8E;
  --clay: #C0563E;
  --card: #FFFFFF;
  --line: #E8E1D3;
  --shadow-s: 0 2px 8px rgba(14, 59, 79, .06);
  --shadow: 0 10px 30px -12px rgba(14, 59, 79, .22), 0 2px 6px rgba(14, 59, 79, .05);
  --shadow-l: 0 30px 60px -24px rgba(14, 59, 79, .35);
  --r: 22px;
  --r-s: 14px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --t: .45s;
  --wrap: 1180px;
  --top-h: 64px;
  --bottom-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0; font-family: "Cairo Play", system-ui, "Segoe UI", Tahoma, sans-serif; font-weight: 400;
  color: var(--ink); background: var(--cream); line-height: 1.75; font-size: 16.5px;
  padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom));
  overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--sky-d); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .4em; font-weight: 800; }
p { margin: 0 0 .8em; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 18px; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.skip { position: absolute; inset-inline-start: 10px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 10px; }
.skip:focus { top: 10px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 20px; text-align: center; background: #fff3cd; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; text-decoration: none;
  padding: .7em 1.3em; border-radius: 999px; font-weight: 700; font-size: 1rem; line-height: 1.3;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s; -webkit-tap-highlight-color: transparent;
  min-height: 46px;
}
.btn:active { transform: scale(.96); }
.btn-lg { padding: .85em 1.6em; font-size: 1.06rem; }
.btn-sm { padding: .45em 1em; min-height: 38px; font-size: .92rem; }
.btn-primary { background: linear-gradient(135deg, var(--leaf-d), #3DA86B); color: #fff; box-shadow: 0 10px 24px -10px rgba(45, 143, 91, .8); }
.btn-primary:hover { box-shadow: 0 14px 28px -10px rgba(45, 143, 91, .9); transform: translateY(-2px); }
.btn-sky { background: linear-gradient(135deg, var(--sky), var(--sky-d)); color: #fff; box-shadow: 0 10px 24px -10px rgba(15, 127, 176, .8); }
.btn-sky:hover { transform: translateY(-2px); }
.btn-ghost { background: rgba(255, 255, 255, .8); color: var(--ink); box-shadow: inset 0 0 0 2px rgba(14, 59, 79, .12); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: #fff; transform: translateY(-2px); }
.btn-soft { background: var(--sand); color: var(--ink); }
.btn-soft:hover { background: var(--sand-d); }
.btn-wa { background: #25D366; color: #073B1E; }
.btn-wa:hover { background: #2fe072; }
.btn-ghost-light { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-done { background: var(--leaf-l); color: var(--leaf-d); box-shadow: inset 0 0 0 2px var(--leaf); }
.iconbtn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: inline-grid; place-items: center;
  background: rgba(14, 59, 79, .06); color: var(--ink); transition: background .2s, transform .2s;
}
.iconbtn:hover { background: rgba(14, 59, 79, .12); }
.iconbtn:active { transform: scale(.92); }
.iconbtn[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- الشريط العلوي ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(251, 248, 242, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(14, 59, 79, .06); }
.topbar-in { display: flex; align-items: center; gap: 12px; height: var(--top-h); max-width: var(--wrap); margin-inline: auto; padding-inline: 14px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); flex: 0 1 auto; min-width: 0; }
.brand-mark { flex: none; }
.brand-mark svg { width: 42px; height: 42px; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; white-space: nowrap; overflow: hidden; }
.brand-txt b, .brand-txt small { overflow: hidden; text-overflow: ellipsis; }
.brand-txt b { font-size: 1.06rem; font-weight: 900; }
.brand-txt small { font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.mainnav { display: none; flex: 1; justify-content: center; gap: 2px; }
.mainnav a { text-decoration: none; color: var(--ink-2); padding: 8px 11px; border-radius: 999px; font-weight: 600; font-size: .9rem; transition: background .2s, color .2s; white-space: nowrap; }
.mainnav a:hover { background: rgba(14, 59, 79, .06); }
.mainnav a[aria-current="page"] { background: var(--ink); color: #fff; }
.tools { display: flex; align-items: center; gap: 5px; margin-inline-start: auto; flex: none; }
.chip-stage { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 6px 12px 6px 10px; background: var(--leaf-l); color: var(--leaf-d); font-weight: 700; font-size: .82rem; min-height: 38px; white-space: nowrap; }
.chip-stage .ico { width: 1.1em; height: 1.1em; }
.journey-bar { height: 3px; background: transparent; }
.journey-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--leaf), var(--sky)); border-radius: 0 3px 3px 0; transition: width .8s var(--ease); margin-inline-start: 0; }

/* ---------- القائمة الجانبية ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(14, 59, 79, .35); backdrop-filter: blur(3px); }
.drawer-panel { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(88vw, 360px); background: var(--cream); padding: 16px; overflow-y: auto; animation: slideIn .35s var(--ease); box-shadow: var(--shadow-l); }
@keyframes slideIn { from { transform: translateX(-100%); } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.drawer-head img { width: 54px; height: auto; border-radius: 10px; }
.drawer-head div { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.drawer-head b { font-size: .92rem; }
.drawer-head small { color: var(--ink-3); font-size: .8rem; }
.drawer-nav { display: grid; gap: 4px; }
.drawer-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 700; }
.drawer-nav a .ico { color: var(--leaf-d); }
.drawer-set { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.set-btn { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; border: 0; background: #fff; font-weight: 700; text-align: start; box-shadow: var(--shadow-s); }
.set-btn .ico { color: var(--sky-d); }
.set-btn em { margin-inline-start: auto; font-style: normal; font-size: .8rem; color: var(--ink-3); background: var(--sand); border-radius: 999px; padding: 0 10px; }
.drawer-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.drawer-nav a[aria-current="page"] .ico { color: var(--leaf); }

/* ---------- التنقل السفلي (الهاتف) ---------- */
.bottomnav { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgba(14, 59, 79, .08); padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -16px rgba(14, 59, 79, .3); }
.bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink-3); font-size: .72rem; font-weight: 700; background: none; border: 0; position: relative; -webkit-tap-highlight-color: transparent; }
.bottomnav .ico { width: 24px; height: 24px; transition: transform .3s var(--ease); }
.bottomnav [aria-current="page"] { color: var(--leaf-d); }
.bottomnav [aria-current="page"] .ico { transform: translateY(-2px); }
.bottomnav [aria-current="page"]::before { content: ""; position: absolute; top: 6px; width: 40px; height: 30px; border-radius: 14px; background: var(--leaf-l); z-index: -1; }

/* ---------- الواجهات وانتقالاتها ---------- */
.view { animation: viewIn .55s var(--ease); min-height: 60vh; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }
.page-head { position: relative; padding: 34px 0 26px; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 200px at 85% 0%, var(--ph-c, rgba(31, 165, 221, .14)), transparent 70%), radial-gradient(500px 220px at 10% 100%, rgba(140, 198, 63, .14), transparent 70%); z-index: -1; }
.page-head .crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); text-decoration: none; font-weight: 700; font-size: .88rem; margin-bottom: 10px; }
.page-head h1 { font-size: clamp(1.7rem, 5.5vw, 2.6rem); font-weight: 900; display: flex; align-items: center; gap: 12px; }
.page-head h1 .ph-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--ink); color: #fff; flex: none; }
.page-head h1 .ph-ico .ico { width: 28px; height: 28px; }
.page-head p.lead { color: var(--ink-2); max-width: 680px; font-size: 1.03rem; }
.stage-note { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 8px 6px 14px; box-shadow: var(--shadow-s); font-size: .88rem; font-weight: 600; color: var(--ink-2); flex-wrap: wrap; }
.stage-note b { color: var(--leaf-d); }
.stage-note button { border: 0; background: var(--sand); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .82rem; }

/* ---------- الواجهة الرئيسية ---------- */
.hero { position: relative; overflow: hidden; padding: 22px 0 10px; }
.hero-bg { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(31, 165, 221, .18), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, rgba(140, 198, 63, .2), transparent 60%),
    linear-gradient(180deg, #FDF9F1, var(--cream)); }
.hero-bg::after { content: ""; position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(rgba(14, 59, 79, .09) 1px, transparent 1.4px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%); }
.hero-grid { display: grid; gap: 10px; align-items: center; }
.hero-school { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; animation: rise .8s var(--ease) both; }
.school-logo { width: 74px; height: auto; border-radius: 14px; background: #fff; padding: 4px; box-shadow: var(--shadow); }
.hero-school span { font-weight: 800; font-size: .98rem; color: var(--ink-2); max-width: 220px; line-height: 1.45; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--leaf-d); border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: .88rem; box-shadow: var(--shadow-s); animation: rise .8s .08s var(--ease) both; }
.eyebrow .ico { color: var(--sun); }
.hero-title { font-size: clamp(2.5rem, 11vw, 4.6rem); font-weight: 900; line-height: 1.25; margin: .2em 0 .1em; letter-spacing: -.5px;
  background: linear-gradient(120deg, var(--ink) 10%, var(--sky-d) 55%, var(--leaf-d) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .8s .14s var(--ease) both; padding-bottom: .1em; }
.motto { font-size: clamp(1.08rem, 3.8vw, 1.35rem); font-weight: 700; color: var(--ink-2); animation: rise .8s .2s var(--ease) both; }
.motto em { font-style: normal; color: var(--leaf-d); }
.welcome { color: var(--ink-2); background: rgba(255, 255, 255, .7); border-inline-start: 4px solid var(--sun); padding: 12px 16px; border-radius: 4px 16px 16px 4px; max-width: 560px; animation: rise .8s .26s var(--ease) both; font-size: .98rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; animation: rise .8s .32s var(--ease) both; }
.hero-cta .btn { flex: 1 1 200px; }
.hero-visual { animation: rise 1s .2s var(--ease) both; max-width: 560px; margin-inline: auto; width: 100%; }
.hero-art { -webkit-mask-image: radial-gradient(farthest-side at 50% 40%, #000 78%, transparent 100%); mask-image: radial-gradient(farthest-side at 50% 40%, #000 78%, transparent 100%); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.hero-art .h-tree { transform-origin: 260px 312px; animation: sway 6s ease-in-out infinite; }
.hero-art .h-fruits circle { animation: twinkle 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-art .h-fruits circle:nth-child(2n) { animation-delay: 1s; }
.hero-art .h-fruits circle:nth-child(3n) { animation-delay: 2s; }
.hero-art .h-roots path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 2.6s .4s var(--ease) forwards; }
.hero-art .h-dots circle { animation: pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-art .h-hearts { animation: floatUp 4s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .6; } }
@keyframes floatUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.block { padding: 30px 0 10px; }
.block-head { margin-bottom: 18px; }
.block-head h2 { font-size: clamp(1.4rem, 4.6vw, 2rem); font-weight: 900; position: relative; display: inline-block; }
.block-head h2::after { content: ""; display: block; width: 56px; height: 5px; border-radius: 5px; margin-top: 6px; background: linear-gradient(90deg, var(--leaf), var(--sky)); }
.block-head p { color: var(--ink-2); margin: 0; }

/* بطاقة قيمة الأسبوع */
.week-spot { position: relative; margin-top: 18px; border-radius: 28px; overflow: hidden; color: #fff; background: var(--ink); box-shadow: var(--shadow-l); isolation: isolate; }
.week-spot::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 300px at 100% 0%, var(--wc, var(--sky)), transparent 70%), radial-gradient(400px 260px at 0% 100%, rgba(140, 198, 63, .45), transparent 70%); opacity: .85; }
.ws-in { display: grid; gap: 18px; padding: 24px 20px; }
.ws-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .86rem; width: max-content; }
.ws-title { display: flex; align-items: center; gap: 14px; margin: 10px 0 6px; }
.ws-title .v-ico { width: 64px; height: 64px; border-radius: 20px; background: #fff; display: grid; place-items: center; color: var(--wc, var(--sky)); flex: none; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .3); }
.ws-title .v-ico .ico { width: 36px; height: 36px; }
.ws-title h2 { font-size: clamp(2rem, 8vw, 2.8rem); font-weight: 900; margin: 0; }
.ws-def { opacity: .92; font-size: 1.02rem; }
.ws-quote { font-weight: 800; font-size: 1.1rem; color: #FFE3A3; }
.ws-ch { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 20px; padding: 18px; backdrop-filter: blur(4px); }
.ws-ch h3 { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.ws-ch p { margin: 0 0 12px; opacity: .95; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* بطاقات المراحل */
.stage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stage-card { position: relative; border: 0; text-align: start; background: #fff; border-radius: var(--r); padding: 18px 14px 16px; box-shadow: var(--shadow); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); isolation: isolate; display: flex; flex-direction: column; gap: 6px; min-height: 170px; }
.stage-card::before { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; inset-inline-end: -50px; top: -50px; background: var(--sc); opacity: .14; z-index: -1; transition: transform .5s var(--ease); }
.stage-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.stage-card:hover::before { transform: scale(1.4); }
.stage-card .s-ico { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--sc); color: #fff; }
.stage-card .s-ico .ico { width: 28px; height: 28px; }
.stage-card b { font-size: 1.02rem; line-height: 1.35; font-weight: 800; }
.stage-card small { color: var(--ink-3); font-size: .84rem; line-height: 1.5; }
.stage-card[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--sc), var(--shadow); }
.stage-card[aria-pressed="true"]::after { content: "مرحلتك"; position: absolute; top: 12px; inset-inline-end: 12px; background: var(--sc); color: #fff; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 2px 10px; }

/* شبكة الاستكشاف */
.explore-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ex-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; background: #fff; border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-s); border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; overflow: hidden; }
.ex-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.ex-card .e-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--ec, var(--sky-l)); color: var(--ink); }
.ex-card .e-ico .ico { width: 26px; height: 26px; }
.ex-card b { font-size: 1rem; }
.ex-card small { color: var(--ink-3); line-height: 1.55; font-size: .84rem; }

/* ---------- قسم القيم ---------- */
.value-strip { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.v-pill { scroll-snap-align: start; flex: none; display: flex; align-items: center; gap: 8px; border: 0; background: #fff; border-radius: 999px; padding: 8px 14px 8px 10px; box-shadow: var(--shadow-s); font-weight: 700; color: var(--ink); transition: all .3s var(--ease); position: relative; }
.v-pill .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--vc); color: #fff; }
.v-pill .dot .ico { width: 18px; height: 18px; }
.v-pill small { font-size: .72rem; color: var(--ink-3); font-weight: 600; display: block; line-height: 1.1; }
.v-pill span { display: flex; flex-direction: column; text-align: start; line-height: 1.3; }
.v-pill[aria-selected="true"] { background: var(--vc); color: #fff; box-shadow: 0 8px 20px -8px var(--vc); }
.v-pill[aria-selected="true"] small { color: rgba(255, 255, 255, .85); }
.v-pill[aria-selected="true"] .dot { background: #fff; color: var(--vc); }
.v-pill.is-current::after { content: ""; position: absolute; top: 4px; inset-inline-end: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 2px #fff; }
.v-pill.locked { opacity: .55; }

.value-detail { display: grid; gap: 16px; animation: viewIn .5s var(--ease); }
.vd-hero { position: relative; border-radius: 28px; overflow: hidden; background: #fff; box-shadow: var(--shadow); display: grid; }
.vd-art { position: relative; background: linear-gradient(135deg, var(--vc), var(--vd)); min-height: 180px; display: grid; place-items: center; color: #fff; overflow: hidden; }
.vd-art .big-ico { width: 110px; height: 110px; border-radius: 34px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; animation: floatUp 5s ease-in-out infinite; }
.vd-art .big-ico .ico { width: 64px; height: 64px; }
.vd-art .ring { position: absolute; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .25); }
.vd-art .ring.r1 { width: 220px; height: 220px; animation: spin 40s linear infinite; }
.vd-art .ring.r2 { width: 320px; height: 320px; animation: spin 60s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.vd-art .wk { position: absolute; top: 14px; inset-inline-start: 14px; background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: .82rem; }
.vd-body { padding: 20px; }
.vd-body h2 { font-size: clamp(1.8rem, 6vw, 2.4rem); font-weight: 900; color: var(--vc); margin-bottom: .2em; }
.vd-quote { position: relative; font-weight: 800; font-size: 1.08rem; padding: 12px 16px; border-radius: 16px; background: var(--vl); color: var(--vt); }
.vd-grid { display: grid; gap: 14px; }
.panel { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-s); border: 1px solid var(--line); }
.panel h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.panel h3 .hi { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--hc, var(--sky-l)); color: var(--ink); flex: none; }
.panel h3 .hi .ico { width: 20px; height: 20px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: var(--leaf-l) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D8F5B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center/14px no-repeat; }
.panel.story-panel { background: linear-gradient(135deg, #FFF8EA, #fff); }
.panel.q-panel { background: linear-gradient(135deg, var(--sky-l), #fff); }
.archive-note { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .88rem; margin-top: 6px; }

/* ---------- تحدي الأسرة ---------- */
.ch-summary { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-s); margin-bottom: 16px; flex-wrap: wrap; }
.ch-summary .ring-prog { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--leaf-d) calc(var(--p) * 1%), var(--sand) 0); display: grid; place-items: center; flex: none; }
.ch-summary .ring-prog span { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 900; font-size: .95rem; }
.ch-summary p { margin: 0; flex: 1; min-width: 180px; }
.local-note { display: flex; gap: 10px; align-items: flex-start; background: #FFF8EA; border: 1px dashed #E8C98E; border-radius: 16px; padding: 12px 14px; font-size: .9rem; color: #7A5A22; margin-bottom: 16px; }
.local-note .ico { flex: none; margin-top: 3px; }
.ch-grid { display: grid; gap: 14px; }
.ch-card { position: relative; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; border-top: 6px solid var(--vc); }
.ch-card.is-done { box-shadow: 0 0 0 2px var(--leaf), var(--shadow); }
.ch-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
.ch-head .c-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--vl); color: var(--vc); display: grid; place-items: center; flex: none; }
.ch-head .c-ico .ico { width: 28px; height: 28px; }
.ch-head h3 { margin: 0; font-size: 1.15rem; }
.ch-head small { color: var(--ink-3); font-weight: 600; font-size: .82rem; display: flex; gap: 6px; flex-wrap: wrap; }
.ch-head small i { font-style: normal; background: var(--vl); color: var(--vt); padding: 0 8px; border-radius: 999px; }
.ch-body { padding: 0 16px 16px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: flex; gap: 10px; align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--vc); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; margin-top: 2px; }
.stage-tip { display: flex; gap: 8px; background: var(--leaf-l); border-radius: 14px; padding: 10px 12px; font-size: .92rem; margin-bottom: 10px; }
.stage-tip .ico { color: var(--leaf-d); flex: none; margin-top: 3px; }
.reflect { background: var(--sky-l); border-radius: 14px; padding: 10px 12px; font-size: .92rem; margin-bottom: 12px; }
.reflect b { display: block; color: var(--sky-d); }
.done-stamp { position: absolute; top: 14px; inset-inline-end: 14px; background: var(--leaf-d); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: .78rem; font-weight: 800; display: flex; align-items: center; gap: 4px; animation: pop .5s var(--ease); }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.15); } }

/* ---------- القصص ---------- */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.st-card { border: 0; padding: 0; text-align: start; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .4s var(--ease), box-shadow .4s; display: flex; flex-direction: column; }
.st-card:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: var(--shadow-l); }
.st-card .scene { width: 100%; aspect-ratio: 2 / 1; height: auto; }
.st-card .st-txt { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.st-card .tag { align-self: flex-start; font-size: .76rem; font-weight: 800; padding: 1px 10px; border-radius: 999px; background: var(--sand); color: #8A5A22; }
.st-card b { font-size: 1.12rem; }
.st-card small { color: var(--ink-3); }
.st-card .read-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--leaf-d); font-weight: 700; font-size: .8rem; }

.book { background: #FFFDF7; border-radius: 20px; overflow: hidden; }
.book .scene { width: 100%; aspect-ratio: 2 / 1; height: auto; }
.book-in { padding: 18px 20px 20px; }
.book-in h2 { font-size: 1.6rem; font-weight: 900; }
.book-text { font-size: 1.12rem; line-height: 2.05; color: #2A3B45; }
.book-text.kg { font-size: 1.28rem; }
.lesson { display: flex; gap: 10px; background: linear-gradient(135deg, #FFF1D2, #FFF8EA); border-radius: 16px; padding: 12px 14px; margin: 14px 0 10px; font-weight: 700; }
.lesson .ico { color: #C9822A; flex: none; margin-top: 4px; }
.discuss { background: var(--sky-l); border-radius: 16px; padding: 12px 14px; }
.discuss b { color: var(--sky-d); display: flex; align-items: center; gap: 6px; }
.tts-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 14px; }
.tts-note { font-size: .86rem; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.book-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- الألعاب ---------- */
.games-hub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.g-card { border: 0; position: relative; text-align: start; padding: 16px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; overflow: hidden; transition: transform .35s var(--ease); isolation: isolate; min-height: 160px; }
.g-card::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 40%; inset-inline-end: -40px; bottom: -50px; background: var(--gc); opacity: .16; z-index: -1; transform: rotate(20deg); transition: transform .6s var(--ease); }
.g-card:hover { transform: translateY(-4px); }
.g-card:hover::after { transform: rotate(80deg) scale(1.2); }
.g-card .g-ico { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--gc); color: #fff; }
.g-card .g-ico .ico { width: 28px; height: 28px; }
.g-card b { font-size: 1.02rem; }
.g-card small { color: var(--ink-3); font-size: .82rem; line-height: 1.5; }
.g-card .g-done { position: absolute; top: 12px; inset-inline-end: 12px; color: var(--leaf-d); }

.game-shell { background: #fff; border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; animation: viewIn .45s var(--ease); }
.game-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, var(--gc), var(--gd)); color: #fff; }
.game-top h2 { margin: 0; font-size: 1.15rem; flex: 1; }
.game-top .iconbtn { background: rgba(255, 255, 255, .18); color: #fff; }
.game-top .score { background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: .88rem; display: flex; align-items: center; gap: 4px; }
.game-body { padding: 18px 16px 20px; }
.progress-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.progress-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--sand); transition: all .3s; }
.progress-dots i.on { background: var(--gc); width: 26px; border-radius: 6px; }
.progress-dots i.ok { background: var(--leaf); }
.q-card { text-align: center; }
.q-card .q-val { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .82rem; border-radius: 999px; padding: 2px 12px; background: var(--vl, var(--sky-l)); color: var(--vt, var(--ink)); }
.q-card h3 { font-size: 1.25rem; margin: 10px 0 16px; line-height: 1.6; }
.opts { display: grid; gap: 10px; }
.opt { border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 14px 16px; font-weight: 700; text-align: start; display: flex; align-items: center; gap: 12px; transition: all .25s var(--ease); min-height: 56px; }
.opt .ol { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); font-weight: 900; font-size: .9rem; }
.opt:hover:not([disabled]) { border-color: var(--gc, var(--sky)); transform: translateX(-3px); }
.opt.right { border-color: var(--leaf); background: var(--leaf-l); }
.opt.right .ol { background: var(--leaf-d); color: #fff; }
.opt.soft { border-color: #F2C9A0; background: #FFF6EC; }
.opt[disabled] { cursor: default; }
.feedback { margin-top: 14px; border-radius: 16px; padding: 14px 16px; text-align: start; animation: viewIn .4s var(--ease); display: flex; gap: 12px; }
.feedback .fb-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.feedback.good { background: var(--leaf-l); }
.feedback.good .fb-ico { background: var(--leaf-d); color: #fff; }
.feedback.think { background: #FFF6EC; }
.feedback.think .fb-ico { background: #E8A33D; color: #fff; }
.feedback b { display: block; }
.game-foot { display: flex; justify-content: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.result { text-align: center; padding: 10px 0; }
.result .r-art { width: 140px; margin: 0 auto 6px; }
.result h3 { font-size: 1.5rem; }

/* المطابقة */
.match-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-col { display: grid; gap: 10px; align-content: start; }
.match-col h4 { text-align: center; font-size: .9rem; color: var(--ink-3); margin: 0; }
.m-item { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 10px; font-weight: 700; min-height: 58px; transition: all .25s var(--ease); font-size: .95rem; line-height: 1.45; }
.m-item.val { background: var(--cream); }
.m-item.sel { border-color: var(--gc); box-shadow: 0 0 0 4px var(--gl); transform: scale(1.03); }
.m-item.ok { border-color: var(--leaf); background: var(--leaf-l); color: var(--leaf-d); cursor: default; }
.m-item.no { animation: shake .4s; border-color: #E8A33D; }
@keyframes shake { 25% { transform: translateX(5px); } 50% { transform: translateX(-5px); } 75% { transform: translateX(3px); } }
.hint { text-align: center; color: var(--ink-3); font-size: .9rem; margin-bottom: 12px; }

/* العجلة */
.wheel-area { display: grid; gap: 16px; justify-items: center; }
.wheel-box { position: relative; width: min(88vw, 340px); aspect-ratio: 1; }
.wheel-svg { width: 100%; height: 100%; filter: drop-shadow(0 14px 24px rgba(14, 59, 79, .25)); }
.wheel-svg text { font-family: "Cairo Play", sans-serif; }
.wheel-rot { transform-origin: 160px 160px; transition: transform 4.2s cubic-bezier(.12, .7, .14, 1); }
.wheel-pin { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid var(--sun); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); z-index: 2; }
.wheel-res { width: 100%; max-width: 560px; }

/* صندوق المواقف */
.box-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mbox { border: 0; aspect-ratio: 1; border-radius: 20px; background: linear-gradient(145deg, var(--bc), var(--bd)); color: #fff; display: grid; place-items: center; position: relative; transition: transform .35s var(--ease); box-shadow: var(--shadow); font-weight: 900; font-size: 1.6rem; }
.mbox::before { content: ""; position: absolute; inset: 44% 0 auto; height: 12%; background: rgba(255, 255, 255, .25); }
.mbox::after { content: ""; position: absolute; inset: 0 44% 0; width: 12%; background: rgba(255, 255, 255, .25); }
.mbox span { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--ink); display: grid; place-items: center; font-size: 1.1rem; }
.mbox:hover { transform: translateY(-4px) rotate(-2deg); }
.mbox.opened { opacity: .45; }
.mbox.opened span { background: var(--leaf-l); color: var(--leaf-d); }
.box-open { animation: boxOpen .55s var(--ease); }
@keyframes boxOpen { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
.sit-card { background: var(--cream); border-radius: 20px; padding: 18px; border: 2px dashed var(--sand-d); }
.sit-card h3 { display: flex; align-items: center; gap: 8px; }
.answer-area { display: grid; gap: 8px; margin: 12px 0; }
.answer-area textarea { width: 100%; min-height: 80px; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; resize: vertical; background: #fff; }

/* الذاكرة */
.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; perspective: 900px; max-width: 560px; margin-inline: auto; }
.mem-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.mem { border: 0; padding: 0; background: none; aspect-ratio: 3 / 4; position: relative; transform-style: preserve-3d; transition: transform .5s var(--ease); }
.mem.flip, .mem.done { transform: rotateY(180deg); }
.mem .face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; padding: 6px; box-shadow: var(--shadow-s); }
.mem .back { background: linear-gradient(145deg, var(--leaf-d), var(--sky-d)); color: rgba(255, 255, 255, .9); }
.mem .back .ico { width: 34%; height: 34%; }
.mem .front { background: #fff; transform: rotateY(180deg); border: 2px solid var(--vc, var(--line)); text-align: center; font-weight: 800; font-size: .86rem; line-height: 1.35; flex-direction: column; gap: 4px; display: flex; align-items: center; justify-content: center; }
.mem .front .ico { width: 40%; height: 40%; color: var(--vc); }
.mem.done .front { background: var(--vl); }
.mem-stats { display: flex; justify-content: center; gap: 16px; margin-bottom: 12px; font-weight: 700; color: var(--ink-2); }

/* رحلة الأثر */
.path { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; margin: 4px 0 18px; }
.station { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--ink-3); text-align: center; position: relative; }
.station .st-dot { width: 50px; height: 50px; border-radius: 50%; background: #fff; border: 3px dashed var(--line); display: grid; place-items: center; color: var(--ink-3); transition: all .4s var(--ease); }
.station .st-dot .ico { width: 24px; height: 24px; }
.station.cur .st-dot { border: 3px solid var(--vc); color: var(--vc); transform: scale(1.12); box-shadow: 0 0 0 6px var(--vl); }
.station.cur { color: var(--ink); }
.station.ok .st-dot { background: var(--vc); border: 3px solid var(--vc); color: #fff; }
.traveler { animation: floatUp 2s ease-in-out infinite; }

/* ---------- دقيقة تربوية ---------- */
.tips-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tip-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow-s); border: 1px solid var(--line); overflow: hidden; transition: box-shadow .3s, transform .3s var(--ease); }
.tip-card:hover { box-shadow: var(--shadow); }
.tip-card summary { list-style: none; cursor: pointer; padding: 16px; display: flex; gap: 12px; align-items: center; }
.tip-card summary::-webkit-details-marker { display: none; }
.tip-card .t-ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #FFF1D2, #FFE0A3); color: #A66A12; flex: none; }
.tip-card summary b { flex: 1; font-size: 1.04rem; line-height: 1.5; }
.tip-card summary .chev { transition: transform .3s; color: var(--ink-3); }
.tip-card[open] summary .chev { transform: rotate(90deg); }
.tip-card .t-body { padding: 0 16px 16px; animation: viewIn .4s var(--ease); }
.tip-card .t-tip { color: var(--ink-2); }
.tip-card .t-time { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--ink-3); font-weight: 700; }

/* ---------- بصمتي في المنزل ---------- */
.fp-grid { display: grid; gap: 16px; }
.form-card { background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 20px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .field legend { font-weight: 800; font-size: .95rem; }
.field .opt-l { font-weight: 600; color: var(--ink-3); font-size: .82rem; }
.field input, .field select, .field textarea { width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 11px 14px; background: var(--cream); transition: border-color .2s, background .2s; min-height: 48px; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--sky); background: #fff; }
.field fieldset, fieldset.field { min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chips label { cursor: pointer; position: relative; }
.field .chips input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; padding: 0; inset-inline-start: 50%; top: 50%; }
.chips span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--cream); border: 2px solid var(--line); font-weight: 700; font-size: .9rem; transition: all .2s; }
.chips input:checked + span { background: var(--vc, var(--ink)); border-color: var(--vc, var(--ink)); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.counter { font-size: .78rem; color: var(--ink-3); text-align: end; }
.form-status { border-radius: 16px; padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.form-status.pending { background: #FFF8EA; border: 1px dashed #E8C98E; color: #7A5A22; }
.form-status.active { background: var(--leaf-l); color: var(--leaf-d); }
.form-status .ico { flex: none; margin-top: 3px; }
.privacy-box { background: var(--sky-l); border-radius: 20px; padding: 18px; }
.privacy-box h3 { display: flex; gap: 8px; align-items: center; font-size: 1.05rem; }
.preview-card { background: linear-gradient(135deg, #FFFDF7, #FFF4DE); border: 2px solid var(--sand-d); border-radius: 22px; padding: 18px; margin-top: 14px; animation: viewIn .5s var(--ease); }
.preview-card h3 { display: flex; gap: 8px; align-items: center; }
.preview-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 12px; }
.preview-card dt { font-weight: 800; color: var(--ink-3); }
.preview-card dd { margin: 0; }

/* ---------- مكتبة القيم ---------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.lib-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow-s); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .35s; }
.lib-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.lib-thumb { aspect-ratio: 210 / 140; background: linear-gradient(135deg, var(--lc), var(--ld)); display: grid; place-items: center; position: relative; overflow: hidden; }
.lib-thumb .sheet { height: 80%; aspect-ratio: 210 / 297; background: #fff; border-radius: 6px; box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .35); transform: rotate(-4deg); display: grid; place-items: center; color: var(--lc); transition: transform .4s var(--ease); }
.lib-card:hover .sheet { transform: rotate(0) scale(1.05); }
.lib-thumb .sheet .ico { width: 44%; height: 44%; }
.lib-thumb .a4 { position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(255, 255, 255, .9); color: var(--ink); border-radius: 8px; font-size: .72rem; font-weight: 800; padding: 0 8px; }
.lib-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lib-body b { font-size: 1.04rem; }
.lib-body small { color: var(--ink-3); flex: 1; }
.lib-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- حديقة القيم ---------- */
.garden-top { display: grid; gap: 14px; margin-bottom: 16px; }
.g-stat { background: #fff; border-radius: var(--r); padding: 16px; box-shadow: var(--shadow-s); display: flex; align-items: center; gap: 14px; }
.g-meter { flex: 1; height: 14px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.g-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), var(--leaf-d)); border-radius: 999px; transition: width 1s var(--ease); }
.garden { position: relative; border-radius: 30px; overflow: hidden; padding: 70px 14px 24px; background: linear-gradient(180deg, #D9F1FB 0%, #EAF6E1 34%, #CFE5A9 34%, #B7D88A 100%); box-shadow: var(--shadow); isolation: isolate; }
.garden::before { content: ""; position: absolute; top: 18px; inset-inline-end: 26px; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle, #FFE08A 40%, rgba(255, 224, 138, 0) 70%); animation: pulse 5s ease-in-out infinite; z-index: -1; }
.garden .g-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.garden .g-sky svg { width: 100%; height: 50%; }
.bed { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 6px; }
.slot { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 16px; transition: transform .3s var(--ease); }
.slot:hover { transform: translateY(-3px); }
.slot .plant { width: 100%; max-width: 120px; height: auto; overflow: visible; }
.slot .plant .grow { transform-origin: 60px 134px; animation: growUp 1.2s var(--ease) both; }
.slot .plant .bloom { transform-box: fill-box; transform-origin: center; animation: bloom 1.4s .5s var(--ease) both; }
.slot .plant .seed-g { animation: floatUp 3s ease-in-out infinite; }
@keyframes growUp { from { transform: scaleY(.2); opacity: 0; } }
@keyframes bloom { from { transform: scale(0); } }
.slot .lbl { font-size: .78rem; font-weight: 800; color: #3A5A2A; background: rgba(255, 255, 255, .75); border-radius: 999px; padding: 0 10px; }
.slot .stg { display: flex; gap: 3px; }
.slot .stg i { width: 7px; height: 7px; border-radius: 50%; background: rgba(58, 90, 42, .2); }
.slot .stg i.on { background: var(--leaf-d); }
.garden-done { text-align: center; background: linear-gradient(135deg, #FFF1D2, #fff); border: 2px solid #F2D48F; border-radius: 24px; padding: 20px; margin-top: 16px; animation: viewIn .6s var(--ease); }
.garden-done h3 { font-size: 1.3rem; color: #9A6412; }
.how-grow { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 16px; }
.how-grow div { background: #fff; border-radius: 18px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-s); font-size: .9rem; font-weight: 600; }
.how-grow .ico { color: var(--leaf-d); width: 28px; height: 28px; }
.stage-legend { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 12px; font-size: .82rem; color: var(--ink-2); font-weight: 700; }

/* ---------- حصاد الأثر ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; scrollbar-width: thin; }
.tab { flex: none; border: 0; background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; box-shadow: var(--shadow-s); display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.tab .n { background: rgba(14, 59, 79, .08); border-radius: 999px; padding: 0 8px; font-size: .78rem; }
.tab[aria-selected="true"] .n { background: rgba(255, 255, 255, .2); }
.hv-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.hv-card { background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-s); }
.hv-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sand); }
.hv-card div { padding: 14px 16px; }
.hv-card time { font-size: .8rem; color: var(--ink-3); font-weight: 700; }
.empty-harvest { text-align: center; padding: 40px 20px; border-radius: 28px; background: linear-gradient(180deg, #fff, #F6F1E6); border: 2px dashed var(--sand-d); }
.empty-harvest svg.plant { width: 130px; margin: 0 auto; }
.empty-harvest h3 { font-size: 1.35rem; color: var(--leaf-d); margin-top: 8px; }
.empty-harvest p { color: var(--ink-3); max-width: 420px; margin-inline: auto; }

/* ---------- التذييل ---------- */
.site-footer { margin-top: 50px; background: var(--ink); color: rgba(255, 255, 255, .88); padding: 34px 0 30px; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; top: -40px; inset-inline: -10%; height: 80px; background: var(--cream); border-radius: 0 0 50% 50%; }
.footer-grid { display: grid; gap: 20px; position: relative; text-align: center; justify-items: center; }
.footer-logos { display: flex; align-items: center; gap: 16px; }
.footer-logos img { width: 96px; border-radius: 14px; background: #fff; padding: 4px; }
.footer-logos svg { width: 72px; height: 72px; }
.footer-text { display: flex; flex-direction: column; gap: 2px; }
.footer-text b { font-size: 1.12rem; color: #fff; }
.footer-motto { color: #FFE3A3; font-weight: 800; font-size: 1.08rem; margin-top: 8px; }
.footer-actions { display: grid; gap: 10px; justify-items: center; }
.privacy-note { font-size: .82rem; opacity: .75; max-width: 340px; display: flex; gap: 6px; align-items: flex-start; text-align: start; }
.privacy-note .ico { flex: none; margin-top: 3px; }

/* ---------- النافذة المنبثقة ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: end center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(14, 59, 79, .45); backdrop-filter: blur(4px); animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { position: relative; width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; background: var(--cream); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-l); animation: sheetUp .45s var(--ease); padding: 0; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.modal-x { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-s); }
.modal-pad { padding: 24px 20px 22px; }
.modal-pad h2 { font-size: 1.4rem; }
.confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- التنبيه والاحتفال ---------- */
.toast { border-radius: 20px !important; position: fixed; left: 50%; bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); z-index: 80; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-l); opacity: 0; pointer-events: none; transition: all .4s var(--ease); max-width: calc(100vw - 30px); width: max-content; text-align: center; display: flex; line-height: 1.5; align-items: center; gap: 8px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ico { color: var(--sun); }
#confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; width: 100%; height: 100%; }
.celebrate { text-align: center; }
.celebrate .c-art { width: 120px; margin: 0 auto; }
.celebrate h2 { color: var(--leaf-d); }

/* ---------- تقليل الحركة ---------- */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
body.reduce-motion .wheel-rot { transition-duration: .6s !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- الشاشات الأكبر ---------- */
@media (min-width: 640px) {
  .stage-grid { grid-template-columns: repeat(4, 1fr); }
  .explore-grid { grid-template-columns: repeat(3, 1fr); }
  .games-hub { grid-template-columns: repeat(3, 1fr); }
  .ws-in { grid-template-columns: 1.2fr 1fr; padding: 32px; align-items: center; }
  .vd-grid { grid-template-columns: 1fr 1fr; }
  .box-grid { grid-template-columns: repeat(6, 1fr); }
  .path { grid-template-columns: repeat(8, 1fr); }
  .modal { place-items: center; padding: 20px; }
  .modal-card { border-radius: 28px; }
  .footer-grid { grid-template-columns: auto 1fr auto; text-align: start; justify-items: stretch; align-items: center; }
  .footer-actions { justify-items: end; }
  .opts { grid-template-columns: 1fr; }
  .fp-grid { grid-template-columns: 1.5fr 1fr; align-items: start; }
  .garden-top { grid-template-columns: 1fr auto; align-items: center; }
  .mem-grid { gap: 12px; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottomnav, .only-mobile { display: none !important; }
  .mainnav { display: flex; min-width: 0; overflow: hidden; }
  .brand { flex: none; }
  .hero { padding: 40px 0 20px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 30px; }
  .explore-grid { grid-template-columns: repeat(4, 1fr); }
  .vd-hero { grid-template-columns: 300px 1fr; }
  .vd-art { min-height: 100%; }
  .vd-grid { grid-template-columns: repeat(3, 1fr); }
  .ch-grid { grid-template-columns: repeat(2, 1fr); }
  .toast { bottom: 24px; }
  .bed { gap: 10px 20px; padding-inline: 20px; }
  .brand-txt small { font-size: .74rem; }
}
@media (min-width: 900px) and (max-width: 1420px) {
  .mainnav a { padding: 8px 7px; font-size: .82rem; }
  .brand-txt { display: none; }
}
@media (max-width: 560px) {
  .topbar-in { gap: 8px; padding-inline: 10px; }
  .brand-mark svg { width: 38px; height: 38px; }
  .brand-txt b { font-size: .98rem; }
  .brand-txt small { font-size: .66rem; }
  .tools .iconbtn { width: 38px; height: 38px; }
  #btnSound, #btnMotion { display: none; }
  .chip-stage { padding: 4px 10px; font-size: .76rem; }
}
@media (max-width: 380px) {
  body { font-size: 15.5px; }
  .brand-txt small { display: none; }
  .chip-stage span { display: none; }
  .stage-card { padding: 14px 12px; }
  .box-grid { gap: 8px; }
}

/* ---------- الطباعة ---------- */
@media print {
  .topbar, .bottomnav, .site-footer, .toast, #confetti, .drawer, .btn, .iconbtn { display: none !important; }
  body { background: #fff; padding: 0; }
}
