@font-face{font-family:Fredoka;src:url("assets/Fredoka.ttf") format("truetype");font-weight:300 700;font-display:swap}
:root{--ink:#203c3b;--soft:#53665f;--cream:#fffaf2;--mint:#9fe0c3;--yellow:#ffd45c;--coral:#ff6b5f;--line:#dfdfce;--teal:#216c60;--shadow:0 5px 0 #203c3b08,0 12px 32px #203c3b08}
*{box-sizing:border-box}
body{margin:0;color:var(--ink);background:var(--cream);font-family:ui-rounded,"SF Pro Rounded",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;line-height:1.5}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}
button:disabled{cursor:default}
button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #7355a7;outline-offset:3px}
button svg{width:22px;height:22px;flex:none}
h1,h2,h3,p{margin:0}
h1,h2,h3,.primary-button,.map-button,.fraction,.trip-number,.feedback-title{font-family:Fredoka,ui-rounded,sans-serif;font-weight:500}
h2:focus{outline:none}
.site-header{max-width:1200px;margin:auto;min-height:60px;padding:7px 30px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:16px}
.brand{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:700;min-width:44px;min-height:44px;color:inherit;text-decoration:none;border-radius:8px}
.home-link{width:44px;min-width:44px;color:inherit;text-decoration:none;flex:none}
.home-link svg{flex:none}
.edition{font-size:9px;letter-spacing:1.2px;font-weight:700;border-left:1px solid #ccd3c9;padding-left:12px;margin-left:3px;color:#54645e}
nav{display:flex;gap:8px}
.quiet-button{border:0;background:transparent;padding:9px 12px;min-height:44px;display:inline-flex;justify-content:center;align-items:center;gap:8px;border-radius:12px;font-size:14px;font-weight:650}
.quiet-button:hover{background:#e8eee1}
.help-icon{border:1.5px solid currentColor;border-radius:50%;display:inline-grid;place-items:center;width:19px;height:19px;font-size:12px}
main{max-width:1160px;margin:auto;padding:10px 24px 6px;display:grid;grid-template-columns:1fr auto;column-gap:20px}
.welcome{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 10px;min-height:64px}
.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:750;line-height:1.5;color:#51695c}
.welcome .eyebrow{display:none}
h1{font-size:38px;line-height:1.12;letter-spacing:-1.1px;margin:0 0 4px;font-weight:550}
h1 span{position:relative;z-index:0}
h1 svg{position:absolute;bottom:-4px;left:-2px;width:100%;height:9px;color:var(--yellow);z-index:-1}
.tagline{font-size:12px;color:var(--soft)}
.map-button{border:1.5px solid #c4cdc0;border-radius:13px;padding:10px 16px;min-height:44px;display:flex;align-items:center;gap:9px;background:#fffdf8;font-size:15px;box-shadow:0 3px 0 #dadfce}
.map-button:hover{background:#edf2e6}
.game-card{grid-column:1/-1;background:white;border:1px solid #d9dfd2;border-radius:22px;overflow:hidden;box-shadow:var(--shadow)}
.trip-bar{display:flex;align-items:center;justify-content:space-between;padding:10px 22px;background:#fffef9;gap:16px;min-height:60px}
.trip-status{position:relative;flex:none}
.game-card[data-phase=correct] #trip-number{opacity:0}
.trip-heading{display:flex;align-items:center;gap:11px;min-width:0}
.trip-number{display:grid;place-items:center;font-size:18px;width:40px;height:40px;border-radius:12px;background:#edf2e4;color:#47715b;flex:none}
.trip-heading h2{font-size:20px;line-height:1.2;margin-top:2px}
.trip-heading .eyebrow{font-size:9px;letter-spacing:1.4px}
.pace{color:var(--soft);font-size:12px;white-space:nowrap}
.pace span{font-size:22px;vertical-align:-2px;margin-right:5px;color:#9a6916}
.scene{position:relative;width:100%;height:clamp(220px,calc(100svh - 540px),360px);background:#c6e5d0;overflow:hidden;isolation:isolate}
.landscape{position:absolute;inset:0;z-index:-1}
.landscape>svg{display:block;width:100%;height:100%;object-fit:cover}
.scene-caption{position:absolute;left:22px;top:14px;padding:6px 11px;border:1px solid #ffffff70;background:#fffdf2e8;border-radius:10px;font-size:12px;box-shadow:0 2px 0 #2843310a;display:flex;align-items:center;gap:5px}
.river-key{width:20px;height:7px;background:#56aeb2;border-radius:8px;margin-right:4px}
.route{position:absolute;left:9%;right:9%;top:71%;height:2px}
.route-line{height:3px;background:#25596180;border-radius:2px}
.ticks{position:absolute;inset:0}
.tick{position:absolute;top:-4px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;color:#173f45;font-weight:650}
.tick::before{content:"";height:12px;width:2px;background:#2f6869;margin-bottom:7px}
.tick-label{font-size:12px;background:#d5f1e7d9;border:1px solid #b2d7cc;border-radius:8px;padding:3px 6px;min-width:24px;text-align:center;line-height:1.1}
.tick-label .fraction{font-size:16px}
.tick.endpoint .tick-label{white-space:nowrap;font-size:12px;padding:7px}
.tick.endpoint::before{height:17px}
.boat{position:absolute;width:124px;height:98px;left:0%;bottom:-3px;transform:translateX(-50%);z-index:4;filter:drop-shadow(0 5px 1px #21585925)}
.boat>svg{width:100%;height:100%;transform-origin:50% 90%}
.boat.sailing{transition:left 1.2s cubic-bezier(.4,0,.2,1)}
.boat.sailing.returning{transition-duration:.9s}
.travel-preview{position:absolute;top:-10px;height:13px;background:var(--yellow);border:2px solid #937121;border-radius:8px;z-index:2;opacity:.85;pointer-events:none}
.travel-preview::after{content:"";position:absolute;right:-5px;top:-5px;height:19px;width:4px;border-radius:4px;background:#876522}
.destination{position:absolute;bottom:29%;width:65px;transform:translateX(-50%);height:110px;z-index:1;display:flex;align-items:center;flex-direction:column;justify-content:end;pointer-events:none}
.destination svg{width:52px;height:52px;filter:drop-shadow(0 3px 0 #395b3930)}
#friend-portrait{transform-origin:50% 100%}
.pier{width:66px;height:37px;border-top:8px solid #9f7152;background:repeating-linear-gradient(0deg,#c8986c 0 7px,#a77a55 7px 9px);transform:perspective(100px) rotateX(30deg);border-radius:3px 3px 0 0;box-shadow:2px 9px 0 -5px #6c5145,-2px 9px 0 -5px #6c5145}
.target-marker{position:absolute;bottom:112px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;z-index:5}
.target-marker>span:first-child{padding:5px 9px;background:#fffdf4;border:2px solid #517761;border-radius:11px;box-shadow:0 3px 0 #274d4020;font-size:12px;line-height:1.2;display:flex;align-items:center;gap:6px;white-space:nowrap}
.target-marker .fraction{font-size:18px}
.target-pin{height:10px;width:2px;background:#517761}
.river-name{position:absolute;bottom:8px;left:22px;color:#265e55;font-size:10px;font-style:italic;letter-spacing:1px;opacity:.8}
.river-name span{margin-left:8px}
.play-panel{display:grid;grid-template-columns:200px minmax(0,1fr);gap:24px;padding:15px 22px 17px;background:#fffef9;min-height:216px}
.delivery{border-right:1px solid #e3e7d8;padding-right:22px;display:flex;flex-direction:column;align-items:start;justify-content:center;gap:7px}
.cargo-art{height:44px;width:44px;display:grid;place-items:center;background:#fbf0d5;border-radius:13px;flex:none}
.cargo-art svg{width:38px;height:38px}
.delivery .eyebrow{font-size:9px;letter-spacing:1px;margin-bottom:4px}
.delivery #intro{font-size:13px;line-height:1.5;color:var(--soft)}
.decision{position:relative;min-width:0;display:flex;flex-direction:column;justify-content:center;min-height:184px}
h3{font-size:20px;line-height:1.25}
.question-copy{min-height:64px;padding-bottom:8px}
.instruction{font-size:12px;line-height:1.35;color:var(--soft);margin:4px 0 0}
.choices{display:flex;gap:9px}
.choice{background:#fff;border:2px solid #d5ddce;border-radius:12px;min-height:64px;flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:12px;padding:7px 10px;box-shadow:0 3px 0 #e5e9dc;position:relative}
.choice:hover:not(:disabled){border-color:#7d9e7b;background:#f5f8ef}
.choice[aria-pressed=true]{border-color:#347364;background:#edf7e8;box-shadow:0 3px 0 #347364}
.choice[aria-pressed=true]::after{content:"✓";position:absolute;right:5px;top:3px;font-size:12px;font-weight:750;color:#256454}
.choice:disabled{opacity:.6}
.choice[aria-pressed=true]:disabled{opacity:1}
.fraction{display:inline-flex;flex-direction:column;align-items:center;line-height:1.03;font-size:24px;vertical-align:middle;min-width:20px;flex:none}
.fraction>span:first-child{border-bottom:1.6px solid currentColor;padding:0 3px 2px;width:100%;text-align:center}
.fraction>span:last-child{padding-top:2px}
.fraction.whole{display:inline;font-size:inherit}
/* Keep fractions together and place their bar at the surrounding text's middle. */
.inline-fraction{display:inline-flex;vertical-align:middle;line-height:1;white-space:nowrap;padding:0 .06em}
.inline-fraction>.fraction{font-size:max(11px,.85em);line-height:1;min-width:1.15em;vertical-align:baseline}
.inline-fraction>.fraction>span:first-child{border-bottom-width:1.2px;padding:0 .14em .08em}
.inline-fraction>.fraction>span:last-child{padding-top:.08em}
.primary-button .inline-fraction{vertical-align:middle}
.mini-river{width:46px;display:flex;height:13px;border-radius:4px;overflow:hidden;border:1px solid #44866d;background:#f0f4e9}
.mini-river i{flex:1;border-right:1px solid #5e947c}
.mini-river i:last-child{border:0}
.mini-river i.filled{background:#9bd8bc}
.actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.primary-button{display:inline-flex;align-items:center;justify-content:center;gap:13px;min-height:44px;border:1.5px solid var(--ink);border-radius:11px;background:var(--yellow);padding:9px 18px;font-size:16px;box-shadow:0 3px 0 var(--ink);line-height:1.2}
.primary-button:hover:not(:disabled){background:#ffe185;transform:translateY(-1px)}
.primary-button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 var(--ink)}
.primary-button:disabled{background:#e8eadd;color:#657368;border-color:#b8c2b1;box-shadow:0 3px 0 #b8c2b1}
.hint-button{border:0;background:transparent;font-size:12px;text-decoration:underline;text-underline-offset:4px;min-height:44px;border-radius:10px;padding:8px 2px;color:#315e4d}
.hint-button span{font-size:22px;vertical-align:-2px;margin-right:3px}
.hint-box{position:absolute;z-index:8;left:0;right:0;top:0;border:2px solid #c4a346;background:#fff6d8;border-radius:11px;padding:8px 12px;font-size:13px;line-height:1.4;box-shadow:0 3px 0 #a1832920}
.decision:has(.hint-box:not([hidden])) .question-copy{visibility:hidden}
.feedback-panel{min-height:64px;padding:0 0 8px;display:flex;flex-direction:column;justify-content:center;gap:3px}
.decision:has(.feedback-panel:not([hidden])) .question-copy{display:none}
.feedback-title{font-size:21px;line-height:1.2;color:#226248}
.feedback-panel #feedback{font-size:13px;line-height:1.45;max-width:650px}
.feedback-panel.retry .feedback-title{color:#76551b}
.game-card[data-phase=correct] .choices,.game-card[data-phase=correct] .actions,.game-card[data-phase=correct] .hint-box{display:none!important}
.game-card[data-phase=correct] .play-panel{background:#eef6e8}
.game-card[data-phase=correct] .feedback-panel{min-height:184px;padding:4px 0;gap:8px}
.game-card[data-phase=correct] .feedback-title{font-size:25px}
.success-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}
.below-game{display:flex;justify-content:space-between;align-items:center;gap:12px;min-width:0;font-size:11px;color:var(--soft);min-height:44px}
.below-game p span{color:#517b60;font-size:17px;vertical-align:-1px;margin-right:4px}
.below-game button{background:none;border:none;text-decoration:underline;text-underline-offset:3px;min-height:44px;padding:6px;font-size:11px;white-space:nowrap}
footer{font-size:11px;color:var(--soft);display:flex;align-items:center;gap:16px}
footer>span{display:none}
footer a{color:var(--soft);min-height:44px;display:flex;align-items:center;padding:5px 0;white-space:nowrap}
/* The site build adopts this existing footer link; keep its compact placement. */
footer a.mjl-report-bug{position:static;inset:auto;z-index:auto;display:flex;width:auto;min-height:44px;margin:0;padding:5px 0;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--soft);font:inherit;text-decoration:underline;max-width:none}
.skip{position:absolute;top:-100px;z-index:100;padding:12px;background:white;color:var(--ink)}
.skip:focus{top:5px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Celebrate in the trip badge so river fractions always remain unobstructed. */
.celebration{position:absolute;inset:0;z-index:6;display:flex;align-items:center;pointer-events:none;animation:celebrate-in .5s cubic-bezier(.2,.9,.3,1.3) both}
.celebration-check{display:grid;place-items:center;flex:none;width:100%;height:100%;color:#fff;background:#347652;border-radius:50%;font-size:23px;line-height:1;font-weight:800}
.celebration-text{display:none}
.spark{position:absolute;left:50%;top:50%;height:10px;width:7px;border-radius:2px;background:var(--yellow);opacity:0;animation:sparkle .95s .15s ease-out both;--x:-70px;--y:-35px;--r:-45deg}
.spark:nth-of-type(2){--x:0px;--y:-55px;--r:40deg;background:#e78f7c}
.spark:nth-of-type(3){--x:70px;--y:-30px;--r:85deg;background:#86c9a0}
.spark:nth-of-type(4){--x:80px;--y:45px;--r:160deg;background:#d3aaef}
.spark:nth-of-type(5){--x:0px;--y:65px;--r:75deg;background:#e78f7c}
.spark:nth-of-type(6){--x:-80px;--y:40px;--r:-100deg;background:#86c9a0}
.is-correct .scene-caption{visibility:hidden}
.is-correct #friend-portrait{animation:friend-hop .65s ease-in-out 2}
.is-correct .boat>svg{animation:boat-cheer .65s ease-in-out 2}
@keyframes celebrate-in{from{opacity:0;transform:scale(.65) translateY(7px)}to{opacity:1;transform:scale(1) translateY(0)}}
@keyframes sparkle{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}20%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--r)) scale(.7)}}
@keyframes friend-hop{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-13px) rotate(-7deg)}70%{transform:translateY(-4px) rotate(6deg)}}
@keyframes boat-cheer{0%,100%{transform:rotate(0)}30%{transform:rotate(-4deg)}65%{transform:rotate(4deg)}}
dialog{background:var(--cream);color:var(--ink);width:min(580px,calc(100% - 32px));max-height:calc(100dvh - 40px);border:1.5px solid #bdcaba;border-radius:23px;padding:34px;box-shadow:0 15px 90px #142d3c40}
dialog::backdrop{background:#16373580;backdrop-filter:blur(4px)}
dialog h2{font-size:30px;line-height:1.15;margin:8px 0 18px;padding-right:15px}
dialog p{font-size:15px;line-height:1.65;margin-bottom:14px}
dialog .eyebrow{font-size:10px;margin-bottom:4px}
dialog .primary-button{margin-top:12px}
.dialog-close{position:absolute;right:10px;top:10px;width:44px;height:44px;border:0;border-radius:50%;background:transparent;font-size:28px}
.dialog-close:hover{background:#e6eddf}
.help-example{display:flex;align-items:center;gap:24px;border:1px solid #d8dfcd;border-radius:15px;padding:20px;background:white;margin:20px 0}
.help-example p{font-size:13px;margin:4px 0 0}
.fraction.big{font-size:44px}
.help-steps{padding-left:22px;font-size:14px}
.help-steps li{margin-bottom:12px;padding-left:5px}
.gentle-note{background:#edf1e4;padding:12px 15px;border-radius:10px}
dialog .gentle-note{font-size:13px}
.trip-group{margin-top:22px}
.trip-group h3{font-size:18px;margin-bottom:10px}
.trip-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.trip-option{border:1px solid #c9d5c0;background:white;display:flex;align-items:center;gap:10px;text-align:left;border-radius:12px;padding:10px;min-height:60px;font-size:13px;line-height:1.3}
.trip-option>span:first-child{background:#eef2e5;border-radius:9px;width:31px;height:34px;flex-shrink:0;display:grid;place-items:center;font-family:Fredoka}
.trip-option:hover,.trip-option[aria-current=true]{border-color:#427c60;background:#eef7e7}
.chapter-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;margin:8px 0 12px}
.chapter-nav button{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:1.5px solid #bdcaba;background:white;border-radius:10px;font-size:21px;line-height:1}
.chapter-nav button:hover:not(:disabled){background:#eef7e7;border-color:#427c60}
.chapter-nav button:disabled{color:#7b8779;background:#f0f2e9;border-color:#d8dfd0}
#chapter-select{width:100%;min-width:0;min-height:44px;padding:8px 30px 8px 10px;border:1.5px solid #bdcaba;border-radius:10px;background:white;color:var(--ink);font:inherit;font-size:14px;cursor:pointer}
#chapter-description{font-size:13px;line-height:1.5;margin-bottom:12px}
#trips-dialog .trip-group{margin-top:12px}
#trips-dialog .trip-option{min-width:0}
#trips-dialog label[for=chapter-select]{font-size:13px;font-weight:650}
.rest-art{width:160px;margin:0 auto 15px}
.rest-art svg{width:100%}
#rest-dialog{text-align:center}
#rest-dialog h2{padding:0}
[hidden]{display:none!important}
@media(max-width:900px){
  .play-panel{grid-template-columns:165px minmax(0,1fr);gap:18px;padding:14px 18px 16px}
  .delivery{padding-right:16px}
  .choice{gap:7px;padding:7px}
  .mini-river{width:32px}
  h3{font-size:19px}
  .question-copy{min-height:78px}
  .feedback-panel{min-height:78px}
}
@media(max-width:650px){
  .site-header{padding:4px 14px;min-height:52px;gap:6px}
  .brand{font-size:12px;gap:6px}
  .brand img{width:26px;height:26px}
  .edition{display:none}
  nav{gap:0}
  nav .quiet-button{font-size:12px;padding:8px}
  .site-header #sound-btn span:first-child{display:none}
  main{padding:8px 12px 6px;column-gap:10px}
  .welcome{min-height:44px;margin-bottom:8px;gap:8px}
  h1{font-size:32px;letter-spacing:-1px;margin:0}
  .tagline{display:none}
  .map-button{font-size:12px;padding:8px 10px;gap:6px;line-height:1.2;border-radius:11px}
  .map-button svg{width:18px;height:18px}
  .game-card{border-radius:17px}
  .trip-bar{padding:8px 13px;min-height:52px;gap:8px}
  .trip-heading{gap:9px}
  .trip-heading h2{font-size:17px}
  .trip-number{width:32px;height:35px;font-size:16px;border-radius:10px}
  .trip-heading .eyebrow{font-size:8px;letter-spacing:.8px}
  .pace{display:none}
  .scene{height:clamp(206px,calc(100svh - 600px),300px)}
  .landscape>svg{width:165%;max-width:none;margin-left:-35%}
  .scene-caption{left:11px;top:9px;font-size:10px;padding:5px 8px;gap:3px}
  .river-key{width:13px;margin-right:2px}
  .route{left:12%;right:12%;top:72%}
  .boat{width:92px;height:73px;bottom:-2px}
  .destination{height:90px;bottom:28%;width:46px}
  .destination svg{width:41px;height:41px}
  .pier{width:49px;height:28px;border-top-width:6px}
  .target-marker{bottom:79px}
  .target-marker>span:first-child{font-size:10px;padding:3px 6px;gap:4px;border-radius:9px}
  .target-marker .fraction{font-size:15px}
  .target-pin{height:8px}
  .river-name{display:none}
  .tick-label{padding:3px 3px;font-size:10px;min-width:19px}
  .tick-label .fraction{font-size:12px}
  .tick.endpoint .tick-label{font-size:10px;padding:6px 5px}
  .tick::before{height:9px;margin-bottom:4px}
  .tick.endpoint::before{height:12px}
  .tick.minor .tick-label{display:none}
  .play-panel{display:block;padding:11px 13px 13px;min-height:248px}
  .delivery{display:flex;flex-direction:row;align-items:center;gap:9px;border-right:0;border-bottom:1px solid #e3e7d8;padding:0 0 9px;margin-bottom:9px;justify-content:start}
  .cargo-art{width:35px;height:35px;border-radius:10px}
  .cargo-art svg{width:32px;height:32px}
  .delivery .eyebrow{font-size:8px;letter-spacing:.8px;margin-bottom:2px}
  .delivery #intro{font-size:11px;line-height:1.35}
  .decision{min-height:184px}
  .decision h3{font-size:18px;line-height:1.22}
  .question-copy{min-height:72px;padding-bottom:8px}
  .instruction{font-size:11px;line-height:1.35;margin-top:4px}
  .choices{gap:7px}
  .choice{min-height:60px;gap:7px;padding:5px 7px;border-radius:10px}
  .choice .fraction{font-size:22px}
  .mini-river{width:29px;height:11px}
  .actions{margin-top:10px;gap:8px}
  .primary-button{font-size:14px;padding:8px 12px;gap:9px}
  .hint-button{font-size:11px;line-height:1.3;text-align:left;padding-right:6px}
  .hint-button span{display:none}
  .hint-box{font-size:13px;padding:6px 10px;line-height:1.4}
  .feedback-panel{min-height:72px;padding-bottom:8px}
  .feedback-title{font-size:20px}
  .feedback-panel #feedback{font-size:12px;line-height:1.4}
  .game-card[data-phase=correct] .feedback-panel{min-height:184px;padding:8px 0;gap:9px}
  .game-card[data-phase=correct] .feedback-title{font-size:24px}
  .success-actions{align-self:stretch;gap:5px;margin-top:5px}
  .success-actions .quiet-button{font-size:12px;padding:8px 3px}
  .below-game{font-size:10px;gap:6px;justify-content:space-between}
  .below-game p{max-width:220px;line-height:1.3}
  .below-game p span{display:none}
  .below-game button{font-size:10px;padding:4px;white-space:nowrap}
  footer{font-size:10px}
  .celebration-check{font-size:20px}
  dialog{padding:29px 23px}
  dialog h2{font-size:26px}
  dialog p{font-size:14px}
  .trip-grid{grid-template-columns:1fr 1fr}
  #trips-dialog{padding:25px 17px 18px}
  #trips-dialog h2{margin-bottom:10px}
  #trips-dialog>p:not(.eyebrow){font-size:13px;line-height:1.45;margin-bottom:10px}
  #chapter-select{font-size:12px;padding-left:7px}
  .chapter-nav{gap:6px;margin-top:6px}
  .trip-option{gap:6px;padding:8px 6px;font-size:12px}
  .trip-option>span:first-child{width:26px;height:31px}
  .help-example{gap:18px;padding:14px}
}
@media(max-width:650px) and (max-height:800px){
  .play-panel{min-height:254px}
  .scene{height:clamp(188px,calc(100svh - 532px),260px)}
  .scene-caption{display:none}
  .below-game p{display:none}
}
@media(max-width:360px){
  main{padding-left:9px;padding-right:9px;column-gap:10px}
  h1{font-size:28px}
  .map-button{font-size:11px;padding:8px;gap:4px}
  .map-button svg{width:16px;height:16px}
  .choice{gap:4px;padding:5px 4px}
  .mini-river{width:24px}
  .choice .fraction{font-size:21px}
  .choices:has(.choice:nth-child(4)) .mini-river{display:none}
  .play-panel{padding:10px 11px 12px}
  .question-copy{min-height:82px}
  .decision h3{font-size:17px}
  .feedback-panel{min-height:82px}
  .primary-button{font-size:13px;padding:8px 10px}
  .site-header{padding-left:10px;padding-right:8px}
  nav .quiet-button{padding:8px 6px;font-size:11px}
  .brand{font-size:10px}
  .brand img{width:24px;height:24px}
  .trip-heading h2{font-size:16px}
  .trip-heading .eyebrow{font-size:7px}
  .game-card[data-phase=correct] .feedback-title{font-size:23px}
}
@media(max-width:400px){.brand-name{display:none}}
/* Short wide scenes need a smaller dock and lower flag to keep the math visible. */
@media(min-width:651px) and (max-height:900px){
  .scene-caption{display:none}
  .target-marker{bottom:78px}
  .target-marker>span:first-child{font-size:11px;padding:4px 7px}
  .target-marker .fraction{font-size:16px}
  .destination{height:90px}
  .destination svg{width:41px;height:41px}
  .pier{height:30px}
  .boat{width:108px;height:85px}
  .celebration-check{font-size:20px}
}
/* Short landscape and zoomed views may scroll; never clip the learning controls. */
@media(max-height:600px){.scene{height:206px}.tagline{display:none}.welcome{min-height:44px}.welcome h1{font-size:30px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
