:root {
  --ink: #294e47;
  --muted: #71817b;
  --paper: #fffdf7;
  --cream: #fff4d7;
  --green: #519773;
  --green-dark: #34715a;
  --gold: #d8a647;
  --coral: #df755e;
  --line: #ded4b7;
  --route-color: #5c9b76;
  --shadow: 0 22px 54px rgba(46,72,58,.13);
}
* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 8% 16%,rgba(239,185,86,.16) 0 70px,transparent 71px),radial-gradient(circle at 92% 10%,rgba(91,159,120,.14) 0 94px,transparent 95px),#f4f1df; font-family: "Trebuchet MS","Arial Rounded MT Bold",Arial,sans-serif; }
button,a { font: inherit; }
button { color: inherit; }
button:focus-visible,a:focus-visible { outline: 4px solid rgba(70,128,171,.34); outline-offset: 3px; }
img { display: block; max-width: 100%; }
h1,h2,h3,p { margin-top: 0; }
.app { width: min(1120px,calc(100% - 32px)); margin: 0 auto; padding: 22px 0 48px; }
.game-bar { display:flex; min-height:72px; align-items:center; justify-content:space-between; gap:18px; margin-bottom:16px; padding:9px 13px; border:1px solid rgba(111,104,75,.18); border-radius:24px; background:rgba(255,253,247,.94); box-shadow:0 12px 30px rgba(52,76,61,.08); }
.game-brand { display:inline-flex; align-items:center; gap:12px; padding:3px; color:inherit; text-decoration:none; border-radius:17px; }
.game-brand:hover { color:var(--green-dark); background:#edf5e8; }
.game-brand:focus-visible { outline-offset:1px; }
.game-brand > span:last-child { display:grid; gap:2px; }
.game-brand strong { font-size:18px; }
.game-brand small { color:var(--muted); font-size:12px; }
.game-icon { display:grid; width:50px; height:50px; place-items:center; border:1px solid #c7ddd0; border-radius:16px; background:#e8f3e9; }
.game-icon svg { width:42px; height:42px; }
.game-icon rect { fill:#dfeccf; stroke:#6f8f69; stroke-width:1.4; }
.game-icon path { fill:none; stroke:#aa7d43; stroke-width:4; stroke-linecap:round; }
.age-pill { flex:none; padding:10px 15px; border-radius:999px; background:#fff0bd; font-size:13px; }
.screen { display:none; }
.screen.is-active { display:block; }
.home-screen,.routes-screen,.play-screen,.result-screen { overflow:hidden; border:1px solid var(--line); border-radius:34px; background:var(--paper); box-shadow:var(--shadow); }
.home-screen { grid-template-columns:.92fr 1.08fr; }
.home-screen.is-active { display:grid; }
.hero-copy { display:flex; min-height:480px; flex-direction:column; justify-content:center; padding:56px 48px; background:linear-gradient(145deg,rgba(255,253,247,.99),rgba(235,243,224,.96)); }
.eyebrow { margin-bottom:10px; color:#89663f; font-size:11px; font-weight:900; letter-spacing:.14em; }
.hero-copy h1 { max-width:470px; margin-bottom:20px; font-size:clamp(40px,4.7vw,62px); line-height:1; letter-spacing:-.045em; }
.hero-copy > p:not(.eyebrow) { max-width:470px; margin-bottom:22px; color:var(--muted); font-size:17px; line-height:1.55; }
.hero-facts,.result-facts { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:26px; }
.hero-facts span,.result-facts span { padding:8px 12px; border:1px solid #dfe4d6; border-radius:999px; background:rgba(255,255,255,.9); font-size:12px; }
.primary-button,.secondary-button,.hint-button,.check-button,.next-button,.route-button { min-height:50px; border:0; border-radius:15px; font-weight:900; cursor:pointer; transition:transform .18s,box-shadow .18s,filter .18s; }
.primary-button { align-self:flex-start; padding:0 22px; color:#fff; background:var(--green); box-shadow:0 10px 20px rgba(52,113,90,.2); }
.primary-button:hover,.route-button:hover,.check-button:hover { transform:translateY(-2px); filter:brightness(1.04); }
.secondary-button { padding:0 20px; border:1px solid #cfc5a8; background:#fffdf7; }
.hero-scene { position:relative; min-height:480px; overflow:hidden; background:linear-gradient(160deg,#dfeeda 0 42%,#f5edd6 42% 100%); }
.hero-strips { position:absolute; inset:65px 104px 72px 102px; display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.hero-strips span { position:relative; overflow:hidden; border:2px solid #92aa75; border-radius:20px; background:linear-gradient(90deg,#a9c888,#d8e7ae); box-shadow:inset 0 0 0 8px rgba(255,255,255,.18),0 8px 16px rgba(54,80,58,.12); }
.hero-strips span::before { content:""; position:absolute; left:-8%; right:-8%; top:var(--entry); height:24%; min-height:30px; border-radius:50%; background:#dbc084; transform:rotate(calc((var(--exit) - var(--entry)) * .25deg)); transform-origin:center left; box-shadow:inset 0 0 0 2px rgba(111,78,38,.12); }
.hero-strips span::after { content:""; position:absolute; width:22px; height:22px; left:50%; top:calc(var(--entry) + 8%); border-radius:50%; background:#fff1b8; box-shadow:0 0 0 4px rgba(255,255,255,.42); }
.hero-child { position:absolute; z-index:3; width:105px; left:15px; top:174px; }
.hero-parent { position:absolute; z-index:3; width:105px; right:12px; top:260px; }
.hero-hedgehog { position:absolute; z-index:4; width:108px; right:132px; bottom:18px; transform:rotate(-4deg); }
.how-strip { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3,1fr); gap:12px; padding:0 30px 28px; background:linear-gradient(90deg,#f6efd9,#e8f1df); }
.how-strip article { display:flex; min-height:82px; align-items:center; gap:12px; padding:14px 16px; border:1px solid #ded3b4; border-radius:18px; background:rgba(255,253,247,.96); }
.how-strip b { display:grid; width:40px; height:40px; flex:none; place-items:center; border-radius:12px; color:#fff; background:var(--coral); }
.how-strip span { display:grid; gap:3px; }
.how-strip strong { font-size:13px; }
.how-strip small { color:var(--muted); font-size:11px; }
.routes-screen,.play-screen { padding:32px; }
.section-title,.task-head { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.section-title { margin-bottom:24px; }
.section-title h2,.task-head h2 { margin-bottom:0; font-size:clamp(31px,4vw,44px); letter-spacing:-.035em; }
.section-title > p { color:var(--muted); font-weight:900; }
.route-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:stretch; }
.route-card { display:flex; min-width:0; flex-direction:column; padding:16px; border:1px solid color-mix(in srgb,var(--route-color) 35%,#d7d0b9); border-radius:24px; background:color-mix(in srgb,var(--route-color) 7%,#fffdf7); }
.route-art { position:relative; height:154px; margin-bottom:18px; overflow:hidden; border-radius:18px; background-size:cover; background-position:center; }
.route-art::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(231,240,213,.82),rgba(255,248,222,.42)); }
.mini-strips { position:absolute; z-index:2; inset:20px 38px; display:grid; grid-template-columns:repeat(3,1fr); gap:5px; }
.mini-strips i { position:relative; overflow:hidden; border:1px solid #6e9169; border-radius:9px; background:#b8d39a; }
.mini-strips i::after { content:""; position:absolute; width:150%; height:15px; left:-25%; top:var(--y); border-radius:50%; background:#d7ba7a; transform:rotate(var(--tilt)); }
.route-art img { position:absolute; z-index:3; width:76px; left:4px; bottom:0; }
.route-number { margin-bottom:10px; color:var(--route-color); font-size:11px; font-weight:900; letter-spacing:.14em; }
.route-card h3 { min-height:56px; margin-bottom:8px; font-size:23px; }
.route-card > p:not(.route-number) { min-height:48px; margin-bottom:18px; color:var(--muted); line-height:1.45; }
.route-meta { display:flex; justify-content:space-between; margin-top:auto; margin-bottom:9px; color:var(--route-color); font-size:12px; font-weight:900; }
.route-progress,.route-progress-line { height:8px; overflow:hidden; border-radius:999px; background:#e7e8df; }
.route-progress i { display:block; width:var(--progress); height:100%; background:var(--route-color); }
.route-button { display:flex; align-items:center; justify-content:space-between; margin-top:16px; padding:0 16px; color:#fff; background:var(--route-color); }
.back-link { margin-top:28px; border:0; color:var(--green-dark); background:transparent; font-weight:900; cursor:pointer; }
.task-head { justify-content:flex-start; }
.task-head > div { flex:1; }
.round-button { display:grid; width:52px; height:52px; flex:none; place-items:center; border:1px solid #d7ccb0; border-radius:16px; background:#fff; cursor:pointer; }
.counter { padding:10px 14px; border-radius:999px; background:color-mix(in srgb,var(--route-color) 12%,#fff); font-weight:900; }
.route-progress-line { margin:16px 0; }
.route-progress-line i { display:block; width:0; height:100%; background:var(--route-color); transition:width .25s; }
.mission-strip { display:grid; grid-template-columns:88px 1fr auto; align-items:center; gap:16px; margin-bottom:18px; padding:14px 18px; border:1px solid #ddd2b6; border-radius:22px; background:#fffaf0; }
.mission-strip img { width:80px; height:80px; object-fit:contain; }
.mission-strip .eyebrow { margin-bottom:4px; }
.mission-strip h3 { margin-bottom:4px; font-size:24px; }
.mission-strip p:last-child { margin-bottom:0; color:var(--muted); }
.mission-strip > b { padding:10px 13px; border-radius:999px; color:var(--route-color); background:color-mix(in srgb,var(--route-color) 12%,#fff); font-size:12px; }
.play-layout { display:grid; grid-template-columns:minmax(0,1.36fr) minmax(300px,.64fr); gap:18px; align-items:stretch; }
.map-card,.control-panel { border:1px solid #ddd3b7; border-radius:24px; background:#fffdf7; }
.map-card { padding:12px; }
.trail-map { position:relative; aspect-ratio:1.55; min-height:360px; overflow:hidden; border:3px solid #d6c7a5; border-radius:19px; background-image:linear-gradient(rgba(241,246,225,.56),rgba(241,246,225,.56)),var(--map-bg); background-size:cover; background-position:center; }
.strip-stage { position:absolute; inset:5% 12%; display:grid; grid-template-columns:repeat(3,1fr); gap:4px; }
.trail-strip { position:relative; overflow:hidden; border:2px solid rgba(77,115,71,.62); border-radius:15px; background:linear-gradient(180deg,rgba(167,201,137,.93),rgba(218,232,171,.94)); box-shadow:inset 0 0 0 7px rgba(255,255,255,.15); }
.trail-strip::before { content:""; position:absolute; inset:0; opacity:.5; background:radial-gradient(circle at 25% 16%,#f4e5a1 0 5px,transparent 6px),radial-gradient(circle at 70% 78%,#8eb978 0 7px,transparent 8px); }
.strip-svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.trail-shadow { fill:none; stroke:rgba(93,72,38,.2); stroke-width:15; stroke-linecap:round; }
.trail-line { fill:none; stroke:#dfc183; stroke-width:11; stroke-linecap:round; }
.trail-edge { fill:#fff3c6; stroke:#9b7e4b; stroke-width:1.5; }
.seam-dot { position:absolute; z-index:5; width:14px; height:14px; border:3px solid #fff8db; border-radius:50%; background:#cb9b4e; transform:translate(-50%,-50%); box-shadow:0 0 0 2px rgba(76,87,55,.28); }
.map-character { position:absolute; z-index:7; width:13%; height:23%; object-fit:contain; transform:translate(-50%,-50%); transition:left .24s,top .24s; filter:drop-shadow(0 5px 4px rgba(51,64,49,.18)); }
.map-character.is-parent { width:15%; height:27%; }
.map-character.is-flipped { transform:translate(-50%,-50%) scaleX(-1); }
.traveler { position:absolute; z-index:10; width:10%; aspect-ratio:1; transform:translate(-50%,-50%); transition:left .22s linear,top .22s linear; }
.traveler img { width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 4px 3px rgba(38,58,44,.2)); }
.break-mark { position:absolute; z-index:9; width:28px; height:28px; border:4px solid #df755e; border-radius:50%; transform:translate(-50%,-50%); animation:break-pulse .7s ease-in-out infinite alternate; }
.trail-strip.is-hinted { animation:strip-hint .7s ease-in-out 2; }
.trail-strip.is-wrong { animation:strip-shake .36s ease-in-out; }
.map-legend { display:flex; flex-wrap:wrap; gap:10px 18px; padding:10px 4px 0; color:var(--muted); font-size:10px; }
.map-legend span { display:inline-flex; align-items:center; gap:6px; }
.map-legend i { width:14px; height:14px; border-radius:50%; }
.legend-start { background:#f1bf53; }.legend-path { background:#dfc183; }.legend-goal { background:#6ca477; }
.control-panel { display:flex; flex-direction:column; gap:12px; padding:18px; }
.control-copy { padding:4px 2px; }
.control-copy h3 { margin-bottom:8px; font-size:25px; }
.control-copy p:last-child { margin-bottom:0; color:var(--muted); line-height:1.45; }
.strip-controls { display:grid; gap:9px; }
.strip-control { display:grid; grid-template-columns:46px 1fr 46px; align-items:center; gap:8px; padding:8px; border:1px solid #ded6bd; border-radius:16px; background:#fffaf0; }
.strip-control button { display:grid; width:46px; height:46px; place-items:center; border:0; border-radius:13px; color:#fff; background:var(--route-color); font-size:21px; font-weight:900; cursor:pointer; }
.strip-control span { display:grid; gap:2px; text-align:center; }
.strip-control strong { font-size:13px; }.strip-control small { color:var(--muted); font-size:10px; }
.feedback { display:grid; gap:4px; min-height:82px; margin-top:auto; padding:14px; border-radius:17px; background:#eef4e5; }
.feedback[data-tone="error"] { background:#fff0e7; }.feedback[data-tone="hint"] { background:#eef0ff; }.feedback[data-tone="success"] { background:#e3f4e5; }
.feedback b { font-size:14px; }.feedback span { color:var(--muted); font-size:12px; line-height:1.42; }
.control-actions { display:grid; grid-template-columns:1fr 1.2fr; gap:9px; }
.hint-button { border:1px solid #d1c5aa; background:#fff; }
.check-button,.next-button { padding:0 14px; color:#fff; background:var(--route-color); }
.next-button { grid-column:1 / -1; }
.task-tabs { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-top:18px; }
.task-tabs button { min-height:42px; border:1px solid #ddd3b8; border-radius:13px; background:#fff; cursor:pointer; font-size:12px; }
.task-tabs button.is-current { border-color:var(--route-color); box-shadow:inset 0 0 0 2px var(--route-color); }.task-tabs button.is-done { color:var(--green-dark); background:#edf6e7; }
.result-screen.is-active { display:grid; grid-template-columns:1fr 1fr; min-height:520px; }
.result-scene { position:relative; overflow:hidden; background:linear-gradient(150deg,#e0eed7,#f9edce); }
.result-path { position:absolute; inset:70px 58px; display:grid; grid-template-columns:repeat(3,1fr); gap:5px; }
.result-path i { position:relative; border:2px solid #8cab70; border-radius:20px; background:#c2da9d; }
.result-path i::after { content:""; position:absolute; left:-10%; right:-10%; top:45%; height:30px; border-radius:50%; background:#ddbd7e; transform:rotate(-10deg); }
.result-child,.result-parent { position:absolute; z-index:3; width:130px; top:210px; }.result-child { left:22px; }.result-parent { right:22px; }.result-child.is-flipped,.result-parent.is-flipped { transform:scaleX(-1); }
.result-shovel { position:absolute; z-index:4; width:92px; left:50%; bottom:28px; transform:translateX(-50%) rotate(-12deg); }
.result-copy { display:flex; flex-direction:column; justify-content:center; padding:48px; }
.result-copy h2 { margin-bottom:18px; font-size:clamp(38px,5vw,58px); line-height:1.02; }
.result-copy > p:not(.eyebrow) { color:var(--muted); font-size:17px; line-height:1.55; }
.result-actions { display:flex; flex-wrap:wrap; gap:10px; }
.qa-report { grid-column:1 / -1; padding:24px; background:#fffdf7; }
.qa-report p { margin:4px 0; font-size:12px; }.qa-report .qa-fail { color:#b13f2d; font-weight:900; }
@keyframes strip-shake { 25%{transform:translateY(-5px)}75%{transform:translateY(5px)} }
@keyframes strip-hint { 50%{box-shadow:0 0 0 7px rgba(76,120,177,.32)} }
@keyframes break-pulse { to{transform:translate(-50%,-50%) scale(1.25);opacity:.55} }
@media (max-width:920px) {
  .home-screen.is-active { grid-template-columns:1fr; }.hero-copy { min-height:0; padding:40px 34px; }.hero-scene { min-height:420px; }
  .how-strip { grid-template-columns:1fr; padding:0 24px 24px; }.how-strip article { min-height:58px; padding:9px 12px; }.how-strip b { width:34px; height:34px; }
  .route-grid { grid-template-columns:1fr; }.route-card h3,.route-card > p:not(.route-number) { min-height:0; }.route-art { height:210px; }
  .play-layout { grid-template-columns:1fr; }.control-panel { display:grid; grid-template-columns:1fr 1fr; }.strip-controls,.control-actions { grid-column:1 / -1; }.feedback { margin-top:0; }
  .result-screen.is-active { grid-template-columns:1fr; }.result-scene { min-height:390px; }
}
@media (max-width:600px) {
  .app { width:min(100% - 20px,1120px); padding-top:10px; }
  .game-bar { min-height:62px; border-radius:18px; }.game-icon { width:42px; height:42px; border-radius:13px; }.game-icon svg { width:35px; height:35px; }
  .game-brand { gap:8px; }.game-brand strong { font-size:15px; }.game-brand small { display:none; }.age-pill { padding:8px 10px; font-size:11px; }
  .home-screen,.routes-screen,.play-screen,.result-screen { border-radius:26px; }.hero-copy { padding:30px 20px; }.hero-copy h1 { font-size:40px; }.hero-copy > p:not(.eyebrow) { font-size:15px; }
  .hero-scene { min-height:330px; }.hero-strips { inset:38px 68px 58px 66px; gap:4px; }.hero-child { width:66px; left:3px; top:122px; }.hero-parent { width:70px; right:0; top:195px; }.hero-hedgehog { width:72px; right:80px; bottom:4px; }
  .how-strip { padding:0 14px 16px; }.routes-screen,.play-screen { padding:16px; }.section-title { align-items:flex-start; }.section-title h2,.task-head h2 { font-size:29px; }.section-title > p { max-width:88px; text-align:right; font-size:12px; }
  .route-art { height:160px; }.task-head { gap:10px; }.round-button { width:44px; height:44px; }.counter { padding:8px 10px; font-size:12px; }
  .mission-strip { grid-template-columns:68px 1fr; gap:10px; padding:12px; }.mission-strip img { width:64px; height:64px; }.mission-strip h3 { font-size:19px; }.mission-strip p { font-size:12px; }.mission-strip > b { grid-column:1 / -1; justify-self:start; padding:8px 11px; }
  .trail-map { min-height:300px; aspect-ratio:1.12; border-width:2px; }.strip-stage { inset:7% 14%; }.map-character { width:15%; height:18%; }.map-character.is-parent { width:18%; height:21%; }.seam-dot { width:11px; height:11px; border-width:2px; }
  .map-legend { gap:8px 12px; font-size:9px; }.control-panel { grid-template-columns:1fr; padding:14px; }.strip-controls,.control-actions { grid-column:auto; }.control-copy h3 { font-size:22px; }.feedback { min-height:72px; }
  .strip-control { grid-template-columns:44px 1fr 44px; }.strip-control button { width:44px; height:44px; }.control-actions { grid-template-columns:1fr; }.next-button { grid-column:auto; }
  .task-tabs { grid-template-columns:repeat(2,1fr); }.task-tabs button:first-child { grid-column:1 / -1; }
  .result-copy { padding:30px 22px; }.result-scene { min-height:320px; }.result-path { inset:48px 42px; }.result-child,.result-parent { width:86px; top:142px; }.result-child { left:4px; }.result-parent { right:4px; }.result-shovel { width:70px; bottom:16px; }
}
