:root {
  color-scheme: light;
  --ink: #1a1614;
  --ink-soft: #3d3632;
  --muted: #8b7f77;
  --muted-light: #b5aca5;
  --paper: #fdfbf7;
  --paper-warm: #faf6f0;
  --panel: #ffffff;
  --line: rgba(26, 22, 20, 0.08);
  --line-strong: rgba(26, 22, 20, 0.12);
  --rose: #c44f65;
  --rose-soft: rgba(196, 79, 101, 0.1);
  --rose-medium: rgba(196, 79, 101, 0.2);
  --leaf: #2d6b5c;
  --leaf-soft: rgba(45, 107, 92, 0.1);
  --gold: #b8884a;
  --gold-soft: rgba(184, 136, 74, 0.1);
  --shadow-sm: 0 2px 8px rgba(26, 22, 20, 0.04);
  --shadow-md: 0 8px 24px rgba(26, 22, 20, 0.08);
  --shadow-lg: 0 16px 48px rgba(26, 22, 20, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

body.locked {
  overflow: hidden;
}

main {
  min-height: 100vh;
}

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  padding: max(env(safe-area-inset-top), 32px) max(env(safe-area-inset-right), 32px) max(env(safe-area-inset-bottom), 48px) max(env(safe-area-inset-left), 32px);
  overflow: hidden;
  background: linear-gradient(135deg, #1a1614 0%, #2d2622 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(196, 79, 101, 0.15) 0%, transparent 50%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  opacity: 0.45;
  filter: grayscale(0.2) contrast(1.1);
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.hero-media img:first-child {
  grid-column: 1 / 3;
  grid-row: 1 / 2;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
  color: #ffffff;
  padding-bottom: 8vh;
}

.kicker {
  margin: 0 0 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
  opacity: 0.9;
}

.hero .kicker {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 12vw, 7.5rem);
  line-height: 0.95;
  max-width: 12ch;
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.3;
  font-weight: 600;
}

.dedication {
  max-width: 480px;
  margin: 24px 0 0;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
}

.stats div {
  background: transparent;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 3vw, 32px);
  text-align: center;
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border-right: 0;
}

.stats span {
  display: block;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stats p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.map-section,
.timeline {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 max(env(safe-area-inset-right), 24px) 0 max(env(safe-area-inset-left), 24px);
}

.year-filters {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 680px;
}

.year-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(255, 253, 249, 0.72);
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.year-chip.active,
.year-chip:hover,
.year-chip:focus-visible {
  border-color: rgba(183, 77, 99, 0.4);
  background: var(--rose);
  color: #fffdf9;
  outline: 0;
}

#map {
  height: min(70vh, 680px);
  min-height: 420px;
  max-width: 1280px;
  margin: 0 auto;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.map-legend {
  max-width: 1280px;
  margin: 12px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
  border: 2px solid #fffdf9;
  box-shadow: 0 2px 8px rgba(35, 31, 32, 0.22);
}

.legend-dot.gps {
  background: var(--rose);
}

.legend-dot.inferred {
  background: var(--leaf);
}

.places {
  max-width: 1280px;
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.place-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.74);
  color: inherit;
  text-decoration: none;
}

.place-card img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 6px;
}

.place-card strong,
.place-card small {
  display: block;
}

.place-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.place-card:hover,
.place-card:focus-visible {
  border-color: rgba(52, 119, 101, 0.44);
  outline: 2px solid rgba(52, 119, 101, 0.18);
  outline-offset: 2px;
}

.section-intro {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 max(env(safe-area-inset-right), 24px) 0 max(env(safe-area-inset-left), 24px);
  color: var(--muted);
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  line-height: 1.5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* popIn — reused by the Garden's experience-unlock reveal (Phase 2) */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* ===== On This Day ===== */
.onthisday-section {
  padding: clamp(48px, 7vw, 80px) 0 0;
}

.onthisday {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 max(env(safe-area-inset-right), 24px) 0 max(env(safe-area-inset-left), 24px);
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.onthisday::-webkit-scrollbar {
  display: none;
}

.otd-card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(180px, 40vw, 240px);
  aspect-ratio: 4 / 5;
  border: 0;
  padding: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 280ms ease;
}

.otd-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.otd-card:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.otd-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.otd-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 16px 14px;
  text-align: left;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.otd-caption strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.otd-caption span {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* ===== Monthly Experiences ===== */
.experiences-section {
  background: var(--paper-warm);
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.experiences {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(env(safe-area-inset-right), 24px) 0 max(env(safe-area-inset-left), 24px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.experience-card {
  position: relative;
  min-height: 220px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: popIn 500ms cubic-bezier(0.68, -0.4, 0.265, 1.4);
}

.experience-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rose), var(--rose-soft));
}

.experience-card h3 {
  margin: 0 0 12px;
  font-size: clamp(1.375rem, 3vw, 1.625rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.experience-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: 0.9375rem;
}

.experience-photo {
  margin: -32px -28px 20px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.experience-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.experience-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 5px 13px;
  background: var(--rose);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-sm);
  animation: popIn 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Locked / teaser card — quieter, no rose bar, gentle dashed edge */
.experience-card.locked {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-strong);
  box-shadow: none;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  animation: none;
}

.experience-card.locked::before {
  display: none;
}

.experience-card.locked h3 {
  color: var(--muted);
}

.experience-card.locked p {
  color: var(--muted-light);
}

.experience-lock {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 12px;
}

/* ===== Seed-drops (newly planted memories) ===== */
.seeddrops-section {
  padding: clamp(48px, 7vw, 80px) 0;
}

.seeddrops {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(env(safe-area-inset-right), 24px) 0 max(env(safe-area-inset-left), 24px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}

.seeddrop-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: popIn 500ms cubic-bezier(0.68, -0.4, 0.265, 1.4);
}

.seeddrop-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.seeddrop-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.seeddrop-card p {
  margin: 0;
  padding: 18px 20px 6px;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.9375rem;
}

.seeddrop-date {
  display: block;
  padding: 0 20px 18px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ===== Wishlist (Next Adventures) ===== */
.wishlist-section {
  background: var(--paper-warm);
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.wishlist-form,
.wishlist {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 max(env(safe-area-inset-right), 24px) 0 max(env(safe-area-inset-left), 24px);
}

.wishlist-form {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.wishlist-form input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  font: inherit;
  background: var(--panel);
  color: var(--ink);
}

.wishlist-form input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-soft);
}

.wishlist-form button {
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--rose);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 200ms ease;
}

.wishlist-form button:hover {
  opacity: 0.9;
}

.wishlist-form button:focus-visible,
.easter-egg-close:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.wishlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wishlist-item {
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 0.9375rem;
  color: var(--ink-soft);
  animation: popIn 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.wishlist-item.pending {
  opacity: 0.55;
}

.wishlist-empty {
  padding: 16px 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ===== Easter egg ===== */
.easter-egg {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(26, 22, 20, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 400ms ease;
}

/* When hidden, fully remove it from layout so it can't intercept clicks.
   (.easter-egg's display:grid would otherwise override the [hidden] default.) */
.easter-egg[hidden] {
  display: none;
}

.easter-egg.show {
  opacity: 1;
}

.easter-egg-inner {
  max-width: 440px;
  margin: 24px;
  padding: 44px 36px;
  background: var(--paper);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92);
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.easter-egg.show .easter-egg-inner {
  transform: scale(1);
}

.easter-egg-mark {
  display: block;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.easter-egg-inner p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
}

.easter-egg-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

#gallerySentinel {
  height: 1px;
  break-inside: avoid;
}

.year-intro {
  max-width: 1280px;
  margin: 0 auto 24px;
  padding: 0 max(env(safe-area-inset-right), 24px) 0 max(env(safe-area-inset-left), 24px);
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  font-style: italic;
}

.gallery {
  max-width: 1280px;
  margin: 0 auto;
  column-width: 250px;
  column-gap: 16px;
}

.photo-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
  border: 0;
  padding: 0;
  background: var(--panel);
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(38, 31, 25, 0.1);
  transform: translateZ(0);
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  /* aspect-ratio is set inline per-photo so the card reserves its height before
     the image loads (prevents masonry collapse/reflow on year-filter switch). */
  object-fit: cover;
  background: #e8dfd4;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 240ms ease, filter 180ms ease;
}

.photo-card img[style*="background-image"] {
  filter: blur(0);
  animation: blur-up 380ms ease-out;
}

@keyframes blur-up {
  from {
    filter: blur(8px);
  }
  to {
    filter: blur(0);
  }
}

.caption {
  position: absolute;
  inset: auto 0 0;
  padding: 44px 12px 12px;
  color: #fffdf9;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.caption strong {
  display: block;
  font-size: 0.95rem;
}

.caption span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 253, 249, 0.74);
  font-size: 0.82rem;
  line-height: 1.35;
}

.geo-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
  border: 2px solid #fffdf9;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.photo-card:hover img,
.photo-card:focus-visible img {
  transform: scale(1.035);
}

.photo-card:hover,
.photo-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

dialog {
  width: min(1120px, 94vw);
  height: min(92vh, 920px);
  padding: 0;
  border: 0;
  background: #10100f;
  color: #fffdf9;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.45);
}

dialog::backdrop {
  background: rgba(12, 10, 9, 0.74);
}

dialog figure {
  width: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

#lightboxImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 0;
}

figcaption {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px 20px;
  background: rgba(255, 253, 249, 0.08);
  max-height: 40vh;
  overflow-y: auto;
}

figcaption strong {
  font-size: 1rem;
  font-weight: 600;
}

.lightbox-location {
  font-size: 0.9rem;
  color: rgba(255, 253, 249, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lightbox-location::before {
  content: "📍";
  font-size: 1rem;
}

.lightbox-mini-map {
  width: 100%;
  max-width: 400px;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-mini-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-mini-map svg {
  width: 100%;
  height: 100%;
}

.lightbox-note {
  padding: 14px 16px;
  background: rgba(196, 79, 101, 0.12);
  border-left: 3px solid var(--rose);
  border-radius: 6px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 253, 249, 0.92);
  font-style: italic;
}

.lightbox-note::before {
  content: "💭 ";
}

.lightbox-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lightbox-metadata span {
  color: rgba(255, 253, 249, 0.64);
  font-size: 0.88rem;
}

figcaption a {
  color: #f5c5cf;
  text-decoration: none;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

figcaption a:hover {
  text-decoration: underline;
}

.icon-button {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.close {
  top: 14px;
  right: 14px;
}

.nav {
  top: 50%;
  transform: translateY(-50%);
}

.prev {
  left: 14px;
}

.next {
  right: 14px;
}

.memory-marker {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--rose);
  color: white;
  border: 2px solid white;
  box-shadow: 0 5px 16px rgba(35, 31, 32, 0.24);
  font-weight: 800;
  font-size: 0.72rem;
}

.memory-marker.inferred {
  background: var(--leaf);
}

.leaflet-popup-content {
  margin: 10px;
}

.popup {
  width: 180px;
}

.popup img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  margin-bottom: 8px;
}

.popup strong,
.popup span {
  display: block;
}

.popup span {
  color: #5f5753;
  margin-top: 3px;
}

.popup a {
  display: inline-block;
  margin-top: 7px;
  color: var(--rose);
  text-decoration: none;
  font-weight: 700;
}

.birthday-modal {
  width: min(480px, calc(100vw - 32px));
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
}

.birthday-modal::backdrop {
  background: rgba(26, 22, 20, 0.94);
  backdrop-filter: blur(12px);
}

.birthday-content {
  background: var(--panel);
  padding: clamp(36px, 6vw, 56px) clamp(28px, 5vw, 40px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(26, 22, 20, 0.05);
  text-align: center;
}

.birthday-content h2 {
  margin: 0 0 20px;
  color: var(--rose);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 28px 0;
}

.countdown-unit {
  padding: clamp(14px, 3vw, 20px) clamp(10px, 2vw, 14px);
  background: var(--rose-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--rose-medium);
}

.countdown-value {
  display: block;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--rose);
  line-height: 1;
  letter-spacing: -0.02em;
}

.countdown-label {
  display: block;
  margin-top: 6px;
  font-size: 0.6875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.birthday-note {
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.unlock-button {
  margin-top: 16px;
  padding: 14px 28px;
  background: var(--rose);
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 240ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.unlock-button:hover {
  background: #b0395a;
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.unlock-button:active {
  transform: scale(0.98);
}

.music-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(12px);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(38, 31, 25, 0.14);
  transition: all 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
  display: grid;
  place-items: center;
}

.music-toggle:hover {
  border-color: rgba(183, 77, 99, 0.4);
  color: var(--rose);
  box-shadow: 0 12px 32px rgba(183, 77, 99, 0.24);
  transform: translateY(-2px) scale(1.08);
}

.music-toggle.playing {
  border-color: var(--rose);
  color: var(--rose);
  background: rgba(183, 77, 99, 0.12);
}

.music-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 900px) {
  .gallery {
    column-width: 230px;
  }

}

@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(env(safe-area-inset-top), 24px) max(env(safe-area-inset-right), 20px) max(env(safe-area-inset-bottom), 40px) max(env(safe-area-inset-left), 20px);
  }

  .hero-media {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .hero-media img:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-media img:nth-child(n + 2) {
    display: none;
  }

  .hero-copy {
    padding-bottom: 6vh;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 4.5rem);
    max-width: 100%;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 32px 24px;
  }

  .stats div:last-child {
    border-bottom: 0;
  }

  .section-title {
    display: block;
  }

  .year-filters {
    justify-content: flex-start;
    margin-top: 20px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .year-filters::-webkit-scrollbar {
    display: none;
  }

  .year-chip {
    flex: 0 0 auto;
  }

  #map {
    min-height: 400px;
    border-radius: 0;
  }

  .map-section {
    padding-left: 0;
    padding-right: 0;
  }

  .places {
    grid-template-columns: 1fr;
  }


  .experiences {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .experience-card {
    min-height: 200px;
    padding: 28px 24px;
  }

  .wishlist-form {
    flex-direction: column;
  }

  .wishlist-form button {
    width: 100%;
  }

  .gallery {
    column-width: 180px;
    column-gap: 12px;
  }

  .photo-card {
    margin-bottom: 12px;
  }

  figcaption {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  figcaption a {
    margin-left: 0;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .birthday-content h2 {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .music-toggle {
    bottom: max(env(safe-area-inset-bottom), 20px);
    right: max(env(safe-area-inset-right), 20px);
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 480px) {
  .gallery {
    column-width: 160px;
  }

  .section-intro {
    font-size: 0.9375rem;
  }

}

/* ===== Reduced motion — respect the user's preference ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .experience-card,
  .seeddrop-card,
  .wishlist-item,
  .experience-badge {
    animation: none;
  }

  .easter-egg-inner {
    transform: none;
  }
}
