/* Play (type-studio/game*.mjs, Worldrig play-plan §3, D-056, D-058): a game covers the workspace
   under the top bar. The place you are in fills the back; the story reads on a quieter band over
   it, with the composer under it; the panel and the rail of pins sit on the right. The panel, the
   rail and the composer are glass, like the app's other tool surfaces; what you read stays opaque.
   Tablets lay the panel over the story; phones fold the rail into a top-bar button and open the
   panel as a sheet. */
body.wb-game-open :is(.horizontal-main-container, .wl-workspace-body), body.wb-game-open .status-bar { visibility: hidden; }
body.wb-game-open .wb-project-bar > :not(.wb-game-top) { display: none; }
body.wb-game-resizing-rows { cursor: row-resize; user-select: none; }
body.wb-game-resizing-rows iframe { pointer-events: none; }
.wb-game [hidden] { display: none !important; }

/* The top bar: back to the world, then the game's name. The rest of the bar moves the window. */
.wb-game-top { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; align-self: stretch; }
.wb-game-drag { flex: 1; align-self: stretch; -webkit-app-region: drag; }
.wb-game-slash { color: var(--wl-text-3); }
body .wb-game-top button.wb-game-title { height: 32px; min-width: 0; max-width: 320px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--wl-text); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .wb-game-top button.wb-game-title:hover { background: var(--wl-raised); }

.wb-game { position: absolute; inset: var(--wb-bar-height) 0 0; z-index: 10; display: flex; flex-direction: column; background: var(--wl-bg); animation: wl-fade var(--wl-short) var(--wl-ease-out); }
.wb-game-main { position: relative; isolation: isolate; flex: 1; min-height: 0; display: flex; }
.wb-game-column { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wb-game-quiet { margin: 0; padding: 16px; color: var(--wl-text-2); font-size: 13px; }

/* ---- Where you are: the place's picture behind everything ---- */
.wb-game-backdrop { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.wb-game-backdrop img { position: absolute; inset: -16px; width: calc(100% + 32px); height: calc(100% + 32px); object-fit: cover; filter: blur(8px) saturate(1.05); animation: wl-fade var(--wl-scene) var(--wl-ease-scene); transition: filter var(--wl-scene) var(--wl-ease-scene), opacity var(--wl-scene) var(--wl-ease-scene); }
.wb-game-backdrop::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--wl-bg) 34%, transparent); transition: background var(--wl-scene) var(--wl-ease-scene); }
/* The reading band: the story sits on the canvas tone, the place shows at the sides. */
.wb-game.has-backdrop .wb-game-column::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--wl-bg) 30%, transparent) 0, color-mix(in srgb, var(--wl-bg) 88%, transparent) calc(50% - 400px), color-mix(in srgb, var(--wl-bg) 88%, transparent) calc(50% + 400px), color-mix(in srgb, var(--wl-bg) 30%, transparent) 100%); transition: opacity var(--wl-scene) var(--wl-ease-scene); }

/* ---- The story: no scroll bar, and the oldest lines fade out at the top ---- */
.wb-game-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to bottom, transparent 0, var(--wl-bg) 56px); mask-image: linear-gradient(to bottom, transparent 0, var(--wl-bg) 56px); }
.wb-game-scroll::-webkit-scrollbar { display: none; }
.wb-game-story { box-sizing: border-box; max-width: 736px; min-height: 100%; margin: 0 auto; padding: 64px 32px 32px; display: flex; flex-direction: column; justify-content: flex-end; gap: 22px; }
.wb-game-turn { position: relative; }
.wb-game-turn.is-gm { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

/* The narrator: narration as prose on the page; each speaker's lines in a block of their own,
   with their face, their name and how they say it. */
.wb-game-prose { align-self: stretch; color: var(--wl-text); overflow-wrap: anywhere; white-space: pre-wrap; text-wrap: pretty; }
.wb-game-prose:has(> p) { white-space: normal; }
.wb-game-prose > :first-child, .wb-game-line-text > :first-child, .wb-game-vn-text > :first-child { margin-top: 0; }
.wb-game-prose > :last-child, .wb-game-line-text > :last-child, .wb-game-vn-text > :last-child { margin-bottom: 0; }
.wb-game-prose p { margin: 0 0 .85em; }
.wb-game-prose em { color: var(--wl-text-2); }
.wb-game-line { box-sizing: border-box; width: fit-content; min-width: min(240px, 100%); max-width: min(620px, 100%); padding: 10px 16px 12px 12px; border: 1px solid var(--wl-line); border-radius: 10px; background: var(--wl-surface); }
.wb-game-line-head { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 4px; }
.wb-game-line-face { width: 28px; height: 28px; font-size: 10.5px; }
.wb-game-face.is-unknown { background: transparent; box-shadow: inset 0 0 0 1px var(--wl-line-strong); color: var(--wl-text-3); }
.wb-game-face.is-cast, .wb-game-token-face.is-cast { box-sizing: border-box; border: 1px dashed var(--wl-line-strong); background: transparent; color: var(--wl-text-2); }
.wb-game-beat { color: var(--wl-text-2); }
.wb-game-changes-who { color: var(--wl-text-2); }
.wb-game-line-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wl-text); font-size: 13px; font-weight: 600; line-height: 18px; }
.wb-game-line-mood, .wb-game-vn-mood { flex: none; color: var(--wl-text-3); font-size: 12px; font-style: italic; line-height: 16px; }
.wb-game-line-mood::before { content: "·"; margin-right: 6px; font-style: normal; }
.wb-game-line-text { padding-left: 36px; color: var(--wl-text); overflow-wrap: anywhere; white-space: pre-wrap; }
.wb-game-line-text:has(> p) { white-space: normal; }
.wb-game-line-text p { margin: 0 0 .6em; }
.wb-game-name { font-weight: 600; border-radius: 3px; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
.wb-game-name:hover, .wb-game-name:focus-visible { color: var(--wl-text); text-decoration-color: currentColor; outline: none; }
.wb-game-face[data-path] { cursor: pointer; }

/* What an answer changed, quietly under it. */
.wb-game-changes { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; color: var(--wl-text-3); font-size: 12px; line-height: 16px; }
.wb-game-changes .wb-game-name { color: var(--wl-text-2); }
.wb-game-mark { color: var(--wl-text-3); font-size: 11px; line-height: 1; }

/* A new place opens a new scene. */
.wb-game-scene-break { display: flex; align-items: center; gap: 14px; margin-top: 14px; color: var(--wl-text-3); }
.wb-game-scene-break::before, .wb-game-scene-break::after { content: ""; flex: 1; height: 1px; background: var(--wl-line); }
.wb-game-scene-name { display: inline-flex; align-items: center; gap: 6px; max-width: 70%; font-size: 11px; font-weight: 600; line-height: 14px; white-space: nowrap; }
.wb-game-scene-name > span:last-child, .wb-game-scene-name > span:has(+ .wb-game-scene-time) { overflow: hidden; text-overflow: ellipsis; }
.wb-game-scene-time { flex: none; }
.wb-game-scene-name .wt-glyph svg { width: 12px; height: 12px; display: block; }
.wb-game-scene-lead { font-weight: 500; }
.wb-game-scene-name .wb-game-name { color: var(--wl-text-2); }

/* You: on the right, with your face. */
.wb-game-turn.is-player { align-self: flex-end; display: flex; align-items: flex-end; gap: 8px; max-width: 78%; }
.wb-game-bubble { min-width: 0; padding: 8px 14px 10px; border: 1px solid var(--wl-line); border-radius: 14px 14px 4px 14px; background: var(--wl-raised); }
.wb-game-turn-face { width: 28px; height: 28px; font-size: 10.5px; }
.wb-game-turn-head { margin-bottom: 2px; color: var(--wl-text-3); font-size: 12px; font-weight: 600; line-height: 16px; }
.wb-game-player-text { font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.wb-game-turn.is-think .wb-game-player-text { font-style: italic; color: var(--wl-text-2); }

/* Dice, directions and pictures */
.wb-game-turn.is-roll, .wb-game-turn.is-direction { align-self: center; max-width: 88%; }
.wb-game-direction .wt-glyph svg { width: 15px; height: 15px; display: block; }
.wb-game-direction { display: flex; align-items: baseline; gap: 8px; padding: 7px 14px; border: 1px dashed var(--wl-line-strong); border-radius: 10px; background: var(--wl-surface); color: var(--wl-text-2); font-size: 13px; line-height: 1.5; }
.wb-game-direction .wt-glyph { align-self: center; color: var(--wl-text-3); }
.wb-game-direction-label { flex: none; color: var(--wl-text-3); font-size: 11px; font-weight: 600; }
.wb-game-turn.is-picture, .wb-game-turn.is-painting { align-self: stretch; }
.wb-game-picture { position: relative; margin: 0; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--wl-line); border-radius: 14px; background: var(--wl-surface); }
.wb-game-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wb-game-picture.is-pending { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--wl-text-2); font-size: 13px; }
.wb-game-painting-bar { width: min(240px, 60%); height: 3px; overflow: hidden; border-radius: 2px; background: var(--wl-line); }
.wb-game-painting-bar i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--wl-text-2); transform: scaleX(0); transform-origin: left; transition: transform var(--wl-long) var(--wl-ease-out); }
.wb-game-painting-bar.is-waiting i { transform: none !important; animation: wb-game-breathe 1.6s ease-in-out infinite; }

/* While the narrator writes: the ✦ mark, and the words as they come. */
.wb-game-vn-more .wb-game-mark { animation: wb-game-breathe 1.6s ease-in-out infinite; }
.wb-game-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; border-radius: 1px; background: var(--wl-text-2); animation: wb-game-breathe 1s ease-in-out infinite; }
@keyframes wb-game-breathe { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.wb-game-turn.is-error { display: flex; align-items: center; gap: 8px; color: var(--wl-danger); font-size: 13px; }
.wb-game-turn.is-error .wt-glyph svg { width: 16px; height: 16px; display: block; }
body .wb-game-link { height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--wl-text); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wb-game-turn-tools { position: absolute; right: 0; bottom: -26px; display: flex; gap: 2px; opacity: 0; transition: opacity var(--wl-quick) var(--wl-ease); }
.wb-game-turn.is-gm .wb-game-turn-tools { right: auto; left: 0; }
.wb-game-turn.is-player .wb-game-turn-tools { right: 36px; }
.wb-game-turn.is-roll .wb-game-turn-tools, .wb-game-turn.is-direction .wb-game-turn-tools { right: auto; left: 100%; bottom: 50%; transform: translateY(50%); padding-left: 4px; }
.wb-game-turn:hover .wb-game-turn-tools, .wb-game-turn:focus-within .wb-game-turn-tools { opacity: 1; }
body .wb-game-turn-tools button.wt-icon-button { width: 24px; height: 24px; padding: 0; border-radius: 6px; color: var(--wl-text-3); }
body .wb-game-turn-tools button.wt-icon-button:hover { color: var(--wl-text); background: var(--wl-raised); }
.wb-game-turn-tools .wt-glyph svg { width: 14px; height: 14px; }

/* Before the story begins */
.wb-game-opening { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 0; text-align: center; }
.wb-game-eyebrow { margin-top: 10px; color: var(--wl-text-3); font-size: 11px; font-weight: 600; line-height: 14px; }
.wb-game-opening h2 { margin: 0; text-wrap: balance; font-size: 20px; line-height: 28px; }
.wb-game-opening p { margin: 0; color: var(--wl-text-2); font-size: 15px; line-height: 24px; }
body .wb-game-opening button.wb-game-begin { display: inline-flex; align-items: center; gap: 8px; height: 32px; margin-top: 14px; padding: 0 16px 0 12px; border: 1px solid var(--wl-line-strong); border-radius: 999px; background: var(--wl-surface); box-shadow: none; color: var(--wl-text); font-size: 13px; font-weight: 600; }
body .wb-game-opening button.wb-game-begin:hover { background: var(--wl-raised); }
.wb-game-begin .wt-glyph svg { width: 14px; height: 14px; display: block; }
.wb-game-opening .wb-game-hint { font-size: 12px; line-height: 16px; color: var(--wl-text-3); }

/* Faces */
.wb-game-face { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: var(--wl-raised); color: var(--wl-text-2); font-size: 11px; font-weight: 600; line-height: 1; }
.wb-game-face img { width: 100%; height: 100%; object-fit: cover; }
.wb-game-face.is-large { width: 72px; height: 72px; font-size: 24px; }
.wb-game-face.is-you { box-shadow: 0 0 0 2px var(--wl-bg), 0 0 0 3.5px var(--wl-accent); }
.wb-game-pin-glyph svg { width: 18px; height: 18px; display: block; }

/* ---- The composer: what you say or do; under it the tools, the models and send ---- */
.wb-game-composer-wrap { flex: none; padding: 0 32px 18px; }
.wb-game-composer { box-sizing: border-box; max-width: 720px; margin: 0 auto; padding: 10px 8px 8px 14px; border: 1px solid var(--wl-line); border-radius: var(--r-lg); background: var(--wl-surface); transition: border-color var(--wl-short) var(--wl-ease); }
.wb-game.has-backdrop .wb-game-composer { border-color: var(--wl-glass-border); background: var(--wl-glass); -webkit-backdrop-filter: blur(16px) saturate(115%); backdrop-filter: blur(16px) saturate(115%); box-shadow: var(--wl-elev-card); }
.wb-game-composer:focus-within, .wb-game.has-backdrop .wb-game-composer:focus-within { border-color: var(--wl-line-strong); }
.wb-game-composer.is-direction, .wb-game.has-backdrop .wb-game-composer.is-direction { border-style: dashed; border-color: var(--wl-line-strong); }
.wb-game-composer-tag { display: flex; align-items: center; gap: 6px; margin: -2px 0 6px; color: var(--wl-text-3); font-size: 11px; font-weight: 600; line-height: 14px; }
.wb-game-composer-tag.is-new { animation: wl-pop var(--wl-short) var(--wl-ease-out); transform-origin: left center; }
.wb-game-composer-tag .wt-glyph svg { width: 13px; height: 13px; display: block; }
.wb-game-composer-tag > span:not(.wt-glyph) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .wb-game-composer-tag button.wt-icon-button { width: 22px; height: 22px; padding: 0; border-radius: 4px; color: var(--wl-text-3); }
.wb-game-composer textarea.wb-game-input { display: block; box-sizing: border-box; width: 100%; min-height: 44px; max-height: 200px; margin: 0 0 4px; padding: 4px 4px 6px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; resize: none; font-size: 15px; line-height: 1.5; color: var(--wl-text); }
.wb-game-composer textarea.wb-game-input:focus, .wb-game-composer textarea.wb-game-input:focus-visible { border: 0; box-shadow: none; outline: none; }
.wb-game-composer-row { display: flex; align-items: center; gap: 6px; margin-left: -6px; }
.wb-game-tools { flex: none; display: flex; align-items: center; gap: 2px; }
body .wb-game-composer button.wb-game-tool { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--wl-text-2); }
body .wb-game-composer button.wb-game-tool:hover { color: var(--wl-text); background: var(--wl-raised); }
body .wb-game-composer button.wb-game-tool.is-on { color: var(--wl-text); background: var(--wl-raised); box-shadow: inset 0 0 0 1px var(--wl-line-strong); }
body .wb-game-composer button.wb-game-tool:disabled { opacity: .45; cursor: default; }
.wb-game-tool .wt-glyph svg { width: 17px; height: 17px; display: block; }
.wb-game-note { flex: 1; min-width: 0; color: var(--wl-danger); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .wb-game-composer button.wb-game-model { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 280px; height: 28px; padding: 0 8px 0 10px; border: 1px solid var(--wl-line); border-radius: 999px; background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.wb-game-model-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wb-game-model-bar { flex: none; width: 1px; height: 12px; background: var(--wl-line-strong); }
.wb-game-model-image { flex: none; color: var(--wl-text-3); }
.wb-game-model .wt-glyph svg { width: 13px; height: 13px; display: block; }
.wb-game-model > .wt-glyph:last-child { opacity: .7; }
body .wb-game-composer button.wb-game-model:hover { color: var(--wl-text); background: var(--wl-raised); }
body .wb-game-composer button.wb-game-model.is-missing { color: var(--wl-text); border-style: dashed; border-color: var(--wl-line-strong); }
/* Send: the one filled button. */
body .wb-game-composer button.wb-game-send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--wl-accent); box-shadow: none; color: var(--wl-on-accent); }
body .wb-game-composer button.wb-game-send:hover { background: var(--wl-accent); }
body .wb-game-composer button.wb-game-send.is-stop { background: var(--wl-text); color: var(--wl-bg); }
.wb-game-send .wt-glyph svg { width: 16px; height: 16px; display: block; }

/* ---- Visual novel: one beat at a time, over the place ---- */
.wb-game-stage { display: none; }
.wb-game.is-vn .wb-game-scroll { display: none; }
.wb-game.is-vn .wb-game-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px 32px 14px; overflow: hidden; }
.wb-game.is-vn .wb-game-backdrop img { filter: none; }
.wb-game.is-vn .wb-game-backdrop::after { background: linear-gradient(0deg, color-mix(in srgb, var(--wl-bg) 72%, transparent) 0, transparent 55%); }
.wb-game.is-vn .wb-game-column::before { opacity: 0; }
.wb-game-stage-figure { position: absolute; top: 3%; bottom: 0; right: max(2%, calc(50% - 580px)); width: min(48%, 540px); pointer-events: none; transition: opacity var(--wl-long) var(--wl-ease-out); }
.wb-game-stage-figure img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; -webkit-mask-image: linear-gradient(0deg, transparent 0, var(--wl-bg) 38%), linear-gradient(90deg, transparent 0, var(--wl-bg) 24%, var(--wl-bg) 80%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(0deg, transparent 0, var(--wl-bg) 38%), linear-gradient(90deg, transparent 0, var(--wl-bg) 24%, var(--wl-bg) 80%, transparent 100%); mask-composite: intersect; animation: wl-fade var(--wl-long) var(--wl-ease-out); }
.wb-game-stage-figure.is-quiet { opacity: .4; }
/* A new face comes in over the one before (game-story.mjs portrait); a character's page can put them on the left. */
.wb-game-stage-figure img { position: absolute; inset: 0; }
.wb-game-stage-figure.is-left { right: auto; left: max(2%, calc(50% - 580px)); }
.wb-game-stage-figure img.is-loading { opacity: 0; animation: none; }
.wb-game-stage-figure img.is-leaving { opacity: 0; transition: opacity 180ms var(--wl-ease-out); }
/* A face with no background (D-392) stands whole on the floor of the stage: nothing faded, a little larger, a soft
   shadow to lift it off the place. While the narrator speaks it dims in place of going see-through. */
.wb-game-stage-figure:has(img.is-cutout) { width: min(56%, 640px); }
.wb-game-stage-figure img.is-cutout { object-fit: contain; object-position: center bottom !important; -webkit-mask-image: none; mask-image: none; filter: drop-shadow(0 10px 26px rgb(0 0 0 / .5)); transition: filter var(--wl-long) var(--wl-ease-out); }
/* One painted wider than its picture (a shoulder running off a side) fades out on that side, in place of a straight
   cut down the character: the mask is the picture's own shape (WBKit.cutout sets it), laid as the picture is. */
.wb-game-stage-figure img.is-cutout.is-cut-side { -webkit-mask: var(--wl-cut-mask) center bottom / contain no-repeat; mask: var(--wl-cut-mask) center bottom / contain no-repeat; }
.wb-game-stage-figure.is-quiet:has(img.is-cutout) { opacity: 1; }
.wb-game-stage-figure.is-quiet img.is-cutout { filter: brightness(.55) saturate(.85) drop-shadow(0 10px 26px rgb(0 0 0 / .5)); }
.wb-game-vn { position: relative; z-index: 1; box-sizing: border-box; width: 100%; max-width: 760px; margin: 0 auto; padding: 14px 18px 10px; border: 1px solid var(--wl-glass-border); border-radius: var(--r-lg); background: var(--wl-glass); -webkit-backdrop-filter: blur(16px) saturate(115%); backdrop-filter: blur(16px) saturate(115%); box-shadow: var(--wl-elev-card); cursor: pointer; }
/* Over a place's picture the box is the same tinted glass as the panels beside it (asked for 2026-11-19: it stood out as the one solid thing). */
.wb-game.has-backdrop .wb-game-vn { border-color: var(--wl-glass-border); background: var(--wl-glass); }
.wb-game-vn:focus { outline: none; }
.wb-game-vn:focus-visible { border-color: var(--wl-line-strong); }
.wb-game-vn-head { display: flex; align-items: center; gap: 10px; min-width: 0; margin-bottom: 8px; }
.wb-game-vn-head:empty { display: none; }
.wb-game-vn-face { width: 40px; height: 40px; font-size: 14px; }
.wb-game-vn-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wl-text); font-size: 17px; font-weight: 600; line-height: 24px; }
.wb-game-vn-mood { padding: 1px 8px; border: 1px solid var(--wl-line); border-radius: 999px; }
.wb-game-vn-text { min-height: 56px; max-height: 38vh; overflow-y: auto; scrollbar-width: thin; color: var(--wl-text); font-size: 17px; line-height: 28px; overflow-wrap: anywhere; white-space: pre-wrap; }
.wb-game-vn-text:has(> p) { white-space: normal; }
.wb-game-vn-text p { margin: 0 0 .6em; }
.wb-game-vn.is-prose .wb-game-vn-text, .wb-game-vn.is-opening .wb-game-vn-text { color: var(--wl-text-2); }
.wb-game-vn-text.is-in { animation: wl-fade var(--wl-short) var(--wl-ease-out); }
.wb-game-vn-wait { color: var(--wl-text-3); font-size: 15px; }
.wb-game-vn-foot { display: flex; align-items: center; gap: 2px; margin-top: 8px; }
.wb-game-vn-more { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--wl-text-3); font-size: 12px; line-height: 16px; }
.wb-game-vn-count { min-width: 48px; color: var(--wl-text-3); font-family: var(--wl-font-mono); font-size: 12px; font-variant-numeric: tabular-nums; text-align: center; }
body .wb-game-vn-foot button.wb-game-vn-step { width: 28px; height: 28px; padding: 0; border-radius: 6px; color: var(--wl-text-2); }
body .wb-game-vn-foot button.wb-game-vn-step:hover:not(:disabled) { color: var(--wl-text); background: var(--wl-raised); }
body .wb-game-vn-foot button.wb-game-vn-step:disabled { opacity: .35; cursor: default; }
.wb-game-vn-step .wt-glyph svg { width: 16px; height: 16px; display: block; }
/* The message box waits while an answer is read or written (is-reading). Your turn (is-turn) shows the story to read
   back, fading in, and the message box rises in under it. */
.wb-game.is-vn.is-reading .wb-game-composer-wrap { display: none; }
.wb-game.is-turn .wb-game-scroll { animation: wl-fade var(--wl-short) var(--wl-ease-out); }
.wb-game.is-turn .wb-game-composer-wrap { animation: wl-composer-open var(--wl-short) var(--wl-ease-out); }
body .wb-game-vn-foot button.wb-game-vn-turn { height: 28px; display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 10px; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--wl-text); font-size: 13px; font-weight: 600; line-height: 16px; }
body .wb-game-vn-foot button.wb-game-vn-turn:hover { background: var(--wl-raised); }
body .wb-game-vn-foot button.wb-game-vn-turn[hidden] { display: none; }
.wb-game-vn-turn .wt-glyph svg { width: 14px; height: 14px; display: block; }
body .wb-game-vn-foot button.wb-game-vn-skip { height: 28px; display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 8px; margin-left: -8px; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: 13px; font-weight: 600; line-height: 16px; }
body .wb-game-vn-foot button.wb-game-vn-skip:hover { color: var(--wl-text); background: var(--wl-raised); }
.wb-game-vn-skip .wt-glyph svg { width: 14px; height: 14px; display: block; }
body .wb-game-vn-foot button.wb-game-vn-skip.is-stop { margin-left: 2px; padding: 0 8px; }

/* ---- The rail: pins, + to pin something, and Boris at the foot ---- */
.wb-game-rail { position: relative; z-index: 1; flex: none; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 12px; border-left: 1px solid var(--wl-line); background: var(--wl-bg); overflow-y: auto; }
.wb-game.has-backdrop .wb-game-left { border-right-color: var(--wl-glass-border); background: var(--wl-glass); -webkit-backdrop-filter: blur(16px) saturate(115%); backdrop-filter: blur(16px) saturate(115%); }
.wb-game.has-backdrop .wb-game-rail, .wb-game.has-backdrop .wb-game-panel { border-left-color: var(--wl-glass-border); background: var(--wl-glass); -webkit-backdrop-filter: blur(16px) saturate(115%); backdrop-filter: blur(16px) saturate(115%); }
.wb-game-rail-list { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wb-game-rail-space { flex: 1; }
body button.wb-game-rail-item, body button.wb-game-rail-add { position: relative; flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: var(--wl-text-2); cursor: pointer; touch-action: none; }
body button.wb-game-rail-item:hover, body button.wb-game-rail-add:hover { background: var(--wl-raised); color: var(--wl-text); }
body button.wb-game-rail-item.is-active { background: var(--wl-raised); color: var(--wl-text); box-shadow: inset 0 0 0 1px var(--wl-line-strong); }
body button.wb-game-rail-item.is-active::before { content: ""; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--wl-accent); }
.wb-game-rail-item .wb-game-face { width: 30px; height: 30px; }
.wb-game-rail-add .wt-glyph svg { width: 18px; height: 18px; display: block; }
body button.wb-game-rail-item.is-boris { touch-action: auto; }
.wb-game-rail-item.is-boris .wt-orbis-blob { --size: 26px; }
.wb-game-group-icon { position: relative; width: 30px; height: 30px; }
.wb-game-group-icon > * { position: absolute; width: 22px !important; height: 22px !important; font-size: 8px; box-shadow: 0 0 0 2px var(--wl-bg); }
.wb-game-group-icon > :first-child { left: 0; top: 0; }
.wb-game-group-icon > :nth-child(2) { right: 0; bottom: 0; }
.wb-game-group-icon > .wb-game-pin-glyph { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--wl-surface); }
.wb-game-group-icon .wb-game-pin-glyph svg { width: 13px; height: 13px; }
.wb-game-group-count { position: absolute; right: 1px; top: 1px; min-width: 15px; height: 15px; padding: 0 3px; box-sizing: border-box; border-radius: 999px; background: var(--wl-accent); color: var(--wl-on-accent); font-family: var(--wl-font-mono); font-size: 9.5px; font-weight: 600; line-height: 15px; font-variant-numeric: tabular-nums; text-align: center; }
body button.wb-game-rail-item.is-dragging { z-index: 2; background: var(--wl-bg); box-shadow: 0 0 0 1px var(--wl-line-strong), var(--wl-elev-pop); cursor: grabbing; }
body.wb-game-sorting { cursor: grabbing; user-select: none; }
.wb-game-rail-item.is-drop-into { box-shadow: inset 0 0 0 2px var(--wl-accent) !important; }
.wb-game-rail-item.is-drop-before::after, .wb-game-rail-item.is-drop-after::after { content: ""; position: absolute; left: 4px; right: 4px; height: 2px; border-radius: 1px; background: var(--wl-accent); }
.wb-game-rail-item.is-drop-before::after { top: -4px; }
.wb-game-rail-item.is-drop-after::after { bottom: -4px; }

/* ---- The panel. One card fills it; a group's cards share its height, each scrolling on its own ---- */
/* Thin, quiet scroll bars in the panel. */
.wb-game-panel, .wb-game-panel * { scrollbar-width: thin; scrollbar-color: var(--wl-line-strong) transparent; }
.wb-game-rail { scrollbar-width: none; }
.wb-game-panel { position: relative; z-index: 1; flex: none; display: none; flex-direction: column; width: var(--panel, 380px); max-width: calc(100% - 240px); min-height: 0; border-left: 1px solid var(--wl-line); background: var(--wl-surface); }
.wb-game.has-panel .wb-game-panel { display: flex; }
/* ---- The map on the left (D-246): the story between it and the panel, three columns. Its right edge sets its width,
   and each side leaves the story its room to read (--wb-panel-now, --wb-left-now: game-panel.mjs applyWidth). ---- */
.wb-game-left, .wb-game-left * { scrollbar-width: thin; scrollbar-color: var(--wl-line-strong) transparent; }
.wb-game-left { position: relative; z-index: 1; flex: none; display: none; flex-direction: column; width: var(--left, 440px); max-width: max(300px, calc(100% - var(--wb-story-least, 420px) - 56px - var(--wb-panel-now, 0px))); min-height: 0; border-right: 1px solid var(--wl-line); background: var(--wl-surface); }
.wb-game.has-left-map .wb-game-left { display: flex; }
.wb-game-left.is-map-large { width: 100%; }
.wb-game.has-left-map .wb-game-panel { max-width: max(300px, calc(100% - var(--wb-story-least, 420px) - 56px - var(--wb-left-now, 0px))); }
.wb-game-stack { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px; overflow-y: auto; }
.wb-game-card { position: relative; flex: var(--grow, 1) 1 0; display: flex; flex-direction: column; min-height: 120px; overflow: hidden; border: 1px solid var(--wl-line); border-radius: 14px; background: var(--wl-bg); animation: wl-fade var(--wl-short) var(--wl-ease-out); }
.wb-game-card.is-folded { flex: none; min-height: 0; }
.wb-game-card.is-peek:not(.is-alone) { border-color: var(--wl-line-strong); }
.wb-game-split { flex: none; position: relative; height: 10px; }
.wb-game-card:not(.is-folded) + .wb-game-split:has(+ .wb-game-card:not(.is-folded)) { cursor: row-resize; }
.wb-game-split::after { content: ""; position: absolute; left: 40%; right: 40%; top: 4px; height: 2px; border-radius: 1px; background: transparent; transition: background var(--wl-quick) var(--wl-ease); }
.wb-game-card:not(.is-folded) + .wb-game-split:has(+ .wb-game-card:not(.is-folded)):hover::after, body.wb-game-resizing-rows .wb-game-split::after { background: var(--wl-line-strong); }
.wb-game-card-head { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px; }
.wb-game-card:not(.is-alone):not(.is-peek) .wb-game-card-head { cursor: pointer; }
.wb-game-card-head .wb-game-face { width: 22px; height: 22px; font-size: 9px; }
.wb-game-card-head .wb-game-face.is-you { box-shadow: none; }
.wb-game-card-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--wl-font-title); font-size: var(--t-title-panel); font-weight: 400; letter-spacing: 0; text-transform: none; }
.wb-game-card-sub { margin-left: 6px; color: var(--wl-text-2); font-family: var(--wl-font-ui); font-size: var(--t-ui); font-weight: 400; }
/* The map card's trail of places (E8): where the map is in the world, down to where you stand. Each step is a quiet
   button that shows its map; the last, where you are, stays whole while the others shorten on a narrow panel. */
.wb-game-card-title:has(> .wb-game-map-trail) { display: flex; align-items: center; min-width: 0; }
.wb-game-map-trail { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; gap: 1px; overflow-x: auto; scrollbar-width: none; }
.wb-game-map-trail::-webkit-scrollbar { display: none; }
.wb-game-map-trail-step { flex: 0 1 auto; min-width: 2.5em; max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wl-text-3); }
body button.wb-game-map-trail-step { height: auto; padding: 2px var(--sp-1); border: 0; border-radius: var(--r-xs); background: transparent; box-shadow: none; font: inherit; cursor: pointer; transition: color var(--wl-quick) ease, background-color var(--wl-quick) ease; }
body button.wb-game-map-trail-step:hover { background: var(--wl-raised); color: var(--wl-text); }
body button.wb-game-map-trail-step:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: 1px; }
.wb-game-map-trail-step.is-current { flex-shrink: 1; display: inline-flex; align-items: center; gap: 2px; padding: 2px var(--sp-1); color: var(--wl-text-2); font-weight: 600; }
.wb-game-map-trail-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wb-game-map-trail-more { flex: none; display: flex; color: var(--wl-text-3); } .wb-game-map-trail-more svg { width: 12px; height: 12px; display: block; }
.wb-game-map-trail-gap { flex: none; color: var(--wl-text-3); opacity: .6; }
body .wb-game-card-head button.wt-icon-button { flex: none; width: 28px; height: 28px; padding: 0; border-radius: 6px; color: var(--wl-text-2); }
body .wb-game-card-head button.wt-icon-button:hover { color: var(--wl-text); background: var(--wl-raised); }
.wb-game-card-head .wt-glyph svg { width: 15px; height: 15px; display: block; }
/* A group's tabs (game-panel.mjs groupTabs): face and name, the shown one raised as Boris's open chat is; many scroll
   sideways with no bar, the cut edge fading. */
.wb-game-card-head:has(> .wb-game-tabs) { padding-left: 6px; }
.wb-game-tabs { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain; }
.wb-game-tabs::-webkit-scrollbar { display: none; }
.wb-game-tabs.is-more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.wb-game-tabs.is-more-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
.wb-game-tabs.is-more-left.is-more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
body button.wb-game-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; max-width: 180px; height: 28px; padding: 0 10px 0 4px; border: 0; border-radius: var(--r-md); background: transparent; box-shadow: none; color: var(--wl-text-2); font-family: var(--wl-font-ui); font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
body button.wb-game-tab:hover { color: var(--wl-text); background: color-mix(in srgb, var(--wl-text) 5%, transparent); }
body button.wb-game-tab.is-active { color: var(--wl-text); background: color-mix(in srgb, var(--wl-text) 9%, transparent); cursor: default; }
body button.wb-game-tab:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: -2px; }
.wb-game-tab .wb-game-face { width: 20px; height: 20px; font-size: 8px; }
.wb-game-tab .wb-game-pin-glyph svg { width: 14px; height: 14px; }
.wb-game-tabs.is-tight button.wb-game-tab:not(.is-active) { padding: 0 4px; }
.wb-game-tabs.is-tight .wb-game-tab:not(.is-active) .wb-game-tab-name { display: none; }
.wb-game-tab-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A page open for now has a × in its tab (game-panel.mjs groupTabs): shown on the tab shown, or pointed at. */
.wb-game-tab-x { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; margin: 0 -5px 0 -2px; border-radius: 5px; color: var(--wl-text-3); opacity: 0; cursor: pointer; transition: opacity var(--wl-quick) var(--wl-ease), background-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
.wb-game-tab-x svg { width: 12px; height: 12px; display: block; }
button.wb-game-tab:is(:hover, .is-active, :focus-visible) .wb-game-tab-x { opacity: 1; }
.wb-game-tab-x:hover { color: var(--wl-text); background: color-mix(in srgb, var(--wl-text) 10%, transparent); }
.wb-game-tabs.is-tight .wb-game-tab:not(.is-active) .wb-game-tab-x { display: none; }
@media (hover: none), (pointer: coarse) { .wb-game-tab-x { width: 24px; height: 24px; } button.wb-game-tab.is-active .wb-game-tab-x { opacity: 1; } }
.wb-game-tab-name .wb-game-card-sub { margin-left: 5px; font-size: 12px; }
.wb-game-fold .wt-glyph { transition: transform var(--wl-short) var(--wl-ease); }
.wb-game-card.is-folded .wb-game-fold .wt-glyph { transform: rotate(-90deg); }
.wb-game-card.is-folded .wb-game-card-body { display: none; }
/* Moving a card in a group: it follows the pointer, the others slide out of its way, and it settles. */
.wb-game-card.is-placed { animation: none; }
.wb-game-stack.is-sorting > .wb-game-card { transition: transform var(--wl-short) var(--wl-ease-out); }
.wb-game-stack.is-sorting > .wb-game-card.is-dragging { z-index: 2; transition: none; border-color: var(--wl-line-strong); box-shadow: var(--wl-elev-pop); }
.wb-game-stack.is-sorting > .wb-game-card.is-settling { z-index: 2; transition: transform var(--wl-short) var(--wl-ease-out), box-shadow var(--wl-short) var(--wl-ease-out); }
.wb-game-card-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; border-top: 1px solid var(--wl-line); }
.wb-game-card-body > * { flex: none; }
.wb-game-card .wt-widget { min-height: 0; border: 0; }
.wb-game-note-page { padding: 4px 16px 16px; font-size: 14px; }

/* Boris in the panel: his own bar, chats and composer. */
.wb-game-card.is-boris .wb-game-card-body { border-top: 0; overflow: hidden; }
.wb-game-card.is-boris .wb-game-card-body > .wt-orbis-panel { flex: 1; }
.wt-orbis-panel.is-embedded { position: relative; z-index: auto; flex: 1; width: auto; min-height: 0; border: 0; background: transparent; }
/* A phone's full-screen Boris sits under the window's bar (type-editor.css, 700px and under, with !important); in the
   game's card that offset pushed him down and cut off his send row, so the card keeps him at its own top. */
.wt-orbis-panel.is-embedded { inset: auto !important; }
.wt-orbis-panel.is-embedded .wt-orbis-inner { flex: 1; width: auto; min-width: 0; }
.wt-orbis-panel.is-embedded .wt-orbis-edge, .wt-orbis-panel.is-embedded .wt-orbis-dock, .wt-orbis-panel.is-embedded .wt-orbis-grip { display: none; }
.wt-orbis-panel.is-embedded .wt-orbis-bar { cursor: default; }

/* ---- The map card: the map as the map draws it, everyone on it as tokens, and who is here ---- */
.wb-game-card.is-map .wb-game-card-body { overflow: hidden; }
.wb-game-map { position: relative; flex: none; height: var(--map-height, 52%); min-height: 140px; max-height: calc(100% - 48px); overflow: hidden; border-bottom: 1px solid var(--wl-line); }
/* Until its height is dragged, the map takes all the room the list of people doesn't use, so a short list never leaves the card half empty. */
.wb-game-map:not(.is-full) { flex: 1 1 0; height: auto; }
.wb-game-map.is-full { flex: 1; height: auto; max-height: none; border-bottom: 0; }
/* The map on the app's own canvas, with its own grid from its settings (inside its frame when it has one). */
.wb-game-map .wb-game-map-canvas { background: var(--wl-bg); }
.wb-game-map .wh-map-plane.is-framed { background: color-mix(in srgb, var(--wl-surface) 60%, var(--wl-bg)); }
/* A map with a picture has no ground or line of its own around the picture in play (D-284, edges fade): where the card
   is wider or taller than the map, the card's ground carries on, so the map's edges never show as strips beside it. */
.wb-game-map .wh-map-plane.is-framed.wl-map-pictured { background: none; }
.wb-game-map .wh-map-plane.wl-map-pictured .wb-game-map-frame { display: none; }
.wb-game-map-grid { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wb-game-map-frame { fill: none; stroke: var(--wl-line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wb-game-map-lines { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wb-game-map-canvas.is-moving-token, .wb-game-map-canvas.is-moving-token * { cursor: grabbing !important; }
/* A face's picture is held by its token: pressing it never starts the browser's own picture drag. */
.wb-game-map-canvas img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
/* Tokens: everyone on the map, standing where they were put. */
.wb-game-map .wh-map-marker.is-token.wb-game-token { box-sizing: border-box; width: max(10px, calc(16px * min(1, var(--token-n, 1))), calc(var(--token-side, 30px) * var(--token-n, 1) * var(--zoom, 1))); height: max(10px, calc(16px * min(1, var(--token-n, 1))), calc(var(--token-side, 30px) * var(--token-n, 1) * var(--zoom, 1))); border: 2px solid var(--tint, var(--wl-line-strong)); background: var(--wl-surface); box-shadow: 0 1px 4px color-mix(in srgb, var(--wl-bg) 30%, transparent); cursor: grab; touch-action: none; transition: box-shadow var(--wl-quick) var(--wl-ease), opacity var(--wl-quick) var(--wl-ease); }
.wb-game-token-face { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow: hidden; border-radius: 50%; color: var(--wl-text-2); font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.wb-game-token-face img { width: 100%; height: 100%; object-fit: cover; }
.wb-game-map .wh-map-marker.wb-game-token.is-you { border-color: var(--wl-accent); }
.wb-game-map .wh-map-marker.wb-game-token.is-speaking { box-shadow: 0 0 0 3px var(--wl-bg), 0 0 0 4.5px var(--wl-text-2); }
.wb-game-map .wh-map-marker.wb-game-token:is(.is-lit, .is-selected) { box-shadow: 0 0 0 3px var(--wl-bg), 0 0 0 4.5px var(--wl-accent); }
.wb-game-map .wh-map-marker.wb-game-token.is-lifted { z-index: 2; box-shadow: 0 8px 18px color-mix(in srgb, var(--wl-bg) 40%, transparent); }
.wb-game-map .wh-map-marker.wb-game-token.is-away { opacity: .45; }
/* Your move while the narrator writes: there already, not yet answered. */
.wb-game-map .wh-map-marker.wb-game-token.is-pending { border-style: dashed; }
.wb-game-map .wh-map-label.wb-game-token-label.is-pending { color: var(--wl-name-ink-2); }
.wb-game-map .wh-map-label.wb-game-token-label { pointer-events: auto; cursor: grab; }
.wb-game-map .wh-map-label.wb-game-token-label:is(.is-you, .is-selected) { color: var(--wl-name-ink); font-weight: 600; }
/* The place you are in: its outline in the accent, its name in full ink (white over a picture, the page's own ink over
   a plain map, so it reads in a pale theme too). */
.wb-game-map .wl-map-thing.is-here .wb-shape-paint > * { stroke: var(--wl-accent); stroke-width: calc(var(--wb-feature-stroke-width, 2px) + 1px); }
.wb-game-map .wh-map-marker.is-here:not(.wb-game-token) { box-shadow: 0 0 0 3px var(--wl-bg), 0 0 0 4.5px var(--wl-accent); }
.wb-game-map .wh-map-label.is-here { color: var(--wl-on-picture); }
.wb-game-map .wh-map-plane:not(.wl-map-pictured) > .wh-map-label.is-here { color: var(--wl-name-ink); }
/* How long each route takes (E8), at its middle: a small number in the map's name letters, with their halo instead of
   a plate, so it reads over any picture and in a pale theme without covering the map. */
.wb-game-map .wh-map-label.wb-game-route-time { color: var(--wl-name-ink-2); font-family: var(--wl-font-mono); font-size: 11px; font-weight: 500; }
/* The walk your dragged token would make: how far and how long, over the token; why not, when it can't go. Solid,
   since it is read, and never hidden by names (z-index 3) or a layer drawn over the whole map (4, map-render.mjs). */
.wb-game-walk-label { position: absolute; z-index: 5; transform-origin: 0 0; transform: scale(calc(1 / var(--zoom, 1))) translate(-50%, calc(-100% - 22px)); max-width: 260px; overflow: hidden; padding: 3px var(--sp-2); border: 1px solid var(--wl-line); border-radius: var(--r-sm); background: var(--wl-surface); box-shadow: 0 4px 14px color-mix(in srgb, var(--wl-bg) 45%, transparent); color: var(--wl-text); font-family: var(--wl-font-mono); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.wb-game-walk-label.is-refused { border-color: color-mix(in srgb, var(--wl-danger) 55%, var(--wl-line)); color: var(--wl-text-2); font-family: var(--wl-font-ui); }
/* Over the map, glass like the app's other tools: up, where you are and in on the left; the
   buttons on the right; the places at the foot. */
.wb-game-map-levels { position: absolute; left: 8px; top: 8px; z-index: 2; display: flex; flex-direction: column; gap: 2px; padding: 2px; border: 1px solid var(--wl-glass-border); border-radius: 999px; background: var(--wl-glass); -webkit-backdrop-filter: blur(14px) saturate(115%); backdrop-filter: blur(14px) saturate(115%); }
body .wb-game-map-levels button.wt-icon-button { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: transparent; box-shadow: none; color: var(--wl-text-2); }
body .wb-game-map-levels button.wt-icon-button:hover:not(:disabled) { background: var(--wl-raised); color: var(--wl-text); }
body .wb-game-map-levels button.wt-icon-button:disabled { opacity: .35; cursor: default; }
.wb-game-map-levels .wt-glyph svg { width: 14px; height: 14px; display: block; }
.wb-game-map-controls { position: absolute; right: 8px; top: 8px; z-index: 2; display: flex; flex-direction: column; gap: 4px; }
body .wb-game-map-controls button.wt-icon-button { width: 28px; height: 28px; padding: 0; border: 1px solid var(--wl-glass-border); border-radius: 6px; background: var(--wl-glass); -webkit-backdrop-filter: blur(14px) saturate(115%); backdrop-filter: blur(14px) saturate(115%); box-shadow: none; color: var(--wl-text-2); }
body .wb-game-map-controls button.wt-icon-button:hover { color: var(--wl-text); }
.wb-game-map-controls .wt-glyph svg { width: 14px; height: 14px; display: block; }
body button.wb-game-map-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 10px 0 8px; border: 1px solid var(--wl-glass-border); border-radius: 999px; background: var(--wl-glass); -webkit-backdrop-filter: blur(14px) saturate(115%); backdrop-filter: blur(14px) saturate(115%); box-shadow: none; color: var(--wl-text-2); font-size: 12px; font-weight: 500; }
body button.wb-game-map-chip:hover, body button.wb-game-map-chip.is-open { color: var(--wl-text); }
.wb-game-map-chip > span:not(.wt-glyph) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-game-map-chip .wt-glyph { flex: none; }
.wb-game-map-chip .wt-glyph svg { width: 13px; height: 13px; display: block; }
body button.wb-game-map-where { position: absolute; left: 8px; bottom: 14px; z-index: 2; max-width: calc(100% - 56px); color: var(--wl-text); font-weight: 600; }
.wb-game-map-where > .wt-glyph:last-child { opacity: .6; }
.wb-game-map-where.is-open > .wt-glyph:last-child { transform: rotate(180deg); }
/* The foot of the map sets its height. */
/* Trays over the map: people to put on it (a drag puts them where they are let go), places to go. */
.wb-game-map-tray { position: absolute; left: 44px; top: 8px; bottom: 48px; z-index: 4; box-sizing: border-box; display: flex; flex-direction: column; width: min(264px, calc(100% - 92px)); padding: 8px; border: 1px solid var(--wl-glass-border); border-radius: 10px; background: var(--wl-glass); -webkit-backdrop-filter: blur(16px) saturate(115%); backdrop-filter: blur(16px) saturate(115%); box-shadow: var(--wl-elev-pop); animation: wl-fade var(--wl-quick) var(--wl-ease-out); }
.wb-game-map-tray.is-places { left: 8px; width: min(300px, calc(100% - 52px)); }
.wb-game-tray-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 6px 6px; font-size: 13px; }
body .wb-game-tray-head button.wb-game-tray-close { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--wl-text-3); }
body .wb-game-tray-head button.wb-game-tray-close:hover { background: var(--wl-raised); color: var(--wl-text); }
.wb-game-tray-close .wt-glyph svg { width: 14px; height: 14px; display: block; }
.wb-game-tray-rows { flex: 1; min-height: 0; margin: 0 -4px; padding: 0 4px; overflow-y: auto; scrollbar-width: thin; }
.wb-game-tray-label { display: block; padding: 8px 6px 2px; color: var(--wl-text-3); font-size: 11px; font-weight: 600; }
body button.wb-game-tray-row { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: auto; padding: 6px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--wl-text); text-align: left; cursor: pointer; }
body button.wb-game-tray-row:hover { background: var(--wl-raised); }
.wb-game-tray-row .wb-game-face { width: 28px; height: 28px; font-size: 10px; }
.wb-game-tray-place { display: flex; align-items: center; gap: 2px; }
.wb-game-tray-place.is-here small { color: var(--wl-text); }
body .wb-game-tray-place button.wb-game-tray-go { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--wl-text-2); }
body .wb-game-tray-place button.wb-game-tray-go:hover:not(:disabled) { background: var(--wl-raised); color: var(--wl-text); }
.wb-game-tray-go .wt-glyph svg { width: 15px; height: 15px; display: block; }
.wb-game-thumb { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 28px; overflow: hidden; border-radius: 6px; background: var(--wl-raised); color: var(--wl-text-3); }
.wb-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wb-game-thumb .wt-glyph svg { width: 14px; height: 14px; display: block; }
.wb-game-thumb-face { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 10px; font-weight: 600; }
.wb-game-thumb-face img { width: 100%; height: 100%; object-fit: cover; }
/* Who is here */
.wb-game-people { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 8px 12px; }
.wb-game-people-head { display: flex; align-items: baseline; gap: 6px; padding: 6px 8px 4px; color: var(--wl-text-3); font-size: 11px; font-weight: 600; line-height: 14px; }
.wb-game-people-head strong { color: var(--wl-text-2); font-family: var(--wl-font-title); font-size: var(--t-title-panel); font-weight: 400; letter-spacing: 0; text-transform: none; }
.wb-game-people-count { font-family: var(--wl-font-mono); font-variant-numeric: tabular-nums; }
.wb-game-person { position: relative; display: flex; align-items: center; }
body button.wb-game-person-open { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: auto; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; text-align: left; color: var(--wl-text); }
body button.wb-game-person-open:hover { background: var(--wl-raised); }
.wb-game-person-open .wb-game-face, .wb-game-person-open .wb-game-pin-glyph { width: 32px; height: 32px; }
.wb-game-person-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.wb-game-person-text strong { max-width: 100%; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-game-person-text small { color: var(--wl-text-3); font-size: 12px; line-height: 16px; }
.wb-game-person.is-speaking .wb-game-person-text small { color: var(--wl-text); }
.wb-game-person.is-speaking .wb-game-face:not(.is-you) { box-shadow: 0 0 0 2px var(--wl-bg), 0 0 0 3.5px var(--wl-line-strong); }
.wb-game-person-tools { position: absolute; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity var(--wl-quick) var(--wl-ease); }
.wb-game-person:hover .wb-game-person-tools, .wb-game-person-tools:focus-within { opacity: 1; }
body .wb-game-person-tools button.wt-icon-button { width: 26px; height: 26px; padding: 0; border-radius: 6px; color: var(--wl-text-3); }
body .wb-game-person-tools button.wt-icon-button:hover { color: var(--wl-text); background: var(--wl-raised); }
.wb-game-person-tools .wt-glyph svg { width: 14px; height: 14px; display: block; }
body button.wb-game-add-person { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; height: auto; margin-top: 4px; padding: 8px; border: 1px dashed var(--wl-line); border-radius: 10px; background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: 13px; }
body button.wb-game-add-person:hover { border-color: var(--wl-line-strong); color: var(--wl-text); }
.wb-game-add-person .wt-glyph { display: flex; width: 32px; justify-content: center; }
.wb-game-add-person .wt-glyph svg { width: 16px; height: 16px; }
input.wb-game-search { box-sizing: border-box; width: 100%; margin-bottom: 6px; }
.wb-game-card.is-picker .wb-game-card-body { padding: 10px; }
.wb-game-pick-group { display: flex; flex-direction: column; margin-top: 6px; }
.wb-game-pick-label { padding: 6px 8px 2px; color: var(--wl-text-3); font-size: 11px; font-weight: 600; }
/* Pin something's kinds (game-panel.mjs picker): one row of pills under the search, sliding sideways when there are many. */
.wb-game-pick-kinds { display: flex; gap: 6px; margin: 2px 0 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain; }
.wb-game-pick-kinds::-webkit-scrollbar { display: none; }
.wb-game-pick-kinds[hidden] { display: none; }
.wb-game-pick-kinds.is-more-after { mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.wb-game-pick-kinds.is-more-before { mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
.wb-game-pick-kinds.is-more-before.is-more-after { mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
body button.wb-game-pick-kind { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 28px; margin: 0; padding: 0 11px; border: 1px solid var(--wl-line); border-radius: var(--r-pill); background: transparent; box-shadow: none; color: var(--wl-text-2); font-family: var(--wl-font-ui); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease), border-color var(--wl-quick) var(--wl-ease); }
body button.wb-game-pick-kind:hover { color: var(--wl-text); background: color-mix(in srgb, var(--wl-text) 5%, transparent); }
body button.wb-game-pick-kind.is-on { color: var(--wl-text); background: color-mix(in srgb, var(--wl-text) 9%, transparent); border-color: color-mix(in srgb, var(--wl-text) 20%, transparent); }
body button.wb-game-pick-kind:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: -2px; }
.wb-game-pick-kind small { color: var(--wl-text-3); font-size: 11.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
body button.wb-game-pick-more { align-self: flex-start; height: 28px; margin: 2px 0 0 8px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
body button.wb-game-pick-more:hover { color: var(--wl-text); background: color-mix(in srgb, var(--wl-text) 5%, transparent); }
@media (pointer: coarse) { body button.wb-game-pick-kind { height: 34px; } }
.wb-game-pick .wb-game-pin-glyph { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--wl-raised); }

.wb-game.is-new { overflow-y: auto; background: var(--wl-bg); }
/* ---- A new game (D-163): a title screen. The scenario's picture fills the screen and the character you play
   stands on the right as the title, the characters as cards under it, and the other choices in one calm panel.
   Dark, like a game's title screen, in Midnight Prism's tokens (a light theme will need its own look here). ---- */
.wl-ng { --wl-ng-hero-opacity: 1; position: relative; isolation: isolate; box-sizing: border-box; min-height: 100%; display: flex; align-items: flex-end; padding: 56px clamp(24px, 5vw, 76px) clamp(28px, 6vh, 64px); color: var(--wl-text); overflow: hidden; }
.wl-ng-scene { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.8); animation: wl-fade var(--wl-scene) var(--wl-ease-scene); }
/* Another scenario or place: its picture fades in over the last, gently, once it is ready. */
.wl-ng-scene.is-next { opacity: 0; animation: none; }
.wl-ng-scene.is-next.is-in { opacity: 1; animation: wl-fade var(--wl-long) var(--wl-ease); }
.wl-ng-shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, color-mix(in srgb, var(--wl-bg) 94%, transparent) 0%, color-mix(in srgb, var(--wl-bg) 78%, transparent) 30%, color-mix(in srgb, var(--wl-bg) 0%, transparent) 60%), linear-gradient(0deg, color-mix(in srgb, var(--wl-bg) 82%, transparent) 0%, transparent 42%); }
/* The character fades into the scene on its left and lower edges. Choosing someone else, their portrait fades in
   over the last one once it is ready, drifting in a little from the right, while the last fades away. */
.wl-ng-hero { position: absolute; top: 0; right: 0; bottom: 0; z-index: -1; width: min(54%, 900px); height: 100%; object-fit: cover; object-position: center 15%; opacity: 0; -webkit-mask-image: linear-gradient(90deg, transparent 0, var(--wl-bg) 38%), linear-gradient(0deg, transparent 0, var(--wl-bg) 28%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, var(--wl-bg) 38%), linear-gradient(0deg, transparent 0, var(--wl-bg) 28%); mask-composite: intersect; pointer-events: none; }
.wl-ng-hero.is-in { opacity: var(--wl-ng-hero-opacity); animation: wl-ng-hero-in var(--wl-long) var(--wl-ease-scene); }
.wl-ng-hero.is-out { opacity: 0; transition: opacity var(--wl-page) var(--wl-ease); }
@keyframes wl-ng-hero-in { from { opacity: 0; transform: translateX(28px); } }
/* Their name and line fade up in place. */
.wl-ng-who.is-swap, .wl-ng-about.is-swap { animation: wl-ng-swap var(--wl-page) var(--wl-ease-out); }
@keyframes wl-ng-swap { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { @keyframes wl-ng-hero-in { from { opacity: 0; } } @keyframes wl-ng-swap { from { opacity: 0; } } }
.wl-ng-copy { position: relative; width: min(600px, 100%); min-width: 0; }
.wl-ng input.wl-ng-name { display: block; box-sizing: border-box; width: 100%; height: auto; margin: 0 0 0 -8px; padding: 3px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; box-shadow: none; color: color-mix(in srgb, var(--wl-text) 58%, transparent); font-family: var(--wl-font-ui, inherit); font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.wl-ng input.wl-ng-name:hover { border-color: color-mix(in srgb, var(--wl-text) 14%, transparent); }
.wl-ng input.wl-ng-name:focus { border-color: color-mix(in srgb, var(--wl-text) 30%, transparent); background: color-mix(in srgb, var(--wl-bg) 30%, transparent); color: var(--wl-text); box-shadow: none; }
.wl-ng-who { margin: 14px 0 0; color: var(--wl-text); font-family: var(--wl-font-title); font-size: var(--t-title-cover); font-weight: 400; line-height: 1.15; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
.wl-ng-about { margin: 12px 0 0; max-width: 520px; color: color-mix(in srgb, var(--wl-text) 76%, transparent); font-family: var(--wl-font-reading); font-size: 17px; line-height: 1.5; }
.wl-ng-about:empty, .wl-ng-error:empty { display: none; }
.wl-ng-thumb { display: inline-grid; place-items: center; flex: none; width: 40px; height: 28px; overflow: hidden; border-radius: 7px; background: color-mix(in srgb, var(--wl-text) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wl-text) 14%, transparent); }
.wl-ng-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; animation: wl-fade var(--wl-short) var(--wl-ease); }
.wl-ng-thumb.is-icon .wt-glyph svg { display: block; width: 15px; height: 15px; opacity: .8; }
/* The characters: rounded cards; the one you play is lit and ringed. */
.wl-ng-cast-row { position: relative; margin: 24px 0 0 -4px; }
.wl-ng-cast { display: flex; gap: 10px; padding: 4px 4px 6px; overflow-x: auto; scrollbar-width: none; }
.wl-ng-cast::-webkit-scrollbar { display: none; }
/* The arrows sit over the faded edge, at the faces' middle, only on a side that has more. */
.wl-ng button.wl-ng-cast-step { position: absolute; top: 41px; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--wl-line); border-radius: 50%; background: color-mix(in srgb, var(--wl-bg) 72%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--wl-elev-card); color: var(--wl-text); cursor: pointer; transition: opacity var(--wl-quick) var(--wl-ease), background-color var(--wl-quick) var(--wl-ease); }
.wl-ng button.wl-ng-cast-step:hover { background: color-mix(in srgb, var(--wl-bg) 88%, transparent); }
.wl-ng button.wl-ng-cast-step:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: 2px; }
.wl-ng button.wl-ng-cast-step:disabled { opacity: 0; pointer-events: none; }
.wl-ng-cast-step.is-back { left: 0; } .wl-ng-cast-step.is-next { right: 0; }
.wl-ng-cast-step .wt-glyph svg { display: block; width: 18px; height: 18px; }
.wl-ng-cast.is-more-right { -webkit-mask-image: linear-gradient(90deg, var(--wl-bg) calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, var(--wl-bg) calc(100% - 56px), transparent); }
.wl-ng-cast.is-more-left { -webkit-mask-image: linear-gradient(90deg, transparent, var(--wl-bg) 56px); mask-image: linear-gradient(90deg, transparent, var(--wl-bg) 56px); }
.wl-ng-cast.is-more-left.is-more-right { -webkit-mask-image: linear-gradient(90deg, transparent, var(--wl-bg) 56px, var(--wl-bg) calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, var(--wl-bg) 56px, var(--wl-bg) calc(100% - 56px), transparent); }
.wl-ng button.wl-ng-card { flex: none; display: flex; flex-direction: column; gap: 7px; width: 84px; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: color-mix(in srgb, var(--wl-text) 62%, transparent); font: inherit; font-size: 12.5px; cursor: pointer; }
.wl-ng button.wl-ng-card[hidden] { display: none; }
.wl-ng button.wl-ng-card:hover { background: transparent; color: var(--wl-text); }
.wl-ng-card-face { display: grid; place-items: center; width: 84px; height: 106px; overflow: hidden; border-radius: 12px; background: color-mix(in srgb, var(--wl-text) 8%, transparent); color: color-mix(in srgb, var(--wl-text) 70%, transparent); font-size: 18px; font-weight: 600; outline: 1px solid color-mix(in srgb, var(--wl-text) 10%, transparent); outline-offset: -1px; transition: outline-color var(--wl-short) var(--wl-ease), outline-offset var(--wl-short) var(--wl-ease-out), outline-width var(--wl-short) var(--wl-ease-out); }
.wl-ng-card-face img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 15%; filter: saturate(.75) brightness(.78); transition: filter var(--wl-short) ease; }
.wl-ng-card:hover .wl-ng-card-face img, .wl-ng-card[aria-checked="true"] .wl-ng-card-face img { filter: none; }
.wl-ng-card[aria-checked="true"] .wl-ng-card-face { outline: 2px solid var(--wl-selection); outline-offset: 2px; }
.wl-ng button.wl-ng-card[aria-checked="true"] { color: var(--wl-text); font-weight: 600; }
.wl-ng .wl-ng-cast button.wl-ng-card:focus-visible { outline: none; }
.wl-ng-card:focus-visible .wl-ng-card-face { outline: 2px solid var(--wl-selection); outline-offset: 2px; }
.wl-ng-card-name { overflow: hidden; padding-left: 2px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
/* The choices: one glass panel, a row each with its label, picture, name and line. The focus rings here outrank
   the app's own (atlas-system.css), so they stay inside the panel and its lists. */
.wl-ng-choices { box-sizing: border-box; width: min(560px, 100%); margin-top: 22px; overflow: hidden; border: 1px solid var(--wl-glass-line); border-radius: var(--r-xl); background: color-mix(in srgb, var(--wl-bg) 58%, transparent); -webkit-backdrop-filter: blur(var(--wl-glass-blur)); backdrop-filter: blur(var(--wl-glass-blur)); }
.wl-ng button.wl-ng-row { display: flex; align-items: center; justify-content: flex-start; gap: 14px; box-sizing: border-box; width: 100%; height: auto; min-height: 64px; padding: 10px 16px; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--wl-text); font: inherit; text-align: left; white-space: normal; cursor: pointer; transition: background-color var(--wl-quick) ease; }
.wl-ng button.wl-ng-row + .wl-ng-row { border-top: 1px solid color-mix(in srgb, var(--wl-text) 8%, transparent); }
.wl-ng button.wl-ng-row:hover, .wl-ng button.wl-ng-row[aria-expanded="true"] { background: color-mix(in srgb, var(--wl-text) 5%, transparent); }
.wl-ng .wl-ng-choices button.wl-ng-row:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: -2px; }
.wl-ng-row-label { flex: none; width: 92px; color: color-mix(in srgb, var(--wl-text) 52%, transparent); font-size: 12.5px; }
.wl-ng-row-art { display: contents; }
.wl-ng-row .wl-ng-thumb { width: 52px; height: 38px; border-radius: 8px; }
.wl-ng-row .wl-ng-thumb.is-icon .wt-glyph svg { width: 18px; height: 18px; }
.wl-ng-row-words { flex: 1; display: grid; gap: 2px; min-width: 0; }
.wl-ng-row-words b { overflow: hidden; font-size: 14.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.wl-ng-row-words small { overflow: hidden; color: color-mix(in srgb, var(--wl-text) 55%, transparent); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.wl-ng-row-words small:empty { display: none; }
.wl-ng-row > .wt-glyph svg { display: block; width: 15px; height: 15px; opacity: .5; }
/* A row whose choice changed: its picture and words fade in, barely moving; so does the game's name above. */
.wl-ng-row .wl-ng-thumb.is-swap, .wl-ng-row-words.is-swap, .wl-ng input.wl-ng-name.is-swap { animation: wl-ng-soft var(--wl-page) var(--wl-ease-out); }
@keyframes wl-ng-soft { from { opacity: 0; transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { @keyframes wl-ng-soft { from { opacity: 0; } } }
.wl-ng-row.is-missing .wl-ng-row-words b { color: var(--wl-warning); }
.wl-ng-go { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.wl-ng button.wl-ng-play { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 28px; border: 0; border-radius: var(--r-pill); background: var(--wl-accent); color: var(--wl-on-accent); box-shadow: var(--wl-elev-card); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color var(--wl-quick) ease; }
.wl-ng button.wl-ng-play:hover { background: var(--wl-highlight); }
.wl-ng button.wl-ng-play:disabled { opacity: .45; cursor: default; }
.wl-ng-play > .wt-glyph svg { display: block; width: 15px; height: 15px; }
.wl-ng-error { margin: 12px 0 0; color: var(--wl-danger); font-size: 13px; line-height: 1.5; }
.wl-ng-empty { margin: 22px 0 8px; color: color-mix(in srgb, var(--wl-text) 72%, transparent); }
.wl-ng button.wl-ng-link { display: inline-flex; align-items: center; gap: 6px; height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--wl-text); font: inherit; font-size: 13.5px; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--wl-text) 35%, transparent); text-underline-offset: 4px; cursor: pointer; }
.wl-ng button.wl-ng-link:hover { background: transparent; text-decoration-color: var(--wl-text); }
.wl-ng-link > .wt-glyph svg { display: block; width: 14px; height: 14px; }
/* A row's list: glass over the screen, as wide as the row, with each scenario's or place's picture. */
.wl-ng-pop { position: absolute; z-index: 10; box-sizing: border-box; width: min(560px, calc(100% - 24px)); max-height: min(460px, 70vh); overflow-y: auto; padding: 8px; border: 1px solid var(--wl-glass-line); border-radius: var(--r-lg); background: color-mix(in srgb, var(--wl-surface) 92%, transparent); -webkit-backdrop-filter: blur(var(--wl-glass-blur)) saturate(115%); backdrop-filter: blur(var(--wl-glass-blur)) saturate(115%); box-shadow: var(--wl-elev-pop); color: var(--wl-text); scrollbar-width: thin; animation: wl-fade var(--wl-quick) ease-out; }
.wl-ng-options { display: flex; flex-direction: column; gap: 2px; }
.wl-ng-options.is-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 4px; }
.wl-ng button.wl-ng-option { display: flex; align-items: center; justify-content: flex-start; gap: 12px; box-sizing: border-box; width: 100%; height: auto; min-height: 46px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wl-ng button.wl-ng-option:hover { background: color-mix(in srgb, var(--wl-text) 6%, transparent); }
.wl-ng button.wl-ng-option.is-on { background: var(--wl-selection-soft); }
.wl-ng .wl-ng-pop button.wl-ng-option:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: -2px; }
.wl-ng-option .wl-ng-thumb { width: 56px; height: 38px; border-radius: 8px; }
.wl-ng-options.is-grid .wl-ng-thumb { width: 44px; height: 30px; border-radius: 7px; }
.wl-ng-option-words { display: grid; gap: 2px; min-width: 0; }
.wl-ng-option-words b { overflow: hidden; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.wl-ng-options.is-grid .wl-ng-option-words b { font-weight: 500; }
.wl-ng-option-words small { display: -webkit-box; overflow: hidden; white-space: normal; color: color-mix(in srgb, var(--wl-text) 58%, transparent); font-size: 12px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wl-ng-pop > .wl-ng-link { margin: 10px 8px 4px; }
/* Tablet: the character stands wider and quieter behind the words. */
@media (max-width: 1000px) {
  .wl-ng { --wl-ng-hero-opacity: .7; }
  .wl-ng-hero { width: 72%; }
  .wl-ng-shade { background: linear-gradient(90deg, color-mix(in srgb, var(--wl-bg) 94%, transparent) 0%, color-mix(in srgb, var(--wl-bg) 70%, transparent) 45%, color-mix(in srgb, var(--wl-bg) 20%, transparent) 80%), linear-gradient(0deg, color-mix(in srgb, var(--wl-bg) 86%, transparent) 0%, transparent 50%); }
}
/* Phone: the character over the top of the screen, the words and choices below, Play full width. */
@media (max-width: 640px) {
  .wl-ng { padding: 160px 16px 24px; }
  .wl-ng { --wl-ng-hero-opacity: .6; }
  .wl-ng-hero { width: 100%; height: 62%; bottom: auto; -webkit-mask-image: linear-gradient(0deg, transparent 0, var(--wl-bg) 45%); mask-image: linear-gradient(0deg, transparent 0, var(--wl-bg) 45%); }
  .wl-ng-shade { background: linear-gradient(0deg, color-mix(in srgb, var(--wl-bg) 96%, transparent) 0%, color-mix(in srgb, var(--wl-bg) 82%, transparent) 45%, color-mix(in srgb, var(--wl-bg) 30%, transparent) 75%); }
  .wl-ng-about { font-size: 15px; }
  .wl-ng button.wl-ng-row { gap: 10px; min-height: 58px; padding: 9px 12px; }
  .wl-ng-row-label { width: 68px; font-size: 12px; }
  .wl-ng-row .wl-ng-thumb { width: 44px; height: 32px; }
  .wl-ng button.wl-ng-card { width: 70px; }
  .wl-ng-card-face { width: 70px; height: 88px; }
  .wl-ng button.wl-ng-cast-step { top: 31px; }
  .wl-ng button.wl-ng-play { flex: 1; }
  .wl-ng-options.is-grid { grid-template-columns: 1fr; }
}

/* Tablets: the panel lies over the story, beside the rail; the start screen narrows. */
@media (max-width: 1000px) {
  .wb-game-panel { position: absolute; top: 0; bottom: 0; right: 56px; z-index: 4; width: min(var(--panel, 380px), calc(100% - 96px)); max-width: none; box-shadow: -10px 0 30px color-mix(in srgb, var(--wl-bg) 22%, transparent); }
  /* The map on the left lies over the story too, from the left edge. */
  .wb-game-left { position: absolute; top: 0; bottom: 0; left: 0; z-index: 4; width: min(var(--left, 440px), calc(100% - 96px)); max-width: none; box-shadow: 10px 0 30px color-mix(in srgb, var(--wl-bg) 22%, transparent); }
  .wb-game-left.is-map-large { width: calc(100% - 96px); }
  .wb-game.has-left-map .wb-game-panel { max-width: none; }
  .wb-game-stage-figure { width: min(60%, 520px); right: 0; }
  .wb-game-stage-figure.is-left { right: auto; left: 0; }
  .wb-game-stage-figure:has(img.is-cutout) { width: min(66%, 560px); }
}
/* Phones: the rail folds into the top bar's button; the panel opens as a sheet. */
@media (max-width: 640px) {
  .wb-game-map-tray, .wb-game-map-tray.is-places { left: 8px; right: 8px; width: auto; }
  .wb-game-rail { display: none; }
  .wb-game.has-left-map .wb-game-left { display: none; }
  .wb-game-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 78%; border-left: 0; border-top: 1px solid var(--wl-line); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -10px 30px color-mix(in srgb, var(--wl-bg) 28%, transparent); }
  .wb-game-stack { padding: 10px; }
  .wb-game-story { padding: 28px 16px 18px; gap: 18px; }
  .wb-game-composer-wrap { padding: 0 10px 10px; }
  .wb-game-turn.is-player { max-width: 92%; }
  .wb-game-turn.is-live::before { display: none; }
  .wb-game-line { padding: 10px 12px 12px; }
  .wb-game-line-text { padding-left: 0; }
  body .wb-game-composer button.wb-game-model { max-width: 128px; }
  .wb-game-model-bar, .wb-game-model-image { display: none; }
  body .wb-game-composer button.wb-game-tool { width: 30px; height: 30px; }
  .wb-game.is-vn .wb-game-stage { padding: 12px 10px 10px; }
  .wb-game-stage-figure { width: 86%; right: -6%; top: 0; opacity: .85; }
  .wb-game-stage-figure.is-left { right: auto; left: -6%; }
  .wb-game-stage-figure.is-quiet { opacity: .3; }
  .wb-game-stage-figure:has(img.is-cutout) { width: 92%; opacity: 1; }
  .wb-game-vn { padding: 12px 14px 8px; }
  .wb-game-vn-text { font-size: 16px; line-height: 26px; max-height: 34vh; }
  .wb-game-vn-face { width: 32px; height: 32px; }
  .wb-game-vn-who { font-size: 15px; }
  /* The map pinned to the top (D-353, game-panel.mjs drawTop): under the rail's strip, over the story, as wide as the
     message box, its card as the sheet's. Its bottom edge, the line to the story, drags it taller or shorter (a quiet
     mark in its middle); folded, its head alone shows, with the place's name (and a fight's turn order, which lives
     on the map). Its Characters stay in the full view. */
  .wb-game.has-left-map.is-map-top .wb-game-left.is-top { display: flex; position: relative; inset: auto; z-index: 2; flex: none; width: auto; max-width: none; height: var(--wb-top-h, 33%); min-height: 0; overflow: hidden; border: 0; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .wb-game-left.is-top > .wb-game-stack { flex: 1 1 0; padding: 6px 10px 0; overflow: hidden; }
  .wb-game-left.is-top .wb-game-card.is-map, .wb-game-left.is-top .wb-game-card.is-map > .wb-game-card-body { flex: 1 1 0; min-height: 0; }
  .wb-game-left.is-top .wb-game-map, .wb-game-left.is-top .wb-game-map.has-shape { flex: 1 1 0; height: auto; min-height: 0; max-height: none; aspect-ratio: auto; border-bottom: 0; }
  .wb-game-left.is-top .wb-game-people { display: none; }
  .wb-game-left.is-top .wb-game-card-head.is-folding { cursor: pointer; }
  /* Folding up while open, opening down while folded; the trail's own arrow beside it points down to its list. */
  .wb-game-left.is-top .wb-game-card.is-folded .wb-game-fold .wt-glyph { transform: rotate(180deg); }
  /* No shade band where the story meets it: the story's own edge fades (its mask), over the scene as below. */
  .wb-game.has-left-map.is-map-top:not(.is-new) .wb-game-column::after { display: none; }
  .wb-game.has-left-map.is-map-top .wb-game-left.is-top.is-folded { height: auto; }
  .wb-game-left.is-top.is-folded > .wb-game-stack { flex: none; padding-bottom: 6px; }
  .wb-game-left.is-top.is-folded .wb-game-card.is-map, .wb-game-left.is-top.is-folded .wb-game-card.is-map > .wb-game-card-body { flex: none; }
  .wb-game-left.is-top.is-folded .wb-game-card-body > :not(.wb-game-map-fight) { display: none; }
  .wb-game-top-edge { flex: none; position: relative; height: 18px; touch-action: none; cursor: row-resize; }
  .wb-game-top-edge::after { content: ""; position: absolute; left: 50%; top: 7px; width: 36px; height: 4px; margin-left: -18px; border-radius: var(--r-pill); background: var(--wl-line-strong); transition: background-color var(--wl-quick) var(--wl-ease); }
  .wb-game-top-edge:hover::after, .wb-game-left.is-sizing .wb-game-top-edge::after { background: var(--wl-text-3); }
  .wb-game-left.is-top.is-folded .wb-game-top-edge { display: none; }
  .wb-game.is-map-top .wb-game-left.is-top.is-opening { animation: wb-game-top-in var(--wl-long) var(--wl-ease-out); }
  body.wb-game-top-sizing, body.wb-game-top-sizing * { cursor: row-resize !important; -webkit-user-select: none; user-select: none; }
  /* Phone play made roomier (D-355). In a fight the turn order stands in the pinned map's head in place of the clock
     (game-fight.mjs paintBar), so it takes no row of the map and stays when the map folds; the map's mark gives it
     room, and the place's name keeps enough to read. */
  .wb-game-map-fight-head { display: none; }
  .wb-game-left.is-top .wb-game-map-fight-head:has(> .wl-fight-bar) { display: flex; flex: 0 1 auto; min-width: 0; height: 100%; }
  .wb-game-left.is-top .wb-game-card-head:has(> .wb-game-map-fight-head > .wl-fight-bar) :is(.wb-game-map-sky, .wb-game-pin-glyph) { display: none; }
  .wb-game-left.is-top .wb-game-card-head:has(> .wb-game-map-fight-head > .wl-fight-bar) > .wb-game-card-title { flex: 1 1 auto; min-width: 64px; }
  /* Grown while an area is aimed (game-panel.mjs sizeTop): already as tall as it goes, so its edge rests. */
  .wb-game-left.is-top.is-growing .wb-game-top-edge { cursor: default; }
  .wb-game-left.is-top.is-growing .wb-game-top-edge::after { background: var(--wl-line); }
  /* On a touch screen two fingers zoom the pinned map and the place's name in its head picks maps, so its zoom buttons
     and levels go; Fit, Move and Add sit in one row along its bottom edge, Places as its mark at the row's start. */
  @media (pointer: coarse) {
    .wb-game-left.is-top .wb-game-map > .wb-game-map-levels, .wb-game-left.is-top .wb-game-map-controls > .wb-game-map-zoom { display: none; }
    body .wb-game-left.is-top .wb-game-map-canvas > .wb-game-map-controls { --wb-map-button: 40px; top: auto; right: 8px; bottom: 8px; display: flex; flex-direction: row-reverse; gap: 4px; max-height: none; direction: ltr; }
    body .wb-game-left.is-top .wb-game-map-controls button.wt-icon-button { width: 40px; height: 40px; border-radius: var(--r-sm); }
    body .wb-game-left.is-top .wb-game-map > button.wb-game-map-where { left: 8px; bottom: 8px; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: var(--r-sm); }
    .wb-game-left.is-top .wb-game-map-where .wt-glyph:first-child svg { width: 16px; height: 16px; }
    .wb-game-left.is-top .wb-game-map-where > :not(.wt-glyph:first-child) { position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
  }
  /* While an area is aimed on a phone's map its buttons step aside for the one line along its bottom edge (area-aim.mjs). */
  body .wb-game-map > :is(.wb-game-map-levels, .wb-game-map-where), body .wb-game-map-canvas > .wb-game-map-controls { transition: opacity var(--wl-short) var(--wl-ease); }
  body .wb-game-map:has(> .wb-game-map-canvas.is-aiming-area) > :is(.wb-game-map-levels, .wb-game-map-where),
  body .wb-game-map:has(> .wb-game-map-canvas.is-aiming-area) .wb-game-map-canvas.is-aiming-area > .wb-game-map-controls { opacity: 0; pointer-events: none; transition-duration: var(--wl-short-out); }
}
@keyframes wb-game-top-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { @keyframes wb-game-top-in { from { opacity: 0; } } }
@media (prefers-reduced-transparency: reduce) {
  .wb-game.has-backdrop .wb-game-rail, .wb-game.has-backdrop .wb-game-panel, .wb-game.has-backdrop .wb-game-composer, .wb-game-vn, body button.wb-game-map-chip, .wb-game-map-tray, .wb-game-map-levels, body .wb-game-map-controls button.wt-icon-button { background: var(--wl-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* Campaign controls and typed turn rendering. */
.wb-game-dialog-field { display:grid; gap:6px; margin:14px 0; font-size:13px; }
.wb-game-dialog-field input,.wb-game-dialog-field textarea { width:100%; box-sizing:border-box; }
.wb-modal:has(.wb-game-dialog-field),.wb-modal:has(.wb-game-review-row) { max-height:85vh; overflow:auto; width:min(640px,calc(100% - 32px)); }
.wb-game-dialog-error { color:var(--wl-danger); margin-top:12px; }
.wb-game-review-row { display:flex; align-items:center; gap:10px; padding:12px 0; }
.wb-game-event-list { color:var(--wl-text-2); font-size:12px; margin:12px 0 2px; }
.wb-game-event-list summary { cursor:pointer; }
.wb-game-event-list > div { padding:5px 0 0 10px; }
.wb-game-line-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.wb-game-prose { overflow-wrap:anywhere; }
.wb-game-earlier { display:block; margin:8px auto 24px; }
.wb-game-turn.is-interaction{padding:0;margin:0}
/* The context inspector uses real assembled inputs, before or after a turn. */
.wb-gm-context h3 { margin:24px 0 12px; font-size:15px; }
.wb-gm-instruction { margin:10px 0; padding:12px 14px; border:1px solid var(--wl-line); border-radius:10px; }
.wb-gm-instruction > summary { display:flex; flex-wrap:wrap; gap:6px 12px; cursor:pointer; font-size:13px; }
.wb-gm-instruction > summary > span { color:var(--wl-text-2); font-size:11px; }
.wb-gm-instruction.is-active { border-left:3px solid var(--wl-selection); }
.wb-gm-instruction.is-empty,.wb-gm-instruction.is-missing { border-left:3px solid var(--wl-warning); }
.wb-gm-instruction-text { max-height:400px; margin:12px 0 0; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font:12px/1.7 var(--wl-font-mono); }
.wb-gm-context-empty { padding:12px 14px; background:var(--wl-surface); border-radius:10px; font-size:13px; line-height:1.7; }
/* Story memory shares the existing reference panel; no extra permanent rail. */
.wb-game-memory,.wb-game-context-control{border:1px solid var(--wl-line);border-radius:8px;background:transparent;color:var(--wl-text-2);padding:5px 10px;font-size:12px;white-space:nowrap;cursor:pointer}
/* Story memory's own look is in campaign-memory.css. */
.wl-memory-source-focus{outline:2px solid var(--wl-accent);outline-offset:5px;border-radius:5px}
.wb-game-story .wb-game-line{padding:14px 18px;background:color-mix(in srgb,var(--wl-text) 4%,var(--wl-bg));border:1px solid var(--wl-line);border-radius:12px;margin:20px 0}
