:root {
  color-scheme: light;
  --ink: #180b15;
  --plum: #241020;
  --plum-soft: #32182a;
  --wine: #55223e;
  --rose: #d89caf;
  --gold: #d8bb82;
  --cream: #f8f1e6;
  --paper: #fffaf0;
  --paper-ink: #3a2c33;
  --muted-ink: #806d76;
  --sans: "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  background: var(--ink);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  min-width: 0;
  margin: 0;
  overflow-x: clip;
  color: var(--paper);
  background: var(--ink);
  transition: background-color 1.3s ease, color 1.1s ease;
}

body.story-unlocked { background: #f3eadf; }
body.is-locked { overflow: hidden; }
body.keyboard-open { overflow-y: auto; }

button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

::selection { color: var(--ink); background: #e7c8a1; }

:focus-visible {
  outline: 2px solid #f0d398;
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  transform: translateY(-180%);
  color: var(--ink);
  background: var(--paper);
  border-radius: 2rem;
}

.skip-link:focus { transform: translateY(0); }

.ambient {
  position: fixed;
  z-index: 0;
  width: min(75vw, 52rem);
  aspect-ratio: 1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .45;
  transition: opacity 1.2s ease, transform 1.5s ease;
}

.ambient--one {
  top: -45vw;
  left: -32vw;
  background: radial-gradient(circle, rgba(125, 40, 81, .28), transparent 68%);
}

.ambient--two {
  right: -40vw;
  bottom: -50vw;
  background: radial-gradient(circle, rgba(184, 121, 102, .12), transparent 69%);
}

.starfield { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.starfield span { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #f5deb4; opacity: .3; animation: star-drift 10s ease-in-out infinite alternate; }
.starfield span:nth-child(1) { left: 8%; top: 16%; animation-delay: -2s; }
.starfield span:nth-child(2) { left: 17%; top: 74%; width: 3px; height: 3px; animation-delay: -6s; }
.starfield span:nth-child(3) { left: 29%; top: 31%; animation-delay: -4s; }
.starfield span:nth-child(4) { left: 43%; top: 84%; animation-delay: -1s; }
.starfield span:nth-child(5) { left: 56%; top: 12%; width: 3px; height: 3px; animation-delay: -7s; }
.starfield span:nth-child(6) { left: 66%; top: 66%; animation-delay: -3s; }
.starfield span:nth-child(7) { left: 73%; top: 28%; animation-delay: -5s; }
.starfield span:nth-child(8) { left: 84%; top: 81%; width: 3px; height: 3px; animation-delay: -8s; }
.starfield span:nth-child(9) { left: 92%; top: 43%; animation-delay: -2.5s; }
.starfield span:nth-child(10) { left: 36%; top: 57%; animation-delay: -9s; }
.starfield span:nth-child(11) { left: 4%; top: 52%; animation-delay: -6.5s; }
.starfield span:nth-child(12) { left: 96%; top: 8%; animation-delay: -3.5s; }

body.story-unlocked .ambient { opacity: .12; }
body.story-unlocked .starfield { opacity: .18; }

.screen {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: max(2rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
}

.gate {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 48% 38%, rgba(112, 38, 75, .24), transparent 44%),
    linear-gradient(157deg, #1e0c1a 0%, #170a14 56%, #130811 100%);
  transition: background 1.1s ease;
}

.gate__content {
  position: relative;
  z-index: 2;
  width: min(100%, 37rem);
  padding: clamp(1rem, 3vw, 2rem) 0;
  text-align: center;
  animation: scene-rise 1.05s cubic-bezier(.2, .75, .2, 1) both;
}

.gate__glow {
  position: absolute;
  z-index: -1;
  top: 48%;
  left: 50%;
  width: min(90vw, 38rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(136, 55, 91, .2), rgba(111, 49, 89, .05) 45%, transparent 70%);
  filter: blur(15px);
  transition: opacity .9s ease, transform 1.2s ease;
  opacity: .65;
}

.gate-focus .gate__glow { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }

.gate__ornament { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin-bottom: clamp(1rem, 3vh, 1.75rem); color: var(--gold); }
.gate__line { width: clamp(2.5rem, 12vw, 5.2rem); height: 1px; background: linear-gradient(90deg, transparent, rgba(216, 187, 130, .62)); }
.gate__line:last-child { transform: rotate(180deg); }
.gate__icon { display: inline-block; font-size: 1.1rem; animation: soft-turn 14s linear infinite; }
.eyebrow { margin: 0; color: var(--gold); font-size: .66rem; font-weight: 600; letter-spacing: .23em; line-height: 1.7; text-transform: uppercase; }
.gate__eyebrow { margin-bottom: 1rem; color: #dfc7bd; animation: scene-rise .9s .1s both; }

.gate h1, .scene-heading h2, .story-hero h1, .section-heading h2, .horses-intro h2, .home-section h2, .finale h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.045em;
}

.gate h1 { display: grid; gap: .08em; font-size: clamp(2.45rem, 8vw, 4.8rem); line-height: .98; animation: scene-rise .9s .2s both; }
.gate h1 em, .scene-heading h2 em, .story-hero h1 em, .section-heading h2 em, .horses-intro h2 em, .home-section h2 em, .finale h2 em { display: block; color: var(--rose); font-weight: 400; }
.gate__copy { max-width: 29rem; margin: 1.3rem auto 1.8rem; color: rgba(248, 238, 230, .76); font-size: .97rem; line-height: 1.8; animation: scene-rise .9s .31s both; }
.gate__form { width: min(100%, 27rem); margin: 0 auto; text-align: left; animation: scene-rise .9s .42s both; }
.gate__label { display: block; margin: 0 0 .65rem .1rem; color: #f4e7dc; font-size: .82rem; font-weight: 600; }
.gate__input-wrap { position: relative; display: flex; align-items: center; min-height: 4.05rem; border: 1px solid rgba(237, 212, 187, .35); background: rgba(255, 250, 244, .045); transition: border-color .28s ease, box-shadow .28s ease, background .28s ease; }
.gate__input-wrap:focus-within { border-color: rgba(240, 206, 157, .85); background: rgba(255, 246, 238, .09); box-shadow: 0 0 0 4px rgba(216, 187, 130, .08), 0 0 2.2rem rgba(209, 126, 157, .14); }
.gate__input-wrap.has-error { border-color: #ec91a7; box-shadow: 0 0 0 4px rgba(221, 119, 151, .11); animation: field-warm-pulse .8s ease-in-out 2; }
.gate__input-icon { width: 3.1rem; color: var(--gold); text-align: center; }
.gate__input-wrap input { width: 100%; min-width: 0; height: 3.9rem; padding: .5rem .25rem; border: 0; outline: 0; color: var(--paper); background: transparent; text-align: center; font-size: clamp(1.08rem, 4vw, 1.32rem); letter-spacing: .19em; }
.gate__input-wrap input::placeholder { color: rgba(243, 224, 208, .65); opacity: 1; }
.gate__date-mark { width: 3.1rem; padding-right: .1rem; color: #e9b7c4; text-align: center; font-size: 1.2rem; }
.gate__hint { min-height: 1.25rem; margin: .6rem 0 .55rem; color: rgba(239, 224, 214, .68); text-align: center; font-size: .76rem; letter-spacing: .04em; }
.gate__error { min-height: 1.45rem; margin: 0 0 .25rem; color: #ffc0cf; text-align: center; font-size: .79rem; line-height: 1.5; }
.gate__warning { position: relative; display: flex; gap: .8rem; align-items: flex-start; margin: .25rem 0 1.1rem; padding: .9rem 1rem; border: 1px solid rgba(216, 187, 130, .26); border-left: 2px solid var(--gold); background: linear-gradient(100deg, rgba(216, 187, 130, .12), rgba(216, 187, 130, .035)); color: #f3e3d5; animation: warning-glow 5.5s 1.6s ease-in-out infinite; }
.gate__warning-icon { flex: 0 0 auto; margin-top: .04rem; color: var(--gold); font-size: 1rem; }
.gate__warning p { margin: 0; font-size: .82rem; line-height: 1.58; }
.button { display: inline-flex; min-height: 3.55rem; align-items: center; justify-content: center; gap: 1rem; padding: .85rem 1.45rem; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease, background .25s ease, opacity .25s ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px) scale(.99); }
.button:disabled { cursor: default; opacity: .5; transform: none; }
.button--gold { color: #321a25; background: linear-gradient(130deg, #ecd8ad, #cfaa72); box-shadow: 0 12px 30px rgba(3, 0, 3, .21); font-weight: 650; }
.button--gold:hover { box-shadow: 0 16px 36px rgba(3, 0, 3, .28), 0 0 1.8rem rgba(220, 187, 130, .2); }
.button__arrow { font-size: 1.1rem; transition: transform .25s ease; }
.button:hover .button__arrow { transform: translate(2px, -2px); }
.gate__submit { width: 100%; margin-top: .1rem; }
.gate__signature { margin: 1.45rem 0 0; color: #d7b7c4; font-family: var(--serif); font-size: .98rem; font-style: italic; animation: scene-rise .9s .52s both; }
.gate__signature span:last-child { padding-left: .25rem; color: var(--rose); }
.gate__vanished { position: relative; z-index: 2; width: min(100%, 26rem); margin: 0 auto; padding: 1.1rem .75rem; animation: vanished-appear .8s ease both; }
.gate__vanished-icon { display: grid; width: 3rem; height: 3rem; place-items: center; margin: 0 auto 1rem; border: 1px solid rgba(216, 187, 130, .4); border-radius: 50%; color: var(--gold); font-size: 1.3rem; box-shadow: 0 0 2rem rgba(216, 187, 130, .14); }
.gate__vanished h2 { margin: 0 0 .6rem; font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.gate__vanished p { margin: 0; color: rgba(248, 238, 230, .72); line-height: 1.7; }
.gate--vanished .gate__content > :not(.gate__vanished) { display: none; }
.gate--dissolving .gate__content { animation: gate-dissolve 1.78s ease both; }
.gate--dissolving .gate__warning { animation: warning-glow .4s ease 3; }
.gate--success .gate__content { animation: gate-dissolve .9s ease both; }

.transition-particles { position: fixed; z-index: 20; inset: 0; overflow: hidden; pointer-events: none; }
.magic-particle { position: absolute; top: 50%; left: 50%; display: block; color: #fae3b4; font-size: clamp(.65rem, 2vw, 1rem); opacity: 0; text-shadow: 0 0 1rem rgba(249, 215, 164, .75); }
.transition-particles--vanish .magic-particle { animation: particle-vanish 1.5s var(--delay) cubic-bezier(.16, .73, .18, 1) both; }
.transition-particles--gather .magic-particle { animation: particle-gather 1s var(--delay) ease-in both; }
.magic-particle--petal { color: #f1bbce; font-size: 1.15rem; filter: drop-shadow(0 0 7px rgba(249, 215, 164, .65)); }
.transition-heart { position: absolute; top: 50%; left: 50%; color: #ffe4c1; font-family: var(--serif); font-size: clamp(3rem, 11vw, 5rem); opacity: 0; text-shadow: 0 0 2rem rgba(254, 205, 164, .8); transform: translate(-50%, -50%) scale(.2); animation: heart-bloom 1.05s .25s ease-out both; }
.gate-failure .ambient, .magic-transition .ambient { opacity: .95; transform: scale(1.2); }

.envelope-scene { isolation: isolate; overflow: hidden; grid-template-rows: auto 1fr auto; align-content: center; gap: 1rem; padding-top: max(3rem, env(safe-area-inset-top)); padding-bottom: max(3rem, env(safe-area-inset-bottom)); background: radial-gradient(ellipse at 50% 59%, rgba(115, 41, 77, .21), transparent 52%); }
.scene-heading { position: relative; z-index: 1; align-self: end; margin-bottom: clamp(.5rem, 2.4vh, 1.6rem); text-align: center; }
.scene-heading .eyebrow { margin-bottom: .75rem; animation: scene-rise .8s .12s both; }
.scene-heading h2 { font-size: clamp(1.8rem, 6vw, 3rem); line-height: 1.04; animation: scene-rise .9s .22s both; }
.scene-heading h2 em { margin-top: .25rem; }
.scene-heading__hint { margin: .85rem 0 0; color: rgba(247, 235, 226, .7); font-size: .85rem; animation: scene-rise .8s .4s both; }
.envelope-wrap { position: relative; display: grid; align-self: center; justify-items: center; padding: 1.4rem 0 2rem; perspective: 1000px; }
.envelope { position: relative; width: min(84vw, 30rem); aspect-ratio: 1.56; transform-style: preserve-3d; filter: drop-shadow(0 2.1rem 2rem rgba(0, 0, 0, .48)); transition: transform .55s cubic-bezier(.2, .7, .2, 1), filter .6s ease; }
.envelope:hover { transform: translateY(-5px) rotateX(1deg); filter: drop-shadow(0 2.4rem 2.2rem rgba(0, 0, 0, .5)); }
.envelope__back { position: absolute; inset: 0; overflow: hidden; border: 1px solid rgba(242, 210, 186, .3); border-radius: 5px; background: linear-gradient(145deg, #78314c, #4a1a36 60%, #35132a); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .19), inset 0 -12px 22px rgba(30, 5, 20, .22); }
.envelope__back::after { position: absolute; inset: 0; content: ""; opacity: .28; background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(235, 197, 165, .07) 8px, transparent 9px); }
.letter-peek { position: absolute; z-index: 1; top: 5%; left: 10%; display: flex; width: 80%; height: 94%; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 12%; color: #6d4957; background: linear-gradient(135deg, #fff9ec, #efe0ca); box-shadow: 0 5px 13px rgba(24, 4, 17, .19); transition: transform 1.25s cubic-bezier(.16, .74, .14, 1) .28s; }
.letter-peek__rule { width: 62%; height: 1px; margin-bottom: .9rem; background: rgba(132, 88, 94, .28); }
.letter-peek__rule--short { width: 37%; margin-top: .8rem; }
.letter-peek__title { color: #684052; font-family: var(--serif); font-size: clamp(1.15rem, 4vw, 1.7rem); font-style: italic; }
.envelope__side { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.envelope__side--left { clip-path: polygon(0 0, 52% 54%, 0 100%); background: linear-gradient(105deg, #8b3f58, #6a2a46); }
.envelope__side--right { clip-path: polygon(100% 0, 48% 54%, 100% 100%); background: linear-gradient(255deg, #742b49, #5c2240); }
.envelope__front { position: absolute; z-index: 4; inset: 0; clip-path: polygon(0 100%, 0 2%, 50% 60%, 100% 2%, 100% 100%); border-radius: 0 0 5px 5px; background: linear-gradient(150deg, #762e4a, #57203d 72%, #481936); }
.envelope__front::after { position: absolute; inset: 0; content: ""; background: linear-gradient(160deg, transparent 40%, rgba(34, 8, 25, .22)); }
.envelope__flap { position: absolute; z-index: 5; inset: 0 0 auto; height: 59%; clip-path: polygon(0 0, 100% 0, 50% 100%); transform: rotateX(0); transform-origin: top center; backface-visibility: visible; background: linear-gradient(160deg, #92445d, #6c2c49 72%, #55213c); transition: transform .88s cubic-bezier(.18, .72, .21, 1), filter .65s ease; }
.envelope__light { position: absolute; z-index: 2; top: -5%; left: 15%; width: 70%; height: 75%; opacity: 0; pointer-events: none; background: radial-gradient(ellipse, rgba(255, 229, 186, .72), rgba(226, 166, 153, .2) 34%, transparent 72%); filter: blur(16px); transition: opacity .9s ease .22s, transform 1s ease .2s; transform: translateY(1rem) scale(.7); }
.envelope__ornament { position: absolute; z-index: 6; top: 51%; left: 50%; color: rgba(245, 216, 181, .68); font-size: 1.15rem; transform: translate(-50%, -50%); transition: opacity .3s ease; }
.wax-seal { position: absolute; z-index: 7; top: 50%; left: 50%; display: grid; width: clamp(3.7rem, 13vw, 4.8rem); aspect-ratio: 1; place-items: center; padding: .45rem; border: 1px solid rgba(246, 198, 179, .58); border-radius: 50%; color: #f3c4b9; background: radial-gradient(circle at 35% 25%, #b75566, #8d354d 58%, #62213c); box-shadow: 0 4px 12px rgba(24, 5, 20, .4), inset 0 1px 1px rgba(255, 240, 225, .35); cursor: pointer; transform: translate(-50%, -50%); transition: transform .35s ease, opacity .35s ease, filter .35s ease; }
.wax-seal svg { width: 100%; fill: currentColor; stroke: rgba(255, 232, 220, .72); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.wax-seal svg path + path { fill: none; stroke-width: 1.8; }
.wax-seal:not(:disabled):hover { transform: translate(-50%, -50%) scale(1.09) rotate(-4deg); filter: brightness(1.12); }
.envelope:not(.envelope--opening):not(.envelope--open) .wax-seal { animation: seal-warmth 5.2s ease-in-out infinite; }
.envelope:not(.envelope--opening):not(.envelope--open) .envelope__light { opacity: .18; transform: none; animation: envelope-glow 6.5s ease-in-out infinite; }
.wax-seal:disabled { cursor: default; }
.envelope--opening .envelope__flap, .envelope--open .envelope__flap { transform: rotateX(180deg); filter: brightness(.8); }
.envelope__photo { position: absolute; z-index: 6; right: 9%; bottom: 9%; width: 28%; height: auto; aspect-ratio: 1; object-fit: cover; border: .28rem solid #f7eddf; box-shadow: 0 .35rem .9rem rgba(20, 4, 15, .38); opacity: .92; transform: rotate(2deg); transition: transform 1s cubic-bezier(.2, .7, .2, 1), opacity .65s ease, filter .65s ease; }
.envelope--opening .envelope__photo, .envelope--open .envelope__photo { opacity: 1; transform: translateY(-24%) rotate(-3deg) scale(1.04); filter: drop-shadow(0 0 .8rem rgba(255, 221, 197, .4)); }
.envelope--opening .wax-seal { animation: seal-release .48s ease-in forwards; }
.envelope--opening .envelope__light, .envelope--open .envelope__light { opacity: .9; transform: translateY(-.6rem) scale(1.15); }
.envelope--opening .envelope__ornament, .envelope--open .envelope__ornament { opacity: 0; }
.envelope--open .letter-peek { transform: translateY(-35%); }
.envelope--open { transform: translateY(-4px) rotateX(1deg); }
.envelope-petals { position: absolute; z-index: 8; inset: -18% -6%; pointer-events: none; }
.envelope-petals span { position: absolute; top: 52%; left: 50%; color: #e8aec2; opacity: 0; font-size: 1.05rem; }
.envelope--opening ~ .envelope-petals span { animation: petal-drift 1.7s ease-out both; }
.envelope-petals span:nth-child(1) { --petal-x: -120px; --petal-y: -80px; }
.envelope-petals span:nth-child(2) { --petal-x: 140px; --petal-y: -102px; animation-delay: .08s; }
.envelope-petals span:nth-child(3) { --petal-x: -155px; --petal-y: 35px; animation-delay: .14s; }
.envelope-petals span:nth-child(4) { --petal-x: 135px; --petal-y: 50px; animation-delay: .2s; }
.envelope-petals span:nth-child(5) { --petal-x: 10px; --petal-y: -145px; animation-delay: .1s; }
.envelope-caption { display: flex; align-items: center; gap: .8rem; margin: 1.6rem 0 0; color: rgba(238, 218, 205, .75); font-family: var(--serif); font-size: .92rem; font-style: italic; }
.envelope-caption span:first-child, .envelope-caption span:last-child { width: 2rem; height: 1px; background: rgba(216, 187, 130, .4); }
.read-letter-button { align-self: start; min-width: min(100%, 15rem); margin-top: .4rem; animation: button-rise .65s cubic-bezier(.2, .7, .2, 1) both; }
.scene--arriving { animation: scene-fade-in 1.1s ease both; }
.scene--departing { animation: scene-fade-out .65s ease both; }

.story { position: relative; z-index: 1; width: 100%; color: var(--paper-ink); background: #f2e9de; }
.music-player { position: fixed; z-index: 45; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); display: grid; width: min(19rem, calc(100vw - 2rem)); min-height: 4.1rem; grid-template-columns: 2.5rem minmax(0, 1fr) 1.5rem minmax(3.2rem, 4.2rem) 1.5rem; align-items: center; gap: .45rem; padding: .55rem .65rem; border: 1px solid rgba(233, 193, 177, .32); border-radius: 999px; color: #f5e7e4; background: rgba(47, 21, 39, .93); box-shadow: 0 .8rem 2.2rem rgba(20, 7, 17, .28), inset 0 1px rgba(255, 255, 255, .08); backdrop-filter: blur(14px); }
.music-player[hidden] { display: none; }
.music-player__toggle, .music-player__volume-button { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; padding: 0; border: 1px solid rgba(231, 190, 171, .35); border-radius: 50%; color: #f2d4cf; background: rgba(255, 255, 255, .06); cursor: pointer; }
.music-player__toggle { color: #4e233d; background: linear-gradient(145deg, #f4d9c2, #dca8ac); }
.music-player__toggle span { font-size: .8rem; }
.music-player__details { display: grid; min-width: 0; gap: .12rem; }
.music-player__title { overflow: hidden; color: #f7e9df; font-family: var(--serif); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.music-player__status { overflow: hidden; color: #c9aebb; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.music-player__volume-button { width: 1.5rem; height: 1.8rem; border: 0; color: #e7c9d0; font-size: 1rem; }
.music-player__volume { width: 100%; height: 1rem; accent-color: #e3b1bb; cursor: pointer; }
.music-player__expand { display: none; width: 1.65rem; height: 1.9rem; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #e7c9d0; background: transparent; font-size: 1.2rem; cursor: pointer; }
.music-player.is-playing .music-player__toggle { box-shadow: 0 0 1rem rgba(239, 187, 190, .35); }
.music-player button:focus-visible, .music-player input:focus-visible { outline: 2px solid #f1cba5; outline-offset: 3px; }
.story-nav { position: sticky; z-index: 30; top: 0; display: flex; width: 100%; min-height: 4.6rem; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem max(1.1rem, calc((100vw - 76rem) / 2)); border-bottom: 1px solid rgba(80, 40, 59, .1); background: rgba(249, 244, 236, .92); box-shadow: 0 5px 22px rgba(37, 17, 30, .055); backdrop-filter: blur(16px); }
.wordmark { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .55rem; color: #4d3041; text-decoration: none; font-family: var(--serif); font-size: .95rem; font-style: italic; }
.wordmark__seal { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border: 1px solid rgba(143, 76, 102, .4); border-radius: 50%; color: #955873; font-style: normal; }
.story-nav__links { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: clamp(.55rem, 1.7vw, 1.45rem); overflow-x: auto; scrollbar-width: none; }
.story-nav__links::-webkit-scrollbar { display: none; }
.story-nav__links a { flex: 0 0 auto; padding: .55rem .05rem; color: #614b59; text-decoration: none; font-size: .73rem; transition: color .2s ease; }
.story-nav__links a:hover, .story-nav__links a:focus-visible { color: #9d5a76; }

.story-hero { position: relative; display: grid; min-height: min(88svh, 61rem); place-items: center; align-content: center; overflow: hidden; padding: clamp(5rem, 13vh, 9rem) 1.25rem clamp(6rem, 14vh, 10rem); color: var(--paper); background: radial-gradient(ellipse at 50% 46%, #482139 0%, #2d1427 41%, #1d0c19 100%); text-align: center; }
.story-hero::before, .story-hero::after { position: absolute; content: ""; pointer-events: none; border: 1px solid rgba(218, 187, 130, .12); border-radius: 50%; }
.story-hero::before { width: min(80vw, 43rem); aspect-ratio: 1; animation: halo-breathe 11s ease-in-out infinite; }
.story-hero::after { width: min(63vw, 33rem); aspect-ratio: 1; border-color: rgba(228, 170, 186, .12); }
.story-hero__halo { position: absolute; width: min(48vw, 26rem); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(207, 137, 151, .13), transparent 70%); filter: blur(10px); }
.story-hero__eyebrow, .story-hero h1, .story-hero__lead, .scroll-cue { position: relative; z-index: 1; animation: scene-rise .9s both; }
.story-hero__eyebrow { margin-bottom: 1.4rem; animation-delay: .16s; }
.story-hero h1 { display: grid; gap: .16em; font-size: clamp(3rem, 9.4vw, 7.3rem); line-height: .98; animation-delay: .28s; }
.story-hero h1 em { margin-top: .02em; }
.story-hero__lead { max-width: 38rem; margin: 1.5rem auto 0; color: rgba(250, 238, 230, .78); font-size: clamp(.98rem, 2vw, 1.14rem); line-height: 1.8; animation-delay: .42s; }
.together-counter { position: relative; z-index: 1; width: min(100%, 35rem); margin: clamp(1.7rem, 4vh, 2.5rem) auto 0; padding: 1.25rem 1.4rem 1.15rem; border: 1px solid rgba(226, 194, 154, .25); background: linear-gradient(135deg, rgba(255, 243, 231, .065), rgba(255, 243, 231, .018)); box-shadow: 0 1rem 3rem rgba(14, 5, 13, .18), inset 0 1px rgba(255, 255, 255, .035); animation: scene-rise .9s .52s both; }
.together-counter::before, .together-counter::after { position: absolute; top: 50%; color: rgba(226, 194, 154, .66); content: "✧"; font-size: .8rem; transform: translateY(-50%); }
.together-counter::before { left: .65rem; }
.together-counter::after { right: .65rem; }
.together-counter__eyebrow { margin: 0 0 .8rem; color: #e7c99d; font-size: .63rem; letter-spacing: .16em; text-transform: uppercase; }
.together-counter__grid { display: flex; align-items: center; justify-content: center; gap: clamp(.45rem, 2.4vw, 1.15rem); font-variant-numeric: tabular-nums; }
.together-counter__unit { display: grid; min-width: clamp(2.8rem, 10vw, 4.2rem); gap: .16rem; }
.together-counter__value { color: #fff0dc; font-family: var(--serif); font-size: clamp(1.55rem, 5.3vw, 2.4rem); line-height: 1; }
.together-counter__unit > span:last-child { color: rgba(250, 238, 230, .62); font-size: .57rem; letter-spacing: .08em; text-transform: uppercase; }
.together-counter__separator { align-self: start; padding-top: .12rem; color: rgba(231, 201, 157, .7); font-family: var(--serif); font-size: 1.5rem; }
.together-counter__promise { margin: .9rem 0 0; color: #f0d6ce; font-family: var(--serif); font-size: clamp(.95rem, 2.5vw, 1.12rem); font-style: italic; line-height: 1.55; }
.scroll-cue { display: inline-grid; justify-items: center; gap: .85rem; margin-top: clamp(2.4rem, 6vh, 4rem); color: #e9d3c9; text-decoration: none; font-size: .72rem; letter-spacing: .1em; animation-delay: .6s; }
.scroll-cue__line { display: block; width: 1px; height: 2.9rem; transform-origin: top; background: linear-gradient(var(--gold), transparent); animation: scroll-glow 2.3s ease-in-out infinite; }
.hero-spark { position: absolute; color: rgba(238, 208, 159, .68); animation: star-drift 8s ease-in-out infinite alternate; }
.hero-spark--one { top: 26%; left: 18%; font-size: 1rem; }
.hero-spark--two { top: 67%; right: 19%; font-size: 1.4rem; animation-delay: -3s; }
.hero-spark--three { top: 39%; right: 13%; color: var(--rose); font-size: 2rem; animation-delay: -5s; }

.section-shell { position: relative; padding: clamp(4.5rem, 10vw, 8rem) max(1.15rem, calc((100vw - 74rem) / 2)); }
.letter-section { background: linear-gradient(180deg, #eee2d5 0%, #f5eee4 100%); }
.section-kicker { display: flex; max-width: 72rem; align-items: center; gap: .9rem; margin: 0 auto clamp(2rem, 4vw, 3.2rem); color: #927486; font-size: .65rem; font-weight: 650; letter-spacing: .17em; line-height: 1.5; text-transform: uppercase; }
.section-kicker > span:first-child { color: #b57f86; font-family: var(--serif); font-size: 1rem; letter-spacing: .04em; }
.section-kicker i { display: block; width: clamp(1.2rem, 4vw, 3.2rem); height: 1px; flex: 0 0 auto; background: rgba(147, 97, 119, .42); }

.letter-paper { position: relative; width: min(100%, 57rem); margin: 0 auto; padding: clamp(2rem, 7vw, 5.5rem); overflow: hidden; color: var(--paper-ink); background: linear-gradient(145deg, rgba(255, 252, 245, .97), rgba(248, 238, 224, .98)); box-shadow: 0 2.4rem 6rem rgba(68, 35, 51, .13), 0 1px 0 rgba(255, 255, 255, .85) inset; }
.letter-paper::before { position: absolute; top: 0; left: 10%; width: 80%; height: 1px; content: ""; background: linear-gradient(90deg, transparent, rgba(156, 101, 122, .38), transparent); }
.paper-corner { position: absolute; width: 2rem; height: 2rem; border-color: rgba(171, 125, 113, .35); border-style: solid; }
.paper-corner--tl { top: 1rem; left: 1rem; border-width: 1px 0 0 1px; }
.paper-corner--br { right: 1rem; bottom: 1rem; border-width: 0 1px 1px 0; }
.paper-flower { position: absolute; top: 2.5rem; right: clamp(1.4rem, 4vw, 3rem); color: #d9a6a9; opacity: .56; font-size: clamp(2rem, 6vw, 3.2rem); animation: flower-sway 8s ease-in-out infinite; }
.paper-date { margin: 0 0 1.35rem; color: #a17b83; font-size: .69rem; letter-spacing: .2em; }
.letter-paper h2 { margin: 0 0 1.35rem; color: #624256; font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.15rem); font-weight: 400; }
.letter-copy { max-width: 66ch; }
.letter-copy__paragraph { margin: 0 0 1.12em; color: #52404a; font-family: var(--serif); font-size: clamp(1rem, 1.7vw, 1.1rem); line-height: 1.9; }
.letter-copy__paragraph:last-child { margin-bottom: 0; }
.paper-signoff { display: flex; align-items: flex-end; gap: .55rem; justify-content: flex-end; margin: 2.2rem 0 0; color: #755065; font-family: var(--serif); font-size: 1.07rem; font-style: italic; }
.paper-signoff__lines { display: grid; gap: .2rem; text-align: right; }
.paper-signoff > span[aria-hidden="true"] { color: #bd7894; font-size: 1.25rem; }

.section-dark { color: #f4eae4; background: radial-gradient(ellipse at 77% 9%, rgba(107, 46, 79, .2), transparent 32%), #24101f; }
.section-dark .section-kicker { color: #cfb4c1; }
.section-dark .section-kicker > span:first-child { color: #e0b58f; }
.section-dark .section-kicker i { background: rgba(221, 187, 147, .44); }
.section-heading { max-width: 49rem; margin: 0 auto clamp(2.4rem, 5vw, 4.2rem); text-align: center; }
.section-heading h2, .horses-intro h2 { display: grid; gap: .12em; color: #f9eee4; font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 1.01; }
.section-heading h2 em, .horses-intro h2 em { color: #d8a5b7; }
.section-heading > p { max-width: 42rem; margin: 1.25rem auto 0; color: rgba(246, 232, 223, .76); font-size: .98rem; line-height: 1.8; }

.memory-grid { display: grid; max-width: 72rem; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0 auto; }
.memory-card { position: relative; min-width: 0; min-height: 18rem; padding: clamp(1.35rem, 2.8vw, 2.15rem); border: 1px solid rgba(221, 178, 160, .18); background: linear-gradient(150deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .018)); box-shadow: 0 1rem 2.4rem rgba(6, 2, 8, .14); transition: transform .4s ease, border-color .35s ease, background .35s ease; }
.memory-card:hover { transform: translateY(-5px); border-color: rgba(225, 183, 143, .43); background: linear-gradient(150deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); }
.memory-card__icon, .animal-card__icon, .support-card__icon, .starstable-card__icon { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; margin-bottom: 1.15rem; border: 1px solid rgba(220, 185, 145, .42); border-radius: 50%; color: #e7c28e; font-size: 1.05rem; }
.memory-card__label, .starstable-card__label { margin: 0 0 .6rem; color: #d4b5c1; font-size: .63rem; font-weight: 650; letter-spacing: .16em; line-height: 1.55; text-transform: uppercase; }
.memory-card__title, .animal-card__title, .support-card__title, .starstable-card__title { margin: 0 0 .75rem; color: #fff2e5; font-family: var(--serif); font-size: clamp(1.35rem, 2.1vw, 1.75rem); font-weight: 400; line-height: 1.16; }
.memory-card__text, .animal-card__text, .support-card__text, .starstable-card__text { margin: 0; color: rgba(246, 232, 223, .75); font-size: .91rem; line-height: 1.75; }
.memory-card__number, .animal-card__number, .support-card__number, .starstable-card__number { position: absolute; right: 1.15rem; bottom: .85rem; color: rgba(225, 197, 173, .35); font-family: var(--serif); font-size: .8rem; letter-spacing: .11em; }
.memory-card__extra { margin-top: 1.15rem; padding-top: .85rem; border-top: 1px solid rgba(220, 185, 145, .2); color: #f1d9c4; }
.memory-card__extra summary { width: fit-content; color: #e3c8a2; cursor: pointer; font-size: .78rem; line-height: 1.5; list-style: none; }
.memory-card__extra summary::-webkit-details-marker { display: none; }
.memory-card__extra summary::after { display: inline-block; margin-left: .5rem; content: "+"; transition: transform .25s ease; }
.memory-card__extra[open] summary::after { transform: rotate(45deg); }
.memory-card__extra p { margin: .75rem 0 0; color: rgba(246, 232, 223, .75); font-size: .85rem; line-height: 1.7; }

.animals-section { color: var(--paper-ink); background: linear-gradient(140deg, #f4eadb, #e7d8ca); }
.animals-section .section-kicker { color: #8f6d7d; }
.animals-section .section-kicker > span:first-child { color: #b5817e; }
.animals-section .section-kicker i { background: rgba(151, 103, 120, .4); }
.animals-layout { display: block; max-width: 66rem; margin: 0 auto; }
.animals-copy .section-heading { margin-bottom: 2rem; text-align: left; }
.animals-copy .section-heading h2 { color: #54354a; }
.animals-copy .section-heading h2 em { color: #a35f7a; }
.animals-copy .section-heading > p { margin: 1.2rem 0 0; color: #6e5865; line-height: 1.8; }
.animal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.animal-card:last-child { grid-column: 1 / -1; }
.animal-card { position: relative; min-width: 0; padding: 1.1rem 1.2rem 1.3rem; border: 1px solid rgba(118, 72, 91, .13); background: rgba(255, 250, 241, .58); box-shadow: 0 .65rem 1.6rem rgba(71, 43, 51, .06); }
.animal-card__icon { width: 1.9rem; height: 1.9rem; margin-bottom: .65rem; border-color: rgba(157, 92, 118, .27); color: #a15878; }
.animal-card__title { margin-bottom: .4rem; color: #633d55; font-size: 1.3rem; }
.animal-card__text { padding-right: .8rem; color: #6b5962; font-size: .85rem; }
.animal-card__number { color: rgba(122, 78, 98, .43); }
.horse-art { position: relative; min-width: 0; margin: 0; }
.horse-art figcaption { margin-top: .65rem; color: #d2b5c1; text-align: center; font-family: var(--serif); font-size: .85rem; font-style: italic; }
.media-frame--error img { display: none; }

.flowers-section { overflow: hidden; background: radial-gradient(ellipse at 50% 38%, rgba(146, 70, 105, .2), transparent 38%), linear-gradient(145deg, #21101e, #321629 55%, #1c0c18); }
.flowers-section .section-heading { max-width: 49rem; }
.flowers-section .section-heading h2 em { color: #e0a8bf; }
.flowers-section .section-heading > p { max-width: 42rem; margin-right: auto; margin-left: auto; color: rgba(246, 232, 223, .78); line-height: 1.8; }
.flowers-grid { display: grid; max-width: 68rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.8rem); margin: 0 auto; }
.flower-card { min-width: 0; overflow: hidden; border: 1px solid rgba(229, 194, 165, .2); background: linear-gradient(150deg, rgba(255, 245, 239, .075), rgba(255, 245, 239, .025)); box-shadow: 0 1.2rem 2.8rem rgba(12, 4, 11, .2); transition: transform .45s ease, border-color .45s ease, box-shadow .45s ease; }
.flower-card:hover { transform: translateY(-4px); border-color: rgba(229, 194, 165, .4); box-shadow: 0 1.6rem 3.5rem rgba(12, 4, 11, .27); }
.flower-card__figure { margin: .65rem .65rem 0; overflow: hidden; background: rgba(255, 255, 255, .04); }
.flower-card__image { display: block; width: 100%; aspect-ratio: 1.48; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s ease; }
.flower-card:hover .flower-card__image { transform: scale(1.025); filter: saturate(1.04); }
.flower-card__name { padding: .9rem 1rem 0; color: #f0d3d4; text-align: center; font-family: var(--serif); font-size: clamp(1.45rem, 2.4vw, 1.8rem); font-style: italic; }
.flower-card__text { max-width: 38rem; margin: 0 auto; padding: .4rem 1.25rem 1.35rem; color: rgba(246, 232, 223, .73); text-align: center; font-size: .88rem; line-height: 1.72; }

.support-section { background: radial-gradient(ellipse at 18% 30%, rgba(120, 51, 83, .2), transparent 32%), linear-gradient(150deg, #21101f, #321529 65%, #21101d); }
.support-section .section-heading { max-width: 52rem; }
.support-section__lead { max-width: 39rem; margin: 1.25rem auto 0; color: rgba(246, 232, 223, .76); font-size: 1rem; line-height: 1.8; }
.support-grid { display: grid; max-width: 66rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin: 0 auto; }
.support-card { position: relative; min-height: 13.5rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid rgba(229, 194, 165, .2); background: rgba(255, 245, 239, .045); }
.support-card__icon { width: 2rem; height: 2rem; margin-bottom: .9rem; color: #e4bd91; }
.support-card__title { font-size: 1.5rem; }
.support-card__text { max-width: 50ch; }
.support-card__number { color: rgba(226, 191, 163, .5); }
.support-closing { max-width: 49rem; margin: 2.5rem auto 0; color: rgba(248, 235, 225, .79); text-align: center; font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.8; }

.home-section { isolation: isolate; display: grid; min-height: min(94svh, 62rem); place-items: center; align-content: center; overflow: hidden; color: #f8ede4; background: radial-gradient(ellipse at 50% 42%, #462037 0%, #29111f 43%, #180b14 100%); text-align: center; }
.home-glow { position: absolute; z-index: -1; width: min(70vw, 44rem); aspect-ratio: 1; border: 1px solid rgba(225, 190, 148, .1); border-radius: 50%; pointer-events: none; }
.home-glow--one { animation: halo-breathe 14s ease-in-out infinite; }
.home-glow--two { width: min(50vw, 31rem); border-color: rgba(215, 163, 184, .13); animation: halo-breathe 16s 2s ease-in-out infinite reverse; }
.home-section__ornament { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-bottom: 1.3rem; color: #e5bf8e; }
.home-section__ornament span { width: clamp(2rem, 7vw, 4rem); height: 1px; background: linear-gradient(90deg, transparent, rgba(229, 191, 142, .62)); }
.home-section__ornament span:last-child { transform: rotate(180deg); }
.home-section__ornament b { font-size: 1.15rem; font-weight: 400; }
.home-section > .eyebrow { position: relative; margin-bottom: 1rem; color: #e3c1c6; }
.home-section h2 { position: relative; display: grid; gap: .04em; font-size: clamp(4rem, 14vw, 9rem); line-height: .86; }
.home-section h2 em { color: #e2a9bc; }
.home-section__copy { position: relative; width: min(100%, 38rem); margin: clamp(2rem, 5vw, 3.3rem) auto 0; }
.home-section__paragraph { margin: 0 0 .75rem; color: rgba(249, 236, 228, .83); font-family: var(--serif); font-size: clamp(1.02rem, 2vw, 1.2rem); line-height: 1.72; }
.home-section__paragraph:last-child { margin-bottom: 0; }
.home-values { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .95rem; margin: 2rem 0 0; color: #e8c5bc; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.home-values i { color: var(--gold); font-size: .75rem; font-style: normal; }
.star-button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .55rem; margin-top: 2rem; padding: .6rem .9rem; border: 1px solid rgba(221, 190, 157, .27); color: #e9d2c2; background: rgba(255, 255, 255, .035); cursor: pointer; font-size: .75rem; transition: border-color .25s ease, background .25s ease, color .25s ease; }
.star-button:hover, .star-button.is-lit { border-color: rgba(239, 204, 147, .72); color: #ffe7b8; background: rgba(239, 204, 147, .1); }
.star-button__glyph { color: #d8bb82; transition: transform .5s cubic-bezier(.2, .8, .2, 1), text-shadow .3s ease; }
.star-button.is-lit .star-button__glyph { transform: rotate(45deg) scale(1.35); text-shadow: 0 0 1rem #f7dca3; }
.star-message { position: relative; z-index: 1; width: min(100%, 32rem); margin: 1rem auto 0; color: rgba(247, 235, 227, .82); font-family: var(--serif); font-size: 1.08rem; font-style: italic; line-height: 1.75; animation: star-message-in .55s ease both; }
.star-message[hidden] { display: none; }
@keyframes star-message-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.star-trail { position: absolute; top: calc(50% + 1.25rem); left: 50%; pointer-events: none; }
.star-trail__particle { position: absolute; color: #ffe5ad; opacity: 0; font-size: .85rem; animation: star-trail 1.1s var(--delay) ease-out both; }

.horses-section { overflow: hidden; background: radial-gradient(ellipse at 74% 28%, rgba(102, 50, 84, .2), transparent 30%), linear-gradient(145deg, #20101e, #2c1428 55%, #1c0c18); }
.horses-intro { display: grid; max-width: 73rem; grid-template-columns: minmax(0, 1fr) minmax(17rem, .88fr); align-items: center; gap: clamp(2rem, 7vw, 6rem); margin: 0 auto 3rem; }
.horses-intro__copy-block > .eyebrow { margin-bottom: .85rem; color: #e3bf92; }
.horses-intro h2 { font-size: clamp(2.7rem, 6vw, 5.5rem); }
.horses-intro h2 em { color: #dbaac1; }
.horses-intro__copy { max-width: 40rem; margin: 1.3rem 0 0; color: rgba(246, 232, 224, .74); font-size: .94rem; line-height: 1.8; }
.horse-art { padding: 1rem; border: 1px solid rgba(222, 186, 146, .23); background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, .08), rgba(255, 255, 255, .015) 70%); }
.horse-art img { width: 100%; height: auto; aspect-ratio: 1.28; object-fit: cover; object-position: center; }
.horse-art figcaption { color: #d2b5c1; }
.starstable-grid { display: grid; max-width: 73rem; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0 auto; }
.starstable-card { position: relative; min-height: 15rem; padding: clamp(1.35rem, 2.8vw, 2rem); border: 1px solid rgba(223, 184, 145, .19); background: rgba(255, 255, 255, .04); }
.starstable-card__icon { color: #e2bd8c; }
.starstable-card__label { color: #d9b7c7; }
.starstable-card__title { font-size: 1.42rem; }
.starstable-card__text { padding-bottom: .5rem; }
.starstable-card__number { color: rgba(222, 192, 166, .44); }
.starstable-closing { max-width: 52rem; margin: 2.5rem auto 0; color: rgba(245, 231, 220, .83); text-align: center; font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.24rem); line-height: 1.8; }

.finale { isolation: isolate; display: grid; min-height: min(95svh, 64rem); place-items: center; align-content: center; overflow: hidden; color: #f7ede5; background: radial-gradient(ellipse at 50% 50%, #411d35, #251021 50%, #170a14 100%); text-align: center; }
.finale::before { position: absolute; z-index: -1; width: min(78vw, 48rem); aspect-ratio: 1; content: ""; border: 1px solid rgba(226, 191, 143, .12); border-radius: 50%; animation: halo-breathe 16s ease-in-out infinite; }
.finale__petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.finale__petals span { position: absolute; top: 50%; left: 50%; color: #df9bb3; opacity: .36; animation: finale-petal 14s ease-in-out infinite; }
.finale__petals span:nth-child(1) { --petal-x: -34vw; --petal-y: -23vh; }
.finale__petals span:nth-child(2) { --petal-x: 32vw; --petal-y: -29vh; animation-delay: -3s; }
.finale__petals span:nth-child(3) { --petal-x: -37vw; --petal-y: 25vh; animation-delay: -7s; }
.finale__petals span:nth-child(4) { --petal-x: 38vw; --petal-y: 27vh; animation-delay: -10s; }
.finale__petals span:nth-child(5) { --petal-x: 0vw; --petal-y: -38vh; animation-delay: -5s; }
.finale__seal { display: grid; width: 4.3rem; aspect-ratio: 1; place-items: center; margin-bottom: 1.6rem; border: 1px solid rgba(239, 192, 176, .53); border-radius: 50%; color: #f0c6b6; background: radial-gradient(circle at 34% 23%, #aa4f65, #70243f); box-shadow: 0 0 2.4rem rgba(223, 147, 166, .2), inset 0 1px 1px rgba(255, 255, 255, .25); animation: seal-breathe 4.5s ease-in-out infinite; }
.finale__seal svg { width: 2.7rem; fill: currentColor; stroke: rgba(255, 232, 220, .64); stroke-width: 1.1; }
.finale > .eyebrow { position: relative; margin-bottom: 1rem; }
.finale h2 { position: relative; display: grid; gap: .2em; font-size: clamp(2.1rem, 6vw, 4.8rem); line-height: 1.05; }
.finale h2 em { color: #dca9ba; }
.finale__love { position: relative; margin: clamp(2rem, 5vh, 3.5rem) 0 0; color: #f4d4c7; font-family: var(--serif); font-size: clamp(3rem, 10vw, 6.6rem); font-style: italic; letter-spacing: -.04em; text-shadow: 0 0 3rem rgba(228, 171, 180, .24); animation: love-glow 7s ease-in-out infinite; }
.finale__thanks { position: relative; width: min(100%, 35rem); margin: 1.2rem auto 0; color: rgba(247, 235, 227, .76); font-size: .95rem; line-height: 1.8; }
.back-to-top { position: relative; display: inline-flex; min-height: 2.9rem; align-items: center; gap: .8rem; justify-content: center; margin-top: 2.5rem; padding: .65rem 1rem; border: 1px solid rgba(224, 192, 158, .27); color: #ecd3c8; text-decoration: none; font-size: .76rem; transition: color .25s ease, border-color .25s ease, transform .25s ease; }
.back-to-top:hover { transform: translateY(-2px); border-color: rgba(240, 207, 159, .7); color: #f4d5a4; }
.site-footer { display: flex; min-height: 4.2rem; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem; padding: .8rem 1.1rem max(.8rem, env(safe-area-inset-bottom)); color: #796570; background: #eee3d9; font-size: .68rem; letter-spacing: .04em; }
.site-footer > span:nth-child(2) { color: #ae7c8c; }
.site-footer__note { flex-basis: 100%; text-align: center; color: #8b7882; font-size: .62rem; }

.reveal-pending, .reveal-card, .reveal-image, .reveal-copy, .reveal-item { transition: opacity .85s ease var(--reveal-delay, 0ms), transform .9s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms), clip-path 1s ease var(--reveal-delay, 0ms); }
.reveal-pending:not(.is-visible), .reveal-copy:not(.is-visible) { opacity: 0; transform: translateY(1.25rem); }
.reveal-card:not(.is-visible) { opacity: 0; transform: translateY(1.6rem) scale(.985); }
.reveal-image:not(.is-visible) { opacity: 0; clip-path: inset(7% 6% 2% 6% round 2px); transform: translateY(1.2rem); }
.reveal-item:not(.is-visible) { opacity: 0; transform: translateY(.8rem) scale(.98); }
.is-visible { opacity: 1 !important; transform: none !important; clip-path: inset(0 0 0 0 round 0) !important; }
.story--arriving .story-hero h1, .story--arriving .story-hero__eyebrow, .story--arriving .story-hero__lead { animation-duration: 1.1s; }

@keyframes scene-rise { from { opacity: 0; transform: translateY(1.15rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes scene-fade-in { from { opacity: 0; filter: brightness(.72); } to { opacity: 1; filter: brightness(1); } }
@keyframes scene-fade-out { to { opacity: 0; filter: blur(4px); transform: translateY(-1rem); } }
@keyframes vanished-appear { from { opacity: 0; transform: translateY(.8rem) scale(.96); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes gate-dissolve { 0% { opacity: 1; transform: scale(1); filter: blur(0); } 35% { opacity: .88; transform: scale(1.015); filter: blur(1px); } 100% { opacity: 0; transform: scale(.94) translateY(-.5rem); filter: blur(9px); } }
@keyframes particle-vanish { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.35); } 18% { opacity: .95; } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--turn)) scale(.45); } }
@keyframes particle-gather { 0% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(.45); } 26% { opacity: .95; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.15); } }
@keyframes heart-bloom { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); } 45% { opacity: 1; transform: translate(-50%, -50%) scale(1.22); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.65); } }
@keyframes field-warm-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(221, 119, 151, .11); } 50% { box-shadow: 0 0 0 7px rgba(221, 119, 151, .22), 0 0 2rem rgba(221, 119, 151, .14); } }
@keyframes warning-glow { 0%, 100% { box-shadow: 0 0 0 rgba(216, 187, 130, 0); } 50% { box-shadow: 0 0 1.5rem rgba(216, 187, 130, .1); } }
@keyframes soft-turn { to { transform: rotate(360deg); } }
@keyframes star-drift { from { opacity: .18; transform: translate3d(0, 0, 0); } to { opacity: .62; transform: translate3d(5px, -9px, 0); } }
@keyframes scroll-glow { 0%, 100% { transform: scaleY(.65); opacity: .46; } 50% { transform: scaleY(1); opacity: 1; } }
@keyframes seal-release { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } 38% { opacity: 1; transform: translate(-50%, -53%) scale(1.16) rotate(-8deg); } 100% { opacity: 0; transform: translate(-50%, -72%) scale(.55) rotate(18deg); } }
@keyframes petal-drift { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(0); } 20% { opacity: .85; } 100% { opacity: 0; transform: translate(calc(-50% + var(--petal-x)), calc(-50% + var(--petal-y))) scale(.8) rotate(70deg); } }
@keyframes button-rise { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@keyframes halo-breathe { 0%, 100% { transform: scale(.94); opacity: .56; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes flower-sway { 0%, 100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-3px); } }
@keyframes star-trail { 0% { opacity: 0; transform: rotate(var(--spark-angle)) translateY(0) scale(.3); } 24% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--spark-angle)) translateY(calc(-1 * var(--spark-distance))) scale(1); } }
@keyframes finale-petal { 0%, 100% { opacity: .12; transform: translate(-50%, -50%) translate(0, 4px) rotate(-10deg); } 50% { opacity: .48; transform: translate(-50%, -50%) translate(var(--petal-x), var(--petal-y)) rotate(18deg); } }
@keyframes seal-breathe { 0%, 100% { box-shadow: 0 0 2rem rgba(223, 147, 166, .15), inset 0 1px 1px rgba(255, 255, 255, .25); } 50% { box-shadow: 0 0 3rem rgba(223, 147, 166, .3), inset 0 1px 1px rgba(255, 255, 255, .34); } }
@keyframes seal-warmth { 0%, 100% { box-shadow: 0 4px 12px rgba(24, 5, 20, .4), 0 0 1rem rgba(233, 159, 175, .08), inset 0 1px 1px rgba(255, 240, 225, .35); } 50% { box-shadow: 0 4px 12px rgba(24, 5, 20, .4), 0 0 1.7rem rgba(233, 159, 175, .3), inset 0 1px 1px rgba(255, 240, 225, .42); } }
@keyframes envelope-glow { 0%, 100% { opacity: .12; } 50% { opacity: .28; } }
@keyframes love-glow { 0%, 100% { text-shadow: 0 0 1.2rem rgba(228, 171, 180, .13); } 50% { text-shadow: 0 0 2.8rem rgba(228, 171, 180, .34); } }

@media (max-width: 1000px) {
  .memory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .horses-intro { gap: 2.2rem; }
  .story-nav { padding-right: 1rem; padding-left: 1rem; }
}

@media (min-width: 700px) {
  .gate__content { width: min(100%, 48rem); }
  .gate h1 { font-size: clamp(3rem, 5.4vw, 4.25rem); }
}

@media (max-width: 720px) {
  .story-nav { min-height: 4.1rem; gap: .65rem; }
  .wordmark { gap: .4rem; font-size: .84rem; }
  .wordmark__seal { width: 1.55rem; height: 1.55rem; }
  .story-nav__links { justify-content: flex-start; gap: .8rem; }
  .story-nav__links a { font-size: .69rem; }
  .section-shell { padding-right: 1.25rem; padding-left: 1.25rem; }
  .animals-layout, .horses-intro { grid-template-columns: 1fr; }
  .horses-intro { gap: 2rem; }
  .horse-art { width: min(100%, 34rem); margin: 0 auto; }
  .starstable-grid { grid-template-columns: 1fr; }
  .starstable-card { min-height: auto; }
  .support-grid { grid-template-columns: 1fr; }
  .support-card { min-height: auto; }
}

@media (max-width: 540px) {
  :root { scroll-padding-top: 4.2rem; }
  .screen { padding-right: 1rem; padding-left: 1rem; }
  .gate__content { padding: .8rem 0; }
  .gate__ornament { margin-bottom: .8rem; }
  .gate__eyebrow { margin-bottom: .7rem; font-size: .57rem; letter-spacing: .18em; }
  .gate h1 { font-size: clamp(2.28rem, 10vw, 3.3rem); }
  .gate__copy { max-width: 24rem; margin: .9rem auto 1.15rem; font-size: .87rem; line-height: 1.65; }
  .gate__label { font-size: .77rem; }
  .gate__input-wrap { min-height: 3.7rem; }
  .gate__input-wrap input { height: 3.6rem; }
  .gate__hint { margin: .45rem 0 .35rem; font-size: .72rem; }
  .gate__error { min-height: 1.35rem; font-size: .75rem; }
  .gate__warning { gap: .6rem; margin: .15rem 0 .8rem; padding: .72rem .76rem; }
  .gate__warning p { font-size: .76rem; line-height: 1.5; }
  .gate__signature { margin-top: .9rem; font-size: .88rem; }
  .button { min-height: 3.3rem; }
  .scene-heading { margin-bottom: .7rem; }
  .scene-heading h2 { font-size: 1.7rem; }
  .scene-heading__hint { margin-top: .65rem; font-size: .78rem; }
  .envelope { width: min(86vw, 25rem); }
  .envelope-wrap { padding: .9rem 0 1.2rem; }
  .envelope-caption { margin-top: 1rem; }
  .read-letter-button { margin-top: .2rem; }
  .music-player { right: max(.6rem, env(safe-area-inset-right)); bottom: max(.6rem, env(safe-area-inset-bottom)); width: 5.8rem; min-height: 3.45rem; grid-template-columns: 2.5rem 2rem; gap: .2rem; padding: .4rem .5rem; }
  .music-player__details, .music-player__volume-button, .music-player__volume { display: none; }
  .music-player__title { font-size: .76rem; }
  .music-player__status { font-size: .6rem; }
  .music-player__toggle { width: 2.5rem; height: 2.5rem; }
  .music-player__expand { display: grid; width: 2rem; height: 2.2rem; }
  .music-player.is-expanded { width: min(18rem, calc(100vw - 1.2rem)); min-height: 3.8rem; grid-template-columns: 2.5rem minmax(0, 1fr) 1.8rem minmax(2.4rem, 2.8rem) 1.8rem 1.8rem; gap: .2rem; padding: .45rem .5rem; }
  .music-player.is-expanded .music-player__details { display: grid; }
  .music-player.is-expanded .music-player__volume-button { display: grid; }
  .music-player.is-expanded .music-player__volume { display: block; }
  .story-nav { min-height: 3.65rem; padding: .35rem .7rem; }
  .wordmark { display: none; }
  .story-nav__links { width: 100%; justify-content: space-between; gap: .55rem; }
  .story-nav__links a { padding: .55rem 0; font-size: clamp(.61rem, 2.75vw, .71rem); }
  .story-hero { min-height: 83svh; padding: 5rem 1.1rem 5.5rem; }
  .story-hero__eyebrow { max-width: 19rem; margin-right: auto; margin-bottom: 1.1rem; margin-left: auto; font-size: .58rem; letter-spacing: .17em; }
  .story-hero h1 { font-size: clamp(2.8rem, 12vw, 4.2rem); }
  .story-hero__lead { margin-top: 1.15rem; font-size: .92rem; line-height: 1.68; }
  .together-counter { width: min(100%, 24rem); margin-top: 1.5rem; padding: 1.1rem 1.15rem 1rem; }
  .together-counter__eyebrow { font-size: .56rem; }
  .together-counter__unit > span:last-child { font-size: .5rem; }
  .scroll-cue { margin-top: 2rem; }
  .hero-spark--one { left: 8%; }
  .hero-spark--two { right: 9%; }
  .hero-spark--three { right: 7%; }
  .section-shell { padding: 4.4rem 1rem; }
  .section-kicker { gap: .55rem; margin-bottom: 1.8rem; font-size: .56rem; letter-spacing: .11em; }
  .section-kicker i { width: 1.1rem; }
  .letter-paper { padding: 2.1rem 1.35rem; }
  .paper-corner--tl { top: .7rem; left: .7rem; }
  .paper-corner--br { right: .7rem; bottom: .7rem; }
  .paper-flower { top: 1.5rem; right: 1.25rem; }
  .letter-paper h2 { padding-right: 2.4rem; font-size: 2rem; }
  .letter-copy__paragraph { margin-bottom: 1em; font-size: .98rem; line-height: 1.82; }
  .paper-date { font-size: .62rem; }
  .section-heading { margin-bottom: 2rem; }
  .section-heading h2, .horses-intro h2 { font-size: clamp(2.45rem, 10vw, 3.7rem); }
  .section-heading > p { font-size: .9rem; line-height: 1.72; }
  .memory-grid { grid-template-columns: 1fr; gap: .75rem; }
  .memory-card { min-height: 0; padding: 1.35rem 1.25rem 1.75rem; }
  .memory-card__title { font-size: 1.48rem; }
  .memory-card__text { font-size: .88rem; }
  .animals-copy .section-heading { text-align: left; }
  .animal-grid { grid-template-columns: 1fr; }
  .animal-card:last-child { grid-column: auto; }
  .flowers-grid { grid-template-columns: 1fr; }
  .animal-card { padding: 1rem 1rem 1.2rem; }
  .support-card { padding: 1.3rem; }
  .home-section { min-height: 90svh; padding-right: 1.2rem; padding-left: 1.2rem; }
  .home-section h2 { font-size: clamp(4.2rem, 19vw, 6.6rem); }
  .home-section__paragraph { font-size: 1rem; }
  .home-values { gap: .55rem; font-size: .61rem; letter-spacing: .08em; }
  .home-values i { font-size: .58rem; }
  .horses-intro { margin-bottom: 2rem; }
  .horses-intro h2 { font-size: clamp(2.55rem, 10.5vw, 3.8rem); }
  .horses-intro__copy { font-size: .89rem; }
  .horse-art { padding: .65rem; }
  .horse-art img { aspect-ratio: 1.2; }
  .starstable-grid { gap: .7rem; }
  .starstable-card { padding: 1.25rem; }
  .finale { min-height: 90svh; padding-right: 1.2rem; padding-left: 1.2rem; }
  .finale h2 { font-size: clamp(2rem, 9vw, 3rem); }
  .finale__love { margin-top: 1.65rem; }
  .finale__thanks { font-size: .88rem; }
  .site-footer { gap: .55rem; font-size: .61rem; }
  .site-footer__note { font-size: .57rem; line-height: 1.5; }
}

@media (max-height: 730px) and (max-width: 540px) {
  .gate { min-height: 100svh; padding-top: max(.7rem, env(safe-area-inset-top)); padding-bottom: max(.7rem, env(safe-area-inset-bottom)); }
  .gate__ornament { margin-bottom: .45rem; }
  .gate h1 { font-size: 2.25rem; }
  .gate__copy { margin: .65rem auto .85rem; }
  .gate__warning { padding: .58rem .7rem; }
  .gate__signature { margin-top: .65rem; }
  .gate__input-wrap, .gate__input-wrap input { min-height: 3.35rem; height: 3.3rem; }
}

@media (max-height: 760px) and (min-width: 541px) {
  .gate__content { padding-top: .25rem; padding-bottom: .25rem; }
  .gate__ornament { margin-bottom: .55rem; }
  .gate__eyebrow { margin-bottom: .5rem; }
  .gate h1 { font-size: clamp(2.55rem, 4.1vw, 3.5rem); line-height: .94; }
  .gate__copy { margin: .65rem auto .85rem; font-size: .89rem; line-height: 1.55; }
  .gate__form { width: min(100%, 24rem); }
  .gate__input-wrap { min-height: 3.5rem; }
  .gate__input-wrap input { height: 3.4rem; }
  .gate__hint { margin: .3rem 0 .2rem; }
  .gate__error { min-height: 1.1rem; }
  .gate__warning { margin: .05rem 0 .7rem; padding: .62rem .8rem; }
  .gate__warning p { font-size: .77rem; line-height: 1.45; }
  .gate__submit { min-height: 3.15rem; }
  .gate__signature { margin-top: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .starfield span, .finale__petals span, .scroll-cue__line, .gate__warning { animation: none !important; }
  .reveal-pending, .reveal-card, .reveal-image, .reveal-copy, .reveal-item { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
