.unit-map{min-width:0}.map-toolbar{display:flex;align-items:end;flex-wrap:wrap;gap:16px;margin-bottom:18px}
.map-toolbar .search-field{min-width:240px;max-width:380px;flex:1}.map-toolbar input{min-height:44px}
.map-layer{display:grid;gap:6px;min-width:190px;margin:0;font-size:.875rem;font-weight:400}.map-layer>span{color:var(--muted)}.map-layer select{min-height:44px}
.map-edit-actions{display:flex;gap:8px;margin-left:auto}.map-edit-actions:empty{display:none}
.map-legend{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.map-legend-item{display:inline-flex;align-items:center;gap:8px;min-height:37px;font:inherit;font-size:.8125rem;color:var(--muted);border:1px solid transparent;background:transparent;padding:7px 10px;border-radius:8px;cursor:pointer}
.map-legend-item:hover{background:white}.map-legend-item.active{background:white;border-color:var(--line);color:var(--ink)}.map-legend-item>strong{font-size:.8125rem;font-weight:600;margin-left:2px}
.map-dot{width:10px;height:10px;border-radius:3px;background:var(--map-front);border:1px solid var(--map-edge);flex:none}
.tone-danger{--map-fill:#fff0ee;--map-edge:#d78980;--map-front:#a63f35;--map-ink:#8d322a}
.tone-warning{--map-fill:#fff5df;--map-edge:#d5b873;--map-front:#a7751c;--map-ink:#805713}
.tone-success{--map-fill:#e9f5ee;--map-edge:#99c6ac;--map-front:#39805a;--map-ink:#21633f}
.tone-info{--map-fill:#eaf1fc;--map-edge:#9db8dd;--map-front:#4b77b1;--map-ink:#355f96}
.tone-brand{--map-fill:#dff3ed;--map-edge:#78bca9;--map-front:#087e74;--map-ink:#07675e}
.tone-neutral{--map-fill:#edf1f3;--map-edge:#b7c3c9;--map-front:#758790;--map-ink:#52656f}
.map-workspace{display:grid;grid-template-columns:minmax(0,1fr) 294px;gap:20px;align-items:start}
.map-board{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;min-width:0}
.map-board-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;min-height:58px;padding:12px 16px;border-bottom:1px solid var(--line);font-size:.8125rem;color:var(--muted)}
.map-zoom{display:flex;align-items:center;gap:5px}.map-zoom button{display:grid;place-items:center;min-width:32px;min-height:32px;padding:4px 8px;font:inherit;background:white;border:1px solid var(--line);border-radius:6px;color:var(--ink);cursor:pointer}
.map-zoom button:hover{background:var(--surface-soft)}.map-zoom button:last-child{margin-left:5px;white-space:nowrap}.map-zoom>span{min-width:42px;text-align:center;font-variant-numeric:tabular-nums}
.map-viewport{height:480px;min-width:0;overflow:auto;overscroll-behavior:contain;background:#f5f8f9;cursor:grab;touch-action:pan-x pan-y;scrollbar-width:thin}
.map-viewport:active{cursor:grabbing}.map-surface{position:relative;min-width:100%;min-height:100%}
.map-plane{position:absolute;inset:0 auto auto 0;transform-origin:0 0;background-image:radial-gradient(#cbd7dc 1px,transparent 1px);background-size:32px 26px}
.map-box{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:1px solid var(--map-edge);border-radius:7px;background:var(--map-fill);color:var(--map-ink);font:inherit;text-align:center;box-shadow:0 2px 1px #20313808;cursor:pointer;padding:9px 5px 12px;transition:box-shadow .12s,opacity .12s}
.map-box:hover{box-shadow:0 0 0 3px #14262e1a;z-index:1}.map-box:focus-visible{outline:3px solid #14262e;outline-offset:4px;z-index:3}
.map-box{-webkit-tap-highlight-color:transparent}
.map-box.selected{outline:3px solid #14262e;outline-offset:3px;z-index:2;box-shadow:0 5px 12px #14262e20}
.map-box>strong{font-size:1.12rem;font-weight:700;line-height:1.3;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.map-box>small{font-size:.6875rem;line-height:1.3;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.85}
.map-box-status{font-size:.625rem;line-height:1.3;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px}
.map-box-front{position:absolute;bottom:3px;left:16px;right:16px;height:4px;border-radius:2px;background:var(--map-front)}
.map-box.is-dimmed{opacity:.15;filter:grayscale(1);cursor:default}.map-box:disabled{opacity:.15}
.map-detail{border:1px solid var(--line);border-radius:12px;background:#fff;padding:22px;min-width:0;position:sticky;top:18px}
.map-selection-empty{min-height:255px;display:flex;flex-direction:column;justify-content:center;text-align:center;gap:12px;color:var(--muted)}
.map-selection-empty h2{font-size:1.0625rem;color:var(--ink);margin:0}.map-selection-empty p{font-size:.9375rem;line-height:1.65;margin:0}
.map-empty-symbol{display:grid;place-items:center;width:48px;height:48px;margin:0 auto 4px;border-radius:12px;background:var(--brand-soft);color:var(--brand);font-size:1.7rem}
.map-detail-heading{display:flex;align-items:start;gap:10px;justify-content:space-between;margin-bottom:15px}.map-detail-heading h2{font-size:1.2rem;margin-top:5px;overflow-wrap:anywhere}
.map-detail-heading .icon-button{flex:none;width:28px;height:28px;font-size:1.3rem}.map-overline{font-size:.6875rem;letter-spacing:.06em;color:var(--muted)}
.map-detail-state{display:inline-flex;align-items:center;background:var(--map-fill);color:var(--map-ink);border:1px solid var(--map-edge);border-radius:6px;padding:5px 8px;font-size:.8125rem;line-height:1.4}
.map-balance{padding:19px 0 17px;border-bottom:1px solid var(--line);margin-bottom:17px}.map-balance>span{display:block;font-size:.875rem;color:var(--muted)}
.map-balance>strong{display:block;font-size:1.6rem;letter-spacing:-.03em;line-height:1.4;margin:6px 0;color:var(--ink-strong)}.map-balance>small{font-size:.8125rem;color:var(--danger);line-height:1.6}
.map-facts{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.map-facts>div{display:grid;gap:3px}.map-facts>div:has(dd){min-width:0}.map-facts dt{font-size:.8125rem;color:var(--muted)}.map-facts dd{margin:0;font-size:.9375rem;overflow-wrap:anywhere;color:var(--ink)}
.map-caption{font-size:.8125rem;line-height:1.6;color:var(--muted);padding:13px 16px;border-top:1px solid var(--line);margin:0}
.map-editor-bar{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:14px 16px;background:#f1f8f5;border-top:1px solid var(--brand-line);font-size:.8125rem;color:var(--brand-hover)}
.map-editor-bar>div{display:flex;gap:12px;flex-wrap:wrap;justify-content:flex-end}.map-editor-bar button{font-size:.8125rem;min-height:32px}.map-editor-bar button:disabled{opacity:.4}
.is-editing .map-box{cursor:move;touch-action:none}.is-editing .map-plane{background-size:128px 104px;background-position:24px 24px;background-image:linear-gradient(to right,#cbd7dc70 1px,transparent 1px),linear-gradient(to bottom,#cbd7dc70 1px,transparent 1px)}
.map-tip{font-size:.8125rem;color:var(--muted);line-height:1.6;margin-top:16px}.map-message{font-size:.875rem;line-height:1.6;color:var(--muted);margin-top:12px;min-height:1.4em}
@media(min-width:1500px){.map-viewport{height:540px}}
@media(max-width:1100px){.map-workspace{grid-template-columns:minmax(0,1fr) 264px;gap:16px}.map-detail{padding:18px}.map-toolbar .search-field{min-width:220px}.map-edit-actions{margin-left:0}}
@media(max-width:950px){.map-workspace{grid-template-columns:1fr}.map-detail{position:static}.map-selection-empty{min-height:0;display:block;text-align:left}.map-empty-symbol{display:none}.map-selection-empty p{margin-top:8px}.map-facts{grid-template-columns:1fr 1fr;column-gap:20px}.map-balance{margin-bottom:0}.map-detail-actions .button{width:auto;min-width:170px}}
@media(max-width:600px){.map-toolbar{display:grid;grid-template-columns:1fr;gap:14px}.map-toolbar .search-field{min-width:0;max-width:none;width:100%}.map-layer{min-width:0}.map-edit-actions{justify-content:flex-end}.map-edit-actions .button{min-height:44px}.map-legend{gap:3px;margin-bottom:14px}.map-legend-item{padding:7px;font-size:.8125rem;min-height:38px}.map-board-bar{padding:12px;align-items:center}.map-viewport{height:360px}.map-zoom{gap:4px}.map-zoom button{min-width:33px;min-height:36px}.map-zoom button:last-child{padding-inline:7px}.map-zoom>span{min-width:36px}.map-caption{padding:12px;font-size:.8125rem}.map-editor-bar{padding:12px;align-items:start;flex-direction:column}.map-editor-bar>div{justify-content:flex-start}.map-facts{grid-template-columns:1fr 1fr}.map-detail{padding:20px}.map-message{font-size:.8125rem}}
