:root {
  --ink:#294e47; --muted:#70817b; --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:40px; height:40px; }
.game-icon ellipse { fill:#bf8156; stroke:#8f5c3c; stroke-width:1.5; }
.game-icon path { fill:none; stroke:#6e926a; stroke-width:3; 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:.93fr 1.07fr; }
.home-screen.is-active { display:grid; }
.hero-copy { display:flex; min-height:480px; flex-direction:column; justify-content:center; padding:54px 46px; 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,.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 { 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-scene::before { content:""; position:absolute; width:480px; height:240px; left:45px; top:126px; border:22px solid #d8bd80; border-left-color:transparent; border-right-color:transparent; border-radius:50%; transform:rotate(-10deg); opacity:.84; }
.hero-trail { position:absolute; inset:0; }
.hero-trail i { position:absolute; display:grid; width:38px; height:38px; place-items:center; color:#a46f48; transform:rotate(78deg); opacity:.9; }
.hero-trail svg { width:100%; height:100%; overflow:visible; }
.hero-trail path { fill:none; stroke:currentColor; stroke-width:6; stroke-linecap:round; }
.hero-trail ellipse { fill:currentColor; }
.hero-trail i:nth-child(1){left:118px;top:225px}.hero-trail i:nth-child(2){left:190px;top:194px}.hero-trail i:nth-child(3){left:265px;top:182px}.hero-trail i:nth-child(4){left:345px;top:192px}.hero-trail i:nth-child(5){left:420px;top:230px}
.hero-child { position:absolute; z-index:3; width:105px; left:22px; top:185px; }
.hero-parent { position:absolute; z-index:3; width:112px; right:16px; top:216px; transform:scaleX(-1); }
.hero-hedgehog { position:absolute; z-index:4; width:105px; left:105px; bottom:20px; transform:rotate(-3deg); }
.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,.72),rgba(255,248,222,.32)); }
.route-art img { position:absolute; z-index:3; width:74px; left:3px; bottom:0; }
.route-art img.route-parent { width:80px; left:auto; right:3px; transform:scaleX(-1); }
.mini-trail { position:absolute; z-index:4; left:24%; right:24%; top:44%; display:flex; justify-content:space-between; transform:rotate(-7deg); }
.mini-trail i { display:grid; width:35px; height:35px; place-items:center; border-radius:50%; color:var(--route-color); background:rgba(255,253,240,.86); }
.mini-trail svg { width:25px; height:25px; }
.mini-trail path,.mini-trail ellipse { fill:currentColor; stroke:currentColor; stroke-width:4; stroke-linecap:round; }
.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:68px; 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 82px; 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); }
.sample-print { display:grid; width:70px; height:70px; place-items:center; border-radius:22px; color:var(--route-color); background:color-mix(in srgb,var(--route-color) 13%,#fff); }
.sample-print svg { width:52px; height:52px; }
.sample-print path,.sample-print ellipse { fill:currentColor; stroke:currentColor; stroke-width:4; stroke-linecap:round; }
.play-layout { display:grid; grid-template-columns:minmax(0,1.42fr) minmax(292px,.58fr); gap:18px; align-items:stretch; }
.map-card,.control-panel { border:1px solid #ddd3b7; border-radius:24px; background:#fffdf7; }
.map-card { min-width:0; padding:12px; }
.trail-board { position:relative; aspect-ratio:1.55; min-height:360px; overflow:hidden; border:3px solid #d6c7a5; border-radius:19px; background-image:linear-gradient(rgba(242,244,217,.62),rgba(242,244,217,.62)),var(--board-bg); background-size:cover; background-position:center; }
.trail-board::after { content:""; position:absolute; inset:7% 8%; border:1px dashed rgba(84,94,62,.15); border-radius:40%; pointer-events:none; }
.trail-network { position:absolute; z-index:1; inset:0; width:100%; height:100%; }
.trail-link { fill:none; stroke:#d3b77a; stroke-width:4.4; stroke-linecap:round; vector-effect:non-scaling-stroke; filter:drop-shadow(0 2px 1px rgba(91,68,38,.18)); }
.trail-link.is-current { stroke:#c7a25d; stroke-width:5.5; }
.trail-link.is-done { stroke:var(--route-color); stroke-width:6; }
.board-child,.board-parent { position:absolute; z-index:5; top:50%; width:13%; max-height:26%; object-fit:contain; transform:translate(-50%,-50%); filter:drop-shadow(0 5px 4px rgba(51,64,49,.2)); }
.board-child { left:6%; }
.board-parent { left:93%; width:15%; }
.board-child.is-flipped,.board-parent.is-flipped { transform:translate(-50%,-50%) scaleX(-1); }
.print-node { position:absolute; z-index:4; left:var(--x); top:var(--y); display:grid; width:58px; height:58px; place-items:center; border:2px solid rgba(137,111,67,.38); border-radius:19px; color:#92704b; background:rgba(255,250,227,.93); transform:translate(-50%,-50%) rotate(-4deg); box-shadow:0 7px 15px rgba(66,69,43,.13); transition:transform .16s,box-shadow .16s,background .16s; }
.print-node svg { width:42px; height:42px; pointer-events:none; }
.print-node path,.print-node ellipse { fill:currentColor; stroke:currentColor; stroke-width:4; stroke-linecap:round; }
.print-node:disabled { opacity:.78; }
.print-node.is-active { cursor:pointer; opacity:1; border-color:#b98d47; box-shadow:0 0 0 5px rgba(255,244,188,.72),0 9px 18px rgba(66,69,43,.18); }
.print-node.is-active:hover { transform:translate(-50%,-50%) scale(1.08) rotate(2deg); }
.print-node.is-done { color:#fff; border-color:var(--route-color); background:var(--route-color); opacity:1; }
.print-node.is-hinted { animation:node-hint .8s ease-in-out 2; }
.print-node.is-wrong { color:#b64e3f; border-color:#df755e; background:#fff0e7; animation:node-shake .38s 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-current { background:var(--route-color); }.legend-branch { background:#d3b77a; }.legend-goal { background:#f1bf53; }
.control-panel { display:flex; flex-direction:column; gap:14px; 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; }
.step-meter { display:grid; gap:8px; padding:12px; border:1px solid #ded6bd; border-radius:16px; background:#fffaf0; font-size:12px; font-weight:900; }
.step-meter > div { height:9px; overflow:hidden; border-radius:999px; background:#e5e6da; }
.step-meter i { display:block; width:0; height:100%; background:var(--route-color); transition:width .2s; }
.feedback { display:grid; gap:4px; min-height:98px; 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; gap:9px; }
.hint-button { border:1px solid #d1c5aa; background:#fff; }
.next-button { padding:0 14px; color:#fff; background:var(--route-color); }
.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-prints { position:absolute; inset:0; }
.result-prints::before { content:""; position:absolute; width:70%; height:140px; left:15%; top:175px; border:25px solid #ddbd7e; border-left-color:transparent; border-right-color:transparent; border-radius:50%; transform:rotate(-6deg); opacity:.8; }
.result-prints i { position:absolute; z-index:2; display:grid; width:38px; height:38px; place-items:center; color:#719043; transform:rotate(78deg); }
.result-prints svg { width:100%; height:100%; overflow:visible; }
.result-prints path,.result-prints ellipse { fill:currentColor; stroke:currentColor; stroke-width:4; stroke-linecap:round; }
.result-prints i:nth-child(1){left:25%;top:260px}.result-prints i:nth-child(2){left:37%;top:225px}.result-prints i:nth-child(3){left:50%;top:215px}.result-prints i:nth-child(4){left:63%;top:230px}.result-prints i:nth-child(5){left:74%;top:270px}
.result-child,.result-parent { position:absolute; z-index:3; width:130px; top:218px; }.result-child { left:18px; }.result-parent { right:18px; }.result-child.is-flipped,.result-parent.is-flipped { transform:scaleX(-1); }
.result-leaf { position:absolute; z-index:4; width:86px; left:50%; bottom:24px; 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 node-shake { 25%{transform:translate(-56%,-50%) rotate(-6deg)}75%{transform:translate(-44%,-50%) rotate(6deg)} }
@keyframes node-hint { 50%{box-shadow:0 0 0 10px rgba(76,120,177,.32)} }
@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; }.step-meter,.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:34px; height:34px; }
  .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-scene::before { width:310px; height:170px; left:15px; top:85px; border-width:17px; }.hero-child { width:70px; left:2px; top:142px; }.hero-parent { width:76px; right:-3px; top:158px; }.hero-hedgehog { width:74px; left:74px; bottom:4px; }
  .hero-trail i { width:28px; height:28px; }.hero-trail i:nth-child(1){left:80px;top:158px}.hero-trail i:nth-child(2){left:127px;top:136px}.hero-trail i:nth-child(3){left:175px;top:130px}.hero-trail i:nth-child(4){left:225px;top:140px}.hero-trail i:nth-child(5){left:274px;top:163px}
  .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:64px 1fr 54px; gap:8px; padding:10px; }.mission-strip img { width:60px; height:60px; }.mission-strip h3 { font-size:18px; }.mission-strip p { font-size:11px; }.sample-print { width:52px; height:52px; border-radius:15px; }.sample-print svg { width:38px; height:38px; }
  .trail-board { min-height:330px; aspect-ratio:1.05; border-width:2px; }.board-child { width:15%; left:5%; }.board-parent { width:17%; left:94%; }.print-node { width:46px; height:46px; border-radius:15px; }.print-node svg { width:33px; height:33px; }.trail-link { stroke-width:3.5; }
  .map-legend { gap:8px 12px; font-size:9px; }.control-panel { grid-template-columns:1fr; padding:14px; }.step-meter,.control-actions { grid-column:auto; }.control-copy h3 { font-size:22px; }.feedback { min-height:78px; }
  .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-child,.result-parent { width:86px; top:155px; }.result-child { left:2px; }.result-parent { right:2px; }.result-leaf { width:66px; bottom:12px; }
}
