/* Shared touch and small-screen refinements, loaded after page-specific styles. */
.world-mobile-tools,.world-close-filters{display:none}
@media(max-width:900px),(max-height:500px) and (max-width:1000px){
 body{overflow-wrap:anywhere}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important;max-width:100%}
 button,.action,.map-pill{min-height:44px}
 dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow-y:auto}
 .site-header{padding:14px 16px;gap:12px;flex-wrap:wrap}.site-header nav{gap:12px;flex-wrap:wrap}.site-header nav a{min-height:44px;display:inline-flex;align-items:center}
 .game-library{padding:30px 16px}.game-grid{grid-template-columns:1fr}.game-card{min-width:0}.card-content{padding:20px}
 body.game-map-page{height:100dvh;overflow:hidden;overscroll-behavior:none}
 .game-map-page .map-shell,.game-map-page .map-audit-summary+.map-shell{position:relative;display:block;height:calc(100dvh - var(--game-header-height,88px));min-height:0}
 .game-map-page .map-view{position:absolute;inset:0;height:100%;width:100%}
 .game-map-page .map-controls{position:absolute;z-index:1100;top:62px;left:12px;bottom:calc(50px + env(safe-area-inset-bottom));width:calc(100% - 24px);max-height:none;padding:16px;border:1px solid #52654d;transform:translateX(-120%);visibility:hidden;overflow:auto;overscroll-behavior:contain;box-shadow:0 8px 30px #0008}
 .game-map-page .map-controls.open{transform:none;visibility:visible}
 .world-mobile-tools{position:absolute;top:10px;left:12px;right:12px;z-index:850;display:flex;gap:8px;pointer-events:none}
 .world-mobile-tools button{pointer-events:auto;background:#111b19ed;color:#d5d9d5;border:1px solid #7b887169;padding:10px 16px;font-size:13px}.world-mobile-tools button:last-child{margin-left:auto}
 .world-mobile-tools button[aria-pressed=true]{border-color:#e4db83;color:#e4db83}
 .world-close-filters{display:block;float:right;width:44px;min-height:44px}
 .game-map-page .map-controls h1{font-size:24px}.game-map-page .map-controls input[type=search]{min-height:44px}
 .game-map-page .map-controls label{min-height:44px}.game-map-page .map-controls input[type=checkbox]{width:18px;height:18px;flex-shrink:0}.game-map-page .map-layer-group summary{padding:12px 0}
 .game-map-page .map-tools{flex-wrap:wrap}.game-map-page .map-tools button{min-height:44px}
 .map-audit-summary{font-size:10px;line-height:1.5;padding:7px 16px}
 .game-community-nav{left:12px;bottom:calc(7px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);white-space:nowrap;overflow:auto;padding:10px;font-size:11px}
 .leaflet-popup-content{margin:16px;max-width:calc(100vw - 80px);overflow-wrap:anywhere}.leaflet-popup-content button{min-height:44px;padding:9px;font-size:13px}.leaflet-container a.leaflet-popup-close-button{width:36px;height:36px;line-height:36px}
 .leaflet-touch .leaflet-bar a{width:44px;height:44px;line-height:44px}.game-map-page .leaflet-top.leaflet-left{top:65px;left:auto;right:12px}
 .interior-atlas:has(.interior-library){overflow-y:auto;overscroll-behavior:auto}.interior-atlas .map-top{gap:6px}.interior-atlas .map-top>.map-pill{font-size:12px;padding:9px;min-height:44px}.interior-atlas .interior-title{display:none}
 .interior-atlas .sidebar{bottom:calc(65px + env(safe-area-inset-bottom))}
 .loot-prices-page main,.crafting-page main{padding:0 12px 24px;min-width:0}
 .loot-prices-page nav,.crafting-page nav,.loot-guide nav{gap:10px 18px}.loot-prices-page nav a,.crafting-page nav a,.loot-guide nav a{display:inline-flex;align-items:center;min-height:44px}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats div{min-width:0;padding:14px}.stats strong{font-size:20px;overflow-wrap:anywhere}
 .filters{gap:12px;padding:14px}.filters label:not(.check){min-width:0;flex:1 1 100%;width:100%}.filters input,.filters select{width:100%;max-width:100%;min-width:0}.filters input[type=number]{width:100%}
 .result-summary{flex-direction:column}.supply-browser{padding:14px}.supply-grid{grid-template-columns:1fr}
 .loot-prices-page .table-scroll,.crafting-page .table-scroll{border:0;overflow:visible}
 .loot-prices-page table,.crafting-page .recipe-chart{display:block;min-width:0;width:100%;table-layout:auto}
 .loot-prices-page table thead,.crafting-page .recipe-chart thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .loot-prices-page tbody,.crafting-page tbody{display:block}
 .loot-prices-page tbody tr,.crafting-page tbody tr{display:block;border:1px solid #35493a;background:#152019;margin:0 0 14px;padding:4px}
 .loot-prices-page tbody th,.loot-prices-page tbody td,.crafting-page tbody th,.crafting-page tbody td{display:block;width:100%!important;max-width:none;text-align:left;padding:12px;white-space:normal;overflow-wrap:anywhere}
 .loot-prices-page td[data-label]::before,.crafting-page td[data-label]::before{content:attr(data-label);display:block;color:#bacaad;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:1px;margin-bottom:9px}
 .loot-prices-page .item-name-cell{min-width:0;align-items:flex-start}.loot-prices-page .item-name-cell>span{min-width:0}
 .crafting-page .recipe-items li{align-items:flex-start;min-width:0}.crafting-page .recipe-items li>span:not(.item-photo){min-width:0;flex:1}.crafting-page .recipe-items .item-photo{width:44px;height:44px;flex:0 0 44px}.crafting-page .capabilities li{flex-wrap:wrap}
 .auth-card{margin:12px auto;padding:20px;min-width:0}.auth-card .workspace-nav a{display:inline-flex;align-items:center;min-height:44px}.workspace .compact-form{display:block}.workspace .two-columns,.plan-grid{grid-template-columns:1fr}
 .workspace .member-list li{flex-wrap:wrap;gap:10px}.workspace .member-list button{margin-left:0}.workspace .record-actions{gap:10px}
}
