.wb-map-body .workspace-tab-header-container { position: relative; overflow: visible; }
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-map-inspector"] > :is(.view-header, .wl-page-header),
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-map-links"] > :is(.view-header, .wl-page-header) { display: none; }
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-map-inspector"] > :is(.view-content, .wl-page-content) { padding: 0; overflow: auto; display: flex; flex-direction: column; }
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-map-links"] > :is(.view-content, .wl-page-content) { padding: 12px 14px; overflow: auto; }
.wb-map-inspector-view > .wb-feature-note { margin: 0 14px 12px; }
.wb-map-panel-heading { padding: 14px; font-size: 13px; font-weight: 600; }
.wb-map-links-view > .wb-map-panel-heading { padding: 0 0 12px; }
/* A panel's title is the title face at the panel size (D-184): one weight, capitals only, so it stays short. */
.wb-map-panel-heading h3 { margin: 0; font-family: var(--wl-font-title); font-size: var(--t-title-panel); font-weight: 400; letter-spacing: 0; line-height: 1.35; }
.wb-map-body .canvas-background { z-index: 1; }
.wb-map-body .canvas { z-index: 2; }
.wb-map-body .canvas-selection { z-index: 3; }
.wb-map-color-field { position: relative; }
.wb-map-color-field > span { padding-right: 24px; }
.wb-map-settings-sheet button.wb-map-color-reset { position: absolute; right: 0; top: -3px; width: 22px; height: 22px; padding: 1px; min-height: 0; font-size: 16px; border: 0; background: transparent; color: var(--wl-text-3); box-shadow: none; }
.wb-map-settings-sheet button.wb-map-color-reset:hover { color: var(--wl-text); background: var(--wl-raised); }
.wb-map-feature-details { display: flex; flex-direction: column; min-height: 0; }
.wb-feature-glyph { width: 18px; height: 18px; color: var(--wl-text-2); flex-shrink: 0; }
.wb-feature-glyph svg { width: 100%; height: 100%; }
/* The panel's title: the map's or the picked thing's name, in the title face at the panel size. */
.wb-map-feature-details .wb-feature-header h3 { flex: 1; margin: 0; font-family: var(--wl-font-title); font-size: var(--t-title-panel); font-weight: 400; letter-spacing: 0; line-height: 1.35; text-transform: none; }
.wb-map-feature-details .wb-feature-close { width: 28px; height: 28px; padding: 3px; font-size: 19px; box-shadow: none; background: transparent; }
.wb-map-feature-details .wb-map-form-error:empty { display: none; }
.wb-map-feature-details .wb-feature-field { font-size:var(--t-help); gap:var(--sp-2); margin:var(--sp-3) 0; }
.wb-map-feature-details .wb-feature-field input, .wb-map-feature-details .wb-feature-field select { font-size:var(--t-ui); height:var(--wl-control); min-width:0; padding:var(--sp-1) var(--sp-2); }
.wb-map-feature-details .wb-feature-field textarea { width:100%;min-height:80px;resize:vertical;box-sizing:border-box;font-size:var(--t-ui);line-height:1.5;padding:var(--sp-2); }
#wb-map-information-panel .wb-map-feature-details :is(input:not([type="checkbox"]):not([type="range"]):not([type="color"]),select,textarea) { color:var(--wl-text); background:var(--wl-inset); border-width:1px; border-style:solid; border-color:var(--wl-line-strong); border-radius:var(--r-md); box-shadow:none; }
#wb-map-information-panel .wb-map-feature-details :is(.wb-map-quiet-button,.wb-map-action-button,.wb-map-ratio-presets button,.wb-map-grid-type,.wb-feature-nested,.wb-map-media-choose,.wb-map-media-upload) { color:var(--wl-text); background:var(--wl-raised); border-width:1px; border-style:solid; border-color:var(--wl-line); border-radius:var(--r-md); box-shadow:none; }
#wb-map-information-panel .wb-map-feature-details button:hover:not(:disabled) { background:var(--wl-raised); border-color:var(--wl-line-strong); }
#wb-map-information-panel .wb-map-feature-details :is(.wb-map-grid-type,.wb-map-ratio-presets button)[aria-pressed="true"] { background:var(--wl-selection-soft); border-color:var(--wl-selection); color:var(--wl-text); }
#wb-map-information-panel .wb-map-feature-details :is(input,select,textarea,button):focus-visible { outline-width:2px; outline-style:solid; outline-color:var(--wl-selection); outline-offset:2px; }
.wb-feature-color-row { display: flex; align-items: center; gap: 7px; }
.wb-map-feature-details .wb-feature-color-row input[type="color"] { width: var(--wl-control); height: var(--wl-control); padding: 3px; border: 1px solid var(--wl-line-strong); border-radius: var(--r-sm); flex-shrink: 0; }
.wb-map-feature-details .wb-feature-color-row input[type="color"]::-webkit-color-swatch { border-radius: 3px; border: 0; }
.wb-feature-color-row input:not([type="color"]) { flex: 1; }
.wb-feature-transparent { height: var(--wl-control); padding: 0 10px; font-size: 11px; box-shadow: none; background: transparent; border: 1px solid var(--wl-line); border-radius: var(--r-md); }
.wb-feature-width-row { display: flex; align-items: center; gap: 10px; }
.wb-map-feature-details .wb-feature-width-row input[type="range"] { flex: 1; padding: 0; height: 22px; }
.wb-feature-width-row output { min-width: 34px; text-align: right; font-size: 11px; }
.wb-feature-geometry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 10px; }
/* What is picked or pointed at on the map takes the selection's ice (D-184), as a selected way already does. */
.wb-map-feature.is-focused .canvas-node-container { box-shadow: 0 0 0 1px color-mix(in srgb,var(--wl-selection) 40%,transparent) !important; }
.wb-map-feature.wb-map-area .canvas-node-container { box-shadow:none !important; }
.wb-map-area, .wb-map-area .canvas-node-container, .wb-map-area .wb-feature-visual { pointer-events:none; }
.wb-map-area .wb-shape-paint > * { pointer-events:visiblePainted; }
.wb-map-area .wb-feature-label { pointer-events:auto; }
.wb-map-area.is-focused .wb-shape-paint > *, .wb-map-area.is-selected .wb-shape-paint > * { filter:drop-shadow(0 0 2px color-mix(in srgb,var(--wl-selection) 35%,transparent)); }
/* Pointing at a shape, pin or token lifts it with a lighter form of its selection highlight, so you can see what a click will pick. Placing and panning skip it. */
.wb-map-area .wb-shape-paint > * { transition:filter var(--wl-fast) var(--wl-ease); }
.wb-map-pin .wb-pin-marker, .wb-token-marker { transition:outline-color var(--wl-fast) var(--wl-ease), box-shadow var(--wl-fast) var(--wl-ease); }
.canvas-wrapper:not(.wb-map-placing, .wb-map-pan-mode) .wb-map-area:hover:not(.is-focused, .is-selected) .wb-shape-paint > * { filter:brightness(1.08) drop-shadow(0 0 2px color-mix(in srgb,var(--wl-selection) 22%,transparent)); }
/* A group (D-102) is drawn as a shape is, under what it gathers, with its name the group's own label above it. A click
   inside its outline picks it; outside the outline (a polygon's corners) goes to whatever is behind. */
.wb-map-feature.wb-map-group .canvas-node-container { box-shadow:none !important; }
.wb-map-group, .wb-map-group .canvas-node-container, .wb-map-group .wb-feature-visual { pointer-events:none; }
.wb-map-group .wb-shape-paint > * { pointer-events:visiblePainted; transition:filter var(--wl-fast) var(--wl-ease); }
.wb-map-group .canvas-group-label { pointer-events:auto; color:var(--wb-feature-stroke); font-size:var(--wb-label-font-size, 15px); }
.wb-map-group.wb-group-name-hidden .canvas-group-label { display:none; }
.wb-map-group:is(.is-focused, .is-selected) .wb-shape-paint > * { filter:drop-shadow(0 0 2px color-mix(in srgb,var(--wl-selection) 35%,transparent)); }
.canvas-wrapper:not(.wb-map-placing, .wb-map-pan-mode) .wb-map-group:hover:not(.is-focused, .is-selected) .wb-shape-paint > * { filter:brightness(1.08) drop-shadow(0 0 2px color-mix(in srgb,var(--wl-selection) 22%,transparent)); }
@media (prefers-reduced-motion:reduce) { .wb-map-group .wb-shape-paint > * { transition:none; } }
.wb-feature-upload, .wb-feature-nested { width: 100%; min-height: 29px; font-size: 12px; box-shadow: none; }
.wb-feature-lock { display: flex; align-items: center; gap: 12px; border: 1px solid var(--wl-line); padding: 10px; border-radius: var(--r-md); margin-top: 16px; font-size: 12px; }
.wb-feature-lock > span { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wb-feature-lock small { font-size:var(--t-help); line-height:1.5; color:var(--wl-text-3); }
.wb-feature-lock input { width: 15px; height: 15px; }
.wb-map-feature-details .wb-feature-delete { min-height: 30px; color: var(--wl-danger); border-color: color-mix(in srgb,var(--wl-danger) 25%,transparent); font-size: 12px; }
.wb-map-feature-details .wb-feature-open { min-height: 30px; font-size: 12px; }
.wb-area-outline .wb-shape-paint > * { fill: var(--wb-feature-fill); stroke: var(--wb-feature-stroke); stroke-width: var(--wb-feature-stroke-width); vector-effect: non-scaling-stroke; }
.wb-map-feature.wb-feature-locked .canvas-node-resizer { display: none; }
.wb-outline-editor { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; z-index:6; }
.wb-outline-paint { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.wb-outline-edge { fill:none; stroke:var(--wl-selection); stroke-width:1; stroke-dasharray:4 3; pointer-events:none; }
.wb-outline-hit { fill:none; stroke:transparent; stroke-width:16; pointer-events:stroke; cursor:crosshair; }
.wb-outline-editor .wb-outline-point { position:absolute; width:20px; height:20px; min-width:20px; min-height:20px; padding:0; border:0; background:transparent; box-shadow:none; transform:translate(-50%,-50%); pointer-events:auto; cursor:move; }
.wb-outline-point::after { content:''; position:absolute; inset:4px; border:2px solid var(--wl-selection); border-radius:50%; background:var(--wl-bg); }
.wb-outline-point:hover::after, .wb-outline-point:focus-visible::after { background:var(--wl-selection); border-color:var(--wl-bg); }
.wb-outline-insert { fill:var(--wl-selection); stroke:var(--wl-bg); stroke-width:1.5; pointer-events:none; }
.wb-outline-plus { fill:none; stroke:var(--wl-on-accent); stroke-width:1.5; pointer-events:none; }
/* The turn handle (Edit outline): a round button on a short stem above the shape; while it turns, the angle shows over it. */
.wb-outline-stem { stroke:var(--wl-selection); stroke-width:1; pointer-events:none; }
.wb-outline-editor .wb-outline-turn { position:absolute; width:24px; height:24px; min-width:24px; min-height:24px; padding:0; display:grid; place-items:center; border:2px solid var(--wl-selection); border-radius:50%; background:var(--wl-bg); color:var(--wl-selection); box-shadow:none; transform:translate(-50%,-50%); pointer-events:auto; cursor:grab; transition:background var(--wl-fast) var(--wl-ease), color var(--wl-fast) var(--wl-ease); }
.wb-outline-editor .wb-outline-turn:hover, .wb-outline-editor .wb-outline-turn:focus-visible { background:var(--wl-selection); color:var(--wl-bg); }
.wb-outline-editor .wb-outline-turn:active { cursor:grabbing; }
.wb-outline-angle { position:absolute; transform:translate(-50%,-50%); padding:2px 6px; border-radius:6px; background:var(--wl-bg); color:var(--wl-text); font:600 11px/1.3 var(--wl-font-ui); font-variant-numeric:tabular-nums; pointer-events:none; white-space:nowrap; }
.wb-outline-active .canvas-node-resizer, .wb-outline-active .canvas-node-connection-point { display:none !important; }
/* Nothing on a map (pins, tokens, shapes, groups) has handles for dragging out lines (D-086): places are joined by drawing a way (Way tool), and
   lines already on a map have no arrowhead. The handles sit in the canvas's shared hover layer, which map-tools marks
   while it is over one of them. */
.wb-map-feature-layer .canvas-node-connection-point { display:none !important; }
body.wb-shell .canvas-path-end { display:none; }
.canvas-wrapper[data-wb-outline-editing] .canvas-node-interaction-layer .canvas-node-resizer { display:none !important; }
.wb-map-feature.wb-outline-active .canvas-node-container { box-shadow:none !important; }
.wb-feature-outline-button { width:100%; height:30px; font-size:12px; box-shadow:none; }
/* Pressed: the selection's ice, as the map's own pressed tools (shell.css). */
.canvas-menu .wb-shape-quick-action[aria-pressed="true"] { background:var(--wl-selection-soft); color:var(--wl-text); }
.canvas-menu .wb-shape-quick-action { width: 30px; height: 30px; padding: 6px; border-radius: var(--r-sm); }
.canvas-menu .wb-shape-quick-action svg { width: 18px; height: 18px; }
/* Delete stands apart at the end of the bar, under a thin line, in the danger colour when pointed at (D-241). */
.canvas-menu .wb-shape-quick-sep { width:1px; height:20px; margin:0 3px; align-self:center; flex:none; background:var(--wl-line); }
.canvas-menu .wb-shape-quick-action.is-danger:hover:not(:disabled) { color:var(--wl-danger); background:color-mix(in srgb, var(--wl-danger) 12%, transparent); }
/* The bar's first button (D-241): what the picked thing opens, its picture (round for a token) and Open map or View page. */
.canvas-menu button.wb-shape-quick-open { flex: none; width:auto; height:30px; display:flex; align-items:center; gap:7px; padding:0 10px 0 3px; margin-right:3px; border-radius:var(--r-sm); background:var(--wl-raised); color:var(--wl-text); font:600 12.5px/1 var(--wl-font-ui); white-space:nowrap; }
.canvas-menu button.wb-shape-quick-open:hover { background:color-mix(in srgb, var(--wl-text) 10%, var(--wl-raised)); color:var(--wl-text); }
@media (max-width: 640px) {
  .canvas-menu .wb-shape-quick-action { width: 28px; height: 28px; padding: 5px; }
  .canvas-menu .wb-shape-quick-action svg { width: 16px; height: 16px; }
  .canvas-menu button.wb-shape-quick-open { height: 28px; gap: 5px; padding: 0 8px 0 3px; font-size: 11.5px; }
  .canvas-menu .wb-quick-open-mark { width: 22px; height: 22px; }
}
.wb-quick-open-mark { width:24px; height:24px; flex:none; display:grid; place-items:center; border-radius:5px; overflow:hidden; color:var(--wl-text-2); }
.wb-quick-open-mark.is-round { border-radius:50%; }
.wb-quick-open-mark .wb-quick-open-icon { width:16px; height:16px; display:block; }
.wb-quick-open-mark img { width:100%; height:100%; object-fit:cover; display:block; }
/* It opens from a selected thing's glass tools, so it stays solid (see the end of this file). */
.wb-quick-colors { position: absolute; top: calc(100% + 6px); left: 0; padding: 8px; border: 1px solid var(--wl-line); border-radius: var(--r-md); background: var(--wl-surface); display: grid; gap: 8px; box-shadow: var(--wl-elev-pop); }
.wb-quick-color-targets { display: flex; gap: 2px; padding: 2px; background: var(--wl-inset); border-radius: var(--r-sm); }
.wb-quick-color-targets button { flex: 1; height: 25px; padding: 3px 9px; font-size: 11px; box-shadow: none; background: transparent; color: var(--wl-text-2); border-radius: var(--r-xs); }
.wb-quick-color-targets button[aria-pressed="true"] { background: var(--wl-selection-soft); color: var(--wl-text); }
.wb-quick-color-swatches { display: flex; gap: 6px; align-items: center; }
.wb-quick-colors .wb-feature-swatch { width: 21px; height: 21px; }
/* The custom colour: a colour wheel the size of the set colours, so it reads as "any colour". */
.wb-quick-colors input[type="color"] { width: 21px; height: 21px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; cursor: pointer; }
.wb-quick-colors input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.wb-quick-colors input[type="color"]::-webkit-color-swatch { width: 21px; height: 21px; border: 0; border-radius: 50%; background-image: conic-gradient(var(--wl-danger), var(--wl-warning), var(--wl-success), var(--wl-selection), var(--wl-danger)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wl-text) 15%, transparent); }
.wb-shell :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header) { border-bottom: 1px solid var(--wl-line); }

.wb-map-body .canvas-wrapper { overflow: clip; }
.wb-map-feature-details input[type="range"] { appearance: none; background: transparent !important; border: 0; box-shadow: none; }
.wb-map-feature-details input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: var(--wl-line-strong); border-radius: 2px; }
.wb-map-feature-details input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--wl-text); margin-top: -4px; }

/* Map overlays and tokens share the viewport; the information band stays above them. */
.wb-map-rulers { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:5; overflow:hidden; }
/* The ruler's line is the warning gold, so it stands apart from the selection's ice; its distance reads in mono. */
.wb-map-measurement line { stroke:var(--wl-warning); stroke-width:2; stroke-dasharray:6 4; }
.wb-map-measurement circle { fill:var(--wl-warning); stroke:var(--wl-bg); stroke-width:2; }
.wb-map-measurement rect { fill:var(--wl-bg); stroke:color-mix(in srgb,var(--wl-warning) 35%,transparent); stroke-width:1; }
.wb-map-measurement text { fill:var(--wl-warning); font:600 12px var(--wl-font-mono); }
.wb-map-ratio-presets button[aria-pressed="true"] { background:var(--wl-selection-soft); color:var(--wl-text); box-shadow:inset 0 0 0 1px var(--wl-selection); }
.wb-map-token .wb-feature-visual { display:block; }
.wb-token-marker { position:absolute; inset:3px; border-radius:50%; background:color-mix(in srgb,var(--wb-feature-tint) 18%,var(--wl-bg)); border:2px solid var(--wb-feature-tint); display:grid; place-items:center; overflow:hidden; box-shadow:0 2px 8px color-mix(in srgb,var(--wl-bg) 20%,transparent); }
.wb-token-marker svg { width:60%; height:60%; color:var(--wb-feature-tint); }
.wb-token-marker img { width:100%; height:100%; object-fit:cover; }
/* A cut-out picture (see-through around what it shows, as Studio's Remove background makes) is the token's shape:
   no disc or border, the whole picture, a soft shadow under it. Hovered or picked, its ring still shows. */
.wb-token-marker.is-cutout { background:none; border-color:transparent; overflow:visible; box-shadow:none; }
.wb-token-marker.is-cutout img { object-fit:contain; filter:drop-shadow(0 2px 3px color-mix(in srgb,var(--wl-bg) 45%,transparent)); }
/* A linked pin shows its page's picture inside the marker, ringed in its colour. */
/* A pin is a teardrop in its colour: a round head (its linked picture, or a dot) over a point. A token is a plain circle. */
.wb-map-pin .wb-pin-marker { width:36px; height:36px; box-sizing:border-box; border:2px solid var(--wb-feature-tint); border-radius:50% 50% 50% 0; background:var(--wb-feature-tint); box-shadow:0 0 10px color-mix(in srgb,var(--wl-bg) 20%,transparent); overflow:hidden; }
.wb-map-pin .wb-pin-marker > svg { display:none; }
.wb-map-pin .wb-pin-marker:not(.has-picture)::after { content:''; width:12px; height:12px; border-radius:50%; background:var(--wl-bg); }
.wb-pin-marker.has-picture img { width:100%; height:100%; object-fit:cover; border-radius:50%; transform:rotate(45deg); }
/* A picture waits, empty, for its smoothed copy (map-tools.js sharpen), so its name never shows in its place. */
.wb-token-marker img:not([src]), .wb-pin-marker img:not([src]) { visibility:hidden; }
.wb-map-token .wb-feature-label { position:absolute; top:calc(100% + 5px); left:50%; width:max-content; max-width:15em; transform:translateX(-50%) scale(var(--zoom-multiplier,1)); transform-origin:50% 0; font-size:12px; }
.wb-map-token .canvas-node-resizer { display:none; }
/* A token is sized from its corners (D-164), in whole sizes up to Giant; its sides have no handles. */
.wb-map-token-layer .canvas-node-resizer:is([data-resize="top"], [data-resize="right"], [data-resize="bottom"], [data-resize="left"]) { display:none; }
.wb-feature-link-browse { text-align:left; justify-content:flex-start; font-size:12px; min-height:30px; width:100%; }
.wb-feature-linked .wb-map-quiet-button { padding:3px 0; font-size:11px; color:var(--wl-text-3); box-shadow:none; background:transparent; text-align:left; justify-content:flex-start; }
.wb-map-link-picker { display:flex; flex-direction:column; min-height:100%; gap:10px; }
.wb-map-link-picker h3 { margin:0; font-family:var(--wl-font-title); font-size:var(--t-title-panel); font-weight:400; letter-spacing:0; line-height:1.35; }
.wb-map-link-picker .wb-feature-note { margin:0; }
.wb-map-link-search { width:100%; min-height:32px; font-size:12px; }
.wb-map-link-results { flex:1; min-height:0; }
.wb-map-link-choice { display:flex; align-items:center; gap:12px; min-height:72px; height:auto; width:100%; margin:0 0 6px; background:transparent; border:1px solid var(--wl-line); border-radius:var(--r-md); box-shadow:none; padding:10px; text-align:left; justify-content:flex-start; transition:background-color var(--wl-fast) var(--wl-ease),border-color var(--wl-fast) var(--wl-ease); }
.wb-map-link-choice:hover { background:var(--wl-raised); border-color:var(--wl-line-strong); }
.wb-map-link-choice:focus-visible { outline:2px solid var(--wl-selection); outline-offset:-2px; }
.wb-map-link-avatar { position:relative; display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; overflow:hidden; border-radius:var(--r-md); background:var(--wl-inset); border:1px solid var(--wl-line); color:var(--wl-text-2); }
.wb-map-link-initials { font-size:13px; font-weight:600; letter-spacing:.03em; }
.wb-map-link-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; }
.wb-map-link-avatar.has-picture img { opacity:1; }
.wb-map-link-avatar.has-picture .wb-map-link-initials { visibility:hidden; }
.wb-map-link-text { display:flex; flex-direction:column; min-width:0; gap:3px; flex:1; }
.wb-map-link-choice strong { font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-map-link-choice small { font-size:11px; color:var(--wl-text-3); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-map-link-kind { font-size:11px; color:var(--wl-text-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (prefers-reduced-motion:reduce) { .wb-map-link-choice { transition:none; } }
/* The link picker's type chips. */
.wb-map-link-types { display:flex; flex-wrap:wrap; gap:4px; }
.wb-map-link-types[hidden] { display:none; }
.wb-map-link-type { height:24px; padding:0 10px; border-radius:var(--r-md); font-size:11px; color:var(--wl-text-2); background:transparent; border:1px solid var(--wl-line); box-shadow:none; }
.wb-map-link-type:hover { color:var(--wl-text); background:var(--wl-raised); }
.wb-map-link-type[aria-pressed="true"] { color:var(--wl-text); background:var(--wl-selection-soft); border-color:var(--wl-selection); }
@media (pointer:coarse) { .wb-map-link-type { height:32px; } }
.wb-map-link-cancel { width:100%; font-size:12px; min-height:30px; margin-top:auto; box-shadow:none; }
.wb-map-link-picker .wb-map-form-error:empty { display:none; }
@media(max-width:900px) { .wb-build-hint { max-width:90%; white-space:normal; text-align:center; } }

.wb-map-links-view.wb-map-links-picking { display:flex; flex-direction:column; overflow:hidden !important; }
.wb-map-links-picking .wb-map-link-picker { height:100%; min-height:0; width:100%; }
.wb-map-links-picking .wb-map-link-results { overflow:auto; }

/* Pins, tokens and their names are part of the map, like areas: they grow and shrink with it as you zoom. */
.wb-map-pin .wb-pin-marker { transform:translate(-50%,-50%) rotate(-45deg); pointer-events:auto; }
.wb-map-pin .wb-feature-label { top:72px; width:max-content; max-width:15em; transform:translateX(-50%); pointer-events:auto; }
.wb-map-token .wb-feature-label { top:calc(100% + 5px); transform:translateX(-50%); }
.wb-map-pin .canvas-node-resizer { display:none; }
.wb-map-pin.is-focused .canvas-node-container { box-shadow:none !important; }
.wb-map-pin.is-focused .wb-pin-marker { outline:2px solid var(--wl-selection); outline-offset:3px; }
.wb-map-pin .wb-pin-marker { outline:2px solid transparent; outline-offset:3px; }
.canvas-wrapper:not(.wb-map-placing, .wb-map-pan-mode) .wb-map-pin:hover:not(.is-focused) .wb-pin-marker { outline-color:color-mix(in srgb,var(--wl-selection) 40%,transparent); }
.canvas-wrapper:not(.wb-map-placing, .wb-map-pan-mode) .wb-map-token:hover:not(.is-focused, .is-selected) .wb-token-marker { box-shadow:0 2px 8px color-mix(in srgb,var(--wl-bg) 20%,transparent), 0 0 0 3px color-mix(in srgb,var(--wl-selection) 30%,transparent); }
/* A cut-out token lights up along its own outline, not in a ring */
.canvas-wrapper:not(.wb-map-placing, .wb-map-pan-mode) .wb-map-token:hover:not(.is-focused, .is-selected) .wb-token-marker.is-cutout { box-shadow:none; }
.canvas-wrapper:not(.wb-map-placing, .wb-map-pan-mode) .wb-map-token:hover:not(.is-focused, .is-selected) .wb-token-marker.is-cutout img { filter:drop-shadow(0 2px 3px color-mix(in srgb,var(--wl-bg) 45%,transparent)) drop-shadow(0 0 2px color-mix(in srgb,var(--wl-selection) 70%,transparent)); }

.wb-map-pin .canvas-node-container, .wb-map-token .canvas-node-container { contain:layout style size; }

.wb-map-pin, .wb-map-pin .canvas-node-container { pointer-events:none; }

/* Compact, consistent map property sections. */
.wb-map-body [hidden] { display:none !important; }
/* One gutter for the header and the sections, a step of room under the header's line, and room at the end for Boris's
   button. */
.wb-map-feature-details .wb-feature-fields { padding:var(--sp-3) var(--sp-3) 82px; overflow:visible; }
.wb-feature-identity { flex:1; min-width:0; }
.wb-feature-identity small { display:block; margin-top:2px; font-size:var(--t-help); text-transform:capitalize; color:var(--wl-text-3); }
.wb-map-property-section { border:1px solid var(--wl-line); border-radius:var(--r-md); margin-bottom:var(--sp-2); background:transparent; min-width:0; }
.wb-map-property-section > summary { display:flex; align-items:center; gap:var(--sp-2); padding:10px var(--sp-3); cursor:pointer; min-height:40px; list-style:none; font-size:var(--t-ui); border-radius:calc(var(--r-md) - 1px); flex-wrap:wrap; row-gap:var(--sp-1); }
.wb-map-property-section > summary::before { content:'›'; font-size:17px; color:var(--wl-text-3); width:12px; transform:rotate(0); flex-shrink:0; }
.wb-map-property-section[open] > summary::before { transform:rotate(90deg); }
.wb-map-property-title { font-weight:600; }
.wb-map-property-value { margin-left:auto; font-size:var(--t-help); color:var(--wl-text-3); min-width:0; max-width:55%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-map-property-body { padding:var(--sp-4) var(--sp-3); display:flex; flex-direction:column; gap:var(--sp-3); min-width:0; }
.wb-map-property-body > [hidden] { display:none; }
.wb-map-property-section[open] > summary { background:transparent; border-bottom:1px solid var(--wl-line); border-radius:calc(var(--r-md) - 1px) calc(var(--r-md) - 1px) 0 0; }
.wb-map-property-section > summary:hover { background:var(--wl-raised); }
.wb-map-property-section > summary:focus-visible { outline:2px solid var(--wl-selection); outline-offset:-2px; }
.wb-map-property-section > summary::-webkit-details-marker { display:none; }
.wb-map-property-body .wb-feature-field { margin:0; gap:6px; min-width:0; }
.wb-map-property-body .wb-feature-note { margin:0; font-size:var(--t-help); line-height:1.5; }
/* The rhythm inside a section: one gap between controls, nothing added by a control's own margins. A note sits right
   under the control it explains, a button that acts on the field above sits with it, and a run of switches reads as
   one list. A subhead starts a group: a line across, with room above it. */
.wb-map-feature-details .wb-map-property-body > * { margin-top:0; margin-bottom:0; }
.wb-map-feature-details .wb-map-property-body > :not(.wb-feature-subhead) + .wb-feature-note { margin-top:calc(var(--sp-1) - var(--sp-3)); }
.wb-map-feature-details .wb-map-property-body > :is(.wb-feature-field, .wb-map-ratio-presets) + .wb-map-quiet-button { margin-top:calc(var(--sp-2) - var(--sp-3)); }
.wb-map-feature-details .wb-map-property-body > :is(.wb-map-preference-toggle, .wb-feature-lock) + :is(.wb-map-preference-toggle, .wb-feature-lock) { margin-top:calc(var(--sp-1) - var(--sp-3)); }
.wb-map-feature-details .wb-map-property-body > .wb-feature-subhead { margin:var(--sp-1) 0 calc(-1 * var(--sp-1)); padding-top:var(--sp-3); border-top:1px solid var(--wl-line); font-size:var(--t-ui); font-weight:600; color:var(--wl-text); }
.wb-map-feature-details .wb-map-property-body > .wb-feature-subhead:first-child { margin-top:0; padding-top:0; border-top:0; }
/* Buttons in a section share the field height's smaller step, and switches are rows, not boxes. */
.wb-map-feature-details .wb-map-property-body :is(.wb-map-quiet-button, .wb-map-action-button, .wb-feature-nested, .wb-feature-outline-button, .wb-feature-open, .wb-feature-link-browse) { min-height:32px; height:auto; }
.wb-map-feature-details .wb-map-property-body .wb-feature-lock { align-items:flex-start; gap:var(--sp-3); padding:0; border:0; border-radius:0; background:none; font-size:var(--t-ui); }
.wb-map-feature-details .wb-map-property-body .wb-feature-lock > span { gap:2px; }
.wb-map-feature-details .wb-map-property-body .wb-feature-lock input { margin:2px 0 0; flex-shrink:0; }
.wb-map-sheet .wb-map-property-body .wb-map-preference-toggle { min-height:32px; }
.wb-map-feature-details .wb-feature-width-row { min-height:24px; align-items:center; gap:10px; }
.wb-map-feature-details .wb-feature-width-row input[type='range'] { flex:1; align-self:center; appearance:none; height:20px; min-height:20px; max-height:20px; margin:0; padding:0; border:0; border-radius:0; line-height:20px; background:transparent !important; }
.wb-map-feature-details .wb-feature-width-row input[type='range']::-webkit-slider-runnable-track { height:4px; border:0; border-radius:2px; }
.wb-map-feature-details .wb-feature-width-row input[type='range']::-webkit-slider-thumb { appearance:none; height:12px; width:12px; margin-top:-4px; border:0; border-radius:50%; position:relative; top:0; transform:none; }
.wb-feature-width-row output { line-height:20px; width:42px; min-width:42px; font-family:var(--wl-font-mono); font-variant-numeric:tabular-nums; font-size:11px; color:var(--wl-text-2); }
.wb-feature-link-actions { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0 4px; }
.wb-feature-link-actions > button { flex:1; width:auto; font-size:11px; min-height:29px; padding:4px 8px; }
.wb-map-property-body .wb-feature-delete { margin:4px 0; width:100%; }
.wb-map-media-control { margin:12px 0 8px; }
.wb-map-media-row { display:flex; align-items:center; gap:8px; padding:7px; border:1px solid var(--wl-line); border-radius:var(--r-md); min-height:48px; }
.wb-map-media-thumb { width:34px; height:34px; display:grid; place-items:center; color:var(--wl-text-2); border-radius:var(--r-sm); overflow:hidden; background:var(--wl-inset); flex-shrink:0; }
.wb-map-media-thumb img { width:100%; height:100%; object-fit:cover; }
.wb-map-media-thumb svg { width:19px; height:19px; }
.wb-map-media-copy { display:flex; flex-direction:column; min-width:0; gap:4px; flex:1; font-size:11px; }
.wb-map-media-copy small { font-size:11px; color:var(--wl-text-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-map-media-control .wb-map-media-choose { font-size:11px; min-height:27px; padding:3px 7px; box-shadow:none; }
.wb-map-media-remove { width:22px; height:25px; padding:2px; flex-shrink:0; }
.wb-map-media-picker { border:1px solid var(--wl-line); border-radius:var(--r-md); padding:8px; margin-top:6px; }
.wb-map-media-search { width:100%; font-size:11px; min-height:28px; margin-bottom:6px; }
.wb-map-media-list { max-height:164px; overflow:auto; }
.wb-map-media-option { width:100%; display:flex; align-items:center; gap:8px; justify-content:flex-start; background:transparent; box-shadow:none; font-size:11px; min-height:38px; padding:4px; }
.wb-map-media-option img { width:28px; height:28px; object-fit:cover; border-radius:var(--r-xs); flex-shrink:0; }
.wb-map-media-option span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.wb-map-media-upload { width:100%; min-height:28px; font-size:11px; margin-top:6px; box-shadow:none; }
.wb-map-media-control .wb-map-form-error:empty { display:none; }
/* Map rulers: hairlines, quiet ticks, numbers with a halo instead of a box. */
/* The rulers are drawn in map units and scaled with the map (map-ruler.js): their lines keep one pixel at any zoom. */
.wb-map-scale-axes :is(line, rect) { vector-effect:non-scaling-stroke; }
.wb-map-scale-axes .wb-map-scale-frame { fill:none; stroke:var(--wl-text-2); stroke-opacity:.28; stroke-width:1; }
.wb-map-scale-axes.is-clean line { stroke:var(--wl-text-2); stroke-width:1; opacity:.7; }
.wb-map-scale-axes.is-clean .wb-map-scale-base { opacity:.55; }
.wb-map-scale-axes.is-clean .is-minor { opacity:.35; }
.wb-map-scale-axes.is-clean text { fill:var(--wl-text-2); font-family:var(--wl-font-mono); font-size:10px; font-variant-numeric:tabular-nums; paint-order:stroke; stroke:var(--wl-bg); stroke-width:3px; stroke-linejoin:round; }
.wb-map-scale-axes.is-clean text.is-end { fill:var(--wl-text); font-weight:600; }
.wb-map-create-dialog { padding:20px; width:min(390px,calc(100vw - 48px)); }
.wb-map-create-dialog h2 { margin-bottom:9px; font-family:var(--wl-font-title); font-size:var(--t-title-section); font-weight:400; letter-spacing:0; line-height:1.3; }
.wb-map-create-dialog .wb-modal-description { font-size:12px; line-height:1.5; margin-bottom:16px; }
.wb-map-create-dialog .wb-input-label { font-size:11px; }
.wb-map-create-dialog .wb-name-input { font-size:12px; min-height:32px; }
.wb-map-create-dialog .wb-map-form-error:empty { display:none; }
.wb-map-create-dialog .wb-modal-actions { margin-top:16px; padding-top:12px; border-top:1px solid var(--wl-line); }
.wb-map-create-dialog .wb-modal-actions button { font-size:12px; min-height:30px; }
.wb-map-entrance .wb-feature-label { cursor:pointer; }

.canvas-card-menu.wb-build-toolbar { width:max-content; }
.wb-map-body > :is(.view-content, .wl-page-content) { container-type:inline-size; container-name:map-canvas; }
@container map-canvas (max-width:440px) { .wb-map-new span:last-child { display:none; } .wb-map-new { padding:7px; } }

.wb-map-body .workspace-tab-header-container {z-index:20;} .wb-map-area .canvas-node-container {contain:layout style size;} .wb-area-outline {overflow:visible;}

.wb-map-feature .wb-feature-label {font-size:var(--wb-label-font-size,14px);}
/* A name is drawn over its shape's picture and outline (§5: names are always on top), so it can always be read. */
/* A name wider than its area runs past the area's edge rather than being cut to its first letters; a long
   name wraps between words, about 12 letters wide. */
.wb-map-area .wb-feature-label {position:relative;flex:none;width:max-content;max-width:max(100%,12em);max-height:none;overflow:visible;white-space:normal;overflow-wrap:normal;text-overflow:clip;text-align:center;}


.wb-map-pin, .wb-map-token {z-index:calc(100000 + var(--wb-marker-order,0)) !important;}

.wb-map-context-target {position:absolute;z-index:13;width:22px;height:22px;transform:translate(-50%,-50%);border:2px solid var(--wl-selection);border-radius:50%;box-shadow:0 0 0 5px color-mix(in srgb,var(--wl-selection) 12%,transparent);pointer-events:none;}
.wb-map-context-target::before, .wb-map-context-target::after {content:'';position:absolute;background:var(--wl-selection);left:50%;top:50%;transform:translate(-50%,-50%);}
.wb-map-context-target::before {width:30px;height:1px;} .wb-map-context-target::after {height:30px;width:1px;}
.menu.wb-map-target-menu {min-width:225px;}
.wb-map-target-menu .menu-item {font-size:12px;padding:5px 9px;}
.wb-map-target-menu .wb-map-coordinate-label {font-size:11px;font-family:var(--wl-font-mono);color:var(--wl-text-3);padding-top:0;}
/* What each choice adds, told apart by a colour from the system's own set. */
.wb-map-target-menu .wb-context-pin .menu-item-icon {color:var(--wl-warning);}
.wb-map-target-menu .wb-context-token .menu-item-icon {color:var(--wl-selection);}
.wb-map-target-menu .wb-context-area .menu-item-icon {color:var(--wl-success);}
.wb-location-folder { padding:0; border:0; background:none; box-shadow:none; color:var(--wl-text-2); font-size:inherit; height:auto; }
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-map-location"] { container-type:inline-size; }
/* Its bar lays itself out by its own width (type-editor.css, "The page's bar"). */
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-map-location"] .wt-pagebar { padding-inline:12px; gap:8px; }
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-map-location"] .wt-entry-page { padding:16px 10px; }
/* The Location tab is the place's own page, so it glows at its top as a file's page does (D-109): the
   world's picture under its bar, gone within the first lines. It is off with the frame's hint. */
.wl-workspace.has-backdrop .wl-page[data-type="world-builder-map-location"] > .wl-page-content,
.wl-workspace.has-backdrop .wl-page[data-type="world-builder-map-location"] > .wl-page-content > .wt-pagebar { background:var(--wl-page-glow, var(--wl-bg)); }
.wl-workspace.has-backdrop .wl-page[data-type="world-builder-map-location"] iframe.wt-widget { background:transparent; }
/* Canvas help sits in the bottom-right corner, level with the build toolbar (user request, Claude, 2026-10-13); the
   stack above it is centred on the right edge (shell.css). */

/* Zoomed far in, nothing on the map grows past its set size on screen: a token's marker stops at about 96px (centred in
   its cells, its name just under it) and an area's name stays at its text size. Both still shrink when zoomed out. */
/* Pictures on pins, tokens and link cards cannot be dragged off: dropped on the map, they would be added as a copy. */
.wb-map-feature img { -webkit-user-drag:none; user-select:none; }
.wb-map-area .wb-area-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; pointer-events:none; }

/* Consistent spacing across the map inspector, link and media menus. */
.wb-map-feature-details { container-type:inline-size; }
/* The glyph lines up with the sections' edge, the title and the save line with each other. */
.wb-map-feature-details .wb-feature-header { padding:var(--sp-3) var(--sp-2) var(--sp-3) var(--sp-3); gap:0 10px; flex-wrap:wrap; }
.wb-map-edit-status { order:1; flex:0 0 calc(100% - 28px); min-width:0; margin:var(--sp-1) 0 0 28px; font-size:var(--t-help); font-weight:400; color:var(--wl-text-3); }
.wb-feature-header[data-save-state="error"] .wb-map-edit-status { color:var(--wl-danger); }
/* A linked page looked at in the panel (map-tools.js lookAtPage): Open page beside ×, then the page as it is. */
.wb-map-page-look .wb-feature-header { flex-wrap:nowrap; }
.wb-map-page-look .wb-feature-identity { flex:1; min-width:0; }
.wb-map-page-look .wb-map-page-look-open { flex-shrink:0; white-space:nowrap; height:28px; padding:0 10px; border:1px solid var(--wl-line); border-radius:var(--r-pill, 999px); background:transparent; box-shadow:none; color:var(--wl-text); font-size:var(--t-help); font-weight:500; }
.wb-map-page-look .wb-map-page-look-open:hover { background:var(--wl-raised); }
.wb-map-page-look-page { transition:opacity .14s ease; }
.wb-map-page-look-page.is-loading { opacity:0; }
.wb-map-page-look-note { padding:var(--sp-3) var(--sp-4) var(--sp-5); }
.wb-map-page-look-empty { padding:var(--sp-4); color:var(--wl-text-3); }
.wb-map-feature-details .wb-feature-field select,
.wb-map-feature-details .wb-feature-field input:not([type='range']):not([type='checkbox']):not([type='color']) { height:var(--wl-control); }
.wb-feature-geometry-grid { gap:var(--sp-3) var(--sp-2); }
.wb-feature-link-actions { display:flex; flex-direction:column; gap:8px; }
.wb-feature-link-actions > button { width:100%; margin:0; }
/* A linked page's actions share one row under its name: open it, or remove the link. */
.wb-feature-linked .wb-feature-link-actions { flex-direction:row; align-items:center; justify-content:space-between; margin:0; }
.wb-feature-linked .wb-feature-link-actions > button { width:auto; flex:0 0 auto; padding-inline:var(--sp-3); }
.wb-feature-linked .wb-feature-link-actions > .wb-map-quiet-button { padding-inline:var(--sp-1); }
.wb-map-property-body > button { min-height:32px; }
.wb-map-links-view > .wb-map-property-section:last-child { margin-bottom:0; }
.wb-map-property-body .wb-map-link-item + .wb-map-link-item { border-top:1px solid var(--wl-line); padding-top:10px; }
.wb-map-media-control { display:flex; flex-direction:column; gap:var(--sp-2); min-width:0; }
.wb-map-media-row { padding:var(--sp-2); gap:10px; border-color:var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); flex-wrap:wrap; }
.wb-map-media-copy { min-width:0; flex:1; font-size:var(--t-help); }
.wb-map-media-copy small { font-size:11px; }
.wb-map-media-control .wb-map-media-choose { min-height:30px; padding:0 var(--sp-3); font-size:var(--t-help); }
.wb-map-media-picker { padding:10px; margin:0; border-radius:var(--r-md); }
.wb-map-media-list { display:flex; flex-direction:column; gap:5px; margin:10px 0; }
.wb-map-media-option { min-height:40px; padding:6px 8px; border-radius:var(--r-sm); }
.wb-map-media-search { min-height:32px; }
.wb-map-link-picker { gap:14px; }
.wb-map-link-types { gap:6px; }
.wb-map-link-search { min-height:36px; }
.wb-quick-colors { padding:12px; gap:12px; border-radius:var(--r-md); }
.wb-quick-color-targets { gap:4px; padding:4px; }
.wb-quick-color-targets button { min-height:30px; border-radius:var(--r-xs); }
.wb-map-target-menu .menu-item { min-height:34px; padding:7px 10px; }
.wb-map-target-menu .menu-separator { margin:8px 6px; }
@container (max-width:260px) {
  .wb-feature-geometry-grid,.wb-map-setting-pair { grid-template-columns:minmax(0,1fr); }
  .wb-map-feature-details .wb-feature-fields, .wb-map-sheet .wb-feature-fields.wb-map-settings-sheet { padding-inline:var(--sp-2); }
  .wb-map-property-section > summary { padding:10px; }
  .wb-map-property-value { flex-basis:100%; max-width:100%; margin-left:20px; }
  .wb-map-property-body { padding:var(--sp-3) var(--sp-2); }
}

/* A transient footprint, shared by editor and gameplay; it never changes map data. */
.wb-grid-token-target { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; z-index:7; pointer-events:none; }
.wb-grid-token-target polygon { fill:color-mix(in srgb,var(--wl-selection) 18%,transparent); stroke:var(--wl-selection); stroke-width:2; stroke-linejoin:round; }
.wb-grid-token-readout { position:absolute; top:12px; left:50%; transform:translateX(-50%); z-index:8; pointer-events:none; padding:6px 10px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-surface); color:var(--wl-text); font-family:var(--wl-font-mono); font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; box-shadow:var(--wl-elev-pop); }

/* Exits. In the panel: short choices are chips (one for Direction, any for Options), muted until on, in the
   map tools' selection tint; Leads to searches places in place, with the results right under it. */
.wb-feature-chips { display:flex; flex-wrap:wrap; gap:6px; }
.wb-map-feature-details .wb-feature-chip { height:28px; padding:0 10px; border-radius:var(--r-sm); border:1px solid var(--wl-line); background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:var(--t-help); transition:background-color var(--wl-fast) var(--wl-ease), color var(--wl-fast) var(--wl-ease), border-color var(--wl-fast) var(--wl-ease); }
.wb-map-feature-details .wb-feature-chip:hover:not(:disabled) { color:var(--wl-text); background:var(--wl-raised); }
.wb-map-feature-details .wb-feature-chip[aria-pressed="true"] { color:var(--wl-text); background:var(--wl-selection-soft); border-color:color-mix(in srgb, var(--wl-selection) 60%, transparent); }
.wb-feature-chip:focus-visible, .wb-exit-result:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; }
.wb-exit-place-row { position:relative; display:flex; align-items:center; }
.wb-exit-place-icon { position:absolute; left:9px; display:flex; color:var(--wl-text-2); pointer-events:none; }
.wb-exit-place-icon svg { width:15px; height:15px; }
.wb-map-feature-details .wb-exit-place-row input { flex:1; padding-left:30px; padding-right:30px; }
.wb-exit-place-clear { position:absolute; right:4px; width:24px; height:24px; padding:0; color:var(--wl-text-2); }
.wb-exit-results { display:flex; flex-direction:column; gap:2px; padding:4px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-surface); animation:wb-exit-fade var(--wl-fast) var(--wl-ease); }
.wb-exit-results[hidden] { display:none; }
.wb-exit-results .wb-feature-note { margin:6px 8px; }
.wb-map-feature-details .wb-exit-result { display:flex; align-items:baseline; justify-content:space-between; gap:10px; min-height:32px; padding:0 10px; border:0; border-radius:var(--r-sm); background:transparent; box-shadow:none; color:var(--wl-text); font-size:var(--t-ui); text-align:left; }
.wb-exit-result strong { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-exit-result small { flex-shrink:0; color:var(--wl-text-2); font-size:var(--t-help); }
.wb-map-feature-details :is(.wb-exit-result:hover, .wb-exit-result:focus-visible) { background:var(--wl-raised); }
.wb-map-feature-details .wb-exit-result[aria-current="true"] { background:var(--wl-selection-soft); }
@keyframes wb-exit-fade { from { opacity:0; } to { opacity:1; } }
@media (pointer:coarse) { .wb-map-feature-details .wb-feature-chip { height:36px; } .wb-map-feature-details .wb-exit-result { min-height:40px; } }

/* On the map an exit names its way under itself ("Stairs down → The Cellar") while it is pointed at or selected,
   at a steady size on screen like a pin's name, so the map stays clear the rest of the time. A name is read, so its
   tag is solid, never glass. */

/* The map's own inks, made from the system's colours where a mix can't be told from the drawn colour (under 2 in
   CIEDE2000): a warm white road, its dark edge, a dark wall. Water and hedge have no near mix, so they have their own
   tokens (tokens.css). */
.canvas-wrapper, .wb-game-map, .wh-map-plane {
  --wb-way-ink:color-mix(in srgb, var(--wl-text) 84%, var(--wl-warning));
  --wb-way-edge:color-mix(in srgb, color-mix(in srgb, var(--wl-bg) 94%, var(--wl-warning)) 62%, transparent);
  --wb-wall-ink:color-mix(in srgb, color-mix(in srgb, var(--wl-danger) 18%, var(--wl-warning)) 14%, var(--wl-bg));
  --wb-water-ink:var(--wl-map-water);
  --wb-hedge-ink:var(--wl-map-hedge);
}
/* Drawing a way: the places it can start or end on light up under the pointer; the one it would end on stays lit. */
.wb-map-way-mode .wb-map-area:not(.wb-map-object):is(:hover, .wb-way-target) .wb-shape-paint > * { filter:brightness(1.1) drop-shadow(0 0 3px color-mix(in srgb, var(--wl-selection) 45%, transparent)); }
.wb-map-way-mode .wb-map-pin:is(:hover, .wb-way-target) .wb-pin-marker { outline-color:color-mix(in srgb, var(--wl-selection) 60%, transparent); }

/* Inspect (D-070): every element, and the map itself, answers the same four questions, with a notice above them
   when there is something to fix. */
.wb-map-feature-details .wb-feature-more { width:26px; height:26px; padding:4px; box-shadow:none; background:transparent; color:var(--wl-text-2); }
.wb-map-feature-details .wb-feature-more svg { width:16px; height:16px; }
.wb-feature-subhead { margin:var(--sp-1) 0 0; font-size:var(--t-help); font-weight:600; color:var(--wl-text-2); }
.wb-feature-ways { display:flex; flex-direction:column; gap:4px; }
/* Ways out and what a door joins are one list, drawn like a place's sides. */
.wb-map-feature-details .wb-feature-ways { gap:0; border:1px solid var(--wl-line); border-radius:var(--r-sm); background:transparent; overflow:hidden; }
.wb-map-feature-details .wb-feature-ways:empty { display:none; }
.wb-map-feature-details .wb-feature-ways > button.wb-feature-way { min-height:36px; padding:6px 9px; border:0; border-radius:0; background:transparent; }
.wb-map-feature-details .wb-feature-ways > button.wb-feature-way + button.wb-feature-way { border-top:1px solid var(--wl-line); }
.wb-map-feature-details button.wb-feature-way, .wb-map-feature-details button.wb-feature-problem { display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; height:auto; min-height:32px; padding:7px 9px; font-size:12px; line-height:1.35; text-align:left; white-space:normal; box-shadow:none; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-surface); transition:background-color var(--wl-fast) var(--wl-ease); }
.wb-map-feature-details button.wb-feature-way:hover:not(:disabled), .wb-map-feature-details button.wb-feature-problem:hover:not(:disabled) { background:var(--wl-raised); }
.wb-map-feature-details button.wb-feature-way:disabled { opacity:1; cursor:default; }
.wb-feature-way small { font-size:11px; color:var(--wl-text-3); }
/* A place's sides (step 3): what's beyond each, wall or open, and the button that opens or closes it. */
.wb-feature-sides { display:flex; flex-direction:column; border:1px solid var(--wl-line); border-radius:var(--r-sm); background:transparent; overflow:hidden; }
.wb-feature-side { display:flex; align-items:center; gap:8px; min-height:36px; padding:0 6px 0 0; }
.wb-feature-side + .wb-feature-side { border-top:1px solid var(--wl-line); }
.wb-map-feature-details button.wb-feature-side-name { flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:1px; height:auto; padding:6px 9px; font-size:12px; line-height:1.3; text-align:left; box-shadow:none; background:transparent; border-radius:0; transition:background-color var(--wl-fast) var(--wl-ease); }
.wb-map-feature-details button.wb-feature-side-name:hover:not(:disabled) { background:var(--wl-raised); }
.wb-map-feature-details button.wb-feature-side-name:disabled { opacity:1; cursor:default; }
.wb-feature-side-name small { font-size:11px; color:var(--wl-text-3); }
.wb-map-feature-details .wb-feature-side > .wb-map-quiet-button { flex:0 0 auto; width:auto; min-height:26px; padding:3px 10px; font-size:11px; }
/* One link: its own card, so several stay apart. */
.wb-feature-link-row { display:flex; flex-direction:column; gap:10px; padding:10px; border:1px solid var(--wl-line); border-radius:var(--r-sm); background:transparent; }
.wb-feature-link-row .wb-feature-link-actions { margin:0; }
.wb-map-feature-details button.wb-feature-problem { flex-direction:row; align-items:baseline; gap:7px; border-color:color-mix(in srgb, var(--wl-warning) 35%, var(--wl-line)); }
.wb-map-feature-details button.wb-feature-problem::before { content:''; flex:0 0 6px; height:6px; border-radius:50%; background:var(--wl-warning); transform:translateY(-1px); }
/* What to fix: one small notice at the top of a sheet, above About, warm like a problem. Each problem is a row that
   selects and zooms to what it is about; a note (off the board) is plain text. It lines up with the sections below. */
.wb-feature-notice { display:flex; flex-direction:column; margin:0 0 var(--sp-2); border:1px solid color-mix(in srgb, var(--wl-warning) 35%, var(--wl-line)); border-radius:var(--r-md); background:color-mix(in srgb, var(--wl-warning) 6%, var(--wl-surface)); overflow:hidden; }
.wb-feature-notice-title { margin:0; padding:7px 10px 6px; color:var(--wl-warning); font-size:var(--t-help); font-weight:600; }
.wb-map-feature-details .wb-feature-notice > button.wb-feature-problem { min-height:32px; padding:7px 10px; border:0; border-top:1px solid color-mix(in srgb, var(--wl-warning) 20%, var(--wl-line)); border-radius:0; background:transparent; }
.wb-map-feature-details .wb-feature-notice > button.wb-feature-problem:disabled { opacity:1; cursor:default; }
.wb-feature-notice-note { margin:0; padding:7px 10px 8px; border-top:1px solid color-mix(in srgb, var(--wl-warning) 20%, var(--wl-line)); color:var(--wl-text-2); font-size:12px; line-height:1.45; }
/* The map's own sheet: the map's settings in the inspector's sections. */
.wb-map-sheet .wb-feature-fields.wb-map-settings-sheet { display:block; padding:var(--sp-3) var(--sp-3) 82px; }
/* Shape and grid choices fill the row in equal parts, so they line up with the fields and buttons around them. */
.wb-map-sheet .wb-map-property-body > .wb-map-ratio-presets { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:var(--sp-1); }
.wb-map-sheet .wb-map-ratio-presets button { width:100%; height:32px; padding:0 var(--sp-1); font-size:var(--t-help); }
.wb-map-sheet .wb-map-property-body > .wb-map-grid-types { grid-template-columns:repeat(3, minmax(0,1fr)); gap:var(--sp-1); }
.wb-map-sheet .wb-map-setting-pair { gap:var(--sp-2); }
/* A switch's name reads as a row's name, as in an element's switches, not as a field label. */
.wb-map-sheet .wb-map-property-body .wb-map-preference-toggle > span, .wb-map-feature-details .wb-map-property-body .wb-feature-lock strong { font-size:var(--t-ui); font-weight:400; color:var(--wl-text); }
.wb-map-sheet .wb-map-property-body .wb-feature-field { margin:0; }
.wb-map-sheet .wb-map-property-body > .wb-map-action-button, .wb-map-sheet .wb-map-property-body > .wb-map-quiet-button { margin-top:0; }
.wb-map-sheet .wb-feature-identity small { text-transform:none; }
.wb-map-sheet .wb-map-preference-toggle input[type="checkbox"] { width:14px; height:14px; padding:0; flex-shrink:0; }
.wb-map-sheet-style { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:8px; font-size:12px; }
.wb-map-sheet-style > span { font-size:11px; color:var(--wl-text-2); }
.wb-map-sheet-style > strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.wb-map-sheet .wb-map-sheet-warning { color:var(--wl-warning); }
.wb-map-selection-note { display:flex; flex-direction:column; gap:7px; margin:var(--sp-3) var(--sp-3) 0; padding:10px; border:1px solid var(--wl-line); border-radius:var(--r-md); font-size:12px; }
.wb-map-selection-list { display:flex; flex-wrap:wrap; gap:4px; }
.wb-map-selection-note button.wb-map-selection-item { max-width:100%; height:26px; padding:3px 9px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; box-shadow:none; border:1px solid var(--wl-line); border-radius:var(--r-md); background:transparent; }

/* Outline (D-070 §8.3): the map as a list. */
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-map-outline"] > :is(.view-header, .wl-page-header) { display:none; }
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-map-outline"] > :is(.view-content, .wl-page-content) { padding:0; overflow:auto; display:flex; flex-direction:column; }
/* The search band stays put over the list, so it is painted: with the frame itself (its hint of the world's colours,
   D-108, is fixed to the window, so the band and the panel behind it match). The panel's cards, lists and choices
   paint nothing of their own, so the frame shows through them too. */
.wb-map-outline-top { position:sticky; top:0; z-index:1; display:flex; flex-direction:column; gap:8px; padding:12px 14px 10px; background:var(--wl-frame, var(--wl-surface)); border-bottom:1px solid var(--wl-line); }
.wb-map-outline-top input.wb-map-outline-search { width:100%; height:var(--wl-control); font-size:var(--t-ui); }
.wb-map-outline-filters { display:flex; flex-wrap:wrap; gap:4px; }
.wb-map-outline-filters button.wb-map-outline-filter { height:24px; padding:2px 9px; font-size:11px; box-shadow:none; border:1px solid var(--wl-line); border-radius:var(--r-md); background:transparent; color:var(--wl-text-2); transition:color var(--wl-fast) var(--wl-ease), border-color var(--wl-fast) var(--wl-ease), background-color var(--wl-fast) var(--wl-ease); }
.wb-map-outline-filters button.wb-map-outline-filter:hover { color:var(--wl-text); background:var(--wl-raised); }
.wb-map-outline-filters button.wb-map-outline-filter[aria-pressed="true"] { color:var(--wl-text); border-color:var(--wl-selection); background:var(--wl-selection-soft); }
.wb-map-outline { padding:4px 8px 20px; }
.wb-map-outline > .wb-feature-note { margin:14px 6px; font-size:12px; }
.wb-map-outline-group { padding-top:8px; }
.wb-map-outline-group > h4 { display:flex; align-items:baseline; gap:var(--sp-2); margin:0; padding:var(--sp-2); font-size:var(--t-help); font-weight:600; color:var(--wl-text-2); }
.wb-map-outline-group > h4 small { font-weight:500; font-size:11px; font-family:var(--wl-font-mono); color:var(--wl-text-3); }
.wb-map-outline-group > .wb-feature-note { margin:0 6px 6px; font-size:11px; line-height:1.45; }
.wb-map-outline-group > .wb-map-quiet-button { margin:6px 6px 0; width:calc(100% - 12px); }
.wb-map-outline-row { display:flex; align-items:center; gap:1px; padding-left:calc(var(--depth, 0) * 14px); border-radius:var(--r-sm); transition:background-color var(--wl-fast) var(--wl-ease); }
.wb-map-outline-row:hover { background:var(--wl-raised); }
.wb-map-outline-row.is-selected { background:var(--wl-selection-soft); }
.wb-map-outline-row.is-hidden .wb-map-outline-main { opacity:.5; }
.wb-map-outline-row button.wb-map-outline-main { flex:1; min-width:0; display:flex; align-items:center; justify-content:flex-start; gap:7px; height:auto; min-height:30px; padding:4px 6px; font-size:12px; text-align:left; box-shadow:none; border:0; background:transparent; }
.wb-map-outline-row button.wb-map-outline-main:disabled { opacity:1; cursor:default; }
.wb-map-outline-main svg { width:15px; height:15px; flex-shrink:0; color:var(--wl-text-3); }
.wb-map-outline-row.is-selected .wb-map-outline-main svg { color:var(--wl-selection); }
.wb-map-outline-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-map-outline-row[data-glyph="problem"] .wb-map-outline-name { white-space:normal; line-height:1.35; }
.wb-map-outline-row[data-glyph="problem"] .wb-map-outline-main svg { color:var(--wl-warning); }
.wb-map-outline-main small { flex-shrink:100; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; color:var(--wl-text-3); }
.wb-map-outline-main small.wb-map-outline-in { margin-left:auto; padding-left:6px; }
.wb-map-outline-row button.wb-map-outline-action { flex-shrink:0; width:24px; height:24px; padding:4px; color:var(--wl-text-3); box-shadow:none; background:transparent; opacity:0; transition:opacity var(--wl-fast) var(--wl-ease); }
.wb-map-outline-action svg { width:14px; height:14px; }
.wb-map-outline-row:hover .wb-map-outline-action, .wb-map-outline-row:focus-within .wb-map-outline-action, .wb-map-outline-row.is-selected .wb-map-outline-action, .wb-map-outline-row .wb-map-outline-action[aria-pressed="true"] { opacity:1; }
.wb-map-outline-row .wb-map-outline-lock[aria-pressed="true"] { color:var(--wl-text); }
@media (hover:none) { .wb-map-outline-row button.wb-map-outline-action { opacity:1; width:32px; height:32px; padding:8px; } .wb-map-outline-row button.wb-map-outline-main { min-height:36px; } }
@media (prefers-reduced-motion:reduce) { .wb-map-outline-row, .wb-map-outline-row .wb-map-outline-action, .wb-map-outline-filters .wb-map-outline-filter { transition:none; } }
/* Hidden from Outline only while you work here; the game and the GM still have it. */
.canvas-node.wb-map-hidden-here { visibility:hidden; }

/* Phone (D-070 §8.6): the panel is a sheet over the bottom of the map, the full width of the screen; the map's panel
   button opens and closes it. */
@media (max-width:640px) {
  .wb-map-body { position:relative; }
  /* .wb-shell lifts it over the workspace's own phone rule for side panels (top:0, which would hang the sheet from the
     top of the map); a folded panel is left alone, so a closed panel never shows as an empty sheet. */
  .wb-shell .wb-map-body > :is(.workspace-split.mod-right-split, .wl-side-panel.is-right):not(.is-sidedock-collapsed, .is-folded) { position:absolute; top:auto; left:0; right:0; bottom:0; z-index:30; width:auto !important; max-width:none; height:min(62%, 560px); border-left:0; border-top:1px solid var(--wl-line); border-radius:var(--r-xl) var(--r-xl) 0 0; background:var(--wl-surface); box-shadow:0 -10px 30px color-mix(in srgb, var(--wl-bg) 28%, transparent); overflow:hidden; animation:wb-map-sheet-in var(--wl-base) var(--wl-ease-out); }
  :is(.workspace-split.mod-root, .wl-main) :is(.workspace-leaf, .wl-tab-page) .wb-map-body > :is(.workspace-split.mod-right-split, .wl-side-panel.is-right) > .workspace-leaf-resize-handle { display:none; }
  /* The panel's inside fills the sheet; at its desktop width it would stand at the right with a strip left empty. */
  .wb-shell .wb-map-body > .wl-side-panel.is-right:not(.is-folded) > .wl-side-inner { left:0; width:auto; }
  /* The map's own buttons stay at the top of the map, clear of the sheet's tabs. */
  .wb-shell :is(.workspace-split.mod-root, .wl-main) :is(.workspace-leaf-content, .wl-page)[data-type="canvas"]:has(.wb-map-panel-toggle.is-active) .wb-map-body > .mod-right-split .workspace-tab-header-container { padding-right:8px; }
  /* With the sheet open they stand as they do with the panel closed: a column at the top right, the zoom stack below. */
  .wb-shell :is(.workspace-split.mod-root, .wl-main) :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header):has(.wb-map-panel-toggle.is-active) { top:8px; right:10px; padding:4px; border-color:var(--wl-glass-line); background:var(--wb-map-glass, var(--wl-surface)); box-shadow:var(--wl-elev-pop); -webkit-backdrop-filter:blur(var(--wl-glass-blur)) saturate(1.08); backdrop-filter:blur(var(--wl-glass-blur)) saturate(1.08); }
  .wb-shell :is(.workspace-split.mod-root, .wl-main) :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header) :is(.view-actions, .wl-page-actions) { flex-direction:column-reverse; }
  .wb-shell :is(.workspace-split.mod-root, .wl-main) :is(.workspace-leaf-content, .wl-page)[data-type="canvas"]:has(.wb-map-panel-toggle.is-active) .canvas-controls { top:92px; }
  .wb-shell :is(.workspace-split.mod-root, .wl-main) .wl-page[data-type="canvas"]:has(> .wl-page-header .wl-page-more[hidden]):has(.wb-map-panel-toggle.is-active) .canvas-controls { top:58px; }
}
@keyframes wb-map-sheet-in { from { transform:translateY(24px); opacity:.6; } }
@media (prefers-reduced-motion:reduce) { .wb-map-body > :is(.workspace-split.mod-right-split, .wl-side-panel.is-right) { animation:none !important; } }

/* One view (D-070 §8.1): the picture shows as it is, and the plan is drawn over it only as much as the tool in hand
   needs. Select and Pan: names, pins and tokens, and the outline of what's pointed at or selected. Area and Pin: every
   place's outline, thin. Object and Token: every object's outline, thin, and its number. Show plan (by the zoom stack),
   or a map with no picture, draws the whole plan tinted. An object is drawn as a shape too (.wb-map-area). */
.canvas-wrapper:not(.wb-show-plan) .wb-map-area .wb-shape-paint > * { fill:transparent; stroke:transparent; transition:stroke var(--wl-fast) var(--wl-ease), filter var(--wl-fast) var(--wl-ease); }
.canvas-wrapper:not(.wb-show-plan) .wb-map-area:is(:hover, .is-focused, .is-selected) .wb-shape-paint > * { stroke:var(--wb-feature-stroke); }
.canvas-wrapper:not(.wb-show-plan):is([data-wb-tool="area"], [data-wb-tool="pin"]) .wb-map-area:not(.wb-map-object) .wb-shape-paint > *,
.canvas-wrapper:not(.wb-show-plan):is([data-wb-tool="object"], [data-wb-tool="token"]) .wb-map-object .wb-shape-paint > * { stroke:color-mix(in srgb, var(--wb-feature-stroke) 80%, transparent); stroke-width:1.25px; }
.canvas-wrapper:not(.wb-show-plan) .wb-map-area > .canvas-node-container > .canvas-node-content { background:transparent; }
/* Paint shows only what the painter is told; tokens move and are never painted, so they step aside while it is in hand. */
.canvas-wrapper[data-wb-tool="paint"] .wb-map-token, .canvas-wrapper[data-wb-tool="artwork"] .wb-map-token { opacity:0; pointer-events:none; transition:opacity var(--wl-fast) var(--wl-ease); }
/* Boris's button sits clear of the map's toolbar, however many rows it takes (map-tools.js placeHint). In the own window
   the button is inside the workspace, so no :has() is needed; the inherited shell's canvas tab keeps one, behind
   :not(.wl-own) so the own window never asks it (a :has() on body made every change look through the whole page). */
body.wb-shell:not(.wl-own):has(.mod-root .workspace-tab-header.is-active[data-type="canvas"]) button.wt-orbis-orb,
body.wb-shell .wl-workspace.is-page-map button.wt-orbis-orb { bottom: calc(var(--wb-map-toolbar-height, 40px) + 32px); }
:is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .canvas-controls .wb-map-plan-toggle.is-active:not(.is-disabled) { color:var(--wl-text); background:var(--wl-selection-soft); }
:is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .canvas-controls .wb-map-plan-toggle.is-disabled { opacity:.4; cursor:default; }
@media (prefers-reduced-motion:reduce) { .canvas-wrapper .wb-map-area .wb-shape-paint > * { transition:none; } }

/* Ways (map-system-design §9.3, map-way-tool.js): a door, a route or a wall line is an element whose box only holds its
   line, so the box is neither shown nor hit; only the line is. Lines and marks keep their size on screen at any zoom,
   except a route, which is as wide as it was drawn. */
.wb-way-element, .wb-way-element .canvas-node-container, .wb-way-element .wb-feature-visual { pointer-events:none; }
.wb-way-element > .canvas-node-container { border-color:transparent !important; background:transparent !important; box-shadow:none !important; }
.wb-way-element .canvas-node-content, .wb-way-element .canvas-node-resizer, .wb-way-element .canvas-node-connection-point { display:none !important; }
.wb-way-drawing { position:absolute; inset:0; overflow:visible; }
.wb-way-hit { fill:none; stroke:transparent; stroke-width:calc(14px * var(--zoom-multiplier, 1)); stroke-linecap:round; stroke-linejoin:round; pointer-events:stroke; cursor:pointer; }
.wb-map-door .wb-way-hit { cursor:grab; }
.canvas-wrapper:not([data-wb-tool="select"]) .wb-way-hit { pointer-events:none; }
/* A door: a short bar across the wall at its width where the plan shows; over the picture, two small ticks at its ends
   with the painted doorway between them, and the bar when pointed at or selected. */
.wb-door-bar { stroke:var(--wb-way-ink); stroke-width:calc(6px * var(--zoom-multiplier, 1)); stroke-linecap:butt; filter:drop-shadow(0 0 1px color-mix(in srgb, var(--wl-bg) 75%, transparent)); transition:opacity var(--wl-fast) var(--wl-ease), stroke var(--wl-fast) var(--wl-ease); }
.wb-door-tick line { stroke:var(--wb-way-ink); stroke-width:2px; stroke-linecap:round; filter:drop-shadow(0 0 1px color-mix(in srgb, var(--wl-bg) 80%, transparent)); }
.wb-door-tick, .wb-door-mark { transition:opacity var(--wl-fast) var(--wl-ease); }
.wb-door-mark path { fill:var(--wb-way-ink); stroke:var(--wb-way-edge); stroke-width:1.4px; stroke-linecap:round; stroke-linejoin:round; }
.wb-door-mark.is-one-way path { fill:none; stroke:var(--wb-way-ink); stroke-width:2px; filter:drop-shadow(0 0 1px color-mix(in srgb, var(--wl-bg) 80%, transparent)); }
.wb-map-door:is(.is-focused, .is-selected) .wb-door-bar { stroke:var(--wl-selection); }
.wb-way-element.is-hidden-way .wb-door-bar { stroke-dasharray:calc(4px * var(--zoom-multiplier, 1)) calc(3px * var(--zoom-multiplier, 1)); }
.wb-way-element.is-hidden-way .wb-door-tick line { stroke-dasharray:2 2; }
.canvas-wrapper:not(.wb-show-plan):not([data-wb-tool="way"]) .wb-map-door:not(:hover, .is-focused, .is-selected) :is(.wb-door-bar, .wb-door-mark) { opacity:0; }
.canvas-wrapper:is(.wb-show-plan, [data-wb-tool="way"]) .wb-door-tick, .wb-map-door:is(:hover, .is-focused, .is-selected) .wb-door-tick { opacity:0; }
/* A route: light, with a dark line down its middle, at its width; water is blue. A wall line: dark and solid. Over the
   picture they show while pointed at or selected, and while the Way tool is in hand. */
.wb-route-line { fill:none; stroke:color-mix(in srgb, var(--wb-way-ink) 62%, transparent); stroke-width:calc(5px * var(--zoom-multiplier, 1)); stroke-linecap:round; stroke-linejoin:round; transition:opacity var(--wl-fast) var(--wl-ease); }
.wb-route-centre { fill:none; stroke:var(--wb-way-edge); stroke-width:calc(1.5px * var(--zoom-multiplier, 1)); stroke-linecap:round; stroke-linejoin:round; transition:opacity var(--wl-fast) var(--wl-ease); }
.wb-map-route:is([data-way-kind="river"], [data-way-kind="sea"]) .wb-route-line { stroke:color-mix(in srgb, var(--wb-water-ink) 70%, transparent); }
.wb-map-route:is([data-way-kind="path"], [data-way-kind="tunnel"]) .wb-route-centre { stroke-dasharray:calc(6px * var(--zoom-multiplier, 1)) calc(4px * var(--zoom-multiplier, 1)); }
.wb-map-route[data-way-kind="sea"] .wb-route-centre { stroke-dasharray:calc(10px * var(--zoom-multiplier, 1)) calc(6px * var(--zoom-multiplier, 1)); }
.wb-map-route:is(.is-focused, .is-selected) .wb-route-centre { stroke:var(--wl-selection); stroke-width:calc(2.5px * var(--zoom-multiplier, 1)); }
.wb-wall-line { fill:none; stroke:var(--wb-wall-ink); stroke-width:calc(5px * var(--zoom-multiplier, 1)); stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 0 1px color-mix(in srgb, var(--wl-text) 35%, transparent)); transition:opacity var(--wl-fast) var(--wl-ease); }
.wb-map-wall[data-way-kind="hedge"] .wb-wall-line { stroke:var(--wb-hedge-ink); }
.wb-map-wall[data-way-kind="fence"] .wb-wall-line { stroke-dasharray:calc(8px * var(--zoom-multiplier, 1)) calc(4px * var(--zoom-multiplier, 1)); }
.wb-map-wall:is(.is-focused, .is-selected) .wb-wall-line { stroke:var(--wl-selection); }
.wb-way-element.is-hidden-way :is(.wb-route-line, .wb-route-centre) { opacity:.45; }
.canvas-wrapper:not(.wb-show-plan):not([data-wb-tool="way"]) :is(.wb-map-route, .wb-map-wall):not(:hover, .is-focused, .is-selected) :is(.wb-route-line, .wb-route-centre, .wb-wall-line) { opacity:0; }
/* Sides: every one while the Way tool is in hand, walls solid and open sides dotted; an interior's open sides dotted
   while the plan shows. */
.wb-way-layer { position:absolute; left:0; top:0; overflow:visible; pointer-events:none; }
.wb-way-layer:not(.wb-sides-layer) { z-index:1000; }
.wb-side { fill:none; stroke-linecap:round; }
.wb-side.is-wall { stroke:color-mix(in srgb, var(--wl-text) 72%, transparent); stroke-width:calc(2.5px * var(--zoom-multiplier, 1)); filter:drop-shadow(0 0 1px color-mix(in srgb, var(--wl-bg) 60%, transparent)); }
.wb-side.is-open { stroke:var(--wl-text); stroke-width:calc(3px * var(--zoom-multiplier, 1)); stroke-dasharray:0 calc(7px * var(--zoom-multiplier, 1)); filter:drop-shadow(0 0 1px color-mix(in srgb, var(--wl-bg) 70%, transparent)); }
/* A door a game works out on a building's map nobody wired: dashed in the door's colour, kept when the first door is drawn. */
.wb-side.is-worked { stroke:var(--wl-selection); stroke-width:calc(5px * var(--zoom-multiplier, 1)); stroke-linecap:butt; stroke-dasharray:calc(4px * var(--zoom-multiplier, 1)) calc(3px * var(--zoom-multiplier, 1)); opacity:.75; }
/* The door the Door tool would put in: on the nearest wall, named by what it joins, or grey away from one. */
.wb-way-ghost line { stroke:var(--wl-selection); stroke-width:calc(6px * var(--zoom-multiplier, 1)); stroke-linecap:butt; opacity:.9; }
.wb-way-ghost.is-off-wall line { stroke:var(--wl-text-3); opacity:.6; }
.wb-way-ghost polyline { fill:none; stroke:var(--wl-selection); stroke-width:calc(3px * var(--zoom-multiplier, 1)); stroke-linecap:round; stroke-linejoin:round; }
.wb-way-ghost-label { position:absolute; z-index:1000; width:0; height:0; transform:scale(var(--zoom-multiplier, 1)); transform-origin:0 0; pointer-events:none; }
.wb-way-ghost-label > span { position:absolute; left:0; top:0; transform:translate(-50%, calc(-100% - 14px)); padding:3px 10px; border:1px solid var(--wl-line); border-radius:var(--r-pill); background:var(--wl-surface); box-shadow:0 4px 12px color-mix(in srgb, var(--wl-bg) 22%, transparent); color:var(--wl-text); font-size:12px; font-weight:500; line-height:1.4; white-space:nowrap; }
.wb-way-ghost-label.is-off-wall > span { color:var(--wl-text-2); }
/* A selected door's handles: its middle slides it along its wall, its ends widen it. */
.wb-door-handles { position:absolute; left:0; top:0; z-index:1000; width:0; height:0; pointer-events:none; }
.wb-door-handle { position:absolute; width:12px; height:12px; box-sizing:border-box; border:2px solid var(--wl-selection); border-radius:50%; background:var(--wl-bg); transform:translate(-50%, -50%) scale(var(--zoom-multiplier, 1)); pointer-events:auto; cursor:grab; }
.wb-door-handle::before { content:''; position:absolute; inset:-8px; border-radius:50%; }
.wb-door-handle.is-middle { width:10px; height:10px; background:var(--wl-selection); }
.wb-door-handle:active { cursor:grabbing; }
@media (pointer:coarse) { .wb-door-handle { width:18px; height:18px; } .wb-door-handle.is-middle { width:16px; height:16px; } }
/* The Way menu's keys. */
.wb-way-control .wb-shape-menu kbd { margin-left:auto; color:var(--wl-text-3); font-size:var(--t-help); font-family:inherit; }
@media (prefers-reduced-motion:reduce) { .wb-door-bar, .wb-door-tick, .wb-door-mark, .wb-route-line, .wb-route-centre, .wb-wall-line { transition:none; } }

/* The panel button reads like the icons beside it: plain while the panel is open, a soft fill only on hover. */
.wb-shell :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header) .wb-map-panel-toggle.is-active:not(:hover) { background:transparent; box-shadow:none; color:var(--wl-text-2); }
/* The panel's tabs sit inside the map, not in the title bar: no window dragging there, or Windows swallows clicks on
   the panel button that floats over them. */
body .wb-map-body .workspace-tab-header-container { -webkit-app-region:no-drag !important; app-region:no-drag !important; }
/* While the panel slides open or shut, the map's buttons step aside and fade in at their new place (map-panel.js). */
.wb-shell :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header) { transition:opacity var(--wl-base, 180ms) var(--wl-ease-out, ease-out); }
.wb-shell :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header).wb-map-actions-moving { opacity:0; transition:none; pointer-events:none; }
@media (prefers-reduced-motion:reduce) { .wb-shell :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header) { transition:none; } }
/* The build toolbar is about 530px wide and centred, so from a map narrower than about 650px its end reaches the help
   button in the corner: help steps aside sooner than shell.css's 520px (Claude, 2026-11-02). */
@container map-canvas (max-width:660px) { :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .canvas-controls > .canvas-control-group:has(.lucide-help-circle) { display:none; } }

/* Midnight Prism (D-184). The map's floating tools are real glass: the picture blurs through a dark tint, so their
   icons read over a light map as well as a dark one, a hairline of light rims them, and one shadow lifts them. Only
   tools float in glass; whatever is read (names on the map, the panel, menus that open from a tool) stays solid. The
   selectors match shell.css's and theme-overrides.css's, which load before this file. */
.wb-shell :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] {
  --wb-map-shadow:var(--wl-elev-pop);
  --wb-map-glass:linear-gradient(var(--wl-glass-fill), var(--wl-glass-fill)), color-mix(in srgb, var(--wl-surface) 78%, transparent);
}
.canvas-card-menu.wb-build-toolbar,
:is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .canvas-controls > :is(.wb-map-view-stack, .canvas-control-group),
.wb-shell :is(.workspace-split.mod-root, .wl-main) :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header),
.wb-shell :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .canvas-menu,
body.wb-shell .wb-map-breadcrumbs,
.wb-build-hint {
  border:1px solid var(--wl-glass-line);
  background:var(--wb-map-glass, var(--wl-surface));
  box-shadow:var(--wl-elev-pop);
  -webkit-backdrop-filter:blur(var(--wl-glass-blur)) saturate(1.08);
  backdrop-filter:blur(var(--wl-glass-blur)) saturate(1.08);
}
/* A selected thing's own tools take the band's measure: 4px inside, the band's radius. */
.wb-shell :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .canvas-menu { gap:2px; padding:4px; border-radius:var(--r-md); }
/* With the panel open (wider than a phone) the map's actions sit in the panel's tab row, plain (shell.css): no blur
   behind them either. On a phone they float on the map over the sheet, in glass (above). */
@media (min-width:641px) {
  .wb-shell :is(.workspace-split.mod-root, .wl-main) :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header):has(.wb-map-panel-toggle.is-active) { -webkit-backdrop-filter:none; backdrop-filter:none; }
}
/* Menus that open from a glass tool stay solid: inside the tool, the tool itself is all their blur would see, and
   they hold words to read. */
.wb-shape-menu, .wb-map-ancestor-menu { border:1px solid var(--wl-line); background:var(--wl-surface); box-shadow:var(--wl-elev-pop); -webkit-backdrop-filter:none; backdrop-filter:none; }
.wb-map-ancestor-menu { border-radius:var(--r-md); }
/* The place you are in, the last crumb, is the map's title: the title face at the panel size. The crumbs before it
   are the way back, in the interface face (a breadcrumb is not a title). */
.wb-map-navigation .wb-map-crumb[aria-current="page"], .wb-map-breadcrumbs > span.wb-map-crumb { font-family:var(--wl-font-title); font-size:var(--t-title-panel); font-weight:400; letter-spacing:0; text-transform:none; color:var(--wl-text); }
/* The zoom level is a number: mono, with even figures (shell.css). */
:is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .wb-map-view-stack .wb-map-zoom-level { font-family:var(--wl-font-mono); font-weight:500; }
/* The band is about 525px wide: on a narrower map (a tablet with the panel open) it wraps onto two centred rows
   instead of running off the edge; shell.css waits until 400px. */
@container map-canvas (max-width:560px) { .canvas-card-menu.wb-build-toolbar { flex-wrap:wrap; justify-content:center; } }
/* Asked for less see-through, the glass is solid (DESIGN-SYSTEM §6). */
@media (prefers-reduced-transparency: reduce) {
  .canvas-card-menu.wb-build-toolbar,
  :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .canvas-controls > :is(.wb-map-view-stack, .canvas-control-group),
  .wb-shell :is(.workspace-split.mod-root, .wl-main) :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header),
  .wb-shell :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .canvas-menu,
  body.wb-shell .wb-map-breadcrumbs,
  .wb-build-hint { background:var(--wl-inset); -webkit-backdrop-filter:none; backdrop-filter:none; }
}
@media (prefers-reduced-transparency: reduce) and (max-width:640px) {
  .wb-shell :is(.workspace-split.mod-root, .wl-main) :is(.workspace-leaf-content, .wl-page)[data-type="canvas"] > :is(.view-header, .wl-page-header):has(.wb-map-panel-toggle.is-active) { background:var(--wl-inset); -webkit-backdrop-filter:none; backdrop-filter:none; }
}

/* ---- One drawing on every map (map-render.mjs, E5) ----
   Home's map, a game's map card and the Mechanics preview draw each thing in a box of its own with the editor's own
   pieces, so the rules above give it the editor's look; these rules place the pieces where nothing is a canvas node. */
.wl-map-thing { position:absolute; pointer-events:none; }
.wl-map-links { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.wl-map-card .wb-shape-paint > * { pointer-events:visiblePainted; }
/* On a plane only a door is pointed at by its line; a route or a wall line is part of the map's picture. */
.wh-map-plane .wb-way-element:not(.wb-map-door) .wb-way-hit { pointer-events:none; }
/* Pointed at or chosen: the outline a little stronger and lighter. */
.wl-map-thing .wb-shape-paint > * { transition:filter var(--wl-fast) var(--wl-ease), stroke-width var(--wl-fast) var(--wl-ease); }
.wl-map-thing:is(.is-lit, .is-selected) .wb-shape-paint > * { stroke-width:calc(var(--wb-feature-stroke-width, 2px) + 1.5px); filter:brightness(1.3); }
/* A pin on a plane is the editor's teardrop, kept one size on screen. */
.wh-map-marker.wb-pin-marker { display:grid; place-items:center; width:22px; height:22px; box-sizing:border-box; border:2px solid var(--wb-feature-tint); border-radius:50% 50% 50% 0; background:var(--wb-feature-tint); box-shadow:0 0 8px color-mix(in srgb, var(--wl-bg) 25%, transparent); transform:scale(calc(1 / var(--zoom, 1))) rotate(-45deg) translate(-50%, -50%); }
.wh-map-marker.wb-pin-marker > svg { display:none; }
.wh-map-marker.wb-pin-marker:not(.has-picture)::after { content:''; width:8px; height:8px; border-radius:50%; background:var(--wl-bg); }
.wh-map-marker.wb-token-marker .wl-map-initials { font-size:10px; font-weight:600; letter-spacing:.02em; }
/* Over a painted map the painting shows the rooms, so a place is its outline alone, soft and in its colour, as Home
   always showed it, and in full when pointed at or chosen; an object that has a picture is its picture. */
:where(.wh-map-plane.wl-map-pictured) .wb-map-area .wb-shape-paint > * { fill:transparent; stroke:color-mix(in srgb, var(--wb-feature-stroke) 60%, transparent); }
/* The picture comes just before its outline (map-render.mjs drawShape), so a sibling says it has one. Not :has(): with
   the * after it, any change on the page re-styled the whole page (17 ms a pointer move). */
:where(.wh-map-plane.wl-map-pictured) .wb-map-object > .wb-area-image ~ :where(.wb-area-outline) .wb-shape-paint > * { stroke:transparent; }
:where(.wh-map-plane.wl-map-pictured) .wb-map-area:is(.is-lit, .is-selected) .wb-shape-paint > * { stroke:var(--wb-feature-stroke); }
/* Names over pins and tokens, even a game's gathered ones (z-index 1 and 2), and under a layer drawn over everything. */
.wh-map-plane > .wh-map-label { z-index:3; }
/* Layers (map-render.mjs addLayer): each the board's size, never in the way of the pointer unless a part of one asks
   for it. One over the map's things lies under pins, tokens and names by its place on the plane; one over everything
   lies above them. */
.wl-map-layer { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.wl-map-layer.is-over-all { z-index:4; }
@media (prefers-reduced-motion:reduce) { .wl-map-thing .wb-shape-paint > * { transition:none; } }

/* ---- Names on a map (C3) ----
   A name is the whole name in the app's own letters, with no box behind it: light letters with a soft dark halo where
   there is a picture (words on pictures stay white in every theme), the page's own ink with a halo of the page where
   there is none, so it reads in a pale theme too. A long name wraps onto a second line and gets a little smaller first;
   only one too long even for that is cut at the end of its second line, and keeps its whole self on hover
   (map-render.mjs drawName). */
.canvas-wrapper, .wh-map-plane {
  --wl-name-ink:var(--wl-text); --wl-name-ink-2:var(--wl-text-2);
  --wl-name-halo:0 0 1px var(--wl-bg), 0 0 2px var(--wl-bg), 0 0 4px var(--wl-bg), 0 0 7px color-mix(in srgb, var(--wl-bg) 70%, transparent);
}
:is(.canvas-wrapper, .wh-map-plane).wl-map-pictured {
  --wl-name-ink:var(--wl-on-picture); --wl-name-ink-2:var(--wl-on-picture-2);
  --wl-name-halo:0 0 1px var(--wl-picture-shade), 0 0 2px var(--wl-picture-shade), 0 1px 4px var(--wl-picture-shade), 0 0 8px var(--wl-picture-shade);
}
:is(.wb-feature-label, .wh-map-label) { overflow:visible; padding:0; border-radius:0; background:none; color:var(--wl-name-ink); font-family:var(--wl-font-ui); text-align:center; text-shadow:var(--wl-name-halo); white-space:normal; overflow-wrap:break-word; text-wrap:balance; }
/* Only a name too long for two lines is cut; its words keep room at the sides for their halo. */
:is(.wb-feature-label, .wh-map-label).is-cut .wl-map-name { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; min-width:0; margin:0 -6px; padding:0 6px; overflow:hidden; }
.wb-map-feature .wb-feature-label.is-long { font-size:calc(var(--wb-label-font-size, 14px) * .92); }
.wb-map-feature .wb-feature-label.is-longer { font-size:calc(var(--wb-label-font-size, 14px) * .85); }
/* The editor's names give way as a game's do (map-render.mjs tidyEditorNames): a place's name moves a line or two up or
   down off another name or a token, in lines of its own height and a gap of 4 pixels on screen (--canvas-scale is the
   editor's zoom). */
.wb-map-area .wb-feature-label { translate:0 calc(var(--sy, 0) * (100% + 4px / var(--canvas-scale, 1))); }
/* The map's own delete sits at the foot of its panel, under a line, in the danger colour: quiet until pointed at. */
/* Room under it for the Orbis button floating over the panel's bottom right corner, so it scrolls clear of it. */
.wb-map-feature-details .wb-map-sheet-foot { display:flex; flex-direction:column; gap:8px; margin-top:var(--sp-4); margin-bottom:56px; padding-top:var(--sp-3); border-top:1px solid var(--wl-line); }
.wb-map-foot-actions { display:flex; flex-wrap:wrap; gap:6px; }
#wb-map-information-panel .wb-map-feature-details .wb-map-foot-btn,
#wb-map-information-panel .wb-map-feature-details .wb-map-export-button { display:inline-flex; align-items:center; justify-content:center; gap:6px; flex:1 1 auto; width:auto; min-height:32px; margin:0; padding:0 10px; font-size:12px; color:var(--wl-text-2); background:transparent; border:1px solid var(--wl-line); border-radius:var(--r-md); box-shadow:none; }
#wb-map-information-panel .wb-map-feature-details .wb-map-export-button { width:100%; }
#wb-map-information-panel .wb-map-feature-details :is(.wb-map-foot-btn, .wb-map-export-button):hover:not(:disabled) { color:var(--wl-text); background:var(--wl-raised); border-color:var(--wl-line-strong); }
#wb-map-information-panel .wb-map-feature-details .wb-map-delete-button { width:100%; min-height:32px; justify-content:center; color:var(--wl-danger); background:transparent; border:1px solid color-mix(in srgb, var(--wl-danger) 40%, var(--wl-line)); border-radius:var(--r-md); box-shadow:none; font-size:var(--t-ui); }
#wb-map-information-panel .wb-map-feature-details .wb-map-delete-button:hover:not(:disabled) { background:color-mix(in srgb, var(--wl-danger) 12%, transparent); border-color:var(--wl-danger); }
#wb-map-information-panel .wb-map-feature-details .wb-map-delete-button:disabled { opacity:.45; }

/* Inline Unlock button on read-only panel banner, plus Outline unhide & alert bars. */
#wb-map-information-panel .wb-row-panel .wb-panel-unlock { flex:none; height:24px; min-height:24px; padding:0 10px; border:1px solid var(--wl-line-strong); border-radius:var(--r-pill); background:var(--wl-raised); color:var(--wl-text); font-size:11px; font-weight:600; box-shadow:none; }
#wb-map-information-panel .wb-row-panel .wb-panel-unlock:hover { background:var(--wl-selection-soft); border-color:var(--wl-selection); }
.wb-map-outline-banner { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:6px 4px 2px; padding:6px 10px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); font-size:11.5px; color:var(--wl-text-2); }
.wb-map-outline-banner button.wb-map-outline-unhide { height:24px; min-height:24px; padding:0 9px; border:1px solid var(--wl-line-strong); border-radius:var(--r-sm); background:var(--wl-surface); color:var(--wl-text); font-size:11px; font-weight:500; box-shadow:none; }
.wb-map-outline-banner button.wb-map-outline-unhide:hover { background:var(--wl-raised); border-color:var(--wl-selection); }
.wb-map-outline-alerts { display:flex; flex-wrap:wrap; gap:6px; margin:6px 4px 2px; }
.wb-map-outline-alerts button.wb-map-outline-alert { height:24px; min-height:24px; padding:0 9px; border:1px solid var(--wl-line); border-radius:var(--r-pill); background:var(--wl-inset); color:var(--wl-text-2); font-size:11px; font-weight:500; box-shadow:none; }
.wb-map-outline-alerts button.wb-map-outline-alert.is-warn { border-color:color-mix(in srgb, var(--wl-warning) 45%, var(--wl-line)); color:var(--wl-warning); background:color-mix(in srgb, var(--wl-warning) 10%, var(--wl-surface)); }
.wb-map-outline-alerts button.wb-map-outline-alert:hover { border-color:var(--wl-line-strong); color:var(--wl-text); }

/* ---- A picked thing's panel in rows (D-241) ----
   Its picture, name and kind at the top; then About, Ways, Look and Position, each a card of rows. A row is one
   setting with its value; pressed, it opens what it holds in place, one row at a time. Help sits on an ⓘ, never as a
   paragraph. Switches are rows too. */
.wb-row-panel .wb-row-icon { width:15px; height:15px; display:block; flex:none; }
.wb-row-panel .wb-panel-head { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:start; gap:0 10px; padding:var(--sp-3) var(--sp-2) var(--sp-2) var(--sp-3); flex-wrap:nowrap; }
.wb-row-panel .wb-panel-mark { width:44px; height:44px; border-radius:10px; display:grid; place-items:center; overflow:hidden; background:var(--wl-raised); border:1px solid var(--wl-line); color:var(--wl-text-2); }
.wb-row-panel .wb-panel-mark svg { width:20px; height:20px; }
.wb-row-panel .wb-panel-mark.has-picture img { width:100%; height:100%; object-fit:cover; display:block; }
.wb-row-panel .wb-feature-identity { min-width:0; display:flex; flex-direction:column; gap:2px; padding-top:2px; }
/* The name is changed where it is shown: a field that looks like the title until pointed at. */
#wb-map-information-panel .wb-row-panel.wb-map-feature-details textarea.wb-panel-name.wb-panel-name.wb-panel-name { field-sizing:content; width:100%; min-height:0; max-height:none; margin:-3px 0 0 -6px; padding:3px 6px; resize:none; overflow:hidden; border:1px solid transparent; border-radius:8px; background:transparent; box-shadow:none; color:var(--wl-text); font-family:var(--wl-font-title); font-size:var(--t-title-panel); font-weight:400; line-height:1.35; letter-spacing:0; text-transform:none; }
#wb-map-information-panel .wb-row-panel.wb-map-feature-details textarea.wb-panel-name.wb-panel-name.wb-panel-name:hover:not(:disabled) { background:var(--wl-inset); border-color:var(--wl-line); }
#wb-map-information-panel .wb-row-panel.wb-map-feature-details textarea.wb-panel-name.wb-panel-name.wb-panel-name:focus { background:var(--wl-inset); border-color:var(--wl-selection); outline:none; }
#wb-map-information-panel .wb-row-panel.wb-map-feature-details textarea.wb-panel-name.wb-panel-name.wb-panel-name::placeholder { color:var(--wl-text-3); }
/* A way's name is what it is (D-243): read, not typed, so it never looks like a field. */
#wb-map-information-panel .wb-row-panel.wb-map-feature-details textarea.wb-panel-name.wb-panel-name.wb-panel-name.is-fixed { cursor:default; background:transparent; border-color:transparent; }
.wb-row-panel .wb-panel-kind { margin:0; color:var(--wl-text-3); font-size:var(--t-help); text-transform:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#wb-map-information-panel .wb-row-panel .wb-feature-close { width:28px; height:28px; padding:0; display:grid; place-items:center; color:var(--wl-text-2); border:0; }
.wb-row-panel .wb-panel-status { display:none; align-items:center; justify-content:space-between; gap:8px; padding:0 var(--sp-3) var(--sp-1); }
.wb-row-panel .wb-panel-status .wb-map-edit-status { flex:1 1 auto; margin:0; font-size:var(--t-help); color:var(--wl-text-3); }
.wb-row-panel .wb-panel-status[data-save-state="error"], .wb-row-panel[data-readonly="true"] .wb-panel-status { display:flex; }
.wb-row-panel .wb-panel-status[data-save-state="error"] .wb-map-edit-status { color:var(--wl-danger); }
.wb-row-panel .wb-feature-fields { display:flex; flex-direction:column; flex:1 0 auto; padding:var(--sp-2) var(--sp-3) var(--sp-3); }
.wb-row-panel .wb-map-sheet-foot { margin-top:auto; }
.wb-row-panel .wb-map-sheet-foot .wb-map-delete-button { display:flex; align-items:center; gap:6px; }
/* The sections: cards with their name and a short summary, open from the start. */
.wb-row-panel .wb-map-property-section { border-radius:var(--r-lg); background:color-mix(in srgb, var(--wl-raised) 35%, transparent); margin-bottom:var(--sp-2); }
.wb-row-panel .wb-map-property-section > summary { min-height:38px; padding:0 var(--sp-3); font-size:13px; }
.wb-row-panel .wb-map-property-section[open] > summary { border-bottom:0; }
.wb-row-panel .wb-map-property-title { font-weight:700; }
.wb-row-panel .wb-map-property-body { padding:0 6px 8px; gap:2px; }
.wb-row-panel .wb-map-property-body > .wb-feature-field { padding:6px; }
.wb-row-panel .wb-map-property-body > .wb-feature-note { padding:2px 6px 4px; color:var(--wl-text-3); }
.wb-row-panel .wb-map-property-body > .wb-feature-notice { margin:0 0 6px; }
/* A row: its mark, its name (and ⓘ), its value, and a chevron or a switch. */
.wb-row { display:flex; flex-direction:column; min-width:0; }
#wb-map-information-panel .wb-row-panel button.wb-row-head { display:flex; align-items:center; gap:8px; width:100%; min-height:32px; height:auto; padding:0 6px; border:0; border-radius:8px; background:transparent; box-shadow:none; color:var(--wl-text); font:inherit; font-size:13px; text-align:left; justify-content:flex-start; cursor:pointer; }
#wb-map-information-panel .wb-row-panel button.wb-row-head:hover:not(:disabled) { background:color-mix(in srgb, var(--wl-text) 6%, transparent); border-color:transparent; }
#wb-map-information-panel .wb-row-panel button.wb-row-head:disabled { opacity:.5; cursor:default; }
.wb-row-mark { width:18px; display:grid; place-items:center; flex:none; color:var(--wl-text-3); }
.wb-row-name { flex:0 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wb-row-help { display:inline-grid; place-items:center; flex:none; color:var(--wl-text-3); cursor:help; vertical-align:-2px; margin-left:4px; }
.wb-row-head > .wb-row-help { margin-left:-2px; }
.wb-row-help .wb-row-help-icon { width:13px; height:13px; display:block; }
.wb-row-value { flex:0 1 auto; min-width:0; max-width:62%; margin-left:auto; display:flex; align-items:center; justify-content:flex-end; gap:6px; color:var(--wl-text-2); font-size:12px; white-space:nowrap; overflow:hidden; }
.wb-row-value > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.wb-row-value:empty { display:none; }
.wb-row-end { width:12px; flex:none; display:grid; place-items:center; color:var(--wl-text-3); }
.wb-row-end .wb-row-chevron { width:12px; height:12px; transition:transform var(--wl-dur-fast, .15s) ease; }
.wb-row.is-open > .wb-row-head .wb-row-chevron { transform:rotate(90deg); }
#wb-map-information-panel .wb-row-panel .wb-row.is-open > button.wb-row-head { background:color-mix(in srgb, var(--wl-text) 6%, transparent); }
#wb-map-information-panel .wb-row-panel .wb-row.is-add > button.wb-row-head { color:var(--wl-text-2); }
.wb-row-thumb { width:18px; height:18px; border-radius:5px; object-fit:cover; flex:none; }
.wb-row-body { display:flex; flex-direction:column; gap:10px; margin:2px 0 6px; padding:10px; border-radius:10px; border:1px solid var(--wl-line); background:color-mix(in srgb, var(--wl-inset) 55%, transparent); min-width:0; }
.wb-row-body[hidden] { display:none; }
.wb-row-panel .wb-row-body > * { margin-top:0; margin-bottom:0; }
.wb-row-body .wb-feature-note { margin:0; font-size:var(--t-help); line-height:1.5; color:var(--wl-text-3); }
.wb-row-body .wb-feature-field { gap:6px; margin:0; }
.wb-row-panel .wb-row-body > .wb-row { margin:0 -4px; }
.wb-row-body .wb-row-mark:empty { display:none; }
/* A switch: off is a dim track, on the accent. */
.wb-switch { position:relative; width:30px; height:18px; flex:none; border-radius:9px; background:var(--wl-line-strong); transition:background var(--wl-dur-fast, .15s) ease; }
.wb-switch::after { content:''; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:var(--wl-text-2); transition:left var(--wl-dur-fast, .15s) ease, background var(--wl-dur-fast, .15s) ease; }
.wb-switch.is-on { background:var(--wl-accent); }
.wb-switch.is-on::after { left:14px; background:var(--wl-on-accent); }
.wb-row-head:has(> .wb-row-value:empty) > :is(.wb-row-end, .wb-switch) { margin-left:auto; }
/* One of a short list, the chosen one ticked. */
.wb-row-options { display:flex; flex-direction:column; gap:1px; }
#wb-map-information-panel .wb-row-panel button.wb-row-option { display:flex; align-items:center; gap:8px; width:100%; height:30px; min-height:30px; padding:0 8px; border:0; border-radius:8px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12.5px; text-align:left; justify-content:flex-start; }
#wb-map-information-panel .wb-row-panel button.wb-row-option:hover:not(:disabled) { background:color-mix(in srgb, var(--wl-text) 6%, transparent); }
#wb-map-information-panel .wb-row-panel button.wb-row-option[aria-checked="true"] { background:color-mix(in srgb, var(--wl-selection) 13%, transparent); color:var(--wl-text); }
.wb-row-option-tick { width:15px; flex:none; color:var(--wl-selection); }
.wb-row-option-tick svg { width:14px; height:14px; display:block; }
.wb-row-option-extra { margin-left:auto; font-family:var(--wl-font-mono); font-size:11.5px; color:var(--wl-text-3); }
/* Two to five choices side by side, one pressed. */
.wb-choice { display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:2px; padding:2px; border-radius:var(--r-md); background:var(--wl-inset); border:1px solid var(--wl-line); }
#wb-map-information-panel .wb-row-panel button.wb-choice-item { display:flex; align-items:center; justify-content:center; gap:5px; height:28px; min-height:28px; min-width:0; padding:0 6px; border:0; border-radius:9px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12px; white-space:nowrap; }
#wb-map-information-panel .wb-row-panel button.wb-choice-item[aria-pressed="true"] { background:var(--wl-raised); color:var(--wl-text); box-shadow:0 1px 0 color-mix(in srgb, var(--wl-text) 6%, transparent) inset, 0 1px 3px rgb(0 0 0 / .3); }
.wb-choice-mark { display:grid; place-items:center; flex:none; }
.wb-choice-mark svg { width:13px; height:13px; display:block; }
/* What a value looks like: a colour, a light's glow. */
.wb-swatch { width:14px; height:14px; flex:none; border-radius:4px; border:1.5px solid; box-sizing:border-box; }
.wb-swatch.is-round { border-radius:50%; }
.wb-glow { width:12px; height:12px; flex:none; border-radius:50%; background:radial-gradient(circle, #ffd98a 0 30%, rgb(255 200 110 / .35) 60%, transparent 72%); box-shadow:0 0 8px rgb(255 200 110 / .6); }
.wb-glow.is-cool { background:radial-gradient(circle, #bfe3ff 0 30%, rgb(140 200 255 / .35) 60%, transparent 72%); box-shadow:0 0 8px rgb(140 200 255 / .6); }
/* Where it is and how big: small boxes, each a letter over its number and unit. */
.wb-panel-nums { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:4px; padding:2px 0 4px; }
.wb-panel-num { display:flex; flex-direction:column; gap:2px; min-width:0; padding:5px 8px; border-radius:9px; background:var(--wl-inset); border:1px solid var(--wl-line); cursor:text; }
.wb-panel-num:focus-within { border-color:var(--wl-selection); }
.wb-panel-num-name { display:flex; align-items:center; font-size:10.5px; font-weight:600; letter-spacing:.04em; color:var(--wl-text-3); }
.wb-panel-num-line { display:flex; align-items:baseline; gap:3px; min-width:0; }
#wb-map-information-panel .wb-row-panel.wb-map-feature-details .wb-panel-num.wb-panel-num input.wb-panel-input { flex:1; min-width:0; width:100%; height:18px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; font-family:var(--wl-font-mono); font-size:12px; color:var(--wl-text); appearance:textfield; }
#wb-map-information-panel .wb-row-panel.wb-map-feature-details .wb-panel-num.wb-panel-num input.wb-panel-input:focus-visible { outline:none; }
.wb-panel-num input::-webkit-inner-spin-button, .wb-panel-num input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.wb-panel-num-unit { flex:none; font-family:var(--wl-font-mono); font-size:11px; color:var(--wl-text-3); }
.wb-row-panel .wb-map-property-body > .wb-feature-field:has(> .wb-feature-chips) { padding:4px 6px; }
/* The map's own panel in the same rows (D-241): its name as the title, Board's grid kinds and shapes inside their rows. */
.wb-row-panel .wb-panel-title { margin:0; color:var(--wl-text); font-family:var(--wl-font-title); font-size:var(--t-title-panel); font-weight:400; line-height:1.35; overflow-wrap:anywhere; }
.wb-row-panel.wb-map-sheet .wb-feature-fields.wb-map-settings-sheet { display:flex; flex-direction:column; gap:0; padding:var(--sp-2) var(--sp-3) var(--sp-3); }
.wb-row-panel .wb-map-property-body > .wb-row + .wb-feature-note, .wb-row-panel .wb-map-property-body > .wb-feature-note + .wb-row { margin-top:2px; }
.wb-row-panel .wb-row-body > .wb-map-ratio-presets { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:var(--sp-1); margin:0; }
.wb-row-panel .wb-row-body > .wb-map-grid-types { grid-template-columns:repeat(3, minmax(0,1fr)); gap:var(--sp-1); margin:0; }
.wb-row-panel .wb-row-body > :is(.wb-map-quiet-button, .wb-map-action-button) { align-self:flex-start; margin:0; }

/* ---- The map's light (D-241): the moon button by the zoom, its card, and the lamp marks ----
   The card floats beside the button, so it is glass; night is a view, so the button stays lit while it is on. */
:is(.workspace-leaf-content, .wl-page)[data-type="canvas"] .canvas-controls .wb-map-night-toggle.is-active { color:var(--wl-selection); background:var(--wl-selection-soft); }
.wb-map-night-card { position:fixed; z-index:1000; width:268px; padding:12px; box-sizing:border-box; border-radius:var(--r-xl); border:1px solid var(--wl-glass-line); background:color-mix(in srgb, var(--wl-surface) 88%, transparent); backdrop-filter:blur(16px) saturate(115%); box-shadow:var(--wl-elev-pop); display:flex; flex-direction:column; gap:8px; font-family:var(--wl-font-ui); font-size:13px; color:var(--wl-text); }
.wb-map-night-title { display:flex; align-items:center; gap:6px; font-weight:700; font-size:12.5px; }
.wb-map-night-title svg { width:14px; height:14px; }
.wb-map-night-card button.wb-choice-item { display:flex; align-items:center; justify-content:center; gap:5px; height:28px; min-height:28px; padding:0 6px; border:0; border-radius:9px; background:transparent; box-shadow:none; color:var(--wl-text-2); font:inherit; font-size:12px; cursor:pointer; }
.wb-map-night-card button.wb-choice-item svg { width:13px; height:13px; }
.wb-map-night-card button.wb-choice-item[aria-pressed="true"] { background:var(--wl-raised); color:var(--wl-text); box-shadow:0 1px 0 color-mix(in srgb, var(--wl-text) 6%, transparent) inset, 0 1px 3px rgb(0 0 0 / .3); }
.wb-map-night-sub { margin-top:4px; color:var(--wl-text-3); font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
.wb-map-night-tiles { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
.wb-map-night-card button.wb-map-night-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; height:58px; padding:0 4px; border-radius:12px; border:1px solid var(--wl-line); background:var(--wl-inset); box-shadow:none; color:var(--wl-text-2); font:inherit; font-size:12px; cursor:pointer; }
.wb-map-night-card button.wb-map-night-tile svg { width:18px; height:18px; }
.wb-map-night-card button.wb-map-night-tile:hover:not(:disabled) { border-color:var(--wl-line-strong); color:var(--wl-text); }
.wb-map-night-card button.wb-map-night-tile[aria-checked="true"] { border-color:var(--wl-selection); background:color-mix(in srgb, var(--wl-selection) 10%, var(--wl-inset)); color:var(--wl-text); box-shadow:0 0 0 1px var(--wl-selection) inset; }
.wb-map-night-card button.wb-map-night-tile[aria-checked="true"] svg { color:var(--wl-selection); }
.wb-map-night-card button:disabled { opacity:.55; cursor:default; }
.wb-map-night-card button:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; }
.wb-map-night-note { margin:0; color:var(--wl-text-3); font-size:12px; line-height:1.45; }
/* A lamp mark at a lit thing's top right corner, the same size on screen at any zoom (--canvas-scale is the zoom). It
   is the editor's own: a game, an export and "As a player" never show it. */
.wb-map-light-marks { position:absolute; left:0; top:0; width:1px; height:1px; overflow:visible; pointer-events:none; z-index:850; }
.wb-map-light-marks[hidden], .wb-map-as-player .wb-map-light-marks { display:none; }
.wb-light-mark { position:absolute; left:0; top:0; width:0; height:0; scale:calc(1 / var(--canvas-scale, 1)); }
.wb-light-mark > i { position:absolute; left:-32px; top:8px; width:24px; height:24px; box-sizing:border-box; border-radius:50%; display:grid; place-items:center; background:radial-gradient(circle, #3a2e14, #1d1709); border:1.5px solid #ffcf73; color:#ffd98a; box-shadow:0 0 0 4px rgb(255 200 110 / .16), 0 0 14px rgb(255 200 110 / .5); }
.wb-light-mark svg { width:13px; height:13px; display:block; }

