/* v1.0.3 phone pass (Sonnet 5.5, 11-01): fixes what BREAKS on touch, inside the frozen look.
   Everything is inside max-width:900px, so a desktop (>=901px) is byte-for-byte the same. Loaded last. */
@media (max-width:900px){
 /* P9-03: the page never takes a pinch; the map does (tilemap.js handles two pointers). pan-x pan-y = no page zoom, scrolling kept. */
 html,body{touch-action:pan-x pan-y}
 .viewport .pins,.viewport .pin,.viewport .town,.viewport .zoom,.viewport .zoom button,.viewport .reopen,.viewport .zstrip,.viewport .cartouche,.viewport .vignette,.viewport .tip,.viewport .compass{touch-action:none}
 .viewport .trail,.viewport .tcard,.viewport .plist{touch-action:pan-y}

 /* P9-02: the Waters tab no longer sits on the zoom buttons: a small chip bottom-left; the zoom column keeps the right edge */
 .app.mapfirst:not(.atlas):not(.drawer-open) .reopen:not([hidden]){top:auto;bottom:8px;right:auto;left:8px;transform:none;writing-mode:horizontal-tb;min-height:44px;padding:0 14px;border:1px solid #9d8453;border-radius:4px;z-index:7}
 .app.mapfirst .zoom button{width:42px;height:40px}
 /* the Steps & sources tab sits just above the zoom column, not behind it */
 .app.mapfirst .dtab{top:max(266px,calc(100% - 393px));bottom:auto;transform:none}

 /* P9-05 / P9-04: one thing at a time on a small map. An open card hides the Charts panel under it; the panel itself is capped so pins stay in view and tappable. */
 .app:has(#tcard:not([hidden])) .trail{visibility:hidden;pointer-events:none}
 .app.mapfirst .trail{max-height:min(230px,50%);overflow-y:auto}

 /* P9-08: the menu button shares the logo row, so the header gives ~60px back to the map */
 .app.mapfirst .strip .mast{align-items:center}
 .app.mapfirst .strip .mast-right{flex:0 0 auto;margin-left:auto;order:2}
 .app.mapfirst .strip .mast .search{order:3;flex:1 1 100%}
 .menu-btn{width:44px;height:44px}
 .paths a.chip,.paths .tab-soon{min-height:44px;display:inline-flex;align-items:center}
 .app.mapfirst .tcard .tx,.tcard .tx{min-width:44px;min-height:44px}
}
