:root {
  color-scheme: light;
  --bg-rose: #fff7f4;
  --bg-blush: #ffe8e1;
  --bg-cream: #fffdf9;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-strong: rgba(255, 252, 250, 0.84);
  --surface-border: rgba(183, 114, 126, 0.2);
  --text-primary: #47242f;
  --text-soft: #7d5965;
  --text-muted: #a37b85;
  --accent: #d96b85;
  --accent-deep: #bb496b;
  --accent-glow: rgba(217, 107, 133, 0.28);
  --gold: #d5a665;
  --shadow-lg: 0 30px 70px rgba(117, 73, 83, 0.18);
  --shadow-md: 0 18px 40px rgba(117, 73, 83, 0.12);
  --shadow-sm: 0 12px 25px rgba(130, 87, 96, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --content-width: min(1120px, calc(100vw - 3rem));
  --focus-ring: 0 0 0 3px rgba(255, 248, 243, 0.95), 0 0 0 6px rgba(217, 107, 133, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 32%),
    linear-gradient(145deg, var(--bg-cream) 0%, var(--bg-blush) 48%, var(--bg-rose) 100%);
}

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

button {
  font: inherit;
}

.page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: clip;
  padding: 3rem 0;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 50%;
  filter: blur(10px);
  z-index: -2;
}

.page-shell::before {
  top: 6%;
  left: 5%;
  width: 19rem;
  height: 19rem;
  background: radial-gradient(circle, rgba(255, 219, 221, 0.85), rgba(255, 219, 221, 0));
}

.page-shell::after {
  right: -6%;
  bottom: -8%;
  width: 26rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(249, 204, 176, 0.48), rgba(249, 204, 176, 0));
}

.background-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(6px);
}

.orb-one {
  top: 10%;
  right: 10%;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(255, 214, 224, 0.78), rgba(255, 214, 224, 0));
}

.orb-two {
  top: 44%;
  left: -3rem;
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle, rgba(244, 199, 168, 0.55), rgba(244, 199, 168, 0));
}

.orb-three {
  bottom: 12%;
  right: 18%;
  width: 11rem;
  height: 11rem;
  background: radial-gradient(circle, rgba(233, 161, 177, 0.36), rgba(233, 161, 177, 0));
}

.dashboard {
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.noscript-note {
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 248, 243, 0.92);
  border: 1px solid rgba(187, 73, 107, 0.16);
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  line-height: 1.6;
}

.hero,
.metric-card,
.gift-panel,
.surprise-content,
.promo-modal {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero {
  padding: 2.75rem clamp(1.4rem, 3vw, 3rem);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.hero::after,
.promo-modal::after,
.surprise-content::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 9rem;
  height: 9rem;
  background: radial-gradient(circle, rgba(255, 211, 220, 0.42), rgba(255, 211, 220, 0));
  pointer-events: none;
}

.eyebrow,
.metric-label,
.metric-note,
.modal-kicker,
.surprise-label {
  letter-spacing: 0.04em;
}

.eyebrow,
.modal-kicker {
  margin: 0 0 0.75rem;
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 6vw, 5.4rem);
}

h2 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
}

.hero-copy,
.modal-message,
.surprise-label {
  margin: 1rem 0 0;
  max-width: 38rem;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.7;
}

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

.metric-card {
  min-height: 17rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
}

.metric-card::before,
.gift-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.metric-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-value {
  margin: 1.15rem 0 0.6rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 5vw, 4.1rem);
  font-weight: 600;
  line-height: 1;
}

.metric-note {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.5;
}

.love-card {
  display: flex;
  flex-direction: column;
}

.love-meter {
  margin-top: 1.35rem;
  width: 100%;
  height: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 1px rgba(134, 87, 98, 0.1);
  overflow: hidden;
}

.love-meter-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f6b0bb 0%, #df728b 55%, #c84c70 100%);
  box-shadow: 0 0 18px rgba(217, 107, 133, 0.32);
  transition: width 700ms ease;
}

.love-heart {
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  margin: 1.3rem auto 0.8rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff8fa, #ffd4dd 55%, #f3a1b4 100%);
  color: #b9365f;
  font-size: 2rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 16px 28px var(--accent-glow);
  transform-origin: center;
  animation: heartbeat 2.8s ease-in-out infinite;
}

.gift-panel {
  padding: 1.8rem;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: center;
}

.activate-button,
.modal-close {
  appearance: none;
  border: 0;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    opacity 180ms ease;
}

.activate-button {
  min-height: 3.75rem;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e7899f 0%, #cf5f81 100%);
  color: #fffaf8;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 30px rgba(207, 95, 129, 0.28);
}

.activate-button {
  width: min(100%, 24rem);
}

.activate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 34px rgba(207, 95, 129, 0.32);
}

.activate-button:active,
.modal-close:active {
  transform: translateY(0);
}

.surprise-overlay,
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.surprise-overlay {
  background: rgba(82, 39, 50, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-backdrop {
  background: rgba(87, 48, 59, 0.42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.surprise-overlay.is-visible,
.modal-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.surprise-content,
.promo-modal {
  width: min(100%, 34rem);
  border-radius: 2rem;
  text-align: center;
}

.surprise-content {
  padding: 2.3rem 1.6rem;
}

.promo-modal {
  padding: 2.3rem 1.6rem 1.8rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(1rem) scale(0.985);
  transition: opacity 320ms ease, transform 420ms ease;
}

.modal-backdrop.is-visible .promo-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.birthday-slider {
  position: relative;
  margin-top: 1.65rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.slider-viewport {
  overflow: hidden;
  border-radius: 1.6rem;
  touch-action: pan-y;
}

.slider-track {
  display: flex;
  transition: transform 320ms ease;
  will-change: transform;
}

.slider-track.is-dragging {
  transition: none;
}

.memory-slide {
  flex: 0 0 100%;
  min-width: 0;
  text-align: left;
}

.memory-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.6rem;
  background: linear-gradient(180deg, rgba(255, 252, 250, 0.94), rgba(255, 245, 241, 0.82));
  border: 1px solid rgba(217, 107, 133, 0.12);
  box-shadow: var(--shadow-sm);
  transform: rotate(-1.2deg);
  transition: transform 360ms ease, box-shadow 360ms ease, opacity 280ms ease;
}

.memory-slide:nth-child(even) .memory-card {
  transform: rotate(1deg);
}

.memory-slide.is-active .memory-card {
  box-shadow: var(--shadow-md);
}

.memory-photo-frame {
  position: relative;
  overflow: hidden;
  min-height: 17rem;
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at top left, rgba(255, 226, 232, 0.95), rgba(255, 226, 232, 0) 40%),
    linear-gradient(145deg, rgba(255, 247, 244, 0.95), rgba(255, 233, 227, 0.88));
}

.memory-photo {
  width: 100%;
  height: 100%;
  min-height: 17rem;
  object-fit: cover;
  filter: saturate(1.03) contrast(1.02);
  transform: scale(1.085);
  transition: transform 520ms ease, filter 520ms ease;
}

.memory-photo-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1rem 0.95rem;
  background: linear-gradient(180deg, rgba(55, 31, 38, 0), rgba(55, 31, 38, 0.76));
  color: #fff9f6;
  transform: translateY(0.7rem);
  opacity: 0.92;
  transition: transform 420ms ease, opacity 420ms ease;
}

.memory-photo-kicker {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.memory-photo-caption {
  margin: 0.3rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  line-height: 0.95;
}

.memory-slide-celebration .memory-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 241, 183, 0.3), transparent 18%),
    radial-gradient(circle at 80% 22%, rgba(255, 212, 226, 0.28), transparent 16%),
    radial-gradient(circle at 52% 8%, rgba(255, 255, 255, 0.18), transparent 12%);
  pointer-events: none;
}

.memory-slide-celebration .memory-photo-caption {
  color: #fff7ea;
  text-shadow: 0 4px 18px rgba(55, 31, 38, 0.34);
}

.memory-celebration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.memory-celebration span {
  position: absolute;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 221, 145, 0.52));
  box-shadow: 0 0 16px rgba(255, 230, 168, 0.7);
  opacity: 0.55;
  animation: celebrationFloat 3.4s ease-in-out infinite;
}

.memory-celebration span:nth-child(1) { top: 18%; left: 16%; animation-delay: 0s; }
.memory-celebration span:nth-child(2) { top: 24%; right: 18%; animation-delay: 0.4s; }
.memory-celebration span:nth-child(3) { top: 52%; left: 22%; animation-delay: 0.8s; }
.memory-celebration span:nth-child(4) { top: 58%; right: 20%; animation-delay: 1.2s; }
.memory-celebration span:nth-child(5) { bottom: 18%; left: 42%; animation-delay: 1.6s; }
.memory-celebration span:nth-child(6) { top: 14%; left: 48%; animation-delay: 2s; }

.memory-photo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  color: var(--text-soft);
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(255, 241, 244, 0.92), rgba(255, 241, 244, 0) 36%),
    linear-gradient(145deg, rgba(255, 250, 247, 0.96), rgba(255, 238, 232, 0.94));
}

.memory-photo.is-missing + .memory-photo-fallback {
  display: flex;
}

.fallback-polaroid {
  width: min(100%, 16rem);
  padding: 0.8rem 0.8rem 1rem;
  border-radius: 0.45rem;
  background: #fffdfa;
  box-shadow:
    0 14px 30px rgba(87, 48, 59, 0.14),
    0 0 0 1px rgba(133, 90, 99, 0.06);
  transform: rotate(-3deg);
}

.fallback-polaroid-photo {
  display: grid;
  place-items: center;
  min-height: 8.8rem;
  border-radius: 0.15rem;
  background:
    linear-gradient(135deg, rgba(255, 226, 232, 0.95), rgba(255, 243, 236, 0.98)),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.18) 0,
      rgba(255, 255, 255, 0.18) 10px,
      rgba(255, 255, 255, 0.05) 10px,
      rgba(255, 255, 255, 0.05) 20px
    );
  color: var(--accent-deep);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  letter-spacing: 0.03em;
}

.fallback-polaroid-note {
  padding-top: 0.75rem;
  text-align: left;
}

.fallback-polaroid-year {
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fallback-polaroid-text {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.memory-slide-celebration .fallback-polaroid {
  transform: rotate(2deg);
}

.memory-slide.is-active .memory-photo {
  transform: scale(1);
  filter: saturate(1.08) contrast(1.03);
}

.memory-slide.is-active .memory-photo-overlay {
  transform: translateY(0);
  opacity: 1;
}

.memory-meta {
  display: grid;
  gap: 0.45rem;
}

.memory-date {
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.memory-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 0.96;
}

.memory-note {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.slider-nav {
  width: 2.85rem;
  height: 2.85rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.slider-nav:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.slider-dot {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(217, 107, 133, 0.22);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.slider-dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

.sparkles {
  position: relative;
  min-height: 4rem;
  margin-bottom: 0.8rem;
}

.sparkles span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 213, 141, 0.55));
  box-shadow: 0 0 14px rgba(255, 232, 169, 0.72);
  animation: sparkle 2.4s ease-in-out infinite;
}

.sparkles span:nth-child(1) {
  transform: translate(-5.5rem, -0.8rem);
  animation-delay: 0s;
}

.sparkles span:nth-child(2) {
  transform: translate(-2rem, -1.6rem);
  animation-delay: 0.45s;
}

.sparkles span:nth-child(3) {
  transform: translate(0.1rem, -0.25rem);
  animation-delay: 0.9s;
}

.sparkles span:nth-child(4) {
  transform: translate(2.7rem, -1.45rem);
  animation-delay: 1.35s;
}

.sparkles span:nth-child(5) {
  transform: translate(5rem, -0.45rem);
  animation-delay: 1.8s;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

:where(button, [href], input, select, textarea):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }

  12% {
    transform: scale(1.06);
  }

  24% {
    transform: scale(0.98);
  }

  36% {
    transform: scale(1.08);
  }

  48% {
    transform: scale(1);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.35;
    transform: translate(var(--sparkle-x, 0), var(--sparkle-y, 0)) scale(0.75);
  }

  50% {
    opacity: 1;
    transform: translate(var(--sparkle-x, 0), calc(var(--sparkle-y, 0) - 0.35rem)) scale(1.2);
  }
}

@keyframes celebrationFloat {
  0%,
  100% {
    transform: translateY(0) scale(0.8);
    opacity: 0.45;
  }

  50% {
    transform: translateY(-0.4rem) scale(1.18);
    opacity: 1;
  }
}

.sparkles span:nth-child(1) {
  --sparkle-x: -5.5rem;
  --sparkle-y: -0.8rem;
}

.sparkles span:nth-child(2) {
  --sparkle-x: -2rem;
  --sparkle-y: -1.6rem;
}

.sparkles span:nth-child(3) {
  --sparkle-x: 0.1rem;
  --sparkle-y: -0.25rem;
}

.sparkles span:nth-child(4) {
  --sparkle-x: 2.7rem;
  --sparkle-y: -1.45rem;
}

.sparkles span:nth-child(5) {
  --sparkle-x: 5rem;
  --sparkle-y: -0.45rem;
}

@media (max-width: 960px) {
  :root {
    --content-width: min(920px, calc(100vw - 2rem));
  }

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

  .love-card {
    grid-column: span 2;
  }

  .hero {
    padding: 2.4rem 1.5rem;
  }
}

@media (max-width: 640px) {
  :root {
    --content-width: min(100vw - 1rem, 40rem);
  }

  .page-shell {
    padding: 1rem 0 1.5rem;
  }

  .dashboard,
  .metrics {
    gap: 1rem;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .love-card {
    grid-column: auto;
  }

  .hero,
  .metric-card,
  .gift-panel,
  .surprise-content,
  .promo-modal {
    border-radius: 1.5rem;
  }

  .hero,
  .metric-card,
  .gift-panel,
  .surprise-content,
  .promo-modal {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .metric-card {
    min-height: auto;
    padding-top: 1.3rem;
    padding-bottom: 1.3rem;
  }

  .gift-panel {
    padding-top: 1.15rem;
    padding-bottom: 1.15rem;
  }

  .activate-button {
    width: 100%;
    min-height: 3.95rem;
  }

  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
  }

  .birthday-slider {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .slider-nav {
    width: 100%;
    height: 3rem;
    border-radius: var(--radius-sm);
  }

  .slider-nav-prev {
    order: 2;
  }

  .slider-viewport {
    order: 1;
  }

  .slider-nav-next {
    order: 3;
  }

  .memory-card {
    padding: 0.9rem;
    transform: rotate(0deg);
  }

  .memory-photo-frame,
  .memory-photo {
    min-height: 13.5rem;
  }

  .memory-title {
    font-size: 1.6rem;
  }

  .memory-photo-caption {
    font-size: 1.5rem;
  }

  .fallback-polaroid {
    width: min(100%, 14rem);
  }

  .fallback-polaroid-photo {
    min-height: 7.6rem;
    font-size: 1.55rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .love-heart,
  .sparkles span,
  .memory-celebration span {
    animation: none !important;
  }
}
