:root {
  --lavender: #d8d2e7;
  --pink-bg: #f6d5e4;
  --pink-bar: #f4b8d0;
  --pink-bar-edge: #e8a0bc;
  --cream: #fff8f0;
  --pink-light: #fce4ec;
  --pink-btn: #ff9ec5;
  --pink-btn-edge: #f07aab;
  --gray-btn: #b8b8b8;
  --gray-btn-edge: #9a9a9a;
  --text: #4a3540;
  --text-soft: #5a3545;
  --shadow: rgba(80, 60, 90, 0.28);
  --font-retro: "Press Start 2P", cursive;
  --font-body: "VT323", monospace;
  --pull: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--lavender);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 16px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: manipulation;
}

/* Ambient background particles — always behind UI */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-particle {
  position: absolute;
  top: -30px;
  opacity: 0;
  animation: bgDrift linear forwards;
  will-change: transform, opacity;
}

.bg-particle.heart {
  width: 12px;
  height: 12px;
  background: #ff8fab;
  clip-path: polygon(50% 88%, 0 28%, 22% 0, 50% 16%, 78% 0, 100% 28%);
}

.bg-particle.heart.soft {
  background: #ffb7c5;
  width: 9px;
  height: 9px;
  opacity: 0.7;
}

.bg-particle.heart.deep {
  background: #e63946;
  width: 10px;
  height: 10px;
}

.bg-particle.petal {
  width: 11px;
  height: 16px;
  background: #ffc8dd;
  border-radius: 80% 0 70% 0;
}

.bg-particle.petal.rose {
  background: #ff9ec5;
  width: 9px;
  height: 14px;
}

.bg-particle.petal.blush {
  background: #ffe0ea;
  width: 13px;
  height: 18px;
}

@keyframes bgDrift {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.55;
  }
  50% {
    transform: translateY(55vh) translateX(28px) rotate(180deg);
    opacity: 0.4;
  }
  100% {
    transform: translateY(110vh) translateX(-18px) rotate(360deg);
    opacity: 0;
  }
}

body.is-intro {
  padding: 0;
  overflow: hidden;
  background-color: var(--pink-bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 182, 210, 0.45) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: auto, auto, 18px 18px, 18px 18px;
}

body.is-puzzle {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body.is-playlist {
  overflow: hidden;
  overscroll-behavior: none;
  background: #1a1016;
  touch-action: pan-y;
}

/* ========== INTRO SCREEN ========== */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.5rem, 6vh, 3rem) 1rem clamp(1.25rem, 4vh, 2rem);
  opacity: 1;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.intro-screen.is-exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-screen.is-gone {
  display: none;
}

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

.float-heart {
  position: absolute;
  color: #ff8fab;
  font-size: 14px;
  opacity: 0.35;
  animation: floatHeart linear infinite;
  text-shadow: 0 0 8px rgba(255, 140, 170, 0.4);
}

.float-heart:nth-child(odd) {
  color: #ffb7c5;
  font-size: 18px;
}

.float-heart:nth-child(3n) {
  color: #e63946;
  font-size: 11px;
  opacity: 0.25;
}

@keyframes floatHeart {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.4;
    transform: translateY(-10vh) rotate(8deg) scale(1.18);
  }
  50% {
    opacity: 0.32;
    transform: translateY(-55vh) rotate(-12deg) scale(0.92);
  }
  90% {
    opacity: 0.25;
    transform: translateY(-95vh) rotate(16deg) scale(1.12);
  }
  100% {
    transform: translateY(-110vh) rotate(25deg) scale(0.75);
    opacity: 0;
  }
}

/* Envelope */
.envelope-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: clamp(0.5rem, 3vh, 1.5rem);
  animation: envelopeBob 3.5s ease-in-out infinite;
}

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

.envelope {
  position: relative;
  width: clamp(110px, 28vw, 140px);
  filter: drop-shadow(0 8px 18px rgba(120, 60, 90, 0.22));
}

.envelope-svg {
  display: block;
  width: 100%;
  height: auto;
}

.envelope-seal {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8fab, #e63946 70%);
  box-shadow: 0 3px 8px rgba(180, 40, 70, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.seal-heart {
  display: inline-block;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  transform: translateY(1px);
  transform-origin: center bottom;
  animation: emoBeat 0.95s ease-in-out infinite;
}

.envelope-label {
  font-family: var(--font-retro);
  font-size: clamp(0.55rem, 2.4vw, 0.72rem);
  letter-spacing: 0.06em;
  color: #7a3d55;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.heart-pop {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 10px;
  height: 10px;
  pointer-events: none;
  opacity: 0;
}

.heart-pop.is-active {
  animation: heartPopBurst 0.7s ease-out forwards;
}

.heart-pop.is-active::before,
.heart-pop.is-active::after {
  content: "♥";
  position: absolute;
  color: #e63946;
  font-size: 1.4rem;
  text-shadow: 0 0 12px rgba(255, 100, 140, 0.8);
}

.heart-pop.is-active::before {
  left: -18px;
  top: -24px;
  animation: popOutLeft 0.7s ease-out forwards;
}

.heart-pop.is-active::after {
  left: 8px;
  top: -28px;
  animation: popOutRight 0.7s ease-out forwards;
}

@keyframes heartPopBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.4);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.4);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.8);
  }
}

@keyframes popOutLeft {
  0% {
    transform: scale(0.3) rotate(-10deg);
    opacity: 1;
  }
  100% {
    transform: translate(-20px, -30px) scale(1.2) rotate(-25deg);
    opacity: 0;
  }
}

@keyframes popOutRight {
  0% {
    transform: scale(0.3) rotate(10deg);
    opacity: 1;
  }
  100% {
    transform: translate(24px, -34px) scale(1.3) rotate(20deg);
    opacity: 0;
  }
}

.envelope.is-hit .envelope-seal {
  animation: sealPulse 0.55s ease;
}

@keyframes sealPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  40% {
    transform: translate(-50%, -50%) scale(1.35);
  }
}

/* Bow + arrow */
.bow-area {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 320px;
  margin-bottom: clamp(0.5rem, 2vh, 1.25rem);
}

.bow-stage {
  position: relative;
  width: min(280px, 82vw);
  height: auto;
  aspect-ratio: 220 / 150;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.bow-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 4px 8px rgba(100, 50, 70, 0.18));
}

.bowstring {
  transition: d 0.05s linear;
}

.arrow {
  position: absolute;
  left: 50%;
  top: 4%;
  width: 28px;
  height: 100px;
  transform: translateX(-50%) translateY(var(--pull));
  cursor: grab;
  z-index: 3;
  touch-action: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  transition: top 0.05s linear;
}

.arrow:active,
.arrow.is-dragging {
  cursor: grabbing;
}

.arrow.is-flying {
  transition: none;
  pointer-events: none;
  z-index: 5;
  animation: arrowFly 0.85s cubic-bezier(0.2, 0.85, 0.25, 1) forwards;
}

.arrow-svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes arrowFly {
  0% {
    transform: translateX(-50%) translateY(var(--pull)) scale(1);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(calc(-1 * var(--fly-distance, 55vh))) scale(0.85);
    opacity: 0.15;
  }
}

.bow-hint {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 3.8vw, 1.3rem);
  color: #7a3d55;
  text-align: center;
  opacity: 0.9;
  letter-spacing: 0.02em;
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

.bow-hint.is-hidden {
  opacity: 0;
  animation: none;
}

/* ========== LOVE CARD ========== */
.love-card {
  position: relative;
  z-index: 1;
  width: min(440px, 94vw);
  border-radius: 14px;
  overflow: visible;
  background: var(--cream);
  box-shadow:
    0 16px 48px var(--shadow),
    0 4px 14px rgba(0, 0, 0, 0.12);
  animation: windowFloat 4.5s ease-in-out infinite;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.love-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

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

.love-card:not([hidden]) {
  display: block;
}

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

.love-card.is-visible {
  animation: windowFloat 4.5s ease-in-out infinite;
}

.title-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1rem;
  background: linear-gradient(180deg, #f9c5d8 0%, var(--pink-bar) 55%, var(--pink-bar-edge) 100%);
  border-bottom: 2px solid rgba(180, 100, 130, 0.25);
  border-radius: 14px 14px 0 0;
}

.window-controls {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 7px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.control.close {
  background: #ff6b6b;
}

.control.minimize {
  background: #ffd93d;
}

.control.maximize {
  background: #6bcb77;
}

.window-title {
  font-family: var(--font-retro);
  font-size: clamp(0.42rem, 2vw, 0.55rem);
  letter-spacing: 0.12em;
  color: #5a3d4a;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.title-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: clamp(0.85rem, 3.2vw, 1.05rem);
  line-height: 1;
  filter: contrast(1.15) saturate(1.25);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: pixelHeartBeat 0.9s steps(2, end) infinite;
  transform-origin: center;
  -webkit-tap-highlight-color: transparent;
  text-shadow:
    1px 0 0 #ff4d6d,
    -1px 0 0 #ff4d6d,
    0 1px 0 #c9184a,
    1px 1px 0 #c9184a;
  transition: transform 0.15s steps(2, end);
}

.title-heart:hover,
.title-heart:focus-visible {
  animation: pixelHeartSpin 0.55s steps(4, end) infinite;
  outline: none;
  transform: scale(1.2);
}

.title-heart:active {
  transform: scale(0.9);
}

.title-heart.is-pop {
  animation: pixelHeartPop 0.55s steps(4, end);
}

@keyframes pixelHeartBeat {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.18) translateY(-1px);
  }
}

@keyframes pixelHeartSpin {
  0% {
    transform: scale(1.15) rotate(-8deg);
  }
  50% {
    transform: scale(1.3) rotate(8deg);
  }
  100% {
    transform: scale(1.15) rotate(-8deg);
  }
}

@keyframes pixelHeartPop {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.55) rotate(-12deg);
  }
  60% {
    transform: scale(0.85) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.title-heart-spark {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  font-size: 0.7rem;
  image-rendering: pixelated;
  animation: heartSparkFly 0.7s steps(5, end) forwards;
}

@keyframes heartSparkFly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(1.2);
  }
}

.card {
  position: relative;
  background-color: var(--cream);
  background-image:
    linear-gradient(45deg, var(--pink-light) 25%, transparent 25%),
    linear-gradient(-45deg, var(--pink-light) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--pink-light) 75%),
    linear-gradient(-45deg, transparent 75%, var(--pink-light) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  padding: 1.1rem;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

.card-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 440px;
  padding: 1.15rem 0.95rem 1.4rem;
  border: 2px dotted rgba(180, 120, 140, 0.55);
  border-radius: 10px;
  overflow: visible;
}

.banner {
  width: 100%;
  margin-bottom: 0.85rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  z-index: 1;
}

.banner p {
  font-size: clamp(1.15rem, 4.2vw, 1.4rem);
  line-height: 1.35;
  color: var(--text);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.banner.is-fading p {
  opacity: 0;
  transform: translateY(-4px);
}

.cat-scene {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  margin: 0.35rem 0 0.9rem;
}

.pixel-cat {
  position: relative;
  width: clamp(150px, 40vw, 190px);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  animation: catBreathe 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 0 rgba(120, 120, 140, 0.12));
  transition: transform 0.2s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.pixel-cat:hover,
.pixel-cat:focus-visible {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 4px rgba(120, 120, 140, 0.18));
  outline: none;
}

.pixel-cat:focus-visible {
  outline: 2px solid #4fc3f7;
  outline-offset: 6px;
  border-radius: 8px;
}

.cat-svg {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

.cat-click-hearts {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2;
}

.mini-heart {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  background: #ff6b8a;
  clip-path: polygon(50% 88%, 0 28%, 22% 0, 50% 16%, 78% 0, 100% 28%);
  animation: miniHeartPop 0.85s ease-out forwards;
}

.mini-heart:nth-child(2n) {
  background: #e63946;
  width: 8px;
  height: 8px;
}

.mini-heart:nth-child(3n) {
  background: #ff9ec5;
  width: 12px;
  height: 12px;
}

@keyframes miniHeartPop {
  0% {
    transform: translate(-50%, 0) scale(0.3);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--mx, 0px)), var(--my, -48px)) scale(1);
    opacity: 0;
  }
}

.eyes-scared {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.eyes-heart {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mouth-scared {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.pixel-cat.is-scared {
  animation: catScared 0.35s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 0 rgba(120, 120, 140, 0.12));
}

.pixel-cat.is-scared .eyes-normal,
.pixel-cat.is-scared .eyes-sad,
.pixel-cat.is-scared .eyes-heart,
.pixel-cat.is-scared .mouth-normal,
.pixel-cat.is-scared .mouth-sad {
  opacity: 0;
}

.pixel-cat.is-scared .eyes-scared,
.pixel-cat.is-scared .mouth-scared {
  opacity: 1;
}

.pixel-cat.is-scared .cheeks-normal {
  opacity: 0.35;
}

@keyframes catScared {
  0% {
    transform: translateY(-2px) scale(1.02) rotate(-3deg);
  }
  100% {
    transform: translateY(-8px) scale(1.05) rotate(3deg);
  }
}

.eyes-sad {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.eyes-normal {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.mouth-sad {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mouth-normal {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.cheeks-normal {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.pixel-cat.is-sad {
  animation: catSad 2.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 0 rgba(120, 120, 140, 0.12)) saturate(0.85);
}

.pixel-cat.is-sad .eyes-normal,
.pixel-cat.is-sad .mouth-normal,
.pixel-cat.is-sad .cheeks-normal,
.pixel-cat.is-sad .eyes-heart,
.pixel-cat.is-sad .eyes-scared,
.pixel-cat.is-sad .mouth-scared {
  opacity: 0;
}

.pixel-cat.is-sad .eyes-sad,
.pixel-cat.is-sad .mouth-sad {
  opacity: 1;
}

.pixel-cat.is-sad .held-heart {
  opacity: 0.55;
}

.pixel-cat.is-happy {
  animation: catHappy 0.55s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 0 rgba(120, 120, 140, 0.12));
}

.pixel-cat.is-happy .eyes-normal,
.pixel-cat.is-happy .eyes-sad,
.pixel-cat.is-happy .eyes-scared,
.pixel-cat.is-happy .mouth-sad,
.pixel-cat.is-happy .mouth-scared {
  opacity: 0;
}

.pixel-cat.is-happy .eyes-heart,
.pixel-cat.is-happy .mouth-normal,
.pixel-cat.is-happy .cheeks-normal {
  opacity: 1;
}

.pixel-cat.is-happy .held-heart {
  opacity: 1;
  animation: heartPulse 0.7s ease-in-out infinite alternate;
}

@keyframes catSad {
  0%,
  100% {
    transform: translateY(2px) scale(0.98);
  }
  50% {
    transform: translateY(5px) scale(0.97);
  }
}

.pixel-cat.is-playing {
  animation: catPlay 0.7s ease-in-out;
}

@keyframes catBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.025);
  }
}

@keyframes catHappy {
  0% {
    transform: translateY(0) scale(1) rotate(-2deg);
  }
  100% {
    transform: translateY(-10px) scale(1.06) rotate(2deg);
  }
}

@keyframes catPlay {
  0% {
    transform: scale(1) rotate(0deg);
  }
  20% {
    transform: scale(1.12) rotate(-8deg) translateY(-6px);
  }
  40% {
    transform: scale(1.08) rotate(10deg) translateY(-12px);
  }
  55% {
    transform: scale(1.14) rotate(-6deg) translateY(-4px);
  }
  70% {
    transform: scale(1.06) rotate(4deg) translateY(-8px);
  }
  100% {
    transform: scale(1) rotate(0deg) translateY(0);
  }
}

@keyframes heartPulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.12);
  }
}

.button-row {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 58px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  align-items: center;
  transition: gap 0.7s ease;
}

.button-row.is-solo {
  gap: 0;
}

.btn {
  font-family: var(--font-retro);
  font-size: clamp(0.48rem, 2vw, 0.58rem);
  letter-spacing: 0.06em;
  padding: 0.8rem 1.55rem;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.16),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:focus-visible {
  outline: 2px solid #5a3d4a;
  outline-offset: 3px;
}

.btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.btn-yes {
  background: linear-gradient(180deg, #ffb0d0 0%, var(--pink-btn) 55%, var(--pink-btn-edge) 100%);
  z-index: 2;
  transition:
    transform 0.35s ease,
    box-shadow 0.2s ease,
    opacity 0.35s ease,
    filter 0.2s ease;
}

.btn-yes:hover {
  filter: brightness(1.05);
}

.btn-yes.is-blasting {
  animation: yesBlast 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
  pointer-events: none;
}

.btn-yes.is-gone {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-width: 0 !important;
  overflow: hidden;
}

@keyframes yesBlast {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: brightness(1);
  }
  35% {
    transform: scale(1.4) rotate(-6deg);
    opacity: 1;
    filter: brightness(1.35);
  }
  100% {
    transform: scale(0) rotate(12deg);
    opacity: 0;
    filter: brightness(1.8);
  }
}

.btn-no {
  position: relative;
  background: linear-gradient(180deg, #cbcbcb 0%, var(--gray-btn) 55%, var(--gray-btn-edge) 100%);
  z-index: 3;
  transition: transform 0.2s ease, opacity 0.35s ease, filter 0.35s ease;
}

.btn-no.is-caught {
  position: fixed !important;
  z-index: 60;
  margin: 0 !important;
  pointer-events: none;
  transition: none !important;
}

.btn-no.is-wrapped {
  filter: brightness(1.15) drop-shadow(0 0 6px rgba(255, 255, 255, 0.85));
}

.btn-no.is-reeling-up {
  transition: none !important;
}

.btn-no.is-eaten {
  transform: scale(0) rotate(50deg) !important;
  opacity: 0;
  transition: transform 0.7s ease, opacity 0.7s ease !important;
}

.no-placeholder {
  display: inline-block;
  flex-shrink: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transition:
    width 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    min-width 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.75s ease;
}

/* Rose petal boom from YES */
.rose-burst-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
  overflow: hidden;
}

.rose-petal {
  position: absolute;
  width: 14px;
  height: 20px;
  margin-left: -7px;
  margin-top: -10px;
  border-radius: 80% 0 70% 0;
  background: #e85a7a;
  opacity: 0.95;
  animation: roseBoom 1.15s cubic-bezier(0.15, 0.75, 0.25, 1) forwards;
  will-change: transform, opacity;
}

.rose-petal.soft {
  background: #ff8fab;
  width: 12px;
  height: 17px;
}

.rose-petal.blush {
  background: #ffc0d0;
  width: 16px;
  height: 22px;
}

.rose-petal.deep {
  background: #c9184a;
  width: 11px;
  height: 16px;
}

.rose-petal.gold {
  background: #ffb4a2;
  width: 13px;
  height: 18px;
}

@keyframes roseBoom {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(0.4);
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--rx), var(--ry)) rotate(var(--rot)) scale(1);
    opacity: 0;
  }
}

/* Pixel spider — always hanging at top when card is live */
.spider-stage {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.spider-stage.is-visible {
  opacity: 1;
  visibility: visible;
}

.web-canvas {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.pixel-spider {
  position: fixed;
  left: 50%;
  top: 52px;
  width: 78px;
  height: 68px;
  transform: translate(-50%, 0);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
  animation: spiderIdle 2.8s ease-in-out infinite;
}

.pixel-spider.is-alert {
  animation: spiderAlert 0.7s ease-in-out infinite alternate;
}

.pixel-spider.is-reeling {
  animation: spiderBob 0.55s ease-in-out infinite alternate;
}

.pixel-spider.is-eating {
  animation: spiderChomp 0.85s ease;
}

.spider-svg {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.spider-chomp {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translateX(-50%) scale(0);
  font-family: var(--font-retro);
  font-size: 0.5rem;
  color: #e63946;
  opacity: 0;
  pointer-events: none;
}

.pixel-spider.is-eating .spider-chomp {
  animation: chompLabel 0.9s ease forwards;
}

@keyframes spiderIdle {
  0%,
  100% {
    transform: translate(-50%, 0) rotate(-2deg);
  }
  50% {
    transform: translate(-50%, 5px) rotate(2deg);
  }
}

@keyframes spiderAlert {
  0% {
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    transform: translate(-50%, 4px) scale(1.06);
  }
}

@keyframes spiderBob {
  0% {
    transform: translate(-50%, 0) scale(1) rotate(-5deg);
  }
  100% {
    transform: translate(-50%, 6px) scale(1.08) rotate(5deg);
  }
}

@keyframes spiderChomp {
  0%,
  100% {
    transform: translate(-50%, 0) scale(1);
  }
  30% {
    transform: translate(-50%, 8px) scale(1.28);
  }
  55% {
    transform: translate(-50%, 2px) scale(0.88);
  }
  75% {
    transform: translate(-50%, 6px) scale(1.18);
  }
}

@keyframes chompLabel {
  0% {
    transform: translateX(-50%) translateY(4px) scale(0.4);
    opacity: 0;
  }
  35% {
    transform: translateX(-50%) translateY(-12px) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-28px) scale(0.85);
    opacity: 0;
  }
}

.message-card {
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 12px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 220, 235, 0.95), rgba(255, 182, 210, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 0 28px rgba(255, 120, 170, 0.65),
    0 0 8px rgba(255, 158, 197, 0.8),
    inset 0 0 18px rgba(255, 255, 255, 0.45);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.message-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.message-card p {
  font-size: clamp(1.05rem, 3.6vw, 1.25rem);
  line-height: 1.4;
  color: var(--text-soft);
}

.scroll-arrow {
  margin-top: 0.85rem;
  font-size: 1.45rem;
  color: var(--pink-btn);
  line-height: 1;
  animation: arrowPulse 1.2s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(255, 158, 197, 0.7);
}

@keyframes arrowPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(7px);
  }
}

/* Celebration rain — hearts & petals */
.celebration-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.rain-piece {
  position: absolute;
  top: -40px;
  animation: rainFall linear forwards;
  opacity: 0.9;
}

.rain-heart {
  width: 14px;
  height: 14px;
  background: #e63946;
  clip-path: polygon(50% 88%, 0 28%, 22% 0, 50% 16%, 78% 0, 100% 28%);
}

.rain-heart.alt {
  background: #ff6b8a;
  width: 11px;
  height: 11px;
}

.rain-heart.soft {
  background: #ff9ec5;
  width: 16px;
  height: 16px;
}

.rain-petal {
  width: 12px;
  height: 18px;
  background: #ffb7c5;
  border-radius: 80% 0 80% 0;
  transform-origin: center;
}

.rain-petal.blush {
  background: #ffc8dd;
}

.rain-petal.rose {
  background: #ff8fab;
  width: 10px;
  height: 15px;
}

@keyframes rainFall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 0.95;
  }
  100% {
    transform: translateY(110vh) rotate(360deg) translateX(40px);
    opacity: 0.15;
  }
}

/* Spider "pull me" speech */
.spider-speech {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-retro);
  font-size: 0.42rem;
  letter-spacing: 0.04em;
  color: #5a3d4a;
  background: #fff;
  border: 2px solid #e8a0bc;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  box-shadow: 0 3px 10px rgba(80, 40, 70, 0.18);
  animation: speechBob 1.2s ease-in-out infinite;
  pointer-events: none;
}

.spider-speech::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #e8a0bc;
}

.spider-speech[hidden] {
  display: none !important;
}

@keyframes speechBob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(4px);
  }
}

.pixel-spider.is-pullable {
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  z-index: 56;
}

.pixel-spider.is-pullable:active,
.pixel-spider.is-dragging {
  cursor: grabbing;
}

.pixel-spider.is-dragging {
  animation: none !important;
}

/* Flower avalanche */
.flower-avalanche {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}

.flower-avalanche.is-active {
  opacity: 1;
}

.avalanche-flower {
  position: absolute;
  top: -40px;
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: radial-gradient(circle at 30% 30%, #ffe0ea, #ff6b8a 55%, #c9184a);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
  animation: avalancheFall linear forwards;
  opacity: 0.95;
}

.avalanche-flower.alt {
  background: radial-gradient(circle at 30% 30%, #fff0f5, #ff9ec5 50%, #e63946);
  width: 14px;
  height: 14px;
  border-radius: 80% 0 70% 0;
}

.avalanche-flower.leaf {
  background: radial-gradient(circle at 40% 30%, #c8f0c8, #6bbf6b);
  width: 12px;
  height: 16px;
  border-radius: 60% 0;
}

@keyframes avalancheFall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0) scale(0.6);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  100% {
    transform: translateY(115vh) rotate(540deg) translateX(var(--drift, 40px)) scale(1);
    opacity: 0.85;
  }
}

/* Scene wipe */
.scene-wipe {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: radial-gradient(circle at 50% 20%, #ffb7c5, #f6d5e4 40%, #d8d2e7);
  transform: scaleY(0);
  transform-origin: top center;
  pointer-events: none;
  opacity: 0;
}

.scene-wipe.is-covering {
  animation: wipeDown 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: auto;
}

@keyframes wipeDown {
  0% {
    transform: scaleY(0);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Puzzle screen */
.puzzle-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 182, 210, 0.45), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(216, 210, 231, 0.7), transparent 50%),
    #f6d5e4;
  opacity: 0;
  transform: scale(0.92) translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

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

.puzzle-particles .bg-particle {
  position: absolute;
  top: -30px;
  opacity: 0;
  animation: bgDrift linear forwards;
}

.puzzle-screen.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.puzzle-screen[hidden] {
  display: none !important;
}

.puzzle-screen:not([hidden]) {
  display: flex;
}

.puzzle-window {
  position: relative;
  z-index: 1;
  width: min(440px, 94vw);
  padding-top: 118px;
  overflow: visible;
  animation: windowFloat 4.5s ease-in-out infinite;
}

.puzzle-window-shell {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 16px 48px var(--shadow);
}

.puzzle-title-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1rem;
  background: linear-gradient(180deg, #f9c5d8 0%, var(--pink-bar) 55%, var(--pink-bar-edge) 100%);
}

.puzzle-title {
  font-family: var(--font-retro);
  font-size: clamp(0.42rem, 2vw, 0.55rem);
  letter-spacing: 0.12em;
  color: #5a3d4a;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 2;
}

/* Frame-peeping cat over HERSHITA title bar */
.frame-cat {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 4;
  width: clamp(108px, 30vw, 136px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.frame-cat-figure {
  width: 100%;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(80, 40, 70, 0.22));
  animation: frameCatBob 2.4s ease-in-out infinite;
  transform-origin: center bottom;
}

.frame-cat-svg {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.frame-cat .eyes-love,
.frame-cat .mouth-love,
.frame-cat .cheeks-love,
.frame-cat .eyes-shy,
.frame-cat .mouth-shy,
.frame-cat .cheeks-shy,
.frame-cat .eyes-wtf,
.frame-cat .mouth-wtf,
.frame-cat .peek-bangs {
  display: none;
}

.frame-cat.is-smirk .eyes-smirk,
.frame-cat.is-smirk .mouth-smirk {
  display: inline;
}

.frame-cat.is-love .eyes-smirk,
.frame-cat.is-love .mouth-smirk {
  display: none;
}

.frame-cat.is-love .eyes-love,
.frame-cat.is-love .mouth-love,
.frame-cat.is-love .cheeks-love {
  display: inline;
}

.frame-cat.is-love .peek-bangs {
  display: inline-flex;
}

.frame-cat.is-love .frame-cat-figure {
  filter:
    drop-shadow(0 4px 8px rgba(80, 40, 70, 0.22))
    drop-shadow(0 0 10px rgba(255, 77, 109, 0.55));
  animation: frameCatBob 2.4s ease-in-out infinite, frameLoveGlow 1.4s ease-in-out infinite;
}

.frame-cat.is-love .eyes-love {
  animation: heartEyeGlow 0.9s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 2px #ff4d6d);
}

.frame-cat.is-shy .eyes-smirk,
.frame-cat.is-shy .mouth-smirk,
.frame-cat.is-shy .eyes-love,
.frame-cat.is-shy .mouth-love,
.frame-cat.is-shy .cheeks-love,
.frame-cat.is-shy .peek-bangs {
  display: none;
}

.frame-cat.is-shy .eyes-shy,
.frame-cat.is-shy .mouth-shy,
.frame-cat.is-shy .cheeks-shy {
  display: inline;
}

.frame-cat.is-shy .frame-cat-figure {
  animation: frameCatShySway 2.8s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(80, 40, 70, 0.22));
}

.frame-cat.is-shy .frame-cat-bubble {
  border-color: #ff9eb8;
  animation: shyBubbleFloat 2.2s ease-in-out infinite;
}

.frame-cat.is-shy .cat-heart-btn:not([hidden]) {
  display: inline-flex;
}

.cat-heart-btn {
  position: relative;
  z-index: 5;
  margin-top: -0.15rem;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 7.5rem;
  min-height: 2.55rem;
  padding: 0.45rem 0.9rem 0.4rem;
  border: 2.5px solid #fff;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe0ea 0%, #ff9ebb 100%);
  color: #5a2038;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 3.6vw, 1.2rem);
  letter-spacing: 0.02em;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow:
    0 3px 0 rgba(201, 90, 130, 0.32),
    0 10px 22px rgba(180, 60, 100, 0.2);
  animation: catHeartPulse 1.6s ease-in-out infinite;
  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}

.cat-heart-btn[hidden] {
  display: none !important;
}

.cat-heart-btn:hover,
.cat-heart-btn:focus-visible {
  filter: brightness(1.05);
  outline: none;
  transform: translateY(-1px) scale(1.03);
}

.cat-heart-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow:
    0 1px 0 rgba(201, 90, 130, 0.32),
    0 4px 12px rgba(180, 60, 100, 0.16);
  animation: none;
}

.cat-heart-icon {
  font-size: 1.15em;
  line-height: 1;
  color: #e63946;
  animation: catHeartBeat 1.1s ease-in-out infinite;
}

@keyframes frameCatShySway {
  0%,
  100% {
    transform: rotate(-3deg) translateY(0);
  }
  50% {
    transform: rotate(2deg) translateY(2px);
  }
}

@keyframes shyBubbleFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-3px);
  }
}

@keyframes catHeartPulse {
  0%,
  100% {
    box-shadow:
      0 3px 0 rgba(201, 90, 130, 0.32),
      0 10px 22px rgba(180, 60, 100, 0.2);
  }
  50% {
    box-shadow:
      0 3px 0 rgba(201, 90, 130, 0.32),
      0 12px 28px rgba(255, 120, 160, 0.42);
  }
}

@keyframes catHeartBeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

.frame-cat.is-wtf .eyes-smirk,
.frame-cat.is-wtf .mouth-smirk,
.frame-cat.is-wtf .eyes-love,
.frame-cat.is-wtf .mouth-love,
.frame-cat.is-wtf .cheeks-love,
.frame-cat.is-wtf .eyes-shy,
.frame-cat.is-wtf .mouth-shy,
.frame-cat.is-wtf .cheeks-shy,
.frame-cat.is-wtf .peek-bangs {
  display: none;
}

.frame-cat.is-wtf .eyes-wtf,
.frame-cat.is-wtf .mouth-wtf {
  display: inline;
}

.frame-cat.is-wtf .frame-cat-figure {
  animation: catWtfShake 0.18s steps(2, end) infinite;
  filter: drop-shadow(0 4px 8px rgba(80, 40, 70, 0.3));
}

.frame-cat.is-wtf .frame-cat-bubble {
  border-color: #5a3d4a;
  animation: none;
  opacity: 1;
  transform: translateX(-50%) scale(1.05) rotate(-4deg);
}

.frame-cat.is-wtf .cat-heart-btn {
  display: none !important;
}

.frame-cat-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  z-index: 3;
  width: max-content;
  max-width: min(190px, 78vw);
  padding: 0.45rem 0.6rem;
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2.8vw, 1.05rem);
  line-height: 1.15;
  color: #5a3d4a;
  background: #fff;
  border: 2px solid #ff9ec5;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 4px 14px rgba(80, 40, 70, 0.18);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  pointer-events: auto;
  transform: translateX(-50%);
  animation: frameBubbleIn 0.55s ease 0.2s both;
}

.frame-cat-bubble .peek-line {
  display: block;
}

.peek-emoji,
.peek-mark {
  display: inline-block;
  transform-origin: center bottom;
  will-change: transform;
}

.peek-emoji.is-bounce {
  animation: peekEmojiBounce 1.1s ease-in-out infinite;
}

.peek-emoji.is-pulse {
  animation: peekEmojiPulse 1.35s ease-in-out infinite;
}

.peek-mark.is-wiggle {
  animation: peekMarkWiggle 1.15s ease-in-out infinite;
  color: #e85a8a;
  font-weight: 700;
}

@keyframes peekEmojiBounce {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg) scale(1);
  }
  40% {
    transform: translateY(-5px) rotate(8deg) scale(1.18);
  }
  70% {
    transform: translateY(-1px) rotate(-4deg) scale(1.05);
  }
}

@keyframes peekEmojiPulse {
  0%,
  100% {
    transform: scale(1) rotate(-4deg);
  }
  50% {
    transform: scale(1.22) rotate(6deg);
  }
}

/* Shared animated emoji glyphs (toasts, brands, copy) */
.emo {
  display: inline-block;
  transform-origin: center bottom;
  will-change: transform;
  vertical-align: -0.08em;
  line-height: 1;
}

.emo-beat {
  animation: emoBeat 1s ease-in-out infinite;
}

.emo-bob {
  animation: emoBob 1.1s ease-in-out infinite;
}

.emo-note {
  animation: emoNote 1.15s ease-in-out infinite;
}

.emo-rage {
  animation: emoRage 0.42s ease-in-out infinite;
}

.emo-sparkle {
  animation: emoSparkle 1.35s ease-in-out infinite;
}

@keyframes emoBeat {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }
  35% {
    transform: scale(1.22) translateY(-2px);
  }
  55% {
    transform: scale(0.92) translateY(0);
  }
  75% {
    transform: scale(1.12) translateY(-1px);
  }
}

@keyframes emoBob {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg) scale(1);
  }
  40% {
    transform: translateY(-5px) rotate(10deg) scale(1.16);
  }
  70% {
    transform: translateY(-1px) rotate(-4deg) scale(1.04);
  }
}

@keyframes emoNote {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-6px) rotate(8deg) scale(1.18);
    opacity: 0.85;
  }
}

@keyframes emoRage {
  0%,
  100% {
    transform: translateX(0) rotate(-6deg) scale(1);
  }
  25% {
    transform: translateX(-2px) rotate(8deg) scale(1.12);
  }
  50% {
    transform: translateX(2px) rotate(-10deg) scale(1.08);
  }
  75% {
    transform: translateX(-1px) rotate(6deg) scale(1.14);
  }
}

@keyframes emoSparkle {
  0%,
  100% {
    transform: scale(1) rotate(-4deg);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.2) rotate(8deg);
    filter: brightness(1.15);
  }
}

@keyframes peekMarkWiggle {
  0%,
  100% {
    transform: translateY(0) rotate(-12deg) scale(1);
  }
  35% {
    transform: translateY(-4px) rotate(14deg) scale(1.2);
  }
  65% {
    transform: translateY(-1px) rotate(-8deg) scale(1.08);
  }
}

.peek-bangs {
  position: absolute;
  right: -0.15rem;
  top: -0.35rem;
  align-items: center;
  gap: 0;
}

.peek-bang {
  display: inline;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  font-family: var(--font-retro);
  font-size: 0.5rem;
  color: #c9184a;
  animation: peekBangBob 1.05s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}

@keyframes peekBangBob {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg) scale(1);
  }
  50% {
    transform: translateY(-3px) rotate(10deg) scale(1.15);
  }
}

.peek-bang:hover,
.peek-bang:focus-visible {
  transform: scale(1.25);
  outline: none;
}

.peek-bang.is-pop {
  animation: pixelHeartPop 0.5s steps(4, end);
}

@keyframes bangPulse {
  0%,
  100% {
    transform: scale(1) translateY(0) rotate(-6deg);
  }
  50% {
    transform: scale(1.25) translateY(-3px) rotate(6deg);
  }
}

@keyframes frameCatBob {
  0%,
  100% {
    transform: translateY(0) rotate(-1.5deg);
  }
  50% {
    transform: translateY(-5px) rotate(1.5deg);
  }
}

@keyframes frameLoveGlow {
  0%,
  100% {
    filter:
      drop-shadow(0 4px 8px rgba(80, 40, 70, 0.22))
      drop-shadow(0 0 8px rgba(255, 77, 109, 0.4));
  }
  50% {
    filter:
      drop-shadow(0 4px 8px rgba(80, 40, 70, 0.22))
      drop-shadow(0 0 16px rgba(255, 77, 109, 0.85));
  }
}

@keyframes heartEyeGlow {
  0% {
    opacity: 0.85;
  }
  100% {
    opacity: 1;
  }
}

@keyframes frameBubbleIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.puzzle-celebrate {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
}

.puzzle-celebrate-piece {
  position: fixed;
  pointer-events: none;
  z-index: 120;
  opacity: 0.95;
  will-change: transform, opacity;
}

.puzzle-celebrate-piece.is-heart {
  width: 14px;
  height: 14px;
  background: #e63946;
  clip-path: polygon(50% 88%, 0 28%, 22% 0, 50% 16%, 78% 0, 100% 28%);
  animation: puzzleBurst 1.35s cubic-bezier(0.15, 0.75, 0.25, 1) forwards;
}

.puzzle-celebrate-piece.is-heart.alt {
  background: #ff6b8a;
  width: 11px;
  height: 11px;
}

.puzzle-celebrate-piece.is-heart.soft {
  background: #ff9ec5;
  width: 17px;
  height: 17px;
}

.puzzle-celebrate-piece.is-flower {
  width: 13px;
  height: 19px;
  border-radius: 80% 0 70% 0;
  background: #ff8fab;
  animation: puzzleBurst 1.45s cubic-bezier(0.15, 0.75, 0.25, 1) forwards;
}

.puzzle-celebrate-piece.is-flower.blush {
  background: #ffc0d0;
  width: 15px;
  height: 21px;
}

.puzzle-celebrate-piece.is-flower.rose {
  background: #e85a7a;
  width: 12px;
  height: 17px;
}

.puzzle-celebrate-piece.is-fall {
  animation: puzzleFall 2.6s linear forwards !important;
}

@keyframes puzzleBurst {
  0% {
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--rx)), calc(-50% + var(--ry))) scale(1) rotate(var(--rot));
    opacity: 0;
  }
}

@keyframes puzzleFall {
  0% {
    transform: translate(-50%, -50%) translateY(0) rotate(0deg);
    opacity: 0.95;
  }
  100% {
    transform: translate(-50%, -50%) translateY(110vh) rotate(220deg);
    opacity: 0;
  }
}

.puzzle-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  background-image:
    linear-gradient(45deg, var(--pink-light) 25%, transparent 25%),
    linear-gradient(-45deg, var(--pink-light) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--pink-light) 75%),
    linear-gradient(-45deg, transparent 75%, var(--pink-light) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.puzzle-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: min(340px, 82vw);
  aspect-ratio: 1;
  padding: 6px;
  background: rgba(255, 255, 255, 0.65);
  border: 2px dotted rgba(180, 120, 140, 0.55);
  border-radius: 12px;
  touch-action: none;
  user-select: none;
  position: relative;
}

.puzzle-tile {
  position: relative;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
  background-color: #fce4ec;
  background-repeat: no-repeat !important;
  background-size: 300% 300% !important;
  cursor: grab;
  overflow: hidden;
  transition: box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
  animation: tilePopIn 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) backwards;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.puzzle-tile:nth-child(1) { animation-delay: 0.04s; }
.puzzle-tile:nth-child(2) { animation-delay: 0.08s; }
.puzzle-tile:nth-child(3) { animation-delay: 0.12s; }
.puzzle-tile:nth-child(4) { animation-delay: 0.16s; }
.puzzle-tile:nth-child(5) { animation-delay: 0.2s; }
.puzzle-tile:nth-child(6) { animation-delay: 0.24s; }
.puzzle-tile:nth-child(7) { animation-delay: 0.28s; }
.puzzle-tile:nth-child(8) { animation-delay: 0.32s; }
.puzzle-tile:nth-child(9) { animation-delay: 0.36s; }

.puzzle-tile.is-source {
  opacity: 0.35;
  filter: grayscale(0.2);
  cursor: grabbing;
}

.puzzle-tile.is-drop-target {
  box-shadow: 0 0 0 3px #ff6b8a, 0 4px 12px rgba(255, 107, 138, 0.35);
  filter: brightness(1.08);
}

.puzzle-tile.is-locked {
  cursor: default;
  box-shadow: 0 0 0 2px rgba(107, 203, 119, 0.75);
}

.puzzle-drag-ghost {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(80, 40, 70, 0.35);
  background-repeat: no-repeat !important;
  background-size: 300% 300% !important;
  background-color: #fce4ec;
  opacity: 0.95;
  transform: translate(-50%, -50%) scale(1.08);
  will-change: left, top;
}

@keyframes tilePopIn {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes tileCorrect {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.25);
  }
}

.puzzle-status {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: #7a3d55;
  min-height: 1.4em;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.puzzle-status .song-title {
  font-family: var(--font-retro);
  font-size: clamp(0.38rem, 1.8vw, 0.48rem);
  letter-spacing: 0.08em;
  color: #c9184a;
}

.mix-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.15rem;
  padding: 0.72rem 1.25rem 0.68rem;
  min-height: 2.75rem;
  min-width: min(16rem, 78vw);
  border: 2.5px solid #fff;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb8d2 0%, #ff7fa8 100%);
  color: #2a1018;
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 3px 0 rgba(201, 90, 130, 0.35),
    0 10px 24px rgba(180, 60, 100, 0.22);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    box-shadow 0.15s ease;
  animation: mixOpenPulse 1.8s ease-in-out infinite;
}

.mix-open-btn:hover,
.mix-open-btn:focus-visible {
  filter: brightness(1.05);
  outline: none;
  transform: translateY(-1px);
}

.mix-open-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(201, 90, 130, 0.35),
    0 4px 12px rgba(180, 60, 100, 0.18);
  animation: none;
}

.mix-open-arrow {
  display: inline-block;
  line-height: 1;
  animation: swipeArrowNudge 1.4s ease-in-out infinite;
}

@keyframes mixOpenPulse {
  0%,
  100% {
    box-shadow:
      0 3px 0 rgba(201, 90, 130, 0.35),
      0 10px 24px rgba(180, 60, 100, 0.22);
  }
  50% {
    box-shadow:
      0 3px 0 rgba(201, 90, 130, 0.35),
      0 12px 28px rgba(255, 120, 160, 0.38);
  }
}

.puzzle-status .scroll-cue {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  font-size: clamp(0.95rem, 3vw, 1.05rem);
  color: rgba(90, 61, 74, 0.72);
  cursor: pointer;
  pointer-events: auto;
  letter-spacing: 0.02em;
  opacity: 0.85;
  animation: scrollCueBob 1.8s ease-in-out infinite;
}

.puzzle-status .scroll-cue .scroll-arrow-mark {
  font-size: 0.95em;
  line-height: 1;
  animation: swipeArrowNudge 1.4s ease-in-out infinite;
}

@keyframes scrollCueBob {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@keyframes swipeArrowNudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(7px);
  }
}

@keyframes catWtfShake {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(1px) rotate(6deg);
  }
}

.puzzle-screen.is-complete {
  touch-action: pan-x;
  cursor: grab;
}

.puzzle-screen.is-complete.is-swiping {
  cursor: grabbing;
}

.puzzle-screen.is-complete .puzzle-board {
  box-shadow: 0 0 28px rgba(255, 120, 170, 0.55);
}

.puzzle-screen.is-complete .frame-cat-bubble {
  border-color: #ff6b8a;
}

.puzzle-screen.is-leaving {
  pointer-events: none;
  animation: puzzleSoftExit 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.puzzle-screen.is-gone {
  display: none !important;
}

@keyframes puzzleSoftExit {
  0% {
    opacity: 1;
    transform: scale(1) translateX(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.96) translateX(-36px);
    filter: blur(6px);
  }
}

/* Drag progress while swiping right — transform/opacity only (no live blur) */
.puzzle-screen.is-complete.is-swiping .puzzle-window {
  animation: none;
  transform: translate3d(calc(var(--swipe, 0) * -18vw), 0, 0)
    scale(calc(1 - var(--swipe, 0) * 0.04));
  opacity: calc(1 - var(--swipe, 0) * 0.22);
  transition: none;
  will-change: transform, opacity;
}

.playlist-screen {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: stretch;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  background: #1a1016;
}

.playlist-screen.is-visible {
  opacity: 1;
}

.playlist-screen[hidden] {
  display: none !important;
}

.playlist-screen:not([hidden]) {
  display: flex;
}

.playlist-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 55% at 18% 0%, rgba(255, 120, 160, 0.45), transparent 58%),
    radial-gradient(ellipse 75% 50% at 92% 28%, rgba(255, 150, 185, 0.3), transparent 52%),
    radial-gradient(ellipse 95% 55% at 50% 100%, rgba(230, 90, 140, 0.38), transparent 60%),
    radial-gradient(ellipse 70% 45% at 20% 85%, rgba(255, 120, 160, 0.22), transparent 55%),
    radial-gradient(ellipse 65% 42% at 70% 62%, rgba(255, 120, 160, 0.2), transparent 50%),
    linear-gradient(180deg, #1a1016 0%, #24141e 40%, #2a1620 70%, #23141c 100%);
}

.playlist-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

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

.playlist-particles .bg-particle {
  position: absolute;
  top: -36px;
  opacity: 0;
  animation: playlistDrift linear forwards;
  filter: drop-shadow(0 2px 6px rgba(255, 100, 140, 0.25));
}

@keyframes playlistDrift {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(0.85);
    opacity: 0;
  }
  6% {
    opacity: 0.7;
  }
  35% {
    transform: translateY(38vh) translateX(var(--sway, 20px)) rotate(120deg) scale(1);
    opacity: 0.55;
  }
  70% {
    transform: translateY(75vh) translateX(calc(var(--sway, 20px) * -0.6)) rotate(250deg) scale(0.95);
    opacity: 0.4;
  }
  100% {
    transform: translateY(115vh) translateX(calc(var(--sway, 20px) * 0.35)) rotate(400deg) scale(0.8);
    opacity: 0;
  }
}

.playlist-shell {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  align-self: center;
  width: min(520px, 100%);
  min-height: 0;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(0.85rem, env(safe-area-inset-bottom));
  overflow: hidden;
  opacity: 0;
  transform: translateX(24px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.playlist-screen.is-visible .playlist-shell {
  opacity: 1;
  transform: translateX(0);
}

.playlist-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-right: 0.15rem;
  mask-image: linear-gradient(180deg, #000 96%, transparent 100%);
}

.playlist-scroll::-webkit-scrollbar {
  width: 5px;
}

.playlist-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 158, 197, 0.35);
  border-radius: 999px;
}

.playlist-hero {
  display: flex;
  gap: 1.1rem;
  align-items: flex-end;
  flex: 0 0 auto;
}

.playlist-cover {
  position: relative;
  flex: 0 0 auto;
  width: clamp(108px, 28vw, 148px);
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: visible;
  background:
    radial-gradient(circle at 30% 30%, #ffc1d6, transparent 55%),
    radial-gradient(circle at 70% 70%, #c9184a, transparent 50%),
    linear-gradient(145deg, #5a2a3a, #1a1016);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
}

.playlist-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 3;
}

.cover-cat {
  position: relative;
  width: 88%;
  z-index: 1;
}

.cover-cat-svg {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.cover-cat.is-vibing {
  animation: coverCatVibe 0.55s ease-in-out infinite;
  transform-origin: center bottom;
}

.cover-cat.is-vibing.is-playing-hard {
  animation-duration: 0.35s;
}

.vibe-note {
  position: absolute;
  font-size: 0.75rem;
  color: #ff9ec5;
  pointer-events: none;
  opacity: 0;
}

.cover-cat .vibe-note.n1 {
  right: -4%;
  top: 18%;
  animation: vibeNoteFloat 1.4s ease-in-out infinite;
}

.cover-cat .vibe-note.n2 {
  left: -2%;
  top: 8%;
  animation: vibeNoteFloat 1.4s ease-in-out 0.45s infinite;
}

@keyframes coverCatVibe {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-5px) rotate(3deg);
  }
}

@keyframes vibeNoteFloat {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.8);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(1.1);
  }
}

.cover-grain {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.04) 2px,
    rgba(255, 255, 255, 0.04) 3px
  );
  pointer-events: none;
  z-index: 2;
}

.playlist-meta {
  flex: 1;
  min-width: 0;
  padding-bottom: 0.15rem;
  color: #f7eef2;
}

.playlist-kicker {
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 214, 226, 0.7);
  margin-bottom: 0.35rem;
}

.playlist-title {
  font-family: var(--font-retro);
  font-size: clamp(0.7rem, 3.2vw, 1rem);
  line-height: 1.35;
  letter-spacing: 0.12em;
  color: #fff;
  margin-bottom: 0.55rem;
  text-shadow: 0 2px 18px rgba(255, 120, 160, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.playlist-title-text {
  display: inline-block;
}

.bloom-flower {
  position: relative;
  width: 28px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-block;
}

.bloom-stem {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2px;
  height: 16px;
  margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7ec28a, #3f8f58);
  transform-origin: bottom center;
  animation: bloomStem 3.6s ease-in-out infinite;
}

.bloom-leaf {
  position: absolute;
  bottom: 7px;
  width: 8px;
  height: 5px;
  border-radius: 80% 0 80% 0;
  background: #5aaa6c;
  opacity: 0.9;
}

.bloom-leaf-l {
  left: 3px;
  transform: rotate(-28deg);
  animation: bloomLeafL 3.6s ease-in-out infinite;
}

.bloom-leaf-r {
  right: 3px;
  transform: rotate(28deg) scaleX(-1);
  animation: bloomLeafR 3.6s ease-in-out infinite;
}

.bloom-bud {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  transform-origin: center 70%;
  animation: bloomOpen 3.6s ease-in-out infinite;
}

.bloom-petal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 10px;
  margin: -8px 0 0 -3.5px;
  border-radius: 60% 60% 45% 45%;
  background: linear-gradient(180deg, #ffd0e0, #ff7fa8 70%, #e85a8a);
  transform-origin: 50% 100%;
  animation: bloomPetal 3.6s ease-in-out infinite;
}

.bloom-petal.p1 { --pr: 0deg; }
.bloom-petal.p2 { --pr: 60deg; }
.bloom-petal.p3 { --pr: 120deg; }
.bloom-petal.p4 { --pr: 180deg; }
.bloom-petal.p5 { --pr: 240deg; }
.bloom-petal.p6 { --pr: 300deg; }

.bloom-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe8a8, #f0b429 70%, #d4890f);
  box-shadow: 0 0 6px rgba(255, 200, 120, 0.55);
  animation: bloomCenter 3.6s ease-in-out infinite;
}

@keyframes bloomOpen {
  0%,
  12% {
    transform: scale(0.55);
  }
  45%,
  62% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(0.55);
  }
}

@keyframes bloomStem {
  0%,
  100% {
    transform: scaleY(0.85);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes bloomLeafL {
  0%,
  100% {
    transform: rotate(-18deg) scale(0.7);
  }
  50% {
    transform: rotate(-34deg) scale(1);
  }
}

@keyframes bloomLeafR {
  0%,
  100% {
    transform: rotate(18deg) scaleX(-1) scale(0.7);
  }
  50% {
    transform: rotate(34deg) scaleX(-1) scale(1);
  }
}

@keyframes bloomCenter {
  0%,
  18% {
    transform: scale(0.5);
    opacity: 0.55;
  }
  50%,
  65% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(0.5);
    opacity: 0.55;
  }
}

@keyframes bloomPetal {
  0%,
  12% {
    transform: rotate(var(--pr, 0deg)) translateY(0) scale(0.28);
  }
  45%,
  62% {
    transform: rotate(var(--pr, 0deg)) translateY(-3px) scale(1);
  }
  100% {
    transform: rotate(var(--pr, 0deg)) translateY(0) scale(0.28);
  }
}

.playlist-desc {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 3.8vw, 1.4rem);
  line-height: 1.25;
  color: rgba(255, 236, 242, 0.88);
  margin-bottom: 0.45rem;
}

.playlist-by {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(255, 214, 226, 0.62);
}

.playlist-by span {
  color: #ffb7c5;
}

.playlist-tracks {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  border-radius: 14px;
  background: rgba(22, 12, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: visible;
}

.playlist-track {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.78rem 0.95rem;
  color: #f7eef2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.35s ease,
    max-height 0.4s ease,
    padding 0.35s ease,
    border-width 0.25s ease,
    margin 0.35s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: trackIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  max-height: 5.5rem;
  overflow: hidden;
}

.playlist-track:last-child {
  border-bottom: none;
}

.playlist-track:hover,
.playlist-track:focus-visible {
  background: rgba(255, 158, 197, 0.12);
  outline: none;
}

.playlist-track.is-missing {
  opacity: 0.45;
}

.playlist-track.is-playing .track-num {
  color: #ff9ec5;
}

.playlist-track.is-web-latched {
  background: rgba(255, 158, 197, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 158, 197, 0.45);
}

.playlist-track.is-taken {
  opacity: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border-width: 0 !important;
  pointer-events: none;
  transform: none !important;
  animation: none !important;
}

.playlist-track.is-returning {
  animation: trackReturn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes trackReturn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.web-track-flyer {
  position: fixed;
  z-index: 9;
  pointer-events: none;
  margin: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.78rem 0.95rem;
  color: #f7eef2;
  border-radius: 12px;
  background: rgba(40, 20, 30, 0.96);
  border: 1.5px solid rgba(255, 158, 197, 0.55);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(255, 120, 160, 0.28);
  opacity: 1;
  transform: translate(0, 0) rotate(0deg) scale(1);
  will-change: transform, left, top, opacity, width, height;
  overflow: hidden;
}

.web-track-flyer.is-flying {
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(255, 130, 170, 0.4);
}

.web-track-flyer.is-docking {
  border-color: rgba(255, 190, 210, 0.85);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(255, 150, 185, 0.45);
}

.web-track-flyer .track-name,
.web-track-flyer .track-artist,
.web-track-flyer .track-dur,
.web-track-flyer .track-num {
  font-family: var(--font-body);
}

.web-track-flyer .track-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.web-track-flyer .track-name {
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.web-track-flyer .track-artist {
  font-size: 0.95rem;
  color: rgba(255, 214, 226, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.web-track-flyer .track-num {
  color: #ff9ec5;
}

.web-track-flyer .track-dur {
  color: rgba(255, 214, 226, 0.55);
  font-variant-numeric: tabular-nums;
}

.mini-player-dock {
  position: relative;
  flex: 0 0 auto;
  z-index: 5;
  padding-top: 1.1rem;
}

.dj-spider {
  position: absolute;
  top: -22px;
  right: 22px;
  width: 52px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: 50% 85%;
  -webkit-tap-highlight-color: transparent;
}

.dj-spider:focus-visible {
  outline: 2px solid rgba(255, 158, 197, 0.7);
  outline-offset: 4px;
  border-radius: 8px;
}

.dj-spider-svg {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.dj-spider.is-vibing {
  animation: spiderClimbVibe 1.1s ease-in-out infinite;
}

.dj-spider.is-fetching {
  animation: spiderReelYank 0.28s ease-in-out infinite;
  pointer-events: none;
}

.dj-spider .vibe-note {
  right: -8px;
  top: -6px;
  animation: vibeNoteFloat 1.2s ease-in-out infinite;
}

.spider-bubble {
  position: absolute;
  right: calc(100% + 6px);
  top: -6px;
  width: max-content;
  max-width: 7.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 12px 12px 4px 12px;
  background: #fff6f8;
  border: 2px solid #ff9ec5;
  color: #5a3d4a;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.15;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  animation: spiderBubblePop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  z-index: 6;
}

.spider-bubble[hidden] {
  display: none !important;
}

.spider-bubble::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 8px;
  border: 6px solid transparent;
  border-left-color: #ff9ec5;
}

@keyframes spiderBubblePop {
  from {
    opacity: 0;
    transform: translateX(8px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes spiderClimbVibe {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg) scale(1);
  }
  35% {
    transform: translateY(-3px) rotate(-2deg) scale(1.02);
  }
  70% {
    transform: translateY(-1px) rotate(-9deg) scale(1);
  }
}

@keyframes spiderReelYank {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg) scale(1);
  }
  50% {
    transform: translateY(4px) rotate(6deg) scale(1.06);
  }
}

.mini-player {
  position: relative;
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  gap: 0.45rem 0.55rem;
  align-items: center;
  padding: 0.85rem 0.95rem 0.8rem;
  border-radius: 16px;
  background: rgba(28, 16, 22, 0.96);
  border: 1px solid rgba(255, 158, 197, 0.22);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  overflow: visible;
}

.mini-player.is-idle .mini-player-bar,
.mini-player.is-idle .mini-player-times {
  opacity: 0.35;
}

.spider-web-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  pointer-events: none;
  overflow: visible;
}

.spider-web-strand {
  fill: none;
  stroke: rgba(255, 245, 250, 0.88);
  stroke-width: 1.6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.55));
}

.spider-web-strand.is-glow {
  stroke: rgba(255, 190, 210, 0.55);
  stroke-width: 4.5;
  filter: blur(1.2px) drop-shadow(0 0 6px rgba(255, 160, 190, 0.45));
}

.spider-web-strand.is-guide {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 0.9;
  stroke-dasharray: 2 6;
}

.mini-player-btn {
  width: 2.1rem;
  height: 2.1rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffe8f0;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}

.mini-player-btn.is-main {
  width: 2.55rem;
  height: 2.55rem;
  background: linear-gradient(180deg, #ff9ec5, #e85a8a);
  color: #2a1018;
  font-size: 0.85rem;
  box-shadow: 0 4px 14px rgba(232, 90, 138, 0.4);
}

.mini-player-btn:hover,
.mini-player-btn:focus-visible {
  outline: none;
  filter: brightness(1.08);
}

.mini-player-meta {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.mini-player-title,
.mini-player-artist {
  font-family: var(--font-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.mini-player-title {
  font-size: 1.15rem;
  color: #fff;
}

.mini-player-artist {
  font-size: 0.95rem;
  color: rgba(255, 214, 226, 0.6);
}

.mini-player-bar {
  position: relative;
  height: 4px;
  margin-top: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mini-player-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff9ec5, #ff6b8a);
}

.mini-player-times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255, 214, 226, 0.45);
}

.track-num {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(255, 214, 226, 0.45);
  text-align: center;
}

.track-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.track-name {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 214, 226, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-dur {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 214, 226, 0.4);
  font-variant-numeric: tabular-nums;
}

.playlist-footnote {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(255, 214, 226, 0.42);
  text-align: center;
  padding: 0.85rem 0.5rem 1.25rem;
}

@keyframes trackIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .playlist-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .playlist-cover {
    width: 112px;
  }
}

@media (max-width: 380px) {
  .card-inner {
    min-height: 400px;
    padding: 1rem 0.75rem 1.2rem;
  }

  .btn {
    padding: 0.7rem 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .love-card,
  .pixel-cat,
  .pixel-cat.is-happy,
  .pixel-cat.is-happy .held-heart,
  .pixel-cat.is-sad,
  .pixel-cat.is-playing,
  .cat-heart-btn,
  .cat-heart-icon,
  .mix-open-btn,
  .mix-open-arrow,
  .scroll-arrow,
  .float-heart,
  .envelope-wrap,
  .bow-hint,
  .rain-piece,
  .bg-particle,
  .mini-heart,
  .pixel-spider,
  .pixel-spider.is-alert,
  .pixel-spider.is-reeling,
  .pixel-spider.is-eating,
  .pixel-cat.is-scared,
  .avalanche-flower,
  .scene-wipe.is-covering,
  .puzzle-tile,
  .title-heart,
  .title-heart-spark,
  .puzzle-celebrate-piece,
  .arrow.is-flying,
  .playlist-track.is-returning,
  .cover-cat.is-vibing,
  .cover-cat.is-vibing.is-playing-hard,
  .dj-spider.is-vibing,
  .dj-spider.is-fetching,
  .vibe-note,
  .seal-heart,
  .emo,
  .emo-beat,
  .emo-bob,
  .emo-note,
  .emo-rage,
  .emo-sparkle,
  .peek-emoji,
  .peek-mark,
  .peek-bang,
  .ad-loading-pulse,
  .bloom-stem,
  .bloom-leaf,
  .bloom-bud,
  .bloom-petal,
  .bloom-center {
    animation: none;
  }

  .banner p,
  .message-card,
  .intro-screen,
  .love-card,
  .pixel-cat {
    transition: none;
  }

  .ad-offer-card,
  .ad-theater-frame,
  .ad-offer.is-open .ad-offer-card {
    animation: none;
    transition: none;
  }
}

/* ========== CUTE AD BREAK ========== */
.ad-offer,
.ad-theater {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 1.1rem;
}

.ad-offer[hidden],
.ad-theater[hidden] {
  display: none !important;
}

.ad-offer-backdrop,
.ad-theater-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(255, 120, 160, 0.28), transparent 60%),
    rgba(18, 10, 16, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.55s ease;
}

.ad-offer.is-open .ad-offer-backdrop,
.ad-theater.is-open .ad-theater-backdrop {
  opacity: 1;
}

.ad-offer-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 190, 210, 0.35), transparent 45%),
    linear-gradient(165deg, #fff6f8 0%, #ffe4ee 55%, #ffd6e6 100%);
  border: 3px solid #fff;
  box-shadow:
    0 4px 0 rgba(201, 90, 130, 0.35),
    0 22px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
  color: #5a3d4a;
  transform: translateY(18px) scale(0.94);
  opacity: 0;
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ad-offer.is-open .ad-offer-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: adCardPop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes adCardPop {
  0% {
    transform: translateY(22px) scale(0.9) rotate(-1.5deg);
  }
  60% {
    transform: translateY(-4px) scale(1.03) rotate(1deg);
  }
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

.ad-offer-kicker {
  margin: 0 0 0.55rem;
  font-family: var(--font-retro);
  font-size: clamp(0.42rem, 2vw, 0.52rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9184a;
}

.ad-offer-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-retro);
  font-size: clamp(0.72rem, 3.4vw, 0.95rem);
  line-height: 1.45;
  color: #5a3d4a;
}

.ad-offer-copy {
  margin: 0 0 1.15rem;
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 4.2vw, 1.45rem);
  line-height: 1.25;
  color: #7a5564;
}

.ad-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.ad-offer-fine {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(90, 61, 74, 0.55);
}

.ad-theater-frame {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 0.85rem 0.85rem 1rem;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(255, 140, 175, 0.35), transparent 55%),
    linear-gradient(180deg, #2a1620 0%, #1a1016 100%);
  border: 2px solid rgba(255, 158, 197, 0.35);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: translateY(20px) scale(0.94);
  opacity: 0;
  transition:
    opacity 0.4s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ad-theater.is-open .ad-theater-frame {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ad-theater-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.ad-theater-brand {
  margin: 0;
  font-family: var(--font-retro);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  color: #ff9ec5;
}

.ad-theater-progress {
  display: none !important;
}

.ad-theater-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffe8f0;
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
}

.ad-theater-close:hover,
.ad-theater-close:focus-visible {
  background: rgba(255, 158, 197, 0.25);
  outline: none;
}

.ad-theater-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #10080c;
  border: 1px solid rgba(255, 158, 197, 0.22);
  aspect-ratio: 9 / 16;
  max-height: min(62vh, 520px);
  margin: 0 auto;
  width: min(100%, 320px);
}

.ad-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  opacity: 1;
  transition: opacity 0.35s ease;
  position: relative;
  z-index: 1;
}

.ad-video.is-waiting {
  opacity: 0;
}

.ad-video.is-playing-vis {
  opacity: 1;
}

.ad-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.04);
  transition: opacity 0.45s ease, filter 0.45s ease;
}

.ad-poster.is-dim {
  opacity: 0.35;
  filter: blur(6px) saturate(0.9);
}

.ad-poster:not([src]),
.ad-poster[src=""] {
  opacity: 0;
}

.ad-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  place-content: center;
  gap: 0.75rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, rgba(255, 140, 175, 0.22), transparent 65%),
    rgba(16, 8, 12, 0.55);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.ad-loading[hidden] {
  display: none !important;
}

.ad-loading.is-hiding {
  opacity: 0;
}

.ad-loading-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  color: #ffe8f0;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.ad-loading-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff9ec5;
  box-shadow: 0 0 12px rgba(255, 158, 197, 0.7);
  animation: adLoadPulse 1.1s ease-in-out infinite;
}

@keyframes adLoadPulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

.ad-theater-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 22%, rgba(255, 180, 210, 0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 78%, rgba(255, 255, 255, 0.25) 0 1px, transparent 2px);
  opacity: 0.45;
  animation: adSparkle 2.8s ease-in-out infinite;
}

@keyframes adSparkle {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.55;
  }
}

.ad-theater-caption {
  margin: 0.75rem 0 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: rgba(255, 214, 226, 0.75);
}

.ad-goof-line {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  z-index: 2;
  max-width: calc(100% - 1.4rem);
  margin: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(28, 14, 22, 0.78);
  border: 1px solid rgba(255, 158, 197, 0.4);
  color: #ffe8f0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 3.6vw, 1.15rem);
  text-align: center;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s ease;
}

.ad-goof-line.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ad-endcard {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  place-items: center;
  gap: 0.45rem;
  padding: 1.2rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(255, 140, 175, 0.28), transparent 60%),
    rgba(16, 8, 12, 0.72);
  text-align: center;
}

.ad-endcard[hidden] {
  display: none !important;
}

.ad-endcard-title {
  margin: 0;
  font-family: var(--font-retro);
  font-size: clamp(0.55rem, 2.6vw, 0.72rem);
  letter-spacing: 0.08em;
  color: #ffe8f0;
}

.ad-endcard-copy {
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: rgba(255, 214, 226, 0.78);
}

.ad-endcard .btn {
  font-size: clamp(0.42rem, 2vw, 0.5rem);
  padding: 0.7rem 1.2rem;
}

.ad-replay-btn {
  display: block;
  margin: 0.35rem auto 0.85rem;
  border: none;
  background: transparent;
  color: rgba(255, 190, 210, 0.72);
  font-family: var(--font-body);
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.ad-replay-btn:hover,
.ad-replay-btn:focus-visible {
  color: #ffd6e6;
  outline: none;
}

.ad-replay-btn[hidden] {
  display: none !important;
}

.ad-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.4rem, env(safe-area-inset-bottom));
  z-index: 230;
  transform: translateX(-50%) translateY(12px);
  max-width: min(340px, calc(100% - 2rem));
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(40, 20, 30, 0.94);
  border: 1.5px solid rgba(255, 158, 197, 0.45);
  color: #ffe8f0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s ease;
}

.ad-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ========== SPIDER MINI-GAMES ========== */
.game-offer,
.game-picker,
.game-stage {
  position: fixed;
  inset: 0;
  z-index: 225;
  display: grid;
  place-items: center;
  padding: 1.1rem;
}

.game-offer[hidden],
.game-picker[hidden],
.game-stage[hidden] {
  display: none !important;
}

.game-offer-backdrop,
.game-picker-backdrop,
.game-stage-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(255, 120, 160, 0.22), transparent 60%),
    rgba(18, 10, 16, 0.72);
}

.game-offer-card,
.game-picker-card,
.game-stage-frame {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 190, 210, 0.35), transparent 45%),
    linear-gradient(165deg, #fff6f8 0%, #ffe4ee 55%, #ffd6e6 100%);
  border: 3px solid #fff;
  box-shadow:
    0 4px 0 rgba(201, 90, 130, 0.28),
    0 22px 50px rgba(0, 0, 0, 0.35);
  color: #5a3d4a;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition:
    opacity 0.28s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.game-offer.is-open .game-offer-card,
.game-picker.is-open .game-picker-card,
.game-stage.is-open .game-stage-frame {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.game-offer-card {
  padding: 1.35rem 1.25rem 1.15rem;
}

.game-offer-kicker,
.game-picker-kicker {
  margin: 0 0 0.45rem;
  font-family: var(--font-retro);
  font-size: 0.42rem;
  letter-spacing: 0.1em;
  color: #c9184a;
}

.game-offer-title,
.game-picker-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: clamp(1.55rem, 5vw, 1.9rem);
  line-height: 1.15;
  color: #2a1018;
}

.game-offer-copy {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.3;
  color: #5a3d4a;
}

.game-offer-actions,
.game-over-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.game-picker-card {
  padding: 1rem 1rem 1.15rem;
}

.game-picker-top,
.game-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.game-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(201, 90, 130, 0.14);
  color: #5a3d4a;
  cursor: pointer;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.game-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.game-pick {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(201, 90, 130, 0.18);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.game-pick:hover,
.game-pick:focus-visible {
  filter: brightness(1.03);
  outline: none;
  transform: translateY(-1px);
}

.game-pick:active {
  transform: translateY(1px);
}

.game-pick-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.game-pick-copy strong {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: #2a1018;
  font-weight: 400;
}

.game-pick-copy em {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(90, 61, 74, 0.75);
}

.game-stage-frame {
  width: min(440px, 100%);
  padding: 0.85rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 520px);
}

.game-stage-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: #2a1018;
}

.game-stage-hud {
  margin: 0;
  font-family: var(--font-retro);
  font-size: 0.48rem;
  letter-spacing: 0.06em;
  color: #c9184a;
}

.game-arena {
  position: relative;
  flex: 1;
  min-height: 280px;
  margin: 0.55rem 0;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 180, 210, 0.35), transparent 45%),
    linear-gradient(180deg, #2a1822 0%, #1a1016 100%);
  border: 2px solid rgba(255, 255, 255, 0.55);
  touch-action: manipulation;
}

.game-arena.is-feed-drag {
  touch-action: none;
  cursor: crosshair;
}

.game-stage-hint {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(90, 61, 74, 0.8);
}

.game-over {
  position: absolute;
  inset: 0.85rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 246, 248, 0.96);
  border: 2px solid #fff;
  text-align: center;
}

.game-over[hidden] {
  display: none !important;
}

.game-over-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.6rem;
  color: #2a1018;
}

.game-over-score {
  margin: 0 0 0.55rem;
  font-family: var(--font-retro);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: #c9184a;
}

/* Feed the spider */
.feed-spider-home {
  position: absolute;
  left: 50%;
  top: 78%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: clamp(76px, 30%, 112px);
  z-index: 3;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
  transition: filter 0.15s ease;
  will-change: left, top, transform;
}

.feed-spider-home.is-dragging {
  cursor: grabbing;
  filter: drop-shadow(0 10px 18px rgba(255, 120, 160, 0.45));
  z-index: 5;
}

.feed-spider-home.is-nom {
  filter: drop-shadow(0 8px 16px rgba(255, 100, 140, 0.55));
}

.feed-spider-home svg,
.blink-cat-figure svg,
.balloon-spider svg,
.snack-svg svg {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

.snack-bit {
  position: absolute;
  top: -14%;
  width: 42px;
  border: none;
  background: transparent;
  cursor: default;
  pointer-events: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: snackFall linear forwards;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  z-index: 2;
  padding: 0;
}

.snack-bit .snack-svg {
  width: 100%;
}

.snack-bit.is-caught {
  animation: snackPop 0.28s ease forwards;
  pointer-events: none;
}

@keyframes snackFall {
  to {
    transform: translateY(118vh) rotate(18deg);
  }
}

@keyframes snackPop {
  to {
    transform: scale(1.45);
    opacity: 0;
  }
}

/* Cat blink */
.blink-cat {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(200px, 62%);
  border: none;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.95), rgba(255, 214, 226, 0.85));
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.3),
    inset 0 0 0 3px rgba(255, 255, 255, 0.7);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  padding: 0.85rem 0.7rem 0.55rem;
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.2s ease;
  z-index: 2;
}

.blink-cat-figure {
  width: 86%;
}

.blink-cat.is-open {
  filter: drop-shadow(0 0 14px rgba(255, 120, 160, 0.55));
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(255, 158, 197, 0.55);
}

.blink-cat.is-closed {
  filter: brightness(0.96);
}

.blink-cat.is-hit-good {
  transform: translate(-50%, -50%) scale(1.06);
}

.blink-cat.is-hit-bad {
  transform: translate(-50%, -50%) rotate(-4deg) scale(0.97);
}

.blink-status {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: #ffe8f0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* NO balloon + helper spider */
.no-balloon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  min-width: 4.8rem;
  min-height: 2.7rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 2.5px solid #fff;
  background: linear-gradient(180deg, #ffd0de 0%, #ff8fab 100%);
  color: #2a1018;
  font-family: var(--font-body);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(201, 90, 130, 0.3);
  -webkit-tap-highlight-color: transparent;
  z-index: 3;
  transition: filter 0.1s ease;
}

.no-balloon.is-hit {
  filter: brightness(1.08);
}

.no-balloon-string {
  position: absolute;
  left: 50%;
  width: 2px;
  background: rgba(255, 214, 226, 0.55);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.balloon-spider {
  position: absolute;
  left: calc(50% + 42px);
  width: 54px;
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  z-index: 4;
  transition: transform 0.12s ease;
}

.balloon-spider.is-yank {
  transform: translateX(-50%) translateY(4px) rotate(8deg);
}

.game-pick-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(255, 158, 197, 0.45);
}

.game-pick-spider {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 28' shape-rendering='crispEdges'%3E%3Crect x='11' y='10' width='10' height='8' fill='%234a3a5a'/%3E%3Crect x='12' y='6' width='8' height='5' fill='%235c4a70'/%3E%3Crect x='13' y='8' width='2' height='2' fill='%23e63946'/%3E%3Crect x='17' y='8' width='2' height='2' fill='%23e63946'/%3E%3C/svg%3E");
  background-size: 80%;
  background-repeat: no-repeat;
  background-position: center;
}

.game-pick-cat {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 30' shape-rendering='crispEdges'%3E%3Crect x='7' y='7' width='20' height='14' fill='%23ffffff'/%3E%3Crect x='9' y='11' width='1' height='1' fill='%23e63946'/%3E%3Crect x='11' y='11' width='1' height='1' fill='%23e63946'/%3E%3Crect x='9' y='12' width='3' height='1' fill='%23e63946'/%3E%3Crect x='20' y='11' width='1' height='1' fill='%23e63946'/%3E%3Crect x='22' y='11' width='1' height='1' fill='%23e63946'/%3E%3Crect x='20' y='12' width='3' height='1' fill='%23e63946'/%3E%3C/svg%3E");
  background-size: 90%;
  background-repeat: no-repeat;
  background-position: center;
}

.game-pick-no {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: #c9184a;
}

@media (prefers-reduced-motion: reduce) {
  .snack-bit,
  .spider-bubble,
  .dj-spider.is-vibing {
    animation: none;
  }
}
