/* ==========================================================================
   ALALEH — A Poetry Journal · v2 (rebuilt)
   Rose-toned letterpress atelier · Cormorant Garamond · Crimson Pro
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --paper:        oklch(96.5% 0.018 20);
  --paper-2:      oklch(93.5% 0.022 20);
  --paper-3:      oklch(90.5% 0.024 18);
  --ink:          oklch(23% 0.028 20);
  --ink-soft:     oklch(38% 0.024 18);
  --muted:        oklch(52% 0.016 16);
  --rule:         oklch(82% 0.014 18);
  --rule-strong:  oklch(74% 0.02 18);
  --accent:       oklch(52% 0.16 15);
  --accent-ink:   oklch(46% 0.15 15);
  --accent-soft:  oklch(88% 0.05 18);
  --gold:         oklch(72% 0.09 70);
  --gold-deep:    oklch(58% 0.08 60);
  --shell:        oklch(16% 0.02 15);
  --shell-2:      oklch(20% 0.022 15);
  --shell-ink:    oklch(90% 0.014 20);
  --shell-soft:   oklch(72% 0.02 18);
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body:    "Crimson Pro", Georgia, "Times New Roman", serif;
  --font-hand:    "Homemade Apple", "Segoe Script", cursive;
  --text-xs:   clamp(0.72rem, 0.7rem + 0.1vw, 0.8rem);
  --text-sm:   clamp(0.8rem, 0.78rem + 0.12vw, 0.9rem);
  --text-md:   clamp(0.94rem, 0.9rem + 0.2vw, 1.05rem);
  --text-lg:   clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  --text-xl:   clamp(1.4rem, 1.22rem + 0.9vw, 1.7rem);
  --text-2xl:  clamp(1.8rem, 1.5rem + 1.5vw, 2.2rem);
  --text-3xl:  clamp(2.6rem, 2.1rem + 2.5vw, 3.4rem);
  --text-display: clamp(3.4rem, 9.5vw, 7.5rem);
  --sp-2xs: .25rem;
  --sp-xs:  .5rem;
  --sp-sm:  .75rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2.5rem;
  --sp-2xl: 4rem;
  --sp-3xl: 6rem;
  --sp-4xl: 9rem;
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elegant: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in:      cubic-bezier(0.7, 0, 0.84, 0);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long:  420ms;
  --dur-turn:  700ms;
  --z-atmos: 0;
  --z-raised: 10;
  --z-sticky: 200;
  --z-dialog: 400;
  --z-grain:  500;
  --z-toast:  600;
  --radius:    3px;
  --radius-lg: 10px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

/* ---------- 2. Reset & base (iOS-hardened) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(88px + var(--safe-t));
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  min-height: 100svh;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; touch-action: manipulation; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input, textarea, select { font-size: max(16px, 1em); }
.reader__verse, .book-flat { -webkit-overflow-scrolling: touch; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: var(--z-toast);
  padding: 10px 16px; background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-size: var(--text-sm);
  border-radius: var(--radius); transition: top 150ms var(--ease-out);
}
.skip-link:focus { top: calc(12px + var(--safe-t)); }

/* film grain */
.grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: var(--z-grain);
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 3. Living atmosphere ---------- */
.atmosphere {
  position: fixed; inset: 0;
  z-index: var(--z-atmos);
  pointer-events: none;
  overflow: clip;
}
.atmosphere__aurora { position: absolute; inset: -20%; }
.atmosphere__aurora .aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}
.aurora--rose {
  width: 56vmax; height: 56vmax; left: -12vmax; top: -14vmax;
  background: radial-gradient(closest-side, oklch(86% 0.09 18 / 0.75), transparent 70%);
  animation: aurora-a 46s ease-in-out infinite alternate;
}
.aurora--gold {
  width: 44vmax; height: 44vmax; right: -10vmax; top: 22%;
  background: radial-gradient(closest-side, oklch(90% 0.07 85 / 0.6), transparent 70%);
  animation: aurora-b 58s ease-in-out infinite alternate;
}
.aurora--ink {
  width: 50vmax; height: 50vmax; left: 24%; bottom: -18vmax;
  background: radial-gradient(closest-side, oklch(88% 0.05 30 / 0.55), transparent 70%);
  animation: aurora-c 64s ease-in-out infinite alternate;
}
@keyframes aurora-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(9vw, 6vh, 0) scale(1.15); }
  100% { transform: translate3d(4vw, 12vh, 0) scale(0.95); }
}
@keyframes aurora-b {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-8vw, 10vh, 0) scale(1.2); }
  100% { transform: translate3d(-3vw, -4vh, 0) scale(1.05); }
}
@keyframes aurora-c {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(10vw, -8vh, 0) scale(1.1); }
  100% { transform: translate3d(-6vw, -12vh, 0) scale(0.9); }
}
.atmosphere__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.atmosphere__vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 55%, oklch(92% 0.03 20 / 0.5) 100%),
    linear-gradient(180deg, oklch(97% 0.02 20 / 0.35), transparent 30%, transparent 70%, oklch(93% 0.03 20 / 0.4));
}

/* ---------- 4. Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-lg);
  padding: calc(14px + var(--safe-t)) calc(clamp(18px, 4vw, 56px) + var(--safe-r))
           14px calc(clamp(18px, 4vw, 56px) + var(--safe-l));
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topbar__nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.topbar__nav a {
  font-family: var(--font-display); font-size: var(--text-md);
  color: var(--ink-soft); letter-spacing: 0.01em;
  position: relative; padding: 4px 2px;
}
.topbar__nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-short) var(--ease-out);
}
.topbar__nav a:hover, .topbar__nav a:focus-visible { color: var(--ink); }
.topbar__nav a:hover::after, .topbar__nav a:focus-visible::after { transform: scaleX(1); }
.wordmark {
  font-family: var(--font-display); font-style: italic; font-weight: 600;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem); color: var(--ink);
  letter-spacing: -0.01em;
  transition: color var(--dur-short) var(--ease-out), letter-spacing var(--dur-long) var(--ease-out);
}
.wordmark:hover { color: var(--accent-ink); letter-spacing: 0.02em; }

/* ---------- 5. Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-body); font-size: var(--text-sm);
  line-height: 1; padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  position: relative; overflow: hidden;
  transition:
    transform var(--dur-short) var(--ease-out),
    background var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out);
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, oklch(100% 0 0 / 0.28) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 700ms var(--ease-out);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(110%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); transition-duration: var(--dur-micro); }
.btn--ink { background: var(--ink); color: var(--paper); box-shadow: 0 10px 24px -14px oklch(23% 0.04 20 / 0.7); }
.btn--ink:hover { background: var(--accent-ink); color: var(--paper); }
.btn--cream { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn--cream:hover { background: var(--paper-2); box-shadow: 0 14px 30px -18px oklch(23% 0.04 20 / 0.6); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn--danger { background: transparent; color: var(--accent-ink); border-color: color-mix(in oklab, var(--accent) 55%, var(--paper)); }
.btn--danger:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn--small { padding: 10px 16px; }
.btn--armed { background: var(--accent-ink); color: var(--paper); border-color: var(--accent-ink); }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--radius);
  border: 1px solid var(--rule-strong); background: transparent; color: var(--ink);
  transition: border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out), background var(--dur-short) var(--ease-out);
}
.iconbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn:hover { border-color: var(--accent); color: var(--accent-ink); }
.iconbtn:active { transform: scale(0.92); }
.iconbtn[aria-pressed="true"] { color: var(--accent-ink); border-color: color-mix(in oklab, var(--accent) 45%, var(--paper)); background: var(--accent-soft); }
.iconbtn[aria-pressed="true"] .heart { fill: var(--accent); stroke: var(--accent); animation: heart-pop 480ms var(--ease-spring); }
@keyframes heart-pop {
  0% { transform: scale(0.6); }
  55% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center; gap: var(--sp-2xl);
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--sp-3xl) + var(--safe-t)) clamp(18px, 4vw, 56px) var(--sp-3xl);
  max-width: 1440px; margin-inline: auto;
  overflow: clip;
}
.hero__inner { position: relative; z-index: 2; display: grid; gap: var(--sp-md); justify-items: start; }
.hero__kicker {
  font-size: var(--text-xs); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-ink);
}
.hero__title {
  font-size: var(--text-display); line-height: 0.92; font-weight: 600;
  letter-spacing: -0.025em; background: none;
}
.reveal-line { display: block; overflow: hidden; padding-block: 0.06em; }
.reveal-line > span {
  display: inline-block;
  transform: translateY(115%) rotate(2deg);
  transition: transform 1s var(--ease-out);
  transform-origin: left bottom;
  will-change: transform;
}
[data-reveal-lines].is-visible .reveal-line > span { transform: translateY(0) rotate(0deg); }
.hero__hand {
  font-family: var(--font-hand); color: var(--accent-ink);
  font-size: clamp(1.05rem, 1.6vw, 1.4rem); line-height: 1.3;
  transform: rotate(-1.2deg); transform-origin: left center;
}
.hero__lede { max-width: 46ch; color: var(--ink-soft); font-size: var(--text-lg); line-height: 1.65; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-top: var(--sp-sm); }
.hero__figure {
  position: relative; z-index: 2; margin: 0;
  align-self: end; justify-self: end;
}
.hero__figure::before {
  content: ""; position: absolute; inset: -18px 18px 18px -18px;
  border: 1px solid var(--rule-strong); border-radius: 2px;
  z-index: -1;
}
.hero__figure img {
  width: min(44vw, 540px); aspect-ratio: 4 / 3.6; object-fit: cover;
  box-shadow: 0 30px 70px -30px oklch(23% 0.06 20 / 0.5);
  border-radius: 2px;
  transition: transform 1.2s var(--ease-out);
}
.hero__figure:hover img { transform: scale(1.02) rotate(-0.4deg); }
.hero__figure figcaption {
  margin-top: 12px; font-size: var(--text-xs);
  color: var(--muted); text-align: right;
}
.hero__scroll {
  position: absolute; bottom: calc(26px + var(--safe-b)); left: clamp(18px, 4vw, 56px); z-index: 3;
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: var(--text-xs); letter-spacing: 0.14em;
  text-transform: uppercase; padding: 8px 0;
}
.hero__scroll span {
  width: 1px; height: 44px; background: var(--rule-strong); display: inline-block;
  overflow: hidden; position: relative;
}
.hero__scroll span::after {
  content: ""; position: absolute; top: -100%; left: 0; width: 1px; height: 100%;
  background: var(--accent); animation: scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue { 0% { top: -100%; } 45%, 100% { top: 100%; } }

/* ---------- 7. Section heads ---------- */
.section-head {
  display: grid; gap: var(--sp-sm);
  max-width: 720px;
  padding: var(--sp-3xl) clamp(18px, 4vw, 56px) var(--sp-xl);
  margin: 0 auto;
}
.section-head--left { margin-inline: clamp(18px, 4vw, 56px) auto; }
.section-head__over {
  font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink);
}
.section-head__title { font-size: var(--text-3xl); letter-spacing: -0.015em; }
.section-head__note { color: var(--ink-soft); max-width: 44ch; }

/* ---------- 8. The Notebook (book-stage) ---------- */
.notebook {
  position: relative;
  background:
    radial-gradient(130% 100% at 85% 0%, var(--accent-soft) 0%, transparent 45%),
    var(--paper-2);
  border-block: 1px solid var(--rule);
}
.book-stage {
  position: relative;
  max-width: 1240px;
  margin-inline: auto;
  padding: var(--sp-xl) clamp(18px, 4vw, 56px) var(--sp-4xl);
}
.book-hint {
  text-align: center; margin-top: var(--sp-sm);
  font-family: var(--font-hand); font-size: var(--text-sm);
  color: var(--muted); opacity: 0.85;
}

/* ---------- 8a. The 3D book ---------- */
.book {
  position: relative;
  height: clamp(400px, 60vh, 580px);
  margin-inline: auto;
  max-width: min(900px, 100%);
  perspective: 2600px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: grab;
}
.book.is-dragging { cursor: grabbing; }
.book__block {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 20% 15%, var(--accent-soft) 0%, transparent 50%),
    var(--paper);
  box-shadow:
    0 40px 90px -40px oklch(23% 0.06 20 / 0.55),
    inset 0 0 0 1px oklch(30% 0.02 18 / 0.1);
  border-radius: var(--radius-lg);
}
.book__base--left, .book__base--right {
  position: absolute; top: 0; bottom: 0; width: 50%;
  transform-style: preserve-3d;
}
.book__base--left  { left: 0; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.book__base--right { right: 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.book__base--left {
  background:
    linear-gradient(90deg, oklch(30% 0.02 18 / 0.06) 0 1px, transparent 1px),
    var(--paper);
  border-right: 1px solid oklch(30% 0.02 18 / 0.14);
}
.book__base--right {
  background: var(--paper-2);
  border-left: 1px solid oklch(30% 0.02 18 / 0.1);
}
.book__spine {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 44px;
  transform: translateX(-50%);
  background: linear-gradient(90deg,
    transparent 0%,
    oklch(23% 0.03 20 / 0.12) 35%,
    oklch(23% 0.03 20 / 0.2) 50%,
    oklch(23% 0.03 20 / 0.12) 65%,
    transparent 100%);
  pointer-events: none;
  z-index: 2;
  border-radius: 999px;
  filter: blur(1px);
}

/* ---------- 8b. Leaves (turning pages) ---------- */
.book__leaves { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.leaf {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 50%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform var(--dur-turn) var(--ease-elegant);
  box-shadow: 0 20px 50px -30px oklch(23% 0.06 20 / 0.5);
}
.leaf--turning { transition: none; will-change: transform; }
.leaf.is-turned { transform: rotateY(-180deg); }
.leaf__face, .leaf__back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column;
  /* top padding always clears the folded-corner marks (~32px extent) */
  padding: clamp(34px, 3.5vw, 44px) clamp(20px, 3.5vw, 40px) clamp(20px, 3.5vw, 40px);
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(90% 70% at 30% 0%, oklch(98% 0.012 20) 0%, transparent 60%),
    linear-gradient(90deg, oklch(30% 0.02 18 / 0.05) 0 1px, transparent 1px),
    var(--paper);
}
.leaf__back {
  transform: rotateY(180deg);
  background:
    radial-gradient(90% 70% at 30% 0%, oklch(96% 0.016 20) 0%, transparent 60%),
    var(--paper-2);
}
/* dynamic turn shading — --turn is driven by drag/animation JS */
.leaf::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: var(--turn, 0);
  background: linear-gradient(to left, oklch(20% 0.03 20 / 0.28), transparent 42%);
}
.leaf.is-turned::after { background: linear-gradient(to right, oklch(20% 0.03 20 / 0.28), transparent 42%); }

.leaf__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-md); margin-bottom: var(--sp-md); }
.leaf__folio {
  font-size: var(--text-xs); color: var(--muted); letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums; user-select: none;
}
.leaf__title {
  font-family: var(--font-display); font-size: var(--text-2xl);
  font-weight: 600; line-height: 1.1; letter-spacing: -0.01em;
}
.leaf__stem { display: flex; gap: var(--sp-xs); margin-bottom: var(--sp-lg); align-items: center; }
.leaf__stem .mood { font-size: var(--text-xs); font-style: italic; color: var(--accent-ink); }
.leaf__stem .date { font-size: var(--text-xs); color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.leaf__verse {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  font-size: clamp(var(--text-md), 3vw, var(--text-lg));
  line-height: 1.55; letter-spacing: 0.005em;
}
.leaf__verse::-webkit-scrollbar { display: none; }
.leaf__verse .stanza { white-space: pre-line; }
.leaf__verse .stanza + .stanza { margin-top: 1.15em; }
.leaf__flourish {
  margin-top: auto; padding-top: var(--sp-lg);
  display: flex; align-items: center; gap: var(--sp-sm);
  color: var(--muted); font-size: var(--text-xs);
}
.leaf__flourish svg { width: 52px; height: auto; color: var(--accent); opacity: 0.85; }

/* ---------- 8c. Ex libris / plates / marginalia ---------- */
.exlibris {
  height: 100%; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: var(--sp-lg); padding: var(--sp-xl);
}
.exlibris__over { font-size: var(--text-xs); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.exlibris__hand {
  font-family: var(--font-hand); font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  line-height: 1.7; color: var(--accent-ink);
}
.exlibris__note { color: var(--ink-soft); max-width: 26ch; font-style: italic; }
.exlibris .leaf__flourish { margin-top: var(--sp-lg); }
.plate {
  margin: 0 0 var(--sp-md);
  border: 1px solid color-mix(in oklab, var(--gold) 65%, var(--rule));
  background: oklch(98% 0.008 20);
  padding: 7px;
  box-shadow: 0 10px 26px -14px oklch(23% 0.06 20 / 0.4);
}
.plate img { width: 100%; height: min(46%, 250px); object-fit: cover; }
.plate figcaption {
  font-family: var(--font-hand); font-size: var(--text-sm);
  color: var(--accent-ink); padding: 10px 4px 2px; text-align: center;
}
.marginalia {
  font-family: var(--font-hand); font-size: var(--text-sm);
  color: var(--ink-soft); transform: rotate(-1.6deg);
  margin-top: auto;
}

/* ---------- 8d. Corners & ribbon ---------- */
.book__corner {
  position: absolute; top: 6px; z-index: 30;
  width: 76px; height: 76px;
  background: none; border: 0; padding: 0;
  opacity: 0.9;
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.book__corner span {
  display: block; width: 26px; height: 26px;
  border: 0 solid var(--muted);
  transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}
.book__corner:hover span { border-color: var(--accent); transform: scale(1.12); }
.book__corner:active { transform: scale(0.95); }
.book__corner:disabled { opacity: 0.2; pointer-events: none; }
.book__corner:focus-visible span { border-color: var(--accent); }
.book__corner--prev  { left: 6px;  transform: translateY(-1px); }
.book__corner--next  { right: 6px; transform: rotate(180deg); }
.book__corner--prev span  { border-top-width: 2px; border-left-width: 2px; }
.book__corner--next span  { border-bottom-width: 2px; border-right-width: 2px; }
.book__ribbon { position: absolute; top: 0; left: 50%; z-index: 18; }
.book__ribbon i {
  display: block; width: 10px; height: clamp(120px, 10vh, 150px);
  background: linear-gradient(180deg, var(--accent), var(--accent-ink));
  border-radius: 0 0 3px 3px;
  box-shadow: 0 4px 12px -4px oklch(16% 0.06 15 / 0.6);
}

/* ---------- 8e. Book controls & flat deck (mobile) ---------- */
.pagebtn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  width: 44px; height: 44px;
  border: 1px solid var(--rule-strong); background: transparent;
  border-radius: var(--radius); color: var(--ink);
  transition: border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}
.pagebtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pagebtn:hover { border-color: var(--accent); color: var(--accent-ink); }
.pagebtn:active { transform: scale(0.95); }
.pagebtn:disabled { opacity: 0.35; pointer-events: none; }
.pagebtn--text { width: auto; height: auto; padding: 11px 16px; font-family: var(--font-body); font-size: var(--text-sm); }
.book-controls {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-lg);
  margin-top: var(--sp-lg);
}
.book-progress {
  min-width: 130px; text-align: center;
  font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.book-flat { display: none; }
.book-flat__page {
  flex: 0 0 100%;
  scroll-snap-align: center;
  height: clamp(480px, 68vh, 620px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 70% at 30% 0%, oklch(98% 0.012 20) 0%, transparent 60%),
    var(--paper);
  box-shadow: 0 24px 60px -30px oklch(23% 0.06 20 / 0.5);
  overflow: hidden;
}
.book-flat__page .leaf__face, .book-flat__page .leaf__back {
  position: relative; inset: auto; width: 100%; height: 100%;
  border-radius: var(--radius-lg);
}
.book-flat-style .book { display: none; }
.book-flat-style .book-flat {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 14px;
  padding-bottom: 8px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.book-flat-style .book-flat::-webkit-scrollbar { display: none; }

/* ---------- 8g. Single-page flipbook (phones ≤480px) ----------
   Same 3D leaf engine as the spread: one full-width page anchored at the
   spine, flipping over the left edge to hand over to the next page. */
.book--single .leaf {
  left: 0; width: 100%;
  transition: transform var(--dur-turn) var(--ease-elegant),
              --turn var(--dur-turn) var(--ease-elegant),
              visibility 0s;
}
.book--single .leaf.is-turned {
  /* the flipped leaf belongs to the (off-crop) left stack — hide it once
     landed so the next page / colophon shows through */
  visibility: hidden;
  transition: transform var(--dur-turn) var(--ease-elegant),
              --turn var(--dur-turn) var(--ease-elegant),
              visibility 0s linear var(--dur-turn);
}
.book--single .leaf--turning {
  transition: none;
  visibility: visible;   /* plates must show instantly when un-turning */
  z-index: 99 !important; /* the flipping leaf always rides on top */
}
.book--single .book.is-dragging .leaf--turning { will-change: transform; }
.book--single .book__base--left { display: none; }
.book--single .book__base--right {
  left: 0; width: 100%;
  border-left: 0;
  border-radius: var(--radius-lg);
}
.book--single .book__spine { left: 0; transform: none; width: 8px; opacity: 0.55; }
.book--single .book__ribbon { left: 0; }
.book--single .leaf__face, .book--single .leaf__back { padding: 42px 20px 16px; }
.book--single .leaf__head { margin-bottom: var(--sp-sm); }
.book--single .leaf__title { font-size: 1.3rem; }
.book--single .leaf__stem { margin-bottom: var(--sp-sm); }
.book--single .leaf__verse { font-size: 1rem; line-height: 1.52; }
.book--single .leaf__verse .stanza + .stanza { margin-top: 0.85em; }
.book--single .leaf__flourish { padding-top: var(--sp-sm); }
.book--single .leaf__flourish svg { width: 40px; }
.book--single .plate { padding: 5px; margin-bottom: var(--sp-sm); }
.book--single .plate img { height: 30%; min-height: 110px; }
.book--single .plate figcaption { font-size: 0.78rem; padding: 7px 2px 0; }
.book--single .marginalia { font-size: 0.82rem; }


/* ---------- 8f. Animatable turn shading ---------- */
@property --turn {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}
.leaf { transition: transform var(--dur-turn) var(--ease-elegant), --turn var(--dur-turn) var(--ease-elegant); }
.leaf--turning { transition: none; }

/* ---------- 9. The Library ---------- */
.library {
  padding: var(--sp-4xl) clamp(18px, 4vw, 56px) var(--sp-4xl);
  background: transparent;
}
.library__toolbar {
  display: grid; gap: var(--sp-lg);
  max-width: 1040px; margin: var(--sp-2xl) auto var(--sp-xl);
}
.search { position: relative; display: flex; align-items: center; }
.search svg {
  position: absolute; left: 14px; width: 17px; height: 17px;
  fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round;
  pointer-events: none;
}
.search input {
  width: 100%; font-family: var(--font-body); font-size: max(16px, var(--text-lg));
  color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: 15px 18px 15px 44px;
  transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.chips--quiet { margin-top: -4px; }
.chips .chip {
  font-family: var(--font-body); font-size: var(--text-xs);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); background: transparent;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  padding: 8px 14px; line-height: 1;
  transition: color var(--dur-short) var(--ease-out), background var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.chips .chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chips .chip:active { transform: scale(0.94); }
.chips .chip[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
  animation: chip-in var(--dur-short) var(--ease-spring);
}
@keyframes chip-in { 0% { transform: scale(0.9); } 100% { transform: scale(1); } }
.chips--quiet .chip { font-size: var(--text-xs); letter-spacing: 0.02em; text-transform: none; border-radius: var(--radius); border-color: var(--rule); color: var(--muted); }
.chips--quiet .chip[aria-pressed="true"] {
  background: var(--accent-soft); color: var(--accent-ink);
  border-color: color-mix(in oklab, var(--accent) 40%, transparent);
}

/* ---------- 9a. Library tools, index, empty state ---------- */
.library__tools {
  display: flex; align-items: center; gap: var(--sp-md);
  flex-wrap: wrap; justify-content: space-between;
}
.favtoggle {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body); font-size: var(--text-sm);
  color: var(--ink-soft); background: transparent; border: 0; padding: 8px 10px;
  transition: color var(--dur-short) var(--ease-out);
}
.favtoggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.favtoggle[aria-pressed="true"] { color: var(--accent-ink); }
.favtoggle[aria-pressed="true"] .heart { fill: var(--accent); stroke: var(--accent); animation: heart-pop 480ms var(--ease-spring); }
.sort { display: inline-flex; align-items: center; gap: var(--sp-xs); color: var(--muted); font-size: var(--text-sm); }
.sort select {
  font-family: var(--font-body); font-size: max(16px, var(--text-sm)); color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: 9px 12px;
}
.index {
  list-style: none; margin: 0; padding: 0;
  max-width: 1040px; margin-inline: auto;
}
.index__item {
  border-block-start: 1px solid var(--rule);
  transition: padding var(--dur-short) var(--ease-out), opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out);
}
.index__item:last-of-type { border-block-end: 1px solid var(--rule); }
.index__link {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: baseline; gap: var(--sp-lg);
  padding: var(--sp-xl) var(--sp-md);
  position: relative; width: 100%; text-align: left;
  background: none; border: 0;
}
.index__num { font-size: var(--text-xs); color: var(--muted); letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.index__main { display: grid; gap: var(--sp-sm); }
.index__title {
  font-family: var(--font-display); font-size: var(--text-xl);
  font-weight: 600; line-height: 1.15; color: var(--ink);
  transition: color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
  transform-origin: left center;
}
.index__link:hover .index__title, .index__link:focus-visible .index__title { color: var(--accent-ink); transform: translateX(6px); }
.index__meta { display: flex; flex-wrap: wrap; gap: var(--sp-xs) var(--sp-md); align-items: center; }
.index__tag { font-size: var(--text-xs); color: var(--muted); }
.index__mood { font-size: var(--text-xs); font-style: italic; color: var(--accent-ink); }
.index__tags { display: inline-flex; gap: var(--sp-xs); flex-wrap: wrap; }
.index__tagchip { font-size: var(--text-xs); color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 9px; }
.index__fav { width: 22px; height: 22px; align-self: center; justify-self: center; }
.index__fav svg { width: 18px; height: 18px; fill: none; stroke: var(--rule-strong); stroke-width: 1.6; transition: fill var(--dur-short) var(--ease-out), stroke var(--dur-short) var(--ease-out); }
.index__item.is-fav .index__fav svg { fill: var(--accent); stroke: var(--accent); }
.index__item.is-new { animation: item-in 600ms var(--ease-out) backwards; }
@keyframes item-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.empty {
  text-align: center; padding: var(--sp-3xl) var(--sp-xl);
  display: grid; gap: var(--sp-md); justify-items: center;
  max-width: 640px; margin-inline: auto;
}
.empty__title { font-family: var(--font-display); font-size: var(--text-2xl); }
.empty__note { color: var(--ink-soft); }

/* ---------- 10. Dialogs (shared, mobile-safe) ---------- */
dialog {
  border: 0; padding: 0;
  color: var(--ink);
  max-width: calc(100vw - 24px - var(--safe-l) - var(--safe-r));
  max-height: calc(100dvh - 24px - var(--safe-t) - var(--safe-b));
  max-height: calc(100vh - 24px - var(--safe-t) - var(--safe-b));
}
dialog::backdrop { background: oklch(20% 0.03 18 / 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog[open] { animation: dialog-in var(--dur-long) var(--ease-out); }
dialog[open]::backdrop { animation: backdrop-in var(--dur-long) var(--ease-out); }
dialog.is-closing { animation: dialog-out var(--dur-short) var(--ease-in) forwards; }
dialog.is-closing::backdrop { animation: backdrop-out var(--dur-short) var(--ease-in) forwards; }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-out {
  to { opacity: 0; transform: translateY(10px) scale(0.99); }
}
@keyframes backdrop-out { to { opacity: 0; } }
/* iOS: lock the page behind an open dialog */
html.dialog-open, html.dialog-open body { overflow: hidden; }

/* ---------- 11. Reading room ---------- */
.reader {
  width: min(1040px, calc(100vw - 24px));
  height: min(860px, calc(100dvh - 24px));
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 40px 100px -30px oklch(16% 0.03 15 / 0.6);
  overflow: hidden;
}
.reader__page {
  display: flex; flex-direction: column;
  height: 100%;
  padding: clamp(20px, 4vw, 48px);
  background:
    radial-gradient(90% 60% at 30% 0%, oklch(98% 0.012 20) 0%, transparent 60%),
    var(--paper);
}
.reader__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-lg);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--rule);
}
.reader__meta { font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: var(--sp-2xs); }
.reader__title { font-size: var(--text-3xl); letter-spacing: -0.015em; }
.reader__tools { display: flex; gap: var(--sp-xs); flex-shrink: 0; }
.reader__verse {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--sp-xl) 0;
  font-size: clamp(1.15rem, 1rem + 1vw, 1.5rem);
  line-height: 1.7;
}
.reader__verse .stanza { white-space: pre-line; }
.reader__verse .stanza + .stanza { margin-top: 1.3em; }
.reader__verse.is-turning .stanza {
  animation: stanza-in 560ms var(--ease-out) backwards;
}
.reader__verse.is-turning .stanza:nth-child(1) { animation-delay: 40ms; }
.reader__verse.is-turning .stanza:nth-child(2) { animation-delay: 120ms; }
.reader__verse.is-turning .stanza:nth-child(3) { animation-delay: 200ms; }
.reader__verse.is-turning .stanza:nth-child(4) { animation-delay: 280ms; }
.reader__verse.is-turning .stanza:nth-child(5) { animation-delay: 360ms; }
@keyframes stanza-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.reader__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--rule);
}
.reader__pos { font-size: var(--text-xs); letter-spacing: 0.14em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 12. Writing desk ---------- */
.desk {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 40px 100px -30px oklch(16% 0.03 15 / 0.6);
}
.desk form { display: grid; gap: var(--sp-lg); padding: clamp(20px, 4vw, 44px); }
.desk__over { font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); }
.desk__title { font-size: var(--text-2xl); }
.field { display: grid; gap: var(--sp-2xs); }
.field label, .field__label { font-size: var(--text-sm); color: var(--ink-soft); letter-spacing: 0.02em; }
.field label em, .field__label em { font-style: italic; color: var(--muted); }
.field input, .field textarea {
  font-family: var(--font-body); color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--rule-strong);
  border-radius: var(--radius); padding: 12px 14px;
  transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 160px; line-height: 1.6; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field__error { font-size: var(--text-sm); color: var(--accent-ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); }
.moods { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.moods .chip { font-size: var(--text-sm); text-transform: none; letter-spacing: 0.02em; }
.desk__foot { display: flex; align-items: center; gap: var(--sp-md); padding-top: var(--sp-2xs); flex-wrap: wrap; }
.desk__spring { flex: 1; }

/* ---------- 13. Colophon & toast ---------- */
.colophon {
  background: var(--shell);
  color: var(--shell-ink);
  padding: calc(var(--sp-3xl) + var(--safe-b)) clamp(18px, 4vw, 56px);
  display: grid; gap: var(--sp-sm); justify-items: center; text-align: center;
  border-top: 1px solid oklch(40% 0.02 15 / 0.5);
}
.colophon__mark { font-family: var(--font-display); font-style: italic; font-size: var(--text-2xl); color: var(--shell-ink); }
.colophon__line { color: var(--shell-soft); max-width: 44ch; font-size: var(--text-sm); }
.colophon__small { color: var(--shell-soft); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.toast {
  position: fixed; bottom: calc(24px + var(--safe-b)); left: 50%; transform: translate(-50%, 0);
  z-index: var(--z-toast);
  display: flex; align-items: center; gap: var(--sp-md);
  background: var(--ink); color: var(--paper);
  padding: 13px 18px 13px 20px; border-radius: var(--radius);
  box-shadow: 0 20px 50px -20px oklch(16% 0.03 15 / 0.6);
  font-size: var(--text-sm);
  max-width: calc(100vw - 32px);
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}
.toast[hidden] { display: flex; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
.toast button {
  font-family: var(--font-body); font-size: var(--text-sm);
  color: var(--gold); background: none; border: 0; padding: 4px 6px; border-radius: 2px;
  text-decoration: underline; text-underline-offset: 3px;
}
.toast button:hover { opacity: 0.9; }

/* ---------- 14. Cinematic reveal system ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 800ms var(--ease-out),
    transform 800ms var(--ease-out);
}
[data-reveal-group].is-visible > * { opacity: 1; transform: none; }
[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: 60ms; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 140ms; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 220ms; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 300ms; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 380ms; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: 460ms; }
[data-reveal-group].is-visible > *:nth-child(n+7) { transition-delay: 540ms; }

/* parallax targets are moved by JS via the separate `translate` property,
   so they never fight reveal/hover transforms */
[data-parallax] { will-change: translate; }

/* ---------- 15. Responsive ---------- */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr; min-height: auto; gap: var(--sp-2xl);
    padding-top: calc(var(--sp-2xl) + var(--safe-t));
  }
  .hero__figure { justify-self: center; order: 2; width: min(100%, 430px); }
  .hero__figure img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    /* the tulip's bloom sits at ~47% x in the 16:9 source — a portrait frame
       keeps bloom + stem composed on every phone width, no heavy crop */
    object-position: 47% 50%;
  }
  .hero__inner { order: 1; }
  .hero__title { font-size: clamp(3.2rem, 16vw, 5rem); }
  .section-head { padding: var(--sp-2xl) clamp(18px, 5vw, 32px) var(--sp-lg); }
  .section-head--left { margin-inline: clamp(18px, 5vw, 32px) auto; }
  .book { height: clamp(440px, 64vh, 600px); }
  /* corner fold indicators are desktop-only — on touch they crowd the page;
     the bottom page-turn buttons handle navigation on mobile */
  .book__corner { display: none; }
  .leaf__face, .leaf__back { padding: 38px clamp(16px, 3vw, 30px) clamp(16px, 3vw, 30px); }
  .leaf__title { font-size: clamp(1.3rem, 3vw, 1.7rem); }
  .leaf__verse { font-size: clamp(0.95rem, 1.9vw, 1.15rem); line-height: 1.5; }
  .leaf__flourish { padding-top: var(--sp-md); }
  .plate img { height: 34%; }
  .index__link { grid-template-columns: 48px minmax(0, 1fr); gap: var(--sp-md); }
  .index__fav { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .library__tools { justify-content: flex-start; }
  .reader { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
  .reader__verse { padding: var(--sp-lg) 0; }
  .desk { width: 100vw; max-width: none; max-height: 100dvh; border-radius: 0; }
  .topbar { gap: var(--sp-md); }
  .topbar .btn span { display: none; }
  .hero__scroll { display: none; }
  .reader__foot { padding-bottom: var(--safe-b); }
  .desk__foot { padding-bottom: var(--safe-b); }
  dialog { max-width: 100vw; max-height: 100dvh; }
}
@media (max-width: 480px) {
  .book { height: clamp(500px, 72vh, 640px); }
  .book__corner { width: 72px; height: 72px; }
  .book__corner span { width: 24px; height: 24px; }
  .topbar__nav { gap: var(--sp-md); }
  .topbar__nav a { font-size: var(--text-sm); }
  .hero { padding-bottom: var(--sp-2xl); }
  .hero__lede { font-size: var(--text-md); }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .book-controls { gap: var(--sp-md); }
  .book-progress { min-width: 108px; }
  .chips .chip { padding: 9px 13px; }
  .index__link { padding: var(--sp-lg) var(--sp-2xs); }
  .reader__title { font-size: var(--text-2xl); }
  .desk__foot .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- 16. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal], [data-reveal-group] > * { opacity: 1; transform: none; transition: none; }
  .reveal-line > span { transform: none; transition: none; }
  .leaf { transition: none; }
  .atmosphere__canvas, .hero__scroll span::after { display: none; }
  .atmosphere__aurora .aurora { animation: none; }
  .book__ribbon i { background: var(--accent-ink); }
  [data-parallax] { transform: none !important; translate: none !important; }
}
