/* ==========================================================================
   Storygate Letters — Immersive Living Storybook World ("Inside Narven")
   Designed as a physical journey: Orchard Gate -> Field Desk -> Map Wall ->
   Archive Shelf -> Village Post Office. Zero SaaS template patterns.
   ========================================================================== */

:root {
  --wood-dark: #1d1712;
  --wood-mid: #282019;
  --wood-grain: #342920;
  --parchment: #f4ecdc;
  --parchment-deep: #e8dcc4;
  --linen: #fbf7ef;
  --ink-deep: #221c17;
  --ink-warm: #53493e;
  --ink-muted: #827668;
  --wax-red: #8e3326;
  --wax-red-dark: #682117;
  --brass: #b88c4a;
  --brass-bright: #e0b76d;
  --moss: #2c4335;
  --moss-deep: #1e3025;
}

body.story-world {
  background-color: var(--linen);
  color: var(--ink-deep);
  overflow-x: hidden;
  position: relative;
}

/* Subtle cotton-paper grain overlay across the entire world */
body.story-world::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   FLOATING BOOKPLATE COMPASS BAR (Replaces generic SaaS navbar)
   -------------------------------------------------------------------------- */
.compass-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
  border-bottom: 1px solid transparent;
}

.compass-bar.is-scrolled {
  background: rgba(29, 23, 18, 0.9);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(184, 140, 74, 0.25);
  padding: 11px 28px;
}

.compass-brand {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: #fbf7ef;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.compass-brand em {
  color: var(--brass-bright);
  font-style: italic;
}

.chapter-bookmarks {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-serif);
  font-size: 13.5px;
  color: rgba(251, 247, 239, 0.78);
}

.chapter-bookmarks a {
  position: relative;
  padding: 4px 2px;
  transition: color 0.2s ease;
}

.chapter-bookmarks a:hover,
.chapter-bookmarks a.is-active {
  color: var(--brass-bright);
}

.chapter-bookmarks a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--brass-bright);
}

.compass-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.postmark-chip {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(251, 247, 239, 0.85);
  border: 1px dashed rgba(224, 183, 109, 0.55);
  padding: 5px 10px;
  border-radius: 2px;
}

.stamp-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--wax-red);
  color: #fbf7ef;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 9px 16px;
  border: 1px solid rgba(251, 247, 239, 0.28);
  border-radius: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.stamp-cta:hover {
  background: var(--wax-red-dark);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   CHAPTER I: THE ORCHARD GATE PORTAL (100svh Living Opening Scene)
   -------------------------------------------------------------------------- */
.gate-portal {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #1a1510;
}

.gate-backdrop {
  position: absolute;
  inset: -24px;
  background-image: url('/images/orchard-gate.jpg');
  background-size: cover;
  background-position: center 45%;
  transition: transform 0.25s ease-out;
  will-change: transform;
}

/* Soft storybook lighting vignette — keeps the painted valley & gatepost envelope crystal clear */
.gate-portal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 16, 11, 0.82) 0%, rgba(20, 16, 11, 0.48) 44%, rgba(20, 16, 11, 0.08) 76%, rgba(20, 16, 11, 0.22) 100%),
    linear-gradient(0deg, rgba(22, 17, 13, 0.88) 0%, rgba(22, 17, 13, 0.12) 38%, rgba(22, 17, 13, 0.38) 100%);
}

#hero-motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* Clickable wax-seal shimmer sitting right over the painted envelope on the stone gatepost */
.gatepost-hotspot {
  position: absolute;
  right: 19%;
  bottom: 20%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #fbf7ef;
  text-decoration: none;
}

.gatepost-ring {
  width: 66px;
  height: 68px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(224, 183, 109, 0.7);
  animation: gatePulse 2.6s infinite;
  transition: transform 0.22s ease;
}

.gatepost-ring img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.65));
}

.gatepost-hotspot:hover .gatepost-ring {
  transform: scale(1.12) rotate(-5deg);
}

.gatepost-note {
  font-family: var(--font-hand);
  font-size: 20px;
  color: #fbf7ef;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  background: rgba(24, 18, 13, 0.62);
  padding: 2px 11px;
  border-radius: 3px;
  border: 1px solid rgba(224, 183, 109, 0.35);
  white-space: nowrap;
}

@keyframes gatePulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 183, 109, 0.65); }
  70% { box-shadow: 0 0 0 22px rgba(224, 183, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 183, 109, 0); }
}

.gate-story-opening {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 130px 28px 88px;
}

.gate-whisper {
  font-family: var(--font-hand);
  font-size: clamp(23px, 2.8vw, 31px);
  color: var(--brass-bright);
  margin: 0 0 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.gate-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.4vw, 78px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.015em;
  color: #fbf7ef;
  max-width: 650px;
  margin: 0 0 20px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.gate-title em {
  font-style: italic;
  color: #f4d8a8;
}

.gate-prose {
  font-family: var(--font-serif);
  font-size: clamp(17.5px, 1.9vw, 21px);
  line-height: 1.55;
  color: rgba(251, 247, 239, 0.92);
  max-width: 530px;
  margin: 0 0 30px;
}

.gate-doors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.door-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--linen);
  color: var(--ink-deep);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 26px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.door-primary:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.door-ghost {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: #f4e8d2;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(244, 232, 210, 0.55);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.door-ghost:hover {
  color: var(--brass-bright);
  border-color: var(--brass-bright);
}

.gate-footnote {
  margin-top: 34px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(251, 247, 239, 0.68);
}

/* Torn deckle-paper divider */
.deckle-divider {
  display: block;
  width: 100%;
  height: 36px;
  margin-top: -35px;
  position: relative;
  z-index: 8;
}

/* --------------------------------------------------------------------------
   CHAPTER II: MILO & TESSA'S FIELD DESK (Dark Aged Walnut Table)
   -------------------------------------------------------------------------- */
.field-desk {
  position: relative;
  background:
    radial-gradient(ellipse at 65% 22%, rgba(196, 146, 78, 0.16) 0%, transparent 56%),
    radial-gradient(ellipse at 20% 80%, rgba(142, 51, 38, 0.12) 0%, transparent 50%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 235, 200, 0.015) 0px,
      rgba(255, 235, 200, 0.015) 2px,
      transparent 2px,
      transparent 14px
    ),
    linear-gradient(180deg, #211a14 0%, #2a2119 52%, #1d1712 100%);
  color: #f5ede0;
  padding: 78px 0 96px;
}

.desk-chapter-tag {
  font-family: var(--font-hand);
  font-size: 25px;
  color: var(--brass-bright);
  margin-bottom: 6px;
}

.desk-heading {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 500;
  line-height: 1.06;
  color: #fbf7ef;
  margin: 0 0 12px;
}

.desk-heading em {
  font-style: italic;
  color: #e6c489;
}

.desk-intro {
  font-family: var(--font-serif);
  font-size: 18px;
  color: rgba(245, 237, 224, 0.8);
  max-width: 640px;
  margin: 0 0 42px;
}

.desk-surface {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 44px;
  align-items: start;
}

/* Left Column: Taped Polaroid/Watercolor + Handwritten Sticky Notes + Flippable Postcard */
.desk-artifacts {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.taped-portrait {
  position: relative;
  background: #f9f4e8;
  padding: 12px 12px 22px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  transform: rotate(-1.6deg);
  transition: transform 0.3s ease;
}

.taped-portrait:hover {
  transform: rotate(-0.4deg);
}

.taped-portrait img {
  width: 100%;
  display: block;
}

.masking-tape {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%) rotate(2.5deg);
  width: 112px;
  height: 26px;
  background: rgba(236, 224, 194, 0.72);
  border-left: 1px dashed rgba(120, 100, 70, 0.25);
  border-right: 1px dashed rgba(120, 100, 70, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.portrait-caption {
  font-family: var(--font-hand);
  font-size: 21px;
  color: var(--ink-deep);
  text-align: center;
  margin-top: 10px;
  line-height: 1.2;
}

.margin-notes-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.desk-scrap-note {
  background: #f5ebd4;
  color: var(--ink-deep);
  padding: 16px 16px 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
  border-top: 3px solid var(--brass);
  position: relative;
}

.desk-scrap-note.tessa-note {
  transform: rotate(1.1deg);
  border-top-color: var(--wax-red);
}

.desk-scrap-note.milo-note {
  transform: rotate(-1.2deg);
  border-top-color: var(--moss);
}

.scrap-who {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.scrap-hand {
  font-family: var(--font-hand);
  font-size: 20px;
  line-height: 1.24;
  color: var(--ink-deep);
}

/* Flippable Postcard sitting on the dark wood desk */
.desk-postcard-wrap {
  transform: rotate(1deg);
}

.desk-postcard-label {
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--brass-bright);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desk-postcard-wrap .flip-scene {
  width: 100%;
  max-width: 100%;
  height: 290px;
  margin: 0;
  perspective: 1100px;
  cursor: pointer;
}

.desk-postcard-wrap .flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.55);
}

.desk-postcard-wrap .flip-card.is-flipped {
  transform: rotateY(180deg);
}

.desk-postcard-wrap .flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 3px;
  overflow: hidden;
}

.desk-postcard-wrap .flip-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desk-postcard-wrap .flip-back {
  transform: rotateY(180deg);
  background: #faf3e4;
  color: var(--ink-deep);
  padding: 20px 22px;
  border: 6px solid #ede2cb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

/* Right Column: Antique Brass Grade Tabs + Living Envelope + Cipher Scrap */
.desk-stationery-mat {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brass-tabs-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 237, 224, 0.7);
  margin-bottom: 8px;
}

.brass-grade-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.brass-tab {
  background: rgba(251, 247, 239, 0.06);
  color: rgba(251, 247, 239, 0.8);
  border: 1px solid rgba(184, 140, 74, 0.34);
  padding: 8px 14px;
  font-family: var(--font-serif);
  font-size: 14.5px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.brass-tab:hover {
  border-color: var(--brass-bright);
  color: #ffffff;
}

.brass-tab.active {
  background: var(--parchment);
  color: var(--ink-deep);
  border-color: var(--brass-bright);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Living Cotton Envelope on the Desk */
.desk-envelope {
  position: relative;
  background: linear-gradient(160deg, #faf4e7 0%, #efe5cf 100%);
  color: var(--ink-deep);
  padding: 44px 36px 40px;
  border: 1px solid #d5c4a4;
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 0 8px rgba(255, 255, 255, 0.38);
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.desk-envelope:hover {
  transform: translateY(-2px);
}

.desk-envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110px;
  border-bottom: 1px solid rgba(130, 110, 82, 0.25);
  background: linear-gradient(180deg, rgba(166, 127, 67, 0.08) 0%, transparent 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
}

.envelope-postmark {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1.5px dashed rgba(142, 51, 38, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(142, 51, 38, 0.72);
  transform: rotate(12deg);
  pointer-events: none;
}

.desk-name-input {
  font-family: var(--font-hand);
  font-size: 38px;
  color: var(--ink-deep);
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed var(--brass);
  text-align: center;
  width: 240px;
  max-width: 100%;
  padding: 2px 8px;
  outline: none;
}

.desk-name-input:focus {
  border-bottom-color: var(--wax-red);
}

.desk-wax-seal {
  width: 112px;
  height: 116px;
  margin: 18px auto 12px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), filter 0.24s ease;
  filter: drop-shadow(0 12px 18px rgba(34, 18, 12, 0.42)) drop-shadow(0 3px 5px rgba(34, 18, 12, 0.35));
}

.desk-wax-seal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.desk-wax-seal:hover {
  transform: scale(1.08) rotate(-4deg);
  filter: drop-shadow(0 18px 26px rgba(34, 18, 12, 0.52)) drop-shadow(0 4px 6px rgba(34, 18, 12, 0.38));
}

.desk-wax-seal:active {
  transform: scale(0.96) rotate(1deg);
}

/* Unfolded Cotton Stationery Sheet */
.desk-letter-sheet {
  background: #fcf8ef;
  color: var(--ink-deep);
  padding: 36px 38px 34px;
  border: 1px solid #d8c8ab;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.62);
  position: relative;
}

.desk-letter-sheet .letterhead-art {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  margin-bottom: 18px;
  border: 1px solid #e6dac4;
}

.desk-letter-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e3d6be;
}

.desk-letter-prose {
  font-family: var(--font-serif);
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--ink-deep);
}

.desk-letter-prose p {
  margin: 0 0 14px;
}

.desk-hand-ps {
  font-family: var(--font-hand);
  font-size: 22px;
  line-height: 1.3;
  color: var(--wax-red);
  margin: 18px 0 16px;
}

.desk-verse-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px dashed #d3c2a4;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--moss);
}

.desk-letter-actions {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.re-seal-link {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

/* Bridge-Stone Cipher Scrap tucked on the walnut desk */
.desk-cipher-scrap {
  background: rgba(251, 247, 239, 0.06);
  border: 1px dashed rgba(224, 183, 109, 0.42);
  padding: 20px 22px;
  text-align: center;
}

.desk-cipher-tiles {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 12px;
}

.brass-cipher-tile {
  width: 64px;
  height: 74px;
  background: linear-gradient(180deg, #3a2e22 0%, #261e16 100%);
  border: 1.5px solid var(--brass);
  border-radius: 4px;
  color: #fbf7ef;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.18s ease, background 0.25s ease, border-color 0.25s ease;
}

.brass-cipher-tile:hover {
  transform: translateY(-2px);
  border-color: var(--brass-bright);
}

.brass-cipher-tile.is-cracked {
  background: linear-gradient(180deg, #c79a52 0%, #9b7031 100%);
  color: #1f1812;
  border-color: #f6dca6;
}

.brass-cipher-tile .cipher-num {
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.78;
}

.brass-cipher-tile .cipher-char {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   CHAPTER III: THE UNROLLED MAP OF NARVEN (Full-Width Cartographer's Scroll)
   -------------------------------------------------------------------------- */
.map-chapter {
  background:
    radial-gradient(circle at 50% 0%, #f6eedf 0%, #eadec7 100%);
  padding: 86px 0 92px;
  border-top: 1px solid #d7c7aa;
  border-bottom: 1px solid #d7c7aa;
}

.map-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}

.lantern-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fbf7ef;
  border: 1px solid #d4c3a4;
  padding: 10px 16px;
  border-radius: 3px;
}

.lantern-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d8ccb5;
  border: 1.5px solid #9f8f76;
  transition: all 0.35s ease;
}

.lantern-dot.is-lit {
  background: #f5b942;
  border-color: #9a5b14;
  box-shadow: 0 0 12px rgba(245, 185, 66, 0.9);
}

.parchment-scroll {
  position: relative;
  background: #f9f3e4;
  padding: 14px;
  border: 1px solid #cbb996;
  box-shadow: 0 26px 64px rgba(48, 36, 22, 0.18);
}

/* Four brass map tacks */
.map-tack {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f2d18e 0%, #9b7031 75%, #5c3f14 100%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
  z-index: 4;
}
.map-tack.tl { top: 8px; left: 8px; }
.map-tack.tr { top: 8px; right: 8px; }
.map-tack.bl { bottom: 8px; left: 8px; }
.map-tack.br { bottom: 8px; right: 8px; }

.map-canvas-wrap {
  position: relative;
  overflow: hidden;
}

.map-canvas-wrap img {
  width: 100%;
  display: block;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fbf7ef;
  background: var(--wax-red);
  color: #fbf7ef;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  transition: transform 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.map-pin:hover,
.map-pin.active {
  transform: translate(-50%, -50%) scale(1.16);
  background: var(--moss);
}

.map-pin.bell-lit {
  background: #c58822;
  border-color: #fff6db;
  box-shadow: 0 0 0 8px rgba(245, 185, 66, 0.35), 0 6px 18px rgba(0, 0, 0, 0.4);
}

.field-journal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 18px 10px;
}

.mill-unlock-panel {
  display: none;
  margin-top: 18px;
  padding: 22px 18px 12px;
  border-top: 1px dashed #cbb996;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: center;
}

.mill-unlock-panel.is-open {
  display: grid;
}

.mill-unlock-panel img {
  width: 100%;
  border: 6px solid #fffdf8;
  box-shadow: 0 12px 28px rgba(36, 28, 18, 0.16);
}

/* --------------------------------------------------------------------------
   CHAPTER IV: THE COLLECTOR'S TABLE & THREE DOORS (Editorial Collage, Not a Grid)
   -------------------------------------------------------------------------- */
.collector-chapter {
  background: var(--linen);
  padding: 92px 0;
}

.editorial-collage {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
  margin-bottom: 84px;
}

.collage-photos {
  position: relative;
  padding-bottom: 54px;
}

.collage-main {
  width: 88%;
  border: 10px solid #ffffff;
  box-shadow: 0 22px 50px rgba(36, 31, 26, 0.14);
}

.collage-inset {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 52%;
  border: 8px solid #ffffff;
  box-shadow: 0 18px 42px rgba(36, 31, 26, 0.22);
  transform: rotate(2.4deg);
}

.archive-shelf-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--ink-deep);
  margin-bottom: 32px;
}

.dossier-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.dossier-folder {
  background: #f5ede0;
  border: 1px solid #d8c8ab;
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dossier-folder::before {
  content: attr(data-tab);
  position: absolute;
  top: -22px;
  left: 16px;
  background: #f5ede0;
  border: 1px solid #d8c8ab;
  border-bottom: none;
  padding: 3px 12px 2px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-warm);
}

.dossier-folder:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(36, 31, 26, 0.1);
}

.dossier-folder img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 4px solid #fffdf8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   CHAPTER V: THE VILLAGE POST OFFICE (Ledger + Todd & Amy's Handwritten Letter)
   -------------------------------------------------------------------------- */
.post-office-chapter {
  background:
    linear-gradient(180deg, #efe6d5 0%, #f6efe2 100%);
  padding: 92px 0 84px;
  border-top: 1px solid #d8c8ab;
}

.dispatch-book {
  max-width: 880px;
  margin: 0 auto 64px;
  background: #fdfaf2;
  border: 1px solid #cbb996;
  padding: 38px 40px 32px;
  box-shadow: 0 22px 54px rgba(36, 31, 26, 0.1);
  position: relative;
}

.dispatch-book::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(184, 140, 74, 0.35);
  pointer-events: none;
}

.dispatch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px dashed #d6c6a8;
  position: relative;
  z-index: 1;
}

.dispatch-row:last-of-type {
  border-bottom: none;
}

.guarantee-wax-strip {
  max-width: 760px;
  margin: -34px auto 72px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #2c4335;
  color: #fbf7ef;
  padding: 20px 26px;
  border-radius: 3px;
  box-shadow: 0 14px 32px rgba(24, 38, 29, 0.22);
}

.guarantee-seal {
  flex-shrink: 0;
  width: 68px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

.guarantee-seal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Todd & Amy's Handwritten Founder Letter + Tear-Off Free Sample Slip */
.founders-letter {
  max-width: 820px;
  margin: 0 auto 56px;
  background: #fcf9f2;
  border: 1px solid #d5c4a4;
  padding: 44px 48px;
  box-shadow: 0 16px 40px rgba(36, 31, 26, 0.08);
  position: relative;
}

.founders-salutation {
  font-family: var(--font-hand);
  font-size: 32px;
  color: var(--wax-red);
  margin: 0 0 12px;
}

.founders-prose {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.72;
  color: var(--ink-deep);
  margin: 0 0 18px;
}

.founders-signoff {
  font-family: var(--font-hand);
  font-size: 28px;
  color: var(--ink-deep);
  margin: 8px 0 28px;
}

.tear-off-slip {
  background: var(--moss);
  color: #fbf7ef;
  padding: 26px 28px;
  border: 1.5px dashed rgba(244, 232, 210, 0.45);
  border-radius: 3px;
}

.tear-off-form {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr auto;
  gap: 10px;
  margin-top: 16px;
}

.tear-off-form input,
.tear-off-form select {
  padding: 12px 13px;
  border: 1px solid rgba(251, 247, 239, 0.35);
  background: rgba(251, 247, 239, 0.96);
  color: var(--ink-deep);
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 14px;
}

/* Compact Postmaster Q&A Accordion */
.postmaster-qa {
  max-width: 820px;
  margin: 0 auto;
}

.postmaster-qa details {
  border-bottom: 1px solid #d5c4a4;
  padding: 16px 0;
}

.postmaster-qa summary {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  color: var(--ink-deep);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.postmaster-qa summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 400;
  color: var(--wax-red);
}

.postmaster-qa details[open] summary::after {
  content: "−";
}

.postmaster-qa details p {
  font-family: var(--font-serif);
  font-size: 16.5px;
  color: var(--ink-warm);
  margin: 10px 0 4px;
  line-height: 1.65;
}

/* Unfold animation */
@keyframes letterUnfold {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.letter-unfold {
  animation: letterUnfold 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --------------------------------------------------------------------------
   RESPONSIVE ADAPTATION
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .chapter-bookmarks,
  .postmark-chip {
    display: none;
  }

  .gatepost-hotspot {
    display: none;
  }

  .desk-surface,
  .editorial-collage,
  .dossier-row,
  .mill-unlock-panel {
    grid-template-columns: 1fr;
  }

  .taped-portrait,
  .desk-scrap-note,
  .desk-postcard-wrap {
    transform: none;
  }

  .tear-off-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .compass-bar {
    padding: 12px 16px;
  }

  .gate-story-opening {
    padding: 110px 20px 68px;
  }

  .desk-envelope,
  .desk-letter-sheet,
  .dispatch-book,
  .founders-letter {
    padding: 26px 20px;
  }

  .margin-notes-pair {
    grid-template-columns: 1fr;
  }

  .dispatch-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .guarantee-wax-strip {
    flex-direction: column;
    text-align: center;
  }
}
