:root {
  --ink: #3b2530;
  --muted: #826471;
  --accent: #d93668;
  --accent-dark: #be2855;
  --accent-soft: #fff0f5;
  --bow: #ef002d;
  color-scheme: light;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100svh; color: var(--ink); background: #fff5f8; }
button { font: inherit; }

.page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 24px 16px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.96) 0 8%, transparent 21%),
    radial-gradient(circle at 90% 88%, color-mix(in srgb, var(--accent) 22%, transparent) 0 10%, transparent 28%),
    linear-gradient(145deg, #fffafb 0%, #ffe8f0 56%, #ffdce8 100%);
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .23;
  background-image: radial-gradient(var(--accent) .8px, transparent .8px);
  background-size: 23px 23px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.bubble { position: absolute; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; background: rgba(255,255,255,.66); box-shadow: 0 14px 42px rgba(177,47,91,.1); }
.bubble.one { width: 150px; height: 150px; left: -60px; bottom: 7%; }
.bubble.two { width: 78px; height: 78px; right: 5%; top: 9%; }
.bubble.three { width: 36px; height: 36px; left: 9%; top: 20%; }

.card {
  width: min(100%, 540px);
  min-height: min(780px, calc(100svh - 48px));
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.94);
  border-radius: 34px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(126,36,67,.17), inset 0 1px 0 #fff;
}

.corner-bow { position: absolute; z-index: 3; color: color-mix(in srgb, var(--accent) 68%, #fff); font-family: Georgia, serif; font-size: 2rem; line-height: 1; user-select: none; pointer-events: none; }
.corner-bow.left { left: 18px; bottom: 16px; transform: rotate(-12deg); }
.corner-bow.right { right: 18px; top: 74px; transform: rotate(12deg); }

.topline { display: flex; justify-content: space-between; padding: 24px 28px 12px; color: #8d6070; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.progress { height: 5px; margin: 0 28px; overflow: hidden; border-radius: 999px; background: #f8dce5; }
.progress-bar { display: block; width: 12.5%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f17b9e, var(--accent)); transition: width .42s ease; }
.screens { flex: 1; display: grid; }

.screen { display: none; grid-area: 1 / 1; min-height: 650px; position: relative; padding: 36px 38px 42px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.screen.active { display: flex; animation: enter .46s cubic-bezier(.2,.8,.2,1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

.kitty-chip { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 6px 13px 6px 6px; color: #9a3b5d; border: 1px solid #f4d3de; border-radius: 999px; background: #fff7fa; box-shadow: 0 8px 20px rgba(121,48,73,.08); font-size: .82rem; font-weight: 900; }
.kitty-chip img { width: 62px; height: 38px; object-fit: cover; border-radius: 999px; }
.kitty-chip span { color: var(--accent); font-family: Georgia, serif; font-size: 1.2rem; }

.icon-tile { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 22px; border: 1px solid #f7d8e2; border-radius: 22px; color: var(--accent); background: var(--accent-soft); box-shadow: 0 14px 30px rgba(217,54,104,.11); transform: rotate(-4deg); font-size: 1.45rem; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .76rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h1, h2 { max-width: 420px; margin: 0; color: #3a222b; letter-spacing: -.035em; }
h1 { font-size: clamp(2.1rem, 8vw, 3.55rem); line-height: 1.03; }
h2 { font-size: clamp(1.72rem, 6.2vw, 2.55rem); line-height: 1.09; }
.subtitle { max-width: 380px; margin: 17px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.actions { width: min(100%, 370px); display: grid; grid-template-columns: 1.25fr .75fr; gap: 11px; margin-top: 28px; }

button { min-height: 52px; border: 0; border-radius: 17px; cursor: pointer; font-weight: 800; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 3px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 24px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent-dark)); box-shadow: 0 13px 28px color-mix(in srgb, var(--accent) 28%, transparent); }
.primary:hover { transform: translateY(-2px); box-shadow: 0 17px 31px color-mix(in srgb, var(--accent) 34%, transparent); }
.primary:active, .soft:active { transform: scale(.98); }
.primary.next { margin-top: 22px; }
.primary:disabled { cursor: not-allowed; opacity: .44; transform: none; box-shadow: none; }
.soft { padding: 0 18px; color: #98405d; border: 1px solid #efcbd6; background: #fff0f5; }
.soft:hover { transform: translateY(-2px); background: #ffe5ed; }
.plea { min-height: 28px; margin: 17px 0 -8px; color: #b03b61; font-size: .96rem; font-weight: 800; }
.plea.pop { animation: pop .3s ease both; }
@keyframes pop { 50% { transform: scale(1.06); } }

.kitty-stage { width: min(100%, 400px); display: flex; flex-direction: column; align-items: center; margin: 19px 0 14px; }
.kitty-frame { width: 100%; aspect-ratio: 526 / 249; overflow: hidden; border: 7px solid #fff; border-radius: 24px; background: #ef002d; box-shadow: 0 18px 34px color-mix(in srgb, var(--bow) 30%, transparent); }
.kitty-frame.bounce { animation: bounce .38s cubic-bezier(.2,.8,.2,1) both; }
@keyframes bounce { 0% { opacity: .72; transform: scale(.96) rotate(-1deg); } 65% { transform: scale(1.018) rotate(.5deg); } 100% { opacity: 1; transform: scale(1); } }
.kitty-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.bow-status { margin-top: 13px; color: #8d6070; font-size: .9rem; font-weight: 700; }
.bow-status strong { color: var(--bow); }
.colors { display: flex; gap: 14px; justify-content: center; }
.color { width: 37px; min-height: 37px; height: 37px; padding: 0; border: 5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #e9c9d3, 0 5px 12px rgba(91,40,58,.12); }
.color.selected { transform: scale(1.18); box-shadow: 0 0 0 2px #3a222b, 0 6px 15px rgba(91,40,58,.18); }

.answer-grid { width: 100%; display: grid; gap: 10px; margin-top: 25px; }
.answer { min-height: 52px; padding: 10px 16px; color: #684352; border: 1px solid #f1d0da; background: #fff8fa; }
.answer:hover, .answer.chosen { border-color: color-mix(in srgb, var(--accent) 65%, #fff); background: #ffe7ef; transform: translateY(-1px); }
.feedback { width: 100%; display: none; gap: 4px; margin-top: 16px; padding: 15px 18px; border: 1px solid #f1d3dd; border-radius: 15px; color: #744052; background: #fff0f5; }
.feedback.show { display: grid; animation: enter .32s ease both; }
.feedback.correct { color: #7b304c; border-color: #eaa9bd; background: #ffe6ee; }
.feedback strong { line-height: 1.48; }
.feedback span { color: #a06d7f; font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

.choice-cards { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 27px; }
.choice-card { min-height: 105px; display: grid; place-items: center; gap: 4px; padding: 14px 8px; color: #744052; border: 1px solid #f1d0da; background: #fff8fa; }
.choice-card span { color: var(--accent); font-size: 1.35rem; font-family: Georgia, serif; }
.choice-card:hover, .choice-card.chosen { transform: translateY(-3px); border-color: var(--accent); background: #ffeaf1; }

.theme-row { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; }
.theme-choice { min-height: 88px; display: grid; place-items: center; gap: 7px; color: #67414f; border: 1px solid #efd2dc; background: #fffafb; }
.theme-choice i { width: 30px; height: 30px; display: block; border: 5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #e7c8d2; }
.theme-choice:hover, .theme-choice.chosen { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 22px rgba(102,45,65,.11); }

.bow-game { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 27px; }
.bow-tile { min-height: 78px; position: relative; color: #b58a99; border: 1px solid #f1d5de; background: #fff9fb; font-family: Georgia, serif; font-size: 1.5rem; }
.bow-tile:hover { transform: translateY(-2px); background: #fff0f5; }
.bow-tile.found { color: #fff; border-color: var(--accent); background: var(--accent); transform: rotate(-2deg) scale(.98); }
.game-count { margin: 16px 0 0; color: #8c6170; font-weight: 800; }

.letter { position: relative; padding: 38px 32px 28px; border: 1px solid #f3d7df; border-radius: 5px 22px 22px 22px; text-align: left; background: #fffdfd; box-shadow: 0 20px 50px rgba(116,55,77,.13); transform: rotate(-1deg); }
.letter::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; background-image: repeating-linear-gradient(to bottom, transparent 0 31px, #f4dce4 31px 32px); }
.letter p { position: relative; margin: 0 0 18px; color: #674551; font-size: 1rem; line-height: 1.72; }
.letter .to { color: var(--accent-dark); font-weight: 900; }
.letter .signature { margin: 4px 0 0; color: #3a222b; font-weight: 900; text-align: right; }
.pin { width: 44px; height: 44px; display: grid; place-items: center; position: absolute; z-index: 2; top: -18px; right: 25px; border-radius: 50%; color: var(--accent); background: #ffe1ea; box-shadow: 0 8px 18px rgba(170,45,83,.18); font-family: Georgia, serif; font-size: 1.2rem; }

.mini-kitty { width: min(100%, 300px); aspect-ratio: 526 / 249; margin: -6px 0 22px; overflow: hidden; border: 6px solid #fff; border-radius: 22px; box-shadow: 0 14px 30px rgba(117,54,76,.16); }
.mini-kitty img { width: 100%; height: 100%; object-fit: cover; }
.final-message { width: 100%; display: none; gap: 3px; margin-top: 20px; padding: 18px; color: #754354; border: 1px solid #f0ced9; border-radius: 18px; background: linear-gradient(135deg, #fff9fb, #ffe9f0); }
.final-message.show { display: grid; animation: enter .45s ease both; }
.final-message strong { color: var(--accent-dark); font-size: 1.32rem; }
.restart { display: none; min-height: auto; margin-top: 16px; padding: 8px; color: #927080; background: transparent; font-size: .86rem; }
.restart.show { display: inline-flex; gap: 7px; align-items: center; }
.restart:hover { color: var(--accent-dark); }
.copyright { margin: 18px 0 -22px; color: #b08f9b; font-size: .7rem; }

@media (max-width: 560px) {
  .page { padding: 0; }
  .card { width: 100%; min-height: 100svh; border: 0; border-radius: 0; }
  .screen { min-height: calc(100svh - 82px); padding: 28px 22px 38px; }
  .topline { padding: 20px 22px 10px; }
  .progress { margin: 0 22px; }
  .letter { padding: 34px 24px 24px; }
  .letter p { line-height: 1.62; }
  .choice-cards { grid-template-columns: 1fr; }
  .choice-card { min-height: 64px; grid-template-columns: auto 1fr; }
  .corner-bow.right { top: 66px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
