:root {
  --ink: #294f4b;
  --muted: #6b827d;
  --paper: #fffdf7;
  --line: #ddd5b9;
  --green: #3e9f78;
  --gold: #f0b943;
  --coral: #ef7468;
  --blue: #62acd6;
  --purple: #8e75c0;
  --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, .game-heading, .mission-strip,
.word-heading, .options-heading, .feedback-card, .result-actions, .result-stats,
.result-dictionary, .case-note { 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: 68px; height: 56px; justify-content: center; 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: 29px; height: 37px; place-items: center; color: #fff; font-size: 18px; font-style: normal; font-weight: 1000; border-radius: 9px; }
.brand-mark i { margin-right: -3px; background: var(--coral); transform: rotate(-7deg); }
.brand-mark b { background: var(--blue); transform: rotate(5deg); }
.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: .05em; 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: 44px; padding-inline: 14px; color: #775b15; font-size: 11px; 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: .94fr 1.06fr; 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: 480px; margin-bottom: 26px; color: var(--muted); font-size: 16px; font-weight: 800; line-height: 1.55; }
.hero-scene { position: relative; min-width: 0; }
.hero-case { position: absolute; inset: 20px -6px 12px 20px; overflow: hidden; background: #fffdf9; border: 8px solid #fff; border-radius: 38px; box-shadow: 0 20px 32px rgba(47, 67, 61, .17); transform: rotate(1.4deg); }
.hero-case::before { position: absolute; inset: 0; content: ""; opacity: .21; background-image: linear-gradient(#8dbbac 1px, transparent 1px), linear-gradient(90deg, #8dbbac 1px, transparent 1px); background-size: 27px 27px; }
.hero-picture { position: absolute; z-index: 3; top: 35px; left: 32px; display: grid; width: 132px; min-height: 121px; place-items: center; align-content: center; background: #fff; border: 4px solid #dcd4bd; border-radius: 28px; box-shadow: 0 11px 18px rgba(48, 69, 63, .13); transform: rotate(-4deg); }
.hero-picture span { font-size: 61px; }
.hero-picture small { color: var(--muted); font-size: 8px; font-weight: 900; }
.hero-word { position: absolute; z-index: 4; right: 31px; top: 55px; display: flex; gap: 8px; }
.hero-word i, .hero-word b { display: grid; width: 59px; height: 67px; place-items: center; color: var(--ink); font-size: 33px; font-style: normal; font-weight: 1000; background: #fff; border: 4px solid #c7c1ad; border-radius: 16px; }
.hero-word i { color: #e09232; border-style: dashed; background: #fff4c9; }
.hero-options { position: absolute; z-index: 4; right: 43px; bottom: 44px; display: flex; gap: 8px; }
.hero-options i { display: grid; width: 54px; height: 62px; place-items: center; color: #fff; font-size: 29px; font-style: normal; font-weight: 1000; background: var(--coral); border: 4px solid #d65d54; border-radius: 15px; box-shadow: 0 7px 0 #af4944; transform: rotate(-6deg); }
.hero-options i:nth-child(2) { background: var(--green); border-color: #328563; box-shadow: 0 7px 0 #286d51; transform: rotate(4deg); }
.hero-options i:nth-child(3) { background: var(--blue); border-color: #4b91b7; box-shadow: 0 7px 0 #397a9c; transform: rotate(-2deg); }
.hero-glass { position: absolute; z-index: 6; left: 139px; bottom: 28px; font-size: 76px; filter: drop-shadow(0 9px 6px rgba(42, 65, 59, .15)); transform: rotate(-14deg); }
.hero-line { position: absolute; z-index: 2; left: 172px; right: 201px; bottom: 70px; height: 4px; background: #e0c168; border-radius: 9px; transform: rotate(-4deg); }
.hero-check { position: absolute; z-index: 5; right: 23px; bottom: 93px; display: grid; width: 43px; height: 43px; place-items: center; padding-bottom: 2px; color: #fff; font-size: 25px; font-weight: 1000; background: var(--green); border: 4px solid #fff; border-radius: 50%; animation: pop 2.1s 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-bottom: 2px; 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; }

.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: 48px; height: 57px; place-items: center; margin-left: -5px; color: #fff; font-size: 28px; font-style: normal; font-weight: 1000; background: color-mix(in srgb, var(--accent) 83%, white); border: 3px solid color-mix(in srgb, var(--accent) 74%, #555); border-radius: 14px; box-shadow: 0 7px 0 color-mix(in srgb, var(--accent) 70%, #444); }
.level-preview i.missing { color: var(--accent); background: #fff; border-style: dashed; box-shadow: 0 7px 0 color-mix(in srgb, var(--accent) 24%, #aaa); }
.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; }
.dictionary-tile { position: relative; display: grid; min-width: 0; min-height: 154px; place-items: center; align-content: center; padding: 14px 7px 10px; overflow: hidden; text-align: center; background: linear-gradient(145deg, #f4f4f3, #ececed); border: 2px solid #d8d7d2; border-radius: 21px; }
.dictionary-tile.opened { background: linear-gradient(145deg, #fffdf8, color-mix(in srgb, var(--word-color) 16%, white)); border-color: color-mix(in srgb, var(--word-color) 62%, #b5b09e); }
.tile-number { position: absolute; top: 8px; left: 8px; display: grid; width: 25px; height: 25px; 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%; }
.dictionary-picture { font-size: 42px; line-height: 1.1; filter: grayscale(.75); opacity: .55; }
.dictionary-tile.opened .dictionary-picture { filter: none; opacity: 1; }
.dictionary-tile strong { overflow: hidden; max-width: 100%; margin-top: 7px; font-size: 16px; font-weight: 1000; text-overflow: ellipsis; white-space: nowrap; }
.dictionary-tile small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 900; }
.case-note { gap: 17px; margin-top: 20px; padding: 18px 22px; background: #f2ecff; border: 2px solid #c9bae9; border-radius: 23px; }
.case-note > span { display: grid; flex: 0 0 auto; min-width: 82px; height: 50px; place-items: center; color: #fff; font-size: 19px; font-weight: 1000; background: var(--purple); border-radius: 14px; }
.case-note p { margin: 0; color: #625c76; font-size: 11px; font-weight: 800; line-height: 1.45; }
.case-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; }
.case-board { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; padding: 20px; background: #fbfaf5; border: 3px solid var(--line); border-radius: 30px; }
.panel-label { margin: 0 0 11px; color: #347964; font-family: Georgia, serif; font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.picture-panel { min-width: 0; text-align: center; }
.picture-frame { position: relative; display: grid; min-height: 330px; place-items: center; overflow: hidden; background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--picture-color) 16%, white)); border: 4px solid color-mix(in srgb, var(--picture-color) 57%, #cec5ad); border-radius: 31px; box-shadow: 0 9px 0 color-mix(in srgb, var(--picture-color) 37%, #b6ad99), 0 18px 25px rgba(50, 70, 64, .11); }
.picture-frame::before { position: absolute; width: 190px; height: 190px; content: ""; background: rgba(255, 255, 255, .52); border-radius: 50%; }
.picture-frame > span { position: relative; z-index: 3; font-size: 124px; line-height: 1; filter: drop-shadow(0 13px 9px rgba(44, 65, 59, .13)); animation: pictureFloat 2.4s ease-in-out infinite alternate; }
.picture-frame i, .picture-frame b { position: absolute; display: block; border-radius: 50%; }
.picture-frame i { width: 44px; height: 44px; top: 23px; right: 23px; background: rgba(255, 255, 255, .62); }
.picture-frame b { width: 25px; height: 25px; bottom: 28px; left: 24px; background: color-mix(in srgb, var(--picture-color) 45%, white); }
.picture-panel > p:not(.panel-label) { margin: 21px 0 4px; font-size: 20px; font-weight: 1000; }
.picture-panel > small { color: var(--muted); font-size: 10px; font-weight: 800; }
.search-panel { min-width: 0; }
.word-heading { justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.word-heading .panel-label { margin-bottom: 3px; }
.word-heading h2 { margin: 0; font-size: 25px; font-weight: 1000; }
.word-strip { display: grid; grid-template-columns: repeat(var(--letters, 3), minmax(0, 1fr)); gap: 7px; min-height: 96px; align-items: stretch; padding: 10px; background: #f1f0e9; border: 2px solid #dad6c7; border-radius: 21px; }
.word-strip.count-3 { --letters: 3; }
.word-strip.count-4 { --letters: 4; }
.word-strip.count-5 { --letters: 5; }
.word-strip.count-6 { --letters: 6; }
.word-strip.count-7 { --letters: 7; }
.word-strip.count-8 { --letters: 8; }
.word-cell { position: relative; display: grid; min-width: 0; min-height: 72px; place-items: center; padding-top: 1px; color: #fff; font-size: clamp(25px, 3.2vw, 37px); font-weight: 1000; line-height: 1; background: var(--level-accent); border: 3px solid color-mix(in srgb, var(--level-accent) 72%, #4d635e); border-radius: 16px; box-shadow: 0 7px 0 color-mix(in srgb, var(--level-accent) 67%, #3f514d); }
.missing-cell { color: #a98a32; background: #fff9df; border: 3px dashed #d4b858; box-shadow: 0 7px 0 #d8c789; transition: transform 150ms ease, background 150ms ease; }
.missing-cell small { position: absolute; right: 2px; bottom: 2px; left: 2px; color: #967b30; font-size: 7px; font-weight: 900; line-height: 1; text-align: center; text-transform: uppercase; }
.missing-cell.drag-over, .missing-cell.hinted { background: #fff0a9; border-color: #e09f22; transform: translateY(-4px); }
.missing-cell.found { color: #fff; background: #59b685; border-color: #33875f; border-style: solid; box-shadow: 0 7px 0 #2b744f; animation: correctPop .45s ease both; }
.missing-cell.found small { color: #e5fff1; }
.magnifier-line { display: flex; align-items: center; gap: 10px; min-height: 47px; padding: 9px 4px; }
.magnifier-line span { font-size: 25px; }
.magnifier-line p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 900; }
.options-box { min-height: 208px; padding: 17px; background: #fffdf8; border: 3px solid #ded7c1; border-radius: 25px; }
.options-heading { justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.options-heading strong { font-size: 14px; font-weight: 1000; }
.options-heading small { color: var(--muted); font-size: 8px; font-weight: 900; }
.options-grid { display: grid; gap: 9px; align-items: stretch; }
.options-grid.count-3 { grid-template-columns: repeat(3, 1fr); }
.options-grid.count-4 { grid-template-columns: repeat(4, 1fr); }
.options-grid.count-5 { grid-template-columns: repeat(5, 1fr); }
.letter-option { position: relative; display: grid; min-width: 0; min-height: 104px; place-items: center; align-content: center; color: #fff; touch-action: none; background: var(--level-accent); border: 3px solid color-mix(in srgb, var(--level-accent) 72%, #4d635e); border-radius: 17px; box-shadow: 0 7px 0 color-mix(in srgb, var(--level-accent) 67%, #3f514d), 0 10px 14px rgba(47, 68, 62, .13); transition: transform 140ms ease, opacity 140ms ease, filter 140ms ease; }
.letter-option:not(:disabled):hover { transform: translateY(-3px) rotate(-1deg); }
.letter-option.dragging { opacity: .32; }
.letter-option.wrong { background: var(--coral); border-color: #c95f56; box-shadow: 0 7px 0 #a84d47; animation: shake .35s ease; }
.letter-option.hinted { color: #6b5110; background: #f6c752; border-color: #d6a52d; box-shadow: 0 7px 0 #bc8d22, 0 0 0 6px #fff2bb; animation: glow 1s ease-in-out infinite alternate; }
.letter-option.correct { background: var(--green); border-color: #337e61; box-shadow: 0 7px 0 #28664d; }
.letter-option strong { font-size: 41px; line-height: 1; }
.letter-option small { margin-top: 7px; font-size: 7px; font-weight: 900; opacity: .85; }
.option-number { position: absolute; top: 6px; left: 6px; display: grid; width: 24px; height: 24px; place-items: center; padding-bottom: 1px; color: var(--ink); font-family: Georgia, serif; font-size: 10px; font-weight: 900; line-height: 1; background: #fff; border-radius: 50%; }
.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; padding-bottom: 1px; color: #fff; font-size: 22px; 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; }

.letter-drag-ghost { position: fixed; z-index: 9999; top: 0; left: 0; display: grid; width: 74px; height: 84px; place-items: center; pointer-events: none; color: #fff; font-size: 39px; font-weight: 1000; background: var(--purple); border: 4px solid #755ba8; border-radius: 18px; box-shadow: 0 20px 35px rgba(39, 58, 53, .27); }

.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, .result-card h1, .result-card > p, .result-stars, .result-stats, .result-dictionary, .result-actions { position: relative; z-index: 2; }
.result-card h1 { margin: 0 0 12px; font-size: 55px; font-weight: 1000; letter-spacing: -.04em; }
.result-card > p:not(.eyebrow) { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 15px; font-weight: 800; line-height: 1.5; }
.result-stars { margin: 18px 0; color: #e7a72e; font-size: 41px; letter-spacing: 8px; }
.result-stats { width: min(700px, 100%); justify-content: center; margin: 0 auto 20px; overflow: hidden; background: rgba(255, 255, 255, .72); border: 2px solid var(--line); border-radius: 22px; }
.result-stats span { flex: 1; padding: 15px 9px; border-right: 1px solid #ddd6c3; }
.result-stats span:last-child { border-right: 0; }
.result-stats strong, .result-stats small { display: block; }
.result-stats strong { font-size: 25px; font-weight: 1000; }
.result-stats small { margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 900; }
.result-dictionary { width: min(620px, 100%); gap: 14px; margin: 0 auto 24px; padding: 14px 18px; text-align: left; background: #e8f8ef; border: 2px solid #a7d7bb; border-radius: 20px; }
.result-dictionary > span { font-size: 33px; }
.result-dictionary p { margin: 0; }
.result-dictionary strong, .result-dictionary small { display: block; }
.result-dictionary strong { font-size: 14px; }
.result-dictionary small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.result-actions { justify-content: center; gap: 13px; }

@keyframes float { to { transform: translateY(-8px) rotate(2deg); } }
@keyframes pictureFloat { to { transform: translateY(-7px) rotate(1deg); } }
@keyframes twinkle { 50% { opacity: .45; transform: scale(.8) rotate(20deg); } }
@keyframes pop { 50% { transform: scale(1.09) rotate(-5deg); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes correctPop { 50% { transform: scale(1.12) rotate(2deg); } }
@keyframes glow { to { filter: brightness(1.1); transform: translateY(-3px); } }

@media (max-width: 900px) {
  .hero { min-height: 390px; padding: 38px 34px; }
  .hero h1 { font-size: 47px; }
  .hero-case { inset-left: 4px; }
  .hero-picture { left: 18px; width: 111px; }
  .hero-word { right: 20px; }
  .hero-word i, .hero-word b { width: 48px; }
  .hero-options { right: 27px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 91px; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-board { grid-template-columns: 250px minmax(0, 1fr); }
  .picture-frame { min-height: 300px; }
  .picture-frame > span { font-size: 108px; }
  .word-cell { font-size: 28px; }
  .letter-option { min-height: 94px; }
}

@media (max-width: 760px) {
  .app { width: min(100% - 20px, 1120px); padding-top: 10px; }
  .topbar { align-items: flex-start; }
  .brand-mark { width: 56px; height: 50px; }
  .brand-mark i, .brand-mark b { width: 24px; height: 32px; font-size: 15px; }
  .brand strong { font-size: 19px; }
  .brand small, .sound-button span:last-child, .top-spark { display: none; }
  .collection-button { padding-inline: 9px; }
  .collection-button strong { font-size: 10px; }
  .sound-button { width: 49px; padding: 0; justify-content: center; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 32px 24px 25px; }
  .hero h1 { font-size: clamp(39px, 11vw, 49px); }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .hero-scene { min-height: 285px; margin-top: 17px; }
  .hero-case { inset: 5px 0; }
  .hero-picture { top: 25px; left: 22px; width: 117px; min-height: 105px; }
  .hero-picture span { font-size: 51px; }
  .hero-word { top: 37px; }
  .hero-options { bottom: 37px; }
  .hero-glass { left: 112px; bottom: 20px; font-size: 62px; }
  .section-heading { align-items: flex-end; }
  .section-heading h2 { font-size: 32px; }
  .section-heading > p { max-width: 210px; }
  .levels-grid { grid-template-columns: 1fr; }
  .level-card { min-height: 280px; }
  .collection-section { padding: 22px 16px; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-shell { padding: 17px 12px; border-radius: 28px; }
  .game-heading h1 { font-size: 34px; }
  .case-board { grid-template-columns: 1fr; padding: 14px; }
  .picture-panel { display: grid; grid-template-columns: 120px minmax(0, 1fr); grid-template-rows: auto auto auto; align-items: center; column-gap: 14px; text-align: left; }
  .picture-panel .panel-label { grid-column: 1 / -1; }
  .picture-frame { grid-row: 2 / 4; min-height: 125px; }
  .picture-frame::before { width: 95px; height: 95px; }
  .picture-frame > span { font-size: 72px; }
  .picture-panel > p:not(.panel-label) { margin: 0 0 5px; }
  .word-heading { margin-top: 10px; }
  .word-strip { min-height: 82px; gap: 5px; padding: 8px; }
  .word-cell { min-height: 62px; font-size: clamp(22px, 7vw, 31px); border-width: 2px; border-radius: 12px; }
  .options-box { min-height: 182px; padding: 13px; }
  .letter-option { min-height: 88px; }
  .letter-option strong { font-size: 36px; }
  .feedback-card { align-items: flex-start; }
  .feedback-card .primary-button { flex-basis: 100%; }
  .result-card { padding: 39px 18px; }
  .result-card h1 { font-size: 44px; }
}

@media (max-width: 520px) {
  .topbar { min-height: 57px; margin-bottom: 13px; gap: 7px; }
  .brand { gap: 7px; }
  .brand-mark { width: 46px; height: 43px; border-radius: 14px; }
  .brand-mark i, .brand-mark b { width: 20px; height: 27px; font-size: 13px; }
  .brand strong { max-width: 155px; font-size: 16px; }
  .collection-button { min-height: 43px; }
  .collection-button > span:first-child { display: none; }
  .sound-button, .back-button { width: 43px; min-height: 43px; }
  .hero { padding-inline: 18px; border-radius: 31px; }
  .hero-scene { min-height: 255px; }
  .hero-case { border-width: 5px; border-radius: 28px; }
  .hero-picture { left: 13px; width: 96px; min-height: 91px; }
  .hero-picture span { font-size: 43px; }
  .hero-word { right: 12px; gap: 4px; }
  .hero-word i, .hero-word b { width: 42px; height: 56px; font-size: 27px; border-width: 3px; }
  .hero-options { right: 16px; gap: 5px; }
  .hero-options i { width: 40px; height: 50px; font-size: 23px; border-width: 3px; }
  .hero-glass { left: 81px; font-size: 55px; }
  .section-heading { display: block; }
  .section-heading > p { max-width: none; margin-top: 7px; text-align: left; }
  .step-card { gap: 10px; padding: 14px; }
  .step-number { width: 52px; height: 52px; font-size: 23px; border-width: 7px; }
  .collection-grid { gap: 7px; }
  .dictionary-tile { min-height: 135px; }
  .dictionary-picture { font-size: 35px; }
  .dictionary-tile strong { font-size: 13px; }
  .case-note { display: block; }
  .case-note > span { width: 82px; margin-bottom: 10px; }
  .game-heading h1 { font-size: 28px; }
  .round-badge { width: 64px; height: 64px; border-width: 7px; }
  .round-badge strong { font-size: 23px; }
  .mission-strip { display: block; }
  .mission-strip > span { display: block; margin-top: 9px; }
  .picture-panel { grid-template-columns: 100px minmax(0, 1fr); }
  .picture-frame > span { font-size: 62px; }
  .word-heading h2 { font-size: 20px; }
  .hint-button { min-height: 40px; padding-inline: 10px; font-size: 9px; }
  .word-strip { gap: 3px; padding: 6px; }
  .word-cell { min-height: 55px; font-size: clamp(18px, 6.7vw, 28px); border-radius: 10px; box-shadow: 0 5px 0 color-mix(in srgb, var(--level-accent) 67%, #3f514d); }
  .missing-cell { box-shadow: 0 5px 0 #d8c789; }
  .missing-cell small { display: none; }
  .options-grid { gap: 5px; }
  .options-grid.count-4 { grid-template-columns: repeat(2, 1fr); }
  .options-grid.count-5 { grid-template-columns: repeat(6, 1fr); }
  .options-grid.count-5 .letter-option { grid-column: span 2; }
  .options-grid.count-5 .letter-option:nth-child(n + 4) { grid-column: span 3; }
  .letter-option { min-height: 77px; border-radius: 13px; }
  .letter-option strong { font-size: 31px; }
  .option-number { width: 20px; height: 20px; font-size: 8px; }
  .feedback-card { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .feedback-card > span { min-width: 37px; height: 37px; font-size: 19px; }
  .feedback-card p { width: calc(100% - 50px); }
  .feedback-card .primary-button { width: 100%; }
  .result-card h1 { font-size: 36px; }
  .result-stats { display: grid; grid-template-columns: repeat(2, 1fr); }
  .result-stats span { border-right: 0; border-bottom: 1px solid #ddd6c3; }
  .result-actions { flex-direction: column; }
  .result-actions button { width: 100%; }
}

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