#maps-workspace,.campaign-maps{min-width:0;--surface:var(--panel);--ink:var(--paper);}
.map-heading,.map-viewer-heading,.map-viewer-heading>div,.map-card-actions,.map-review{display:flex;align-items:center;justify-content:space-between;gap:.7rem;flex-wrap:wrap}.map-heading{margin-bottom:1rem}.map-heading h2,.map-viewer h2{margin:.1rem 0}.map-heading p{margin:.25rem 0}.map-catalog-filters{max-width:28rem;margin-bottom:1rem}.map-catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:1rem}.map-card{border:1px solid var(--line);background:var(--surface);overflow:hidden}.map-card>div:last-child{padding:1rem}.map-card-preview{height:190px;background:var(--map-canvas-bg);display:grid;place-items:center}.map-card-preview img{width:100%;height:100%;object-fit:cover}.map-card-preview>svg{width:3rem;height:3rem;color:var(--muted)}.map-card h3{margin:.5rem 0}.map-card p{margin:.3rem 0}.map-card-actions{justify-content:flex-start;margin-top:1rem}.map-status{font-size:.76rem;padding:.2rem .5rem;border:1px solid var(--line);color:var(--muted)}.map-status[data-status=pending]{color:var(--gold)}.map-status[data-status=approved]{color:var(--map-success)}.map-status[data-status=failed],.map-status[data-status=rejected],.map-dialog-error{color:var(--map-error)}.map-empty{padding:2rem;text-align:center;color:var(--muted)}.map-viewer{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);min-height:560px;height:calc(100dvh - 160px)}.map-viewer:fullscreen{height:100dvh;width:100vw}.map-viewer-heading{padding:.65rem .8rem;border-bottom:1px solid var(--line);flex-shrink:0}.map-viewer-heading h2{font-size:1.25rem}.map-viewer-heading small{color:var(--muted)}.map-viewer svg,.map-dialog svg{width:22px;height:22px;flex-shrink:0;vertical-align:middle}.map-viewer .button{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.45rem .6rem;font-size:.8rem}.map-viewer [data-map-error]:empty{display:none}.map-review,.map-reason{padding:.5rem .8rem;margin:0}.map-review{justify-content:flex-start}.map-toolbar{display:flex;gap:.25rem;align-items:center;flex-wrap:wrap;padding:.4rem;border-bottom:1px solid var(--line);flex-shrink:0}.map-toolbar button{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-width:36px;min-height:36px;padding:.35rem .5rem;border:1px solid transparent;background:transparent;color:var(--ink);font-size:.8rem;cursor:pointer}.map-toolbar button:hover{background:var(--surface-alt,var(--bg))}.map-toolbar button[aria-pressed=true],.map-toolbar button[aria-pressed=true]:hover{color:var(--gold);border-color:var(--gold);background:var(--bg)}.map-toolbar button:disabled{opacity:.35;cursor:default}.map-toolbar output{min-width:3.5rem;text-align:center;font-size:.8rem}.map-tool-divider{height:26px;border-left:1px solid var(--line);margin:0 .25rem}.map-draw-options{display:flex;gap:1rem;flex-wrap:wrap;align-items:center;padding:.4rem .7rem;border-bottom:1px solid var(--line)}.map-draw-options[hidden]{display:none}.map-palette{display:flex;gap:5px;flex-wrap:wrap}.map-palette button{width:26px;height:26px;border:2px solid transparent;background:var(--swatch);border-radius:50%;cursor:pointer;box-shadow:inset 0 0 0 1px var(--map-swatch-edge)}.map-palette button[aria-pressed=true]{outline:2px solid var(--gold);outline-offset:2px}.map-draw-options label{display:flex;align-items:center;gap:.5rem;font-size:.8rem}.map-draw-options input{width:120px;min-height:0;padding:0}.map-draw-options output{width:3rem}.map-surface-wrap{position:relative;flex:1;min-height:250px;overflow:hidden}.map-surface{display:block;width:100%;height:100%;position:absolute;inset:0;touch-action:none;cursor:grab}.map-surface:active{cursor:grabbing}.map-surface[data-tool=stroke],.map-surface[data-tool=position],.map-surface[data-tool=laser]{cursor:crosshair}.map-surface[data-tool=text]{cursor:text}.map-viewport-status{position:absolute;bottom:.5rem;left:.6rem;margin:0;pointer-events:none;font-size:.75rem;color:var(--map-status-text);background:var(--map-status-bg);padding:.2rem .5rem}.map-viewport-status:empty{display:none}.map-hint{font-size:.72rem;color:var(--muted);padding:.35rem .7rem;display:flex;justify-content:space-between;gap:1rem;border-top:1px solid var(--line)}.map-history{position:absolute;right:.6rem;top:.6rem;bottom:.6rem;width:min(270px,75%);overflow:auto;background:var(--surface);border:1px solid var(--line);padding:.8rem}.map-history h3{font-size:1rem;margin:0 0 .5rem}.map-history ol{padding:0;list-style:none}.map-history button{display:flex;flex-direction:column;text-align:left;gap:.2rem;width:100%;padding:.6rem;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);cursor:pointer}.map-history time,.map-history span{font-size:.7rem;color:var(--muted)}.map-dialog{--surface:var(--panel);--ink:var(--paper);position:fixed;width:min(580px,calc(100vw - 2rem));max-height:90dvh;overflow:auto;padding:1.5rem;color:var(--ink);background:var(--surface);border:1px solid var(--line)}.map-dialog::backdrop{background:var(--map-backdrop);backdrop-filter:blur(3px)}.map-dialog h2{padding-right:2rem;font-size:1.6rem;margin:.1rem 0 1rem}.map-dialog-close{position:absolute;right:.6rem;top:.6rem}.map-dialog-close button{border:0;background:transparent;color:var(--muted);cursor:pointer;padding:.4rem}.map-dialog label{display:flex;flex-direction:column;gap:.4rem;margin:.8rem 0}.map-dialog p{font-size:.85rem}.map-dialog progress{width:100%;accent-color:var(--gold)}.map-dialog-error:empty{display:none}.map-detached{margin:0!important;padding:0!important;overflow:hidden}.map-detached #maps-workspace{height:100dvh}.map-detached .map-viewer{height:100dvh;min-height:0;border:0}.map-detached .map-viewer-heading{padding:.4rem .6rem}.map-detached .map-hint{display:none}
@media(max-width:760px){.map-viewer{height:calc(100dvh - 155px);min-height:450px}.map-toolbar button span{display:none}.map-viewer-heading{gap:.3rem}.map-viewer-heading h2{font-size:1rem}.map-viewer-heading small{font-size:.65rem}.map-viewer-heading .button span{display:none}.map-toolbar{gap:.1rem}.map-hint{font-size:.65rem}.map-palette{max-width:260px}.map-catalog{grid-template-columns:1fr}.map-detached .map-viewer{min-height:0}}

.map-viewer-heading>div{min-width:0}.map-viewer-heading h2,.map-card h3,.map-history button{overflow-wrap:anywhere}
