/* ============================================================
   Paper Hearts & Polaroids — a scrapbook for Kelly
   pure CSS, no libraries, works offline
   ============================================================ */

:root {
  --paper:  #FDF6EC;   /* cream page          */
  --ink:    #4A3428;   /* cocoa text          */
  --rasp:   #B8425A;   /* raspberry accents   */
  --blush:  #F7C9CE;   /* blush pink          */
  --sage:   #8FB9A8;   /* sage washi          */
  --butter: #FFE9A8;   /* sticky notes        */
  --kraft:  #D9B98C;   /* corkboard / kraft   */
  --white:  #FFFDF9;   /* polaroid frames     */

  --hand:  'Segoe Script', 'Bradley Hand', 'Comic Sans MS', cursive;
  --print: 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;

  --shadow-soft: 0 6px 18px rgba(74, 52, 40, .14);
  --shadow-lift: 0 14px 30px rgba(74, 52, 40, .22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.7;
  overflow-x: hidden;
  background-color: var(--paper);
  /* gentle paper grain, pure CSS */
  background-image:
    radial-gradient(rgba(74,52,40,.045) 1px, transparent 1.5px),
    radial-gradient(rgba(74,52,40,.03) 1px, transparent 1.5px);
  background-size: 34px 34px, 23px 23px;
  background-position: 0 0, 11px 17px;
}

[hidden] { display: none !important; }

.hand { font-family: var(--hand); }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* stops iOS double-tap zoom eating rapid taps */
}

img { max-width: 100%; display: block; }

section, footer.back-cover { padding: 4.2rem 1.2rem; }

/* ---------- washi-tape section titles ---------- */

.washi-title {
  font-family: var(--hand);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  color: var(--ink);
  width: fit-content;
  margin: 0 auto 1.6rem;
  padding: .35em .9em;
  transform: rotate(-2deg);
  background:
    repeating-linear-gradient(115deg,
      rgba(143,185,168,.55) 0 14px,
      rgba(143,185,168,.38) 14px 28px);
  border-left: 2px dashed rgba(253,246,236,.8);
  border-right: 2px dashed rgba(253,246,236,.8);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.washi-blush {
  background:
    repeating-linear-gradient(115deg,
      rgba(247,201,206,.75) 0 14px,
      rgba(247,201,206,.5) 14px 28px);
}

.hint {
  text-align: center;
  font-size: 1rem;
  opacity: .75;
  margin-bottom: 1.8rem;
}

/* ---------- scroll reveal ---------- */

/* Tilted elements set --base-rot so they keep their tilt after revealing.
   Hiding is opt-in via .reveal-ready (set by a tiny script in <head>) so the
   page stays fully visible even if script.js breaks mid-edit. :where() keeps
   the hidden state low-specificity so hover/clipped states still win. */
.reveal {
  opacity: 1;
  transform: translateY(0) rotate(var(--base-rot, 0deg));
  transition: opacity .7s ease, transform .7s ease;
}
:where(.reveal-ready) .reveal:where(:not(.in-view)) {
  opacity: 0;
  transform: translateY(26px) rotate(calc(var(--base-rot, 0deg) + 1.5deg));
}

/* ============================================================
   1. COVER
   ============================================================ */

.cover {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 3rem 1.2rem 4rem;
  text-align: center;
}

.cover-kicker {
  font-size: 1.05rem;
  color: var(--rasp);
  opacity: .85;
  transform: rotate(-1.5deg);
}

.cover-title {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 1.1;
  color: var(--ink);
  position: relative;
}

.her-name { color: var(--rasp); }

.title-heart {
  display: inline-block;
  width: .55em;
  margin-left: .12em;
  color: var(--rasp);
  vertical-align: super;
  animation: wobble 2.6s ease-in-out infinite;
  transform-origin: 50% 90%;
}
.doodle-heart { width: 100%; height: auto; }

@keyframes wobble {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50%      { transform: rotate(9deg) scale(1.12); }
}

/* ---------- polaroids & tape ---------- */

.polaroid {
  background: var(--white);
  padding: 12px 12px 14px;
  box-shadow: var(--shadow-soft);
  position: relative;
  border-radius: 2px;
}

.polaroid figcaption, .g-cap {
  display: block;
  font-family: var(--hand);
  font-size: 1.05rem;
  text-align: center;
  padding-top: .55em;
  color: var(--ink);
}

.tape {
  position: absolute;
  width: 86px;
  height: 26px;
  top: -13px;
  background:
    repeating-linear-gradient(105deg,
      rgba(247,201,206,.85) 0 9px,
      rgba(247,201,206,.65) 9px 18px);
  box-shadow: 0 2px 5px rgba(74,52,40,.12);
  opacity: .92;
}
.tape-tl { left: -22px;  transform: rotate(-38deg); }
.tape-tr { right: -22px; transform: rotate(38deg); }
.tape-sage {
  background:
    repeating-linear-gradient(105deg,
      rgba(143,185,168,.8) 0 9px,
      rgba(143,185,168,.6) 9px 18px);
}

.hero-polaroid {
  --base-rot: -3deg;
  width: min(360px, 82vw);
}
.hero-polaroid:hover { transform: rotate(-1deg) scale(1.02); }

/* ---------- photo frames + cute placeholder ---------- */

.photo-frame {
  display: block;
  aspect-ratio: 4 / 3.2;
  overflow: hidden;
  background: var(--blush);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  background:
    repeating-linear-gradient(45deg,
      rgba(255,253,249,.35) 0 12px, transparent 12px 24px),
    var(--blush);
  border: 2px dashed rgba(184,66,90,.45);
  color: #8d3346;
  font-family: var(--hand);
  font-size: .95rem;
  text-align: center;
  padding: .6rem;
}
.photo-placeholder .ph-heart { font-size: 1.8rem; }

/* ---------- admission ticket ---------- */

.ticket {
  --base-rot: 1.2deg;
  background: var(--white);
  border: 2px dashed var(--rasp);
  border-radius: 10px;
  padding: 1rem 2.2rem;
  position: relative;
  box-shadow: var(--shadow-soft);
  max-width: min(430px, 90vw);
}
/* perforation notches */
.ticket::before, .ticket::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px dashed var(--rasp);
  transform: translateY(-50%);
}
.ticket::before { left: -13px; }
.ticket::after  { right: -13px; }

.ticket-label {
  font-size: .72rem;
  letter-spacing: .22em;
  color: var(--rasp);
  font-weight: bold;
}
.ticket-count {
  font-family: var(--hand);
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  margin-top: .2rem;
}
.ticket-count b { color: var(--rasp); font-size: 1.25em; }
.ticket-sub { font-size: .92rem; opacity: .8; }
.ticket-anniv { color: var(--rasp); opacity: .95; font-family: var(--hand); }

.open-book {
  background: none;
  border: none;
  font-family: var(--hand);
  font-size: 1.25rem;
  color: var(--rasp);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  margin-top: .6rem;
  transition: transform .25s ease;
}
.open-book:hover { transform: translateY(4px); }
.doodle-arrow { width: 22px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* ============================================================
   2. TIMELINE
   ============================================================ */

.story { max-width: 980px; margin: 0 auto; }

.timeline {
  list-style: none;
  position: relative;
  padding: 1.5rem 0;
}
/* the washi spine */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 12px;
  transform: translateX(-50%);
  background:
    repeating-linear-gradient(0deg,
      rgba(143,185,168,.6) 0 16px,
      rgba(143,185,168,.4) 16px 32px);
  border-radius: 6px;
}

.milestone {
  position: relative;
  width: 46%;
  margin-bottom: 2.4rem;
}
.milestone:nth-child(odd)  { left: 0;  transform: rotate(-1.2deg); }
.milestone:nth-child(even) { left: 54%; transform: rotate(1.2deg); }

.milestone-card {
  background: #EAD9BB;
  background-image:
    radial-gradient(rgba(74,52,40,.05) 1px, transparent 1.4px);
  background-size: 16px 16px;
  border-radius: 6px;
  padding: 1.1rem 1.2rem 1.2rem;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.milestone-card .tape {
  width: 70px;
  height: 22px;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
}

.milestone-date {
  font-family: var(--print);
  font-size: .85rem;
  color: var(--rasp);
  letter-spacing: .05em;
}
.milestone-title {
  font-family: var(--hand);
  font-size: 1.35rem;
  margin: .15rem 0 .3rem;
}
.milestone-text { font-size: .98rem; }

.milestone-photo {
  margin-top: .8rem;
  background: var(--white);
  padding: 7px 7px 9px;
  box-shadow: 0 3px 10px rgba(74,52,40,.15);
  transform: rotate(1.6deg);
}
.milestone:nth-child(even) .milestone-photo { transform: rotate(-1.6deg); }
.milestone-photo .photo-frame { aspect-ratio: 16 / 10; }

/* mobile: single column */
@media (max-width: 720px) {
  .timeline::before { left: 10px; }
  .milestone,
  .milestone:nth-child(odd),
  .milestone:nth-child(even) {
    width: auto;
    left: 0;
    margin-left: 34px;
    transform: rotate(0deg);
  }
}

/* ============================================================
   3. GALLERY
   ============================================================ */

.gallery-section { max-width: 1080px; margin: 0 auto; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.9rem 1.2rem;
  padding: 1rem .4rem;
}
@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

.g-item { display: flex; justify-content: center; }

.g-polaroid {
  width: 100%;
  max-width: 270px;
  transform: rotate(var(--rot, 0deg));
  transition: transform .3s ease, box-shadow .3s ease;
  cursor: zoom-in;
  border: none;
  text-align: inherit;
  padding: 10px 10px 12px;
}
.g-polaroid:hover, .g-polaroid:focus-visible {
  transform: rotate(0deg) scale(1.05);
  box-shadow: var(--shadow-lift);
  z-index: 2;
}
.g-polaroid .tape {
  width: 64px;
  height: 20px;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(var(--tape-rot, -4deg));
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(46, 28, 22, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lb-polaroid {
  max-width: min(560px, 92vw);
  width: 100%;
  padding: 14px 14px 16px;
  animation: lb-in .3s ease;
}
@keyframes lb-in {
  from { transform: scale(.88) rotate(-2deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

.lb-frame { aspect-ratio: 4 / 3.2; }
.lb-frame img {
  filter: brightness(.25) sepia(.5);
  transition: filter 1.1s ease;
}
.lb-frame img.developed { filter: brightness(1) sepia(0); }

#lb-caption { min-height: 1.6em; font-size: 1.15rem; }

.lb-close, .lb-nav {
  position: fixed;
  background: var(--white);
  color: var(--rasp);
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  z-index: 61;
  transition: transform .2s ease;
}
.lb-close:hover, .lb-nav:hover { transform: scale(1.12); }
.lb-close { top: 16px; right: 16px; }
.lb-prev  { left: 12px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.12); }
.lb-next:hover { transform: translateY(-50%) scale(1.12); }

/* ============================================================
   4. REASONS — corkboard & sticky notes
   ============================================================ */

.reasons { max-width: 900px; margin: 0 auto; }

.corkboard {
  background: var(--kraft);
  background-image:
    radial-gradient(rgba(74,52,40,.13) 1.5px, transparent 2px),
    radial-gradient(rgba(255,253,249,.16) 1.5px, transparent 2px);
  background-size: 26px 26px, 31px 31px;
  background-position: 0 0, 13px 9px;
  border: 10px solid #B98F5F;
  border-radius: 8px;
  box-shadow: inset 0 0 26px rgba(74,52,40,.3), var(--shadow-soft);
  padding: 1.6rem 1.2rem 2rem;
  text-align: center;
}

.pushpin-btn {
  background: var(--white);
  border: 2px solid var(--rasp);
  border-radius: 999px;
  color: var(--rasp);
  font-family: var(--hand);
  font-size: 1.15rem;
  padding: .55em 1.3em .55em 1.1em;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease;
}
.pushpin-btn:hover  { transform: scale(1.05) rotate(-1.5deg); }
.pushpin-btn:active { transform: scale(.96); }

.pushpin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #e9808f, var(--rasp) 65%);
  box-shadow: 0 2px 3px rgba(74,52,40,.4);
  display: inline-block;
}

/* a little paper tag pinned to the board (ink on white for contrast) */
.tally {
  display: inline-block;
  background: var(--white);
  color: var(--ink);
  font-size: 1.02rem;
  margin-top: .7rem;
  padding: .15em .85em;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(74,52,40,.3);
  transform: rotate(-1.2deg);
}

.board-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 1.3rem;
  min-height: 130px;
}

.sticky {
  background: var(--butter);
  background-image: linear-gradient(200deg, rgba(74,52,40,.07), transparent 38%);
  width: min(210px, 44vw);
  min-height: 120px;
  padding: 1rem .9rem;
  font-family: var(--print);
  font-size: .98rem;
  line-height: 1.45;
  color: var(--ink);
  box-shadow: 0 8px 14px rgba(74,52,40,.25);
  transform: rotate(var(--rot, 0deg));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  animation: peel-on .5s cubic-bezier(.34, 1.56, .64, 1);
}
/* folded corner */
.sticky::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  border-style: solid;
  border-width: 0 0 18px 18px;
  border-color: transparent transparent rgba(74,52,40,.14) transparent;
}
@keyframes peel-on {
  from { transform: rotate(calc(var(--rot) - 14deg)) scale(.4) translateY(-30px); opacity: 0; }
  to   { transform: rotate(var(--rot)) scale(1) translateY(0); opacity: 1; }
}
.sticky.fade-off { opacity: 0; transform: scale(.7); transition: all .4s ease; }

/* ============================================================
   5. LETTERS
   ============================================================ */

.letters { max-width: 1020px; margin: 0 auto; }

.envelope-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2.2rem 1.8rem;
}

.envelope-slot { width: min(300px, 88vw); }

.env-label {
  font-family: var(--hand);
  font-size: 1.12rem;
  color: var(--rasp);
  text-align: center;
  margin-bottom: .5rem;
  transform: rotate(-1.4deg);
}

.envelope {
  position: relative;
  width: 100%;
  aspect-ratio: 300 / 190;
  background: var(--blush);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  border: none;
  display: block;
  transition: transform .25s ease;
  overflow: visible;
  perspective: 700px;
}
.envelope:hover { transform: translateY(-4px) rotate(-.6deg); }

/* bottom-fold creases */
.envelope::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background:
    linear-gradient(115deg, transparent 49.3%, rgba(184,66,90,.16) 49.8%, transparent 50.6%),
    linear-gradient(-115deg, transparent 49.3%, rgba(184,66,90,.16) 49.8%, transparent 50.6%);
}

.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 58%;
  background: #F3B7BE;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 6px 6px 0 0;
  transform-origin: top center;
  transition: transform .55s ease .05s;
  z-index: 2;
}
.envelope-slot.open .env-flap { transform: rotateX(178deg); }

.wax-seal {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%) rotate(-6deg);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #d4667e, var(--rasp) 60%, #93374b);
  color: #FFF3F0;
  font-family: var(--hand);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(74,52,40,.35);
  z-index: 3;
  transition: transform .45s ease, opacity .45s ease;
}
.envelope-slot.open .wax-seal {
  transform: translate(-50%, -50%) rotate(28deg) scale(.25);
  opacity: 0;
}

.env-kiss {
  position: absolute;
  right: 8%;
  bottom: 9%;
  font-size: 1.25rem;
  transform: rotate(10deg);
  z-index: 1;
}

/* opened height is measured in JS from the real letter, so nothing clips */
.letter-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .8s ease;
}

.letter-paper {
  background: var(--white);
  background-image: repeating-linear-gradient(
    transparent 0 1.64em, rgba(143,185,168,.35) 1.64em calc(1.64em + 1px));
  margin-top: 1rem;
  padding: 1.4rem 1.3rem;
  border-radius: 3px;
  box-shadow: var(--shadow-soft);
  font-size: 1rem;
  line-height: 1.64em;
  transform: rotate(.6deg);
}
.letter-paper p { margin-bottom: 1.64em; }
.letter-paper p:last-child { margin-bottom: 0; }
.letter-sign {
  font-family: var(--hand);
  color: var(--rasp);
  font-size: 1.2rem;
}

/* ============================================================
   6. COUPONS
   ============================================================ */

.coupons { max-width: 860px; margin: 0 auto; }

.coupon-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.4rem;
}

.coupon {
  background: var(--white);
  border: 2px dashed var(--sage);
  border-radius: 8px;
  padding: 1.1rem 1.2rem 1.1rem 1.9rem;
  position: relative;
  box-shadow: var(--shadow-soft);
  transition: transform .5s ease, opacity .5s ease;
  overflow: hidden;
}
/* scalloped left edge */
.coupon::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  bottom: 0;
  width: 14px;
  background: radial-gradient(circle, var(--paper) 5px, transparent 5.5px);
  background-size: 14px 16px;
  background-repeat: repeat-y;
}
.coupon.clipped {
  transform: rotate(-3.5deg) translateY(5px);
}

.coupon-scissors {
  position: absolute;
  top: .4rem;
  right: .7rem;
  font-size: .95rem;
  opacity: .55;
}

.coupon-title {
  font-family: var(--hand);
  font-size: 1.22rem;
  color: var(--rasp);
  margin-bottom: .15rem;
  padding-right: 1.4rem;
}
.coupon-note { font-size: .92rem; opacity: .85; margin-bottom: .7rem; }

.clip-btn {
  background: var(--sage);
  border: none;
  border-radius: 999px;
  color: #24382F;
  font-family: var(--hand);
  font-size: 1rem;
  padding: .35em 1.1em;
  transition: transform .18s ease;
}
.clip-btn:hover { transform: scale(1.06); }
.clip-btn:disabled { opacity: .45; cursor: default; transform: none; }

.stamp {
  position: absolute;
  right: 8px;
  bottom: 10px;
  border: 3px solid var(--rasp);
  color: var(--rasp);
  border-radius: 6px;
  font-weight: bold;
  font-size: .85rem;
  letter-spacing: .12em;
  padding: .1em .5em;
  transform: rotate(-14deg);
  opacity: 0;
  background: rgba(255,253,249,.6);
}
.coupon.clipped .stamp { opacity: .9; animation: stamp-in .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes stamp-in {
  from { transform: rotate(-14deg) scale(2.2); opacity: 0; }
  to   { transform: rotate(-14deg) scale(1);   opacity: .9; }
}

/* ============================================================
   7. BACK COVER
   ============================================================ */

.back-cover {
  text-align: center;
  padding-bottom: 5rem;
  max-width: 660px;
  margin: 0 auto;
}

.back-title { font-size: 1.9rem; margin-bottom: 1.4rem; transform: rotate(-1.6deg); }

.meter-wrap {
  --base-rot: .7deg;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 1.6rem 1.4rem 1.8rem;
}

.love-btn {
  background: radial-gradient(circle at 34% 28%, #d4667e, var(--rasp) 62%, #93374b);
  color: #FFF3F0;
  border: none;
  border-radius: 999px;
  font-family: var(--hand);
  font-size: 1.3rem;
  padding: .8em 1.6em;
  display: inline-flex;
  flex-direction: column;
  line-height: 1.25;
  box-shadow: 0 6px 0 #7d2e40, var(--shadow-soft);
  transition: transform .12s ease, box-shadow .12s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none; /* a long press must never turn into a page scroll */
}
.love-btn small { font-family: var(--serif); font-size: .68rem; letter-spacing: .08em; opacity: .9; }
.love-btn:active, .love-btn.holding {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #7d2e40, var(--shadow-soft);
}

.meter {
  margin: 1.3rem auto .6rem;
  height: 26px;
  max-width: 420px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid var(--kraft);
  position: relative;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blush), var(--rasp));
  border-radius: 999px;
  transition: width .1s linear;
}
.meter-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--print);
  font-size: .9rem;
  font-weight: bold;
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(255,253,249,.7);
}
.meter.overload .meter-label { color: var(--rasp); animation: shake .3s linear infinite; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-2px) rotate(-1deg); }
  75%     { transform: translateX(2px) rotate(1deg); }
}

.meter-msg { min-height: 1.6em; font-size: 1.15rem; color: var(--rasp); margin-top: .4rem; }

.signature { margin-top: 2.6rem; font-size: 1.25rem; }
.ps { margin-top: .9rem; opacity: .55; font-size: .98rem; }

.heart-sticker {
  background: none;
  border: none;
  font-size: 2rem;
  margin-top: 1.1rem;
  animation: wobble 3.2s ease-in-out infinite;
  transition: transform .2s ease;
}
.heart-sticker:active { transform: scale(1.4); }

/* ============================================================
   SECRET POLAROID OVERLAY (easter egg)
   ============================================================ */

.secret-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(46, 28, 22, .82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 1.2rem;
  cursor: pointer;
}

.secret-polaroid {
  width: min(400px, 90vw);
  padding: 14px 14px 16px;
  transform: rotate(-3deg);
  animation: drop-in .9s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes drop-in {
  from { transform: translateY(-120vh) rotate(-14deg); }
  to   { transform: translateY(0) rotate(-3deg); }
}
.secret-polaroid figcaption { font-size: 1.2rem; color: var(--rasp); }

.secret-hint { color: rgba(255,253,249,.75); font-size: .95rem; }

/* ============================================================
   FX LAYER — heart trail, confetti, rain
   ============================================================ */

#fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}

.fx-heart {
  position: absolute;
  will-change: transform, opacity;
  font-size: var(--size, 1rem);
}

.fx-trail { animation: trail-float .9s ease-out forwards; }
@keyframes trail-float {
  from { transform: translate(0, 0) scale(1) rotate(0deg); opacity: .9; }
  to   { transform: translate(var(--dx, 0px), -70px) scale(.35) rotate(var(--rot, 0deg)); opacity: 0; }
}

.fx-burst { animation: burst-fly .8s ease-out forwards; }
@keyframes burst-fly {
  from { transform: translate(0, 0) scale(.6) rotate(0deg); opacity: 1; }
  to   { transform: translate(var(--dx, 0px), var(--dy, -60px)) scale(1.1) rotate(var(--rot, 0deg)); opacity: 0; }
}

.fx-rain { top: -40px; animation: rain-fall var(--dur, 2.2s) linear forwards; }
@keyframes rain-fall {
  from { transform: translateY(0) rotate(0deg); opacity: 1; }
  to   { transform: translateY(115vh) rotate(var(--rot, 200deg)); opacity: .85; }
}

/* ============================================================
   REDUCED MOTION — keep it calm
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, .reveal-ready .reveal {
    opacity: 1;
    transform: translateY(0) rotate(var(--base-rot, 0deg));
  }
}
