:root {
  --bg-top: #171120;
  --bg-bottom: #09070f;
  --pink: #f5b7c9;
  --rose: #ff98b5;
  --cream: #fff4eb;
  --gold: #efcd8d;
  --lavender: #c8bcff;
  --text: #fff7f3;
  --muted: rgba(255, 247, 243, 0.72);
  --line: rgba(255, 255, 255, 0.14);
  --card: rgba(255, 250, 247, 0.1);
  --card-strong: rgba(255, 250, 247, 0.14);
  --shadow: 0 28px 80px rgba(5, 3, 11, 0.45);
  --radius-xl: 32px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --mobile-max: 430px;
  --safe-top: max(16px, env(safe-area-inset-top));
  --safe-right: max(16px, env(safe-area-inset-right));
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
  --safe-left: max(16px, env(safe-area-inset-left));
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  overscroll-behavior: none;
  overflow: hidden;
  scrollbar-width: none;
}

body {
  margin: 0;
  width: 100%;
  height: 100svh;
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  background:
    radial-gradient(circle at 20% 16%, rgba(245, 183, 201, 0.18), transparent 22%),
    radial-gradient(circle at 84% 12%, rgba(200, 188, 255, 0.16), transparent 18%),
    linear-gradient(180deg, var(--bg-top) 0%, #120d18 46%, var(--bg-bottom) 100%);
  overflow: hidden;
  touch-action: manipulation;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body.is-locked,
body.is-playing {
  height: 100svh;
  overflow: hidden;
}

body.is-video-focus::before {
  opacity: 1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: rgba(2, 2, 5, 0.52);
  transition: opacity 0.45s ease;
}

img,
video {
  display: block;
  width: 100%;
}

button {
  font: inherit;
}

.ambient,
.bokeh-layer,
#starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient {
  z-index: 0;
  filter: blur(88px);
  opacity: 0.6;
}

.ambient-left {
  background: radial-gradient(circle, rgba(255, 168, 190, 0.36), transparent 56%);
  transform: translate(-24%, -4%);
}

.ambient-right {
  background: radial-gradient(circle, rgba(239, 205, 141, 0.18), transparent 48%);
  transform: translate(28%, 22%);
}

.bokeh-layer {
  z-index: 1;
  overflow: hidden;
}

.bokeh {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  filter: blur(2px);
  animation: bokehFloat linear infinite;
}

#starfield {
  z-index: 0;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  gap: 1.2rem;
  padding: 2rem;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(255, 205, 216, 0.2), transparent 26%),
    linear-gradient(160deg, rgba(9, 7, 15, 0.98), rgba(15, 10, 22, 0.98));
  transition:
    opacity 0.7s ease,
    visibility 0.7s ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-core {
  position: relative;
  width: 120px;
  height: 120px;
}

.loading-ring,
.loading-heart {
  position: absolute;
  inset: 0;
}

.loading-ring {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 26px rgba(245, 183, 201, 0.2);
  animation: pulseRing 2.2s ease-in-out infinite;
}

.loading-ring.delay {
  animation-delay: -1.1s;
}

.loading-heart {
  inset: 34px;
  margin: auto;
  width: 52px;
  height: 52px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(245, 183, 201, 0.92));
  transform: rotate(45deg);
  border-radius: 10px;
  box-shadow: 0 0 28px rgba(255, 175, 201, 0.4);
}

.loading-heart::before,
.loading-heart::after {
  content: "";
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: inherit;
}

.loading-heart::before {
  left: -26px;
}

.loading-heart::after {
  top: -26px;
}

.loading-copy {
  max-width: 420px;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 247, 243, 0.68);
}

.loading-copy h1,
.cover-copy h1,
.cover-copy h2,
.section-head h2,
.closing-card h2 {
  font-family: "Cormorant Garamond", serif;
}

.loading-copy h1 {
  margin: 0.45rem 0 0.5rem;
  font-size: clamp(2.15rem, 9vw, 3.6rem);
  line-height: 0.95;
}

.loading-copy p:last-child {
  margin: 0;
  color: var(--muted);
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pink), var(--gold), var(--lavender));
  box-shadow: 0 0 20px rgba(245, 183, 201, 0.7);
  transition: opacity 0.35s ease;
}

.progress-bar.is-hidden {
  opacity: 0;
}

.music-toggle {
  position: fixed;
  right: var(--safe-right);
  bottom: calc(var(--safe-bottom) + 8px);
  z-index: 31;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.music-toggle.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.music-toggle__icon {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.app-shell {
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: hidden;
}

.screen {
  width: 100%;
  height: 100svh;
  padding:
    var(--safe-top)
    calc(var(--safe-right) + 6px)
    var(--safe-bottom)
    calc(var(--safe-left) + 6px);
  overflow: hidden;
}

.screen-inner {
  width: min(var(--mobile-max), 100%);
  margin: 0 auto;
}

.screen-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity, filter;
}

.screen-cover .screen-inner {
  display: grid;
  gap: 1.35rem;
}

.cover-photo {
  position: relative;
  width: 100%;
  height: min(45svh, 380px);
  min-height: 245px;
}

.cover-photo__glow {
  position: absolute;
  inset: -18px;
  border-radius: 40px;
  background:
    radial-gradient(circle at top, rgba(255, 209, 221, 0.24), transparent 48%),
    radial-gradient(circle at bottom, rgba(200, 188, 255, 0.2), transparent 44%);
  filter: blur(18px);
}

.cover-photo__frame,
.glass-card,
.memory-card,
.portrait-card,
.support-photo,
.gallery-item,
.video-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.cover-photo__frame {
  height: 100%;
  padding: 0.9rem;
}

.cover-photo__frame img {
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 10px);
}

.cover-photo__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 26%, rgba(8, 7, 12, 0.28) 100%),
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.12), transparent 18%);
  pointer-events: none;
}

.cover-copy {
  text-align: center;
}

.cover-copy h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(4rem, 18vw, 5.8rem);
  line-height: 0.78;
  text-transform: uppercase;
}

.cover-copy h1 span {
  display: block;
  color: var(--text);
}

.cover-copy h1 strong {
  display: block;
  color: var(--gold);
  font-weight: 600;
  text-shadow: 0 0 22px rgba(239, 205, 141, 0.24);
}

.cover-copy h2 {
  margin: 0.8rem 0 0;
  font-size: clamp(2.55rem, 10vw, 3.3rem);
  line-height: 0.96;
}

.lead,
.section-head p,
.closing-card p,
.loading-copy p:last-child {
  color: var(--muted);
}

.lead {
  margin: 0.45rem 0 0;
  font-size: 1rem;
}

blockquote {
  margin: 1rem auto 0;
  max-width: 21rem;
  color: var(--cream);
  line-height: 1.7;
  font-size: 1rem;
}

.cta-button {
  width: 100%;
  min-height: 56px;
  margin-top: 1.25rem;
  padding: 0.95rem 1.35rem;
  border: 0;
  border-radius: 999px;
  color: #24151f;
  background: linear-gradient(135deg, var(--cream), var(--pink), var(--gold));
  box-shadow:
    0 20px 34px rgba(245, 183, 201, 0.18),
    inset 0 -4px 10px rgba(255, 255, 255, 0.34);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    opacity 0.28s ease;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px) scale(1.01);
}

.cta-button--soft,
.cta-button--ghost {
  color: var(--cream);
}

.cta-button--soft {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.cta-button--ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.floating {
  animation: floating 5.5s ease-in-out infinite;
}

.cover-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -10%;
  width: 14px;
  height: 18px;
  border-radius: 70% 0 70% 0;
  background: linear-gradient(180deg, rgba(255, 230, 237, 0.92), rgba(255, 147, 180, 0.5));
  opacity: 0.64;
  animation: petalFall linear forwards;
}

.story-shell[hidden] {
  display: none;
}

.story-shell {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.story-section {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: calc(var(--safe-top) + 1.2rem);
  padding-bottom: calc(var(--safe-bottom) + 1.4rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 24px, 0) scale(1.02);
  filter: blur(14px);
  will-change: transform, opacity, filter;
}

.story-section.is-active,
.story-section.is-leaving {
  visibility: visible;
}

.story-section.is-active {
  pointer-events: auto;
}

.screen-inner--story {
  position: relative;
  display: grid;
  gap: clamp(0.8rem, 2.2svh, 1.25rem);
  max-height: calc(100svh - var(--safe-top) - var(--safe-bottom) - 1.4rem);
  overflow: hidden;
}

.story-section--wishes::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 244, 235, 0.08) 42%, transparent 68%),
    radial-gradient(circle at 50% 8%, rgba(239, 205, 141, 0.16), transparent 30%);
  opacity: 0;
  transform: translate3d(-8%, -4%, 0) scale(1.08);
  pointer-events: none;
}

.story-section--wishes.is-active::before {
  animation: wishSceneGlow 5.8s ease-in-out both;
}

.wish-aurora {
  position: absolute;
  inset: 6% -16% auto;
  height: 38svh;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 40%, rgba(245, 183, 201, 0.2), transparent 46%),
    radial-gradient(circle at 68% 28%, rgba(200, 188, 255, 0.18), transparent 44%),
    radial-gradient(circle at 50% 70%, rgba(239, 205, 141, 0.12), transparent 48%);
  filter: blur(26px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 18px, 0) scale(0.94);
}

.section-head {
  text-align: center;
}

.section-head h2,
.closing-card h2 {
  margin: 0.45rem 0 0.75rem;
  font-size: clamp(2.05rem, 9vw, 3.15rem);
  line-height: 0.96;
}

.section-head p {
  margin: 0 auto;
  max-width: 25rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.glass-card {
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06)),
    rgba(255, 250, 247, 0.04);
}

.message-card {
  position: relative;
  display: grid;
  gap: 1rem;
}

.message-card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 32%, rgba(255, 255, 255, 0.18) 45%, transparent 58% 100%);
  opacity: 0;
  transform: translateX(-80%);
  pointer-events: none;
}

.typed-greeting,
.typed-letter {
  margin: 0;
  min-height: 2.5rem;
  color: var(--cream);
}

.typed-greeting {
  font-size: clamp(1.3rem, 5vw, 1.65rem);
  line-height: 1.5;
}

.wish-list {
  display: grid;
  gap: 0.55rem;
}

.wish-list p,
.gratitude-card p {
  position: relative;
  margin: 0;
  padding: 0.78rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
  line-height: 1.45;
}

.story-section--wishes .wish-list p {
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.98);
  filter: blur(10px);
}

.story-section--wishes .wish-list p::before {
  content: "";
  position: absolute;
  left: 0.82rem;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(239, 205, 141, 0.7);
  opacity: 0.85;
  transform: translate3d(0, -50%, 0) scale(1);
}

.story-section--wishes .wish-list p {
  padding-left: 1.65rem;
}

.memory-swiper {
  padding-bottom: 2rem;
}

.memory-card {
  padding: 0.8rem 0.8rem 1.15rem;
}

.memory-card img,
.portrait-card img,
.support-photo img,
.gallery-item img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
}

.memory-card p {
  margin: 0.85rem 0 0;
  text-align: center;
  color: var(--cream);
}

.swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.35);
}

.swiper-pagination-bullet-active {
  background: var(--cream);
}

.thanks-layout,
.personal-layout,
.closing-actions {
  display: grid;
  gap: 1rem;
}

.gratitude-card {
  display: grid;
  gap: 0.75rem;
}

.portrait-card,
.support-photo {
  padding: 0.8rem;
}

.portrait-card img {
  max-height: 34svh;
}

.heart-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.heart-particles span {
  position: absolute;
  width: 16px;
  height: 16px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.94), rgba(255, 152, 181, 0.88));
  transform: rotate(45deg);
  border-radius: 4px;
  animation: drift 6s ease-in-out infinite;
}

.heart-particles span::before,
.heart-particles span::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: inherit;
}

.heart-particles span::before {
  left: -8px;
}

.heart-particles span::after {
  top: -8px;
}

.heart-particles span:nth-child(1) {
  top: 14%;
  left: 8%;
}

.heart-particles span:nth-child(2) {
  top: 22%;
  right: 10%;
  animation-delay: -2s;
}

.heart-particles span:nth-child(3) {
  right: 16%;
  bottom: 12%;
  animation-delay: -4s;
}

.story-section--galaxy {
  position: relative;
}

.story-section--galaxy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px),
    radial-gradient(circle at 76% 12%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px),
    radial-gradient(circle at 46% 52%, rgba(255, 255, 255, 0.32) 0 1px, transparent 1px),
    radial-gradient(circle at 65% 76%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px);
  background-size: 280px 280px;
  opacity: 0.52;
  pointer-events: none;
}

.letter-card {
  position: relative;
  min-height: 0;
  max-height: 62svh;
}

.letter-stars {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 26%, rgba(255, 255, 255, 0.18), transparent 16%),
    radial-gradient(circle at 78% 14%, rgba(200, 188, 255, 0.18), transparent 18%),
    radial-gradient(circle at 68% 76%, rgba(239, 205, 141, 0.14), transparent 20%);
  pointer-events: none;
}

.typed-letter {
  position: relative;
  z-index: 1;
  white-space: pre-line;
  font-size: clamp(0.78rem, 3.2vw, 0.95rem);
  line-height: 1.45;
}

.gallery-grid {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  will-change: transform;
}

.gallery-item {
  flex: 0 0 min(58vw, 230px);
  padding: 0.65rem;
  border: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-4px);
}

.gallery-item img {
  aspect-ratio: 4 / 5;
}

.gallery-item.tall img {
  aspect-ratio: 4 / 5;
}

.gallery-item.wide {
  flex-basis: min(72vw, 300px);
}

.gallery-item.wide img {
  aspect-ratio: 4 / 5;
}

.video-card {
  padding: 0.9rem;
}

.video-placeholder,
.special-video {
  border-radius: calc(var(--radius-lg) - 6px);
}

.video-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
  background:
    radial-gradient(circle at top, rgba(255, 219, 228, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(8, 8, 12, 0.18));
  overflow: hidden;
}

.video-placeholder__glow {
  position: absolute;
  inset: auto 12% -24%;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 183, 201, 0.28), transparent 70%);
  filter: blur(24px);
}

.video-placeholder__content {
  position: relative;
  z-index: 1;
  width: min(100%, 18rem);
  text-align: center;
}

.video-placeholder__content span {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
}

.video-placeholder__content h3 {
  margin: 0 0 0.6rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
}

.video-placeholder__content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.special-video {
  display: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.3);
}

.special-video.is-ready {
  display: block;
}

.video-card.has-video .video-placeholder {
  display: none;
}

.closing-card {
  text-align: center;
}

.closing-card p {
  margin: 0.35rem 0 0;
}

.closing-actions {
  margin-top: 1.35rem;
}

.hug-status {
  min-height: 1.5rem;
  margin-top: 0.95rem;
  color: var(--cream);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 4, 8, 0.9);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(92vw, 420px);
  max-height: 76svh;
  object-fit: contain;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: absolute;
  top: var(--safe-top);
  right: var(--safe-right);
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  will-change: transform, opacity;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}

.media-image.is-missing {
  opacity: 0.28;
}

.media-missing::after {
  content: attr(data-missing-label);
  position: absolute;
  inset: auto 1rem 1rem;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  color: var(--cream);
  background: rgba(8, 8, 12, 0.48);
  font-size: 0.82rem;
  backdrop-filter: blur(12px);
}

@keyframes floating {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes pulseRing {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes petalFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(var(--petal-drift), 120svh, 0) rotate(360deg);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: rotate(45deg) translate3d(0, 0, 0) scale(0.92);
  }
  50% {
    transform: rotate(45deg) translate3d(6px, -10px, 0) scale(1.05);
  }
}

@keyframes bokehFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0;
  }
  15%,
  85% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--move-x), var(--move-y), 0) scale(1.2);
    opacity: 0;
  }
}

@keyframes wishSceneGlow {
  0% {
    opacity: 0;
    transform: translate3d(-8%, -4%, 0) scale(1.08);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0.72;
    transform: translate3d(6%, 4%, 0) scale(1);
  }
}

@media (min-width: 768px) {
  .screen-inner--story {
    width: min(860px, 100%);
  }

  .thanks-layout,
  .personal-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .support-photo {
    display: block;
  }

  .closing-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .support-photo {
    display: none;
  }

  .memory-swiper {
    max-height: 36svh;
  }

  .memory-card img {
    max-height: 26svh;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 184px;
  }

  .gallery-item,
  .gallery-item img,
  .gallery-item.tall img,
  .gallery-item.wide img {
    height: 100%;
  }

  .gallery-item img,
  .gallery-item.tall img,
  .gallery-item.wide img {
    aspect-ratio: auto;
  }

  .gallery-item.tall {
    grid-row: span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
