
/* One shared control vocabulary for the map, figure dialogs and presentation. */
.map-glyph{width:20px;height:20px;flex:0 0 20px;vertical-align:middle}
.btn:has(>.map-glyph){display:inline-flex;align-items:center;justify-content:center;gap:8px;line-height:1.3}
.map-button-label{min-width:0}.close .map-glyph{pointer-events:none}
.gm-commandbar{position:absolute;top:calc(54px + env(safe-area-inset-top));left:8px;z-index:12;display:flex;gap:6px}
.map-command-menu>summary{display:flex;gap:7px;align-items:center;min-height:44px;padding:10px 12px;font-weight:650;font-size:13px}
.map-command-menu[open]>summary{background:var(--forest,#173c32);border-color:var(--forest,#173c32);color:#fff}
.map-command-menu>.map-command-panel{left:0;right:auto;width:340px;min-width:0;max-width:calc(100vw - 24px);max-height:calc(100dvh - 210px);overflow-y:auto;overscroll-behavior:contain;padding:12px;gap:16px}
.map-command-section{display:grid;gap:6px;margin:0;padding:0 0 14px;border-bottom:1px solid var(--line)}
.map-command-section:last-child{padding-bottom:0;border-bottom:0}
.map-command-section h3{font-size:12px;letter-spacing:.04em;color:var(--muted);margin:0 0 3px}
.map-command-section .btn{justify-content:flex-start;width:100%;min-height:42px;padding:9px 10px;font-size:13px;text-align:left;border-radius:7px}
.map-command-section .btn:not(.primary):not(.danger){background:#faf7ed;border-color:#ded5bc;color:var(--ink)}
.map-command-section .btn:hover:not(:disabled){border-color:#9f8348;background:#eee5cf}
.map-command-section .btn.primary:hover{background:var(--forest,#173c32);color:#fff}
.map-command-section small{font-size:11px;color:var(--muted);line-height:1.5}
.map-command-section select{width:100%;max-width:100%;min-height:44px}
.map-command-section .map-audience{font-size:12px;margin:0 0 4px}
.map-scene-status{position:absolute;top:58px;right:12px;z-index:5;display:grid;max-width:calc(100% - 425px);padding:6px 10px;background:#fffdf3ed;border-radius:8px;font-size:13px}
.map-scene-status strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.map-scene-status small{font-size:10px;color:var(--muted)}
.is-gm .player-map-actions{top:auto;bottom:8px;left:auto;right:8px;z-index:6}
.is-gm:has(.map-editbar) .player-map-actions,.is-gm:has(.map-quick) .player-map-actions{display:none}
.map-turn-shortcut{position:absolute;right:8px;top:110px;z-index:6}
.map-placement-status{position:absolute;left:8px;bottom:64px;z-index:6}
.map-empty-preparation{margin:12px;max-width:370px;padding:16px;display:grid;gap:10px;background:var(--paper);border:1px solid var(--line);border-radius:10px}
.map-full .is-gm .map-editbar{border-radius:10px;gap:8px;max-height:45%}
.map-editbar .btn{min-height:42px}.map-editbar .map-glyph{width:18px;height:18px;flex-basis:18px}
.map-canvas [data-area-kind]{pointer-events:none}
.map-canvas svg[data-tool="elevation"] [data-area-kind="elevation"],.map-canvas svg[data-tool="height-access"] [data-area-kind="height-access"],.map-canvas svg[data-tool="light-zone"] [data-area-kind="light-zone"],.map-canvas svg[data-tool="fog"] [data-area-kind="fog"],.map-canvas svg[data-tool="terrain"] [data-area-kind="terrain"]{pointer-events:all;cursor:move}
.map-canvas svg[data-area-tool=true] #map-tokens{pointer-events:none}
.area-handle{fill:#fff;stroke:#98702d;stroke-width:2px;vector-effect:non-scaling-stroke;cursor:move}
@media(max-width:800px){
 .gm-commandbar{left:6px;right:6px;gap:4px}.map-command-menu{flex:1;min-width:0;position:static}
 .map-command-menu>summary{justify-content:center;padding:10px 5px;font-size:12px;gap:5px}
 .map-command-menu>.map-command-panel{left:0;right:0;width:auto;max-width:none;max-height:calc(100dvh - 220px - env(safe-area-inset-bottom))}
 .map-scene-status{display:none}.map-command-menu .map-glyph{width:18px;height:18px;flex-basis:18px}
 .is-gm:has(.map-command-menu[open]) .map-turn-shortcut{display:none}
}

.gm-commandbar>.map-close-tools{width:44px;min-width:44px;height:44px;padding:10px;background:#fffaf0;color:var(--ink);border-radius:9px}
.map-close-tools>.map-button-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.environment-editbar #area-rounding{width:90px;min-height:42px}
@media(max-width:420px){.map-command-menu>summary{font-size:11px;flex-direction:column;gap:2px;padding:5px 2px}.gm-commandbar>.map-close-tools{width:38px;min-width:38px;height:48px}.map-command-menu>summary .map-glyph{width:16px;height:16px;flex-basis:16px}}


.map-light-handle{cursor:move;touch-action:none}
.map-light-handle:focus-visible{outline:none;stroke:#fff;stroke-width:2px;vector-effect:non-scaling-stroke}
