:root {
  --ink: #0b0a09;
  --ink-2: #141210;
  --cream: #f3ead9;
  --cream-dim: #c9bba6;
  --rose: #c4a4a0;
  --rose-deep: #9a6b72;
  --gold: #c9a56a;
  --gold-2: #e0c48a;
  --line: rgba(243, 234, 217, 0.12);
  --glass: rgba(20, 18, 16, 0.55);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--cream);
  font-family: Outfit, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

.story-body {
  overflow: hidden;
  height: 100dvh;
}

.access-body {
  overflow: auto;
  min-height: 100dvh;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--ink);
}

.skip-link:focus {
  top: 1rem;
}

/* Atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(201, 165, 106, 0.08), transparent 55%),
    radial-gradient(900px 600px at 100% 100%, rgba(154, 107, 114, 0.1), transparent 50%),
    linear-gradient(180deg, #0b0a09 0%, #120f0d 48%, #0b0a09 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: orb-drift 22s var(--ease) infinite alternate;
}

.orb-a {
  width: 42vw;
  height: 42vw;
  left: -10%;
  top: 10%;
  background: rgba(201, 165, 106, 0.22);
}

.orb-b {
  width: 36vw;
  height: 36vw;
  right: -8%;
  bottom: 8%;
  background: rgba(154, 107, 114, 0.2);
  animation-duration: 28s;
  animation-delay: -6s;
}

.orb-c {
  width: 22vw;
  height: 22vw;
  left: 40%;
  top: 50%;
  background: rgba(243, 234, 217, 0.06);
  animation-duration: 18s;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

@keyframes orb-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, -6%, 0) scale(1.08); }
}

/* Type */
.eyebrow {
  font-family: Outfit, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.25rem;
}

.display-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.1rem, 8vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--cream);
}

.lede {
  margin: 1.25rem 0 0;
  font-weight: 300;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  color: var(--cream-dim);
  letter-spacing: 0.04em;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Buttons */
.btn-gold,
.btn-ghost {
  appearance: none;
  cursor: pointer;
  border-radius: 999px;
  min-height: 52px;
  padding: 0.9rem 1.7rem;
  font-family: Outfit, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  touch-action: manipulation;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.btn-gold {
  border: 1px solid rgba(201, 165, 106, 0.55);
  background: linear-gradient(180deg, rgba(201, 165, 106, 0.16), rgba(201, 165, 106, 0.05));
  color: var(--cream);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold-2);
  box-shadow: 0 10px 40px rgba(201, 165, 106, 0.18);
  background: linear-gradient(180deg, rgba(201, 165, 106, 0.28), rgba(201, 165, 106, 0.08));
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--cream-dim);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--cream);
  border-color: var(--line);
}

/* Story shell */
.story-root {
  position: relative;
  z-index: 2;
  height: 100dvh;
}

.progress-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 30;
  background: rgba(243, 234, 217, 0.08);
}

.progress-fill {
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width 0.7s var(--ease);
}

.story-dots {
  position: fixed;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(243, 234, 217, 0.22);
  pointer-events: none;
}

.dot.is-active {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(201, 165, 106, 0.8);
}

.story-section {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1.25rem 5.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.03);
  filter: blur(8px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease), visibility 0.9s;
}

.story-section.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
  filter: blur(0);
  z-index: 5;
}

.story-section.is-leaving {
  opacity: 0;
  transform: scale(0.98);
  filter: blur(6px);
}

.section-scroll {
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.section-inner {
  width: min(720px, 100%);
  text-align: center;
}

/* Entrance */
.entrance-inner .display-title {
  font-style: italic;
}

.entrance-love-title {
  font-size: clamp(1.45rem, 6.2vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: 0;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}

.entrance-actions {
  margin-top: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}

.fade-child {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1.1s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 1ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Birthday */
#birthday-heading,
#birthday-sub {
  opacity: 0;
}

.heart-pulse {
  display: inline-block;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.blessing {
  margin: 2rem auto 0;
  max-width: 28rem;
  min-height: 6.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.2rem, 3.6vw, 1.55rem);
  font-style: italic;
  line-height: 1.65;
  color: var(--cream);
  white-space: pre-line;
}

.blessing.is-typing::after {
  content: "▍";
  color: var(--gold);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Timeline */
.timeline-inner {
  width: min(560px, 100%);
  padding-bottom: 2rem;
}

.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  position: relative;
  text-align: left;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 1rem;
  margin-bottom: 1.4rem;
  opacity: 0;
  transform: translateY(24px);
  filter: blur(8px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
}

.timeline-item.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1a1714;
  border: 1px solid rgba(201, 165, 106, 0.45);
}

.timeline-icon {
  font-size: 0.85rem;
}

.timeline-card {
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.2rem;
}

.timeline-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.timeline-date {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--cream-dim);
}

.timeline-body {
  margin: 0.55rem 0 0;
  color: var(--cream);
  font-weight: 300;
  line-height: 1.6;
  font-size: 0.98rem;
}

.chapter-line {
  margin: 0.9rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold-2);
  opacity: 0;
  transform: translateY(8px);
}

.timeline-item.is-final.is-in .chapter-line {
  animation: rise 1.1s 0.9s var(--ease) forwards;
}

.timeline-continue {
  margin-top: 1.25rem;
}

/* Secret */
.secret-card {
  border-radius: 28px;
  padding: 2.4rem 1.5rem;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.secret-title {
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  margin-bottom: 1.8rem;
}

.secret-line,
.secret-soon,
.secret-close {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  font-style: italic;
  line-height: 1.5;
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
}

.secret-line.is-in,
.secret-soon.is-in,
.secret-close.is-in,
.morph.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.secret-soon {
  margin-top: 1.4rem;
  color: var(--cream-dim);
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: Outfit, sans-serif;
  font-style: normal;
}

.title-morph {
  position: relative;
  display: grid;
  place-items: center;
  margin: 1.15rem 0 1.25rem;
  min-height: clamp(3rem, 11vw, 4.4rem);
}

.morph {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 8.5vw, 3.6rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.15;
  opacity: 0;
}

.morph.from {
  color: var(--cream-dim);
}

.morph.to {
  color: var(--gold-2);
  text-shadow: 0 0 40px rgba(201, 165, 106, 0.25);
}

.morph-icons {
  display: inline-block;
  margin-left: 0.08em;
  letter-spacing: 0;
  font-size: 0.72em;
  text-transform: none;
  vertical-align: 0.02em;
}

.morph.from.is-out {
  opacity: 0;
  transform: scale(0.92);
  filter: blur(8px);
  transition: opacity 0.7s, transform 0.7s, filter 0.7s;
}

/* Letter / envelope */
.letter-inner {
  width: min(640px, 100%);
}

.envelope-stage {
  perspective: 1200px;
  margin: 2rem auto 1.5rem;
  width: min(320px, 86vw);
  height: 210px;
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
}

.envelope-pocket,
.envelope-front,
.envelope-flap {
  position: absolute;
  inset: 0;
  border-radius: 6px;
}

.envelope-pocket {
  background: linear-gradient(180deg, #5a3f3a, #3a2a27);
  box-shadow: var(--shadow);
}

.envelope-front {
  background: linear-gradient(180deg, #6d4c46 0%, #4a322e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 1.2rem;
  clip-path: polygon(0 38%, 50% 68%, 100% 38%, 100% 100%, 0 100%);
  z-index: 3;
}

.envelope-flap {
  background: linear-gradient(180deg, #8a625a, #5c403b);
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  transform-origin: top center;
  z-index: 4;
  transition: transform 0.9s var(--ease);
}

.envelope.is-open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.wax-seal {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #c46c6c, #7a3038);
  color: var(--cream);
  margin-bottom: 0.45rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.envelope-label {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  color: var(--cream);
  letter-spacing: 0.04em;
}

.letter-sheet {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18%;
  z-index: 2;
  background: #f7f0e4;
  color: #2b241c;
  border-radius: 4px;
  padding: 1.1rem 1rem 1.2rem;
  min-height: 160px;
  text-align: left;
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.9s 0.25s var(--ease), opacity 0.9s 0.25s;
  max-height: 160px;
  overflow: hidden;
}

.envelope.is-open .letter-sheet {
  transform: translateY(-32%) scale(1);
  opacity: 1;
  max-height: 220px;
  overflow: hidden;
  z-index: 6;
}

.letter-photo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 0.8rem;
  border: 2px solid rgba(201, 165, 106, 0.5);
}

.letter-body {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-line;
  min-height: 4rem;
}

.letter-body.is-typing::after {
  content: "▍";
  color: #9a6b72;
  animation: blink 1s steps(1) infinite;
}

#section-letter.is-letter-open {
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.letter-inner.is-reading .eyebrow,
.letter-inner.is-reading .letter-heading {
  display: none;
}

.letter-inner.is-reading .envelope-stage {
  height: auto;
  min-height: 0;
  width: min(420px, 92vw);
  margin: 0.5rem auto 1.25rem;
  perspective: none;
}

.letter-inner.is-reading .envelope.is-open .letter-sheet,
.letter-inner.is-reading .letter-sheet {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  transform: none;
  opacity: 1;
  max-height: none;
  overflow: visible;
  margin: 0 auto;
  width: 100%;
  padding: 1.6rem 1.4rem 1.8rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.letter-inner.is-reading .envelope-pocket,
.letter-inner.is-reading .envelope-front,
.letter-inner.is-reading .envelope-flap {
  display: none;
}

.letter-inner.is-reading .envelope {
  height: auto;
  cursor: default;
}

.letter-inner.is-reading .letter-body {
  font-size: clamp(1rem, 2.6vw, 1.12rem);
  line-height: 1.7;
}

/* Memories */
.memories-inner {
  width: min(920px, 100%);
}

.memories-lede {
  margin-bottom: 1.8rem;
}

.masonry {
  columns: 1;
  column-gap: 0.9rem;
}

.masonry-item {
  break-inside: avoid;
  margin: 0 0 0.9rem;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
}

.memory-card img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 0.7s var(--ease);
}

.memory-card:hover img,
.memory-card:focus-visible img {
  transform: scale(1.06);
}

.memory-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 1.6rem 0.9rem 0.9rem;
  background: linear-gradient(transparent, rgba(11, 10, 9, 0.82));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.memory-cat {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.memory-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  color: var(--cream);
}

.placeholder-card {
  border-radius: 16px;
  padding: 1.4rem 1rem 1.5rem;
  text-align: left;
  min-height: 180px;
}

.placeholder-frame {
  display: block;
  height: 88px;
  border-radius: 10px;
  border: 1px dashed rgba(201, 165, 106, 0.35);
  margin-bottom: 0.9rem;
  background: rgba(201, 165, 106, 0.05);
}

.placeholder-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
}

.placeholder-copy {
  margin: 0.4rem 0 0;
  color: var(--cream-dim);
  font-size: 0.85rem;
  font-weight: 300;
}

.memories-continue {
  margin: 1.4rem 0 2rem;
}

/* Modal */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 7, 6, 0.86);
  backdrop-filter: blur(16px);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.photo-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.photo-modal[hidden] {
  display: none;
}

.modal-figure {
  margin: 0;
  width: min(860px, 100%);
  text-align: center;
}

.modal-figure img {
  max-height: min(68dvh, 720px);
  width: 100%;
  object-fit: contain;
  border-radius: 12px;
  transform: scale(0.96);
  transition: transform 0.5s var(--ease);
}

.photo-modal.is-open .modal-figure img {
  transform: scale(1);
}

.modal-title {
  margin: 1rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
}

.modal-meta {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.modal-caption {
  margin: 0.55rem 0 0;
  color: var(--cream-dim);
  font-weight: 300;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(20, 18, 16, 0.6);
  color: var(--cream);
  cursor: pointer;
}

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2.2rem;
}

.count-cell {
  border-radius: 18px;
  padding: 1.1rem 0.6rem 1rem;
}

.count-num {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1;
  color: var(--gold-2);
}

.count-label {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.countdown-complete {
  margin-top: 1.6rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  color: var(--gold-2);
}

/* Finale */
.finale-inner {
  min-height: 70dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.finale-line,
.finale-close {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.3rem, 4.2vw, 1.8rem);
  font-style: italic;
  margin: 0.35rem 0;
  opacity: 0;
  transform: translateY(14px);
}

.finale-line.is-in,
.finale-close.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.finale-climax {
  margin: 1.4rem 0 1.2rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 11vw, 5rem);
  letter-spacing: 0.06em;
  color: var(--gold-2);
  text-shadow: 0 0 48px rgba(201, 165, 106, 0.28);
  opacity: 0;
  transform: scale(0.92);
}

.finale-climax.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

.finale-close {
  max-width: 22rem;
  color: var(--cream-dim);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Music */
.music-float {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 18, 16, 0.72);
  color: var(--cream);
  backdrop-filter: blur(12px);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  cursor: pointer;
}

.music-float.hidden,
.hidden {
  display: none !important;
}

.w-full { width: 100%; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.opacity-0 { opacity: 0; }
.pointer-events-none { pointer-events: none; }

.music-icon {
  color: var(--gold);
}

/* Access */
.access-shell {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top)) 1rem max(4.5rem, env(safe-area-inset-bottom));
  gap: 1rem;
  overflow-x: hidden;
}

.access-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.access-sparkles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e0c48a;
  box-shadow: 0 0 8px #e0c48a;
  animation: access-twinkle 2.4s ease-in-out infinite;
}

.access-sparkles i:nth-child(1) { left: 12%; top: 14%; }
.access-sparkles i:nth-child(2) { left: 84%; top: 18%; animation-delay: 0.4s; }
.access-sparkles i:nth-child(3) { left: 8%; top: 70%; animation-delay: 0.9s; }
.access-sparkles i:nth-child(4) { left: 90%; top: 64%; animation-delay: 0.2s; }
.access-sparkles i:nth-child(5) { left: 48%; top: 8%; animation-delay: 0.7s; }
.access-sparkles i:nth-child(6) { left: 22%; top: 86%; animation-delay: 1.1s; }
.access-sparkles i:nth-child(7) { left: 74%; top: 88%; animation-delay: 0.5s; }
.access-sparkles i:nth-child(8) { left: 62%; top: 12%; animation-delay: 1.3s; width: 3px; height: 3px; }

@keyframes access-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
}

.access-balloons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.access-balloon {
  position: absolute;
  width: clamp(22px, 7vw, 34px);
  height: clamp(28px, 9vw, 44px);
  border-radius: 50% 50% 48% 48% / 42% 42% 58% 58%;
  box-shadow:
    inset -6px -8px 12px rgba(0, 0, 0, 0.2),
    inset 5px 6px 8px rgba(255, 255, 255, 0.28);
  animation: access-sway 4s ease-in-out infinite;
}

.access-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 28px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(243, 234, 217, 0.4), transparent);
}

.access-balloon.gold {
  left: 4%;
  top: 22%;
  background: radial-gradient(circle at 32% 26%, #fff4d4, #c9a56a 70%);
}

.access-balloon.rose {
  right: 5%;
  top: 20%;
  background: radial-gradient(circle at 32% 26%, #ffe8e4, #c4a4a0 70%);
  animation-delay: 0.6s;
}

.access-balloon.cream {
  left: 6%;
  bottom: 18%;
  background: radial-gradient(circle at 32% 26%, #fffdf8, #e8dcc8 70%);
  animation-delay: 1s;
}

.access-balloon.wine {
  right: 7%;
  bottom: 16%;
  background: radial-gradient(circle at 32% 26%, #e8b8b4, #9a6b72 70%);
  animation-delay: 0.3s;
}

@keyframes access-sway {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-10px) rotate(7deg); }
}

.access-card {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  border-radius: 28px;
  padding: 1.85rem 1.2rem 1.7rem;
  text-align: center;
  animation: access-card-in 0.9s var(--ease) both;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(201, 165, 106, 0.12);
}

.access-card::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(ellipse at 50% 40%, rgba(201, 165, 106, 0.16), transparent 68%);
  pointer-events: none;
}

@keyframes access-card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.access-rule {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.35rem auto 0.85rem;
  max-width: 12rem;
}

.access-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 165, 106, 0.7), transparent);
}

.access-rule i {
  font-style: normal;
  color: var(--gold);
  font-size: 0.7rem;
}

.access-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 8vw, 2.6rem);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.1;
}

.access-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.access-name {
  font-style: italic;
  background: linear-gradient(180deg, #f3ead9, #c9a56a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.access-emojis {
  font-size: clamp(1.35rem, 6vw, 1.85rem);
  letter-spacing: 0.12em;
  line-height: 1;
  animation: access-emoji 2.2s ease-in-out infinite;
}

@keyframes access-emoji {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-4px) rotate(5deg); }
}

.access-dua {
  margin: 0.85rem 0 0.35rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.02rem, 4.2vw, 1.2rem);
  color: var(--gold-2);
  padding: 0 0.2rem;
}

.access-lede {
  color: var(--cream-dim);
  font-weight: 300;
  margin: 0.2rem 0 1.2rem;
  font-size: clamp(0.88rem, 3.4vw, 1rem);
}

.access-input {
  width: 100%;
  min-height: 52px;
  margin-bottom: 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 10, 9, 0.55);
  color: var(--cream);
  text-align: center;
  letter-spacing: 0.12em;
  padding: 0.8rem 1rem;
  outline: none;
  font-size: 16px;
}

.access-input:focus {
  border-color: var(--gold);
}

.access-error {
  color: var(--rose);
  font-size: 0.85rem;
  margin: 0 0 0.8rem;
}

.access-enter {
  animation: access-btn 2.4s ease-in-out infinite;
}

@keyframes access-btn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 165, 106, 0.35); }
  50% { box-shadow: 0 0 22px rgba(201, 165, 106, 0.28); }
}

.access-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  text-decoration: none;
  animation: access-bounce 1.6s ease-in-out infinite;
}

.access-arrow-inline {
  width: 28px;
  height: 28px;
  margin: 0.15rem auto 0.55rem;
  font-size: 1rem;
  opacity: 0.85;
}

.access-arrow-foot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(201, 165, 106, 0.4);
  font-size: 1.15rem;
  z-index: 2;
}

@keyframes access-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(8px); opacity: 1; }
}

@media (max-width: 380px) {
  .access-card {
    padding: 1.55rem 1rem 1.4rem;
    border-radius: 22px;
  }

  .access-balloon.cream,
  .access-balloon.wine {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-arrow,
  .access-sparkles i,
  .access-balloon,
  .access-emojis,
  .access-card,
  .access-enter {
    animation: none !important;
  }
}

/* Confetti canvas */
.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

/* Responsive */
@media (min-width: 640px) {
  .masonry { columns: 2; }
  .countdown { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .entrance-actions { flex-direction: row; justify-content: center; }
  .section-inner { width: min(760px, 100%); }
}

@media (min-width: 1024px) {
  .masonry { columns: 3; }
  .story-section { padding: 5rem 3rem; }
}

@media (max-width: 400px) {
  .morph {
    font-size: clamp(1.75rem, 10vw, 2.2rem);
    letter-spacing: 0.06em;
  }
}

@media (max-width: 767px) {
  .story-section {
    padding:
      max(3rem, calc(2.2rem + env(safe-area-inset-top)))
      0.85rem
      max(6.6rem, calc(5rem + env(safe-area-inset-bottom)));
    overflow-x: hidden;
  }

  .section-inner {
    width: min(720px, 100%);
  }

  .display-title {
    font-size: clamp(1.5rem, 7.2vw, 2.35rem);
    overflow-wrap: anywhere;
  }

  .story-dots {
    right: auto;
    left: 50%;
    top: auto;
    bottom: calc(0.85rem + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    flex-direction: row;
  }

  .btn-gold,
  .btn-ghost {
    width: min(100%, 22rem);
    min-height: 48px;
    padding: 0.8rem 1.2rem;
  }

  img,
  video {
    max-width: 100%;
    height: auto;
  }

  .secret-card {
    width: 100%;
    padding: 1.35rem 1rem 1.4rem;
    min-height: 0;
    border-radius: 22px;
  }

  .countdown {
    gap: 0.5rem;
    margin-top: 1.25rem;
  }

  .count-cell {
    padding: 0.75rem 0.3rem 0.7rem;
    border-radius: 14px;
  }

  .count-num {
    font-size: clamp(1.5rem, 8vw, 2.15rem);
  }

  .finale-inner {
    min-height: 0;
  }

  .finale-climax {
    font-size: clamp(1.9rem, 11vw, 3rem);
    margin: 1rem 0 0.9rem;
  }

  .letter-inner.is-reading .letter-sheet,
  .blessing-inner.is-reading .letter-sheet {
    padding: 1.15rem 0.95rem 1.3rem;
  }

  .music-float {
    right: 0.65rem;
    bottom: calc(3.25rem + env(safe-area-inset-bottom));
  }

  .wife-balloon.float,
  .wife-balloon.left-b,
  .wife-balloon.right-b {
    display: none;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .story-section {
    align-items: flex-start;
    padding: 1.1rem 1rem 2.2rem;
  }

  .access-balloon,
  .wife-balloon,
  .wife-mini-cake {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .heart-pulse,
  .fade-child {
    animation: none !important;
  }

  .fade-child {
    opacity: 1;
    transform: none;
  }

  .story-section,
  .timeline-item,
  .letter-sheet,
  .envelope-flap,
  .memory-card img {
    transition-duration: 0.2s !important;
  }

  .particle-canvas {
    display: none;
  }

  .blessing.is-typing::after,
  .letter-body.is-typing::after {
    content: none;
  }

  .wife-balloon,
  .wife-sparkles i,
  .wmc-candles i,
  .btn-welcome {
    animation: none !important;
  }
}

/* Wife story decorations */
.wife-story .atmosphere {
  background:
    radial-gradient(1000px 560px at 50% 8%, rgba(201, 165, 106, 0.16), transparent 58%),
    radial-gradient(700px 480px at 90% 90%, rgba(154, 107, 114, 0.14), transparent 52%),
    linear-gradient(180deg, #0b0a09 0%, #16110e 50%, #0b0a09 100%);
}

.wife-deco {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.wife-sparkles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e0c48a;
  box-shadow: 0 0 8px #e0c48a;
  animation: access-twinkle 2.4s ease-in-out infinite;
}

.wife-sparkles i:nth-child(1) { left: 12%; top: 16%; }
.wife-sparkles i:nth-child(2) { left: 86%; top: 20%; animation-delay: 0.4s; }
.wife-sparkles i:nth-child(3) { left: 8%; top: 68%; animation-delay: 0.9s; }
.wife-sparkles i:nth-child(4) { left: 90%; top: 62%; animation-delay: 0.2s; }
.wife-sparkles i:nth-child(5) { left: 48%; top: 10%; animation-delay: 0.7s; }
.wife-sparkles i:nth-child(6) { left: 24%; top: 84%; animation-delay: 1.1s; }
.wife-sparkles i:nth-child(7) { left: 72%; top: 86%; animation-delay: 0.5s; }
.wife-sparkles i:nth-child(8) { left: 60%; top: 14%; animation-delay: 1.3s; }

.wife-balloon {
  position: absolute;
  width: clamp(22px, 6.5vw, 34px);
  height: clamp(28px, 8.5vw, 44px);
  border-radius: 50% 50% 48% 48% / 42% 42% 58% 58%;
  box-shadow:
    inset -6px -8px 12px rgba(0, 0, 0, 0.2),
    inset 5px 6px 8px rgba(255, 255, 255, 0.28);
  animation: access-sway 4s ease-in-out infinite;
}

.wife-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 26px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(243, 234, 217, 0.4), transparent);
}

.wife-balloon.gold { background: radial-gradient(circle at 32% 26%, #fff4d4, #c9a56a 70%); }
.wife-balloon.rose { background: radial-gradient(circle at 32% 26%, #ffe8e4, #c4a4a0 70%); }
.wife-balloon.cream { background: radial-gradient(circle at 32% 26%, #fffdf8, #e8dcc8 70%); }
.wife-balloon.wine { background: radial-gradient(circle at 32% 26%, #e8b8b4, #9a6b72 70%); }

.wife-balloon.left-a { left: 4%; top: 22%; }
.wife-balloon.left-b { left: 9%; top: 38%; animation-delay: 0.7s; }
.wife-balloon.right-a { right: 5%; top: 20%; animation-delay: 0.4s; }
.wife-balloon.right-b { right: 8%; top: 40%; animation-delay: 1s; }

.wife-balloon.float {
  bottom: -8%;
  animation: wife-float 8s linear infinite;
}

.wife-balloon.f1 { left: 18%; animation-duration: 7.4s; }
.wife-balloon.f2 { left: 52%; animation-duration: 8.2s; animation-delay: 1.2s; }
.wife-balloon.f3 { left: 78%; animation-duration: 7.8s; animation-delay: 0.6s; }

@keyframes wife-float {
  0% { transform: translateY(0) rotate(-6deg); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translateY(-115dvh) rotate(8deg); opacity: 0.15; }
}

.entrance-card {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1rem 1.35rem;
  border-radius: 28px;
  position: relative;
  z-index: 3;
}

.entrance-card .wife-mini-cake {
  width: 78px;
  margin: 0.1rem auto 0.7rem;
}

.entrance-card .lede {
  margin-top: 0.75rem;
  font-size: clamp(0.86rem, 3.2vw, 1.02rem);
}

.entrance-card .entrance-actions {
  margin-top: 1.15rem;
}

.wife-rule {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 auto 0.9rem;
  max-width: 11rem;
}

.wife-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 165, 106, 0.7), transparent);
}

.wife-rule i {
  font-style: normal;
  color: var(--gold);
  font-size: 0.7rem;
}

.wife-chips {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.15rem 0 0;
  padding: 0;
}

.wife-chips li {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 165, 106, 0.35);
  background: rgba(201, 165, 106, 0.08);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-2);
}

.wife-story .btn-welcome {
  animation: access-btn 2.4s ease-in-out infinite;
}

.wife-mini-cake {
  position: relative;
  width: 92px;
  margin: 0.2rem auto 1rem;
}

.wife-mini-cake.is-birthday {
  width: 110px;
  margin: 0 auto 1.1rem;
}

.wmc-candles {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}

.wmc-candles i {
  width: 5px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, #f3ead9, #c9a56a);
  position: relative;
}

.wmc-candles i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 6px;
  height: 8px;
  border-radius: 50% 50% 40% 40%;
  transform: translateX(-50%);
  background: radial-gradient(circle, #ffe9a8, #e08a3a);
  animation: pulse 1.2s ease-in-out infinite;
}

.wmc-icing {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 2;
  width: 86%;
  margin: 0;
  transform: translateX(-50%);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.42rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #7a3f45;
}

.wmc-tier {
  margin: -4px auto 0;
  border-radius: 8px 8px 6px 6px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 6px 12px rgba(0, 0, 0, 0.25);
}

.wmc-top {
  width: 58%;
  height: 22px;
  background: linear-gradient(180deg, #fff6ea, #e8d5c0);
}

.wmc-drip {
  width: 60%;
  height: 7px;
  margin: -3px auto 0;
  border-radius: 0 0 40% 40%;
  background: #fff6ea;
}

.wmc-base {
  width: 88%;
  height: 28px;
  background: linear-gradient(180deg, #e4b7b3, #9a6b72);
}

.wmc-plate {
  width: 100%;
  height: 8px;
  margin: 2px auto 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, #e0c48a, #8a6b3a);
  opacity: 0.75;
}

@media (max-width: 430px) {
  .wife-balloon.left-b,
  .wife-balloon.right-b,
  .wife-balloon.f3 {
    display: none;
  }

  .entrance-card {
    padding: 1.1rem 0.85rem 1.2rem;
    border-radius: 22px;
  }

  .entrance-card .wife-mini-cake {
    width: 70px;
    margin-bottom: 0.55rem;
  }

  .entrance-love-title {
    font-size: clamp(1.28rem, 6.4vw, 1.7rem);
  }

  .wife-chips {
    margin-top: 0.85rem;
  }
}
