@import url("https://fonts.googleapis.com/css2?family=Alex+Brush&family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&display=swap");

:root {
  color-scheme: light;
  --ink: #1b1218;
  --muted: #72646d;
  --line: rgba(92, 48, 66, 0.14);
  --surface: rgba(255, 248, 252, 0.62);
  --surface-strong: rgba(255, 252, 254, 0.84);
  --sage: #7c9180;
  --sage-dark: #465f4b;
  --blush: #f0a4bb;
  --rose: #d7658e;
  --blue: #6f92b7;
  --silver: #eef1f4;
  --shadow: 0 28px 90px rgba(82, 40, 58, 0.18);
  --radius: 8px;
  --hero-image: url("src/background.png");
  --font-romantic: "Alex Brush", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 86px;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(255, 246, 251, 0.78), rgba(242, 247, 249, 0.64)),
    var(--hero-image) center / cover fixed;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    linear-gradient(120deg, rgba(215, 101, 142, 0.18), transparent 26rem),
    linear-gradient(300deg, rgba(111, 146, 183, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 246, 251, 0.72));
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 100% 64px, 64px 100%;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 78%, transparent);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(79, 126, 168, 0.35);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
}

.gate {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.gate::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.82)),
    var(--hero-image) center / cover;
}

.gate-panel {
  width: min(1380px, 100%);
  display: grid;
  grid-template-columns: minmax(310px, 0.8fr) minmax(470px, 1.2fr);
  gap: 18px;
  align-items: stretch;
}

.gate-copy,
.quiz-card,
.panel,
.story-card,
.birthday-letter,
.symphony-card,
.compliment-card,
.memory-card {
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(1.22);
  -webkit-backdrop-filter: blur(26px) saturate(1.22);
}

.gate-copy {
  display: flex;
  min-height: min(760px, calc(100vh - 36px));
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(26px, 3.4vw, 52px);
  overflow: hidden;
}

.gate-label,
.eyebrow {
  margin: 0 0 12px;
  color: var(--sage-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gate h1,
.hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: var(--font-romantic);
  font-size: clamp(4rem, 7.4vw, 8.8rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0;
}

.gate h1 {
  max-width: 9.8ch;
}

.gate h1 span,
.hero h1 span {
  color: var(--sage-dark);
}

.gate-copy p,
.hero-subtitle,
.section-subtitle,
.muted {
  color: var(--muted);
  line-height: 1.65;
}

.gate-copy p {
  max-width: 34rem;
  margin: 18px 0 0;
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}

.signal {
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.44);
}

.signal strong {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1;
}

.signal span {
  color: var(--muted);
  font-size: 0.84rem;
}

.quiz-card {
  min-height: min(760px, calc(100vh - 36px));
  padding: clamp(18px, 2.4vw, 26px);
}

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.progress-ring {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(var(--sage-dark) var(--progress, 0deg), rgba(17, 19, 24, 0.1) 0deg),
    rgba(255, 255, 255, 0.62);
}

.progress-ring::after {
  position: absolute;
  inset: 7px;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.progress-ring span {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  font-weight: 750;
}

.field {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.field label,
.question-title {
  font-size: 0.92rem;
  font-weight: 720;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 14px 15px;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.quiz-track {
  display: grid;
  gap: 10px;
}

.question {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
}

.question-title {
  margin: 0 0 9px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.choice {
  min-height: 40px;
  border: 1px solid rgba(17, 19, 24, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  padding: 9px 12px;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.choice:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 89, 64, 0.28);
}

.choice.is-selected {
  border-color: rgba(56, 89, 64, 0.65);
  background: rgba(231, 240, 233, 0.92);
}

.quiz-actions,
.hero-actions,
.action-row,
.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary-button,
.secondary-button,
.chip-button,
.icon-button {
  min-height: 44px;
  border-radius: var(--radius);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  background: #111318;
  color: #fff;
  padding: 0 18px;
  box-shadow: 0 14px 35px rgba(17, 19, 24, 0.18);
  font-weight: 720;
}

.secondary-button,
.chip-button,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.secondary-button {
  padding: 0 16px;
}

.chip-button {
  padding: 0 14px;
}

.icon-button {
  width: 44px;
  display: grid;
  place-items: center;
}

.primary-button:hover,
.secondary-button:hover,
.chip-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.quiz-result {
  display: none;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(56, 89, 64, 0.18);
  border-radius: var(--radius);
  background: rgba(231, 240, 233, 0.72);
}

.quiz-result.is-visible {
  display: block;
}

.error {
  min-height: 22px;
  margin: 12px 0 0;
  color: #b0434e;
  font-size: 0.92rem;
  font-weight: 650;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 46px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(28px) saturate(1.24);
  -webkit-backdrop-filter: blur(28px) saturate(1.24);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #edf4ef);
  color: var(--sage-dark);
  font-size: 1rem;
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.nav-links a {
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - 66px);
  display: grid;
  align-items: end;
  padding: clamp(36px, 7vw, 86px) clamp(18px, 5vw, 64px);
  overflow: hidden;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.22)),
    var(--hero-image) center / cover;
}

.hero-inner {
  width: min(1060px, 100%);
}

.hero-subtitle {
  width: min(680px, 100%);
  margin: 22px 0 28px;
  font-size: clamp(1.05rem, 2vw, 1.34rem);
}

.quick-stats {
  display: grid;
  width: min(880px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 46px;
}

.stat {
  min-height: 112px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 60px rgba(31, 42, 54, 0.1);
  backdrop-filter: blur(22px);
}

.stat strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.section {
  padding: clamp(52px, 8vw, 96px) clamp(18px, 5vw, 64px);
}

.section-inner {
  width: min(1140px, 100%);
  margin: 0 auto;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  max-width: 720px;
  margin: 0;
  font-family: var(--font-romantic);
  font-size: clamp(3.2rem, 7vw, 6.9rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
}

.section-subtitle {
  width: min(520px, 100%);
  margin: 12px 0 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.birthday-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(235, 243, 237, 0.34));
}

.birthday-grid {
  display: grid;
  width: min(1040px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: clamp(18px, 4vw, 46px);
  align-items: center;
}

.birthday-letter {
  padding: clamp(20px, 4vw, 34px);
}

.birthday-letter h3 {
  margin: 0 0 12px;
  font-family: var(--font-romantic);
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  font-weight: 400;
  line-height: 1;
}

.birthday-letter p:not(.eyebrow) {
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.7;
}

.birthday-rose {
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 360px;
  pointer-events: none;
}

.birthday-rose img {
  display: block;
  width: min(100%, 380px);
  height: auto;
  filter: drop-shadow(0 28px 42px rgba(82, 40, 58, 0.18));
}


.panel {
  padding: clamp(20px, 4vw, 34px);
}

.panel h3,
.story-card h3,
.memory-card h3,
.compliment-card h3 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  letter-spacing: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
}

.segment {
  min-height: 42px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.segment.is-active {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(31, 42, 54, 0.08);
}

.mood-note {
  min-height: 150px;
  margin: 18px 0 0;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(235, 243, 237, 0.78));
}

.mood-note p {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 750;
  line-height: 1.14;
}

.letter-box {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.letter-text {
  min-height: 112px;
  margin: 0 0 22px;
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  font-weight: 760;
  line-height: 1.12;
}

.date-plan {
  display: grid;
  gap: 12px;
}

.date-pill {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.date-pill span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  text-transform: uppercase;
}

.date-pill strong {
  overflow-wrap: anywhere;
}

.story-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.symphony-section {
  padding-top: clamp(38px, 6vw, 78px);
}

.symphony-card {
  display: grid;
  min-height: 300px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  padding: clamp(20px, 4vw, 38px);
  overflow: hidden;
}

.piano-visual {
  position: relative;
  display: grid;
  min-height: 220px;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(230, 237, 232, 0.78)),
    var(--hero-image) left center / cover;
}

.piano-visual span {
  display: block;
  height: 178px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, #fff, #eef2f0);
  box-shadow: inset 0 -18px 26px rgba(56, 89, 64, 0.08);
}

.piano-visual i {
  position: absolute;
  top: 18px;
  width: 8%;
  height: 112px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #111318, #30343b);
  box-shadow: 0 18px 36px rgba(17, 19, 24, 0.16);
}

.piano-visual i:nth-of-type(1) {
  left: 20%;
}

.piano-visual i:nth-of-type(2) {
  left: 34%;
}

.piano-visual i:nth-of-type(3) {
  left: 62%;
}

.piano-visual i:nth-of-type(4) {
  left: 76%;
}

.symphony-copy h3 {
  margin: 0 0 12px;
  font-family: var(--font-romantic);
  font-size: clamp(3rem, 5.4vw, 5.4rem);
  font-weight: 400;
  line-height: 0.92;
}

.audio-player,
.audio-fallback {
  display: none;
}

.music-card {
  --audio-progress: 0%;
  width: min(640px, 100%);
  margin-top: 22px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.96), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(229, 238, 233, 0.7));
  box-shadow: 0 28px 90px rgba(31, 42, 54, 0.16);
  backdrop-filter: blur(24px) saturate(1.18);
  -webkit-backdrop-filter: blur(24px) saturate(1.18);
}

.music-head {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.cover-art {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(56, 89, 64, 0.3)),
    var(--hero-image) center / cover;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 780;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(31, 42, 54, 0.16);
  text-shadow: 0 2px 12px rgba(17, 19, 24, 0.32);
}

.cover-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 42%, rgba(17, 19, 24, 0.16));
}

.cover-art > span {
  position: relative;
  z-index: 2;
}

.cover-eq {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  align-items: end;
  gap: 3px;
  height: 22px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.32);
  backdrop-filter: blur(10px);
}

.cover-eq i {
  display: block;
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  animation: eqPulse 900ms ease-in-out infinite;
}

.cover-eq i:nth-child(2) {
  animation-delay: 140ms;
}

.cover-eq i:nth-child(3) {
  animation-delay: 280ms;
}

.cover-eq i:nth-child(4) {
  animation-delay: 420ms;
}

.track-copy {
  min-width: 0;
}

.track-kicker {
  display: inline-flex !important;
  width: auto;
  margin: 0 0 8px !important;
  padding: 5px 9px;
  border: 1px solid rgba(56, 89, 64, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--sage-dark) !important;
  font-size: 0.72rem !important;
  font-weight: 820;
  text-transform: uppercase;
}

.track-copy strong {
  display: block;
  overflow: hidden;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 760;
  line-height: 1.02;
  text-overflow: clip;
  white-space: normal;
}

.track-copy span {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heart-button,
.transport-button {
  position: relative;
  min-height: 36px;
  border: 1px solid transparent;
  color: #7f8592;
}

.heart-button {
  background: transparent;
  font-size: 0;
}

.heart-button::before {
  position: absolute;
  top: 13px;
  left: 12px;
  display: block;
  width: 12px;
  height: 12px;
  content: "";
  background: #7f8592;
  transform: rotate(45deg);
}

.heart-button::after {
  position: absolute;
  top: 8px;
  left: 12px;
  width: 12px;
  height: 12px;
  content: "";
  border-radius: 50%;
  background: #7f8592;
  box-shadow: 5px 5px 0 #7f8592;
}

.wave-wrap {
  position: relative;
  margin-top: 26px;
}

.waveform {
  --audio-progress: 0%;
  display: grid;
  height: 62px;
  grid-template-columns: repeat(56, 1fr);
  gap: 3px;
  align-items: center;
  overflow: hidden;
  mask-image: linear-gradient(90deg, black, black);
}

.waveform span {
  --fill: 0%;
  display: block;
  height: var(--h);
  min-height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #111318 0 var(--fill), rgba(17, 19, 24, 0.12) var(--fill) 100%);
  transition: background 120ms linear, opacity 160ms ease;
}

.audio-seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.gallery-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(234, 241, 238, 0.5));
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.gallery-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gallery-grid {
  display: flex;
  gap: 12px;
  min-height: 520px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
}

.gallery-card {
  position: relative;
  flex: 0 0 clamp(250px, 27vw, 370px);
  min-width: clamp(250px, 27vw, 370px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.18) 34%, transparent 56%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(224, 235, 229, 0.68));
  box-shadow: 0 22px 62px rgba(31, 42, 54, 0.12);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  transform: translateY(0);
  transition: flex 320ms ease, transform 260ms ease, box-shadow 260ms ease;
  animation: galleryIn 420ms ease both;
  animation-delay: var(--delay);
  scroll-snap-align: start;
}

.gallery-card:hover {
  z-index: 2;
  flex-basis: clamp(290px, 32vw, 430px);
  transform: translateY(-8px);
  box-shadow: 0 32px 92px rgba(31, 42, 54, 0.18);
}

.gallery-card.is-landscape:hover {
  flex-basis: clamp(480px, 60vw, 780px);
  background: transparent;
  box-shadow: none;
}

.gallery-card.is-landscape:hover img {
  object-fit: contain;
  background: transparent;
  transform: scale(1);
}

.gallery-card.is-landscape:hover::after {
  background: none;
}

.gallery-card img,
.gallery-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease, filter 420ms ease;
}

.gallery-card:hover img,
.gallery-card:hover .gallery-placeholder {
  transform: scale(1.06);
}

.gallery-card.has-photo img {
  filter: saturate(1.04) contrast(1.02);
}

.gallery-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(17, 19, 24, 0.02), rgba(17, 19, 24, 0.54)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.24), transparent 34%);
}

.gallery-placeholder {
  display: grid;
  place-items: center;
  color: rgba(56, 89, 64, 0.78);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 820;
}

.gallery-shine {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.34), transparent 42%);
  opacity: 0;
  transform: translateX(-38%);
  transition: opacity 220ms ease, transform 620ms ease;
}

.gallery-card:hover .gallery-shine {
  opacity: 1;
  transform: translateX(38%);
}

.gallery-caption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  color: #fff;
  text-shadow: 0 8px 24px rgba(17, 19, 24, 0.32);
}

.gallery-caption span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.76rem;
  font-weight: 780;
  text-transform: uppercase;
}

.gallery-caption strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1;
}

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

.music-times {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.transport-row {
  display: flex;
  width: fit-content;
  margin: 16px auto 0;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 16px 44px rgba(31, 42, 54, 0.1);
}

.audio-toggle {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(56, 89, 64, 0.14);
  border-radius: 50%;
  background: #111318;
  color: #fff;
  box-shadow: 0 16px 38px rgba(17, 19, 24, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.audio-toggle:hover {
  transform: scale(1.04);
  box-shadow: 0 20px 46px rgba(17, 19, 24, 0.26);
}

.audio-toggle::before {
  position: absolute;
  inset: -4px;
  content: "";
  border: 1px solid rgba(56, 89, 64, 0.14);
  border-radius: 50%;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid currentColor;
}

.custom-audio.is-playing .play-icon {
  width: 16px;
  height: 18px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65% 100%);
}

.transport-button {
  display: inline-grid;
  min-width: 86px;
  min-height: 44px;
  place-items: center;
  border-color: rgba(17, 19, 24, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(31, 42, 54, 0.08);
  font-size: 0.82rem;
  font-weight: 780;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.transport-button:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 89, 64, 0.2);
  box-shadow: 0 14px 34px rgba(31, 42, 54, 0.12);
}

.transport-button[data-audio-reset] {
  justify-self: auto;
}

.transport-button[data-audio-forward] {
  justify-self: auto;
}

@keyframes eqPulse {
  0%, 100% {
    height: 7px;
    opacity: 0.72;
  }
  50% {
    height: 17px;
    opacity: 1;
  }
}

.story-card,
.memory-card,
.compliment-card {
  min-height: 180px;
  padding: 18px;
}

.story-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.story-card strong {
  font-size: 2rem;
}

.memory-card {
  display: grid;
  gap: 10px;
}

.memory-form {
  display: grid;
  gap: 10px;
}

.memory-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.memory-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
}

.memory-item strong {
  overflow-wrap: anywhere;
}

.memory-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.compliment-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(236, 244, 239, 0.82));
}

.compliment-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.quiz-recap {
  display: grid;
  gap: 10px;
}

.recap-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.recap-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.recap-item strong {
  text-align: right;
}

.footer {
  padding: 34px clamp(18px, 5vw, 64px) 48px;
  color: var(--muted);
  text-align: center;
}

.is-hidden {
  display: none !important;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 101, 142, 0.34) rgba(255, 248, 252, 0.18);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(255, 248, 252, 0.24), rgba(255, 248, 252, 0.08)),
    rgba(255, 255, 255, 0.08);
}

::-webkit-scrollbar-thumb {
  border: 3px solid rgba(255, 248, 252, 0.42);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(215, 101, 142, 0.52)),
    rgba(215, 101, 142, 0.36);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.gate-copy,
.quiz-card,
.panel,
.story-card,
.birthday-letter,
.symphony-card,
.compliment-card,
.memory-card,
.stat,
.music-card,
.gallery-card,
.topbar {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 240, 247, 0.42)),
    rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    inset 0 -1px 0 rgba(215, 101, 142, 0.08),
    var(--shadow);
  backdrop-filter: blur(32px) saturate(1.36);
  -webkit-backdrop-filter: blur(32px) saturate(1.36);
}

.gate::before {
  background:
    linear-gradient(100deg, rgba(255, 247, 252, 0.72), rgba(255, 255, 255, 0.46) 46%, rgba(255, 228, 240, 0.18)),
    var(--hero-image) center / cover;
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(255, 249, 252, 0.92), rgba(255, 244, 250, 0.62), rgba(255, 246, 251, 0.12)),
    var(--hero-image) center / cover;
}

.gate h1 span,
.hero h1 span,
.gate-label,
.eyebrow {
  color: #9a365f;
}

.primary-button {
  background:
    linear-gradient(135deg, #21131a, #7c294c 48%, #cf6391),
    #21131a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 46px rgba(124, 41, 76, 0.26);
}

.secondary-button,
.chip-button,
.icon-button,
.choice,
.field input,
.field textarea,
.question,
.signal,
.date-pill,
.mood-note,
.transport-row {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 236, 246, 0.42)),
    rgba(255, 255, 255, 0.36);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px) saturate(1.22);
  -webkit-backdrop-filter: blur(18px) saturate(1.22);
}

.choice:hover,
.secondary-button:hover,
.chip-button:hover,
.icon-button:hover {
  border-color: rgba(215, 101, 142, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 16px 38px rgba(215, 101, 142, 0.14);
}

.choice.is-selected,
.segment.is-active {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 220, 236, 0.76));
  border-color: rgba(215, 101, 142, 0.62);
  color: #471b2f;
}

.progress-ring {
  background:
    conic-gradient(#d7658e var(--progress, 0deg), rgba(92, 48, 66, 0.1) 0deg),
    rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 12px 32px rgba(215, 101, 142, 0.2);
}

.photo-visual {
  display: block;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 26px 70px rgba(82, 40, 58, 0.2);
}

.photo-visual img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
}

.photo-visual-glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.32), transparent 46%, rgba(41, 16, 28, 0.34)),
    linear-gradient(0deg, rgba(215, 101, 142, 0.18), transparent 38%);
}

.cover-art {
  background: #1b1218;
}

.cover-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.cover-art > span {
  align-self: end;
  justify-self: start;
  margin: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(27, 18, 24, 0.44);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.track-kicker {
  border-color: rgba(215, 101, 142, 0.22);
  color: #9a365f !important;
}

.audio-toggle {
  background: linear-gradient(145deg, #1b1218, #a43a67);
  box-shadow: 0 16px 38px rgba(164, 58, 103, 0.28);
}

.waveform span {
  background:
    linear-gradient(90deg, #d7658e 0 var(--fill), rgba(92, 48, 66, 0.14) var(--fill) 100%);
}

.gallery-section {
  background:
    linear-gradient(180deg, rgba(255, 244, 250, 0.22), rgba(239, 246, 249, 0.38));
}

.gallery-card {
  border-color: rgba(255, 255, 255, 0.78);
}

.gallery-card:hover {
  box-shadow: 0 34px 100px rgba(82, 40, 58, 0.24);
}

@media (max-width: 940px) {
  .gate-panel,
  .birthday-grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gate-copy,
  .quiz-card {
    min-height: auto;
  }

  .gate-copy {
    padding-bottom: 34px;
  }

  .topbar {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .section-heading {
    display: block;
  }

  .story-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    min-height: 430px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .gallery-card,
  .gallery-card:hover {
    flex: 0 0 320px;
    min-height: 430px;
  }

  .symphony-card {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  .gate {
    padding: 12px;
  }

  .gate-copy,
  .quiz-card,
  .panel,
  .birthday-letter,
  .story-card,
  .compliment-card,
  .memory-card {
    border-radius: 8px;
  }

  .signal-row,
  .quick-stats,
  .choices,
  .segmented,
  .story-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 78px;
  }

  .hero h1,
  .gate h1 {
    font-size: clamp(2.7rem, 16vw, 4.8rem);
  }

  .quick-stats .stat {
    min-height: 92px;
  }

  .date-pill,
  .recap-item {
    grid-template-columns: 1fr;
  }

  .gallery-actions {
    justify-content: flex-start;
  }

  .gallery-grid {
    flex-direction: column;
    min-height: auto;
    overflow: visible;
  }

  .gallery-card,
  .gallery-card:hover {
    flex: 1 1 auto;
    min-height: 350px;
  }

  .music-card {
    padding: 18px;
  }

  .music-head {
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .cover-art {
    width: 82px;
    height: 82px;
    font-size: 0.95rem;
  }

  .audio-toggle {
    width: 50px;
    height: 50px;
  }

  .transport-row {
    width: 100%;
    justify-content: center;
    gap: 7px;
  }

  .transport-button {
    min-width: 72px;
  }

  .waveform {
    height: 54px;
    gap: 2px;
  }

  .recap-item strong {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
