/* ==========================================================================
   Toria Tries — Interactive Traveler's Journal
   Glowing espresso-brown-to-black backdrop, Louise Carmen–inspired
   reddish-brown alligator cover, and deckle-edge handmade cotton pages.
   ========================================================================== */

:root {
  --bg-void: #040302;
  --bg-espresso: #110906;
  --glow-core: rgba(142, 74, 34, 0.44);
  --glow-mid: rgba(94, 44, 19, 0.30);
  --glow-outer: rgba(36, 16, 8, 0.16);

  --ink-primary: #2d231c;
  --ink-secondary: #5c4b3d;
  --ink-muted: #8a7867;
  --accent-bronze: #c89450;
  --accent-oxblood: #6e281b;
  --suede-dark: #3b1c12;
  --suede-warm: #572b1c;

  /* Responsive book dimensions (single page width & height) */
  --page-w: min(400px, 40vw);
  --page-h: calc(var(--page-w) * 1.36);
  --leather-pad-x: 16px;
  --leather-pad-y: 14px;
}

@media (max-height: 760px) and (min-width: 641px) {
  :root {
    --page-h: min(540px, 68vh);
    --page-w: calc(var(--page-h) / 1.36);
  }
}

/* ---------- Page Backdrop (Glowing Brown Fading to Black) ---------- */

html,
body.journal-page {
  min-height: 100%;
  margin: 0;
  background-color: var(--bg-void);
  color: #e8dcc8;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  overflow-x: hidden;
}

body.journal-page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ambient-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 62% at 50% 52%, rgba(126, 63, 28, 0.34) 0%, rgba(68, 32, 14, 0.24) 36%, rgba(18, 9, 5, 0.72) 68%, #040302 100%),
    linear-gradient(180deg, #050302 0%, #0d0704 48%, #040201 100%);
}

/* Soft slow-breathing central amber-brown glow (no dots or particles) */
.ambient-backdrop::before {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(ellipse 46% 44% at 50% 52%, var(--glow-core) 0%, var(--glow-mid) 34%, var(--glow-outer) 58%, transparent 78%);
  filter: blur(28px);
  animation: glowBreathe 16s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

/* Subtle dark atmospheric edge vignette */
.ambient-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 84% 80% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.78) 100%);
}

@keyframes glowBreathe {
  0% {
    transform: scale(0.95);
    opacity: 0.78;
  }
  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ---------- Header (Translucent Dark Theme for Journal Page) ---------- */

body.journal-page .site-header {
  position: relative;
  z-index: 40;
  background: rgba(8, 5, 3, 0.56);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(200, 148, 80, 0.14);
  color: #eadfce;
  font-family: system-ui, -apple-system, sans-serif;
  padding: 0.9rem 1.75rem;
}

body.journal-page .brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f2e6d3;
}

body.journal-page .nav-list {
  gap: 1.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.journal-page .nav-list > li > a {
  color: rgba(236, 223, 204, 0.82);
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

body.journal-page .nav-list > li > a:hover,
body.journal-page .nav-list > li > a.is-active {
  color: #f7eedf;
  border-bottom-color: var(--accent-bronze);
}

body.journal-page .dropdown-menu {
  background: rgba(16, 10, 7, 0.96);
  border: 1px solid rgba(200, 148, 80, 0.22);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
  text-transform: none;
  letter-spacing: 0.01em;
}

body.journal-page .dropdown-menu a {
  color: #e6d7c1;
  padding: 0.4rem 0.65rem;
  border-radius: 5px;
}

body.journal-page .dropdown-menu a:hover {
  background: rgba(200, 148, 80, 0.14);
  color: #fff6e9;
}

/* ---------- Main Stage ---------- */

.journal-stage {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 3.5rem 1.75rem;
  user-select: none;
  -webkit-user-select: none;
}

.book-viewport {
  position: relative;
  width: calc(var(--page-w) * 2 + var(--leather-pad-x) * 2);
  height: calc(var(--page-h) + var(--leather-pad-y) * 2);
  perspective: 2400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The book shell shifts smoothly between centered closed cover & centered open spread */
.book-shell {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.book-shell.state-closed-front {
  transform: translate3d(calc(-0.5 * var(--page-w)), 0, 0);
}

.book-shell.state-open {
  transform: translate3d(0, 0, 0);
}

.book-shell.state-closed-back {
  transform: translate3d(calc(0.5 * var(--page-w)), 0, 0);
}

/* ---------- Open Leather Cover Frame (Visible Behind Open Spread) ---------- */

.open-leather-backing {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease 0.12s;
  /* Outer alligator leather rim */
  background-image:
    linear-gradient(90deg, rgba(16, 6, 3, 0.55) 0%, rgba(16, 6, 3, 0.12) 4%, transparent 12%, transparent 46%, rgba(10, 4, 2, 0.55) 50%, transparent 54%, transparent 88%, rgba(16, 6, 3, 0.15) 96%, rgba(16, 6, 3, 0.58) 100%),
    url("/journal/alligator-leather.jpg");
  background-size: cover;
  background-position: center;
  box-shadow:
    0 34px 72px rgba(0, 0, 0, 0.82),
    0 12px 26px rgba(0, 0, 0, 0.65),
    0 0 80px rgba(138, 68, 28, 0.22),
    inset 0 1px 1px rgba(255, 216, 178, 0.22),
    inset 0 -2px 6px rgba(0, 0, 0, 0.65);
}

/* Raw warm suede inner lining of the traveler's journal */
.open-leather-backing::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(114, 58, 34, 0.35), rgba(45, 21, 13, 0.92)),
    repeating-linear-gradient(135deg, rgba(255, 224, 190, 0.02) 0 2px, transparent 2px 5px),
    linear-gradient(90deg, #4d2517 0%, #633120 22%, #36170e 50%, #633120 78%, #4a2215 100%);
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 210, 170, 0.12);
}

/* Subtle folded leather crease down center spine */
.open-leather-backing::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 28px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(14, 5, 2, 0.72) 50%, transparent);
}

.book-shell.state-open .open-leather-backing {
  opacity: 1;
}

/* Spine eyelet & hanging gold charm visible peeking at upper-left spine when open too */
.open-spine-charm {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: calc(100% - 52px);
  pointer-events: none;
  z-index: 26;
  opacity: 0;
  transition: opacity 0.45s ease 0.25s;
}

.book-shell.state-open .open-spine-charm {
  opacity: 1;
}

/* Vertical dark-brown traveler's notebook elastic binding cord down the spine */
.spine-elastic-cord {
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #1b0d07 0%, #5b3422 45%, #231109 100%);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.65);
}

/* ---------- Spread Container (Deckle-Edge Handmade Paper Pages) ---------- */

.spread-container {
  position: absolute;
  top: var(--leather-pad-y);
  left: var(--leather-pad-x);
  z-index: 15;
  width: calc(var(--page-w) * 2);
  height: var(--page-h);
  transform-style: preserve-3d;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease 0.22s;
}

.book-shell.state-open .spread-container {
  opacity: 1;
  pointer-events: auto;
}

.page-slot {
  position: absolute;
  top: 0;
  width: var(--page-w);
  height: var(--page-h);
  cursor: pointer;
}

.page-slot.left-slot {
  left: 0;
}

.page-slot.right-slot {
  left: var(--page-w);
}

/* Multi-layered deckle-edge handmade paper stack underneath each side */
.paper-stack-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(15, 7, 3, 0.45));
}

.paper-stack-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/journal/handmade-paper.jpg");
  background-size: cover;
  background-position: center;
}

/* Left page underlying stack sheets peeking out with imperfect edges */
.left-slot .stack-back {
  transform: translate(-6px, 5px) rotate(-0.35deg);
  opacity: 0.88;
}
.left-slot .stack-back::before {
  background-color: #dfd4c0;
  background-blend-mode: multiply;
  clip-path: url(#deckle-left-under-b);
}

.left-slot .stack-mid {
  transform: translate(-3px, 2.5px) rotate(0.2deg);
  opacity: 0.94;
}
.left-slot .stack-mid::before {
  background-color: #ece3d2;
  background-blend-mode: multiply;
  clip-path: url(#deckle-left-under-a);
}

/* Right page underlying stack sheets peeking out with imperfect edges */
.right-slot .stack-back {
  transform: translate(6px, 5px) rotate(0.35deg);
  opacity: 0.88;
}
.right-slot .stack-back::before {
  background-color: #dfd4c0;
  background-blend-mode: multiply;
  clip-path: url(#deckle-right-under-b);
}

.right-slot .stack-mid {
  transform: translate(3px, 2.5px) rotate(-0.2deg);
  opacity: 0.94;
}
.right-slot .stack-mid::before {
  background-color: #ece3d2;
  background-blend-mode: multiply;
  clip-path: url(#deckle-right-under-a);
}

/* Active handmade paper sheet (drop-shadow wrapper so organic deckle edges cast real shadows) */
.paper-sheet-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(16, 8, 4, 0.45));
}

.paper-sheet {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #f7f1e5;
  background-image: url("/journal/handmade-paper.jpg");
  background-size: cover;
  background-position: center;
  color: var(--ink-primary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 2rem 2.15rem 1.75rem;
}

.paper-sheet.is-left {
  clip-path: url(#deckle-left);
  padding-right: 2.45rem;
  padding-left: 2rem;
}

.paper-sheet.is-right {
  clip-path: url(#deckle-right);
  padding-left: 2.45rem;
  padding-right: 2rem;
}

/* Subtle warm deckle-edge paper bevel / fiber halo */
.paper-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Center spine / gutter shadows (Hecate magazine-style soft crease) */
.paper-sheet.is-left::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58px;
  pointer-events: none;
  z-index: 5;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(62, 38, 22, 0.04) 45%,
    rgba(42, 22, 11, 0.16) 84%,
    rgba(24, 11, 5, 0.34) 100%
  );
}

.paper-sheet.is-right::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 44px;
  pointer-events: none;
  z-index: 5;
  background: linear-gradient(
    270deg,
    transparent 0%,
    rgba(62, 38, 22, 0.04) 45%,
    rgba(42, 22, 11, 0.14) 84%,
    rgba(24, 11, 5, 0.30) 100%
  );
}

/* Dynamic shadow cast onto underlying page during 3D page turn */
.cast-shadow-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  opacity: 0;
  transition: opacity 0.12s linear;
}

.left-slot .cast-shadow-overlay {
  background: linear-gradient(270deg, rgba(18, 9, 4, 0.42) 0%, rgba(18, 9, 4, 0.12) 45%, transparent 80%);
  clip-path: url(#deckle-left);
}

.right-slot .cast-shadow-overlay {
  background: linear-gradient(90deg, rgba(18, 9, 4, 0.42) 0%, rgba(18, 9, 4, 0.12) 45%, transparent 80%);
  clip-path: url(#deckle-right);
}

/* ---------- Interactive Corner-Peel Hover Effect (Hecate-style) ---------- */

.corner-curl {
  position: absolute;
  bottom: 6px;
  width: 56px;
  height: 56px;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.right-slot .corner-curl {
  right: 8px;
  transform: scale(0.45);
  transform-origin: bottom right;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  background: linear-gradient(
    315deg,
    rgba(38, 18, 9, 0.56) 0%,
    rgba(38, 18, 9, 0.24) 44%,
    #e6dac6 48%,
    #fbf6ec 62%,
    #dfd1ba 100%
  );
}

.left-slot .corner-curl {
  left: 8px;
  transform: scale(0.45);
  transform-origin: bottom left;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
  background: linear-gradient(
    45deg,
    rgba(38, 18, 9, 0.56) 0%,
    rgba(38, 18, 9, 0.24) 44%,
    #e6dac6 48%,
    #fbf6ec 62%,
    #dfd1ba 100%
  );
}

.right-slot:hover .corner-curl,
.left-slot:hover .corner-curl {
  opacity: 0.92;
  transform: scale(1);
}

/* ---------- 3D Turning Page Leaf ---------- */

.turn-leaf {
  position: absolute;
  top: 0;
  left: var(--page-w);
  width: var(--page-w);
  height: var(--page-h);
  transform-origin: left center;
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 30;
  display: none;
  will-change: transform;
}

.turn-leaf.is-active {
  display: block;
}

.turn-leaf.is-animating {
  transition: transform 0.68s cubic-bezier(0.32, 0.08, 0.24, 1);
}

.leaf-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
}

.leaf-face.leaf-back {
  transform: rotateY(180deg);
}

.leaf-lighting {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: 0;
}

.leaf-front .leaf-lighting {
  background: linear-gradient(90deg, rgba(24, 11, 5, 0.35) 0%, rgba(255, 245, 225, 0.16) 40%, rgba(16, 7, 3, 0.45) 100%);
  clip-path: url(#deckle-right);
}

.leaf-back .leaf-lighting {
  background: linear-gradient(270deg, rgba(24, 11, 5, 0.35) 0%, rgba(255, 245, 225, 0.18) 40%, rgba(16, 7, 3, 0.42) 100%);
  clip-path: url(#deckle-left);
}

/* ==========================================================================
   CLOSED FRONT COVER — Louise Carmen Paris Reddish-Brown Alligator Journal
   ========================================================================== */

.front-cover-leaf {
  position: absolute;
  top: 0;
  left: calc(var(--page-w) + var(--leather-pad-x));
  width: calc(var(--page-w) + var(--leather-pad-x));
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  z-index: 35;
  opacity: 1;
  cursor: pointer;
  transition:
    transform 0.85s cubic-bezier(0.28, 0.1, 0.22, 1),
    opacity 0.18s ease 0s;
}

.book-shell.state-open .front-cover-leaf,
.book-shell.state-closed-back .front-cover-leaf {
  transform: rotateY(-180deg);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.85s cubic-bezier(0.28, 0.1, 0.22, 1),
    opacity 0.22s ease 0.42s;
}

/* Subtle inviting hover lift when closed */
.book-shell.state-closed-front .front-cover-leaf:hover .cover-front-face {
  transform: translateY(-3px);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.88),
    0 16px 32px rgba(0, 0, 0, 0.72),
    0 0 95px rgba(154, 78, 32, 0.32);
}

.cover-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Front exterior of the Louise Carmen alligator traveler's journal */
.cover-front-face {
  border-radius: 14px 28px 28px 14px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  box-shadow:
    0 34px 72px rgba(0, 0, 0, 0.86),
    0 14px 28px rgba(0, 0, 0, 0.7),
    0 0 75px rgba(138, 66, 26, 0.24);
  overflow: visible;
}

/* Thick raw-leather & peeking off-white deckle paper pages along bottom & right edge */
.cover-page-block {
  position: absolute;
  top: 10px;
  right: -7px;
  bottom: -6px;
  left: 16px;
  border-radius: 8px 22px 24px 12px;
  background:
    repeating-linear-gradient(
      90deg,
      #ebe2d1 0 1.5px,
      #d6cab5 1.5px 3px
    );
  border-bottom: 5px solid #4d2618;
  border-right: 4px solid #3f1d11;
  box-shadow:
    inset -2px -2px 5px rgba(32, 14, 7, 0.45),
    0 8px 18px rgba(0, 0, 0, 0.65);
  z-index: 0;
}

/* Under-layer alligator leather body (spine + left exposed strip) */
.cover-leather-base {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 14px 28px 28px 14px;
  background-color: #4a1e10;
  background-image:
    /* Curved spine lighting & warm glossy leather specular sheen */
    linear-gradient(
      90deg,
      rgba(22, 8, 4, 0.72) 0%,
      rgba(255, 198, 150, 0.14) 5.5%,
      rgba(20, 7, 3, 0.35) 11%,
      rgba(255, 206, 162, 0.08) 24%,
      rgba(16, 6, 3, 0.26) 42%,
      rgba(10, 4, 2, 0.15) 100%
    ),
    radial-gradient(ellipse 90% 55% at 72% 24%, rgba(255, 204, 150, 0.16), transparent 62%),
    url("/journal/alligator-leather.jpg");
  background-size: cover;
  background-position: left center;
  box-shadow:
    inset 2px 1px 2px rgba(255, 212, 175, 0.22),
    inset -2px -2px 6px rgba(12, 4, 2, 0.72);
  overflow: hidden;
}

/* Signature Louise Carmen trifold wrap-over front flap with rounded corners */
.cover-trifold-flap {
  position: absolute;
  top: 2px;
  bottom: 2px;
  right: 0;
  left: 31%;
  z-index: 3;
  border-radius: 30px 26px 26px 30px;
  transform-origin: right center;
  transition: transform 0.48s cubic-bezier(0.32, 0.08, 0.22, 1), opacity 0.35s ease;
  background-color: #532212;
  background-image:
    linear-gradient(
      115deg,
      rgba(255, 218, 178, 0.16) 0%,
      rgba(255, 198, 148, 0.04) 24%,
      rgba(18, 6, 2, 0.08) 54%,
      rgba(14, 5, 2, 0.45) 100%
    ),
    radial-gradient(ellipse 65% 40% at 62% 22%, rgba(255, 224, 182, 0.18), transparent 66%),
    url("/journal/alligator-leather.jpg");
  background-size: cover;
  background-position: right center;
  box-shadow:
    -7px 0 18px rgba(10, 4, 2, 0.72),
    -2px 0 4px rgba(14, 5, 2, 0.65),
    inset 1.5px 1px 2px rgba(255, 216, 176, 0.28),
    inset -3px -2px 8px rgba(14, 5, 2, 0.68);
}

/* Subtle dark-stitch / burnished edge highlight on the flap curve */
.cover-trifold-flap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border-left: 1px solid rgba(255, 210, 168, 0.22);
  pointer-events: none;
}

/* Unwrapping animation state right before cover flips open */
.book-shell.is-unwrapping .cover-trifold-flap {
  transform: rotateY(22deg) translateX(6px);
}

/* Subtle embossed gold-blind monogram/hint near bottom-right of cover (whisper quiet) */
.cover-deboss-title {
  position: absolute;
  bottom: 24px;
  right: 26px;
  text-align: right;
  pointer-events: none;
}

.cover-deboss-title span {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(235, 196, 146, 0.48);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

/* Horizontal elastic wrap band strapped around the closed journal */
.cover-elastic-wrap {
  position: absolute;
  top: 50%;
  left: -4px;
  right: -4px;
  height: 11px;
  transform: translateY(-50%);
  z-index: 6;
  pointer-events: none;
  transition: transform 0.38s cubic-bezier(0.32, 0.08, 0.22, 1), opacity 0.32s ease;
}

.book-shell.is-unwrapping .cover-elastic-wrap,
.book-shell.state-open .cover-elastic-wrap {
  transform: translateY(-50%) translateX(52px);
  opacity: 0;
}

/* Double-cord dark-chocolate leather elastic strap */
.elastic-cord-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5d3626 0%, #2c160d 55%, #160904 100%);
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.78),
    0 1px 1px rgba(0, 0, 0, 0.65);
}

.elastic-cord-line.top-strand {
  top: 0;
}

.elastic-cord-line.bottom-strand {
  bottom: 1px;
  height: 3.5px;
  opacity: 0.92;
}

/* Center elastic band charm cluster (pearl, olive cabochon, gold chili pepper, baguette jewel) */
.band-charms-cluster {
  position: absolute;
  top: 2px;
  left: 52%;
  width: 148px;
  height: 64px;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.78));
  overflow: visible;
}

/* Spine brass eyelet & beaded traveler + nature charms string at upper-left spine */
.spine-eyelet-top {
  position: absolute;
  top: 20px;
  left: -50px;
  width: 98px;
  height: 156px;
  z-index: 8;
  pointer-events: none;
  transform-origin: 54px 14px;
  filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.78));
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: visible;
}

.book-shell.state-closed-front .front-cover-leaf:hover .spine-eyelet-top {
  transform: rotate(4deg);
}

.spine-eyelet-bottom {
  position: absolute;
  bottom: 24px;
  left: -3px;
  width: 14px;
  height: 22px;
  z-index: 7;
  pointer-events: none;
}

/* Inside face of front cover (seen briefly while flipping open) */
.cover-inside-face {
  transform: rotateY(180deg);
  border-radius: 28px 14px 14px 28px;
  background:
    radial-gradient(ellipse at 50% 50%, #5c2d1d, #36170e);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.65);
}

/* ==========================================================================
   CLOSED BACK COVER (When flipping past the last spread)
   ========================================================================== */

.back-cover-leaf {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--page-w) + var(--leather-pad-x));
  height: 100%;
  transform-origin: right center;
  transform-style: preserve-3d;
  z-index: 34;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.75s cubic-bezier(0.28, 0.1, 0.22, 1);
}

.book-shell.state-closed-back .back-cover-leaf {
  opacity: 1;
  pointer-events: auto;
}

.back-cover-surface {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px 14px 14px 28px;
  background-color: #4a1e10;
  background-image:
    linear-gradient(
      270deg,
      rgba(22, 8, 4, 0.72) 0%,
      rgba(255, 198, 150, 0.14) 5.5%,
      rgba(20, 7, 3, 0.35) 11%,
      rgba(255, 206, 162, 0.06) 35%,
      rgba(10, 4, 2, 0.32) 100%
    ),
    url("/journal/alligator-leather.jpg");
  background-size: cover;
  background-position: right center;
  box-shadow:
    0 34px 72px rgba(0, 0, 0, 0.86),
    0 14px 28px rgba(0, 0, 0, 0.7),
    0 0 75px rgba(138, 66, 26, 0.24),
    inset 1px 1px 2px rgba(255, 212, 175, 0.22);
}

.back-cover-colophon {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(235, 196, 146, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   JOURNAL PAGE TYPOGRAPHY & EDITORIAL LAYOUT (Inside Handmade Paper Pages)
   ========================================================================== */

.page-inner {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(110, 82, 58, 0.22);
}

.page-chapter {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

.page-date {
  font-family: "Caveat", cursive;
  font-size: 1.08rem;
  color: var(--accent-oxblood);
  letter-spacing: 0.02em;
}

.page-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2vw, 1.78rem);
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink-primary);
  margin: 0.2rem 0 0.7rem;
}

.page-subtitle {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-secondary);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.page-body {
  font-size: clamp(0.9rem, 1.15vw, 1.02rem);
  line-height: 1.62;
  color: var(--ink-primary);
  flex: 1;
}

.page-body p {
  margin: 0 0 0.8rem;
}

.page-body p:last-child {
  margin-bottom: 0;
}

.handwritten-note {
  font-family: "Caveat", cursive;
  font-size: 1.18rem;
  line-height: 1.35;
  color: #5b3324;
  margin: 0.85rem 0;
  padding-left: 0.85rem;
  border-left: 2px solid rgba(140, 72, 42, 0.35);
}

/* Title page / Cover leaf styling */
.title-page-layout {
  justify-content: center;
  text-align: center;
  padding: 0.3rem 0.35rem 0;
}

.title-ornament {
  width: 64px;
  height: 18px;
  margin: 0 auto 0.75rem;
  color: rgba(110, 56, 32, 0.65);
}

.title-main {
  font-size: clamp(1.7rem, 2.45vw, 2.3rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.08;
  margin: 0 0 0.25rem;
  color: var(--ink-primary);
}

.title-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.title-divider {
  width: 54px;
  height: 1px;
  background: rgba(110, 74, 48, 0.36);
  margin: 0.75rem auto 0.85rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 268px;
  text-align: left;
}

.toc-list li {
  margin: 0.14rem 0;
}

.toc-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px dotted rgba(110, 82, 58, 0.32);
  padding: 0.19rem 0.1rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(0.9rem, 1.08vw, 1.02rem);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.toc-link:hover {
  color: var(--accent-oxblood);
  border-bottom-color: var(--accent-oxblood);
  transform: translateX(2px);
}

.toc-page-num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(0.82rem, 0.95vw, 0.92rem);
  color: var(--ink-muted);
}

/* ==========================================================================
   INSIDE FRONT COVER — Stitched Alligator Leather Pockets (Spread 0 Left)
   ========================================================================== */

.left-slot.is-leather-inside .paper-stack-layer,
.left-slot.is-leather-inside .corner-curl {
  display: none !important;
}

.left-slot.is-leather-inside .paper-sheet-wrap {
  filter: none;
}

.left-slot.is-leather-inside .paper-sheet.is-left {
  clip-path: none;
  background: transparent;
  padding: 0;
  border-radius: 12px 0 0 12px;
  overflow: hidden;
}

.left-slot.is-leather-inside .paper-sheet.is-left::after {
  width: 34px;
  background: linear-gradient(90deg, transparent 0%, rgba(12, 4, 2, 0.45) 100%);
}

.leather-pocket-panel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px 2px 2px 12px;
  background-color: #3f180e;
  background-image:
    linear-gradient(125deg, rgba(255, 206, 165, 0.1) 0%, rgba(16, 5, 2, 0.25) 55%, rgba(12, 4, 2, 0.65) 100%),
    url("/journal/alligator-leather.jpg");
  background-size: cover;
  background-position: left center;
  box-shadow:
    inset 1.5px 1.5px 2px rgba(255, 210, 175, 0.2),
    inset -8px 0 18px rgba(10, 3, 1, 0.6);
  overflow: hidden;
  padding: 12px 12px 12px 10px;
}

/* Full-height vertical secretary slip pocket along inner-right edge */
.pocket-side-strip {
  position: absolute;
  top: 7%;
  bottom: 7%;
  right: 7%;
  width: 19%;
  z-index: 2;
  background: #f5f2eb;
  border-radius: 2px;
  box-shadow:
    0 3px 10px rgba(8, 3, 1, 0.55),
    inset 0 0 0 1px rgba(40, 26, 18, 0.14);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: rotate(0.6deg);
  transition: transform 0.25s ease;
}

.pocket-side-strip:hover {
  transform: translateX(3px) rotate(0.6deg);
}

.strip-frame {
  flex: 1;
  border-radius: 1px;
  filter: grayscale(100%) contrast(1.06);
  opacity: 0.88;
}

.strip-frame.f1 {
  background:
    radial-gradient(circle at 60% 34%, #d9d5ce 0%, #98938b 42%, #4a453e 100%);
}
.strip-frame.f2 {
  background:
    linear-gradient(180deg, #b8b2a8 0%, #837d74 52%, #3a3631 53%, #2b2723 100%);
}
.strip-frame.f3 {
  background:
    linear-gradient(155deg, #ccc7be 0%, #6f6a62 58%, #34302b 100%);
}
.strip-frame.f4 {
  background:
    linear-gradient(195deg, #bfb9af 0%, #7d776d 46%, #403b35 100%);
}

/* Leather secretary pocket cover holding the vertical photo strip */
.pocket-side-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 75%;
  z-index: 3;
  border-right: 1.5px solid rgba(18, 6, 3, 0.82);
  border-radius: 12px 0 0 12px;
  background-color: #461c10;
  background-image:
    linear-gradient(90deg, rgba(255, 206, 165, 0.08) 0%, rgba(18, 6, 2, 0.14) 84%, rgba(10, 3, 1, 0.55) 100%),
    url("/journal/alligator-leather.jpg");
  background-size: cover;
  background-position: 35% center;
  box-shadow:
    6px 0 14px rgba(8, 2, 1, 0.62),
    inset -2px 0 2px rgba(255, 210, 172, 0.16);
}

/* Subtle stitched border detail on leather pockets */
.pocket-side-overlay::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: 5px;
  width: 0;
  border-right: 1px dashed rgba(215, 166, 126, 0.24);
  pointer-events: none;
}

/* Stacked card pocket column on the left 75% */
.pocket-stack {
  position: relative;
  z-index: 4;
  width: 73%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 5% 6% 4% 5%;
}

.pocket-tier {
  position: relative;
  width: 100%;
}

.pocket-tier.tier-1 {
  height: 22%;
  z-index: 5;
}

.pocket-tier.tier-2 {
  height: 21%;
  z-index: 7;
}

.pocket-tier.tier-3 {
  height: 20%;
  z-index: 9;
}

.pocket-tier.tier-4 {
  height: 37%;
  z-index: 11;
}

/* Stitched alligator leather slot lip below each tucked card */
.leather-slot-lip {
  position: absolute;
  left: -9%;
  right: -9%;
  bottom: -6px;
  height: 44%;
  background-color: #471c10;
  background-image:
    linear-gradient(180deg, rgba(255, 212, 175, 0.16) 0%, rgba(20, 6, 2, 0.1) 18%, rgba(12, 4, 2, 0.42) 100%),
    url("/journal/alligator-leather.jpg");
  background-size: cover;
  background-position: center;
  border-top: 1px solid rgba(240, 192, 152, 0.22);
  box-shadow:
    0 -4px 10px rgba(8, 2, 1, 0.58),
    inset 0 2px 3px rgba(255, 214, 178, 0.14);
  pointer-events: none;
}

.leather-slot-lip::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  right: 8px;
  border-top: 1px dashed rgba(215, 166, 126, 0.22);
}

.tier-4 .leather-slot-lip {
  height: 76%;
  bottom: -14px;
  border-radius: 0 0 8px 8px;
}

/* Tucked insert cards */
.pocket-card {
  position: relative;
  width: 100%;
  background: #faf7f0;
  color: #241c17;
  border-radius: 2px;
  box-shadow:
    0 3px 10px rgba(10, 3, 1, 0.45),
    0 1px 2px rgba(10, 3, 1, 0.35);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.pocket-tier:hover .pocket-card {
  transform: translateY(-4px);
}

/* Card 1: "Summer 2026" */
.card-belongs {
  height: 92%;
  padding: 0.35rem 0.65rem 1.05rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-belongs-script {
  font-family: "Caveat", cursive;
  font-size: clamp(1.18rem, 1.55vw, 1.48rem);
  line-height: 1;
  color: #463c36;
}

.card-belongs-sub {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #3f3833;
  margin-top: 0.18rem;
}

/* Card 2: Dark-header CHECKLIST card */
.card-checklist {
  height: 92%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-checklist-head {
  background: #1a1513;
  color: #f4eee4;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.56rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.34rem 0.4rem;
}

.card-checklist-rows {
  padding: 0.32rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.card-check-row {
  height: 6px;
  border-radius: 1px;
  background: linear-gradient(90deg, rgba(35, 28, 24, 0.14) 0%, rgba(35, 28, 24, 0.08) 78%, transparent 100%);
}

/* Card 3: Vintage monochrome postcard peek */
.card-snapshot {
  height: 92%;
  padding: 3px;
  background: #f3efe6;
}

.card-snapshot-img {
  width: 100%;
  height: 100%;
  background:
    /* Subtle architectural/highway monochrome silhouette */
    linear-gradient(180deg, #b9b5ae 0%, #8e8a83 45%, #46433e 46%, #2c2926 100%);
  position: relative;
  overflow: hidden;
}

.card-snapshot-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.16) 0 8px, transparent 8px 18px),
    linear-gradient(160deg, transparent 48%, rgba(20, 18, 16, 0.55) 75%);
}

/* Card 4: Front square statement card with elongated gold paperclip */
.card-statement {
  position: relative;
  z-index: 12;
  width: 86%;
  margin: 4% auto 0;
  aspect-ratio: 1 / 0.94;
  background: #fbfaf7;
  border: 1.5px solid #231e1b;
  padding: 1.15rem 0.6rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow:
    0 8px 20px rgba(8, 2, 1, 0.58),
    0 2px 4px rgba(8, 2, 1, 0.42);
}

.card-statement-big {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 500;
  font-size: clamp(0.95rem, 1.35vw, 1.3rem);
  letter-spacing: 0.12em;
  line-height: 1.28;
  color: #161311;
  text-transform: uppercase;
}

.card-statement-sub {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4b433d;
  margin-top: 0.35rem;
}

/* Dainty gold metal paperclips matching reference photo */
.gold-clip {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(10, 4, 1, 0.45));
  z-index: 14;
}

.gold-clip.clip-left {
  top: -7px;
  left: 10%;
  width: 24px;
  height: 28px;
  transform: rotate(-10deg);
}

.gold-clip.clip-right {
  top: -7px;
  right: 10%;
  width: 24px;
  height: 28px;
  transform: rotate(12deg);
}

.gold-clip.clip-oval {
  top: -18px;
  left: 50%;
  width: 30px;
  height: 46px;
  transform: translateX(-50%) rotate(-3deg);
}

/* Ex-libris / Inside front cover bookplate */
.bookplate-frame {
  border: 1px solid rgba(110, 82, 58, 0.32);
  padding: 1.35rem 1.15rem;
  margin: auto 0.25rem;
  text-align: center;
  position: relative;
}

.bookplate-frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(110, 82, 58, 0.18);
  pointer-events: none;
}

.bookplate-label {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}

.bookplate-name {
  font-family: "Caveat", cursive;
  font-size: 1.75rem;
  color: var(--ink-primary);
  margin: 0.15rem 0 0.6rem;
}

.bookplate-quote {
  font-style: italic;
  font-size: 0.94rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin: 0.6rem 0 0;
}

/* Polaroid / taped snapshot frame for road trip photos */
.photo-card {
  position: relative;
  background: #fbf8f1;
  padding: 0.6rem 0.6rem 1.75rem;
  margin: 0.45rem auto 0.9rem;
  width: 88%;
  box-shadow:
    0 5px 14px rgba(45, 28, 16, 0.18),
    0 1px 2px rgba(45, 28, 16, 0.12);
  transform: rotate(-1.4deg);
}

.photo-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 64px;
  height: 18px;
  transform: translateX(-50%) rotate(2deg);
  background: rgba(226, 206, 168, 0.68);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.photo-frame {
  aspect-ratio: 4 / 3;
  width: 100%;
  background:
    linear-gradient(155deg, #d7c3a8 0%, #b39273 48%, #77553e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 248, 236, 0.88);
  text-align: center;
  padding: 0.75rem;
  overflow: hidden;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-placeholder-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  opacity: 0.85;
}

.photo-placeholder-text {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.photo-caption {
  font-family: "Caveat", cursive;
  font-size: 1.08rem;
  color: var(--ink-secondary);
  text-align: center;
  margin-top: 0.45rem;
}

/* Stops & favorites list */
.stops-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}

.stops-list li {
  padding: 0.48rem 0;
  border-bottom: 1px dashed rgba(110, 82, 58, 0.24);
}

.stops-list li:last-child {
  border-bottom: none;
}

.stop-name {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-primary);
}

.stop-detail {
  display: block;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-secondary);
}

/* Lined open notes page */
.lined-notes {
  flex: 1;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 27px,
    rgba(116, 88, 64, 0.17) 27px,
    rgba(116, 88, 64, 0.17) 28px
  );
  padding-top: 0.25rem;
}

.lined-notes p {
  font-family: "Caveat", cursive;
  font-size: 1.18rem;
  line-height: 28px;
  color: #5b3a29;
  margin: 0;
}

/* Subtle Hecate-inspired circled folio number at bottom center */
.page-footer {
  margin-top: auto;
  padding-top: 0.55rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-folio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(110, 82, 58, 0.34);
  font-size: 0.74rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* ==========================================================================
   MINIMAL HECATE-STYLE NAVIGATION CONTROLS
   ========================================================================== */

.nav-edge-btn {
  position: fixed;
  top: 52%;
  transform: translateY(-50%);
  z-index: 30;
  width: 46px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 10, 6, 0.38);
  border: 1px solid rgba(200, 148, 80, 0.2);
  border-radius: 999px;
  color: rgba(236, 214, 182, 0.78);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.25s ease, transform 0.2s ease;
}

.nav-edge-btn:hover:not(:disabled) {
  background: rgba(94, 46, 22, 0.55);
  border-color: rgba(200, 148, 80, 0.52);
  color: #fff5e6;
  transform: translateY(-50%) scale(1.06);
}

.nav-edge-btn:disabled {
  opacity: 0.16;
  cursor: default;
}

.nav-edge-btn.prev-btn {
  left: 1.15rem;
}

.nav-edge-btn.next-btn {
  right: 1.15rem;
}

/* Subtle bottom control strip (First | Page indicator | Last) */
.journal-controls-bar {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.35rem;
  font-family: system-ui, -apple-system, sans-serif;
}

.shortcut-btn {
  background: none;
  border: 1px solid rgba(200, 148, 80, 0.18);
  border-radius: 999px;
  color: rgba(226, 202, 168, 0.7);
  padding: 0.3rem 0.72rem;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shortcut-btn:hover:not(:disabled) {
  border-color: rgba(200, 148, 80, 0.5);
  color: #f8ecd9;
  background: rgba(120, 62, 28, 0.26);
}

.shortcut-btn:disabled {
  opacity: 0.22;
  cursor: default;
}

.journal-status {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 0.96rem;
  color: rgba(218, 194, 162, 0.72);
  min-width: 175px;
  text-align: center;
}

/* ==========================================================================
   MOBILE / NARROW VIEWPORT (Single-Page Tactile View)
   ========================================================================== */

@media (max-width: 960px) and (min-width: 641px) {
  .journal-stage {
    padding: 1.15rem 2.75rem 1.4rem;
  }

  .paper-sheet {
    padding: 1.45rem 1.4rem 1.25rem;
  }

  .paper-sheet.is-left {
    padding-right: 1.65rem;
  }

  .paper-sheet.is-right {
    padding-left: 1.65rem;
  }

  .page-body {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .handwritten-note {
    font-size: 1.02rem;
    margin: 0.55rem 0;
  }

  .nav-edge-btn {
    width: 36px;
    height: 44px;
    font-size: 1.35rem;
  }

  .nav-edge-btn.prev-btn {
    left: 0.55rem;
  }

  .nav-edge-btn.next-btn {
    right: 0.55rem;
  }
}

@media (max-width: 640px) {
  :root {
    --page-w: min(350px, 84vw);
    --page-h: calc(var(--page-w) * 1.38);
    --leather-pad-x: 12px;
    --leather-pad-y: 12px;
  }

  .journal-stage {
    padding: 1.25rem 1rem 1.5rem;
  }

  .book-viewport {
    width: calc(var(--page-w) + var(--leather-pad-x) * 2);
    height: calc(var(--page-h) + var(--leather-pad-y) * 2);
  }

  .book-shell.state-closed-front,
  .book-shell.state-open,
  .book-shell.state-closed-back {
    transform: translate3d(0, 0, 0);
  }

  .front-cover-leaf {
    left: 0;
    width: 100%;
  }

  .back-cover-leaf {
    left: 0;
    width: 100%;
  }

  .spread-container {
    width: var(--page-w);
  }

  .page-slot.left-slot,
  .page-slot.right-slot {
    left: 0;
  }

  /* On narrow screens show one handmade page at a time */
  .mobile-hidden {
    display: none !important;
  }

  .turn-leaf {
    left: 0;
  }

  .open-spine-charm {
    left: 8px;
  }

  .paper-sheet {
    padding: 1.5rem 1.45rem 1.35rem;
  }

  .nav-edge-btn {
    width: 38px;
    height: 44px;
    font-size: 1.35rem;
    top: auto;
    bottom: 0.95rem;
    transform: none;
  }

  .nav-edge-btn:hover:not(:disabled) {
    transform: scale(1.05);
  }

  .nav-edge-btn.prev-btn {
    left: 0.75rem;
  }

  .nav-edge-btn.next-btn {
    right: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-backdrop::before {
    animation: none;
  }
  .book-shell,
  .front-cover-leaf,
  .turn-leaf,
  .cover-trifold-flap,
  .cover-elastic-wrap {
    transition-duration: 0.01ms !important;
  }
}
