:root {
  --ink: #294f4b;
  --muted: #6a827d;
  --paper: #fffdf7;
  --line: #ddd5b9;
  --green: #3e9f78;
  --gold: #f1b943;
  --coral: #ee7268;
  --coral-dark: #b84d47;
  --blue: #65acd5;
  --blue-dark: #347fa7;
  --purple: #8c75c0;
  --shadow: 0 25px 55px rgba(57, 81, 73, .13);
  --soft-shadow: 0 13px 27px rgba(57, 81, 73, .1);
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  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: .2; 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.5s ease-in-out infinite alternate; }
.loading-card p { margin: 0; font-size: 19px; font-weight: 900; }

.topbar, .topbar-actions, .brand, .brand-mark, .collection-button, .sound-button, .section-heading, .level-top, .level-footer, .helper-card, .game-heading, .mission-strip, .word-card, .clue-line, .choice-heading, .answer-card, .feedback-card, .result-actions, .result-stats, .result-rule { 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 { position: relative; flex: 0 0 auto; width: 58px; height: 56px; justify-content: center; padding: 5px; background: #fff7d7; 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: 24px; height: 35px; place-items: center; color: #fff; font-size: 17px; font-style: normal; font-weight: 1000; border-radius: 9px; }
.brand-mark i { background: var(--coral); transform: rotate(-5deg); }
.brand-mark b { margin-left: -2px; background: var(--blue); 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; }

.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 { min-height: 47px; 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 { filter: brightness(1.02); transform: translateY(-2px); }
.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; }

.eyebrow { margin: 0 0 10px; color: #347964; font-family: Georgia, serif; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.hero { position: relative; display: grid; min-height: 430px; grid-template-columns: .95fr 1.05fr; overflow: hidden; padding: 45px 48px; background: linear-gradient(125deg, #fffaf0, #eff9ef 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; }
.hero h1 { max-width: 520px; margin: 0 0 19px; font-size: 55px; font-weight: 1000; line-height: .98; letter-spacing: -.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 490px; margin-bottom: 26px; color: var(--muted); font-size: 16px; font-weight: 800; line-height: 1.55; }
.hero-scene { position: relative; min-width: 0; }
.hero-lab { position: absolute; inset: 20px -8px 12px 20px; overflow: hidden; background: linear-gradient(180deg, #fffdf7, #f7f5ef); border: 8px solid #fff; border-radius: 38px; box-shadow: 0 20px 32px rgba(47, 67, 61, .17); transform: rotate(1.4deg); }
.hero-lab::before { position: absolute; inset: 0; content: ""; opacity: .22; background-image: linear-gradient(#8dbbac 1px, transparent 1px), linear-gradient(90deg, #8dbbac 1px, transparent 1px); background-size: 27px 27px; }
.hero-word { position: absolute; z-index: 4; top: 35px; left: 50%; display: grid; width: 185px; min-height: 135px; place-items: center; align-content: center; background: #fffdf8; border: 4px solid #d9d3bf; border-radius: 28px; box-shadow: 0 13px 20px rgba(49, 71, 65, .14); transform: translateX(-50%) rotate(-2deg); }
.hero-word > span { font-size: 44px; line-height: 1; }
.hero-word div { display: flex; align-items: center; margin: 4px 0; }
.hero-word i, .hero-word b, .hero-word em { display: grid; width: 39px; height: 47px; place-items: center; color: var(--ink); font-size: 32px; font-style: normal; font-weight: 1000; }
.hero-word i { color: #fff; background: var(--coral); border-radius: 12px; }
.hero-word b { color: var(--blue-dark); background: #dff2ff; border-radius: 12px; }
.hero-word small { color: var(--muted); font-size: 10px; font-weight: 900; }
.hero-answer { position: absolute; z-index: 4; bottom: 27px; display: grid; width: 145px; min-height: 93px; place-items: center; align-content: center; color: #fff; border: 4px solid; border-radius: 25px; box-shadow: 0 9px 0, 0 16px 20px rgba(43, 68, 62, .14); }
.hero-answer > span { font-size: 30px; line-height: 1; }
.hero-answer strong { font-size: 17px; }
.hero-answer small { font-size: 10px; }
.hero-answer.hard { left: 25px; background: var(--coral); border-color: #bf5049; box-shadow: 0 9px 0 #a7433e, 0 16px 20px rgba(43, 68, 62, .14); }
.hero-answer.soft { right: 25px; background: var(--blue); border-color: #3c86ad; box-shadow: 0 9px 0 #347597, 0 16px 20px rgba(43, 68, 62, .14); }
.hero-beam { position: absolute; z-index: 2; top: 170px; width: 130px; height: 4px; background: #efbd43; transform-origin: center; }
.hero-beam::after { position: absolute; right: -1px; top: -6px; content: ""; border-width: 8px 0 8px 12px; border-style: solid; border-color: transparent transparent transparent #efbd43; }
.hero-beam.left { left: 92px; transform: rotate(33deg); }
.hero-beam.right { right: 92px; transform: rotate(147deg); }
.hero-check { position: absolute; z-index: 5; right: 56px; bottom: 109px; display: grid; width: 39px; height: 39px; place-items: center; color: #fff; font-size: 24px; font-weight: 1000; background: var(--green); border: 4px solid #fff; border-radius: 50%; animation: pop 2.2s ease-in-out infinite; }

.how-section, .levels-section, .collection-section { margin-top: 48px; }
.section-heading { justify-content: space-between; gap: 24px; margin-bottom: 19px; }
.section-heading h2 { margin: 0; font-size: 39px; font-weight: 1000; letter-spacing: -.035em; }
.section-heading > p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.45; text-align: right; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.step-card { display: flex; min-height: 112px; align-items: center; gap: 15px; padding: 18px; background: rgba(255, 253, 247, .9); border: 2px solid var(--line); border-radius: 24px; box-shadow: var(--soft-shadow); }
.step-number { display: grid; flex: 0 0 auto; width: 59px; height: 59px; place-items: center; padding-top: 1px; color: #fff; font-family: Georgia, serif; font-size: 27px; font-weight: 900; line-height: 1; background: #61bb8d; border: 8px solid #dbf3e6; border-radius: 50%; }
.step-card:nth-child(2) .step-number { background: #f3b943; border-color: #fff0bd; }
.step-card:nth-child(3) .step-number { background: #ed766d; border-color: #ffe0dd; }
.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.35; }

.helper-section { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 22px; }
.helper-card { min-height: 125px; gap: 19px; padding: 20px 26px; background: #fff6f2; border: 3px solid #efb0a9; border-radius: 27px; box-shadow: var(--soft-shadow); }
.helper-card.soft { background: #f1f9ff; border-color: #add6ea; }
.helper-card > span { display: grid; flex: 0 0 auto; width: 67px; height: 67px; place-items: center; font-size: 36px; background: rgba(255,255,255,.75); border-radius: 20px; }
.helper-card .eyebrow { margin-bottom: 3px; color: #a44e49; }
.helper-card.soft .eyebrow { color: #397da3; }
.helper-card h3 { margin: 0 0 5px; font-size: 23px; letter-spacing: .08em; }
.helper-card small { color: var(--muted); font-size: 11px; font-weight: 800; }

.levels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.level-card { position: relative; display: flex; min-width: 0; min-height: 337px; flex-direction: column; padding: 19px; overflow: hidden; text-align: left; background: rgba(255, 253, 247, .94); border: 3px solid color-mix(in srgb, var(--accent) 50%, #ddd5b9); border-radius: 27px; box-shadow: var(--soft-shadow); transition: transform 170ms ease, box-shadow 170ms ease; }
.level-card::before { position: absolute; width: 140px; height: 140px; right: -62px; bottom: -60px; content: ""; opacity: .12; background: var(--accent); border-radius: 50%; }
.level-card:hover { transform: translateY(-5px) rotate(-.3deg); box-shadow: var(--shadow); }
.level-top, .level-footer { position: relative; z-index: 2; justify-content: space-between; }
.level-icon { display: grid; width: 49px; height: 49px; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--accent) 17%, white); border-radius: 15px; }
.level-best { color: #d79a28; font-size: 13px; font-weight: 1000; }
.level-preview { display: flex; min-height: 78px; align-items: center; justify-content: center; margin: 14px 0 9px; }
.level-preview i { display: grid; width: 50px; height: 59px; place-items: center; margin-left: -5px; color: var(--ink); font-size: 30px; font-style: normal; font-weight: 1000; background: #fff; border: 3px solid #e3dfd1; border-radius: 14px; box-shadow: 0 7px 0 #d8d4c7; transform: rotate(-5deg); }
.level-preview i:nth-child(even) { transform: rotate(5deg) translateY(3px); }
.level-preview i.hard { color: #fff; background: var(--coral); border-color: #d85d54; box-shadow: 0 7px 0 #ae4742; }
.level-preview i.soft { color: #fff; background: var(--blue); border-color: #4d91b7; box-shadow: 0 7px 0 #397b9d; }
.level-copy { position: relative; z-index: 2; flex: 1; }
.level-copy small, .level-copy strong, .level-copy span { display: block; }
.level-copy small { margin-bottom: 7px; color: var(--accent); font-family: Georgia, serif; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.level-copy strong { margin-bottom: 7px; font-size: 22px; font-weight: 1000; }
.level-copy span { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.42; }
.level-footer { margin-top: 17px; color: var(--muted); font-size: 9px; font-weight: 900; }
.level-footer b { color: var(--accent); }

.collection-section { padding: 30px; background: rgba(255, 253, 247, .89); border: 3px solid var(--line); border-radius: 34px; box-shadow: var(--soft-shadow); }
.collection-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; }
.word-tile { position: relative; display: grid; min-width: 0; min-height: 144px; place-items: center; align-content: center; padding: 12px 7px 10px; overflow: hidden; text-align: center; background: linear-gradient(145deg, #f4f4f3, #ececed); border: 2px solid #d8d7d2; border-radius: 21px; }
.word-tile.opened { background: linear-gradient(145deg, #fff7f4, #ffe7e3); border-color: #e78b84; }
.word-tile.opened.soft { background: linear-gradient(145deg, #f5fbff, #dff2ff); border-color: #74b4d7; }
.tile-number { position: absolute; top: 8px; left: 8px; display: grid; width: 24px; height: 24px; place-items: center; padding-bottom: 1px; color: #77766f; font-family: Georgia, serif; font-size: 10px; font-weight: 900; line-height: 1; background: #fff; border: 2px solid #d7d3c6; border-radius: 50%; }
.tile-picture { font-size: 37px; line-height: 1.1; filter: grayscale(.75); opacity: .55; }
.word-tile.opened .tile-picture { filter: none; opacity: 1; }
.word-tile strong { overflow: hidden; max-width: 100%; margin-top: 5px; font-size: 16px; font-weight: 1000; text-overflow: ellipsis; white-space: nowrap; }
.word-tile small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 900; }
.word-tile.opened.hard small { color: #a94a45; }
.word-tile.opened.soft small { color: #357d9f; }
.rule-note { display: flex; align-items: center; gap: 17px; margin-top: 20px; padding: 18px 22px; background: #f2ecff; border: 2px solid #c9bae9; border-radius: 23px; }
.rule-note > span { flex: 0 0 auto; padding: 11px 14px; color: #fff; font-size: 16px; font-weight: 1000; line-height: 1.35; text-align: center; background: var(--purple); border-radius: 13px; }
.rule-note p { margin: 0; color: #625c76; font-size: 11px; font-weight: 800; line-height: 1.45; }
.rule-note strong { display: block; margin-bottom: 3px; color: #4a4261; font-size: 13px; }

.game-shell { padding: 28px; background: rgba(255, 253, 247, .94); border: 3px solid var(--line); border-radius: 38px; box-shadow: var(--shadow); }
.game-heading { justify-content: space-between; gap: 20px; padding: 0 5px 17px; }
.game-heading .eyebrow { color: var(--level-accent); }
.game-heading h1 { margin: 0 0 6px; font-size: 42px; font-weight: 1000; letter-spacing: -.035em; }
.game-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 12px; font-weight: 900; }
.round-badge { display: grid; flex: 0 0 auto; width: 76px; height: 76px; place-items: center; align-content: center; color: #fff; background: var(--level-accent); border: 9px solid color-mix(in srgb, var(--level-accent) 25%, white); border-radius: 50%; }
.round-badge strong { font-family: Georgia, serif; font-size: 27px; line-height: .95; transform: translateY(-1px); }
.round-badge span { font-size: 8px; font-weight: 1000; }
.mission-strip { min-height: 44px; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 8px 13px; background: #f2f1ec; border-radius: 16px; }
.progress-dots { display: flex; flex: 1; gap: 6px; }
.progress-dot { flex: 1; height: 8px; background: #d4d2c8; border-radius: 99px; }
.progress-dot.done { background: #61b989; }
.progress-dot.current { background: var(--level-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--level-accent) 17%, transparent); }
.mission-strip > span { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-weight: 900; }
.sound-board { display: grid; grid-template-columns: .94fr 1.06fr; gap: 18px; padding: 20px; background: #fbfaf5; border: 3px solid var(--line); border-radius: 30px; }
.word-panel, .choice-panel { min-width: 0; }
.panel-label { margin: 0 0 11px; color: #347964; font-family: Georgia, serif; font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.word-card { position: relative; width: 100%; min-height: 267px; justify-content: center; gap: 22px; padding: 26px 18px; overflow: hidden; text-align: left; touch-action: none; background: linear-gradient(145deg, #fffdf9, #f4f3ee); border: 3px solid #d9d3bf; border-radius: 28px; box-shadow: 0 9px 0 #d2cebf, 0 18px 25px rgba(49, 71, 65, .11); transition: transform 150ms ease, opacity 150ms ease; }
.word-card:not(:disabled):hover { transform: translateY(-3px); }
.word-card.dragging { opacity: .35; }
.word-card.solved.hard { border-color: #e17b74; box-shadow: 0 9px 0 #ca5e57; }
.word-card.solved.soft { border-color: #66aace; box-shadow: 0 9px 0 #4185aa; }
.word-picture { display: grid; flex: 0 0 auto; width: 112px; height: 112px; place-items: center; font-size: 68px; background: #fff; border: 3px solid #e3dfd2; border-radius: 30px; box-shadow: 0 10px 20px rgba(48, 68, 62, .1); }
.word-copy { min-width: 0; }
.word-copy > small, .word-copy > strong, .word-copy > em { display: block; }
.word-copy > small { margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.word-copy > strong { display: flex; flex-wrap: nowrap; align-items: center; font-size: 36px; font-weight: 1000; letter-spacing: .02em; }
.word-copy > strong span { display: inline-grid; min-width: .68em; place-items: center; }
.word-copy .target-letter { min-width: 1.08em; height: 1.25em; margin-inline: 1px; color: #fff; background: var(--coral); border-radius: 10px; box-shadow: 0 4px 0 #b64c47; }
.word-copy .helper-letter { min-width: 1.08em; height: 1.25em; margin-inline: 1px; border-radius: 10px; }
.word-copy .helper-letter.hard { color: #a43e39; background: #ffd9d5; }
.word-copy .helper-letter.soft { color: #2f769b; background: #d9f1ff; }
.word-copy > em { margin-top: 9px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 900; }
.word-copy > em b { color: var(--coral-dark); font-size: 13px; }
.drag-label { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; color: #928d7d; font-size: 16px; }
.drag-label small { font-size: 7px; font-weight: 900; }
.clue-line { min-height: 84px; gap: 9px; margin-top: 15px; padding: 12px 15px; background: #f1f7ed; border: 2px solid #c6d7bb; border-radius: 20px; }
.clue-line.neutral { background: #f3f2ed; border-color: #d8d5c7; }
.clue-target, .clue-helper { display: grid; flex: 0 0 auto; width: 44px; height: 49px; place-items: center; color: #fff; font-size: 24px; font-weight: 1000; background: var(--coral); border-radius: 12px; box-shadow: 0 5px 0 #b44e48; }
.clue-helper.hard { color: #9f413c; background: #ffd8d4; box-shadow: 0 5px 0 #e6aaa4; }
.clue-helper.soft { color: #2f769b; background: #d8f0ff; box-shadow: 0 5px 0 #9bc9e2; }
.clue-line > i { color: #8a887f; font-size: 18px; font-style: normal; font-weight: 1000; }
.clue-line > p { margin: 0 0 0 4px; color: var(--muted); font-size: 10px; font-weight: 800; line-height: 1.35; }
.choice-heading { justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.choice-heading .panel-label { margin-bottom: 4px; }
.choice-heading h2 { margin: 0; font-size: 25px; font-weight: 1000; }
.answer-grid { display: grid; gap: 14px; }
.answer-card { position: relative; width: 100%; min-height: 149px; gap: 18px; padding: 20px; overflow: hidden; text-align: left; background: #fff2f0; border: 4px solid #ec9992; border-radius: 26px; box-shadow: 0 9px 0 #d66e67; transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease; }
.answer-card.soft { background: #ecf8ff; border-color: #8cc7e5; box-shadow: 0 9px 0 #62a9ce; }
.answer-card:not(:disabled):hover, .answer-card.drag-over { transform: translateY(-3px) scale(1.01); filter: brightness(1.02); }
.answer-card:not(:disabled):active { box-shadow: none; transform: translateY(8px); }
.answer-card.wrong { animation: shake .35s ease; filter: saturate(.65); }
.answer-card.wrong::after { position: absolute; inset: 0; display: grid; place-items: center; content: "×"; color: #fff; font-size: 74px; font-weight: 1000; background: rgba(112, 74, 70, .58); }
.answer-card.hinted { outline: 7px solid rgba(244, 191, 63, .5); animation: hintPulse 1s ease-in-out infinite alternate; }
.answer-card.correct { outline: 7px solid rgba(74, 177, 125, .4); }
.answer-icon { display: grid; flex: 0 0 auto; width: 76px; height: 76px; place-items: center; font-size: 42px; background: rgba(255,255,255,.72); border-radius: 22px; }
.answer-copy { min-width: 0; flex: 1; }
.answer-copy small, .answer-copy strong, .answer-copy em { display: block; }
.answer-copy small { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.answer-copy strong { margin: 4px 0; color: #9d403b; font-size: 25px; font-weight: 1000; }
.answer-card.soft .answer-copy strong { color: #337a9f; }
.answer-copy em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 800; }
.answer-symbol { flex: 0 0 auto; color: #ad504b; font-family: Georgia, serif; font-size: 18px; font-weight: 900; }
.answer-card.soft .answer-symbol { color: #367fa5; }
.feedback-card { min-height: 89px; gap: 15px; margin-top: 17px; padding: 15px 18px; background: #eef8f2; border: 2px solid #9ed6b8; border-radius: 21px; }
.feedback-card > span { display: grid; flex: 0 0 auto; min-width: 43px; height: 43px; place-items: center; color: #fff; font-size: 23px; font-weight: 1000; background: var(--green); border-radius: 13px; }
.feedback-card p { flex: 1; margin: 0; }
.feedback-card strong, .feedback-card small { display: block; }
.feedback-card strong { margin-bottom: 4px; font-size: 15px; font-weight: 1000; }
.feedback-card small { color: var(--muted); font-size: 10px; font-weight: 800; line-height: 1.4; }
.feedback-card.wrong { background: #fff1ef; border-color: #e8a09a; }
.feedback-card.wrong > span { background: var(--coral); }
.feedback-card.hint { background: #fff8dd; border-color: #e6c867; }
.feedback-card.hint > span { color: #785a14; background: #f3c851; }
.feedback-card.calm { background: #f2f6f2; border-color: #c8d5ca; }
.feedback-card.calm > span { background: #6e9b8d; }

.word-drag-ghost { position: fixed; z-index: 9999; top: 0; left: 0; display: flex; width: 160px; min-height: 96px; align-items: center; justify-content: center; gap: 9px; padding: 12px; pointer-events: none; color: var(--ink); background: #fffdf8; border: 4px solid #d6d0bd; border-radius: 22px; box-shadow: 0 22px 40px rgba(36, 57, 51, .25); }
.word-drag-ghost span { font-size: 38px; }
.word-drag-ghost strong { font-size: 17px; }

.result-card { position: relative; overflow: hidden; padding: 52px 70px; text-align: center; background: linear-gradient(145deg, #fffaf0, #eef9ee 55%, #f3edff); border: 3px solid var(--line); border-radius: 42px; box-shadow: var(--shadow); }
.result-card::before, .result-card::after { position: absolute; width: 210px; height: 210px; content: ""; border-radius: 50%; }
.result-card::before { top: -110px; left: -60px; background: rgba(241,185,67,.2); }
.result-card::after { right: -75px; bottom: -105px; background: rgba(99,173,213,.18); }
.result-burst { position: relative; z-index: 2; display: grid; width: 92px; height: 92px; place-items: center; margin: 0 auto 17px; font-size: 48px; background: #fff; border: 4px solid #e5d9b6; border-radius: 30px; box-shadow: 0 10px 0 #d9c99c; animation: float 1.5s ease-in-out infinite alternate; }
.result-card .eyebrow { position: relative; z-index: 2; }
.result-card h1 { position: relative; z-index: 2; margin: 0 0 12px; font-size: 55px; font-weight: 1000; letter-spacing: -.04em; }
.result-card > p:not(.eyebrow) { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 15px; font-weight: 800; line-height: 1.5; }
.result-stars { position: relative; z-index: 2; margin: 18px 0; color: #e7a72e; font-size: 41px; letter-spacing: 8px; }
.result-stats { position: relative; z-index: 2; width: min(690px, 100%); justify-content: center; margin: 0 auto; overflow: hidden; background: rgba(255,255,255,.74); border: 2px solid var(--line); border-radius: 23px; }
.result-stats > span { flex: 1; min-width: 0; padding: 17px 9px; border-right: 2px solid var(--line); }
.result-stats > span:last-child { border-right: 0; }
.result-stats strong, .result-stats small { display: block; }
.result-stats strong { font-family: Georgia, serif; font-size: 29px; line-height: 1; }
.result-stats small { margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.result-rule { position: relative; z-index: 2; width: min(690px, 100%); gap: 13px; margin: 16px auto 0; padding: 13px 17px; text-align: left; background: #f2ecff; border: 2px solid #c9bae9; border-radius: 20px; }
.result-rule > span { display: grid; width: 44px; height: 44px; place-items: center; font-size: 24px; background: #fff; border-radius: 12px; }
.result-rule p { margin: 0; }
.result-rule strong, .result-rule small { display: block; }
.result-rule strong { font-size: 13px; }
.result-rule small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 800; }
.result-actions { position: relative; z-index: 2; justify-content: center; gap: 13px; margin-top: 25px; }

@keyframes float { to { transform: translateY(-7px) rotate(2deg); } }
@keyframes twinkle { 50% { opacity: .45; transform: rotate(20deg) scale(.8); } }
@keyframes pop { 50% { transform: scale(1.13) rotate(-7deg); } }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-5px); } }
@keyframes hintPulse { to { filter: brightness(1.06); transform: scale(1.015); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 39px; }
  .hero-copy { max-width: 660px; }
  .hero-scene { min-height: 360px; margin-top: 10px; }
  .hero-lab { inset: 10px 3% 0; }
  .levels-grid { grid-template-columns: 1fr; }
  .level-card { min-height: 245px; display: grid; grid-template-columns: 110px 1fr; grid-template-rows: auto 1fr auto; column-gap: 19px; }
  .level-top { grid-column: 1 / -1; }
  .level-preview { grid-row: 2 / 4; grid-column: 1; flex-wrap: wrap; align-content: center; }
  .level-preview i { width: 47px; height: 54px; }
  .level-copy { align-self: center; }
  .level-footer { grid-column: 2; }
  .collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sound-board { grid-template-columns: 1fr; }
  .word-card { min-height: 220px; }
  .answer-grid { grid-template-columns: 1fr 1fr; }
  .answer-card { min-height: 169px; flex-direction: column; align-items: flex-start; gap: 7px; }
  .answer-symbol { position: absolute; right: 16px; top: 16px; }
}

@media (max-width: 720px) {
  .app { width: min(100% - 22px, 1120px); padding-top: 11px; }
  .topbar { min-height: 56px; gap: 7px; margin-bottom: 12px; }
  .brand { gap: 7px; }
  .brand-mark { width: 47px; height: 47px; padding: 4px; border-width: 2px; border-radius: 15px; }
  .brand-mark i, .brand-mark b { width: 19px; height: 29px; font-size: 13px; border-radius: 7px; }
  .brand strong { max-width: 225px; font-size: 17px; }
  .brand small { font-size: 7px; }
  .top-spark { display: none; }
  .collection-button, .sound-button, .back-button { min-height: 44px; border-radius: 14px; }
  .collection-button { padding: 4px 8px; }
  .collection-button strong { font-size: 10px; }
  .collection-button small { font-size: 8px; }
  .sound-button { width: 44px; padding: 0; justify-content: center; }
  .sound-button span:last-child { display: none; }
  .back-button { width: 44px; }
  .hero { min-height: 0; padding: 30px 24px; border-radius: 31px; }
  .hero h1 { font-size: 43px; }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .hero-scene { min-height: 335px; }
  .hero-lab { inset-inline: 0; }
  .section-heading { align-items: flex-end; }
  .section-heading h2 { font-size: 32px; }
  .section-heading > p { max-width: 260px; font-size: 10px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 92px; }
  .helper-section { grid-template-columns: 1fr; }
  .collection-section { padding: 22px 16px; border-radius: 28px; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-shell { padding: 20px; border-radius: 31px; }
  .game-heading h1 { font-size: 35px; }
  .sound-board { padding: 14px; border-radius: 25px; }
  .word-card { min-height: 200px; }
  .result-card { padding: 42px 24px; border-radius: 34px; }
  .result-card h1 { font-size: 45px; }
}

@media (max-width: 520px) {
  .app { width: calc(100% - 18px); }
  .topbar { align-items: flex-start; }
  .brand { flex: 1 1 auto; }
  .brand strong { max-width: 120px; font-size: 14px; white-space: normal; }
  .brand small { display: none; }
  .topbar-actions { gap: 5px; }
  .collection-button { max-width: 115px; }
  .collection-button > span:first-child { display: none; }
  .hero { padding: 27px 18px; }
  .hero h1 { font-size: 38px; }
  .hero .primary-button { width: 100%; padding-inline: 10px; }
  .hero-scene { min-height: 323px; }
  .hero-lab { border-width: 5px; border-radius: 28px; }
  .hero-word { top: 27px; width: 160px; min-height: 122px; }
  .hero-answer { width: 124px; min-height: 88px; bottom: 26px; }
  .hero-answer.hard { left: 12px; }
  .hero-answer.soft { right: 12px; }
  .hero-beam { width: 95px; }
  .hero-beam.left { left: 65px; }
  .hero-beam.right { right: 65px; }
  .how-section, .levels-section, .collection-section { margin-top: 36px; }
  .section-heading { display: block; }
  .section-heading > p { max-width: none; margin-top: 8px; text-align: left; }
  .level-card { display: flex; min-height: 333px; }
  .level-preview { flex-wrap: nowrap; }
  .level-footer { width: 100%; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .word-tile { min-height: 137px; }
  .rule-note { align-items: flex-start; padding: 15px; }
  .game-shell { padding: 13px 10px; }
  .game-heading { align-items: flex-start; padding-inline: 3px; }
  .game-heading h1 { font-size: 31px; line-height: 1; }
  .round-badge { width: 64px; height: 64px; border-width: 7px; }
  .round-badge strong { font-size: 23px; }
  .mission-strip { display: block; padding: 11px; }
  .mission-strip > span { display: block; margin-top: 9px; text-align: center; }
  .progress-dots { gap: 4px; }
  .sound-board { padding: 10px 8px; }
  .word-card { min-height: 218px; flex-direction: column; gap: 10px; padding: 18px 10px; text-align: center; }
  .word-picture { width: 92px; height: 82px; font-size: 52px; border-radius: 22px; }
  .word-copy > strong { justify-content: center; font-size: 32px; }
  .drag-label { display: none; }
  .clue-line { min-height: 75px; padding: 9px; }
  .clue-target, .clue-helper { width: 38px; height: 43px; font-size: 21px; }
  .clue-line > p { font-size: 8px; }
  .choice-heading { align-items: flex-start; }
  .choice-heading h2 { font-size: 21px; }
  .hint-button { min-height: 43px; padding-inline: 11px; font-size: 10px; }
  .answer-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .answer-card { min-height: 188px; align-items: center; padding: 15px 8px; text-align: center; }
  .answer-icon { width: 64px; height: 64px; font-size: 34px; }
  .answer-copy strong { font-size: 20px; }
  .answer-copy em { font-size: 8px; }
  .answer-symbol { position: static; font-size: 14px; }
  .feedback-card { align-items: flex-start; flex-wrap: wrap; }
  .feedback-card .primary-button { width: 100%; }
  .result-card { padding: 34px 13px; }
  .result-card h1 { font-size: 38px; }
  .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 var(--line); }
  .result-actions { flex-direction: column; }
  .result-actions button { width: 100%; }
}

@media (max-width: 355px) {
  .brand strong { max-width: 95px; font-size: 13px; }
  .collection-button { max-width: 101px; }
  .hero-answer { width: 112px; }
  .word-copy > strong { font-size: 28px; }
}
