@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Alex+Brush&family=Dancing+Script:wght@500;600;700&family=Cinzel:wght@400;500;600;700&family=Noto+Serif+SC:wght@400;500;600;700&display=swap');

:root {
  --bg: #edf2e8;
  --bg-deep: #dce6d5;
  --paper: #f8fbf5;
  --text-main: #243126;
  --text-soft: #526152;
  --accent: #507457;
  --accent-2: #7f9f7e;
  --line: rgba(88, 114, 89, 0.25);
  --shadow: 0 24px 60px rgba(29, 54, 34, 0.16);
  --glass-bg: linear-gradient(125deg, rgba(255, 255, 255, 0.34), rgba(225, 238, 224, 0.2));
  --font-script: 'Great Vibes', 'Alex Brush', 'Snell Roundhand', 'Zapfino', 'Segoe Script', 'Brush Script MT', cursive;
  --font-script-soft: 'Dancing Script', 'Alex Brush', 'Snell Roundhand', 'Segoe Script', 'Brush Script MT', cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Noto Serif SC', serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 16%, #f9fff4 0%, transparent 34%),
    radial-gradient(circle at 88% 10%, #e6f1df 0%, transparent 38%),
    linear-gradient(180deg, #f4f9ef 0%, var(--bg) 48%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image: radial-gradient(rgba(41, 69, 43, 0.22) 0.42px, transparent 0.42px);
  background-size: 3px 3px;
  z-index: 0;
}

body::before {
  content: '';
  position: fixed;
  inset: -20% -10% auto;
  height: 72vh;
  background: radial-gradient(circle at 40% 40%, rgba(188, 218, 177, 0.32), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 0;
}

.hero,
.section {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  padding: 22px 6vw 58px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(rgba(14, 25, 18, 0.28), rgba(11, 20, 14, 0.52)),
    url('./assets/images/hero-couple.jpg') center 32% / cover no-repeat;
  color: #f1f7ef;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44vh;
  background: linear-gradient(to top, rgba(10, 20, 12, 0.72) 0%, rgba(10, 20, 12, 0.44) 40%, rgba(10, 20, 12, 0) 100%);
  pointer-events: none;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-actions {
  display: flex;
  gap: 10px;
}

.brand {
  font-family: var(--font-script-soft);
  font-size: clamp(1.85rem, 5.2vw, 2.7rem);
  letter-spacing: 0.01em;
  text-shadow: 0 8px 26px rgba(18, 35, 21, 0.4);
  line-height: 1;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(231, 247, 225, 0.58);
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  background: rgba(235, 251, 229, 0.12);
  backdrop-filter: blur(8px);
  transition: transform 0.28s ease, background-color 0.28s ease, border-color 0.28s ease;
}

.nav-btn:hover {
  transform: translateY(-2px);
  background-color: rgba(236, 255, 228, 0.24);
  border-color: rgba(242, 255, 234, 0.9);
}

.invite-mode-btn {
  cursor: pointer;
  font-family: inherit;
}

.hero-content {
  max-width: 900px;
  transform: translateY(calc(var(--parallax-y, 0px) * -1));
  position: relative;
  z-index: 2;
}

.hero-tag {
  margin: 0;
  font-family: 'Dancing Script', cursive;
  letter-spacing: 0.06em;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  font-weight: 600;
  color: #e5f5df;
}

.hero h1 {
  margin: 12px 0 14px;
  font-family: var(--font-script);
  font-size: clamp(2.25rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 1.14;
  text-shadow: 0 10px 34px rgba(14, 32, 18, 0.46);
  position: relative;
  z-index: 1;
}

.hero h1::before {
  content: '';
  position: absolute;
  left: -22px;
  right: -22px;
  top: 52%;
  height: 78%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(221, 246, 213, 0.3) 0%, rgba(221, 246, 213, 0.12) 35%, rgba(221, 246, 213, 0) 72%);
  filter: blur(8px);
  z-index: -1;
}

.hero-caption-band {
  margin-top: 8px;
  padding: 16px 18px 14px;
  width: min(760px, 95vw);
  border-radius: 14px;
  border: 1px solid rgba(222, 242, 219, 0.26);
  background: linear-gradient(180deg, rgba(18, 35, 21, 0.22) 0%, rgba(13, 27, 16, 0.52) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-sub {
  margin: 0 0 14px;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #ddedd8;
}

.hero-note {
  margin: 12px 0 0;
  color: #d5e8cf;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.date-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(230, 244, 221, 0.36);
  border-radius: 18px;
  max-width: 760px;
  backdrop-filter: blur(16px) saturate(120%);
  background: linear-gradient(130deg, rgba(250, 255, 247, 0.26), rgba(228, 246, 220, 0.17));
  box-shadow: 0 16px 44px rgba(17, 35, 21, 0.26);
}

.date-card div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-card span {
  font-size: 0.84rem;
  color: #d9ecd2;
}

.date-card strong {
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.02em;
}

.scroll-tip {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(220, 245, 218, 0.45);
  background: linear-gradient(120deg, rgba(227, 247, 223, 0.22), rgba(213, 235, 210, 0.12));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #edf8eb;
  text-decoration: none;
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(14, 28, 17, 0.28);
  position: relative;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background-color 0.28s ease;
  animation: tipFloat 2.6s ease-in-out infinite;
  z-index: 2;
  overflow: hidden;
}

.scroll-tip::after {
  content: '↓';
  margin-left: 6px;
  font-size: 0.95rem;
  opacity: 0.92;
}

.scroll-tip::before {
  content: '';
  position: absolute;
  top: -70%;
  left: -30%;
  width: 42%;
  height: 240%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(246, 255, 244, 0.42), rgba(255, 255, 255, 0));
  transform: rotate(22deg);
  animation: tipShine 3.2s ease-in-out infinite;
}

.scroll-tip:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 38px rgba(14, 30, 18, 0.36);
  background: linear-gradient(120deg, rgba(236, 252, 233, 0.32), rgba(221, 242, 218, 0.18));
  animation: tipBounce 0.58s ease;
}

@keyframes tipFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes tipBounce {
  0% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-8px) scale(1.04);
  }
  58% {
    transform: translateY(-2px) scale(1.02);
  }
  100% {
    transform: translateY(-4px) scale(1.03);
  }
}

@keyframes tipShine {
  0% {
    left: -35%;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  65% {
    left: 115%;
    opacity: 0.85;
  }
  100% {
    left: 120%;
    opacity: 0;
  }
}

.section {
  padding: 92px 6vw;
}

.section-title p {
  margin: 0;
  font-family: 'Dancing Script', cursive;
  letter-spacing: 0.04em;
  font-size: clamp(1.35rem, 2.3vw, 1.8rem);
  color: var(--accent);
}

.section-title h2 {
  margin: 12px 0 0;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 400;
}

.story-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.glass-card {
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(125%);
  padding: 24px;
}

.glass-card h3 {
  margin: 0 0 10px;
  font-family: 'Cinzel', serif;
  font-size: 1.7rem;
}

.glass-card p {
  margin: 0;
  line-height: 1.82;
  color: var(--text-soft);
}

.gallery {
  background: linear-gradient(180deg, #eef6e9 0%, #dee8d8 100%);
}

.timeline {
  background: linear-gradient(180deg, #f0f6eb 0%, #e2ecd9 100%);
}

.timeline-track {
  margin-top: 30px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 6vw;
  padding: 18px 6px 8px;
  position: relative;
  perspective: 1200px;
}

.timeline-track::-webkit-scrollbar {
  height: 8px;
}

.timeline-track::-webkit-scrollbar-thumb {
  background: rgba(90, 118, 91, 0.38);
  border-radius: 999px;
}

.timeline-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 74px;
  height: 2px;
  background: linear-gradient(90deg, rgba(112, 142, 108, 0.2), rgba(112, 142, 108, 0.72), rgba(112, 142, 108, 0.2));
  pointer-events: none;
}

.timeline-track::after {
  content: '';
  position: sticky;
  right: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  box-shadow:
    -40vw 0 50px 44px rgba(237, 245, 232, 0.72),
    40vw 0 50px 44px rgba(237, 245, 232, 0.72);
}

.timeline-item {
  flex: 0 0 min(78vw, 430px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(88, 114, 89, 0.25);
  background: linear-gradient(140deg, rgba(251, 255, 249, 0.58), rgba(225, 238, 220, 0.34));
  box-shadow: var(--shadow);
  padding: 14px;
  scroll-snap-align: center;
  transform: translateY(28px) scale(0.76);
  opacity: 0.42;
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.36s ease,
    box-shadow 0.36s ease,
    filter 0.36s ease;
  position: relative;
  transform-style: preserve-3d;
  filter: saturate(0.86);
}

.timeline-spacer {
  flex: 0 0 0;
  height: 1px;
  pointer-events: none;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 70px;
  left: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f2faef;
  border: 2px solid #6a8b66;
  box-shadow: 0 0 0 4px rgba(106, 139, 102, 0.18);
}

.timeline-item.is-focus {
  transform: translateY(0) scale(1);
  opacity: 1;
  box-shadow: 0 30px 68px rgba(29, 56, 35, 0.28);
  filter: saturate(1.02);
  cursor: zoom-in;
}

.timeline-item time {
  font-family: 'Dancing Script', cursive;
  color: #587959;
  font-size: 1.15rem;
}

.timeline-item h3 {
  margin: 4px 0 6px;
  font-size: 1.2rem;
}

.timeline-item p {
  margin: 0 0 10px;
  line-height: 1.7;
  color: var(--text-soft);
}

.timeline-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-item.is-focus:hover img {
  transform: scale(1.1);
}

.gallery-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.photo-card {
  margin: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(88, 114, 89, 0.24);
  grid-column: span 2;
  min-height: 260px;
}

.photo-card.tall {
  grid-row: span 2;
  min-height: 540px;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s ease, filter 0.65s ease;
  filter: saturate(90%) contrast(96%);
}

.photo-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0f1a12;
}

.photo-card figcaption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  color: #e8f4e6;
  background: linear-gradient(180deg, rgba(13, 27, 16, 0.22), rgba(13, 27, 16, 0.66));
  backdrop-filter: blur(3px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card img,
.carousel-slide img,
.timeline-item img,
.timeline-item img {
  cursor: zoom-in;
}

.photo-card:hover img {
  transform: scale(1.05);
  filter: saturate(106%) contrast(102%);
}

.album {
  padding-top: 72px;
}

.glass-heavy {
  background: linear-gradient(140deg, rgba(248, 255, 246, 0.42), rgba(224, 238, 222, 0.16));
  border: 1px solid rgba(88, 114, 89, 0.3);
  backdrop-filter: blur(18px) saturate(128%);
  box-shadow: 0 26px 60px rgba(28, 52, 33, 0.2);
}

.carousel {
  margin-top: 32px;
  border-radius: 22px;
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.carousel-track-wrap {
  overflow: hidden;
  border-radius: 16px;
}

.carousel-track {
  display: flex;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-slide {
  min-width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #122217;
}

.carousel-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(88, 114, 89, 0.42);
  background: rgba(244, 255, 238, 0.65);
  color: #466348;
  cursor: pointer;
  font-size: 1.3rem;
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.carousel-btn:hover {
  transform: scale(1.05);
  background: rgba(250, 255, 247, 0.9);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(76, 106, 74, 0.34);
  cursor: pointer;
  padding: 0;
}

.carousel-dots button.active {
  width: 28px;
  border-radius: 999px;
  background: #5f875d;
}

.video-wrap {
  margin-top: 34px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(88, 114, 89, 0.3);
}

.video-wrap video {
  width: 100%;
  display: block;
  background: #1b2a1d;
}

.video-wrap iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  background: #0f1b12;
}

.video-play-gate {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(10, 20, 14, 0.2) 0%, rgba(10, 20, 14, 0.56) 100%),
    url('./assets/要导入的视频/我们俩.jpg') center / cover no-repeat;
  color: #eef8eb;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.video-play-gate::before {
  content: '▶';
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(231, 247, 225, 0.68);
  background: rgba(14, 28, 18, 0.46);
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  font-size: 1.05rem;
  line-height: 1;
}

.video-play-gate.is-hidden {
  display: none;
}

.video-external-link {
  margin: 12px 0 0;
  text-align: center;
}

.video-external-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(78, 109, 80, 0.34);
  background: rgba(242, 255, 236, 0.85);
  color: #355538;
  text-decoration: none;
}

.blessing {
  background: linear-gradient(180deg, #e9f2e2 0%, #d9e5d0 100%);
}

.blessing-wrap {
  margin-top: 30px;
  border-radius: 20px;
  padding: 18px;
}

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

.blessing-form input,
.blessing-form textarea {
  width: 100%;
  border: 1px solid rgba(91, 120, 90, 0.35);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: rgba(250, 255, 248, 0.72);
  color: var(--text-main);
}

.blessing-form textarea {
  min-height: 94px;
  resize: vertical;
}

.blessing-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blessing-quick button {
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(92, 121, 93, 0.3);
  background: rgba(244, 255, 239, 0.76);
  color: #3f5f44;
  padding: 0 12px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.blessing-quick button:hover {
  transform: translateY(-1px);
  background: rgba(248, 255, 245, 0.96);
}

.blessing-form button {
  justify-self: start;
  height: 40px;
  border: 1px solid rgba(78, 108, 80, 0.4);
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  color: #355438;
  background: rgba(236, 251, 229, 0.9);
}

.blessing-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.blessing-item {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(89, 117, 90, 0.26);
  background: rgba(250, 255, 248, 0.68);
}

.blessing-item p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.blessing-item footer {
  margin-top: 6px;
  font-size: 0.82rem;
  color: #678068;
}

.blessing-empty {
  text-align: center;
  padding: 16px 14px;
  background: linear-gradient(140deg, rgba(251, 255, 248, 0.85), rgba(236, 247, 230, 0.72));
}

.blessing-empty p {
  color: #4b644d;
}

.blessing-empty footer {
  color: #79907a;
}

.wedding-info {
  margin-top: 18px;
  border-radius: 20px;
  padding: 18px;
}

.wedding-info-kicker {
  margin: 0;
  font-size: 1rem;
  color: #567358;
  font-family: var(--font-script-soft);
}

.wedding-info h3 {
  margin: 8px 0 4px;
  font-size: clamp(1.28rem, 2.8vw, 1.86rem);
  font-weight: 500;
  color: #2f4932;
}

.wedding-info h3 strong {
  margin-left: 8px;
  color: #4f7453;
  font-weight: 700;
}

.wedding-info-date {
  margin: 0;
  color: #5d795f;
  font-size: 0.92rem;
}

.wedding-location {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(91, 119, 92, 0.24);
  background: rgba(249, 255, 247, 0.76);
}

.wedding-location h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #38553b;
}

.wedding-location p {
  margin: 4px 0;
  color: #527054;
  line-height: 1.6;
}

.wedding-location a {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(86, 112, 87, 0.34);
  color: #325235;
  text-decoration: none;
  background: rgba(238, 251, 234, 0.92);
}

.wedding-location a:hover {
  background: rgba(246, 255, 242, 1);
}

.wedding-map-preview {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(86, 112, 87, 0.28);
  box-shadow: 0 8px 20px rgba(36, 57, 39, 0.14);
  background: rgba(236, 247, 232, 0.84);
}

.wedding-map-canvas {
  width: 100%;
  height: min(42vw, 260px);
  min-height: 220px;
  border: 0;
  display: block;
}

.map-status {
  margin: 8px 0 0;
  color: #5a735c;
  font-size: 0.82rem;
}

.map-fallback-link {
  margin-top: 10px;
  font-size: 0.84rem;
}

.promise {
  padding-top: 110px;
  padding-bottom: 120px;
}

.game-2048 {
  background: linear-gradient(180deg, #e6f0e0 0%, #d6e5d1 100%);
  padding-top: 88px;
  padding-bottom: 120px;
}

.game-shell {
  margin-top: 28px;
  border-radius: 22px;
  padding: 18px;
}

.game-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.game-topbar p {
  margin: 0;
  color: #466349;
  font-size: 0.95rem;
}

.game-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-stats span {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(248, 255, 246, 0.76);
  border: 1px solid rgba(87, 114, 90, 0.24);
  color: #3f5a42;
  font-size: 0.88rem;
}

.game-stats strong {
  margin-left: 4px;
}

#gameReset,
#gameRetry {
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(81, 107, 83, 0.36);
  background: rgba(242, 255, 237, 0.9);
  color: #355538;
  padding: 0 14px;
  cursor: pointer;
}

.game-board-wrap {
  position: relative;
  margin-top: 14px;
  overscroll-behavior: contain;
}

.game-board {
  --cell-size: min(18vw, 95px);
  --gap: 8px;
  width: calc(var(--cell-size) * 4 + var(--gap) * 5);
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  background: rgba(20, 40, 24, 0.2);
  border: 1px solid rgba(230, 244, 223, 0.3);
  border-radius: 18px;
  padding: var(--gap);
  position: relative;
  overflow: hidden;
  contain: layout paint;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.game-cell {
  position: absolute;
  width: var(--cell-size);
  height: var(--cell-size);
  border-radius: 10px;
  background: rgba(246, 255, 241, 0.4);
  border: 1px solid rgba(231, 245, 224, 0.28);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.16s ease;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.game-cell.is-filled {
  box-shadow: 0 8px 18px rgba(10, 24, 14, 0.24);
}

.game-cell.is-filled::after {
  content: attr(data-value);
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 0.72rem;
  color: #f6fff4;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(10, 22, 12, 0.5);
}

.game-cell.is-new {
  animation: tilePop 0.2s ease;
}

.game-cell.is-updated {
  animation: tileMerge 0.18s ease;
}

.game-motion-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.game-motion-tile {
  position: absolute;
  width: var(--cell-size);
  height: var(--cell-size);
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 8px 18px rgba(10, 24, 14, 0.24);
  transition: left 0.145s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.145s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: left, top;
  transform: translateZ(0);
}

.game-motion-tile::after {
  content: attr(data-value);
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 0.72rem;
  color: #f6fff4;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(10, 22, 12, 0.5);
}

.game-motion-tile.is-merge {
  filter: saturate(1.05);
}

@keyframes tileMerge {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

.game-tile {
  position: absolute;
  width: var(--cell-size);
  height: var(--cell-size);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.16s ease, opacity 0.16s ease;
  box-shadow: 0 8px 18px rgba(10, 24, 14, 0.24);
}

.game-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-tile::after {
  content: attr(data-value);
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 0.72rem;
  color: #f6fff4;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(10, 22, 12, 0.5);
}

.game-tile.is-new {
  animation: tilePop 0.2s ease;
}

@keyframes tilePop {
  0% {
    transform: scale(0.78);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.game-over {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(370px, 92%);
  max-width: calc(100% - 20px);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(236, 249, 232, 0.38);
  background: rgba(18, 34, 21, 0.78);
  color: #e9f7e7;
  display: grid;
  justify-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transform: translate(-50%, calc(-50% + 8px));
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.game-over.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.game-over p {
  margin: 0;
}

.easter-quote {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(214, 239, 206, 0.34);
  background: linear-gradient(135deg, rgba(247, 255, 243, 0.5), rgba(220, 238, 214, 0.2));
  box-shadow: 0 10px 28px rgba(26, 49, 30, 0.14);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.easter-quote.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.easter-quote p {
  margin: 0;
  color: #3f5f44;
  line-height: 1.75;
}

.promise-card {
  margin: 0 auto;
  max-width: 950px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 12% 8%, rgba(246, 237, 219, 0.44), rgba(246, 237, 219, 0) 58%),
    radial-gradient(115% 130% at 88% 84%, rgba(206, 227, 204, 0.34), rgba(206, 227, 204, 0) 52%),
    linear-gradient(142deg, #556f5a 0%, #6d8f70 38%, #8fa88f 70%, #b9c6b4 100%),
    url('./assets/images/promise-bg.jpg') center/cover;
  color: #f1f7ef;
  text-align: center;
  padding: 86px 28px;
  box-shadow:
    0 24px 58px rgba(33, 51, 35, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.promise-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 28, 18, 0.18), rgba(11, 28, 18, 0.3)),
    repeating-linear-gradient(
      -24deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      rgba(255, 255, 255, 0) 1px,
      rgba(255, 255, 255, 0) 18px
    );
}

.promise-card > * {
  position: relative;
  z-index: 1;
}

.promise-card p {
  margin: 0;
  letter-spacing: 0.04em;
  font-family: var(--font-script-soft);
  font-size: 1.6rem;
}

.promise-card h2 {
  margin: 18px auto 24px;
  max-width: 760px;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  line-height: 1.45;
  font-weight: 400;
  font-family: var(--font-script);
}

.music-player {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 5;
  width: min(360px, calc(100vw - 22px));
  border-radius: 16px;
  padding: 12px 14px;
}

.music-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.music-kicker {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  color: #527053;
  font-family: var(--font-script-soft);
}

.music-meta h3 {
  margin: 0;
  font-size: 1rem;
  font-family: 'Cinzel', serif;
  color: #3e5a41;
}

.music-controls {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.music-controls button {
  border: 1px solid rgba(78, 109, 80, 0.34);
  background: rgba(242, 255, 236, 0.85);
  color: #355538;
  border-radius: 999px;
  height: 36px;
  padding: 0 14px;
  cursor: pointer;
}

.music-controls input[type='range'] {
  width: 100%;
  accent-color: #6d936e;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 15, 9, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-inner {
  width: min(1200px, 94vw);
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(220, 244, 214, 0.35);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.42);
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.34s ease;
}

.lightbox.is-open .lightbox-inner {
  transform: scale(1);
  opacity: 1;
}

#lightboxImage {
  width: 100%;
  height: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  background: #0e170f;
}

.fireworks-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle at center, rgba(98, 8, 20, 0.2), rgba(17, 2, 5, 0.82));
}

.fireworks-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.fireworks-overlay.is-hold {
  pointer-events: auto;
}

#fireworksCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.fireworks-quote {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(980px, 88vw);
  padding: 26px 28px;
  border-radius: 16px;
  border: 1px solid rgba(222, 242, 219, 0.34);
  background: linear-gradient(145deg, rgba(28, 52, 33, 0.7), rgba(18, 36, 23, 0.62));
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(230, 246, 226, 0.1);
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.7s ease;
  text-align: center;
  z-index: 2;
}

.fireworks-quote::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 22% 18%, rgba(214, 240, 206, 0.2), transparent 40%);
  pointer-events: none;
}

.fireworks-quote p {
  margin: 0;
  color: #ecf7e9;
  font-size: clamp(1.05rem, 2.25vw, 1.45rem);
  line-height: 1.95;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.fireworks-quote.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  filter: blur(0);
}

.fireworks-overlay.is-hold .fireworks-quote {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  filter: blur(0);
}

.invite-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: stretch;
  padding: 0;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(251, 240, 224, 0.3), rgba(251, 240, 224, 0) 48%),
    radial-gradient(110% 140% at 100% 100%, rgba(205, 227, 202, 0.26), rgba(205, 227, 202, 0) 56%),
    linear-gradient(160deg, #24392a 0%, #35513a 44%, #516b55 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.invite-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.invite-card {
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  border-radius: 0;
  padding: 48px min(8vw, 72px) calc(152px + env(safe-area-inset-bottom, 0px));
  border: none;
  background: linear-gradient(145deg, rgba(19, 37, 24, 0.86), rgba(22, 40, 27, 0.82));
  color: #edf8eb;
  box-shadow: none;
  position: relative;
}

.invite-petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.invite-petals .petal {
  position: absolute;
  width: 14px;
  height: 22px;
  border-radius: 70% 30% 65% 35% / 60% 40% 60% 40%;
  background: linear-gradient(165deg, rgba(255, 242, 236, 0.86), rgba(245, 210, 199, 0.8));
  box-shadow: 0 4px 10px rgba(28, 12, 11, 0.14);
  opacity: 0;
  transform: translate3d(0, -16vh, 0) rotate(0deg);
}

.invite-overlay.is-active .invite-petals .petal {
  animation: petalFall var(--dur, 8.5s) cubic-bezier(0.35, 0.03, 0.65, 0.97) 1 both;
  animation-delay: var(--delay, 0s);
}

.invite-petals .petal:nth-child(1) {
  left: 5%;
  --dur: 9.6s;
  --delay: 0.05s;
  --drift: 26px;
  --spin: 320deg;
}

.invite-petals .petal:nth-child(2) {
  left: 14%;
  width: 12px;
  height: 18px;
  --dur: 8.7s;
  --delay: 0.45s;
  --drift: -22px;
  --spin: 280deg;
}

.invite-petals .petal:nth-child(3) {
  left: 23%;
  --dur: 10.1s;
  --delay: 0.2s;
  --drift: 33px;
  --spin: 360deg;
}

.invite-petals .petal:nth-child(4) {
  left: 31%;
  width: 18px;
  height: 26px;
  --dur: 8.3s;
  --delay: 0.9s;
  --drift: -30px;
  --spin: 300deg;
}

.invite-petals .petal:nth-child(5) {
  left: 40%;
  --dur: 9.2s;
  --delay: 0.62s;
  --drift: 28px;
  --spin: 340deg;
}

.invite-petals .petal:nth-child(6) {
  left: 49%;
  width: 11px;
  height: 17px;
  --dur: 7.9s;
  --delay: 1.18s;
  --drift: -18px;
  --spin: 260deg;
}

.invite-petals .petal:nth-child(7) {
  left: 60%;
  width: 16px;
  height: 23px;
  --dur: 10.5s;
  --delay: 0.34s;
  --drift: 31px;
  --spin: 365deg;
}

.invite-carousel {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(219, 240, 214, 0.25);
}

.invite-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.invite-carousel-slide {
  flex: 0 0 100%;
  margin: 0;
}

.invite-carousel-slide img {
  width: 100%;
  height: min(44vh, 320px);
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.invite-carousel-dots {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.invite-carousel-dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(220, 239, 215, 0.36);
}

.invite-carousel-dots button.active {
  width: 24px;
  border-radius: 999px;
  background: rgba(235, 252, 229, 0.9);
}

@keyframes petalFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -16vh, 0) rotate(0deg) scale(0.88);
  }
  8% {
    opacity: 0.92;
  }
  34% {
    transform: translate3d(calc(var(--drift, 24px) * -0.45), 28vh, 0) rotate(calc(var(--spin, 320deg) * 0.34)) scale(1);
  }
  68% {
    transform: translate3d(var(--drift, 24px), 62vh, 0) rotate(calc(var(--spin, 320deg) * 0.72)) scale(0.95);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--drift, 24px) * -0.6), 104vh, 0) rotate(var(--spin, 320deg)) scale(0.82);
  }
}

.invite-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 1px solid rgba(223, 244, 218, 0.35);
  background: rgba(238, 253, 235, 0.12);
  color: #eff8ed;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}


.invite-hero {
  margin: 0 0 14px;
  min-height: clamp(200px, 34vh, 320px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(236, 248, 232, 0.45);
  box-shadow: 0 26px 56px rgba(9, 18, 12, 0.36), inset 0 0 0 1px rgba(247, 255, 243, 0.18);
  padding: clamp(22px, 4vw, 38px) clamp(18px, 4vw, 34px);
  display: grid;
  align-content: end;
  background:
    linear-gradient(180deg, rgba(8, 16, 11, 0.18) 0%, rgba(8, 16, 11, 0.62) 78%, rgba(8, 16, 11, 0.74) 100%),
    url('./assets/images/hero-couple.jpg') center 32% / cover no-repeat;
}

.invite-hero .invite-kicker {
  margin: 0;
  font-family: 'Palatino Linotype', 'Times New Roman', serif;
  font-size: 0.9rem;
  color: #e9f4e5;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: 0 6px 20px rgba(6, 16, 10, 0.4);
}

.invite-hero h2 {
  margin: 8px 0 6px;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  font-weight: 400;
  color: #f4fbf1;
  text-shadow: 0 10px 28px rgba(6, 16, 10, 0.42);
}

.invite-card > *:not(.invite-petals) {
  position: relative;
  z-index: 1;
}

.invite-hero,
.invite-info-grid,
.invite-section,
.invite-note,
.invite-share,
.invite-footer {
  opacity: 0;
  transform: translateY(14px);
}

.invite-overlay.is-active .invite-hero {
  animation: inviteRise 0.64s ease 0.08s forwards;
}

.invite-overlay.is-active .invite-info-grid {
  animation: inviteRise 0.64s ease 0.26s forwards;
}

.invite-overlay.is-active .invite-section:nth-of-type(1) {
  animation: inviteRise 0.64s ease 0.44s forwards;
}

.invite-overlay.is-active .invite-section:nth-of-type(2) {
  animation: inviteRise 0.64s ease 0.54s forwards;
}

.invite-overlay.is-active .invite-section:nth-of-type(3) {
  animation: inviteRise 0.64s ease 0.62s forwards;
}

.invite-overlay.is-active .invite-section:nth-of-type(4) {
  animation: inviteRise 0.64s ease 0.7s forwards;
}

.invite-overlay.is-active .invite-note {
  animation: inviteRise 0.64s ease 0.78s forwards;
}

.invite-overlay.is-active .invite-share {
  animation: inviteRise 0.64s ease 0.86s forwards;
}

.invite-overlay.is-active .invite-footer {
  animation: inviteRise 0.64s ease 0.94s forwards;
}

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

.invite-line {
  margin: 0;
  color: #e3f2de;
  text-shadow: 0 4px 16px rgba(6, 16, 10, 0.34);
}

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

.invite-info-grid p {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(226, 244, 220, 0.22);
  background: rgba(239, 252, 235, 0.08);
  display: grid;
  gap: 4px;
}

.invite-info-grid strong {
  font-size: 0.82rem;
  color: #d0e8cb;
  letter-spacing: 0.04em;
}

.invite-info-grid span {
  color: #eff8ed;
}

.invite-section {
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(225, 244, 219, 0.22);
  background: rgba(242, 255, 238, 0.08);
}

.invite-section h3 {
  margin: 0 0 10px;
  color: #e7f6e3;
  font-size: 1rem;
}

.invite-schedule {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.invite-schedule li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  color: #e8f6e5;
}

.invite-schedule time {
  color: #d1e9cd;
  font-size: 0.92rem;
}

.invite-map-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(219, 240, 214, 0.25);
}

.invite-map-canvas {
  width: 100%;
  min-height: 230px;
  height: min(45vh, 320px);
}

.invite-map-status {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #cfe6ca;
}

.invite-map-link {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 999px;
  padding: 0 14px;
  color: #eff8ed;
  text-decoration: none;
  border: 1px solid rgba(221, 242, 216, 0.3);
  background: rgba(243, 255, 240, 0.1);
}

.invite-note {
  margin-top: 14px;
  color: #daecd6;
  line-height: 1.74;
}

.invite-share {
  margin-top: 12px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(222, 242, 219, 0.35);
  background: rgba(240, 253, 237, 0.12);
  color: #edf8eb;
  padding: 0 14px;
  cursor: pointer;
}

.invite-music-player {
  z-index: 75;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.invite-footer {
  margin: 16px 0 0;
  font-family: 'Dancing Script', cursive;
  font-size: 1.3rem;
  color: #d3eacc;
}

body.invite-mode-active {
  overflow: hidden;
}

body.invite-mode-active > .grain,
body.invite-mode-active > header,
body.invite-mode-active > main,
body.invite-mode-active > .music-player,
body.invite-mode-active > .lightbox,
body.invite-mode-active > .fireworks-overlay {
  display: none !important;
}

[data-reveal] {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

[data-reveal='up'] {
  transform: translateY(42px);
}

[data-reveal='down'] {
  transform: translateY(-42px);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero {
    background-position: 58% 28%;
  }

  .hero-caption-band {
    padding: 14px 14px 12px;
    width: 100%;
  }

  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .scroll-tip {
    min-width: 120px;
    height: 40px;
    font-size: 0.88rem;
  }

  .nav-actions {
    flex-wrap: wrap;
  }

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

  .timeline-track {
    scroll-padding-left: 5.5vw;
  }

  .timeline-item {
    flex-basis: min(86vw, 360px);
  }

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

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

  .photo-card,
  .photo-card.tall {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 220px;
  }

  .section {
    padding: 72px 5.5vw;
  }

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

  .carousel-btn {
    display: none;
  }

  .promise-card {
    padding: 62px 20px;
  }

  .music-player {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
  }

  .game-stats {
    width: 100%;
    flex-wrap: wrap;
  }

  .game-topbar {
    align-items: flex-start;
    gap: 8px;
  }

  .game-topbar p {
    flex: 1 1 100%;
    font-size: 0.86rem;
    line-height: 1.58;
    white-space: normal;
  }

  .game-over p {
    font-size: 0.9rem;
    line-height: 1.62;
    word-break: break-word;
  }

  .game-board {
    --cell-size: min(20.5vw, 78px);
    --gap: 7px;
  }

  .invite-card {
    padding: 26px 14px calc(176px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: calc(176px + env(safe-area-inset-bottom, 0px));
  }

  .invite-music-player {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .invite-hero {
    min-height: clamp(168px, 29vh, 220px);
  }

  .invite-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
