/* ==========================================================================
   Happy Birthday, Lovey
   Guided by gemini-frontend-design:
   - Sunlit botanical pink and deep pine green color-blocking (zero beige)
   - Strictly 2 font families (Fraunces + Plus Jakarta Sans with tabular-nums)
   - Strictly 3 body font sizes below the hero (--text-heading, --text-body, --text-sm)
   - Borderless hero header bleeding to y=0, monumental centered hero stage
   - Zero eyebrows, zero decorative chips/badges, zero nested card-in-card boxes
   - Explicit CSS transitions + prefers-reduced-motion support
   ========================================================================== */

:root {
  /* Color palette: crisp gallery rose-white, sunlit petal pink, sage leaf, deep botanical pine */
  --bg: #fdf8fa;
  --surface-pink: #f8e5ed;
  --surface-sage: #dfece1;
  --surface-white: #ffffff;
  --pine: #143023;
  --pine-soft: #1f4433;
  --ink: #143023;
  --ink-soft: #365244;
  --ink-muted: #526b5e;
  --rose: #b83b64;
  --rose-deep: #8f284b;
  --rose-light: #f3c8d7;
  --sage: #4a7856;
  --rule: #ddc9d1;
  --rule-sage: #bdd4c1;

  /* Strictly 2 font families */
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Strictly 3 body font sizes below hero (hero H1 & navbar brand exempt) */
  --text-heading: clamp(2rem, 3.4vw, 2.75rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

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

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.petal-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 160;
}

/* --------------------------------------------------------------------------
   Navigation: borderless over hero at y=0, frosted separation on scroll
   -------------------------------------------------------------------------- */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 220ms var(--ease-out), border-color 220ms var(--ease-out);
}

.masthead.is-scrolled {
  background-color: rgba(253, 248, 250, 0.94);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--rule);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 14px 32px;
}

/* Brand wordmark has stronger presence than menu links */
.masthead-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.masthead-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}

.masthead-nav a {
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.masthead-nav a:hover {
  color: var(--rose-deep);
  border-bottom-color: var(--rose);
}

/* --------------------------------------------------------------------------
   Monumental Centered Hero + Wide Photo Stage (bleeds to y = 0)
   -------------------------------------------------------------------------- */
.hero {
  background-color: var(--surface-pink);
  padding: 120px 0 84px;
  border-bottom: 1px solid var(--rule);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7.4vw, 7rem);
  line-height: 0.96;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 22px;
  max-width: 14ch;
}

/* Live inline portrait token nestled inside the H1 */
.hero-inline-tile {
  display: inline-block;
  width: clamp(56px, 7.6vw, 108px);
  height: clamp(46px, 5.8vw, 82px);
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
  margin: 0 0.08em;
  transform: translateY(-0.08em);
  border: 2px solid var(--pine);
}

.hero-inline-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-lead {
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
  text-wrap: balance;
  margin: 0 0 28px;
}

.hero-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background-color: transparent;
  color: var(--pine);
  border: 1px solid var(--pine);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}

.btn-secondary:hover {
  background-color: var(--surface-sage);
}

.btn-secondary:active {
  transform: translateY(1px);
}

/* Buttons (single primary per section, sentence case, explicit transitions) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  background-color: var(--pine);
  color: var(--bg);
  border: 1px solid var(--pine);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}

.btn-primary:hover {
  background-color: var(--rose-deep);
  border-color: var(--rose-deep);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-rose {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  background-color: var(--rose-light);
  color: var(--pine);
  border: 1px solid var(--rose-light);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}

.btn-rose:hover {
  background-color: var(--bg);
}

.btn-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background-color: var(--surface-sage);
  color: var(--pine);
  border: 1px solid var(--surface-sage);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}

.btn-light:hover {
  background-color: var(--bg);
}

.text-link {
  background: none;
  border: none;
  padding: 4px 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rose-deep);
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  transition: color 180ms var(--ease-out);
}

.text-link:hover {
  color: var(--pine);
}

.text-link-light {
  background: none;
  border: none;
  padding: 4px 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rose-light);
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  transition: color 180ms var(--ease-out);
}

.text-link-light:hover {
  color: var(--bg);
}

/* Wide 3-Frame Sculptural Hero Photo Stage */
.hero-stage {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: end;
}

.stage-frame {
  background-color: var(--surface-white);
  border: 1px solid var(--rule);
  padding: 12px 12px 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 220ms var(--ease-out), border-color 220ms var(--ease-out);
}

.stage-frame:hover {
  transform: translateY(-5px);
  border-color: var(--pine);
}

.stage-frame img {
  width: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.stage-left img {
  aspect-ratio: 4 / 5;
  object-position: center center;
}

.stage-right img {
  aspect-ratio: 4 / 5;
  object-position: center center;
}

.stage-center {
  background-color: var(--surface-sage);
  border-color: var(--rule-sage);
}

.stage-center img {
  aspect-ratio: 4 / 4.6;
  object-position: center 36%;
}

.stage-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.stage-caption-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-body);
  color: var(--ink);
}

.stage-caption-date {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Shared Section Header (Direct H2, Zero Eyebrows)
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pine);
  margin-bottom: 44px;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.section-subtitle {
  max-width: 48ch;
  margin: 0;
  font-size: var(--text-body);
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Editorial Vinyl Section (Sunlit Sage-Green Color Block)
   -------------------------------------------------------------------------- */
.vinyl-section {
  padding: 88px 0;
  background-color: var(--surface-sage);
  border-bottom: 1px solid var(--rule-sage);
}

.vinyl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 52px;
  align-items: center;
}

.turntable-stage {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 0;
  min-height: 320px;
}

.turntable-rig {
  position: relative;
  display: flex;
  align-items: center;
  width: 526px;
  height: 310px;
  flex-shrink: 0;
}

.vinyl-jacket {
  position: relative;
  z-index: 4;
  width: 284px;
  height: 284px;
  flex-shrink: 0;
  background-color: var(--pine);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 22px 44px rgba(20, 48, 35, 0.22);
}

.jacket-photo-wrap {
  width: 100%;
  height: 204px;
  overflow: hidden;
}

.jacket-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.jacket-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--bg);
}

.jacket-song {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-body);
}

.jacket-artist {
  font-size: var(--text-sm);
  color: var(--rose-light);
}

.vinyl-disc-wrap {
  position: relative;
  margin-left: -134px;
  z-index: 2;
  transition: transform 600ms var(--ease-out);
}

.turntable-stage.is-spinning .vinyl-disc-wrap {
  transform: translateX(46px);
}

.vinyl-disc {
  width: 274px;
  height: 274px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #131815;
  background-image:
    repeating-radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 1px,
      rgba(0, 0, 0, 0.36) 2px,
      rgba(0, 0, 0, 0.36) 3.8px
    );
  border: 2px solid #0b0f0d;
  box-shadow: 0 18px 36px rgba(20, 48, 35, 0.28);
  animation: vinylSpin 7.5s linear infinite;
  animation-play-state: paused;
}

.vinyl-sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(
    from 20deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.09) 35deg,
    transparent 75deg,
    transparent 180deg,
    rgba(255, 255, 255, 0.07) 215deg,
    transparent 260deg
  );
}

.turntable-stage.is-spinning .vinyl-disc {
  animation-play-state: running;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-label-svg {
  position: relative;
  z-index: 2;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: block;
}

.tonearm {
  position: absolute;
  left: 416px;
  top: 18px;
  width: 110px;
  height: 210px;
  z-index: 6;
  pointer-events: none;
  transform-origin: 78px 24px;
  transform: rotate(-6deg);
  transition: transform 550ms var(--ease-out);
}

.turntable-stage.is-spinning .tonearm {
  transform: rotate(22deg);
}

/* Single unnested liner surface */
.liner-panel {
  background-color: var(--surface-white);
  border: 1px solid var(--rule-sage);
  padding: 32px;
}

.liner-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule-sage);
  margin-bottom: 22px;
}

.liner-title {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--ink);
}

.liner-artist {
  font-size: var(--text-sm);
  color: var(--rose-deep);
  font-weight: 500;
  margin: 0;
}

.vinyl-status-text {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
}

.audio-deck-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.audio-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
}

.audio-bars span {
  width: 3px;
  height: 6px;
  background-color: var(--rose);
}

.audio-bars.is-playing span:nth-child(1) { animation: eq 0.65s ease-in-out infinite alternate; }
.audio-bars.is-playing span:nth-child(2) { animation: eq 0.5s ease-in-out 0.15s infinite alternate; }
.audio-bars.is-playing span:nth-child(3) { animation: eq 0.72s ease-in-out 0.25s infinite alternate; }
.audio-bars.is-playing span:nth-child(4) { animation: eq 0.58s ease-in-out 0.1s infinite alternate; }

@keyframes eq {
  from { height: 5px; }
  to { height: 22px; }
}

.progress-wrap {
  margin-bottom: 20px;
}

.audio-seek {
  width: 100%;
  accent-color: var(--rose);
  cursor: pointer;
}

.time-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Native Switch Control (non-button toggle per skill) */
.video-toggle-row {
  padding-top: 16px;
  border-top: 1px solid var(--rule-sage);
}

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background-color: var(--rule-sage);
  transition: background-color 180ms var(--ease-out);
  flex-shrink: 0;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--surface-white);
  transition: transform 180ms var(--ease-out);
}

.switch-control input:checked + .switch-track {
  background-color: var(--rose);
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(18px);
}

.youtube-drawer {
  margin-top: 16px;
  background-color: var(--pine);
}

.youtube-drawer iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* --------------------------------------------------------------------------
   Tactile Asymmetric Scrapbook (Gallery White Base)
   -------------------------------------------------------------------------- */
.scrapbook-section {
  padding: 88px 0;
  background-color: var(--bg);
}

.scrapbook-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.filter-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--rose);
}

/* Connected Segmented Control for Sticker Stamps */
.sticker-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.segmented-bar {
  display: inline-flex;
  border: 1px solid var(--pine);
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--surface-white);
}

.seg-option {
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule);
  padding: 7px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.seg-option:last-child {
  border-right: none;
}

.seg-option:hover {
  background-color: var(--surface-pink);
}

.seg-option.is-active {
  background-color: var(--pine);
  color: var(--bg);
}

.sticker-hint {
  margin: 0 0 28px;
  padding: 12px 16px;
  background-color: var(--surface-pink);
  border-left: 3px solid var(--rose);
  font-size: var(--text-sm);
  color: var(--ink);
}

/* Asymmetric 12-Column Editorial Scrapbook Grid */
.scrapbook-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 34px 26px;
  align-items: start;
}

.polaroid-slot {
  grid-column: span 4;
  perspective: 1200px;
  transition: transform 240ms var(--ease-out);
}

.polaroid-slot.is-wide {
  grid-column: span 6;
}

.polaroid-slot[data-tilt="neg"] {
  transform: rotate(-1.1deg);
}

.polaroid-slot[data-tilt="pos"] {
  transform: rotate(1deg);
}

.polaroid-slot[data-tilt="flat"] {
  transform: rotate(0deg);
}

.polaroid-slot:hover {
  transform: rotate(0deg) translateY(-4px);
}

.polaroid-inner {
  position: relative;
  width: 100%;
  transition: transform 560ms var(--ease-out);
  transform-style: preserve-3d;
  transform: rotateY(0deg);
}

.polaroid-inner.is-flipped {
  transform: rotateY(180deg);
}

.polaroid-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background-color: var(--surface-white);
  border: 1px solid var(--rule);
  padding: 13px 13px 16px;
  position: relative;
}

.polaroid-front {
  transform: rotateY(0deg) translateZ(1px);
  transition: opacity 200ms var(--ease-out);
}

.polaroid-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg) translateZ(1px);
  background-color: var(--surface-pink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 22px;
  overflow: hidden;
}

.polaroid-inner:not(.is-flipped) .polaroid-back {
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0ms linear 260ms;
}

.polaroid-inner.is-flipped .polaroid-back {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0ms linear 0ms;
}

.polaroid-inner.is-flipped .polaroid-front {
  pointer-events: none;
  opacity: 0;
}

.tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 74px;
  height: 20px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.85;
}

.tape-sage {
  background-color: rgba(162, 196, 166, 0.85);
}

.tape-rose {
  background-color: rgba(235, 174, 195, 0.85);
}

.polaroid-photo-box {
  position: relative;
  overflow: hidden;
  background-color: var(--surface-pink);
  cursor: pointer;
}

.scrapbook-grid.sticker-mode .polaroid-photo-box {
  cursor: crosshair;
}

.polaroid-photo-box img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 420ms var(--ease-out);
}

.polaroid-slot.is-wide .polaroid-photo-box img {
  aspect-ratio: 4 / 3.2;
  object-position: center 28%;
}

.polaroid-slot:hover .polaroid-photo-box img {
  transform: scale(1.025);
}

.placed-sticker {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--rot, -8deg));
  font-size: 24px;
  line-height: 1;
  pointer-events: none;
  z-index: 5;
  animation: stickerPop 240ms var(--ease-out);
}

@keyframes stickerPop {
  from { transform: translate(-50%, -50%) scale(0.4) rotate(-18deg); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1) rotate(var(--rot, -8deg)); opacity: 1; }
}

.polaroid-caption-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.polaroid-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-body);
  line-height: 1.3;
  color: var(--ink);
}

.polaroid-date {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  white-space: nowrap;
}

.polaroid-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.mini-action {
  background: none;
  border: none;
  padding: 2px 0;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 160ms var(--ease-out);
}

.mini-action:hover {
  color: var(--ink);
}

.mini-action.is-hearted {
  color: var(--rose);
  font-weight: 600;
}

.back-date {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rose-deep);
}

.back-title {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 600;
  margin: 8px 0 10px;
  color: var(--ink);
}

.back-note {
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Deep Botanical Green Color-Blocked Wish & Moonie Stage
   -------------------------------------------------------------------------- */
.wish-section {
  padding: 92px 0;
  background-color: var(--pine);
  color: var(--bg);
}

.wish-section .section-header {
  border-bottom-color: rgba(253, 248, 250, 0.22);
}

.wish-section .section-title {
  color: var(--bg);
}

.wish-section .section-subtitle {
  color: rgba(253, 248, 250, 0.8);
}

.wish-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: stretch;
}

.cake-panel,
.moonie-panel {
  background-color: var(--pine-soft);
  border: 1px solid rgba(253, 248, 250, 0.16);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cake-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
}

.cake-svg {
  width: 100%;
  max-width: 330px;
  height: auto;
  overflow: visible;
}

.candle {
  cursor: pointer;
}

.candle-flame {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: flicker 0.55s ease-in-out infinite alternate;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.candle:nth-of-type(even) .candle-flame {
  animation-delay: 0.2s;
}

.candle-smoke {
  opacity: 0;
}

.candle.is-out .candle-flame {
  opacity: 0;
  transform: scale(0.2);
  animation: none;
}

.candle.is-out .candle-smoke {
  animation: smokeRise 1.5s var(--ease-out) forwards;
}

@keyframes flicker {
  from { transform: scale(0.95) rotate(-2deg); }
  to { transform: scale(1.06) rotate(2deg); }
}

@keyframes smokeRise {
  0% { opacity: 0.8; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-16px); }
}

.cake-footer {
  border-top: 1px solid rgba(253, 248, 250, 0.18);
  padding-top: 20px;
  margin-top: 12px;
}

.cake-message {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-body);
  line-height: 1.55;
  margin: 0 0 18px;
  color: var(--bg);
}

.cake-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.moonie-photo-wrap {
  position: relative;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(253, 248, 250, 0.18);
}

.moonie-photo-wrap img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 40%;
  transition: transform 220ms var(--ease-out);
}

.moonie-photo-wrap.is-patted img {
  transform: scale(1.04) rotate(-1.2deg);
}

.moonie-pops {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.moonie-float {
  position: absolute;
  bottom: 16px;
  font-size: 20px;
  animation: floatUp 1.05s var(--ease-out) forwards;
}

@keyframes floatUp {
  0% { opacity: 0; transform: translateY(8px) scale(0.7); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-76px) scale(1.15); }
}

.moonie-title {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--rose-light);
}

.moonie-speech {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--bg);
  margin: 0 0 20px;
  min-height: 52px;
}

.moonie-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.moonie-pats {
  font-size: var(--text-sm);
  color: var(--surface-sage);
}

/* --------------------------------------------------------------------------
   Wax-Sealed Envelope & Single Clean Cotton Stationery Sheet
   -------------------------------------------------------------------------- */
.letter-section {
  padding: 92px 0;
  background-color: var(--surface-pink);
  border-bottom: 1px solid var(--rule);
}

.envelope-stage {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.envelope-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 290px;
  background-color: var(--surface-white);
  border: 1px solid var(--pine);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: transform 220ms var(--ease-out);
}

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

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 150px;
  background-color: var(--surface-sage);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
}

.envelope-front {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 34px;
}

.wax-seal {
  position: absolute;
  top: 118px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--rose);
  border: 2px solid var(--rose-deep);
  color: var(--bg);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 220ms var(--ease-out);
}

.envelope-card:hover .wax-seal {
  transform: translateX(-50%) scale(1.07);
}

.envelope-address {
  text-align: center;
}

.envelope-hand {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-heading);
  line-height: 1.1;
  color: var(--ink);
}

.envelope-sub {
  display: block;
  margin-top: 4px;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* 4-Digit PIN Panel */
.pin-panel {
  max-width: 440px;
  margin: 0 auto;
  background-color: var(--surface-white);
  border: 1px solid var(--pine);
  padding: 36px 32px;
  text-align: center;
}

.pin-title {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}

.pin-subtitle {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin: 0 0 24px;
}

.pin-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.pin-inputs.is-shaking {
  animation: pinShake 320ms var(--ease-out);
}

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}

.pin-digit {
  width: 54px;
  height: 60px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  background-color: var(--bg);
  border: 1.5px solid var(--rule);
  outline: none;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.pin-digit:focus {
  border-color: var(--rose);
  background-color: var(--surface-white);
}

.pin-error {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--rose-deep);
  margin: 0 0 14px;
}

.pin-actions {
  margin-top: 8px;
}

/* Single clean stationery sheet (zero nested card-in-card!) */
.stationery-sheet {
  max-width: 720px;
  margin: 0 auto;
  background-color: var(--surface-white);
  border: 1px solid var(--pine);
  padding: 48px 52px;
}

.letter-top-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}

.letter-salutation {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-heading);
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

.letter-body {
  font-family: var(--font-display);
  font-size: var(--text-body);
  line-height: 1.85;
  color: var(--ink);
  min-height: 230px;
  max-width: 62ch;
}

.letter-body p {
  margin: 0 0 20px;
}

.letter-placeholder-lines {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 35px,
    rgba(20, 48, 35, 0.12) 35px,
    rgba(20, 48, 35, 0.12) 36px
  );
  padding: 10px 0 36px;
  min-height: 246px;
}

.letter-placeholder-note {
  display: inline-block;
  background-color: var(--surface-sage);
  border-left: 3px solid var(--sage);
  padding: 14px 18px;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--ink-soft);
}

.letter-signoff {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.letter-sign-label {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.letter-signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--rose-deep);
  margin-top: 2px;
}

.letter-editor {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.letter-editor textarea {
  width: 100%;
  min-height: 200px;
  padding: 14px;
  font-family: var(--font-display);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--bg);
  border: 1px solid var(--pine);
  resize: vertical;
}

.letter-editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.letter-editor-hint {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.letter-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   Footer Colophon & Floating Mini Player
   -------------------------------------------------------------------------- */
.colophon {
  padding: 36px 0 48px;
  background-color: var(--bg);
}

.colophon-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* Compact audio toggle inside the header (never overlaps page content) */
.nav-audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 7px;
  border-radius: 999px;
  background-color: var(--pine);
  color: var(--bg);
  border: 1px solid var(--pine);
  cursor: pointer;
  font-size: var(--text-sm);
  line-height: 1;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.nav-audio-toggle:hover {
  background-color: var(--rose-deep);
  border-color: var(--rose-deep);
}

.mini-disc {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--rose-light);
  background-color: #141916;
  animation: vinylSpin 4s linear infinite;
}

.nav-audio-toggle.is-paused .mini-disc {
  animation-play-state: paused;
}

.mini-state {
  color: var(--rose-light);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 140;
  background-color: rgba(14, 34, 24, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-dialog {
  width: 100%;
  max-width: 940px;
  max-height: 90vh;
  background-color: var(--bg);
  border: 1px solid var(--pine);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  overflow: hidden;
}

.lightbox-media {
  background-color: #0e1e16;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 88vh;
}

.lightbox-media img {
  max-height: 86vh;
  max-width: 100%;
  object-fit: contain;
}

.lightbox-aside {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  border-left: 1px solid var(--rule);
  overflow-y: auto;
}

.lightbox-close {
  align-self: flex-end;
}

.lightbox-date {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rose-deep);
  margin-bottom: 6px;
}

.lightbox-title {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ink);
}

.lightbox-note {
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

.lightbox-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

/* --------------------------------------------------------------------------
   Responsive (Desktop -> Tablet -> 390x844 Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 1020px) {
  .vinyl-layout {
    grid-template-columns: 1fr;
  }

  .turntable-stage {
    justify-content: center;
  }
}

@media (max-width: 960px) {
  .hero-stage,
  .wish-grid,
  .lightbox-dialog {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    max-width: 440px;
    gap: 18px;
  }

  .stage-left,
  .stage-right {
    display: none;
  }

  .turntable-stage {
    justify-content: center;
    min-height: 300px;
  }

  .polaroid-slot,
  .polaroid-slot.is-wide {
    grid-column: span 6;
  }

  .lightbox-aside {
    border-left: none;
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 640px) {
  .container,
  .masthead-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .masthead-inner {
    min-height: 58px;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 12px;
  }

  .masthead-brand {
    font-size: 1.3rem;
  }

  .masthead-nav {
    gap: 16px;
  }

  /* Keep phone navbar spacious and single-line on 360px-390px screens */
  .masthead-nav a:nth-child(1),
  .masthead-nav a:nth-child(3) {
    display: none;
  }

  .hero {
    padding: 90px 0 56px;
  }

  .hero-headline {
    font-size: clamp(2.65rem, 11.5vw, 3.45rem);
    margin-bottom: 16px;
  }

  .hero-inline-tile {
    width: 72px;
    height: 52px;
  }

  .hero-lead {
    margin-bottom: 24px;
  }

  .hero-action {
    width: 100%;
    gap: 10px;
    margin-bottom: 34px;
  }

  .hero-action .btn-primary,
  .hero-action .btn-secondary {
    flex: 1 1 auto;
    justify-content: center;
    padding: 12px 18px;
  }

  .vinyl-section,
  .scrapbook-section,
  .wish-section,
  .letter-section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 28px;
    gap: 12px;
  }

  .vinyl-layout {
    gap: 28px;
  }

  /* Scale the full 526x310 turntable rig proportionally so tonearm + vintage label stay intact on phones */
  .turntable-stage {
    min-height: 0;
    height: 214px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
  }

  .turntable-rig {
    width: 526px;
    height: 310px;
    transform: scale(0.62);
    transform-origin: center center;
  }

  .scrapbook-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
  }

  .filter-tabs {
    gap: 20px;
  }

  .sticker-controls {
    width: 100%;
    justify-content: space-between;
  }

  .seg-option {
    padding: 8px 13px;
  }

  .scrapbook-grid {
    gap: 26px;
    padding: 0 4px;
  }

  .polaroid-slot,
  .polaroid-slot.is-wide {
    grid-column: span 12;
  }

  .polaroid-slot[data-tilt="neg"] {
    transform: rotate(-0.6deg);
  }

  .polaroid-slot[data-tilt="pos"] {
    transform: rotate(0.6deg);
  }

  .wish-grid {
    gap: 24px;
  }

  .cake-panel,
  .moonie-panel,
  .liner-panel {
    padding: 22px 20px;
  }

  .envelope-card {
    height: 248px;
  }

  .envelope-flap {
    height: 126px;
  }

  .wax-seal {
    top: 96px;
    width: 56px;
    height: 56px;
  }

  .pin-panel {
    padding: 28px 18px;
  }

  .pin-digit {
    width: 50px;
    height: 56px;
  }

  .stationery-sheet {
    padding: 28px 20px;
  }

  .colophon {
    padding: 32px 0 42px;
  }

  .colophon-inner {
    justify-content: center;
    text-align: center;
    gap: 8px;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox-media img {
    max-height: 48vh;
  }

  .lightbox-aside {
    padding: 20px 18px;
    gap: 14px;
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion Respect
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
