/* Screen-sized game layout. Only journal/settings content may scroll. */
html{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{width:100%;height:100%;min-height:0;overflow:hidden;overscroll-behavior:none}
.game-app{width:100%;max-width:1800px;height:100vh;height:var(--app-height,100dvh);min-height:0;display:flex;flex-direction:column;padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));gap:0}
.topbar{flex:0 0 62px;height:auto;min-height:0}
.game-shell{flex:1 1 0;min-height:0;display:flex;flex-direction:column;width:100%;box-shadow:0 4px #071a22,0 12px 30px #0003}
.canvas-wrap{flex:1 1 0;height:auto;min-height:0;min-width:0;container-type:size;container-name:pond}
#pond{position:absolute;inset:0;min-width:0;min-height:0}
.modes{flex:0 0 auto;padding:10px;gap:8px}
.modes button{padding:12px;min-height:58px}
.adventure-strip{flex:0 0 64px;min-height:0;margin:0;padding:10px 4px;gap:20px}
footer{flex:0 0 30px;min-height:0;margin:0;padding:5px 4px;flex-wrap:nowrap}
body:not([data-state=menu]) .modes,body:not([data-state=menu]) .adventure-strip{display:none}
body:not([data-state=menu]) .topbar{flex-basis:52px}
.utility,.square-button{min-height:40px}.square-button{min-width:40px}
.overlay-card{padding:12px 20px;margin:0;max-width:min(580px,96%)}
body[data-state=menu] #overlay-title{font-size:clamp(36px,14cqh,91px);line-height:.83;margin:clamp(8px,3cqh,22px) 0 6px}
body[data-state=menu] #overlay-title em{font-size:clamp(42px,17cqh,110px);margin-top:5px}
body[data-state=menu][data-adventure-mode=infinite] #overlay-title{font-size:clamp(29px,11cqh,69px)}
.title-subline{margin:clamp(10px,3cqh,24px) 0 12px}
.overlay p{margin:0 auto clamp(10px,3cqh,22px)}
.overlay-hint{margin-top:clamp(10px,3cqh,23px)}
.choose-mode{display:block;margin:16px auto 0;border:1px solid #839d7770;border-radius:8px;background:#193d3e;color:#d8e4ba;font-size:10px;font-weight:900;padding:10px 18px;min-height:40px}
body[data-state=menu] .choose-mode{display:none}
body:not([data-state=menu]) .overlay-hint{display:none}
.game-dialog{max-height:calc(var(--app-height,100dvh) - 24px);max-width:calc(100vw - 24px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#80966a #193b3e}
.game-dialog .close-dialog{position:sticky;top:0;float:right;margin:-10px -5px 0 10px;z-index:2}
.game-dialog h2{clear:none}
.game-top{top:14px;left:18px;right:18px}
.hud{top:68px;left:18px;right:18px}
.in-game-bottom{bottom:15px;left:18px;right:18px}
.dash-hud{bottom:58px;left:18px}
.chain{bottom:65px;right:20px}
@media(max-height:780px){.adventure-strip{display:none}.modes button{padding:9px 12px}.topbar{flex-basis:54px}}
@media(max-width:700px){
  .game-app{padding-left:max(6px,env(safe-area-inset-left,0px));padding-right:max(6px,env(safe-area-inset-right,0px));padding-bottom:max(6px,env(safe-area-inset-bottom,0px))}
  .topbar,body:not([data-state=menu]) .topbar{flex-basis:54px;gap:8px}.top-actions{gap:6px}
  .utility,.square-button{min-height:44px}.square-button{min-width:44px}
  .modes{padding:7px;gap:6px}.modes button{min-height:53px;padding:8px;gap:7px}.modes em{font-size:8px}.modes small{font-size:6px}.modes strong{font-size:12px}.mode-icon{font-size:24px;width:24px}.mode-icon.infinity{font-size:30px}
  .adventure-strip{display:none}footer{flex-basis:22px;font-size:8px;padding:3px 0}footer>span:first-child{display:none}
  .game-top{top:9px;left:10px;right:10px}.weather .square-button{height:44px;width:44px}.weather{gap:6px}.location strong{font-size:9px}.location #chapter{font-size:6px}.location-icon{font-size:23px}.weather>span{font-size:7px;padding:7px}
  .hud{top:61px;left:10px;right:10px;gap:6px}.health{padding:7px}.tiny-label{font-size:6px;max-width:94px}.objective{min-width:0;padding:9px 7px}.objective>div:first-child{flex-wrap:wrap;gap:2px;font-size:6px}.objective strong{font-size:7px}.score-pill{padding:9px 7px;gap:5px}.score-pill>span{font-size:6px}
  .in-game-bottom{left:12px;right:12px;bottom:12px}.pond-tip{font-size:8px}.best-badge{gap:4px}
  .dash-hud{left:12px;bottom:57px}.chain{right:83px;bottom:65px;width:57px}.chain b{font-size:23px}.chain span{font-size:6px}
  .touch-dash{right:14px;bottom:56px;width:58px;height:58px}.toast{top:32%;font-size:9px;max-width:90%;padding:8px 12px}
  .play-button{min-width:0;width:min(270px,100%);padding:13px 16px;font-size:14px;gap:15px}.overlay-card{padding:8px 14px}.overlay p{font-size:11px}.chapter-ribbon{font-size:6px}.overlay-hint{font-size:7px}.title-subline{font-size:9px;letter-spacing:5px}
}
/* Coarse pointers include tablets and phones in landscape, not only narrow screens. */
@media(any-pointer:coarse){
  .utility,.square-button{min-height:44px}.square-button{min-width:44px}
  .touch-dash{display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;bottom:56px;right:16px;z-index:3;width:58px;height:58px;border:2px solid #ffe7a0;border-radius:50%;background:linear-gradient(#f2dd86,#c0b46a);box-shadow:0 4px #74653b;color:#334835;font-size:24px;touch-action:none}.touch-dash small{font-size:8px;font-weight:1000}
  .chain{right:88px;width:65px}.dash-label kbd{display:none}footer>div{display:none}.footer-touch{display:block}
}
@media(max-height:500px){
  .topbar,body:not([data-state=menu]) .topbar{flex-basis:46px}.wordmark svg{height:28px;width:28px}.wordmark>span{font-size:11px}.wordmark>span>span{font-size:16px}.top-center{display:none}.utility{padding:7px 10px;font-size:8px}.top-actions{gap:6px}
  footer{display:none}.game-app{padding-top:env(safe-area-inset-top,0px);padding-bottom:max(4px,env(safe-area-inset-bottom,0px))}.game-shell{border-radius:12px}
  .modes{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:5px}.modes button{padding:6px;min-height:44px;gap:6px}.modes small,.modes em,.mode-select{display:none}.modes strong{font-size:10px;white-space:normal;line-height:1.1}.mode-icon{font-size:22px;width:22px}.mode-icon.infinity{font-size:26px}
}
@container pond (max-height:400px){
  .overlay-card{padding:8px 14px}.chapter-ribbon{font-size:6px;letter-spacing:1px}.overlay p{font-size:10px;line-height:1.4;max-width:440px;margin-bottom:10px}.title-subline{font-size:8px;margin:10px 0;letter-spacing:4px}.overlay-hint{display:none}.play-button{padding:10px 18px;font-size:13px;min-width:0;min-height:42px}.choose-mode{margin-top:10px;padding:7px 14px;min-height:36px;font-size:9px}
  body:not([data-state=menu]) #overlay-title{font-size:28px;margin:10px 0}.result-stats{margin:9px 0;gap:20px}.result-stats b{font-size:21px}.result-stats>span{font-size:7px}
  .game-top{top:6px;left:10px;right:10px}.location-icon{font-size:22px}.location strong{font-size:9px}.location #chapter{font-size:6px}.weather{gap:6px}.weather>span{font-size:7px;padding:6px 8px}
  .hud{top:56px;left:10px;right:10px;gap:8px}.health{padding:5px 8px}.avatar{display:none}#hearts{font-size:15px}.tiny-label{font-size:6px}.objective{padding:7px 9px;width:210px}.objective>div:first-child{font-size:6px}.score-pill{padding:7px 10px}.score-pill b{font-size:18px}.progress-track{height:5px;margin-top:5px}
  .in-game-bottom{bottom:8px;left:10px;right:10px}.pond-tip{font-size:8px;max-width:68%}.best-badge>span{font-size:18px}.best-badge b{font-size:12px}.best-badge>div{font-size:5px}.best-badge strong{font-size:7px}
  .dash-hud{left:10px;bottom:43px;padding:6px 9px}.dash-hud>span{font-size:18px}.dash-hud>div{width:80px}.dash-label{font-size:8px}.touch-dash{bottom:40px;height:48px;width:48px;font-size:20px}.chain{bottom:45px;right:77px;width:55px}.chain b{font-size:20px}.chain span{font-size:5px}.toast{top:45%;font-size:9px;padding:7px 12px}
}
@container pond (max-height:260px){
  .chapter-ribbon,.title-subline{display:none}
  body[data-state=menu] #overlay-title,body[data-state=menu][data-adventure-mode=infinite] #overlay-title{font-size:clamp(23px,16cqh,40px);line-height:1;letter-spacing:-1px;margin:5px 0 9px;transform:none;text-shadow:0 3px #284e34}
  body[data-state=menu] #overlay-title br{display:none}body[data-state=menu] #overlay-title em{display:inline;font-size:inherit;letter-spacing:-1px;margin:0 0 0 8px;text-shadow:0 3px #284e34}
  .overlay p{max-width:430px;font-size:9px;margin-bottom:8px}.overlay-card{width:min(460px,95%)}.play-button{min-height:36px;padding:7px 14px;width:auto;font-size:12px;box-shadow:0 3px #997435}.choose-mode{min-height:30px;padding:5px 12px;margin-top:7px}
  body:not([data-state=menu]) #overlay-title{font-size:23px;margin:3px 0 7px}.result-stats{margin:6px 0}.result-stats b{font-size:17px}
  .in-game-bottom{display:none}.dash-hud{bottom:9px}.touch-dash{bottom:9px}.chain{bottom:10px}.toast{top:49%;max-width:65%;font-size:8px}
}
@media(max-width:400px){.dash-hud{padding:7px 9px;gap:7px}.dash-hud>div{width:62px}.chain{width:48px;right:80px}.chain b{font-size:22px}.chain span{font-size:5px}}
.choose-mode[hidden],#share-challenge[hidden],#resume-run[hidden]{display:none}
.daily-share{margin-left:auto;color:#e6ef9b;font-size:8px;letter-spacing:.5px;font-weight:1000;padding:6px;border-radius:7px;line-height:1;white-space:nowrap}
.daily-share:hover,.daily-share:focus-visible{background:#d7ee7522;color:#fff1b4}
