:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-home"] > :is(.view-header, .wl-page-header) { display: none; }
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-home"] > :is(.view-content, .wl-page-content) { padding: 0; overflow: auto; background: var(--wl-bg); }
:is(.workspace-leaf-content, .wl-page)[data-type="world-builder-home"] :is(.view-content, .wl-page-content) { container-type: inline-size; container-name: world-home; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) { --wh-gutter: clamp(20px, 4.5cqi, 56px); --wh-radius: var(--r-lg); --wh-line: var(--wl-line); --wh-glass: color-mix(in srgb, var(--wl-bg) 64%, transparent); --wh-ease: var(--wl-ease); --wh-fast: var(--wl-quick); --wh-base: var(--wl-short); }
.wh-page { color: var(--wl-text); background: var(--wl-bg); min-height: 100%; font-family: var(--wl-font-ui); font-size: var(--t-body); line-height: 1.6; padding-bottom: 72px; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) * { box-sizing: border-box; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) button { font: inherit; cursor: pointer; box-shadow: none; }
/* Keyboard focus: the one ice ring (design system, States), over the shell's own rings. */
body.wb-shell :is(.wh-page, .wh-popover, .wh-preview-backdrop) button:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: 2px; box-shadow: none; }
.wh-page h1, .wh-page h2, .wh-page h3, .wh-page p { margin: 0; }
.wh-symbol { display: inline-flex; flex: 0 0 auto; }
.wh-symbol svg { width: 19px; height: 19px; display: block; }

/* The cover is a title page: the world's name and what to do next at the bottom left, the
   index of its chapters at the bottom right. The picture fades into the page. The name takes the
   title face at the cover size (look.css sets the face; Midnight Prism, D-184). */
.wh-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(440px, 48cqi, 580px); overflow: hidden; background: var(--wl-surface); transition: min-height 260ms var(--wl-ease-out); }
.wh-hero-image { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transition: height 260ms var(--wl-ease-out), min-height 260ms var(--wl-ease-out), max-height 260ms var(--wl-ease-out), object-position 260ms var(--wl-ease-out); }
.wh-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--wl-bg) 72%, transparent) 0%, color-mix(in srgb, var(--wl-bg) 32%, transparent) 36%, transparent 62%), linear-gradient(180deg, transparent 34%, color-mix(in srgb, var(--wl-bg) 48%, transparent) 64%, color-mix(in srgb, var(--wl-bg) 88%, transparent) 86%, var(--wl-bg) 100%); }
/* Tall: the picture takes the window, the words stay low at its foot. */
.wh-hero.is-tall { min-height: max(clamp(620px, 68cqi, 800px), calc(100dvh - 84px)); }
.wh-hero.is-tall::before { background: linear-gradient(90deg, color-mix(in srgb, var(--wl-bg) 62%, transparent) 0%, transparent 44%), linear-gradient(180deg, transparent 52%, color-mix(in srgb, var(--wl-bg) 80%, transparent) 86%, var(--wl-bg) 100%); }
.wh-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 16px 64px; width: 100%; max-width: calc(1180px + 2 * var(--wh-gutter)); margin: 0 auto; padding: 188px var(--wh-gutter) 32px; transition: padding 240ms var(--wl-ease-out), margin 240ms var(--wl-ease-out), gap 240ms var(--wl-ease-out); }
.wh-hero.is-tall .wh-hero-inner { padding-top: clamp(260px, 38cqi, 380px); }
.wh-hero-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 680px; text-shadow: 0 2px 18px color-mix(in srgb, var(--wl-bg) 45%, transparent); }
.wh-hero-chip { margin-bottom: 18px; padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--wl-text) 16%, transparent); border-radius: var(--r-pill); background: var(--wh-glass); backdrop-filter: blur(8px); color: var(--wl-text-2); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-shadow: none; }
.wh-hero-text h1 { font-size: clamp(20px, 6cqi, var(--t-title-cover)); line-height: 1.12; overflow-wrap: anywhere; }
.wh-tagline { max-width: 52ch; margin-top: 14px !important; color: color-mix(in srgb, var(--wl-text) 90%, transparent); font-size: clamp(14px, 3.6cqi, var(--t-h3)); line-height: 1.5; }
.wh-hero-meta { display: flex; flex-wrap: wrap; align-items: center; margin-top: 18px !important; color: var(--wl-text-2); font-size: var(--t-ui); }
/* The dots sit in the gap before each part; one that starts a new line falls outside the line's
   left edge and is clipped, so a wrapped line never starts with a dot. */
.wh-hero-meta { column-gap: 19px; row-gap: 4px; overflow: hidden; padding-block: 2px; }
.wh-hero-meta > * { position: relative; }
.wh-hero-meta > * + *::before { content: '·'; position: absolute; left: -12px; color: var(--wl-text-3); font-family: var(--wl-font-ui); text-decoration: none; display: inline-block; }
.wh-page .wh-meta-link { height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: color-mix(in srgb, var(--wl-text) 86%, transparent); font: inherit; text-shadow: inherit; cursor: pointer; transition: color var(--wh-fast) var(--wh-ease); }
/* Counts and dates are values: the mono face, figures in step. */
.wh-page .wh-meta-link b { margin-right: 5px; color: var(--wl-text); font-family: var(--wl-font-mono); font-size: var(--t-help); font-weight: 500; font-variant-numeric: tabular-nums; }
.wh-hero-meta .wh-meta-when { font-family: var(--wl-font-mono); font-size: var(--t-help); font-variant-numeric: tabular-nums; }
.wh-page .wh-meta-link:hover { background: transparent; color: var(--wl-text); }
.wh-page .wh-meta-link:focus-visible { border-radius: var(--r-xs); }
.wh-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; text-shadow: none; }
/* The cover's own buttons, over the picture: change it, go back to the default, more settings. */
.wh-hero-tools { position: absolute; top: 18px; right: 20px; z-index: 2; display: flex; gap: 6px; }
.wh-page .wh-hero-button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--wl-text) 14%, transparent); border-radius: var(--r-md); background: color-mix(in srgb, var(--wl-bg) 72%, transparent); color: var(--wl-text); font-size: var(--t-help); backdrop-filter: blur(8px); transition: background-color var(--wh-fast) var(--wh-ease), opacity var(--wh-base) var(--wh-ease); }
.wh-page .wh-hero-button:hover, .wh-page .wh-hero-button[aria-expanded="true"] { background: color-mix(in srgb, var(--wl-bg) 90%, transparent); }
.wh-page .wh-hero-button.is-icon { width: 32px; padding: 0; justify-content: center; }
.wh-page .wh-hero-button.is-icon > span:not(.wh-symbol) { display: none; }
.wh-hero-button .wh-symbol svg { width: 15px; height: 15px; }
@media (hover: hover) { .wh-hero:not(:hover, :focus-within, .is-menu-open) .wh-hero-button { opacity: 0; } }

/* Text edited on the page (in edit mode): marked with a dashed line, a clear field while typing. */
.wh-page .wh-editable { border-radius: var(--r-sm); outline: 1px dashed color-mix(in srgb, var(--wl-text-2) 40%, transparent); outline-offset: 6px; cursor: text; transition: outline-color var(--wh-fast) var(--wh-ease), background-color var(--wh-fast) var(--wh-ease); }
.wh-page .wh-editable:hover { outline-color: var(--wl-text-2); }
.wh-page .wh-editable:focus { outline: 2px solid var(--wl-selection); background: color-mix(in srgb, var(--wl-bg) 55%, transparent); text-shadow: none; }
.wh-page .wh-editable:empty::before { content: attr(data-placeholder); color: var(--wl-text-3); pointer-events: none; }
.wh-hero-text .wh-editable { display: block; width: fit-content; max-width: 100%; min-width: 4ch; }
.wh-hero-text .wh-tagline.wh-editable:empty::before { color: var(--wl-text-2); }

/* Buttons: the control height, the button corner. One filled steel button is the main thing to do
   (New file on the cover); the others sit on the card surface, and over the cover they are glass. */
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-button { display: inline-flex; align-items: center; gap: 7px; height: var(--wl-control); padding: 0 var(--sp-4); border: 1px solid var(--wl-line-strong); border-radius: var(--r-md); background: var(--wl-surface); color: var(--wl-text); font-size: var(--t-ui) !important; font-weight: 500; white-space: nowrap; transition: background-color var(--wh-fast) var(--wh-ease), border-color var(--wh-fast) var(--wh-ease); }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-button:hover { background: var(--wl-raised); border-color: color-mix(in srgb, var(--wl-line-strong) 60%, var(--wl-text-3)); }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-button:disabled { opacity: .5; cursor: default; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-button-primary { background: var(--wl-accent); color: var(--wl-on-accent); border-color: transparent; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-button-primary:hover { background: color-mix(in srgb, var(--wl-accent) 84%, var(--wl-text)); border-color: transparent; }
.wh-page .wh-button-glass { border-color: color-mix(in srgb, var(--wl-text) 16%, transparent); background: var(--wh-glass); backdrop-filter: blur(10px); }
.wh-page .wh-button-glass:hover { border-color: color-mix(in srgb, var(--wl-text) 24%, transparent); background: color-mix(in srgb, var(--wl-bg) 84%, transparent); }
.wh-page .wh-hero-actions .wh-button { height: calc(var(--wl-control) + 4px); padding: 0 18px; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-button .wh-symbol svg { width: 15px; height: 15px; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-link { padding: 0; height: auto; border: 0; background: transparent; color: var(--wl-text-2); display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-ui) !important; text-align: left; transition: color var(--wh-fast) var(--wh-ease); }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-link:hover { color: var(--wl-text); background: transparent; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-link:disabled { opacity: .45; cursor: default; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-link .wh-symbol svg { width: 14px; height: 14px; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: var(--wl-control); height: var(--wl-control); padding: 0; border: 0; border-radius: var(--r-md); background: transparent; color: var(--wl-text-2); transition: background-color var(--wh-fast) var(--wh-ease), color var(--wh-fast) var(--wh-ease); }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-icon-button:hover:not(:disabled) { background: var(--wl-raised); color: var(--wl-text); }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-icon-button:disabled { opacity: .35; cursor: default; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-icon-button > span:not(.wh-symbol) { display: none; }
:is(.wh-page, .wh-popover, .wh-preview-backdrop) .wh-icon-button .wh-symbol svg { width: 16px; height: 16px; }

/* The page under the cover. Each part opens with a small label and a line across the page, then
   its title at the page-title size. */
.wh-body { max-width: calc(1180px + 2 * var(--wh-gutter)); margin: 0 auto; padding: 0 var(--wh-gutter); }
.wh-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.wh-kicker::after { content: ''; order: 1; flex: 1; height: 1px; background: var(--wh-line); }
.wh-kicker-label { flex-shrink: 0; color: var(--wl-text-3); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.wh-kicker .wh-edit-chip { order: 2; }
.wh-section { padding-top: 72px; }
.wh-section-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.wh-section-title h2 { min-width: 0; font-size: var(--t-title-page); line-height: 1.2; overflow-wrap: anywhere; }
.wh-page .is-hidden > .wh-kicker .wh-kicker-label { color: var(--wl-text-3); text-decoration: line-through; }

/* The premise, set like the first page of a book: the headline across, the introduction under it. */
.wh-premise { padding-top: 64px; }
.wh-headline { max-width: 26ch; font-size: var(--t-title-page); line-height: 1.25; text-wrap: balance; }
.wh-headline.wh-editable { display: block; width: fit-content; min-width: 6ch; }
.wh-headline:empty:not(.wh-editable) { display: none; }
.wh-introduction { margin-top: 26px !important; max-width: 68ch; color: var(--wl-text-2); font-size: var(--t-body); line-height: 1.75; white-space: pre-line; }
.wh-page .wh-introduction.wh-editable { min-height: 3.6em; }

/* Pictures: a file's image, or its drawn emblem (D-103); the initials in rings only before that has loaded. */
.wh-picture { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--wl-surface); color: var(--wl-text-2); }
.wh-picture img { width: 100%; height: 100%; object-fit: cover; transition: filter var(--wh-base, .18s) var(--wh-ease, ease); }
.wh-picture.is-empty::before, .wh-picture.is-empty::after { content: ''; position: absolute; border: 1px solid var(--wl-line); border-radius: 50%; aspect-ratio: 1; }
.wh-picture.is-empty::before { height: 46%; }
.wh-picture.is-empty::after { height: 66%; opacity: .5; }
.wh-initials { position: relative; font-size: 22px; font-weight: 300; letter-spacing: .08em; }

/* The map: drawn small and moved by dragging. Its heading is the way back out of inner maps; its
   panel floats over the left side. The drawing classes are shared with the game's map, so their
   colours stay as they were, only named by tokens. */
.wh-map-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.wh-map-trail .wh-symbol svg { width: 18px; height: 18px; color: var(--wl-text-3); }
.wh-page .wh-trail-step { height: auto; padding: 0; border: 0; background: transparent; color: var(--wl-text-2); font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; transition: color var(--wh-fast) var(--wh-ease); }
.wh-page .wh-trail-step:hover { background: transparent; color: var(--wl-text); }
.wh-trail-here { animation: wl-fade var(--wh-base) var(--wl-ease-out, ease-out); }
.wh-map-view { position: relative; height: 540px; overflow: hidden; border: 1px solid var(--wh-line); border-radius: var(--r-lg); background: color-mix(in srgb, var(--wl-surface) 70%, var(--wl-bg)); box-shadow: var(--wl-elev-card); }
.wh-map-canvas { position: absolute; inset: 0; overflow: hidden; background-image: radial-gradient(color-mix(in srgb, var(--wl-text-3) 22%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; cursor: grab; touch-action: none; user-select: none; }
.wh-map-canvas.is-dragging { cursor: grabbing; }
.wh-map-canvas.is-empty { cursor: default; }
.wh-map-stage { position: absolute; inset: 0; transition: opacity .15s var(--wh-ease); }
.wh-map-stage.is-in { animation: wl-fade .28s var(--wl-ease-out, ease-out); }
.wh-map-canvas.is-leaving .wh-map-stage { opacity: 0; }
.wh-map-plane { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.wh-map-plane.is-gliding { transition: transform .4s var(--wl-ease-out, cubic-bezier(.2, .8, .2, 1)); }
.wh-map-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.wh-map-shapes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wh-map-edge { stroke: var(--wl-text-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* A way: a light line with a dark edge, as in the map editor (map-panel-polish.css names them
   --wb-way-ink and --wb-way-edge), its kind in the stroke. */
.wh-map-way-halo { fill: none; stroke: var(--wb-way-edge, color-mix(in srgb, var(--wl-bg) 62%, transparent)); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.wh-map-edge.wh-map-way { fill: none; stroke: var(--wb-way-ink, color-mix(in srgb, var(--wl-text) 80%, var(--wl-warning))); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.wh-map-way.is-path { stroke-dasharray: 7 5; }
.wh-map-way.is-tunnel { stroke-dasharray: 4 4; opacity: .7; }
.wh-map-way.is-boat { stroke-dasharray: 12 7; }
.wh-map-way.is-stairs { stroke-width: 5; stroke-linecap: butt; stroke-dasharray: 2 3; }
.wh-map-way.is-bridge { stroke-width: 3.5; }
.wh-map-way.is-portal { stroke-width: 4; stroke-dasharray: 0 7; }
.wh-map-canvas .is-linked { cursor: pointer; }
/* Labels and markers keep their size while the map zooms. A name sits on its place's middle, or a line or two up or
   down off a token; a group's above its corner, else just inside it; a pin's or token's under it, else over it or
   beside it, clear of the marker (--r, its half size). Where it sits (--sx, --sy), how much smaller a place's or a
   group's name is drawn so it is no wider than its place (--fit, never below a size that reads), how far it moves to
   stay inside the map (--nx, --ny) and which names give way (is-crowded) are worked out once a frame by map-render.mjs
   tidyNames; --gx and --gy are a game's tokens gathering. --fit is a scale, not a font size, so a name is never laid
   out again while the map zooms. Words on a picture stay white; over a plain map they take the page's ink
   (map-panel-polish.css, Names on a map). */
.wh-map-label, .wh-map-marker { position: absolute; transform-origin: 0 0; transform: scale(calc(1 / var(--zoom, 1))) translate(-50%, -50%); }
.wh-map-label { display: inline-flex; align-items: center; gap: 2px; width: max-content; max-width: 14em; color: var(--wl-on-picture); font-size: calc(11.5px * var(--wl-name-scale, 1)); font-weight: 600; line-height: 1.2; pointer-events: none; transform: scale(calc(1 / var(--zoom, 1))) translate(calc(var(--nx, 0px) + var(--gx, 0px)), calc(var(--ny, 0px) + var(--gy, 0px))) scale(var(--fit, 1)) translate(-50%, calc(-50% + var(--sy, 0) * (100% + 4px))); }
.wh-map-label .wh-symbol svg { width: 12px; height: 12px; opacity: .7; }
.wh-map-label.is-long { font-size: calc(10.75px * var(--wl-name-scale, 1)); }
.wh-map-label.is-longer { font-size: calc(10px * var(--wl-name-scale, 1)); }
.wh-map-label.is-group { transform: scale(calc(1 / var(--zoom, 1))) translate(calc(var(--nx, 0px) + var(--gx, 0px)), calc(var(--ny, 0px) + var(--gy, 0px))) scale(var(--fit, 1)) translate(0, calc((var(--sy, -1) - 1) * 50% + var(--sy, -1) * 4px)); }
.wh-map-label.is-under { --r: 15px; color: var(--wl-name-ink-2); font-weight: 500; transform: scale(calc(1 / var(--zoom, 1))) translate(calc((var(--sx, 0) - 1) * 50% + var(--sx, 0) * (var(--r) + 4px) + var(--nx, 0px) + var(--gx, 0px)), calc((var(--sy, 1) - 1) * 50% + var(--sy, 1) * (var(--r) + 3px) + var(--ny, 0px) + var(--gy, 0px))); }
.wh-map-label.is-under.is-pin { --r: 16px; }
.wh-map-label:is(.is-lit, .is-selected) { color: var(--wl-name-ink); }
.wh-map-label.is-crowded { visibility: hidden; }
.wh-map-marker { display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; transition: box-shadow var(--wh-fast) var(--wh-ease); }
/* A token on Home is the editor's disc in its colour (map-panel-polish.css), at one size on screen. */
.wh-map-marker.is-token { width: 30px; height: 30px; box-sizing: border-box; color: var(--wl-text); font-size: 10px; }
.wh-map-marker.is-token img { width: 100%; height: 100%; object-fit: cover; }
/* A cut-out picture is the token's shape (as on the map itself) */
.wh-map-marker.is-token.is-cutout, .wh-map-marker.is-token:has(> .is-cutout) { border-color: transparent; background: none; overflow: visible; }
.wh-map-marker.is-token.is-cutout img, .wh-map-marker.is-token > .is-cutout img { object-fit: contain; filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--wl-bg) 45%, transparent)); }
.wh-map-marker.is-token > .is-cutout { overflow: visible; border-radius: 0; }
.wh-map-marker:is(.is-lit, .is-selected) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--wb-feature-tint, var(--wl-text)) 45%, transparent); }
/* The map's floating tools: real glass, the one place on Home with nothing to read under it. */
.wh-map-controls { position: absolute; z-index: 1; right: 12px; bottom: 12px; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--wl-glass-line); border-radius: var(--r-md); background: var(--wl-glass-fill); -webkit-backdrop-filter: blur(var(--wl-glass-blur)) saturate(1.08); backdrop-filter: blur(var(--wl-glass-blur)) saturate(1.08); box-shadow: var(--wl-elev-pop); }
.wh-map-hint { position: absolute; right: calc(4 * var(--wl-control) + 38px); bottom: 21px; color: var(--wl-text-3); font-size: 11.5px; pointer-events: none; opacity: 0; transition: opacity var(--wh-base) var(--wh-ease); }
.wh-map-canvas:hover:not(.is-empty) .wh-map-hint { opacity: 1; }
.wh-page .wh-map-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; padding: 24px; border: 0; background: transparent; color: var(--wl-text-2); text-align: center; }
.wh-map-view.has-panel .wh-map-empty { padding-left: 336px; }
.wh-page .wh-map-empty:hover { background: transparent; color: var(--wl-text); }
.wh-map-empty .wh-symbol svg { width: 28px; height: 28px; margin-bottom: 6px; }
.wh-map-empty strong { color: var(--wl-text); font-size: var(--t-body); font-weight: 600; }
.wh-map-empty small { font-size: var(--t-help); }
/* The panel: what is on this map, or the place you are looking at. It is read, so it is solid. */
.wh-map-places { position: absolute; z-index: 2; left: 12px; top: 12px; bottom: 12px; display: flex; flex-direction: column; width: 300px; overflow: hidden; border: 1px solid var(--wl-line); border-radius: var(--r-lg); background: var(--wl-surface); box-shadow: var(--wl-elev-pop); }
.wh-map-places:empty { display: none; }
.wh-map-view.is-folded .wh-map-places { bottom: auto; }
.wh-map-view.is-folded .wh-map-places-body { display: none; }
.wh-map-places-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--wh-line); }
.wh-map-view.is-folded .wh-map-places-head { border-bottom: 0; }
.wh-map-places-head strong { font-size: var(--t-ui); font-weight: 600; }
.wh-map-fold .wh-symbol { transform: rotate(180deg); transition: transform var(--wh-base) var(--wh-ease); }
.wh-map-view.is-folded .wh-map-fold .wh-symbol { transform: none; }
.wh-map-places-body { flex: 1; min-height: 0; overflow-y: auto; }
.wh-map-places-label { display: block; padding: 14px 14px 2px; color: var(--wl-text-3); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.wh-map-places-empty { padding: 14px; color: var(--wl-text-2); font-size: var(--t-help); }
.wh-map-places-rows { padding: 6px; }
.wh-place { display: flex; align-items: center; border-radius: var(--r-md); transition: background-color var(--wh-fast) var(--wh-ease); }
.wh-place:hover { background: var(--wl-raised); }
.wh-page .wh-place-open { display: flex; align-items: center; justify-content: flex-start; gap: 11px; flex: 1; min-width: 0; height: auto; padding: 7px 10px 7px 8px; border: 0; background: transparent; color: var(--wl-text); text-align: left; }
.wh-page .wh-place-open:hover { background: transparent; }
.wh-place-open > .wh-symbol:last-child { margin-left: auto; color: var(--wl-text-3); }
.wh-place-open > .wh-symbol:last-child svg { width: 15px; height: 15px; }
.wh-place-thumb { width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--r-sm); }
.wh-place-thumb .wh-initials { font-size: 11px; font-weight: 400; }
.wh-place-thumb.is-swatch { background: color-mix(in srgb, var(--tint, var(--wl-text-3)) 16%, transparent); color: var(--tint, var(--wl-text-2)); }
.wh-place-thumb.is-swatch .wh-symbol svg { width: 16px; height: 16px; }
.wh-place-text { display: flex; flex-direction: column; min-width: 0; }
.wh-place-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-ui); font-weight: 600; }
.wh-place-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wl-text-3); font-size: var(--t-help); }
.wh-place-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px 16px; animation: wl-fade var(--wh-base) var(--wl-ease-out, ease-out); }
.wh-place-card.is-here { border-bottom: 1px solid var(--wh-line); }
.wh-place-cover { width: 100%; aspect-ratio: 16 / 10; margin-bottom: 10px; border-radius: var(--r-md); }
.wh-place-kind { color: var(--wl-text-3); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.wh-place-name { font-size: var(--t-title-section); line-height: 1.3; overflow-wrap: anywhere; }
.wh-place-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px !important; color: var(--wl-text-2); font-size: var(--t-ui); line-height: 1.6; }
.wh-place-summary.is-open { display: block; }
.wh-place-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; }
.wh-map-others { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.wh-map-others-label { margin-right: 6px; color: var(--wl-text-3); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.wh-page .wh-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid var(--wh-line); border-radius: var(--r-md); background: transparent; color: var(--wl-text-2); font-size: var(--t-help); transition: background-color var(--wh-fast) var(--wh-ease), color var(--wh-fast) var(--wh-ease); }
.wh-page .wh-chip:hover { background: var(--wl-raised); color: var(--wl-text); }
.wh-page .wh-chip .wh-symbol svg { width: 13px; height: 13px; }

/* Inside the world: a chapter per kind of thing. The name (a section title), then a spread of
   five pictures, the large one on the left in every chapter. The pictures are cards. */
.wh-chapter { padding: 34px 0 6px; border-top: 1px solid color-mix(in srgb, var(--wh-line) 70%, transparent); }
.wh-chapters > .wh-chapter:first-child { padding-top: 6px; border-top: 0; }
.wh-chapter-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 18px; margin-bottom: 18px; }
.wh-chapter-name { grid-column: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.wh-chapter-name h3 { font-size: var(--t-title-section); line-height: 1.3; overflow-wrap: anywhere; }
.wh-chapter-count { color: var(--wl-text-3); font-family: var(--wl-font-mono); font-size: var(--t-help); font-variant-numeric: tabular-nums; }
.wh-chapter-description { grid-column: 1; max-width: 64ch; color: var(--wl-text-2); font-size: var(--t-ui); line-height: 1.55; }
.wh-chapter-links { grid-column: 2; grid-row: 1 / span 2; align-self: end; display: flex; align-items: center; gap: 16px; padding-bottom: 2px; }
.wh-spread { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; aspect-ratio: 16 / 6.4; }
.wh-tile.is-large { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.wh-page .wh-tile { position: relative; display: block; min-width: 0; min-height: 0; height: auto; padding: 0; overflow: hidden; border: 1px solid var(--wl-line); border-radius: var(--r-lg); background: var(--wl-surface); box-shadow: var(--wl-elev-card); color: var(--wl-text); text-align: left; transition: border-color var(--wh-fast) var(--wh-ease); }
.wh-tile-picture { position: absolute !important; inset: 0; }
.wh-page .wh-tile:not(.is-new, .is-blank)::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 45%, var(--wl-picture-shade)); }
.wh-page .wh-tile:not(.is-blank):hover { border-color: var(--wl-line-strong); }
.wh-page .wh-tile:hover .wh-picture img { filter: brightness(1.08); }
body.wb-shell .wh-page .wh-tile:not(.is-new, .is-blank):focus-visible { box-shadow: var(--wl-elev-card); }
.wh-tile-chip { position: absolute; z-index: 1; left: 14px; top: 14px; padding: 2px 10px; border: 1px solid color-mix(in srgb, var(--wl-text) 16%, transparent); border-radius: var(--r-pill); background: var(--wh-glass); backdrop-filter: blur(8px); font-size: 11px; font-weight: 500; }
.wh-tile-caption { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; gap: 1px; text-shadow: 0 1px 10px color-mix(in srgb, var(--wl-bg) 60%, transparent); }
.wh-tile-caption strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-title-card); font-weight: 600; }
.wh-tile-caption small { color: color-mix(in srgb, var(--wl-text) 78%, transparent); font-family: var(--wl-font-mono); font-size: var(--t-help); font-variant-numeric: tabular-nums; }
/* On a picture the caption is white in every theme, the pale ones too (D-197). */
.wh-page .wh-tile:not(.is-new, .is-blank) .wh-tile-caption { color: var(--wl-on-picture); text-shadow: 0 1px 10px var(--wl-picture-shade); }
.wh-page .wh-tile:not(.is-new, .is-blank) .wh-tile-caption small { color: var(--wl-on-picture-2); }
.wh-tile.is-large .wh-tile-caption { left: 20px; right: 20px; bottom: 18px; gap: 4px; }
.wh-tile.is-large .wh-tile-caption strong { font-size: var(--t-title-section); line-height: 1.3; }
.wh-tile.is-large .wh-initials { font-size: 36px; }
.wh-tile .wh-initials { font-size: 16px; }
.wh-tile-more { position: absolute; z-index: 2; inset: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--wl-bg) 55%, transparent); font-size: 22px; font-weight: 500; }
.wh-page .wh-tile.is-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: 1px dashed var(--wl-line); background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: var(--t-help); text-align: center; }
.wh-page .wh-tile.is-new:hover { background: var(--wl-surface); color: var(--wl-text); }
.wh-tile.is-large.is-new { font-size: var(--t-body); }
.wh-tile.is-large.is-new .wh-symbol svg { width: 26px; height: 26px; }
/* Fewer than five files: the large one stays on the left, the rest share the right. */
.wh-spread[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; aspect-ratio: 16 / 5; }
.wh-spread[data-count="2"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr; aspect-ratio: 16 / 4.8; }
.wh-spread[data-count="3"] { grid-template-columns: 2fr 1fr; }
.wh-spread[data-count="4"] { grid-template-columns: 2fr 1fr 1fr; }
.wh-spread[data-count] .wh-tile.is-large { grid-column: 1; grid-row: 1 / -1; }
.wh-spread[data-count="4"] > :last-child { grid-column: 2 / span 2; }
/* No files yet: one slim line. */
.wh-spread.is-empty { display: block; aspect-ratio: auto; }
.wh-page .wh-tile.is-strip { flex-direction: row; gap: 8px; width: 100%; height: 76px; font-size: var(--t-ui); }
.wh-chapter-empty { margin: 0; color: var(--wl-text-3); font-size: var(--t-ui); }
.wh-tile.is-blank { border-style: dashed !important; border-color: color-mix(in srgb, var(--wh-line) 70%, transparent) !important; background: transparent !important; box-shadow: none; }
.wh-world-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: 30px; }
.wh-more-types .wh-symbol { transition: transform var(--wh-base) var(--wh-ease); }
.wh-more-types.is-open .wh-symbol { transform: rotate(180deg); }
.wh-type-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px; margin-bottom: 18px; border: 1px dashed var(--wh-line); border-radius: var(--wh-radius); }
.wh-type-empty strong { font-size: var(--t-body); font-weight: 600; }
.wh-type-empty p { color: var(--wl-text-2); font-size: var(--t-ui); max-width: 560px; }
.wh-empty { color: var(--wl-text-2); font-size: var(--t-ui); padding-bottom: 24px; }

/* Edit mode: chapters can be moved and left off Home, each picture place pinned to a file, and the
   map and premise switched off. A bar at the bottom says so and ends it. */
.wh-page .wh-edit-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px dashed color-mix(in srgb, var(--wl-text-2) 45%, transparent); border-radius: var(--r-md); background: transparent; color: var(--wl-text-2); font-size: var(--t-help); white-space: nowrap; transition: background-color var(--wh-fast) var(--wh-ease), color var(--wh-fast) var(--wh-ease); }
.wh-page .wh-edit-chip:hover { background: var(--wl-raised); color: var(--wl-text); }
.wh-page .wh-edit-chip .wh-symbol svg { width: 14px; height: 14px; }
.wh-chapter-links .wh-edit-icon { border: 1px solid var(--wh-line); border-radius: var(--r-md); }
.wh-chapter.is-hidden { padding-bottom: 26px; }
.wh-chapter.is-hidden .wh-chapter-name { opacity: .5; }
.wh-page .wh-tile.is-editing { outline: 1px dashed color-mix(in srgb, var(--wl-text-2) 40%, transparent); outline-offset: 3px; }
.wh-page .wh-tile.is-editing:hover, .wh-page .wh-tile.is-editing[aria-expanded="true"] { outline-color: var(--wl-text); }
.wh-tile-pin { position: absolute; z-index: 3; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border: 1px solid color-mix(in srgb, var(--wl-text) 16%, transparent); border-radius: var(--r-pill); background: color-mix(in srgb, var(--wl-bg) 78%, transparent); backdrop-filter: blur(8px); color: var(--wl-text); font-size: 11.5px; font-weight: 500; text-shadow: none; }
.wh-tile-pin .wh-symbol svg { width: 13px; height: 13px; }
/* Pinned is a chosen state: an ice edge and tint, not a fill. */
.wh-tile-pin.is-pinned { border-color: color-mix(in srgb, var(--wl-selection) 60%, transparent); background: color-mix(in srgb, var(--wl-selection) 16%, var(--wl-bg)); color: var(--wl-selection); }
.wh-tile.is-blank .wh-tile-pin { inset: 50% auto auto 50%; transform: translate(-50%, -50%); }
.wh-edit-bar { position: sticky; z-index: 6; bottom: 18px; display: flex; align-items: center; gap: 12px; width: fit-content; max-width: calc(100% - 2 * var(--wh-gutter)); margin: 40px auto 0; padding: 7px 7px 7px 16px; border: 1px solid var(--wl-line-strong); border-radius: var(--r-xl); background: var(--wl-surface); box-shadow: var(--wl-elev-pop); animation: wl-fade var(--wh-base) var(--wl-ease-out, ease-out); }
.wh-edit-bar > .wh-symbol svg { width: 16px; height: 16px; color: var(--wl-text-2); }
.wh-edit-bar-text { color: var(--wl-text-2); font-size: var(--t-help); line-height: 1.4; }
.wh-edit-bar .wh-button { height: 34px; }

/* Floating over the page: the cover menu and the picture-place picker. Solid, with the pop shadow. */
.wh-popover { position: fixed; z-index: var(--layer-menu, 65); width: 300px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; padding: 8px; border: 1px solid var(--wl-line); border-radius: var(--r-lg); background: var(--wl-surface); box-shadow: var(--wl-elev-pop); color: var(--wl-text); font-family: var(--wl-font-ui); font-size: var(--t-ui); line-height: 1.5; animation: wl-pop var(--wl-quick, .12s) var(--wl-ease-out, ease-out); }
.wh-slot-menu { width: 380px; }
.wh-popover-title { display: block; padding: 6px 8px 8px; color: var(--wl-text-3); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.wh-popover-title.is-section { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--wl-line); }
.wh-popover-head { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.wh-popover-head .wh-popover-title { padding: 0; }
.wh-menu-list { display: flex; flex-direction: column; }
.wh-popover .wh-menu-item { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--wl-text); font-size: var(--t-ui); text-align: left; }
.wh-popover .wh-menu-item:hover:not(:disabled) { background: var(--wl-raised); }
.wh-popover .wh-menu-item:disabled { color: var(--wl-text-3); cursor: default; opacity: 1; }
.wh-menu-item .wh-symbol svg { width: 16px; height: 16px; }
.wh-menu-label { flex: 1; }
.wh-soon { padding: 0 8px; border: 1px solid var(--wl-line); border-radius: var(--r-pill); color: var(--wl-text-2); font-size: 11px; line-height: 18px; }
.wh-focus-box { margin: 2px 8px 0; overflow: hidden; border-radius: var(--r-md); }
.wh-popover-note { margin: 0; padding: 8px 8px 4px; color: var(--wl-text-2); font-size: var(--t-help); }
.wh-popover-note.is-error { color: var(--wl-danger); }
.wh-image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 320px; overflow-y: auto; padding: 2px; }
.wh-popover .wh-image-tile { display: block; aspect-ratio: 1; height: auto; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: var(--r-md); background: var(--wl-bg); }
.wh-popover .wh-image-tile:hover { border-color: var(--wl-line-strong); }
.wh-popover .wh-image-tile.is-current { border-color: var(--wl-selection); }
.wh-image-tile img, .wh-image-tile video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A video among the pictures: a small play mark in its corner. */
.wh-popover .wh-image-tile:has(video) { position: relative; }
.wh-image-tile-play { position: absolute; left: 6px; bottom: 6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--wl-bg) 60%, transparent); color: var(--wl-text); }
.wh-image-tile-play svg { width: 9px; height: 9px; fill: currentColor; }
/* Logos show whole, on the panel’s own ground. */
.wh-image-grid.is-logos .wh-image-tile img { object-fit: contain; padding: 8px; }
.wh-slot-search { width: 100%; height: 32px; margin-bottom: 10px; padding: 0 10px; border: 1px solid var(--wl-line); border-radius: var(--r-md); background: var(--wl-inset); color: var(--wl-text); font: inherit; font-size: var(--t-help); outline: none; }
.wh-slot-search::placeholder { color: var(--wl-text-3); }
.wh-slot-search:focus { border-color: var(--wl-selection); }
.wh-slot-empty { grid-column: 1 / -1; margin: 12px 0; text-align: center; }
/* A logo in place of the name: the whole of it, as big as a title, never wider than the column. */
.wh-hero-logo { display: block; width: auto; height: auto; max-width: min(560px, 100%); max-height: clamp(72px, 14cqi, 180px); object-fit: contain; margin-bottom: 2px; filter: drop-shadow(0 4px 22px color-mix(in srgb, var(--wl-bg) 45%, transparent)); user-select: none; }
.wh-hero-name.is-logo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wh-hero-logo + .wh-hero-name:not(.is-logo) { margin-top: 10px; font-size: var(--t-title-page); }
.wh-popover .wh-file-tile { display: flex; flex-direction: column; align-items: stretch; gap: 6px; height: auto; padding: 5px 5px 7px; border: 1px solid transparent; border-radius: var(--r-md); background: transparent; color: var(--wl-text); font-size: var(--t-help); text-align: left; }
.wh-popover .wh-file-tile:hover { background: var(--wl-raised); }
.wh-popover .wh-file-tile.is-current { border-color: var(--wl-selection); }
.wh-file-tile-picture { width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); }
.wh-file-tile-picture .wh-initials { font-size: 14px; }
.wh-file-tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.wh-popover-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 10px 8px 4px; border-top: 1px solid var(--wl-line); }
.wh-popover-foot .wh-popover-note { padding: 0; }
.wh-cover-menu .wh-popover-foot { justify-content: flex-end; }
/* The cover's menu: its size (two segments), and a cover made from words (a field). */
.wh-segments { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 8px 4px; padding: 3px; border-radius: var(--r-md); background: var(--wl-inset); }
.wh-popover .wh-segment { height: 30px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: var(--t-help); }
.wh-popover .wh-segment:hover { color: var(--wl-text); background: transparent; }
.wh-popover .wh-segment.is-on { background: var(--wl-raised); color: var(--wl-text); }
.wh-cover-say { box-sizing: border-box; width: calc(100% - 16px); margin: 2px 8px 0; padding: 10px 12px; border: 1px solid var(--wl-line); border-radius: var(--r-md); background: var(--wl-inset); color: var(--wl-text); font: inherit; font-size: var(--t-ui); line-height: 1.5; resize: vertical; }
.wh-cover-say::placeholder { color: var(--wl-text-3); }
body.wb-shell .wh-popover .wh-cover-say:focus-visible { border-color: var(--wl-line-strong); outline: 2px solid var(--wl-selection); outline-offset: 2px; box-shadow: none; }

/* A quick look at a file: its page in a window over Home, with Open page for the whole one. */
.wh-preview-backdrop { position: fixed; z-index: var(--layer-modal, 50); inset: 0; display: flex; align-items: center; justify-content: center; padding: 28px; background: color-mix(in srgb, var(--wl-bg) 60%, transparent); font-family: var(--wl-font-ui); animation: wl-fade var(--wh-base) var(--wl-ease-out, ease-out); transition: opacity .14s var(--wh-ease); }
.wh-preview-backdrop.is-closing { opacity: 0; }
.wh-preview { display: flex; flex-direction: column; width: min(940px, 100%); height: min(88vh, 960px); overflow: hidden; border: 1px solid var(--wl-line); border-radius: var(--r-xl); background: var(--wl-bg); box-shadow: var(--wl-elev-pop); color: var(--wl-text); outline: none; }
.wh-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--wl-line); }
.wh-preview-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.wh-preview-type { color: var(--wl-text-3); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.wh-preview-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-title-section); line-height: 1.4; }
.wh-preview-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.wh-preview-nav { display: flex; align-items: center; gap: 2px; margin-right: 6px; }
.wh-preview-count { min-width: 46px; color: var(--wl-text-2); font-family: var(--wl-font-mono); font-size: var(--t-help); text-align: center; font-variant-numeric: tabular-nums; }
.wh-preview-backdrop .wh-preview-open { height: 32px; padding: 0 13px; }
.wh-preview-body { flex: 1; min-height: 0; overflow-y: auto; }
.wh-preview-page { min-height: 100%; transition: opacity var(--wh-base) var(--wh-ease); }
.wh-preview-page.is-loading { opacity: 0; }
.wh-preview-page > .wh-empty { padding: 32px; }
.wh-preview-note { max-width: 740px; margin: 0 auto; padding: 34px 40px 56px; }
@media (max-width: 600px) {
  .wh-preview-backdrop { align-items: flex-end; padding: 0; }
  .wh-preview { height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; border-bottom: 0; }
  .wh-preview-head { padding-left: 16px; }
  .wh-preview-backdrop .wh-preview-open { width: 32px; padding: 0; justify-content: center; }
  .wh-preview-backdrop .wh-preview-open > span:not(.wh-symbol) { display: none; }
  .wh-preview-nav { margin-right: 0; }
  .wh-preview-count { min-width: 34px; }
  .wh-preview-note { padding: 24px 20px 40px; }
}

/* Narrower: the index and panel get a little smaller. */
@container world-home (max-width: 980px) {
  .wh-map-places { width: 270px; }
  .wh-map-view.has-panel .wh-map-empty { padding-left: 300px; }
  .wh-map-hint { display: none; }
}
/* Tablet / medium devices: chapters put their large picture on top. */
@container world-home (max-width: 820px) {
  .wh-section { padding-top: 56px; }
  .wh-map-view { height: 420px; }
  .wh-chapter-head { grid-template-columns: minmax(0, 1fr); }
  .wh-chapter-links { grid-column: 1 / -1; grid-row: auto; padding: 8px 0 0; }
  .wh-spread { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: none; aspect-ratio: auto; }
  .wh-tile.is-large { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
  .wh-page .wh-tile:not(.is-large, .is-strip) { aspect-ratio: 1; }
  .wh-spread[data-count] { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: none; aspect-ratio: auto; }
  .wh-spread[data-count] .wh-tile.is-large { grid-column: 1 / -1; grid-row: auto; }
  .wh-spread[data-count] > .wh-tile:not(.is-large) { grid-column: auto; }
}
/* The panel goes under the map once the map would be too narrow beside it. */
@container world-home (max-width: 640px) {
  .wh-map-view { display: flex; flex-direction: column; height: auto; }
  .wh-map-canvas { position: relative; flex: none; height: 320px; }
  .wh-map-places { position: static; width: auto; max-height: 380px; border: 0; border-top: 1px solid var(--wh-line); border-radius: 0; background: var(--wl-surface); box-shadow: none; }
  .wh-map-view.has-panel .wh-map-empty { padding-left: 24px; }
  .wh-place-cover { aspect-ratio: 2 / 1; }
}
/* Phone: buttons full width, the small pictures two by two. The titles keep the one scale. */
@container world-home (max-width: 560px) {
  .wh-hero-inner { padding-top: 170px; }
  .wh-tagline { font-size: var(--t-body); }
  .wh-hero-actions { width: 100%; }
  .wh-hero-actions > .wh-button { flex: 1; justify-content: center; }

  .wh-spread, .wh-spread[data-count] { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wh-tile.is-large { aspect-ratio: 4 / 3; }
  .wh-page:not(.is-editing) .wh-tile.is-blank { display: none; }
  .wh-edit-bar { gap: 10px; padding-left: 14px; }
  .wh-edit-bar > .wh-symbol { display: none; }
}
@media (prefers-reduced-motion: reduce) { :is(.wh-page, .wh-popover, .wh-preview-backdrop), :is(.wh-page, .wh-popover, .wh-preview-backdrop) * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
/* Less see-through when asked: the glass becomes the well colour (design system, Motion). */
@media (prefers-reduced-transparency: reduce) {
  .wh-map-controls, .wh-page :is(.wh-hero-chip, .wh-hero-button, .wh-button-glass, .wh-tile-chip) { background: var(--wl-inset); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---- World light (D-186): Home's one main action is lit in the world's own two colours, and each section's line
   starts as that light and fades into the plain line. ---- */
.wh-page .wh-button-lit { border-color: transparent; background: linear-gradient(135deg, color-mix(in srgb, var(--wl-light-1) 70%, var(--wl-text)), var(--wl-light-2)); color: var(--wl-on-accent); font-weight: 600; box-shadow: inset 0 1px 0 0 color-mix(in srgb, var(--wl-text) 55%, transparent), 0 10px 26px -10px color-mix(in srgb, var(--wl-glow-2) 75%, transparent); transition: filter var(--wh-fast) var(--wh-ease), translate var(--wh-fast) var(--wh-ease); }
.wh-page .wh-button-lit:hover { border-color: transparent; background: linear-gradient(135deg, color-mix(in srgb, var(--wl-light-1) 70%, var(--wl-text)), var(--wl-light-2)); filter: brightness(1.07); }
.wh-page .wh-button-lit:active { translate: 0 1px; }
.wh-kicker::after { background: linear-gradient(90deg, var(--wl-light-1) 0, var(--wl-light-2) 90px, var(--wh-line) 240px); }
.wh-kicker-label { color: var(--wl-text-2); }
/* The cover's tools belong to Edit page (D-188): there they always show; outside it the cover carries none. */
.wh-page.is-editing .wh-hero .wh-hero-button { opacity: 1; }

/* Hero inline edit controls (Use logo, Hide title) and Cancel/Save floating bar */
.wh-hero-name.is-hidden-preview { opacity: .38; text-decoration: line-through; text-decoration-thickness: 2px; }
.wh-hero-edit-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; text-shadow: none; }
.wh-page .wh-hero-edit-controls .wh-edit-chip { background: var(--wh-glass); border-color: color-mix(in srgb, var(--wl-text) 16%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--wl-text); }
.wh-page .wh-hero-edit-controls .wh-edit-chip:hover { background: color-mix(in srgb, var(--wl-bg) 84%, transparent); border-color: color-mix(in srgb, var(--wl-text) 26%, transparent); }
.wh-page .wh-hero-edit-controls .wh-edit-chip.is-on { border-color: color-mix(in srgb, var(--wl-selection) 55%, transparent); background: color-mix(in srgb, var(--wl-selection) 18%, var(--wh-glass)); color: var(--wl-text); }
.wh-page .wh-button-quiet { border-color: transparent; background: transparent; color: var(--wl-text-2); }
.wh-page .wh-button-quiet:hover { border-color: transparent; background: var(--wl-raised); color: var(--wl-text); }
.wh-edit-bar { gap: 8px; padding: 6px 6px 6px 16px; border-radius: 999px; background: color-mix(in srgb, var(--wl-surface) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.wh-edit-bar .wh-button { border-radius: 999px; height: 34px; padding: 0 14px; }
.wh-save-status { color: var(--wl-text-3); font-size: var(--t-help); font-weight: 500; padding-right: 6px; white-space: nowrap; }
.wh-save-status.is-dirty { color: var(--wl-selection); }
.wh-save-status.is-error { color: var(--wl-danger); }

/* ---- The world in numbers (D-189): what it holds and how much it has been played, on the right of the cover. Each
   number says one thing; who made it and when it last changed sit under them. ---- */
.wh-hero-inner { position: relative; }
.wh-facts { position: absolute; right: var(--wh-gutter); bottom: 32px; z-index: 1; text-align: right; text-shadow: 0 2px 18px color-mix(in srgb, var(--wl-bg) 45%, transparent); }
/* Each number is a cell, with a hairline between cells, so the row keeps one rhythm whatever the labels' lengths. */
.wh-facts-row { display: flex; justify-content: flex-end; gap: 24px; margin: 0; }
.wh-fact { display: flex; flex-direction: column-reverse; }
.wh-fact + .wh-fact { padding-left: 24px; border-left: 1px solid color-mix(in srgb, var(--wl-text) 14%, transparent); }
.wh-fact dd { margin: 0; color: var(--wl-text); font: 500 28px/1 var(--wl-font-mono); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.wh-fact dt { margin-top: 10px; color: color-mix(in srgb, var(--wl-text-2) 85%, transparent); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
/* Who made it sits apart from the numbers (the page's reset of p's margin is stronger than .wh-by alone). */
.wh-facts .wh-by { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 20px 0 0; color: var(--wl-text-2); font-size: 12.5px; }
.wh-by-face { display: grid; place-items: center; width: 24px; height: 24px; overflow: hidden; border-radius: 8px; background: linear-gradient(135deg, var(--wl-selection), var(--wl-accent)); color: var(--wl-on-accent); font: 400 10px/1 var(--wl-font-title); }
.wh-by-face img { width: 100%; height: 100%; object-fit: cover; }
.wh-by b { color: var(--wl-text); font-weight: 600; }
.wh-page .wh-by-link { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 4px; border: 1px solid transparent; border-radius: var(--r-pill); background: transparent; color: var(--wl-text-2); font: inherit; text-shadow: inherit; cursor: pointer; transition: background-color var(--wh-fast) var(--wh-ease), border-color var(--wh-fast) var(--wh-ease), color var(--wh-fast) var(--wh-ease); }
.wh-page .wh-by-link:hover { background: var(--wh-glass); border-color: color-mix(in srgb, var(--wl-text) 16%, transparent); color: var(--wl-text); }
.wh-page .wh-button-like.is-liked { border-color: color-mix(in srgb, var(--wl-danger) 55%, transparent); background: color-mix(in srgb, var(--wl-danger) 20%, var(--wh-glass)); color: var(--wl-danger); }
.wh-page .wh-button-like.is-liked .wh-symbol svg { fill: currentColor; }
.wh-by-when { color: var(--wl-text-3); }
.wh-by-when::before { content: '·'; margin-right: 10px; }
.wh-by-when:first-child::before { content: none; }
/* Medium & tablet (≤ 1000px): unified cover-fade + low overlapping hero text so resizing from phone to tablet transitions like butter. */
@container world-home (max-width: 1000px) {
  .wh-hero, .wh-hero.is-tall {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
    min-height: 0; background: var(--wl-bg);
  }
  .wh-hero-image {
    position: relative; inset: auto; z-index: 0;
    width: 100%; height: auto; aspect-ratio: 16 / 9; min-height: 280px; max-height: 54svh;
    object-fit: cover; object-position: center 22%;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 48%, rgb(0 0 0 / .74) 68%, rgb(0 0 0 / .24) 86%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 48%, rgb(0 0 0 / .74) 68%, rgb(0 0 0 / .24) 86%, transparent 100%);
  }
  .wh-hero.is-tall .wh-hero-image {
    aspect-ratio: 4 / 3; min-height: 440px; max-height: 74svh;
    object-position: center 20%;
  }
  .wh-hero::before, .wh-hero.is-tall::before { display: none; }
  .wh-hero-inner { position: relative; z-index: 1; margin-top: -112px; padding: 0 var(--wh-gutter) 24px; gap: 14px; }
  .wh-hero.is-tall .wh-hero-inner { margin-top: -128px; padding-top: 0; }
  .wh-hero-text, .wh-facts { text-shadow: 0 2px 16px color-mix(in srgb, var(--wl-bg) 78%, transparent), 0 1px 3px color-mix(in srgb, var(--wl-bg) 85%, transparent); }
  .wh-facts { position: static; margin-top: 10px; text-align: left; }
  .wh-facts-row, .wh-facts .wh-by { justify-content: flex-start; }
  .wh-facts-row { flex-wrap: wrap; gap: 14px 24px; }
}
/* Phone (≤ 560px): compact cover ratios, full-width actions, 5 equal metric cells. */
@container world-home (max-width: 560px) {
  .wh-page { --wh-gutter: clamp(14px, 4.2cqi, 20px); padding-bottom: 56px; }
  .wh-hero-image {
    aspect-ratio: 16 / 10; min-height: 220px; max-height: 44svh;
    object-position: center 28%;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 44%, rgb(0 0 0 / .72) 66%, rgb(0 0 0 / .24) 85%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 44%, rgb(0 0 0 / .72) 66%, rgb(0 0 0 / .24) 85%, transparent 100%);
  }
  .wh-hero.is-tall .wh-hero-image {
    aspect-ratio: 4 / 5; min-height: 380px; max-height: 70svh;
    object-position: center 26%;
  }
  .wh-hero-tools { top: 10px; right: 10px; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 20px); }
  .wh-hero-inner { margin-top: -102px; padding: 0 var(--wh-gutter) 20px; gap: 12px; }
  .wh-hero.is-tall .wh-hero-inner { margin-top: -124px; padding-top: 0; }
  .wh-hero-logo { max-height: clamp(54px, 16cqi, 96px); }
  .wh-hero-text h1 { font-size: clamp(20px, 6.2cqi, 28px); }
  .wh-tagline { margin-top: 8px !important; font-size: 14px; line-height: 1.45; }
  .wh-hero-actions { width: 100%; margin-top: 14px; gap: 8px; }
  .wh-page .wh-hero-actions .wh-button { flex: 1 1 120px; justify-content: center; height: 38px; padding: 0 12px; }
  .wh-section { padding-top: 40px; }
  .wh-premise { padding-top: 32px; }
  .wh-section-title { margin-bottom: 14px; gap: 6px 14px; }
  .wh-section-title h2, .wh-headline { font-size: clamp(18px, 5.2cqi, var(--t-title-page)); }
  .wh-introduction { margin-top: 16px !important; font-size: 14px; line-height: 1.65; }
  .wh-map-view { height: auto; }
  .wh-map-canvas { height: 280px; }
  .wh-facts { margin-top: 10px; }
  .wh-facts-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
  .wh-fact { justify-content: flex-end; align-items: center; text-align: center; padding: 2px 3px; }
  .wh-fact + .wh-fact { padding-left: 3px; }
  .wh-fact dd { font-size: 18px; }
  .wh-fact dt { margin-top: 6px; font-size: 9px; letter-spacing: .08em; line-height: 1.25; white-space: normal; text-wrap: balance; }
  .wh-facts .wh-by { margin-top: 14px; font-size: 12px; }
  .wh-edit-bar { max-width: calc(100vw - 20px); flex-wrap: wrap; justify-content: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-lg); }
}
/* The smallest phones: three equal cells to a row, no hairlines; the date drops under the name without its dot. */
@container world-home (max-width: 330px) {
  .wh-facts-row { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 0; }
  .wh-fact + .wh-fact { border-left: 0; }
  .wh-by-when::before { content: none; }
}
/* Over a busy cover the numbers keep a soft shade of the page's own dark behind them, so they read on any picture. */
.wh-facts::before { content: ""; position: absolute; inset: -34px -44px -26px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--wl-bg) 62%, transparent), transparent); pointer-events: none; }
@container world-home (max-width: 1000px) { .wh-facts::before { content: none; } }
