:root {
  --bg-top: #ffe8da;
  --bg-bottom: #ffd7e6;
  --card: #fff9f4;
  --ink: #4f2d3b;
  --accent: #ff5f7a;
  --accent-deep: #ef3d62;
  --mint: #7bcdb8;
  --sun: #ffd27d;
  --shadow: 0 24px 48px rgba(79, 45, 59, 0.2);
}

html,
body {
  height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  background: linear-gradient(140deg, var(--bg-top), var(--bg-bottom));
  overflow: hidden;
}

.background-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.65;
  pointer-events: none;
}

.glow-one {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle at 30% 30%, #fff0bf, var(--sun));
  top: -110px;
  right: -90px;
  animation: drift 7s ease-in-out infinite alternate;
}

.glow-two {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at 60% 35%, #bff7ea, var(--mint));
  bottom: -100px;
  left: -70px;
  animation: drift 8.2s ease-in-out infinite alternate-reverse;
}

.app-shell {
  min-height: 100vh;
  min-height: 100svh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.4vh, 20px);
}

.card {
  width: min(760px, 100%);
  height: 100%;
  max-height: 100%;
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(12px, 2.2vh, 24px) clamp(14px, 3.6vw, 34px)
    clamp(10px, 1.8vh, 22px);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 95, 122, 0.25);
  animation: rise 650ms ease-out;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.6vh, 16px);
}

.card::before {
  content: "";
  position: absolute;
  inset: auto -30% -55% auto;
  width: 340px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 95, 122, 0.16), transparent 70%);
  pointer-events: none;
}

.tiny-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-deep);
}

h1 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  font-size: clamp(1.7rem, 5.8vw, 3.1rem);
  line-height: 0.96;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.mobile-title-break {
  display: none;
}

.subtitle {
  margin: 0 0 16px;
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  opacity: 0.88;
}

.slideshow {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  width: min(100%, 420px, 60vw, 44svh);
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border: 2px dashed rgba(123, 205, 184, 0.5);
  background: linear-gradient(180deg, #fffafc, #fff3ec);
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 380ms ease;
}

.slideshow.fading .slide-image {
  opacity: 0.25;
}

.slide-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(79, 45, 59, 0.75);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.game-zone {
  margin-top: clamp(4px, 1vh, 10px);
  height: clamp(96px, 16svh, 168px);
  border-radius: 22px;
  border: 2px solid rgba(255, 95, 122, 0.22);
  background: linear-gradient(180deg, #fffaf7, #fff1eb);
  position: relative;
  overflow: hidden;
}

button {
  border: 0;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  cursor: pointer;
}

.yes-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1rem, 4.2vw, 1.55rem);
  padding: clamp(11px, 1.8vh, 16px) clamp(30px, 7vw, 48px);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-deep));
  box-shadow: 0 14px 26px rgba(239, 61, 98, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
  z-index: 3;
}

.yes-button:hover,
.yes-button:focus-visible {
  transform: translate(-50%, -52%) scale(1.03);
  box-shadow: 0 16px 30px rgba(239, 61, 98, 0.44);
}

.no-button {
  position: absolute;
  left: 70%;
  top: 64%;
  transform: translate(-50%, -50%);
  font-size: clamp(0.78rem, 2.3vw, 0.9rem);
  padding: clamp(8px, 1.3vh, 11px) clamp(13px, 2.2vw, 18px);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(79, 45, 59, 0.2);
  box-shadow: 0 8px 14px rgba(79, 45, 59, 0.2);
  z-index: 2;
  transition: transform 120ms ease;
  user-select: none;
}

.no-button.evade {
  transform: translate(-50%, -50%) scale(1.05);
}

.status-line {
  margin: 2px 0 0;
  min-height: 1.1em;
  font-weight: 700;
  font-size: clamp(0.84rem, 2vh, 1rem);
  text-align: center;
  color: #744452;
}

.celebration-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(79, 45, 59, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  z-index: 9;
}

.celebration-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.celebration-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 460px;
  width: min(90vw, 460px);
}

.celebration-title {
  margin: 0 0 14px;
  font-family: "Baloo 2", cursive;
  font-size: clamp(1.3rem, 3.6vw, 1.8rem);
  line-height: 1.15;
}

.celebration-text {
  margin: 0;
  font-weight: 700;
}

.invite-gif {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(255, 95, 122, 0.22);
  background: #fff7f1;
  display: block;
}

.calendar-button {
  margin-top: 14px;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(120deg, #ff5f7a, #ef3d62);
  box-shadow: 0 10px 20px rgba(239, 61, 98, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.calendar-button:hover,
.calendar-button:focus-visible {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 12px 24px rgba(239, 61, 98, 0.34);
}

.particle {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
  animation: burst 1s ease-out forwards;
}

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

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(8px, -10px, 0) scale(1.06);
  }
}

@keyframes burst {
  to {
    transform: translate(var(--dx), var(--dy)) scale(0.2);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .mobile-title-break {
    display: inline;
  }

  .app-shell {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .card {
    width: 100%;
    border-radius: 20px;
    padding: 12px 12px 14px;
    gap: 10px;
  }

  h1 {
    font-size: clamp(1.55rem, 9.2vw, 2.4rem);
  }

  .game-zone {
    height: clamp(92px, 16svh, 148px);
    margin-top: 4px;
    border-radius: 18px;
  }

  .slideshow {
    width: min(100%, 340px, 88vw, 42svh);
  }

  .yes-button {
    padding: 11px 32px;
  }

  .no-button {
    font-size: 0.82rem;
  }

  .status-line {
    font-size: 0.88rem;
  }
}

@media (max-height: 760px) {
  .app-shell {
    place-items: center;
  }

  .card {
    height: 100%;
    max-height: 100%;
    padding: 10px 14px 12px;
    gap: 8px;
  }

  h1 {
    font-size: clamp(1.45rem, 6.1vh, 2.45rem);
  }

  .slideshow {
    width: min(100%, 420px, 72vw, 50svh);
  }

  .game-zone {
    height: clamp(90px, 15svh, 130px);
    margin-top: 2px;
  }

  .status-line {
    min-height: 1em;
    font-size: clamp(0.72rem, 1.8vh, 0.9rem);
    margin-top: 2px;
  }
}
