/* Android layout. The original 960 × 540 game and its physics stay intact. */
body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
.install-button{display:inline-flex;gap:10px;align-items:center;justify-content:center;background:#b2e7cc;color:#17352e;border:1px solid #b2e7cc;border-radius:7px;padding:0 13px;font-size:12px;font-weight:750;min-height:36px}
.install-button span{font-size:20px}.install-button:hover{background:#d0f8de}
.page-note a{color:inherit;text-decoration:none}.page-note a:hover{text-decoration:underline}
.language-label{color:#b2e7cc;letter-spacing:.8px;margin-left:auto;margin-right:20px}
.bottom-bar{gap:12px}.bottom-bar #offline-status{white-space:normal;line-height:1.5}
.offline-ready .status-dot{background:#b2e7cc}.offline-pending .status-dot{background:#e2c990}.offline-error .status-dot{background:#e8b199}
.touch-controls{inset:auto max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}
.touch-controls .touch-group{position:relative;gap:8px;align-items:center}
.touch-controls button{width:52px;height:52px;min-width:44px;min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-color:#cae8dd99;background:#10293ee0;box-shadow:0 3px 0 #0004;line-height:1;flex:none}
.touch-controls button span{font-size:22px}.touch-controls button small{font:700 7px/1.2 system-ui,sans-serif;letter-spacing:.8px;color:#d8e6d8}
.touch-controls .touch-jump{width:64px;height:64px;background:#8edfb0e0;color:#12352d}
.touch-controls .touch-jump small{color:#12352d}.touch-controls button.pressed{background:#b2e7cc;color:#142b32;transform:translateY(2px);box-shadow:none}
.touch-controls button.pressed small{color:#142b32}.touch-controls .touch-thunder{background:#454455e0}
.shell:fullscreen{width:100%;height:100dvh;margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);display:flex;flex-direction:column;background:#0b1420}
.shell:fullscreen .topbar{flex:none;height:42px;padding:0 12px}
.shell:fullscreen .game-frame{flex:1;min-height:0;width:100%;aspect-ratio:auto;border:0;border-radius:0;box-shadow:none}
.shell:fullscreen canvas{object-fit:contain}
.shell:fullscreen .bottom-bar,.shell:fullscreen .page-note{display:none}
.shell::backdrop{background:#0b1420}
.install-dialog{color:#fff0d1;background:linear-gradient(135deg,#203843,#101f2d);border:1px solid #637e83;border-radius:14px;box-shadow:0 25px 90px #0009;width:min(470px,calc(100vw - 28px));max-height:calc(100dvh - 30px);padding:24px;overflow:auto;font-size:14px;line-height:1.65}
.install-dialog::backdrop{background:#06101cdb;backdrop-filter:blur(6px)}
.install-heading{display:flex;gap:14px;align-items:center}.install-heading img{border-radius:12px;width:60px;height:60px;flex:none;image-rendering:pixelated}
.install-heading .eyebrow{font-size:8px;letter-spacing:1.5px;margin:0 0 6px}
.install-heading h2{font-size:29px;margin:0}.install-heading .icon-button{margin-left:auto;flex:none;align-self:flex-start}
.install-dialog p{color:#c4d0d0}.install-dialog ol{padding-left:22px;color:#c4d0d0}.install-dialog li{padding-left:3px;margin:9px 0}
.install-dialog strong{color:#fff0d1}.install-dialog .small{font-size:12px;line-height:1.65}
.install-dialog>.button{font-size:13px;min-height:44px;margin:10px 5px 0 0}
.update-banner{position:fixed;z-index:20;bottom:max(15px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;max-width:calc(100vw - 24px);width:max-content;padding:10px 13px;border:1px solid #6c9d88;border-radius:8px;background:#102937;color:#fff0d1;box-shadow:0 4px 25px #0009;font-size:12px}
.update-banner button{background:#b2e7cc;color:#17352e;font-weight:700;border:0;border-radius:4px;padding:9px}
.update-banner #dismiss-update{background:transparent;color:#fff0d1;font-size:20px}
@media(any-pointer:coarse){
  button,a{-webkit-touch-callout:none}.topbar .icon-button{min-width:40px;min-height:40px}.install-button{min-height:40px}
  .boss-hud{bottom:90px}.game-hint{bottom:96px}.button{min-height:44px}
}
@media(max-width:960px) and (orientation:landscape){
  body{display:block;overflow:hidden;background:#0b1420}
  .shell{width:100%;height:100dvh;margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);display:flex;flex-direction:column}
  .topbar{height:44px;flex:none;padding:0 12px}.wordmark{font-size:18px}.brand-rune{font-size:29px}.wordmark-sub{display:inline;font-size:8px;margin-left:3px}
  .topbar nav{gap:6px}.icon-button{height:34px;width:36px}.topbar .icon-button{min-width:36px;min-height:34px}.install-button{min-height:34px}
  .game-frame{flex:1;min-height:0;width:100%;aspect-ratio:auto;border:0;border-top:1px solid #43585c;border-radius:0;box-shadow:none;background:#102430}
  canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
  .bottom-bar{flex:none;font-size:8px;padding:4px 14px;height:22px}.bottom-bar>div,.page-note{display:none}.language-label{margin-right:0}
  .menu-content{top:9%;left:5%;width:70%}.menu{background:linear-gradient(90deg,#101f2ffa,#102937d9 42%,#10293744 75%,transparent)}
  h1{font-size:clamp(36px,8vw,70px);margin-bottom:10px}h1 span{font-size:clamp(23px,3.7vw,34px);margin-top:4px}
  .eyebrow{font-size:9px;margin-bottom:8px}.menu-description{font-size:12px;line-height:1.55;margin-bottom:14px}
  .button{font-size:12px;padding:9px 14px;min-height:40px}.adventure-stats{margin-top:16px;font-size:8px}.adventure-stats b{font-size:20px}
  .menu-foot{font-size:7px;bottom:12px}.hud{padding:10px 16px}.hud-label{font-size:8px}.hud strong{font-size:17px}.hud-powers strong{font-size:10px;max-width:220px}
  .panel{padding:19px;max-height:95%;width:min(540px,86%)}.panel h2{font-size:29px}.panel p{font-size:12px}.panel .eyebrow{font-size:9px}
  .panel p.small{font-size:11px}.button-stack{margin-top:12px;gap:8px}.end-stats b{font-size:21px}.end-stats small{font-size:9px}
  .help-panel{width:min(760px,94%)}.help-grid{gap:22px}.help-grid p{font-size:12px;line-height:1.75}.help-panel .small{font-size:11px}
  .table-scroll{max-height:140px}td{font-size:12px;padding:8px}th{font-size:10px;padding:8px}
  #score-form label{font-size:12px}.name-row input{font-size:16px;padding:9px}.encounter-symbol{width:36px;height:36px;font-size:27px;margin-bottom:9px}
  .panel p.encounter-gift{font-size:12px}.touch-controls button{width:48px;height:48px}.touch-controls .touch-jump{width:58px;height:58px}
}
@media(max-width:600px) and (orientation:portrait){
  body{display:block;background:#0b1420;overflow:hidden}
  .shell{width:100%;height:100dvh;margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);display:flex;flex-direction:column}
  .topbar{height:62px;flex:none;padding:0 12px}.wordmark{font-size:17px;letter-spacing:1px;gap:6px}.brand-rune{font-size:30px}.wordmark-sub{display:none}
  .topbar nav{gap:5px}.topbar .icon-button{width:34px;height:38px;min-width:34px;min-height:38px;font-size:19px}.install-button{padding:0 10px;font-size:11px;gap:6px;min-height:38px}
  .game-frame{flex:1;min-height:0;aspect-ratio:auto;width:100%;border:0;border-top:1px solid #354f59;border-bottom:1px solid #354f59;border-radius:0;box-shadow:none;background:linear-gradient(#122e3c,#142733 65%,#0b1420)}
  canvas{position:absolute;top:50%;transform:translateY(-57%);width:100%;height:auto;aspect-ratio:16/9;object-fit:contain}
  html[data-game-mode="menu"] canvas,html[data-game-mode="leaderboard"] canvas{top:0;transform:none;height:100%;object-fit:cover;object-position:78% 50%;opacity:.72}
  .menu{background:linear-gradient(90deg,#101f2ff5,#102937a3 75%,#12283722)}
  .menu-content{top:12%;left:8%;width:84%}.menu-content>.eyebrow{font-size:9px;margin-bottom:24px;letter-spacing:2px}
  h1{font-size:clamp(58px,16vw,88px);letter-spacing:-2px;line-height:1;margin-bottom:25px}
  h1 span{font-size:clamp(30px,8vw,43px);line-height:1.15;margin-top:7px}
  .menu-description{font-size:14px;line-height:1.8;margin-bottom:28px}.menu-actions{flex-direction:column;gap:13px;max-width:240px}
  .button{font-size:14px;padding:12px 16px;min-height:46px}.menu-actions .button{text-align:center}.primary span{margin-left:22px}
  .adventure-stats{margin-top:30px;gap:30px;font-size:8px;letter-spacing:1px}.adventure-stats b{font-size:26px;margin-bottom:6px}
  .menu-foot{font-size:8px;bottom:25px;left:8%;right:8%;flex-direction:column;gap:10px}
  .bottom-bar{flex:none;padding:10px 14px;font-size:9px;letter-spacing:.4px;min-height:37px}.language-label{margin-right:0}.bottom-bar>div{display:none}.page-note{font-size:9px;flex:none;margin:2px 0 8px}
  .hud{padding:16px 15px;flex-wrap:wrap;gap:16px 8px;background:linear-gradient(#0b1420,transparent)}.hud>div{min-width:70px;gap:4px}.hud-label{font-size:8px}.hud strong{font-size:18px}.life-track{width:64px}
  .hud .hud-powers{max-width:100%;flex-basis:100%;text-align:left}.hud-powers strong{font-size:11px;line-height:1.7;max-width:100%}
  .toast{top:23%;max-width:90%;font-size:12px;width:max-content;padding:10px 14px}.game-hint{bottom:160px;font-size:12px;max-width:88%;width:max-content}
  .boss-hud{left:15%;right:15%;bottom:160px}.boss-hud span{font-size:11px}
  .panel{width:90%;padding:25px 20px;max-height:94%}.panel h2{font-size:32px;margin-bottom:16px}.panel p{font-size:14px;line-height:1.7;margin:12px 0}.panel .eyebrow{font-size:9px;letter-spacing:1.5px;margin-bottom:12px}
  .panel p.small,.help-panel .small{font-size:12px}.help-grid{grid-template-columns:1fr;gap:0}.help-grid p{font-size:13px;line-height:1.9}
  .button-stack{margin-top:22px;gap:12px}.end-stats{margin:22px 0;gap:28px}.end-stats b{font-size:25px}.end-stats small{font-size:9px}
  .end-actions{flex-direction:column;margin-top:18px;gap:10px}#score-form label{font-size:12px}.name-row{flex-wrap:wrap;gap:10px}.name-row input{font-size:16px;padding:12px}.name-row .button{width:100%}
  .table-scroll{max-height:40dvh;margin:15px 0 20px}td{font-size:12px;padding:11px 5px}th{font-size:9px;padding:11px 5px}
  .encounter-symbol{width:58px;height:58px;font-size:38px;margin-bottom:15px}.panel p.encounter-gift{font-size:12px;padding:12px}
  .touch-controls{left:12px;right:12px;bottom:22px}.touch-controls .touch-group{gap:6px}.touch-controls button{width:44px;height:48px}.touch-controls .touch-movement>button{width:48px;height:52px}
  .touch-controls .touch-jump{width:56px;height:60px}.touch-controls .touch-movement .touch-run{position:absolute;top:-58px;left:27px;width:44px;height:44px}
  .touch-controls button span{font-size:21px}.touch-controls button small{font-size:7px;letter-spacing:.5px}
  .shell:fullscreen .topbar{height:56px}.shell:fullscreen canvas{inset:auto 0;top:50%;height:auto}.shell:fullscreen .game-frame{border-radius:0}
}
@media(max-width:350px) and (orientation:portrait){.wordmark{font-size:15px}.topbar{padding:0 8px}.install-button span{display:none}.touch-actions [data-key="ArrowDown"]{position:absolute;top:-58px;left:0}.menu-content{top:8%}.menu-description{font-size:13px}.adventure-stats{margin-top:20px}}
@media(max-height:420px) and (orientation:landscape){.menu-content{top:7%}.menu-description{margin-bottom:11px}.adventure-stats{margin-top:13px}.menu-foot{bottom:8px}.menu-foot>span:first-child{display:none}.menu-foot{justify-content:flex-end}.panel h2{font-size:25px}}
@media(prefers-reduced-motion:reduce){.touch-controls button.pressed{transform:none}}
