:root {
  --ink: #2b504c;
  --muted: #68817b;
  --paper: #fffdf7;
  --line: #ddd5b9;
  --green: #3f9d77;
  --gold: #f0b943;
  --coral: #ef7468;
  --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% 9%, rgba(249, 221, 127, .34) 0 104px, transparent 106px), radial-gradient(circle at 94% 13%, rgba(147, 202, 222, .28) 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: 64px; 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, .answer-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: grid; flex: 0 0 auto; width: 56px; height: 56px; place-items: center; font-size: 29px; 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: 23px; 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; }

.hero { position: relative; display: grid; min-height: 430px; grid-template-columns: 1.05fr .95fr; 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: 190px; height: 190px; top: -72px; left: 43%; content: ""; background: rgba(246, 194, 82, .18); border-radius: 50%; }
.hero-copy { position: relative; z-index: 2; 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: 570px; margin: 0 0 19px; font-size: 58px; 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; }
.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-scene { position: relative; min-width: 0; }
.hero-board { position: absolute; inset: 12px 4px 9px 24px; padding: 25px; background: #fffdf7; border: 8px solid #fff; border-radius: 35px; box-shadow: 0 20px 32px rgba(47, 67, 61, .18); transform: rotate(2deg); }
.hero-board::before { position: absolute; inset: 0; content: ""; opacity: .24; background-image: linear-gradient(#9cc7b7 1px, transparent 1px), linear-gradient(90deg, #9cc7b7 1px, transparent 1px); background-size: 28px 28px; border-radius: 27px; }
.hero-pin { position: absolute; z-index: 3; top: 12px; width: 15px; height: 15px; background: var(--coral); border: 3px solid #a54b47; border-radius: 50%; }
.pin-a { left: 16px; } .pin-b { right: 16px; }
.hero-picture { position: relative; z-index: 2; width: 145px; height: 145px; margin: 4px auto 0; font-family: "Segoe UI Emoji", sans-serif; font-size: 112px; line-height: 145px; text-align: center; filter: drop-shadow(0 9px 7px rgba(49, 68, 62, .18)); animation: pictureRoll 3.5s ease-in-out infinite; }
.hero-question { position: relative; z-index: 2; margin: -1px 0 11px; font-size: 20px; font-weight: 1000; text-align: center; }
.hero-letters { position: relative; z-index: 2; display: flex; justify-content: center; gap: 11px; }
.hero-letters span { display: grid; width: 58px; height: 58px; place-items: center; padding-bottom: 3px; color: var(--ink); font-family: Georgia, serif; font-size: 29px; font-weight: 900; background: #f4f2eb; border: 3px solid #d6d1c2; border-radius: 18px; }
.hero-letters .right { color: #fff; background: #62b486; border-color: #3d8c67; transform: translateY(-4px) rotate(-3deg); }
.hero-answer { position: relative; z-index: 2; width: max-content; margin: 14px auto 0; padding: 7px 14px; color: #fff; font-size: 12px; font-weight: 1000; background: var(--coral); border-radius: 12px; transform: rotate(-2deg); }

.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 { position: relative; 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-pictures { display: flex; min-height: 110px; align-items: center; justify-content: center; margin: 7px 0; }
.level-pictures i { display: grid; width: 82px; height: 82px; place-items: center; margin-left: -14px; font-family: "Segoe UI Emoji", sans-serif; font-size: 48px; font-style: normal; background: color-mix(in srgb, var(--item-color) 18%, #fff); border: 4px solid #fff; border-radius: 25px; box-shadow: 0 8px 17px rgba(50, 72, 65, .12); transform: rotate(-5deg); }
.level-pictures i:nth-child(2) { z-index: 2; transform: translateY(-6px) rotate(4deg); }
.level-pictures i:nth-child(3) { transform: rotate(7deg); }
.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; }
.word-tile { position: relative; display: grid; min-width: 0; min-height: 130px; place-items: center; align-content: center; gap: 2px; padding: 15px 5px 7px; background: #f1f0eb; border: 2px solid #dcdbd4; border-radius: 21px; filter: grayscale(1); }
.word-tile.found { background: color-mix(in srgb, var(--tile-color) 15%, #fff); border-color: color-mix(in srgb, var(--tile-color) 48%, #b8c4bb); filter: none; }
.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%; }
.tile-picture { height: 48px; color: #aeb2ae; font-family: "Segoe UI Emoji", sans-serif; font-size: 37px; line-height: 48px; }
.word-tile > strong { color: #87918b; font-size: 21px; line-height: 1; }
.word-tile.found > strong { color: color-mix(in srgb, var(--tile-color) 72%, #294f4b); }
.word-tile p { width: 100%; margin: 2px 0 0; overflow: hidden; color: #898e89; font-size: 9px; font-weight: 900; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.word-tile.found p { color: #526f67; }
.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-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); }

.play-area { display: grid; grid-template-columns: minmax(340px, .92fr) minmax(0, 1.08fr); gap: 16px; }
.picture-card, .answer-card { position: relative; min-width: 0; min-height: 430px; padding: 25px; background: #fffdfa; border: 3px solid color-mix(in srgb, var(--word-color) 31%, #dcd4ba); border-radius: 32px; }
.picture-card { display: grid; place-items: center; align-content: center; text-align: center; overflow: hidden; background: radial-gradient(circle at 50% 43%, color-mix(in srgb, var(--word-color) 16%, #fff) 0 145px, transparent 147px), #fffdfa; }
.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; }
.picture-sticker { position: relative; display: grid; width: 225px; height: 217px; place-items: center; }
.picture-blob { position: absolute; inset: 25px 14px 8px; background: color-mix(in srgb, var(--picture-color) 23%, #fff); border: 4px solid color-mix(in srgb, var(--picture-color) 45%, #fff); border-radius: 46% 54% 52% 48% / 45% 44% 56% 55%; box-shadow: 0 15px 19px rgba(65, 82, 76, .12); transform: rotate(-5deg); }
.picture-emoji { position: relative; z-index: 2; font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; font-size: 132px; line-height: 1; filter: drop-shadow(0 9px 7px rgba(49, 66, 61, .19)); }
.picture-sticker > b { position: absolute; z-index: 3; top: 13px; right: 11px; color: #f0b837; font-size: 27px; animation: twinkle 1.7s ease-in-out infinite; }
.word-reveal { min-width: 190px; min-height: 49px; margin: 4px 0 8px; color: #9ca6a1; font-size: 35px; font-weight: 1000; letter-spacing: .05em; line-height: 49px; }
.word-reveal.visible { color: var(--ink); letter-spacing: 0; }
.word-reveal mark { padding: 1px 6px 3px; color: #fff; background: var(--word-color); border-radius: 10px; }
.picture-clue { max-width: 330px; margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.4; }
.picture-card.is-correct { box-shadow: 0 0 0 6px rgba(98, 183, 138, .2); }
.picture-card.is-correct .picture-emoji { animation: celebrate .65s ease both; }

.answer-card { display: flex; flex-direction: column; }
.answer-heading { justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.answer-heading h2 { margin: 0; font-size: 26px; line-height: 1; }
.letters-grid { display: grid; flex: 1 1 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.letter-choice { position: relative; min-width: 0; min-height: 120px; overflow: hidden; color: var(--ink); background: #f5f3ed; border: 3px solid #d7d2c5; border-radius: 27px; box-shadow: 0 7px 0 #d7d2c5; transition: transform 150ms ease, border-color 150ms ease, background 150ms ease; }
.letter-choice:not(:disabled):hover { border-color: var(--word-color); transform: translateY(-3px); }
.letter-choice > strong { display: flex; align-items: baseline; justify-content: center; gap: 4px; font-size: 62px; font-weight: 1000; line-height: 1; }
.letter-choice > strong small { font-size: 25px; }
.choice-number { position: absolute; top: 9px; left: 10px; display: grid; width: 28px; height: 28px; place-items: center; padding-bottom: 2px; color: #71827d; font-family: Georgia, serif; font-size: 12px; font-weight: 900; background: #fff; border: 2px solid #d5d1c5; border-radius: 50%; }
.choice-check { position: absolute; right: 13px; bottom: 8px; opacity: 0; color: #fff; font-size: 23px; font-weight: 1000; }
.letter-choice.wrong { background: #fff0ed; border-color: #ef756b; animation: shake .35s ease; }
.letter-choice.hinted { background: #fff5c9; border-color: #efb83f; animation: pulse 1s ease-in-out infinite; }
.letter-choice.correct { color: #fff; background: #55ae80; border-color: #397f61; box-shadow: 0 7px 0 #397f61; }
.letter-choice.correct .choice-number { color: #397f61; border-color: #fff; }
.letter-choice.correct .choice-check { opacity: 1; }

.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.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 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-words { display: grid; max-width: 850px; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; margin: 24px auto; }
.result-words > span { display: grid; min-width: 0; height: 84px; place-items: center; align-content: center; color: #fff; background: var(--item-color); border: 4px solid rgba(43, 76, 70, .2); border-radius: 19px; animation: pop .45s var(--delay) ease both; }
.result-words i { font-family: "Segoe UI Emoji", sans-serif; font-size: 27px; font-style: normal; line-height: 1; }
.result-words b { font-size: 17px; }
.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); }

.motion-bounce, .motion-beat, .motion-grow, .motion-hug, .motion-shine, .motion-ring { animation: picturePulse 2s ease-in-out infinite; }
.motion-float, .motion-launch { animation: pictureFloat 2.4s ease-in-out infinite; }
.motion-roll, .motion-ride { animation: pictureRoll 3.5s ease-in-out infinite; }
.motion-sway, .motion-walk { animation: pictureSway 2.6s ease-in-out infinite; }
.motion-peek, .motion-nod { animation: pictureNod 2.2s ease-in-out infinite; }
.motion-spin { animation: pictureSpin 5.5s linear infinite; }
.motion-brush { animation: pictureWiggle 2.3s ease-in-out infinite; }

@keyframes float { to { transform: translateY(-9px); } }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.72) rotate(18deg); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(240, 184, 63, .18); } }
@keyframes pop { from { opacity: 0; transform: scale(.7) translateY(12px); } }
@keyframes celebrate { 35% { transform: scale(1.14) rotate(-5deg); } 65% { transform: scale(.96) rotate(4deg); } }
@keyframes picturePulse { 50% { transform: scale(1.08); } }
@keyframes pictureFloat { 50% { transform: translateY(-9px) rotate(2deg); } }
@keyframes pictureRoll { 50% { transform: translateX(7px) rotate(9deg); } }
@keyframes pictureSway { 50% { transform: translateX(7px) rotate(3deg); } }
@keyframes pictureNod { 50% { transform: rotate(5deg) translateY(3px); } }
@keyframes pictureSpin { to { transform: rotate(360deg); } }
@keyframes pictureWiggle { 35% { transform: rotate(-5deg); } 65% { transform: rotate(5deg); } }

@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: 1fr .92fr; padding: 38px 32px; }
  .hero h1 { font-size: 50px; }
  .hero-board { inset-inline: 5px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 105px; }
  .levels-grid { grid-template-columns: 1fr 1fr; }
  .collection-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .play-area { grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr); }
  .picture-card, .answer-card { padding: 19px; }
}

@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: 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: 710px; 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: 340px; }
  .hero-board { inset: 16px 30px 0; }
  .section-heading { align-items: flex-end; }
  .section-heading h2 { font-size: 34px; }
  .levels-grid { grid-template-columns: 1fr; }
  .play-area { grid-template-columns: 1fr; }
  .picture-card { min-height: 425px; }
  .answer-card { min-height: 420px; }
  .result-words { grid-template-columns: repeat(5, 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: 21px; border-width: 2px; }
  .brand strong { max-width: 130px; 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: 670px; padding: 28px 18px; border-radius: 30px; }
  .hero h1 { font-size: 43px; }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .hero-scene { min-height: 320px; }
  .hero-board { inset-inline: 5px; }
  .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(3, minmax(0, 1fr)); gap: 6px; }
  .word-tile { min-height: 126px; }
  .parent-tip { align-items: flex-start; padding: 16px; }
  .game-shell { padding: 15px 10px; border-radius: 29px; }
  .game-heading h1 { max-width: 235px; font-size: 31px; }
  .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; }
  .picture-card { min-height: 410px; padding: 16px 10px; border-radius: 27px; }
  .picture-sticker { width: 195px; height: 190px; }
  .picture-emoji { font-size: 116px; }
  .answer-card { min-height: 400px; padding: 16px 10px; border-radius: 27px; }
  .answer-heading { align-items: flex-start; }
  .answer-heading h2 { font-size: 21px; }
  .hint-button { min-height: 42px; padding-inline: 10px; font-size: 10px; }
  .letters-grid { gap: 8px; }
  .letter-choice { min-height: 105px; border-radius: 22px; }
  .letter-choice > strong { font-size: 49px; }
  .letter-choice > strong small { font-size: 20px; }
  .choice-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-words { gap: 5px; }
  .result-words > span { height: 70px; 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: 100px; font-size: 13px; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
