:root{--safe-top:max(env(safe-area-inset-top,0px), var(--safe-area-inset-top,0px));--safe-right:max(env(safe-area-inset-right,0px), var(--safe-area-inset-right,0px));--safe-bottom:max(env(safe-area-inset-bottom,0px), var(--safe-area-inset-bottom,0px));--safe-left:max(env(safe-area-inset-left,0px), var(--safe-area-inset-left,0px))}html,body{touch-action:auto;height:100dvh}#screen-title,.dock-panel,.modal-card,.presentation-dialog{touch-action:pan-y}#hud{padding:max(12px, var(--safe-top)) max(14px, var(--safe-right)) max(12px, var(--safe-bottom)) max(14px, var(--safe-left))}body[data-state=title] #screen-title{padding:0 var(--safe-right) 0 var(--safe-left);overscroll-behavior:contain;overflow-y:auto}.menu-top-bar{padding-top:max(14px, var(--safe-top));flex-shrink:0}.menu-top-right{flex-wrap:wrap;justify-content:flex-end;gap:6px}.menu-hero-zone,.menu-dock{flex-shrink:0}#menu-bottom-nav{padding-bottom:var(--safe-bottom)}.overlay-layer:not(#screen-title){padding:max(16px, var(--safe-top)) max(16px, var(--safe-right)) max(16px, var(--safe-bottom)) max(16px, var(--safe-left));overflow-y:auto}.modal-card{max-height:calc(100dvh - max(16px, var(--safe-top)) - max(16px, var(--safe-bottom)));overscroll-behavior:contain;overflow-y:auto}#progress-status{max-height:35dvh;overflow:auto;left:max(12px, var(--safe-left))!important;right:max(12px, var(--safe-right))!important;bottom:calc(130px + var(--safe-bottom))!important}#ad-feedback{left:max(12px, var(--safe-left))!important;right:max(12px, var(--safe-right))!important;bottom:calc(80px + var(--safe-bottom))!important}button:focus-visible,a:focus-visible{outline-offset:3px;outline:3px solid #22d3ee}#btn-about{min-width:44px;min-height:44px;font-size:20px}.presentation-dialog{color:#f8fafc;width:min(480px, calc(100vw - max(16px, var(--safe-left)) - max(16px, var(--safe-right))));max-height:calc(100dvh - max(24px, var(--safe-top)) - max(24px, var(--safe-bottom)));font-family:var(--font-body);background:#121828;border:1px solid #58637b;border-radius:18px;padding:22px;overflow:auto}.presentation-dialog::backdrop{background:#05070dd9}.presentation-dialog h2{font-family:var(--font-display);margin-top:0}.presentation-dialog li{margin:10px 0;line-height:1.45}.presentation-links{gap:8px;display:grid}.presentation-links a{color:#67e8f9;min-height:44px;padding:10px 0}.presentation-dialog button{color:#07090f;background:#22d3ee;border-radius:10px;min-height:44px;padding:12px 20px;font-weight:700}@media (height<=650px){.menu-hero-zone{margin:8px 0}.dock-panel{max-height:28dvh}.menu-top-bar{padding-top:max(8px, var(--safe-top))}}@media (width<=360px){.menu-top-bar{gap:4px;padding-left:8px;padding-right:8px}.coin-chip{padding:0 7px}.menu-top-right{gap:4px}.lang-btn{padding:0 7px}}@media (height<=480px){.menu-hero-zone{margin:0;padding-top:0;padding-bottom:0}.title-emblem{max-width:160px}.level-selector-row{margin-top:2px}#btn-start{height:44px;min-height:44px;margin-top:6px;padding:8px 16px;font-size:18px}.dock-panel{max-height:64px}}html,body{overscroll-behavior:none}#gameCanvas{height:100dvh}body[data-state=playing]{touch-action:none}.web-tools{flex-wrap:wrap;justify-content:center;align-items:center;gap:16px;margin-top:10px;font-size:14px;display:flex}.web-tools a{color:#67e8f9;padding:10px 0;text-decoration:underline}.web-tools button{color:#f8fafc;background:#121828;border:1px solid #58637b;border-radius:10px;min-height:44px;padding:10px 12px}#web-ad-status{color:#94a3b8;text-align:center;max-width:380px;margin:6px auto 0;font-size:13px;line-height:1.4}#web-save-notice{font-size:14px;line-height:1.5}@media (height<=650px){.web-tools{margin-top:2px}#web-ad-status{margin-top:2px;font-size:12px}}
