/* Jason's Ex ($MANDY) — a Keys love story. */
:root {
  --rose: #e36b7e;
  --blush: #f4b4be;
  --peach: #f6c9b4;
  --gold: #e8c27a;
  --cream: #fff6ee;
  --paper: #fff3ea;
  --ink: #3a1c24;
  --ink-soft: rgba(58,28,36,.78);
  --dusk: #2a1218;
  --dusk-2: #4a2230;
  --seal: #c43a52;
  --safe: env(safe-area-inset-top, 0px);
  --safeb: env(safe-area-inset-bottom, 0px);
  --hud: 58px;
  --plan: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--dusk);
  color: var(--cream);
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  overflow-x: hidden;
  max-width: 100%;
}
html { scroll-behavior: smooth; }
img, svg, canvas, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
code { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* Stage / photo backgrounds */
#stage {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  background: #2a1218 center/cover no-repeat url("../assets/user/mandy-fence.webp");
}
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: .12; }
.scene-bgs { position: absolute; inset: 0; }
.scene-bg {
  position: absolute; inset: 0;
  background: center/cover no-repeat;
  opacity: 0;
  transform: scale(1.08);
  filter: saturate(1.05) contrast(.98);
  transition: opacity 1s ease, transform 10s ease, filter .8s ease;
}
body[data-chapter="0"] .scene-bg[data-bg="0"],
body[data-chapter="1"] .scene-bg[data-bg="1"],
body[data-chapter="2"] .scene-bg[data-bg="2"],
body[data-chapter="3"] .scene-bg[data-bg="3"],
body[data-chapter="4"] .scene-bg[data-bg="4"],
body[data-chapter="5"] .scene-bg[data-bg="5"] {
  opacity: 1;
  transform: scale(1);
}
.vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(42,12,20,.45) 0%, rgba(42,12,20,.12) 28%, rgba(42,12,20,.28) 58%, rgba(28,8,14,.78) 100%),
    radial-gradient(90% 70% at 50% 30%, transparent 40%, rgba(28,8,14,.4) 100%);
}
body[data-chapter="3"] #stage { filter: none; }
body[data-chapter="3"] .scene-bg[data-bg="3"] { filter: saturate(.85) brightness(.78) contrast(1.02); }
body[data-chapter="3"] .vignette {
  background:
    linear-gradient(180deg, rgba(20,10,16,.5) 0%, rgba(20,10,16,.22) 40%, rgba(16,8,14,.82) 100%);
}
body[data-chapter="5"] .vignette {
  background:
    linear-gradient(180deg, rgba(80,20,40,.3) 0%, rgba(42,12,20,.15) 40%, rgba(28,8,14,.7) 100%),
    radial-gradient(70% 60% at 50% 40%, rgba(227,107,126,.18), transparent 70%);
}
.grain {
  position: absolute; inset: 0;
  background: url("../assets/bg/grain.webp") repeat;
  opacity: .12;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.petals { position: absolute; inset: 0; overflow: hidden; }
.petal {
  position: absolute; top: -20px;
  width: 12px; height: 12px;
  background: var(--blush);
  border-radius: 12px 2px 12px 2px;
  opacity: .55;
  animation: fall 16s linear infinite;
}
.petal.heart {
  width: 10px; height: 10px;
  background: transparent;
  border-radius: 0;
}
.petal.heart::before, .petal.heart::after {
  content: ""; position: absolute;
  width: 6px; height: 10px;
  background: var(--rose);
  border-radius: 6px 6px 0 0;
}
.petal.heart::before { transform: rotate(-45deg); left: 3px; }
.petal.heart::after { transform: rotate(45deg); left: 0; }
@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: .55; }
  100% { transform: translateY(110vh) rotate(220deg); opacity: 0; }
}

/* Loader — sealed love letter */
#loader {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(227,107,126,.28), transparent 60%),
    #2a1218 url("../assets/user/mandy-fence.webp") center/cover no-repeat;
  transition: opacity .6s ease, visibility .6s ease;
}
#loader::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,12,20,.55), rgba(42,12,20,.72));
}
#loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
#loader.is-gone { display: none; }
.love-intro { position: relative; z-index: 1; text-align: center; width: min(360px, calc(100% - 32px)); }
.envelope {
  position: relative;
  background: linear-gradient(180deg, #fff8f2, #f8e4d8);
  color: var(--ink);
  border-radius: 6px 6px 10px 10px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 50px rgba(0,0,0,.35), 0 0 0 1px rgba(227,107,126,.25);
  overflow: hidden;
  transform-origin: 50% 0;
  animation: envelopeIn .6s ease both;
}
@keyframes envelopeIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 54px;
  background: linear-gradient(180deg, #f4b4be, #e36b7e);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  animation: flapOpen 1.1s .25s ease forwards;
  z-index: 3;
}
@keyframes flapOpen { to { transform: rotateX(180deg); opacity: .15; } }
.env-photo {
  width: 96px; height: 96px; margin: 28px auto 10px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--rose);
  opacity: 0;
  animation: photoIn 0.7s .7s ease forwards;
}
@keyframes photoIn { to { opacity: 1; } }
.env-script {
  font-family: "Yellowtail", cursive;
  font-size: 48px;
  line-height: 1;
  margin: 0 0 2px;
  color: var(--seal);
  text-shadow: 0 4px 16px rgba(196,58,82,.2);
}
.env-tick {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0 0 14px;
}
.env-shimmer {
  height: 6px; border-radius: 99px;
  background: #f0d4c8; overflow: hidden;
}
.env-shimmer span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--blush), var(--gold), var(--rose));
  background-size: 200% 100%;
  animation: fill 1.8s ease forwards, shimmer 1.2s linear infinite;
  border-radius: 99px;
}
@keyframes fill { to { width: 100%; } }
@keyframes shimmer { to { background-position: 200% 0; } }
.wax {
  position: absolute; left: 50%; bottom: -18px;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e36b7e, var(--seal));
  color: #fff8f2;
  display: grid; place-items: center;
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(196,58,82,.4);
  z-index: 4;
  animation: sealSoft 2s ease infinite;
}
@keyframes sealSoft { 50% { transform: translateX(-50%) scale(1.06); } }
.btn-open, #loaderEnter {
  margin-top: 28px;
  background: transparent;
  border: 0;
  color: var(--cream);
  font-family: "Yellowtail", cursive;
  font-size: 26px;
  text-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.btn-open:hover, #loaderEnter:hover { color: var(--gold); }

/* HUD */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + var(--safe)) 12px 8px;
  min-height: var(--hud);
  background: linear-gradient(180deg, rgba(42,12,20,.7), transparent);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
.brand img {
  width: 40px; height: 40px; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--blush), 0 0 16px rgba(227,107,126,.4);
  object-fit: cover;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong { font-family: "Yellowtail", cursive; font-weight: 400; font-size: 22px; letter-spacing: 0; }
.brand-text em { font-style: normal; font-family: "IBM Plex Mono", monospace; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.hud-flags { margin-left: auto; font-size: 12px; color: var(--blush); white-space: nowrap; font-family: "Fraunces", serif; }
.btn-tour {
  border: 1px solid rgba(255,246,238,.35);
  background: rgba(58,20,30,.45);
  padding: 7px 12px;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 12px;
  border-radius: 99px;
}
.btn-tour:hover, .btn-tour:focus-visible { border-color: var(--gold); color: var(--gold); }

/* Story nav */
.floorplan {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; gap: 4px;
  padding: 8px 8px calc(8px + var(--safeb));
  background: linear-gradient(0deg, rgba(28,8,14,.92), rgba(28,8,14,.5) 70%, transparent);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.floorplan button {
  flex: 1 0 auto; min-width: 52px;
  border: 1px solid rgba(255,246,238,.22);
  background: rgba(58,20,30,.5);
  color: var(--cream);
  padding: 8px 6px;
  border-radius: 999px;
  font-family: "Fraunces", serif;
  font-size: 11px;
  font-style: italic;
}
.floorplan button span { display: block; }
.floorplan button.is-on, .floorplan button:hover, .floorplan button:focus-visible {
  border-color: var(--rose);
  color: #fff;
  background: rgba(227,107,126,.35);
  box-shadow: 0 0 14px rgba(227,107,126,.3);
}

/* Toast */
#toast {
  position: fixed; left: 50%;
  bottom: calc(70px + var(--safeb));
  transform: translateX(-50%) translateY(16px);
  z-index: 60;
  max-width: calc(100% - 24px);
  background: var(--paper);
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  text-align: center;
}
#toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Rooms */
#scroll { position: relative; z-index: 2; }
.room {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--hud) + 18px) 16px calc(var(--plan) + 28px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.is-hero {
  justify-content: flex-end;
  background: linear-gradient(180deg, transparent 18%, rgba(28,8,14,.45) 52%, rgba(28,8,14,.82) 100%);
}
.hero-copy { width: min(640px, 100%); }
.kicker, .ca-label, .dossier-top span {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 10px;
}
.kicker { margin: 0 0 8px; color: var(--gold); }
h1 {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: clamp(34px, 11vw, 84px);
  line-height: .92;
  margin: 0 0 12px;
  letter-spacing: -.03em;
  text-shadow: 0 8px 40px rgba(0,0,0,.55);
}
h1 em { font-style: italic; color: var(--blush); font-weight: 600; }
.lede {
  font-size: clamp(15px, 3.6vw, 20px);
  line-height: 1.4;
  margin: 0 0 16px;
  max-width: 36em;
  text-shadow: 0 2px 18px rgba(0,0,0,.55);
}
.cta-stack { display: flex; flex-direction: column; gap: 8px; width: min(100%, 520px); }
.cta-stack.compact { margin-top: 12px; }
.social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.social-row > button { flex: 1 1 90px; }

.btn-check, .btn-x, .btn-tg, .btn-chart, .btn-door, .btn-sink, .btn-flicker, .btn-neon, .btn-stamp, #loaderEnter, .btn-dusk {
  border: 0; position: relative;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-check, .btn-door, .btn-sink, .btn-flicker, .btn-neon, .btn-dusk {
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 14px 16px;
  border-radius: 999px;
}
.btn-check {
  background: linear-gradient(90deg, var(--rose), #f08a9a);
  color: #fff8f2;
  box-shadow: 0 8px 20px rgba(196,58,82,.35);
  text-align: center;
}
.btn-check::before {
  content: "WITH LOVE · $MANDY";
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .14em;
  color: #fff8f2;
  opacity: .85;
  margin-bottom: 2px;
}
.btn-check:hover, .btn-check:focus-visible { transform: translateY(1px); filter: brightness(1.06); }
.btn-check:active { transform: translateY(2px); }

.ca-wrap { display: flex; gap: 6px; align-items: stretch; min-width: 0; }
.ca-box {
  flex: 1; min-width: 0;
  background: rgba(28,8,14,.7);
  border: 1px solid rgba(232,194,122,.45);
  padding: 8px 10px;
  border-radius: 14px;
}
.ca-label { display: block; color: var(--gold); margin-bottom: 2px; }
.ca-box code {
  display: block; font-size: 15px; font-weight: 500; color: var(--cream);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-stamp {
  background: var(--seal);
  color: #fff8f0;
  font-family: "Yellowtail", cursive;
  font-size: 20px;
  letter-spacing: 0;
  padding: 0 16px;
  border-radius: 50%;
  min-width: 72px;
  box-shadow: 0 0 0 3px rgba(196,58,82,.25);
}
.btn-stamp:hover, .btn-stamp:focus-visible { filter: brightness(1.1); }

.btn-x, .btn-tg, .btn-chart {
  font-family: "Fraunces", serif;
  font-size: 13px;
  letter-spacing: .06em;
  padding: 12px 10px;
  background: rgba(28,8,14,.65);
  border: 1px solid rgba(255,246,238,.28);
  border-radius: 999px;
}
.btn-x:hover, .btn-x:focus-visible { border-color: #fff; }
.btn-tg:hover, .btn-tg:focus-visible { border-color: var(--blush); color: var(--blush); }
.btn-chart { border-color: rgba(232,194,122,.45); color: var(--gold); }
.btn-chart:hover, .btn-chart:focus-visible { box-shadow: 0 0 16px rgba(232,194,122,.3); }

.tag { margin: 12px 0 0; font-size: 15px; color: var(--gold); text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.tag.script {
  font-family: "Yellowtail", cursive;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 4px 18px rgba(227,107,126,.45);
  line-height: 1.1;
}
.tag.muted { color: var(--ink-soft); font-style: italic; font-size: 16px; text-shadow: none; }
.chip-link {
  margin-top: 12px; background: transparent; border: 0;
  color: var(--blush);
  font-family: "Fraunces", serif; font-style: italic;
  font-size: 14px; padding: 0;
  text-decoration: underline; text-underline-offset: 3px;
}

/* Love-letter cards */
.dossier, .letter {
  width: min(720px, 100%);
  background: var(--paper);
  color: var(--ink);
  padding: 18px 16px 18px;
  box-shadow: 0 24px 50px rgba(0,0,0,.35), 0 0 0 1px rgba(227,107,126,.2);
  border-radius: 4px 18px 8px 18px;
  position: relative;
  max-height: calc(100svh - var(--hud) - var(--plan) - 36px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.dossier::before {
  content: "♥";
  position: absolute; top: -10px; right: 18px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--seal); color: #fff8f2;
  font-size: 13px; display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(196,58,82,.35);
}
.dossier.flirty { box-shadow: 0 24px 50px rgba(227,107,126,.22), 0 0 0 1px rgba(227,107,126,.3); }
.dossier.eerie {
  background: #efe4dc;
  filter: none;
}
.dossier.neon {
  background: #3a1822;
  color: var(--cream);
  box-shadow: 0 0 0 1px var(--rose), 0 0 40px rgba(227,107,126,.28), 0 24px 50px rgba(0,0,0,.4);
}
.dossier-top {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  border-bottom: 1px solid rgba(227,107,126,.25);
  padding-bottom: 8px; margin-bottom: 12px;
}
.dossier.neon .dossier-top { border-color: rgba(227,107,126,.35); }
.dossier-top span { color: var(--seal); }
.dossier.neon .dossier-top span { color: var(--gold); }
.dossier-top strong {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(18px, 4.5vw, 28px);
  letter-spacing: -.02em;
}
.dossier-body p { margin: 0 0 12px; font-size: 16px; line-height: 1.5; }
.polaroid {
  margin: 0 0 14px;
  background: #fff;
  padding: 8px 8px 22px;
  width: min(100%, 280px);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  transform: rotate(-1.2deg);
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}
.polaroid img { width: 100%; height: 180px; object-fit: cover; background: #222; }
.polaroid figcaption {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 11px;
  margin-top: 6px;
  color: #5a3340;
}
.polaroid.tilt-r { transform: rotate(1.6deg); margin-left: auto; }
.polaroid.tilt-l { transform: rotate(-2deg); }
.polaroid.glow { box-shadow: 0 0 24px rgba(227,107,126,.3); width: min(100%, 260px); }
.polaroid:hover, .polaroid:focus-visible { transform: translateY(-4px) rotate(0deg) scale(1.03); box-shadow: 0 14px 28px rgba(0,0,0,.22); z-index: 2; }
.dossier.eerie .polaroid img { filter: saturate(.82) brightness(.92); }
.photo-pair { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.photo-pair .polaroid { flex: 1 1 140px; width: auto; min-width: 0; }
.photo-pair .polaroid img { height: 120px; }

.btn-door, .btn-sink, .btn-flicker, .btn-neon, .btn-dusk { width: 100%; margin: 4px 0 8px; }
.btn-door { background: #f3d0c4; color: var(--ink); }
.btn-sink { background: linear-gradient(90deg, var(--rose), #f08a9a); color: #fff8f2; }
.btn-flicker, .btn-dusk { background: #d9c4c0; color: var(--ink); }
.btn-neon {
  background: #2a1218;
  color: #fff;
  border: 1px solid var(--blush);
  box-shadow: 0 0 18px rgba(227,107,126,.3);
}
.knock-log { font-family: "Fraunces", serif; font-style: italic; font-size: 13px; color: var(--seal); }

.flag {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  border: 0; background: transparent;
  font-size: 18px; line-height: 1;
  opacity: .7;
}
.flag.is-got { opacity: 1; color: var(--rose); pointer-events: none; }

/* X post card — romantic frame, same content */
.xcard {
  display: block; margin-top: 8px;
  background: #1a1014;
  color: #f8ecee;
  border: 1px solid rgba(227,107,126,.35);
  border-radius: 18px;
  padding: 12px;
  text-decoration: none;
  overflow: hidden; max-width: 100%;
  box-shadow: 0 8px 24px rgba(58,20,30,.25);
}
.xcard-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.xcard-av { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 2px var(--rose); }
.xcard-who { flex: 1; min-width: 0; }
.xcard-name {
  font-family: "Fraunces", serif; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcard-user { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #c9a8ae; }
.x-logo { margin-left: auto; color: #f8ecee; flex: 0 0 auto; }
.xcard-text {
  font-family: "Fraunces", serif;
  font-size: 16px; line-height: 1.4;
  margin: 10px 0 10px !important;
  color: #f8ecee;
  overflow-wrap: anywhere;
}
.xcard-media {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(227,107,126,.25);
}
.xcard-media figure { margin: 0; position: relative; min-width: 0; background: #16181c; }
.xcard-media img { width: 100%; height: 180px; object-fit: cover; object-position: top center; }
.xcard-media figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px 8px;
  font-family: "Fraunces", serif; font-style: italic; font-size: 11px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.xcard time {
  display: block; margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; color: #c9a8ae;
}
.xcard:hover, .xcard:focus-visible { border-color: var(--blush); }

.chart-slot { margin-top: 12px; border: 1px solid rgba(232,194,122,.3); min-height: 200px; }
.chart-slot iframe { width: 100%; height: 280px; border: 0; }

.site-foot { width: min(720px, 100%); margin-top: 16px; padding: 8px 2px 4px; }
.site-foot p {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 11px; line-height: 1.55;
  color: rgba(255,246,238,.72);
}

#burst {
  position: fixed; inset: 0; z-index: 55; pointer-events: none;
  display: grid; place-items: center;
  background: rgba(42,12,20,.4);
  font-family: "Yellowtail", cursive;
  font-size: clamp(44px, 11vw, 96px);
  color: var(--blush);
  text-shadow: 0 0 24px var(--rose);
}
#burst[hidden] { display: none; }

.evidence { margin-top: 16px; background: #f6e4d8; }
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px 10px;
  padding: 4px 2px 8px;
}
.board-grid .polaroid { width: 100%; margin: 0; padding: 6px 6px 18px; }
.board-grid .polaroid img { height: 120px; }
.board-grid .polaroid figcaption { font-size: 10px; }

#lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(28,8,14,.9);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px 28px; gap: 10px;
}
#lightbox[hidden] { display: none; }
#lightbox img {
  max-width: min(100%, 920px);
  max-height: min(78svh, 900px);
  width: auto; height: auto; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 8px #fff6ee;
  border-radius: 4px;
}
#lbCap {
  margin: 0;
  font-family: "Yellowtail", cursive;
  font-size: 28px;
  color: var(--blush);
  text-align: center;
}
.lb-close {
  position: absolute; top: calc(10px + var(--safe)); right: 14px;
  background: var(--paper); color: var(--ink);
  font-family: "Fraunces", serif; font-style: italic;
  font-size: 14px; border: 0; padding: 8px 14px; border-radius: 999px;
}

@media (min-width: 900px) {
  .floorplan {
    left: auto; right: 16px; top: 50%; bottom: auto;
    transform: translateY(-50%);
    flex-direction: column;
    width: 92px;
    background: none; padding: 0; overflow: visible;
  }
  .floorplan button { min-width: 0; width: 100%; }
  .room { padding: calc(var(--hud) + 24px) 140px 48px 56px; justify-content: center; }
  .is-hero { justify-content: center; }
  .hero-copy { width: min(640px, 48vw); }
  .dossier { max-height: none; width: min(640px, 46vw); }
  .photo-pair .polaroid img { height: 160px; }
  .xcard-media img { height: 240px; }
  h1 { font-size: clamp(56px, 7vw, 92px); }
  .board-grid { grid-template-columns: repeat(3, 1fr); }
  .board-grid .polaroid img { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .petals, .env-flap, .env-photo, .env-shimmer span, .envelope, .wax, .scene-bg, .petal { animation: none !important; transition: none !important; }
  .env-photo { opacity: 1; }
  .env-shimmer span { width: 100%; }
  .polaroid:hover { transform: none; }
}

@media (max-width: 700px) {
  .floorplan { gap: 3px; padding: 6px 6px calc(6px + var(--safeb)); overflow-x: auto; }
  .floorplan button { min-width: 0; flex: 1 1 0; padding: 6px 2px; font-size: 10px; }
  .floorplan button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
