:root {
  --ink: #2b504c;
  --muted: #69817c;
  --paper: #fffdf7;
  --line: #ddd5b9;
  --green: #3f9d77;
  --gold: #f0b943;
  --vowel: #ef7468;
  --vowel-dark: #aa4b49;
  --consonant: #62acd6;
  --consonant-dark: #367c9f;
  --shadow: 0 25px 55px rgba(57, 81, 73, .13);
  --soft-shadow: 0 13px 27px rgba(57, 81, 73, .1);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  color: var(--ink);
  background: #f7f8ef;
}

* { box-sizing: border-box; }
html { min-width: 0; overflow-x: hidden; scroll-behavior: smooth; }
body { min-width: 0; margin: 0; overflow-x: hidden; background: radial-gradient(circle at 6% 10%, rgba(249, 221, 127, .35) 0 105px, transparent 107px), radial-gradient(circle at 95% 14%, rgba(147, 202, 222, .29) 0 138px, transparent 140px), linear-gradient(135deg, #f6faef, #fff9ed 47%, #f3f0fb); }
body::before { position: fixed; z-index: -1; inset: 0; content: ""; opacity: .22; background-image: radial-gradient(#6f9b8e 1px, transparent 1px); background-size: 27px 27px; }
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: 55px; font-weight: 1000; word-spacing: 25px; 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, .section-heading, .level-top, .level-footer, .game-heading, .mission-strip, .tray-heading, .feedback-card, .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: flex; flex: 0 0 auto; width: 60px; height: 56px; align-items: center; justify-content: center; gap: 2px; background: #fff6cd; border: 3px solid #dfd2a8; border-radius: 19px; box-shadow: 0 7px 16px rgba(67, 87, 78, .12); transform: rotate(-4deg); }
.brand-mark i, .brand-mark b { display: grid; width: 23px; height: 31px; place-items: center; color: #fff; font-size: 18px; font-style: normal; border-radius: 9px; }
.brand-mark i { background: var(--vowel); } .brand-mark b { background: var(--consonant); }
.brand strong, .brand small, .collection-button strong, .collection-button small { display: block; }
.brand strong { overflow: hidden; font-size: 24px; 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, .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 strong { font-size: 12px; }
.collection-button small { color: var(--muted); font-size: 9px; }
.sound-button { gap: 7px; padding: 0 13px; font-size: 11px; }
.back-button { width: 49px; padding: 0; font-size: 24px; }

.primary-button, .secondary-button, .hint-button { min-height: 50px; padding: 0 20px; font-weight: 1000; border-radius: 16px; transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease; }
.primary-button { color: #fff; background: var(--green); border: 0; box-shadow: 0 7px 0 #2d7d5e, 0 14px 22px rgba(49, 123, 91, .2); }
.secondary-button { color: var(--ink); background: #fffdf8; border: 2px solid var(--line); box-shadow: 0 6px 0 #d7d0b6; }
.hint-button { color: #775b15; background: #fff1b8; border: 2px solid #e4bc45; box-shadow: 0 5px 0 #d4a72e; }
.primary-button:not(:disabled):hover, .secondary-button:not(:disabled):hover, .hint-button:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.02); }
.primary-button:not(:disabled):active, .secondary-button:not(:disabled):active, .hint-button:not(:disabled):active { box-shadow: none; transform: translateY(5px); }
.compact { min-height: 45px; padding-inline: 17px; font-size: 12px; }

.hero { position: relative; display: grid; min-height: 440px; grid-template-columns: 1fr 1fr; overflow: hidden; padding: 45px 48px; background: linear-gradient(125deg, #fffaf0, #f0faef 54%, #f2edff); border: 3px solid var(--line); border-radius: 42px; box-shadow: var(--shadow); }
.hero::before { position: absolute; width: 210px; height: 210px; top: -83px; left: 43%; content: ""; background: rgba(246, 194, 82, .18); border-radius: 50%; }
.hero-copy { position: relative; z-index: 4; align-self: center; }
.eyebrow { margin: 0 0 10px; color: #347964; font-family: Georgia, serif; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { max-width: 530px; margin: 0 0 19px; font-size: 54px; font-weight: 1000; line-height: .98; letter-spacing: -.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 510px; margin-bottom: 26px; color: var(--muted); font-size: 16px; font-weight: 800; line-height: 1.55; }
.hero-scene { position: relative; min-width: 0; }
.hero-board { position: absolute; inset: 14px 2px 7px 27px; overflow: hidden; padding: 35px 24px 23px; background: #fffdfa; border: 8px solid #fff; border-radius: 37px; box-shadow: 0 20px 32px rgba(47, 67, 61, .17); transform: rotate(1.5deg); }
.hero-board::before { position: absolute; inset: 0; content: ""; opacity: .18; background-image: linear-gradient(#8dbbac 1px, transparent 1px), linear-gradient(90deg, #8dbbac 1px, transparent 1px); background-size: 28px 28px; }
.hero-house { position: absolute; z-index: 3; bottom: 28px; display: grid; width: 178px; height: 182px; place-items: center; align-content: center; color: #fff; border-radius: 32px 32px 19px 19px; box-shadow: 0 15px 23px rgba(55, 78, 70, .18); }
.hero-house::before { position: absolute; top: -54px; left: -8px; width: 194px; height: 76px; content: ""; border-radius: 70% 70% 10px 10px; clip-path: polygon(50% 0, 100% 75%, 91% 100%, 9% 100%, 0 75%); }
.vowel-house { left: 24px; background: var(--vowel); border: 7px solid var(--vowel-dark); }
.vowel-house::before { background: #ff9b92; border-bottom: 7px solid var(--vowel-dark); }
.consonant-house { right: 24px; background: var(--consonant); border: 7px solid var(--consonant-dark); }
.consonant-house::before { background: #9fd2ed; border-bottom: 7px solid var(--consonant-dark); }
.house-roof { position: relative; z-index: 4; display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 7px; color: inherit; font-size: 34px; background: rgba(255, 255, 255, .24); border-radius: 19px; }
.hero-house strong { font-size: 21px; } .hero-house small { font-size: 11px; font-weight: 900; }
.hero-letters i { position: absolute; z-index: 5; display: grid; width: 55px; height: 63px; place-items: center; color: var(--ink); font-size: 30px; font-style: normal; font-weight: 1000; background: #fff; border: 4px solid #d8d3c5; border-radius: 18px; box-shadow: 0 9px 16px rgba(48, 69, 63, .15); animation: letterFloat 2.4s ease-in-out infinite; }
.letter-a { top: 29px; left: 75px; } .letter-b { top: 17px; right: 87px; animation-delay: .3s !important; }
.letter-o { top: 104px; left: 190px; animation-delay: .6s !important; } .letter-k { top: 91px; right: 158px; animation-delay: .9s !important; }
.hero-arrow { position: absolute; z-index: 4; top: 70px; color: #f0b943; font-size: 43px; font-weight: 1000; }
.hero-arrow.left { left: 42px; } .hero-arrow.right { right: 42px; }

.how-section, .levels-section, .collection-section { margin-top: 55px; scroll-margin-top: 18px; }
.section-heading { justify-content: space-between; gap: 24px; 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: 400px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 900; line-height: 1.45; text-align: right; }
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.step-card { display: flex; min-width: 0; min-height: 115px; align-items: center; gap: 15px; padding: 20px; background: rgba(255, 253, 247, .92); border: 2px solid var(--line); border-radius: 27px; box-shadow: var(--soft-shadow); }
.step-number { display: grid; flex: 0 0 auto; width: 65px; height: 65px; place-items: center; padding-bottom: 2px; color: #fff; font-family: Georgia, serif; font-size: 27px; font-weight: 900; background: #62b789; border: 8px solid #dff2e7; border-radius: 50%; }
.step-card:nth-child(2) .step-number { background: #f0b944; border-color: #fff0c7; }
.step-card:nth-child(3) .step-number { background: #ef7468; border-color: #ffe0dc; }
.step-card strong, .step-card small { display: block; }
.step-card strong { margin-bottom: 6px; font-size: 17px; font-weight: 1000; }
.step-card small { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.4; }

.levels-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.level-card { display: flex; min-width: 0; min-height: 350px; flex-direction: column; padding: 21px; text-align: left; background: rgba(255, 253, 247, .94); border: 3px solid color-mix(in srgb, var(--accent) 37%, var(--line)); border-radius: 30px; box-shadow: var(--soft-shadow); transition: transform 160ms ease, box-shadow 160ms ease; }
.level-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.level-top, .level-footer { justify-content: space-between; gap: 10px; }
.level-icon { display: grid; width: 46px; height: 46px; place-items: center; font-size: 23px; background: color-mix(in srgb, var(--accent) 20%, #fff); border-radius: 15px; }
.level-best { color: #d99e29; font-size: 13px; font-weight: 1000; }
.level-preview { display: flex; min-height: 112px; align-items: center; justify-content: center; margin: 6px 0; }
.level-preview i { display: grid; width: 54px; height: 66px; place-items: center; margin-left: -7px; color: var(--ink); font-size: 28px; font-style: normal; font-weight: 1000; background: #f4f2eb; border: 4px solid #fff; border-radius: 17px; box-shadow: 0 8px 15px rgba(50, 72, 65, .12); transform: rotate(-5deg); }
.level-preview i:nth-child(even) { transform: translateY(-6px) rotate(4deg); }
.level-preview i.vowel { color: #fff; background: var(--vowel); } .level-preview i.consonant { color: #fff; background: var(--consonant); }
.level-copy { display: block; flex: 1 1 auto; }
.level-copy small, .level-copy strong, .level-copy span { display: block; }
.level-copy small { margin-bottom: 6px; color: color-mix(in srgb, var(--accent) 75%, #315d54); font-family: Georgia, serif; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.level-copy strong { margin-bottom: 8px; font-size: 23px; font-weight: 1000; }
.level-copy span { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.42; }
.level-footer { margin-top: 15px; color: var(--muted); font-size: 10px; font-weight: 900; }
.level-footer b { color: color-mix(in srgb, var(--accent) 80%, #24564b); }

.collection-section { padding: 28px; background: rgba(255, 253, 247, .72); border: 3px solid var(--line); border-radius: 37px; box-shadow: var(--soft-shadow); }
.collection-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.letter-tile { position: relative; display: grid; min-width: 0; min-height: 122px; place-items: center; align-content: center; gap: 5px; padding: 17px 4px 7px; color: #8c9792; background: #f0efea; border: 2px solid #dad9d2; border-radius: 21px; filter: grayscale(1); }
.letter-tile.learned { color: #fff; filter: none; }
.letter-tile.learned.vowel { background: color-mix(in srgb, var(--vowel) 82%, #fff); border-color: var(--vowel-dark); }
.letter-tile.learned.consonant { background: color-mix(in srgb, var(--consonant) 84%, #fff); border-color: var(--consonant-dark); }
.tile-number { position: absolute; top: 6px; left: 7px; display: grid; width: 20px; height: 20px; 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%; }
.letter-tile > strong { font-size: 45px; line-height: 1; }
.letter-tile > small { max-width: 100%; overflow: hidden; font-size: 8px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.sign-note { display: flex; align-items: center; gap: 18px; margin-top: 22px; padding: 18px 24px; background: #f0ebfa; border: 2px solid #cbbde4; border-radius: 24px; }
.sign-note > span { flex: 0 0 auto; padding: 10px 13px; color: #fff; font-size: 23px; font-weight: 1000; background: #8b73bd; border-radius: 14px; }
.sign-note p { margin: 0; color: #645a79; font-size: 13px; font-weight: 700; line-height: 1.5; }

.game-shell { padding: 28px; background: rgba(255, 253, 247, .8); border: 3px solid var(--line); border-radius: 37px; box-shadow: var(--shadow); }
.game-heading { justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.game-heading h1 { margin: 0 0 6px; font-size: 41px; font-weight: 1000; line-height: 1; letter-spacing: -.035em; }
.game-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 13px; font-weight: 900; }
.round-badge { display: grid; flex: 0 0 auto; width: 75px; height: 75px; place-items: center; align-content: center; color: #fff; background: var(--level-accent); border: 8px solid color-mix(in srgb, var(--level-accent) 25%, #fff); border-radius: 50%; }
.round-badge strong { font-family: Georgia, serif; font-size: 25px; line-height: .88; transform: translateY(-1px); }
.round-badge span { font-size: 9px; font-weight: 900; }
.mission-strip { justify-content: space-between; gap: 15px; margin-bottom: 16px; padding: 12px 16px; background: #f2f0e9; border-radius: 18px; }
.mission-strip > span { color: var(--muted); font-size: 11px; font-weight: 900; }
.progress-dots { display: flex; flex: 1 1 auto; gap: 6px; }
.progress-dot { width: 100%; max-width: 52px; height: 9px; background: #d9d6cd; border-radius: 20px; }
.progress-dot.done { background: #65b78b; }
.progress-dot.current { background: var(--level-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--level-accent) 18%, transparent); }

.sorting-board { position: relative; padding: 43px 20px 20px; background: #fffdf9; border: 3px solid #ded6ba; border-radius: 33px; }
.panel-label { position: absolute; top: 17px; left: 20px; margin: 0; color: #68817b; font-family: Georgia, serif; font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.zones-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sort-zone { position: relative; display: grid; min-width: 0; min-height: 245px; grid-template-columns: 78px minmax(0, 1fr) 42px; grid-template-rows: auto 1fr; align-items: center; gap: 12px; padding: 22px; text-align: left; border-radius: 31px 31px 23px 23px; transition: transform 150ms ease, box-shadow 150ms ease; }
.sort-zone.vowel { color: #803d3b; background: #fff0ed; border: 4px solid #ef9a92; box-shadow: 0 9px 0 #e5ada7; }
.sort-zone.consonant { color: #2e647e; background: #eaf7fd; border: 4px solid #92c6df; box-shadow: 0 9px 0 #a4c9da; }
.sort-zone:not(:disabled):hover { transform: translateY(-3px); }
.sort-zone.wrong { animation: shake .36s ease; box-shadow: 0 0 0 7px rgba(239, 116, 104, .22); }
.sort-zone.hinted { animation: zonePulse 1s ease-in-out infinite; }
.zone-icon { display: grid; width: 73px; height: 73px; place-items: center; color: #fff; font-size: 39px; font-weight: 1000; border-radius: 23px; }
.vowel .zone-icon { background: var(--vowel); } .consonant .zone-icon { background: var(--consonant); }
.zone-copy strong, .zone-copy small { display: block; }
.zone-copy strong { margin-bottom: 4px; font-size: 26px; }
.zone-copy small { font-size: 10px; font-weight: 900; }
.zone-count { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; font-family: Georgia, serif; font-size: 17px; font-weight: 900; border-radius: 50%; }
.vowel .zone-count { background: var(--vowel-dark); } .consonant .zone-count { background: var(--consonant-dark); }
.placed-grid { display: grid; min-height: 105px; grid-column: 1 / -1; grid-template-columns: repeat(5, minmax(0, 1fr)); place-items: center; gap: 7px; padding: 12px; background: rgba(255, 255, 255, .55); border: 2px dashed currentColor; border-radius: 20px; }
.placed-grid i { display: grid; width: 48px; height: 55px; place-items: center; color: #fff; font-size: 27px; font-style: normal; font-weight: 1000; border-radius: 15px; animation: placeLetter .4s ease both; }
.vowel .placed-grid i { background: var(--vowel); } .consonant .placed-grid i { background: var(--consonant); }
.placed-grid em { grid-column: 1 / -1; font-size: 11px; font-style: normal; font-weight: 900; opacity: .65; }
.sorting-path { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 15px 0 11px; color: var(--muted); font-size: 11px; font-weight: 900; }
.sorting-path i { width: 70px; height: 2px; background: #d6d2c5; }

.letter-tray { padding: 20px; background: #f5f3eb; border: 2px solid #ddd7c6; border-radius: 27px; }
.tray-heading { justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.tray-heading h2 { margin: 0; font-size: 27px; line-height: 1; }
.letters-grid { display: grid; justify-content: center; gap: 13px; }
.letters-grid.count-5 { grid-template-columns: repeat(5, minmax(0, 150px)); }
.letters-grid.count-6 { grid-template-columns: repeat(6, minmax(0, 140px)); }
.letters-grid.count-7 { grid-template-columns: repeat(7, minmax(0, 125px)); }
.letter-card { position: relative; display: grid; min-width: 0; min-height: 128px; place-items: center; align-content: center; color: var(--ink); background: #fffdf8; border: 3px solid #d4d0c4; border-radius: 25px; box-shadow: 0 8px 0 #d4d0c4; touch-action: none; user-select: none; transition: transform 150ms ease, opacity 150ms ease, border-color 150ms ease; }
.letter-card:not(:disabled):hover { border-color: var(--level-accent); transform: translateY(-3px); }
.letter-card.color-hint.vowel { color: #fff; background: var(--vowel); border-color: var(--vowel-dark); box-shadow: 0 8px 0 var(--vowel-dark); }
.letter-card.color-hint.consonant { color: #fff; background: var(--consonant); border-color: var(--consonant-dark); box-shadow: 0 8px 0 var(--consonant-dark); }
.letter-card.selected { border-color: var(--gold); box-shadow: 0 0 0 7px rgba(240, 185, 67, .23), 0 8px 0 #cf9e31; transform: translateY(-4px); }
.letter-card.wrong { background: #fff0ed; border-color: #ef756b; animation: shake .35s ease; }
.letter-card.hinted { border-color: #efb83f; animation: cardHint 1s ease-in-out infinite; }
.letter-card.drag-source { opacity: .25; }
.card-number { position: absolute; top: 8px; left: 9px; display: grid; width: 26px; height: 26px; place-items: center; padding-bottom: 2px; color: #71827d; font-family: Georgia, serif; font-size: 11px; font-weight: 900; background: #fff; border: 2px solid #d5d1c5; border-radius: 50%; }
.letter-card > strong { font-size: 62px; line-height: 1; }
.letter-card > small { margin-top: 7px; font-size: 9px; font-weight: 900; opacity: .82; }
.drag-ghost { position: fixed !important; z-index: 9999; width: 120px; min-height: 125px; margin: 0; pointer-events: none; opacity: .93; box-shadow: 0 20px 35px rgba(44, 67, 60, .28); transform: translate(-50%, -50%) rotate(4deg) scale(.94); }

.feedback-card { min-height: 78px; gap: 13px; margin-top: 15px; padding: 13px 17px; background: #edf6f0; border: 2px solid #bfd9c8; border-radius: 24px; }
.feedback-card > span { flex: 0 0 auto; font-size: 28px; }
.feedback-card > p { flex: 1 1 auto; margin: 0; }
.feedback-card strong, .feedback-card small { display: block; }
.feedback-card strong { margin-bottom: 4px; font-size: 16px; font-weight: 1000; }
.feedback-card small { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.35; }
.feedback-card.wrong { background: #fff0ed; border-color: #f3b8b1; }
.feedback-card.hint { background: #fff8d9; border-color: #ead28b; }
.feedback-card.placed, .feedback-card.correct { background: #e8f7ed; border-color: #9ed0b0; }
.selected-letter { display: grid; width: 45px; height: 45px; place-items: center; color: #fff; font-size: 25px !important; font-weight: 1000; background: var(--gold); border-radius: 14px; }

.result-card { position: relative; overflow: hidden; padding: 42px 34px; text-align: center; background: rgba(255, 253, 247, .96); border: 3px solid var(--line); 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: 50px; line-height: 1; letter-spacing: -.04em; }
.result-lead { max-width: 630px; 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-groups { display: grid; max-width: 900px; grid-template-columns: .78fr 1.22fr; gap: 12px; margin: 22px auto; }
.result-groups > div { padding: 15px; color: #fff; border-radius: 22px; }
.result-groups .vowel { background: var(--vowel); } .result-groups .consonant { background: var(--consonant); }
.result-groups strong { display: block; margin-bottom: 9px; font-size: 16px; }
.result-groups span { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.result-groups i { display: grid; width: 29px; height: 34px; place-items: center; font-size: 16px; font-style: normal; font-weight: 1000; background: rgba(255, 255, 255, .2); border-radius: 9px; }
.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: 27px; font-style: normal; font-weight: 1000; opacity: .3; }
.result-confetti i:nth-child(1) { top: 10%; left: 8%; transform: rotate(-12deg); }
.result-confetti i:nth-child(2) { top: 18%; right: 9%; 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 letterFloat { 50% { transform: translateY(-8px) rotate(4deg); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes zonePulse { 50% { box-shadow: 0 0 0 9px rgba(240, 185, 67, .23); transform: translateY(-3px); } }
@keyframes cardHint { 50% { box-shadow: 0 0 0 8px rgba(240, 185, 67, .25), 0 8px 0 #cf9e31; transform: translateY(-4px); } }
@keyframes placeLetter { from { opacity: 0; transform: translateY(20px) scale(.7); } }
@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 { grid-template-columns: .9fr 1.1fr; padding: 38px 32px; }
  .hero h1 { font-size: 47px; }
  .hero-board { inset-inline: 0 -14px; }
  .hero-house { width: 156px; }
  .hero-house::before { width: 172px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 105px; }
  .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)); }
  .sort-zone { grid-template-columns: 62px minmax(0, 1fr) 36px; padding: 17px; }
  .zone-icon { width: 60px; height: 60px; }
  .zone-copy strong { font-size: 22px; }
  .placed-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .placed-grid i { width: 42px; height: 49px; }
}

@media (max-width: 720px) {
  .app { width: min(100% - 22px, 1120px); padding-top: 12px; }
  .topbar { align-items: flex-start; margin-bottom: 14px; }
  .brand-mark { width: 50px; height: 48px; border-radius: 16px; }
  .brand-mark i, .brand-mark b { width: 19px; height: 27px; font-size: 15px; }
  .brand strong { max-width: 210px; font-size: 18px; white-space: normal; }
  .brand small { display: none; }
  .topbar-actions { gap: 6px; }
  .sound-button { width: 48px; min-height: 46px; justify-content: center; padding: 0; }
  .sound-button span:last-child { display: none; }
  .collection-button { min-height: 46px; padding-inline: 10px; }
  .collection-button strong { font-size: 11px; }
  .back-button { width: 46px; min-height: 46px; }
  .top-spark { display: none; }
  .hero { min-height: 735px; grid-template-columns: 1fr; align-content: start; padding: 33px 26px; }
  .hero-copy { text-align: center; }
  .hero-copy > p:not(.eyebrow) { margin-inline: auto; }
  .hero-scene { min-height: 375px; }
  .hero-board { inset: 20px 18px 0; }
  .section-heading { align-items: flex-end; }
  .section-heading h2 { font-size: 34px; }
  .levels-grid { grid-template-columns: 1fr; }
  .levels-grid .level-card:last-child { grid-column: auto; }
  .sort-zone { min-height: 275px; grid-template-columns: 1fr 34px; grid-template-rows: auto auto 1fr; gap: 8px; padding: 15px 10px; text-align: center; }
  .zone-icon { width: 57px; height: 57px; grid-column: 1 / -1; margin: auto; }
  .zone-copy strong { font-size: 20px; }
  .zone-copy small { font-size: 8px; }
  .zone-count { width: 32px; height: 32px; font-size: 14px; }
  .placed-grid { min-height: 100px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px; }
  .placed-grid i { width: 38px; height: 44px; font-size: 23px; }
  .letters-grid.count-5, .letters-grid.count-6, .letters-grid.count-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .result-groups { grid-template-columns: 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; border-width: 2px; }
  .brand-mark i, .brand-mark b { width: 17px; height: 24px; font-size: 13px; }
  .brand strong { max-width: 128px; font-size: 14px; }
  .collection-button > span:first-child { display: none; }
  .collection-button { padding-inline: 8px; }
  .collection-button small { font-size: 9px; }
  .back-button, .sound-button { width: 41px; min-height: 41px; }
  .hero { min-height: 695px; padding: 28px 18px; border-radius: 30px; }
  .hero h1 { font-size: 42px; }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .hero-scene { min-height: 350px; }
  .hero-board { inset-inline: -3px; }
  .hero-house { bottom: 25px; width: 138px; height: 170px; }
  .hero-house::before { top: -48px; width: 154px; height: 70px; }
  .vowel-house { left: 15px; } .consonant-house { right: 15px; }
  .house-roof { width: 50px; height: 50px; }
  .hero-house strong { font-size: 17px; }
  .letter-a { left: 44px; } .letter-b { right: 45px; }
  .letter-o { left: 143px; } .letter-k { right: 124px; }
  .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; }
  .level-card { min-height: 345px; padding: 18px; }
  .collection-section { padding: 17px 12px; border-radius: 29px; }
  .collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .letter-tile { min-height: 111px; }
  .sign-note { align-items: flex-start; padding: 16px; }
  .game-shell { padding: 15px 9px; border-radius: 29px; }
  .game-heading h1 { max-width: 245px; font-size: 30px; }
  .round-badge { width: 63px; height: 63px; border-width: 7px; }
  .round-badge strong { font-size: 21px; }
  .mission-strip { display: block; }
  .mission-strip > span { display: block; margin-top: 11px; text-align: center; }
  .sorting-board { padding: 41px 8px 10px; border-radius: 27px; }
  .zones-grid { gap: 7px; }
  .sort-zone { min-height: 270px; padding: 12px 6px; border-width: 3px; border-radius: 24px 24px 18px 18px; }
  .zone-copy strong { font-size: 17px; }
  .zone-copy small { min-height: 29px; }
  .placed-grid { gap: 4px; padding: 5px; }
  .placed-grid i { width: 34px; height: 40px; font-size: 21px; }
  .sorting-path { padding-block: 12px 8px; font-size: 9px; }
  .sorting-path i { width: 31px; }
  .letter-tray { padding: 15px 8px; border-radius: 23px; }
  .tray-heading { align-items: flex-start; }
  .tray-heading h2 { font-size: 21px; }
  .hint-button { min-height: 42px; padding-inline: 10px; font-size: 10px; }
  .letters-grid.count-5, .letters-grid.count-6, .letters-grid.count-7 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .letter-card { min-height: 112px; }
  .letter-card > strong { font-size: 48px; }
  .card-number { top: 6px; left: 6px; width: 24px; height: 24px; font-size: 10px; }
  .feedback-card { align-items: flex-start; flex-wrap: wrap; }
  .feedback-card .primary-button { width: 100%; }
  .result-card { padding: 34px 13px; border-radius: 30px; }
  .result-card h1 { font-size: 38px; }
  .result-groups i { width: 27px; height: 32px; font-size: 14px; }
  .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: 100px; font-size: 13px; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
