:root {
  --ink: #173f39;
  --muted: #5d736e;
  --paper: #fffaf0;
  --green: #2f7762;
  --green-dark: #225a4b;
  --coral: #c97055;
  --gold: #e4b251;
  --blue: #6382aa;
  --line: rgba(38, 84, 71, 0.14);
  --shadow: 0 20px 48px rgba(52, 65, 49, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; overflow-x: hidden; }
body {
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(230, 176, 77, .18), transparent 25rem),
    radial-gradient(circle at 92% 26%, rgba(84, 144, 127, .14), transparent 27rem),
    #f7f1e7;
  font-family: "Segoe UI", Arial, sans-serif;
}
button { font: inherit; }
button:focus-visible { outline: 4px solid rgba(74, 137, 115, .28); outline-offset: 3px; }

.app {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 38px;
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 12px 18px;
  border: 1px solid rgba(54, 107, 90, .12);
  border-radius: 22px;
  background: rgba(255, 252, 245, .84);
  box-shadow: 0 10px 24px rgba(49, 72, 60, .07);
  backdrop-filter: blur(10px);
}
.game-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.game-brand > span:last-child { display: grid; gap: 2px; }
.game-brand strong { font-size: 20px; line-height: 1.12; }
.game-brand small { color: var(--muted); font-size: 13px; }
.game-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 16px; background: linear-gradient(145deg, #e6f2e9, #f9e8bd); box-shadow: inset 0 0 0 1px rgba(49,116,95,.12); }
.game-icon svg { width: 36px; height: 36px; }
.game-icon .icon-book { fill: #f2ddb2; stroke: #8b6b45; stroke-width: 2; stroke-linejoin: round; }
.game-icon .icon-fold { fill: none; stroke: #8b6b45; stroke-width: 1.7; stroke-linecap: round; }
.game-icon .icon-ring { fill: none; stroke: #4a806f; stroke-width: 2.2; stroke-dasharray: 2.5 2.5; }
.game-icon .icon-arrow { fill: none; stroke: #c86f57; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.age-pill { flex: 0 0 auto; padding: 8px 14px; color: #fff; border-radius: 999px; background: var(--green); font-size: 13px; font-weight: 850; }

.screen { display: none; animation: screen-in .32s ease both; }
.screen.is-active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow { margin: 0 0 8px; color: #7b6942; font-size: 12px; font-weight: 900; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }

.home-screen {
  position: relative;
  overflow: hidden;
  min-height: 584px;
  padding: 60px 56px 31px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(105deg, rgba(255,252,242,.98) 0 49%, rgba(231,240,231,.9) 49% 100%);
  box-shadow: var(--shadow);
}
.home-screen::after { content: ""; position: absolute; right: -80px; bottom: -145px; width: 610px; height: 340px; border-radius: 50%; background: #d9c590; opacity: .58; }
.hero-copy { position: relative; z-index: 3; width: min(51%, 505px); }
h1 { margin-bottom: 18px; font-size: clamp(37px, 5vw, 63px); line-height: 1; letter-spacing: -.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 480px; margin-bottom: 24px; color: #49625d; font-size: 18px; line-height: 1.58; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.hero-facts span { padding: 7px 11px; border: 1px solid rgba(49,116,95,.16); border-radius: 999px; background: rgba(255,255,255,.72); color: var(--green-dark); font-size: 13px; font-weight: 780; }

.primary-button, .secondary-button, .hint-button, .next-button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 850;
  transition: transform .16s ease, filter .16s ease;
}
.primary-button, .next-button { color: #fff; background: linear-gradient(145deg, #367c66, #275e4e); box-shadow: 0 11px 22px rgba(38,95,78,.22); }
.primary-button:hover, .secondary-button:hover, .hint-button:hover, .next-button:hover { transform: translateY(-2px); filter: saturate(1.06); }

.hero-story { position: absolute; z-index: 2; top: 28px; right: 15px; width: 47%; height: 445px; overflow: hidden; border-radius: 48% 48% 28px 28px; background: linear-gradient(180deg,#c9e4df 0 48%,#b8cd91 48% 66%,#a77655 66%); box-shadow: inset 0 0 0 1px rgba(45,92,75,.1); }
.hero-story::before { content: ""; position: absolute; left: -11%; right: -11%; bottom: -55px; height: 180px; border-radius: 50% 50% 0 0; background: #8c6045; box-shadow: inset 0 17px #d0aa73; }
.hero-glow { position: absolute; top: 34px; right: 49px; width: 78px; height: 78px; border-radius: 50%; background: #f1c461; box-shadow: 0 0 0 16px rgba(244,200,93,.2); }
.hero-book { position: absolute; z-index: 2; left: 17%; right: 17%; bottom: 28px; height: 115px; filter: drop-shadow(0 12px 9px rgba(45,60,48,.18)); }
.hero-book i { position: absolute; bottom: 0; width: 51%; height: 97px; border: 3px solid #9f704c; background: linear-gradient(145deg,#fff1c9,#e7c995); }
.hero-book i:first-child { left: 0; border-radius: 16px 5px 22px 13px; transform: skewY(5deg); }
.hero-book i:nth-child(2) { right: 0; border-radius: 5px 16px 13px 22px; transform: skewY(-5deg); }
.hero-book b { position: absolute; z-index: 2; left: 50%; bottom: 3px; width: 4px; height: 94px; border-radius: 4px; background: #8b5b41; transform: translateX(-50%); }
.hero-loop { position: absolute; z-index: 4; left: 25%; top: 49px; width: 50%; height: 245px; border: 8px solid rgba(126,88,61,.7); border-radius: 50%; }
.hero-loop span { position: absolute; display: block; width: 38px; height: 42px; border: 2px solid #ebcf96; border-radius: 9px; background: #fff1c8; box-shadow: 0 5px 0 #9e744e; transform: translate(-50%,-50%); }
.hero-loop span:nth-child(1) { left: 50%; top: 0; }.hero-loop span:nth-child(2) { left: 86%; top: 15%; }.hero-loop span:nth-child(3) { left: 100%; top: 50%; }.hero-loop span:nth-child(4) { left: 86%; top: 85%; }.hero-loop span:nth-child(5) { left: 50%; top: 100%; }.hero-loop span:nth-child(6) { left: 14%; top: 85%; }.hero-loop span:nth-child(7) { left: 0; top: 50%; }.hero-loop span:nth-child(8) { left: 14%; top: 15%; }
.hero-castle { position: absolute; z-index: 3; left: 2%; bottom: 88px; width: 150px; filter: drop-shadow(0 9px 7px rgba(45,60,48,.16)); }
.hero-dragon { position: absolute; z-index: 5; right: 0; bottom: 73px; width: 135px; filter: drop-shadow(0 9px 7px rgba(45,60,48,.16)); }

.how-strip { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 52px; }
.how-strip article { display: flex; min-height: 76px; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid rgba(50,103,85,.13); border-radius: 18px; background: rgba(255,252,245,.9); box-shadow: 0 8px 20px rgba(49,69,57,.07); }
.how-strip article > b { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: #fff; background: var(--coral); }
.how-strip article span { display: grid; gap: 3px; }
.how-strip strong { font-size: 14px; }
.how-strip small { color: var(--muted); line-height: 1.3; }

.routes-screen, .play-screen { padding: 30px; border: 1px solid var(--line); border-radius: 32px; background: rgba(255,251,243,.96); box-shadow: var(--shadow); }
.section-title, .task-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.section-title h2, .task-head h2, .result-copy h2 { margin-bottom: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.04; letter-spacing: -.03em; }
.section-title > p { margin: 0; color: var(--muted); font-weight: 750; }

.route-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.route-card { display: flex; min-width: 0; min-height: 410px; flex-direction: column; padding: 17px; border: 1px solid color-mix(in srgb, var(--accent) 23%, transparent); border-radius: 24px; background: linear-gradient(160deg, #fffdf7, var(--soft)); box-shadow: 0 12px 26px rgba(48,69,57,.08); }
.route-preview { display: flex; height: 145px; align-items: center; justify-content: center; gap: 0; padding: 12px; overflow: hidden; border-radius: 19px; background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.28)); }
.route-preview span { display: grid; width: 38%; height: 102px; place-items: center; overflow: hidden; border: 4px solid #fff9ec; border-radius: 13px; box-shadow: 0 8px 14px rgba(55,66,52,.14); }
.route-preview span:nth-child(1) { transform: rotate(-6deg) translateX(14px); }.route-preview span:nth-child(2) { z-index: 2; transform: translateY(-8px); }.route-preview span:nth-child(3) { transform: rotate(6deg) translateX(-14px); }
.route-preview img { width: 100%; height: 100%; object-fit: cover; }
.route-copy { min-height: 119px; padding: 19px 5px 8px; }
.route-copy h3 { margin-bottom: 7px; font-size: 23px; line-height: 1.08; }
.route-copy > p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.42; }
.route-progress { display: flex; align-items: center; gap: 10px; margin: auto 4px 14px; }
.route-progress > span { height: 9px; flex: 1; overflow: hidden; border-radius: 999px; background: rgba(33,81,67,.11); }
.route-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.route-progress b { flex: 0 0 auto; color: var(--accent); font-size: 12px; }
.route-card > button { display: flex; min-height: 49px; align-items: center; justify-content: space-between; padding: 0 17px; border: 0; border-radius: 15px; color: #fff; background: var(--accent); cursor: pointer; font-weight: 850; }
.text-button { margin-top: 22px; padding: 9px 0; border: 0; color: var(--green-dark); background: none; cursor: pointer; font-weight: 800; }

.task-head { justify-content: flex-start; margin-bottom: 14px; }
.task-head > div { flex: 1; }
.round-button { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: #fff; cursor: pointer; font-size: 22px; font-weight: 900; }
.counter { padding: 8px 13px; border-radius: 999px; color: var(--green-dark); background: #e8f1eb; font-weight: 850; }
.task-progress { height: 8px; margin-bottom: 17px; overflow: hidden; border-radius: 999px; background: #e5e7dd; }
.task-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width .25s ease; }

.clue-strip { display: grid; grid-template-columns: 184px 1fr 150px; gap: 17px; align-items: center; min-height: 160px; margin-bottom: 16px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 23px; background: linear-gradient(125deg, #eef5e9, #fffaf0); box-shadow: 0 9px 22px rgba(48,66,55,.06); }
.clue-picture { display: grid; height: 126px; place-items: center; border-radius: 19px; background: rgba(255,255,255,.78); box-shadow: inset 0 0 0 1px rgba(50,100,83,.09); }
.clue-picture img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.clue-copy h3 { margin-bottom: 7px; font-size: 25px; }
.clue-copy > p:last-child { margin-bottom: 0; color: #48635d; font-size: 15px; line-height: 1.48; }
.reading-badge { display: grid; gap: 5px; padding: 15px; border-radius: 17px; color: #fff; background: #68775b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.reading-badge span { color: #f2df9e; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.reading-badge b { font-size: 17px; }
.reading-badge small { color: rgba(255,255,255,.78); line-height: 1.3; }

.story-workspace { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(390px,.92fr); gap: 16px; }
.ring-card, .grid-card { min-width: 0; border: 1px solid var(--line); border-radius: 24px; background: #fffdf8; box-shadow: 0 10px 24px rgba(48,66,55,.07); }
.ring-card { display: flex; min-height: 596px; flex-direction: column; padding: 20px; }
.ring-heading, .grid-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ring-heading h3 { margin-bottom: 0; font-size: 23px; }
.ring-heading > span { max-width: 220px; color: var(--muted); font-size: 12px; text-align: right; }

.ring-stage { position: relative; height: 295px; flex: 0 0 auto; margin: 12px 0 10px; overflow: hidden; border-radius: 22px; background: radial-gradient(circle at 50% 46%,#fff9e8 0 26%,transparent 27%), linear-gradient(145deg,#e8f0e6,#f7e8d5); box-shadow: inset 0 0 0 1px rgba(50,100,83,.1); }
.ring-ribbon { position: absolute; left: 9%; top: 11%; width: 82%; height: 78%; border: 11px solid #85664d; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255,244,209,.22),0 7px 0 rgba(100,72,51,.18); }
.ring-direction { position: absolute; z-index: 2; top: 4%; right: 18%; display: grid; width: 36px; height: 27px; place-items: center; border-radius: 999px; color: #fff; background: #c76f55; box-shadow: 0 4px 0 #8f4e3b; font-size: 20px; font-weight: 950; transform: rotate(28deg); }
.ring-letters { position: absolute; inset: 0; }
.ring-letter { position: absolute; z-index: 3; left: var(--x); top: var(--y); display: grid; width: 46px; height: 46px; padding: 0; place-items: center; border: 2px solid #e8c985; border-radius: 12px; color: var(--ink); background: linear-gradient(145deg,#fffdf4,#f5dfac); box-shadow: 0 6px 0 #a88358,0 9px 12px rgba(57,61,47,.1); cursor: pointer; font-size: 22px; font-weight: 950; transform: translate(-50%,-50%); }
.ring-letter:hover { border-color: #ca7d5f; background: #fff2cf; transform: translate(-50%,calc(-50% - 2px)); }
.ring-letter.is-start, .ring-letter.is-end { color: #fff; border-color: #85bca7; background: #4d8a72; box-shadow: 0 6px 0 #2f654f; }
.ring-letter.is-start::after, .ring-letter.is-end::after { position: absolute; top: -9px; right: -8px; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #fff; background: #c96f55; font-size: 11px; }
.ring-letter.is-start::after { content: "1"; }.ring-letter.is-end::after { content: "2"; }
.ring-letter.is-wrong { color: #8c4637; border-color: #d77861; background: #ffe0d5; animation: ring-wrong .42s ease; }
.ring-letter:disabled { cursor: default; }
.ring-center { position: absolute; z-index: 2; left: 50%; top: 50%; display: grid; width: 150px; gap: 5px; text-align: center; transform: translate(-50%,-50%); }
.ring-center small { color: #8a734c; font-size: 9px; font-weight: 950; letter-spacing: .15em; }
.ring-center b { font-size: 18px; line-height: 1.12; }
@keyframes soft-wrong { 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
@keyframes ring-wrong { 25% { transform: translate(calc(-50% - 3px),-50%); } 50% { transform: translate(calc(-50% + 3px),-50%); } 75% { transform: translate(calc(-50% - 2px),-50%); } }
.boundary-tray { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 10px; }
.boundary-tray article { display: flex; min-height: 47px; align-items: center; justify-content: space-between; padding: 7px 10px 7px 13px; border: 1px dashed rgba(73,112,97,.28); border-radius: 14px; color: var(--muted); background: #f5f5eb; }
.boundary-tray article span { font-size: 12px; font-weight: 850; }.boundary-tray article b { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: #e5e5d6; }
.boundary-tray article.is-found { color: var(--green-dark); border-style: solid; border-color: rgba(64,126,100,.25); background: #e5f1e7; }.boundary-tray article.is-found b { color: #fff; background: #4d8a72; }
.boundary-tray > i { color: #9a7a4f; font-style: normal; font-weight: 950; }
.unrolled-word { display: flex; min-height: 49px; align-items: center; justify-content: center; gap: 3px; margin-bottom: 10px; padding: 6px; border-radius: 14px; background: #715944; }
.unrolled-word[hidden] { display: none; }
.unrolled-word span { display: grid; width: min(36px,8%); height: 34px; place-items: center; border-radius: 8px; color: var(--ink); background: #fff0c4; box-shadow: 0 3px 0 #b28b58; font-size: 16px; font-weight: 950; }

.feedback { display: grid; gap: 3px; min-height: 66px; margin-top: auto; padding: 12px 15px; border-left: 5px solid #d7ad55; border-radius: 13px; background: #fff3d6; }
.feedback b { font-size: 14px; }
.feedback span { color: #536a65; font-size: 13px; line-height: 1.36; }
.feedback[data-tone="success"] { border-left-color: #3b8166; background: #e4f2e7; }
.feedback[data-tone="error"] { border-left-color: #c86f57; background: #fde8e1; }
.feedback[data-tone="hint"] { border-left-color: #607fa8; background: #e8eef8; }
.ring-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 13px; }
.hint-button { color: #34546e; background: #e4edf6; box-shadow: inset 0 0 0 1px rgba(62,98,126,.15); }
.ring-actions button[hidden] { display: none; }

.grid-card { padding: 18px; }
.grid-heading { margin-bottom: 13px; }
.grid-heading span { color: #79673e; font-size: 12px; font-weight: 900; letter-spacing: .13em; }
.grid-heading small { color: var(--muted); text-align: right; }
.crossword-grid-wrap { display: grid; min-height: 330px; align-items: center; justify-content: center; padding: 11px; overflow: hidden; border-radius: 18px; background: linear-gradient(rgba(255,255,255,.47),rgba(255,255,255,.47)), repeating-linear-gradient(0deg,transparent 0 23px,rgba(70,110,89,.06) 24px), #edf1e5; }
.crossword-grid { --cell-size: min(32px, calc((100vw - 120px) / var(--cols))); display: grid; grid-template-columns: repeat(var(--cols),var(--cell-size)); grid-template-rows: repeat(var(--rows),var(--cell-size)); gap: 3px; }
.crossword-cell, .crossword-gap { position: relative; width: var(--cell-size); height: var(--cell-size); }
.crossword-cell { display: grid; place-items: center; border: 2px solid #b7b196; border-radius: 7px; color: var(--ink); background: #fffaf0; font-size: clamp(13px,1.8vw,19px); font-weight: 900; transition: background .18s ease, border-color .18s ease; }
.crossword-cell.is-active { border-color: #d39a40; background: #fff1c7; }
.crossword-cell.is-filled { border-color: #4c8a71; background: #dff0e4; }
.crossword-cell.is-locked-active { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px rgba(61,125,100,.25); }
.cell-number { position: absolute; top: 2px; left: 3px; color: #77664b; font-size: 7px; line-height: 1; }
.clue-tabs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin-top: 12px; }
.clue-tab { display: flex; min-width: 0; min-height: 37px; align-items: center; justify-content: center; padding: 6px 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #f7f4e9; cursor: pointer; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.clue-tab.is-active { color: #fff; border-color: var(--green); background: var(--green); }
.clue-tab.is-solved { color: var(--green-dark); border-color: rgba(49,116,95,.2); background: #e1efe5; }
.clue-tab:disabled { cursor: default; opacity: 1; }

.result-screen { display: none; grid-template-columns: .92fr 1.08fr; min-height: 510px; overflow: hidden; border: 1px solid var(--line); border-radius: 32px; background: #fffaf0; box-shadow: var(--shadow); }
.result-screen.is-active { display: grid; }
.result-story { position: relative; min-height: 420px; overflow: hidden; background: linear-gradient(160deg,#cbe4df,#c6d696 57%,#b98c5f 57%); }
.result-story::before { content: ""; position: absolute; left: -8%; right: -8%; bottom: -3%; height: 120px; border-radius: 50%; background: rgba(255,226,164,.38); }
.result-story img { position: absolute; z-index: 2; width: 47%; height: 31%; border: 6px solid #fff4d5; border-radius: 18px; object-fit: cover; box-shadow: 0 13px 18px rgba(44,60,48,.2); }
.result-story img:nth-child(1) { left: 6%; top: 12%; transform: rotate(-7deg); }
.result-story img:nth-child(2) { right: 5%; top: 28%; transform: rotate(6deg); }
.result-story img:nth-child(3) { left: 18%; bottom: 7%; transform: rotate(-2deg); }
.result-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px,6vw,70px); }
.result-copy > p:not(.eyebrow) { margin: 18px 0 22px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.result-facts { display: flex; gap: 11px; margin-bottom: 28px; }
.result-facts span { padding: 9px 13px; border-radius: 12px; color: var(--green-dark); background: #e6efe6; font-weight: 750; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.secondary-button { color: var(--green-dark); background: #e8eee5; }

@media (max-width: 1100px) {
  .home-screen { min-height: 680px; padding: 45px 34px 28px; }
  .hero-copy { width: 59%; }
  .hero-story { top: 65px; right: 0; width: 43%; }
  .hero-castle { width: 125px; }
  .hero-dragon { width: 115px; }
  .hero-loop span { width: 32px; height: 37px; }
  .how-strip { margin-top: 86px; }
  .story-workspace { grid-template-columns: 1fr; }
  .ring-card { min-height: 560px; }
  .crossword-grid-wrap { min-height: 360px; }
  .crossword-grid { --cell-size: min(43px, calc((100vw - 118px) / var(--cols))); }
}

@media (max-width: 760px) {
  .app { width: min(1120px, calc(100% - 20px)); margin-top: 14px; }
  .game-head { padding: 10px 12px; border-radius: 18px; }
  .game-brand strong { font-size: 17px; }
  .game-brand small { display: none; }
  .game-icon { width: 42px; height: 42px; }
  .age-pill { padding: 7px 10px; font-size: 12px; }
  .home-screen { min-height: 0; padding: 34px 24px 24px; border-radius: 25px; background: linear-gradient(180deg,#fffaf0 0 55%,#e7f0e5 55%); }
  .hero-copy { width: 100%; }
  h1 { font-size: clamp(38px,10.8vw,54px); }
  .hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .hero-story { position: relative; top: auto; right: auto; width: 100%; height: 290px; margin-top: 14px; border-radius: 32px 32px 22px 22px; }
  .hero-glow { top: 27px; right: 34px; width: 56px; height: 56px; }
  .hero-book { left: 18%; right: 18%; height: 87px; }.hero-book i { height: 77px; }.hero-book b { height: 74px; }
  .hero-loop { left: 27%; top: 25px; width: 46%; height: 172px; border-width: 7px; }
  .hero-loop span { width: 29px; height: 34px; }
  .hero-castle { bottom: 70px; width: 105px; }.hero-dragon { bottom: 62px; width: 94px; }
  .how-strip { grid-template-columns: 1fr; margin-top: 3px; }
  .routes-screen, .play-screen { padding: 20px 15px; border-radius: 25px; }
  .section-title { align-items: flex-start; }
  .section-title > p { max-width: 100px; text-align: right; }
  .route-grid { grid-template-columns: 1fr; }
  .route-card { min-height: 355px; }
  .route-copy { min-height: 100px; }
  .task-head h2 { font-size: 27px; }
  .clue-strip { grid-template-columns: 140px 1fr; min-height: 150px; padding: 13px; }
  .clue-picture { height: 110px; }
  .clue-copy h3 { font-size: 20px; }
  .clue-copy > p:last-child { font-size: 13px; }
  .reading-badge { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; align-items: center; padding: 10px 13px; }
  .reading-badge small { text-align: right; }
  .ring-card { min-height: 540px; padding: 16px 12px; }
  .ring-heading { align-items: start; }
  .ring-stage { height: 270px; }
  .grid-card { padding: 14px 10px; }
  .crossword-grid-wrap { min-height: 310px; padding: 8px; }
  .crossword-grid { --cell-size: min(39px, calc((100vw - 70px) / var(--cols))); gap: 2px; }
  .crossword-cell { border-width: 1.5px; border-radius: 6px; }
  .result-screen.is-active { grid-template-columns: 1fr; }
  .result-story { min-height: 310px; }
  .result-copy { padding: 30px 24px; }
}

@media (max-width: 430px) {
  .game-brand strong { font-size: 15px; }
  .age-pill { font-size: 11px; }
  .home-screen { padding-inline: 19px; }
  .hero-facts span { font-size: 11px; }
  .section-title { display: block; }
  .section-title > p { max-width: none; margin-top: 8px; text-align: left; }
  .task-head { gap: 9px; }
  .task-head h2 { font-size: 23px; }
  .round-button { width: 42px; height: 42px; }
  .counter { padding-inline: 9px; font-size: 12px; }
  .clue-strip { grid-template-columns: 105px 1fr; gap: 10px; }
  .clue-picture { height: 92px; border-radius: 15px; }
  .reading-badge { font-size: 12px; }
  .ring-heading > span { display: none; }
  .ring-stage { height: 238px; margin-top: 8px; }
  .ring-ribbon { left: 8%; width: 84%; border-width: 8px; }
  .ring-letter { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 5px 0 #a88358; font-size: 17px; }
  .ring-center { width: 112px; }.ring-center b { font-size: 15px; }
  .ring-direction { right: 15%; width: 31px; height: 24px; font-size: 17px; }
  .crossword-grid { --cell-size: min(36px, calc((100vw - 128px) / var(--cols))); }
  .grid-heading { display: block; }
  .grid-heading small { display: block; margin-top: 4px; text-align: left; }
  .clue-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

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