:root {
  color-scheme: light;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  --ink: #294f4b;
  --muted: #69817c;
  --paper: #fffdf7;
  --line: #ddd5b9;
  --green: #62b78a;
  --green-dark: #34775e;
  --gold: #f3bd4c;
  --coral: #ef7468;
  --blue: #62acd6;
  --purple: #8b73bd;
  --shadow: 0 18px 44px rgba(62, 83, 75, .14);
  --soft-shadow: 0 9px 23px rgba(62, 83, 75, .1);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: #eff8ed;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 9%, rgba(245, 195, 78, .2) 0 118px, transparent 120px),
    radial-gradient(circle at 94% 8%, rgba(98, 172, 214, .18) 0 152px, transparent 154px),
    linear-gradient(145deg, #f2f9ed 0%, #fffaf1 53%, #f2effc 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .14;
  background-image: radial-gradient(#6f9186 1px, transparent 1px);
  background-size: 26px 26px;
  content: '';
  pointer-events: none;
}

button { color: inherit; font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible { outline: 4px solid rgba(241, 185, 67, .72); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }

.app {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 50px;
}

.loading-card {
  display: grid;
  width: min(410px, 100%);
  min-height: 250px;
  margin: 20vh auto 0;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 37px;
  box-shadow: var(--shadow);
}

.loading-card span { font-size: 64px; font-weight: 1000; animation: float 1.3s ease-in-out infinite alternate; }
.loading-card p { margin: 0; font-size: 19px; font-weight: 900; }

.topbar,
.topbar-actions,
.brand,
.collection-button,
.sound-button,
.pause-button,
.section-heading,
.level-top,
.level-footer,
.mission-bar,
.target-card,
.round-card,
.game-status,
.score-box,
.mistake-box,
.feedback-bar,
.result-actions,
.result-stats {
  display: flex;
  align-items: center;
}

.topbar {
  position: relative;
  z-index: 30;
  min-height: 66px;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.brand {
  min-width: 0;
  gap: 12px;
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  place-items: center;
  padding-bottom: 2px;
  color: #39775f;
  font-size: 29px;
  font-weight: 1000;
  background: #fff6cd;
  border: 3px solid #dfd2a8;
  border-radius: 19px;
  box-shadow: 0 7px 16px rgba(67, 87, 78, .12);
  transform: rotate(-4deg);
}

.brand strong,
.brand small,
.collection-button strong,
.collection-button small { display: block; }
.brand strong { overflow: hidden; font-size: 25px; font-weight: 1000; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.topbar-actions { flex: 0 0 auto; gap: 8px; }
.top-spark { color: var(--gold); font-size: 27px; animation: twinkle 2s ease-in-out infinite; }

.collection-button,
.sound-button,
.pause-button,
.back-button {
  min-height: 49px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(255, 253, 247, .94);
  border: 2px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 7px 16px rgba(65, 83, 76, .08);
}

.collection-button { gap: 8px; padding: 5px 12px; text-align: left; }
.collection-button > span:first-child { font-size: 21px; }
.collection-button strong { font-size: 12px; line-height: 1.05; }
.collection-button small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sound-button,
.pause-button { gap: 8px; padding: 0 13px; font-size: 12px; }
.sound-button > span:first-child,
.pause-button > span:first-child { font-size: 18px; }
.back-button { width: 49px; padding: 0 0 3px; font-size: 23px; }

.eyebrow {
  margin: 0 0 8px;
  color: #397b62;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.hint-button,
.repeat-button {
  display: inline-flex;
  min-height: 53px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 21px;
  font-weight: 1000;
  border-radius: 17px;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button { color: #fff; background: #3e9875; border: 0; box-shadow: 0 8px 0 #2f785e, 0 16px 27px rgba(49, 122, 94, .2); }
.secondary-button { color: var(--ink); background: #fffdf6; border: 2px solid #d7d2b9; box-shadow: 0 6px 0 #ddd7c4; }
.hint-button { min-height: 46px; color: #715418; background: #fff3c5; border: 2px solid #e7bd50; box-shadow: 0 5px 0 #d8aa39; }
.repeat-button { min-height: 46px; padding-inline: 14px; color: #345f58; background: rgba(255,255,255,.75); border: 2px solid rgba(49, 90, 82, .21); box-shadow: 0 5px 0 rgba(49, 90, 82, .15); }
.primary-button:not(:disabled):hover,
.secondary-button:not(:disabled):hover,
.hint-button:not(:disabled):hover,
.repeat-button:not(:disabled):hover,
.collection-button:not(:disabled):hover,
.sound-button:not(:disabled):hover,
.pause-button:not(:disabled):hover { transform: translateY(-2px); }
.primary-button:not(:disabled):active,
.secondary-button:not(:disabled):active,
.hint-button:not(:disabled):active,
.repeat-button:not(:disabled):active { transform: translateY(3px); box-shadow: none; }

.hero {
  position: relative;
  display: grid;
  min-height: 408px;
  grid-template-columns: minmax(0, 1fr) minmax(410px, .98fr);
  align-items: center;
  gap: 36px;
  overflow: hidden;
  padding: 48px 51px;
  background:
    radial-gradient(circle at 95% 4%, rgba(101, 172, 214, .2) 0 105px, transparent 107px),
    radial-gradient(circle at 68% -10%, rgba(245, 190, 70, .2) 0 115px, transparent 117px),
    linear-gradient(120deg, #fffaf0, #f3f0fd 68%, #ebf8ef);
  border: 3px solid #ded6ba;
  border-radius: 40px;
  box-shadow: var(--shadow);
}

.hero::after { position: absolute; right: -45px; bottom: -75px; width: 195px; height: 195px; background: rgba(99, 184, 139, .15); border-radius: 50%; content: ''; }
.hero-copy { position: relative; z-index: 3; }
.hero h1 { margin: 0 0 16px; font-size: clamp(48px, 5.3vw, 71px); font-weight: 1000; line-height: .95; letter-spacing: -.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 540px; margin-bottom: 25px; color: var(--muted); font-size: 17px; font-weight: 700; line-height: 1.5; }

.hero-demo {
  position: relative;
  z-index: 2;
  min-height: 290px;
  overflow: hidden;
  background: linear-gradient(165deg, #d9eef9 0 57%, #d9efbd 58%);
  border: 8px solid #fff;
  border-radius: 37px;
  box-shadow: 0 21px 31px rgba(60, 82, 75, .17);
  transform: rotate(1.5deg);
}

.demo-command { position: absolute; z-index: 5; top: 16px; left: 50%; display: flex; min-width: 186px; align-items: center; justify-content: center; gap: 8px; padding: 8px 13px; background: #fffdfa; border: 2px solid #d9d3b9; border-radius: 18px; box-shadow: var(--soft-shadow); transform: translateX(-50%); }
.demo-command small { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.demo-command strong { color: #f07b66; font-size: 31px; line-height: 1; }
.demo-command > span { font-size: 17px; }
.demo-letter { position: absolute; display: flex; width: var(--s); height: var(--s); align-items: baseline; justify-content: center; padding-top: calc(var(--s) * .17); color: #fff; font-size: calc(var(--s) * .52); font-weight: 1000; line-height: 1; background: var(--c); border: 6px solid rgba(255,255,255,.68); border-radius: 34% 48% 40% 50%; box-shadow: 0 8px 0 var(--d), 0 16px 18px rgba(58, 80, 73, .16); animation: demoFloat var(--speed) ease-in-out infinite alternate; }
.demo-letter small { margin-left: 2px; font-size: calc(var(--s) * .19); }
.demo-letter.one { --s: 83px; --c: #62acd6; --d: #397695; --speed: 2.5s; top: 91px; left: 27px; }
.demo-letter.two { --s: 104px; --c: #ef7468; --d: #a94948; --speed: 2.1s; top: 97px; left: 39%; animation-delay: -.8s; }
.demo-letter.three { --s: 76px; --c: #f2bd4d; --d: #a77c25; --speed: 2.7s; right: 24px; bottom: 27px; animation-delay: -1.2s; }
.demo-letter.four { --s: 70px; --c: #8b73bd; --d: #5e4c8a; --speed: 2.3s; bottom: 25px; left: 35px; animation-delay: -.4s; }
.demo-letter.target { box-shadow: 0 8px 0 var(--d), 0 0 0 8px rgba(255, 242, 173, .55), 0 18px 20px rgba(58, 80, 73, .18); }
.demo-net { position: absolute; right: 77px; top: 73px; color: #4d756c; font-family: Georgia, serif; font-size: 92px; line-height: 1; transform: rotate(-23deg); }

.how-section,
.levels-section,
.collection-section { margin-top: 54px; scroll-margin-top: 22px; }
.section-heading { justify-content: space-between; gap: 25px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: 39px; font-weight: 1000; line-height: 1; letter-spacing: -.035em; }
.section-heading > p { max-width: 410px; margin: 0; color: var(--muted); font-size: 13px; font-weight: 800; line-height: 1.45; text-align: right; }
.steps-grid,
.levels-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.step-card { display: flex; min-width: 0; min-height: 130px; align-items: center; gap: 16px; padding: 23px; background: rgba(255, 253, 247, .92); border: 2px solid var(--line); border-radius: 29px; box-shadow: var(--soft-shadow); }
.step-number { display: grid; flex: 0 0 auto; width: 62px; height: 62px; place-items: center; padding-bottom: 3px; color: #fff; font-family: Georgia, serif; font-size: 27px; font-weight: 900; background: #66b98e; border: 8px solid #dcf1e5; border-radius: 50%; }
.step-card:nth-child(2) .step-number { background: #f3b944; border-color: #fff0c7; }
.step-card:nth-child(3) .step-number { background: #ed756b; border-color: #fde2df; }
.step-card strong,
.step-card small { display: block; }
.step-card strong { margin-bottom: 7px; font-size: 18px; font-weight: 1000; }
.step-card small { color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.45; }

.level-card { min-width: 0; min-height: 347px; padding: 22px; text-align: left; background: rgba(255, 253, 247, .96); border: 3px solid color-mix(in srgb, var(--accent) 35%, #ddd2b4); border-radius: 31px; box-shadow: var(--soft-shadow); transition: transform 170ms ease, box-shadow 170ms ease; }
.level-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.level-top { justify-content: space-between; gap: 10px; }
.level-icon { display: grid; width: 50px; height: 50px; place-items: center; font-size: 25px; background: color-mix(in srgb, var(--accent) 22%, #fff); border-radius: 17px; }
.level-best { color: #d69f2b; font-size: 12px; font-weight: 1000; }
.level-letters { display: flex; justify-content: center; margin: 25px 0 21px; }
.level-letters i { display: grid; width: 54px; height: 64px; place-items: center; margin-left: -7px; color: #fff; font-size: 26px; font-style: normal; font-weight: 1000; background: var(--letter-color); border: 4px solid rgba(255,255,255,.65); border-radius: 18px; box-shadow: 0 7px 0 color-mix(in srgb, var(--letter-color) 66%, #355b54); transform: rotate(calc((var(--n, 0) - 2) * 2deg)); }
.level-letters i:first-child { margin-left: 0; }
.level-copy,
.level-copy small,
.level-copy strong,
.level-copy > span { display: block; }
.level-copy small { color: color-mix(in srgb, var(--accent) 72%, #345d56); font-family: Georgia, serif; font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.level-copy strong { margin: 7px 0 8px; font-size: 27px; font-weight: 1000; line-height: 1.05; }
.level-copy > span { min-height: 42px; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.45; }
.level-footer { justify-content: space-between; gap: 9px; margin-top: 16px; padding-top: 15px; font-size: 12px; border-top: 2px dashed #ded8c5; }
.level-footer span { color: var(--muted); font-weight: 900; }
.level-footer b { color: color-mix(in srgb, var(--accent) 76%, #24594e); }

.collection-section { padding: 30px; background: rgba(255, 253, 248, .78); border: 3px solid #ded6ba; border-radius: 37px; box-shadow: var(--shadow); }
.collection-grid { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 8px; }
.collection-tile { position: relative; display: flex; min-width: 0; min-height: 91px; align-items: baseline; justify-content: center; padding-top: 27px; color: #a8aeaa; background: #f3f1ed; border: 2px dashed #cbc8bd; border-radius: 19px; }
.collection-tile > small { position: absolute; top: 6px; left: 7px; display: grid; width: 19px; height: 19px; place-items: center; padding-bottom: 1px; color: #7d827d; font-family: Georgia, serif; font-size: 9px; font-weight: 900; background: #fff; border: 1px solid #d4d0c6; border-radius: 50%; }
.collection-tile strong { font-size: 34px; line-height: 1; }
.collection-tile i { margin-left: 2px; font-size: 15px; font-style: normal; font-weight: 1000; }
.collection-tile.learned { color: #fff; background: var(--tile-color); border: 3px solid rgba(255,255,255,.63); box-shadow: 0 6px 0 var(--tile-dark), 0 12px 14px rgba(54, 75, 68, .11); }
.parent-tip { display: flex; align-items: center; gap: 17px; margin-top: 22px; padding: 18px 24px; background: rgba(222, 242, 228, .92); border: 2px solid #b7d7c2; border-radius: 24px; }
.parent-tip > span { font-size: 28px; }
.parent-tip p { margin: 0; color: #507169; font-size: 13px; font-weight: 700; line-height: 1.5; }

.game-page { padding: 25px; background: rgba(255, 253, 247, .8); border: 3px solid #ded6ba; border-radius: 37px; box-shadow: var(--shadow); }
.mission-bar { align-items: stretch; gap: 15px; margin-bottom: 15px; }
.target-card { flex: 1 1 58%; min-height: 100px; justify-content: space-between; gap: 18px; padding: 16px 18px 16px 24px; background: color-mix(in srgb, var(--target-color) 18%, #fff); border: 3px solid color-mix(in srgb, var(--target-color) 47%, #d7d1b9); border-radius: 28px; }
.target-label { display: flex; min-width: 0; align-items: center; gap: 14px; }
.target-label small { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.target-label strong { display: flex; align-items: center; gap: 10px; font-size: 25px; }
.target-label b { display: grid; width: 62px; height: 62px; place-items: center; padding-bottom: 3px; color: #fff; font-family: Georgia, serif; font-size: 40px; background: var(--target-color); border: 5px solid rgba(255,255,255,.62); border-radius: 20px; box-shadow: 0 6px 0 var(--target-dark); }
.round-card { flex: 1 1 42%; min-width: 0; justify-content: space-between; gap: 15px; padding: 17px 20px; background: #f3f0e9; border: 2px solid #ded8c7; border-radius: 27px; }
.round-card strong,
.round-card small { display: block; }
.round-card strong { font-size: 15px; }
.round-card small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 900; }
.round-dots { display: grid; width: 142px; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.round-dot { height: 9px; background: #d8d5cc; border-radius: 20px; }
.round-dot.done { background: #62b78a; }
.round-dot.current { background: var(--dot-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-color) 20%, transparent); }

.arena-card { position: relative; overflow: hidden; border: 7px solid #fff; border-radius: 36px; box-shadow: inset 0 0 0 3px #cbd7c4, 0 13px 25px rgba(62, 84, 75, .13); }
.letter-arena { position: relative; height: 500px; overflow: hidden; background:
  radial-gradient(circle at 12% 18%, rgba(255,255,255,.72) 0 4px, transparent 5px),
  radial-gradient(circle at 77% 27%, rgba(255,255,255,.55) 0 5px, transparent 6px),
  linear-gradient(168deg, #d8eff8 0 59%, #dcedc0 60% 100%); }
.letter-arena::before { position: absolute; right: -50px; top: -56px; width: 150px; height: 150px; background: #ffe894; border: 10px solid rgba(255, 194, 65, .28); border-radius: 50%; content: ''; }
.letter-arena::after { position: absolute; right: -8%; bottom: -25px; left: -8%; height: 95px; opacity: .45; background: repeating-linear-gradient(83deg, transparent 0 28px, rgba(79, 137, 82, .29) 29px 32px); border-radius: 50%; content: ''; pointer-events: none; }

.letter-object { position: absolute; z-index: 4; top: 0; left: 0; width: var(--size); height: var(--size); padding: 0; background: none; border: 0; border-radius: 38%; will-change: transform; }
.letter-face { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: calc(var(--size) * .17); color: #fff; background: var(--letter-color); border: calc(var(--size) * .06) solid rgba(255,255,255,.68); border-radius: 35% 47% 39% 51%; box-shadow: 0 calc(var(--size) * .08) 0 var(--letter-dark), 0 calc(var(--size) * .15) calc(var(--size) * .17) rgba(56, 77, 70, .17); transition: filter 160ms ease, box-shadow 160ms ease; }
.letter-face strong { font-size: calc(var(--size) * .53); font-weight: 1000; line-height: 1; }
.letter-face small { margin-left: 2px; font-size: calc(var(--size) * .19); font-weight: 1000; }
.letter-object > i { position: absolute; z-index: 2; top: 4%; right: 6%; color: #fff5b6; font-size: calc(var(--size) * .2); font-style: normal; opacity: .68; }
.letter-object:not(.caught):hover .letter-face { filter: brightness(1.07); box-shadow: 0 calc(var(--size) * .09) 0 var(--letter-dark), 0 0 0 7px rgba(255,255,255,.5), 0 17px 20px rgba(56, 77, 70, .18); }
.letter-object.wrong .letter-face { animation: wrongShake .42s ease; }
.letter-object.hinted .letter-face { filter: brightness(1.1); box-shadow: 0 calc(var(--size) * .08) 0 var(--letter-dark), 0 0 0 10px rgba(255, 232, 111, .8), 0 0 35px 18px rgba(255, 229, 86, .58); animation: hintPulse .72s ease-in-out infinite alternate; }
.letter-object.caught { z-index: 9; pointer-events: none; }
.letter-object.caught .letter-face { animation: caughtPop .65s ease both; }
.catch-spark { position: absolute; z-index: 12; top: 43%; left: 45%; color: var(--spark-color); font-size: 23px; font-weight: 1000; animation: sparkFly .62s ease-out both; }

.stage-banner { position: absolute; z-index: 15; inset: 50% auto auto 50%; display: flex; min-width: 260px; align-items: center; justify-content: center; gap: 15px; padding: 15px 22px; background: rgba(255, 253, 247, .96); border: 3px solid #d8d2b9; border-radius: 25px; box-shadow: 0 18px 36px rgba(55, 75, 69, .22); pointer-events: none; transform: translate(-50%, -50%); transition: opacity 220ms ease, transform 220ms ease; }
.stage-banner span { color: var(--muted); font-size: 16px; font-weight: 900; }
.stage-banner strong { display: grid; width: 72px; height: 72px; place-items: center; padding-bottom: 4px; color: #fff; font-size: 47px; background: var(--target-color); border-radius: 22px; box-shadow: 0 6px 0 var(--target-dark); }
.stage-banner.hidden { opacity: 0; transform: translate(-50%, -50%) scale(.82); }
.pause-overlay { position: absolute; z-index: 30; inset: 0; padding: 25px; background: rgba(43, 74, 69, .46); backdrop-filter: blur(5px); }
.pause-overlay[hidden] { display: none; }
.pause-panel { position: absolute; top: 50%; left: 50%; width: min(440px, calc(100% - 32px)); padding: 30px; text-align: center; background: #fffdf8; border: 3px solid #ded5b9; border-radius: 31px; box-shadow: var(--shadow); transform: translate(-50%, -50%); }
.pause-panel > span { font-size: 44px; }
.pause-panel h2 { margin: 8px 0; font-size: 36px; }
.pause-panel p { color: var(--muted); font-weight: 800; }
.pause-panel > div { display: flex; justify-content: center; gap: 10px; }

.game-status { gap: 16px; margin-top: 15px; padding: 14px 18px; background: #fffdf8; border: 2px solid #ded6ba; border-radius: 24px; }
.score-box { flex: 0 0 auto; gap: 9px; }
.score-box > span:first-child { font-size: 28px; }
.score-box strong,
.score-box small,
.mistake-box strong,
.mistake-box small { display: block; }
.score-box strong { font-size: 17px; }
.score-box small,
.mistake-box small { color: var(--muted); font-size: 10px; font-weight: 900; }
.progress-track { flex: 1 1 auto; height: 14px; overflow: hidden; background: #e7e4d9; border: 2px solid #d3cfc0; border-radius: 20px; }
.progress-fill { width: var(--progress, 0%); height: 100%; background: linear-gradient(90deg, #62b78a, var(--level-accent)); border-radius: inherit; transition: width 240ms ease; }
.mistake-box { flex: 0 0 auto; gap: 12px; }
.mistake-box > b { color: #efb43d; font-size: 20px; letter-spacing: 2px; }
.feedback-bar { min-height: 80px; gap: 13px; margin-top: 15px; padding: 13px 17px; background: #edf6f0; border: 2px solid #bfd9c8; border-radius: 24px; }
.feedback-bar > span { flex: 0 0 auto; font-size: 29px; }
.feedback-bar p { flex: 1 1 auto; margin: 0; }
.feedback-bar strong,
.feedback-bar small { display: block; }
.feedback-bar strong { margin-bottom: 4px; font-size: 16px; }
.feedback-bar small { color: var(--muted); font-size: 12px; font-weight: 800; }
.feedback-bar.wrong { background: #fff0ed; border-color: #f3b8b1; }
.feedback-bar.hint,
.feedback-bar.listen { background: #fff8d9; border-color: #ead28b; }
.feedback-bar.correct { background: #e8f7ed; border-color: #9ed0b0; }

.result-card { position: relative; overflow: hidden; padding: 44px 34px; text-align: center; background: rgba(255, 253, 247, .96); border: 3px solid #ded6ba; border-radius: 39px; box-shadow: var(--shadow); }
.result-icon { display: grid; width: 86px; height: 86px; margin: 0 auto 15px; place-items: center; font-size: 49px; background: color-mix(in srgb, var(--level-accent) 23%, #fff); border: 4px solid color-mix(in srgb, var(--level-accent) 42%, #fff); border-radius: 29px; animation: pop .55s ease both; }
.result-card h1 { margin: 0 0 9px; font-size: 52px; font-weight: 1000; line-height: 1; letter-spacing: -.04em; }
.result-lead { max-width: 600px; margin: 0 auto 12px; color: var(--muted); font-size: 15px; font-weight: 800; line-height: 1.45; }
.result-stars { color: #f0b83e; font-size: 37px; letter-spacing: 5px; }
.result-stars span { color: #d9d6cb; }
.result-letters { display: grid; max-width: 880px; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 8px; margin: 24px auto; }
.result-letters > span { display: flex; min-width: 0; height: 82px; align-items: baseline; justify-content: center; padding-top: 20px; color: #fff; background: var(--result-color); border: 4px solid rgba(255,255,255,.65); border-radius: 19px; box-shadow: 0 6px 0 color-mix(in srgb, var(--result-color) 66%, #355b54); animation: pop .45s var(--delay) ease both; }
.result-letters strong { font-size: 31px; line-height: 1; }
.result-letters small { margin-left: 2px; font-size: 14px; font-weight: 1000; }
.result-stats { max-width: 650px; justify-content: center; margin: 0 auto 27px; overflow: hidden; background: #f3f1e9; border-radius: 22px; }
.result-stats > span { flex: 1 1 0; padding: 14px 8px; border-right: 2px solid #ded9ca; }
.result-stats > span:last-child { border-right: 0; }
.result-stats strong,
.result-stats small { display: block; }
.result-stats strong { font-size: 21px; }
.result-stats small { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.result-actions { justify-content: center; gap: 13px; }
.result-confetti i { position: absolute; color: var(--level-accent); font-size: 26px; font-style: normal; font-weight: 1000; opacity: .35; }
.result-confetti i:nth-child(1) { top: 10%; left: 9%; transform: rotate(-12deg); }
.result-confetti i:nth-child(2) { top: 18%; right: 10%; transform: rotate(15deg); }
.result-confetti i:nth-child(3) { bottom: 13%; left: 12%; transform: rotate(8deg); }
.result-confetti i:nth-child(4) { right: 14%; bottom: 12%; transform: rotate(-9deg); }

@keyframes float { to { transform: translateY(-9px); } }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.72) rotate(18deg); } }
@keyframes demoFloat { to { margin-top: -12px; transform: rotate(5deg); } }
@keyframes wrongShake { 20% { transform: translateX(-7px) rotate(-5deg); } 45% { transform: translateX(7px) rotate(5deg); } 70% { transform: translateX(-4px); } }
@keyframes hintPulse { to { filter: brightness(1.2); box-shadow: 0 calc(var(--size) * .08) 0 var(--letter-dark), 0 0 0 14px rgba(255, 232, 111, .48), 0 0 44px 22px rgba(255, 229, 86, .5); } }
@keyframes caughtPop { 42% { opacity: 1; transform: scale(1.25) rotate(-7deg); } 100% { opacity: 0; transform: scale(.18) rotate(12deg); } }
@keyframes sparkFly { to { opacity: 0; transform: rotate(var(--angle)) translateX(var(--distance)) rotate(calc(var(--angle) * -1)) scale(.4); } }
@keyframes pop { from { opacity: 0; transform: scale(.7) translateY(12px); } }

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

@media (max-width: 900px) {
  .hero { min-height: 390px; grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr); padding: 39px 32px; }
  .hero h1 { font-size: 52px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 104px; }
  .levels-grid { grid-template-columns: 1fr 1fr; }
  .levels-grid .level-card:last-child { grid-column: 1 / -1; }
  .collection-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .collection-tile { min-height: 98px; }
  .sound-button span:last-child,
  .pause-button span:last-child { display: none; }
  .sound-button,
  .pause-button { width: 49px; padding: 0; }
  .mission-bar { align-items: stretch; }
  .target-label { display: block; }
  .target-label strong { margin-top: 5px; }
  .round-card { display: block; }
  .round-dots { width: 100%; margin-top: 12px; }
}

@media (max-width: 720px) {
  .app { width: min(100% - 22px, 1120px); padding-top: 12px; }
  .topbar { align-items: flex-start; margin-bottom: 14px; }
  .brand-mark { width: 48px; height: 48px; font-size: 24px; border-radius: 16px; }
  .brand strong { max-width: 170px; font-size: 18px; white-space: normal; }
  .brand small { display: none; }
  .topbar-actions { gap: 6px; }
  .collection-button { min-height: 46px; padding-inline: 10px; }
  .back-button,
  .sound-button,
  .pause-button { width: 46px; min-height: 46px; }
  .top-spark { display: none; }
  .hero { min-height: 670px; grid-template-columns: 1fr; align-content: start; padding: 33px 26px; }
  .hero-copy { text-align: center; }
  .hero-copy > p:not(.eyebrow) { margin-inline: auto; }
  .hero-demo { min-height: 285px; }
  .section-heading { align-items: flex-end; }
  .section-heading h2 { font-size: 34px; }
  .section-heading > p { max-width: 240px; }
  .levels-grid { grid-template-columns: 1fr; }
  .levels-grid .level-card:last-child { grid-column: auto; }
  .mission-bar { display: grid; grid-template-columns: 1fr; }
  .target-card { min-height: 94px; }
  .round-card { display: flex; }
  .round-dots { width: 150px; margin-top: 0; }
  .letter-arena { height: 520px; }
  .game-status { flex-wrap: wrap; }
  .progress-track { order: 3; flex-basis: 100%; }
  .mistake-box { margin-left: auto; }
  .result-letters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .app { width: calc(100% - 18px); }
  .topbar { min-height: 52px; gap: 6px; }
  .brand { gap: 7px; }
  .brand-mark { width: 43px; height: 43px; font-size: 22px; border-width: 2px; }
  .brand strong { max-width: 104px; font-size: 15px; }
  .collection-button > span:first-child { display: none; }
  .collection-button { padding-inline: 8px; }
  .collection-button strong { font-size: 10px; }
  .collection-button small { font-size: 9px; }
  .back-button,
  .sound-button,
  .pause-button { width: 40px; min-height: 40px; }
  .hero { min-height: 625px; padding: 28px 18px; border-radius: 30px; }
  .hero h1 { font-size: 43px; }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .hero-demo { min-height: 263px; border-width: 6px; }
  .demo-command { min-width: 162px; }
  .demo-letter.one { left: 15px; }
  .demo-letter.two { left: 37%; }
  .demo-letter.three { right: 12px; }
  .demo-net { right: 48px; }
  .how-section, .levels-section, .collection-section { margin-top: 42px; }
  .section-heading { display: block; }
  .section-heading h2 { font-size: 31px; }
  .section-heading > p { max-width: none; margin-top: 10px; text-align: left; }
  .step-card { min-height: 114px; gap: 12px; padding: 17px; border-radius: 24px; }
  .step-number { width: 54px; height: 54px; border-width: 7px; }
  .step-card strong { font-size: 17px; }
  .level-card { min-height: 340px; padding: 18px; }
  .level-letters i { width: 49px; height: 59px; font-size: 24px; }
  .collection-section { padding: 17px 12px; border-radius: 29px; }
  .collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .collection-tile { min-height: 88px; }
  .parent-tip { align-items: flex-start; padding: 16px; }
  .game-page { padding: 12px 9px; border-radius: 28px; }
  .target-card { gap: 8px; padding: 12px; border-radius: 23px; }
  .target-label small { font-size: 9px; }
  .target-label strong { font-size: 19px; }
  .target-label b { width: 53px; height: 53px; font-size: 34px; border-radius: 17px; }
  .repeat-button { min-width: 46px; min-height: 46px; padding: 0 12px; }
  .repeat-button span:last-child { display: none; }
  .round-card { padding: 13px; }
  .round-card strong { font-size: 13px; }
  .round-dots { width: 126px; }
  .arena-card { border-width: 5px; border-radius: 28px; }
  .letter-arena { height: 510px; }
  .stage-banner { min-width: 224px; }
  .stage-banner strong { width: 62px; height: 62px; font-size: 41px; }
  .game-status { gap: 8px; padding: 12px; }
  .mistake-box { gap: 6px; }
  .mistake-box > b { font-size: 17px; }
  .feedback-bar { align-items: flex-start; flex-wrap: wrap; padding: 13px; }
  .feedback-bar .hint-button { width: 100%; }
  .pause-panel > div { flex-direction: column; }
  .result-card { padding: 34px 14px; border-radius: 30px; }
  .result-card h1 { font-size: 39px; }
  .result-letters { gap: 5px; }
  .result-letters > span { height: 69px; padding-top: 16px; border-width: 3px; }
  .result-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .result-stats > span:nth-child(2) { border-right: 0; }
  .result-stats > span:nth-child(-n+2) { border-bottom: 2px solid #ded9ca; }
  .result-actions { flex-direction: column; }
  .result-actions button { width: 100%; }
}

@media (max-width: 350px) {
  .brand strong { max-width: 78px; font-size: 14px; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
