.map-new-title small,.map-fence-setting small{display:block;font-size:12px;line-height:1.45;color:var(--muted);font-weight:400}
.map-palette p a{color:var(--accent);text-underline-offset:3px}
.map-fields .map-fence-setting{grid-column:1/-1;display:flex;align-items:flex-start;gap:10px;padding:10px;border:1px solid var(--border);border-radius:8px}
.map-fields .map-fence-setting[hidden]{display:none}
.map-fence-setting input{flex:none;width:18px;height:18px;margin:2px 0;accent-color:var(--accent)}
.map-editor.map-immersive:fullscreen{display:block;position:fixed;inset:0;width:100vw;height:100dvh;padding:0;border:0;border-radius:0;overflow:hidden;background:#171b1a}
.map-immersive>.map-controls{display:none!important}
.map-immersive>.map-main{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;display:block!important;padding:0!important;overflow:hidden}
.map-immersive .map-main>[data-map-stage]{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;margin:0;border-radius:0;flex:none}
.map-immersive .map-main>:not([data-map-stage]){display:none!important}
.map-fullscreen-top,.map-fullscreen-bottom{position:absolute;left:0;right:0;z-index:8;background:var(--panel-strong);border:1px solid var(--border);box-shadow:0 4px 24px #0008;max-height:70dvh;overflow:auto;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s,visibility .16s}
.map-fullscreen-top{top:8px;left:12px;right:auto;width:min(1100px,calc(100% - 250px));padding:8px;display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;border-radius:10px}
.map-fullscreen-bottom{bottom:0;padding-bottom:env(safe-area-inset-bottom)}
.map-immersive .map-battle-panel{position:absolute;inset:50px 0 auto auto;width:min(300px,calc(100vw - 32px));max-height:calc(100dvh - 110px);box-sizing:border-box;z-index:9;opacity:0;visibility:hidden;pointer-events:none;box-shadow:0 8px 24px #0008}
.map-panels-visible .map-fullscreen-top,.map-panels-visible .map-fullscreen-bottom,.map-panels-visible>.map-battle-panel{opacity:1;visibility:visible;pointer-events:auto}
.map-fullscreen-tools{position:absolute;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));z-index:10;display:flex;gap:6px}
.map-fullscreen-tools button{background:var(--panel-strong);border:1px solid var(--border);padding:8px 12px;min-height:38px}
.map-fullscreen-top .map-launch-actions{display:flex!important;flex-wrap:wrap;padding:0;gap:6px;margin:0;order:1}
.map-fullscreen-top .map-toolbar{flex:1 1 340px;min-width:0;gap:8px;padding:0;border:0;order:0}
.map-fullscreen-top .map-title-label{min-width:80px;max-width:260px;margin-right:auto}
.map-fullscreen-top .map-title-label input{padding:6px!important;font-size:13px!important}
.map-fullscreen-top .map-session-bar,.map-fullscreen-top .map-adventure-bar{flex:1 1 calc(100% - 170px);min-width:0;padding:0;margin:0;border:0;gap:8px;order:2}
.map-fullscreen-top :is(.map-decisions,.map-touch-modes){flex-basis:100%;order:3;margin:0}
.map-fullscreen-top :is(button,.map-community-link){min-height:36px;padding:6px 9px;font-size:12px}
.map-fullscreen-top .map-view-tools{gap:4px;flex-wrap:nowrap}
.map-fullscreen-top [data-map-gm-light],.map-fullscreen-top>.map-view-tools{position:static!important;display:inline-flex;margin:0;transform:none!important;max-width:100%;order:2}
.map-fullscreen-bottom .map-dock{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:8px;gap:6px;margin:0}
.map-fullscreen-bottom .map-dock button{min-width:0;white-space:normal;overflow-wrap:anywhere;min-height:48px}
.map-fullscreen-bottom .map-dock svg{width:20px;height:20px}
.map-fullscreen-bottom .map-status{margin:0;padding:8px 14px;font-size:12px}
.map-immersive:not(.map-phone) .map-touch-modes{display:none}
.map-fullscreen-bottom .map-touch-selection.has-selection{display:flex}
.map-rotation-controls [data-map-object-properties]{font-size:13px;padding-inline:12px;min-height:44px}
.map-fullscreen-top .map-launch-actions [data-map-action=fullscreen]{display:none!important}
.map-sheet[data-sheet=file] .map-launch-actions [data-map-action=fullscreen]:not([hidden]){display:inline-flex}
@media(max-width:900px){
 .map-fullscreen-top{top:max(56px,calc(env(safe-area-inset-top) + 48px));left:8px;width:calc(100% - 16px);max-height:calc(100dvh - 180px);gap:6px}
 .map-fullscreen-top .map-toolbar{flex-basis:100%}
 .map-fullscreen-top .map-session-bar,.map-fullscreen-top .map-adventure-bar{flex-basis:100%}
 .map-fullscreen-top :is(button,.map-community-link){min-height:44px;padding:8px}
 .map-fullscreen-tools button{min-height:44px}
 .map-fullscreen-top .map-launch-actions{order:3}
 .map-fullscreen-top .map-title-label{max-width:none}
}
@media(prefers-reduced-motion:reduce){.map-fullscreen-top,.map-fullscreen-bottom{transition:none}}

/* Tutorial examples use the actual controls without unrelated sections crowding them. */
.map-tour,.map-tour-underlay,.map-tour-card,.map-tour-focus{animation:none!important;transition:none!important}
.map-tour-underlay[data-tour-step=water] .workshop-body>.workshop-section:not([data-water-brush-controls]),
.map-tour-underlay[data-tour-step=walls] .workshop-body>.workshop-section:not([data-wall-brush-controls]){display:none}
.map-tour-underlay[data-tour-step=create] .map-new-title small{font-size:11px}
.map-tour-underlay .map-sheet-body{scroll-behavior:auto!important}
.tour-demo-modes{display:flex;gap:6px;padding:8px;font-size:12px;background:var(--panel)}
.tour-demo-modes span{flex:1;text-align:center;border:1px solid var(--border);border-radius:8px;padding:10px}
.tour-demo-modes .is-current{border-color:var(--accent);background:var(--soft);color:var(--ink)}
.map-tour [data-tour-context]{display:block;line-height:1.4}
.map-tour-underlay[data-tour-step=create] .map-new-title small,.map-tour-underlay[data-tour-step=create] .map-secondary,.map-tour-underlay[data-tour-step=create] .map-shelf{display:none}
@media(min-width:700px) and (max-height:600px){
 .map-tour-card{width:320px;padding:14px;max-height:calc(100dvh - 24px)}
 .map-tour-card h3{font-size:18px;margin:8px 0}.map-tour-card p{font-size:13px;line-height:1.45}
 .map-tour-card nav{margin-top:10px;padding-top:10px}
 dialog.map-tour-underlay[open]{inset:12px auto auto 12px!important;width:calc(100vw - 372px)!important;max-height:calc(100dvh - 24px)!important;margin:0!important}
 .map-tour-demo[data-example=drag] .map-stage{height:calc(100dvh - 170px)}
 .map-tour-underlay .map-brush-controls{padding:10px}
 .map-tour-underlay .map-brush-controls .workshop-hint{font-size:12px;margin:4px 0 6px}
 .map-tour-underlay .workshop-tabs{padding:6px 12px}
 .map-tour-underlay [data-tour-loot] .loot-inventory-row{padding-block:6px;gap:8px}
 .map-tour-underlay .loot-quantity-fields label{gap:3px}
 .map-tour-underlay .loot-quantity-fields input{min-height:34px;padding:6px}
}
