@charset "UTF-8";

:root {
  --paper: #fffafc;
  --paper-deep: #fff2f7;
  --pink-50: #fff7fb;
  --pink-100: #fdebf3;
  --pink-200: #f8d5e4;
  --pink-300: #efadc9;
  --pink-400: #e58bb3;
  --pink-500: #d96f9f;
  --pink-600: #bd4f80;
  --rose-700: #8e365f;
  --ink: #533443;
  --ink-soft: #7c5b69;
  --gold: #eebf62;
  --gold-light: #fff0b8;
  --white: #ffffff;
  --cloud: #a693a0;
  --shadow-sm: 0 12px 35px rgba(150, 66, 105, 0.1);
  --shadow-lg: 0 28px 80px rgba(150, 66, 105, 0.16);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 36px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(248, 213, 228, 0.78), transparent 29rem),
    radial-gradient(circle at 91% 88%, rgba(255, 230, 209, 0.72), transparent 33rem),
    linear-gradient(145deg, #fffafe 0%, #fff5f9 48%, #fffaf5 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(189, 79, 128, 0.35);
  outline-offset: 4px;
}

[hidden],
.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

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

.ambient__orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.75;
}

.ambient__orb--one {
  width: 17rem;
  height: 17rem;
  top: -8rem;
  right: 8%;
  background: rgba(245, 188, 214, 0.24);
}

.ambient__orb--two {
  width: 24rem;
  height: 24rem;
  left: -14rem;
  bottom: 9%;
  border: 1px solid rgba(226, 133, 174, 0.14);
}

.ambient__orb--three {
  width: 7rem;
  height: 7rem;
  right: 4%;
  bottom: 12%;
  background: rgba(242, 199, 110, 0.17);
}

.ambient__flower {
  position: absolute;
  color: rgba(190, 80, 129, 0.2);
  font-family: var(--serif);
}

.ambient__flower--one {
  top: 20%;
  left: 3%;
  font-size: 1.6rem;
  transform: rotate(-16deg);
}

.ambient__flower--two {
  top: 13%;
  right: 3%;
  color: rgba(231, 177, 71, 0.35);
  font-size: 1.2rem;
}

.ambient__flower--three {
  right: 7%;
  bottom: 42%;
  font-size: 2.1rem;
  transform: rotate(10deg);
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.mini-brand__mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--pink-500);
  border-radius: 50% 50% 47% 53%;
  box-shadow: 0 7px 18px rgba(198, 78, 132, 0.23);
  font-family: var(--serif);
  font-size: 1.12rem;
}

.icon-button {
  min-height: 42px;
  padding: 8px 13px 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(191, 86, 133, 0.13);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(150, 66, 105, 0.06);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.icon-button:hover {
  color: var(--pink-600);
  background: var(--white);
  transform: translateY(-1px);
}

#soundIcon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--pink-600);
  background: var(--pink-100);
  border-radius: 50%;
  font-weight: 800;
}

.icon-button__label {
  font-size: 0.76rem;
  font-weight: 700;
}

.screen {
  width: 100%;
  flex: 1;
  animation: screen-in 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen.is-leaving {
  animation: screen-out 250ms ease both;
}

@keyframes screen-in {
  from {
    transform: translateY(14px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes screen-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.screen--welcome {
  min-height: calc(100vh - 148px);
  padding: 46px 0 74px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.8fr);
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
}

.eyebrow {
  margin: 0 0 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: var(--pink-600);
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
}

.eyebrow > span:not([id]) {
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.eyebrow--left {
  justify-content: flex-start;
  margin-bottom: 10px;
}

.welcome-copy .eyebrow {
  justify-content: flex-start;
}

.welcome-copy h1 {
  max-width: 700px;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.75rem, 5.4vw, 5.15rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.script-name {
  position: relative;
  display: inline-block;
  margin: 10px 0 0 0.16em;
  color: var(--pink-600);
  font-family: "Snell Roundhand", "Segoe Script", "Bradley Hand", cursive;
  font-size: 1.05em;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.045em;
  transform: rotate(-2deg);
}

.script-name::after {
  content: "";
  position: absolute;
  right: 1%;
  bottom: -3px;
  left: -2%;
  height: 7px;
  border-top: 2px solid var(--pink-300);
  border-radius: 50%;
  transform: rotate(-1deg);
}

.welcome-copy__lead {
  max-width: 580px;
  margin: 27px 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.97rem, 1.5vw, 1.09rem);
  line-height: 1.8;
}

.welcome-actions {
  margin-top: 32px;
}

.primary-button,
.secondary-button,
.text-button,
.control-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  min-height: 57px;
  padding: 13px 18px 13px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--pink-500), var(--pink-600));
  border: 1px solid rgba(143, 38, 87, 0.12);
  border-radius: 999px;
  box-shadow: 0 13px 28px rgba(183, 67, 119, 0.25), inset 0 1px rgba(255, 255, 255, 0.25);
  font-size: 0.93rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-button:hover {
  box-shadow: 0 17px 34px rgba(183, 67, 119, 0.31), inset 0 1px rgba(255, 255, 255, 0.25);
  filter: saturate(1.06);
  transform: translateY(-2px);
}

.primary-button:active {
  transform: translateY(0) scale(0.98);
}

.primary-button__arrow {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--pink-600);
  background: var(--white);
  border-radius: 50%;
  font-size: 1.1rem;
  transition: transform 180ms ease;
}

.primary-button:hover .primary-button__arrow {
  transform: translateX(2px);
}

.primary-button--small {
  min-height: 48px;
  padding: 10px 24px;
  font-size: 0.88rem;
}

.tiny-note {
  margin: 13px 0 0;
  color: #987584;
  font-size: 0.73rem;
  line-height: 1.5;
}

.how-to-play__prompt {
  margin: 35px 0 -28px;
  color: var(--pink-600);
  font-family: var(--serif);
  font-size: 0.91rem;
  font-style: italic;
  font-weight: 700;
}

.how-to-play {
  max-width: 650px;
  margin-top: 43px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}

.how-to-play__item {
  min-height: 110px;
  padding: 15px 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(192, 84, 133, 0.1);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(145, 55, 97, 0.05);
  font-size: 0.7rem;
  line-height: 1.55;
}

.how-to-play__item strong {
  display: block;
  color: var(--ink);
  font-size: 0.73rem;
}

.how-to-play__icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--pink-600);
  background: var(--pink-100);
  border-radius: 10px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
}

.welcome-art {
  position: relative;
  isolation: isolate;
  width: min(100%, 450px);
  aspect-ratio: 0.93;
  justify-self: center;
  display: grid;
  place-items: center;
}

.halo {
  position: absolute;
  z-index: -2;
  border-radius: 50%;
}

.halo--outer {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(205, 100, 148, 0.12);
  box-shadow: var(--shadow-lg);
}

.halo--inner {
  width: 78%;
  height: 78%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95), transparent 22%),
    linear-gradient(150deg, #fdeaf3, #f9d5e4 58%, #f5c2d8);
  box-shadow: inset -20px -22px 45px rgba(184, 78, 126, 0.08), inset 15px 15px 40px rgba(255, 255, 255, 0.7);
}

.art-spark {
  position: absolute;
  z-index: 2;
  color: var(--gold);
  font-family: var(--serif);
  filter: drop-shadow(0 4px 5px rgba(197, 142, 43, 0.16));
  animation: soft-float 3s ease-in-out infinite;
}

.art-spark--one {
  top: 11%;
  left: 19%;
  font-size: 1.3rem;
}

.art-spark--two {
  top: 26%;
  right: 13%;
  font-size: 1.75rem;
  animation-delay: -1.3s;
}

.art-spark--three {
  right: 20%;
  bottom: 23%;
  color: var(--pink-600);
  font-size: 1.45rem;
  animation-delay: -2s;
}

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

.gift-box {
  position: relative;
  width: 48%;
  aspect-ratio: 0.96;
  margin-top: 4%;
  filter: drop-shadow(0 23px 22px rgba(144, 54, 95, 0.19));
  animation: gift-breathe 4s ease-in-out infinite;
}

@keyframes gift-breathe {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

.gift-box__body {
  position: absolute;
  inset: 30% 4% 2%;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.18) 48% 52%, transparent 53%),
    linear-gradient(145deg, #e783ae, #c55789);
  border-radius: 8px 8px 25px 25px;
  box-shadow: inset 12px 9px 18px rgba(255, 255, 255, 0.16), inset -13px -15px 24px rgba(119, 32, 72, 0.12);
}

.gift-box__lid {
  position: absolute;
  z-index: 2;
  width: 108%;
  height: 25%;
  top: 25%;
  left: -4%;
  background: linear-gradient(165deg, #f3aac8, #d76f9e);
  border-radius: 11px 11px 8px 8px;
  box-shadow: 0 7px 10px rgba(116, 39, 74, 0.12), inset 8px 4px rgba(255, 255, 255, 0.15);
}

.gift-box__ribbon {
  position: absolute;
  width: 22%;
  height: 100%;
  top: 0;
  left: 39%;
  background: linear-gradient(90deg, #f7d583, #ffeca9 50%, #e9b953);
  box-shadow: 4px 0 9px rgba(116, 76, 20, 0.1);
}

.gift-box__heart {
  position: absolute;
  z-index: 1;
  right: 11%;
  bottom: 11%;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--serif);
  font-size: 1.65rem;
}

.gift-box__bow {
  position: absolute;
  z-index: 3;
  width: 65%;
  height: 35%;
  top: 0;
  left: 18%;
}

.gift-box__bow::after {
  content: "";
  position: absolute;
  width: 27%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  background: linear-gradient(145deg, #ffe798, #e8b94d);
  border-radius: 50%;
  box-shadow: 0 5px 9px rgba(122, 75, 10, 0.16);
  transform: translate(-50%, -50%);
}

.gift-box__bow span {
  position: absolute;
  width: 52%;
  height: 65%;
  top: 14%;
  background: linear-gradient(140deg, #f8d57d, #e6af3e);
  box-shadow: inset 7px 7px 10px rgba(255, 255, 255, 0.24);
}

.gift-box__bow span:first-child {
  left: 1%;
  border-radius: 60% 27% 52% 48%;
  transform: rotate(18deg);
}

.gift-box__bow span:last-child {
  right: 1%;
  border-radius: 27% 60% 48% 52%;
  transform: rotate(-18deg);
}

.art-label {
  position: absolute;
  z-index: 4;
  right: -1%;
  bottom: 13%;
  min-width: 195px;
  padding: 12px 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.89);
  border: 1px solid rgba(193, 87, 135, 0.12);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  transform: rotate(-2deg);
}

.art-label > span {
  color: var(--pink-500);
  font-size: 1.45rem;
}

.art-label p {
  margin: 0;
  color: var(--pink-600);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.15;
}

.art-label small {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.59rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* Game */
.screen--game {
  max-width: 940px;
  margin: 0 auto;
  padding: 25px 0 50px;
}

.game-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.game-heading h2,
.celebration-copy h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.secondary-button {
  min-height: 50px;
  padding: 11px 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--pink-600);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(190, 80, 129, 0.19);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(150, 66, 105, 0.07);
  font-size: 0.84rem;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease;
}

.secondary-button:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.secondary-button--compact {
  min-height: 41px;
  padding: 8px 16px;
}

.game-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(189, 79, 128, 0.13);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.hud {
  position: relative;
  min-height: 87px;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 23px;
  background: rgba(255, 250, 252, 0.92);
  border-bottom: 1px solid rgba(189, 79, 128, 0.11);
}

.hud__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud__label {
  color: #947381;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.hud__item strong {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1;
}

.hud__item small {
  margin-left: 2px;
  color: #9b7b89;
  font-size: 0.67em;
}

.hud__progress {
  height: 7px;
  overflow: hidden;
  background: var(--pink-100);
  border-radius: 999px;
}

.hud__progress span {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--pink-400), var(--pink-600));
  border-radius: inherit;
  box-shadow: 0 0 10px rgba(214, 103, 153, 0.32);
  transition: width 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hud__item--lives strong {
  color: var(--pink-500);
  letter-spacing: 0.08em;
}

.hud__item--lives strong.is-hit {
  animation: lives-hit 450ms ease;
}

@keyframes lives-hit {
  30% { color: #8b7480; transform: scale(1.15); }
}

.hud__item--time strong.is-urgent {
  color: var(--pink-600);
  animation: time-pulse 900ms ease-in-out infinite;
}

@keyframes time-pulse {
  50% { opacity: 0.55; }
}

.game-arena {
  position: relative;
  isolation: isolate;
  height: clamp(390px, 57vh, 560px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 35%),
    linear-gradient(165deg, #fff5fa 0%, #fce8f2 48%, #fae1ec 100%);
  outline: none;
  touch-action: none;
  user-select: none;
}

.game-arena::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  top: -260px;
  left: calc(50% - 210px);
  background: rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  box-shadow: 0 0 120px 90px rgba(255, 255, 255, 0.3);
}

.game-arena.is-hit {
  animation: arena-hit 360ms ease;
}

@keyframes arena-hit {
  25% { transform: translateX(-4px); filter: saturate(0.7); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.arena-sky,
.falling-layer {
  position: absolute;
  inset: 0;
}

.arena-sky {
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.arena-sky::after {
  content: "";
  position: absolute;
  right: -5%;
  bottom: -63px;
  left: -5%;
  height: 130px;
  background: rgba(255, 255, 255, 0.33);
  border-radius: 50% 50% 0 0;
}

.sky-cloud {
  position: absolute;
  width: 80px;
  height: 24px;
  background: rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  filter: blur(0.2px);
}

.sky-cloud::before,
.sky-cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  background: inherit;
  border-radius: 50%;
}

.sky-cloud::before { width: 39px; height: 39px; left: 13px; }
.sky-cloud::after { width: 31px; height: 31px; right: 10px; }
.sky-cloud--one { top: 19%; left: 8%; opacity: 0.65; transform: scale(0.78); }
.sky-cloud--two { top: 29%; right: 7%; opacity: 0.45; transform: scale(1.25); }

.sky-star {
  position: absolute;
  color: rgba(226, 172, 58, 0.35);
  font-family: var(--serif);
}

.sky-star--one { top: 14%; left: 28%; }
.sky-star--two { top: 33%; left: 53%; font-size: 1.4rem; }
.sky-star--three { top: 12%; right: 25%; font-size: 0.72rem; }

.falling-layer {
  z-index: 2;
  pointer-events: none;
}

.falling-item {
  position: absolute;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  will-change: transform;
}

.falling-item__shape {
  position: relative;
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(191, 84, 132, 0.14);
  border-radius: 16px;
  box-shadow: 0 9px 18px rgba(146, 58, 99, 0.14), inset 0 1px rgba(255, 255, 255, 0.7);
  font-size: 1.45rem;
}

.falling-item--heart .falling-item__shape {
  color: var(--pink-600);
  background: #fff8fb;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.75rem;
}

.falling-item--star .falling-item__shape {
  color: #c68d25;
  background: #fffaf0;
  border-color: rgba(212, 160, 60, 0.18);
  border-radius: 50% 45% 50% 46%;
}

.falling-item--gift .falling-item__shape {
  background: #fff8fb;
}

.falling-item--cloud .falling-item__shape {
  color: #74636d;
  background: rgba(238, 232, 236, 0.96);
  border-color: rgba(104, 87, 97, 0.15);
  border-radius: 21px;
  box-shadow: 0 8px 16px rgba(73, 56, 66, 0.14);
  filter: grayscale(0.3);
}

.falling-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: 50%;
}

.falling-item.is-caught {
  animation: item-caught 300ms ease-out forwards;
}

.falling-item.is-missed {
  animation: item-missed 220ms ease-in forwards;
}

@keyframes item-caught {
  45% { opacity: 1; transform: var(--item-position) scale(1.32) rotate(8deg); }
  to { opacity: 0; transform: var(--item-position) translateY(-18px) scale(0.25) rotate(24deg); }
}

@keyframes item-missed {
  to { opacity: 0; }
}

.catcher {
  position: absolute;
  z-index: 3;
  width: 114px;
  height: 68px;
  left: 0;
  bottom: 14px;
  will-change: transform;
  filter: drop-shadow(0 11px 10px rgba(139, 47, 89, 0.18));
}

.catcher__body {
  position: absolute;
  width: 100%;
  height: 45px;
  bottom: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 235, 165, 0.9) 48% 52%, transparent 53%),
    linear-gradient(145deg, #ec91b8, #c85a8c);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 9px 9px 23px 23px;
  box-shadow: inset 8px 5px 12px rgba(255, 255, 255, 0.18);
}

.catcher__body b {
  margin-left: 47%;
  font-family: var(--serif);
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 500;
}

.catcher__bow {
  position: absolute;
  z-index: 2;
  width: 55px;
  height: 35px;
  top: -2px;
  left: calc(50% - 27px);
}

.catcher__bow::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 15px;
  height: 15px;
  top: 11px;
  left: 20px;
  background: var(--gold-light);
  border-radius: 50%;
}

.catcher__bow i {
  position: absolute;
  width: 29px;
  height: 23px;
  top: 7px;
  background: var(--gold);
}

.catcher__bow i:first-child { left: 1px; border-radius: 70% 30% 55% 45%; transform: rotate(13deg); }
.catcher__bow i:last-child { right: 1px; border-radius: 30% 70% 45% 55%; transform: rotate(-13deg); }

.catcher.is-celebrating {
  animation: catcher-celebrate 650ms ease;
}

@keyframes catcher-celebrate {
  35% { transform: var(--catcher-position) translateY(-18px) rotate(-5deg); }
  65% { transform: var(--catcher-position) translateY(-12px) rotate(5deg); }
}

.wish-toast {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 9px 15px;
  color: var(--pink-600);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(193, 83, 133, 0.14);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(144, 52, 95, 0.1);
  font-size: 0.76rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -10px);
}

.wish-toast.is-visible {
  animation: toast-pop 1.55s ease both;
}

@keyframes toast-pop {
  0% { opacity: 0; transform: translate(-50%, -12px) scale(0.92); }
  15%, 75% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -5px); }
}

.countdown {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--pink-600);
  background: rgba(255, 245, 250, 0.65);
  backdrop-filter: blur(4px);
}

.countdown span {
  font-family: var(--serif);
  font-size: clamp(4.6rem, 12vw, 7rem);
  line-height: 1;
  animation: count-pop 650ms ease both;
}

.countdown small {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

@keyframes count-pop {
  from { opacity: 0; transform: scale(0.55); }
  50% { opacity: 1; }
  to { transform: scale(1); }
}

.game-dialog {
  position: absolute;
  z-index: 20;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: rgba(255, 247, 251, 0.91);
  backdrop-filter: blur(8px);
  text-align: center;
  animation: dialog-in 240ms ease both;
}

@keyframes dialog-in {
  from { opacity: 0; }
}

.game-dialog__icon {
  width: 58px;
  height: 58px;
  margin-bottom: 13px;
  display: grid;
  place-items: center;
  color: var(--pink-600);
  background: var(--white);
  border: 1px solid rgba(192, 79, 131, 0.14);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  font-family: var(--serif);
  font-size: 1.75rem;
}

.game-dialog .eyebrow {
  margin-bottom: 10px;
}

.game-dialog h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.game-dialog > p:not(.eyebrow) {
  max-width: 440px;
  margin: 12px 0 20px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.dialog-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.text-button {
  padding: 9px 15px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 700;
}

.text-button:hover {
  color: var(--pink-600);
}

.mobile-controls {
  min-height: 75px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: #fffafc;
  border-top: 1px solid rgba(189, 79, 128, 0.1);
}

.mobile-controls p {
  min-width: 160px;
  margin: 0;
  color: #987684;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

.control-button {
  width: 51px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--pink-600);
  background: var(--pink-100);
  border: 1px solid rgba(193, 81, 132, 0.13);
  border-radius: 15px;
  font-size: 1.25rem;
  font-weight: 800;
  touch-action: manipulation;
  transition: transform 120ms ease, background 120ms ease;
}

.control-button:hover,
.control-button.is-pressed {
  background: var(--pink-200);
  transform: scale(0.96);
}

/* Cake celebration */
.screen--cake {
  max-width: 920px;
  margin: 0 auto;
  padding: 34px 0 65px;
  text-align: center;
}

.celebration-copy {
  max-width: 710px;
  margin: 0 auto;
}

.cake-instruction {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.7;
}

.collected-wishes {
  max-width: 850px;
  margin: 25px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.wish-chip {
  padding: 7px 11px;
  color: var(--pink-600);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(190, 80, 129, 0.13);
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(145, 60, 99, 0.05);
  font-size: 0.67rem;
  font-weight: 750;
  opacity: 0;
  animation: chip-in 380ms ease forwards;
}

@keyframes chip-in {
  from { opacity: 0; transform: translateY(8px) scale(0.92); }
  to { opacity: 1; transform: none; }
}

.cake-stage {
  position: relative;
  width: min(380px, 90vw);
  height: 315px;
  margin: 15px auto 0;
  display: grid;
  place-items: end center;
}

.cake-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 315px;
  height: 315px;
  left: calc(50% - 157px);
  bottom: -5px;
  background: radial-gradient(circle, rgba(249, 211, 228, 0.72), rgba(249, 211, 228, 0) 67%);
  border-radius: 50%;
}

.cake-spark {
  position: absolute;
  color: var(--gold);
  font-family: var(--serif);
  animation: soft-float 2.7s ease-in-out infinite;
}

.cake-spark--one { top: 21%; left: 5%; font-size: 1.65rem; }
.cake-spark--two { top: 8%; right: 9%; color: var(--pink-500); font-size: 1.8rem; animation-delay: -1s; }
.cake-spark--three { top: 45%; right: 0; font-size: 1.1rem; animation-delay: -2s; }

.birthday-cake {
  position: relative;
  width: 270px;
  height: 245px;
  filter: drop-shadow(0 20px 17px rgba(141, 54, 94, 0.19));
  transform-origin: bottom center;
}

.birthday-cake.is-blown {
  animation: cake-happy 800ms ease;
}

@keyframes cake-happy {
  30% { transform: scale(1.04) rotate(-1.5deg); }
  60% { transform: scale(1.03) rotate(1.5deg); }
}

.candles {
  position: absolute;
  z-index: 5;
  width: 140px;
  height: 81px;
  top: 4px;
  left: 65px;
}

.candle {
  position: absolute;
  width: 10px;
  height: 49px;
  bottom: 0;
  background: repeating-linear-gradient(135deg, #fff 0 7px, #e888b1 7px 14px);
  border-radius: 5px 5px 2px 2px;
  box-shadow: inset -2px 0 rgba(136, 48, 89, 0.1);
}

.candle--one { left: 14px; height: 42px; }
.candle--two { left: 65px; height: 54px; }
.candle--three { right: 14px; height: 44px; }

.candle i {
  position: absolute;
  width: 15px;
  height: 23px;
  top: -24px;
  left: -2px;
  background: radial-gradient(circle at 50% 68%, #fff8b9 0 17%, #f7c75d 20% 48%, #e88958 55% 70%, transparent 73%);
  border-radius: 52% 48% 55% 45%;
  filter: drop-shadow(0 0 8px rgba(238, 177, 65, 0.75));
  transform-origin: center bottom;
  animation: flame-dance 750ms ease-in-out infinite alternate;
}

.candle--two i { animation-delay: -300ms; }
.candle--three i { animation-delay: -520ms; }

@keyframes flame-dance {
  from { transform: rotate(-4deg) scale(0.95, 1.04); }
  to { transform: rotate(5deg) scale(1.05, 0.95); }
}

.is-blown .candle i {
  animation: flame-out 500ms ease forwards;
}

@keyframes flame-out {
  40% { transform: translateX(9px) scale(0.65); opacity: 0.75; }
  to { transform: translate(20px, -8px) scale(0); opacity: 0; }
}

.cake-top {
  position: absolute;
  z-index: 4;
  width: 190px;
  height: 42px;
  top: 73px;
  left: 40px;
  background: linear-gradient(180deg, #fff9fb, #f7dce7);
  border-radius: 50%;
  box-shadow: inset 0 -8px 11px rgba(177, 71, 120, 0.08);
}

.cake-top span {
  position: absolute;
  width: 11px;
  height: 11px;
  top: 14px;
  background: #e880ae;
  border-radius: 50%;
}

.cake-top span:nth-child(1) { left: 30px; }
.cake-top span:nth-child(2) { left: 64px; background: #efbc63; }
.cake-top span:nth-child(3) { left: 92px; top: 10px; }
.cake-top span:nth-child(4) { right: 59px; background: #efbc63; }
.cake-top span:nth-child(5) { right: 27px; }

.cake-layer {
  position: absolute;
  overflow: hidden;
  background: linear-gradient(150deg, #ed9abd, #d46b9a);
  box-shadow: inset 14px 8px 14px rgba(255, 255, 255, 0.15), inset -13px -8px 16px rgba(132, 40, 83, 0.09);
}

.cake-layer--top {
  z-index: 3;
  width: 190px;
  height: 82px;
  top: 91px;
  left: 40px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 5px 5px 29px 29px;
  font-family: var(--serif);
  font-size: 1.5rem;
}

.cake-layer--bottom {
  z-index: 2;
  width: 250px;
  height: 78px;
  top: 155px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  background: linear-gradient(150deg, #f7d8e5, #efb3cc);
  border-radius: 7px 7px 32px 32px;
}

.cake-layer--bottom i {
  width: 8px;
  height: 8px;
  background: #df7aa7;
  border-radius: 50%;
  box-shadow: 0 15px #fff4f8;
}

.cake-plate {
  position: absolute;
  z-index: 1;
  width: 270px;
  height: 29px;
  left: 0;
  bottom: 0;
  background: linear-gradient(180deg, #fff, #ecdce3);
  border-radius: 50%;
  box-shadow: 0 8px 8px rgba(111, 50, 78, 0.13);
}

.cake-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cake-actions .primary-button {
  animation: button-arrive 450ms ease both;
}

@keyframes button-arrive {
  from { transform: translateY(8px) scale(0.96); }
}

/* Letter */
.screen--letter {
  max-width: 900px;
  margin: 0 auto;
  padding: 37px 0 70px;
}

.letter-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.letter-decoration {
  margin-bottom: -20px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
}

.letter-decoration span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--pink-600);
  background: var(--white);
  border: 1px solid rgba(190, 80, 129, 0.13);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(143, 53, 95, 0.11);
  font-family: var(--serif);
}

.letter-decoration span:nth-child(2) {
  width: 50px;
  height: 50px;
  color: var(--white);
  background: var(--pink-500);
  font-size: 1.3rem;
}

.letter-card {
  position: relative;
  width: min(760px, 100%);
  padding: clamp(50px, 8vw, 76px) clamp(28px, 8vw, 84px) clamp(45px, 7vw, 68px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(204, 113, 154, 0.04) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(204, 113, 154, 0.04) 1px, transparent 1px) 0 0 / 28px 28px,
    #fffdfd;
  border: 1px solid rgba(187, 78, 127, 0.13);
  border-radius: 4px 4px var(--radius-md) var(--radius-md);
  box-shadow: 0 30px 90px rgba(140, 53, 93, 0.15);
}

.letter-card::before,
.letter-card::after {
  content: "♡";
  position: absolute;
  color: rgba(211, 105, 153, 0.1);
  font-family: var(--serif);
  font-size: 8rem;
}

.letter-card::before { top: -45px; left: -34px; transform: rotate(-20deg); }
.letter-card::after { right: -25px; bottom: -55px; transform: rotate(19deg); }

.letter-date {
  margin: 0 0 19px;
  color: var(--pink-600);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.19em;
  text-align: center;
  text-transform: uppercase;
}

.letter-card h2 {
  max-width: 610px;
  margin: 0 auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-align: center;
}

.letter-divider {
  position: relative;
  width: 165px;
  height: 28px;
  margin: 27px auto 23px;
  display: grid;
  place-items: center;
  color: var(--pink-500);
  font-family: var(--serif);
}

.letter-divider::before,
.letter-divider::after {
  content: "";
  position: absolute;
  width: 63px;
  height: 1px;
  top: 50%;
  background: var(--pink-200);
}

.letter-divider::before { left: 0; }
.letter-divider::after { right: 0; }

.letter-body {
  color: #624453;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.9vw, 1.12rem);
  line-height: 1.95;
}

.letter-body p {
  margin: 0 0 1.25em;
}

.letter-body p:first-child {
  color: var(--rose-700);
  font-size: 1.12em;
  font-weight: 700;
}

.letter-signature {
  margin-top: 35px;
  padding-top: 30px;
  border-top: 1px solid var(--pink-200);
  text-align: center;
}

.letter-signature p {
  max-width: 540px;
  margin: 0 auto 15px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 0.98rem;
  font-style: italic;
  line-height: 1.7;
}

.letter-signature strong {
  display: block;
  color: var(--pink-600);
  font-family: "Snell Roundhand", "Segoe Script", cursive;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-style: italic;
  font-weight: 500;
}

.letter-signature span {
  display: block;
  margin-top: 15px;
  color: #987584;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.final-wishes {
  max-width: 740px;
  margin: 25px auto 27px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.final-wishes span {
  padding: 7px 11px;
  color: var(--pink-600);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(189, 79, 128, 0.12);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 750;
}

.page-footer {
  min-height: 60px;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #a1818e;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-footer__heart {
  color: var(--pink-500);
  animation: heart-beat 1.8s ease-in-out infinite;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.2); }
  28% { transform: scale(1); }
}

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

.confetti-piece {
  --confetti-x: 0px;
  --confetti-rotate: 180deg;
  position: absolute;
  width: 9px;
  height: 15px;
  top: -20px;
  left: 50%;
  background: var(--pink-400);
  border-radius: 3px;
  animation: confetti-fall var(--confetti-duration, 2.8s) cubic-bezier(0.16, 0.84, 0.4, 1) forwards;
}

.confetti-piece.is-round {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

@keyframes confetti-fall {
  0% { opacity: 0; transform: translate3d(0, -20px, 0) rotate(0); }
  8% { opacity: 1; }
  to { opacity: 0.88; transform: translate3d(var(--confetti-x), 105vh, 0) rotate(var(--confetti-rotate)); }
}

@media (max-width: 900px) {
  .screen--welcome {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.68fr);
    gap: 35px;
  }

  .welcome-copy h1 {
    font-size: clamp(2.5rem, 7vw, 4.4rem);
  }

  .how-to-play {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .how-to-play__item {
    min-height: auto;
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 26px, 620px);
  }

  .topbar {
    min-height: 70px;
  }

  .mini-brand {
    font-size: 0.59rem;
    letter-spacing: 0.12em;
  }

  .mini-brand__mark {
    width: 28px;
    height: 28px;
  }

  .icon-button__label {
    display: none;
  }

  .icon-button {
    width: 42px;
    height: 42px;
    padding: 8px;
    justify-content: center;
  }

  .screen--welcome {
    min-height: auto;
    padding: 30px 0 55px;
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .welcome-copy .eyebrow {
    justify-content: center;
  }

  .welcome-copy h1 {
    max-width: 540px;
    margin-inline: auto;
    font-size: clamp(2.55rem, 12vw, 4.15rem);
  }

  .script-name {
    margin-left: 0;
  }

  .welcome-copy__lead {
    margin: 22px auto 0;
  }

  .how-to-play {
    max-width: 480px;
    margin: 35px auto 0;
    text-align: left;
  }

  .how-to-play__prompt {
    margin-bottom: -21px;
  }

  .welcome-art {
    width: min(85vw, 390px);
    grid-row: 1;
  }

  .art-label {
    right: -3%;
  }

  .screen--game {
    padding-top: 19px;
  }

  .game-heading {
    align-items: center;
  }

  .game-heading h2 {
    font-size: clamp(1.45rem, 6vw, 2rem);
  }

  .eyebrow--left {
    margin-bottom: 7px;
  }

  .secondary-button--compact {
    min-width: 43px;
    padding: 8px 12px;
    font-size: 0;
  }

  .secondary-button--compact span {
    font-size: 0.92rem;
  }

  .game-card {
    border-radius: 22px;
  }

  .hud {
    min-height: 82px;
    padding: 12px 14px;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
  }

  .hud__progress {
    position: absolute;
    right: 14px;
    bottom: 8px;
    left: 14px;
    width: auto;
    height: 5px;
  }

  .hud__item--time,
  .hud__item--lives {
    text-align: right;
  }

  .game-arena {
    height: min(56vh, 510px);
    min-height: 390px;
  }

  .mobile-controls {
    min-height: 72px;
    gap: 14px;
  }

  .mobile-controls p {
    min-width: 120px;
  }

  .control-button {
    width: 55px;
    height: 50px;
  }

  .screen--cake,
  .screen--letter {
    padding-top: 28px;
  }

  .cake-stage {
    margin-top: 12px;
    transform: scale(0.93);
    transform-origin: center bottom;
  }

  .letter-card {
    border-radius: 3px 3px 21px 21px;
  }
}

@media (max-width: 430px) {
  .app-shell {
    width: min(100% - 20px, 410px);
  }

  .mini-brand span:last-child {
    max-width: 130px;
    line-height: 1.35;
  }

  .welcome-art {
    width: min(86vw, 335px);
  }

  .art-label {
    min-width: 165px;
    padding: 10px 12px;
  }

  .art-label p {
    font-size: 0.94rem;
  }

  .how-to-play {
    margin-top: 30px;
  }

  .game-heading h2 {
    max-width: 255px;
  }

  .hud {
    gap: 9px;
  }

  .hud__label {
    font-size: 0.53rem;
  }

  .hud__item strong {
    font-size: 0.95rem;
  }

  .hud__item--lives strong {
    letter-spacing: 0.02em;
  }

  .game-arena {
    height: 54vh;
    min-height: 365px;
  }

  .mobile-controls {
    padding-inline: 12px;
  }

  .mobile-controls p {
    min-width: 0;
    flex: 1;
    font-size: 0.61rem;
  }

  .control-button {
    width: 52px;
    flex: 0 0 52px;
  }

  .game-dialog {
    padding: 20px;
  }

  .cake-stage {
    width: 330px;
    height: 286px;
    margin-left: calc(50% - 165px);
    transform: scale(0.88);
  }

  .letter-card {
    padding-inline: 25px;
  }

  .letter-body {
    line-height: 1.85;
  }
}

@media (max-height: 700px) and (max-width: 900px) {
  .topbar {
    min-height: 60px;
  }

  .screen--game {
    padding-top: 8px;
  }

  .game-heading {
    margin-bottom: 10px;
  }

  .game-heading h2 {
    font-size: clamp(1.35rem, 4.5vw, 1.8rem);
  }

  .hud {
    min-height: 72px;
  }

  .game-arena {
    height: clamp(220px, 48vh, 315px);
    min-height: 220px;
  }

  .mobile-controls {
    min-height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .confetti-piece:nth-child(n + 18) {
    display: none;
  }
}
