/* The loot map (/map/, map-page.mjs, map.js): the map fills the width, the item's room list sits over its right side. */
#pz-map { position: relative; height: min(78vh, 860px); min-height: 440px; margin: 6px 0 18px; background: #1b1a17; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#pz-map .pzm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#pz-map .pzm-canvas:active { cursor: grabbing; }
#pz-map .pzm-bar { position: absolute; z-index: 6; top: 10px; left: 10px; display: flex; gap: 8px; width: min(440px, calc(100% - 20px)); }
#pz-map .pzm-find { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; font: inherit; font-size: 15px; background: rgba(12,19,23,.92); color: #eef2f4; }
#pz-map .pzm-layer { flex: none; padding: 0 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: rgba(12,19,23,.88); color: #eef2f4; font: 600 13px/1 var(--body); cursor: pointer; }
#pz-map .pzm-layer[aria-pressed="true"] { border-color: var(--ac); }
#pz-map .pzm-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 50vh; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 12px 28px rgba(0,0,0,.45); }
#pz-map .pzm-list button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
#pz-map .pzm-list button:hover, #pz-map .pzm-list button:focus { background: var(--panel-2); }
#pz-map .pzm-list img { image-rendering: pixelated; }
#pz-map .pzm-list .ph { display: inline-block; width: 24px; height: 24px; }
#pz-map .pzm-list p { margin: 0; padding: 8px 12px; color: var(--muted); }
#pz-map .pzm-side { position: absolute; z-index: 5; top: 10px; right: 10px; bottom: 10px; width: 300px; overflow: auto; padding: 10px 12px; background: rgba(12,19,23,.92); color: #e6edf0; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; font-size: 14px; }
#pz-map .pzm-head { display: flex; align-items: center; gap: 8px; }
#pz-map .pzm-head img { image-rendering: pixelated; }
#pz-map .pzm-head b { font-size: 16px; flex: 1; }
#pz-map .pzm-close { border: 0; background: none; color: #c9d3d8; font-size: 22px; cursor: pointer; }
#pz-map .pzm-side p { margin: 8px 0; color: #b8c6cc; }
#pz-map .pzm-rooms { list-style: none; margin: 0; padding: 0; }
#pz-map .pzm-rooms button { display: grid; grid-template-columns: 14px 1fr; column-gap: 8px; width: 100%; text-align: left; padding: 6px 4px; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); background: none; color: #eef2f4; font: inherit; cursor: pointer; }
#pz-map .pzm-rooms button[aria-pressed="true"] { background: rgba(255,255,255,.08); }
#pz-map .pzm-rooms i { grid-row: span 2; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; border: 1px solid rgba(0,0,0,.6); }
#pz-map .pzm-rooms small { color: #9fb0b8; }
#pz-map .pzm-all { border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: none; color: #eef2f4; padding: 6px 10px; font: inherit; cursor: pointer; }
#pz-map .pzm-tip { position: absolute; z-index: 7; display: flex; flex-direction: column; gap: 2px; max-width: 240px; padding: 7px 10px; border-radius: 7px; background: rgba(10,15,18,.94); color: #eef2f4; font-size: 14px; line-height: 1.35; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
#pz-map .pzm-tip small { color: #9fb0b8; }
#pz-map .pzm-tip[hidden], #pz-map [hidden] { display: none; }
#pz-map .pzm-help { position: absolute; left: 10px; bottom: 6px; margin: 0; font-size: 12px; color: #fff; text-shadow: 0 1px 2px #000; pointer-events: none; }
/* the small map on item and room pages: no search, no list, a link to the full map */
.pz-mini { position: relative; margin: 10px 0 18px; }
#pz-map[data-compact] { height: 360px; min-height: 0; margin: 0; }
#pz-map[data-compact] .pzm-find, #pz-map[data-compact] .pzm-list, #pz-map[data-compact] .pzm-side, #pz-map[data-compact] .pzm-help { display: none !important; }
#pz-map[data-compact] .pzm-bar { width: auto; left: auto; right: 10px; }
.pz-mini .pzm-open { position: absolute; z-index: 8; left: 10px; bottom: 10px; padding: 7px 12px; border-radius: 7px; background: rgba(12, 11, 10, .9); color: #f2c7a8; font-weight: 600; font-size: 14px; }
.pz-mini .pzm-open:hover { color: #fff; text-decoration: none; }
@media (max-width: 700px) {
  #pz-map { height: 72vh; }
  #pz-map .pzm-side { top: auto; left: 10px; right: 10px; width: auto; height: 38%; }
}
