:root {
  --bg: #1a1523;
  --bg-card: #252030;
  --text: #f4f0fa;
  --muted: #a89bc4;
  --accent: #e8a0bf;
  --accent-2: #9b8cdb;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.35);
  --paper: #fff9f5;
  --paper-ink: #2d2640;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Source Sans 3", system-ui, sans-serif;
  /* Keep gradient inside viewport width to avoid horizontal scroll */
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 90% 55% at 50% -15%, #3d2f55 0%, transparent 55%);
  background-repeat: no-repeat;
  background-size: 100% 420px;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

code {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.9em;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.site-header {
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
  padding: 1rem max(1rem, env(safe-area-inset-left)) 1rem max(1rem, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.site-logo {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.site-logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 0.65rem 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  justify-content: flex-end;
  min-width: 0;
  flex: 1;
}

.site-main {
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem max(1rem, env(safe-area-inset-left)) 3rem max(1rem, env(safe-area-inset-right));
  box-sizing: border-box;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem max(1rem, 1.1rem);
  box-shadow: 0 12px 40px var(--shadow);
  max-width: 100%;
  box-sizing: border-box;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.lede {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

/* ——— Login ——— */
.login-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.login-form input[type="password"],
.login-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.login-form input:focus {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 0.65rem;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-2), #7b6bb8);
  color: #fff;
  margin-top: 1rem;
  width: 100%;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.login-error {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: #f87171;
  min-height: 1.25em;
}

.login-hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ——— Letter ——— */
body.page-letter {
  background-color: #141f30;
  background-image: radial-gradient(
      ellipse 95% 45% at 50% 105%,
      rgba(120, 70, 95, 0.28) 0%,
      transparent 52%
    ),
    radial-gradient(
      ellipse 110% 55% at 50% -10%,
      rgba(140, 185, 235, 0.55) 0%,
      transparent 55%
    ),
    radial-gradient(ellipse 50% 42% at 94% 86%, rgba(210, 160, 180, 0.22) 0%, transparent 52%),
    radial-gradient(ellipse 48% 38% at 4% 48%, rgba(85, 130, 195, 0.28) 0%, transparent 55%),
    radial-gradient(circle 520px at 50% 40%, rgba(45, 65, 100, 0.4) 0%, transparent 70%),
    linear-gradient(168deg, #243652 0%, #1a2838 32%, #131f2e 68%, #0e1622 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 480px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-position: center, top center, center, center, center, center;
}

body.page-letter .site-main,
body.page-letter .site-header,
body.page-letter .site-footer {
  max-width: 75vw;
}

body.page-letter .site-header {
  border-bottom-color: rgba(180, 200, 230, 0.12);
}

body.page-letter .site-logo:hover {
  color: #b8cfe8;
}

body.page-letter .site-nav a {
  color: #c5d4e8;
}
body.page-letter .site-nav a:hover {
  color: #e8c4d4;
}

body.page-letter .site-footer {
  color: rgba(180, 200, 220, 0.55);
}

/* Letter on narrow screens: full width with visible blue side margins */
@media (max-width: 36rem) {
  body.page-letter .site-main,
  body.page-letter .site-header,
  body.page-letter .site-footer {
    max-width: 100%;
  }

  /* ~3.5vw each side ≈ noticeable blue strip; safe-area wins when larger (notch) */
  body.page-letter .site-header {
    padding-top: max(0.65rem, env(safe-area-inset-top));
    padding-right: max(7vw, env(safe-area-inset-right));
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    padding-left: max(7vw, env(safe-area-inset-left));
  }

  body.page-letter .site-main {
    padding-top: max(1vw, env(safe-area-inset-top));
    padding-right: max(7vw, env(safe-area-inset-right));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    padding-left: max(7vw, env(safe-area-inset-left));
  }

  body.page-letter .site-footer {
    padding-top: 0.5rem;
    padding-right: max(7vw, env(safe-area-inset-right));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    padding-left: max(7vw, env(safe-area-inset-left));
    max-width: 100%;
    margin: 0;
  }

  body.page-letter .letter-sheet {
    padding: 1.35rem max(0.85rem, 2vw) 1.5rem;
    padding-left: max(1.65rem, 10vw);
  }
}

.letter-sheet {
  background: linear-gradient(180deg, #fffcfa 0%, #faf6f2 100%);
  color: var(--paper-ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1;
  border-radius: 0.25rem;
  padding: 1.75rem max(1rem, 1.25rem) 2rem;
  box-shadow: 0 3px 0 #d8e2ec, 0 14px 40px rgba(8, 14, 28, 0.5), 0 0 0 1px rgba(100, 140, 180, 0.08);
  border: 1px solid #e2e8f0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

body.page-letter .letter-sheet {
  font-family: "Caveat", "Segoe Script", "Brush Script MT", cursive;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.5;
  color: #0d5c9e;
  background-color: #fafafa;
  background-image: linear-gradient(
      165deg,
      rgba(255, 244, 238, 0.14) 0%,
      rgba(255, 232, 224, 0.08) 45%,
      rgba(236, 210, 200, 0.12) 100%
    ),
    radial-gradient(ellipse 120% 70% at 50% -5%, rgba(255, 210, 200, 0.1) 0%, transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.82) 100%),
    url("../images/letter-hearts-pattern.svg"),
    url("../images/letter-rose-pattern.svg");
  background-size: auto, auto, 100% 100%, 200px 200px, 200px 200px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat;
  background-position: center, center, center, top left, top left;
  border-radius: 0.5rem;
  border-color: rgba(25, 120, 210, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65), 0 0 44px rgba(30, 140, 235, 0.2),
    0 16px 48px rgba(6, 10, 20, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding-left: max(1.65rem, 5vw);
}

body.page-letter .letter-sheet h1,
body.page-letter .memory-section-title {
  color: #043d78;
  font-family: "Caveat", "Segoe Script", "Brush Script MT", cursive;
  letter-spacing: 0;
}

body.page-letter .letter-sheet .letter-greeting,
body.page-letter .letter-sheet .letter-body,
body.page-letter .letter-sheet .letter-sign,
body.page-letter .letter-sheet .memory-section-text {
  color: #0d5c9e;
}

body.page-letter .memory-frame {
  background: #e8f2fb;
  box-shadow: inset 0 0 0 1px rgba(20, 110, 200, 0.18);
}

body.page-letter .memory-placeholder {
  background: #e8f2fb;
  color: #2a7ec4;
  font-family: "Caveat", "Segoe Script", "Brush Script MT", cursive;
}

body.page-letter .memory-cap {
  color: #0a6ab8;
  font-family: "Caveat", "Segoe Script", "Brush Script MT", cursive;
}

.letter-sheet h1 {
  color: var(--paper-ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(1.65rem, 4.2vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.letter-greeting {
  font-weight: 700;
  margin-bottom: 1rem;
}

.letter-body p {
  margin: 0 0 1rem;
}

.letter-sign {
  margin-top: 1.75rem;
}
.letter-sign p {
  margin: 0.25rem 0 0;
  font-weight: 600;
}

.memory-section {
  margin-top: 2rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.letter-memories-root {
  margin-top: 2rem;
  min-width: 0;
}

.memory-section:first-child {
  margin-top: 0;
}

.memory-section-title {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--paper-ink);
  margin: 0;
}

.memory-section-text {
  margin-bottom: 0;
}

.memory-section-text p {
  margin: 0 0 0.65rem;
}

.memory-section-text p:last-child {
  margin-bottom: 0;
}

.memory-section .memories {
  margin-top: 0;
  margin-bottom: 0;
}

.memories {
  margin-top: 2rem;
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

@media (min-width: 520px) {
  .memories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .memory:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: min(50%, 100%);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

.memory {
  margin: 0;
}

.memory-frame {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #ede6de;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  min-height: 9rem;
}

.memory-frame img,
.memory-frame video {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  /* Cap both dimensions so tall/wide photos don’t dominate the page; scales down proportionally */
  max-height: min(54vh, 28rem);
}

.memory-frame video {
  background: #0a0a0a;
}

.memory--loaded .memory-placeholder {
  opacity: 0;
  pointer-events: none;
}

.memory-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #8a8077;
  background: #ede6de;
  transition: opacity 0.2s ease;
}

.memory--missing .memory-frame img,
.memory--missing .memory-frame video {
  display: none;
}

.memory--missing .memory-placeholder {
  opacity: 1;
  z-index: 1;
}

.memory-cap {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b6280;
}

.letter-actions {
  margin-top: 2rem;
  text-align: center;
}

.letter-sheet .btn-secondary {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.95rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.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;
}

/* ——— Game full screen (game.html) ——— */
body.page-game {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.page-game .site-header {
  max-width: none;
  width: 100%;
  flex-shrink: 0;
}

body.page-game .site-nav--game {
  flex-direction: column;
  align-items: flex-end;
  align-content: flex-end;
  gap: 0.45rem;
}

body.page-game .game-full {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

body.page-game .game-stage {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 0;
  border: none;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

body.page-game .game-playfield {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem max(1rem, env(safe-area-inset-left)) 1.5rem max(1rem, env(safe-area-inset-right));
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
}

body.page-game .game-full-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  width: 100%;
  max-width: min(90vw, 26rem);
  margin: 0 auto 0.5rem;
  box-sizing: border-box;
  overflow: visible;
}

body.page-game .game-unlocked-gift-banner-flyers {
  position: absolute;
  left: -0.35rem;
  right: -0.35rem;
  top: -0.25rem;
  bottom: -0.25rem;
  min-height: 3.25rem;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

body.page-game .game-full-head--with-gift .game-unlocked-gift-banner-flyers {
  opacity: 1;
}

body.page-game .game-full-head:not(.game-full-head--with-gift) .game-unlocked-gift-banner-flyers-bit {
  animation: none;
}

body.page-game .game-unlocked-gift-banner-flyers-bit {
  position: absolute;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  opacity: 0.9;
  box-shadow: 0 0 6px currentColor;
  animation: het-gift-fly-color 3.2s ease-in-out infinite;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(1) {
  left: 3%;
  top: 12%;
  color: #f472b6;
  background: #f472b6;
  animation-delay: 0s;
  animation-duration: 2.85s;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(2) {
  left: 94%;
  top: 18%;
  color: #a78bfa;
  background: #a78bfa;
  animation-delay: -0.4s;
  animation-duration: 3.35s;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(3) {
  left: 12%;
  top: 82%;
  color: #34d399;
  background: #34d399;
  animation-delay: -0.75s;
  animation-duration: 3.05s;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(4) {
  left: 88%;
  top: 76%;
  color: #fbbf24;
  background: #fbbf24;
  animation-delay: -1.05s;
  animation-duration: 2.95s;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(5) {
  left: 48%;
  top: 4%;
  color: #22d3ee;
  background: #22d3ee;
  animation-delay: -0.25s;
  animation-duration: 3.55s;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(6) {
  left: 1%;
  top: 46%;
  color: #fb7185;
  background: #fb7185;
  animation-delay: -1.25s;
  animation-duration: 3.05s;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(7) {
  left: 97%;
  top: 52%;
  color: #fde047;
  background: #fde047;
  animation-delay: -0.6s;
  animation-duration: 3.2s;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(8) {
  left: 38%;
  top: 90%;
  color: #c084fc;
  background: #c084fc;
  animation-delay: -1.55s;
  animation-duration: 2.8s;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(9) {
  left: 72%;
  top: 8%;
  color: #2dd4bf;
  background: #2dd4bf;
  animation-delay: -0.9s;
  animation-duration: 3.45s;
}

body.page-game .game-unlocked-gift-banner-flyers-bit:nth-child(10) {
  left: 22%;
  top: 36%;
  width: 0.28rem;
  height: 0.5rem;
  border-radius: 2px;
  color: #f9a8d4;
  background: #f9a8d4;
  animation-delay: -1.15s;
  animation-duration: 3.1s;
}

body.page-game .game-full-head--with-gift {
  justify-content: space-between;
  text-align: left;
}

body.page-game .game-full-title {
  position: relative;
  z-index: 1;
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
  text-align: inherit;
}

@media (max-width: 22rem) {
  body.page-game .game-full-head--with-gift {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  body.page-game .game-full-head--with-gift .game-full-title {
    text-align: center;
  }
}

body.page-game .game-full-lede {
  margin: 0;
  max-width: 22rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

body.page-game .game-for-you-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  width: 100%;
  max-width: 12rem;
}

body.page-game .game-for-you-wrap[hidden] {
  display: none !important;
}

body.page-game .game-for-you-arrow {
  display: flex;
  align-items: center;
  color: #fde68a;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.55));
  animation: game-for-you-arrow-nudge 1.15s ease-in-out infinite alternate;
}

body.page-game .game-for-you-arrow-icon {
  display: block;
}

@keyframes game-for-you-arrow-nudge {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(5px);
  }
}

body.page-game .game-for-you-btn {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.82rem;
  padding: 0.4rem 0.65rem;
}

body.page-game .game-love-gift-nav-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
  padding: 0.35rem 0.25rem 0.15rem;
  margin: -0.35rem -0.25rem -0.15rem;
}

body.page-game .game-love-gift-nav-wrap[hidden] {
  display: none !important;
}

body.page-game .game-love-gift-nav-flyers {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7.5rem;
  height: 5.5rem;
  margin: -2.75rem 0 0 -3.75rem;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

body.page-game .game-love-gift-nav-flyers-bit {
  position: absolute;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  opacity: 0.9;
  box-shadow: 0 0 6px currentColor;
  animation: het-gift-fly-color 3.2s ease-in-out infinite;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(1) {
  left: 8%;
  top: 18%;
  color: #f472b6;
  background: #f472b6;
  animation-delay: 0s;
  animation-duration: 2.8s;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(2) {
  left: 92%;
  top: 22%;
  color: #a78bfa;
  background: #a78bfa;
  animation-delay: -0.35s;
  animation-duration: 3.4s;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(3) {
  left: 18%;
  top: 78%;
  color: #34d399;
  background: #34d399;
  animation-delay: -0.7s;
  animation-duration: 3.1s;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(4) {
  left: 85%;
  top: 72%;
  color: #fbbf24;
  background: #fbbf24;
  animation-delay: -1s;
  animation-duration: 2.9s;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(5) {
  left: 50%;
  top: 6%;
  color: #22d3ee;
  background: #22d3ee;
  animation-delay: -0.2s;
  animation-duration: 3.6s;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(6) {
  left: 4%;
  top: 48%;
  color: #fb7185;
  background: #fb7185;
  animation-delay: -1.2s;
  animation-duration: 3s;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(7) {
  left: 96%;
  top: 50%;
  color: #fde047;
  background: #fde047;
  animation-delay: -0.55s;
  animation-duration: 3.25s;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(8) {
  left: 42%;
  top: 92%;
  color: #c084fc;
  background: #c084fc;
  animation-delay: -1.5s;
  animation-duration: 2.75s;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(9) {
  left: 68%;
  top: 12%;
  color: #2dd4bf;
  background: #2dd4bf;
  animation-delay: -0.85s;
  animation-duration: 3.5s;
}

body.page-game .game-love-gift-nav-flyers-bit:nth-child(10) {
  left: 28%;
  top: 38%;
  width: 0.28rem;
  height: 0.5rem;
  border-radius: 2px;
  color: #f9a8d4;
  background: #f9a8d4;
  animation-delay: -1.1s;
  animation-duration: 3.15s;
}

@keyframes het-gift-fly-color {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.65;
  }
  25% {
    transform: translate(10px, -14px) rotate(25deg) scale(1.15);
    opacity: 1;
  }
  50% {
    transform: translate(-8px, -6px) rotate(-18deg) scale(0.92);
    opacity: 0.85;
  }
  75% {
    transform: translate(-12px, 10px) rotate(20deg) scale(1.08);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-game .game-love-gift-nav-flyers-bit,
  body.page-game .game-unlocked-gift-banner-flyers-bit,
  .fx-love-code-reveal-flyers-bit {
    animation: none;
    opacity: 0.55;
  }
}

body.page-game .game-love-gift-nav-btn {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.4rem 0.55rem 0.3rem;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 0.65rem;
  background: rgba(212, 86, 140, 0.12);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  max-width: 100%;
  overflow: visible;
  animation: game-love-gift-nav-glow 2.6s ease-in-out infinite;
}

body.page-game .game-love-gift-nav-btn:hover {
  background: rgba(212, 86, 140, 0.2);
  border-color: rgba(251, 191, 36, 0.55);
}

body.page-game .game-love-gift-nav-sparkles {
  position: absolute;
  inset: -4px;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 20%, rgba(253, 224, 71, 0.85) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 18%, rgba(251, 191, 36, 0.75) 0 2px, transparent 3px),
    radial-gradient(circle at 22% 88%, rgba(244, 114, 182, 0.65) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 82%, rgba(253, 224, 71, 0.55) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.5) 0 1.5px, transparent 2.5px);
  animation: game-love-gift-nav-sparkle 2.2s ease-in-out infinite;
  z-index: 0;
}

@keyframes game-love-gift-nav-sparkle {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes game-love-gift-nav-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.12);
  }
  50% {
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.28), 0 0 20px rgba(244, 114, 182, 0.12);
  }
}

body.page-game .game-love-gift-nav-box {
  position: relative;
  z-index: 1;
  width: 2.35rem;
  height: 1.85rem;
  flex-shrink: 0;
}

body.page-game .game-love-gift-nav-base {
  position: absolute;
  left: 0.12rem;
  right: 0.12rem;
  bottom: 0;
  height: 0.95rem;
  background: linear-gradient(155deg, #d4568c 0%, #8b2252 100%);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

body.page-game .game-love-gift-nav-lid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.78rem;
  height: 0.72rem;
  background: linear-gradient(180deg, #f5a0c4 0%, #d4568c 100%);
  border-radius: 6px 6px 2px 2px;
}

body.page-game .game-love-gift-nav-ribbon {
  position: absolute;
  left: 50%;
  bottom: 0.08rem;
  width: 0.22rem;
  height: 1.45rem;
  margin-left: -0.11rem;
  background: rgba(107, 26, 64, 0.5);
  border-radius: 1px;
  z-index: 1;
}

body.page-game .game-love-gift-nav-label {
  position: relative;
  z-index: 1;
  line-height: 1.2;
  color: #fde68a;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}

/* Shining CTA — game + miss-you modal */
.het-to-you-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: het-to-you-glow 2.5s ease-in-out infinite;
}

.het-to-you-label {
  position: relative;
  z-index: 1;
}

.het-to-you-btn::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -60%;
  width: 45%;
  height: 120%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.38) 50%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 100%
  );
  transform: skewX(-18deg);
  animation: het-to-you-shimmer 3.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes het-to-you-shimmer {
  0% {
    left: -60%;
  }
  40%,
  100% {
    left: 140%;
  }
}

@keyframes het-to-you-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.12), 0 0 0 0 rgba(244, 114, 182, 0.08);
  }
  50% {
    box-shadow: 0 0 16px 2px rgba(251, 191, 36, 0.42), 0 0 28px rgba(244, 114, 182, 0.22);
  }
}

body.page-game .game-result {
  margin-top: 1.25rem;
  max-width: min(90vw, 26rem);
  width: 100%;
}

body.page-game .game-dock {
  flex-shrink: 0;
  width: 100%;
  padding: 1rem max(1rem, env(safe-area-inset-left)) max(1.25rem, calc(env(safe-area-inset-bottom) + 0.5rem))
    max(1rem, env(safe-area-inset-right));
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.38) 100%);
  border-top: 1px solid var(--border);
}

body.page-game .game-form--dock {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: min(92vw, 28rem);
  max-width: 100%;
  margin: 0;
}

body.page-game .game-form--dock input[type="text"] {
  flex: 1 1 12rem;
  min-width: 0;
  width: auto;
}

body.page-game .game-form--dock .btn--game-dock {
  margin-top: 0;
  flex-shrink: 0;
  min-width: 6.5rem;
  width: auto;
}

/* Top-left quick phrase shortcuts (config: gameQuickPhrases), below the header */
body.page-game .game-quick-phrases {
  position: fixed;
  z-index: 55;
  top: calc(env(safe-area-inset-top) + 3.5rem);
  left: max(0.65rem, env(safe-area-inset-left));
  max-width: min(calc(100vw - 1.25rem), 19rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  pointer-events: none;
}

body.page-game .game-quick-phrases[hidden] {
  display: none !important;
}

body.page-game .game-quick-phrases-tabs {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(8, 10, 22, 0.92);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

body.page-game .game-quick-phrases-tabs[hidden] {
  display: none !important;
}

body.page-game .game-quick-phrases-tab {
  margin: 0;
  padding: 0.38rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease;
}

body.page-game .game-quick-phrases-tab:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.35);
}

body.page-game .game-quick-phrases-tab:active {
  transform: scale(0.98);
}

body.page-game .game-quick-phrases-bar {
  pointer-events: auto;
}

body.page-game .game-quick-phrases-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 0.2rem 0;
}

body.page-game .game-quick-phrases-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.page-game .game-quick-phrases-track {
  position: relative;
  display: inline-block;
  width: 2.65rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s ease;
}

body.page-game .game-quick-phrases-track::after {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: -0.55rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

body.page-game .game-quick-phrases-switch-input:checked + .game-quick-phrases-track {
  background: rgba(167, 139, 250, 0.45);
  border-color: rgba(167, 139, 250, 0.55);
}

body.page-game .game-quick-phrases-switch-input:checked + .game-quick-phrases-track::after {
  transform: translateX(1.05rem);
}

body.page-game .game-quick-phrases-toggle:focus-within .game-quick-phrases-track {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

body.page-game .anim-pulse {
  animation: game-pulse-wide 0.9s ease-out 2;
}

@keyframes game-pulse-wide {
  0%,
  100% {
    transform: scale(1);
    box-shadow: inset 0 0 0 0 rgba(155, 140, 219, 0.15);
  }
  50% {
    transform: scale(1.008);
    box-shadow: inset 0 0 80px 0 rgba(155, 140, 219, 0.12);
  }
}

body.page-game .anim-hearts::after {
  bottom: 42%;
  font-size: clamp(1.35rem, 4.5vw, 2rem);
}

/* ——— Game ——— */
.game-stage {
  position: relative;
  min-height: 12rem;
  border-radius: 1rem;
  border: 1px dashed var(--border);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 1.25rem max(0.75rem, 1rem);
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.game-form .field {
  margin-bottom: 0.75rem;
}

.game-form label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.game-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
}
.game-form input:focus {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.game-form .btn {
  margin-top: 0.5rem;
  width: auto;
  min-width: 8rem;
}

.game-result {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0.65rem;
  font-size: 1rem;
  line-height: 1.45;
}

.game-result[hidden] {
  display: none !important;
}

.game-result--ok {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}

.game-result--no {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

/* Animations */
@keyframes game-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(155, 140, 219, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 12px rgba(155, 140, 219, 0);
  }
}

.anim-pulse {
  animation: game-pulse 0.9s ease-out 2;
}

@keyframes heart-float {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-120px) scale(1.2);
  }
}

.anim-hearts::after {
  content: "♥ ♥ ♥ ♥ ♥";
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.5rem;
  pointer-events: none;
  animation: heart-float 2s ease-out forwards;
  text-shadow: 0 0 20px rgba(232, 160, 191, 0.6);
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10%) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100%) rotate(720deg);
    opacity: 0.6;
  }
}

.anim-confetti {
  background-image: radial-gradient(circle, #f472b6 2px, transparent 2px),
    radial-gradient(circle, #a78bfa 2px, transparent 2px), radial-gradient(circle, #fbbf24 2px, transparent 2px),
    radial-gradient(circle, #34d399 2px, transparent 2px);
  background-size: 24px 24px, 32px 32px, 28px 28px, 20px 20px;
  background-position: 0 0, 12px 8px, 24px 16px, 8px 24px;
  animation: confetti-fall 2.5s ease-in-out forwards;
}

/* ——— Game custom FX (hand slap, balloons) ——— */
.game-fx-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
}

.game-fx-overlay:not([hidden]) {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.game-fx-code-overlay {
  /* Above #game-fx-overlay (300) so the code dialog fully covers the wide love modal and its Close control */
  z-index: 5000;
}

.game-fx-code-reveal-modal {
  width: min(100%, 22rem);
  max-height: min(88dvh, 88vh);
  margin: 0.75rem 0 1rem;
  padding: 2.5rem 1.35rem 1.35rem;
  display: block;
  overflow: visible;
}

.game-fx-code-inner {
  text-align: center;
}

.fx-love-code-reveal-wrap {
  position: relative;
  display: block;
  overflow: visible;
}

.fx-love-code-reveal-flyers {
  position: absolute;
  left: -0.75rem;
  right: -0.75rem;
  top: -0.65rem;
  bottom: -0.65rem;
  min-height: 9rem;
  pointer-events: none;
  z-index: 0;
}

.fx-love-code-reveal-flyers-bit {
  position: absolute;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  opacity: 0.9;
  box-shadow: 0 0 6px currentColor;
  animation: het-gift-fly-color 3.2s ease-in-out infinite;
}

.fx-love-code-reveal-flyers-bit:nth-child(1) {
  left: 6%;
  top: 14%;
  color: #f472b6;
  background: #f472b6;
  animation-delay: 0s;
  animation-duration: 2.8s;
}

.fx-love-code-reveal-flyers-bit:nth-child(2) {
  left: 91%;
  top: 20%;
  color: #a78bfa;
  background: #a78bfa;
  animation-delay: -0.35s;
  animation-duration: 3.4s;
}

.fx-love-code-reveal-flyers-bit:nth-child(3) {
  left: 16%;
  top: 80%;
  color: #34d399;
  background: #34d399;
  animation-delay: -0.7s;
  animation-duration: 3.1s;
}

.fx-love-code-reveal-flyers-bit:nth-child(4) {
  left: 86%;
  top: 74%;
  color: #fbbf24;
  background: #fbbf24;
  animation-delay: -1s;
  animation-duration: 2.9s;
}

.fx-love-code-reveal-flyers-bit:nth-child(5) {
  left: 50%;
  top: 5%;
  color: #22d3ee;
  background: #22d3ee;
  animation-delay: -0.2s;
  animation-duration: 3.6s;
}

.fx-love-code-reveal-flyers-bit:nth-child(6) {
  left: 2%;
  top: 48%;
  color: #fb7185;
  background: #fb7185;
  animation-delay: -1.2s;
  animation-duration: 3s;
}

.fx-love-code-reveal-flyers-bit:nth-child(7) {
  left: 95%;
  top: 50%;
  color: #fde047;
  background: #fde047;
  animation-delay: -0.55s;
  animation-duration: 3.25s;
}

.fx-love-code-reveal-flyers-bit:nth-child(8) {
  left: 40%;
  top: 92%;
  color: #c084fc;
  background: #c084fc;
  animation-delay: -1.5s;
  animation-duration: 2.75s;
}

.fx-love-code-reveal-flyers-bit:nth-child(9) {
  left: 66%;
  top: 10%;
  color: #2dd4bf;
  background: #2dd4bf;
  animation-delay: -0.85s;
  animation-duration: 3.5s;
}

.fx-love-code-reveal-flyers-bit:nth-child(10) {
  left: 26%;
  top: 40%;
  width: 0.28rem;
  height: 0.5rem;
  border-radius: 2px;
  color: #f9a8d4;
  background: #f9a8d4;
  animation-delay: -1.1s;
  animation-duration: 3.15s;
}

.fx-love-code-reveal-card {
  position: relative;
  z-index: 1;
  margin: 0;
}

.fx-love-code-reveal-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.fx-love-code-reveal-label {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}

.fx-love-code-reveal-code {
  margin: 0 0 1rem;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  font-weight: 700;
  color: #fde68a;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
  word-break: break-all;
  line-height: 1.3;
}

.fx-love-code-reveal-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.fx-love-code-reveal-code--empty {
  color: var(--muted);
  font-size: 1rem;
}

.fx-love-code-reveal-emptyhint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.fx-love-code-reveal-emptyhint code {
  font-size: 0.85em;
}

.game-fx-scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 18, 0.75);
  cursor: pointer;
}

.game-fx-modal {
  position: relative;
  z-index: 1;
  width: min(100%, 40rem);
  flex-shrink: 0;
  margin: 0.5rem 0 1.5rem;
  max-height: none;
  overflow: visible;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.75rem 1.5rem 1.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.game-fx-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  margin-top: 0 !important;
  width: auto;
  min-width: auto;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
}

.game-fx-body {
  min-width: 0;
  min-height: 0;
  overflow: visible;
}

/* Game page only: modal fills space down to just above the dock (--game-fx-modal-max-h from game.js) */
body.page-game #game-fx-overlay:not([hidden]) {
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
}

body.page-game #game-fx-overlay:not([hidden]) .game-fx-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: var(--game-fx-modal-max-h, min(88dvh, 88vh));
  margin-top: 0.35rem;
  margin-bottom: 0.25rem;
}

body.page-game #game-fx-overlay:not([hidden]) .game-fx-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

body.page-game #game-fx-overlay:not([hidden]) .fx-love-gif,
body.page-game #game-fx-overlay:not([hidden]) .fx-forever-media {
  max-height: min(58dvh, 58vh, 420px);
}

.fx-slap-hint {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.fx-slap-stage {
  position: relative;
  width: 100%;
  max-width: min(100%, 520px);
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.fx-slap-arena {
  width: 100%;
  max-width: min(100%, 520px);
  margin: 0 auto;
}

/* Photo defines width; arms positioned to this box only (no extra stage padding) */
.fx-slap-photo-wrap {
  container-type: inline-size;
  container-name: slap-arena;
  position: relative;
  width: 100%;
  padding-bottom: 9rem;
  padding-bottom: clamp(7.5rem, 42cqw, 12rem);
}

.fx-slap-photo-hit {
  position: relative;
  z-index: 2;
  width: 100%;
  border-radius: 0.65rem;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  outline: none;
}

.fx-slap-photo-hit:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.fx-slap-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/*
 * Outer .fx-arm = corner offset only (not touched by motion keyframes).
 * Inner .fx-arm-motion = swing/punch animations so alignment stays correct.
 */
.fx-arm {
  position: absolute;
  bottom: 0;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

/* Shoulders tucked just outside lower-left / lower-right of the photo */
.fx-arm--slap {
  left: 0;
  transform: translateX(calc(-12% - 6px));
}

.fx-arm--punch {
  right: 0;
  transform: translateX(calc(12% + 6px));
}

.fx-arm-motion {
  display: block;
  line-height: 0;
  transform-origin: 50% 92%;
  transform: rotate(-28deg);
  filter: drop-shadow(4px 10px 16px rgba(0, 0, 0, 0.38));
}

.fx-arm--punch .fx-arm-motion {
  transform: rotate(26deg);
}

/* Open-palm + sleeve SVG (cropped viewBox); pivot at bottom via .fx-arm-motion */
.fx-hand-graphic {
  display: block;
  width: 120px;
  width: max(120px, 35cqw);
  height: auto;
  max-height: min(92cqw, 460px);
  user-select: none;
  -webkit-user-drag: none;
}

/* Same asset on both sides; mirror the right arm toward the photo */
.fx-arm--punch .fx-hand-graphic {
  transform: scaleX(-1);
}

/* Continuous loop — alternating slap / punch rhythm */
.fx-slap-arms--loop .fx-arm--slap .fx-arm-motion {
  animation: fx-arm-slap-loop 0.56s ease-in-out infinite;
}

.fx-slap-arms--loop .fx-arm--punch .fx-arm-motion {
  animation: fx-arm-punch-loop 0.56s ease-in-out infinite;
  animation-delay: 0.28s;
}

@keyframes fx-arm-slap-loop {
  0%,
  100% {
    transform: rotate(-28deg);
  }
  45% {
    transform: rotate(8deg) translateX(1.1rem) translateY(-1.75rem);
  }
  55% {
    transform: rotate(3deg) translateX(0.65rem) translateY(-1.25rem);
  }
}

@keyframes fx-arm-punch-loop {
  0%,
  100% {
    transform: rotate(26deg) translateX(0);
  }
  40% {
    transform: rotate(-7deg) translateX(-4.25rem) translateY(-1.85rem);
  }
  50% {
    transform: rotate(-4deg) translateX(-4.6rem) translateY(-1.6rem);
  }
}

/* One-shot when photo is tapped */
.fx-slap-stage--tap-left .fx-arm--slap .fx-arm-motion {
  animation: fx-arm-slap-tap 0.38s ease-out forwards;
}

.fx-slap-stage--tap-right .fx-arm--punch .fx-arm-motion {
  animation: fx-arm-punch-tap 0.36s ease-out forwards;
}

@keyframes fx-arm-slap-tap {
  0% {
    transform: rotate(-28deg);
  }
  55% {
    transform: rotate(10deg) translateX(1.15rem) translateY(-2rem);
  }
  100% {
    transform: rotate(-28deg);
  }
}

@keyframes fx-arm-punch-tap {
  0% {
    transform: rotate(26deg) translateX(0);
  }
  60% {
    transform: rotate(-5deg) translateX(-4.4rem) translateY(-2.1rem);
  }
  100% {
    transform: rotate(26deg) translateX(0);
  }
}

.fx-slap-photo-hit--slapped {
  animation: fx-slap-shake 0.48s ease-out;
}

@keyframes fx-slap-shake {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
    filter: brightness(1);
  }
  15% {
    transform: translateX(-10px) rotate(-3deg);
    filter: brightness(1.2) saturate(1.35);
  }
  30% {
    transform: translateX(12px) rotate(3deg);
  }
  45% {
    transform: translateX(-8px) rotate(-2deg);
  }
  60% {
    transform: translateX(6px) rotate(1deg);
    filter: brightness(1.08);
  }
}

.fx-slap-bar {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.fx-slap-bar .btn {
  margin-top: 0;
  min-width: 6.5rem;
}

.fx-balloons-wrap {
  text-align: center;
}

.fx-balloons-tagline {
  margin: 0 0 0.75rem;
  font-size: 0.98rem;
  color: var(--accent);
  font-weight: 600;
}

.fx-balloons {
  position: relative;
  height: 268px;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.25rem;
  padding-bottom: 2.75rem;
}

.fx-balloons-hearts {
  position: absolute;
  left: 50%;
  bottom: 42%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  width: 80%;
  pointer-events: none;
}

.fx-balloons-hearts span {
  font-size: 0.95rem;
  color: #f472b6;
  opacity: 0;
  text-shadow: 0 0 12px rgba(244, 114, 182, 0.8);
  animation: fx-heart-pop 3.2s ease-in-out infinite;
}

.fx-balloons-hearts span:nth-child(1) {
  animation-delay: 0s;
}
.fx-balloons-hearts span:nth-child(2) {
  animation-delay: 0.15s;
}
.fx-balloons-hearts span:nth-child(3) {
  animation-delay: 0.3s;
}
.fx-balloons-hearts span:nth-child(4) {
  animation-delay: 0.45s;
}
.fx-balloons-hearts span:nth-child(5) {
  animation-delay: 0.6s;
}
.fx-balloons-hearts span:nth-child(6) {
  animation-delay: 0.75s;
}

@keyframes fx-heart-pop {
  0%,
  35% {
    opacity: 0;
    transform: translateY(12px) scale(0.3);
  }
  42%,
  58% {
    opacity: 1;
    transform: translateY(-4px) scale(1.05);
  }
  70%,
  100% {
    opacity: 0;
    transform: translateY(-36px) scale(0.8);
  }
}

.fx-balloon {
  position: relative;
  width: 86px;
  height: 104px;
  border-radius: 50% 50% 48% 48% / 58% 58% 42% 42%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fx-balloon-face {
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.92;
  user-select: none;
}

.fx-balloon-string {
  position: absolute;
  bottom: -2.4rem;
  left: 50%;
  width: 2px;
  height: 2.5rem;
  margin-left: -1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.08));
  border-radius: 1px;
}

.fx-balloon--left {
  background: linear-gradient(165deg, #fce7f3, #f472b6 45%, #db2777);
  box-shadow: inset -6px -8px 16px rgba(0, 0, 0, 0.15), 0 10px 24px rgba(219, 39, 119, 0.25);
  animation: fx-balloon-left 4s ease-in-out infinite;
}

.fx-balloon--right {
  background: linear-gradient(195deg, #e0e7ff, #818cf8 40%, #4f46e5);
  box-shadow: inset 6px -8px 16px rgba(0, 0, 0, 0.12), 0 10px 24px rgba(79, 70, 229, 0.28);
  animation: fx-balloon-right 4s ease-in-out infinite;
}

@keyframes fx-balloon-left {
  0%,
  100% {
    transform: translateX(0) translateY(0) rotate(-2deg);
  }
  40%,
  60% {
    transform: translateX(36px) translateY(-14px) rotate(4deg) scale(1.06);
  }
}

@keyframes fx-balloon-right {
  0%,
  100% {
    transform: translateX(0) translateY(0) rotate(2deg);
  }
  40%,
  60% {
    transform: translateX(-36px) translateY(-14px) rotate(-4deg) scale(1.06);
  }
}

.fx-balloons-sparkle {
  position: absolute;
  inset: 10% 5% 30%;
  background: radial-gradient(circle at 30% 40%, rgba(251, 191, 36, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 70% 35%, rgba(244, 114, 182, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 50% 60%, rgba(167, 139, 250, 0.12) 0%, transparent 50%);
  pointer-events: none;
  animation: fx-sparkle-pulse 4s ease-in-out infinite;
}

@keyframes fx-sparkle-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Love gift — two-page GIF flow + present */
.game-fx-modal--wide {
  width: min(100%, 46rem);
}

.fx-love-gift {
  text-align: center;
}

.fx-love-gif-wrap {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  border-radius: 0.65rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  line-height: 0;
  container-type: inline-size;
  container-name: love-gif;
}

.fx-love-gif-wrap .fx-forever-flower {
  font-size: clamp(0.85rem, 5.5cqi, 1.35rem);
  filter: drop-shadow(0 0 6px rgba(244, 114, 182, 0.35));
}

.fx-love-gif {
  display: block;
  width: 100%;
  max-height: min(60dvh, 60vh, 420px);
  object-fit: contain;
}

.fx-love-gif-missing {
  margin: 0;
  padding: 1.25rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.fx-love-gif-missing code {
  font-size: 0.8em;
}

.fx-love-line {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.85s ease-out, transform 0.85s ease-out;
  white-space: pre-line;
}

.fx-love-line--in {
  opacity: 1;
  transform: translateY(0);
}

.fx-love-next {
  margin-top: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fx-love-gift-cta .fx-love-next {
  margin-top: 0;
}

.fx-love-next-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.fx-love-gift-icon {
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.fx-love-next-label {
  font-size: 0.88rem;
  font-weight: 600;
}

.fx-love-gift-cta {
  position: relative;
  display: inline-block;
  margin-top: 1.35rem;
  padding: 0.85rem 1.25rem 1rem;
  max-width: 100%;
  box-sizing: border-box;
}

.fx-love-gift-cta.fx-love-cta--grand {
  overflow: visible;
  z-index: 5;
}

.fx-love-gift-cta .fx-love-grand-burst {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100vw, 320px);
  height: 300px;
  margin-left: calc(min(100vw, 320px) / -2);
  margin-bottom: -40px;
  z-index: 10;
  pointer-events: none;
  overflow: visible;
}

.fx-love-grand-burst--scene {
  position: absolute;
  inset: -12% -20% -8% -20%;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
}

.fx-love-present-scene.fx-love-scene--grand {
  overflow: visible;
  z-index: 2;
}

.fx-love-grand-burst-mix {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
}

.fx-love-gift-cta .fx-love-grand-burst-mix {
  top: 58%;
}

.fx-love-grand-burst--scene .fx-love-grand-burst-mix {
  top: 44%;
}

.fx-love-grand-burst-anchor {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}

.fx-love-cracker-flash {
  position: absolute;
  left: 0;
  top: 0;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(253, 224, 71, 0.65) 28%,
    rgba(244, 114, 182, 0.35) 52%,
    transparent 72%
  );
  animation: fx-love-cracker-pop 0.58s ease-out forwards;
  pointer-events: none;
}

@keyframes fx-love-cracker-pop {
  0% {
    transform: scale(0);
    opacity: 1;
    filter: brightness(2.2) saturate(1.4);
  }
  35% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(3.2);
    opacity: 0;
    filter: brightness(1.5);
  }
}

.fx-love-pot-burst {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.75rem;
  height: 2rem;
  margin: 8px 0 0 -1.375rem;
  transform-origin: 50% 100%;
  animation: fx-love-pot-crack 0.95s cubic-bezier(0.2, 0.85, 0.25, 1) forwards;
  pointer-events: none;
}

.fx-love-pot-rim {
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  top: 0;
  height: 0.35rem;
  background: linear-gradient(180deg, #ea580c, #c2410c);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.fx-love-pot-body {
  position: absolute;
  left: 0;
  right: 0;
  top: 0.28rem;
  bottom: 0;
  background: linear-gradient(180deg, #c2410c 0%, #9a3412 45%, #7c2d12 100%);
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
  border-radius: 0 0 7px 7px;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.35);
}

@keyframes fx-love-pot-crack {
  0% {
    transform: translate(0, 0) scale(1) rotate(0);
    opacity: 1;
    filter: brightness(1);
  }
  18% {
    transform: translate(0, 6px) scale(1.05, 0.92);
  }
  40% {
    transform: translate(0, -14px) scale(0.88, 1.18) rotate(-8deg);
    filter: brightness(1.45);
  }
  70% {
    transform: translate(6px, 8px) scale(1.25, 0.55) rotate(14deg);
    opacity: 0.85;
  }
  100% {
    transform: translate(-10px, 22px) scale(1.5, 0.35) rotate(22deg);
    opacity: 0;
  }
}

.fx-love-confetti-bit {
  position: absolute;
  left: 0;
  top: 0;
  margin-left: -3px;
  margin-top: -3px;
  border-radius: 1px;
  opacity: 0;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
  animation: fx-love-confetti-fly 1.05s cubic-bezier(0.12, 0.88, 0.22, 1) forwards;
  animation-delay: var(--fx-d, 0s);
}

@keyframes fx-love-confetti-fly {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(0.25);
  }
  10% {
    transform: translate(calc(var(--fx-tx) * 0.08), calc(var(--fx-ty) * 0.08)) rotate(calc(var(--fx-spin) * 0.12)) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(var(--fx-tx), var(--fx-ty)) rotate(var(--fx-spin)) scale(0.35);
  }
}

.fx-love-flower-burst {
  position: absolute;
  left: 0;
  top: 0;
  margin-left: -0.55em;
  margin-top: -0.55em;
  font-size: clamp(1.05rem, 3.2vw, 1.55rem);
  line-height: 1;
  opacity: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  animation: fx-love-flower-fly 1.12s cubic-bezier(0.15, 0.82, 0.2, 1) forwards;
  animation-delay: var(--fx-d, 0s);
}

@keyframes fx-love-flower-fly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.2) rotate(-25deg);
  }
  12% {
    transform: translate(calc(var(--fx-tx) * 0.12), calc(var(--fx-ty) * 0.12)) scale(1.15) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--fx-tx), var(--fx-ty)) scale(0.65) rotate(220deg);
  }
}

.fx-love-mini-present {
  position: relative;
  width: 3.25rem;
  height: 2.6rem;
  margin: 0 auto 0.65rem;
  pointer-events: none;
}

.fx-love-mini-present-base {
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  bottom: 0;
  height: 1.35rem;
  background: linear-gradient(155deg, #d4568c 0%, #8b2252 100%);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.fx-love-mini-present-lid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.15rem;
  height: 1rem;
  background: linear-gradient(180deg, #f5a0c4 0%, #d4568c 100%);
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
}

.fx-love-mini-present-ribbon {
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  width: 0.35rem;
  height: 2.1rem;
  margin-left: -0.175rem;
  background: rgba(107, 26, 64, 0.45);
  border-radius: 1px;
  z-index: 1;
}

.fx-love-sparkles {
  position: absolute;
  inset: -0.35rem -0.5rem -0.5rem -0.5rem;
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}

.fx-love-present-scene .fx-love-sparkles {
  inset: -0.5rem -0.75rem -0.35rem -0.75rem;
}

.fx-love-sparkle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9c4 0%, #fbbf24 45%, transparent 70%);
  box-shadow: 0 0 8px #fde68a, 0 0 14px rgba(244, 114, 182, 0.45);
  transform: scale(var(--fx-spark-scale, 1));
  animation: fx-love-sparkle-twinkle 2.4s ease-in-out infinite;
  opacity: 0.85;
}

@keyframes fx-love-sparkle-twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(calc(var(--fx-spark-scale, 1) * 0.65));
  }
  50% {
    opacity: 1;
    transform: scale(var(--fx-spark-scale, 1));
  }
}

.fx-love-panel--2 .fx-love-hint {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.fx-love-present-scene {
  position: relative;
  margin-top: 1.25rem;
  perspective: 420px;
  padding: 0.5rem 0 0.75rem;
}

.fx-love-present {
  position: relative;
  width: 7.5rem;
  height: 5.75rem;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: block;
  transform-style: preserve-3d;
}

.fx-love-present:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 4px;
}

.fx-love-present-base {
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  bottom: 0;
  height: 2.85rem;
  background: linear-gradient(155deg, #d4568c 0%, #8b2252 55%, #6b1a40 100%);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.fx-love-present-tray {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.5rem;
  height: 2.2rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.fx-love-burst-rays {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 0;
  height: 0;
  z-index: 4;
  pointer-events: none;
}

.fx-love-burst-rays span {
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 6.25rem;
  margin-left: -2.5px;
  margin-top: -3.125rem;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(253, 224, 71, 0.98), rgba(251, 113, 133, 0.35), rgba(167, 139, 250, 0.12), transparent);
  opacity: 0;
  transform-origin: 50% 100%;
  transform: rotate(var(--ray, 0deg));
}

.fx-love-burst-rays span:nth-child(even) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 114, 182, 0.4), rgba(253, 224, 71, 0.15), transparent);
}

.fx-love-burst-rays.is-active span {
  animation: fx-love-ray-grand 0.95s cubic-bezier(0.18, 0.9, 0.22, 1) forwards;
}

@keyframes fx-love-ray-grand {
  0% {
    opacity: 0;
    transform: rotate(var(--ray, 0deg)) scaleY(0.08);
  }
  28% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--ray, 0deg)) scaleY(1.85);
  }
}

.fx-love-present-lid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.65rem;
  height: 2.05rem;
  background: linear-gradient(180deg, #f5a0c4 0%, #d4568c 100%);
  border-radius: 10px 10px 4px 4px;
  transform-origin: 50% 100%;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.fx-love-present-lid::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: -0.55rem;
  background: #ffb8d4;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.fx-love-present.is-bursting .fx-love-present-lid {
  animation: fx-love-lid-burst 0.96s cubic-bezier(0.16, 0.95, 0.2, 1) forwards;
}

.fx-love-present.is-bursting .fx-love-present-base {
  animation: fx-love-base-burst 0.96s cubic-bezier(0.22, 1, 0.32, 1) forwards;
}

@keyframes fx-love-lid-burst {
  0% {
    transform: rotateX(0) translateY(0) scale(1);
    opacity: 1;
    filter: brightness(1);
  }
  25% {
    transform: rotateX(-35deg) translateY(-0.35rem) scale(1.06);
    filter: brightness(1.15);
  }
  55% {
    transform: rotateX(-95deg) translateY(-1.8rem) scale(1.12);
    opacity: 1;
  }
  100% {
    transform: rotateX(-128deg) translateY(-5.25rem) scale(0.08);
    opacity: 0;
    filter: brightness(1.65);
  }
}

@keyframes fx-love-base-burst {
  0% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  }
  18% {
    transform: scale(1.18);
    box-shadow: 0 0 0 10px rgba(251, 191, 36, 0.42), 0 0 28px rgba(244, 114, 182, 0.45), 0 14px 32px rgba(0, 0, 0, 0.25);
  }
  42% {
    transform: scale(0.9);
  }
  68% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

.fx-love-present.is-open .fx-love-present-lid {
  opacity: 0;
  transform: translateY(-4rem) scale(0.15) rotateX(-125deg);
  pointer-events: none;
}

.fx-love-present.is-open {
  cursor: default;
}

/* Forever flowers — GIF/image with rain only on media; caption below (fade-in) */
.fx-forever {
  text-align: center;
}

.fx-forever-media-wrap {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  border-radius: 0.65rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
  line-height: 0;
  container-type: inline-size;
  container-name: forever-media;
}

.fx-forever-media {
  display: block;
  width: 100%;
  max-height: min(60dvh, 60vh, 440px);
  height: auto;
  object-fit: contain;
}

.fx-forever-media-missing {
  margin: 0;
  padding: 1.25rem 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.fx-forever-rain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.fx-forever-flower {
  position: absolute;
  top: -12%;
  font-size: clamp(0.95rem, 4cqi, 1.35rem);
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  animation-name: fx-forever-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, top, opacity;
}

@keyframes fx-forever-fall {
  0% {
    top: -14%;
    opacity: 0;
    transform: translateX(0) rotate(0deg);
  }
  7% {
    opacity: 1;
  }
  100% {
    top: 108%;
    opacity: 0.88;
    transform: translateX(12px) rotate(var(--fx-rot, 220deg));
  }
}

.fx-forever-caption {
  margin: 1rem 0 0;
  padding: 0 0.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.85s ease-out, transform 0.85s ease-out;
  white-space: pre-line;
}

.fx-forever-caption--in {
  opacity: 1;
  transform: translateY(0);
}

/* Miss you — same media + caption pattern as forever; star rain on image */
.fx-miss-stars {
  position: relative;
  text-align: center;
}

.fx-miss-star {
  position: absolute;
  top: -12%;
  font-size: clamp(0.82rem, 4cqi, 1.22rem);
  line-height: 1;
  filter: drop-shadow(0 0 5px rgba(253, 224, 71, 0.5));
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4), 0 1px 3px rgba(0, 0, 0, 0.45);
  animation-name: fx-forever-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, top, opacity;
}

.fx-miss-for-you {
  margin-top: 1.15rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
  gap: 0.35rem;
  padding-right: 0.15rem;
  box-sizing: border-box;
}

.fx-miss-for-you .game-for-you-arrow {
  display: flex;
  align-items: center;
  color: #fde68a;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.55));
  animation: game-for-you-arrow-nudge 1.15s ease-in-out infinite alternate;
}

.fx-miss-for-you-btn {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.92rem;
}

/* Phones & narrow+short only — not wide laptop landscape (short height alone is not enough) */
@media (max-width: 36rem), ((max-width: 48rem) and (max-height: 40rem)) {
  .game-fx-overlay:not([hidden]) {
    align-items: flex-start;
    padding-top: max(0.5rem, env(safe-area-inset-top));
    padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
  }

  .game-fx-modal {
    width: min(100%, 100%);
    margin: 0.25rem 0 0.5rem;
    padding: 2.35rem 0.85rem 0.85rem;
  }

  body.page-game #game-fx-overlay:not([hidden]) .game-fx-modal {
    max-height: var(--game-fx-modal-max-h, min(92dvh, 92vh));
  }

  .fx-love-gif,
  .fx-forever-media {
    max-height: min(36dvh, 36vh, 240px);
  }

  body.page-game #game-fx-overlay:not([hidden]) .fx-love-gif,
  body.page-game #game-fx-overlay:not([hidden]) .fx-forever-media {
    max-height: min(48dvh, 48vh, 320px);
  }

  .fx-slap-hint {
    font-size: 0.82rem;
    margin-bottom: 0.65rem;
  }

  .fx-slap-photo-wrap {
    padding-bottom: clamp(5rem, 30cqw, 7.5rem);
  }

  .fx-hand-graphic {
    max-height: min(70cqw, 340px);
  }

  .fx-hand-graphic--fist {
    max-height: min(65cqw, 300px);
  }
}

/* Wide but modest height (laptop / tablet landscape): claw back padding, larger media cap */
@media (min-width: 48rem) and (max-height: 50rem) {
  body.page-game #game-fx-overlay:not([hidden]) {
    padding-top: max(0.4rem, env(safe-area-inset-top));
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    padding-bottom: max(0.2rem, env(safe-area-inset-bottom));
  }

  body.page-game #game-fx-overlay:not([hidden]) .game-fx-modal {
    margin-top: 0.2rem;
    margin-bottom: 0.12rem;
    padding: 2.2rem 1.25rem 0.85rem;
  }

  body.page-game #game-fx-overlay:not([hidden]) .fx-love-gif,
  body.page-game #game-fx-overlay:not([hidden]) .fx-forever-media {
    max-height: min(68dvh, 88vh, 520px);
  }
}

/* Roomy viewports OR any wide screen: hide scrollbars, still scrollable */
@media (min-width: 36.0625rem) and (min-height: 40.0625rem), (min-width: 48rem) {
  body.page-game #game-fx-overlay:not([hidden]),
  body.page-game #game-fx-overlay:not([hidden]) .game-fx-body {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body.page-game #game-fx-overlay:not([hidden])::-webkit-scrollbar,
  body.page-game #game-fx-overlay:not([hidden]) .game-fx-body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}

.site-footer {
  text-align: center;
  padding: 2rem max(1rem, env(safe-area-inset-left)) 2rem max(1rem, env(safe-area-inset-right));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto;
  box-sizing: border-box;
}
