:root {
  --ink: #15111d;
  --soft-ink: rgba(21, 17, 29, 0.72);
  --glass: rgba(255, 255, 255, 0.42);
  --glass-strong: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.58);
  --gold: #ffd24a;
  --amber: #ff9d4d;
  --pink: #ff7aa8;
  --violet: #8b7cff;
  --cyan: #76d8ff;
  --mint: #9ef4cf;
  --shadow: 0 28px 80px rgba(75, 48, 120, 0.22);
  --paw-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cfilter id='s' x='-30%25' y='-30%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='2' stdDeviation='2' flood-color='%23704b32' flood-opacity='.22'/%3E%3C/filter%3E%3Cg filter='url(%23s)'%3E%3Cellipse cx='19.5' cy='25.5' rx='10.2' ry='8.4' fill='%23fff4df' stroke='%23c98d60' stroke-width='1.7'/%3E%3Cellipse cx='11.5' cy='15.4' rx='4.4' ry='5.6' fill='%23ffd7c6' stroke='%23c98d60' stroke-width='1.5' transform='rotate(-20 11.5 15.4)'/%3E%3Cellipse cx='19.2' cy='11.2' rx='4.4' ry='5.8' fill='%23ffd7c6' stroke='%23c98d60' stroke-width='1.5'/%3E%3Cellipse cx='27.1' cy='14.6' rx='4.4' ry='5.6' fill='%23ffd7c6' stroke='%23c98d60' stroke-width='1.5' transform='rotate(19 27.1 14.6)'/%3E%3Cellipse cx='31.2' cy='22.3' rx='3.8' ry='4.8' fill='%23ffd7c6' stroke='%23c98d60' stroke-width='1.4' transform='rotate(28 31.2 22.3)'/%3E%3Cpath d='M15.8 24.8c2.4 2.2 5.1 2.2 7.6 0' fill='none' stroke='%23e5a381' stroke-width='1.4' stroke-linecap='round' opacity='.8'/%3E%3C/g%3E%3C/svg%3E") 18 18;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--ink);
  background: #fdf7ff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: var(--paw-cursor), auto;
}

button,
a {
  font: inherit;
  cursor: pointer;
}

.app {
  position: fixed;
  inset: 0;
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100dvh;
  place-items: stretch;
  padding: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 216, 143, 0.42), transparent 23rem),
    radial-gradient(circle at 84% 16%, rgba(244, 205, 229, 0.36), transparent 24rem),
    radial-gradient(circle at 50% 96%, rgba(255, 236, 194, 0.42), transparent 28rem),
    linear-gradient(145deg, #fff7ea 0%, #ffeaf1 38%, #f7edf9 74%, #fff8ee 100%);
}

.game {
  position: fixed;
  inset: 0;
  --parallax-x: 0px;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.7), transparent 32rem);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.game::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at calc(28% + var(--parallax-x)) 22%, rgba(255, 244, 223, 0.72), transparent 18rem),
    radial-gradient(circle at calc(78% + var(--parallax-x)) 46%, rgba(255, 205, 225, 0.2), transparent 20rem),
    radial-gradient(circle at 50% 78%, rgba(255, 223, 156, 0.18), transparent 22rem),
    linear-gradient(180deg, rgba(255, 247, 234, 0.36) 0%, rgba(255, 232, 241, 0.18) 52%, rgba(255, 226, 181, 0.2) 100%),
    radial-gradient(circle at 26% 34%, rgba(255, 255, 255, 0.58), transparent 18rem),
    radial-gradient(circle at 76% 42%, rgba(255, 247, 232, 0.5), transparent 17rem);
  animation: dreamyLight 12s ease-in-out infinite alternate;
  content: "";
}

.game::after {
  position: absolute;
  inset: auto -18% -34% -18%;
  z-index: -1;
  height: 48%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 48% 0%, rgba(255, 255, 255, 0.74), transparent 34%),
    linear-gradient(90deg, rgba(255, 210, 74, 0.22), rgba(139, 124, 255, 0.12), rgba(118, 216, 255, 0.2));
  filter: blur(2px);
  content: "";
}

.sky,
.playfield {
  position: relative;
}

.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  translate: calc(var(--parallax-x) * 0.45) 0;
  transition: translate 420ms ease;
}

.cloud,
.island,
.dessert-shape,
.cream-blob,
.star,
.particle {
  position: absolute;
  pointer-events: none;
}

.dessert-shape,
.cream-blob {
  opacity: 0.34;
  filter: blur(9px);
  animation: dessertFloat 18s ease-in-out infinite alternate;
}

.dessert-shape {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.08)),
    rgba(255, 214, 156, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 18px 44px rgba(150, 91, 76, 0.08);
  backdrop-filter: blur(10px);
}

.dessert-donut {
  left: 8%;
  top: 24%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
}

.dessert-donut::after {
  position: absolute;
  inset: 35%;
  border-radius: 50%;
  background: rgba(255, 247, 234, 0.86);
  content: "";
}

.dessert-cookie {
  right: 7%;
  top: 20%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 32%, rgba(176, 115, 74, 0.16) 0 8%, transparent 9%),
    radial-gradient(circle at 63% 58%, rgba(176, 115, 74, 0.12) 0 7%, transparent 8%),
    linear-gradient(145deg, rgba(255, 232, 191, 0.34), rgba(255, 255, 255, 0.12));
  animation-duration: 22s;
}

.dessert-candy {
  right: 18%;
  bottom: 18%;
  width: 220px;
  height: 72px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 177, 203, 0.18) 0 18px, rgba(255, 255, 255, 0.2) 18px 34px),
    rgba(255, 255, 255, 0.12);
  rotate: -9deg;
  animation-duration: 20s;
}

.cream-blob {
  border-radius: 42% 58% 48% 52%;
  background: rgba(255, 255, 255, 0.35);
}

.blob-one {
  left: 24%;
  top: 10%;
  width: 230px;
  height: 150px;
}

.blob-two {
  left: 48%;
  bottom: 16%;
  width: 260px;
  height: 170px;
  background: rgba(255, 220, 188, 0.22);
  animation-duration: 24s;
}

.blob-three {
  right: 30%;
  top: 38%;
  width: 150px;
  height: 120px;
  background: rgba(238, 222, 250, 0.2);
  animation-duration: 19s;
}

.cloud {
  width: 190px;
  height: 62px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(1px);
  box-shadow:
    44px -22px 0 rgba(255, 255, 255, 0.42),
    96px 4px 0 rgba(255, 255, 255, 0.34);
  animation: cloudDrift 22s ease-in-out infinite alternate;
}

.cloud-one {
  left: 8%;
  top: 18%;
}

.cloud-two {
  right: 12%;
  top: 27%;
  scale: 0.82;
  animation-duration: 18s;
}

.cloud-three {
  left: 34%;
  top: 9%;
  scale: 0.62;
  animation-duration: 21s;
}

.island {
  width: 160px;
  height: 70px;
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.85), transparent 24%),
    linear-gradient(135deg, rgba(166, 244, 190, 0.88), rgba(255, 215, 116, 0.88));
  box-shadow: 0 22px 45px rgba(110, 90, 150, 0.2);
  animation: floatIsland 5s ease-in-out infinite alternate;
}

.island::after {
  position: absolute;
  left: 34%;
  top: 62%;
  width: 32%;
  height: 60px;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, rgba(171, 124, 88, 0.26), rgba(171, 124, 88, 0));
  content: "";
}

.island-one {
  left: 8%;
  bottom: 18%;
}

.island-two {
  right: 8%;
  bottom: 22%;
  scale: 0.76;
  animation-duration: 6.4s;
}

.star {
  color: rgba(255, 202, 91, 0.76);
  font-size: 2.4rem;
  text-shadow: 0 0 20px rgba(255, 210, 74, 0.7);
  animation: twinkle 2.8s ease-in-out infinite;
}

.star-one {
  left: 18%;
  top: 11%;
}

.star-two {
  right: 18%;
  top: 13%;
  animation-delay: 0.7s;
}

.star-three {
  left: 73%;
  top: 47%;
  font-size: 1.5rem;
  animation-delay: 1.2s;
}

.particle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.95);
  animation: particleRise 7s ease-in-out infinite;
}

.particle::after {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  filter: blur(6px);
  content: "";
}

.particle-one {
  left: 28%;
  bottom: 12%;
}

.particle-two {
  left: 56%;
  bottom: 8%;
  animation-delay: 1.4s;
}

.particle-three {
  left: 78%;
  bottom: 19%;
  animation-delay: 2.1s;
}

.particle-four {
  left: 12%;
  bottom: 39%;
  animation-delay: 3.2s;
}

@keyframes drift {
  to {
    translate: 24px -12px;
  }
}

@keyframes cloudDrift {
  to {
    translate: 54px -16px;
  }
}

@keyframes floatIsland {
  to {
    translate: 0 -16px;
    rotate: 1.5deg;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.56;
    scale: 0.88;
  }

  50% {
    opacity: 1;
    scale: 1.08;
  }
}

@keyframes particleRise {
  0% {
    opacity: 0;
    translate: 0 30px;
  }

  35%,
  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    translate: 22px -120px;
  }
}

@keyframes dessertFloat {
  to {
    translate: 24px -18px;
    rotate: 3deg;
  }
}

@keyframes dreamyLight {
  to {
    filter: hue-rotate(5deg) brightness(1.03);
  }
}

.game-overlay {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 14px;
  left: 14px;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.mission-hidden,
.speak-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.hud {
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.hud span,
.sound-btn {
  border: 1px solid rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 241, 219, 0.66)),
    rgba(255, 248, 234, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -10px 18px rgba(255, 210, 74, 0.08),
    0 12px 30px rgba(96, 62, 122, 0.18);
  backdrop-filter: blur(18px);
}

.hud span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 46px;
  border-radius: 18px;
  font-size: 1.16rem;
  font-weight: 950;
  white-space: nowrap;
}

#score::before {
  margin-right: 5px;
  color: var(--gold);
  content: "★";
}

#timer::after {
  margin-left: 2px;
  color: var(--soft-ink);
  font-size: 0.76rem;
  content: "s";
}

.sound-btn {
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.sound-btn {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 18px;
  color: var(--ink);
  pointer-events: auto;
}

.sound-btn:hover,
.primary-btn:hover {
  transform: translateY(-2px);
}

.sound-btn[aria-pressed="false"] {
  opacity: 0.54;
}

.sound-icon {
  font-size: 1.24rem;
  font-weight: 950;
}

.playfield {
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  cursor: var(--paw-cursor), auto;
  touch-action: none;
}

.mission-pill,
#speak-mission {
  display: none !important;
}

#mission-label {
  position: fixed;
  top: calc(74px + env(safe-area-inset-top));
  left: 50%;
  z-index: 88;
  display: inline-flex;
  width: auto;
  height: auto;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  max-width: min(86vw, 520px);
  overflow: visible;
  clip: auto;
  clip-path: none;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 0 28px;
  color: #6f4218;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.92), transparent 32%),
    linear-gradient(145deg, rgba(255, 250, 235, 0.94), rgba(255, 226, 213, 0.78)),
    rgba(255, 246, 230, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 16px 34px rgba(121, 82, 70, 0.16),
    0 0 28px rgba(255, 213, 92, 0.24);
  font-size: clamp(1.22rem, 3.8vw, 1.72rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -12px, 0) scale(0.96);
  transition:
    opacity 260ms ease,
    transform 260ms cubic-bezier(0.18, 0.9, 0.22, 1.1);
}

#mission-label.mission-toast-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0) scale(1);
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(252, 246, 255, 0.34);
  backdrop-filter: blur(14px);
}

.screen.is-visible {
  display: grid;
}

.glass-panel {
  width: min(540px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 26px 70px rgba(75, 48, 120, 0.2);
  backdrop-filter: blur(24px);
}

.start-panel,
.result-panel {
  padding: 34px;
  text-align: center;
}

.start-panel {
  position: relative;
  display: grid;
  width: min(460px, 100%);
  min-height: min(78vh, 650px);
  align-content: end;
  overflow: hidden;
  padding: 0;
  border-radius: 34px;
  background: rgba(255, 244, 232, 0.42);
}

.start-panel::before {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 0;
  width: min(84%, 390px);
  height: 96px;
  border-radius: 42px 42px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 235, 219, 0), rgba(255, 226, 215, 0.88) 34%, rgba(255, 213, 207, 0.96)),
    radial-gradient(ellipse at 50% 10%, rgba(255, 245, 236, 0.94), rgba(255, 222, 214, 0.82) 62%, rgba(255, 209, 203, 0.68));
  content: "";
  pointer-events: none;
  transform: translate3d(-50%, 0, 0);
}

.start-panel::after {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 32px;
  width: min(76%, 340px);
  height: 48px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, #b994f2 0%, #ff7fa6 54%, #ffad61 100%);
  opacity: 0.34;
  filter: blur(12px) saturate(0.82);
  box-shadow:
    0 10px 24px rgba(255, 122, 168, 0.28);
  content: "";
  pointer-events: none;
  transform: translate3d(-50%, 6px, 0) scale(0.96);
}

.cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.start-panel .kicker,
.start-panel h2,
.start-panel p,
.start-panel .primary-btn {
  position: relative;
  z-index: 2;
}

.start-panel .kicker,
.start-panel h2,
.start-panel p {
  display: none;
}

.start-panel .primary-btn {
  z-index: 3;
  width: min(82%, 360px);
  min-height: 70px;
  margin: 0 auto 32px;
  border: 0;
  overflow: hidden;
  font-size: 1.22rem;
  background:
    linear-gradient(135deg, #b994f2 0%, #ff7fa6 54%, #ffad61 100%);
  box-shadow:
    0 16px 34px rgba(255, 122, 168, 0.34),
    0 4px 0 rgba(151, 91, 110, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.kicker {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  color: #704005;
  background: rgba(255, 210, 74, 0.44);
  font-size: 0.77rem;
  font-weight: 950;
  text-transform: uppercase;
}

.glass-panel h2 {
  margin: 16px 0 12px;
  font-size: clamp(2.25rem, 8vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.glass-panel p {
  margin: 0 auto 22px;
  max-width: 410px;
  color: var(--soft-ink);
  font-size: 1.08rem;
  line-height: 1.5;
}

.primary-btn {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 26px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent),
    linear-gradient(135deg, var(--violet), var(--pink) 58%, var(--amber));
  box-shadow:
    0 18px 36px rgba(255, 122, 168, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-weight: 950;
  text-decoration: none;
}

.bubble {
  position: absolute;
  z-index: 7;
  display: grid;
  width: var(--size);
  height: var(--size);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 22%, rgba(255, 255, 255, 0.95) 0 12%, transparent 20%),
    radial-gradient(circle at 70% 78%, rgba(255, 255, 255, 0.34), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.18));
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.78),
    inset -12px -18px 26px rgba(118, 216, 255, 0.18),
    0 0 24px rgba(255, 255, 255, 0.54),
    0 18px 42px rgba(75, 48, 120, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  animation: fall var(--duration) linear forwards;
}

.bubble::before {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent 46%);
  content: "";
}

.bubble::after {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.65), transparent 66%);
  opacity: 0.48;
  filter: blur(8px);
  content: "";
}

.bubble.golden {
  border-color: rgba(255, 245, 170, 0.95);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.96) 0 13%, transparent 21%),
    linear-gradient(145deg, rgba(255, 244, 162, 0.74), rgba(255, 184, 64, 0.52));
  box-shadow:
    inset 0 0 26px rgba(255, 255, 255, 0.8),
    0 0 28px rgba(255, 210, 74, 0.92),
    0 24px 54px rgba(255, 157, 77, 0.34);
  animation:
    fall var(--duration) linear forwards,
    goldenPulse 1.25s ease-in-out infinite;
}

.bubble.near {
  z-index: 9;
  filter: saturate(1.08) brightness(1.04);
}

.bubble.far {
  z-index: 5;
  opacity: 0.74;
  filter: blur(0.65px) saturate(0.9);
}

.bubble.fast {
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.78),
    inset -12px -18px 26px rgba(118, 216, 255, 0.18),
    0 0 24px rgba(255, 255, 255, 0.54),
    0 20px 52px rgba(255, 122, 168, 0.18);
}

.bubble-icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 72%;
  height: 72%;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.8), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 22px rgba(75, 48, 120, 0.14);
  font-size: clamp(2rem, 6vw, 3.2rem);
  filter: drop-shadow(0 5px 8px rgba(75, 48, 120, 0.13));
}

.bubble.pop {
  pointer-events: none;
  animation: bubblePop 420ms cubic-bezier(0.18, 0.9, 0.3, 1.2) forwards;
}

.bubble.wrong {
  animation: wrongPop 360ms ease-out forwards;
}

.falling-item {
  position: absolute;
  z-index: 8;
  left: 0;
  top: 0;
  display: grid;
  width: var(--size);
  height: var(--size);
  place-items: center;
  pointer-events: none;
  user-select: none;
  transform: translate3d(var(--x, 0), -130px, 0);
  animation: itemFall var(--duration) linear forwards;
  will-change: transform, opacity;
}

.falling-item::before {
  display: none;
}

.falling-item.funny::before {
  display: block;
  border-color: rgba(180, 205, 226, 0.6);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.32), transparent 20%),
    linear-gradient(145deg, rgba(183, 208, 230, 0.22), rgba(105, 129, 158, 0.08));
  box-shadow:
    inset 0 0 16px rgba(255, 255, 255, 0.22),
    0 18px 34px rgba(64, 72, 98, 0.16);
  opacity: 0.72;
}

.falling-item.golden::before {
  display: block;
  border-color: rgba(255, 244, 162, 0.96);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.82), transparent 20%),
    linear-gradient(145deg, rgba(255, 244, 162, 0.74), rgba(255, 184, 64, 0.35));
  box-shadow:
    inset 0 0 22px rgba(255, 255, 255, 0.62),
    0 0 34px rgba(255, 210, 74, 0.88),
    0 22px 52px rgba(255, 157, 77, 0.32);
  animation: goldenPulse 1.25s ease-in-out infinite;
}

.falling-item.near {
  z-index: 11;
  filter: saturate(1.1) brightness(1.04);
}

.falling-item.far {
  z-index: 6;
  opacity: 0.72;
  filter: blur(0.55px) saturate(0.88);
}

.item-icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 72%;
  height: 72%;
  place-items: center;
  border-radius: 50%;
  font-size: clamp(2.1rem, 6vw, 3.35rem);
  filter: drop-shadow(0 10px 12px rgba(75, 48, 120, 0.16));
}

.item-shadow {
  position: absolute;
  left: 50%;
  bottom: 5%;
  z-index: 1;
  width: 64%;
  height: 16%;
  border-radius: 50%;
  background: rgba(48, 35, 82, 0.18);
  filter: blur(9px);
  translate: -50% 0;
}

.item-art {
  position: relative;
  z-index: 3;
  display: block;
  width: 118%;
  height: 118%;
  background-image: url("./assets/snacks.png");
  background-size: 400% 200%;
  background-repeat: no-repeat;
  filter:
    drop-shadow(0 12px 13px rgba(65, 43, 92, 0.18))
    drop-shadow(0 0 14px rgba(255, 255, 255, 0.34));
}

.extra-art {
  background-image: url("./assets/extra-food.png");
  background-size: 200% 200%;
}

.school-art {
  background-image: url("./assets/school-things.png");
  background-size: 400% 200%;
}

.transport-art {
  background-image: url("./assets/transport.png");
  background-size: 400% 200%;
}

.bad-art {
  background-image: url("./assets/bad-objects.png");
  background-size: 300% 200%;
  filter:
    drop-shadow(0 12px 13px rgba(64, 72, 98, 0.2))
    drop-shadow(0 0 10px rgba(177, 203, 232, 0.22))
    saturate(0.94);
}

.bad-shadow {
  background: rgba(55, 67, 98, 0.2);
}

.snack-donut {
  background-position: 0% 0%;
}

.snack-cookie {
  background-position: 33.333% 0%;
}

.snack-cupcake {
  background-position: 66.666% 0%;
}

.snack-croissant {
  background-position: 100% 0%;
}

.snack-strawberry {
  background-position: 0% 100%;
}

.snack-grapes {
  background-position: 33.333% 100%;
}

.snack-sushi {
  background-position: 66.666% 100%;
}

.snack-candy {
  background-position: 100% 100%;
}

.snack-apple {
  background-position: 0% 0%;
}

.snack-banana {
  background-position: 100% 0%;
}

.snack-pancakes {
  background-position: 0% 100%;
}

.snack-milkshake {
  background-position: 100% 100%;
}

.bad-sock {
  background-position: 0% 0%;
}

.bad-dinosaur {
  background-position: 50% 0%;
}

.bad-paper {
  background-position: 100% 0%;
}

.bad-toothbrush {
  background-position: 0% 100%;
}

.bad-wheel {
  background-position: 50% 100%;
}

.bad-magnet {
  background-position: 100% 100%;
}

.school-backpack {
  background-position: 0% 0%;
}

.school-book {
  background-position: 33.333% 0%;
}

.school-pencil {
  background-position: 66.666% 0%;
}

.school-ruler {
  background-position: 100% 0%;
}

.school-notebook {
  background-position: 0% 100%;
}

.school-eraser {
  background-position: 33.333% 100%;
}

.school-globe {
  background-position: 66.666% 100%;
}

.school-paint-brush {
  background-position: 100% 100%;
}

.transport-car {
  background-position: 0% 0%;
}

.transport-bus {
  background-position: 33.333% 0%;
}

.transport-bicycle {
  background-position: 66.666% 0%;
}

.transport-scooter {
  background-position: 100% 0%;
}

.transport-airplane {
  background-position: 0% 100%;
}

.transport-train {
  background-position: 33.333% 100%;
}

.transport-boat {
  background-position: 66.666% 100%;
}

.transport-rocket {
  background-position: 100% 100%;
}

.bad-icon {
  color: #6d7a9b;
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.6), transparent 26%),
    linear-gradient(145deg, rgba(218, 230, 242, 0.72), rgba(181, 198, 219, 0.34));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 20px rgba(64, 72, 98, 0.16);
  filter: drop-shadow(0 9px 10px rgba(64, 72, 98, 0.16)) saturate(0.78);
}

.golden-icon {
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.72), transparent 26%),
    linear-gradient(145deg, rgba(255, 244, 162, 0.92), rgba(255, 184, 64, 0.54));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 0 28px rgba(255, 210, 74, 0.82);
}

.falling-item.eaten {
  animation: itemEat 360ms cubic-bezier(0.18, 0.9, 0.3, 1.2) forwards;
}

.falling-item.rejected {
  animation: itemReject 420ms ease-out forwards;
}

@keyframes itemFall {
  from {
    opacity: 0;
    transform: translate3d(var(--x, 0), -150px, 0) rotate(0deg);
  }

  8% {
    opacity: 1;
  }

  to {
    opacity: 1;
    transform: translate3d(calc(var(--x, 0px) + var(--drift, 0px)), var(--fall-distance, 980px), 0) rotate(var(--spin, 0deg));
  }
}

@keyframes itemEat {
  0% {
    opacity: 1;
    scale: 1;
  }

  45% {
    opacity: 1;
    scale: 1.12;
    filter: brightness(1.18);
  }

  100% {
    opacity: 0;
    scale: 0.18;
    translate: 0 80px;
  }
}

@keyframes itemReject {
  0% {
    opacity: 1;
    translate: 0 0;
  }

  35% {
    translate: -12px 0;
    rotate: -9deg;
  }

  70% {
    translate: 14px -10px;
    rotate: 10deg;
  }

  100% {
    opacity: 0;
    translate: 0 -36px;
    scale: 0.34;
  }
}

@keyframes fall {
  from {
    translate: 0 -150px;
  }

  to {
    translate: 0 calc(100% + 820px);
  }
}

@keyframes bubblePop {
  0% {
    opacity: 1;
    scale: 1;
  }

  24% {
    opacity: 1;
    scale: 1.1;
    filter: brightness(1.2);
  }

  72% {
    opacity: 0.78;
    scale: 1.42;
    filter: brightness(1.32) blur(0.2px);
  }

  100% {
    opacity: 0;
    scale: 0.24;
  }
}

@keyframes goldenPulse {
  50% {
    box-shadow:
      inset 0 0 28px rgba(255, 255, 255, 0.86),
      0 0 42px rgba(255, 210, 74, 1),
      0 26px 64px rgba(255, 157, 77, 0.42);
  }
}

@keyframes wrongPop {
  0% {
    opacity: 1;
    translate: 0 0;
  }

  30% {
    translate: -8px 0;
  }

  60% {
    translate: 8px 0;
    scale: 1.12;
  }

  100% {
    opacity: 0;
    translate: 0 0;
    scale: 0.26;
  }
}

.spark {
  position: absolute;
  z-index: 18;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(255, 210, 74, 0.92);
  animation: spark 620ms ease-out forwards;
}

.points-pop {
  position: absolute;
  z-index: 25;
  translate: -50% -50%;
  pointer-events: none;
  color: #7a4b2d;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 244, 228, 0.44)),
    rgba(255, 242, 223, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 28px rgba(121, 82, 70, 0.14),
    0 0 20px rgba(255, 218, 154, 0.3);
  backdrop-filter: blur(14px);
  font-weight: 950;
  letter-spacing: 0;
  animation: pointsPop 820ms ease-out forwards;
}

.points-pop::after {
  position: absolute;
  right: -5px;
  top: -6px;
  color: rgba(255, 203, 84, 0.9);
  content: "✦";
  font-size: 0.72rem;
  text-shadow: 0 0 12px rgba(255, 203, 84, 0.72);
}

.points-pop strong {
  display: block;
  color: #7b4a33;
  font-size: 0.78rem;
  line-height: 1;
  text-transform: uppercase;
}

.points-pop em {
  display: block;
  margin-top: 2px;
  color: #9a6a43;
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1;
}

.points-pop.word-pop {
  min-width: 118px;
  padding: 10px 16px 9px;
  border-color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.95), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 238, 217, 0.68)),
    rgba(255, 246, 232, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 16px 36px rgba(121, 82, 70, 0.18),
    0 0 28px rgba(255, 218, 154, 0.4);
  text-align: center;
  animation: learningWordPop 2.05s cubic-bezier(0.18, 0.84, 0.24, 1) forwards;
}

.points-pop.word-pop strong {
  color: #6f4218;
  font-size: clamp(1.02rem, 4vw, 1.34rem);
  line-height: 1.04;
  letter-spacing: 0;
  text-transform: lowercase;
}

.points-pop.word-pop em {
  margin-top: 4px;
  color: #9c6a42;
  font-size: 0.78rem;
}

.points-pop.golden-points {
  color: #704005;
  background: rgba(255, 244, 162, 0.88);
  box-shadow: 0 0 28px rgba(255, 210, 74, 0.8);
}

@keyframes pointsPop {
  0% {
    opacity: 0;
    translate: -50% -35%;
    scale: 0.72;
  }

  22% {
    opacity: 1;
    translate: -50% -70%;
    scale: 1.08;
  }

  100% {
    opacity: 0;
    translate: -50% -160%;
    scale: 0.9;
  }
}

@keyframes learningWordPop {
  0% {
    opacity: 0;
    translate: -50% -28%;
    scale: 0.76;
  }

  14% {
    opacity: 1;
    translate: -50% -72%;
    scale: 1.06;
  }

  68% {
    opacity: 1;
    translate: -50% -92%;
    scale: 1;
  }

  100% {
    opacity: 0;
    translate: -50% -210%;
    scale: 0.94;
  }
}

@keyframes spark {
  to {
    opacity: 0;
    translate: var(--tx) var(--ty);
    scale: 0.2;
  }
}

.toast,
.combo {
  position: absolute;
  z-index: 22;
  left: 50%;
  pointer-events: none;
  text-align: center;
  opacity: 0;
  translate: -50% 0;
}

.toast {
  top: 120px;
  min-width: 130px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: #fff;
  background: rgba(21, 17, 29, 0.58);
  box-shadow: 0 16px 36px rgba(21, 17, 29, 0.18);
  backdrop-filter: blur(18px);
  font-weight: 950;
}

.combo {
  top: 184px;
  padding: 14px 22px;
  border-radius: 999px;
  color: #704005;
  background: rgba(255, 244, 162, 0.72);
  box-shadow: 0 0 34px rgba(255, 210, 74, 0.94);
  backdrop-filter: blur(12px);
  font-size: clamp(1.25rem, 4vw, 2.05rem);
  font-weight: 950;
}

.control-hint {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: 22px;
  min-height: 34px;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  padding: 0 13px;
  color: rgba(21, 17, 29, 0.68);
  background: rgba(255, 255, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 12px 28px rgba(75, 48, 120, 0.1);
  backdrop-filter: blur(14px);
  font-size: 0.84rem;
  font-weight: 900;
  pointer-events: none;
}

.toast.show {
  animation: toast 920ms ease both;
}

.combo.show {
  animation: combo 1s ease both;
}

.lumi-zone.super-glow .lumi-aura {
  opacity: 1;
  scale: 1.68;
  filter: blur(13px);
}

@keyframes toast {
  0% {
    opacity: 0;
    translate: -50% 18px;
    scale: 0.86;
  }

  20%,
  72% {
    opacity: 1;
    translate: -50% 0;
    scale: 1;
  }

  100% {
    opacity: 0;
    translate: -50% -18px;
    scale: 0.92;
  }
}

@keyframes combo {
  0% {
    opacity: 0;
    scale: 0.76;
  }

  25%,
  72% {
    opacity: 1;
    scale: 1;
  }

  100% {
    opacity: 0;
    scale: 1.15;
  }
}

.lumi-zone {
  position: absolute;
  z-index: 10;
  left: 0;
  bottom: 4px;
  width: clamp(170px, 23vw, 268px);
  height: clamp(152px, 21vw, 240px);
  transform: translate3d(calc(50vw - 50%), 0, 0);
  translate: none;
  overflow: visible;
  pointer-events: none;
  will-change: transform;
  contain: layout style;
}

.lumi-aura {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 62%;
  height: 48%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 74, 0.36), rgba(255, 210, 74, 0));
  filter: blur(14px);
  translate: -50% 0;
  opacity: 0.8;
  transition: opacity 180ms ease, scale 180ms ease;
}

.lumi-cat {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 100%;
  translate: -50% 0;
  filter: drop-shadow(0 24px 28px rgba(21, 17, 29, 0.24));
  transform-origin: 50% 88%;
  animation: lumiFloat 2.7s ease-in-out infinite;
  transition: transform 180ms ease, filter 180ms ease;
}

.lumi-zone.happy .lumi-cat {
  transform: translateY(-12px) rotate(-2deg) scale(1.04);
  filter: drop-shadow(0 24px 32px rgba(21, 17, 29, 0.22)) drop-shadow(0 0 26px rgba(255, 210, 74, 0.58));
}

.lumi-zone.silly .lumi-cat {
  transform: rotate(4deg) scale(0.98);
  filter: drop-shadow(0 24px 32px rgba(21, 17, 29, 0.22)) hue-rotate(18deg);
}

.lumi-zone.combo-glow .lumi-aura {
  opacity: 1;
  scale: 1.42;
}

.cat-head {
  position: absolute;
  left: 50%;
  bottom: 24%;
  width: 72%;
  height: 66%;
  translate: -50% 0;
  border-radius: 46% 47% 36% 38%;
  background:
    radial-gradient(circle at 50% 106%, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(145deg, #18120f 0%, #060403 72%);
  box-shadow:
    inset 20px 18px 34px rgba(255, 255, 255, 0.04),
    inset -18px -22px 28px rgba(0, 0, 0, 0.34),
    0 16px 34px rgba(21, 17, 29, 0.2);
}

.cat-head::after {
  position: absolute;
  left: 50%;
  bottom: -9%;
  width: 132%;
  height: 14%;
  translate: -50% 0;
  border-radius: 50%;
  background: rgba(6, 4, 3, 0.92);
  filter: blur(0.2px);
  content: "";
}

.cat-ear {
  position: absolute;
  top: -28%;
  width: 31%;
  height: 44%;
  overflow: hidden;
  border-radius: 18% 86% 24% 80%;
  background: #080504;
  box-shadow: inset 10px 8px 20px rgba(255, 255, 255, 0.04);
}

.cat-ear span {
  position: absolute;
  inset: 23% 21% 18% 24%;
  border-radius: inherit;
  background: linear-gradient(145deg, #ffe9e0, #ffd6ca);
  opacity: 0.94;
}

.cat-ear-left {
  left: 13%;
  rotate: -17deg;
}

.cat-ear-right {
  right: 5%;
  rotate: 20deg;
  scale: 0.98;
}

.cat-eye {
  position: absolute;
  top: 39%;
  width: 23%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 32%, #fff 0 8%, transparent 9%),
    radial-gradient(circle at 62% 66%, rgba(255, 255, 255, 0.88) 0 4%, transparent 5%),
    radial-gradient(circle, #050403 0 37%, transparent 38%),
    linear-gradient(135deg, #ffef68, #ffc928);
  box-shadow:
    0 0 0 5px rgba(255, 210, 74, 0.1),
    0 0 22px rgba(255, 210, 74, 0.38);
  animation: catBlink 4.8s ease-in-out infinite;
}

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

.cat-eye-right {
  right: 21%;
  animation-delay: 0.08s;
}

.lumi-zone.silly .cat-eye-right {
  top: 45%;
  height: 8px;
  border-radius: 999px;
  background: #ffd94a;
}

.cat-nose {
  position: absolute;
  left: 52%;
  top: 58%;
  width: 11%;
  height: 8%;
  translate: -50% 0;
  border-radius: 58% 58% 68% 68%;
  background: #fff8f2;
  rotate: 8deg;
}

.cat-mouth {
  position: absolute;
  left: 52%;
  top: 66%;
  width: 26%;
  height: 15%;
  translate: -50% 0;
}

.cat-mouth::before,
.cat-mouth::after {
  position: absolute;
  top: 0;
  width: 50%;
  height: 90%;
  border-bottom: 5px solid #fff8f2;
  content: "";
}

.cat-mouth::before {
  right: 50%;
  border-radius: 0 0 999px 999px;
}

.cat-mouth::after {
  left: 50%;
  border-radius: 0 0 999px 999px;
}

.lumi-zone.silly .cat-mouth {
  top: 67%;
  width: 17%;
  height: 15%;
  border: 4px solid #fff8f2;
  border-top: 0;
  border-radius: 0 0 999px 999px;
}

.lumi-zone.silly .cat-mouth::before,
.lumi-zone.silly .cat-mouth::after {
  display: none;
}

.cat-whiskers {
  position: absolute;
  top: 61%;
  width: 23%;
  height: 16%;
}

.cat-whiskers::before,
.cat-whiskers::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 248, 242, 0.92);
  content: "";
}

.cat-whiskers::before {
  top: 15%;
  rotate: -11deg;
}

.cat-whiskers::after {
  bottom: 22%;
  rotate: 9deg;
}

.whiskers-left {
  left: 7%;
}

.whiskers-right {
  right: 3%;
  transform: scaleX(-1);
}

.cat-stripe {
  position: absolute;
  top: 0;
  width: 6%;
  height: 28%;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(#fff7ed, rgba(255, 247, 237, 0.74));
  transform-origin: top center;
}

.stripe-one {
  left: 48%;
  rotate: 7deg;
}

.stripe-two {
  left: 59%;
  rotate: 13deg;
  height: 24%;
}

.stripe-three {
  left: 69%;
  rotate: 18deg;
  height: 21%;
}

.cat-paw {
  position: absolute;
  bottom: 13%;
  width: 25%;
  height: 23%;
  border-radius: 44% 44% 35% 35%;
  background: linear-gradient(145deg, #17110f, #060403 70%);
  box-shadow: 0 12px 18px rgba(21, 17, 29, 0.18);
  z-index: 3;
}

.cat-paw-left {
  left: 25%;
  rotate: -4deg;
}

.cat-paw-right {
  right: 25%;
  rotate: 5deg;
  scale: 0.88;
}

.cat-paw span {
  position: absolute;
  bottom: 14%;
  width: 13%;
  height: 30%;
  border-radius: 999px;
  background: #ffd548;
}

.cat-paw span:first-child {
  left: 31%;
  rotate: 7deg;
}

.cat-paw span:last-child {
  right: 29%;
  rotate: -8deg;
}

.cat-tail {
  position: absolute;
  right: 3%;
  bottom: 18%;
  width: 32%;
  height: 17%;
  border: 14px solid #080504;
  border-left: 0;
  border-radius: 0 999px 999px 0;
  transform-origin: left center;
  rotate: -25deg;
  animation: tailWave 1.9s ease-in-out infinite alternate;
}

.cat-sparkle {
  position: absolute;
  color: #ffd548;
  text-shadow: 0 0 20px rgba(255, 210, 74, 0.8);
  animation: twinkle 2.2s ease-in-out infinite;
}

.cat-sparkle-one {
  left: 16%;
  top: 18%;
  font-size: 2rem;
}

.cat-sparkle-two {
  left: 26%;
  top: 34%;
  font-size: 1.3rem;
  animation-delay: 0.6s;
}

.lumi-expression {
  position: absolute;
  right: 10%;
  top: 10%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #704005;
  background: rgba(255, 244, 162, 0.75);
  box-shadow: 0 0 24px rgba(255, 210, 74, 0.8);
  font-size: 1.3rem;
  opacity: 0;
  scale: 0.7;
}

.lumi-expression.show {
  animation: expression 780ms ease both;
}

@keyframes lumiFloat {
  0%,
  100% {
    translate: -50% 0;
  }

  50% {
    translate: -50% -10px;
  }
}

@keyframes catBlink {
  0%,
  46%,
  50%,
  100% {
    scale: 1 1;
  }

  48% {
    scale: 1 0.08;
  }
}

@keyframes tailWave {
  to {
    rotate: -11deg;
    translate: 5px -3px;
  }
}

/* Premium Lumi mascot v2: soft pseudo-3D kitten built from lightweight layers. */
.lumi-zone {
  bottom: 2px;
  width: clamp(285px, 37vw, 430px);
  height: clamp(265px, 35vw, 390px);
  perspective: 900px;
}

.lumi-aura {
  bottom: 20px;
  width: 74%;
  height: 40%;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 245, 191, 0.72), rgba(255, 210, 74, 0.18) 38%, transparent 70%),
    radial-gradient(circle, rgba(255, 162, 118, 0.2), transparent 72%);
  filter: blur(16px);
}

.lumi-cat {
  filter:
    drop-shadow(0 28px 34px rgba(78, 42, 61, 0.2))
    drop-shadow(0 0 28px rgba(255, 236, 180, 0.32));
  animation:
    lumiFloat 3.2s ease-in-out infinite,
    kittenBreathe 4.6s ease-in-out infinite;
}

.cat-body {
  position: absolute;
  left: 50%;
  bottom: 9%;
  z-index: 1;
  width: 54%;
  height: 48%;
  translate: -50% 0;
  border-radius: 48% 48% 38% 38%;
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.82), transparent 19%),
    radial-gradient(circle at 72% 22%, rgba(255, 220, 181, 0.62), transparent 22%),
    linear-gradient(145deg, #ffe5c5 0%, #f7bf8f 45%, #d99462 100%);
  box-shadow:
    inset 18px 16px 34px rgba(255, 255, 255, 0.42),
    inset -18px -24px 34px rgba(126, 66, 48, 0.18),
    0 18px 40px rgba(115, 75, 90, 0.16);
}

.cat-body::before,
.cat-body::after,
.cat-head::before,
.cat-head::after {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 238, 215, 0.65);
  filter: blur(7px);
  content: "";
}

.cat-body::before {
  left: 4%;
  top: 14%;
  width: 34%;
  height: 30%;
}

.cat-body::after {
  right: 2%;
  top: 21%;
  width: 30%;
  height: 32%;
  background: rgba(218, 143, 92, 0.22);
}

.cat-chest {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 52%;
  height: 70%;
  translate: -50% 0;
  border-radius: 50% 50% 40% 40%;
  background:
    repeating-radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.24) 0 2px, transparent 3px 8px),
    linear-gradient(180deg, #fff4e7, rgba(255, 231, 205, 0.6));
  opacity: 0.9;
  filter: blur(0.2px);
}

.cat-tail {
  right: 0;
  bottom: 24%;
  z-index: 0;
  width: 38%;
  height: 25%;
  border: 18px solid #efb07d;
  border-left: 0;
  border-radius: 0 999px 999px 0;
  box-shadow:
    inset -6px 6px 0 rgba(255, 240, 221, 0.32),
    0 16px 22px rgba(115, 75, 90, 0.16);
  rotate: -31deg;
  animation: fluffyTail 2.2s ease-in-out infinite alternate;
}

.cat-head {
  left: 50%;
  bottom: 29%;
  z-index: 4;
  width: 70%;
  height: 58%;
  translate: -50% 0;
  border-radius: 48% 48% 42% 42%;
  background:
    radial-gradient(circle at 33% 24%, rgba(255, 255, 255, 0.9), transparent 18%),
    radial-gradient(circle at 70% 18%, rgba(255, 237, 209, 0.62), transparent 24%),
    linear-gradient(145deg, #ffe9cf 0%, #f3b982 48%, #d7925e 100%);
  box-shadow:
    inset 22px 18px 36px rgba(255, 255, 255, 0.48),
    inset -18px -24px 34px rgba(120, 56, 42, 0.18),
    0 20px 44px rgba(115, 75, 90, 0.2);
  transform-origin: 50% 86%;
  animation: curiousLook 7.4s ease-in-out infinite;
}

.cat-head::before {
  left: 9%;
  bottom: 14%;
  width: 34%;
  height: 33%;
}

.cat-head::after {
  right: 6%;
  bottom: 12%;
  width: 34%;
  height: 34%;
}

.fur-crown {
  position: absolute;
  left: 45%;
  top: -8%;
  width: 32%;
  height: 24%;
  translate: -50% 0;
  background:
    radial-gradient(ellipse at 20% 72%, #ffe5c5 0 38%, transparent 40%),
    radial-gradient(ellipse at 48% 58%, #ffd9b0 0 40%, transparent 42%),
    radial-gradient(ellipse at 78% 72%, #f6bd88 0 34%, transparent 36%);
  filter: drop-shadow(0 5px 4px rgba(126, 66, 48, 0.08));
}

.cat-ear {
  top: -18%;
  width: 24%;
  height: 31%;
  border-radius: 46% 56% 42% 50%;
  background:
    radial-gradient(circle at 38% 26%, rgba(255, 255, 255, 0.58), transparent 18%),
    linear-gradient(145deg, #ffe4c7, #d9935d);
  box-shadow:
    inset 8px 8px 14px rgba(255, 255, 255, 0.36),
    inset -7px -10px 14px rgba(111, 55, 42, 0.16);
}

.cat-ear span {
  inset: 24% 23% 20%;
  border-radius: 50% 55% 42% 50%;
  background: linear-gradient(145deg, #ffcfc5, #f7a8a7);
  box-shadow: inset 0 3px 7px rgba(255, 255, 255, 0.36);
}

.cat-ear-left {
  left: 15%;
  rotate: -19deg;
}

.cat-ear-right {
  right: 13%;
  rotate: 19deg;
}

.lumi-zone.idle-ear .cat-ear-left {
  animation: earTwitch 600ms ease;
}

.lumi-zone.idle-ear .cat-ear-right {
  animation: earTwitch 600ms ease 80ms;
}

.cat-stripe {
  top: 4%;
  width: 5%;
  background: linear-gradient(#d98755, rgba(201, 118, 77, 0.08));
  opacity: 0.62;
}

.stripe-one {
  left: 46%;
}

.stripe-two {
  left: 55%;
}

.stripe-three {
  left: 64%;
}

.cat-cheek {
  position: absolute;
  top: 57%;
  z-index: 1;
  width: 23%;
  height: 19%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 169, 0.34), transparent 68%);
  filter: blur(0.5px);
}

.cheek-left {
  left: 17%;
}

.cheek-right {
  right: 13%;
}

.cat-eye {
  top: 35%;
  z-index: 3;
  width: 22%;
  background:
    radial-gradient(circle at 34% 28%, #fff 0 7%, transparent 8%),
    radial-gradient(circle at 68% 65%, rgba(255, 255, 255, 0.92) 0 4%, transparent 5%),
    radial-gradient(circle at 50% 55%, #2b1a13 0 33%, transparent 34%),
    radial-gradient(circle at 50% 52%, #6a4631 0 45%, transparent 46%),
    linear-gradient(145deg, #f6c86f, #8fd2b9);
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.38),
    0 0 0 5px rgba(81, 48, 33, 0.08),
    0 0 22px rgba(143, 210, 185, 0.35);
  animation: softBlink 5.4s ease-in-out infinite;
}

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

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

.cat-eye span {
  position: absolute;
  left: 48%;
  top: 48%;
  width: 42%;
  height: 42%;
  translate: -50% -50%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: translate 300ms ease;
}

.lumi-zone.look-left .cat-eye span {
  translate: -66% -50%;
}

.lumi-zone.look-right .cat-eye span {
  translate: -34% -50%;
}

.cat-muzzle {
  position: absolute;
  left: 52%;
  top: 55%;
  z-index: 2;
  width: 30%;
  height: 24%;
  translate: -50% 0;
  border-radius: 52% 52% 44% 44%;
  background:
    radial-gradient(circle at 34% 36%, #fff8ee 0 38%, transparent 39%),
    radial-gradient(circle at 66% 36%, #fff8ee 0 38%, transparent 39%);
  filter: drop-shadow(0 4px 5px rgba(116, 63, 48, 0.08));
}

.cat-nose {
  top: 59%;
  z-index: 4;
  width: 8.5%;
  height: 6.2%;
  border-radius: 55% 55% 70% 70%;
  background: linear-gradient(145deg, #e88788, #c65f70);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.4);
}

.lumi-zone.silly .cat-nose {
  animation: noseScrunch 480ms ease;
}

.cat-mouth {
  top: 66%;
  z-index: 4;
  width: 20%;
}

.cat-mouth::before,
.cat-mouth::after {
  border-bottom-color: #7c4637;
  border-bottom-width: 4px;
}

.cat-tongue {
  position: absolute;
  left: 52%;
  top: 73%;
  z-index: 3;
  width: 8%;
  height: 0;
  translate: -50% 0;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(#ffb0b8, #e7788d);
  opacity: 0;
}

.lumi-zone.silly .cat-tongue,
.lumi-zone.lick .cat-tongue {
  height: 9%;
  opacity: 1;
}

.cat-whiskers::before,
.cat-whiskers::after {
  background: rgba(255, 250, 244, 0.95);
  box-shadow: 0 1px 2px rgba(120, 56, 42, 0.08);
}

.cat-paw {
  bottom: 11%;
  z-index: 5;
  width: 23%;
  height: 20%;
  border-radius: 46% 46% 38% 38%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.5), transparent 20%),
    linear-gradient(145deg, #ffe3c4, #e49a68);
  box-shadow:
    inset 8px 9px 14px rgba(255, 255, 255, 0.32),
    0 13px 18px rgba(115, 75, 90, 0.13);
}

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

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

.lumi-zone.lick .cat-paw-left {
  animation: pawLick 1.15s ease-in-out;
}

.cat-paw span {
  bottom: 14%;
  width: 16%;
  height: 25%;
  background: #f4a4a8;
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.45);
}

.cat-sparkle {
  color: #fff2a3;
}

.lumi-zone.happy .cat-eye {
  filter: brightness(1.14) saturate(1.16);
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.42),
    0 0 0 5px rgba(81, 48, 33, 0.08),
    0 0 30px rgba(255, 218, 96, 0.5);
}

.lumi-zone.happy .cat-tail {
  animation: happyTail 420ms ease-in-out infinite alternate;
}

.lumi-zone.silly .cat-head {
  animation: sillyHead 500ms ease-in-out;
}

.lumi-zone.silly .cat-eye-right {
  top: 43%;
  height: 9px;
  border-radius: 999px;
  background: #6a4631;
}

.lumi-zone.silly .cat-mouth {
  width: 13%;
  border-color: #7c4637;
}

@keyframes kittenBreathe {
  0%,
  100% {
    scale: 1;
  }

  50% {
    scale: 1.018;
  }
}

@keyframes curiousLook {
  0%,
  100% {
    transform: rotate(0deg);
  }

  42% {
    transform: rotate(-1.5deg);
  }

  72% {
    transform: rotate(1.4deg);
  }
}

@keyframes softBlink {
  0%,
  45%,
  49%,
  100% {
    scale: 1 1;
  }

  47% {
    scale: 1 0.08;
  }
}

@keyframes fluffyTail {
  to {
    rotate: -17deg;
    translate: 6px -4px;
  }
}

@keyframes happyTail {
  to {
    rotate: -6deg;
    translate: 10px -8px;
  }
}

@keyframes earTwitch {
  50% {
    transform: rotate(-8deg) translateY(-3px);
  }
}

@keyframes pawLick {
  0%,
  100% {
    transform: translate(0, 0) rotate(-4deg);
  }

  45%,
  70% {
    transform: translate(20px, -24px) rotate(16deg);
  }
}

@keyframes noseScrunch {
  50% {
    scale: 1.22 0.78;
  }
}

@keyframes sillyHead {
  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(4deg);
  }

  70% {
    transform: rotate(-3deg);
  }
}

@keyframes expression {
  0% {
    opacity: 0;
    scale: 0.72;
    translate: 0 12px;
  }

  24%,
  72% {
    opacity: 1;
    scale: 1;
    translate: 0 0;
  }

  100% {
    opacity: 0;
    scale: 0.8;
    translate: 0 -14px;
  }
}

.cta {
  margin: 18px auto 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.36);
}

.cta p {
  margin-bottom: 7px;
}

.cta .primary-btn {
  margin-top: 10px;
  min-height: 50px;
}

.final-panel strong {
  display: block;
  margin: 8px 0 0;
  font-size: 1.5rem;
}

.final-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 14px 0;
}

.final-stats span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 12px 24px rgba(75, 48, 120, 0.1);
  color: #704005;
  font-weight: 950;
}

.score-form {
  width: min(360px, 100%);
  margin: 12px auto;
}

.score-form label {
  display: block;
  margin-bottom: 7px;
  color: #8d674f;
  font-size: 0.82rem;
  font-weight: 900;
}

.score-form div {
  display: flex;
  gap: 8px;
}

.score-form input {
  min-width: 0;
  flex: 1;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  padding: 0 15px;
  color: #6d4936;
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 22px rgba(121, 82, 70, 0.1);
  font-weight: 850;
  outline: 0;
}

.score-form input::placeholder {
  color: rgba(109, 73, 54, 0.5);
}

.score-form input:focus {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 0 0 4px rgba(255, 211, 101, 0.2),
    0 10px 22px rgba(121, 82, 70, 0.1);
}

.save-score {
  min-width: 78px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #c792ff, #ff8aae 64%, #ffb35d);
  box-shadow: 0 12px 24px rgba(255, 138, 174, 0.24);
  cursor: pointer;
  font-weight: 950;
}

.score-form[data-saved="true"] .save-score {
  background: linear-gradient(135deg, #ffd95b, #ffb35d);
  color: #5f3808;
}

.leaderboard {
  width: min(360px, 100%);
  margin: 12px auto 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 14px 28px rgba(121, 82, 70, 0.1);
}

.leaderboard h3 {
  margin: 0 0 8px;
  color: #7b4a33;
  font-size: 0.94rem;
  letter-spacing: 0;
}

.leaderboard ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  border-radius: 999px;
  padding: 0 11px;
  color: #7d5d49;
  background: rgba(255, 247, 234, 0.56);
  font-size: 0.86rem;
  font-weight: 850;
}

.leaderboard strong {
  color: #9a6419;
}

.play-again {
  margin: 4px 0 8px;
  color: #24140a;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent),
    linear-gradient(135deg, #ffe36b, #ff9d4d);
}

.final-panel small {
  display: block;
  max-width: 410px;
  margin: 0 auto;
  color: var(--soft-ink);
  font-size: 0.84rem;
  line-height: 1.45;
}

.screen.is-visible {
  animation: screenFade 360ms ease both;
}

.final-screen {
  padding: clamp(14px, 3vw, 28px);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 221, 139, 0.16), transparent 34%),
    rgba(54, 37, 58, 0.38);
  backdrop-filter: blur(18px) saturate(1.05);
}

.final-panel {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: clamp(18px, 3.8vw, 34px);
  border-radius: clamp(26px, 4vw, 38px);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.78), rgba(255, 238, 229, 0.5)),
    rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -20px 46px rgba(255, 197, 128, 0.08),
    0 34px 90px rgba(62, 38, 76, 0.28),
    0 0 42px rgba(255, 213, 92, 0.18);
  animation: finalPanelIn 520ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.final-panel::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.final-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(130px, 0.72fr) minmax(0, 1fr);
  gap: clamp(14px, 4vw, 30px);
  align-items: center;
  text-align: left;
}

.final-lumi {
  position: relative;
  display: grid;
  min-height: clamp(130px, 24vw, 210px);
  place-items: end center;
  transform-origin: 50% 90%;
  animation: finalLumiBob 2.7s ease-in-out infinite;
}

.final-lumi-glow {
  position: absolute;
  left: 50%;
  bottom: 5%;
  width: 82%;
  height: 48%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 213, 72, 0.52), rgba(255, 180, 118, 0.18) 44%, transparent 70%),
    radial-gradient(circle, rgba(198, 158, 255, 0.24), transparent 72%);
  filter: blur(18px);
  translate: -50% 0;
}

.final-lumi-canvas {
  width: min(100%, 238px);
  filter:
    drop-shadow(0 22px 28px rgba(38, 27, 45, 0.24))
    drop-shadow(0 0 24px rgba(255, 213, 72, 0.28));
}

.final-screen.soft-loss .final-lumi {
  animation:
    finalLumiBob 2.7s ease-in-out infinite,
    softSorry 1.3s ease-in-out 1;
}

.final-screen.new-record .final-lumi-canvas {
  filter:
    drop-shadow(0 22px 28px rgba(38, 27, 45, 0.24))
    drop-shadow(0 0 42px rgba(255, 213, 72, 0.7));
}

.final-copy .kicker {
  min-height: 34px;
  background:
    linear-gradient(135deg, rgba(255, 238, 164, 0.82), rgba(255, 180, 102, 0.42)),
    rgba(255, 255, 255, 0.38);
  box-shadow: 0 12px 24px rgba(255, 184, 88, 0.14);
}

.final-screen.new-record .final-copy .kicker {
  color: #6a3a00;
  background:
    linear-gradient(135deg, #fff4a6, #ffc45d),
    rgba(255, 255, 255, 0.46);
  box-shadow:
    0 0 26px rgba(255, 211, 77, 0.48),
    0 14px 30px rgba(255, 184, 88, 0.2);
}

.final-copy h2 {
  margin: 14px 0 8px;
  font-size: clamp(2.15rem, 6.6vw, 4.4rem);
}

.final-copy p {
  margin: 0;
  color: #825f48;
  font-size: clamp(1.02rem, 2.4vw, 1.22rem);
  font-weight: 850;
}

.final-score-title {
  display: grid;
  width: min(560px, 100%);
  min-height: clamp(72px, 13vw, 104px);
  place-items: center;
  margin: clamp(16px, 3vw, 24px) auto 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  color: #6f4218;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.78), transparent 28%),
    linear-gradient(145deg, rgba(255, 244, 213, 0.82), rgba(255, 218, 185, 0.42));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 20px 44px rgba(134, 82, 55, 0.14);
  font-size: clamp(1.8rem, 6vw, 3.25rem);
  font-weight: 950;
  text-transform: uppercase;
}

.collected-words {
  display: grid;
  gap: 6px;
  width: min(560px, 100%);
  margin: 0 auto 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 22px;
  padding: 12px 16px;
  background: rgba(255, 250, 242, 0.44);
  color: #8a674f;
}

.collected-words span {
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.collected-words strong {
  margin: 0;
  color: #73503a;
  font-size: clamp(0.92rem, 2.4vw, 1.06rem);
  line-height: 1.45;
}

.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 14px 0 12px;
}

.final-actions .primary-btn {
  min-width: min(210px, 46%);
  min-height: 58px;
  text-transform: uppercase;
  transition:
    transform 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease;
}

.final-actions .primary-btn:hover,
.save-score:hover,
.cta .primary-btn:hover {
  transform: translateY(-3px) scale(1.025);
  filter: brightness(1.03);
}

.home-button {
  color: #6b421d;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 239, 218, 0.42)),
    rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 14px 30px rgba(121, 82, 70, 0.14),
    0 0 22px rgba(255, 213, 92, 0.14);
}

.record-burst {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.record-burst span {
  position: absolute;
  left: 50%;
  top: 22%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffd34f;
  box-shadow:
    0 0 14px rgba(255, 211, 79, 0.9),
    0 0 26px rgba(255, 160, 94, 0.36);
  opacity: 0;
  transform: rotate(var(--angle)) translateX(0);
}

.final-screen.new-record .record-burst span {
  animation: recordSpark 1.25s ease-out var(--delay) both;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 28px);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 217, 133, 0.18), transparent 32%),
    rgba(55, 37, 58, 0.42);
  backdrop-filter: blur(18px) saturate(1.06);
  pointer-events: auto;
  touch-action: manipulation;
  overscroll-behavior: contain;
}

.lead-modal.is-open {
  display: grid;
  animation: screenFade 260ms ease both;
}

.lead-modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  padding: clamp(22px, 4vw, 32px);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.86), rgba(255, 237, 229, 0.58)),
    rgba(255, 255, 255, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 34px 90px rgba(62, 38, 76, 0.28),
    0 0 36px rgba(255, 213, 92, 0.18);
  text-align: center;
  animation: finalPanelIn 420ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

.lead-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: #7c5037;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 24px rgba(121, 82, 70, 0.12);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
}

.lead-modal-head h2 {
  margin: 14px auto 10px;
  max-width: 380px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 0.95;
}

.lead-modal-head p {
  margin: 0 auto 18px;
  max-width: 390px;
  color: #87634d;
  font-size: 1rem;
  line-height: 1.45;
}

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

.game-lead-form input[type="text"],
.game-lead-form input[type="tel"],
.game-lead-form input[type="email"] {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 0 18px;
  color: #6d4936;
  background: rgba(255, 255, 255, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 24px rgba(121, 82, 70, 0.1);
  font-weight: 850;
  outline: 0;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
}

.game-lead-form input::placeholder {
  color: rgba(109, 73, 54, 0.52);
}

.game-lead-form input:focus {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 4px rgba(255, 211, 101, 0.2),
    0 12px 24px rgba(121, 82, 70, 0.1);
}

.contact-method {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.34);
}

.contact-method-label {
  margin-bottom: 9px;
  color: #85634c;
  font-size: 0.82rem;
  font-weight: 950;
}

.contact-method-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.contact-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.contact-pill span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  color: #81543a;
  background: rgba(255, 250, 242, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
  cursor: pointer;
  font-weight: 950;
}

.contact-pill input:checked + span {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--pink) 62%, var(--amber));
  box-shadow:
    0 14px 30px rgba(255, 122, 168, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.telegram-field[hidden] {
  display: none;
}

.lead-form-status {
  display: none;
  border-radius: 18px;
  padding: 10px 12px;
  color: #704005;
  background: rgba(255, 210, 74, 0.22);
  font-size: 0.88rem;
  font-weight: 850;
}

.game.modal-open .final-panel,
.game.modal-open .game-overlay,
.game.modal-open .lumi-zone,
.game.modal-open .falling-item,
.game.modal-open .spark-layer {
  pointer-events: none;
}

.game.modal-open .lead-modal {
  pointer-events: auto;
}

.lead-form-status.is-visible {
  display: block;
}

.lead-form-status.is-error {
  color: #8f3445;
  background: rgba(255, 122, 168, 0.18);
}

.lead-submit-button {
  width: 100%;
  margin-top: 4px;
}

.lead-submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.game-lead-form small {
  color: rgba(109, 73, 54, 0.66);
  font-size: 0.76rem;
  line-height: 1.35;
}

.lead-success {
  display: none;
  gap: 10px;
  justify-items: center;
}

.lead-success.is-visible {
  display: grid;
  animation: finalPanelIn 360ms ease both;
}

.lead-success-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: #5b3609;
  background: linear-gradient(135deg, #fff4a6, #ffc45d);
  box-shadow: 0 0 28px rgba(255, 211, 77, 0.5);
  font-size: 2rem;
  font-weight: 950;
}

.lead-success h3 {
  margin: 4px 0 0;
  color: #5b3b2a;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.lead-success p {
  margin: 0 0 8px;
  color: #87634d;
}

@keyframes screenFade {
  from {
    opacity: 0;
  }
}

@keyframes finalPanelIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.965);
  }
}

@keyframes finalLumiBob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

@keyframes softSorry {
  30% {
    transform: translateY(3px) rotate(-4deg) scale(0.98);
    filter: saturate(0.92);
  }
}

@keyframes recordSpark {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(0) scale(0.3);
  }

  24% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--distance)) scale(1.1);
  }
}

@media (max-width: 760px) {
  .app {
    padding: 0;
  }

  .game {
    min-height: 100vh;
    border-radius: 0;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 14px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .hud {
    grid-column: 1 / -1;
    order: 3;
  }

  .hud span {
    min-width: 82px;
    min-height: 42px;
  }

  .mission-pill {
    width: calc(100% - 28px);
    min-height: 54px;
  }

  .playfield {
    height: calc(100vh - 164px);
    min-height: 560px;
  }

  .glass-panel {
    border-radius: 28px;
  }

  .start-panel,
  .result-panel {
    padding: 28px 22px;
  }

  .bubble {
    width: max(var(--size), 86px);
    height: max(var(--size), 86px);
  }

  .lumi-zone {
    bottom: 0;
    width: min(88vw, 340px);
    height: 250px;
  }

  .toast {
    top: 108px;
  }

  .combo {
    top: 166px;
  }
}

@media (max-width: 430px) {
  .brand p {
    display: none;
  }

  .brand h1 {
    font-size: 1.05rem;
  }

  #mission-label {
    top: calc(58px + env(safe-area-inset-top));
    min-height: 46px;
    padding: 0 18px;
    font-size: 1rem;
  }

  .playfield {
    min-height: 530px;
  }

  .bubble {
    width: max(var(--size), 82px);
    height: max(var(--size), 82px);
  }
}

/* Lumi mascot v3: brand-black premium fluffy kitten. */
.playfield {
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.2), rgba(255, 239, 221, 0.1)),
    url("./assets/game-background.png") center bottom / cover no-repeat;
  animation: none;
}

@keyframes softGradientDrift {
  to {
    background-position: 18px -10px, -22px 14px, 16px 0, 0 0;
  }
}

.bubble {
  border-color: rgba(255, 255, 255, 0.94);
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.98) 0 11%, transparent 19%),
    radial-gradient(circle at 72% 78%, rgba(255, 255, 255, 0.38), transparent 31%),
    conic-gradient(from 210deg, rgba(255, 255, 255, 0.34), rgba(118, 216, 255, 0.2), rgba(255, 122, 168, 0.15), rgba(255, 255, 255, 0.32)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.2));
  box-shadow:
    inset 0 0 32px rgba(255, 255, 255, 0.86),
    inset -15px -20px 30px rgba(118, 216, 255, 0.18),
    0 0 28px rgba(255, 255, 255, 0.64),
    0 22px 50px rgba(75, 48, 120, 0.2);
}

.bubble-icon {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.88), transparent 27%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 12px 26px rgba(75, 48, 120, 0.16);
}

.lumi-zone {
  bottom: 0;
  width: clamp(170px, 23vw, 268px);
  height: clamp(152px, 21vw, 240px);
  perspective: 1000px;
}

.lumi-aura {
  bottom: 18px;
  width: 80%;
  height: 43%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 218, 76, 0.55), rgba(255, 210, 74, 0.18) 36%, transparent 69%),
    radial-gradient(circle at 50% 56%, rgba(105, 73, 180, 0.22), transparent 72%);
  filter: blur(18px);
}

.lumi-cat {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    drop-shadow(0 0 30px rgba(255, 218, 76, 0.22));
  animation:
    lumiFloat 3.15s ease-in-out infinite,
    kittenBreathe 4.4s ease-in-out infinite;
}

.cat-body {
  bottom: 8%;
  width: 58%;
  height: 49%;
  border-radius: 50% 50% 37% 37%;
  background:
    radial-gradient(circle at 34% 18%, rgba(255, 255, 255, 0.12), transparent 18%),
    radial-gradient(circle at 72% 20%, rgba(255, 210, 74, 0.1), transparent 23%),
    repeating-radial-gradient(ellipse at 48% 16%, rgba(255, 255, 255, 0.035) 0 1px, transparent 2px 7px),
    linear-gradient(145deg, #211814 0%, #0e0908 54%, #030202 100%);
  box-shadow:
    inset 18px 18px 34px rgba(255, 255, 255, 0.08),
    inset -22px -28px 36px rgba(0, 0, 0, 0.55),
    0 20px 42px rgba(12, 8, 18, 0.28);
  overflow: visible;
}

.cat-scarf,
.cat-medal {
  position: absolute;
  left: 50%;
  z-index: 6;
  translate: -50% 0;
}

.cat-scarf {
  top: 3%;
  width: 78%;
  height: 22%;
  border-radius: 999px 999px 46% 46%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.38), transparent 18%),
    linear-gradient(145deg, #ffd954, #c98311 72%);
  box-shadow:
    inset 0 7px 10px rgba(255, 255, 255, 0.24),
    inset 0 -9px 12px rgba(120, 64, 5, 0.22),
    0 8px 16px rgba(0, 0, 0, 0.18);
}

.cat-scarf::after {
  position: absolute;
  right: 4%;
  bottom: -26%;
  width: 31%;
  height: 54%;
  border-radius: 18px 18px 999px 999px;
  background: linear-gradient(145deg, #f4b72c, #b8750d);
  rotate: -12deg;
  content: "";
}

.cat-medal {
  top: 18%;
  display: grid;
  width: 16%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #2a1905;
  background:
    radial-gradient(circle at 32% 24%, #fff6b8, transparent 22%),
    linear-gradient(145deg, #ffd84d, #b97408);
  box-shadow:
    inset 0 3px 4px rgba(255, 255, 255, 0.32),
    0 6px 14px rgba(0, 0, 0, 0.24);
  font-size: clamp(0.62rem, 1.2vw, 0.9rem);
}

.cat-body::before {
  left: 5%;
  top: 14%;
  width: 34%;
  height: 31%;
  background: rgba(255, 255, 255, 0.07);
  filter: blur(9px);
}

.cat-body::after {
  right: 3%;
  top: 18%;
  width: 32%;
  height: 34%;
  background: rgba(255, 210, 74, 0.055);
  filter: blur(10px);
}

.cat-chest {
  top: 13%;
  width: 50%;
  height: 68%;
  background:
    repeating-radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.08) 0 1px, transparent 2px 8px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.015));
  opacity: 0.82;
}

.cat-tail {
  right: -3%;
  bottom: 24%;
  width: 40%;
  height: 26%;
  border: 19px solid #090605;
  border-left: 0;
  box-shadow:
    inset -8px 7px 0 rgba(255, 255, 255, 0.08),
    inset -17px -8px 20px rgba(0, 0, 0, 0.45),
    0 18px 24px rgba(12, 8, 18, 0.22);
  rotate: -31deg;
  animation: fluffyTail 2.1s ease-in-out infinite alternate;
}

.cat-head {
  bottom: 30%;
  width: 72%;
  height: 59%;
  border-radius: 48% 49% 41% 42%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.14), transparent 19%),
    radial-gradient(circle at 73% 18%, rgba(255, 210, 74, 0.08), transparent 24%),
    repeating-radial-gradient(ellipse at 44% 18%, rgba(255, 255, 255, 0.035) 0 1px, transparent 2px 8px),
    linear-gradient(145deg, #241a15 0%, #0d0807 50%, #020101 100%);
  box-shadow:
    inset 24px 18px 38px rgba(255, 255, 255, 0.08),
    inset -22px -26px 38px rgba(0, 0, 0, 0.56),
    0 22px 48px rgba(12, 8, 18, 0.3);
  overflow: visible;
}

.cat-head::before {
  left: 7%;
  bottom: 12%;
  width: 34%;
  height: 36%;
  background: rgba(255, 255, 255, 0.055);
  filter: blur(11px);
}

.cat-head::after {
  right: 7%;
  bottom: 12%;
  width: 34%;
  height: 36%;
  background: rgba(255, 210, 74, 0.04);
  filter: blur(12px);
}

.fur-crown {
  left: 50%;
  top: -9%;
  width: 34%;
  height: 25%;
  background:
    radial-gradient(ellipse at 16% 75%, #19110e 0 40%, transparent 42%),
    radial-gradient(ellipse at 44% 58%, #241912 0 42%, transparent 44%),
    radial-gradient(ellipse at 76% 75%, #120c0a 0 38%, transparent 40%);
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.18));
}

.cat-ear {
  top: -17%;
  width: 23%;
  height: 31%;
  border-radius: 42% 58% 38% 52%;
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.12), transparent 18%),
    linear-gradient(145deg, #1f1611, #050303 76%);
  box-shadow:
    inset 8px 8px 15px rgba(255, 255, 255, 0.08),
    inset -8px -10px 16px rgba(0, 0, 0, 0.44);
}

.cat-ear span {
  inset: 24% 23% 20%;
  background: linear-gradient(145deg, #ffe6df, #f4bfb8);
  box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.32);
}

.cat-stripe {
  top: 2%;
  width: 5.5%;
  background: linear-gradient(#fff7ed, rgba(255, 247, 237, 0.16));
  opacity: 0.94;
}

.stripe-one {
  left: 46%;
  rotate: 8deg;
}

.stripe-two {
  left: 56%;
  rotate: 15deg;
}

.stripe-three {
  left: 66%;
  rotate: 21deg;
}

.cat-cheek {
  top: 58%;
  background: radial-gradient(circle, rgba(255, 210, 74, 0.16), transparent 69%);
}

.cat-eye {
  top: 34%;
  width: 23%;
  background:
    radial-gradient(circle at 32% 26%, #fff 0 8%, transparent 9%),
    radial-gradient(circle at 68% 66%, rgba(255, 255, 255, 0.92) 0 4%, transparent 5%),
    radial-gradient(circle at 50% 54%, #050403 0 35%, transparent 36%),
    radial-gradient(circle at 50% 50%, #2d180b 0 47%, transparent 48%),
    linear-gradient(145deg, #ffe76f, #ffc928 60%, #ff9d40);
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.38),
    0 0 0 5px rgba(255, 210, 74, 0.13),
    0 0 26px rgba(255, 210, 74, 0.48);
}

.cat-eye span {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 62%);
}

.cat-muzzle {
  top: 55%;
  width: 31%;
  height: 25%;
  background:
    radial-gradient(circle at 33% 36%, #fff8ef 0 39%, transparent 40%),
    radial-gradient(circle at 67% 36%, #fff8ef 0 39%, transparent 40%);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.16));
}

.cat-nose {
  top: 59.5%;
  width: 8.3%;
  height: 6%;
  background: linear-gradient(145deg, #fffdf8, #f3eee8);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.55),
    0 2px 4px rgba(0, 0, 0, 0.18);
}

.cat-mouth {
  top: 66.5%;
}

.cat-mouth::before,
.cat-mouth::after {
  border-bottom-color: #fff8ef;
}

.cat-tongue {
  background: linear-gradient(#ffb0bd, #e77790);
}

.cat-whiskers::before,
.cat-whiskers::after {
  background: rgba(255, 248, 240, 0.94);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.cat-paw {
  bottom: 10%;
  width: 24%;
  height: 20%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(145deg, #211612, #050303 76%);
  box-shadow:
    inset 8px 9px 14px rgba(255, 255, 255, 0.08),
    inset -8px -10px 15px rgba(0, 0, 0, 0.44),
    0 14px 19px rgba(12, 8, 18, 0.22);
}

.cat-paw span {
  background: #ffd548;
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.42),
    0 0 8px rgba(255, 210, 74, 0.26);
}

.cat-foot {
  position: absolute;
  bottom: 2%;
  z-index: 4;
  width: 23%;
  height: 17%;
  border-radius: 48% 48% 42% 42%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.12), transparent 18%),
    linear-gradient(145deg, #1d130f, #040202 76%);
  box-shadow:
    inset 7px 8px 13px rgba(255, 255, 255, 0.07),
    inset -7px -9px 14px rgba(0, 0, 0, 0.44),
    0 10px 16px rgba(12, 8, 18, 0.2);
}

.cat-foot-left {
  left: 17%;
  rotate: -8deg;
}

.cat-foot-right {
  right: 17%;
  rotate: 8deg;
}

.cat-foot span {
  position: absolute;
  bottom: 16%;
  width: 15%;
  height: 27%;
  border-radius: 50%;
  background: #d99a84;
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.35);
}

.cat-foot span:first-child {
  left: 25%;
}

.cat-foot span:nth-child(2) {
  left: 43%;
  bottom: 24%;
}

.cat-foot span:last-child {
  right: 24%;
}

.cat-sparkle {
  color: #ffd548;
  text-shadow: 0 0 22px rgba(255, 210, 74, 0.9);
}

.lumi-zone.happy .lumi-cat {
  transform: translateY(-14px) rotate(-2deg) scale(1.045);
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    drop-shadow(0 0 34px rgba(255, 218, 76, 0.48));
}

.lumi-zone.happy .cat-eye {
  filter: brightness(1.18) saturate(1.2);
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.42),
    0 0 0 5px rgba(255, 210, 74, 0.14),
    0 0 34px rgba(255, 218, 96, 0.62);
}

.lumi-zone.silly .cat-eye-right {
  background: #ffd548;
}

.lumi-zone.silly .cat-mouth {
  border-color: #fff8ef;
}

.lumi-zone.lick .cat-paw-left {
  animation: pawLickBlack 1.15s ease-in-out;
}

@keyframes pawLickBlack {
  0%,
  100% {
    transform: translate(0, 0) rotate(-4deg);
  }

  45%,
  70% {
    transform: translate(18px, -22px) rotate(15deg);
  }
}

@media (max-width: 760px) {
  .lumi-zone {
    bottom: -2px;
    width: min(52vw, 215px);
    height: 168px;
  }
}

/* Lumi mascot v4: SVG premium character matching the provided reference direction. */
.lumi-cat {
  display: grid;
  place-items: center;
}

.lumi-live {
  position: relative;
  display: grid;
  width: 100%;
  place-items: center;
  transform-origin: 50% 86%;
}

.lumi-live > span,
.lumi-svg {
  display: none !important;
}

.lumi-zone .lumi-svg {
  display: none !important;
}

.lumi-video {
  display: none;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  border-radius: 36%;
  filter:
    drop-shadow(0 28px 30px rgba(12, 8, 18, 0.3))
    drop-shadow(0 0 24px rgba(255, 213, 72, 0.26));
  mix-blend-mode: multiply;
}

.lumi-canvas {
  position: relative;
  z-index: 3;
  width: 100%;
  height: auto;
  border-radius: 36%;
  filter:
    drop-shadow(0 28px 30px rgba(12, 8, 18, 0.3))
    drop-shadow(0 0 24px rgba(255, 213, 72, 0.26));
}

.lumi-asset {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  border-radius: 38%;
  filter:
    drop-shadow(0 28px 30px rgba(12, 8, 18, 0.3))
    drop-shadow(0 0 24px rgba(255, 213, 72, 0.26));
  mix-blend-mode: multiply;
}

.fallback-asset {
  display: none;
}

.live-tail {
  position: absolute;
  left: 5%;
  bottom: 11%;
  z-index: 1;
  width: 31%;
  height: 24%;
  border: 18px solid #080504;
  border-right: 0;
  border-radius: 999px 0 0 999px;
  box-shadow:
    inset 8px 5px 0 rgba(255, 255, 255, 0.06),
    0 18px 22px rgba(12, 8, 18, 0.18);
  transform-origin: 90% 45%;
  animation: liveTail 2s ease-in-out infinite alternate;
  opacity: 0.72;
}

.blink {
  position: absolute;
  z-index: 4;
  width: 13%;
  height: 2.8%;
  border-radius: 999px;
  background: #090604;
  opacity: 0;
  transform-origin: center;
  animation: liveBlink 5.1s ease-in-out infinite;
}

.blink-left {
  left: 34%;
  top: 36.5%;
  rotate: 9deg;
}

.blink-right {
  right: 30%;
  top: 33.5%;
  rotate: -11deg;
  animation-delay: 0.06s;
}

.happy-glint {
  position: absolute;
  z-index: 5;
  color: #ffd548;
  opacity: 0;
  scale: 0.6;
  text-shadow: 0 0 16px rgba(255, 213, 72, 0.9);
  pointer-events: none;
}

.glint-left {
  left: 30%;
  top: 30%;
}

.glint-right {
  right: 26%;
  top: 26%;
}

.funny-tongue {
  position: absolute;
  left: 51.5%;
  top: 51.5%;
  z-index: 5;
  width: 6.5%;
  height: 0;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(#ffb2bc, #df7388);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.36);
  opacity: 0;
  translate: -50% 0;
  pointer-events: none;
}

.mood-squiggle {
  position: absolute;
  right: 17%;
  top: 18%;
  z-index: 5;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #2a1905;
  background: rgba(255, 213, 72, 0.84);
  box-shadow: 0 0 24px rgba(255, 213, 72, 0.68);
  font-weight: 950;
  opacity: 0;
  scale: 0.7;
  pointer-events: none;
}

.lumi-svg {
  display: none;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 50% 88%;
}

.lumi-zone.happy .lumi-asset {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    drop-shadow(0 0 38px rgba(255, 213, 72, 0.56));
}

.lumi-zone.happy .lumi-video {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    drop-shadow(0 0 38px rgba(255, 213, 72, 0.56));
}

.lumi-zone.happy .lumi-canvas {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    drop-shadow(0 0 38px rgba(255, 213, 72, 0.56));
}

.lumi-zone.happy .lumi-live {
  animation: none;
}

.lumi-zone.happy .happy-glint {
  animation: liveGlint 760ms ease-out;
}

.lumi-zone.happy .live-tail {
  animation: liveHappyTail 360ms ease-in-out infinite alternate;
}

.lumi-zone.silly .lumi-asset {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    hue-rotate(8deg);
}

.lumi-zone.silly .lumi-video {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    hue-rotate(8deg);
}

.lumi-zone.silly .lumi-canvas {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    hue-rotate(8deg);
}

.lumi-zone.silly .lumi-live {
  animation: none;
}

.lumi-zone.silly .funny-tongue {
  height: 7.5%;
  opacity: 1;
  animation: tonguePop 620ms ease-in-out;
}

.lumi-zone.silly .mood-squiggle {
  animation: moodPop 760ms ease-out;
}

.lumi-zone.combo-glow .lumi-asset {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    drop-shadow(0 0 48px rgba(255, 213, 72, 0.7));
}

.lumi-zone.combo-glow .lumi-video {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    drop-shadow(0 0 48px rgba(255, 213, 72, 0.7));
}

.lumi-zone.combo-glow .lumi-canvas {
  filter:
    drop-shadow(0 30px 34px rgba(12, 8, 18, 0.32))
    drop-shadow(0 0 48px rgba(255, 213, 72, 0.7));
}

.lumi-zone.run-left .lumi-live {
  transform: none;
}

.lumi-zone.run-right .lumi-live {
  transform: none;
}

.catch-mouth {
  position: absolute;
  left: 51%;
  top: 43%;
  z-index: 5;
  width: 12%;
  height: 0;
  translate: -50% 0;
  border-radius: 0 0 999px 999px;
  background: radial-gradient(circle at 50% 20%, #3a140f, #070202 68%);
  opacity: 0;
  box-shadow: inset 0 3px 6px rgba(255, 255, 255, 0.12);
}

.lumi-zone.eating .catch-mouth {
  height: 7%;
  opacity: 0.92;
  animation: mouthChomp 360ms ease-in-out;
}

@keyframes mouthChomp {
  0%,
  100% {
    height: 0;
    opacity: 0;
  }

  35%,
  65% {
    height: 7%;
    opacity: 0.92;
  }
}

@keyframes mascotFloat {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -10px;
  }
}

@keyframes mascotBreathe {
  0%,
  100% {
    scale: 1;
  }

  50% {
    scale: 1.018;
  }
}

@keyframes mascotHappy {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  45% {
    transform: translateY(-18px) rotate(-2deg) scale(1.045);
  }
}

@keyframes mascotSilly {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }

  28% {
    transform: rotate(5deg) scale(0.99);
  }

  68% {
    transform: rotate(-4deg) scale(1.01);
  }
}

@keyframes liveBlink {
  0%,
  44%,
  50%,
  100% {
    opacity: 0;
    scale: 1 0.25;
  }

  46%,
  48% {
    opacity: 0.95;
    scale: 1 1;
  }
}

@keyframes liveTail {
  to {
    rotate: -10deg;
    translate: -8px -4px;
  }
}

@keyframes liveHappyTail {
  to {
    rotate: -19deg;
    translate: -14px -7px;
  }
}

@keyframes liveGlint {
  0% {
    opacity: 0;
    scale: 0.55;
  }

  25%,
  72% {
    opacity: 1;
    scale: 1.15;
  }

  100% {
    opacity: 0;
    scale: 0.78;
  }
}

@keyframes tonguePop {
  0%,
  100% {
    height: 0;
    opacity: 0;
  }

  32%,
  75% {
    height: 7.5%;
    opacity: 1;
  }
}

@keyframes moodPop {
  0% {
    opacity: 0;
    scale: 0.6;
    translate: 0 10px;
  }

  25%,
  72% {
    opacity: 1;
    scale: 1;
    translate: 0 0;
  }

  100% {
    opacity: 0;
    scale: 0.78;
    translate: 0 -12px;
  }
}

.svg-head,
.svg-body,
.svg-tail,
.svg-paws {
  transform-box: fill-box;
  transform-origin: center;
}

.svg-head {
  animation: svgHeadIdle 6.8s ease-in-out infinite;
}

.svg-tail {
  animation: svgTailWave 2s ease-in-out infinite alternate;
  transform-origin: 72% 74%;
}

.svg-ear-left,
.svg-ear-right {
  transform-box: fill-box;
  transform-origin: 50% 92%;
}

.svg-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: svgBlink 5.3s ease-in-out infinite;
}

.svg-eye-right {
  animation-delay: 0.06s;
}

.svg-sparkle {
  fill: #ffd548;
  font-size: 26px;
  filter: drop-shadow(0 0 10px rgba(255, 213, 72, 0.8));
  animation: twinkle 2.2s ease-in-out infinite;
}

.sparkle-b {
  animation-delay: 0.7s;
}

.lumi-zone.happy .svg-head {
  animation: svgHappyHead 520ms ease-in-out;
}

.lumi-zone.happy .svg-tail {
  animation: svgHappyTail 380ms ease-in-out infinite alternate;
}

.lumi-zone.happy .svg-eye {
  filter: brightness(1.18) saturate(1.2) drop-shadow(0 0 8px rgba(255, 213, 72, 0.5));
}

.lumi-zone.silly .svg-head {
  animation: svgSillyHead 560ms ease-in-out;
}

.lumi-zone.silly .svg-eye-right {
  scale: 1 0.16;
}

.lumi-zone.silly .svg-tongue,
.lumi-zone.lick .svg-tongue {
  opacity: 1;
}

.lumi-zone.look-left .svg-eyes {
  translate: -8px 0;
}

.lumi-zone.look-right .svg-eyes {
  translate: 8px 0;
}

.lumi-zone.idle-ear .svg-ear-left {
  animation: svgEarTwitch 560ms ease;
}

.lumi-zone.idle-ear .svg-ear-right {
  animation: svgEarTwitch 560ms ease 80ms;
}

.lumi-zone.lick .svg-paws {
  animation: svgPawLift 1.15s ease-in-out;
}

@keyframes svgHeadIdle {
  0%,
  100% {
    rotate: 0deg;
  }

  42% {
    rotate: -1.6deg;
  }

  72% {
    rotate: 1.2deg;
  }
}

@keyframes svgTailWave {
  to {
    rotate: 8deg;
    translate: 6px -3px;
  }
}

@keyframes svgHappyTail {
  to {
    rotate: 15deg;
    translate: 12px -8px;
  }
}

@keyframes svgBlink {
  0%,
  45%,
  49%,
  100% {
    scale: 1 1;
  }

  47% {
    scale: 1 0.08;
  }
}

@keyframes svgHappyHead {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }

  45% {
    translate: 0 -10px;
    rotate: -3deg;
  }
}

@keyframes svgSillyHead {
  0%,
  100% {
    rotate: 0deg;
  }

  30% {
    rotate: 5deg;
  }

  68% {
    rotate: -4deg;
  }
}

@keyframes svgEarTwitch {
  50% {
    rotate: -8deg;
    translate: 0 -4px;
  }
}

@keyframes svgPawLift {
  0%,
  100% {
    translate: 0 0;
  }

  45%,
  70% {
    translate: 0 -16px;
  }
}

@media (max-width: 640px) {
  .final-screen {
    padding: 12px;
  }

  .final-panel {
    max-height: calc(100dvh - 24px);
    padding: 18px 14px;
  }

  .final-hero {
    grid-template-columns: 1fr;
    gap: 6px;
    text-align: center;
  }

  .final-lumi {
    min-height: 118px;
  }

  .final-lumi-canvas {
    width: min(48vw, 170px);
  }

  .final-copy h2 {
    margin-top: 10px;
  }

  .final-score-title {
    min-height: 70px;
    border-radius: 24px;
  }

  .final-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .final-actions .primary-btn {
    min-width: 0;
    min-height: 54px;
    padding: 0 14px;
    font-size: 0.9rem;
  }

  .score-form div {
    gap: 7px;
  }

  .leaderboard {
    margin-bottom: 12px;
  }

  .cta {
    margin-top: 12px;
    padding: 14px;
  }
}

.final-lumi .final-lumi-canvas {
  width: min(100%, 238px);
  filter:
    drop-shadow(0 22px 28px rgba(38, 27, 45, 0.24))
    drop-shadow(0 0 24px rgba(255, 213, 72, 0.28));
}

.final-screen.new-record .final-lumi .final-lumi-canvas {
  filter:
    drop-shadow(0 22px 28px rgba(38, 27, 45, 0.24))
    drop-shadow(0 0 42px rgba(255, 213, 72, 0.7));
}

@media (max-width: 640px) {
  .final-lumi .final-lumi-canvas {
    width: min(48vw, 170px);
  }
}

/* Final screen polish: reward state, word pills, and stronger Lumi presence. */
.game.final-mode .mission-pill {
  width: min(420px, calc(100% - 40px));
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.78), transparent 30%),
    linear-gradient(145deg, rgba(255, 247, 218, 0.78), rgba(255, 220, 236, 0.38)),
    rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 42px rgba(121, 82, 70, 0.13),
    0 0 28px rgba(255, 213, 92, 0.16);
}

.game.final-mode #mission-label {
  color: #704005;
  text-align: center;
}

.game.final-mode .mission-pill button {
  display: none;
}

.final-panel {
  width: min(860px, 100%);
}

.final-panel::after {
  position: absolute;
  inset: 8% 8% auto auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 213, 72, 0.22), transparent 62%),
    radial-gradient(circle at 22% 28%, rgba(255, 255, 255, 0.9) 0 4px, transparent 5px),
    radial-gradient(circle at 72% 66%, rgba(255, 255, 255, 0.72) 0 3px, transparent 4px);
  filter: blur(0.2px);
  opacity: 0.82;
  pointer-events: none;
  content: "";
  animation: finalSparkleFloat 3.4s ease-in-out infinite alternate;
}

.final-hero {
  grid-template-columns: minmax(190px, 0.86fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 38px);
  align-items: center;
}

.final-lumi {
  min-height: clamp(178px, 27vw, 270px);
  place-items: center;
  translate: 0 -10px;
}

.final-lumi-glow {
  bottom: 13%;
  width: 108%;
  height: 58%;
  filter: blur(22px);
  opacity: 0.98;
  animation: finalGlowPulse 1.9s ease-in-out infinite alternate;
}

.final-lumi .final-lumi-canvas {
  width: min(118%, 310px);
  filter:
    drop-shadow(0 24px 30px rgba(38, 27, 45, 0.24))
    drop-shadow(0 0 38px rgba(255, 213, 72, 0.4));
}

.final-score-title {
  position: relative;
  min-height: clamp(72px, 9vw, 86px);
  margin-top: 8px;
  overflow: hidden;
  animation: scoreRewardIn 620ms cubic-bezier(0.2, 1.2, 0.24, 1) 120ms both;
}

.final-score-title::before,
.final-score-title::after {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff8b9 0 3px, transparent 4px),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), transparent 28%),
    radial-gradient(circle, rgba(255, 211, 79, 0.26), transparent 70%);
  translate: 0 -50%;
  content: "";
  animation: scoreStarTwinkle 1.6s ease-in-out infinite alternate;
}

.final-score-title::before {
  left: 18px;
}

.final-score-title::after {
  right: 18px;
  animation-delay: 0.42s;
}

.final-stats {
  gap: 16px;
  align-items: center;
  margin: 12px auto 16px;
}

.final-stats span {
  min-width: 142px;
  min-height: 46px;
  justify-content: center;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 246, 232, 0.38)),
    rgba(255, 255, 255, 0.34);
}

.collected-words {
  gap: 10px;
  padding: 14px 16px 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.64), transparent 30%),
    rgba(255, 250, 242, 0.5);
}

.collected-words span {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  justify-self: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #7c5037;
  background: rgba(255, 224, 155, 0.34);
}

.word-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.word-pills b {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0 13px;
  color: #73503a;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 238, 220, 0.42)),
    rgba(255, 255, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 20px rgba(121, 82, 70, 0.09);
  font-size: 0.92rem;
  line-height: 1;
}

.empty-words b {
  color: #8d674f;
  font-weight: 850;
}

.final-actions {
  align-items: stretch;
}

.final-actions .primary-btn {
  min-width: 210px;
  min-height: 60px;
  margin: 0;
}

.final-actions .home-button {
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.score-form {
  width: min(460px, 100%);
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.24);
}

.score-form label {
  color: #7b4a33;
}

.score-form label::before {
  margin-right: 6px;
  content: "⭐";
}

.score-form input,
.save-score {
  min-height: 50px;
}

.save-score {
  min-width: 94px;
  box-shadow:
    0 14px 28px rgba(255, 138, 174, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.leaderboard {
  width: min(460px, 100%);
}

.leaderboard h3 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
}

.leaderboard h3::before {
  content: "🏆";
}

@keyframes finalSparkleFloat {
  to {
    translate: -10px 8px;
    opacity: 1;
  }
}

@keyframes finalGlowPulse {
  to {
    scale: 1.08;
    opacity: 1;
  }
}

@keyframes scoreRewardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }
}

@keyframes scoreStarTwinkle {
  to {
    scale: 1.18;
    opacity: 0.66;
  }
}

@media (max-width: 640px) {
  .game.final-mode .mission-pill {
    width: calc(100% - 28px);
  }

  .final-hero {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .final-lumi {
    min-height: 148px;
    translate: 0 -4px;
  }

  .final-lumi .final-lumi-canvas {
    width: min(58vw, 220px);
  }

  .final-score-title::before,
  .final-score-title::after {
    width: 30px;
    height: 30px;
  }

  .final-score-title::before {
    left: 8px;
  }

  .final-score-title::after {
    right: 8px;
  }

  .final-stats span {
    min-width: 126px;
  }

  .score-form div {
    display: grid;
  }

  .save-score {
    width: 100%;
  }
}

/* Compact mobile game layout */
@media (max-width: 768px) {
  .app {
    min-height: 100dvh;
    padding: 0;
    place-items: stretch;
  }

  .game {
    width: 100%;
    min-height: 100dvh;
    border-width: 0;
    border-radius: 0;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: max(8px, env(safe-area-inset-top)) 12px 6px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand-mark,
  .sound-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand p {
    display: none;
  }

  .brand h1 {
    font-size: 1.08rem;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sound-icon {
    font-size: 1rem;
  }

  .hud {
    grid-column: auto;
    order: 0;
    gap: 6px;
  }

  .hud span {
    min-width: 58px;
    min-height: 36px;
    border-radius: 14px;
    padding: 0 8px;
    font-size: 1rem;
  }

  #score::before {
    margin-right: 3px;
  }

  #timer::after {
    font-size: 0.64rem;
  }

  .mission-pill {
    width: calc(100% - 24px);
    min-height: 44px;
    margin-top: 4px;
    padding: 5px 6px 5px 14px;
    border-radius: 18px;
  }

  #mission-label {
    top: calc(58px + env(safe-area-inset-top));
    min-height: 46px;
    padding: 0 18px;
    font-size: 1rem;
    line-height: 1.1;
  }

  .mission-pill button {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
    box-shadow: 0 8px 18px rgba(139, 124, 255, 0.24);
  }

  .playfield {
    height: calc(100dvh - 102px - env(safe-area-inset-bottom));
    min-height: 520px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .start-panel {
    width: min(88vw, 390px);
    min-height: min(72dvh, 590px);
  }

  .screen {
    padding: 12px;
  }

  .toast {
    top: 72px;
  }

  .combo {
    top: 118px;
  }

  .control-hint {
    bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .lumi-zone {
    bottom: calc(0px + env(safe-area-inset-bottom));
    width: min(54vw, 220px);
    height: 172px;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding-left: 10px;
    padding-right: 10px;
    gap: 6px;
  }

  .brand-mark,
  .sound-btn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .hud span {
    min-width: 52px;
    min-height: 34px;
    border-radius: 13px;
    font-size: 0.96rem;
  }

  .mission-pill {
    min-height: 42px;
    margin-top: 3px;
  }

  #mission-label {
    font-size: 0.95rem;
  }

  .mission-pill button {
    width: 32px;
    height: 32px;
  }

  .playfield {
    height: calc(100dvh - 96px - env(safe-area-inset-bottom));
    min-height: 500px;
  }
}

/* Full-screen game layout: no top header, HUD floats inside the playfield. */
.playfield {
  height: 100dvh;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}

.game-overlay {
  top: calc(12px + env(safe-area-inset-top));
}

.playfield:has(.screen.is-visible) .game-overlay {
  display: none;
}

@media (max-width: 768px) {
  html,
  body,
  .app,
  .game,
  .playfield {
    width: 100vw;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 100svh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .screen {
    padding: 0;
    overflow: hidden;
  }

  .start-panel {
    width: 100vw;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .start-panel::after {
    bottom: max(33px, calc(env(safe-area-inset-bottom) + 27px));
    width: min(74vw, 376px);
    height: 46px;
    transform: translate3d(-50%, 6px, 0) scale(0.95);
  }

  .start-panel::before {
    bottom: 0;
    width: min(86vw, 420px);
    height: max(92px, calc(env(safe-area-inset-bottom) + 82px));
  }

  .start-panel .primary-btn {
    margin-bottom: max(34px, calc(env(safe-area-inset-bottom) + 28px));
  }

  .cover-art {
    object-fit: cover;
    object-position: center;
  }

  .game-overlay {
    top: calc(8px + env(safe-area-inset-top));
    right: 10px;
    left: 10px;
    gap: 8px;
  }

  .hud {
    gap: 6px;
  }

  .hud span {
    min-width: 58px;
    min-height: 36px;
    padding: 0 8px;
    border-radius: 14px;
    font-size: 0.98rem;
  }

  .sound-btn {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .sound-icon {
    font-size: 1rem;
  }

  .playfield {
    height: 100dvh;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .toast {
    top: 64px;
  }

  .combo {
    top: 108px;
  }

  .control-hint {
    display: none;
  }

  .falling-item {
    animation: itemFall var(--duration) linear forwards;
    filter: none;
  }

  .falling-item.far {
    filter: none;
    opacity: 0.82;
  }

  .final-screen {
    position: fixed;
    inset: 0;
    display: none;
    padding: max(4px, env(safe-area-inset-top)) 8px max(6px, env(safe-area-inset-bottom));
    overflow: hidden;
    touch-action: none;
  }

  .final-screen.is-visible {
    display: grid;
  }

  .final-panel {
    display: grid;
    grid-template-rows: auto auto auto auto auto auto;
    align-content: start;
    gap: 6px;
    width: 100%;
    height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 10px);
    max-height: none;
    overflow: hidden;
    padding: 7px 10px 8px;
    border-radius: 22px;
  }

  .final-panel::before,
  .final-panel::after,
  .record-burst,
  .final-panel small {
    display: none;
  }

  .final-hero {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 94px;
  }

  .final-lumi {
    min-height: 92px;
    align-self: end;
    translate: 0 5px;
  }

  .final-lumi .final-lumi-canvas {
    width: 112px;
    max-height: 106px;
    object-fit: contain;
  }

  .final-lumi-glow {
    bottom: 0;
    width: 96px;
    height: 54px;
    filter: blur(12px);
  }

  .final-copy .kicker {
    min-height: 24px;
    padding: 0 9px;
    font-size: 0.68rem;
  }

  .final-copy h2 {
    margin: 4px 0 1px;
    font-size: clamp(1.36rem, 7vw, 1.85rem);
    line-height: 1;
  }

  .final-copy p {
    font-size: 0.82rem;
    line-height: 1.1;
  }

  .final-score-title {
    min-height: 44px;
    margin: 0 auto;
    border-radius: 17px;
    font-size: clamp(1.08rem, 5.4vw, 1.45rem);
  }

  .final-score-title::before,
  .final-score-title::after {
    display: none;
  }

  .final-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0;
  }

  .final-stats span {
    min-width: 0;
    min-height: 32px;
    border-radius: 13px;
    font-size: 0.78rem;
  }

  .collected-words {
    gap: 4px;
    margin: 0;
    padding: 7px 8px;
    border-radius: 15px;
  }

  .collected-words span {
    min-height: 20px;
    padding: 0 8px;
    font-size: 0.58rem;
  }

  .word-pills {
    gap: 4px;
    max-height: 48px;
    overflow: hidden;
  }

  .word-pills b {
    min-height: 22px;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .final-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin: 0;
  }

  .final-actions .primary-btn {
    min-width: 0;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 16px;
    font-size: 0.78rem;
  }

  .score-form {
    display: none;
  }

  .leaderboard {
    display: none;
  }

  .cta {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 7px 8px;
    border-radius: 17px;
  }

  .cta p {
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.12;
  }

  .cta p + p {
    display: none;
  }

  .cta .primary-btn {
    min-height: 40px;
    padding: 0 10px;
    border-radius: 16px;
    font-size: 0.82rem;
  }
}

@media (max-width: 430px) {
  .hud span {
    min-width: 54px;
    min-height: 34px;
    border-radius: 13px;
    font-size: 0.94rem;
  }

  .sound-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .playfield {
    height: 100dvh;
    min-height: 100dvh;
  }
}

/* Locked one-screen mobile result. */
@media (max-width: 768px) {
  body:has(.final-screen.is-visible) {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
    overflow: hidden;
  }

  .final-screen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    max-height: 100dvh;
    padding: calc(4px + env(safe-area-inset-top)) 6px calc(6px + env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .final-panel {
    width: 100%;
    height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 10px);
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 10px);
    overflow: hidden !important;
    display: grid;
    grid-template-rows: 76px 40px 28px minmax(46px, 54px) 36px minmax(68px, 1fr);
    gap: 4px;
    padding: 6px 8px !important;
    border-radius: 18px;
  }

  .final-hero {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 76px;
    gap: 6px;
  }

  .final-lumi {
    min-height: 72px;
    overflow: visible;
    translate: 0 3px;
  }

  .final-lumi .final-lumi-canvas {
    width: 88px;
    max-height: 82px;
  }

  .final-copy .kicker {
    min-height: 19px;
    padding: 0 7px;
    font-size: 0.56rem;
  }

  .final-copy h2 {
    margin: 2px 0 0;
    font-size: clamp(1.06rem, 6vw, 1.42rem);
    line-height: 0.98;
  }

  .final-copy p {
    margin: 1px 0 0;
    font-size: 0.68rem;
    line-height: 1;
  }

  .final-score-title {
    min-height: 40px;
    margin: 0;
    border-radius: 14px;
    font-size: clamp(0.95rem, 5vw, 1.25rem);
  }

  .final-stats {
    gap: 4px;
  }

  .final-stats span {
    min-height: 28px;
    border-radius: 11px;
    font-size: 0.7rem;
  }

  .collected-words {
    min-height: 0;
    gap: 3px;
    padding: 5px 6px;
    border-radius: 13px;
  }

  .collected-words span {
    min-height: 16px;
    padding: 0 7px;
    font-size: 0.5rem;
  }

  .word-pills {
    gap: 3px;
    max-height: 28px;
  }

  .word-pills b {
    min-height: 18px;
    padding: 0 7px;
    font-size: 0.56rem;
  }

  .final-actions {
    gap: 5px;
  }

  .final-actions .primary-btn {
    min-height: 36px;
    border-radius: 14px;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .cta {
    align-self: stretch;
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 0;
    padding: 6px;
    border-radius: 14px;
  }

  .cta p {
    display: none;
  }

  .cta .primary-btn {
    min-height: 38px;
    border-radius: 14px;
    padding: 0 8px;
    font-size: 0.72rem;
    line-height: 1.05;
  }

  .lead-modal {
    padding: calc(8px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(55, 37, 58, 0.46);
    backdrop-filter: none;
  }

  .lead-modal-panel {
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 18px);
    overflow: auto;
    padding: 18px 14px 16px;
    border-radius: 24px;
    animation: none;
  }

  .lead-modal-head h2 {
    margin: 8px auto 6px;
    font-size: 1.5rem;
    line-height: 1;
  }

  .lead-modal-head p {
    margin-bottom: 10px;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .game-lead-form {
    gap: 8px;
  }

  .game-lead-form input[type="text"],
  .game-lead-form input[type="tel"],
  .game-lead-form input[type="email"] {
    min-height: 48px;
    font-size: 16px;
  }

  .contact-method {
    padding: 8px;
    border-radius: 18px;
  }

  .contact-pill span {
    min-height: 40px;
  }
}

/* Premium compact result popup. */
.final-screen {
  place-items: center;
  overflow: hidden;
}

.final-panel {
  overflow: hidden;
}

.final-copy .kicker:empty {
  display: none;
}

.more-words {
  color: #6f4218;
  background:
    linear-gradient(145deg, rgba(255, 226, 128, 0.86), rgba(255, 180, 102, 0.64)),
    rgba(255, 236, 164, 0.78);
}

@media (min-width: 769px) {
  .final-screen {
    padding: 18px;
  }

  .final-panel {
    width: min(760px, calc(100vw - 36px));
    max-height: calc(100dvh - 36px);
    display: grid;
    gap: 8px;
    align-content: start;
    overflow: hidden;
    padding: 22px 24px 20px;
    border-radius: 30px;
  }

  .final-panel::before,
  .final-panel::after,
  .final-panel small,
  .leaderboard {
    display: none;
  }

  .final-hero {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 18px;
    min-height: 104px;
  }

  .final-lumi {
    min-height: 112px;
    height: 112px;
    translate: 0;
  }

  .final-lumi .final-lumi-canvas {
    width: 134px;
    max-height: 126px;
    object-fit: contain;
  }

  .final-lumi-glow {
    width: 136px;
    height: 62px;
    filter: blur(14px);
  }

  .final-copy {
    display: grid;
    gap: 4px;
    align-content: center;
    text-align: left;
  }

  .final-copy .kicker {
    width: fit-content;
    min-height: 24px;
    padding: 0 11px;
    font-size: 0.68rem;
  }

  .final-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 0.98;
  }

  .final-copy p {
    margin: 0;
    font-size: 0.95rem;
  }

  .final-score-title {
    min-height: 52px;
    margin: 0;
    border-radius: 20px;
    font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  }

  .final-score-title::before,
  .final-score-title::after {
    display: none;
  }

  .final-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
  }

  .final-stats span {
    min-width: 0;
    min-height: 36px;
    border-radius: 16px;
    font-size: 0.88rem;
  }

  .collected-words {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    max-height: 58px;
    margin: 0;
    padding: 9px 11px;
    overflow: hidden;
    border-radius: 18px;
  }

  .collected-words span {
    min-height: 24px;
    padding: 0 9px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .word-pills {
    justify-content: flex-start;
    gap: 5px;
    max-height: 38px;
    overflow: hidden;
  }

  .word-pills b {
    min-height: 20px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .final-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
  }

  .final-actions .primary-btn {
    min-width: 0;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 17px;
    font-size: 0.84rem;
  }

  .score-form {
    width: 100%;
    margin: 0;
    padding: 8px;
    border-radius: 18px;
  }

  .score-form label {
    margin-bottom: 5px;
    font-size: 0.68rem;
  }

  .score-form input,
  .save-score {
    min-height: 36px;
    font-size: 0.78rem;
  }

  .cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .cta p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.15;
    text-align: left;
  }

  .cta .primary-btn {
    min-height: 40px;
    margin: 0;
    padding: 0 16px;
    border-radius: 15px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .final-screen {
    position: fixed !important;
    inset: 0 !important;
    display: none;
    place-items: center;
    width: 100vw;
    height: 100dvh;
    padding: 0 !important;
    overflow: hidden !important;
    background:
      radial-gradient(circle at 50% 36%, rgba(255, 220, 128, 0.2), transparent 34%),
      rgba(54, 37, 58, 0.34);
    backdrop-filter: blur(10px);
    overscroll-behavior: none;
    touch-action: none;
  }

  .final-screen.is-visible {
    display: grid;
  }

  .final-panel {
    width: calc(100% - 24px);
    height: auto !important;
    max-height: 88dvh !important;
    display: grid;
    grid-template-rows: auto;
    gap: 8px;
    align-content: start;
    justify-items: stretch;
    overflow: hidden !important;
    padding: 16px !important;
    border-radius: 28px;
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.68), transparent 34%),
      linear-gradient(145deg, rgba(255, 252, 246, 0.9), rgba(255, 236, 225, 0.72)),
      rgba(255, 255, 255, 0.6);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.95),
      0 22px 58px rgba(62, 38, 76, 0.26),
      0 0 34px rgba(255, 213, 92, 0.2);
  }

  .final-panel::before,
  .final-panel::after,
  .final-panel small,
  .score-form,
  .leaderboard {
    display: none !important;
  }

  .record-burst {
    display: block;
  }

  .final-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
    justify-items: center;
    text-align: center;
  }

  .final-lumi {
    min-height: 86px;
    height: 86px;
    translate: 0;
    place-items: center;
    overflow: visible;
  }

  .final-lumi .final-lumi-canvas {
    width: 106px;
    max-height: 96px;
    object-fit: contain;
  }

  .final-lumi-glow {
    bottom: 8px;
    width: 112px;
    height: 56px;
    filter: blur(13px);
  }

  .final-copy {
    display: grid;
    justify-items: center;
    gap: 3px;
  }

  .final-copy .kicker {
    min-height: 22px;
    padding: 0 10px;
    font-size: 0.66rem;
  }

  .final-copy h2 {
    margin: 0;
    font-size: clamp(1.35rem, 7vw, 1.9rem);
    line-height: 1;
  }

  .final-copy p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.05;
  }

  .final-score-title {
    min-height: 44px;
    margin: 2px 0 0;
    border-radius: 18px;
    font-size: clamp(1.05rem, 5.4vw, 1.45rem);
  }

  .final-score-title::before,
  .final-score-title::after {
    display: none;
  }

  .final-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
  }

  .final-stats span {
    min-width: 0;
    min-height: 32px;
    border-radius: 14px;
    font-size: 0.76rem;
  }

  .collected-words {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 0;
    max-height: 52px;
    margin: 0;
    padding: 8px 9px;
    border-radius: 16px;
    overflow: hidden;
  }

  .collected-words span {
    min-height: 22px;
    padding: 0 8px;
    font-size: 0.62rem;
    white-space: nowrap;
  }

  .word-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 38px;
    overflow: hidden;
    justify-content: flex-start;
  }

  .word-pills b {
    min-height: 18px;
    padding: 0 7px;
    font-size: 0.6rem;
  }

  .final-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 2px 0 0;
  }

  .final-actions .primary-btn {
    min-width: 0;
    min-height: 38px;
    padding: 0 8px;
    border-radius: 15px;
    font-size: 0.74rem;
  }

  .cta {
    display: grid;
    gap: 8px;
    margin: 6px 0 0;
    padding: 12px;
    max-height: 110px;
    border-radius: 18px;
  }

  .cta p {
    display: block;
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.12;
  }

  .cta .primary-btn {
    min-height: 40px;
    padding: 0 10px;
    border-radius: 15px;
    font-size: 0.78rem;
    line-height: 1.05;
  }
}

/* Mobile performance profile. */
@media (max-width: 768px), (pointer: coarse) {
  .playfield {
    background:
      linear-gradient(180deg, rgba(255, 250, 244, 0.14), rgba(255, 239, 221, 0.08)),
      url("./assets/game-background-mobile.jpg") center bottom / cover no-repeat !important;
  }

  .item-art {
    background-image: url("./assets/snacks-mobile.png");
  }

  .extra-art {
    background-image: url("./assets/extra-food-mobile.png");
  }

  .school-art {
    background-image: url("./assets/school-things-mobile.png");
  }

  .transport-art {
    background-image: url("./assets/transport-mobile.png");
  }

  .bad-art {
    background-image: url("./assets/bad-objects-mobile.png");
  }

  .dessert-shape,
  .cream-blob,
  .particle,
  .star {
    display: none;
  }

  .sky {
    translate: 0 0 !important;
    transition: none;
  }

  .game::before {
    animation: none;
  }

  .screen,
  .glass-panel,
  .hud span,
  .sound-btn,
  .points-pop,
  .toast,
  .combo,
  .lead-modal,
  .lead-modal-panel {
    backdrop-filter: none !important;
  }

  .lumi-aura,
  .final-lumi-glow {
    filter: none !important;
    opacity: 0.42;
  }

  .lumi-canvas,
  .final-lumi-canvas,
  .lumi-video,
  .falling-item,
  .item-art,
  .item-shadow {
    filter: none !important;
  }

  .item-shadow,
  .falling-item::before {
    display: none !important;
  }

  .spark {
    width: 6px;
    height: 6px;
    box-shadow: none;
  }

  .falling-item {
    will-change: transform;
    animation: itemFall var(--duration) linear forwards !important;
  }

  .lumi-live {
    will-change: transform;
  }
}
