/* Layer positions belong to the saved plan, never to the current selection. */
.wh-map-editor .wh-map-zones{z-index:0;isolation:isolate}
.wh-map-editor .wh-map-items{z-index:1;isolation:isolate}
.wh-map.wh-map-editor{--layers-width:180px;--layers-height:clamp(460px,calc(100dvh - 225px),1100px)}
.wh-map.wh-map-editor .wh-map-layout{position:relative;grid-template-columns:var(--layers-width) minmax(0,1fr) 216px;align-items:start}
.wh-map.wh-map-editor.is-panel-hidden .wh-map-layout,.wh-map.wh-map-editor:has(.wh-map-inspector:empty) .wh-map-layout{grid-template-columns:var(--layers-width) minmax(0,1fr)}
.wh-map.wh-map-editor.is-layers-hidden .wh-map-layout{grid-template-columns:minmax(0,1fr) 216px}
.wh-map.wh-map-editor.is-layers-hidden.is-panel-hidden .wh-map-layout,.wh-map.wh-map-editor.is-layers-hidden:has(.wh-map-inspector:empty) .wh-map-layout{grid-template-columns:minmax(0,1fr)}
.wh-map-editor .wh-map-layers{display:flex;flex-direction:column;min-width:0;height:var(--layers-height);max-height:var(--layers-height);background:#141912;border-right:1px solid #30382a;color:#e0e6d6;overflow:hidden}
.wh-map-editor.is-layers-hidden .wh-map-layers{display:none}
.wh-layer-heading{display:flex;align-items:center;gap:6px;padding:8px 8px 4px;min-height:34px}
.wh-layer-heading strong{font-size:11px;font-weight:600;letter-spacing:.1px}
.wh-layer-heading>span{font-size:10px;color:#839473;font-variant-numeric:tabular-nums}
.wh-map-editor .wh-layer-heading button{margin-left:auto;width:24px;min-height:24px;padding:4px;background:transparent;border:0;color:#9daf8e;border-radius:4px}
.wh-map-editor .wh-layer-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:3px 8px 8px;border-bottom:1px solid #2b3424}
.wh-map-editor .wh-layer-tools button{display:flex;align-items:center;justify-content:center;min-height:28px;padding:5px;background:#1c2417;border:1px solid #303d26;border-radius:4px;color:#cad8ba}
.wh-map-editor .wh-layer-tools button:disabled{opacity:.28}
.wh-layer-tools svg,.wh-layer-heading svg,.wh-layer-lock svg{width:16px;height:16px;display:block}
.wh-layer-list{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;padding:4px;scrollbar-width:thin;scrollbar-color:#3a4930 transparent}
.wh-layer-row{display:flex;align-items:center;position:relative;border-radius:4px;min-width:0;outline-offset:-1px}
.wh-layer-row[draggable=true]{cursor:grab}
.wh-map-editor .wh-layer-select{display:flex;align-items:center;gap:7px;min-width:0;flex:1;text-align:left;border:0;background:transparent;color:#bcc8af;border-radius:4px;padding:7px 5px;min-height:42px;cursor:inherit}
.wh-map-editor .wh-layer-select>span{min-width:0;display:grid;gap:2px}
.wh-layer-select b{font-size:10px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.wh-layer-select small{font-size:9px;font-weight:400;color:#75876a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.wh-layer-swatch{display:block;width:24px;height:24px;flex:none;border:1px solid var(--layer-color);border-radius:3px;background:color-mix(in srgb,var(--layer-color) 10%,#0c100a);box-shadow:inset 0 0 0 3px #0c100a}
.wh-layer-row:hover{background:#ffffff05}
.wh-layer-row:has(.wh-layer-select[aria-pressed=true]){background:#c9d98c10;box-shadow:inset 2px 0 #c9d98c}
.wh-layer-select[aria-pressed=true]{color:#edf1e5}
.wh-map-editor .wh-layer-lock{flex:none;width:22px;min-height:26px;margin-right:3px;padding:4px 3px;background:transparent;border:0;border-radius:4px;color:#8c9d7a}
.wh-layer-lock[aria-pressed=false]{opacity:.35}
.wh-layer-row:hover .wh-layer-lock,.wh-layer-lock:focus-visible{opacity:1}
.wh-map-editor .wh-layer-tools button:hover:not(:disabled),.wh-map-editor .wh-layer-lock:hover,.wh-map-editor .wh-layer-heading button:hover{background:#303d26;color:#eef4e4}
.wh-layer-row.is-layer-dragging{opacity:.4}
.wh-layer-row.is-drop-before:before,.wh-layer-row.is-drop-after:after{content:'';position:absolute;left:2px;right:2px;height:2px;background:#d0d891;pointer-events:none;z-index:1}
.wh-layer-row.is-drop-before:before{top:0}.wh-layer-row.is-drop-after:after{bottom:0}
.wh-layers-empty{margin:20px 8px;color:#7f9070;font-size:10px}
.wh-map-editor [data-map-layers][aria-pressed=true]{color:#dbe7c8!important}
@media(max-width:1000px) and (min-width:721px){
 .wh-map.wh-map-editor{--layers-width:156px}
 .wh-map.wh-map-editor .wh-map-layout,.wh-map.wh-map-editor.is-panel-hidden .wh-map-layout,.wh-map.wh-map-editor:has(.wh-map-inspector:empty) .wh-map-layout{grid-template-columns:var(--layers-width) minmax(0,1fr)}
 .wh-map.wh-map-editor .wh-map-layers{grid-row:1/3}
 .wh-map.wh-map-editor .wh-map-inspector{grid-column:2;max-height:300px}
 .wh-map.wh-map-editor.is-layers-hidden .wh-map-layout{grid-template-columns:minmax(0,1fr)}
 .wh-map.wh-map-editor.is-layers-hidden .wh-map-inspector{grid-column:1}
}
@media(max-width:720px){
 .wh-map.wh-map-editor{--layers-height:clamp(360px,calc(100dvh - 255px),800px)}
 .wh-map.wh-map-editor .wh-map-layout,.wh-map.wh-map-editor.is-panel-hidden .wh-map-layout,.wh-map.wh-map-editor.is-layers-hidden .wh-map-layout,.wh-map.wh-map-editor:has(.wh-map-inspector:empty) .wh-map-layout{grid-template-columns:minmax(0,1fr)}
 .wh-map.wh-map-editor .wh-map-layers{position:absolute;left:0;top:0;width:min(210px,80%);z-index:30;box-shadow:12px 0 24px #0005}
}

/* Always-visible object actions; the floating menu is outside the scrolling panel. */
.wh-map-editor .wh-layer-more{display:flex;align-items:center;justify-content:center;flex:none;width:22px;min-height:28px;padding:3px;margin-right:2px;background:transparent;border:0;border-radius:4px;color:#9daf8e;cursor:pointer}
.wh-layer-more svg{display:block;width:16px;height:16px}
.wh-map-editor .wh-layer-lock{margin-right:0}
.wh-map-editor .wh-layer-more:hover,.wh-map-editor .wh-layer-more[aria-expanded=true]{background:#303d26;color:#eef4e4}
.wh-layer-more:focus-visible,.wh-layer-lock:focus-visible{outline:1px solid #c9d98c;outline-offset:-1px}
.wh-layer-select>span{flex:1}
.wh-layer-swatch{width:20px;height:22px}
