:root {
  --night: #08182d;
  --night-soft: #102644;
  --navy-mist: #17345d;
  --gold: #f3d188;
  --gold-soft: #f7e7b7;
  --rose: #d5968f;
  --rose-soft: #f4d8d0;
  --cream: #fff7ea;
  --paper: #fffaf1;
  --ink: #2b2231;
  --ink-soft: rgba(43, 34, 49, 0.72);
  --shadow: 0 24px 80px rgba(4, 13, 28, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: clamp(17px, 0.4vw + 15px, 20px);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(245, 217, 140, 0.18), transparent 30%),
    linear-gradient(180deg, #061324 0%, #0d2240 18%, #f8efe2 18.01%, #fdf7ef 100%);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.page-shell {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: min(52rem, 88svh);
  padding: 1.2rem clamp(1.1rem, 3vw, 3.4rem) 4.25rem;
  color: white;
}

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

.hero__fireflies {
  position: absolute;
  inset: 0;
}

.hero__star,
.hero__moon {
  position: absolute;
  border-radius: 999px;
}

.hero__star {
  background: rgba(255, 243, 199, 0.9);
  box-shadow: 0 0 14px rgba(255, 243, 199, 0.9);
  animation: twinkle 4s ease-in-out infinite;
}

.hero__star--one {
  top: 18%;
  left: 10%;
  width: 0.45rem;
  height: 0.45rem;
}

.hero__star--two {
  top: 24%;
  right: 16%;
  width: 0.55rem;
  height: 0.55rem;
  animation-delay: 0.8s;
}

.hero__star--three {
  top: 40%;
  left: 22%;
  width: 0.35rem;
  height: 0.35rem;
  animation-delay: 1.4s;
}

.hero__star--four {
  top: 14%;
  right: 34%;
  width: 0.3rem;
  height: 0.3rem;
  animation-delay: 2s;
}

.hero__moon {
  top: 11%;
  right: 10%;
  width: 7rem;
  height: 7rem;
  background: radial-gradient(circle at 35% 35%, #fff7dc 0%, #f6dfa2 56%, rgba(246, 223, 162, 0.35) 100%);
  box-shadow: 0 0 60px rgba(243, 209, 136, 0.45);
}

.topbar {
  position: relative;
  z-index: 3;
  max-width: 86rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar__crest {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.06em;
}

.topbar__links {
  display: flex;
  gap: 1.35rem;
  font-weight: 600;
  font-size: 1rem;
}

.topbar__links a {
  text-decoration: none;
  opacity: 0.88;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 46rem;
  padding-top: clamp(3.2rem, 8vh, 5.5rem);
}

.hero__layout {
  position: relative;
  z-index: 3;
  max-width: 86rem;
  margin: 0.5rem auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 28rem);
  align-items: start;
  gap: clamp(1.4rem, 3vw, 2.2rem);
  transition: transform 0.4s ease;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero h1,
.section h2,
.story-card h3 {
  font-family: "Cormorant Garamond", serif;
}

.hero h1 {
  margin: 0;
  font-size: clamp(4rem, 8vw, 6.8rem);
  line-height: 0.9;
}

.hero__identity {
  margin: 0 0 0.5rem;
  color: rgba(255, 244, 220, 0.92);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  letter-spacing: 0.04em;
}

.hero__lede {
  max-width: 36rem;
  margin: 1rem 0 0;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 249, 240, 0.9);
}

.hero__actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.45rem;
}

.hero-memory {
  position: relative;
  min-height: 31rem;
}

.hero-memory__main,
.hero-memory__mini {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 244, 220, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 50px rgba(1, 10, 22, 0.32);
}

.hero-memory__main {
  position: absolute;
  top: 0.2rem;
  right: 0;
  width: min(100%, 22.5rem);
  border-radius: 2rem;
  transform: rotate(2deg);
  transition: transform 0.5s ease;
}

.hero-memory__main img {
  width: 100%;
  height: 24.5rem;
  object-fit: cover;
  cursor: zoom-in;
}

.hero-memory__main figcaption {
  padding: 1rem 1.15rem 1.2rem;
  color: rgba(255, 248, 236, 0.95);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
}

.hero-memory__mini {
  position: absolute;
  width: 8.6rem;
  height: 8.6rem;
  border-radius: 1.4rem;
  transition: transform 0.5s ease;
}

.hero-memory__mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.hero-memory__mini--one {
  left: 0.25rem;
  top: 4.4rem;
  transform: rotate(-7deg);
}

.hero-memory__mini--two {
  left: 0;
  bottom: 2.15rem;
  transform: rotate(6deg);
}

.hero-memory__mini--three {
  right: 1.1rem;
  bottom: 0;
  transform: rotate(-5deg);
}

.hero--interactive .hero__layout {
  transform: translateY(var(--hero-shift, 0));
}

.hero--interactive .hero-memory__main {
  transform: translate3d(var(--hero-x, 0), var(--hero-y, 0), 0) rotate(2deg);
}

.hero--interactive .hero-memory__mini--one {
  transform: translate3d(calc(var(--hero-x, 0) * -0.6), calc(var(--hero-y, 0) * -0.6), 0) rotate(-7deg);
}

.hero--interactive .hero-memory__mini--two {
  transform: translate3d(calc(var(--hero-x, 0) * 0.8), calc(var(--hero-y, 0) * 0.35), 0) rotate(6deg);
}

.hero--interactive .hero-memory__mini--three {
  transform: translate3d(calc(var(--hero-x, 0) * -0.45), calc(var(--hero-y, 0) * 0.75), 0) rotate(-5deg);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  min-height: 3.45rem;
  padding: 1rem 1.55rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, #ffe8b2, #f3c46e);
  color: #41250f;
  box-shadow: 0 12px 28px rgba(243, 196, 110, 0.28);
}

.button--secondary {
  background: rgba(16, 38, 68, 0.08);
  color: var(--ink);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.hero__castle {
  position: absolute;
  inset: auto 0 0;
  height: 30vh;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2vw;
  opacity: 0.9;
}

.castle {
  position: relative;
  background: linear-gradient(180deg, rgba(16, 38, 68, 0.4), rgba(7, 18, 36, 0.96));
  border-radius: 24px 24px 0 0;
  box-shadow: inset 0 0 0 1px rgba(247, 231, 183, 0.08);
}

.castle::before,
.castle::after {
  content: "";
  position: absolute;
  bottom: 100%;
  width: 0;
  height: 0;
  border-left: 1rem solid transparent;
  border-right: 1rem solid transparent;
  border-bottom: 2.2rem solid rgba(7, 18, 36, 0.96);
}

.castle::after {
  bottom: auto;
  top: -0.8rem;
  left: 38%;
}

.castle--left,
.castle--right {
  width: 5rem;
  height: 11rem;
}

.castle--center {
  width: 10rem;
  height: 15rem;
}

.section {
  position: relative;
  padding: clamp(4.5rem, 8vw, 8rem) clamp(1.4rem, 4vw, 4rem);
}

.section__heading {
  max-width: 52rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section__heading h2 {
  margin: 0;
  font-size: clamp(2.9rem, 5vw, 4.5rem);
  line-height: 0.98;
}

.section__intro {
  margin: 1rem auto 0;
  max-width: 40rem;
  color: var(--ink-soft);
  line-height: 1.75;
  font-size: 1.04rem;
}

.section--storybook,
.section--gallery,
.section--guestbook {
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.94), rgba(250, 241, 227, 0.98));
}

.section--promise {
  background:
    radial-gradient(circle at center, rgba(243, 209, 136, 0.18), transparent 28%),
    linear-gradient(180deg, #f8efe2, #fff7ea);
}

.section--portrait,
.section--details,
.section--music {
  background:
    radial-gradient(circle at top left, rgba(243, 209, 136, 0.18), transparent 24%),
    linear-gradient(180deg, #fff7ea, #f7ecdb);
}

.storybook-grid {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.memory-ribbon {
  max-width: 82rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 28rem);
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(197, 168, 111, 0.16);
  box-shadow: var(--shadow);
}

.memory-ribbon__copy h2 {
  margin: 0;
}

.memory-ribbon__copy p:last-child {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.memory-ribbon__stage {
  position: relative;
  min-height: 20rem;
}

.quote-orb {
  position: absolute;
  inset: 0;
  padding: 1.4rem;
  display: grid;
  align-content: center;
  gap: 0.85rem;
  border-radius: 1.8rem;
  background:
    radial-gradient(circle at top, rgba(255, 247, 221, 0.75), transparent 35%),
    linear-gradient(180deg, rgba(12, 33, 59, 0.96), rgba(7, 18, 36, 0.96));
  color: rgba(255, 248, 236, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 209, 0.08), 0 24px 60px rgba(4, 13, 28, 0.28);
  opacity: 0;
  transform: translateY(1rem) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.quote-orb--active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.quote-orb__label {
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 700;
}

.quote-orb p {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.08;
}

.story-card,
.timeline__entry,
.guestbook-card,
.globe-panel,
.wish {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 168, 111, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.story-card {
  padding: 2rem;
}

.story-card h3 {
  margin: 0 0 0.8rem;
  font-size: 2.15rem;
}

.story-card p,
.timeline__entry p,
.wish p,
.guestbook-form label,
.message-stream__card p {
  line-height: 1.75;
  font-size: 1rem;
}

.section--timeline {
  background:
    radial-gradient(circle at top right, rgba(213, 150, 143, 0.22), transparent 28%),
    linear-gradient(180deg, #fff7ea, #f7ecdb);
}

.portrait-feature {
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr);
  gap: 1.8rem;
  align-items: center;
  padding: 1.4rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(197, 168, 111, 0.16);
  box-shadow: var(--shadow);
}

.portrait-feature__image {
  margin: 0;
  overflow: hidden;
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
}

.portrait-feature__image img {
  width: 100%;
  height: 100%;
  min-height: 26rem;
  object-fit: cover;
  cursor: zoom-in;
}

.portrait-feature__copy h2 {
  margin: 0;
}

.portrait-feature__copy p:not(.eyebrow) {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  line-height: 1.85;
}

.timeline {
  max-width: 68rem;
  margin: 0 auto;
  display: grid;
  gap: 1.35rem;
}

.timeline__entry {
  position: relative;
  padding: 1.85rem 1.8rem 1.85rem 5.85rem;
}

.timeline__entry::before {
  content: "";
  position: absolute;
  top: 1.9rem;
  left: 2rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: radial-gradient(circle, #fff4d0 0%, #efc76e 70%);
  box-shadow: 0 0 18px rgba(239, 199, 110, 0.5);
}

.timeline__year {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d6241;
}

.gallery {
  max-width: 82rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.chapter-gallery {
  max-width: 82rem;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.chapter-gallery__section {
  padding: 1.25rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(197, 168, 111, 0.16);
  box-shadow: var(--shadow);
}

.chapter-gallery__copy {
  max-width: 40rem;
  margin-bottom: 1.25rem;
}

.chapter-gallery__copy h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
}

.chapter-gallery__copy p:last-child {
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
}

.gallery--chapter {
  max-width: none;
}

.gallery--balanced .photo-card img {
  min-height: 20rem;
}

.photo-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.photo-card:hover,
.photo-card:focus-within {
  transform: translateY(-0.35rem);
  box-shadow: 0 28px 70px rgba(4, 13, 28, 0.2);
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(243, 209, 136, 0.45);
  border-radius: inherit;
  pointer-events: none;
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 22rem;
  object-fit: cover;
  filter: saturate(0.9) contrast(0.96);
}

.photo-card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 1rem;
  color: white;
  background: linear-gradient(180deg, transparent, rgba(5, 16, 33, 0.84));
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 10, 20, 0.82);
  cursor: pointer;
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.9rem;
  width: min(92vw, 64rem);
  max-height: 92vh;
  margin: 4vh auto;
  padding: 1rem;
  border-radius: 1.6rem;
  background: rgba(255, 250, 241, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.lightbox__dialog img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 1.1rem;
  background: #efe3cf;
}

.lightbox__dismiss {
  justify-self: end;
  border: 0;
  border-radius: 999px;
  min-height: 2.8rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 700;
  background: rgba(16, 38, 68, 0.08);
  color: var(--ink);
  cursor: pointer;
}

.lightbox__caption {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.photo-card--tall {
  grid-row: span 2;
}

.photo-card--wide {
  grid-column: span 2;
}

.section--wish {
  background: linear-gradient(180deg, #f6ead8, #fff7ea);
}

.wish {
  max-width: 78rem;
  margin: 0 auto;
  padding: 2.3rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.8rem;
}

.wish h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.detail-strip {
  max-width: 82rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}

.detail-strip__card {
  margin: 0;
  overflow: hidden;
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(197, 168, 111, 0.16);
  box-shadow: var(--shadow);
}

.detail-strip__card img {
  width: 100%;
  min-height: 18rem;
  object-fit: cover;
  cursor: zoom-in;
}

.detail-strip__card figcaption {
  padding: 1rem 1.05rem 1.2rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.music-feature {
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 15rem;
  gap: 2rem;
  align-items: center;
  padding: 1.9rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(197, 168, 111, 0.16);
  box-shadow: var(--shadow);
}

.music-feature__copy h2 {
  margin: 0;
}

.music-feature__copy p {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.music-feature__meta {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
}

.music-feature__now-playing {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink);
}

.music-feature__autoplay-note {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(43, 34, 49, 0.68);
}

.music-tracklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.music-tracklist__button {
  border: 1px solid rgba(151, 109, 45, 0.24);
  background: rgba(255, 249, 237, 0.9);
  color: var(--ink);
  padding: 0.72rem 1rem;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.music-tracklist__button:hover,
.music-tracklist__button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(78, 49, 17, 0.12);
  background: rgba(249, 225, 178, 0.96);
}

.music-tracklist__button.is-active {
  background: linear-gradient(135deg, rgba(232, 188, 104, 0.95), rgba(252, 234, 188, 0.98));
  border-color: rgba(151, 109, 45, 0.42);
  box-shadow: 0 16px 28px rgba(114, 74, 24, 0.14);
}

.music-feature__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.music-feature__credit {
  margin-top: 1rem;
  font-size: 0.88rem;
}

.music-feature__credit a {
  color: var(--ink);
}

.music-feature__disc {
  position: relative;
  width: 16rem;
  height: 16rem;
  margin: 0 auto;
}

.music-feature__vinyl,
.music-feature__glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.music-feature__vinyl {
  background:
    radial-gradient(circle at center, #efd39b 0 12%, #1b1b1b 13% 34%, #2b2b2b 35% 39%, #111 40% 60%, #2b2b2b 61% 64%, #111 65% 100%);
  box-shadow: 0 24px 40px rgba(4, 13, 28, 0.18);
}

.music-feature__glow {
  background: radial-gradient(circle, rgba(243, 209, 136, 0.24), transparent 65%);
  animation: pulseGlow 4s ease-in-out infinite;
}

.music-feature.is-playing .music-feature__vinyl {
  animation: spinSlow 5s linear infinite;
}

.button--compact {
  min-height: 3.45rem;
  padding-inline: 1.15rem;
}

.audio-dock {
  position: fixed;
  right: 1.1rem;
  bottom: 1.15rem;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 1.3rem;
  background: rgba(10, 24, 45, 0.9);
  color: rgba(255, 249, 240, 0.96);
  box-shadow: 0 22px 40px rgba(4, 13, 28, 0.28);
  backdrop-filter: blur(14px);
}

.audio-dock__copy {
  display: grid;
  gap: 0.12rem;
}

.audio-dock__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(243, 209, 136, 0.9);
}

.audio-dock__track {
  font-size: 0.92rem;
}

.audio-dock__actions {
  display: flex;
  gap: 0.55rem;
}

.audio-dock__button {
  border: 1px solid rgba(243, 209, 136, 0.32);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.audio-dock__button:hover,
.audio-dock__button:focus-visible {
  background: rgba(243, 209, 136, 0.16);
}

.guestbook-layout {
  max-width: 84rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 1.6rem;
}

.guestbook-intro {
  max-width: 84rem;
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 1.4rem;
  align-items: center;
  padding: 1.3rem 1.4rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(197, 168, 111, 0.16);
  box-shadow: var(--shadow);
}

.guestbook-intro__copy h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
}

.guestbook-intro__copy p:last-child {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.memorial-growth {
  margin-top: 1.15rem;
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 252, 243, 0.92), rgba(251, 243, 225, 0.8));
  border: 1px solid rgba(197, 168, 111, 0.18);
}

.memorial-growth__head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.memorial-growth__eyebrow,
.memorial-growth__count,
.memorial-growth__title,
.memorial-growth__body {
  margin: 0;
}

.memorial-growth__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8d6241;
}

.memorial-growth__count {
  color: var(--ink-soft);
}

.memorial-growth__count strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.memorial-growth__track {
  position: relative;
  height: 0.9rem;
  margin-top: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(215, 196, 153, 0.32);
}

.memorial-growth__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 8%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f3c56c 0%, #f9e1a5 55%, #fff7dc 100%);
  box-shadow: 0 0 18px rgba(243, 197, 108, 0.45);
  transition: width 0.8s ease;
}

.memorial-growth__spark {
  position: absolute;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  margin-top: -0.3rem;
  border-radius: 999px;
  background: rgba(255, 247, 223, 0.9);
  box-shadow: 0 0 16px rgba(255, 240, 188, 0.7);
  opacity: 0.5;
}

.memorial-growth__spark--one {
  left: 24%;
}

.memorial-growth__spark--two {
  left: 56%;
}

.memorial-growth__spark--three {
  left: 82%;
}

.memorial-growth__title {
  margin-top: 0.8rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1;
}

.memorial-growth__body {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.memorial-milestones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.memorial-milestone {
  padding: 0.8rem 0.85rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(197, 168, 111, 0.14);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.memorial-milestone__count,
.memorial-milestone__label {
  margin: 0;
}

.memorial-milestone__count {
  font-weight: 800;
  color: var(--ink);
}

.memorial-milestone__label {
  margin-top: 0.3rem;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.94rem;
}

.memorial-milestone.is-current {
  background: rgba(255, 249, 234, 0.92);
  box-shadow: 0 14px 26px rgba(243, 209, 136, 0.18);
  transform: translateY(-2px);
}

.memorial-milestone.is-unlocked {
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.92), rgba(252, 242, 214, 0.84));
  box-shadow: 0 12px 24px rgba(243, 209, 136, 0.14);
}

.memorial-evolution {
  max-width: 84rem;
  margin: 1.7rem auto 0;
  padding: 1.4rem;
  border-radius: 2rem;
  background:
    radial-gradient(circle at top left, rgba(255, 240, 198, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(14, 31, 57, 0.96), rgba(10, 23, 45, 0.96));
  color: #f7f1e5;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(12, 24, 44, 0.26);
}

.memorial-evolution__heading h3,
.memorial-evolution__heading p {
  margin: 0;
}

.memorial-evolution__heading h3 {
  margin-top: 0.2rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 3.2vw, 2.9rem);
  line-height: 0.96;
}

.memorial-evolution__heading p:last-child {
  max-width: 44rem;
  margin-top: 0.7rem;
  color: rgba(247, 241, 229, 0.8);
  line-height: 1.7;
}

.memorial-evolution__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.evolution-card {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  min-height: 16rem;
  padding: 1rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 233, 182, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0.65;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease, background 0.45s ease, border-color 0.45s ease;
}

.evolution-card__eyebrow,
.evolution-card__body,
.evolution-card__state {
  margin: 0;
}

.evolution-card__eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 222, 150, 0.78);
}

.evolution-card__head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.evolution-card__head h4 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  line-height: 1;
}

.evolution-card__state {
  flex: 0 0 auto;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 241, 229, 0.74);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evolution-card__body {
  color: rgba(247, 241, 229, 0.8);
  line-height: 1.75;
}

.evolution-card__stat {
  display: grid;
  gap: 0.2rem;
  margin-top: auto;
}

.evolution-card__stat strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.5rem;
  line-height: 0.9;
  color: #ffe6a6;
}

.evolution-card__stat span {
  color: rgba(247, 241, 229, 0.72);
}

.evolution-card__locations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
}

.location-pill {
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 229, 170, 0.15);
  color: #f8f1e2;
  font-size: 0.88rem;
}

.location-pill.is-placeholder {
  color: rgba(248, 241, 226, 0.62);
}

.evolution-share {
  display: grid;
  gap: 0.8rem;
  margin-top: auto;
}

.evolution-share__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.evolution-share__status {
  min-height: 1.25rem;
  margin: 0;
  color: rgba(248, 241, 226, 0.78);
}

.evolution-card.is-unlocked {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(180deg, rgba(255, 241, 208, 0.12), rgba(255, 255, 255, 0.08));
  border-color: rgba(255, 227, 163, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 34px rgba(9, 20, 39, 0.24);
}

.evolution-card.is-unlocked .evolution-card__state {
  background: rgba(255, 222, 150, 0.16);
  color: #ffe6a6;
}

.evolution-card.is-current {
  opacity: 0.92;
  transform: translateY(0);
  border-color: rgba(255, 226, 158, 0.24);
}

.memorial-chorus {
  max-width: 84rem;
  margin: 1.35rem auto 0;
  padding: 1.35rem;
  border-radius: 2rem;
  background:
    radial-gradient(circle at top center, rgba(255, 231, 173, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(252, 245, 231, 0.92));
  border: 1px solid rgba(197, 168, 111, 0.18);
  box-shadow: 0 24px 50px rgba(16, 25, 42, 0.08);
  transition: transform 0.6s ease, box-shadow 0.6s ease, background 0.6s ease;
}

.memorial-chorus__heading h3,
.memorial-chorus__heading p {
  margin: 0;
}

.memorial-chorus__heading h3 {
  margin-top: 0.2rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 0.98;
}

.memorial-chorus__heading p:last-child {
  max-width: 46rem;
  margin-top: 0.7rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.memorial-chorus__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.chorus-card {
  padding: 1rem;
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(197, 168, 111, 0.14);
  opacity: 0.7;
  transform: translateY(8px);
  transition: transform 0.45s ease, opacity 0.45s ease, box-shadow 0.45s ease;
}

.chorus-card__message,
.chorus-card__meta {
  margin: 0;
}

.chorus-card__message {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--ink);
}

.chorus-card__meta {
  margin-top: 0.65rem;
  color: #8d6241;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

body[data-guestbook-stage="3"] .memorial-chorus,
body[data-guestbook-stage="4"] .memorial-chorus,
body[data-guestbook-stage="5"] .memorial-chorus,
body[data-guestbook-stage="6"] .memorial-chorus {
  background:
    radial-gradient(circle at top center, rgba(255, 222, 149, 0.24), transparent 32%),
    linear-gradient(180deg, rgba(255, 251, 241, 0.98), rgba(252, 242, 216, 0.94));
  box-shadow: 0 28px 58px rgba(16, 25, 42, 0.1), 0 0 30px rgba(243, 209, 136, 0.14);
}

body[data-guestbook-stage="3"] .chorus-card,
body[data-guestbook-stage="4"] .chorus-card,
body[data-guestbook-stage="5"] .chorus-card,
body[data-guestbook-stage="6"] .chorus-card {
  opacity: 1;
  transform: translateY(0);
}

body[data-guestbook-stage="4"] .memory-ribbon,
body[data-guestbook-stage="5"] .memory-ribbon,
body[data-guestbook-stage="6"] .memory-ribbon,
body[data-guestbook-stage="4"] .wish,
body[data-guestbook-stage="5"] .wish,
body[data-guestbook-stage="6"] .wish {
  box-shadow: 0 24px 54px rgba(16, 25, 42, 0.1), 0 0 26px rgba(243, 209, 136, 0.12);
}

body[data-guestbook-stage="5"] .hero__star,
body[data-guestbook-stage="6"] .hero__star {
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(255, 231, 173, 0.78));
}

body[data-guestbook-stage="5"] .hero-memory__main,
body[data-guestbook-stage="6"] .hero-memory__main {
  box-shadow: 0 28px 70px rgba(8, 17, 32, 0.32), 0 0 34px rgba(255, 225, 156, 0.16);
}

.memory-wall {
  max-width: 84rem;
  margin: 1.3rem auto 0;
  padding: 1.35rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(197, 168, 111, 0.16);
  box-shadow: 0 18px 40px rgba(16, 25, 42, 0.07);
  transition: box-shadow 0.5s ease, transform 0.5s ease, background 0.5s ease;
}

.memory-wall__heading h3,
.memory-wall__heading p {
  margin: 0;
}

.memory-wall__heading h3 {
  margin-top: 0.2rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 0.98;
}

.memory-wall__heading p:last-child {
  max-width: 45rem;
  margin-top: 0.7rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.memory-wall__ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.memory-chip {
  padding: 0.5rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 250, 239, 0.88);
  border: 1px solid rgba(197, 168, 111, 0.16);
  color: #7a5839;
  font-size: 0.9rem;
  box-shadow: 0 10px 20px rgba(16, 25, 42, 0.04);
}

.memory-chip.is-placeholder {
  color: rgba(122, 88, 57, 0.62);
}

.memory-wall__quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.memory-fragment {
  padding: 1rem 1.05rem;
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(251, 243, 227, 0.84));
  border: 1px solid rgba(197, 168, 111, 0.14);
  opacity: 0.7;
  transform: translateY(8px);
  transition: transform 0.45s ease, opacity 0.45s ease, box-shadow 0.45s ease;
}

.memory-fragment__text {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  line-height: 1.08;
  color: var(--ink);
}

body[data-guestbook-stage="4"] .memory-wall,
body[data-guestbook-stage="5"] .memory-wall,
body[data-guestbook-stage="6"] .memory-wall {
  background:
    radial-gradient(circle at top left, rgba(255, 228, 161, 0.2), transparent 28%),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 54px rgba(16, 25, 42, 0.09), 0 0 22px rgba(243, 209, 136, 0.11);
}

body[data-guestbook-stage="5"] .memory-fragment,
body[data-guestbook-stage="6"] .memory-fragment {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 16px 34px rgba(16, 25, 42, 0.07);
}

.lantern-row {
  position: relative;
  min-height: 10rem;
}

.lantern {
  position: absolute;
  bottom: 0;
  width: 3.5rem;
  height: 5rem;
  border-radius: 1.2rem 1.2rem 0.8rem 0.8rem;
  background:
    linear-gradient(180deg, rgba(255, 247, 221, 0.95), rgba(243, 209, 136, 0.72)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  box-shadow:
    0 0 22px rgba(243, 209, 136, 0.55),
    inset 0 -10px 18px rgba(205, 138, 68, 0.2);
  animation: lanternFloat var(--lantern-speed, 5s) ease-in-out infinite;
}

.lantern::before {
  content: "";
  position: absolute;
  top: -0.85rem;
  left: 50%;
  width: 1.1rem;
  height: 0.85rem;
  margin-left: -0.55rem;
  border-radius: 999px 999px 0 0;
  border: 2px solid rgba(130, 86, 54, 0.55);
  border-bottom: 0;
}

.lantern::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1rem;
  width: 1px;
  height: 1rem;
  background: rgba(130, 86, 54, 0.45);
}

.lantern--one {
  left: 1rem;
  --lantern-speed: 5.5s;
}

.lantern--two {
  left: 6.4rem;
  width: 4.1rem;
  height: 5.8rem;
  --lantern-speed: 6.2s;
}

.lantern--three {
  right: 1rem;
  --lantern-speed: 5.8s;
}

.lantern-row--awakened .lantern {
  box-shadow:
    0 0 28px rgba(243, 209, 136, 0.68),
    inset 0 -10px 18px rgba(205, 138, 68, 0.22);
}

.lantern-row--radiant .lantern {
  transform: translateY(-4px) scale(1.04);
}

.globe-panel,
.guestbook-card {
  padding: 1.6rem;
}

.globe-stage {
  position: relative;
  min-height: 31rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 35%, rgba(242, 205, 122, 0.22), transparent 30%),
    linear-gradient(180deg, #07172a 0%, #0b203b 100%);
}

.globe-stage__lights {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.globe {
  position: relative;
  width: min(44rem, 100%);
  height: min(28rem, 64vw);
  border-radius: 2rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 24%, rgba(255, 236, 177, 0.12), transparent 18%),
    radial-gradient(circle at 78% 18%, rgba(146, 199, 255, 0.14), transparent 16%),
    linear-gradient(180deg, #0d2340 0%, #102b4d 45%, #08162a 100%);
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 30px 80px rgba(3, 12, 25, 0.58);
  transition: box-shadow 0.8s ease, transform 0.8s ease;
}

body[data-guestbook-stage="2"] .globe,
body[data-guestbook-stage="3"] .globe,
body[data-guestbook-stage="4"] .globe,
body[data-guestbook-stage="5"] .globe,
body[data-guestbook-stage="6"] .globe {
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 80px rgba(3, 12, 25, 0.58),
    0 0 calc(28px + (var(--guestbook-growth, 0.1) * 28px)) rgba(255, 219, 137, 0.18);
}

body[data-guestbook-stage="4"] .message-stream__card,
body[data-guestbook-stage="5"] .message-stream__card,
body[data-guestbook-stage="6"] .message-stream__card {
  box-shadow: 0 18px 40px rgba(4, 13, 28, 0.08), 0 0 24px rgba(243, 209, 136, 0.12);
}

.globe__map,
.globe__marker-layer,
.globe-empty-state {
  position: absolute;
  inset: 0;
}

.globe__map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.globe__graticule line {
  fill: none;
  stroke: rgba(209, 228, 251, 0.1);
  stroke-width: 0.45;
}

.globe__continents path {
  fill: rgba(108, 167, 145, 0.26);
  stroke: rgba(206, 238, 225, 0.14);
  stroke-width: 0.5;
}

.globe__links {
  overflow: visible;
}

.globe__links line {
  stroke: rgba(255, 224, 154, 0.34);
  stroke-width: 0.32;
  stroke-dasharray: 2.5 2.5;
}

.globe__links .globe__link--soft {
  stroke: rgba(173, 214, 255, 0.18);
}

.globe__marker-layer {
  z-index: 2;
}

.globe-marker {
  position: absolute;
  width: 0.95rem;
  height: 0.95rem;
  border: 0;
  border-radius: 999px;
  background: radial-gradient(circle, #fff8de 0%, #ffd97f 52%, #d79957 100%);
  box-shadow: 0 0 18px rgba(255, 209, 112, 0.9);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  animation: pulseGlow 2.8s ease-in-out infinite;
}

.globe-marker:hover,
.globe-marker:focus-visible {
  transform: translate(-50%, -50%) scale(1.2);
}

.globe-popup {
  position: absolute;
  right: clamp(0.8rem, 2vw, 1.4rem);
  bottom: clamp(0.8rem, 2vw, 1.4rem);
  width: min(19rem, calc(100% - 1.6rem));
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: rgba(255, 250, 241, 0.92);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(2, 10, 20, 0.28);
}

.globe-empty-state {
  inset: auto 1.2rem 1.2rem 1.2rem;
  z-index: 4;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(12, 25, 46, 0.84), rgba(16, 33, 58, 0.92));
  border: 1px solid rgba(255, 217, 127, 0.18);
  color: rgba(255, 247, 233, 0.94);
  box-shadow: 0 18px 40px rgba(2, 10, 20, 0.32);
}

.globe-empty-state__eyebrow,
.globe-empty-state__body {
  margin: 0;
}

.globe-empty-state__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffd98a;
}

.globe-empty-state__body {
  margin-top: 0.45rem;
  line-height: 1.65;
  color: rgba(255, 247, 233, 0.88);
}

.globe-popup__location,
.globe-popup__name {
  margin: 0;
  font-weight: 700;
}

.globe-popup__location {
  color: #8d6241;
}

.globe-popup__message {
  margin: 0.6rem 0;
  line-height: 1.7;
  color: var(--ink-soft);
}

.message-stream {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.message-stream__card {
  position: relative;
  padding: 1.15rem 1.25rem 1.2rem;
  border-radius: 1.4rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 248, 236, 0.72));
  border: 1px solid rgba(197, 168, 111, 0.18);
  box-shadow: 0 18px 40px rgba(4, 13, 28, 0.08);
}

.message-stream__card::before {
  content: "";
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 248, 214, 0.95), rgba(243, 209, 136, 0.28));
  box-shadow: 0 0 22px rgba(243, 209, 136, 0.45);
  opacity: 0.7;
}

.message-stream__card strong,
.message-stream__card span {
  display: block;
  padding-left: 2.85rem;
}

.message-stream__card span {
  margin-top: 0.25rem;
  color: #8d6241;
  font-size: 0.9rem;
}

.message-stream__card p {
  margin: 0.85rem 0 0;
}

.guestbook-form {
  display: grid;
  gap: 1.1rem;
}

.guestbook-form label {
  display: grid;
  gap: 0.5rem;
  font-weight: 700;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  border: 1px solid rgba(12, 33, 59, 0.12);
  border-radius: 18px;
  min-height: 3.35rem;
  padding: 1rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.guestbook-form textarea {
  min-height: 10rem;
  resize: vertical;
}

.guestbook-form input:focus-visible,
.guestbook-form textarea:focus-visible {
  outline: 2px solid rgba(243, 196, 110, 0.7);
  outline-offset: 2px;
}

.guestbook-form__split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.location-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 249, 237, 0.9);
  border: 1px solid rgba(197, 168, 111, 0.18);
  color: var(--ink-soft);
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.checkbox input {
  width: auto;
  margin-top: 0.4rem;
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
  color: #735431;
}

.wish-sent {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 1.4rem;
  background:
    radial-gradient(circle at top, rgba(255, 247, 221, 0.95), rgba(255, 241, 211, 0.72));
  border: 1px solid rgba(197, 168, 111, 0.2);
  box-shadow: 0 14px 30px rgba(243, 209, 136, 0.2);
}

.wish-sent[hidden] {
  display: none;
}

.wish-sent__spark {
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.7rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 248, 214, 1), rgba(243, 209, 136, 0.34));
  box-shadow: 0 0 24px rgba(243, 209, 136, 0.55);
  animation: pulseGlow 2.4s ease-in-out infinite;
}

.wish-sent__title,
.wish-sent__body {
  margin: 0;
}

.wish-sent__title {
  font-weight: 800;
}

.wish-sent__body {
  margin-top: 0.35rem;
  color: var(--ink-soft);
}

.wish-share {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(197, 168, 111, 0.18);
}

.wish-share__title,
.wish-share__body,
.wish-share__status {
  margin: 0;
}

.wish-share__title {
  font-weight: 800;
}

.wish-share__body {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.wish-share__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.wish-share__status {
  min-height: 1.4rem;
  margin-top: 0.7rem;
  color: #735431;
}

.mobile-dock {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 20;
  display: none;
  gap: 0.55rem;
  transform: translateX(-50%);
  width: min(calc(100% - 1.2rem), 32rem);
  padding: 0.65rem;
  border: 1px solid rgba(255, 245, 218, 0.2);
  border-radius: 999px;
  background: rgba(8, 24, 45, 0.84);
  box-shadow: 0 16px 32px rgba(4, 13, 28, 0.34);
  backdrop-filter: blur(14px);
}

.mobile-dock a {
  flex: 1;
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: rgba(255, 248, 236, 0.95);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mobile-dock a:focus-visible,
.mobile-dock a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  padding: 0.85rem 1.05rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(4, 13, 28, 0.16);
}

.skip-link:focus {
  top: 1rem;
}

.section--obituary-intro {
  padding-top: 2.6rem;
  padding-bottom: 1.2rem;
}

.obituary-intro {
  max-width: 74rem;
  margin: 0 auto;
  padding: 1.5rem 1.6rem;
  border-radius: 1.8rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(197, 168, 111, 0.14);
  box-shadow: var(--shadow);
}

.obituary-intro h2 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 3.3rem);
  font-family: "Cormorant Garamond", serif;
}

.obituary-intro p:last-child {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.site-footer {
  padding: 1.2rem 1rem 6rem;
}

.site-footer p {
  max-width: 74rem;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.7;
  text-align: center;
}

.firefly {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 248, 214, 0.95), rgba(243, 209, 136, 0.32));
  box-shadow: 0 0 18px rgba(243, 209, 136, 0.8);
  opacity: 0.65;
  animation: drift var(--duration, 12s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.firefly::after {
  content: "";
  position: absolute;
  inset: -0.35rem;
  border-radius: inherit;
  background: rgba(255, 240, 209, 0.16);
  filter: blur(8px);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0.35;
  }
  25% {
    transform: translate3d(12px, -18px, 0) scale(1.15);
    opacity: 0.9;
  }
  50% {
    transform: translate3d(-10px, -34px, 0) scale(0.95);
    opacity: 0.55;
  }
  75% {
    transform: translate3d(8px, -14px, 0) scale(1.05);
    opacity: 0.82;
  }
}

@keyframes lanternFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

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

@media (max-width: 960px) {
  .storybook-grid,
  .gallery,
  .guestbook-layout,
  .wish,
  .portrait-feature,
  .detail-strip,
  .memory-ribbon {
    grid-template-columns: 1fr;
  }

  .guestbook-intro {
    grid-template-columns: 1fr;
  }

  .memorial-milestones {
    grid-template-columns: 1fr;
  }

  .memorial-evolution__grid {
    grid-template-columns: 1fr;
  }

  .evolution-card {
    min-height: auto;
  }

  .memorial-chorus__grid {
    grid-template-columns: 1fr;
  }

  .memory-wall__quotes {
    grid-template-columns: 1fr;
  }

  .music-feature {
    grid-template-columns: 1fr;
  }

  .audio-dock {
    right: 1rem;
    left: 1rem;
    bottom: 5.9rem;
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
    padding-bottom: 6.5rem;
  }

  .hero__content {
    max-width: 42rem;
    padding-top: 4.2rem;
  }

  .hero__layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    transform: none !important;
  }

  .hero-memory {
    min-height: 28rem;
    width: min(100%, 29rem);
    margin: 0 auto;
  }

  .photo-card--wide,
  .photo-card--tall {
    grid-column: auto;
    grid-row: auto;
  }

  .chapter-gallery__section {
    padding: 1rem;
  }

  .memory-ribbon__stage {
    min-height: 16rem;
  }

  .lantern-row {
    min-height: 7rem;
  }

  .portrait-feature__image img {
    min-height: 22rem;
  }

  .globe-stage {
    min-height: 27rem;
  }
}

@media (max-width: 720px) {
  html {
    font-size: 17px;
  }

  .topbar {
    align-items: start;
    padding-top: 0.25rem;
  }

  .topbar__links {
    display: none;
  }

  .hero {
    padding: 0.9rem 1rem 7rem;
  }

  .hero__content {
    padding-top: 3.25rem;
  }

  .hero__layout {
    gap: 1rem;
  }

  .hero__moon {
    width: 5rem;
    height: 5rem;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 19vw, 5rem);
  }

  .hero__lede {
    font-size: 1rem;
    line-height: 1.62;
  }

  .hero__identity {
    font-size: 1.3rem;
  }

  .hero__actions {
    display: grid;
    gap: 0.8rem;
  }

  .hero__actions .button {
    width: 100%;
  }

  .music-feature {
    padding: 1.35rem;
    gap: 1.2rem;
  }

  .music-feature__controls {
    flex-direction: column;
  }

  .music-feature__controls .button {
    width: 100%;
  }

  .guestbook-form__split {
    grid-template-columns: 1fr;
  }

  .timeline__entry {
    padding-left: 4.2rem;
  }

  .timeline__entry::before {
    left: 1.35rem;
  }

  .section {
    padding: 3.8rem 1rem;
  }

  .section__heading {
    margin-bottom: 1.6rem;
  }

  .story-card,
  .timeline__entry,
  .guestbook-card,
  .globe-panel,
  .wish {
    border-radius: 24px;
  }

  .story-card {
    padding: 1.45rem;
  }

  .chapter-gallery {
    gap: 1.2rem;
  }

  .memory-ribbon {
    padding: 1rem;
    gap: 1rem;
  }

  .guestbook-intro {
    padding: 1rem;
    gap: 1rem;
  }

  .quote-orb {
    padding: 1.1rem;
  }

  .chapter-gallery__copy {
    margin-bottom: 1rem;
  }

  .story-card h3 {
    font-size: 1.95rem;
  }

  .photo-card img {
    min-height: 16rem;
  }

  .portrait-feature {
    padding: 1rem;
    gap: 1rem;
  }

  .portrait-feature__image img {
    min-height: 18rem;
  }

  .detail-strip__card img {
    min-height: 14rem;
  }

  .globe-panel,
  .guestbook-card {
    padding: 1rem;
  }

  .globe-stage {
    min-height: 22rem;
    padding: 1rem 0.25rem 7rem;
  }

  .globe {
    width: min(21rem, 86vw);
  }

  .audio-dock {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    bottom: 5.6rem;
  }

  .audio-dock__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-memory {
    min-height: 22.5rem;
    width: 100%;
  }

  .hero-memory__main {
    position: relative;
    top: auto;
    right: auto;
    width: min(100%, 17.5rem);
    margin: 0 auto;
    transform: none;
  }

  .hero-memory__main img {
    height: 18.75rem;
  }

  .hero-memory__mini {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 1rem;
  }

  .hero-memory__mini--one {
    left: 0.4rem;
    top: 3.9rem;
  }

  .hero-memory__mini--two {
    left: 0.2rem;
    bottom: 0.3rem;
  }

  .hero-memory__mini--three {
    right: 0.5rem;
    bottom: 0.7rem;
  }

  .globe-popup {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    padding: 0.9rem 1rem;
  }

  .message-stream {
    gap: 0.75rem;
  }

  .guestbook-form {
    gap: 0.9rem;
  }

  .mobile-dock {
    display: flex;
  }

  body {
    padding-bottom: 5.5rem;
  }

  .lightbox__dialog {
    width: min(94vw, 36rem);
    margin: 2vh auto;
    max-height: 96vh;
    padding: 0.8rem;
  }

  .lightbox__dialog img {
    max-height: 68vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
