:root {
  --bg: #fff7f5;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 252, 250, 0.9);
  --text: #412330;
  --muted: #745866;
  --accent: #d96087;
  --accent-soft: #f7c1d0;
  --gold: #f5d7a1;
  --border: rgba(171, 99, 128, 0.18);
  --shadow: 0 24px 80px rgba(126, 59, 86, 0.17);
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 207, 221, 0.9), transparent 30%),
    radial-gradient(circle at 80% 12%, rgba(255, 234, 197, 0.82), transparent 24%),
    linear-gradient(180deg, #fff6f4 0%, #fffaf1 52%, #fff8f8 100%);
}

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

button,
audio {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 28px;
  min-height: 88vh;
  padding: 36px min(6vw, 64px) 120px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
}

.hero::before {
  width: 320px;
  height: 320px;
  left: -90px;
  top: 40px;
  background: rgba(247, 193, 208, 0.55);
}

.hero::after {
  width: 260px;
  height: 260px;
  right: -40px;
  bottom: 60px;
  background: rgba(245, 215, 161, 0.42);
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.3)),
    url("./assets/photo-hike.png") center 22% / cover;
  opacity: 0.16;
  transform: scale(1.04);
}

.hero__content,
.hero__portrait {
  position: relative;
  z-index: 1;
}

.hero__content {
  max-width: 760px;
  padding: 40px 34px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero__portrait {
  justify-self: center;
  width: min(100%, 380px);
  padding: 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
  transform: rotate(4deg);
}

.hero__portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3rem, 7vw, 6rem);
}

h2 {
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  margin-bottom: 12px;
}

h3 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

p {
  line-height: 1.7;
}

.hero__lead,
.music-bar__text,
.photo-story__copy p,
.video-section__copy p,
.memory-card__text,
.modal p,
.music-status {
  margin: 0;
  color: var(--muted);
}

.hero__lead {
  max-width: 620px;
  margin-top: 20px;
  font-size: 1.06rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.secondary-button,
.music-toggle {
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), #f08baa);
  box-shadow: 0 14px 30px rgba(217, 96, 135, 0.35);
}

.secondary-button,
.music-toggle {
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(121, 80, 96, 0.1);
}

.primary-button:hover,
.secondary-button:hover,
.music-toggle:hover,
.memory-card:hover {
  transform: translateY(-3px);
}

.content {
  width: min(1140px, calc(100% - 32px));
  margin: -74px auto 0;
  padding-bottom: 80px;
  position: relative;
  z-index: 2;
}

.music-bar,
.photo-story,
.video-section {
  padding: 28px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.music-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: center;
}

.music-bar__controls {
  display: grid;
  gap: 12px;
}

.playlist {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.playlist__label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.playlist__items {
  display: grid;
  gap: 8px;
}

.playlist__item {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.playlist__item:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 96, 135, 0.32);
}

.playlist__item.is-active {
  background: linear-gradient(135deg, rgba(217, 96, 135, 0.14), rgba(245, 215, 161, 0.18));
  border-color: rgba(217, 96, 135, 0.36);
}

.audio-player {
  width: 100%;
}

.music-status {
  font-size: 0.94rem;
}

.love-notes {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.love-note {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.love-note--intro .love-note__text h2 {
  max-width: 820px;
}

.love-note__text p {
  margin: 0;
  color: var(--muted);
}

.love-note__media {
  display: grid;
  gap: 16px;
}

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

.photo-card {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.video-section {
  margin-top: 22px;
}

.video-carousel {
  margin-top: 20px;
}

.video-carousel__viewport {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pinch-zoom;
  -webkit-overflow-scrolling: touch;
  border-radius: 28px;
}

.video-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.video-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 22px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 10%, rgba(247, 193, 208, 0.3), transparent 30%),
    rgba(255, 255, 255, 0.68);
}

.video-frame {
  width: min(100%, 420px);
  overflow: hidden;
  border-radius: 24px;
  background: #201318;
  box-shadow: var(--shadow);
}

.video-frame video {
  width: 100%;
  max-height: 72vh;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #120b0d;
}

.video-slide__year {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.video-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.video-carousel__arrow,
.video-carousel__dot {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.video-carousel__arrow {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.25rem;
}

.video-carousel__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.video-carousel__dots {
  display: flex;
  gap: 8px;
}

.video-carousel__dot {
  padding: 10px 15px;
  border-radius: 999px;
}

.video-carousel__dot.is-active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #f08baa);
}

.video-carousel__arrow:not(:disabled):hover,
.video-carousel__dot:hover {
  transform: translateY(-2px);
}

.video-carousel__hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.dream-builder {
  margin: 22px 0;
  scroll-margin-top: 24px;
}

.dream-builder__card {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(32px, 7vw, 76px);
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 12%, rgba(247, 193, 208, 0.5), transparent 30%),
    radial-gradient(circle at 88% 88%, rgba(245, 215, 161, 0.38), transparent 28%),
    var(--surface-strong);
  box-shadow: var(--shadow);
}

.dream-builder__intro,
.dream-builder__steps {
  width: min(100%, 760px);
  text-align: center;
  overflow: hidden;
  transition: opacity 420ms ease, transform 420ms ease, max-height 520ms ease;
}

.dream-builder__intro {
  max-height: 520px;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dream-builder__text {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--muted);
}

.dream-builder__start {
  min-width: 190px;
  margin-top: 26px;
}

.dream-builder__steps {
  position: relative;
  max-height: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
}

.dream-builder__card.is-started .dream-builder__intro {
  max-height: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-18px) scale(0.98);
}

.dream-builder__card.is-started .dream-builder__steps {
  max-height: 1400px;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dream-step {
  transition: opacity 380ms ease, transform 380ms ease;
}

.dream-step[aria-hidden="true"],
.dream-step[aria-hidden="true"] * {
  pointer-events: none !important;
}

.dream-step--one {
  opacity: 1;
  transform: translateY(0);
}

.dream-step__progress-row {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
  text-align: left;
}

.dream-step__count {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.dream-step__progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(217, 96, 135, 0.12);
}

.dream-step__progress span {
  display: block;
  width: 14.29%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f08baa);
  box-shadow: 0 0 18px rgba(217, 96, 135, 0.35);
}

.dream-step__progress--two span {
  width: 28.57%;
}

.dream-step__progress--three span {
  width: 42.86%;
}

.dream-step__progress--four span {
  width: 57.14%;
}

.dream-step__progress--five span {
  width: 71.43%;
}

.dream-step__progress--six span {
  width: 85.71%;
}

.dream-step__progress--seven span {
  width: 100%;
}

.dream-step__header p {
  max-width: 620px;
  margin: 12px auto 0;
  color: var(--muted);
}

.dream-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.dream-option {
  position: relative;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.dream-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dream-option:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 96, 135, 0.42);
}

.dream-option:focus-within {
  outline: 3px solid rgba(217, 96, 135, 0.2);
  outline-offset: 2px;
}

.dream-option.is-selected {
  border-color: var(--accent);
  background: rgba(247, 193, 208, 0.2);
  box-shadow: 0 12px 26px rgba(217, 96, 135, 0.13);
}

.dream-option.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.dream-option.is-disabled:hover {
  transform: none;
  border-color: var(--border);
}

.dream-option__text {
  flex: 1;
  font-weight: 500;
  line-height: 1.45;
}

.dream-option__emoji {
  flex: 0 0 auto;
  font-size: 1.45rem;
  line-height: 1;
}

.dream-option--wide {
  grid-column: 1 / -1;
}

.dream-option__check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 180ms ease, transform 180ms ease;
}

.dream-option.is-selected .dream-option__check {
  opacity: 1;
  transform: scale(1);
}

.dream-step__details {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  text-align: left;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: max-height 360ms ease, margin 360ms ease, opacity 280ms ease, transform 360ms ease;
}

.dream-step__details.is-visible {
  max-height: 220px;
  margin-top: 22px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dream-step__details label {
  display: block;
  margin-bottom: 9px;
  font-weight: 700;
  color: var(--text);
}

.dream-step__details textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 18px;
  outline: none;
  font: inherit;
  line-height: 1.5;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.dream-step__details textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(217, 96, 135, 0.12);
}

.dream-step__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.dream-step__actions button {
  min-width: 180px;
}

.dream-step__continue:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.dream-step__continue:disabled:hover {
  transform: none;
}

.dream-activities__count {
  margin: 16px 0 0;
  text-align: center;
  font-weight: 700;
  color: var(--accent);
}

.dream-wish {
  margin-top: 28px;
  text-align: left;
}

.dream-wish__question {
  display: block;
  margin-bottom: 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.55rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

.dream-wish textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  outline: none;
  font: inherit;
  line-height: 1.55;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.dream-wish textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(217, 96, 135, 0.12);
}

.dream-wish__note {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
}

.dream-step--two,
.dream-step--three,
.dream-step--four,
.dream-step--five,
.dream-step--six,
.dream-step--seven,
.dream-step--complete,
.dream-step--confirmation {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px);
}

.dream-result {
  display: grid;
  justify-items: center;
  width: 100%;
  text-align: center;
}

.dream-result > .section-label {
  margin-bottom: 12px;
}

.dream-result h2 {
  margin: 0;
}

.dream-result__subtitle {
  max-width: 620px;
  margin: 12px auto 0;
  color: var(--muted);
}

.dream-result__card {
  width: min(100%, 760px);
  margin-top: 30px;
  padding: 28px 30px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 42px rgba(90, 51, 65, 0.1);
}

.dream-result__card h3 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text);
}

.dream-result__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(116, 74, 90, 0.12);
}

.dream-result__icon {
  font-size: 1.45rem;
  line-height: 1.35;
}

.dream-result__category {
  display: block;
  margin-bottom: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.dream-result__value {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}

.dream-result__closing {
  margin: 22px 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.dream-result__actions {
  margin-top: 24px;
}

.dream-result__actions[hidden],
.dream-result__submitted[hidden] {
  display: none;
}

.dream-result__submitted {
  width: min(100%, 620px);
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid rgba(217, 96, 135, 0.26);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(247, 193, 208, 0.24), rgba(245, 215, 161, 0.2));
  box-shadow: 0 14px 34px rgba(90, 51, 65, 0.09);
  color: var(--text);
}

.dream-result__submitted-check {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  border-radius: 50%;
  font-weight: 700;
  color: white;
  background: var(--accent);
}

.dream-result__submitted strong,
.dream-result__submitted time {
  display: block;
}

.dream-result__submitted time {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.dream-confirmation {
  position: relative;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 54px 38px;
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 22px 54px rgba(90, 51, 65, 0.12);
}

.dream-confirmation::before {
  content: "";
  position: absolute;
  inset: 10% 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 193, 208, 0.38), transparent 68%);
  animation: dreamConfirmationGlow 2400ms ease-out forwards;
  pointer-events: none;
}

.dream-confirmation > :not(.dream-celebration) {
  position: relative;
  z-index: 1;
}

.dream-confirmation h2 {
  margin: 0;
}

.dream-confirmation__lead {
  max-width: 600px;
  margin: 14px auto 0;
  line-height: 1.65;
  color: var(--muted);
}

.dream-certificate {
  width: min(100%, 600px);
  margin: 30px auto 0;
  padding: 30px 32px;
  border: 1px solid rgba(217, 96, 135, 0.24);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(247, 193, 208, 0.18));
  box-shadow: 0 16px 36px rgba(90, 51, 65, 0.1);
}

.dream-certificate__label {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.dream-certificate h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  line-height: 1.08;
  color: var(--text);
}

.dream-certificate > p:not(.dream-certificate__label) {
  margin: 18px 0 0;
  font-weight: 600;
  line-height: 1.75;
  color: var(--text);
}

.dream-certificate__date {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(116, 74, 90, 0.14);
  font-size: 0.9rem;
  color: var(--muted);
}

.dream-confirmation__note {
  margin: 24px auto;
  color: var(--muted);
}

.dream-celebration {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.dream-celebration__particle {
  position: absolute;
  top: -12%;
  left: var(--particle-x);
  font-size: var(--particle-size);
  opacity: 0;
  animation: dreamCelebrationFall var(--particle-duration) cubic-bezier(0.2, 0.7, 0.3, 1)
    var(--particle-delay) forwards;
}

@keyframes dreamCelebrationFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -20px, 0) rotate(0deg) scale(0.7);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--particle-drift), 720px, 0) rotate(var(--particle-spin)) scale(1.1);
  }
}

@keyframes dreamConfirmationGlow {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.dream-builder__steps.is-step-two .dream-step--one,
.dream-builder__steps.is-step-three .dream-step--one,
.dream-builder__steps.is-step-four .dream-step--one,
.dream-builder__steps.is-step-five .dream-step--one,
.dream-builder__steps.is-step-six .dream-step--one,
.dream-builder__steps.is-step-seven .dream-step--one,
.dream-builder__steps.is-complete .dream-step--one,
.dream-builder__steps.is-confirmation .dream-step--one {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-18px);
}

.dream-builder__steps.is-step-two .dream-step--two,
.dream-builder__steps.is-step-three .dream-step--three,
.dream-builder__steps.is-step-four .dream-step--four,
.dream-builder__steps.is-step-five .dream-step--five,
.dream-builder__steps.is-step-six .dream-step--six,
.dream-builder__steps.is-step-seven .dream-step--seven,
.dream-builder__steps.is-complete .dream-step--complete,
.dream-builder__steps.is-confirmation .dream-step--confirmation {
  position: relative;
  inset: auto;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.memory-card {
  text-align: left;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease;
}

.memory-card:hover {
  border-color: rgba(217, 96, 135, 0.35);
}

.memory-card__icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(217, 96, 135, 0.16), rgba(245, 215, 161, 0.22));
  font-size: 1.25rem;
}

.memory-card__title {
  display: block;
  margin-bottom: 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 22, 31, 0.52);
  backdrop-filter: blur(6px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 30px;
  border-radius: 28px;
  background: rgba(255, 250, 250, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 80px rgba(42, 17, 28, 0.22);
}

.modal__panel--gift {
  width: min(720px, 100%);
  background: white;
  border: 1px solid rgba(226, 209, 216, 0.7);
  box-shadow: var(--shadow);
}

.modal__panel--challenge {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 8% 8%, rgba(247, 193, 208, 0.32), transparent 32%),
    radial-gradient(circle at 92% 92%, rgba(245, 215, 161, 0.28), transparent 30%),
    #fffdfc;
  border: 1px solid rgba(226, 209, 216, 0.8);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 96, 135, 0.35) transparent;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f7e8ee;
  color: var(--text);
  cursor: pointer;
}

.challenge {
  color: var(--text);
}

.challenge__intro,
.challenge__result {
  padding: 18px 8px 8px;
  text-align: center;
}

.challenge__intro[aria-hidden="true"],
.challenge__quiz[aria-hidden="true"],
.challenge__result[aria-hidden="true"] {
  display: none;
}

.challenge__intro > p:not(.section-label),
.challenge__result-message {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
}

.challenge__topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
}

.challenge__topics span {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.7);
}

.challenge__start,
.challenge__restart {
  min-width: 210px;
  margin-top: 28px;
}

.challenge__quiz {
  padding: 10px 4px 4px;
}

.challenge__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-right: 46px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.challenge__score {
  color: var(--accent);
}

.challenge__progress {
  height: 9px;
  margin: 13px 0 24px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(217, 96, 135, 0.12);
}

.challenge__progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f08baa, #f1c36f);
  transition: width 320ms ease;
}

.challenge__subject {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.challenge__subject--math {
  color: #69500e;
  background: rgba(245, 215, 161, 0.42);
}

.challenge__subject--physics {
  color: #72405a;
  background: rgba(247, 193, 208, 0.42);
}

.challenge__subject--motherhood {
  color: #3e654a;
  background: rgba(190, 225, 199, 0.46);
}

.challenge__question {
  max-width: 690px;
  margin: 18px 0 22px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  line-height: 1.08;
}

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

.challenge__answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 76px;
  padding: 15px 16px;
  text-align: left;
  line-height: 1.42;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.challenge__answer:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(217, 96, 135, 0.48);
  box-shadow: 0 10px 22px rgba(126, 59, 86, 0.09);
}

.challenge__answer:focus-visible {
  outline: 3px solid rgba(217, 96, 135, 0.22);
  outline-offset: 2px;
}

.challenge__answer:disabled {
  cursor: default;
}

.challenge__answer.is-correct {
  border-color: rgba(67, 145, 92, 0.68);
  background: rgba(215, 241, 222, 0.72);
}

.challenge__answer.is-wrong {
  border-color: rgba(197, 78, 91, 0.55);
  background: rgba(250, 221, 225, 0.72);
}

.challenge__answer-letter {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(247, 193, 208, 0.3);
}

.challenge__answer.is-correct .challenge__answer-letter {
  color: white;
  background: #4c9a65;
}

.challenge__answer.is-wrong .challenge__answer-letter {
  color: white;
  background: #c54e5b;
}

.challenge__feedback {
  display: none;
  gap: 5px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.challenge__feedback.is-visible {
  display: grid;
}

.challenge__feedback.is-correct {
  color: #315d3d;
  background: rgba(215, 241, 222, 0.72);
}

.challenge__feedback.is-wrong {
  color: #743640;
  background: rgba(250, 221, 225, 0.72);
}

.challenge__next {
  display: block;
  min-width: 210px;
  margin: 20px 0 0 auto;
}

.challenge__next:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.challenge__result-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  border-radius: 26px;
  color: white;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--accent), #f1bf68);
  box-shadow: 0 16px 34px rgba(217, 96, 135, 0.25);
}

.challenge__result-score {
  margin: 14px 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.challenge__breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.challenge__breakdown-item {
  display: grid;
  gap: 6px;
  padding: 14px 10px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.68);
}

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

.challenge__breakdown-item strong {
  font-size: 1.2rem;
  color: var(--text);
}

.challenge__note {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
  color: var(--muted);
}

.challenge__note a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.gift-experience {
  text-align: center;
}

.gift-stage {
  display: grid;
  justify-items: center;
  gap: 22px;
  margin-top: 28px;
  position: relative;
}

.gift-gif {
  position: relative;
  width: 240px;
  height: 240px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 8;
}

.gift-gif__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 4.4rem;
  line-height: 1;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 244, 247, 0.96), rgba(255, 236, 242, 0.96));
  box-shadow: 0 16px 34px rgba(217, 96, 135, 0.12);
}

.gift-gif img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateX(-14.6%);
  transition: opacity 180ms ease;
}

.gift-gif.is-playing .gift-gif__placeholder {
  opacity: 0;
}

.gift-gif.is-playing img {
  opacity: 1;
}

.gift-gif--trigger:hover {
  transform: translateY(-2px);
}

.gift-reveal {
  min-height: 110px;
  display: grid;
  align-content: start;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 320ms ease, transform 320ms ease;
}

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

.gift-reveal.is-launching .gift-reveal__emoji-wrap {
  animation: giftLaunch 900ms cubic-bezier(0.18, 0.84, 0.22, 1);
}

.gift-reveal__emoji-wrap {
  display: grid;
  justify-items: center;
  min-height: 72px;
}

.gift-reveal__emoji {
  font-size: 4rem;
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(255, 194, 79, 0.3));
}

.gift-reveal__emoji:empty {
  display: none;
}

.gift-reveal__emoji-wrap:has(.gift-reveal__emoji:empty) {
  min-height: 0;
}

.gift-reveal__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text);
}

.gift-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.gift-next,
.gift-reset {
  min-width: 190px;
}

.gift-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.gift-sparkles span {
  position: absolute;
  width: 16px;
  height: 16px;
  background:
    radial-gradient(circle, rgba(255, 245, 179, 1) 0 35%, transparent 36%),
    linear-gradient(90deg, transparent 42%, rgba(255, 215, 92, 0.95) 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, rgba(255, 215, 92, 0.95) 42% 58%, transparent 58%);
  filter: drop-shadow(0 0 10px rgba(255, 208, 84, 0.45));
  transform-origin: center;
}

.gift-sparkles span:nth-child(1) { top: 10px; left: 20%; }
.gift-sparkles span:nth-child(2) { top: 40px; right: 18%; width: 20px; height: 20px; }
.gift-sparkles span:nth-child(3) { top: 98px; left: 12%; width: 14px; height: 14px; }
.gift-sparkles span:nth-child(4) { top: 90px; right: 11%; width: 14px; height: 14px; }
.gift-sparkles span:nth-child(5) { top: 188px; left: 26%; width: 18px; height: 18px; }
.gift-sparkles span:nth-child(6) { top: 174px; right: 23%; width: 18px; height: 18px; }

.gift-sparkles.is-visible {
  opacity: 1;
}

.gift-sparkles.is-visible span {
  animation: sparkleBurst 900ms ease-out;
}

@keyframes sparkleBurst {
  0% {
    opacity: 0;
    transform: scale(0.2) translate3d(0, 0, 0) rotate(0deg);
  }
  35% {
    opacity: 1;
    transform: scale(1.2) translate3d(0, -12px, 0) rotate(18deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.7) translate3d(var(--spark-x, 0), -44px, 0) rotate(36deg);
  }
}

.gift-sparkles span:nth-child(1) { --spark-x: -28px; }
.gift-sparkles span:nth-child(2) { --spark-x: 24px; }
.gift-sparkles span:nth-child(3) { --spark-x: -34px; }
.gift-sparkles span:nth-child(4) { --spark-x: 34px; }
.gift-sparkles span:nth-child(5) { --spark-x: -18px; }
.gift-sparkles span:nth-child(6) { --spark-x: 18px; }

@keyframes giftLaunch {
  0% {
    opacity: 0;
    transform: translateY(62px) scale(0.35);
  }
  35% {
    opacity: 1;
    transform: translateY(-34px) scale(1.18);
  }
  62% {
    opacity: 1;
    transform: translateY(-16px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .hero,
  .music-bar,
  .love-note {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-bottom: 96px;
  }

  .hero__portrait {
    width: min(100%, 420px);
    transform: none;
  }

  .love-note__media--pair {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 22px 16px 78px;
    gap: 20px;
  }

  .hero__content,
  .music-bar,
  .love-note,
  .video-section,
  .memory-card {
    padding: 22px;
    border-radius: 24px;
  }

  .content {
    width: min(100% - 20px, 1140px);
    margin-top: -42px;
  }

  .love-note__media--pair,
  .actions-grid {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .music-toggle {
    width: 100%;
  }

  .gift-gif {
    width: 204px;
    height: 204px;
  }

  .modal {
    padding: 10px;
  }

  .modal__panel--challenge {
    max-height: calc(100vh - 20px);
    padding: 22px 18px;
    border-radius: 24px;
  }

  .challenge__topline {
    padding-right: 40px;
  }

  .challenge__answers,
  .challenge__breakdown {
    grid-template-columns: 1fr;
  }

  .challenge__answer {
    min-height: 0;
  }

  .challenge__next,
  .challenge__start,
  .challenge__restart {
    width: 100%;
  }

  .dream-builder__card {
    min-height: 390px;
    padding: 32px 22px;
    border-radius: 24px;
  }

  .dream-options {
    grid-template-columns: 1fr;
  }

  .dream-step__actions {
    flex-direction: column-reverse;
  }

  .dream-step__actions button {
    width: 100%;
  }

  .dream-result__card {
    padding: 22px 20px;
    border-radius: 22px;
  }

  .dream-result__item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .dream-confirmation {
    padding: 38px 20px;
    border-radius: 24px;
  }

  .dream-certificate {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .video-slide {
    padding: 12px;
  }

  .video-carousel__controls {
    gap: 8px;
  }

  .video-carousel__dot {
    padding: 9px 11px;
  }
}
