/* =================================================================
   for you — a keepsake box
   folklore-vintage: real paper, kraft box, wax, gold thread
   ================================================================= */

:root {
  --paper:      #f3ead8;
  --paper-2:    #eaddc3;
  --paper-deep: #e2d2b4;
  --ink:        #2c2620;
  --ink-soft:   #6b5d4b;
  --seal:       #8a2f2c;
  --seal-2:     #6f2320;
  --gold:       #b8974a;
  --gold-soft:  #d8c07f;
  --cass:       #56422f;
  --cass-2:     #3e2f21;

  --shadow: 0 30px 60px -20px rgba(40, 30, 18, 0.45);

  --font-title: "Cormorant Garamond", serif;
  --font-body:  "EB Garamond", serif;
  --font-hand:  "La Belle Aurore", cursive;
  --font-script:"Sacramento", cursive;
  --font-seal:  "Pinyon Script", cursive;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; overflow: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(90% 70% at 48% 39%, rgba(255,250,236,.66), rgba(245,235,211,.26) 62%, rgba(180,142,88,.18) 100%),
    linear-gradient(114deg, rgba(255,255,255,.42), rgba(214,188,142,.24) 46%, rgba(116,74,32,.18)),
    url("../assets/tex-paper.jpg") center / cover no-repeat fixed;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ---------- overlays ---------- */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  position: fixed; inset: 0; z-index: 55; pointer-events: none;
  background: radial-gradient(115% 90% at 50% 42%, transparent 52%, rgba(78,52,24,0.26) 100%);
}

/* ---------- ambient collage ---------- */
.ambient {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  overflow: hidden;
}
.ambient__paper,
.ambient__bracelet,
.ambient__vinyl,
.ambient__rose,
.ambient__moon {
  position: absolute;
  opacity: .34;
  filter: saturate(.88) sepia(.12);
}
.ambient__paper {
  background:
    linear-gradient(rgba(255,250,238,.68), rgba(229,211,174,.58)),
    url("../assets/tex-paper.jpg") center / 240px;
  border: 1px solid rgba(118,88,48,.22);
  box-shadow: 0 16px 34px rgba(78,52,24,.12);
  color: rgba(44,38,32,.76);
  mix-blend-mode: multiply;
}
.ambient__paper--ticket {
  top: 8vh; left: 6vw;
  width: 96px; height: 60px;
  display: grid; place-items: center;
  transform: rotate(-7deg);
  clip-path: polygon(0 0, 100% 0, 100% 36%, 92% 50%, 100% 64%, 100% 100%, 0 100%, 0 64%, 8% 50%, 0 36%);
}
.ambient__paper--ticket span {
  font-family: var(--font-title); font-size: 2.25rem; font-weight: 700;
  line-height: .8; color: rgba(138,47,44,.72);
}
.ambient__paper--ticket small {
  display: block; margin-top: -13px;
  font-family: var(--font-hand); font-size: 1.05rem;
}
.ambient__paper--note {
  top: 20vh; right: 7vw;
  padding: 10px 20px 8px;
  font-family: var(--font-hand); font-size: 1.45rem;
  transform: rotate(4deg);
}
.ambient__paper--note::before,
.ambient__paper--stamp::before {
  content: "";
  position: absolute; inset: -10px auto auto 18px;
  width: 58px; height: 20px;
  background: rgba(207,185,130,.34);
  border-left: 1px dashed rgba(255,255,255,.45);
  border-right: 1px dashed rgba(255,255,255,.45);
  transform: rotate(-5deg);
}
.ambient__paper--stamp {
  right: 13vw; bottom: 13vh;
  padding: 10px 16px;
  font-family: var(--font-hand); font-size: 1.16rem;
  transform: rotate(-8deg);
}
.ambient__vinyl {
  right: -44px; bottom: 5vh;
  width: 176px; aspect-ratio: 1;
  border-radius: 50%;
  opacity: .18;
  background:
    radial-gradient(circle at 50% 50%, rgba(240,225,191,.72) 0 15%, transparent 16%),
    radial-gradient(circle at 50% 50%, transparent 0 27%, rgba(255,255,255,.1) 28% 29%, transparent 30% 45%, rgba(255,255,255,.12) 46% 47%, transparent 48%),
    radial-gradient(circle, #221b17, #120f0d);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.ambient__bracelet {
  left: 50%; bottom: 4vh;
  display: flex; gap: 5px;
  transform: translateX(-50%) rotate(-3deg);
  opacity: .42;
}
.ambient__bracelet i {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #fbf5e8, #d9c9a8);
  border: 1px solid rgba(118,88,48,.24);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.8), 0 5px 10px rgba(78,52,24,.12);
  color: rgba(64,49,36,.72);
  font-family: var(--font-body); font-style: normal; font-size: .68rem; font-weight: 700;
}
.ambient__rose--scrap {
  left: -54px; bottom: 14vh;
  width: 210px; height: 210px;
  object-fit: cover; object-position: 50% 10%;
  mix-blend-mode: multiply;
  transform: rotate(-17deg);
  opacity: .24;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 98%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 98%);
}
.ambient__moon--scrap {
  left: 12vw; top: 65vh;
  width: 126px; height: 126px;
  border-radius: 50%;
  object-fit: cover;
  mix-blend-mode: multiply;
  transform: rotate(8deg);
  opacity: .16;
  -webkit-mask-image: radial-gradient(circle, #000 43%, transparent 74%);
  mask-image: radial-gradient(circle, #000 43%, transparent 74%);
}
.ambient__star { position: absolute; fill: var(--gold); opacity: 0; animation: twinkle 6s ease-in-out infinite; }
.ambient__star use { fill: var(--gold); }
.ambient__star--1 { width: 24px; top: 16%; left: 16%; animation-delay: 0s; }
.ambient__star--2 { width: 15px; top: 31%; right: 18%; animation-delay: 1.2s; }
.ambient__star--3 { width: 32px; top: 73%; left: 8%;  animation-delay: 2.1s; }
.ambient__star--4 { width: 19px; top: 78%; right: 17%; animation-delay: 0.7s; }
.ambient__star--5 { width: 13px; top: 44%; left: 48%; animation-delay: 3s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.12; transform: scale(0.85) rotate(6deg); }
  50%      { opacity: 0.8;  transform: scale(1) rotate(0deg); }
}

/* =================================================================
   Scenes
   ================================================================= */
.scene {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
  padding: 4vh 4vw;
}
.scene.is-active { opacity: 1; visibility: visible; z-index: 20; }

.hint {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  color: var(--ink-soft);
  margin-top: 2.2rem;
  animation: breathe 3.5s ease-in-out infinite;
  transition: opacity .6s;
}
@keyframes breathe { 0%,100%{opacity:.5} 50%{opacity:1} }

.btn-back {
  position: absolute; bottom: 3vh; left: 50%; transform: translateX(-50%);
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-style: italic;
  font-size: 1.05rem; color: var(--ink-soft);
  opacity: 0.6; transition: opacity .3s;
}
.btn-back:hover { opacity: 1; }

/* =================================================================
   SCENE 1 — the box
   ================================================================= */
.box-title {
  font-family: var(--font-script); font-weight: 400;
  font-size: clamp(3rem, 7vw, 5rem); color: var(--ink);
  margin: 0 0 3.4rem; line-height: 1;
  opacity: 0; transform: translateY(14px);
  transition: opacity 1.2s ease 2.1s, transform 1.2s ease 2.1s;
}
.scene--box.is-open .box-title { opacity: 1; transform: none; }

.stage {
  position: relative;
  width: min(94vw, 860px);
  height: min(61vh, 560px);
  display: flex; align-items: center; justify-content: center;
}

.ground-shadow {
  position: absolute; left: 50%; bottom: 11%;
  width: min(58vw, 610px); height: 132px;
  transform: translateX(-50%) rotate(-4deg);
  background:
    radial-gradient(55% 54% at 54% 48%, rgba(45,29,13,.34), rgba(45,29,13,.06) 58%, rgba(45,29,13,0) 74%),
    radial-gradient(38% 42% at 34% 42%, rgba(74,48,20,.18), rgba(74,48,20,0) 70%);
  filter: blur(9px);
  opacity: .88;
  transition: transform 1.4s ease, opacity 1.4s ease;
}
.scene--box.is-open .ground-shadow { transform: translateX(-50%) rotate(-4deg) scale(1.08); opacity: .78; }

.scene3d {
  position: absolute; left: 50%; bottom: 12%;
  transform: translateX(-50%);
  perspective: 1900px;
  perspective-origin: 50% 24%;
}

/* ------- the box body ------- */
.box3d {
  --w: 430px;   /* width  */
  --d: 286px;   /* depth  */
  --h: 92px;    /* height */
  position: relative;
  width: var(--w); height: var(--h);
  transform-style: preserve-3d;
  transform: rotateX(55deg) rotateY(-8deg) rotateZ(-4deg);
  cursor: pointer;
  outline: none;
  transition: transform .7s cubic-bezier(.22,.61,.36,1), filter .7s ease;
  filter: drop-shadow(0 34px 28px rgba(47,29,11,.16));
}
.scene--box:not(.is-open) .box3d:hover { transform: rotateX(55deg) rotateY(-8deg) rotateZ(-4deg) translateY(-5px); }
.scene--box.is-open .box3d { cursor: default; }

/* kraft-textured faces */
.bx, .ld {
  position: absolute; top: 50%; left: 50%;
  background:
    linear-gradient(120deg, rgba(255,240,205,.22), rgba(111,72,34,.32)),
    repeating-linear-gradient(90deg, rgba(74,46,20,.11) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(0deg, rgba(255,244,214,.08) 0 1px, transparent 1px 9px),
    url("../assets/tex-kraft.png");
  background-size: auto, auto, auto, 520px;
  background-blend-mode: multiply, multiply, overlay, normal;
  box-shadow:
    inset 0 0 0 1px rgba(60,38,14,.24),
    inset 0 0 18px rgba(65,40,16,.16);
}
.bx--front  { width: var(--w); height: var(--h);
  transform: translate(-50%,-50%) translateZ(calc(var(--d) / 2));
  filter: brightness(1.02) saturate(1.02); }
.bx--back   { width: var(--w); height: var(--h);
  transform: translate(-50%,-50%) rotateY(180deg) translateZ(calc(var(--d) / 2));
  filter: brightness(.72); }
.bx--left   { width: var(--d); height: var(--h);
  transform: translate(-50%,-50%) rotateY(-90deg) translateZ(calc(var(--w) / 2));
  filter: brightness(.88); }
.bx--right  { width: var(--d); height: var(--h);
  transform: translate(-50%,-50%) rotateY(90deg) translateZ(calc(var(--w) / 2));
  filter: brightness(.78); }
.bx--bottom { width: var(--w); height: var(--d);
  transform: translate(-50%,-50%) rotateX(-90deg) translateZ(calc(var(--h) / 2));
  filter: brightness(.6); }

/* worn edge highlights */
.bx--front::after, .bx--left::after, .bx--right::after {
  content: ""; position: absolute; inset: 0;
  box-shadow:
    inset 0 3px 0 rgba(255,236,199,.22),
    inset 0 -12px 22px rgba(60,38,14,.21);
}
.bx--front::before, .bx--left::before, .bx--right::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(49,31,12,.26), transparent 6%, transparent 94%, rgba(49,31,12,.2)),
    linear-gradient(0deg, rgba(48,30,12,.2) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, transparent 0 66%, rgba(255,236,196,.12) 66% 68%, rgba(61,38,14,.18) 68% 70%, transparent 70%);
  opacity: .66;
}

/* tissue paper resting in the mouth */
.tissue {
  position: absolute; top: 50%; left: 50%;
  width: calc(var(--w) - 42px); height: calc(var(--d) - 36px);
  transform: translate(-50%,-50%) rotateX(90deg) translateZ(calc(var(--h) / 2 - 19px));
  background:
    linear-gradient(132deg, transparent 0 28%, rgba(194,174,140,.24) 28% 29%, transparent 30% 100%),
    linear-gradient(36deg, transparent 0 36%, rgba(255,255,255,.48) 36% 38%, transparent 39% 100%),
    radial-gradient(60% 50% at 30% 30%, rgba(255,252,242,.95), rgba(244,234,212,.9) 60%, rgba(232,218,190,.92)),
    radial-gradient(50% 60% at 72% 68%, rgba(255,252,244,.9), rgba(240,229,206,.85));
  clip-path: polygon(2% 13%, 12% 3%, 30% 9%, 50% 1%, 72% 8%, 91% 3%, 98% 15%, 94% 33%, 99% 55%, 95% 78%, 98% 95%, 78% 92%, 56% 99%, 31% 94%, 9% 98%, 2% 80%, 6% 55%, 1% 32%);
  box-shadow:
    inset 0 0 34px rgba(120,90,50,.32),
    0 4px 14px rgba(64,40,18,.18);
  opacity: .98;
}
.tissue::after {
  content: ""; position: absolute; inset: 8% 5%;
  background:
    linear-gradient(100deg, transparent 0 22%, rgba(143,116,72,.18) 23%, transparent 25%),
    linear-gradient(-22deg, transparent 0 48%, rgba(255,255,255,.42) 49%, transparent 51%),
    radial-gradient(44% 34% at 44% 42%, rgba(255,255,255,.54), transparent 72%);
  clip-path: polygon(0 16%, 17% 0, 39% 9%, 58% 2%, 81% 9%, 100% 0, 96% 48%, 100% 100%, 68% 90%, 50% 100%, 25% 92%, 0 100%);
}

/* ------- the lid (telescoping, lifts off) ------- */
.lid-seat {
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
  /* seat the lid so its rim overlaps the box mouth */
  transform: translateY(calc(var(--h) / -2 + 5px));
}
.lid-lift {
  --lw: calc(var(--w) + 18px);
  --ldp: calc(var(--d) + 18px);
  --lh: 34px;
  position: absolute; top: 0; left: 0;
  transform-style: preserve-3d;
}
.scene--box.is-open .lid-lift {
  animation: lid-off 2s cubic-bezier(.4,.05,.3,1) forwards;
}
@keyframes lid-off {
  0%   { transform: translate3d(0,0,0) rotateZ(0deg); opacity: 1; }
  42%  { transform: translate3d(0,-210px,0) rotateZ(-4deg); opacity: 1; }
  72%  { transform: translate3d(-170px,-250px,-40px) rotateZ(-10deg) rotateX(-12deg); opacity: 1; }
  100% { transform: translate3d(-380px,-150px,-140px) rotateZ(-20deg) rotateX(-26deg); opacity: 0; }
}

.ld--top {
  width: var(--lw); height: var(--ldp);
  transform: translate(-50%,-50%) rotateX(90deg) translateZ(calc(var(--lh) / 2));
  filter: brightness(1.12) saturate(.98);
  overflow: hidden;
  border-radius: 3px;
}
.ld--front { width: var(--lw); height: var(--lh);
  transform: translate(-50%,-50%) translateZ(calc(var(--ldp) / 2));
  filter: brightness(1.02); }
.ld--back  { width: var(--lw); height: var(--lh);
  transform: translate(-50%,-50%) rotateY(180deg) translateZ(calc(var(--ldp) / 2));
  filter: brightness(.72); }
.ld--left  { width: var(--ldp); height: var(--lh);
  transform: translate(-50%,-50%) rotateY(-90deg) translateZ(calc(var(--lw) / 2));
  filter: brightness(.86); }
.ld--right { width: var(--ldp); height: var(--lh);
  transform: translate(-50%,-50%) rotateY(90deg) translateZ(calc(var(--lw) / 2));
  filter: brightness(.8); }

/* lid top decorations live ON the top face */
.ld--top::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(68,43,18,.22), transparent 4%, transparent 96%, rgba(255,236,196,.18)),
    linear-gradient(0deg, rgba(68,43,18,.16), transparent 5%, transparent 94%, rgba(68,43,18,.2));
  box-shadow:
    inset 0 0 0 1px rgba(60,38,14,.24),
    inset 0 0 44px rgba(120,86,44,.26);
  pointer-events: none;
}
.lid-band {
  position: absolute; top: -4%; bottom: -4%; left: 30%;
  width: 12px; transform: translateX(-50%) rotate(-1deg);
  background:
    linear-gradient(90deg, rgba(51,34,17,.22), transparent 30% 70%, rgba(255,240,204,.16)),
    repeating-linear-gradient(90deg, #8b6d4a 0 1px, #c0a27a 1px 3px, #6e4f2f 3px 4px);
  box-shadow:
    0 0 0 1px rgba(57,35,14,.16),
    5px 0 9px rgba(52,33,15,.24);
  opacity: .92;
}
.lid-twine {
  position: absolute; z-index: 4; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(255,245,218,.15), rgba(68,43,20,.22)),
    repeating-linear-gradient(90deg, #6d4d2e 0 1px, #b99767 1px 3px, #5e4125 3px 4px);
  box-shadow: 0 3px 6px rgba(50,31,13,.24);
  opacity: .96;
}
.lid-twine--cross {
  left: -4%; right: -4%; top: 54%;
  height: 11px;
  transform: rotate(-2.5deg);
}
.lid-flap-line {
  position: absolute; z-index: 1; pointer-events: none;
  background: rgba(64,40,15,.18);
  box-shadow: 0 1px rgba(255,232,192,.2);
}
.lid-flap-line--top {
  left: 4%; right: 4%; top: 10%;
  height: 1px;
}
.lid-flap-line--side {
  top: 7%; bottom: 7%; left: 83%;
  width: 1px;
}
.lid-collage {
  position: absolute; z-index: 3; display: block;
  object-fit: cover;
  filter: sepia(.2) saturate(.9) drop-shadow(0 5px 5px rgba(54,34,16,.22));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.lid-collage--stamp {
  width: 88px; height: 58px; right: 12%; top: 18%;
  transform: rotate(5deg);
  background: #f2e5cb;
  border: 3px solid rgba(242,235,219,.85);
  clip-path: polygon(0 6%, 4% 6%, 4% 0, 9% 0, 9% 6%, 14% 6%, 14% 0, 19% 0, 19% 6%, 24% 6%, 24% 0, 29% 0, 29% 6%, 34% 6%, 34% 0, 39% 0, 39% 6%, 44% 6%, 44% 0, 49% 0, 49% 6%, 54% 6%, 54% 0, 59% 0, 59% 6%, 64% 6%, 64% 0, 69% 0, 69% 6%, 74% 6%, 74% 0, 79% 0, 79% 6%, 84% 6%, 84% 0, 89% 0, 89% 6%, 94% 6%, 94% 0, 100% 0, 100% 6%, 94% 6%, 94% 14%, 100% 14%, 100% 20%, 94% 20%, 94% 27%, 100% 27%, 100% 33%, 94% 33%, 94% 40%, 100% 40%, 100% 46%, 94% 46%, 94% 53%, 100% 53%, 100% 59%, 94% 59%, 94% 66%, 100% 66%, 100% 72%, 94% 72%, 94% 79%, 100% 79%, 100% 85%, 94% 85%, 94% 92%, 100% 92%, 100% 100%, 94% 100%, 94% 94%, 89% 94%, 89% 100%, 84% 100%, 84% 94%, 79% 94%, 79% 100%, 74% 100%, 74% 94%, 69% 94%, 69% 100%, 64% 100%, 64% 94%, 59% 94%, 59% 100%, 54% 100%, 54% 94%, 49% 94%, 49% 100%, 44% 100%, 44% 94%, 39% 94%, 39% 100%, 34% 100%, 34% 94%, 29% 94%, 29% 100%, 24% 100%, 24% 94%, 19% 94%, 19% 100%, 14% 100%, 14% 94%, 9% 94%, 9% 100%, 4% 100%, 4% 94%, 0 94%, 0 88%, 6% 88%, 6% 80%, 0 80%, 0 74%, 6% 74%, 6% 67%, 0 67%, 0 61%, 6% 61%, 6% 54%, 0 54%, 0 48%, 6% 48%, 6% 41%, 0 41%, 0 35%, 6% 35%, 6% 28%, 0 28%, 0 22%, 6% 22%, 6% 15%, 0 15%);
}
.lid-collage--mushroom {
  width: 82px; height: 70px; right: 4%; bottom: 10%;
  transform: rotate(13deg);
  border: 5px solid rgba(222,161,83,.75);
  object-position: 54% 42%;
}
.lid-collage--butterfly {
  width: 96px; height: 82px; left: 18%; bottom: 10%;
  transform: rotate(-9deg);
  object-fit: contain;
  mix-blend-mode: normal;
  filter: saturate(.98) contrast(.95) drop-shadow(0 6px 5px rgba(54,34,16,.26));
}
.lid-address {
  position: absolute; z-index: 2; left: 33%; top: 49%;
  width: 112px; height: 58px; transform: rotate(-3deg);
  background:
    linear-gradient(rgba(242,224,188,.7), rgba(206,177,130,.68)),
    url("../assets/tex-paper.jpg") center / 220px;
  border: 1px solid rgba(82,54,25,.24);
  box-shadow: 0 5px 8px rgba(50,31,13,.16);
  color: rgba(43,34,24,.78);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-hand);
  line-height: .95;
  pointer-events: none;
}
.lid-address::before {
  content: ""; position: absolute; inset: 7px;
  border: 1px dashed rgba(72,48,24,.26);
}
.lid-address span { font-size: 1.28rem; transform: rotate(-1deg); }
.lid-address small { font-size: .76rem; font-family: var(--font-body); font-style: italic; }
.lid-wax {
  position: absolute; z-index: 5; left: 25%; top: 43%;
  width: 62px; height: 62px; transform: rotate(-10deg);
  filter: drop-shadow(0 5px 5px rgba(42,25,14,.36));
  pointer-events: none;
}
.lid-wax svg { width: 100%; height: 100%; }
.lid-wax .fill-seal { fill: #315f4a; }
.lid-wax .seal-letter-big { fill: rgba(231,219,184,.9); }
.lid-wax .seal-ring { stroke: rgba(235,224,192,.36); }
.lid-bow {
  position: absolute; top: 51%; left: 30%;
  z-index: 6;
  width: 105px; transform: translate(-50%,-58%) rotate(-5deg);
  filter: drop-shadow(0 4px 5px rgba(60,38,14,.38));
}
.lid-bow svg { width: 100%; display: block; }
.lid-tag {
  position: absolute; top: 63%; left: 38%;
  z-index: 7;
  transform: translate(-14%, 6%) rotate(7deg);
  background:
    linear-gradient(rgba(255,250,238,.35), rgba(236,222,196,.3)),
    url("../assets/tex-paper.jpg") center / 300px;
  background-blend-mode: normal, normal;
  padding: 8px 18px 8px 24px; border-radius: 3px;
  box-shadow: 0 4px 9px rgba(60,38,14,.3);
  border: 1px solid rgba(120,90,50,.35);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.lid-tag__hole {
  position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(90,64,34,.55); box-shadow: inset 0 1px 2px rgba(0,0,0,.4);
}
.lid-tag__text { font-family: var(--font-script); font-size: 1.45rem; color: var(--ink); white-space: nowrap; }

/* 2.5D flat-lay pass: more photographed keepsake, less perfect render */
.scene3d {
  perspective: none;
}
.box3d {
  --box-w: min(78vw, 540px);
  --box-h: min(48vw, 338px);
  width: var(--box-w);
  height: var(--box-h);
  transform: rotate(-4.5deg);
  transform-style: flat;
  filter: drop-shadow(0 34px 30px rgba(47,29,11,.2));
}
.scene--box:not(.is-open) .box3d:hover {
  transform: rotate(-4.5deg) translateY(-5px);
}
.bx, .ld {
  top: auto;
  left: auto;
  transform: none;
}
.bx--bottom {
  z-index: 1;
  width: 72%;
  height: 52%;
  left: 14%;
  top: 23%;
  clip-path: polygon(5% 7%, 94% 0, 100% 88%, 0 100%);
  filter: brightness(.76) saturate(.95);
}
.bx--back {
  z-index: 2;
  width: 74%;
  height: 17%;
  left: 13%;
  top: 18%;
  clip-path: polygon(3% 20%, 97% 0, 100% 100%, 0 88%);
  filter: brightness(.78);
}
.bx--front {
  z-index: 5;
  width: 83%;
  height: 25%;
  left: 8.5%;
  top: 64%;
  clip-path: polygon(0 0, 100% 11%, 96% 100%, 5% 92%);
  filter: brightness(1.02) saturate(1.02);
}
.bx--left {
  z-index: 4;
  width: 14%;
  height: 55%;
  left: 7%;
  top: 29%;
  clip-path: polygon(18% 0, 100% 10%, 80% 100%, 0 86%);
  filter: brightness(.86);
}
.bx--right {
  z-index: 3;
  width: 14%;
  height: 55%;
  right: 7%;
  top: 25%;
  clip-path: polygon(0 10%, 82% 0, 100% 86%, 20% 100%);
  filter: brightness(.72);
}
.tissue {
  z-index: 4;
  width: 61%;
  height: 39%;
  left: 19.5%;
  top: 27%;
  transform: none;
}
.lid-seat,
.lid-lift {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  transform-style: flat;
}
.ld--top {
  z-index: 20;
  width: 86%;
  height: 68%;
  left: 7%;
  top: 7%;
  transform: none;
  clip-path: polygon(3% 2%, 99% 10%, 96% 96%, 0 88%);
  filter: brightness(1.08) saturate(.98);
}
.ld--top::after {
  z-index: 1;
}
.ld--front {
  z-index: 19;
  width: 86%;
  height: 13%;
  left: 7%;
  top: 68%;
  transform: none;
  clip-path: polygon(0 0, 100% 13%, 96% 100%, 4% 85%);
  filter: brightness(.88);
}
.ld--back {
  z-index: 18;
  width: 82%;
  height: 8%;
  left: 9%;
  top: 8%;
  transform: none;
  clip-path: polygon(4% 0, 98% 18%, 100% 100%, 0 82%);
  filter: brightness(1.12);
}
.ld--left {
  z-index: 18;
  width: 10%;
  height: 60%;
  left: 5.7%;
  top: 12%;
  transform: none;
  clip-path: polygon(25% 0, 100% 8%, 76% 100%, 0 86%);
  filter: brightness(.9);
}
.ld--right {
  z-index: 18;
  width: 10%;
  height: 60%;
  right: 5.4%;
  top: 14%;
  transform: none;
  clip-path: polygon(0 8%, 76% 0, 100% 86%, 22% 100%);
  filter: brightness(.78);
}
.lid-band {
  z-index: 4;
}
.scene--box.is-open .lid-lift {
  animation: lid-off-flat 2s cubic-bezier(.4,.05,.3,1) forwards;
}
@keyframes lid-off-flat {
  0%   { transform: translate3d(0,0,0) rotate(0deg); opacity: 1; }
  42%  { transform: translate3d(0,-118px,0) rotate(-4deg); opacity: 1; }
  72%  { transform: translate3d(-170px,-172px,0) rotate(-11deg); opacity: .96; }
  100% { transform: translate3d(-440px,-150px,0) rotate(-21deg); opacity: 0; }
}

/* ------- floaters (rise out of the box) ------- */
.floaters { position: absolute; inset: 0; pointer-events: none; }
.floater {
  position: absolute;
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  opacity: 0; pointer-events: none;
}
.scene--box.is-open .floater { pointer-events: auto; }

.floater__art { display: block; filter: drop-shadow(0 16px 20px rgba(60,40,20,.3)); transition: transform .45s cubic-bezier(.22,.61,.36,1); }
.floater__art svg { width: 100%; display: block; }
.floater:hover .floater__art { transform: translateY(-8px) rotate(-2deg) scale(1.05); }
.floater__label {
  font-family: var(--font-title); font-style: italic; font-weight: 600;
  font-size: 1.35rem; color: var(--ink);
  background: rgba(248,240,222,.55); padding: 2px 12px; border-radius: 20px;
}

.floater--letter { left: 4%;  top: 18%; width: clamp(130px, 24vw, 185px); }
.floater--songs  { left: 50%; top: 1%; width: clamp(150px, 27vw, 215px); transform: translateX(-50%); }
.floater--photos { right: 3%; top: 20%; width: clamp(130px, 24vw, 190px); }

@keyframes float-up {
  0%   { opacity: 0; transform: var(--fx, translateX(0)) translateY(190px) scale(.72); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: var(--fx, translateX(0)) translateY(0) scale(1); }
}
@keyframes bob {
  0%, 100% { transform: var(--fx, translateX(0)) translateY(0); }
  50%      { transform: var(--fx, translateX(0)) translateY(-11px); }
}
.floater--songs { --fx: translateX(-50%); }
.scene--box.is-open .floater--letter {
  animation: float-up 1s cubic-bezier(.22,.61,.36,1) 1.25s both, bob 4.6s ease-in-out 2.25s infinite; }
.scene--box.is-open .floater--songs {
  animation: float-up 1s cubic-bezier(.22,.61,.36,1) 1.5s both, bob 5.2s ease-in-out 2.5s infinite; }
.scene--box.is-open .floater--photos {
  animation: float-up 1s cubic-bezier(.22,.61,.36,1) 1.75s both, bob 4.9s ease-in-out 2.75s infinite; }

/* =================================================================
   SCENE 3 — postcards
   ================================================================= */
.scene--postcards { padding: 3vh 2vw 8vh; }
.deck { position: relative; width: min(900px, 95vw); height: min(76vh, 620px); }

.postcard {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255,250,238,.6), rgba(244,233,210,.55)),
    url("../assets/tex-paper.jpg") center / cover;
  border-radius: 4px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(150,118,70,.25);
  overflow: hidden;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  opacity: 0; transform: translateY(40px) rotate(-1deg) scale(.96);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0 clamp(1.2rem, 3vw, 2.6rem);
  grid-template-rows: auto 1fr;
}
.postcard.is-active { opacity: 1; transform: none; pointer-events: auto; }
.postcard.is-left  { opacity: 0; transform: translateX(-70px) rotate(-3deg) scale(.94); }
.postcard.is-right { opacity: 0; transform: translateX(70px) rotate(3deg) scale(.94); }

.postcard__title {
  grid-column: 1 / -1;
  font-family: var(--font-title); font-style: italic; font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.3rem); margin: 0 0 .5rem; color: var(--ink);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .12em .7em; position: relative; z-index: 3;
}
.postcard__era { font-family: var(--font-hand); font-size: .42em; color: var(--ink-soft); font-weight: 400; }

.postcard__col {
  position: relative; z-index: 3;
  font-size: clamp(.84rem, 1.7vw, 1.03rem); line-height: 1.64;
  text-align: justify; hyphens: auto;
}
.postcard__col p { margin: 0 0 .85em; }
.postcard__col em { color: var(--seal); }

/* handwritten margin notes */
.pc-note {
  position: absolute; z-index: 2; font-family: var(--font-hand);
  color: var(--ink-soft); font-size: clamp(.9rem, 2vw, 1.12rem);
  line-height: 1.4; pointer-events: none; max-width: 36%;
}
.pc-note--tl { bottom: 31%; left: 5%;  transform: rotate(-4deg); }
.pc-note--br { bottom: 6%;  right: 4%; transform: rotate(3deg); text-align: right; }
.pc-note--bl { bottom: 8%;  left: 5%;  transform: rotate(-2deg); }

/* image decorations */
.pc-img { position: absolute; mix-blend-mode: multiply; pointer-events: none; }
.pc-img--rose {
  width: clamp(110px, 17vw, 160px); height: clamp(110px, 17vw, 160px);
  object-fit: cover; object-position: 50% 10%;
  top: -4%; right: -3%; transform: rotate(14deg); opacity: .9; z-index: 2;
  -webkit-mask-image: radial-gradient(closest-side, #000 52%, transparent 96%);
  mask-image: radial-gradient(closest-side, #000 52%, transparent 96%);
}
.pc-img--moon {
  width: clamp(86px, 12vw, 120px); height: clamp(86px, 12vw, 120px);
  border-radius: 50%;
  object-fit: cover;
  left: 8%; bottom: 11%;
  opacity: .18; z-index: 1;
  transform: rotate(-8deg);
  -webkit-mask-image: radial-gradient(circle, #000 42%, transparent 75%);
  mask-image: radial-gradient(circle, #000 42%, transparent 75%);
}

/* the hands + golden string motif */
.pc-hands {
  position: absolute; z-index: 2; pointer-events: none;
  bottom: -3%; left: 50%; transform: translateX(-50%);
  width: clamp(240px, 44%, 380px);
}
.pc-hands img {
  width: 100%; display: block; mix-blend-mode: multiply; opacity: .95;
  filter: sepia(.32) saturate(.9) brightness(.99);
  -webkit-mask-image: radial-gradient(78% 72% at 50% 46%, #000 42%, transparent 82%);
  mask-image: radial-gradient(78% 72% at 50% 46%, #000 42%, transparent 82%);
}
.pc-hands svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pc-hands path {
  fill: none; stroke: #c9a648; stroke-width: 2.2; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 700; stroke-dashoffset: 700;
  filter: drop-shadow(0 1px 1px rgba(150,110,30,.35));
}
.postcard.is-active .pc-hands path { animation: draw 2.6s ease forwards .9s; }

/* gold sparkle deco */
.pc-star { position: absolute; z-index: 2; fill: var(--gold); pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(160,120,40,.4)); }
.pc-star svg { width: 100%; display: block; fill: inherit; }

.pc-ticket,
.pc-bracelet,
.pc-doodle {
  position: absolute; z-index: 2; pointer-events: none;
  filter: sepia(.12) saturate(.9);
}
.pc-ticket {
  left: 6%; bottom: 18%;
  width: 92px; height: 56px;
  display: grid; place-items: center;
  background:
    linear-gradient(rgba(255,250,236,.74), rgba(220,197,158,.62)),
    url("../assets/tex-paper.jpg") center / 180px;
  border: 1px solid rgba(118,88,48,.24);
  box-shadow: 0 10px 20px rgba(78,52,24,.14);
  transform: rotate(-7deg);
  opacity: .82;
  clip-path: polygon(0 0, 100% 0, 100% 34%, 90% 50%, 100% 66%, 100% 100%, 0 100%, 0 66%, 10% 50%, 0 34%);
}
.pc-ticket b {
  font-family: var(--font-title); font-size: 1.8rem; line-height: .8;
  color: #812f2e;
}
.pc-ticket span {
  margin-top: -12px;
  font-family: var(--font-hand); font-size: .88rem; color: var(--ink-soft);
}
.pc-bracelet {
  right: 7%; bottom: 8%;
  display: flex; gap: 4px;
  transform: rotate(6deg);
  opacity: .9;
}
.pc-bracelet span {
  min-width: 23px; height: 23px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #fff8ec, #d6c39d);
  border: 1px solid rgba(118,88,48,.26);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.86), 0 4px 8px rgba(78,52,24,.15);
  color: rgba(64,49,36,.75);
  font-family: var(--font-body); font-size: .62rem; font-weight: 700;
}
.pc-doodle {
  right: 6%; top: 27%;
  padding: 10px 16px 8px;
  background:
    linear-gradient(rgba(255,250,238,.76), rgba(232,218,190,.66)),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(120,90,50,.1) 19px 20px),
    url("../assets/tex-paper.jpg") center / 190px;
  border: 1px solid rgba(118,88,48,.18);
  box-shadow: 0 10px 22px rgba(78,52,24,.13);
  color: var(--ink-soft);
}
.pc-doodle::before {
  content: "";
  position: absolute; top: -11px; left: 22px;
  width: 58px; height: 20px;
  background: rgba(210,185,126,.36);
  border-left: 1px dashed rgba(255,255,255,.45);
  border-right: 1px dashed rgba(255,255,255,.45);
  transform: rotate(-4deg);
}
.pc-doodle span,
.pc-doodle b {
  display: block;
  font-family: var(--font-hand); font-weight: 400;
}
.pc-doodle span { font-size: 1rem; }
.pc-doodle b { margin-top: -4px; font-size: 1.18rem; color: #70413f; }
.pc-doodle--school { transform: rotate(4deg); }

/* long thread across the card */
.pc-thread { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.pc-thread path {
  fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 1700; stroke-dashoffset: 1700; opacity: .8;
}
.postcard.is-active .pc-thread path { animation: draw 3.4s ease forwards .4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* polaroid on the card */
.pc-photo {
  position: relative; z-index: 3;
  align-self: start; justify-self: center;
  width: min(78%, 240px);
  background: #faf7ef; padding: 9px 9px 40px; border-radius: 2px;
  box-shadow: 0 12px 24px rgba(60,40,20,.3);
  transform: rotate(-3deg); margin-top: .6rem;
}
.pc-photo__img {
  aspect-ratio: 4 / 3.4;
  background: linear-gradient(135deg,#dccdb2,#c8b593);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-family: var(--font-hand); font-size: .95rem; text-align: center;
}
.pc-photo__cap { font-family: var(--font-hand); font-size: 1rem; text-align: center; margin-top: 8px; color: var(--ink); }
.pc-tape {
  position: absolute; width: 84px; height: 26px; background: rgba(216,192,127,.4);
  border-left: 1px dashed rgba(255,255,255,.45); border-right: 1px dashed rgba(255,255,255,.45);
  top: -13px; left: 50%; transform: translateX(-50%) rotate(-3deg);
}

/* deck nav */
.deck-nav { display: flex; align-items: center; gap: 1.4rem; margin-top: 1.6rem; }
.deck-nav__btn {
  width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
  background:
    linear-gradient(rgba(255,250,238,.55), rgba(240,228,204,.5)),
    url("../assets/tex-paper.jpg") center / 200px;
  border: 1px solid rgba(120,90,50,.35); color: var(--ink);
  font-size: 1.5rem; line-height: 1; box-shadow: 0 6px 14px rgba(60,40,20,.22);
  transition: transform .3s;
}
.deck-nav__btn:hover { transform: translateY(-3px); }
.deck-nav__dots { display: flex; gap: .6rem; }
.deck-nav__dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(120,90,50,.3); transition: all .3s; cursor: pointer; }
.deck-nav__dots span.is-active { background: var(--seal); transform: scale(1.3); }

/* =================================================================
   SCENE 4 — cassette
   ================================================================= */
.player { text-align: center; max-width: 560px; width: 100%; }
.player__cassette { position: relative; width: min(420px, 84vw); margin: 0 auto 1.6rem; filter: drop-shadow(var(--shadow)); }
.player__cassette svg { width: 100%; }
.player__title {
  position: absolute; top: 15%; left: 50%; transform: translateX(-50%);
  font-family: var(--font-script); font-size: clamp(1.4rem, 4vw, 1.9rem); color: var(--ink);
}
.player__embed { margin-top: .4rem; }
.player__embed iframe { border-radius: 14px; width: 100%; }
.player__placeholder {
  border: 1.5px dashed rgba(120,90,50,.45); border-radius: 12px; padding: 2rem;
  font-family: var(--font-hand); font-size: 1.25rem; color: var(--ink-soft); line-height: 1.7;
  background: rgba(250,244,230,.4);
}
.player__placeholder small { font-family: var(--font-body); font-style: italic; font-size: .78rem; }
.player__placeholder code { font-family: monospace; font-style: normal; background: rgba(120,90,50,.12); padding: 1px 5px; border-radius: 3px; }

/* =================================================================
   SCENE 5 — polaroids
   ================================================================= */
.photos__title { font-family: var(--font-title); font-style: italic; font-weight: 600; font-size: clamp(2rem,5vw,3.2rem); margin: 0 0 2rem; }
.polaroids { display: flex; gap: clamp(1rem,3vw,2.4rem); flex-wrap: wrap; justify-content: center; max-width: 1000px; }
.polaroid {
  background: #faf7ef; padding: 12px 12px 46px; border-radius: 2px;
  box-shadow: 0 14px 28px rgba(60,40,20,.3);
  width: clamp(150px, 22vw, 220px);
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}
.polaroid:nth-child(odd)  { transform: rotate(-4deg); }
.polaroid:nth-child(even) { transform: rotate(3deg); }
.polaroid:hover { transform: rotate(0) translateY(-10px) scale(1.05); z-index: 5; }
.polaroid__img {
  aspect-ratio: 1; background: linear-gradient(135deg,#dccdb2,#c8b593);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-family: var(--font-hand); text-align: center; padding: 1rem;
}
.polaroid__cap { font-family: var(--font-hand); font-size: 1.05rem; text-align: center; margin-top: 10px; color: var(--ink); }

/* =================================================================
   SVG helpers
   ================================================================= */
.fill-paper { fill: #f6efdd; }
.fill-ink { fill: var(--ink); }
.fill-ink-soft { fill: #c9b593; }
.fill-seal { fill: var(--seal); }
.fill-cass { fill: var(--cass); }
.fill-cass-2 { fill: var(--cass-2); }
.stroke-ink { stroke: var(--ink-soft); stroke-width: 2; }
.stroke-ink-soft { stroke: rgba(107,93,75,.4); stroke-width: 1.5; }
.stroke-paper { stroke: #f6efdd; stroke-width: 3; }
.seal-letter { fill: #f3e6d2; font-family: var(--font-seal); font-size: 20px; }
.seal-letter-big { fill: rgba(255,240,220,.88); font-family: var(--font-seal); font-size: 34px; }
.seal-ring { fill: none; stroke: rgba(255,235,215,.38); stroke-width: 2; stroke-dasharray: 3 4; }

/* =================================================================
   audio toggle
   ================================================================= */
.audio-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 70;
  width: 44px; height: 44px; border-radius: 50%;
  background:
    linear-gradient(rgba(255,250,238,.6), rgba(240,228,204,.55)),
    url("../assets/tex-paper.jpg") center / 160px;
  border: 1px solid rgba(120,90,50,.35);
  cursor: pointer; color: var(--ink-soft); box-shadow: 0 4px 10px rgba(60,40,20,.22);
  opacity: .86;
  transition: transform .3s, color .3s, opacity .3s, visibility .3s;
}
.audio-toggle:hover { transform: scale(1.08); }
.audio-toggle.is-on { color: var(--seal); }
.audio-toggle.is-on .audio-toggle__icon { animation: sound-breathe 1.8s ease-in-out infinite; display: inline-block; }
@keyframes sound-breathe { 50% { opacity: .55; transform: scale(.88); } }

.audio-toggle[data-playback-blocked] {
  animation: sound-nudge 1.6s ease-in-out 2;
}

@keyframes sound-nudge {
  50% { box-shadow: 0 0 0 5px rgba(255,248,237,.2), 0 5px 14px rgba(20,12,17,.3); }
}

body:not([data-scene="box"]):not([data-scene="cassette"]):not([data-scene="photos"]):not([data-scene="magazine"]) .audio-toggle.is-box-sound {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
}

body[data-scene="magazine"] .audio-toggle {
  top: 19px;
  right: 148px;
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(10, 9, 12, .38);
  color: rgba(255, 255, 255, .84);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

body[data-scene="magazine"] .audio-toggle.is-on {
  color: #fff1b7;
}

/* =================================================================
   responsive
   ================================================================= */
@media (max-width: 720px) {
  .stage { height: min(58vh, 470px); }
  .box3d { --box-w: min(88vw, 330px); --box-h: min(56vw, 214px); transform: rotate(-4.5deg); }
  .scene--box:not(.is-open) .box3d:hover { transform: rotate(-4.5deg); }
  .lid-collage--stamp { width: 64px; height: 42px; }
  .lid-collage--mushroom { width: 58px; height: 50px; }
  .lid-collage--butterfly { width: 68px; height: 58px; }
  .lid-address { width: 82px; height: 44px; }
  .lid-address span { font-size: 1rem; }
  .lid-address small { font-size: .62rem; }
  .lid-wax { width: 46px; height: 46px; }
  .lid-bow { width: 78px; }
  .lid-tag { padding: 5px 12px 5px 18px; }
  .lid-tag__text { font-size: 1.08rem; }
  .floater--letter { left: 0; top: 20%; }
  .floater--photos { right: 0; top: 22%; }
  .postcard { grid-template-columns: 1fr; grid-template-rows: none; overflow-y: auto; }
  .pc-note, .pc-hands, .pc-ticket, .pc-bracelet, .pc-doodle, .pc-img--moon { display: none; }
  .ambient__paper--note, .ambient__paper--stamp, .ambient__moon--scrap, .ambient__vinyl { display: none; }
  .ambient__paper--ticket {
    top: 9vh; left: -18px;
    transform: rotate(-9deg) scale(.78);
  }
  .ambient__bracelet {
    bottom: 1.8vh;
    transform: translateX(-50%) rotate(-3deg) scale(.8);
    opacity: .28;
  }
  .ambient__rose--scrap {
    left: -76px; bottom: 17vh;
    width: 150px; height: 150px;
    opacity: .18;
  }
}

/* =================================================================
   FINAL BOX PASS — photoreal image layers, stable animation
   ================================================================= */
.scene--box {
  padding-top: 4vh;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
}
.box-film {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: #0d0b0f url("../assets/video/eras-intro-poster.jpg?v=trim-15-crop-1") center / cover no-repeat;
  transition: opacity .8s ease, visibility .8s ease;
}
body[data-scene="box"] .box-film,
body[data-scene="cassette"] .box-film {
  opacity: 1;
  visibility: visible;
}
.box-film video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(.76) contrast(.94) brightness(.58);
  transform: scale(1.025);
  transition: filter .8s ease;
}
.box-film::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 49%, rgba(8,6,10,.04) 0 27%, rgba(9,7,11,.28) 64%, rgba(7,5,8,.72) 100%),
    linear-gradient(180deg, rgba(10,8,12,.5), rgba(14,10,15,.08) 42%, rgba(9,7,10,.48));
  transition: background .8s ease;
}

.photos-film {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: #0b1422 url("../assets/video/your-name-polaroids-poster.jpg?v=trim-10-7-1") center / cover no-repeat;
  transition: opacity .9s ease, visibility .9s ease;
}

body[data-scene="photos"] .photos-film {
  opacity: 1;
  visibility: visible;
}

.photos-film video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(.88) contrast(.98) brightness(.76);
  transform: scale(1.012);
}

.photos-film::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 52% 46%, rgba(4, 8, 17, .02) 0 32%, rgba(5, 7, 14, .24) 78%, rgba(4, 6, 12, .42) 100%),
    linear-gradient(180deg, rgba(5, 8, 16, .22), rgba(5, 7, 13, .08) 42%, rgba(5, 6, 12, .3));
}
body[data-scene="cassette"] .box-film {
  opacity: 1;
}
body[data-scene="cassette"] .box-film video {
  filter: saturate(.68) contrast(.96) brightness(.46);
}
body[data-scene="cassette"] .box-film::after {
  background:
    radial-gradient(ellipse at 33% 50%, rgba(7,6,9,.18) 0 24%, rgba(8,6,10,.58) 74%, rgba(6,5,8,.8) 100%),
    linear-gradient(90deg, rgba(7,6,9,.28), rgba(8,6,10,.54) 58%, rgba(7,5,8,.76));
}
.scene--box > :not(.box-film) {
  position: relative;
  z-index: 2;
}
.scene--box .box-title {
  color: #fff8ed;
  text-shadow: 0 3px 24px rgba(0,0,0,.54);
}
.scene--box .hint {
  color: rgba(255,248,237,.88);
  text-shadow: 0 2px 16px rgba(0,0,0,.72);
}
.box-title {
  margin-bottom: 2.4rem;
  transition: opacity .8s ease .8s, transform .8s ease .8s;
}
.stage {
  width: min(96vw, 980px);
  height: min(64vh, 610px);
}
.ground-shadow {
  left: 50%;
  bottom: 7%;
  width: min(70vw, 700px);
  height: 126px;
  transform: translateX(-50%) rotate(-3deg);
  background:
    radial-gradient(50% 48% at 50% 48%, rgba(33,22,12,.34), rgba(33,22,12,.1) 56%, rgba(33,22,12,0) 74%);
  filter: blur(12px);
  opacity: .72;
}
.scene--box.is-open .ground-shadow {
  transform: translateX(-50%) rotate(-3deg) scale(.94);
  opacity: .64;
}
.scene3d {
  left: 50%;
  bottom: 8%;
  width: min(82vw, 720px);
  aspect-ratio: 16 / 10;
  transform: translateX(-50%);
  perspective: none;
}
.box3d {
  --box-w: auto;
  --box-h: auto;
  width: 100%;
  height: 100%;
  transform: rotate(-2.4deg);
  transform-style: flat;
  filter: none;
  cursor: pointer;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.scene--box:not(.is-open) .box3d:hover {
  transform: rotate(-2.4deg) translateY(-5px);
}
.scene--box.is-open .box3d {
  cursor: default;
}
.box-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform-origin: 50% 55%;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-drag: none;
}
.box-photo--open {
  z-index: 1;
  opacity: 0;
  transform: translateY(12px) scale(.985);
  filter: drop-shadow(0 28px 24px rgba(42,27,13,.24));
}
.box-photo--closed {
  z-index: 3;
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: drop-shadow(0 30px 24px rgba(42,27,13,.26));
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.scene--box:not(.is-open) .box3d:hover .box-photo--closed {
  transform: translateY(-2px) scale(1.004);
}
.scene--box.is-open .box-photo--open {
  animation: open-photo-in .72s cubic-bezier(.22,.61,.36,1) .2s both;
}
.scene--box.is-open .box-photo--closed {
  animation: closed-photo-away 1.45s cubic-bezier(.42,0,.22,1) both;
  pointer-events: none;
}
@keyframes open-photo-in {
  from { opacity: 0; transform: translateY(18px) scale(.975); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes closed-photo-away {
  0%   { opacity: 1; transform: translate3d(0,0,0) scale(1) rotate(0deg); }
  42%  { opacity: 1; transform: translate3d(0,-44px,0) scale(1.012) rotate(-1deg); }
  100% { opacity: 0; transform: translate3d(-24vw,-150px,0) scale(.92) rotate(-9deg); }
}
.floaters {
  z-index: 8;
}
.floater {
  --base-transform: translate(0, 0);
  --rest-rotation: 0deg;
  gap: .45rem;
  opacity: 0;
  transform: var(--base-transform) translateY(82px) scale(.88) rotate(0deg);
  transition: filter .25s ease;
}
.floater__art {
  filter: drop-shadow(0 16px 18px rgba(42,27,13,.28));
}
.floater__label {
  border-radius: 4px;
  background:
    linear-gradient(rgba(255,250,238,.78), rgba(236,222,196,.72)),
    url("../assets/tex-paper.jpg") center / 180px;
  border: 1px solid rgba(120,90,50,.18);
  box-shadow: 0 6px 10px rgba(42,27,13,.13);
  white-space: nowrap;
}
.floater:hover {
  filter: brightness(1.03);
}
.floater:hover .floater__art {
  transform: translateY(-6px) scale(1.035);
}
.floater--letter {
  left: 2%;
  top: 27%;
  width: clamp(138px, 19vw, 190px);
  --rest-rotation: -2deg;
}
.floater--songs {
  left: 50%;
  top: 6%;
  width: clamp(156px, 21vw, 218px);
  --base-transform: translateX(-50%);
  --rest-rotation: 1deg;
}
.floater--photos {
  right: 1%;
  top: 28%;
  width: clamp(138px, 19vw, 190px);
  --rest-rotation: 2deg;
}
.scene--box.is-open .floater {
  pointer-events: auto;
}
.scene--box.is-open .floater--letter {
  animation: keepsake-item-in .64s cubic-bezier(.22,.61,.36,1) .92s both;
}
.scene--box.is-open .floater--songs {
  animation: keepsake-item-in .64s cubic-bezier(.22,.61,.36,1) 1.06s both;
}
.scene--box.is-open .floater--photos {
  animation: keepsake-item-in .64s cubic-bezier(.22,.61,.36,1) 1.2s both;
}
@keyframes keepsake-item-in {
  from {
    opacity: 0;
    transform: var(--base-transform) translateY(82px) scale(.88) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: var(--base-transform) translateY(0) scale(1) rotate(var(--rest-rotation));
  }
}

@media (max-width: 720px) {
  .scene--box {
    padding-top: 3vh;
  }
  .box-title {
    font-size: clamp(2.8rem, 16vw, 4.4rem);
    margin-bottom: 1rem;
  }
  .stage {
    width: 100vw;
    height: min(68vh, 570px);
  }
  .scene3d {
    width: min(104vw, 470px);
    bottom: 10%;
  }
  .ground-shadow {
    bottom: 10%;
    width: 90vw;
    height: 82px;
    filter: blur(10px);
  }
  .floater__label {
    font-size: 1.05rem;
    white-space: normal;
    max-width: 128px;
    line-height: 1.05;
    padding: 3px 9px;
  }
  .floater--letter {
    left: 2%;
    top: 31%;
    width: 116px;
  }
  .floater--songs {
    top: 6%;
    width: 142px;
  }
  .floater--photos {
    right: 2%;
    top: 31%;
    width: 118px;
  }
  .scene--box.is-open .floater--letter {
    animation-delay: .86s;
  }
  .scene--box.is-open .floater--songs {
    animation-delay: .98s;
  }
  .scene--box.is-open .floater--photos {
    animation-delay: 1.1s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .box-film video,
  .photos-film video {
    display: none;
  }
}

/* =================================================================
   FINAL ENVELOPE PASS — photoreal image layers, no fake flap geometry
   ================================================================= */
.scene--envelope {
  padding: 4vh 4vw 8vh;
}
.env {
  width: min(84vw, 720px);
  aspect-ratio: 3 / 2;
  position: relative;
  filter: drop-shadow(0 28px 28px rgba(55,35,18,.24));
  transform: rotate(-1.6deg);
}
.env-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 50% 58%;
  will-change: transform, opacity;
}
.env-photo--open {
  z-index: 1;
  opacity: 0;
  transform: translateY(14px) scale(.98);
}
.env-photo--closed {
  z-index: 2;
  opacity: 1;
  transform: translateY(0) scale(1);
}
.env__seal {
  position: absolute;
  z-index: 5;
  left: 44%;
  top: 47%;
  width: 16%;
  height: 22%;
  transform: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: none;
}
.env__seal::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: 58%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(138,47,44,.34);
  animation: seal-pulse 2.4s ease-in-out infinite;
}
.env__seal:hover::after {
  box-shadow: 0 0 0 10px rgba(138,47,44,.12);
}
.env.is-open .env__seal {
  pointer-events: none;
}
.env.is-open .env__seal::after {
  animation: none;
  opacity: 0;
}
.env.is-open .env-photo--open {
  animation: envelope-open-in .82s cubic-bezier(.22,.61,.36,1) .18s both;
}
.env.is-open .env-photo--closed {
  animation: envelope-seal-away .72s cubic-bezier(.42,0,.22,1) both;
}
@keyframes seal-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(138,47,44,.22); opacity: .68; }
  50% { box-shadow: 0 0 0 12px rgba(138,47,44,0); opacity: 1; }
}
@keyframes envelope-open-in {
  from { opacity: 0; transform: translateY(18px) scale(.975) rotate(.6deg); }
  to   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes envelope-seal-away {
  0%   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
  45%  { opacity: .88; transform: translateY(-8px) scale(1.012) rotate(-.7deg); }
  100% { opacity: 0; transform: translateY(22px) scale(.965) rotate(1.4deg); }
}
.scene--envelope .hint {
  margin-top: 1.1rem;
}

@media (max-width: 720px) {
  .scene--envelope {
    padding: 3vh 3vw 9vh;
  }
  .env {
    width: min(96vw, 430px);
  }
  .env__seal {
    left: 42%;
    top: 46%;
    width: 20%;
    height: 25%;
  }
  .scene--envelope .hint {
    margin-top: .4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .2s !important; }
}

/* =================================================================
   ERA EDITORIAL PASS — five distinct worlds, one keepsake
   ================================================================= */
:root {
  --font-ui: "DM Sans", sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-page: cubic-bezier(.22, .72, .18, 1);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body {
  isolation: isolate;
  transition: color .6s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, #e8dfc6, #8a9577 52%, #eee2c4);
  transition: opacity .8s ease, background .9s ease;
}

body[data-scene="postcards"]::before,
body[data-scene="cassette"]::before,
body[data-scene="photos"]::before {
  opacity: 1;
}

body[data-scene="postcards"][data-era="invisible-string"]::before {
  background: linear-gradient(135deg, #20271f 0%, #708064 45%, #d9c995 100%);
}

body[data-scene="postcards"][data-era="cardigan"]::before {
  background: linear-gradient(135deg, #151a18 0%, #34423d 52%, #9a998c 100%);
}

body[data-scene="postcards"][data-era="lover"]::before {
  background: linear-gradient(135deg, #c77f9e 0%, #98cadf 48%, #f1d39b 100%);
}

body[data-scene="postcards"][data-era="so-high-school"]::before {
  background: linear-gradient(135deg, #2a0c13 0%, #8d1d31 51%, #d6b8a4 100%);
}

body[data-scene="postcards"][data-era="mine"]::before {
  background: linear-gradient(135deg, #10152f 0%, #4e467f 53%, #a277a6 100%);
}

body[data-scene="cassette"]::before {
  background: linear-gradient(135deg, #171514 0%, #42352d 46%, #8c6f56 100%);
}

body[data-scene="photos"]::before {
  background: linear-gradient(135deg, #1a171d 0%, #514254 45%, #986f78 100%);
}

body[data-scene="postcards"] .ambient__paper,
body[data-scene="postcards"] .ambient__vinyl,
body[data-scene="postcards"] .ambient__bracelet,
body[data-scene="postcards"] .ambient__rose,
body[data-scene="postcards"] .ambient__moon,
body[data-scene="cassette"] .ambient__paper,
body[data-scene="cassette"] .ambient__bracelet,
body[data-scene="cassette"] .ambient__rose,
body[data-scene="cassette"] .ambient__moon,
body[data-scene="photos"] .ambient__paper,
body[data-scene="photos"] .ambient__vinyl,
body[data-scene="photos"] .ambient__bracelet,
body[data-scene="photos"] .ambient__rose,
body[data-scene="photos"] .ambient__moon {
  opacity: 0;
  transition: opacity .5s ease;
}

body[data-scene="postcards"] .ambient__star,
body[data-scene="cassette"] .ambient__star,
body[data-scene="photos"] .ambient__star {
  fill: #fff5d0;
  opacity: .52;
}

.scene-transition {
  position: fixed;
  inset: 0;
  z-index: 65;
  overflow: hidden;
  pointer-events: none;
}

.scene-transition span {
  position: absolute;
  inset: -30% -20%;
  background: linear-gradient(90deg, transparent 38%, rgba(255, 250, 235, .05) 43%, rgba(255, 250, 235, .88) 50%, rgba(255, 250, 235, .08) 57%, transparent 62%);
  transform: translateX(-125%) skewX(-9deg);
  opacity: 0;
}

body.is-changing .scene-transition span {
  animation: scene-sweep .72s var(--ease-page) both;
}

@keyframes scene-sweep {
  0% { transform: translateX(-125%) skewX(-9deg); opacity: 0; }
  18% { opacity: .75; }
  100% { transform: translateX(125%) skewX(-9deg); opacity: 0; }
}

.scene {
  transform: scale(.985);
  filter: blur(7px);
  transition: opacity .52s ease, visibility .52s ease, transform .72s var(--ease-out), filter .52s ease;
}

.scene.is-active {
  transform: scale(1);
  filter: none;
}

.btn-back {
  top: 20px;
  bottom: auto;
  left: 22px;
  z-index: 30;
  transform: none;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 4px;
  background: rgba(27, 23, 22, .18);
  color: rgba(255, 255, 255, .88);
  font-family: var(--font-ui);
  font-size: .76rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  backdrop-filter: blur(10px);
  opacity: .82;
}

body[data-scene="envelope"] .btn-back {
  color: var(--ink-soft);
  border-color: rgba(94, 69, 38, .2);
  background: rgba(255, 249, 235, .48);
}

.btn-back:hover,
.btn-back:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
}

button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid rgba(255, 247, 216, .95);
  outline-offset: 4px;
}

#box:focus-visible {
  outline: 0;
  filter: drop-shadow(0 0 12px rgba(255, 247, 216, .75));
}

/* ---------- physical keepsakes after the box opens ---------- */
.floater__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.floater__art--letter {
  width: 114%;
  aspect-ratio: 3 / 2;
}

.floater__art--cassette {
  width: 116%;
  aspect-ratio: 3 / 2;
}

.floater__art--photos {
  position: relative;
  width: 132px;
  height: 116px;
}

.floater__art--photos i {
  --turn: 0deg;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 96px;
  padding: 6px 6px 21px;
  background: #fffaf1;
  box-shadow: 0 10px 18px rgba(35, 25, 18, .22);
  transform: translate(-50%, -50%) rotate(var(--turn));
}

.floater__art--photos i::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--photo) center / cover;
}

.floater__art--photos i:nth-child(1) { --turn: -12deg; margin-left: -25px; }
.floater__art--photos i:nth-child(2) { --turn: 9deg; margin-left: 23px; }
.floater__art--photos i:nth-child(3) { --turn: -1deg; margin-top: -8px; }

.scene--box.is-open .floater--letter .floater__art { animation: keepsake-drift-a 5.6s ease-in-out 1.7s infinite; }
.scene--box.is-open .floater--songs .floater__art { animation: keepsake-drift-b 6.2s ease-in-out 1.8s infinite; }
.scene--box.is-open .floater--photos .floater__art { animation: keepsake-drift-a 5.9s ease-in-out 1.9s infinite reverse; }

@keyframes keepsake-drift-a {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}

@keyframes keepsake-drift-b {
  0%, 100% { transform: translateY(0) rotate(1deg); }
  50% { transform: translateY(-7px) rotate(-1deg); }
}

/* ---------- the five-song editorial deck ---------- */
.scene--postcards {
  justify-content: center;
  padding: 2.2vh 2vw 3vh;
  color: #fff9e9;
}

.era-backdrop {
  position: absolute;
  inset: -5%;
  z-index: 0;
  background-position: center;
  background-size: cover;
  opacity: .18;
  filter: blur(26px) saturate(.78) brightness(.72);
  transform: scale(1.08);
  transition: background-image .45s ease, opacity .45s ease;
}

.era-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, .2), rgba(10, 10, 12, .38));
}

.chapter-head,
.deck,
.deck-nav {
  position: relative;
  z-index: 2;
}

.chapter-head {
  width: min(1040px, 94vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 9px;
  color: rgba(255, 250, 235, .9);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .25);
}

.chapter-head__eyebrow,
.chapter-head__count {
  font-family: var(--font-ui);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.chapter-head__count {
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

.deck {
  width: min(1040px, 94vw);
  height: min(72vh, 610px);
  perspective: 1800px;
  touch-action: pan-y;
}

.postcard {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 44% 56%;
  grid-template-rows: 100%;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 6px;
  background: #f6f0e3;
  box-shadow: 0 34px 80px -22px rgba(5, 5, 8, .62), 0 2px 0 rgba(255, 255, 255, .38) inset;
  opacity: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  transform: perspective(1500px) translateX(8%) rotateY(-8deg) scale(.94);
  transform-origin: 50% 50%;
  transition: opacity .52s ease, transform .78s var(--ease-page), filter .6s ease;
  will-change: transform, opacity;
}

.postcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: .11;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.postcard.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: perspective(1500px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateZ(0) scale(1);
  filter: none;
}

.postcard.is-left {
  opacity: 0;
  transform: perspective(1500px) translateX(-24%) rotateY(13deg) scale(.91);
  filter: brightness(.72);
}

.postcard.is-right {
  opacity: 0;
  transform: perspective(1500px) translateX(24%) rotateY(-13deg) scale(.91);
  filter: brightness(.72);
}

.postcard__art {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  background: #272923;
}

.postcard__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 8, .05), transparent 48%, rgba(8, 8, 8, .45));
  pointer-events: none;
}

.postcard__art-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.055);
  transition: transform 1.8s var(--ease-out), filter .7s ease;
}

.postcard.is-active .postcard__art-image {
  transform: scale(1);
}

.postcard__art-number,
.postcard__art-caption {
  position: absolute;
  z-index: 4;
  color: rgba(255, 250, 235, .9);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}

.postcard__art-number {
  top: 18px;
  left: 20px;
  font-family: var(--font-title);
  font-size: 2.4rem;
  font-style: italic;
  line-height: 1;
}

.postcard__art-caption {
  left: 20px;
  bottom: 18px;
  font-family: var(--font-ui);
  font-size: .59rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.postcard__copy {
  position: relative;
  z-index: 3;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 4vw, 54px);
  overflow: hidden;
  color: #29251f;
  background:
    linear-gradient(rgba(255, 252, 243, .88), rgba(243, 234, 215, .92)),
    url("../assets/tex-paper.jpg") center / cover;
}

.postcard[data-layout="art-right"] .postcard__art {
  grid-column: 2;
}

.postcard[data-layout="art-right"] .postcard__copy {
  grid-column: 1;
}

.postcard__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(12px, 2vh, 20px);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: .57rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.postcard__meta b {
  color: currentColor;
  font-size: inherit;
  font-variant-numeric: tabular-nums;
}

.postcard__title {
  display: block;
  margin: 0;
  color: inherit;
  font-family: var(--font-title);
  font-size: clamp(2.7rem, 5.2vw, 4.7rem);
  font-style: italic;
  font-weight: 600;
  line-height: .82;
}

.postcard__era {
  margin: 12px 0 clamp(18px, 3vh, 30px);
  color: var(--accent);
  font-family: var(--font-hand);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.2;
}

.postcard__prose {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  font-family: var(--font-body);
  font-size: clamp(.86rem, 1.25vw, 1.01rem);
  line-height: 1.5;
  text-align: left;
}

.postcard__prose p {
  margin: 0 0 .82em;
}

.postcard__prose em {
  color: var(--accent);
}

.postcard__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.postcard__footer span {
  color: var(--accent);
  font-family: var(--font-title);
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  font-style: italic;
}

.postcard__footer small {
  color: inherit;
  font-family: var(--font-hand);
  font-size: .9rem;
  text-align: right;
}

.postcard[data-era="cardigan"] .postcard__copy {
  color: #f2ecdf;
  background:
    linear-gradient(rgba(28, 35, 32, .94), rgba(38, 43, 38, .96)),
    url("../assets/tex-paper.jpg") center / cover;
}

.postcard[data-era="cardigan"] .postcard__meta,
.postcard[data-era="cardigan"] .postcard__era,
.postcard[data-era="cardigan"] .postcard__prose em,
.postcard[data-era="cardigan"] .postcard__footer span {
  color: #b8c4b5;
}

.postcard[data-era="lover"] .postcard__copy {
  background: linear-gradient(145deg, rgba(255, 249, 252, .97), rgba(239, 223, 237, .95) 55%, rgba(218, 238, 244, .92));
}

.postcard[data-layout="notebook"],
.postcard[data-layout="cinematic"] {
  display: block;
}

.postcard[data-layout="notebook"] .postcard__art,
.postcard[data-layout="cinematic"] .postcard__art {
  position: absolute;
  inset: 0;
}

.postcard[data-layout="notebook"] .postcard__copy {
  width: 62%;
  height: 100%;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 42px) clamp(24px, 4vw, 52px);
  background: linear-gradient(90deg, rgba(250, 244, 231, .08), rgba(250, 244, 231, .72) 14%, rgba(250, 244, 231, .76) 86%, rgba(250, 244, 231, .08));
  color: #322a27;
}

.postcard[data-layout="notebook"] .postcard__title {
  font-size: clamp(2.45rem, 4.6vw, 4.1rem);
  color: #7f182b;
}

.postcard[data-layout="notebook"] .postcard__era,
.postcard[data-layout="notebook"] .postcard__meta,
.postcard[data-layout="notebook"] .postcard__prose em,
.postcard[data-layout="notebook"] .postcard__footer span {
  color: #8e2335;
}

.postcard[data-layout="cinematic"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(14, 16, 45, .92) 0%, rgba(20, 21, 58, .78) 52%, rgba(20, 21, 58, .16) 78%, transparent 100%);
}

.postcard[data-layout="cinematic"] .postcard__copy {
  width: 65%;
  height: 100%;
  padding: clamp(28px, 4vw, 52px);
  color: #fbf6f2;
  background: transparent;
}

.postcard[data-layout="cinematic"] .postcard__meta,
.postcard[data-layout="cinematic"] .postcard__era,
.postcard[data-layout="cinematic"] .postcard__prose em,
.postcard[data-layout="cinematic"] .postcard__footer span {
  color: #d8b9ef;
}

.postcard[data-layout="cinematic"] .postcard__footer {
  border-color: rgba(216, 185, 239, .3);
}

.postcard[data-layout="cinematic"] .postcard__art-number,
.postcard[data-layout="cinematic"] .postcard__art-caption {
  display: none;
}

/* Chapter-specific motion */
.chapter-deco {
  position: absolute;
  z-index: 5;
  pointer-events: none;
}

.chapter-deco--thread {
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chapter-deco--thread path {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  filter: drop-shadow(0 1px 2px rgba(53, 38, 4, .55));
}

.postcard.is-active .chapter-deco--thread path {
  animation: chapter-line 2.8s var(--ease-out) .35s forwards;
}

.chapter-deco--stars {
  inset: 0;
}

.chapter-deco--stars i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff6cc;
  transform: rotate(45deg) scale(0);
  box-shadow: 0 0 14px rgba(255, 244, 196, .8);
}

.chapter-deco--stars i:nth-child(1) { top: 14%; right: 18%; }
.chapter-deco--stars i:nth-child(2) { top: 27%; right: 8%; width: 4px; height: 4px; }
.chapter-deco--stars i:nth-child(3) { bottom: 23%; left: 16%; width: 5px; height: 5px; }
.chapter-deco--stars i:nth-child(4) { bottom: 13%; right: 28%; width: 4px; height: 4px; }

.postcard.is-active .chapter-deco--stars i { animation: chapter-star 2.6s ease-in-out infinite; }
.postcard.is-active .chapter-deco--stars i:nth-child(2) { animation-delay: .5s; }
.postcard.is-active .chapter-deco--stars i:nth-child(3) { animation-delay: 1s; }
.postcard.is-active .chapter-deco--stars i:nth-child(4) { animation-delay: 1.4s; }

.chapter-deco--ribbon {
  left: -6%;
  right: -6%;
  bottom: 3%;
  width: 112%;
  height: 30%;
  overflow: visible;
}

.chapter-deco--ribbon path {
  fill: none;
  stroke: rgba(246, 188, 208, .92);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  filter: drop-shadow(0 3px 3px rgba(91, 40, 62, .2));
}

.postcard.is-active .chapter-deco--ribbon path {
  animation: chapter-line 2.2s var(--ease-out) .3s forwards;
}

.chapter-deco--scribble {
  right: 7%;
  bottom: 9%;
  width: 64px;
  height: 56px;
  color: #8f1f31;
  transform: rotate(7deg);
}

.chapter-deco--scribble i,
.chapter-deco--scribble i::after {
  position: absolute;
  width: 28px;
  height: 44px;
  border: 3px solid currentColor;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom: 0;
  content: "";
}

.chapter-deco--scribble i {
  left: 14px;
  top: 2px;
  transform: rotate(-45deg);
}

.chapter-deco--scribble i::after {
  left: 13px;
  top: 13px;
  transform: rotate(90deg);
}

.chapter-deco--scribble span {
  position: absolute;
  right: -3px;
  bottom: -2px;
  font: 700 .72rem var(--font-ui);
}

.chapter-deco--constellation {
  top: 10%;
  right: 6%;
  width: 26%;
  opacity: .82;
}

.chapter-deco--constellation path {
  fill: none;
  stroke: rgba(255, 232, 174, .68);
  stroke-width: 1;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
}

.chapter-deco--constellation circle {
  fill: #ffe8a8;
  opacity: 0;
}

.postcard.is-active .chapter-deco--constellation path { animation: chapter-line 2.5s ease .45s forwards; }
.postcard.is-active .chapter-deco--constellation circle { animation: chapter-dot .5s ease 1.6s forwards; }

@keyframes chapter-line { to { stroke-dashoffset: 0; } }
@keyframes chapter-dot { to { opacity: 1; } }
@keyframes chapter-star {
  0%, 100% { transform: rotate(45deg) scale(.35); opacity: .35; }
  50% { transform: rotate(45deg) scale(1); opacity: 1; }
}

.deck-nav {
  width: min(1040px, 94vw);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.deck-nav__btn {
  width: 44px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 4px;
  background: rgba(18, 18, 21, .2);
  box-shadow: 0 10px 24px rgba(4, 4, 8, .18);
  color: rgba(255, 251, 239, .94);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  backdrop-filter: blur(12px);
}

.deck-nav__btn:hover,
.deck-nav__btn:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .17);
}

.deck-nav__dots {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 6px;
  background: rgba(12, 12, 16, .18);
  backdrop-filter: blur(14px);
}

.deck-nav__dot {
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: rgba(255, 250, 237, .6);
  cursor: pointer;
  font-family: var(--font-ui);
  transition: color .25s ease, background .25s ease, transform .25s ease;
}

.deck-nav__dot span {
  font-size: .58rem;
  font-variant-numeric: tabular-nums;
}

.deck-nav__dot b {
  overflow: hidden;
  font-size: .66rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-nav__dot:hover {
  color: #fffaf0;
  background: rgba(255, 255, 255, .08);
}

.deck-nav__dot.is-active {
  color: #27221f;
  background: rgba(255, 250, 238, .92);
  box-shadow: 0 5px 14px rgba(4, 4, 8, .14);
}

/* ---------- mixtape ---------- */
.scene--cassette {
  padding: 6vh 5vw;
  color: #f5eddf;
}

.mixtape {
  width: min(1120px, 92vw);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  align-items: center;
  gap: clamp(32px, 7vw, 90px);
}

.mixtape__visual {
  position: relative;
  min-width: 0;
}

.mixtape__side {
  position: absolute;
  top: -3%;
  left: 4%;
  z-index: 3;
  margin: 0;
  color: #e9d7b9;
  font-family: var(--font-ui);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.mixtape__side span {
  display: block;
  margin-top: 2px;
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-style: italic;
  letter-spacing: 0;
  line-height: .8;
}

.mixtape__cassette {
  display: block;
  width: 100%;
  filter: drop-shadow(0 36px 35px rgba(0, 0, 0, .46));
  transform: rotate(-1.5deg);
}

.scene--cassette.is-active .mixtape__cassette {
  animation: cassette-settle 1.1s var(--ease-out) both;
}

.mixtape__label {
  position: absolute;
  left: 52%;
  top: 23.5%;
  z-index: 3;
  width: 44%;
  transform: translate(-50%, -50%) rotate(-5.5deg);
  text-align: center;
  color: #2d2925;
  pointer-events: none;
}

.mixtape__label strong,
.mixtape__label small {
  display: block;
}

.mixtape__label strong {
  font-family: var(--font-script);
  font-size: clamp(1.45rem, 2.5vw, 2.25rem);
  font-weight: 400;
  line-height: .9;
}

.mixtape__label small {
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: clamp(.42rem, .62vw, .5rem);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mixtape__list {
  min-width: 0;
  padding-left: clamp(24px, 4vw, 50px);
  border-left: 1px solid rgba(255, 255, 255, .2);
}

.mixtape__list > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 18px;
  color: rgba(245, 237, 223, .58);
  font-family: var(--font-ui);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.mixtape__spotify {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px 6px 6px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 4px;
  background: rgba(7, 8, 10, .3);
  color: rgba(250, 244, 234, .82);
  font: inherit;
  letter-spacing: .11em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s var(--ease-out);
}

.mixtape__spotify-play {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding-left: 1px;
  border-radius: 50%;
  background: #1ed760;
  color: #07130b;
  font-size: .46rem;
  line-height: 1;
  box-shadow: 0 0 0 3px rgba(30, 215, 96, .08);
}

.mixtape__spotify-arrow {
  color: rgba(250, 244, 234, .48);
  font-size: .72rem;
  line-height: 1;
  transition: color .25s ease, transform .25s var(--ease-out);
}

.mixtape__spotify:hover,
.mixtape__spotify:focus-visible {
  border-color: rgba(30, 215, 96, .52);
  background: rgba(13, 22, 17, .58);
  color: #fffaf2;
  transform: translateY(-1px);
}

.mixtape__spotify:hover .mixtape__spotify-arrow,
.mixtape__spotify:focus-visible .mixtape__spotify-arrow {
  color: #1ed760;
  transform: translate(1px, -1px);
}

.mixtape-track {
  position: relative;
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: transparent;
  color: #f7efe2;
  text-align: left;
  cursor: pointer;
  transition: padding .3s var(--ease-out), color .3s ease;
}

.mixtape-track:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.mixtape-track::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--track-accent);
  transform: translateY(-50%);
  transition: height .3s var(--ease-out);
}

.mixtape-track:hover,
.mixtape-track:focus-visible,
.mixtape-track.is-current {
  padding-left: 8px;
  color: #fffaf2;
}

.mixtape-track:hover::before,
.mixtape-track:focus-visible::before,
.mixtape-track.is-current::before {
  height: 36px;
}

.mixtape-track > span {
  color: rgba(245, 237, 223, .42);
  font: 500 .6rem var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.mixtape-track strong {
  overflow: hidden;
  font-family: var(--font-title);
  font-size: 1.42rem;
  font-style: italic;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mixtape-track small {
  color: rgba(245, 237, 223, .48);
  font: 500 .55rem var(--font-ui);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mixtape-track i {
  color: rgba(245, 237, 223, .5);
  font-family: var(--font-ui);
  font-style: normal;
}

@keyframes cassette-settle {
  from { opacity: 0; transform: translateY(70px) rotate(-8deg) scale(.88); }
  to { opacity: 1; transform: translateY(0) rotate(-1.5deg) scale(1); }
}

/* ---------- five visual chapters / polaroids ---------- */
.scene--photos {
  justify-content: center;
  padding: 6vh 4vw;
  color: #fff8ec;
}

.photos__head {
  width: min(1120px, 92vw);
  margin-bottom: clamp(22px, 4vh, 42px);
  text-shadow: 0 3px 24px rgba(0, 0, 0, .58);
}

.photos__head > span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 248, 236, .6);
  font: 600 .62rem var(--font-ui);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.photos__title {
  margin: 0;
  color: inherit;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: .86;
}

.polaroids {
  width: min(1120px, 92vw);
  max-width: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  align-items: center;
}

.polaroid {
  position: relative;
  width: 100%;
  padding: 10px 10px 46px;
  border: 0;
  border-radius: 3px;
  background: #fbf7ee;
  box-shadow: 0 22px 38px rgba(0, 0, 0, .34);
  color: #27231f;
  cursor: pointer;
  transform: rotate(var(--angle));
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out);
}

.scene--photos.is-active .polaroid {
  animation: polaroid-in .8s var(--ease-out) both;
}

.scene--photos.is-active .polaroid:nth-child(2) { animation-delay: .08s; }
.scene--photos.is-active .polaroid:nth-child(3) { animation-delay: .16s; }
.scene--photos.is-active .polaroid:nth-child(4) { animation-delay: .24s; }
.scene--photos.is-active .polaroid:nth-child(5) { animation-delay: .32s; }

.polaroid:hover,
.polaroid:focus-visible {
  z-index: 4;
  transform: translateY(-16px) rotate(0deg) scale(1.045);
  box-shadow: 0 34px 50px rgba(0, 0, 0, .42);
}

.polaroid::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  opacity: .72;
}

.polaroid__img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  display: block;
  overflow: hidden;
  background-size: cover;
  filter: saturate(.9) contrast(.98);
}

.polaroid__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 56%, rgba(12, 10, 11, .42));
}

.polaroid__img i {
  position: absolute;
  right: 9px;
  bottom: 7px;
  z-index: 2;
  color: rgba(255, 255, 255, .9);
  font: 600 .58rem var(--font-ui);
  font-style: normal;
  letter-spacing: .08em;
}

.polaroid__cap {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  display: block;
  text-align: left;
}

.polaroid__cap b,
.polaroid__cap small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.polaroid__cap b {
  font-family: var(--font-hand);
  font-size: .98rem;
  font-weight: 400;
  line-height: 1;
}

.polaroid__cap small {
  margin-top: 3px;
  color: #776d61;
  font: 500 .47rem var(--font-ui);
  letter-spacing: .07em;
  text-transform: uppercase;
}

@keyframes polaroid-in {
  from { opacity: 0; transform: translateY(70px) rotate(var(--angle)) scale(.82); }
  to { opacity: 1; transform: translateY(0) rotate(var(--angle)) scale(1); }
}

@media (min-width: 821px) and (max-width: 1000px) {
  .mixtape {
    grid-template-columns: minmax(280px, .85fr) minmax(400px, 1.15fr);
    gap: 24px;
  }

  .mixtape__cassette {
    width: 130%;
    margin-left: -15%;
  }

  .mixtape__list {
    padding-left: 22px;
  }

  .mixtape-track small {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ---------- responsive editorial layouts ---------- */
@media (max-width: 820px) {
  .ambient__paper--note,
  .ambient__paper--stamp,
  .ambient__vinyl,
  .ambient__moon--scrap {
    display: none;
  }

  .scene--postcards {
    justify-content: center;
    padding: 4.2rem 3vw 2.2vh;
  }

  .chapter-head,
  .deck,
  .deck-nav {
    width: 94vw;
  }

  .chapter-head {
    margin-bottom: 7px;
  }

  .chapter-head__eyebrow,
  .chapter-head__count {
    font-size: .56rem;
  }

  .deck {
    height: calc(100svh - 182px);
    min-height: 490px;
    max-height: 680px;
  }

  .postcard,
  .postcard[data-layout="notebook"],
  .postcard[data-layout="cinematic"] {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 31% 69%;
  }

  .postcard .postcard__art,
  .postcard[data-layout="notebook"] .postcard__art,
  .postcard[data-layout="cinematic"] .postcard__art {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
  }

  .postcard .postcard__copy,
  .postcard[data-layout="art-right"] .postcard__copy,
  .postcard[data-layout="notebook"] .postcard__copy,
  .postcard[data-layout="cinematic"] .postcard__copy {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    height: auto;
    margin: 0;
    padding: 21px 20px 26px;
    overflow-y: auto;
  }

  .postcard[data-layout="notebook"] .postcard__copy {
    color: #312925;
    background: #f5eddf;
  }

  .postcard[data-layout="cinematic"]::after {
    display: none;
  }

  .postcard[data-layout="cinematic"] .postcard__copy {
    color: #f8f1eb;
    background: #1a193a;
  }

  .postcard__art-number {
    top: 12px;
    left: 14px;
    font-size: 1.8rem;
  }

  .postcard__art-caption {
    left: 14px;
    bottom: 11px;
    font-size: .5rem;
  }

  .postcard__meta {
    margin-bottom: 10px;
    font-size: .5rem;
  }

  .postcard__title,
  .postcard[data-layout="notebook"] .postcard__title {
    font-size: clamp(2.35rem, 12vw, 3.3rem);
  }

  .postcard__era {
    margin: 8px 0 15px;
    font-size: 1rem;
  }

  .postcard__prose {
    grid-template-columns: 1fr;
    gap: 0;
    font-size: .92rem;
    line-height: 1.48;
  }

  .postcard__footer {
    margin-top: 10px;
  }

  .postcard__footer span {
    font-size: 1rem;
  }

  .postcard__footer small {
    font-size: .72rem;
  }

  .chapter-deco--constellation {
    width: 42%;
  }

  .chapter-deco--scribble {
    transform: scale(.72) rotate(7deg);
    transform-origin: right bottom;
  }

  .deck-nav {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 6px;
    margin-top: 8px;
  }

  .deck-nav__btn {
    width: 40px;
    height: 38px;
  }

  .deck-nav__dots {
    gap: 2px;
    padding: 3px;
  }

  .deck-nav__dot {
    height: 32px;
    padding: 0 4px;
  }

  .deck-nav__dot b {
    display: none;
  }

  .deck-nav__dot span {
    font-size: .56rem;
  }

  .scene--cassette {
    justify-content: flex-start;
    padding: 5.4rem 5vw 4.5rem;
    overflow-y: auto;
  }

  .mixtape {
    width: 90vw;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mixtape__visual {
    width: min(90vw, 520px);
    margin: 0 auto;
  }

  .mixtape__side {
    top: 0;
  }

  .mixtape__label strong {
    font-size: clamp(1.45rem, 7vw, 2.3rem);
  }

  .mixtape__list {
    padding: 18px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .18);
    border-left: 0;
  }

  .mixtape-track {
    min-height: 52px;
    grid-template-columns: 28px minmax(0, 1fr) 20px;
  }

  .mixtape-track small {
    display: none;
  }

  .mixtape-track strong {
    font-size: 1.2rem;
  }

  .scene--photos {
    justify-content: flex-start;
    padding: 5.5rem 4vw 4rem;
    overflow-y: auto;
  }

  .photos__head,
  .polaroids {
    width: 90vw;
  }

  .photos__head {
    margin-bottom: 28px;
  }

  .photos__title {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .polaroids {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 13px;
    padding-bottom: 2rem;
  }

  .polaroid:nth-child(5) {
    grid-column: 1 / -1;
    width: calc(50% - 7px);
    justify-self: center;
  }
}

@media (max-width: 430px) {
  .btn-back {
    top: 13px;
    left: 12px;
  }

  .audio-toggle {
    top: 12px;
    right: 12px;
  }

  body[data-scene="magazine"] .audio-toggle {
    top: 9px;
    right: 68px;
    width: 32px;
    height: 32px;
  }

  .floater__art--photos {
    width: 105px;
    height: 96px;
  }

  .floater__art--photos i {
    width: 64px;
    height: 78px;
    padding: 5px 5px 17px;
  }

  .deck {
    min-height: 450px;
  }

  .postcard__footer small {
    display: none;
  }

  .mixtape__label small {
    display: none;
  }
}

@media (min-width: 821px) and (max-height: 740px) {
  .scene--postcards {
    padding-top: 1.5vh;
  }

  .deck {
    height: min(70vh, 540px);
  }

  .postcard__copy {
    padding: 28px 34px;
  }

  .postcard__meta {
    margin-bottom: 11px;
  }

  .postcard__era {
    margin: 8px 0 16px;
  }

  .postcard__prose {
    font-size: .88rem;
    line-height: 1.43;
  }

  .postcard__footer {
    padding-top: 9px;
  }
}
