/* =====================================================================
   JACOB HORNUNG · LOCKED MASTER DESIGN + TYPOGRAPHY STUDIO
   - Sky: Trouvelot Atlas (12% Pastel · 95% Copperplate · 70% Starlight · Magnetic Gravity Arc)
   - Book: Locked Full-Table Monograph × Gallery + Editorial Desk Glide
   - Sky Map Rail: Rebuilt Retina Canvas Mercury Pill + Rauno Spring Dock + Family Odometer
   ===================================================================== */
:root, html[data-theme="dusk"] {
  color-scheme: dark;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
  --display-scale: 1;
  --sky: #0E111B;
  --panel: rgba(18, 22, 32, 0.94);
  --ink: #EFEAE0;
  --muted: #9E998D;
  --faint: rgba(239, 234, 224, 0.34);
  --data: #92A6C8;
  --accent: #7ABAB0;
  --accent-text: #9AD4CA;
  --clay: #E48454;
  --gold: #DEB274;
  --hairline: rgba(239, 234, 224, 0.13);
  --hairline-hi: rgba(239, 234, 224, 0.28);
  --vignette: transparent;
  --backdrop: rgba(8, 11, 20, 0.34);
  --grain-op: 0.022;
}
html[data-theme="paper"] {
  color-scheme: light;
  --sky: #F3EDE1;
  --panel: rgba(251, 247, 238, 0.95);
  --ink: #1F1B16;
  --muted: #5C564C;
  --faint: rgba(31, 27, 22, 0.36);
  --data: #42536B;
  --accent: #316D63;
  --accent-text: #215149;
  --clay: #B84D26;
  --gold: #94652C;
  --hairline: rgba(31, 27, 22, 0.13);
  --hairline-hi: rgba(31, 27, 22, 0.28);
  --vignette: transparent;
  --backdrop: rgba(34, 28, 20, 0.12);
  --grain-op: 0.032;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; }
body.no-anim *, body.no-anim *::before, body.no-anim *::after { transition: none !important; animation: none !important; }

body {
  background: var(--sky); color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  transition: background-color 0.78s cubic-bezier(0.22, 1, 0.36, 1), color 0.52s ease;
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: var(--grain-op);
  contain: strict;
  transition: opacity 0.75s ease;
  background-size: 140px 140px;
}

@media (min-width: 900px) {
  html, body { width: 100%; height: 100%; overflow: hidden; }
  .mobile-home { display: none; }
}

canvas#sky, canvas#sky-fade {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block;
  transition: transform 0.56s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  will-change: transform;
}
canvas#sky { z-index: 1; }
canvas#sky-fade { z-index: 2; pointer-events: none; opacity: 0; transition: none; }
body.book-active canvas#sky,
body.book-active canvas#sky-fade { transform: scale(1.018); }

/* ==================== ETHEREAL BARE SKY CHROME ==================== */
.topbar {
  position: fixed; top: 30px; left: 40px; right: 40px; z-index: 22;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 16px;
  transition: opacity 0.32s ease;
}
body.folio-open .topbar { opacity: 0; pointer-events: none; }

.brand h1 {
  font-family: var(--font-display); font-weight: 400; font-size: 24px; letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 36, 'wght' 400, 'SOFT' 60, 'WONK' 1;
  cursor: pointer; display: inline-flex; align-items: baseline; position: relative;
  user-select: none; padding: 2px 0;
  transition: color 0.24s ease;
}
.brand h1::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--clay), var(--accent) 65%, transparent);
  transform: scaleX(0); transform-origin: left center; opacity: 0;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease;
}
.brand h1:hover::after { transform: scaleX(1); opacity: 0.72; }
.brand h1 .bh-ch {
  display: inline-block; will-change: transform;
  transform-origin: center 78%;
  transition: color 0.18s ease;
}
.brand h1 .bh-ch.bh-hot { color: var(--clay); }
.brand h1 .bh-sp { display: inline-block; width: 0.26em; }
.brand p { font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--muted); margin-top: 2px; letter-spacing: 0.01em; }

.area-nav { position: relative; display: inline-flex; align-items: center; gap: 24px; padding-bottom: 10px; }
.area-dot { position: absolute; bottom: 0; left: 0; width: 4.5px; height: 4.5px; border-radius: 50%; background: var(--clay); box-shadow: 0 0 10px var(--clay); pointer-events: none; }
.area-link { border: none; background: transparent; color: var(--muted); font-family: var(--font-display); font-size: 15.5px; font-style: italic; cursor: pointer; padding: 2px 0; transition: color 0.2s ease; }
.area-link:hover, .area-link.active { color: var(--ink); }
.nav-sep { color: var(--hairline-hi); font-size: 12px; user-select: none; }

.tb-right { display: flex; justify-content: flex-end; align-items: center; gap: 20px; }
.bare-btn {
  border: none; background: transparent; color: var(--muted); text-decoration: none;
  font-family: var(--font-mono); font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; padding: 2px 0;
  border-bottom: 1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease;
}
.bare-btn:hover { color: var(--ink); border-color: var(--hairline-hi); }
.bare-btn.hi { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.bare-btn svg { width: 15px; height: 15px; display: block; }

.sector-margin {
  position: fixed; right: 40px; top: 50%; transform: translateY(-50%); z-index: 18;
  display: flex; flex-direction: column; align-items: flex-end; gap: 15px;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
body.in-sector:not(.folio-open) .sector-margin { opacity: 1; pointer-events: auto; }
.sm-btn { border: none; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-style: italic; font-size: 15.5px; transition: color 0.2s ease, transform 0.22s ease; }
.sm-btn span.num { font-family: var(--font-mono); font-style: normal; font-size: 12px; color: var(--faint); }
.sm-btn:hover { color: var(--ink); transform: translateX(-3px); }
.sm-btn.active { color: var(--ink); transform: translateX(-6px); }
.sm-btn.active span.num { color: var(--clay); }

.whisper-bar {
  position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 18; text-align: center; width: min(640px, 84vw);
  transition: opacity 0.3s ease, transform 0.4s ease;
}
body.folio-open .whisper-bar { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(12px); }
.w-roll { animation: wIn 0.36s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes wIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.w-line { font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--ink); line-height: 1.4; margin-bottom: 6px; }
.w-meta { display: inline-flex; align-items: center; gap: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.w-act { border: none; background: transparent; color: var(--accent-text); font: inherit; cursor: pointer; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.w-act:hover { color: var(--ink); border-color: var(--ink); }

.corner-foot {
  position: fixed; bottom: 34px; left: 40px; right: 40px; z-index: 14;
  display: flex; justify-content: space-between; pointer-events: none;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  transition: opacity 0.25s ease;
}
body.folio-open .corner-foot { opacity: 0; }
.corner-foot a, .corner-foot button { pointer-events: auto; color: var(--muted); text-decoration: none; background: none; border: none; font: inherit; cursor: pointer; }
.corner-foot a { margin-left: 16px; }
.corner-foot a:hover, .corner-foot button:hover { color: var(--ink); }

/* ==================== LOCKED COPTIC CODEX · GSAP 3D SPLIT-COVER FOLD-OPEN ==================== */
.book-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: var(--backdrop);
  opacity: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 62px 16px 62px;
  gap: 10px;
}
html[data-theme="paper"] .book-backdrop {
  background: var(--backdrop);
}
/* LOCKED FULL TABLE BOOK PROPORTIONS (Guaranteed to fit bottom pagination comfortably!) */
:root {
  --book-w: min(1300px, calc(100vw - 124px));
  --book-h: min(812px, calc(100vh - 104px));
  --book-pad-y: 20px;
  --book-pad-x: 40px;
  --book-gutter-pad: 44px;
  --sp-img-h: clamp(174px, 27vh, 272px);
  --sp-h2-sz: clamp(24px, 2.2vw, 32px);
  --sp-body-sz: 14.5px;
}
@media (max-height: 820px) and (min-width: 900px) {
  :root {
    --book-pad-y: 13px;
    --sp-img-h: clamp(136px, 20vh, 178px);
    --sp-h2-sz: 23px;
  }
  .front-title { font-size: 28px !important; }
  .front-sub { margin-bottom: 10px !important; }
  .front-body { font-size: 13px !important; line-height: 1.52 !important; }
  .idx-wrap { gap: 5px !important; }
  .idx-section { margin-bottom: 2px !important; }
  .idx-row { padding: 2px 0 !important; font-size: 13px !important; line-height: 1.25 !important; }
  .idx-sec-head { margin-bottom: 2px !important; padding-bottom: 2px !important; }
  .idx-growth-note { padding: 6px 9px !important; font-size: 11px !important; margin-top: 2px !important; }
  .sp-lead { font-size: 13.5px !important; margin-bottom: 8px !important; line-height: 1.38 !important; }
  .bj-timeline { gap: 7px !important; margin-top: 4px !important; }
  .bj-node strong { font-size: 13.5px !important; }
  .bj-node p { font-size: 12px !important; line-height: 1.38 !important; }
  .bj-thumbs { margin-top: 6px !important; }
  .bj-thumbs img { height: 42px !important; }
  .bj-cards { margin-top: 6px !important; gap: 8px !important; }
  .bj-card { padding: 7px 9px !important; }
  .bj-card p { font-size: 11.5px !important; line-height: 1.36 !important; }
  .sp-fig figcaption { font-size: 11px !important; padding: 6px 2px 1px !important; }
}

.book-backdrop.open { opacity: 1; pointer-events: auto; }
.book-backdrop:not(.open),
.book-backdrop:not(.open) * { pointer-events: none !important; }

/* ==================== REBUILT BENJI TAYLOR FLUID OBSERVATORY INDEX RAIL (RETINA CANVAS + SPRINGS!) ==================== */
.sky-map-bar {
  position: relative;
  width: var(--book-w);
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 10px 10px;
  background: transparent;
  border-bottom: 1px solid var(--hairline-hi);
  transition: max-height 0.28s ease, padding 0.28s ease, margin 0.28s ease, border-color 0.45s ease;
  max-height: 56px; overflow: visible;
}
.sky-map-bar.hidden {
  max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -10px;
  border-color: transparent !important;
  opacity: 0 !important; pointer-events: none; overflow: hidden;
}

.sm-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1; display: block;
}

/* Single Floating Spring-Morphing Tooltip ("We fly instead of teleport!") */
.sm-tooltip {
  position: absolute;
  bottom: calc(100% + 4px); left: 0;
  z-index: 12; pointer-events: none;
  padding: 3px 9px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border: 1px solid var(--hairline-hi);
  border-radius: 5px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em;
  color: var(--ink); white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
  opacity: 0;
  will-change: transform, opacity;
}
html[data-theme="paper"] .sm-tooltip {
  box-shadow: 0 8px 20px rgba(40, 32, 20, 0.14);
}

.sm-gal-btn {
  position: relative; z-index: 3; justify-self: start;
  border: none; border-bottom: 1px solid transparent; background: transparent;
  color: var(--muted); cursor: pointer;
  font-family: var(--font-display); font-style: italic; font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 4px 2px 5px; border-radius: 0; white-space: nowrap;
  transition: color 0.2s ease, border-color 0.22s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.sm-gal-btn:hover {
  color: var(--ink);
  border-bottom-color: color-mix(in srgb, var(--clay) 65%, transparent);
}
.sm-gal-btn:active { transform: translateX(-1px); }
.sm-gal-back {
  display: block; flex-shrink: 0; overflow: visible; color: var(--accent-text);
  transition: color 0.2s ease;
}
.sm-gal-btn:hover .sm-gal-back { color: var(--ink); }
.sm-gal-back .arr {
  transform-box: fill-box; transform-origin: center;
  transition: transform 0.34s cubic-bezier(0.22, 1.4, 0.36, 1);
}
.sm-gal-back .d1, .sm-gal-back .d2, .sm-gal-back .d3 {
  transform-box: fill-box; transform-origin: center;
  opacity: 0.42;
  transition: transform 0.36s cubic-bezier(0.22, 1.32, 0.36, 1), opacity 0.22s ease;
}
.sm-gal-btn:hover .sm-gal-back .arr { transform: translateX(-2.4px); }
.sm-gal-btn:hover .sm-gal-back .d1 { opacity: 1; transform: translateX(-1px) scale(1.12); }
.sm-gal-btn:hover .sm-gal-back .d2 { opacity: 0.85; transform: translateX(0.4px) scale(1.06); transition-delay: 0.04s; }
.sm-gal-btn:hover .sm-gal-back .d3 { opacity: 0.65; transform: translateX(1.6px); transition-delay: 0.08s; }
.sm-gal-txt { transition: color 0.2s ease; }
.sm-idx-lbl { display: inline-flex; align-items: center; gap: 5px; }
.sm-idx-ico { color: var(--data); transition: color 0.2s ease, transform 0.22s cubic-bezier(0.22, 1.3, 0.36, 1); }
.sm-arm.active .sm-idx-ico, .sm-idx-lbl:hover .sm-idx-ico { color: var(--clay); transform: scale(1.08); }

.sm-track {
  position: relative; z-index: 3; justify-self: center;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(6px, 1.15vw, 14px);
  min-width: 0;
}
.sm-arm { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px; border-radius: 6px; will-change: transform; }
.sm-arm-roman {
  font-family: var(--font-mono); font-size: 9.5px; color: var(--data);
  letter-spacing: 0.04em; margin-right: 4px; font-style: normal;
  transition: color 0.2s ease;
}
.sm-arm.active .sm-arm-roman { color: var(--clay); }
.sm-arm-lbl {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--font-display); font-style: italic; font-size: 14px;
  padding: 2px 3px; transition: color 0.2s ease, transform 0.14s ease; white-space: nowrap;
}
.sm-arm-lbl:hover, .sm-arm.active .sm-arm-lbl { color: var(--ink); }
.sm-arm-lbl:active { transform: scale(0.94); }
.sm-arm.active .sm-arm-lbl { color: var(--accent-text); }

.sm-cluster {
  position: relative;
  height: 20px;
  flex-shrink: 0;
  overflow: visible;
}

/* Zero-circle etched 4-point star prism button — ZERO CSS transform transition so 120fps Rauno springs own it! */
.sm-star {
  position: absolute;
  top: 10px;
  width: 22px; height: 22px;
  transform: translate3d(-50%, -50%, 0);
  border: none; background: transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  color: var(--data);
  opacity: 0.72;
  will-change: transform;
  transition: opacity 0.16s ease, color 0.16s ease;
}
.sm-arm.active .sm-star { opacity: 0.92; color: var(--ink); }
.sm-star svg { width: 11.5px; height: 11.5px; overflow: visible; display: block; transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
.sm-star .sm-ray-soft { opacity: 0.24; }
.sm-star .sm-prism-core { fill: currentColor; }
.sm-star .sm-prism-needle { stroke: currentColor; stroke-width: 0.75; opacity: 0.65; }

.sm-star:hover { opacity: 1 !important; color: var(--ink); z-index: 4; }

.sm-star.active {
  opacity: 1 !important;
  color: var(--clay);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--clay) 85%, transparent));
  z-index: 5;
}
html[data-theme="paper"] .sm-star.active {
  filter: drop-shadow(0 0 2.5px color-mix(in srgb, var(--clay) 34%, transparent));
}
.sm-star.active svg { transform: scale(1.36); }
.sm-star.active .sm-prism-needle { opacity: 0.95; stroke-width: 0.9; }
.sm-star.active .sm-ray-soft { opacity: 0.56; }

.sm-star-ghost {
  position: absolute; z-index: 4; pointer-events: none;
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--clay); will-change: transform, opacity;
}
.sm-star-ghost svg { width: 11.5px; height: 11.5px; overflow: visible; display: block; }
.sm-star-ghost .sm-prism-core { fill: currentColor; }
.sm-star-ghost .sm-prism-needle { stroke: currentColor; stroke-width: 0.75; opacity: 0.65; }
.sm-star-ghost .sm-ray-soft { opacity: 0.24; }

.sm-sep { width: 1px; height: 11px; flex-shrink: 0; background: var(--hairline); opacity: 0.62; }

/* Balanced Right Readout Column (never pushes .sm-track off book center!) */
.sm-loc-wrap {
  position: relative; z-index: 3; justify-self: end; overflow: hidden; height: 20px;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  max-width: 100%; min-width: 0;
}
.sm-odometer {
  display: inline-flex; align-items: center; flex-shrink: 0;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--clay);
  letter-spacing: 0.02em; height: 16px; line-height: 16px;
  font-variant-numeric: tabular-nums;
}
.sm-odo-win {
  display: inline-block; height: 16px; overflow: hidden;
  position: relative; width: 0.68em; text-align: center;
}
.sm-odo-col {
  display: flex; flex-direction: column; will-change: transform;
}
.sm-odo-col i {
  font-style: normal; display: block; height: 16px; line-height: 16px;
}
.sm-odo-slash { opacity: 0.78; margin-left: 1px; }
.sm-loc {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--data);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 218px;
  letter-spacing: 0.04em; will-change: transform, opacity;
}

/* ==================== GSAP EDITORIAL CODEX STAGE ==================== */
.book-stage {
  position: relative;
  width: var(--book-w);
  height: var(--book-h);
  perspective: 2200px;
  pointer-events: none;
  transition: width 0.38s cubic-bezier(0.22, 1, 0.36, 1), height 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.book-tilt-wrap {
  width: 100%; height: 100%;
  pointer-events: auto;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

/* LOCKED COPTIC SEWN CODEX: Raw Archival Millboard + 5 Braided Linen Kettle-Stitch Spine Cords */
.book-cover {
  position: relative;
  width: 100%; height: 100%;
  padding: 10px;
  border-radius: 3px;
  background-color: #4F4940;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.04) 0 1px, transparent 1px 6px);
  border: 1px solid rgba(214, 202, 182, 0.32);
  box-shadow:
    0 46px 120px rgba(0, 0, 0, 0.54),
    0 14px 34px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  display: flex;
  --stack-l: 5px;
  --stack-r: 13px;

  /* Iron-gall archival ink printed INTO real cotton-rag paper */
  --folio: #F7F1E4;
  --folio-page: #F9F4E8;
  --folio-alt: #EFE8D9;
  --page-edge: #E0D7C4;
  --ink: rgba(36, 29, 22, 0.90);
  --muted: rgba(74, 65, 54, 0.88);
  --faint: rgba(36, 29, 22, 0.34);
  --data: rgba(58, 72, 92, 0.90);
  --accent: #2E6B60;
  --accent-text: #215148;
  --clay: #B24A25;
  --gold: #94652C;
  --ribbon-a: #355054;
  --ribbon-b: #4C7075;
  --ribbon-c: #253A3D;
  --hairline: rgba(36, 29, 22, 0.13);
  --hairline-hi: rgba(36, 29, 22, 0.27);
  --gutter-dark: rgba(32, 24, 14, 0.22);
  --gutter-light: rgba(255, 250, 235, 0.58);
  --tab-bg: #E4DCC9;
  --tab-active: #F6EFE0;
  color: var(--ink);
}
html[data-theme="paper"] .book-cover {
  --ribbon-a: #6E3E33; --ribbon-b: #8A5244; --ribbon-c: #532D24;
}

/* Refined Slender Woven Silk Bookmark Ribbon (emerges naturally from inside top spine!) */
.silk-ribbon {
  position: absolute; top: 10px; left: calc(50% - 6px); width: 12px; height: 42px; z-index: 27;
  border: none; cursor: pointer;
  background: linear-gradient(90deg, var(--ribbon-a) 0%, var(--ribbon-b) 45%, var(--ribbon-c) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 86%);
  box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.26);
  transition: height 0.26s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s ease;
}
.silk-ribbon::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(180deg, rgba(0,0,0,0.34), transparent); }
.silk-ribbon:hover { height: 52px; filter: brightness(1.1); }

/* ==================== NATURALLY LIT HANDMADE COTTON-RAG PAPER (ZERO-FLASH 3D!) ==================== */
.page-surface {
  background-color: var(--folio-page);
  transition: background-color 0.45s ease;
}
.book-page, .leaf-face {
  isolation: isolate;
  contain: layout style paint;
  box-shadow:
    inset 0 12px 24px -16px rgba(74, 54, 30, 0.22),
    inset 0 -14px 26px -16px rgba(74, 54, 30, 0.24);
}
/* Paper Mode (Daylight) — tactile cotton-rag fiber + gentle open-book dome curvature (loaded lazily when Folio opens!) */
body.folio-open .page-left, body.folio-open .leaf-as-left {
  background-image:
    url('../assets/paper-fiber.webp'),
    linear-gradient(90deg, rgba(84, 62, 34, 0.085) 0%, rgba(255, 252, 240, 0.26) 24%, rgba(255, 252, 240, 0.05) 70%, rgba(56, 40, 22, 0.14) 100%);
  background-size: 360px 360px, 100% 100%;
  background-repeat: repeat, no-repeat;
}
body.folio-open .page-right, body.folio-open .leaf-as-right {
  background-image:
    url('../assets/paper-fiber.webp'),
    linear-gradient(270deg, rgba(84, 62, 34, 0.085) 0%, rgba(255, 252, 240, 0.26) 24%, rgba(255, 252, 240, 0.05) 70%, rgba(56, 40, 22, 0.14) 100%);
  background-size: 360px 360px, 100% 100%;
  background-repeat: repeat, no-repeat;
}
/* Dusk Mode — Naturally, evenly lit warm archival cotton paper (soft, cozy, zero harsh glare!) */
html[data-theme="dusk"] body.folio-open .page-left,
html[data-theme="dusk"] body.folio-open .leaf-as-left {
  background-color: #EBE3D3;
  background-image:
    url('../assets/paper-fiber.webp'),
    linear-gradient(90deg, rgba(64, 50, 32, 0.11) 0%, rgba(255, 250, 236, 0.20) 26%, rgba(255, 250, 236, 0.06) 72%, rgba(44, 34, 22, 0.16) 100%),
    radial-gradient(ellipse 145% 120% at 54% 46%, rgba(255, 249, 234, 0.52) 0%, rgba(218, 208, 192, 0.28) 65%, rgba(168, 166, 178, 0.22) 100%);
  background-size: 360px 360px, 100% 100%, 100% 100%;
  background-repeat: repeat, no-repeat, no-repeat;
}
html[data-theme="dusk"] body.folio-open .page-right,
html[data-theme="dusk"] body.folio-open .leaf-as-right {
  background-color: #EBE3D3;
  background-image:
    url('../assets/paper-fiber.webp'),
    linear-gradient(270deg, rgba(64, 50, 32, 0.11) 0%, rgba(255, 250, 236, 0.20) 26%, rgba(255, 250, 236, 0.06) 72%, rgba(44, 34, 22, 0.16) 100%),
    radial-gradient(ellipse 145% 120% at 46% 46%, rgba(255, 249, 234, 0.52) 0%, rgba(218, 208, 192, 0.28) 65%, rgba(168, 166, 178, 0.22) 100%);
  background-size: 360px 360px, 100% 100%, 100% 100%;
  background-repeat: repeat, no-repeat, no-repeat;
}
html[data-theme="dusk"] .book-cover .sp-frame img,
html[data-theme="dusk"] .book-cover .gal-thumb img {
  filter: sepia(0.05) brightness(0.95) contrast(0.99);
}

/* Balanced Symmetrical Fore-Edge Paper Stacks (Exact Even Cover Margin on All 4 Sides!) */
.fore-edge {
  position: relative; z-index: 14;
  flex-shrink: 0; width: 10px; height: 100%;
  background: repeating-linear-gradient(90deg, var(--folio-page) 0px, var(--folio-page) 1px, var(--page-edge) 1px, var(--page-edge) 2.5px);
  border-top: 1px solid var(--hairline-hi); border-bottom: 1px solid var(--hairline-hi);
  transition: box-shadow 0.4s ease;
}
.fore-left { border-left: 1px solid var(--hairline-hi); border-radius: 2px 0 0 2px; box-shadow: inset -3px 0 5px var(--gutter-dark); }
.fore-right { border-right: 1px solid var(--hairline-hi); border-radius: 0 2px 2px 0; box-shadow: inset 3px 0 5px var(--gutter-dark); }

/* Physically Integrated Archival Paper Chapter Index Tabs (tucked flush into right page block!) */
.book-tabs { position: absolute; top: 46px; right: -42px; z-index: 12; display: flex; flex-direction: column; gap: 5px; }
.book-tab {
  position: relative;
  width: 60px; padding: 9px 7px 9px 18px;
  border: 1px solid rgba(36, 29, 22, 0.28); border-left: none; border-radius: 0 3px 3px 0;
  background-color: var(--tab-bg);
  background-image:
    linear-gradient(90deg, rgba(46, 36, 22, 0.22) 0%, rgba(46, 36, 22, 0.04) 28%, transparent 55%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
body.folio-open .book-tab {
  background-image:
    url('../assets/paper-fiber.webp'),
    linear-gradient(90deg, rgba(46, 36, 22, 0.22) 0%, rgba(46, 36, 22, 0.04) 28%, transparent 55%);
  background-size: 240px 240px, 100% 100%;
  background-repeat: repeat, no-repeat;
}
.book-tab {
  color: var(--muted);
  font-family: var(--font-mono); font-size: 10.5px; text-align: center; cursor: pointer;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 252, 240, 0.35);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease, background-color 0.2s ease, border-color 0.2s ease;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
html[data-theme="dusk"] .book-cover .book-tab { background-color: #C7C3BE; }
html[data-theme="dusk"] .book-cover .book-tab.active { background-color: #E4DDD0; }
.book-tab::after {
  content: ''; position: absolute; top: 4px; bottom: 4px; right: 2px; width: 2.5px; border-radius: 1px;
  background: transparent; transition: background-color 0.2s ease;
}
.book-tab small { display: inline-flex; align-items: center; justify-content: center; height: 12px; font-size: 8.5px; opacity: 0.72; letter-spacing: 0.04em; }
.tab-idx-ico { display: block; }
.book-tab:hover { transform: translateX(3px); color: var(--ink); }
.book-tab.active {
  transform: translateX(2px);
  background-color: var(--tab-active); color: var(--ink);
  border-color: rgba(178, 74, 37, 0.48); font-weight: 700;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.26), inset 8px 0 8px -8px rgba(46, 36, 22, 0.18);
}
.book-tab.active::after { background: var(--clay); }
.book-tab.active small { color: var(--clay); opacity: 1; }

/* Two Facing Pages */
.book-spread {
  position: relative; z-index: 15; flex: 1; height: 100%;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--folio-page);
  transform: translateZ(2px);
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  border-top: 1px solid var(--hairline-hi); border-bottom: 1px solid var(--hairline-hi);
}
/* LOCKED SEAMLESS SCULPTED FOLD GUTTER (Zero Hardware · Pure 3D Curved Cotton-Paper Crease!) */
.book-gutter {
  position: absolute; top: 0; bottom: 0; left: calc(50% - 39px); width: 78px; pointer-events: none; z-index: 12;
  background: linear-gradient(90deg, transparent 0%, rgba(255,250,235,0.44) 18%, rgba(30,22,12,0.16) 44%, rgba(16,12,8,0.52) 50%, rgba(30,22,12,0.16) 56%, rgba(255,250,235,0.44) 82%, transparent 100%);
}

.book-page {
  position: relative; z-index: 4; height: 100%; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.book-page::before {
  content: ''; position: absolute; inset: 10px;
  border: 1px solid var(--hairline-hi);
  box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px var(--hairline);
  pointer-events: none; z-index: 8;
}
/* In-Page Cotton Fiber Ink-Integration Veil (lets cotton fibers cross softly over ink strokes; loads lazily with Folio!) */
body.folio-open .book-page::after, body.folio-open .leaf-face::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 6;
  background-image: url('../assets/paper-fiber.webp');
  background-size: 360px 360px; background-repeat: repeat;
  opacity: 0.36;
}
.page-left::before { right: 8px; }
.page-right::before { left: 8px; }

/* Authentic Tactile Letterpress Impression (Titles, Drop Caps, Metadata & Arrows pressed INTO cotton paper!) */
.page-inner h2, .page-inner h3, .page-inner p, .page-inner dl, .page-inner figcaption,
.page-inner .sp-page-meta, .page-inner .sp-kicker, .page-inner .sp-plate-tabs,
.page-inner .sp-flow, .page-inner .front-kicker, .page-inner .front-title,
.page-inner .front-sub, .page-inner .front-links, .page-inner .idx-section,
.page-inner .idx-growth-note, .page-inner .note-kicker, .page-inner .note-title,
.page-inner .note-quote, .page-inner .note-marginalia {
  text-shadow: 0 0.9px 0 rgba(255, 253, 246, 0.78), 0 -0.45px 0.4px rgba(28, 21, 14, 0.16);
}
.sp-h2, .front-title, .note-title {
  color: #231E18 !important;
  text-shadow:
    0 1.4px 0 rgba(255, 253, 246, 0.95),
    0 -0.75px 0.55px rgba(18, 13, 8, 0.34),
    0 0.5px 1.2px rgba(24, 18, 12, 0.14) !important;
}
.sp-drop::first-letter {
  text-shadow:
    0 1.5px 0 rgba(255, 253, 246, 0.96),
    0 -0.85px 0.6px rgba(72, 24, 8, 0.38),
    0 0.4px 1px rgba(72, 24, 8, 0.16) !important;
}
.sp-lead, .front-sub, .note-quote {
  text-shadow:
    0 1px 0 rgba(255, 253, 246, 0.85),
    0 -0.5px 0.4px rgba(28, 21, 14, 0.2) !important;
}
.idx-sec-h, .note-kicker, .sp-flow-step b {
  text-shadow:
    0 1px 0 rgba(255, 253, 246, 0.9),
    0 -0.55px 0.45px rgba(72, 24, 8, 0.26) !important;
}

.pg-reg { position: absolute; font-family: var(--font-mono); font-size: 11px; color: var(--faint); pointer-events: none; z-index: 9; line-height: 1; }
.pg-tl { top: 5px; left: 6px; } .pg-tr { top: 5px; right: 6px; }
.pg-bl { bottom: 5px; left: 6px; } .pg-br { bottom: 5px; right: 6px; }

.page-inner { flex: 1; min-height: 0; overflow-y: auto; padding: var(--book-pad-y) var(--book-pad-x) 18px; position: relative; z-index: 3; scrollbar-width: thin; }
/* Preserve Enter line breaks & paragraph gaps consistently across Desktop Book and Mobile Folio! */
.front-body, .front-sub, .sp-lead, .sp-drop, .sp-body, .sp-specs dd, .sp-flow-note, .note-quote, .sp-essay-p, .sp-fig figcaption span,
.mf-lead, .mf-p, .mf-quote, .mf-specs dd, .mf-flow-note, .mf-plate figcaption span {
  white-space: pre-line;
}
.page-left .page-inner { padding-right: var(--book-gutter-pad); }
.page-right .page-inner { padding-left: var(--book-gutter-pad); }

/* Pure Embedded Letterpress Page-Turn Arrows (Lifted Comfortably Above Bottom Margin — ZERO Box Border!) */
.page-foot {
  flex-shrink: 0; height: 64px; padding: 6px 40px 26px;
  display: flex; align-items: center; position: relative; z-index: 35;
  pointer-events: none;
}
.page-left .page-foot { justify-content: flex-start; padding-right: var(--book-gutter-pad); }
.page-right .page-foot { justify-content: flex-end; padding-left: var(--book-gutter-pad); }
.page-corner {
  position: relative; z-index: 36; cursor: pointer;
  pointer-events: auto !important;
  padding: 8px 6px 5px;
  border: none; background: transparent;
  font-family: var(--font-display); font-style: italic; font-size: 14px; font-weight: 400;
  letter-spacing: 0.01em; line-height: 1;
  color: var(--clay);
  display: inline-flex; align-items: center; gap: 10px;
  text-shadow:
    0 1.15px 0 rgba(255, 253, 246, 0.94),
    0 -0.65px 0.5px rgba(78, 26, 8, 0.30);
  transition: color 0.18s ease, opacity 0.18s ease, transform 0.16s ease;
}
.page-corner::after {
  content: ''; position: absolute; left: 6px; right: 6px; bottom: 1px; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--clay) 58%, transparent) 22%, color-mix(in srgb, var(--clay) 58%, transparent) 78%, transparent);
  box-shadow: 0 1px 0 rgba(255, 253, 246, 0.85);
  opacity: 0.35; transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  transform: scaleX(0.86);
}
.page-corner .pc-label {
  color: color-mix(in srgb, var(--clay) 88%, #2B1F16);
  transition: color 0.18s ease;
}
.page-corner .pc-arrow {
  width: 24px; height: 11px; flex-shrink: 0; overflow: visible;
  stroke: var(--clay); stroke-width: 1.4; fill: none; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(255, 253, 246, 0.92)) drop-shadow(0 -0.5px 0.4px rgba(78, 26, 8, 0.28));
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-corner:hover .pc-label { color: var(--clay); }
.page-corner:hover::after { opacity: 0.9; transform: scaleX(1); }
.page-corner:active { transform: translateY(0.5px); }
.corner-next:hover .pc-arrow { transform: translateX(4.5px); }
.corner-prev:hover .pc-arrow { transform: translateX(-4.5px); }
.page-corner.disabled { opacity: 0; visibility: hidden; pointer-events: none !important; }

.peel-zone { position: absolute; top: 36px; bottom: 72px; width: 34px; z-index: 16; cursor: pointer; }
.peel-zone:active { cursor: grabbing; }
.peel-right { right: 0; }
.peel-left { left: 0; }

.page-right .page-foot::after, .page-left .page-foot::before {
  content: ''; position: absolute; bottom: 10px; width: 20px; height: 20px; pointer-events: none;
  opacity: 0; transition: opacity 0.24s ease, width 0.24s ease, height 0.24s ease;
}
.page-right .page-foot::after { right: 10px; background: linear-gradient(315deg, var(--page-edge) 0%, var(--page-edge) 46%, var(--hairline-hi) 49%, transparent 52%); }
.page-left .page-foot::before { left: 10px; background: linear-gradient(45deg, var(--page-edge) 0%, var(--page-edge) 46%, var(--hairline-hi) 49%, transparent 52%); }
.page-right .page-foot:hover::after, .page-left .page-foot:hover::before { opacity: 0.92; width: 32px; height: 32px; }

/* ==================== BULLETPROOF ZERO-FLASH 3D TURNING LEAF ==================== */
.turn-leaf, .riffle-leaf {
  position: absolute; top: 0; bottom: 0; width: 50%;
  z-index: 20; transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  pointer-events: none; display: none; will-change: transform;
}
.turn-leaf.active, .riffle-leaf.active { display: block; }
.turn-leaf.dir-next, .riffle-leaf.dir-next { left: 50%; transform-origin: left center; transform: translateZ(2px) rotateY(0deg); }
.turn-leaf.dir-prev, .riffle-leaf.dir-prev { left: 0; transform-origin: right center; transform: translateZ(2px) rotateY(0deg); }
.turn-leaf.anim { transition: transform var(--turn-dur, 580ms) var(--turn-ease, cubic-bezier(0.28, 0.06, 0.18, 1)); }
.turn-leaf.dir-next.flipping { transform: translateZ(2px) rotateY(-180deg); }
.turn-leaf.dir-prev.flipping { transform: translateZ(2px) rotateY(180deg); }

.riffle-leaf {
  z-index: 22; background: #EAE2D0; border: 1px solid var(--hairline-hi);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.26);
  transition: transform 0.34s cubic-bezier(0.3, 0.05, 0.2, 1), opacity 0.34s ease;
}
html[data-theme="dusk"] .book-cover .riffle-leaf { background: #E3DBCA; }
.riffle-leaf.dir-next.go { transform: translateZ(3px) rotateY(-180deg); opacity: 0.32; }
.riffle-leaf.dir-prev.go { transform: translateZ(3px) rotateY(180deg); opacity: 0.32; }

.leaf-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  outline: 1px solid transparent; /* WebKit/Blink anti-flicker stability */
  overflow: hidden; border-top: 1px solid var(--hairline-hi); border-bottom: 1px solid var(--hairline-hi);
  display: flex; flex-direction: column;
}
.leaf-front { transform: translateZ(0.5px); }
.leaf-back { transform: rotateY(180deg) translateZ(0.5px); }
.leaf-face::before {
  content: ''; position: absolute; inset: 10px;
  border: 1px solid var(--hairline-hi);
  box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px var(--hairline);
  pointer-events: none; z-index: 8;
}
.leaf-as-left::before { right: 8px; }
.leaf-as-right::before { left: 8px; }
.leaf-as-left .page-inner { padding-right: 38px; }
.leaf-as-right .page-inner { padding-left: 38px; }
.leaf-foot-spacer { flex-shrink: 0; height: 64px; }

/* Subtle dynamic fold shadow on leaf surface during flip (no harsh white flash!) */
.leaf-shade {
  position: absolute; inset: 0; pointer-events: none; z-index: 12;
  background: linear-gradient(90deg, rgba(16, 18, 28, 0.22), transparent 44%, rgba(16, 18, 28, 0.09));
  opacity: var(--leaf-shade, 0); transition: opacity 0.26s ease;
}

/* ==================== LOCKED MONOGRAPH × GALLERY SPREAD STYLES ==================== */
.sp-page-meta { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--hairline); margin-bottom: 12px; letter-spacing: 0.04em; }
.sp-h2 { font-family: var(--font-display); font-weight: 400; font-style: italic; font-size: var(--sp-h2-sz); line-height: 1.15; letter-spacing: -0.018em; color: var(--ink); margin-bottom: 8px; }
.sp-lead { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--muted); line-height: 1.46; margin-bottom: 10px; }
.sp-body { font-size: var(--sp-body-sz); color: var(--muted); line-height: 1.62; margin-bottom: 10px; }
.sp-drop { font-size: var(--sp-body-sz); color: var(--muted); line-height: 1.64; margin-bottom: 10px; }
.sp-drop::first-letter {
  font-family: var(--font-display); font-weight: 400; color: var(--clay);
  font-variation-settings: 'SOFT' 35, 'WONK' 0;
  float: left; font-size: 36px; line-height: 0.78; padding: 3px 4px 0 0;
}
@supports (initial-letter: 2) or (-webkit-initial-letter: 2) {
  .sp-drop::first-letter {
    float: none; padding: 0; font-size: inherit; line-height: normal;
    -webkit-initial-letter: 2; initial-letter: 2;
    margin-inline-end: 0.10em;
  }
}

.sp-kicker { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent-text); letter-spacing: 0.05em; margin-bottom: 6px; text-transform: uppercase; }
.sp-specs { border-top: 1px solid var(--hairline); margin: 7px 0 9px; }
.sp-specs > div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 5.5px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.sp-specs dt { font-family: var(--font-mono); font-size: 10.5px; color: var(--data); padding-top: 2px; }
.sp-specs dd { color: var(--muted); line-height: 1.5; }
.sp-specs a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hairline-hi); }
.sp-focus-inline { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent-text) !important; }

.mg-contact { margin-top: 10px; }
.gal-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gal-thumb { border: 1px solid var(--hairline); background: var(--folio-alt); padding: 4px; cursor: pointer; text-align: left; transition: border-color 0.16s ease, transform 0.2s ease; }
.gal-thumb:hover { border-color: var(--hairline-hi); transform: translateY(-2px); }
.gal-thumb.active { border-color: var(--clay); }
.gal-thumb img { width: 100%; height: 74px; object-fit: cover; display: block; margin-bottom: 4px; }
.gal-thumb span { display: block; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-thumb.active span { color: var(--ink); }

.sp-fig { position: relative; margin: 0 0 12px; }
.sp-fig.mount-engraved { padding: 10px; background: transparent; border: 1px solid var(--hairline-hi); box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px var(--hairline); }
.sp-frame { position: relative; overflow: hidden; border: 1px solid var(--hairline); background: var(--folio-alt); }
.sp-frame img { width: 100%; max-height: var(--sp-img-h); object-fit: contain; display: block; cursor: zoom-in; transition: opacity 0.16s ease; }
.sp-frame img.swapping { opacity: 0.14; }
.sp-zoom-hint { position: absolute; bottom: 8px; right: 8px; padding: 3px 8px; background: rgba(14, 17, 27, 0.8); color: #EFEAE0; font-family: var(--font-mono); font-size: 10.5px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.sp-frame:hover .sp-zoom-hint { opacity: 1; }
.sp-fig figcaption { padding: 9px 2px 2px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.sp-fig figcaption strong { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent-text); margin-right: 7px; }
.sp-plate-tabs { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.sp-ptab { border: none; background: transparent; color: var(--muted); padding: 2px 0; border-bottom: 1px solid transparent; font-family: var(--font-mono); font-size: 11px; cursor: pointer; }
.sp-ptab span { color: var(--data); margin-right: 3px; }
.sp-ptab:hover { color: var(--ink); }
.sp-ptab.active { color: var(--ink); border-color: var(--clay); font-weight: 700; }

.sp-placeholder { padding: 36px 24px; text-align: center; margin-bottom: 16px; border: 1px solid var(--hairline-hi); background: var(--folio-alt); }
.ph-mark { font-size: 24px; color: var(--clay); margin-bottom: 8px; }
.ph-title { font-family: var(--font-display); font-style: italic; font-size: 24px; margin-bottom: 8px; }
.sp-placeholder p { font-size: 13.5px; color: var(--muted); max-width: 38ch; margin: 0 auto 12px; }
.ph-meta { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); }

.sp-flow { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.sp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; }
.sp-step { padding: 8px 9px; background: rgba(34, 29, 23, 0.045); border-left: 1.5px solid var(--clay); }
.sp-step small { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--data); }
.sp-step strong { display: block; font-size: 12px; color: var(--ink); margin: 2px 0; }
.sp-step span { display: block; font-size: 11px; color: var(--muted); line-height: 1.38; }
.sp-flow-note { margin-top: 9px; font-family: var(--font-display); font-style: italic; font-size: 12.5px; color: var(--muted); }

/* Work Layout B · Build Journey Timeline + Stack/Tradeoff Field Cards */
.bj-timeline { position: relative; padding-left: 19px; display: flex; flex-direction: column; gap: 13px; margin-top: 6px; }
.bj-timeline::before { content: ''; position: absolute; left: 4.5px; top: 7px; bottom: 8px; width: 1px; background: var(--hairline-hi); }
.bj-node { position: relative; }
.bj-dot { position: absolute; left: -18px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--clay); border: 1.5px solid var(--folio-page); }
.bj-node small { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--clay); }
.bj-node strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 15.5px; color: var(--ink); line-height: 1.24; margin: 1px 0 3px; }
.bj-node p { font-size: 13px; line-height: 1.5; color: var(--muted); }

.bj-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.bj-thumbs .gal-thumb img { height: 58px; }
.bj-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hairline); }
.bj-card { padding: 10px 12px; background: rgba(34, 29, 23, 0.045); border-left: 2px solid var(--clay); border-radius: 0 3px 3px 0; }
.bj-card small { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; color: var(--accent-text); margin-bottom: 3px; }
.bj-card strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 14.5px; color: var(--ink); margin-bottom: 3px; }
.bj-card p { font-size: 12px; line-height: 1.46; color: var(--muted); }

/* Lab 01 Multi-Artifact Switcher + Fillable Placeholder */
.lab-suite-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 11px; }
.lab-suite-tab { border: 1px solid var(--hairline-hi); background: var(--folio-page); color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; padding: 6px 5px; border-radius: 3px; cursor: pointer; text-align: center; transition: all 0.14s ease; }
.lab-suite-tab:hover { color: var(--ink); border-color: var(--clay); }
.lab-suite-tab.active { background: color-mix(in srgb, var(--clay) 16%, var(--folio-page)); border-color: var(--clay); color: var(--ink); font-weight: 700; }
.lab-ph-stage { padding: 34px 20px; border: 1.5px dashed var(--hairline-hi); background: color-mix(in srgb, var(--folio-alt) 78%, transparent); border-radius: 3px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lab-ph-stage .ph-mark { font-size: 22px; color: var(--clay); margin: 0; }
.lab-ph-stage strong { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: var(--ink); }
.lab-ph-stage p { font-size: 12.5px; color: var(--muted); max-width: 34ch; line-height: 1.5; }

.front-kicker { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); letter-spacing: 0.06em; margin-bottom: 7px; }
.front-title { font-family: var(--font-display); font-weight: 400; font-size: 35px; line-height: 1.06; letter-spacing: -0.02em; margin-bottom: 5px; }
.front-sub { font-family: var(--font-display); font-style: italic; font-size: 16.5px; color: var(--muted); margin-bottom: 10px; }
.front-body { font-size: 13.5px; color: var(--muted); line-height: 1.58; margin-bottom: 14px; }
.front-info-card {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; row-gap: 0;
  border-top: 1px solid var(--hairline-hi); border-bottom: 1px solid var(--hairline-hi);
  box-shadow: inset 0 1px 0 rgba(255, 253, 246, 0.72), 0 1px 0 rgba(255, 253, 246, 0.78);
  background: transparent;
  margin-bottom: 14px;
}
.fic-row {
  padding: 7.5px 0;
  border-bottom: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.fic-row:nth-last-child(1),
.fic-row:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.fic-row small {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--data);
  text-shadow: 0 0.9px 0 rgba(255, 253, 246, 0.85), 0 -0.45px 0.35px rgba(28, 21, 14, 0.16);
}
.fic-row span {
  font-size: 12.5px; line-height: 1.38; color: var(--ink);
  text-shadow: 0 0.9px 0 rgba(255, 253, 246, 0.82), 0 -0.45px 0.35px rgba(28, 21, 14, 0.16);
}
.fic-kb-lockup { white-space: nowrap; }
.fic-kb-key {
  width: 28px; height: 14px;
  display: inline-block; vertical-align: -2.2px;
  margin: 0 3px; overflow: visible; flex-shrink: 0;
}
@media (max-height: 820px) and (min-width: 900px) {
  .front-kicker { font-size: 9.5px; margin-bottom: 2px; }
  .front-title { font-size: 24px; margin-bottom: 2px; }
  .front-sub { font-size: 13.5px; margin-bottom: 4px; }
  .front-body { font-size: 11.5px; line-height: 1.32; margin-bottom: 5px; }
  .front-info-card { column-gap: 18px; margin-bottom: 4px; }
  .fic-row { padding: 2.5px 0; gap: 1px; }
  .fic-row small { font-size: 8.5px; }
  .fic-row span { font-size: 11px; line-height: 1.2; }
  .fic-kb-key { width: 24px; height: 12px; vertical-align: -1.8px; margin: 0 2.5px; }
  .front-act-row { padding-top: 0; font-size: 11px; }
}
.front-plate-box { position: relative; height: 150px; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-bottom: 18px; }
.front-plate-lbl { position: absolute; bottom: 5px; right: 2px; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }
.front-links { display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.front-links > div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--hairline); padding-bottom: 6px; }
.front-links strong { font-family: var(--font-mono); font-size: 11px; color: var(--data); text-transform: uppercase; font-weight: 400; }
.front-act-row { display: flex !important; justify-content: flex-start !important; gap: 16px; border: none !important; padding-top: 6px; font-family: var(--font-mono); font-size: 12px; }
.front-act-row a { color: var(--accent-text); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.front-act-row a:hover { color: var(--ink); border-color: var(--ink); }

.idx-section { margin-bottom: 10px; }
.idx-sec-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; padding-bottom: 3px; border-bottom: 1px solid var(--hairline); }
.idx-sec-head strong { color: var(--clay); }
.idx-filters { display: inline-flex; gap: 10px; }
.idx-fbtn { border: none; background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; cursor: pointer; text-transform: lowercase; padding-bottom: 1px; border-bottom: 1px solid transparent; }
.idx-fbtn.active { color: var(--ink); border-color: var(--clay); }
.idx-row { width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 4.5px 2px; border: none; background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: padding-left 0.2s ease, color 0.16s ease; }
.idx-row:hover { padding-left: 7px; color: var(--clay); }
.idx-title { font-family: var(--font-display); font-size: 15px; flex-shrink: 0; }
.idx-dots { flex: 1; border-bottom: 1px dotted var(--hairline-hi); transform: translateY(-3px); }
.idx-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); flex-shrink: 0; }
.idx-growth-note { margin-top: 8px; padding: 8px 11px; background: rgba(34, 29, 23, 0.045); border-left: 1.5px solid var(--accent); font-size: 12px; color: var(--muted); line-height: 1.46; }
.idx-growth-note strong { color: var(--ink); font-family: var(--font-mono); font-size: 10.5px; }

.wb-margin-card { padding: 12px 14px; background: rgba(34, 29, 23, 0.045); border-left: 2px solid var(--clay); }
.wb-margin-card small { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--clay); letter-spacing: 0.06em; }

.note-kicker { font-family: var(--font-mono); font-size: 11px; color: var(--clay); letter-spacing: 0.06em; margin-bottom: 8px; }
.note-title { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.1; margin-bottom: 14px; }
.note-quote { font-family: var(--font-display); font-style: italic; font-size: 16.5px; color: var(--ink); border-left: 2px solid var(--clay); padding-left: 14px; margin-bottom: 18px; line-height: 1.48; }
.sp-essay-p { font-family: var(--font-display); font-size: 15.5px; line-height: 1.76; color: var(--muted); margin-bottom: 16px; }
.note-cont { padding-top: 10px; }
.note-marginalia { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--muted); }
.note-marginalia small { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--accent-text); margin-bottom: 4px; }

/* ==================== CHAPTER III · SPLIT-BACK POCKET POSTCARDS & GLINTY STAMPS ==================== */
.pc-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pc-fbtn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px dashed rgba(34, 28, 21, 0.28); background: rgba(251, 247, 236, 0.78);
  color: rgba(74, 65, 54, 0.88); font-family: var(--font-mono); font-size: 9.5px;
  padding: 4px 9px; border-radius: 2px; cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}
.pc-fbtn:hover { transform: translateY(-1px); border-color: var(--st-col, var(--clay)); color: #231E18; }
.pc-fbtn.active {
  border-style: solid; border-color: var(--st-col, var(--clay));
  background: #FBF7EC; color: var(--st-col, var(--clay)); font-weight: 700;
  box-shadow: 0 2px 8px rgba(34, 28, 21, 0.07);
}
.pc-mini-svg { display: inline-block; vertical-align: -2px; flex-shrink: 0; }

.pc-stack { display: flex; flex-direction: column; gap: 12px; }

/* Authentic Format 01 Split-Back Postcard Base + 4 Variants */
.pc-split {
  position: relative;
  display: grid; grid-template-columns: 1.42fr 1fr;
  background: #FBF7EC;
  border: 1px solid rgba(34, 28, 21, 0.17);
  border-radius: 2px;
  box-shadow: 0 3px 11px rgba(34, 28, 21, 0.065), inset 0 1px 0 rgba(255, 253, 246, 0.88);
  transform: rotate(var(--pc-tilt, 0deg));
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease;
}
.pc-split:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 9px 22px rgba(34, 28, 21, 0.11);
  border-color: color-mix(in srgb, var(--st-col, var(--clay)) 42%, rgba(34, 28, 21, 0.2));
}
.pc-split-l {
  padding: 12px 13px 11px;
  border-right: 1px solid rgba(34, 28, 21, 0.13);
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  min-width: 0;
}
.pc-split-r {
  padding: 9px 11px 10px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  min-width: 0;
}
.pc-split-rtop { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; }
.pc-postmark { color: #42536B; opacity: 0.84; line-height: 0; transform: rotate(-4deg); margin-left: -3px; flex-shrink: 1; }
.pc-ruled { display: flex; flex-direction: column; gap: 5px; }
.pc-ruled > div {
  display: flex; align-items: baseline; gap: 6px;
  border-bottom: 1px solid rgba(34, 28, 21, 0.17); padding-bottom: 2.5px;
  font-family: var(--font-mono); font-size: 8.5px; color: rgba(74, 65, 54, 0.9);
  min-width: 0;
}
.pc-ruled small { color: rgba(34, 28, 21, 0.42); font-size: 7.5px; letter-spacing: 0.06em; flex-shrink: 0; }
.pc-ruled span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0.04em; }

.pc-status {
  display: inline-block; font-family: var(--font-mono); font-size: 8px;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 2px 7px; border: 1px solid; border-radius: 99px;
  background: rgba(251, 247, 236, 0.95);
}
.pc-text { font-size: 13px; line-height: 1.54; color: rgba(34, 28, 21, 0.92); white-space: pre-line; }
.pc-whisper { font-family: var(--font-display); font-style: italic; font-size: 12px; color: rgba(74, 65, 54, 0.86); }

/* Type: Queue (Build Idea Blueprint Postcard) */
.pc-q-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 2px; }
.pc-q-title { font-family: var(--font-display); font-weight: 400; font-size: 15.5px; color: #231E18; line-height: 1.2; }
.pc-checklist { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 2px 0; }
.pc-checklist li { display: flex; align-items: flex-start; gap: 6px; font-size: 11.8px; color: rgba(74, 65, 54, 0.92); line-height: 1.4; }
.pc-box { width: 9px; height: 9px; border: 1px solid var(--st-col, #42536B); border-radius: 1.5px; margin-top: 3px; flex-shrink: 0; opacity: 0.72; }

/* Type: Snapshot (Photo / WIP Ephemera Postcard) */
.pc-snap-frame {
  border: 1px solid rgba(34, 28, 21, 0.18); background: #EAE2D1; padding: 3px;
  margin-bottom: 4px; overflow: hidden; border-radius: 1.5px;
}
.pc-snap-frame img { width: 100%; height: 92px; object-fit: cover; display: block; cursor: zoom-in; }

/* Type: Quote / Compact One-Liner Postcard */
.pc-type-quote { grid-template-columns: 1.55fr 0.95fr; }
.pc-q-kicker { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.08em; color: var(--st-col, var(--clay)); }
.pc-quote-txt { font-family: var(--font-display); font-style: italic; font-size: 15px; line-height: 1.44; color: #231E18; }
.pc-q-date { font-family: var(--font-mono); font-size: 8px; color: #42536B; line-height: 1.35; display: flex; flex-direction: column; }
.pc-q-date strong { font-size: 9px; color: #231E18; }

/* Scalloped Glinty Postage Stamps (Variant D Color-Block + Variant B Prismatic Foil!) */
.pc-glint-st {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; width: 48px; height: 56px; flex-shrink: 0;
  cursor: pointer; user-select: none;
  transform: rotate(1.8deg);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), filter 0.22s ease;
  filter: drop-shadow(0 1.5px 2.5px rgba(34, 28, 21, 0.16));
}
.pc-glint-st:hover {
  transform: perspective(320px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-1.5px) scale(1.06);
  filter: drop-shadow(0 6px 10px rgba(34, 28, 21, 0.22));
}
.pc-st-inner { position: relative; width: 100%; height: 100%; overflow: hidden; }
.pc-st-inner svg { display: block; width: 100%; height: 100%; }
.pc-st-glint {
  position: absolute; inset: 4px; pointer-events: none; overflow: hidden; border-radius: 1px;
}
.pc-st-glint::before {
  content: ''; position: absolute; inset: -42%;
  background: linear-gradient(118deg, transparent 34%, rgba(255,248,218,0.12) 43%, rgba(255,250,226,0.58) 50%, rgba(240,202,126,0.22) 56%, transparent 65%);
  transform: translateX(-82%) translateY(-8%);
  animation: pcIdleGlint 7.2s ease-in-out infinite;
  animation-delay: var(--g-delay, 0s);
}
.pc-glint-st:hover .pc-st-glint::before { animation: none; opacity: 0; }
.pc-st-glint::after {
  content: ''; position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.18s ease;
}
.pc-glint-st:hover .pc-st-glint::after { opacity: 1; }

.pc-glint-st.v-block .pc-st-glint::after {
  background: radial-gradient(circle 36px at var(--mx) var(--my), rgba(255, 246, 206, 0.62), rgba(235, 190, 104, 0.22) 46%, transparent 74%);
  mix-blend-mode: screen;
}
.pc-glint-st.v-prism .pc-st-glint::before {
  background: linear-gradient(122deg, transparent 30%, rgba(122,186,176,0.24) 42%, rgba(255,249,226,0.62) 49%, rgba(228,132,84,0.26) 56%, rgba(147,166,196,0.24) 63%, transparent 72%);
}
.pc-glint-st.v-prism .pc-st-glint::after {
  background: conic-gradient(from 40deg at var(--mx) var(--my),
    rgba(255,248,220,0.44), rgba(122,186,176,0.36), rgba(228,132,84,0.34), rgba(154,174,218,0.34), rgba(255,248,220,0.44));
  mix-blend-mode: overlay;
}
@keyframes pcIdleGlint {
  0%, 74%, 100% { transform: translateX(-88%) translateY(-8%); opacity: 0; }
  84% { opacity: 0.9; }
  95% { transform: translateX(88%) translateY(8%); opacity: 0; }
}

.pc-empty { font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--faint); padding: 18px 4px; }
.pc-legend { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hairline); }
.pc-legend small { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.07em; color: var(--faint); margin-bottom: 6px; }
.pc-legend-row { display: flex; flex-wrap: wrap; gap: 8px 13px; font-family: var(--font-mono); font-size: 9.5px; }
.pc-legend-row span { display: inline-flex; align-items: center; gap: 4px; }

@media (max-width: 899px) {
  .pc-split, .pc-type-quote { grid-template-columns: 1fr; }
  .pc-split-l { border-right: none; border-bottom: 1px dashed rgba(34, 28, 21, 0.16); }
  .pc-split-r { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
  .pc-split-rtop { order: 2; align-items: center; gap: 6px; }
  .pc-ruled { order: 1; flex: 1; }
}

.lab-stage { padding: 14px 15px; background: color-mix(in srgb, var(--folio-alt) 85%, transparent); border: 1px solid var(--hairline); border-radius: 3px; }
.lab-stage.compact { padding: 10px 12px; }
.lab-kicker { font-family: var(--font-mono); font-size: 10px; color: var(--accent-text); margin-bottom: 7px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.lab-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.lab-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--folio-page); border: 1px solid var(--hairline); border-radius: 3px; }
.lab-seg button { border: none; background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; padding: 5px 10px; cursor: pointer; border-radius: 2px; }
.lab-seg button.active { background: color-mix(in srgb, var(--accent) 18%, var(--folio-alt)); color: var(--ink); font-weight: 700; }
.lab-slider { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.lab-slider input { accent-color: var(--clay); width: 82px; cursor: pointer; }
.lab-canvas-box { position: relative; border: 1px solid var(--hairline-hi); border-radius: 3px; overflow: hidden; background: #0D111C; transition: background-color 0.45s ease; }
html[data-theme="paper"] .lab-canvas-box { background: #EFE8D8; }
.lab-canvas { display: block; width: 100%; height: clamp(176px, 24vh, 224px); touch-action: none; cursor: grab; }
.lab-canvas.compact { height: clamp(134px, 19vh, 168px); }
/* Varied content-proportional card heights so Lab spreads feel editorial and NEVER clip or overflow! */
.lab-canvas.sz-tall { height: clamp(180px, 27vh, 238px); }
.lab-canvas.sz-medium { height: clamp(132px, 19.5vh, 174px); }
.lab-canvas.sz-wide { height: clamp(118px, 17.5vh, 158px); }
@media (max-height: 820px) and (min-width: 900px) {
  .lab-canvas.sz-tall { height: clamp(136px, 20vh, 176px); }
  .lab-canvas.sz-medium { height: clamp(114px, 16.5vh, 148px); }
  .lab-canvas.sz-wide { height: clamp(92px, 13.5vh, 128px); }
  .lab-right-stack { gap: 8px; }
  .lab-stage.compact { padding: 8px 10px; }
}
.lab-right-stack { display: flex; flex-direction: column; gap: 11px; }
/* Dedicated Editorial Section Opener Spread (replaces top part pills!) */
.lab-opener-l { display: flex; flex-direction: column; justify-content: center; min-height: calc(100% - 48px); padding: 10px 0 8px; }
.lab-opener-r { display: flex; flex-direction: column; min-height: calc(100% - 48px); gap: 16px; padding-top: 8px; }
.lab-op-list { display: flex; flex-direction: column; gap: 10px; }
.lab-op-item {
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--hairline-hi); border-radius: 3px;
  background: color-mix(in srgb, var(--folio-alt) 68%, var(--folio-page));
  padding: 13px 15px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease;
}
.lab-op-item:hover {
  border-color: var(--clay);
  background: color-mix(in srgb, var(--clay) 6%, var(--folio-page));
  transform: translateX(3px);
}
.lab-op-top { display: flex; align-items: baseline; gap: 9px; width: 100%; }
.lab-op-num { font-family: var(--font-mono); font-size: 10px; color: var(--clay); letter-spacing: 0.06em; flex-shrink: 0; }
.lab-op-title { font-family: var(--font-display); font-weight: 400; font-size: 17.5px; color: var(--ink); line-height: 1.2; }
.lab-op-pg { font-family: var(--font-mono); font-size: 10px; color: var(--data); flex-shrink: 0; }
.lab-op-desc { font-size: 13px; color: var(--muted); line-height: 1.48; margin: 0; }

/* Archival Rubber-Stamp WIP Spread + Frosted Locked-Page Veil */
.wip-left-wrap { display: flex; flex-direction: column; justify-content: center; min-height: calc(100% - 48px); padding: 10px 0; }
.wip-bench-frame {
  min-height: calc(100% - 48px);
  border: 1.5px dashed var(--hairline-hi); border-radius: 3px;
  background: color-mix(in srgb, var(--folio-alt) 62%, transparent);
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  padding: 28px 24px; text-align: center;
}
.wip-reg { position: absolute; font-family: var(--font-mono); font-size: 11px; color: var(--muted); opacity: 0.52; pointer-events: none; }
.wip-reg.tl { top: 8px; left: 10px; } .wip-reg.tr { top: 8px; right: 10px; }
.wip-reg.bl { bottom: 8px; left: 10px; } .wip-reg.br { bottom: 8px; right: 10px; }
.wip-rubber-stamp {
  border: 2px solid var(--clay); color: var(--clay); padding: 7px 17px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  transform: rotate(-5.2deg);
  background: color-mix(in srgb, var(--folio-page) 86%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--clay) 34%, transparent), 0 6px 18px rgba(34, 28, 21, 0.08);
}
.wip-bench-cap { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); max-width: 34ch; line-height: 1.52; margin: 0; }
.wip-back-btn {
  border: none; background: transparent; color: var(--accent-text);
  font-family: var(--font-mono); font-size: 11px; cursor: pointer; padding: 0 0 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.wip-back-btn:hover { color: var(--ink); border-color: var(--ink); }
.lab-canvas.grabbing { cursor: grabbing; }
.lab-chip-btn { border: 1px solid var(--hairline-hi); background: var(--folio-page); color: var(--ink); font-family: var(--font-mono); font-size: 10px; padding: 5px 10px; border-radius: 3px; cursor: pointer; transition: border-color 0.14s ease, color 0.14s ease; }
.lab-chip-btn:hover { border-color: var(--clay); color: var(--clay); }
.lab-hint { margin-top: 9px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.lab-sound-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lab-sound-pad { text-align: left; padding: 10px 11px; border: 1px solid var(--hairline-hi); background: var(--folio-page); border-radius: 3px; cursor: pointer; transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease; }
.lab-sound-pad:hover { border-color: var(--clay); }
.lab-sound-pad:active, .lab-sound-pad.fired { transform: scale(0.985); border-color: var(--clay); background: color-mix(in srgb, var(--clay) 10%, var(--folio-page)); }
.lab-sound-pad small { display: block; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.06em; color: var(--clay); margin-bottom: 3px; }
.lab-sound-pad strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 14.5px; color: var(--ink); line-height: 1.2; }
.lab-sound-pad span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.lab-lp-box { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--hairline); }
.lab-lp-sample { font-family: var(--font-display); font-size: clamp(20px, 2vw, 24px); color: var(--ink); text-align: center; padding: 10px 8px; background: var(--folio-page); border: 1px solid var(--hairline); border-radius: 3px; }

.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(8, 10, 14, 0.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; opacity: 0; pointer-events: none; transition: opacity 0.22s ease; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(1080px, 94vw); max-height: 78vh; border: 1px solid rgba(255,255,255,0.14); }
.lightbox-cap { max-width: 68ch; text-align: center; font-family: var(--font-mono); font-size: 12px; color: #ECE8DD; }

.email-toast {
  position: fixed; left: 50%; bottom: 64px; z-index: 140;
  transform: translate3d(-50%, 10px, 0);
  padding: 8px 14px; border-radius: 2px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border: 1px solid var(--hairline-hi);
  border-left: 2px solid var(--clay);
  color: var(--ink);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30);
  opacity: 0; pointer-events: none;
  white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.email-toast.show { opacity: 1; transform: translate3d(-50%, 0, 0); }

.svg-defs-hidden { position: absolute; width: 0; height: 0; pointer-events: none; overflow: hidden; }
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  padding: 8px 13px; border-radius: 2px;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--hairline-hi);
  border-left: 2px solid var(--clay);
  font-family: var(--font-mono); font-size: 11px; text-decoration: none;
  transition: top 0.16s ease;
}
.skip-link:focus-visible { top: 14px; outline: 2px solid var(--clay); outline-offset: 2px; }
:focus-visible { outline: 1.5px solid var(--clay); outline-offset: 2px; }
main#main { display: contents; }
.noscript-fallback {
  max-width: 600px; margin: 90px auto 40px; padding: 28px 24px;
  border: 1px solid var(--hairline-hi); border-radius: 6px;
  background: var(--panel); color: var(--ink); line-height: 1.6;
}
.noscript-fallback h2 { font-family: var(--font-display); font-weight: 400; margin-bottom: 10px; }
.noscript-fallback ul { margin: 14px 0 14px 18px; color: var(--muted); }
.noscript-fallback a { color: var(--clay); }

@media (max-width: 899px) {
  canvas#sky, canvas#sky-fade, .topbar, .sector-margin, .whisper-bar, .corner-foot, .book-backdrop { display: none !important; }
  html, body { min-height: 100%; overflow-x: clip; }
  body.mobile-sheet-open { overflow: hidden; }

  .mobile-home {
    display: block; position: relative; min-height: 100dvh;
    background: #06080E;
    --paper-bg: #EDE6D7; --paper-alt: #E4DCCB; --paper-edge: #D5CCB8;
    --paper-ink: rgba(34, 28, 21, 0.92); --paper-muted: rgba(74, 65, 54, 0.88);
    --paper-clay: #B24A25; --paper-accent: #215148; --paper-data: #42536B;
    --paper-line: rgba(34, 28, 21, 0.13); --paper-line-hi: rgba(34, 28, 21, 0.27);
  }
  html[data-theme="paper"] .mobile-home {
    background: #DDD5C4;
    --paper-bg: #F9F4E8; --paper-alt: #EFE8D9; --paper-edge: #E0D7C4;
  }

  /* Recessed Vertical Star Ledger Home (Observatory Atlas Aesthetic) */
  .mh-home {
    min-height: 100dvh;
    background:
      radial-gradient(1px 1px at 16% 11%, rgba(242, 236, 224, 0.36) 0, transparent 100%),
      radial-gradient(1.2px 1.2px at 84% 7%, rgba(144, 206, 196, 0.42) 0, transparent 100%),
      radial-gradient(1px 1px at 66% 19%, rgba(242, 184, 136, 0.32) 0, transparent 100%),
      radial-gradient(1px 1px at 28% 24%, rgba(164, 178, 224, 0.30) 0, transparent 100%),
      radial-gradient(ellipse 95% 42% at 50% 0%, color-mix(in srgb, var(--accent) 11%, transparent) 0%, transparent 100%),
      var(--sky);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    transform-origin: center top;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.42s ease, opacity 0.36s ease;
  }
  html[data-theme="paper"] .mh-home {
    background:
      radial-gradient(ellipse 95% 42% at 50% 0%, color-mix(in srgb, var(--accent) 7%, transparent) 0%, transparent 100%),
      var(--sky);
  }
  .mobile-home.sheet-open .mh-home {
    transform: scale(0.94) translateY(8px);
    border-radius: 18px;
    opacity: 0.54;
    pointer-events: none;
  }

  .mh-mast {
    max-width: 560px; margin: 0 auto;
    padding: 22px 20px 14px;
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  }
  .mh-mast h1 { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.08; letter-spacing: -0.02em; }
  .mh-sub { font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--muted); margin-top: 2px; }
  .mh-actions { display: flex; align-items: center; gap: 12px; padding-top: 5px; }
  .mh-ctrl {
    border: none; background: transparent; color: var(--muted); cursor: pointer;
    font-family: var(--font-mono); font-size: 10.5px; padding: 3px 0;
  }
  .mh-ctrl:hover { color: var(--ink); }

  /* Slim Editorial Observatory Strip + Style 1 Bare Hairline Trigger */
  .mh-atlas-strip {
    max-width: 560px; margin: 0 auto; padding: 9px 20px;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
  }
  .mh-atlas-coord {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
    color: var(--data); text-transform: uppercase;
  }
  .mh-folio-btn {
    border: none;
    border-bottom: 1px solid color-mix(in srgb, var(--clay) 65%, transparent);
    background: transparent;
    color: var(--ink); cursor: pointer;
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.03em;
    padding: 6px 0 5px; border-radius: 0;
    display: inline-flex; align-items: center; gap: 6px;
    transition: color 0.18s ease, border-color 0.18s ease;
  }
  .mh-folio-btn svg { color: var(--clay); }
  .mh-folio-arr { color: var(--clay); transition: transform 0.18s ease; }
  .mh-folio-btn:hover { color: var(--clay); border-bottom-color: var(--clay); }
  .mh-folio-btn:active .mh-folio-arr { transform: translateX(2px); }

  /* Sticky Roman Chapter Tabs */
  .mh-tabs {
    position: sticky; top: 0; z-index: 8;
    max-width: 560px; margin: 0 auto;
    display: flex; justify-content: space-between; gap: 12px; padding: 6px 20px 0;
    background: color-mix(in srgb, var(--sky) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hairline);
    overflow-x: auto; scrollbar-width: none;
  }
  .mh-tabs::-webkit-scrollbar { display: none; }
  .mh-tab {
    flex-shrink: 0; border: none; background: transparent; color: var(--muted); cursor: pointer;
    font-family: var(--font-display); font-style: italic; font-size: 15.5px;
    padding: 8px 2px 9px; border-bottom: 1.5px solid transparent;
    transition: color 0.16s ease, border-color 0.16s ease;
  }
  .mh-tab small { font-family: var(--font-mono); font-style: normal; font-size: 9.5px; color: var(--data); margin-right: 4px; }
  .mh-tab.active { color: var(--ink); border-color: var(--clay); }
  .mh-tab.active small { color: var(--clay); }

  /* Active Chapter Editorial Whisper */
  .mh-whisper {
    max-width: 560px; margin: 0 auto;
    padding: 13px 20px 2px;
    font-family: var(--font-display); font-style: italic; font-size: 14px; line-height: 1.44;
    color: var(--muted);
  }

  /* Vertical Star Ledger Spine */
  .mh-rail {
    position: relative; max-width: 560px; margin: 0 auto;
    padding: 8px 20px 18px 46px;
  }
  .mh-rail::before {
    content: ''; position: absolute; left: 26px; top: 18px; bottom: 26px; width: 1px;
    background: linear-gradient(180deg, transparent, var(--hairline-hi) 10%, var(--hairline-hi) 90%, transparent);
  }
  .mh-row {
    position: relative; width: 100%; border: none; background: transparent;
    text-align: left; color: var(--ink); cursor: pointer;
    padding: 14px 0; border-bottom: 1px solid var(--hairline); display: block;
  }
  .mh-row:last-child { border-bottom: none; }
  .mh-row:active { opacity: 0.65; }
  .mh-star {
    position: absolute; left: -27px; top: 18px; width: 15px; height: 15px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-text); background: var(--sky);
  }
  .mh-row.active .mh-star { color: var(--clay); }
  .mh-row.active .mh-row-title { color: var(--ink); }
  .mh-row-flex { display: flex; align-items: center; gap: 14px; }
  .mh-row-txt { flex: 1; min-width: 0; }
  .mh-row-meta { font-family: var(--font-mono); font-size: 9.5px; color: var(--data); letter-spacing: 0.06em; margin-bottom: 3px; }
  .mh-row-title { font-family: var(--font-display); font-size: 18.5px; line-height: 1.2; margin-bottom: 3px; }
  .mh-row-note { font-size: 13px; color: var(--muted); line-height: 1.44; }
  .mh-row-thumb {
    width: 68px; height: 50px; object-fit: cover; border-radius: 3px;
    border: 1px solid var(--hairline-hi); flex-shrink: 0;
  }

  /* Folio-Diagram Desktop Observatory Teaser + Style 1 Handoff */
  .mh-desk-plate {
    max-width: 560px; margin: 6px auto 14px; padding: 0 20px;
  }
  .mh-desk-frame {
    border: 1px solid var(--hairline-hi);
    border-radius: 2px;
    overflow: hidden;
    background: color-mix(in srgb, var(--panel) 84%, transparent);
  }
  .mh-desk-diagram {
    position: relative; height: 118px;
    background: #0D111C;
    border-bottom: 1px solid var(--hairline);
    overflow: hidden;
  }
  html[data-theme="paper"] .mh-desk-diagram { background: #EFE8D8; }
  .mh-desk-diagram canvas { width: 100%; height: 100%; display: block; }
  .mh-desk-reg {
    position: absolute; font-family: var(--font-mono); font-size: 9px; line-height: 1;
    color: var(--faint); pointer-events: none; z-index: 2;
  }
  .mh-desk-reg.tl { top: 6px; left: 8px; }
  .mh-desk-reg.tr { top: 6px; right: 8px; }
  .mh-desk-reg.bl { bottom: 6px; left: 8px; }
  .mh-desk-reg.br { bottom: 6px; right: 8px; }
  .mh-desk-body {
    padding: 13px 15px 14px;
  }
  .mh-desk-kicker {
    font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.09em;
    color: var(--clay); text-transform: uppercase; margin-bottom: 4px;
  }
  .mh-desk-title {
    font-family: var(--font-display); font-weight: 400; font-size: 16.5px; line-height: 1.24;
    color: var(--ink); margin-bottom: 5px;
  }
  .mh-desk-copy {
    font-size: 13px; line-height: 1.5; color: var(--muted); margin-bottom: 12px;
  }
  .mh-desk-act {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
  }
  .mh-handoff-btn {
    border: none;
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 62%, transparent);
    background: transparent; color: var(--ink); cursor: pointer;
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.03em;
    padding: 6px 0 5px; border-radius: 0;
    display: inline-flex; align-items: center; gap: 6px;
    transition: color 0.18s ease, border-color 0.18s ease;
  }
  .mh-handoff-btn .arr { color: var(--accent-text); }
  .mh-handoff-btn:hover { color: var(--accent-text); border-bottom-color: var(--accent); }

  .mh-foot {
    max-width: 560px; margin: 10px auto 0; padding: 14px 20px 10px;
    border-top: 1px solid var(--hairline);
    display: flex; flex-direction: column; gap: 8px;
    font-family: var(--font-mono); font-size: 10.5px; color: var(--muted);
  }
  .mh-foot-top {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  }
  .mh-foot-links { display: flex; gap: 14px; }
  .mh-foot-links a { color: var(--muted); text-decoration: none; }
  .mh-foot-links a:hover { color: var(--ink); }

  /* Clean Single Cotton-Rag Card Sheet (zero extra back-rim sliver!) */
  .mh-scrim {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(5, 7, 13, 0.44);
    opacity: 0; pointer-events: none; transition: opacity 0.32s ease;
  }
  .mobile-home.sheet-open .mh-scrim { opacity: 1; pointer-events: auto; }

  .mh-sheet {
    position: fixed; left: 0; right: 0; top: calc(24px + env(safe-area-inset-top, 0px)); bottom: 0; z-index: 42;
    max-width: 620px; margin: 0 auto;
    border-radius: 22px 22px 0 0;
    background-color: var(--paper-bg);
    background-image:
      url('../assets/paper-fiber.webp'),
      linear-gradient(180deg, rgba(255, 252, 240, 0.25) 0%, transparent 16%, transparent 86%, rgba(56, 40, 22, 0.08) 100%);
    background-size: 320px 320px, 100% 100%;
    color: var(--paper-ink);
    --folio-page: var(--paper-bg);
    --folio-alt: var(--paper-alt);
    --ink: var(--paper-ink);
    --muted: var(--paper-muted);
    --faint: rgba(36, 29, 22, 0.34);
    --data: var(--paper-data);
    --accent: var(--paper-accent);
    --accent-text: var(--paper-accent);
    --clay: var(--paper-clay);
    --hairline: var(--paper-line);
    --hairline-hi: var(--paper-line-hi);
    display: flex; flex-direction: column;
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transform: translateY(104%);
    transition: transform 0.40s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
  }
  .mobile-home.sheet-open .mh-sheet { transform: translateY(0); }
  .mh-sheet.dragging-y { transition: none; }

  .mf-grab { flex-shrink: 0; padding: 9px 18px 8px; border-bottom: 1px solid var(--paper-line-hi); cursor: grab; user-select: none; touch-action: none; }
  .mf-handle { width: 38px; height: 3px; border-radius: 2px; background: var(--paper-line-hi); margin: 0 auto 7px; }
  .mf-topbar { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--paper-muted); min-height: 34px; }
  .mf-topbtn {
    border: none; border-bottom: 1px solid transparent; background: transparent;
    color: var(--paper-clay); font-family: var(--font-mono); font-size: 11px;
    cursor: pointer; padding: 7px 2px; min-height: 36px;
    display: inline-flex; align-items: center; gap: 5px;
    transition: border-color 0.16s ease, color 0.16s ease;
  }
  .mf-topbtn:hover { border-bottom-color: color-mix(in srgb, var(--paper-clay) 55%, transparent); }
  .mf-idx-ico { display: block; flex-shrink: 0; }
  .mf-topbtn.alt { color: var(--paper-accent); }
  .mf-topbtn.alt:hover { border-bottom-color: color-mix(in srgb, var(--paper-accent) 55%, transparent); }

  /* Simultaneous Two-Page Cross-Slide Stage (zero header/dock blink!) */
  .mf-stage {
    position: relative; flex: 1; overflow: hidden;
  }
  .mf-body {
    position: absolute; inset: 0;
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 22px 22px 28px;
    will-change: transform, opacity;
    touch-action: pan-y;
  }
  .mf-body.mf-leaving { pointer-events: none; overflow: hidden; }

  /* Pocket Field Guide Spread 0 & Editorial 390px Reading Rhythm */
  .mf-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.09em; color: var(--paper-clay); text-transform: uppercase; margin-bottom: 8px; }
  .mf-title {
    font-family: var(--font-display); font-weight: 400; font-size: 27px; line-height: 1.13; letter-spacing: -0.02em; margin-bottom: 10px; color: var(--paper-ink);
    text-shadow: 0 1px 0 rgba(255,252,242,0.7), 0 -0.6px 0 rgba(28,20,12,0.16);
  }
  .mf-lead { font-family: var(--font-display); font-style: italic; font-size: 16px; line-height: 1.48; color: var(--paper-muted); margin-bottom: 16px; }
  .mf-sec { margin-bottom: 24px; }
  .mf-sec-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.09em; color: var(--paper-clay);
    border-bottom: 1px solid var(--paper-line-hi); padding-bottom: 6px; margin-bottom: 4px;
  }
  .mf-sec-head > span:last-child { color: var(--paper-muted); }
  .mf-filters { display: inline-flex; gap: 10px; }
  .mf-fbtn { border: none; background: transparent; color: var(--paper-muted); font-family: var(--font-mono); font-size: 9.5px; cursor: pointer; padding: 4px 0 2px; border-bottom: 1px solid transparent; }
  .mf-fbtn.active { color: var(--paper-ink); border-color: var(--paper-clay); }
  /* Refined Index B: Spacious Editorial Rows (Full-Width Wrapped Descriptions, 44px+ Tap Height, Zero Truncation) */
  .mf-idx-row {
    width: 100%; border: none; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; gap: 4px;
    min-height: 44px; padding: 13px 0;
    border-bottom: 1px solid var(--paper-line); text-align: left; color: var(--paper-ink);
    transition: color 0.16s ease;
  }
  .mf-idx-row:last-child { border-bottom: none; }
  .mf-idx-row:active .mf-idx-title { color: var(--paper-clay); }
  .mf-idx-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; }
  .mf-idx-title { font-family: var(--font-display); font-size: 17px; line-height: 1.22; color: var(--paper-ink); }
  .mf-idx-yr { font-family: var(--font-mono); font-size: 10px; color: var(--paper-data); flex-shrink: 0; letter-spacing: 0.03em; }
  .mf-idx-sub {
    font-size: 13.5px; line-height: 1.48; color: var(--paper-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .mf-idx-empty { font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--paper-muted); padding: 12px 0; }
  .mf-colophon { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--paper-line-hi); display: flex; flex-direction: column; gap: 8px; }
  .mf-colophon > div:first-child { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--paper-muted); }
  .mf-colophon strong { color: var(--paper-ink); font-weight: 400; }
  .mf-links { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--font-mono); font-size: 11px; }
  .mf-links a { color: var(--paper-accent); text-decoration: none; padding: 4px 0 3px; border-bottom: 1px solid color-mix(in srgb, var(--paper-accent) 48%, transparent); }

  .mf-plate { border: 1px solid var(--paper-line-hi); background: var(--paper-alt); padding: 7px; border-radius: 2px; margin-bottom: 10px; }
  .mf-frame { position: relative; background: var(--paper-alt); }
  .mf-frame img { width: 100%; height: auto; max-height: 220px; object-fit: contain; display: block; border: 1px solid var(--paper-line); cursor: zoom-in; }
  .mf-zoom { position: absolute; right: 7px; bottom: 7px; padding: 2px 7px; background: rgba(18, 16, 14, 0.64); color: #F7F1E4; font-family: var(--font-mono); font-size: 9px; border-radius: 2px; pointer-events: none; }
  /* Single-column readable Observer Info Ledger on 390px mobile */
  .mh-sheet .front-info-card {
    display: flex; flex-direction: column; gap: 0;
    margin: 14px 0 24px; padding: 0;
    border-top: 1px solid var(--paper-line-hi); border-bottom: 1px solid var(--paper-line-hi);
  }
  .mh-sheet .fic-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
    padding: 9px 0; border-bottom: 1px solid var(--paper-line);
  }
  .mh-sheet .fic-row:last-child { border-bottom: none; }
  .mh-sheet .fic-row small { flex-shrink: 0; margin: 0; }
  .mh-sheet .fic-row span { font-size: 13px; text-align: right; line-height: 1.38; }
  .mh-sheet .fic-kb-key { width: 22px; height: 11px; vertical-align: -1.6px; margin: 0 2px; }
  .mh-sheet .bj-cards { grid-template-columns: 1fr; gap: 10px; }
  .mh-sheet .bj-node p, .mh-sheet .bj-card p { font-size: 13.5px; line-height: 1.56; }
  .mf-plate figcaption { display: flex; flex-direction: column; gap: 3px; padding: 8px 2px 2px; font-size: 12.5px; line-height: 1.44; color: var(--paper-muted); }
  .mf-plate figcaption strong { font-family: var(--font-mono); font-size: 9.5px; color: var(--paper-ink); letter-spacing: 0.05em; }
  .mf-thumbs { display: flex; gap: 6px; margin-bottom: 16px; }
  .mf-pthumb { flex: 1; border: 1px solid var(--paper-line); background: var(--paper-alt); padding: 4px; cursor: pointer; text-align: left; border-radius: 2px; }
  .mf-pthumb.active { border-color: var(--paper-clay); }
  .mf-pthumb img { width: 100%; height: 42px; object-fit: cover; display: block; }
  .mf-pthumb span { display: block; font-family: var(--font-mono); font-size: 8.5px; color: var(--paper-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mf-placeholder { border: 1px solid var(--paper-line-hi); background: var(--paper-alt); padding: 24px 18px; text-align: center; margin-bottom: 14px; }
  .mf-ph-mark { color: var(--paper-clay); font-size: 18px; margin-bottom: 6px; }
  .mf-placeholder strong { font-family: var(--font-display); font-weight: 400; font-size: 20px; display: block; margin-bottom: 6px; }
  .mf-placeholder p { font-size: 13.5px; color: var(--paper-muted); }

  .mf-p { font-size: 15px; line-height: 1.64; color: var(--paper-ink); margin-bottom: 16px; }
  .mf-essay { font-family: var(--font-display); font-size: 16px; line-height: 1.72; color: var(--paper-muted); }
  .mf-drop::first-letter { float: left; font-family: var(--font-display); font-variation-settings: 'SOFT' 35, 'WONK' 0; font-size: 36px; line-height: 0.78; padding: 3px 4px 0 0; color: var(--paper-clay); }
  @supports (initial-letter: 2) or (-webkit-initial-letter: 2) {
    .mf-drop::first-letter { float: none; padding: 0; font-size: inherit; line-height: normal; -webkit-initial-letter: 2; initial-letter: 2; margin-inline-end: 0.10em; }
  }
  .mf-quote { font-family: var(--font-display); font-style: italic; font-size: 15.5px; border-left: 2px solid var(--paper-clay); padding-left: 12px; margin-bottom: 14px; color: var(--paper-ink); line-height: 1.48; }
  .mf-specs { border-top: 1px solid var(--paper-line-hi); margin-top: 12px; }
  .mf-specs div { padding: 8px 0; border-bottom: 1px solid var(--paper-line); }
  .mf-specs dt { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--paper-data); margin-bottom: 2px; }
  .mf-specs dd { font-size: 13px; color: var(--paper-muted); line-height: 1.46; }
  .mf-specs dd a { color: var(--paper-accent); text-decoration: none; }

  .mf-flow { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--paper-line-hi); }
  .mf-flow-kicker { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--paper-data); margin-bottom: 8px; }
  .mf-steps { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .mf-step { padding: 9px 11px; border: 1px solid var(--paper-line); background: var(--paper-alt); }
  .mf-step small { font-family: var(--font-mono); font-size: 9px; color: var(--paper-clay); display: block; }
  .mf-step strong { font-family: var(--font-display); font-weight: 500; font-size: 14px; display: block; margin: 2px 0; }
  .mf-step span { font-size: 12px; color: var(--paper-muted); line-height: 1.4; display: block; }
  .mf-flow-note { font-size: 12px; font-style: italic; color: var(--paper-muted); margin-top: 8px; line-height: 1.46; }

  .mf-lab-host {
    margin-bottom: 14px;
    --folio-page: var(--paper-bg); --folio-alt: var(--paper-alt);
    --ink: var(--paper-ink); --muted: var(--paper-muted);
    --accent: var(--paper-accent); --accent-text: var(--paper-accent);
    --data: var(--paper-data); --hairline: var(--paper-line); --hairline-hi: var(--paper-line-hi);
  }

  /* Thumb-Zone Pocket Folio Dock (Option 2: Astronomical Vernier Ruler + Style 1 Hairline Tabs) */
  .mf-dock {
    flex-shrink: 0;
    padding: 4px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--paper-line-hi);
    background: color-mix(in srgb, var(--paper-alt) 85%, var(--paper-bg));
    display: flex; flex-direction: column; gap: 2px;
  }
  .mf-dots {
    display: flex; align-items: flex-end; justify-content: space-between;
    padding: 0 8px 4px; height: 26px;
    border-bottom: 1px solid var(--paper-line);
    margin-bottom: 2px;
  }
  .mf-dot {
    border: none; background: transparent; cursor: pointer;
    flex: 1; max-width: 26px; height: 24px; padding: 0 0 1px;
    display: inline-flex; align-items: flex-end; justify-content: center;
  }
  .mf-dot::after {
    content: ''; display: block; width: 1px; height: 5px;
    background: var(--paper-line-hi);
    transition: height 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease, width 0.18s ease;
  }
  .mf-dot.chap-start::after {
    height: 9px;
    background: color-mix(in srgb, var(--paper-data) 65%, transparent);
  }
  .mf-dot.active::after {
    height: 14px; width: 2px;
    background: var(--paper-clay);
  }
  .mf-nav-row { display: flex; justify-content: space-between; align-items: center; }
  .mf-nav {
    border: none; background: transparent; cursor: pointer;
    font-family: var(--font-mono); font-size: 11px; color: var(--paper-clay);
    padding: 8px 4px; min-height: 36px;
    display: inline-flex; align-items: center;
  }
  .mf-nav:disabled { opacity: 0.26; cursor: default; }
  .mf-cpills { display: flex; align-items: center; gap: 2px; }
  .mf-cp {
    border: none; border-bottom: 1.5px solid transparent; background: transparent;
    color: var(--paper-muted); font-family: var(--font-mono); font-size: 10.5px;
    padding: 8px 9px 6px; min-height: 36px; border-radius: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color 0.16s ease, border-color 0.16s ease;
  }
  .mf-cp.active { color: var(--paper-clay); border-bottom-color: var(--paper-clay); }
}

/* ==================== ACCESSIBILITY: REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
  }
}
