/* =========================================================
   مكتبة جليسي — نظام التصميم
   خشب داكن + ورق دافئ + برتقالي جليسي
   ========================================================= */
:root {
  --night: #140d09;
  --wood-1: #2b1a11;
  --wood-2: #3d2518;
  --wood-3: #5a3722;
  --wood-edge: #7a4d2e;
  --paper: #f7f3ec;
  --paper-2: #efe3cc;
  --paper-3: #e4d3b4;
  --ink: #1f1a16;
  --ink-soft: #5b4a3c;
  --muted: #8a786a;
  --orange: #f39200;
  --orange-deep: #c96f00;
  --orange-soft: #fde6c4;
  --brass: #c9a24a;
  --green: #3f6b4a;
  --line: rgba(42, 29, 21, .14);
  --shadow: 0 18px 40px -18px rgba(20, 10, 4, .55);
  --radius: 14px;
  --f-head: "Amiri", Georgia, serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-quote: "Amiri", serif;
  --f-hand: "Aref Ruqaa", "Amiri", serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ورق بملمس خفيف */
.paper-bg {
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(120, 90, 50, .06) 1px, transparent 1px),
    radial-gradient(rgba(120, 90, 50, .04) 1px, transparent 1px);
  background-size: 22px 22px, 37px 37px;
  background-position: 0 0, 11px 17px;
}

/* ---------- شريط تجريبي ---------- */
.demo-ribbon {
  background: repeating-linear-gradient(-45deg, #2b1a11 0 14px, #3d2518 14px 28px);
  color: var(--orange-soft);
  text-align: center;
  font-size: 13px;
  padding: 4px 12px;
}

/* ---------- الشريط العلوي ---------- */
.topbar {
  background: var(--night);
  color: #e9d9bf;
  font-size: 14px;
}
.topbar .wrap { display: flex; justify-content: center; gap: 28px; padding: 7px 0; flex-wrap: wrap; }
.topbar span::before { content: "◆"; color: var(--orange); margin-inline-end: 8px; font-size: 9px; vertical-align: middle; }

/* ---------- الهيدر ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 240, 227, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 20px; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 4px 12px -4px rgba(0,0,0,.35); }
.brand b { font-family: var(--f-head); font-size: 24px; line-height: 1; display: block; }
.brand small { color: var(--muted); font-size: 12.5px; }
.nav { display: flex; gap: 6px; margin-inline-start: auto; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-weight: 700; color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.nav a:hover, .nav a.on { background: var(--paper-2); color: var(--ink); }
.bag {
  position: relative; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--paper); border: 0;
}
.bag svg { width: 22px; height: 22px; }
.bag i {
  position: absolute; top: -3px; inset-inline-start: -3px;
  min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  background: var(--orange); color: #fff; font-style: normal; font-size: 12px; font-weight: 800;
  display: grid; place-items: center;
}

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; border: 0;
  font-weight: 800; font-size: 17px;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.98); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 10px 24px -10px rgba(243, 146, 0, .9); }
.btn-orange:hover { background: var(--orange-deep); }
.btn-ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn-dark { background: var(--ink); color: var(--paper); }

/* ---------- العناوين ---------- */
.eyebrow {
  font-family: var(--f-head); color: var(--orange-deep); font-size: 15px; letter-spacing: .5px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.3; margin: 0; font-weight: 400; }
.section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin: 10px 0 12px; }
.section-head p { color: var(--ink-soft); margin: 0; }
.center { text-align: center; margin-inline: auto; }
.center .eyebrow::after { content: ""; width: 26px; height: 2px; background: currentColor; }

/* =========================================================
   الصفحة الرئيسية: غرفة القراءة (المصباح)
   ========================================================= */
.reading-room {
  position: relative;
  min-height: min(92vh, 860px);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(243,146,0,.10), transparent 60%),
    linear-gradient(var(--wood-1), var(--night));
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
  --x: 50%; --y: 40%;
  cursor: none;
}
.reading-room.lit { cursor: auto; }
.room-shelves {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: repeat(4, 1fr);
  padding: 30px 4vw 0;
  z-index: -2;
  opacity: .95;
}
.room-shelf {
  display: flex; align-items: flex-end; gap: 3px; padding: 0 10px;
  border-bottom: 18px solid var(--wood-3);
  box-shadow: 0 14px 0 -4px var(--wood-1), inset 0 -2px 0 var(--wood-edge);
  overflow: hidden;
}
.room-shelf .sp {
  flex: 0 0 auto;
  border-radius: 3px 3px 0 0;
  box-shadow: inset 3px 0 0 rgba(255,255,255,.08), inset -4px 0 0 rgba(0,0,0,.25);
  position: relative;
}
.room-shelf .sp::after {
  content: ""; position: absolute; inset-inline: 22%; top: 14%; height: 6px;
  border-top: 2px solid rgba(232, 200, 130, .55); border-bottom: 2px solid rgba(232, 200, 130, .55);
}
/* ظلام الغرفة + ضوء المصباح */
.room-dark {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle 260px at var(--x) var(--y),
     rgba(255, 196, 110, .10) 0%, rgba(20, 13, 9, .25) 35%, rgba(14, 9, 6, .93) 75%);
  transition: opacity 1.2s ease;
}
.reading-room.lit .room-dark { opacity: .35; }
.lamp-cursor {
  position: absolute; left: var(--x); top: var(--y); width: 30px; height: 30px;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 3;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd28a 0 30%, rgba(255,180,80,.35) 60%, transparent 70%);
  filter: blur(1px);
  transition: opacity .6s;
}
.reading-room.lit .lamp-cursor { opacity: 0; }
.room-content {
  position: relative; z-index: 2;
  min-height: inherit;
  display: grid; place-content: center; text-align: center;
  padding: 80px 16px;
}
.room-content .logo-badge {
  width: 112px; height: 112px; margin: 0 auto 22px; border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(243,146,0,.18), 0 0 60px rgba(243,146,0,.35);
}
.room-content h1 {
  font-size: clamp(38px, 6.5vw, 76px);
  text-shadow: 0 4px 30px rgba(0,0,0,.6);
}
.room-content h1 em { font-style: normal; color: var(--orange); }
.room-content p.lead {
  font-family: var(--f-quote); font-size: clamp(19px, 2.3vw, 25px);
  color: #ead9bb; max-width: 620px; margin: 14px auto 32px;
}
.room-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.switch {
  position: absolute; z-index: 4; bottom: 26px; inset-inline-start: 26px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(20,13,9,.75); border: 1px solid rgba(201,162,74,.4); color: #ead9bb;
  border-radius: 999px; padding: 8px 16px 8px 8px; font-size: 14px; font-weight: 700;
}
.switch .knob {
  width: 40px; height: 22px; border-radius: 11px; background: #4a3626; position: relative; transition: background .3s;
}
.switch .knob::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #d8c3a0; transition: inset-inline-start .3s, background .3s;
}
.reading-room.lit .switch .knob { background: var(--orange); }
.reading-room.lit .switch .knob::after { inset-inline-start: 21px; background: #fff; }
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 4;
  color: #cdb895; font-size: 13px; display: grid; justify-items: center; gap: 6px;
}
.scroll-hint i { width: 2px; height: 34px; background: linear-gradient(var(--orange), transparent); animation: drip 1.8s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(1); opacity: 0; } }

/* =========================================================
   رفّ الكتب التفاعلي
   ========================================================= */
.shelf-section { background: linear-gradient(var(--night), var(--wood-1) 30%, var(--wood-2)); color: var(--paper); }
.shelf-section .section-head p { color: #d8c6a8; }
.bookcase {
  background: linear-gradient(90deg, #24150e, #3a2317 8%, #3a2317 92%, #24150e);
  border-radius: 10px;
  padding: 26px 26px 0;
  box-shadow: inset 0 0 0 10px #2b190f, var(--shadow);
}
.bookcase-row {
  display: flex; align-items: flex-end; gap: 4px;
  height: 300px; padding: 26px 14px 0;
  border-bottom: 22px solid var(--wood-3);
  box-shadow: 0 16px 0 -6px #1d110a, inset 0 -2px 0 var(--wood-edge);
  margin-bottom: 34px;
  background: linear-gradient(transparent 70%, rgba(0,0,0,.25));
  position: relative;
}
.plate {
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(#e2c27a, #b48c3c); color: #3a2410;
  font-family: var(--f-head); font-size: 13px; padding: 1px 18px; border-radius: 3px;
  box-shadow: 0 2px 0 #7a5a20, inset 0 1px 0 rgba(255,255,255,.5);
  white-space: nowrap;
}
.spine {
  --c1: #7d8b5a; --c2: #5f6c41;
  position: relative; flex: 1 1 0; max-width: 80px; min-width: 34px;
  height: var(--h, 260px);
  border: 0; padding: 0; color: #f8edd6;
  background: linear-gradient(90deg, var(--c2), var(--c1) 22%, var(--c1) 70%, var(--c2));
  border-radius: 4px 4px 2px 2px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 3px 0 6px -2px rgba(0,0,0,.5);
  transition: transform .35s cubic-bezier(.2,.8,.3,1.2), box-shadow .35s;
  transform-origin: bottom center;
}
.spine::before, .spine::after {
  content: ""; position: absolute; inset-inline: 18%; height: 7px;
  border-top: 2px solid rgba(240, 210, 140, .8); border-bottom: 2px solid rgba(240, 210, 140, .8);
}
.spine::before { top: 16px; }
.spine::after { bottom: 18px; }
.spine span {
  position: absolute; inset: 40px 0 44px; display: grid; place-items: center;
  writing-mode: vertical-rl; font-family: var(--f-head); font-size: 17px; line-height: 1;
  text-shadow: 0 1px 0 rgba(0,0,0,.4); white-space: nowrap; overflow: hidden;
}
.spine:hover, .spine:focus-visible, .spine.on {
  transform: translateY(-34px) rotate(-2deg);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 20px 30px -10px rgba(0,0,0,.7);
  z-index: 2; outline: none;
}
.spine-tip {
  margin-top: 6px; min-height: 92px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 16px 22px;
  box-shadow: var(--shadow);
}
.spine-tip .num { font-family: var(--f-head); font-size: 34px; color: var(--orange); line-height: 1; }
.spine-tip h3 { font-size: 21px; }
.spine-tip p { margin: 2px 0 0; color: var(--ink-soft); font-size: 15.5px; }

/* =========================================================
   أمين المكتبة (حالة القلب)
   ========================================================= */
.librarian { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.moods { display: flex; flex-wrap: wrap; gap: 10px; }
.mood {
  border: 1.5px solid var(--line); background: #fffaf1; color: var(--ink);
  border-radius: 999px; padding: 10px 18px; font-weight: 700;
  transition: all .2s;
}
.mood:hover { border-color: var(--orange); }
.mood.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.prescription {
  position: relative; background: #fffaf1; border-radius: 6px; padding: 34px 36px 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--paper-3);
  min-height: 300px;
}
.prescription::before {
  content: ""; position: absolute; inset: 10px; border: 1px dashed var(--paper-3); border-radius: 4px; pointer-events: none;
}
.prescription .rx-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.prescription .rx-head b { font-family: var(--f-head); color: var(--ink); font-size: 17px; }
.prescription h3 { font-size: 30px; margin: 18px 0 6px; }
.prescription .why { font-family: var(--f-quote); font-size: 20px; color: var(--ink-soft); line-height: 1.8; }
.prescription .sign { font-family: var(--f-hand); font-size: 26px; color: var(--orange-deep); margin-top: 10px; }
.prescription .rx-empty { color: var(--muted); font-family: var(--f-quote); font-size: 21px; display: grid; place-items: center; min-height: 210px; text-align: center; }
.rx-anim { animation: write .6s ease both; }
@keyframes write { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }

/* =========================================================
   بطاقة المجموعة المميزة
   ========================================================= */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  background: linear-gradient(135deg, #fffaf1, var(--paper-2));
  border-radius: 28px; padding: 56px; border: 1px solid var(--paper-3);
}
.stack { position: relative; height: 380px; perspective: 1200px; }
.stack .bk {
  position: absolute; left: 50%; width: 220px; height: 300px; border-radius: 4px 10px 10px 4px;
  transform-style: preserve-3d;
  box-shadow: var(--shadow);
}
.feature h2 { font-size: clamp(30px, 3.6vw, 42px); margin: 12px 0; }
.price-tag { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 22px; }
.price-tag b { font-family: var(--f-head); font-size: 44px; color: var(--ink); line-height: 1; }
.price-tag span { color: var(--muted); }
.perks { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; }
.perks li { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.perks li::before { content: "✓"; width: 24px; height: 24px; border-radius: 50%; background: var(--orange-soft); color: var(--orange-deep); display: grid; place-items: center; font-size: 13px; }

/* =========================================================
   غلاف الكتاب (يُستعمل في الرئيسية وصفحة المنتج)
   ========================================================= */
.cover {
  --cv: #33493a;
  position: absolute; inset: 0; border-radius: 3px 10px 10px 3px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.14), transparent 55%),
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 7%, rgba(255,255,255,.05) 9%, transparent 12%),
    var(--cv);
  color: #f3e3bd;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; text-align: center;
  padding: 26px 22px 22px 30px;
  overflow: hidden;
}
.cover::before {
  content: ""; position: absolute; inset: 12px 12px 12px 20px; border: 1.5px solid rgba(225, 190, 115, .65); border-radius: 4px; pointer-events: none;
}
.cover .c-top { font-size: 12px; letter-spacing: .5px; opacity: .85; }
.cover .c-title { align-self: center; font-family: var(--f-quote); font-weight: 700; font-size: 30px; line-height: 1.35; }
.cover .c-title small { display: block; font-size: 16px; font-weight: 400; margin-top: 6px; color: #e7cf98; }
.cover .c-seal {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid rgba(225,190,115,.7);
  display: grid; place-items: center; font-family: var(--f-head); font-size: 26px; color: #f6d68b;
  background: radial-gradient(circle, rgba(0,0,0,.2), transparent 70%);
}

/* =========================================================
   فيديو رأي القارئ + الثقة
   ========================================================= */
.proof { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.phone {
  border-radius: 36px; padding: 10px; background: #111; box-shadow: var(--shadow);
  aspect-ratio: 9 / 18.5; position: relative;
}
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; background: #000; }
.quote-big { font-family: var(--f-quote); font-size: clamp(26px, 3vw, 36px); line-height: 1.7; margin: 0 0 14px; }
.quote-big::before { content: "«"; color: var(--orange); }
.quote-big::after { content: "»"; color: var(--orange); }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.trust div { background: #fffaf1; border: 1px solid var(--paper-3); border-radius: var(--radius); padding: 18px; }
.trust b { display: block; font-family: var(--f-head); font-size: 18px; }
.trust small { color: var(--muted); }

/* ---------- الفوتر ---------- */
.footer { background: var(--night); color: #cdb895; padding: 64px 0 28px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--f-head); color: var(--paper); margin: 0 0 12px; font-size: 18px; }
.footer a { display: block; padding: 3px 0; }
.footer a:hover { color: var(--orange); }
.footer .copy { grid-column: 1 / -1; border-top: 1px solid rgba(205,184,149,.2); padding-top: 20px; font-size: 14px; text-align: center; }
.footer .slogan { font-family: var(--f-quote); font-size: 22px; color: var(--orange); }

/* =========================================================
   صفحة المنتج
   ========================================================= */
.crumbs { font-size: 14px; color: var(--muted); padding: 22px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--orange-deep); }
.crumbs .call { margin-inline-start: auto; font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--paper-2); padding: 0 10px; border-radius: 6px; }
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; padding: 28px 0 80px; align-items: start; }
.stage {
  position: sticky; top: 100px;
  background: radial-gradient(ellipse at 50% 85%, rgba(243,146,0,.16), transparent 60%), linear-gradient(var(--wood-2), var(--wood-1));
  border-radius: 28px; padding: 46px 20px 26px; color: var(--paper);
  display: grid; justify-items: center; gap: 18px; overflow: hidden;
}
.stage-hint { font-size: 13.5px; color: #d6c3a2; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.book3d-wrap { perspective: 1600px; width: 100%; display: grid; place-items: center; padding: 10px 0 30px; touch-action: pan-y; }
/* كتاب عربي: الكعب على اليمين، والغلاف يُفتح نحو اليمين */
.book3d {
  --W: 260px; --H: 360px; --D: 52px;
  --rx: -8deg; --ry: -30deg;
  position: relative; width: var(--W); height: var(--H);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
  cursor: grab;
}
.book3d.dragging { transition: none; cursor: grabbing; }
.book3d .face { position: absolute; }
.book3d .front {
  inset: 0; transform: translateZ(calc(var(--D) / 2));
  transform-origin: right center; transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(.6,.05,.2,1);
  z-index: 2;
}
.book3d .front .cover { backface-visibility: hidden; border-radius: 10px 3px 3px 10px; padding: 26px 30px 22px 22px; }
.book3d .front .cover::before { inset: 12px 20px 12px 12px; }
.book3d .front .inside {
  position: absolute; inset: 0; transform: rotateY(180deg); backface-visibility: hidden;
  background: #efe1c4; border-radius: 3px 10px 10px 3px;
  box-shadow: inset 14px 0 24px -12px rgba(0,0,0,.35);
}
.book3d .back { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--D) / 2)); background: #26372b; border-radius: 3px 10px 10px 3px; }
.book3d .spine3d {
  top: 0; height: var(--H); width: var(--D); left: calc((var(--W) - var(--D)) / 2);
  transform: rotateY(90deg) translateZ(calc(var(--W) / 2));
  background: linear-gradient(90deg, #1f2e24, #3b5544 30%, #3b5544 70%, #1f2e24);
  display: grid; place-items: center;
  writing-mode: vertical-rl; color: #f3e3bd; font-family: var(--f-head); font-size: 16px;
  border-radius: 4px;
}
.book3d .pages {
  top: 5px; height: calc(var(--H) - 10px); width: calc(var(--D) - 4px); left: calc((var(--W) - var(--D)) / 2 + 2px);
  transform: rotateY(-90deg) translateZ(calc(var(--W) / 2 - 4px));
  background: repeating-linear-gradient(90deg, #f3e9d4 0 2px, #dccaa6 2px 3px);
}
.book3d .pages-top {
  left: 4px; width: calc(var(--W) - 10px); height: calc(var(--D) - 4px); top: calc((var(--H) - var(--D)) / 2 + 2px);
  transform: rotateX(90deg) translateZ(calc(var(--H) / 2 - 5px));
  background: repeating-linear-gradient(0deg, #f3e9d4 0 2px, #dccaa6 2px 3px);
}
.book3d .shadow {
  left: 0; width: var(--W); height: calc(var(--D) * 1.6); top: calc(var(--H) - var(--D) * .8);
  transform: rotateX(90deg) translateZ(calc(var(--D) * -0.8 - var(--H) / 2 + var(--D) * .8));
  background: radial-gradient(ellipse, rgba(0,0,0,.55), transparent 70%);
  filter: blur(8px);
}
/* الصفحة الداخلية (تظهر عند الفتح) */
.first-page {
  position: absolute; inset: 0; transform: translateZ(calc(var(--D) / 2 - 1px));
  background: #f7eedb; border-radius: 3px 10px 10px 3px;
  padding: 34px 28px; color: var(--ink);
  display: grid; align-content: center; text-align: center; gap: 10px;
  box-shadow: inset 12px 0 22px -12px rgba(0,0,0,.35);
}
.first-page .fp-label { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.first-page .fp-text { font-family: var(--f-hand); font-size: 25px; line-height: 1.7; color: #1c3a5e; min-height: 120px; display: grid; place-items: center; word-break: break-word; }
.first-page .fp-text.quote { font-family: var(--f-quote); color: var(--ink); font-size: 21px; }
.first-page .fp-src { font-size: 13px; color: var(--orange-deep); }
.book3d.open .front { transform: translateZ(calc(var(--D) / 2)) rotateY(160deg); }
.book3d.open { transform: translateX(-56%) rotateX(-6deg) rotateY(-6deg) scale(.92); }
.stage-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.chip-btn {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: var(--paper);
  padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
}
.chip-btn:hover { background: rgba(255,255,255,.16); }
.chip-btn.on { background: var(--orange); border-color: var(--orange); }

/* بطاقة الفهرسة */
.catalog-card {
  position: relative; background: #fffdf6; border-radius: 4px;
  padding: 28px 30px 24px; box-shadow: 0 1px 0 var(--paper-3), var(--shadow);
  background-image: repeating-linear-gradient(transparent 0 33px, rgba(80, 140, 200, .16) 33px 34px);
  background-position: 0 58px;
}
.catalog-card::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 62px; width: 1.5px; background: rgba(220, 80, 80, .35); }
.catalog-card .hole { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--paper-2); box-shadow: inset 0 2px 3px rgba(0,0,0,.2); }
.catalog-card .cc-top { display: flex; justify-content: space-between; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--muted); padding-inline-start: 48px; }
.catalog-card h1 { font-size: clamp(28px, 3.2vw, 38px); margin: 18px 0 2px; padding-inline-start: 48px; padding-inline-end: 110px; }
.catalog-card .sub { color: var(--ink-soft); padding-inline-start: 48px; margin: 0 0 8px; }
.catalog-card dl { display: grid; grid-template-columns: auto 1fr; margin: 0; padding-inline-start: 48px; }
.catalog-card dt { color: var(--muted); font-size: 14.5px; line-height: 34px; padding-inline-end: 14px; }
.catalog-card dd { margin: 0; font-weight: 700; line-height: 34px; }
.stamp {
  position: absolute; top: 58px; inset-inline-end: 22px;
  border: 3px double var(--orange-deep); color: var(--orange-deep);
  font-family: var(--f-head); font-size: 20px; padding: 2px 14px; border-radius: 8px;
  transform: rotate(-12deg); opacity: .85;
  mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.65) 100%);
  animation: stamp .5s .6s cubic-bezier(.3,1.6,.6,1) both;
}
@keyframes stamp { from { transform: rotate(-12deg) scale(2.2); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: .85; } }

/* السعر والطلب */
.buy-box { margin-top: 22px; background: #fffaf1; border: 1px solid var(--paper-3); border-radius: 20px; padding: 26px; }
.buy-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.buy-price b { font-family: var(--f-head); font-size: 46px; line-height: 1; }
.buy-price .per { color: var(--green); font-weight: 700; font-size: 15px; background: #e4efe2; padding: 2px 10px; border-radius: 999px; }
.perk-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }
.perk-row span { background: var(--orange-soft); color: #7a4300; font-weight: 700; font-size: 14px; padding: 4px 12px; border-radius: 999px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--paper-3); background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(243,146,0,.15); }
.field .err { color: #b3261e; font-size: 13px; min-height: 0; }
.field.bad input, .field.bad select { border-color: #b3261e; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--paper-3); border-radius: 12px; overflow: hidden; background: #fff; }
.qty button { width: 44px; height: 46px; border: 0; background: transparent; font-size: 20px; }
.qty output { min-width: 38px; text-align: center; font-weight: 800; }
.gift-toggle {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(90deg, #fff4e1, #fffaf1); border: 1.5px dashed var(--orange);
  cursor: pointer; user-select: none;
}
.gift-toggle input { width: 20px; height: 20px; accent-color: var(--orange); }
.gift-toggle b { display: block; }
.gift-toggle small { color: var(--ink-soft); }
.gift-fields { display: none; }
.gift-on .gift-fields { display: grid; }
.total-row { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 14px; font-weight: 700; }
.total-row b { font-family: var(--f-head); font-size: 26px; }
.btn-order { width: 100%; font-size: 20px; padding: 18px; }
.btn-order small { font-weight: 500; opacity: .9; font-size: 14px; }
.secure { text-align: center; color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }

/* خطة القراءة */
.plan { background: var(--ink); color: var(--paper); border-radius: 28px; padding: 48px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
.plan h2 { font-size: clamp(28px, 3.4vw, 40px); }
.plan p { color: #d6c3a2; }
.pace { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.plan-cal { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; }
.plan-cal div {
  aspect-ratio: 1 / 1.35; border-radius: 4px 6px 6px 4px; background: rgba(255,255,255,.07);
  display: grid; place-items: center; font-family: var(--f-head); font-size: 14px; color: #bda887;
  transition: background .3s, transform .3s;
}
.plan-cal div.f { background: var(--orange); color: #fff; transform: translateY(-3px); }
.plan-result { font-family: var(--f-quote); font-size: 24px; color: #fff; margin-top: 18px; line-height: 1.6; }
.plan-result b { color: var(--orange); }

/* محتويات المجموعة */
.contents { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ct {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start;
  background: #fffaf1; border: 1px solid var(--paper-3); border-radius: 14px; padding: 14px;
  transition: transform .2s, box-shadow .2s;
}
.ct:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ct .mini { height: 62px; border-radius: 3px; background: linear-gradient(90deg, var(--c2), var(--c1) 30%, var(--c1) 70%, var(--c2)); position: relative; }
.ct .mini::after { content: attr(data-n); position: absolute; inset: 0; display: grid; place-items: center; color: #f8edd6; font-family: var(--f-head); }
.ct h4 { margin: 0; font-family: var(--f-head); font-size: 17px; }
.ct p { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

/* اقتباسات */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.qcard { background: #fffaf1; border-radius: 6px; padding: 30px 26px; border-top: 4px solid var(--orange); box-shadow: var(--shadow); }
.qcard p { font-family: var(--f-quote); font-size: 22px; line-height: 1.8; margin: 0 0 12px; }
.qcard small { color: var(--orange-deep); font-weight: 700; }

/* أسئلة */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { font-family: var(--f-head); font-size: 19px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 10px 0 0; color: var(--ink-soft); }

/* الشريط اللاصق في الهاتف */
.sticky-buy {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 60;
  background: rgba(20,13,9,.96); color: var(--paper);
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .35s;
}
.sticky-buy.show { transform: none; }
.sticky-buy b { font-family: var(--f-head); font-size: 22px; display: block; line-height: 1.1; }
.sticky-buy small { color: #cdb895; font-size: 12.5px; }
.sticky-buy .btn { padding: 12px 22px; }

/* نافذة التأكيد */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(20,13,9,.7); padding: 16px; }
.modal.show { display: grid; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { background: var(--paper); border-radius: 22px; padding: 36px 30px; max-width: 440px; width: 100%; text-align: center; position: relative; }
.modal-card .seal { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 40px; box-shadow: 0 0 0 8px var(--orange-soft); }
.modal-card h3 { font-size: 26px; }
.modal-card p { color: var(--ink-soft); }
.modal-card .summary { background: #fffaf1; border-radius: 12px; padding: 12px 16px; text-align: start; font-size: 15px; margin: 14px 0 20px; }

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

/* =========================================================
   صفحة منتج الأطفال
   ========================================================= */
[hidden] { display: none !important; }
.photo-stage { padding: 18px; gap: 14px; }
.photo-frame { position: relative; width: 100%; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 5; background: #1d120c; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; animation: fade .4s; }
.rating-badge {
  position: absolute; top: 14px; inset-inline-start: 14px;
  background: rgba(255,255,255,.94); color: var(--ink); border-radius: 14px; padding: 6px 12px; line-height: 1.3;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.5);
}
.rating-badge b { display: block; color: var(--orange-deep); font-size: 17px; }
.rating-badge small { font-size: 12px; color: var(--ink-soft); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; width: 100%; padding: 2px; scrollbar-width: none; }
.thumbs button { flex: 0 0 64px; height: 64px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: #fff; opacity: .7; transition: all .2s; }
.thumbs button.on { border-color: var(--orange); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
/* بطاقة الإهداء المعلّقة */
.gift-tag {
  position: absolute; bottom: 22px; inset-inline-end: 22px; width: min(250px, 62%);
  background: #fff8ea; color: #1c3a5e; border-radius: 10px 10px 10px 40px; padding: 26px 20px 16px;
  box-shadow: 0 16px 30px -12px rgba(0,0,0,.6);
  transform-origin: 80% -30px; transform: rotate(-4deg) translateY(30px); opacity: 0; pointer-events: none;
  transition: transform .6s cubic-bezier(.3,1.5,.5,1), opacity .3s;
  border: 1.5px dashed rgba(201, 111, 0, .45);
}
.gift-tag.show { opacity: 1; transform: rotate(-4deg); animation: swing 2.6s ease-in-out .6s infinite alternate; }
@keyframes swing { to { transform: rotate(2deg); } }
.gift-tag::before { content: ""; position: absolute; top: 10px; inset-inline-start: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--paper-2); box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.tag-string { position: absolute; top: -40px; inset-inline-start: calc(50% + 4px); width: 2px; height: 50px; background: var(--orange-deep); }
.gift-tag small { display: block; font-family: var(--f-head); color: var(--orange-deep); font-size: 14px; }
.gift-tag p { margin: 4px 0 0; font-family: var(--f-hand); font-size: 21px; line-height: 1.6; word-break: break-word; }
.hook { font-family: var(--f-head); color: var(--orange-deep); font-size: 17px; margin: 8px 0 4px; padding-inline-start: 48px; }

/* السلاسل */
.series { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.series-card { background: #fffaf1; border: 1px solid var(--paper-3); border-radius: 18px; padding: 14px 14px 18px; border-top: 5px solid var(--sc); transition: transform .25s, box-shadow .25s; }
.series-card:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: var(--shadow); }
.series-img { aspect-ratio: 1 / 1; border-radius: 12px; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--sc) 16%, #fff), #fff 70%); display: grid; place-items: center; overflow: hidden; }
.series-img img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0,0,0,.18)); }
.series-count { display: inline-block; margin-top: 12px; background: var(--sc); color: #fff; font-weight: 800; font-size: 13px; padding: 2px 12px; border-radius: 999px; }
.series-card h4 { font-family: var(--f-head); font-size: 20px; margin: 8px 0 2px; }
.series-card p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }

/* الهدية */
.bonus { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; background: linear-gradient(135deg, #1f3a2a, #12241a); color: var(--paper); border-radius: 28px; padding: 36px 44px; }
.bonus h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 8px 0; }
.bonus p { color: #d9e6d4; }
.bonus-img { position: relative; background: radial-gradient(circle, rgba(232,200,130,.35), transparent 65%); border-radius: 50%; padding: 18px; }
.bonus-img img { width: 100%; filter: drop-shadow(0 18px 24px rgba(0,0,0,.5)); }
.bow { position: absolute; top: 4px; inset-inline-end: 10px; font-size: 40px; animation: swing 2s ease-in-out infinite alternate; }

/* الفيديو (يوتيوب) */
.yt { width: 100%; height: 100%; border: 0; border-radius: 28px; background-size: cover; background-position: center; display: grid; place-items: center; }
.yt span { width: 74px; height: 74px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 30px; display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(243,146,0,.25); }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 28px; background: #000; }

/* الآراء */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review { margin: 0; background: #fffaf1; border: 1px solid var(--paper-3); border-radius: 18px; padding: 22px; }
.review .stars { color: var(--orange); letter-spacing: 2px; }
.review p { margin: 8px 0 12px; line-height: 1.8; }
.review figcaption { color: var(--muted); font-weight: 700; font-size: 14px; }

.plan-cal.dense { grid-template-columns: repeat(10, 1fr); gap: 6px; }
.plan-cal.dense div { font-size: 11px; aspect-ratio: 1 / 1.2; }
.bundle.thin .bundle-books i { width: 7px; border-radius: 2px 2px 1px 1px; box-shadow: none; }
.pcard-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

@media (max-width: 920px) {
  .series { grid-template-columns: repeat(2, 1fr); }
  .bonus { grid-template-columns: 1fr; padding: 28px 22px; text-align: center; }
  .bonus-img { max-width: 240px; margin: 0 auto; }
  .reviews { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .series { gap: 10px; }
  .series-card h4 { font-size: 17px; }
  .hook { padding-inline-start: 30px; }
  .plan-cal.dense { grid-template-columns: repeat(8, 1fr); }
  .bundle.thin .bundle-books i { width: 4px; }
}

/* =========================================================
   خريطة المكتبة
   ========================================================= */
.map-sheet {
  position: relative; background: #f3e8d2; border-radius: 6px; padding: 30px 30px 22px;
  box-shadow: 0 1px 0 var(--paper-3), var(--shadow);
  background-image:
    linear-gradient(rgba(90, 60, 30, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 60, 30, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  border: 1px solid var(--paper-3);
}
.map-sheet::before { content: ""; position: absolute; inset: 10px; border: 2px solid rgba(61, 37, 24, .5); border-radius: 3px; pointer-events: none; }
.map-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; padding: 0 6px; }
.map-head b { font-family: var(--f-head); font-size: 22px; }
.map-head small { color: var(--muted); }
.compass {
  margin-inline-start: auto; order: 3; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--wood-3);
  display: grid; place-items: center; position: relative; font-family: var(--f-head); color: var(--orange-deep);
}
.compass::before { content: ""; position: absolute; width: 2px; height: 34px; background: linear-gradient(var(--orange-deep) 50%, var(--wood-3) 50%); }
.compass i { position: absolute; top: -20px; font-style: normal; font-size: 14px; }
.lib-map {
  display: grid; gap: 0;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  border: 7px solid var(--wood-2);
  background: var(--wood-2);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.2);
}
.room {
  --tone: #3f5a45;
  position: relative; min-height: 170px; padding: 22px 18px 18px;
  background: #fbf5e8;
  outline: 3.5px solid var(--wood-2); outline-offset: -2px;
  display: grid; align-content: center; justify-items: center; text-align: center; gap: 6px;
  transition: background .35s, box-shadow .35s;
  isolation: isolate;
}
.room::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 196, 110, .55), transparent 65%),
    repeating-linear-gradient(45deg, rgba(122, 77, 46, .07) 0 12px, transparent 12px 24px);
}
.room:hover::after, .room:focus-visible::after { opacity: 1; }
.room:hover .room-seal { transform: scale(1.12) rotate(-6deg); }
.room b { font-family: var(--f-head); font-size: 18px; line-height: 1.35; }
.room small { color: var(--muted); font-size: 13.5px; }
.room:not(.empty) small { color: var(--green); font-weight: 800; }
.room.empty b { color: var(--ink-soft); }
.door {
  position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 8px; background: #fbf5e8; z-index: 2;
}
.door::after { content: none; }
.room-seal {
  width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3d68f, #c9a24a 55%, #8e6c25);
  color: #3a2410; font-family: var(--f-quote); font-weight: 700; font-size: 26px;
  display: grid; place-items: center; box-shadow: 0 3px 0 #7a5a20, 0 6px 14px -4px rgba(0,0,0,.4);
  transition: transform .35s;
  flex: none;
}
.room.empty .room-seal { filter: grayscale(.7) brightness(.95); }
.room.hall { background: var(--tone, #3f5a45); background: linear-gradient(135deg, var(--wood-2), var(--wood-1)); color: var(--paper); }
.room.hall small { color: #e5cfa5 !important; font-weight: 500 !important; max-width: 300px; }
.room.hall b { font-size: 24px; }
.room.hall .room-seal { background: radial-gradient(circle at 35% 30%, #ffc56e, var(--orange) 60%, var(--orange-deep)); color: #fff; }
.map-legend { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); }
.map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-inline-end: 4px; }
.lg-full { background: #c9a24a; } .lg-empty { background: #b9ad98; } .lg-hall { background: var(--orange); }

.wing-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 40px; }
.wing-list.compact { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.wing-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  background: #fffaf1; border: 1px solid var(--paper-3); border-radius: 14px;
  border-inline-start: 5px solid var(--tone);
  transition: transform .2s, box-shadow .2s;
}
.wing-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.wing-row .room-seal { width: 44px; height: 44px; font-size: 21px; }
.wing-row b { display: block; font-family: var(--f-head); font-size: 17px; }
.wing-row small { display: block; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.wing-row em { margin-inline-start: auto; font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* =========================================================
   صفحة الجناح
   ========================================================= */
.wing-hero {
  background: linear-gradient(160deg, var(--tone, #3f5a45), color-mix(in srgb, var(--tone, #3f5a45) 55%, #140d09));
  color: var(--paper); padding: 4px 0 46px; position: relative; overflow: hidden;
}
.wing-hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 60px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 34px, rgba(0,0,0,.08) 34px 40px, rgba(255,255,255,.04) 40px 70px, rgba(0,0,0,.14) 70px 76px);
  opacity: .6; mask-image: linear-gradient(transparent, #000);
}
.wing-hero .crumbs { color: rgba(247,240,227,.7); }
.wing-hero .crumbs a:hover { color: #fff; }
.wing-arch { display: flex; align-items: center; gap: 28px; margin-top: 26px; position: relative; z-index: 1; }
.arch-seal {
  flex: none; width: 128px; height: 150px; border-radius: 64px 64px 10px 10px;
  border: 3px solid rgba(232, 200, 130, .75); background: rgba(0,0,0,.15);
  display: grid; place-content: center; text-align: center; gap: 0;
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.12), 0 18px 40px -16px rgba(0,0,0,.6);
}
.arch-seal small { color: #e8c882; font-size: 13px; }
.arch-seal b { font-family: var(--f-quote); font-size: 62px; line-height: 1.1; color: #f6d68b; }
.wing-arch h1 { font-size: clamp(30px, 4.6vw, 52px); }
.wing-arch p { margin: 6px 0 0; color: #ead9bb; font-size: 18px; max-width: 640px; }

.wing-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--paper-3); background: #fffaf1; border-radius: 999px; padding: 7px 16px; font-weight: 700; color: var(--ink-soft); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tools-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.count { color: var(--muted); font-size: 14.5px; }
.sort { font: inherit; font-size: 15px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--paper-3); background: #fff; }
.view-toggle { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; }
.view-toggle button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 700; color: var(--ink-soft); font-size: 14.5px; }
.view-toggle button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px -2px rgba(0,0,0,.25); }

/* المجموعة على الرف: كتب مربوطة بشريط */
.wing-shelf { justify-content: flex-start; gap: 26px; }
.bundle { position: relative; display: block; height: 92%; padding: 0 4px; transition: transform .35s cubic-bezier(.2,.8,.3,1.2); }
.bundle:hover { transform: translateY(-14px); }
.bundle-books { display: flex; align-items: flex-end; gap: 1px; height: 100%; }
.bundle-books i {
  display: block; width: 17px; border-radius: 3px 3px 1px 1px;
  background: linear-gradient(90deg, var(--c2), var(--c1) 30%, var(--c1) 70%, var(--c2));
  box-shadow: inset 0 10px 0 -6px rgba(240,210,140,.45);
}
.ribbon {
  position: absolute; left: -6px; right: -6px; top: 46%;
  background: linear-gradient(var(--orange), var(--orange-deep)); color: #fff;
  font-family: var(--f-head); font-size: 14px; text-align: center; padding: 3px 0;
  box-shadow: 0 4px 10px -4px rgba(0,0,0,.6);
}
.bundle-name {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  background: var(--paper); color: var(--ink); font-weight: 800; font-size: 14px; white-space: nowrap;
  padding: 3px 12px; border-radius: 999px; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.bundle:hover .bundle-name { opacity: 1; }

/* البطاقات */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.pcard { display: grid; grid-template-columns: 150px 1fr; gap: 20px; background: #fffaf1; border: 1px solid var(--paper-3); border-radius: 18px; padding: 18px; transition: transform .25s, box-shadow .25s; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pcard-cover { position: relative; aspect-ratio: 3 / 4.2; }
.pcard-cover .cover { padding: 16px 12px 12px 16px; }
.pcard-cover .cover .c-title { font-size: 19px; }
.pcard-cover .cover .c-title small { font-size: 12px; }
.pcard-cover .cover .c-seal { width: 42px; height: 42px; font-size: 16px; }
.pcard-cover .cover .c-top { font-size: 10px; }
.pcard-cover .cover::before { inset: 7px 7px 7px 12px; }
.pcard-call { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--muted); }
.pcard h3 { font-size: 20px; margin: 2px 0 4px; }
.pcard p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.pcard-perks { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.pcard-perks span { background: var(--orange-soft); color: #7a4300; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pcard-foot b { font-family: var(--f-head); font-size: 26px; }
.pcard-foot small { font-size: 14px; color: var(--muted); }
.pcard-foot .btn { padding: 9px 16px; font-size: 14.5px; }

/* رف فارغ */
.empty-shelf { text-align: center; }
.empty-shelf .bookcase { margin-bottom: 26px; }
.empty-row { justify-content: center; height: 190px !important; gap: 260px; align-items: flex-end; }
.bookend { width: 46px; height: 92px; background: linear-gradient(135deg, #e2c27a, #9c7a32); clip-path: polygon(0 0, 30% 0, 30% 75%, 100% 75%, 100% 100%, 0 100%); }
.bookend.r { transform: scaleX(-1); }
.empty-shelf h3 { font-size: 26px; }
.empty-shelf p { color: var(--ink-soft); max-width: 520px; margin: 8px auto 20px; }

.wing-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 46px; padding-top: 22px; border-top: 1px dashed var(--paper-3); font-weight: 700; color: var(--ink-soft); flex-wrap: wrap; }
.wing-nav a:hover { color: var(--orange-deep); }

/* =========================================================
   الهاتف
   ========================================================= */
@media (max-width: 920px) {
  .lib-map { grid-template-columns: repeat(2, 1fr); }
  .lib-map .room.hall { order: -1; }
  .room { min-height: 140px; }
  .wing-list, .wing-list.compact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .map-sheet { padding: 22px 14px 16px; }
  .room { min-height: 128px; padding: 16px 10px; }
  .room b { font-size: 15.5px; }
  .room-seal { width: 44px; height: 44px; font-size: 22px; }
  .wing-arch { gap: 18px; }
  .arch-seal { width: 92px; height: 110px; }
  .arch-seal b { font-size: 44px; }
  .wing-arch p { font-size: 16px; }
  .pcard { grid-template-columns: 110px 1fr; gap: 14px; padding: 14px; }
  .pgrid { grid-template-columns: 1fr; }
  .empty-row { gap: 120px; height: 150px !important; }
  .wing-row em { display: none; }
}

@media (max-width: 920px) {
  .nav { display: none; }
  .bag { margin-inline-start: auto; }
  .librarian, .feature, .proof, .pdp, .plan { grid-template-columns: 1fr; }
  .feature, .plan { padding: 32px 22px; border-radius: 22px; }
  .stack { height: 330px; }
  .proof .phone { max-width: 300px; margin-inline: auto; }
  .stage { position: relative; top: 0; }
  .quotes { grid-template-columns: 1fr; }
  .footer .wrap { grid-template-columns: 1fr; }
  .section { padding: 68px 0; }
  .sticky-buy { display: flex; }
  .pdp { padding-bottom: 40px; }
  body.pdp-page { padding-bottom: 76px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar .wrap { gap: 14px; font-size: 12.5px; }
  .topbar span:nth-child(3) { display: none; }
  .header .wrap { height: 64px; }
  .brand img { width: 44px; height: 44px; }
  .brand b { font-size: 20px; }
  .bookcase { padding: 14px 10px 0; }
  .bookcase-row { height: 220px; gap: 2px; padding: 20px 4px 0; }
  .spine { min-width: 0; }
  .spine span { font-size: 12px; inset: 30px 0 34px; }
  .spine::before { top: 10px; } .spine::after { bottom: 12px; }
  .spine-tip { grid-template-columns: auto 1fr; }
  .spine-tip .btn { grid-column: 1 / -1; }
  .prescription { padding: 26px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; }
  .plan-cal { grid-template-columns: repeat(6, 1fr); }
  .book3d { --W: 210px; --H: 292px; --D: 44px; }
  .book3d.open { transform: translateX(-50%) rotateX(-6deg) rotateY(-6deg) scale(.7); }
  .catalog-card { padding: 24px 18px 22px; }
  .catalog-card::before { inset-inline-start: 40px; }
  .catalog-card h1, .catalog-card .sub, .catalog-card dl, .catalog-card .cc-top { padding-inline-start: 30px; }
  .stamp { top: 50px; font-size: 15px; inset-inline-end: 10px; }
  .switch { bottom: 16px; inset-inline-start: 16px; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =========================================================
   المشاركة ورابط الإهداء
   ========================================================= */
.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.share-btn {
  flex: 1 1 200px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 999px; font-weight: 500;
  background: #1f7a4d; color: #fff; border: 0; transition: transform .15s, background .2s;
}
.share-btn::before { content: ""; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm5.3 14.2c-.2.6-1.3 1.2-1.8 1.2-.5.1-1 .2-3.4-.7-2.9-1.1-4.7-4-4.9-4.2-.1-.2-1.2-1.6-1.2-3s.7-2.1 1-2.4c.3-.3.6-.3.8-.3h.6c.2 0 .4 0 .6.5l.8 2c.1.2.1.4 0 .6l-.4.6-.4.4c-.1.1-.3.3-.1.6.2.3.8 1.3 1.6 2.1 1.1 1 2 1.3 2.3 1.4.3.2.5.1.6-.1l.9-1c.2-.3.4-.2.7-.1l1.9.9c.3.1.5.2.5.3.1.1.1.7-.1 1.2z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm5.3 14.2c-.2.6-1.3 1.2-1.8 1.2-.5.1-1 .2-3.4-.7-2.9-1.1-4.7-4-4.9-4.2-.1-.2-1.2-1.6-1.2-3s.7-2.1 1-2.4c.3-.3.6-.3.8-.3h.6c.2 0 .4 0 .6.5l.8 2c.1.2.1.4 0 .6l-.4.6-.4.4c-.1.1-.3.3-.1.6.2.3.8 1.3 1.6 2.1 1.1 1 2 1.3 2.3 1.4.3.2.5.1.6-.1l.9-1c.2-.3.4-.2.7-.1l1.9.9c.3.1.5.2.5.3.1.1.1.7-.1 1.2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.share-btn:hover { background: #18663f; transform: translateY(-1px); }
.share-btn:active { transform: scale(.98); }
.share-btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.share-btn.ghost::before { display: none; }
.gift-banner {
  background: var(--ink); color: var(--paper); text-align: center; padding: 14px 16px; font-size: 16px;
}
.gift-banner b { color: var(--orange); font-weight: 500; }

/* ===== كتب مفردة (الأجنحة الجديدة) ===== */
.room.hall { grid-column: span 2; }
.bundle--single { display: flex; align-items: flex-end; padding: 0 6px; }
.bundle--single img { display: block; height: 86%; width: auto; max-width: 110px; aspect-ratio: auto; object-fit: contain; box-shadow: 4px 6px 14px rgba(0,0,0,.35); border-radius: 2px 4px 4px 2px; }
body.single #ratingBadge { display: none; }
body.single .pcard-photo, .pcard-photo { object-fit: contain; }
