/* Keep map interactions exposed on narrow screens and short landscape views. */
.filter-heading{display:flex;align-items:center;justify-content:space-between;margin:-4px 0 12px;color:var(--sand);font-size:12px}
#close-filters{width:36px;height:36px;font:22px Courier New,monospace;box-shadow:none}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
  .controls{top:calc(10px + env(safe-area-inset-top));right:calc(10px + env(safe-area-inset-right));display:flex;gap:5px}
  .controls button{width:44px;height:44px;font-size:23px;background:#171811f5}
  .home{left:calc(10px + env(safe-area-inset-left));top:calc(10px + env(safe-area-inset-top));width:44px;height:44px;padding:9px;justify-content:center}
  .home span{display:none}.home img{width:26px;height:26px}
  body #loot-panel{top:auto;bottom:calc(12px + env(safe-area-inset-bottom));left:calc(12px + env(safe-area-inset-left));right:calc(12px + env(safe-area-inset-right));width:auto;max-height:42dvh;padding:0 14px 14px;border-radius:12px;overscroll-behavior:contain;box-shadow:0 5px 24px #0009;-webkit-overflow-scrolling:touch}
  .filter-heading{position:sticky;top:0;z-index:1;background:#171811;margin:0 -14px 10px;padding:7px 12px;border-bottom:1px solid var(--line)}
  body #loot-panel label{font-size:13px}body #loot-panel input[type=checkbox]{width:18px;height:18px;vertical-align:middle;margin-right:6px}
  body #loot-panel select,body #loot-panel details select,#item-query{font-size:16px;min-height:44px}
  body #loot-panel .area-toggles{gap:18px}body #loot-panel .area-toggles label{font-size:13px}
  body #loot-panel summary{padding:8px 0;font-size:14px}body #loot-panel details p,#finder-result{font-size:12px;line-height:1.6}
  #item-form button{height:44px;flex:1;font-size:14px}
  #detail{left:calc(12px + env(safe-area-inset-left));right:calc(12px + env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));width:auto;max-height:27dvh;overflow-y:auto;overscroll-behavior:contain;border-radius:8px;padding:12px 54px 12px 14px;-webkit-overflow-scrolling:touch}
  #detail h2{font-size:20px;line-height:1.2;overflow-wrap:anywhere}#detail p{margin-top:7px;font-size:12px}#detail #coords{margin-top:5px}
  #close{width:44px;height:44px;top:0;right:2px;font-size:26px}
  .attribution{top:calc(60px + env(safe-area-inset-top));bottom:auto;left:calc(10px + env(safe-area-inset-left));right:auto;font-size:10px;max-width:calc(100% - 20px)}
}

.attribution{pointer-events:auto;color:#c7b891;font:11px/1.4 Courier New,monospace;text-decoration:none;padding:7px 9px;border-radius:3px;background:#0d0f0ce6}.attribution:hover{color:#fff}.attribution:focus-visible{outline:2px solid var(--amber);outline-offset:2px}

/* A single search followed by small, mutually exclusive layer sections. */
body #loot-panel{width:292px;top:16px;right:70px;max-height:calc(100dvh - 32px);padding:12px 16px;border-radius:10px}
body #loot-panel .map-search{padding-bottom:12px}
body #loot-panel .map-search>label{margin:0;color:#e2d9bd;font-weight:bold}
body #loot-panel #item-query{margin-top:6px}
body #loot-panel .map-section{margin:0;border-top:1px solid var(--line);padding:0}
body #loot-panel .map-section>summary{padding:14px 0;min-height:44px;font-size:13px;list-style-position:inside}
body #loot-panel .section-body{padding:0 0 12px}
body #loot-panel .section-body>label{margin:8px 0;font-size:12px}
body #loot-panel .section-body>select{width:100%;background:#27291e;color:var(--sand);border:1px solid var(--line);padding:9px;font:12px Courier New,monospace;margin:0 0 10px}
body #loot-panel .layer-note{font:11px/1.6 Courier New,monospace;color:var(--sand);margin:8px 0 0}
body #loot-panel #infected-loot-section{margin-top:12px}
body #loot-panel #infected-loot-result{max-height:220px;overflow:auto;overscroll-behavior:contain}
body #loot-panel #tier-key{text-align:left;margin:8px 0}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 body #loot-panel{top:auto;right:calc(12px + env(safe-area-inset-right));left:calc(12px + env(safe-area-inset-left));width:auto;padding:0 14px 14px;max-height:46dvh}
 body #loot-panel .section-body>select{font-size:16px;min-height:44px}
 body #loot-panel .map-section>summary{font-size:14px;padding:13px 0}
 body #loot-panel .section-body>label{min-height:32px;display:flex;align-items:center;font-size:13px}
 body #loot-panel .layer-note{font-size:12px}
}
body #loot-panel .layer-switch{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin:0;padding:8px 0;border-bottom:1px solid #c7b89112;font-size:12px;cursor:pointer}
body #loot-panel .layer-switch input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:0 0 38px;width:38px;height:22px;border-radius:15px;background:#505247;border:1px solid #6c6e5a;margin:0;position:relative;cursor:pointer}
body #loot-panel .layer-switch input:before{content:'';position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:#e2d9bd;transition:transform .12s}
body #loot-panel .layer-switch input:checked{background:#947136;border-color:var(--amber)}body #loot-panel .layer-switch input:checked:before{transform:translateX(16px)}
body #loot-panel .layer-switch input:focus-visible{outline:2px solid var(--amber);outline-offset:3px}
body #loot-panel .section-body details{margin-top:8px;padding-top:0}body #loot-panel .section-body details summary{padding:12px 0}
body #loot-panel .reset-layers{font:12px Courier New,monospace;width:100%;height:40px;margin-top:12px;box-shadow:none}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){body #loot-panel .layer-switch{font-size:13px;min-height:48px}}
@media(prefers-reduced-motion:reduce){body #loot-panel .layer-switch input:before{transition:none}}
#search-panel{position:absolute;top:16px;right:70px;width:292px;padding:12px 16px;background:#171811f5;border:1px solid var(--line);border-radius:10px;box-shadow:0 5px 20px #0008;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
#search-panel .filter-heading button{width:36px;height:36px;font:22px Courier New,monospace;box-shadow:none}
#search-panel #item-query{margin-top:0;font-size:14px;min-height:44px}#search-panel #item-form button{height:40px;flex:1}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 #search-panel{top:auto;bottom:calc(12px + env(safe-area-inset-bottom));left:calc(12px + env(safe-area-inset-left));right:calc(12px + env(safe-area-inset-right));width:auto;max-height:38dvh;padding:0 14px 14px}
 #search-panel #item-query{font-size:16px}#search-panel .filter-heading{margin-bottom:10px}#search-panel #item-form button{height:44px}
}
