/* ============ Sahara Publishing — Desert Daylight ============
   Warm paper & sand, keyed to the hero film's golden dunes and dusk-blue sky.
   Literary serif display (Amiri / Fraunces), editorial rules instead of cards. */
:root {
  --paper: #F8F2E4;
  --paper-2: #F0E6CF;
  --ink: #241B10;
  --ink-soft: #5C4F3D;
  --amber: #B96F24;
  --amber-deep: #8F5417;
  --dusk: #33506B;
  --gold: #B98A2F;
  --rule: rgba(36, 27, 16, 0.18);
  --rule-soft: rgba(36, 27, 16, 0.1);
  --font-body: "Readex Pro", system-ui, sans-serif;
  --font-display-ar: "Amiri", serif;
  --font-display-en: "Fraunces", serif;
  --display: var(--font-display-ar);
}
html[lang="en"] { --display: var(--font-display-en); }

* { margin: 0; padding: 0; box-sizing: border-box; }
/* hide untranslated flash: set by the inline head script when saved lang != page default */
html.i18n-wait body { visibility: hidden; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.9;
  overflow-x: hidden;
}
img, svg, video, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--amber); color: var(--paper); }
:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 3px; border-radius: 2px; }

/* ---------- shared ---------- */
.wrap { max-width: 1160px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.wrap-narrow { max-width: 820px; }
.section { padding-block: clamp(76px, 12vh, 150px); position: relative; }
.section-alt { background: var(--paper-2); }

.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.78rem; letter-spacing: 0.22em; color: var(--amber-deep);
  text-transform: uppercase; margin-bottom: 18px; font-weight: 500;
}
.eyebrow::before { content: ""; width: 44px; height: 1px; background: var(--amber-deep); flex: none; }
html[dir="rtl"] .eyebrow { letter-spacing: 0.06em; }

.section-title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700; line-height: 1.4; margin-bottom: 26px; color: var(--ink);
}
html[lang="en"] .section-title { line-height: 1.15; letter-spacing: -0.01em; }
.section-hint { color: var(--ink-soft); max-width: 620px; margin-bottom: 40px; font-size: 1.02rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 34px; border-radius: 2px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 0.93rem; font-weight: 500; letter-spacing: 0.02em;
  cursor: pointer; transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--ink); color: var(--paper); }
.btn-gold:hover { background: var(--amber-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-small { padding: 10px 22px; font-size: 0.84rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--stagger, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* scroll progress line */
.scroll-progress {
  position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--amber), #E8B963);
  transform-origin: 0 50%; transform: scaleX(0); z-index: 60; pointer-events: none;
}
html[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }

/* cinematic hero exit (driven by JS scroll handler) */
.hero-inner, .hero-scroll { will-change: transform, opacity; }
.hero-video, .hero-canvas { will-change: transform; }

/* books drift in with stagger; timeline and news rows likewise (JS sets --stagger) */

/* ---------- nav ---------- */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px clamp(20px, 4vw, 44px);
  transition: background 0.35s, box-shadow 0.35s;
  color: var(--paper);
}
.nav.scrolled {
  background: var(--paper); color: var(--ink);
  box-shadow: 0 1px 0 var(--rule), 0 4px 0 var(--paper), 0 5px 0 var(--rule-soft);
}
.nav-brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 1.25rem; white-space: nowrap; }
.nav-mark { width: 40px; height: auto; flex: none; }
.nav:not(.scrolled) .nav-mark { filter: drop-shadow(0 0 8px rgba(248, 242, 228, 0.6)) drop-shadow(0 1px 3px rgba(248, 242, 228, 0.4)); }
.nav-links { display: flex; gap: clamp(14px, 2.4vw, 30px); font-size: 0.9rem; opacity: 0.92; }
.nav-links a { transition: color 0.2s; border-bottom: 1px solid transparent; }
.nav-links a:hover { color: var(--amber); }
.nav.scrolled .nav-links a:hover { color: var(--amber-deep); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav .btn-gold { background: var(--amber-deep); }
.nav.scrolled .btn-gold { background: var(--ink); }
.lang-toggle {
  border: 1px solid currentColor; background: none; color: inherit;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.lang-toggle:hover { background: var(--amber-deep); color: var(--paper); border-color: var(--amber-deep); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: inherit; }
.nav-burger span { display: block; width: 22px; height: 2px; background: currentColor; margin-block: 5px; }
.nav-mobile {
  position: fixed; inset-inline: 0; top: 0; z-index: 49; padding: 96px 36px 40px;
  background: var(--paper); border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 4px; font-size: 1.3rem; font-family: var(--display);
  transform: translateY(-110%); transition: transform 0.4s ease;
}
.nav-mobile a { padding-block: 12px; border-bottom: 1px solid var(--rule-soft); }
.nav-mobile.open { transform: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: end center; overflow: hidden; background: #1E2A38; }
.hero-video, .hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video { display: none; }
.hero-video.on { display: block; }
.hero-video.on + .hero-canvas { display: none; }
.hero-veil { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16, 20, 30, 0.55), rgba(16, 20, 30, 0.22) 34%, rgba(30, 22, 10, 0.45) 58%, rgba(24, 17, 8, 0.82) 100%); }
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 130px 24px clamp(120px, 18vh, 190px); max-width: 980px; color: #FBF6EA; }
.hero-inner .eyebrow { justify-content: center; color: #F0D9A8; }
.hero-inner .eyebrow::before, .hero-inner .eyebrow::after { content: ""; width: 44px; height: 1px; background: #F0D9A8; flex: none; }
.hero-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 7.2vw, 5.6rem); line-height: 1.45; margin-block: 8px 20px;
  text-shadow: 0 2px 10px rgba(15, 10, 4, 0.7), 0 6px 40px rgba(15, 10, 4, 0.55);
}
html[lang="en"] .hero-title { line-height: 1.08; letter-spacing: -0.015em; }
.hero-title span { display: block; }
.hero-title .gold { color: #F3C664; }
.hero-sub { max-width: 640px; margin: 0 auto 40px; font-size: 1.06rem; color: #FBF6EA;
  font-weight: 400; text-shadow: 0 1px 14px rgba(15, 10, 4, 0.85), 0 0 2px rgba(15, 10, 4, 0.6); }
.hero-inner .eyebrow { text-shadow: 0 1px 10px rgba(15, 10, 4, 0.9); }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-ctas .btn-gold { background: #F3C664; color: #241B10; }
.hero-ctas .btn-gold:hover { background: #FBF6EA; }
.hero-ctas .btn-ghost { border-color: rgba(251, 246, 234, 0.7); color: #FBF6EA; }
.hero-ctas .btn-ghost:hover { background: rgba(251, 246, 234, 0.15); }
.hero-scroll {
  position: absolute; bottom: 22px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(251, 246, 234, 0.75); font-size: 0.75rem; letter-spacing: 0.14em;
}
html[dir="rtl"] .hero-scroll { transform: translateX(50%); }
.hero-scroll-line { width: 1px; height: 40px; background: linear-gradient(rgba(251,246,234,0.9), transparent); animation: drip 2.2s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- dune divider ---------- */
.dune-divider { height: 60px; overflow: hidden; margin-block: -1px; background: var(--paper); }
.dune-divider svg { width: 100%; height: 100%; }
.dune-divider path { fill: var(--paper-2); }
.dune-divider.flip { transform: scaleY(-1); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.about-text p { margin-bottom: 20px; font-size: 1.06rem; }
.about-text p:first-child {
  font-family: var(--display); font-size: 1.45rem; line-height: 1.8; color: var(--ink);
  padding-inline-start: 22px; border-inline-start: 3px solid var(--amber);
}
html[lang="en"] .about-text p:first-child { line-height: 1.5; }
.about-stats { display: grid; }
.stat { padding-block: 20px; border-top: 1px solid var(--rule); }
.stat:last-child { border-bottom: 1px solid var(--rule); }
.stat-n { display: block; font-family: var(--display); font-size: 2.5rem; font-weight: 700; color: var(--amber-deep); line-height: 1.4; }
.stat-l { color: var(--ink-soft); font-size: 0.9rem; letter-spacing: 0.04em; }

/* ---------- shelf ---------- */
.shelf {
  display: flex; align-items: flex-end; gap: clamp(26px, 3.4vw, 44px);
  overflow-x: auto; padding: 30px clamp(20px, 8vw, 120px) 74px;
  scrollbar-width: none;
  cursor: grab; position: relative;
  background:
    linear-gradient(to top, var(--rule) 0, var(--rule) 1px, transparent 1px) no-repeat 0 calc(100% - 56px) / 100% 100%;
}
.shelf:active { cursor: grabbing; }
.book {
  flex: none; width: 208px; margin-bottom: 56px;
  background: none; border: none; padding: 0; cursor: pointer; text-align: inherit;
  position: relative;
}
.book-cover {
  width: 208px; height: 312px; position: relative;
  padding: 22px 18px; display: flex; flex-direction: column; align-items: center; text-align: center;
  justify-content: space-between; color: #F5EBD5;
  border-radius: 2px 6px 6px 2px;
  box-shadow: 0 1px 0 rgba(36,27,16,0.35), 8px 14px 26px rgba(60, 42, 18, 0.35);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s;
  overflow: hidden;
}
html[dir="rtl"] .book-cover { border-radius: 6px 2px 2px 6px; }
.book:hover .book-cover, .book:focus-visible .book-cover {
  transform: translateY(-14px) rotate(-1deg);
  box-shadow: 0 1px 0 rgba(36,27,16,0.35), 14px 26px 40px rgba(60, 42, 18, 0.45);
}
/* inner frame like a printed cover */
.book-cover::before {
  content: ""; position: absolute; inset: 9px; pointer-events: none;
  border: 1px solid rgba(245, 235, 213, 0.55);
  outline: 1px solid rgba(245, 235, 213, 0.2); outline-offset: 3px;
}
/* spine shadow */
.book-cover::after { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 7px;
  background: linear-gradient(to right, rgba(0,0,0,0.32), transparent); }
html[dir="rtl"] .book-cover::after { background: linear-gradient(to left, rgba(0,0,0,0.32), transparent); }
.bc-genre { font-size: 0.62rem; letter-spacing: 0.22em; opacity: 0.85; text-transform: uppercase; position: relative; z-index: 1; }
html[dir="rtl"] .bc-genre { letter-spacing: 0.08em; }
.bc-orn { font-size: 1rem; opacity: 0.9; position: relative; z-index: 1; letter-spacing: 0.4em; margin-inline-start: 0.4em; }
.bc-title { font-family: var(--display); font-weight: 700; font-size: 1.42rem; line-height: 1.55; position: relative; z-index: 1;
  text-shadow: 0 1px 4px rgba(10, 6, 2, 0.95), 0 0 18px rgba(10, 6, 2, 0.75); }
.bc-genre, .bc-foot { text-shadow: 0 1px 3px rgba(10, 6, 2, 0.9); }
html[lang="en"] .bc-title { font-size: 1.2rem; line-height: 1.3; }
.bc-foot { display: grid; gap: 5px; justify-items: center; font-size: 0.66rem; opacity: 0.85; position: relative; z-index: 1; letter-spacing: 0.12em; }
.bc-foot::before { content: ""; width: 30px; height: 1px; background: currentColor; opacity: 0.6; }
.book-label { margin-top: 18px; text-align: center; color: var(--ink-soft); font-size: 0.88rem; transition: color 0.3s; }
.book:hover .book-label { color: var(--amber-deep); }

/* ---------- book dialog ---------- */
.book-dialog {
  margin: auto; border: 1px solid var(--rule); border-radius: 3px; padding: 0;
  background: var(--paper); color: var(--ink); max-width: 640px; width: calc(100% - 40px);
  box-shadow: 0 40px 90px rgba(40, 28, 12, 0.35);
}
.book-dialog::backdrop { background: rgba(30, 22, 10, 0.55); backdrop-filter: blur(4px); }
.book-dialog-inner { display: grid; grid-template-columns: 200px 1fr; }
.bd-cover { padding: 24px 18px; display: flex; flex-direction: column; align-items: center; text-align: center;
  justify-content: space-between; min-height: 280px; color: #F5EBD5; position: relative; }
.bd-cover::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(245, 235, 213, 0.5); pointer-events: none; }
.bd-cover .bc-title { font-size: 1.2rem; }
.bd-body { padding: 30px; }
.bd-body h3 { font-family: var(--display); font-size: 1.7rem; margin-bottom: 2px; line-height: 1.4; }
.bd-sub { color: var(--amber-deep); font-size: 0.85rem; margin-bottom: 16px; }
.bd-blurb { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 22px; }
.bd-meta { display: flex; gap: 26px; flex-wrap: wrap; font-size: 0.85rem; border-top: 1px solid var(--rule); padding-top: 16px; }
.bd-meta b { display: block; color: var(--amber-deep); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
html[dir="rtl"] .bd-meta b { letter-spacing: 0.04em; }
.bd-close { position: absolute; top: 10px; inset-inline-end: 14px; background: none; border: none;
  color: var(--ink-soft); font-size: 1.7rem; cursor: pointer; line-height: 1; }
.bd-close:hover { color: var(--amber-deep); }

/* ---------- author ---------- */
.author-grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.portrait-frame {
  aspect-ratio: 3 / 4; position: sticky; top: 110px;
  background:
    radial-gradient(circle at 68% 22%, rgba(243, 198, 100, 0.5), transparent 60%),
    linear-gradient(165deg, #2E4257, #1B2836);
  border: 1px solid var(--rule); border-radius: 3px;
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 10px 10px 0 var(--paper-2), 10px 11px 0 var(--rule-soft);
}
.portrait-glyph {
  font-family: var(--font-display-ar); font-size: clamp(7rem, 13vw, 10rem); font-weight: 700;
  color: #E9BE62; line-height: 1;
}
.author-role { color: var(--amber-deep); margin-bottom: 20px; font-weight: 400; font-size: 1.05rem; }
.author-body p { margin-bottom: 18px; font-size: 1.03rem; }
.timeline-title { font-family: var(--display); font-size: 1.45rem; margin: 36px 0 8px; color: var(--ink); }
.timeline { list-style: none; }
.timeline li { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: baseline;
  padding-block: 14px; border-bottom: 1px solid var(--rule-soft); }
.timeline li:first-child { border-top: 1px solid var(--rule); }
.tl-year { font-family: var(--display); color: var(--amber-deep); font-weight: 700; font-size: 1.05rem; }
.tl-text { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- news ---------- */
.news-grid { display: grid; }
.news-card { border-bottom: 1px solid var(--rule); }
.news-card:first-child { border-top: 1px solid var(--rule); }
.news-card summary { list-style: none; cursor: pointer; padding: 26px 4px; position: relative;
  display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; align-items: baseline; }
.news-card summary::-webkit-details-marker { display: none; }
.news-date { color: var(--amber-deep); font-size: 0.78rem; letter-spacing: 0.1em; }
html[dir="rtl"] .news-date { letter-spacing: 0.03em; }
.news-title { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.55; transition: color 0.2s; }
html[lang="en"] .news-title { line-height: 1.25; }
.news-card summary:hover .news-title { color: var(--amber-deep); }
.news-cta { color: var(--ink-soft); font-size: 0.8rem; white-space: nowrap; }
.news-body { padding: 0 4px 28px; color: var(--ink-soft); font-size: 1rem; max-width: 720px; margin-inline-start: 140px; }
.news-card[open] .news-cta { display: none; }

/* ---------- submit form ---------- */
.submit-form {
  padding: clamp(28px, 5vw, 52px); display: grid; gap: 30px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: 12px 12px 0 var(--paper-2), 12px 13px 0 var(--rule-soft);
}
.f-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.f-field { display: grid; gap: 6px; font-size: 0.78rem; color: var(--amber-deep);
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }
html[dir="rtl"] .f-field { letter-spacing: 0.03em; }
.f-field input, .f-field select, .f-field textarea {
  background: transparent; border: none; border-bottom: 1px solid var(--rule);
  color: var(--ink); font-family: var(--font-body); font-size: 1.02rem; font-weight: 300;
  padding: 8px 2px; transition: border-color 0.2s; width: 100%; border-radius: 0;
  letter-spacing: normal; text-transform: none;
}
.f-field textarea {
  resize: vertical; line-height: 1.8;
  border: 1px solid var(--rule); border-radius: 3px;
  background: rgba(240, 230, 207, 0.35);
  padding: 14px 16px; margin-top: 4px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.f-field input:focus, .f-field select:focus { outline: none; border-bottom-color: var(--amber-deep); box-shadow: 0 1px 0 var(--amber-deep); }
.f-field textarea:focus { outline: none; border-color: var(--amber-deep); box-shadow: 0 0 0 1px var(--amber-deep); background: var(--paper); }
.f-field.invalid input { border-bottom-color: #A93F26; box-shadow: 0 1px 0 #A93F26; }
.f-field.invalid textarea { border-color: #A93F26; box-shadow: 0 0 0 1px #A93F26; }
.submit-form .btn { justify-self: start; }
html[dir="rtl"] .submit-form .btn { justify-self: start; }
.f-msg { min-height: 1.4em; font-size: 0.95rem; }
.f-msg.ok { color: #3D7A4E; }
.f-msg.err { color: #A93F26; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #E9DFC8; padding: clamp(76px, 11vh, 130px) 0 44px; }
.footer .eyebrow { color: #E9BE62; }
.footer .eyebrow::before { background: #E9BE62; }
.footer .section-title { color: #F8F2E4; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; margin-block: 40px 80px;
  border-top: 1px solid rgba(233, 223, 200, 0.25); border-bottom: 1px solid rgba(233, 223, 200, 0.25); }
.contact-card { padding: 30px 24px; display: grid; gap: 6px; transition: background 0.25s;
  border-inline-start: 1px solid rgba(233, 223, 200, 0.15); }
.contact-card:first-child { border-inline-start: none; }
.contact-card:hover { background: rgba(233, 190, 98, 0.08); }
.contact-card > span:first-child { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: #F8F2E4; }
.contact-mail { color: #E9BE62; font-size: 0.88rem; }
.footer-nav { display: flex; gap: clamp(18px, 3vw, 36px); justify-content: center; flex-wrap: wrap;
  margin-bottom: 44px; font-size: 0.88rem; color: rgba(233, 223, 200, 0.8); }
.footer-nav a:hover { color: #E9BE62; }
.footer-base { text-align: center; color: rgba(233, 223, 200, 0.65); }

/* ---------- prose pages & FAQ ---------- */
.prose { max-width: 720px; }
.prose h2 { font-family: var(--display); font-size: 1.5rem; margin: 36px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 16px; color: var(--ink-soft); font-size: 1.02rem; }
.faq-list { display: grid; margin-top: 10px; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item:first-child { border-top: 1px solid var(--rule); }
.faq-item summary { list-style: none; cursor: pointer; padding: 22px 4px;
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; position: relative; transition: color 0.2s; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; inset-inline-end: 8px; top: 50%;
  transform: translateY(-50%); color: var(--amber-deep); font-size: 1.4rem; font-family: var(--font-body); font-weight: 300; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { color: var(--amber-deep); }
.faq-item p { padding: 0 4px 22px; color: var(--ink-soft); max-width: 680px; }
.footer-line { font-family: var(--display); font-size: 1.3rem; color: #F8F2E4; margin-bottom: 10px; }
.footer-rights { font-size: 0.8rem; }

/* ---------- chat ---------- */
.chat-fab {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: var(--dusk); color: #F2F0E9;
  border: none; border-radius: 999px; padding: 15px 24px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; cursor: pointer;
  box-shadow: 0 10px 28px rgba(51, 80, 107, 0.4); transition: transform 0.25s, background 0.25s;
}
.chat-fab:hover { transform: translateY(-3px); background: #263D53; }
.chat-panel[hidden] { display: none; }
.chat-panel {
  position: fixed; bottom: 90px; inset-inline-end: 22px; z-index: 60;
  width: min(400px, calc(100vw - 44px)); height: min(560px, calc(100svh - 130px));
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 70px rgba(40, 28, 12, 0.35);
}
.chat-head { display: flex; justify-content: space-between; align-items: start; padding: 18px 20px 14px;
  border-bottom: 1px solid var(--rule); background: var(--dusk); color: #F2F0E9; }
.chat-title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.chat-sub { color: rgba(242, 240, 233, 0.75); font-size: 0.78rem; }
.chat-close { background: none; border: none; color: rgba(242, 240, 233, 0.8); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 4px; font-size: 0.94rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: break-word; }
.msg.bot { background: rgba(51, 80, 107, 0.08); border: 1px solid rgba(51, 80, 107, 0.2); align-self: flex-start; }
.msg.user { background: rgba(185, 111, 36, 0.1); border: 1px solid rgba(185, 111, 36, 0.28); align-self: flex-end; }
.msg.typing { color: var(--ink-soft); font-style: italic; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--rule); }
.chat-input input {
  flex: 1; background: transparent; border: 1px solid var(--rule); border-radius: 2px;
  color: var(--ink); font-family: var(--font-body); font-size: 0.94rem; padding: 11px 14px;
}
.chat-input input:focus { outline: none; border-color: var(--dusk); }
.chat-input .btn-gold { background: var(--dusk); color: #F2F0E9; }
.chat-input .btn-gold:hover { background: #263D53; }

/* ---------- sub pages ---------- */
.page-head-pad { padding-top: clamp(130px, 18vh, 180px); }
.section-title.sub { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-top: clamp(60px, 9vh, 100px); }

.book-list { display: grid; margin-top: 20px; }
.book-row { display: grid; grid-template-columns: 150px 1fr; gap: clamp(24px, 4vw, 48px);
  padding-block: 36px; border-top: 1px solid var(--rule); align-items: start; }
.book-row:last-child { border-bottom: 1px solid var(--rule); }
.book-row-cover { background: none; border: none; padding: 0; cursor: pointer; width: 150px; }
.book-row-cover .book-cover { width: 150px; height: 224px; padding: 14px 10px; }
.book-row-cover .bc-title { font-size: 1.05rem; }
.book-row-cover .bc-foot { font-size: 0.5rem; }
.book-row-cover:hover .book-cover { transform: translateY(-6px); }
.book-row-title { font-family: var(--display); font-size: 1.7rem; font-weight: 700; line-height: 1.5; }
html[lang="en"] .book-row-title { line-height: 1.2; }
.book-row-sub { color: var(--amber-deep); font-size: 0.9rem; margin-bottom: 12px; }
.book-row-blurb { color: var(--ink-soft); max-width: 640px; margin-bottom: 12px; }
.book-row-meta { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--amber-deep); text-transform: uppercase; }
html[dir="rtl"] .book-row-meta { letter-spacing: 0.02em; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.video-frame { aspect-ratio: 16 / 9; background: #1B2836; border-radius: 3px; overflow: hidden;
  box-shadow: 8px 8px 0 var(--paper-2), 8px 9px 0 var(--rule-soft); }
.video-frame iframe { width: 100%; height: 100%; }
.video-card figcaption { margin-top: 14px; font-size: 0.95rem; color: var(--ink-soft); }

.press-list { display: grid; gap: 0; }
.press-quote { padding: 30px 4px; border-top: 1px solid var(--rule); }
.press-quote:last-child { border-bottom: 1px solid var(--rule); }
.press-quote p { font-family: var(--display); font-size: 1.35rem; line-height: 1.8; color: var(--ink); margin-bottom: 10px; }
html[lang="en"] .press-quote p { line-height: 1.45; }
.press-quote cite { font-style: normal; color: var(--amber-deep); font-size: 0.85rem; letter-spacing: 0.06em; }
.press-quote cite a:hover { text-decoration: underline; }

.article-list { display: grid; }
.article-link { display: flex; justify-content: space-between; gap: 20px; align-items: baseline;
  padding: 20px 4px; border-top: 1px solid var(--rule-soft); transition: background 0.2s; }
.article-link:last-child { border-bottom: 1px solid var(--rule-soft); }
.article-link:hover { background: var(--paper-2); }
.article-link > span:first-child { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.article-src { color: var(--amber-deep); font-size: 0.8rem; white-space: nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav-actions .btn { display: none; }
  .about-grid, .author-grid { grid-template-columns: 1fr; }
  .portrait-frame { position: static; max-width: 260px; }
  .book-dialog-inner { grid-template-columns: 1fr; }
  .bd-cover { min-height: 170px; }
  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
  .stat:last-child { border-bottom: none; }
  .stat { border-bottom: none; }
  .news-card summary { grid-template-columns: 1fr auto; }
  .news-date { grid-column: 1 / -1; }
  .news-body { margin-inline-start: 0; }
  .book-row { grid-template-columns: 110px 1fr; }
  .book-row-cover, .book-row-cover .book-cover { width: 110px; }
  .book-row-cover .book-cover { height: 165px; }
}
@media (max-width: 560px) {
  .about-stats { grid-template-columns: 1fr; }
  .stat { border-bottom: none; }
  .chat-fab span { display: none; }
  .chat-fab { padding: 16px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scroll-line { animation: none; }
  .btn, .book-cover, .contact-card { transition: none; }
}
