:root {
  --bg: #fff6fb;
  --ink: #3b2432;
  --rose: #f04f8a;
  --rose-hot: #ff4f96;
  --rose-deep: #bf1d58;
  --coral: #ff8a64;
  --lemon: #ffe071;
  --mint: #86dbc7;
  --sky: #92c8ff;
  --plum: #68406d;
  --paper: rgba(255, 255, 255, 0.84);
  --shadow: 0 26px 80px rgba(128, 35, 72, 0.23);
  --button-width: clamp(8.7rem, 36vw, 11.5rem);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(115deg, rgba(255, 224, 113, 0.38) 0 17%, transparent 17% 100%),
    linear-gradient(298deg, rgba(134, 219, 199, 0.28) 0 21%, transparent 21% 100%),
    linear-gradient(145deg, #fff9f3 0%, var(--bg) 45%, #ffe1ef 100%);
  overflow-x: hidden;
  overflow-y: auto;
}

@supports (min-height: 100svh) {
  body {
    min-height: 100svh;
  }
}

button {
  font: inherit;
}

.bubble-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bubble-field span {
  position: absolute;
  left: var(--left);
  bottom: -10rem;
  width: var(--size);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86) 0 16%, transparent 17% 100%),
    rgba(255, 255, 255, 0.22);
  box-shadow:
    inset -0.8rem -1rem 1.8rem rgba(240, 79, 138, 0.08),
    inset 0.7rem 0.7rem 1.5rem rgba(255, 255, 255, 0.48);
  animation: float-bubble 15s linear infinite;
  animation-delay: var(--delay);
}

.app {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  padding: clamp(0.85rem, 3vw, 2.5rem);
  place-items: center;
  isolation: isolate;
}

@supports (min-height: 100svh) {
  .app {
    min-height: 100svh;
  }
}

.question-panel {
  position: relative;
  width: min(94vw, 720px);
  min-height: min(76vh, 590px);
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(1rem, 3vw, 1.7rem);
  overflow: hidden;
  isolation: isolate;
}

.question-panel::before {
  content: "";
  position: absolute;
  inset: 0.55rem;
  z-index: 0;
  border: 2px dashed rgba(240, 79, 138, 0.18);
  border-radius: 8px;
  pointer-events: none;
}

.question-panel > * {
  position: relative;
  z-index: 1;
}

.question-panel::after {
  content: "";
  position: absolute;
  right: -2.4rem;
  bottom: -1.8rem;
  width: 9rem;
  aspect-ratio: 1;
  background: var(--mint);
  clip-path: polygon(50% 95%, 7% 47%, 8% 17%, 33% 2%, 50% 19%, 67% 2%, 92% 17%, 93% 47%);
  opacity: 0.72;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-45deg);
}

.cat-stage {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.cat-sprite {
  --fur: #201d25;
  --patch: #fffaf7;
  --stripe: transparent;
  position: absolute;
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  width: clamp(4rem, 12vw, 6.2rem);
  aspect-ratio: 1.25;
  filter: drop-shadow(0 0.7rem 0.75rem rgba(74, 36, 65, 0.18));
}

.cat-tuxedo {
  left: clamp(0.7rem, 3.2vw, 2.4rem);
}

.cat-orange {
  --fur: #f28c38;
  --patch: #ffe0bd;
  --stripe: rgba(172, 76, 22, 0.58);
  right: clamp(0.7rem, 3.2vw, 2.4rem);
  transform: scaleX(-1);
}

.cat-body,
.cat-head,
.cat-tail,
.cat-paw,
.cat-face,
.cat-eye,
.cat-nose {
  position: absolute;
  display: block;
}

.cat-body {
  left: 28%;
  bottom: 7%;
  width: 56%;
  height: 48%;
  border-radius: 48% 42% 0.55rem 0.55rem;
  background:
    linear-gradient(90deg, transparent 0 27%, var(--patch) 28% 54%, transparent 55% 100%),
    repeating-linear-gradient(90deg, transparent 0 0.52rem, var(--stripe) 0.52rem 0.66rem, transparent 0.66rem 1.04rem),
    var(--fur);
  overflow: hidden;
}

.cat-head {
  left: 8%;
  top: 15%;
  width: 43%;
  height: 48%;
  border-radius: 0.8rem 0.8rem 0.95rem 0.95rem;
  background:
    linear-gradient(90deg, transparent 0 22%, var(--patch) 23% 62%, transparent 63% 100%),
    repeating-linear-gradient(90deg, transparent 0 0.5rem, var(--stripe) 0.5rem 0.62rem, transparent 0.62rem 1rem),
    var(--fur);
}

.cat-head::before,
.cat-head::after {
  content: "";
  position: absolute;
  top: -20%;
  width: 36%;
  aspect-ratio: 1;
  background: var(--fur);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.cat-head::before {
  left: 7%;
  transform: rotate(-12deg);
}

.cat-head::after {
  right: 7%;
  transform: rotate(12deg);
}

.cat-face {
  left: 28%;
  top: 36%;
  width: 42%;
  height: 44%;
  border-radius: 50% 50% 48% 48%;
  background: var(--patch);
}

.cat-eye {
  top: 40%;
  width: 8%;
  height: 10%;
  border-radius: 50%;
  background: #2a1724;
}

.cat-eye-left {
  left: 33%;
}

.cat-eye-right {
  right: 23%;
}

.cat-nose {
  left: 49%;
  top: 55%;
  width: 8%;
  height: 7%;
  border-radius: 50% 50% 60% 60%;
  background: #f06486;
  transform: translateX(-50%);
}

.cat-tail {
  right: 6%;
  bottom: 31%;
  width: 36%;
  height: 50%;
  border: clamp(0.38rem, 1.1vw, 0.55rem) solid var(--fur);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 95% 0 0;
  transform: rotate(-20deg);
  transform-origin: 0 100%;
  animation: tail-swish 2.8s ease-in-out infinite alternate;
}

.cat-paw {
  bottom: 0;
  width: 20%;
  height: 16%;
  border-radius: 50% 50% 0.3rem 0.3rem;
  background: var(--patch);
}

.cat-paw-left {
  left: 24%;
}

.cat-paw-right {
  right: 15%;
}

.candle-trio {
  position: absolute;
  top: clamp(1rem, 3.2vw, 1.6rem);
  right: clamp(1rem, 3.4vw, 2.2rem);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: clamp(0.35rem, 1.2vw, 0.55rem);
  width: max-content;
  height: clamp(4.7rem, 13vw, 6.4rem);
  pointer-events: none;
}

.candle {
  --wax: #ff879c;
  --wax-side: #d91f4c;
  --height: 4.5rem;
  --delay: 0s;
  position: relative;
  width: clamp(1.45rem, 3.8vw, 2.05rem);
  height: 100%;
}

.candle-tall {
  --height: clamp(3.9rem, 10vw, 5.4rem);
  --wax: #ff9cad;
  --wax-side: #c9153f;
  --delay: -0.35s;
}

.candle-short {
  --height: clamp(2.85rem, 7.4vw, 4rem);
  --wax: #ff728d;
  --wax-side: #b80f36;
  --delay: -0.9s;
}

.candle-mid {
  --height: clamp(3.3rem, 8.6vw, 4.7rem);
  --wax: #ff5f7f;
  --wax-side: #a80d32;
  --delay: -1.4s;
}

.wax-body {
  position: absolute;
  left: 50%;
  bottom: 0.42rem;
  width: 100%;
  height: var(--height);
  border-radius: 999px 999px 0.45rem 0.45rem;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.68), transparent 28% 100%),
    linear-gradient(110deg, var(--wax) 0 58%, var(--wax-side) 59% 100%);
  box-shadow:
    inset -0.28rem 0 0.45rem rgba(116, 34, 60, 0.08),
    0 0.55rem 0.95rem rgba(105, 28, 50, 0.13);
  transform: translateX(-50%);
}

.wax-body::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.08rem;
  width: 102%;
  height: 0.72rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 35%, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(90deg, #fff 0%, var(--wax) 52%, var(--wax-side) 100%);
  box-shadow: inset 0 -0.15rem 0.24rem rgba(116, 34, 60, 0.08);
  transform: translateX(-50%);
}

.wick {
  position: absolute;
  left: 50%;
  bottom: calc(var(--height) + 0.46rem);
  z-index: 2;
  width: 0.12rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #4a2441;
  transform: translateX(-50%);
}

.flame {
  position: absolute;
  left: 50%;
  bottom: calc(var(--height) + 0.78rem);
  z-index: 3;
  width: clamp(0.72rem, 2vw, 0.95rem);
  aspect-ratio: 0.72;
  border-radius: 60% 45% 55% 50%;
  background:
    radial-gradient(circle at 50% 66%, #fff8b8 0 18%, transparent 20%),
    linear-gradient(160deg, #fff29a 0%, #ffb22e 52%, #ff6b4a 100%);
  box-shadow:
    0 0 0.9rem rgba(255, 138, 100, 0.62),
    0 0 1.6rem rgba(255, 224, 113, 0.38);
  transform: translateX(-50%) rotate(8deg);
  transform-origin: 50% 88%;
  animation: flame-flicker 950ms ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

.drip {
  position: absolute;
  top: 0.38rem;
  width: 0.34rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--wax), var(--wax-side));
  box-shadow: inset -0.08rem 0 0.1rem rgba(116, 34, 60, 0.08);
  animation: wax-melt 3.6s ease-in-out infinite;
  animation-delay: var(--delay);
}

.drip-one {
  left: 22%;
  height: 1.15rem;
}

.drip-two {
  right: 18%;
  height: 0.75rem;
  animation-duration: 4.4s;
  animation-delay: calc(var(--delay) - 0.85s);
}

.wax-puddle {
  position: absolute;
  left: 50%;
  bottom: 0.12rem;
  width: 118%;
  height: 0.46rem;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.62), var(--wax-side));
  box-shadow: 0 0.25rem 0.65rem rgba(105, 28, 50, 0.11);
  transform: translateX(-50%);
  animation: puddle-pulse 3.8s ease-in-out infinite;
  animation-delay: var(--delay);
}

.kicker {
  margin: 0;
  color: var(--rose-deep);
  font-size: clamp(0.78rem, 1.9vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  text-align: center;
  line-height: 0.94;
  letter-spacing: 0;
}

h1 {
  max-width: min(92vw, 18ch);
  color: #4a2441;
  font-size: clamp(2.05rem, 4.5vw, 3.7rem);
  font-weight: 950;
  line-height: 1;
  text-shadow:
    0 0.06em 0 #fff,
    0 0.12em 0 rgba(255, 224, 113, 0.72),
    0 0.19em 0 rgba(134, 219, 199, 0.55),
    0 0.28em 1.1em rgba(191, 29, 88, 0.22);
}

h2 {
  max-width: 11ch;
  color: #fff;
  font-size: clamp(3.6rem, 14vw, 8.4rem);
  text-shadow: 0 10px 35px rgba(76, 0, 28, 0.35);
}

.answer-zone {
  position: relative;
  width: min(100%, 520px);
  min-height: clamp(6.4rem, 17vh, 9rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 4vw, 2rem);
  align-items: center;
  justify-items: center;
  overflow: visible;
}

.answer-button {
  position: relative;
  width: var(--button-width);
  min-height: clamp(4rem, 10vw, 4.9rem);
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: white;
  font-size: clamp(1.25rem, 4vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow:
    inset 0 0.55rem 0.8rem rgba(255, 255, 255, 0.35),
    inset 0 -0.6rem 1.1rem rgba(86, 12, 48, 0.18),
    0 17px 34px rgba(105, 28, 50, 0.24);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
  touch-action: manipulation;
  user-select: none;
}

.answer-button::before {
  content: "";
  position: absolute;
  left: 18%;
  top: 16%;
  width: 30%;
  height: 24%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  filter: blur(0.5px);
  pointer-events: none;
}

.yes-button {
  --yes-scale: 1;
  z-index: 10;
  background: linear-gradient(135deg, var(--rose-hot) 0%, var(--coral) 100%);
  transform: scale(var(--yes-scale));
  transform-origin: center;
}

.yes-button:hover,
.yes-button:focus-visible {
  box-shadow: 0 20px 54px rgba(232, 63, 111, 0.35);
  outline: 3px solid rgba(255, 255, 255, 0.82);
  outline-offset: 4px;
}

.no-button {
  z-index: 18;
  background: linear-gradient(135deg, var(--plum) 0%, #8d5674 100%);
  position: fixed;
  left: min(calc(100vw - var(--button-width) - 2rem), calc(50vw + 1.25rem));
  top: calc(100vh - 6.25rem);
  cursor: default;
  pointer-events: none;
  will-change: left, top, transform;
}

.no-button.is-fleeing {
  transition:
    left 120ms cubic-bezier(0.2, 0.9, 0.2, 1),
    top 120ms cubic-bezier(0.2, 0.9, 0.2, 1),
    transform 120ms cubic-bezier(0.2, 0.9, 0.2, 1);
  transform: rotate(var(--tilt, 0deg));
}

.no-button.is-taunting {
  background: linear-gradient(135deg, #5c3d78 0%, #b34b76 100%);
  box-shadow:
    inset 0 0.55rem 0.8rem rgba(255, 255, 255, 0.32),
    inset 0 -0.6rem 1.1rem rgba(86, 12, 48, 0.24),
    0 19px 38px rgba(92, 61, 120, 0.26);
}

.no-button.is-yes-now {
  background: linear-gradient(135deg, var(--rose-hot) 0%, var(--coral) 100%);
  cursor: pointer;
  pointer-events: auto;
  animation: yes-flip 560ms cubic-bezier(0.18, 0.89, 0.28, 1.22) both;
}

.love-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px),
    linear-gradient(135deg, #f04f8a, #68406d);
  z-index: 20;
}

.love-screen[hidden] {
  display: none;
}

.love-copy {
  display: grid;
  gap: 1rem;
  justify-items: center;
  animation: pop-in 520ms cubic-bezier(0.18, 0.89, 0.28, 1.28) both;
}

.love-screen .kicker {
  color: #fff6cf;
}

.heart-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.heart-note {
  --fall-x: 0px;
  --spin: 0deg;
  position: absolute;
  z-index: 1;
  left: var(--start-x);
  top: -7rem;
  display: grid;
  place-items: center;
  width: clamp(5.8rem, 15vw, 8.4rem);
  aspect-ratio: 1;
  padding: 1rem 1.1rem 0.78rem;
  color: #fff;
  font-size: clamp(0.72rem, 2.3vw, 0.98rem);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-wrap: balance;
  background: var(--heart-color);
  clip-path: polygon(50% 95%, 7% 47%, 8% 17%, 33% 2%, 50% 19%, 67% 2%, 92% 17%, 93% 47%);
  filter: drop-shadow(0 14px 18px rgba(80, 6, 37, 0.22));
  text-shadow: 0 2px 10px rgba(74, 0, 29, 0.38);
  animation: heart-fall var(--duration) linear forwards;
  isolation: isolate;
  will-change: opacity, transform;
}

.heart-note::before {
  content: none;
}

.sparkle {
  position: fixed;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: clamp(0.45rem, 1.7vw, 0.72rem);
  aspect-ratio: 1;
  background: var(--sparkle-color);
  clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
  filter: drop-shadow(0 0.35rem 0.5rem rgba(74, 36, 65, 0.2));
  transform: translate(-50%, -50%) scale(0.4);
  animation: sparkle-pop 720ms ease-out forwards;
  animation-delay: var(--delay);
}

@keyframes heart-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) scale(0.65) rotate(-7deg);
  }

  10% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--fall-x), 115vh, 0) scale(1.08) rotate(15deg);
  }
}

@keyframes heart-fall-reduced {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.72);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--fall-x), 16vh, 0) scale(1);
  }
}

@keyframes sparkle-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(0deg);
  }

  24% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(1.1)
      rotate(150deg);
  }
}

@keyframes yes-flip {
  0% {
    transform: scale(0.94) rotateY(0deg);
  }

  55% {
    transform: scale(1.08) rotateY(180deg);
  }

  100% {
    transform: scale(1.04) rotateY(360deg);
  }
}

@keyframes tail-swish {
  0% {
    transform: rotate(-24deg);
  }

  100% {
    transform: rotate(-10deg);
  }
}

@keyframes float-bubble {
  0% {
    opacity: 0;
    transform: translate3d(0, 8vh, 0) scale(0.72);
  }

  12% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift), -118vh, 0) scale(1.08);
  }
}

@keyframes flame-flicker {
  0% {
    transform: translateX(-50%) rotate(-7deg) scale(0.94, 1.05);
  }

  100% {
    transform: translateX(-50%) rotate(9deg) scale(1.06, 0.96);
  }
}

@keyframes wax-melt {
  0%,
  100% {
    transform: translateY(0) scaleY(0.88);
  }

  50% {
    transform: translateY(0.48rem) scaleY(1.22);
  }
}

@keyframes puddle-pulse {
  0%,
  100% {
    transform: translateX(-50%) scaleX(0.92);
  }

  50% {
    transform: translateX(-50%) scaleX(1.08);
  }
}

@keyframes pop-in {
  0% {
    opacity: 0;
    transform: scale(0.86);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 560px) {
  :root {
    --button-width: clamp(8.4rem, 46vw, 10.4rem);
  }

  .app {
    padding:
      max(0.75rem, env(safe-area-inset-top))
      max(0.75rem, env(safe-area-inset-right))
      max(0.75rem, env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left));
    place-items: stretch;
  }

  .question-panel {
    width: 100%;
    min-height: calc(100vh - 1.5rem);
    padding: clamp(1.2rem, 5vw, 1.7rem);
    gap: clamp(1rem, 4vh, 1.6rem);
  }

  @supports (min-height: 100svh) {
    .question-panel {
      min-height: calc(100svh - 1.5rem);
    }
  }

  h1 {
    max-width: 12.5ch;
    font-size: clamp(2.25rem, 10.5vw, 3.9rem);
    line-height: 1.02;
  }

  .candle-trio {
    top: 1rem;
    right: 1rem;
    transform: scale(0.88);
    transform-origin: top right;
  }

  .answer-zone {
    width: 100%;
    min-height: clamp(6.2rem, 16vh, 8.5rem);
    grid-template-columns: 1fr;
    align-content: start;
    align-items: start;
    padding-top: 0.4rem;
  }

  .no-button {
    left: calc(50vw - (var(--button-width) / 2));
    top: calc(100vh - 6rem);
  }

  @supports (height: 100svh) {
    .no-button {
      top: calc(100svh - 6rem);
    }
  }

  .bubble-field span:nth-child(n + 5) {
    display: none;
  }

  .heart-note {
    width: clamp(4.8rem, 24vw, 6.2rem);
    font-size: clamp(0.64rem, 3vw, 0.82rem);
  }

  .cat-sprite {
    bottom: max(0.45rem, env(safe-area-inset-bottom));
    width: clamp(3.3rem, 20vw, 4.7rem);
  }
}

@media (max-width: 360px) {
  .candle-trio {
    right: 0.55rem;
    transform: scale(0.76);
  }

  .cat-sprite {
    width: clamp(3rem, 18vw, 3.8rem);
    opacity: 0.92;
  }
}

@media (max-height: 430px) and (orientation: landscape) {
  .app {
    padding: 0.65rem;
  }

  .question-panel {
    min-height: calc(100vh - 1.3rem);
    padding: 0.9rem 1.2rem;
    gap: 0.65rem;
  }

  h1 {
    max-width: 28ch;
    font-size: clamp(1.55rem, 8vh, 2.35rem);
    line-height: 1;
  }

  .candle-trio {
    top: 0.55rem;
    right: 0.8rem;
    transform: scale(0.72);
    transform-origin: top right;
  }

  .answer-zone {
    min-height: 4.6rem;
  }

  .answer-button {
    min-height: 3.45rem;
    font-size: 1.2rem;
  }

  .cat-sprite {
    width: 3.35rem;
    opacity: 0.78;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .heart-note {
    top: var(--static-top);
    animation: heart-fall-reduced var(--duration) ease-out forwards !important;
  }

  .sparkle {
    animation: sparkle-pop 520ms ease-out forwards !important;
  }
}
