/* ════════════════════════════════════════════════════════════
   ވާހަކަ ފަތް · Vaahaka Faiy — public site styles (RTL)
   Dhivehi fonts: Noto Sans Thaana (default, Google Fonts) plus the embedded
   families in assets/css/fonts.css. Per-place font/size choices (Admin → Design)
   arrive as --ff-<role> / --fs-<role> variables; the values after the comma
   in each var() below are the built-in defaults.
   ════════════════════════════════════════════════════════════ */

:root {
  --accent: #F2B544;
  --bg: #0b0b0d;
  --surface: #17171b;
  --surface-2: #121215;
  --line: #2a2a30;
  --text: #f5f5f1;
  --text-2: #d6d6d0;
  --muted: #a3a3ab;
  --muted-2: #8e8e96;
  --font-dv: 'Noto Sans Thaana', sans-serif;
  --font-ui: Inter, 'Noto Sans Thaana', system-ui, sans-serif;
  --pad: clamp(18px, 4vw, 60px);
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-ui); font-size: var(--fs-body, 17px); line-height: 1.8;
  direction: rtl; text-align: right; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--text); }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--font-dv); font-weight: 800; line-height: 1.45; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; right: 12px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: var(--r); }
.skip-link:focus { top: 12px; }
.wrap { padding-inline: var(--pad); }
.muted { color: var(--muted); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border: 0; border-radius: var(--r);
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 18px; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 15px; }
.btn-light  { background: var(--text); color: var(--bg); }
.btn-light:hover { background: #fff; color: var(--bg); }
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-accent:hover { color: var(--bg); filter: brightness(1.08); }
.btn-ghost  { background: rgba(109,109,110,.72); color: #fff; }
.btn-ghost:hover { background: rgba(109,109,110,.9); }
.btn-outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px #6b6b72; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 0; color: var(--text); cursor: pointer; border-radius: 50%; }
.lift { transition: transform .25s ease; }
.lift:hover { transform: scale(1.04); }

/* ── Header ──────────────────────────────────────────────── */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s ease;
  background: linear-gradient(180deg, rgba(11,11,13,.85) 0%, rgba(11,11,13,0) 100%); }
.site-header.is-solid { background: rgba(11,11,13,.97); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px 34px; min-height: 76px; padding-block: 8px; transition: padding .25s ease; }
.logo { grid-column: 2; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-dv { font-family: var(--ff-logo, var(--font-dv)); font-size: var(--fs-logo, 30px); font-weight: 800; line-height: 1.3; color: var(--text); white-space: nowrap; transition: font-size .25s ease; }
.logo-en { font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .22em; color: #b8b8bf; }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px 24px; flex: 1 1 auto; font-family: var(--ff-nav, inherit); font-size: var(--fs-nav, 16px); }
.main-nav a { color: var(--text-2); text-decoration: none; }
.main-nav a:hover, .main-nav a.is-active { color: #fff; }
.main-nav a.is-active { font-weight: 700; }
.logo-img { display: block; height: var(--fs-logo_img, 88px); width: auto; transition: height .25s ease; }
.site-header.is-solid .logo-img { height: min(48px, var(--fs-logo_img, 88px)); }
.site-header.is-solid .logo-dv { font-size: calc(var(--fs-logo, 30px) * .6); }
.site-header.is-solid .header-inner { min-height: 0; padding-block: 4px; }
.header-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 10px; }
.nav-cta { grid-column: 1; grid-row: 1; justify-self: start; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; padding: 4px;
  border-radius: 50%; background: #d62828; color: #fff; text-decoration: none; text-align: center; line-height: 1.15; font-size: 15px; font-weight: 700;
  box-shadow: 0 2px 10px rgba(214,40,40,.45); transition: transform .15s ease, filter .15s ease; }
.nav-cta:hover { color: #fff; filter: brightness(1.12); transform: scale(1.06); }
.nav-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.site-header.is-solid .nav-cta { width: 46px; height: 46px; font-size: 13px; }
.search { display: flex; align-items: center; }
.search input { width: 0; opacity: 0; height: 40px; padding: 0; border: 1px solid transparent; border-radius: var(--r);
  background: rgba(11,11,13,.85); color: var(--text); font: inherit; font-size: 15px; transition: width .25s, opacity .25s, padding .25s; }
.search:focus-within input, .search input:not(:placeholder-shown) { width: 200px; opacity: 1; padding: 0 12px; border-color: #6b6b72; }
.burger { display: none; }

/* ── Backdrops & generated art ───────────────────────────── */
.backdrop { position: absolute; inset: 0; background: var(--bg, #26313d); overflow: hidden; }
.backdrop-orb { position: absolute; width: min(46vw, 720px); aspect-ratio: 1; left: 8%; top: 9%; border-radius: 50%; background: var(--orb); }
.backdrop-band { position: absolute; inset: 60% 0 0 0; background: var(--band); }
.backdrop-lines { position: absolute; inset: 60% 0 auto 0; height: 120px;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.10) 0 2px, transparent 2px 18px); }
.backdrop--img img { width: 100%; height: 100%; object-fit: cover; }
.backdrop--card .backdrop-orb { width: 46%; top: 8%; left: 10%; }
.backdrop--card .backdrop-band { inset: 62% 0 0 0; }
.backdrop--card .backdrop-lines { display: none; }
.shade { position: absolute; pointer-events: none; }
.shade--side { inset: 0; background: linear-gradient(270deg, var(--bg-page, #0b0b0d) 0%, rgba(11,11,13,.92) 30%, rgba(11,11,13,.35) 62%, rgba(11,11,13,.1) 100%); }
.shade--bottom { inset: auto 0 0 0; height: 260px; background: linear-gradient(0deg, #0b0b0d 0%, rgba(11,11,13,0) 100%); }

.cover { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--r); background: var(--bg);
  box-shadow: 0 12px 30px rgba(0,0,0,.5); flex: 0 0 auto; }
.cover--img img { width: 100%; height: 100%; object-fit: cover; }
.cover-orb { position: absolute; width: 44%; aspect-ratio: 1; top: 22%; left: 24%; border-radius: 50%; background: var(--orb); }
.cover-band { position: absolute; inset: 60% 0 0 0; background: var(--band); }
.cover-author { position: absolute; top: 8%; inset-inline: 7%; font-family: var(--font-dv); font-size: .62em; font-weight: 600; line-height: 1.4; color: var(--ink); opacity: .9; }
.cover-title { position: absolute; bottom: 6%; inset-inline: 7%; font-family: var(--ff-cover_title, var(--font-dv)); font-weight: 800; line-height: 1.4; color: var(--ink); }
.badge-new { position: absolute; top: 8px; left: 8px; padding: 1px 10px; border-radius: 3px; background: var(--accent); color: var(--bg); font-size: 13px; font-weight: 800; }
.cover--xs { width: 96px; font-size: 12px; }  .cover--xs .cover-title { font-size: calc(12px * var(--sc-cover_title, 1)); }  .cover--xs .cover-author { display: none; }
.cover--sm { width: 180px; font-size: 16px; } .cover--sm .cover-title { font-size: calc(19px * var(--sc-cover_title, 1)); }
.cover--md { width: 200px; font-size: 17px; } .cover--md .cover-title { font-size: calc(22px * var(--sc-cover_title, 1)); }
.cover--lg { width: 280px; font-size: 22px; } .cover--lg .cover-title { font-size: calc(34px * var(--sc-cover_title, 1)); }
.cover--xl { width: 300px; font-size: 22px; } .cover--xl .cover-title { font-size: calc(34px * var(--sc-cover_title, 1)); }
.cover--fluid { width: 100%; font-size: 17px; } .cover--fluid .cover-title { font-size: calc(22px * var(--sc-cover_title, 1)); }

/* ── Home hero rotator ───────────────────────────────────── */
.hero { position: relative; min-height: max(640px, 92vh); overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-body { position: relative; height: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 48px; padding-top: 120px; padding-bottom: 140px; }
.hero-text { flex: 1 1 420px; max-width: 640px; display: flex; flex-direction: column; gap: 18px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--accent); }
.eyebrow-line { display: inline-block; width: 28px; height: 2px; background: var(--accent); }
.hero-title { font-family: var(--ff-hero_title, var(--font-dv)); font-size: var(--fs-hero_title, clamp(42px, 5.6vw, 82px)); line-height: 1.3; }
.title-en { font-family: Inter, sans-serif; font-size: 15px; letter-spacing: .04em; color: var(--muted); margin-top: -8px; text-align: right; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 16px; color: var(--text-2); }
.meta-line strong { color: #fff; }
.chip-outline { border: 1px solid #8a8a90; padding: 0 10px; border-radius: 3px; font-size: 14px; }
.hero-blurb { font-family: var(--ff-hero_blurb, inherit); font-size: var(--fs-hero_blurb, 19px); line-height: 1.85; color: #e4e4de; max-width: 580px; }
.hero-cover { transform: rotate(2deg); text-decoration: none; }
.hero-cover .cover { box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
.hero-dots { position: absolute; bottom: 110px; inset-inline: 0; display: flex; gap: 8px; z-index: 2; }
.dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: rgba(245,245,241,.4); cursor: pointer; transition: width .25s, background .25s; }
.dot.is-active { width: 28px; background: var(--text); }
/* stretch dot hit-area to 44px without changing the look */
.dot { position: relative; }
.dot::after { content: ''; position: absolute; inset: -18px -6px; }

/* ── Rows ────────────────────────────────────────────────── */
.rows { position: relative; margin-top: -70px; z-index: 3; display: flex; flex-direction: column; gap: 22px; }
.row-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
.row-head--center { justify-content: center; text-align: center; }
.row-head h2 { font-family: var(--ff-section_title, var(--font-dv)); font-size: var(--fs-section_title, 24px); }
.row-link { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; color: var(--accent); text-decoration: none; }
.row-link:hover { color: var(--accent); filter: brightness(1.1); }
/* two small shelves (1–2 books each) side by side on desktop; stacked on tablet/mobile */
.row-pair { display: flex; flex-direction: row; justify-content: center; gap: 56px; padding-inline: var(--pad); }
.row-pair > .row--half { flex: 0 1 auto; min-width: 0; }
.row-pair .wrap { padding-inline: 0; }
/* mobile/tablet: still side by side — shrink the cards so all (--t) books of the pair fit the screen width */
@media (max-width: 900px) {
  .row-pair { gap: 12px; --cw: min(140px, calc((100vw - 2 * var(--pad) - 12px - 8px * (var(--t, 2) - 2)) / var(--t, 2))); }
  .row-pair .row-scroller { gap: 8px; }
  .row-pair .row .card, .row-pair .cover--sm { width: var(--cw); }
  .row-pair .row-head h2 { font-size: min(var(--fs-section_title, 24px), 18px); }
}
.row-track { position: relative; }
.row-scroller { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding-top: 14px; padding-bottom: 24px; scrollbar-width: none; }
.row-scroller::-webkit-scrollbar { display: none; }
/* centre the cards when they fit; auto margins (unlike justify-content:center) keep overflowing rows scrollable from the start */
.row-scroller--center > :first-child { margin-inline-start: auto; }
.row-scroller--center > :last-child { margin-inline-end: auto; }
.row-scroller > * { scroll-snap-align: start; }
.row-arrow { position: absolute; top: 14px; bottom: 24px; width: var(--pad); min-width: 44px; z-index: 2; border: 0; color: #fff;
  background: rgba(11,11,13,.55); cursor: pointer; opacity: 0; transition: opacity .2s; display: grid; place-items: center; }
.row-arrow--prev { right: 0; } .row-arrow--next { left: 0; }
.row-track:hover .row-arrow, .row-arrow:focus-visible { opacity: 1; }
.row-arrow[hidden] { display: none; }

.card { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.row .card { width: 180px; }
.card-title { font-family: var(--ff-card_title, var(--font-dv)); font-size: var(--fs-card_title, 16px); font-weight: 700; line-height: 1.5; color: var(--text); }
.card-meta { font-size: 14px; line-height: 1.6; color: var(--muted); }
.card-hook { font-family: var(--ff-card_text, inherit); font-size: var(--fs-card_text, 15px); line-height: 1.75; color: #c4c4cb; }

.ranked { display: flex; align-items: flex-end; text-decoration: none; }
.ranked-no { font-family: Inter, sans-serif; font-weight: 800; font-size: 220px; line-height: .78; color: var(--bg);
  -webkit-text-stroke: 3px #6b6b72; margin-left: -24px; }

.wide { flex: 0 0 340px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.wide-art { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; display: block; }
.wide-art .shade--side { background: linear-gradient(270deg, rgba(11,11,13,.72) 0%, rgba(11,11,13,0) 65%); }
.wide-title { position: absolute; right: 16px; bottom: 12px; left: 38%; font-family: var(--ff-wide_title, var(--font-dv)); font-size: var(--fs-wide_title, 23px); font-weight: 800; line-height: 1.4; color: #fff; }

/* ── Ways in ─────────────────────────────────────────────── */
.ways { padding-top: 30px; padding-bottom: 10px; }
.ways h2 { font-family: var(--ff-section_title, var(--font-dv)); font-size: var(--fs-section_title, 24px); }
.ways .muted { margin-bottom: 20px; }
.ways-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.way { display: flex; gap: 20px; align-items: center; min-height: 190px; padding: 22px; border-radius: 6px; background: var(--surface);
  text-decoration: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.way-text { display: flex; flex-direction: column; gap: 4px; }
.way-mood { font-size: 14px; font-weight: 700; color: var(--accent); }
.way-title { font-family: var(--ff-way_title, var(--font-dv)); font-size: var(--fs-way_title, 23px); font-weight: 800; line-height: 1.45; }
.way-why { font-size: 15px; line-height: 1.8; color: #b8b8bf; }

/* ── Author & newsletter ─────────────────────────────────── */
.author { margin-top: 60px; background: var(--surface-2); }
.author-inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-block: 72px; }
.author-photo { flex: 0 0 260px; width: 260px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; }
.author-photo--empty { background: #24242a; display: grid; place-items: center; color: var(--muted-2); font-size: 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.author-text { flex: 1 1 420px; max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.eyebrow--plain { display: block; }
.author-quote { font-family: var(--ff-author_quote, var(--font-dv)); font-size: var(--fs-author_quote, clamp(28px, 3.6vw, 44px)); line-height: 1.55; }
.author-bio { font-family: var(--ff-author_bio, inherit); font-size: var(--fs-author_bio, 18px); line-height: 1.9; color: #c9c9c3; }
/* ── Home videos: landscape carousel, reels, full-screen viewer ── */
.vhome { padding-block: 56px 8px; display: flex; flex-direction: column; gap: 40px; }

/* poster button with the custom circular play button */
.vp { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; color: #fff; font: inherit; }
.vp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: transform .3s ease, opacity .3s ease; }
.vp:hover .vp-img { transform: scale(1.03); opacity: 1; }
.vp-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); }
.vp-play svg { width: 96px; max-width: 28%; height: auto; transition: transform .2s ease; }
.vp:hover .vp-play svg { transform: scale(1.07); }
.vp-play circle { fill: rgba(0,0,0,.15); stroke: #fff; stroke-width: 3; }
.vp-play polygon { fill: #fff; }
.vp.is-hidden { display: none; }

/* landscape: newest big in the middle, the rest peek at the sides */
.vl { position: relative; --vl-w: min(70vw, 860px); }
.vl-track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: calc((100% - var(--vl-w)) / 2); overscroll-behavior-x: contain; }
.vl-track::-webkit-scrollbar { display: none; }
.vl-item { flex: 0 0 var(--vl-w); margin: 0; scroll-snap-align: center; display: flex; flex-direction: column; gap: 10px; }
.vl-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.vl-item figcaption { text-align: center; }
.vl-arrow { position: absolute; top: calc(50% - 30px); transform: translateY(-50%); z-index: 3; display: grid; place-items: center; }
.vl-arrow--left { left: 8px; } .vl-arrow--right { right: 8px; }
.video-player { background: #000; }
.vl-frame .video-player, .vv-frame .video-player { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; border: 0; }

/* reels: newest 4 as cards */
.reels-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 980px; width: 100%; margin-inline: auto; }
.reel-card { aspect-ratio: 9 / 16; height: auto; border-radius: 8px; }
.reel-title { position: absolute; inset: auto 0 0 0; padding: 36px 12px 12px; text-align: center; font-family: var(--font-dv); font-weight: 700; font-size: 16px; line-height: 1.5;
  background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0)); }
.reel-card .vp-play { background: rgba(0,0,0,.25); }
.reel-card .vp-play svg { width: 64px; }

/* full-screen viewer — sideways on desktop, vertical finger-scroll on mobile */
html.vv-open { overflow: hidden; }
.vv { position: fixed; inset: 0; z-index: 300; background: rgba(5,5,7,.97); }
.vv[hidden] { display: none; }
.vv-scroller { position: absolute; inset: 0; display: flex; overflow: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.vv-scroller::-webkit-scrollbar { display: none; }
.vv-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.vv-frame { position: relative; background: #000; border-radius: 8px; overflow: hidden; }
.vv-slide--reel .vv-frame { height: min(88vh, calc(100dvh - 90px)); aspect-ratio: 9 / 16; }
.vv-slide--landscape .vv-frame { width: min(92vw, 1100px); aspect-ratio: 16 / 9; }
.vv-title { margin: 0; max-width: 90vw; text-align: center; font-family: var(--font-dv); font-weight: 700; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.vv-close, .vv-arrow { position: absolute; z-index: 5; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; }
.vv-close:hover, .vv-arrow:hover { background: rgba(255,255,255,.26); }
.vv-close { top: 16px; right: 16px; }
.vv-arrow { top: 50%; transform: translateY(-50%); }
.vv-arrow--left { left: 20px; } .vv-arrow--right { right: 20px; }
.vv-arrow.is-off { display: none; }

@media (max-width: 768px) {
  .vhome { padding-block: 36px 0; gap: 28px; }
  .vl { --vl-w: 86vw; }
  .vl-track { gap: 14px; }
  .vl-arrow { display: none; }
  /* reels: one swipeable row of cards a bit wider than the 140px book cards */
  .reels-row { display: flex; gap: 14px; max-width: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px; }
  .reels-row::-webkit-scrollbar { display: none; }
  .reel-card { flex: 0 0 168px; width: 168px; scroll-snap-align: start; }
  .reel-title { font-size: 14px; padding: 28px 10px 10px; }
  .reel-card .vp-play svg { width: 52px; }
  .vv-scroller { flex-direction: column; scroll-snap-type: y mandatory; }
  .vv-slide { flex: 0 0 100%; width: 100%; gap: 0; }
  .vv-slide--reel .vv-frame { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
  .vv-slide--landscape .vv-frame { width: 100%; border-radius: 0; }
  .vv-title { position: absolute; inset: auto 0 0 0; max-width: none; padding: 40px 16px calc(18px + env(safe-area-inset-bottom)); pointer-events: none;
    background: linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,0)); }
  .vv-slide--landscape .vv-title { position: static; background: none; padding: 14px 16px 0; }
  .vv-arrow { display: none; }
  .vv-close { top: calc(12px + env(safe-area-inset-top)); }
}

/* ── Videos ──────────────────────────────────────────────── */
.videos { padding-block: 64px 24px; }
.videos-head { margin-bottom: 20px; }
.videos-head .section-h { margin-bottom: 4px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.video-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.video-frame, .video-player { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 6px; overflow: hidden; background: #000; cursor: pointer; }
.video-player { cursor: auto; }
.video-card--portrait { max-width: 300px; }
.video-card--portrait .video-frame, .video-card--portrait .video-player { aspect-ratio: 9 / 16; }
video.video-player { object-fit: contain; }
.video-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease, opacity .3s ease; opacity: .9; }
.video-frame:hover img { transform: scale(1.04); opacity: 1; }
.video-play { position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--bg); box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.video-card figcaption { display: flex; flex-direction: column; gap: 2px; }
.video-title { font-family: var(--font-dv); font-weight: 700; font-size: 18px; line-height: 1.6; }
.video-desc { font-size: 15px; line-height: 1.8; color: var(--muted); }
.newsletter { padding-block: 80px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.newsletter h2 { font-family: var(--ff-newsletter_title, var(--font-dv)); font-size: var(--fs-newsletter_title, clamp(28px, 3.4vw, 42px)); }
.newsletter .muted { max-width: 560px; }
.nl-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; max-width: 580px; margin-top: 10px; }
.nl-form input[type=email] { flex: 1 1 280px; height: 56px; padding: 0 18px; border-radius: var(--r); border: 1px solid #6b6b72;
  background: rgba(23,23,27,.9); color: var(--text); font: inherit; font-size: 16px; text-align: left; }
.nl-msg { min-height: 1.8em; color: var(--accent); }

/* ── Category banner, filters, grid ──────────────────────── */
.banner { position: relative; min-height: 600px; display: flex; overflow: hidden; }
.banner .backdrop-orb { width: min(40vw, 600px); left: 6%; top: 4%; }
.banner .backdrop-band { inset: 58% 0 0 0; }
.banner .backdrop-lines { display: none; }
.banner-body { position: relative; align-self: center; display: flex; flex-direction: column; gap: 14px; max-width: 820px; padding-top: 120px; padding-bottom: 90px; }
.crumbs { font-size: 15px; color: #b8b8bf; }
.crumbs a { color: #b8b8bf; text-decoration: none; }
.crumbs [aria-current] { color: var(--text); }
.banner-title { font-family: var(--ff-banner_title, var(--font-dv)); font-size: var(--fs-banner_title, clamp(46px, 6.4vw, 92px)); line-height: 1.3; }
.banner-desc { font-family: var(--ff-banner_desc, inherit); font-size: var(--fs-banner_desc, 19px); line-height: 1.85; color: #e0e0da; max-width: 600px; }
.filter-bar { position: relative; z-index: 2; margin-top: -30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.pills { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border-radius: 23px; border: 1px solid #4a4a52;
  background: rgba(23,23,27,.85); color: var(--text); font-size: 16px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.pill:hover { border-color: #8a8a90; }
.pill.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
.sort { display: flex; align-items: center; gap: 10px; }
.sort label { font-size: 15px; color: #b8b8bf; }
.sort select { height: 46px; padding: 0 14px; border-radius: var(--r); border: 1px solid #4a4a52; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.grid-wrap { padding-top: 40px; padding-bottom: 30px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 40px 22px; }
.book-grid--sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 30px 20px; }
.section-h { font-family: var(--ff-section_title, var(--font-dv)); font-size: var(--fs-section_title, 25px); margin-bottom: 16px; }
.empty { padding: 40px 0; color: var(--muted); font-size: 18px; }
.shelves { padding-top: 30px; padding-bottom: 80px; }
.shelves h2 { font-family: var(--ff-section_title, var(--font-dv)); font-size: var(--fs-section_title, 24px); margin-bottom: 14px; }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.shelf { position: relative; min-height: 130px; padding: 20px; border-radius: 6px; overflow: hidden; background: var(--bg); color: #fff;
  text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; }
.shelf-orb { position: absolute; width: 120px; height: 120px; left: -20px; top: -30px; border-radius: 50%; background: var(--orb); opacity: .85; }
.shelf-name { position: relative; font-family: var(--ff-shelf_name, var(--font-dv)); font-size: var(--fs-shelf_name, 25px); font-weight: 800; line-height: 1.45; }
.shelf-count { position: relative; font-size: 14px; color: rgba(255,255,255,.88); }

/* ── Book details ────────────────────────────────────────── */
.detail-hero { position: relative; min-height: 780px; display: flex; overflow: hidden; }
.detail-hero .backdrop-orb { width: min(50vw, 760px); left: 4%; top: 14%; }
.detail-hero .backdrop-band { inset: 58% 0 0 0; }
.detail-body { position: relative; align-self: flex-end; width: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 48px; padding-top: 130px; padding-bottom: 70px; }
.detail-cover .cover { box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.1); }
.detail-text { flex: 1 1 440px; max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.tablist { display: flex; flex-wrap: wrap; gap: 30px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; height: 56px; border-bottom: 3px solid transparent; margin-bottom: -1px;
  color: var(--muted); font-size: 17px; font-weight: 700; text-decoration: none; }
.tab:hover { color: #fff; }
.tab.is-active { color: #fff; border-color: var(--accent); }
.js .tabpanel[hidden] { display: none; }
.tabpanel { padding: 40px 0 20px; scroll-margin-top: 90px; }
.no-js .tabpanel + .tabpanel { border-top: 1px solid var(--line); }
.overview { display: flex; flex-wrap: wrap; gap: 48px; }
.overview-text { flex: 2 1 480px; max-width: 780px; display: flex; flex-direction: column; gap: 16px; font-family: var(--ff-synopsis, inherit); font-size: var(--fs-synopsis, 18px); line-height: 1.95; color: var(--text-2); }
.facts { flex: 1 1 260px; margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 12px 22px; font-size: 16px; line-height: 1.6; align-content: start; }
.facts dt { color: var(--muted-2); }
.facts dd { margin: 0; }
.excerpt { max-width: 740px; margin: 0 auto; font-family: var(--ff-excerpt, var(--font-dv)); font-size: var(--fs-excerpt, 21px); line-height: 2.05; color: #e4e4de; display: flex; flex-direction: column; gap: 20px; }
.excerpt h2 { font-size: 40px; line-height: 1.4; color: var(--text); margin-top: -12px; }
.excerpt .btn-row { margin-top: 16px; font-family: var(--font-ui); }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.format { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 0 0 1px #2e2e35; }
.format-name { font-family: var(--ff-format_name, inherit); font-size: var(--fs-format_name, 18px); font-weight: 800; line-height: 1.5; }
.format-detail { font-size: 14px; line-height: 1.6; color: var(--muted); }
.format-price { font-size: 17px; font-weight: 700; }
.format .btn, .format-soon { margin-top: 8px; }
.format-soon { font-size: 14px; color: var(--muted-2); }
.episodes { padding-top: 50px; padding-bottom: 20px; }
.episodes .row-head { margin-bottom: 14px; }
.episodes h2 { font-family: var(--ff-section_title, var(--font-dv)); font-size: var(--fs-section_title, 25px); }
.ep-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ep-list li { border-bottom: 1px solid var(--line); }
.ep { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding: 22px 18px; border-radius: var(--r); text-decoration: none; transition: background .2s; }
.ep:hover { background: #1c1c21; }
.ep.is-current { background: #18181d; }
.ep-no { flex: 0 0 40px; font-family: Inter, sans-serif; font-size: 34px; font-weight: 700; color: var(--muted-2); text-align: center; }
.ep-art { position: relative; flex: 0 0 200px; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; display: block; }
.ep-here { position: absolute; right: 8px; bottom: 8px; padding: 0 8px; border-radius: 3px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 800; }
.ep-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; }
.ep-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.ep-title { font-family: var(--ff-ep_title, var(--font-dv)); font-size: var(--fs-ep_title, 20px); font-weight: 800; line-height: 1.5; }
.ep-blurb { font-family: var(--ff-ep_blurb, inherit); font-size: var(--fs-ep_blurb, 16px); line-height: 1.85; color: #c4c4cb; }

/* ── 404 ─────────────────────────────────────────────────── */
.notfound { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding-top: 120px; padding-bottom: 80px; }
.notfound-code { font-family: Inter, sans-serif; font-size: 120px; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 2px #6b6b72; text-align: right; }
.notfound h1 { font-size: 44px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { border-top: 1px solid #222228; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; align-items: center; padding-block: 40px 56px; font-size: 15px; color: var(--muted-2); }
.footer-logo { font-family: var(--ff-footer_logo, var(--font-dv)); font-size: var(--fs-footer_logo, 24px); font-weight: 800; color: var(--text-2); text-decoration: none; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-nav a { color: var(--muted); text-decoration: none; }


/* ── Shop: cart, checkout, order ─────────────────────────── */
.notice { position: relative; z-index: 4; margin: 96px auto 0; padding: 14px 18px; border-radius: 6px; background: #3a2a12; color: #ffe2a8; }
.checkout .notice, .order-page .notice { margin: 0 0 18px; }
.chip-price { padding: 0 10px; border-radius: 3px; background: var(--accent); color: var(--bg); font-size: 14px; font-weight: 700; }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: 2px; left: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--bg);
  font: 700 12px/20px Inter, sans-serif; text-align: center; }
.cart-count[hidden] { display: none; }
.icon-btn--ring { width: 54px; height: 54px; border: 2px solid #8a8a90; background: rgba(11,11,13,.5); }
.cart-toast { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 6px; background: rgba(23,23,27,.92); color: var(--text); font-size: 15px; }
.cart-toast a { color: var(--accent); font-weight: 700; }
.cart-toast[hidden] { display: none; }
.small-note { font-size: 14px; line-height: 1.7; margin-top: 10px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.page-title { font-family: var(--ff-page_title, var(--font-dv)); font-size: var(--fs-page_title, clamp(30px, 4vw, 44px)); line-height: 1.4; }
.backdrop--cover img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) saturate(1.2) brightness(.6); transform: scale(1.15); }

.checkout, .order-page { padding-top: 110px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 22px; }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.co-grid[hidden] { display: none; }
.co-main { display: flex; flex-direction: column; gap: 18px; }
.co-card { background: var(--surface); border-radius: 8px; padding: 22px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.co-card h2 { font-size: 21px; margin-bottom: 14px; }
.co-side { position: sticky; top: 96px; }
.co-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 30px 0; font-size: 18px; }
.co-empty[hidden] { display: none; }
.co-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.co-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.co-item:last-child { border-bottom: 0; }
.co-item img, .co-thumb { width: 52px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; background: #26262c; flex: 0 0 auto; }
.co-item-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.co-item-text a { font-family: var(--font-dv); font-weight: 700; text-decoration: none; }
.qty { display: inline-flex; align-items: center; border: 1px solid #4a4a52; border-radius: 6px; }
.qty button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; }
.qty span { min-width: 26px; text-align: center; font-family: Inter, sans-serif; font-weight: 700; }
.co-remove { width: 40px; height: 40px; color: var(--muted); font-size: 16px; }
.co-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.co-fields[hidden] { display: none; }
.co-boat { margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--text-2); }
.field small { color: var(--muted); }
.field--wide { grid-column: 1 / -1; }
.co-phone-box { position: relative; }
.co-phone-box input { padding-right: 44px; }
.co-verified { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: inline-flex; }
.co-verified[hidden], .co-otp[hidden], .co-otp-code[hidden], .co-otp-msg[hidden] { display: none; }
.co-otp { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-top: 4px; }
.co-otp-code { display: flex; gap: 8px; width: 100%; }
.co-otp-code input { flex: 1; min-width: 0; letter-spacing: .4em; text-align: center; padding: 12px 14px; border-radius: 6px; border: 1px solid #4a4a52; background: #0f0f12; color: var(--text); font: inherit; font-size: 18px; }
.co-otp-msg { margin: 0; font-size: 14px; color: #ffb4a8; }
.co-otp-msg.is-ok { color: #b6f0c8; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border-radius: 6px; border: 1px solid #4a4a52; background: #0f0f12; color: var(--text); font: inherit; font-size: 16px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
/* number inputs: no up/down spinner arrows */
.field input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.field input[type=number]::-webkit-outer-spin-button,
.field input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 6px; border: 1px solid #4a4a52; background: #0f0f12; font-weight: 700; }
.choice input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.co-summary dl { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; margin: 0 0 18px; }
.co-summary dd { margin: 0; font-family: Inter, sans-serif; text-align: left; }
.co-total { font-size: 19px; font-weight: 800; color: #fff; padding-top: 10px; border-top: 1px solid var(--line); }
.co-voucher { margin-bottom: 16px; }
.co-voucher-label { display: block; font-size: 15px; color: var(--text-2); margin-bottom: 6px; }
.co-voucher-row { display: flex; gap: 8px; }
.co-voucher-row[hidden], .co-voucher-applied[hidden], .co-voucher-msg[hidden] { display: none; }
.co-voucher-row input { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border-radius: 6px; border: 1px solid #4a4a52; background: #0f0f12; color: var(--text); font: inherit; font-size: 16px; text-transform: uppercase; }
.co-voucher-row input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.co-voucher-applied { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border-radius: 6px; background: #14301f; color: #b6f0c8; }
.co-voucher-remove { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.co-voucher-msg { margin: 8px 0 0; font-size: 14px; color: #ffb4a8; }
.co-voucher-msg.is-ok { color: #b6f0c8; }
.co-error { color: #ffb4a8; background: #3a1714; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.co-error[hidden] { display: none; }

.order-head { display: flex; align-items: center; gap: 18px; }
.order-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--bg); flex: 0 0 auto; }
.order-no { font-family: Inter, sans-serif; letter-spacing: .04em; color: var(--text); }
.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.order-grid .facts, .co-card .facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0 0 14px; }
.ok-text { color: #8fe0a9; font-weight: 700; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .03em; }
.ebook-codes { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.ebook-codes li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px; border-radius: 6px; background: #0f0f12; }
.ebook-codes code { font-size: 16px; color: var(--accent); }
.co-grid > *, .co-main > *, .co-card, .field { min-width: 0; }
.field input, .field textarea { max-width: 100%; box-sizing: border-box; }
.co-fields { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
@media (max-width: 900px) {
  .co-grid { grid-template-columns: minmax(0, 1fr); }
  .co-side { position: static; }
}
@media (max-width: 640px) {
  .checkout, .order-page { padding-top: 96px; padding-bottom: 60px; gap: 18px; }
  .checkout, .order-page, .co-grid { max-width: 100%; overflow-x: clip; }
  .page-title { font-size: 32px; }
  .co-card { padding: 18px 16px; }
  .co-card h2 { font-size: 23px; }
  /* cart line: cover + title/price on top, quantity + remove underneath */
  .co-item { display: grid; grid-template-columns: 60px minmax(0, 1fr); grid-template-areas: "img text" "qty qty"; gap: 8px 14px; align-items: center; padding: 16px 0; position: relative; }
  .co-item > img, .co-item > .co-thumb { grid-area: img; width: 60px; }
  .co-item-text { grid-area: text; font-size: 18px; line-height: 1.6; }
  .co-item-text .muted { font-size: 16px; }
  .co-item .qty { grid-area: qty; justify-self: start; }
  .co-item .co-remove { position: absolute; bottom: 16px; inset-inline-end: 0; }
  .qty button { width: 48px; height: 48px; font-size: 22px; }
  .qty span { min-width: 34px; font-size: 18px; }
  .co-remove { width: 48px; height: 48px; font-size: 18px; }
  .field { font-size: 17px; gap: 8px; }
  .field input, .field textarea { font-size: 17px; padding: 13px 14px; }
  .choice-row { gap: 8px; }
  .choice span { min-height: 52px; font-size: 17px; padding: 0 16px; }
  .small-note { font-size: 15px; }
  .co-summary dl { font-size: 17px; }
  .co-total { font-size: 21px; }
  .co-voucher-label { font-size: 17px; }
  .co-voucher-row input { font-size: 17px; padding: 12px; }
  .co-voucher-row .btn { padding-inline: 14px; white-space: nowrap; }
  .co-error, .co-voucher-msg { font-size: 16px; }
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .burger { display: grid; }
  .hide-sm { display: none; }
  .main-nav { display: none; order: 3; flex: 1 1 100%; flex-direction: column; gap: 0; padding: 8px 0 14px; }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .site-header:has(.main-nav.is-open) { background: rgba(11,11,13,.98); }
  .search:focus-within input, .search input:not(:placeholder-shown) { width: 150px; }
  :root { --cover-h: min(58vh, 520px); }
  .logo-dv { font-size: var(--fs-logo_m, 24px); }
  .logo-img { height: var(--fs-logo_img_m, 72px); }
  .site-header.is-solid .logo-img { height: min(48px, var(--fs-logo_img_m, 72px)); }
  .site-header.is-solid .logo-dv { font-size: calc(var(--fs-logo_m, 24px) * .7); }
  /* Hero: the full cover is pinned below the header; the title/info block sits under it
     and, on scroll, slides up over the cover with a dark gradient. */
  .hero { --hero-top: var(--header-h, 88px); --hero-pad: calc(max(76px, var(--fs-logo_img_m, 72px)) + 16px); min-height: 0; display: grid; }
  .hero-slide { position: relative; inset: auto; grid-area: 1 / 1; clip-path: inset(0); display: flex; flex-direction: column; }
  .hero-slide .backdrop, .hero-slide .shade { display: none; }
  .hero-cover { display: flex; justify-content: center; position: fixed; top: var(--hero-top); left: 0; width: 100%; height: var(--cover-h); z-index: -1; transform: none; pointer-events: none; }
  .hero-cover .cover { height: 100%; width: auto; aspect-ratio: 2 / 3; font-size: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
  .hero-cover .cover--img img { object-fit: cover; }
  .hero-cover .cover .cover-title { font-size: calc(30px * var(--sc-cover_title, 1)); }
  .hero-body { height: auto; flex: 1 0 auto; padding-top: calc(var(--hero-pad) + var(--cover-h)); padding-bottom: 150px; gap: 0; justify-content: center; text-align: center; }
  .hero-body::before { content: ''; position: absolute; inset: calc(var(--hero-pad) + var(--cover-h)) 0 0 0; background: linear-gradient(180deg, rgba(11,11,13,0) 0, #0b0b0d 90px); }
  .hero-text { position: relative; align-items: center; text-align: center; flex-basis: 100%; padding-top: 36px; }
  .hero-text .eyebrow, .hero-text .meta-line, .hero-text .btn-row { justify-content: center; }
  .hero-blurb { margin-inline: auto; }
  .hero-dots { justify-content: center; }
  .ranked-no { font-size: 150px; margin-left: -16px; }
  .row .card, .cover--sm { width: 140px; } .cover--sm .cover-title { font-size: calc(16px * var(--sc-cover_title, 1)); }
  .cover--md { width: 150px; } .cover--md .cover-title { font-size: calc(18px * var(--sc-cover_title, 1)); }
  .wide { flex-basis: 270px; }
  .row-arrow { display: none; }
  .detail-cover .cover { width: 180px; } .detail-cover .cover-title { font-size: calc(24px * var(--sc-cover_title, 1)); }
  .detail-body { justify-content: center; align-items: center; }
  .detail-cover { display: flex; justify-content: center; flex-basis: 100%; }
  .detail-text { flex-basis: 100%; align-items: center; text-align: center; }
  .detail-text .eyebrow, .detail-text .meta-line, .detail-text .btn-row { justify-content: center; }
  .detail-text .hero-blurb { margin-inline: auto; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 30px 14px; }
  .cover--fluid .cover-title { font-size: calc(18px * var(--sc-cover_title, 1)); }
  .author-photo { flex-basis: 200px; width: 200px; margin-inline: auto; }
  .author-inner { justify-content: center; }
  .author-text .eyebrow--plain { text-align: center; }
}
.social-title { font-size: 24px; margin: 34px 0 14px; }
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.social-card { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; border-top: 3px solid var(--brand); }
.social-head { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.social-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff; flex: none; }
.social-name { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.4; font-size: 14px; color: var(--muted); }
.social-name strong { color: var(--text); font-size: 18px; }
.social-qr { width: 168px; height: 168px; border-radius: 8px; background: #fff; }
.social-card p { margin: 0; font-size: 14px; }
.social-banner { padding-top: 30px; padding-bottom: 10px; }
.social-banner-head { margin-bottom: 14px; }
.social-banner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.social-banner-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface); border-radius: 8px; border-top: 3px solid var(--brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); color: inherit; text-decoration: none; }
.social-banner-card .social-icon { color: #fff; }
@media (max-width: 640px) {
  /* 3 cards per row; icon on top, name in the middle, link at the bottom */
  .social-banner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .social-banner-card { flex-direction: column; justify-content: flex-start; text-align: center; gap: 8px; padding: 12px 6px; }
  .social-banner-card .social-icon { width: 40px; height: 40px; }
  .social-banner-card .social-name { align-items: center; gap: 2px; width: 100%; min-width: 0; }
  .social-banner-card .social-name strong { font-size: 14px; }
  .social-banner-card .social-name span { font-size: 10px; line-height: 1.3; max-width: 100%; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ── Mobile-only: sticky buy bar (book page) + cart overlay ───────────── */
.buybar, .cartdrawer { display: none; }
@media (max-width: 768px) {
  .buybar { display: block; position: fixed; inset: auto 0 0 0; z-index: 90; background: rgba(23,23,27,.97); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(0,0,0,.45); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(8px); }
  .buybar-in { display: flex; align-items: center; gap: 12px; padding: 10px var(--pad); }
  .buybar-thumb { width: 40px; height: 60px; object-fit: cover; border-radius: 3px; background: #26262c; flex: 0 0 auto; }
  .buybar-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .buybar-title { font-family: var(--font-dv); font-weight: 700; font-size: 16px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .buybar-price { color: var(--accent); font: 700 15px Inter, sans-serif; text-align: start; }
  .buybar-btn { flex: 0 0 auto; height: 46px; padding: 0 16px; font-size: 16px; white-space: nowrap; }
  .has-buybar body, .has-buybar .site-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .cart-open .buybar { display: none; }

  .cart-open { overflow: hidden; }
  .cartdrawer { display: block; position: fixed; inset: 0; z-index: 200; }
  .cartdrawer[hidden] { display: none; }
  .cartdrawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
  .cartdrawer-panel { position: absolute; inset: auto 0 0 0; max-height: 82vh; display: flex; flex-direction: column; background: var(--surface);
    border-radius: 14px 14px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.5); padding-bottom: env(safe-area-inset-bottom); animation: cartUp .22s ease-out; }
  .cartdrawer-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 6px var(--pad); padding-inline-start: var(--pad); border-bottom: 1px solid var(--line); }
  .cartdrawer-head h2 { margin: 0; font-size: 20px; }
  .cartdrawer-empty { padding: 28px var(--pad); text-align: center; }
  .cartdrawer-empty[hidden], .cartdrawer-foot[hidden] { display: none; }
  .cartdrawer-items { list-style: none; margin: 0; padding: 0 var(--pad); overflow-y: auto; flex: 1 1 auto; }
  /* compact row: cover (right) · title/price · qty + remove on the left, all vertically centred */
  .cartdrawer .co-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; position: static; }
  .cartdrawer .co-item > img, .cartdrawer .co-item > .co-thumb { width: 48px; }
  .cartdrawer .co-item-text { flex: 1 1 auto; font-size: 16px; line-height: 1.5; }
  .cartdrawer .co-item-text .muted { font-size: 14px; }
  .cartdrawer .co-item .qty { flex: 0 0 auto; justify-self: auto; }
  .cartdrawer .qty button { width: 34px; height: 36px; font-size: 18px; }
  .cartdrawer .qty span { min-width: 24px; font-size: 16px; }
  .cartdrawer .co-item .co-remove { position: static; flex: 0 0 auto; width: 36px; height: 36px; }
  .cartdrawer-foot { padding: 12px var(--pad) 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
  .cartdrawer-total { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
  .cartdrawer-total strong { color: var(--accent); font-family: Inter, sans-serif; }
}
@keyframes cartUp { from { transform: translateY(100%); } to { transform: none; } }
.buybar.is-off { display: none !important; }
@media (max-width: 768px) { .buy-desktop { display: none !important; } .cart-open [data-herobar] { display: none !important; } }

/* ── Form builder (/form) ───────────────────────────────── */
.form-card { max-width: 760px; margin-inline: auto; }
.form-intro { margin-bottom: 18px; color: var(--text-2); }
.form-info { margin-bottom: 18px; }
.form-info-list { margin: 12px 0 0; padding-inline-start: 24px; color: var(--text-2); list-style: disc; }
.form-info-list[hidden] { display: none; }
.form-info-list li { margin-bottom: 6px; }
.field select { width: 100%; max-width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 6px; border: 1px solid #4a4a52; background: #0f0f12; color: var(--text); font: inherit; font-size: 16px; }
.field select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { padding: 0; margin-bottom: 8px; }
.form-choices { gap: 10px; }
.form-choice { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form-choice input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--accent); }
.field input[type=radio], .field input[type=checkbox] { width: 20px; padding: 0; }
.form-pay { border: 1px solid #3a3a42 !important; border-radius: 8px; padding: 16px !important; gap: 12px; }
.form-pay legend { padding: 0 8px; font-weight: 700; }
.form-pay-amount { margin: 0; font-size: 22px; font-weight: 800; color: var(--accent); direction: ltr; text-align: right; }
.form-pay-only { margin: 0; color: var(--text-2); }
.form-pay-panel { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.form-pay-panel[hidden] { display: none; }
.form-pay-details { background: #0f0f12; border-radius: 6px; padding: 12px 14px; color: var(--text); }
.form-pay-details p { margin: 0 0 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.form-title { text-align: center; }
.form-card .btn-row { justify-content: center; margin-top: 8px; }
.field input[type=file] { max-width: 100%; font-size: 15px; }
.form-card .field span, .form-card legend { overflow-wrap: anywhere; }

/* Form pages — mobile */
@media (max-width: 640px) {
  .form-title { font-size: 28px; line-height: 1.5; padding-inline: 4px; }
  .form-card { padding: 18px 14px; }
  .form-card .co-fields { gap: 18px; }
  .field select { font-size: 17px; padding: 13px 14px; min-height: 48px; }
  .field textarea { min-height: 120px; }
  .form-choices { gap: 4px; }
  .form-choice { min-height: 48px; padding: 6px 4px; gap: 12px; font-size: 17px; }
  .form-choice input, .field input[type=radio], .field input[type=checkbox] { width: 24px; height: 24px; }
  .form-pay { padding: 14px 12px !important; }
  .form-pay-amount { font-size: 24px; }
  .form-pay-details { padding: 12px; font-size: 16px; overflow-wrap: anywhere; }
  .form-card .btn-row { display: block; }
  .form-card .btn-row .btn { width: 100%; min-height: 52px; font-size: 18px; }
}
