.map-stage:not(.axon-stage){background:transparent!important}
.plan-floor-shape{position:absolute;inset:0;pointer-events:none;background-color:var(--rx-surface);background-image:linear-gradient(rgba(var(--rx-accent-soft-rgb),0.176) 1px,transparent 1px),linear-gradient(90deg,rgba(var(--rx-accent-soft-rgb),0.176) 1px,transparent 1px)}
.grid-hidden .plan-floor-shape{background-image:none}
.plan-outline-layer,.plan-clearance-layer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.plan-outline-layer polygon{fill:none;stroke:var(--rx-line-strong);stroke-width:.1;vector-effect:non-scaling-stroke;stroke-width:3px}
.plan-clearance-layer{z-index:20;color:var(--rx-accent)}
.plan-clearance-layer line,.axon-stage [data-clearance-layer] line{stroke:var(--rx-accent);stroke-width:1.5px;vector-effect:non-scaling-stroke;stroke-dasharray:4 3}
.plan-clearance-layer text,.axon-stage [data-clearance-layer] text{fill:var(--rx-accent);paint-order:stroke;stroke:var(--rx-line);stroke-width:.045;font-weight:700;text-anchor:middle}
.map-footprint-hu{pointer-events:none}
.map-area{transition:box-shadow .15s!important;touch-action:none}
.map-area.drag-invalid,.axon-area.drag-invalid polygon,.map-draft-ghost.invalid{outline:3px solid var(--rx-danger);background-color:rgba(var(--rx-danger-soft-rgb),0.22)!important;stroke:var(--rx-danger)!important}
.axon-stage{background:radial-gradient(ellipse at 50% 50%,var(--rx-surface),var(--rx-soft))!important;display:block;min-width:0;overflow:visible;touch-action:none;border:0!important}
.axon-stage .axon-area{cursor:grab}.axon-stage .axon-area:hover{filter:brightness(1.07)}
.axon-label{fill:var(--rx-text);font-weight:750;pointer-events:none;paint-order:stroke;stroke:var(--rx-line);stroke-width:.045}
.axon-grid,.axon-stage text{pointer-events:none}
.axon-stage .map-selection-box,.axon-stage .map-draw-preview{fill:rgba(var(--rx-accent-rgb),0.18);stroke:var(--rx-accent);stroke-width:.08;pointer-events:none}
.axon-stage [hidden]{display:none}.axon-area.draft{opacity:.65;pointer-events:none}
/* Selection is semantic, separate from warning/occupancy colours. */
:root{--rx-selection:#0075b7;--rx-selection-soft:#d7f4ff;--rx-selection-backing:#fff}
[data-theme=dark]{--rx-selection:#47d9ff;--rx-selection-soft:#163d4a;--rx-selection-backing:#10202a}
.warehouse-page .map-area.selected,.warehouse-page .map-area.multi-selected{outline:3px solid var(--rx-selection)!important;outline-offset:2px;box-shadow:0 0 0 6px var(--rx-selection-backing)!important;z-index:4}
.warehouse-page .rack-bay-hit.selected{box-shadow:inset 0 0 0 3px var(--rx-selection)!important;background-color:var(--rx-selection-soft)!important}
.warehouse-page .rack-face-view .rack-cell.selected{outline:3px solid var(--rx-selection)!important;outline-offset:-3px;box-shadow:inset 0 0 0 6px var(--rx-selection-backing)!important}
.rack-cell.selected .rack-cargo-caption{border-color:var(--rx-selection)!important}
.axon-selection-edge{stroke:var(--rx-selection);stroke-width:3px;vector-effect:non-scaling-stroke;paint-order:stroke;pointer-events:none;filter:drop-shadow(0 0 1px var(--rx-selection-backing))}
.axon-selection-column{fill:var(--rx-selection-soft);fill-opacity:.55;stroke:var(--rx-selection);stroke-width:3px;vector-effect:non-scaling-stroke;pointer-events:none}
.axon-area.selected .axon-label{fill:var(--rx-selection);font-weight:900;stroke:var(--rx-selection-backing)}
.axon-area:focus-visible{outline:none;filter:drop-shadow(0 0 3px var(--rx-selection))}
.scene-area-selection{position:absolute;left:14px;top:180px;z-index:8;display:grid;gap:5px;max-width:min(300px,65%);padding:12px;border:2px solid var(--rx-selection);border-radius:9px;background:var(--rx-surface);color:var(--rx-text);box-shadow:0 0 0 2px var(--rx-selection-backing);font-size:calc(12px * var(--ui-font-scale,1))}
.scene-area-selection[hidden]{display:none}.scene-area-selection strong{font-size:calc(17px * var(--ui-font-scale,1));color:var(--rx-selection)}.scene-area-selection small{color:var(--rx-muted)}
.scene-area-selection details>summary{cursor:pointer}.scene-area-selection output{display:block}
.scene-object-list{position:absolute;right:12px;bottom:72px;z-index:9;width:min(280px,65%);max-height:50%;overflow:auto;background:var(--rx-surface);border:1px solid var(--rx-line-strong);border-radius:9px;padding:8px;color:var(--rx-text);font-size:calc(11px * var(--ui-font-scale,1))}.scene-object-list summary{cursor:pointer;font-weight:700;min-height:28px}.scene-object-list [role=group]{display:grid;gap:4px;margin-top:8px}.scene-object-list button{padding:7px;border:1px solid var(--rx-line);border-radius:5px;text-align:left;color:var(--rx-text);background:var(--rx-soft);min-height:36px}.scene-object-list button[aria-pressed=true]{border:2px solid var(--rx-selection);background:var(--rx-selection-soft)}
.shared-cell-select{grid-column:1/-1;border:1px solid var(--rx-line-strong);background:var(--rx-surface);color:var(--rx-text);min-height:24px}.shared-shelf-box:focus-visible,.shared-cell-select:focus-visible{outline:3px solid var(--rx-selection);outline-offset:-3px}
.plan-outline-layer .plan-wall{stroke:var(--rx-line-strong);stroke-width:3px;vector-effect:non-scaling-stroke}.plan-outline-layer .plan-opening{stroke:var(--rx-selection);stroke-width:2px;stroke-dasharray:4 4;vector-effect:non-scaling-stroke}.axon-wall-panel{fill:#a3b5c2;fill-opacity:.07;stroke:var(--rx-map-ink);stroke-width:1px;vector-effect:non-scaling-stroke;pointer-events:none}.map-area.wall,.map-area.column{background:repeating-linear-gradient(135deg,var(--rx-line-strong),var(--rx-line-strong) 4px,var(--rx-soft) 4px,var(--rx-soft) 6px)!important;border-color:var(--rx-map-ink)!important}
@media(max-width:640px){.scene-area-selection{top:auto;bottom:75px;left:8px;padding:8px;max-width:65%;font-size:11px}.scene-area-selection strong{font-size:14px}}
.draft-placement-banner{flex-wrap:wrap;position:relative;z-index:30}
.draft-placement-banner.invalid{background:var(--rx-danger-soft);color:var(--rx-danger);border-color:var(--rx-danger)}
.draft-placement-banner label{display:flex;align-items:center;gap:6px}.draft-placement-banner input{width:82px!important}
.rack-face-view .rack-cell>.shared-shelf-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;padding:7px;align-content:end;width:100%;height:100%;position:absolute;inset:0;z-index:3;overflow:auto;white-space:normal}
.shared-shelf-box{background:linear-gradient(135deg,var(--rx-soft),var(--rx-surface-muted));border:1px solid var(--rx-line-strong);border-radius:3px;box-shadow:2px 3px 0 rgba(var(--rx-shadow-color-rgb),0.2);padding:3px;display:flex;flex-direction:column;min-width:0;color:var(--rx-text);text-align:left;cursor:pointer}
.shared-shelf-box b{font-size:clamp(7px,1vw,12px);overflow:hidden;text-overflow:ellipsis}
.shared-shelf-box small,.shared-shelf-box em{font-size:9px;font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shared-shelf-box.selected{outline:3px solid var(--rx-accent)}.shared-shelf-box.planned{background:rgba(var(--rx-info-soft-rgb),0.188);border:1px dashed var(--rx-info)}
.shared-cell:before{border-bottom:4px solid var(--rx-line-strong)!important}
.shared-location-summary{padding:14px;background:var(--rx-surface);border:1px solid var(--rx-line);border-radius:12px;margin-top:12px}
.shared-location-summary p{font-size:12px;margin:8px 0}.shared-location-summary button{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;width:100%;margin:5px 0;padding:10px;border:1px solid var(--rx-line);border-radius:8px;background:var(--rx-surface);text-align:left}
.shared-location-summary button.active{border-color:var(--rx-accent);background:var(--rx-surface)}.shared-location-summary button span{font-size:12px}
.hall-outline-editor{padding:18px;border:1px solid var(--rx-line);border-radius:14px;background:var(--rx-surface);margin-top:15px}
.outline-heading{display:flex;justify-content:space-between;gap:18px;align-items:center}.outline-heading h3{margin:0}.outline-heading p{font-size:12px;max-width:580px}
.outline-workspace{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:15px}.outline-workspace svg{width:100%;height:340px;background:linear-gradient(var(--rx-surface),var(--rx-soft));border:1px solid var(--rx-line);border-radius:10px;touch-action:none}
.outline-workspace circle{cursor:move}.outline-workspace text{pointer-events:none;fill:var(--rx-text);font-weight:700}
[data-outline-coordinates]{max-height:290px;overflow:auto}.outline-coordinate{display:grid;grid-template-columns:20px 1fr 1fr;gap:6px;align-items:center;margin:5px 0}.outline-coordinate input{width:100%;min-width:0;padding:6px!important}
[data-outline-status].invalid{color:var(--rx-danger)}.outline-workspace button{padding:8px;font-size:12px;border:1px solid var(--rx-line);border-radius:7px;background:var(--rx-surface)}
@media(max-width:650px){.outline-workspace{grid-template-columns:1fr}.outline-heading{align-items:stretch;flex-direction:column}.outline-workspace svg{height:270px}[data-outline-coordinates]{max-height:150px}.shared-location-summary button span{overflow-wrap:anywhere}.draft-placement-banner span{flex-basis:100%}}

.rack-face-view.fit-small .rack-cell>.shared-shelf-items{display:grid}.rack-face-view.fit-tiny .shared-shelf-box small,.rack-face-view.fit-tiny .shared-shelf-box em{display:none}.shared-shelf-box{min-height:0;overflow:hidden}.rack-face-view .shared-shelf-box b{font-size:clamp(7px,calc(var(--face-cell-w) * .032),14px)}

.map-draft-ghost.placement-overlay{position:absolute;inset:0;width:100%;height:100%;background:none!important;border:0;pointer-events:none;z-index:25}.placement-piece{position:absolute;background:rgba(var(--rx-accent-soft-rgb),0.333);border:2px dashed var(--rx-accent);display:grid;place-items:center;font-size:11px}.placement-overlay.invalid .placement-piece{border-color:var(--rx-danger);background:rgba(var(--rx-danger-soft-rgb),0.314)}.map-draft-ghost.placement-overlay.invalid{outline:none;background:none!important}

.rack-face-view .rack-cell>.shared-shelf-items{inset:var(--rack-content-top,4px) var(--rack-content-right,7px) var(--rack-content-bottom,12px) var(--rack-content-left,7px);height:auto;width:auto;padding:0;z-index:2;align-content:start}.shared-shelf-box{min-height:clamp(28px,calc(var(--face-cell-w) * .17),150px)}
.rack-face-view .shared-shelf-box b{font-size:clamp(8px,calc(var(--face-cell-w) * .045),36px);line-height:1.2}
.rack-face-view .shared-shelf-box small,.rack-face-view .shared-shelf-box em{font-size:clamp(7px,calc(var(--face-cell-w) * .032),24px);line-height:1.25}
.rack-face-view .shared-shelf-items>.rack-slot-note{grid-column:1/-1;align-self:center;justify-self:center;min-width:0;max-width:100%;margin:8px 0;padding:3px 5px;color:var(--rx-muted);font-size:clamp(8px,calc(var(--face-cell-w) * .04),28px);overflow-wrap:anywhere;text-align:center}

@media(max-width:640px){.scene-area-selection{bottom:135px;max-width:calc(100% - 16px)}.scene-object-list{right:8px;bottom:87px;width:calc(100% - 16px);max-height:45%;box-sizing:border-box}.scene-object-list[open]{z-index:12}.scene-object-list button{min-height:44px}.scene-object-list summary{min-height:28px}.scene-area-selection details{max-height:150px;overflow:auto}.scene-caption .planner-shortcuts{display:flex;flex-wrap:wrap}}

.scene-card-disclosure{display:none}
.scene-card-body{display:grid;gap:4px}
@media (max-width:850px){
  /* Arrange interactive controls in separate rows. A selected load with a long move plan
     must never occupy the same pointer targets as the list or walk buttons. */
  .warehouse-page [data-scene-root].walkthrough{
    display:grid;grid-template-columns:minmax(0,1fr);gap:5px;align-content:start;
    height:auto!important;min-height:0;max-height:none;overflow:visible;
    padding-bottom:max(8px,env(safe-area-inset-bottom));
  }
  .warehouse-page [data-scene-root] .warehouse-viewport{grid-row:1;width:100%;height:clamp(220px,45svh,430px)!important;min-height:0}
  .warehouse-page [data-scene-root] :is(.scene-pallet-card,.scene-object-list,.scene-area-selection,.scene-hud-bottom,.scene-visual-panel,.scene-plan-legend,.scene-move-banner,.scene-floating-hu,.scene-edit-banner){
    position:relative;inset:auto;transform:none;justify-self:stretch;width:auto;max-width:none;margin:0 6px;
  }
  .warehouse-page [data-scene-root] .scene-hud-bottom{grid-row:2;display:flex;flex-wrap:wrap;gap:4px;align-items:stretch;flex-direction:column}
  .warehouse-page [data-scene-root] :is(.scene-navigation,.scene-control-cluster){display:flex;flex-wrap:wrap;justify-content:center;pointer-events:auto}
  .warehouse-page [data-scene-root] .scene-navigation button{min-height:40px;min-width:40px}
  .warehouse-page [data-scene-root] .scene-pallet-card{grid-row:3;padding:5px 8px}
  .warehouse-page [data-scene-root] .scene-card-disclosure{display:block;width:100%;min-height:40px;text-align:left}
  .warehouse-page [data-scene-root] .scene-card-disclosure[aria-expanded=false]+.scene-card-body{display:none}
  .warehouse-page [data-scene-root] .scene-card-body,.warehouse-page [data-scene-root] .scene-object-list[open]{max-height:clamp(135px,43svh,350px);overflow:auto;overscroll-behavior:contain}
  .warehouse-page [data-scene-root] .scene-object-list{max-height:none}
  .warehouse-page [data-scene-root] .scene-photo-panel{position:fixed;inset:5svh 3vw max(12svh,75px);height:auto;z-index:55}
  .warehouse-page [data-scene-root] .scene-resize-grip{display:none}
  .warehouse-page [data-scene-root] :is(summary,button){scroll-margin-block:60px max(85px,env(safe-area-inset-bottom))}
  .warehouse-page [data-scene-root] .scene-crosshair{top:min(22svh,180px)}
  .warehouse-page .planner-workspace{scroll-margin-top:70px}
}
.map-match-pages{display:flex;gap:8px}.map-match-pages button{flex:1}
@media(max-width:850px){.warehouse-page .map-stage-head{scroll-margin-top:76px}}
.rack-face-view .rack-matrix-bay[data-load-key]:not([data-load-key=""]){box-shadow:inset 0 -5px var(--rack-load)}
.warehouse-page .load-heat .rack-bay-hit.selected{background:var(--load-color)!important;outline:2px solid var(--rx-selection)}
.axon-stage:has([data-load-key]) .axon-selection-column{fill:none;pointer-events:none}
.personal-map-list{display:grid;gap:.6rem;list-style:none;padding:0}
.personal-map-list li{display:grid;gap:.4rem;padding:.7rem;border:1px solid var(--rx-line);border-radius:8px;overflow-wrap:anywhere}
.personal-map-list summary{cursor:pointer;padding:.4rem}.personal-map-list .card-actions{align-items:center;flex-wrap:wrap}
.shared-map-item[data-personal-selection]{outline:2px solid var(--rx-selection)}
