/* One transcript language for both sides; scene glass only when an image is shown. */
body.wb-shell .wb-game-story { max-width:860px; gap:20px; padding:32px 30px 38px;-webkit-user-select:text;user-select:text;cursor:text; }
.wb-game-story :is(button,summary,.wb-game-turn-tools){-webkit-user-select:none;user-select:none;cursor:pointer}
.wb-game-story :is(.wb-game-face,.wb-game-turn-face){-webkit-user-select:none;user-select:none}
/* One dark for the game: the story's cards, the message box and the map's card share the card colour, with or
   without a place's picture behind them. */
body.wb-shell .wb-game-turn:is(.is-player,.is-gm) { box-sizing:border-box; border:1px solid var(--wg-line,var(--wl-line)); border-radius:var(--r-xl); background:var(--wg-card,var(--wl-bg)); box-shadow:var(--wl-elev-card); }
body.wb-shell .wb-game-turn.is-player { padding:18px 22px; gap:12px; border-start-start-radius:6px; }
body.wb-shell .wb-game-turn.is-gm { padding:22px 24px; border-start-start-radius:6px; }
body.wb-shell .wb-game-turn.is-player .wb-game-bubble { background:transparent; border:0; padding:0; }
body.wb-shell .wb-game-turn.is-player .wb-game-turn-face { width:30px;height:30px; }
body.wb-shell .wb-game-turn-who { margin:0 0 5px; }
body.wb-shell .wb-game-player-text { color:var(--wl-text); }
body.wb-shell .wb-game-player-text .wl-act { font-style:italic; color:var(--wl-text-2); }
body.wb-shell .wl-narrative-content .wb-game-line { background:color-mix(in srgb,var(--wl-text) 4%,transparent); border:1px solid var(--wg-line); border-radius:12px; padding:12px 14px 12px 56px; }
body.wb-shell .wl-narrative-content .wb-game-line-face { inset-inline-start:12px;top:13px; }
/* The scene behind the story is blurred and dimmed: it sets the mood without competing with the words. */
body.wb-shell .wb-game.has-backdrop:not(.is-vn) .wb-game-backdrop img { opacity:1;inset:-16px;width:calc(100% + 32px);height:calc(100% + 32px);filter:blur(8px) saturate(1.05); }
body.wb-shell .wb-game.has-backdrop:not(.is-vn) .wb-game-backdrop::after { background:color-mix(in srgb,var(--wl-bg) 72%,transparent); }
body.wb-shell .wb-game.has-backdrop:not(.is-vn) .wb-game-column::before { background:none; }
/* Over a scene picture the cards stay solid: the words never sit on a blur, and scrolling past many cards costs no
   blurring. */
body.wb-shell .wb-game.has-backdrop .wb-game-turn:is(.is-player,.is-gm) { background:var(--wg-card,color-mix(in srgb,var(--wl-bg) 94%,transparent));border-color:var(--wg-line,color-mix(in srgb,var(--wl-text) 13%,transparent));box-shadow:var(--wl-elev-card); }
body.wb-shell .wb-game-turn>.wb-game-turn-tools { background:var(--wl-surface);backdrop-filter:none;-webkit-backdrop-filter:none; }
body.wb-shell .wb-game.has-backdrop .wb-game-turn>.wb-game-turn-tools { background:var(--wl-surface); }
/* Your own turns are the same deep blue as the narrator's, told apart by your face and name; the newest answer has a
   firmer edge, so you can see where the story is. */
body.wb-shell .wb-game-turn.is-gm.is-latest { border-color:var(--wl-line-strong,var(--wl-line-strong)); }
body.wb-shell .wb-game.has-backdrop .wb-game-turn.is-gm.is-latest { border-color:color-mix(in srgb,var(--wl-text) 24%,transparent); }
/* Answers out of view aren't laid out until they're scrolled to. */
body.wb-shell .wb-game-story > .wb-game-turn:not(.is-latest, .is-live) { content-visibility:auto; contain-intrinsic-size:auto 320px; }
/* That clips what hangs over an answer's edge (its Copy and Undo), so one in use is laid out as it is. */
body.wb-shell .wb-game-story > .wb-game-turn:not(.is-latest, .is-live):is(:hover, :focus-within, .is-menu-open) { content-visibility:visible; }
.wl-game-actions.is-map-actions { align-self:stretch;border:1px solid var(--wl-line);border-radius:10px;padding:0 12px;color:var(--wl-text-2);font-size:12px;background:var(--wl-bg); }
.wl-game-actions.is-map-actions>summary { display:flex;align-items:center;gap:8px;min-height:34px;list-style:none;cursor:pointer; }
.wl-game-actions.is-map-actions>summary::-webkit-details-marker { display:none; }
.wl-game-actions.is-map-actions>summary::after { content:'›';margin-inline-start:auto;transform:rotate(90deg); }
.wl-game-actions.is-map-actions[open]>summary::after { transform:rotate(-90deg); }
.wl-game-actions.is-map-actions>summary svg { width:14px;height:14px; }
.wl-game-actions.is-map-actions>summary small { font-size:10px;padding:1px 6px;border-radius:20px;background:var(--wl-raised); }
.wl-game-action-rows { display:grid;gap:14px;padding:4px 0 12px; }
.wl-game-action-rows .wb-game-turn { padding:3px 4px; }
.wl-game-action-rows .wb-game-turn>.wb-game-turn-tools { bottom:-6px; }
.wl-scene-edit-count { color:var(--wl-text-3);font-size:11px;margin-top:-12px;padding-inline:4px; }
@media(max-width:640px) {
 body.wb-shell .wb-game-story { padding:24px 12px 32px;gap:18px; }
 body.wb-shell .wb-game-turn:is(.is-player,.is-gm) { padding:16px;border-radius:14px; }
 body.wb-shell .wb-game-turn.is-player { grid-template-columns:28px minmax(0,1fr);gap:10px; }
}
@media(prefers-reduced-transparency:reduce) {
 body.wb-shell .wb-game.has-backdrop .wb-game-turn:is(.is-player,.is-gm),body.wb-shell .wb-game.has-backdrop .wb-game-turn>.wb-game-turn-tools { background:var(--wl-surface);backdrop-filter:none;-webkit-backdrop-filter:none; }
}
.wl-scene-receipt summary { display:flex;gap:8px;align-items:center;cursor:pointer; }
.wl-scene-receipt summary small { color:var(--wl-text-3);font-size:11px; }
.wl-scene-receipt p { margin:6px 0;font-size:12px;color:var(--wl-text-2); }
.wb-game-steer-label { display:block;margin:18px 0 7px;font-size:13px;font-weight:600; }
.wb-game-steer-input { display:block;box-sizing:border-box;width:100%;min-height:118px;resize:vertical;padding:12px;border:1px solid var(--wl-line);border-radius:10px;background:var(--wl-bg);color:var(--wl-text);font:inherit;line-height:1.6; }
.wb-modal:has(.wb-game-steer-input) { width:min(560px,calc(100% - 32px)); }
.wb-game-steer-input:focus { outline:2px solid var(--wl-accent);outline-offset:2px; }
.wb-game-rewrite-error { display:flex;align-items:start;gap:10px;max-width:760px;margin:0 auto 8px;padding:10px 14px;border:1px solid var(--wl-line);border-radius:10px;background:var(--wl-surface);color:var(--wl-text-2);font-size:12px;line-height:1.6; }
.wb-game-rewrite-error>span { flex:1; }
.wb-modal:has(.wb-game-edit-input) { width:min(680px,calc(100% - 32px));max-height:85vh;overflow-y:auto; }
.wb-game-edit-input { min-height:100px; }
.wb-game-map-pending { position:absolute;z-index:6;top:10px;left:50%;transform:translateX(-50%);max-width:calc(100% - 28px);box-sizing:border-box;margin:0;padding:7px 11px;border:1px solid var(--wl-line);border-radius:16px;background:var(--wl-surface);color:var(--wl-text-2);font-size:11px;line-height:1.4;text-align:center;pointer-events:none;box-shadow:0 3px 12px color-mix(in srgb, var(--wl-bg) 12%, transparent); }
.wb-game-map-pending[hidden] { display:none; }
.wl-message-edited { display:block;color:var(--wl-text-3);font-size:10px;line-height:1.4;margin-top:8px; }
.wb-game-turn.is-player>.wl-message-edited { grid-column:2; }
/* Controls change colour on Quick; a focus ring is there at once, never animated. */
.wb-game :is(button,summary),.wb-game-steer-input { transition:background-color var(--wl-quick) var(--wl-ease),border-color var(--wl-quick) var(--wl-ease),color var(--wl-quick) var(--wl-ease); }
.wl-game-actions.is-map-actions>summary::after { transition:transform var(--wl-quick) var(--wl-ease); }
.wb-game .wb-game-turn-tools { transition:opacity var(--wl-quick) var(--wl-ease); }
.wb-modal:has(.wb-game-steer-input) { animation:wl-message-editor-in var(--wl-short) var(--wl-ease-out); }
@keyframes wl-message-editor-in { from { opacity:0;transform:translateY(5px); } to { opacity:1;transform:translateY(0); } }
@media(prefers-reduced-motion:reduce) { @keyframes wl-message-editor-in { from { opacity:0; } to { opacity:1; } } }
/* Send lightens on hover and presses down a pixel; a link's underline firms on hover. */
body.wb-shell .wb-game-composer button.wb-game-send { transition:background-color var(--wl-quick) var(--wl-ease),transform var(--wl-quick) var(--wl-ease); }
body.wb-shell .wb-game-composer button.wb-game-send:hover:not(:disabled) { background:color-mix(in srgb,var(--wl-accent) 86%,var(--wl-text)); }
body.wb-shell .wb-game-composer button.wb-game-send.is-stop:hover { background:color-mix(in srgb,var(--wl-raised) 80%,var(--wl-text)); }
body.wb-shell .wb-game-composer button.wb-game-send:active:not(:disabled) { transform:translateY(1px); }
body .wb-game-link { text-decoration-color:var(--wl-line-strong); transition:text-decoration-color var(--wl-quick) var(--wl-ease),color var(--wl-quick) var(--wl-ease); }
body .wb-game-link:hover { text-decoration-color:currentColor; }
body .wb-game-link:active { color:var(--wl-text-2); }
/* On a touch screen the undo line's Undo (after a delete or an edit) takes a 44 px tap, its look unchanged. */
@media (pointer:coarse) { body .wl-turn-undo .wb-game-link { position:relative; } body .wl-turn-undo .wb-game-link::after { content:''; position:absolute; inset:-13px -10px; } }

/* ---- The panel slides in ---- */
@keyframes wb-game-panel-in { from { opacity:0; transform:translateX(18px); } }
@keyframes wb-game-sheet-in { from { opacity:0; transform:translateY(24px); } }
@keyframes wb-game-panel-title-in { from { opacity:0; transform:translateX(10px); } }
.wb-game.has-panel .wb-game-panel { animation:wb-game-panel-in var(--wl-long) var(--wl-ease-out); }
.wb-game-panel.is-opening .wb-game-card-title { animation:wb-game-panel-title-in var(--wl-long) var(--wl-ease-out) var(--wl-quick) both; }
@media (max-width:820px) { .wb-game.has-panel .wb-game-panel { animation-name:wb-game-sheet-in; } }
@media (prefers-reduced-motion:reduce) { @keyframes wb-game-panel-in { from { opacity:0; } } @keyframes wb-game-sheet-in { from { opacity:0; } } @keyframes wb-game-panel-title-in { from { opacity:0; } } }

/* ---- Doors in a game, drawn by the editor's rules (map-render.mjs drawWay): over a picture two ticks mark the doorway
   and the bar shows when pointed at or chosen; on a plain map the bar always shows. ---- */
.wb-game-map .wb-map-door .wb-way-hit { cursor:pointer; }
.wb-game-map .wl-map-pictured .wb-map-door:not(.is-lit, .is-selected) :is(.wb-door-bar, .wb-door-mark) { opacity:0; }
.wb-game-map .wh-map-plane:not(.wl-map-pictured) .wb-map-door .wb-door-tick, .wb-game-map .wb-map-door:is(.is-lit, .is-selected) .wb-door-tick { opacity:0; }
.wb-game-map .wb-map-door:is(.is-lit, .is-selected) .wb-door-bar { stroke:var(--wl-accent); }

/* ---- The card of what you can do there, under what it's about; and the name on hover. ---- */
.wb-game-map-card { position:absolute; z-index:5; box-sizing:border-box; width:min(264px, calc(100% - 16px)); padding:10px 10px 8px; border:1px solid var(--wl-glass-border); border-radius:14px; background:var(--wl-glass); -webkit-backdrop-filter:blur(18px) saturate(120%); backdrop-filter:blur(18px) saturate(120%); box-shadow:var(--wl-elev-pop); animation:wb-game-card-in var(--wl-short) var(--wl-ease-out) both; }
.wb-game-map-card[hidden] { display:none; }
.wb-game-map-card-head { display:flex; align-items:flex-start; gap:8px; padding:0 0 0 4px; }
.wb-game-map-card-title { min-width:0; flex:1; display:flex; flex-direction:column; gap:1px; }
.wb-game-map-card-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; font-weight:600; line-height:20px; color:var(--wl-text); }
.wb-game-map-card-title small { color:var(--wl-text-2); font-size:11.5px; line-height:16px; }
body .wb-game-map-card button.wb-game-map-card-close { flex:none; width:24px; height:24px; padding:0; border:0; border-radius:999px; background:transparent; box-shadow:none; color:var(--wl-text-3); }
body .wb-game-map-card button.wb-game-map-card-close:hover { background:var(--wl-raised); color:var(--wl-text); }
.wb-game-map-card-close .wt-glyph svg { width:13px; height:13px; display:block; }
.wb-game-map-card-text { margin:6px 4px 0; max-height:7.5em; overflow:auto; color:var(--wl-text-2); font-size:12.5px; line-height:1.5; white-space:pre-wrap; }
.wb-game-map-card-actions { display:flex; flex-direction:column; gap:2px; margin-top:8px; }
body .wb-game-map-card button.wb-game-map-card-action { display:flex; align-items:center; gap:9px; width:100%; height:auto; min-height:32px; padding:6px 10px; border:0; border-radius:9px; background:transparent; box-shadow:none; color:var(--wl-text); font-size:13px; text-align:left; cursor:pointer; }
body .wb-game-map-card button.wb-game-map-card-action:hover { background:var(--wl-raised); }
body .wb-game-map-card button.wb-game-map-card-action.is-primary { background:color-mix(in srgb, var(--wl-accent) 14%, transparent); font-weight:600; }
body .wb-game-map-card button.wb-game-map-card-action.is-primary:hover { background:color-mix(in srgb, var(--wl-accent) 22%, transparent); }
.wb-game-map-card-action .wt-glyph { flex:none; color:var(--wl-text-2); }
.wb-game-map-card-action.is-primary .wt-glyph { color:var(--wl-accent); }
.wb-game-map-card-action .wt-glyph svg { width:15px; height:15px; display:block; }
.wb-game-map-card-action span:not(.wt-glyph) { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-game-map-tag { position:absolute; z-index:4; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:3px 10px; border:1px solid var(--wl-glass-border); border-radius:999px; background:var(--wl-glass); box-shadow:0 4px 12px color-mix(in srgb, var(--wl-bg) 18%, transparent); color:var(--wl-text); font-size:12px; font-weight:500; line-height:18px; pointer-events:none; }
.wb-game-map-tag[hidden] { display:none; }
@keyframes wb-game-card-in { from { opacity:0; transform:translateY(-4px); } }
@media (prefers-reduced-motion:reduce) { @keyframes wb-game-card-in { from { opacity:0; } } }
@media (pointer:coarse) { body .wb-game-map-card button.wb-game-map-card-action { min-height:40px; } }

/* ---- Ways out: counted on the where pill, listed first in the places tray. ---- */
.wb-game-map-ways-count { flex:none; color:var(--wl-text-2); font-size:11.5px; font-weight:500; }
.wb-game-map-ways-count::before { content:"·"; margin-right:6px; color:var(--wl-text-3); }
.wb-game-tray-place.is-way .wb-game-thumb { display:grid; place-items:center; color:var(--wl-text-2); }
.wb-game-tray-place.is-way .wb-game-thumb svg { width:15px; height:15px; display:block; }

/* ---- The message box: your face and name beside it open your card; under what you write, the turn's tools, then the
   narrator chip (its model, what it reads and keeps) and send (game-story.mjs renderComposer). ---- */
body.wb-shell .wb-game-composer:has(> .wl-composer-face) { display:grid; grid-template-columns:36px minmax(0,1fr); column-gap:12px; padding-left:12px; }
/* The face is the box's first child (game-story.mjs renderComposer), so everything after it is the rest. Not :has() with
   a :not() after it: that made any change on the page re-style the whole page. */
.wb-game-composer > .wl-composer-face ~ :not(.wl-composer-face) { grid-column:2; }
body .wb-game-composer > button.wl-composer-face { grid-row:1 / span 3; align-self:start; display:block; width:36px; height:36px; margin-top:2px; padding:0; border:0; border-radius:50%; background:transparent; box-shadow:none; cursor:pointer; transition:transform var(--wl-quick) var(--wl-ease-out); }
.wb-game-composer > .wl-composer-face > .wb-game-face { width:36px; height:36px; font-size:11px; box-shadow:0 0 0 2px var(--wl-inset,var(--wl-bg)), 0 0 0 3.5px var(--wl-accent); transition:box-shadow var(--wl-short) var(--wl-ease-out); }
body .wb-game-composer > button.wl-composer-face:is(:hover,:focus-visible) { outline:none; }
.wb-game-composer > .wl-composer-face:is(:hover,:focus-visible) > .wb-game-face { box-shadow:0 0 0 2px var(--wl-inset,var(--wl-bg)), 0 0 0 3.5px var(--wl-accent), 0 0 0 7px color-mix(in srgb,var(--wl-accent) 20%,transparent); }
body .wb-game-composer > button.wl-composer-face:active { transform:scale(.94); }
body.wb-shell .wb-game-composer:has(> .wl-composer-face) .wl-composer-identity { margin-bottom:4px; }
/* Tags over the box (D-160): who you talk to and what you chose on the map, beside your own words. */
.wl-composer-tags { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 6px; }
.wl-composer-tag { display:inline-flex; align-items:center; gap:5px; max-width:100%; height:24px; padding:0 2px 0 8px; border:1px solid color-mix(in srgb,var(--wl-selection) 38%,transparent); border-radius:var(--r-pill); background:color-mix(in srgb,var(--wl-selection) 12%,transparent); color:var(--wl-text); font-size:12px; font-weight:500; }
.wl-composer-tag.is-new { animation:wl-pop var(--wl-short) var(--wl-ease-out); transform-origin:left center; }
.wl-composer-tag > .wt-glyph svg { width:13px; height:13px; display:block; }
.wl-composer-tag > span:not(.wt-glyph) { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* The same choice on your line in the story (game-story.mjs): where you went, or the action you took, as a quiet tag
   before your words, in place of words you didn't write. */
.wb-game-line-tags { display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 2px; }
.wb-game-line-tag { display:inline-flex; align-items:center; gap:5px; max-width:100%; height:24px; padding:0 10px 0 8px; border:1px solid color-mix(in srgb,var(--wl-selection) 30%,transparent); border-radius:var(--r-pill); background:color-mix(in srgb,var(--wl-selection) 10%,transparent); color:var(--wl-text-2); font-size:12px; font-weight:500; line-height:1; }
.wb-game-line-tag > .wt-glyph { display:flex; color:var(--wl-text-3); } .wb-game-line-tag > .wt-glyph svg { width:13px; height:13px; display:block; }
.wb-game-line-tag > span:not(.wt-glyph) { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body .wl-composer-tag button.wt-icon-button { width:20px; height:20px; padding:0; border-radius:50%; color:var(--wl-text-3); }
body .wl-composer-tag button.wt-icon-button:hover { color:var(--wl-text); background:var(--wl-line); }
body .wl-composer-tag button.wt-icon-button svg { width:12px; height:12px; }
body .wl-composer-identity > button.wl-composer-character { height:22px; margin-inline-start:-5px; padding:0 5px; border:0; border-radius:6px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12px; font-weight:600; cursor:pointer; }
body .wl-composer-identity > button.wl-composer-character:hover { color:var(--wl-text); background:var(--wl-raised); }
body .wb-game-composer button.wl-narrator-chip { display:inline-flex; align-items:center; gap:6px; flex:0 1 auto; min-width:0; max-width:240px; height:30px; padding:0 8px 0 10px; border:1px solid var(--wg-line); border-radius:999px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12px; font-weight:500; white-space:nowrap; cursor:pointer; }
.wl-narrator-chip-label { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.wl-narrator-chip .wt-glyph { flex:none; display:flex; }
.wl-narrator-chip .wt-glyph svg { width:13px; height:13px; display:block; }
.wl-narrator-chip > .wt-glyph:last-child { opacity:.6; transition:transform var(--wl-short) var(--wl-ease-out); }
.wl-narrator-chip[aria-expanded="true"] > .wt-glyph:last-child { transform:rotate(180deg); }
body .wb-game-composer button.wl-narrator-chip:is(:hover,[aria-expanded="true"]) { color:var(--wl-text); background:var(--wl-raised); border-color:var(--wl-line-strong); }
body .wb-game-composer button.wl-narrator-chip.is-missing { color:var(--wl-warning); border-style:dashed; border-color:color-mix(in srgb,var(--wl-warning) 55%,transparent); }
/* On a phone the face sits beside your name, so what you write keeps the box's width. */
@media (max-width:640px) {
  body.wb-shell .wb-game-composer:has(> .wl-composer-face) { display:block; padding-left:12px; }
  body .wb-game-composer > button.wl-composer-face { float:left; width:22px; height:22px; margin:0 8px 0 0; }
  .wb-game-composer > .wl-composer-face > .wb-game-face { width:22px; height:22px; font-size:8px; box-shadow:none; }
  .wb-game-composer:has(> .wl-composer-face) > .wb-game-input { clear:both; }
  body .wb-game-composer button.wl-narrator-chip { max-width:132px; }
  /* Playing on a phone (D-355): the box is your words, its tools and Send, about two thirds as tall. No face or name
     row (your card opens from the rail, and from the box opened large, where they stay); the narrator chip is its
     icon alone (its name is on the button for a screen reader and in its picker); each tool is a finger wide, drawn
     smaller, its touch area reaching over the box's edge. */
  body.wb-shell .wb-game-composer-wrap:not(.is-expanded) > .wb-game-composer > :is(.wl-composer-face, .wl-composer-identity) { display:none; }
  body.wb-shell .wb-game-composer-wrap:not(.is-expanded) > .wb-game-composer:not(.wl-paint) { padding:4px 4px 4px 12px; }
  body.wb-shell .wb-game-composer-wrap:not(.is-expanded) > .wb-game-composer textarea.wb-game-input { min-height:32px; margin:0; padding:4px 4px 4px 0; line-height:1.5; }
  body.wb-shell .wb-game-composer-wrap:not(.is-expanded) > .wb-game-composer > .wb-game-composer-row { flex-wrap:nowrap; gap:2px; margin-left:-8px; }
  body.wb-shell .wb-game-composer .wb-game-tools { gap:0; }
  body.wb-shell .wb-game-composer button.wb-game-tool { position:relative; width:40px; height:32px; }
  body.wb-shell .wb-game-composer :is(button.wb-game-tool, button.wl-narrator-chip, button.wb-game-send)::after { content:''; position:absolute; inset:-4px 0; }
  body.wb-shell .wb-game-composer button.wl-narrator-chip { position:relative; flex:none; justify-content:center; width:32px; height:32px; margin-inline-start:auto; padding:0; gap:0; border-radius:50%; }
  body.wb-shell .wb-game-composer button.wl-narrator-chip::after { inset:-4px; }
  body.wb-shell .wb-game-composer button.wl-narrator-chip > :is(.wl-narrator-chip-label, .wt-glyph:last-child:not(:first-child)) { display:none; }
  body.wb-shell .wb-game-composer button.wl-narrator-chip .wt-glyph svg { width:15px; height:15px; }
  body.wb-shell .wb-game-composer button.wb-game-send { position:relative; margin-inline-start:6px; }
  body.wb-shell .wb-game-composer button.wb-game-send::after { inset:-2px; }
}

/* ---- The narrator picker: a quick choice, so it floats on glass over the message box (game-story.mjs
   narratorPicker). ---- */
.wl-narrator-picker { position:fixed; z-index:60; display:flex; flex-direction:column; box-sizing:border-box; max-height:min(540px, calc(100vh - 24px)); padding:10px; border:1px solid var(--wg-line, var(--wl-glass-border)); border-radius:16px; background:var(--wg-glass, var(--wl-glass)); -webkit-backdrop-filter:blur(22px) saturate(125%); backdrop-filter:blur(22px) saturate(125%); box-shadow:var(--wl-elev-pop); color:var(--wl-text); font-size:13px; transform-origin:bottom right; animation:wl-picker-in var(--wl-short) var(--wl-ease-out) both; }
.wl-narrator-picker.is-below { transform-origin:top right; }
/* Menus open from where they were asked for, from 96%, and close faster than they came. */
@keyframes wl-picker-in { from { opacity:0; transform:scale(.96); } }
@keyframes wl-picker-out { to { opacity:0; transform:scale(.96); } }
:is(.wl-narrator-picker, .wl-paint-picker).is-leaving { animation:wl-picker-out var(--wl-short-out) var(--wl-ease) forwards; pointer-events:none; }
.wl-narrator-picker-head { display:flex; align-items:center; gap:8px; padding:2px 2px 8px 6px; }
.wl-narrator-picker-title { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.wl-narrator-picker-title strong { font-size:14px; font-weight:600; line-height:20px; }
.wl-narrator-picker-title small { color:var(--wl-text-3); font-size:11.5px; line-height:16px; }
body .wl-narrator-picker button.wl-narrator-picker-icon { flex:none; width:28px; height:28px; padding:0; border:0; border-radius:8px; background:transparent; box-shadow:none; color:var(--wl-text-3); }
body .wl-narrator-picker button.wl-narrator-picker-icon:hover { color:var(--wl-text); background:var(--wl-raised); }
body :is(.wl-narrator-picker, .wl-paint-picker) input:is(.wl-narrator-search, .wl-paint-search) { flex:none; box-sizing:border-box; width:100%; height:34px; padding:0 12px; border:1px solid var(--wl-line); border-radius:10px; background:var(--wl-inset); box-shadow:none; color:var(--wl-text); font-size:13px; }
body :is(.wl-narrator-picker, .wl-paint-picker) input:is(.wl-narrator-search, .wl-paint-search):focus { border-color:var(--wl-selection); box-shadow:0 0 0 1px color-mix(in srgb,var(--wl-selection) 30%,transparent); outline:none; }
.wl-narrator-filters { flex:none; display:flex; flex-wrap:wrap; gap:4px; padding:8px 0 4px; }
body :is(.wl-narrator-picker, .wl-paint-picker) button.wl-narrator-filter { transition:background-color var(--wl-quick) var(--wl-ease),color var(--wl-quick) var(--wl-ease),transform var(--wl-quick) var(--wl-ease); height:26px; padding:0 10px; border:1px solid var(--wl-line); border-radius:999px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:11.5px; font-weight:550; cursor:pointer; }
body :is(.wl-narrator-picker, .wl-paint-picker) button.wl-narrator-filter:hover { color:var(--wl-text); background:var(--wl-raised); }
body :is(.wl-narrator-picker, .wl-paint-picker) button.wl-narrator-filter:active { transform:scale(.96); }
body :is(.wl-narrator-picker, .wl-paint-picker) button.wl-narrator-filter[aria-pressed="true"] { color:var(--wl-text); background:color-mix(in srgb,var(--wl-accent) 16%,transparent); border-color:color-mix(in srgb,var(--wl-accent) 42%,transparent); }
.wl-narrator-list { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; margin:0 -4px; padding:0 4px 2px; }
.wl-narrator-group { padding:10px 8px 4px; color:var(--wl-text-3); font-size:10.5px; font-weight:650; }
body .wl-narrator-picker button.wl-narrator-row { display:flex; align-items:center; justify-content:flex-start; gap:10px; width:100%; height:auto; min-height:38px; padding:6px 8px; border:0; border-radius:9px; background:transparent; box-shadow:none; color:var(--wl-text); text-align:left; cursor:pointer; }
body .wl-narrator-picker button.wl-narrator-row:is(:hover,:focus-visible) { background:var(--wl-raised); outline:none; }
body .wl-narrator-picker button.wl-narrator-row.is-chosen { background:color-mix(in srgb,var(--wl-accent) 12%,transparent); }
.wl-narrator-row .wt-glyph { flex:none; display:flex; }
.wl-narrator-row .wt-glyph svg { width:15px; height:15px; display:block; }
.wl-narrator-row-kind { color:var(--wl-text-3); }
.wl-narrator-row-check { color:var(--wl-accent); }
.wl-narrator-row-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.wl-narrator-row-name, .wl-narrator-row-text small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wl-narrator-row-name { font-size:13px; font-weight:500; line-height:18px; }
.wl-narrator-row-text small { color:var(--wl-text-3); font-size:11px; line-height:15px; }
/* The model list (D-093): a model's price on the right of its row, in the numbers' font. A model that can't be
   chosen yet (the cloud before a key is added) stays readable, only quieter, with its price. */
.wl-narrator-row-price { flex:none; color:var(--wl-text-2); font-family:var(--wl-font-mono); font-size:11.5px; font-variant-numeric:tabular-nums; }
body .wl-narrator-picker button.wl-narrator-row:disabled { opacity:1; cursor:default; }
body .wl-narrator-picker button.wl-narrator-row:disabled :is(.wl-narrator-row-name, .wl-narrator-row-price, .wt-glyph) { color:var(--wl-text-3); }
body .wl-narrator-picker button.wl-narrator-row:disabled:hover { background:transparent; }
.wl-narrator-empty { padding:8px 10px; color:var(--wl-text-3); font-size:12px; line-height:1.5; }
body .wl-narrator-picker button.wl-narrator-empty { display:block; width:100%; height:auto; border:0; border-radius:9px; background:transparent; box-shadow:none; color:var(--wl-accent); text-align:left; cursor:pointer; }
body .wl-narrator-picker button.wl-narrator-empty:hover { background:var(--wl-raised); }
.wl-narrator-picker-foot { flex:none; display:flex; flex-direction:column; gap:1px; margin:8px -4px 0; padding:8px 4px 0; border-top:1px solid var(--wl-glass-border); }
body .wl-narrator-picker button.wl-narrator-link { display:flex; align-items:center; justify-content:flex-start; gap:10px; width:100%; height:32px; padding:0 8px; border:0; border-radius:8px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12.5px; text-align:left; cursor:pointer; }
body .wl-narrator-picker button.wl-narrator-link:hover { color:var(--wl-text); background:var(--wl-raised); }
body .wl-narrator-picker button.wl-narrator-link:disabled { opacity:.5; cursor:default; }
.wl-narrator-link .wt-glyph { flex:none; display:flex; color:var(--wl-text-3); }
.wl-narrator-link .wt-glyph svg { width:14px; height:14px; display:block; }
.wl-narrator-link span:not(.wt-glyph) { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* The model dial: how much this narrator does, chosen or measured, above the links. */
.wl-narrator-dial { display:flex; flex-direction:column; gap:6px; padding:2px 8px 10px; margin-bottom:4px; border-bottom:1px solid var(--wl-glass-border); }
.wl-narrator-dial-head { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--wl-text-2); font-size:12px; font-weight:550; }
body .wl-narrator-picker button.wl-narrator-dial-measure { height:24px; padding:0 8px; border:0; border-radius:7px; background:transparent; box-shadow:none; color:var(--wl-accent); font-size:12px; font-weight:550; cursor:pointer; transition:background-color var(--wl-quick) var(--wl-ease); }
body .wl-narrator-picker button.wl-narrator-dial-measure:hover:not(:disabled) { background:var(--wl-raised); }
body .wl-narrator-picker button.wl-narrator-dial-measure:disabled { color:var(--wl-text-3); cursor:default; }
body .wl-narrator-picker button.wl-narrator-dial-measure:focus-visible { outline:2px solid var(--wl-accent); outline-offset:1px; }
.wl-narrator-dial .wl-narrator-filters { padding:0; }
.wl-narrator-dial-about { color:var(--wl-text-3); font-size:11.5px; line-height:1.45; }
@media (pointer:coarse) { body .wl-narrator-picker button.wl-narrator-row { min-height:44px; } body .wl-narrator-picker button.wl-narrator-link { height:40px; } body .wl-narrator-picker button.wl-narrator-dial-measure { height:36px; } }

/* ---- A response card: its date over it, and a foot under the words with what the narrator did on the left and the
   card's tools on the right. The tools show on the newest answer, on hover and on touch (game-story.mjs turn). ---- */
.wl-turn-when { display:flex; align-items:center; gap:7px; margin:0 0 12px; color:var(--wl-text-3); font-size:11.5px; font-weight:550; letter-spacing:.02em; font-variant-numeric:tabular-nums; }
.wl-turn-when[hidden] { display:none; }
.wl-turn-when .wt-glyph { display:flex; } .wl-turn-when svg { width:13px; height:13px; display:block; }
.wl-turn-foot { display:flex; align-items:flex-start; flex-wrap:wrap; gap:2px 8px; width:100%; margin-top:16px; padding-top:8px; border-top:1px solid color-mix(in srgb,var(--wl-line) 70%,transparent); }
.wl-turn-foot > .wl-actions { flex:1 1 auto; min-width:0; margin:0 0 0 -8px; }
.wl-turn-foot > .wl-message-edited { align-self:center; margin:0; }
body.wb-shell .wb-game-turn .wl-turn-foot > .wb-game-turn-tools { position:static; display:flex; gap:2px; margin-inline-start:auto; padding:0; border:0; background:transparent; box-shadow:none; transform:none; opacity:0; transition:opacity var(--wl-short) var(--wl-ease); }
body.wb-shell .wb-game-turn:is(:hover,:focus-within,.is-latest) .wl-turn-foot > .wb-game-turn-tools { opacity:1; }
@media (hover:none),(pointer:coarse) { body.wb-shell .wb-game-turn .wl-turn-foot > .wb-game-turn-tools { opacity:1; } }
/* A turn's menu open (game-story.mjs turnMenu): its buttons stay, the ⋯ the menu hangs from among them. */
body.wb-shell .wb-game-turn.is-menu-open .wb-game-turn-tools, body.wb-shell .wb-game-turn.is-menu-open .wl-turn-foot > .wb-game-turn-tools { opacity:1; }
body.wb-shell .wl-turn-foot .wb-game-turn-tools button.is-done { color:var(--wl-accent); }
/* Editing in the card: a box for each part, under who says it. */
body.wb-shell .wb-game-turn.is-editing { cursor:auto; }
body.wb-shell .wb-game-turn.is-player.is-editing { display:block; padding:18px 22px; }
.wl-turn-editor { display:grid; gap:14px; width:100%; animation:wl-turn-strip-in var(--wl-short) var(--wl-ease-out) both; }
.wl-turn-field { display:grid; gap:6px; }
.wl-turn-field-label { display:flex; align-items:center; gap:8px; color:var(--wl-text-3); font-size:11.5px; font-weight:600; letter-spacing:.02em; }
.wl-turn-field-label .wb-game-face { width:20px; height:20px; font-size:8px; }
body.wb-shell textarea.wl-turn-field-input { display:block; box-sizing:border-box; width:100%; min-height:44px; resize:none; overflow:hidden; padding:10px 12px; border:1px solid var(--wl-line-strong); border-radius:10px; background:var(--wl-inset); box-shadow:none; color:var(--wl-text); font-family:var(--wl-font-reading); font-size:16px; line-height:1.65; }
body.wb-shell textarea.wl-turn-field-input:focus { border-color:var(--wl-selection); box-shadow:0 0 0 1px color-mix(in srgb,var(--wl-selection) 30%,transparent); outline:none; }
.wl-turn-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.wl-turn-hint { flex:1 1 200px; min-width:0; color:var(--wl-text-3); font-size:12px; line-height:1.5; }
.wl-turn-error { flex-basis:100%; color:var(--wl-danger); font-size:12px; } .wl-turn-error:empty { display:none; }
body.wb-shell .wb-game-story button.wl-turn-button { height:30px; padding:0 14px; border:1px solid var(--wl-line-strong); border-radius:9px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12.5px; font-weight:550; cursor:pointer; }
body.wb-shell .wb-game-story button.wl-turn-button:hover { color:var(--wl-text); background:var(--wl-raised); }
body.wb-shell .wb-game-story button.wl-turn-button.is-primary { border-color:transparent; background:var(--wl-accent); color:var(--wl-on-accent); }
body.wb-shell .wb-game-story button.wl-turn-button.is-danger { border-color:transparent; background:var(--wl-danger); color:var(--wl-on-accent); }
body.wb-shell .wb-game-story button.wl-turn-button:is(.is-primary,.is-danger):hover { filter:brightness(1.06); }
body.wb-shell .wb-game-story button.wl-turn-button:disabled { opacity:.55; cursor:default; }
/* Rewrite and delete open under the words, in the card. */
.wl-turn-strip { display:grid; gap:10px; box-sizing:border-box; width:100%; margin-top:12px; padding:12px 14px; border:1px solid var(--wl-line-strong); border-radius:12px; background:var(--wl-inset); animation:wl-turn-strip-in var(--wl-short) var(--wl-ease-out) both; }
.wb-game-turn.is-player > .wl-turn-strip { grid-column:1 / -1; }
.wl-turn-strip.is-danger { border-color:color-mix(in srgb,var(--wl-danger) 45%,var(--wl-line)); background:color-mix(in srgb,var(--wl-danger) 7%,var(--wl-inset)); }
.wl-turn-strip-head { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; font-size:13px; }
.wl-turn-strip-head .wt-glyph { display:flex; color:var(--wl-text-3); } .wl-turn-strip-head svg { width:14px; height:14px; display:block; }
.wl-turn-strip.is-danger .wl-turn-strip-head .wt-glyph { color:var(--wl-danger); }
.wl-turn-strip-head .wl-turn-hint { flex-basis:100%; }
.wl-turn-strip .wl-turn-bar { justify-content:flex-end; }
body.wb-shell .wl-turn-strip textarea.wl-turn-field-input { min-height:40px; font-family:inherit; font-size:14px; line-height:1.5; }
/* Inspect a turn (inspectStrip in game-story.mjs): the facts, what changed, then the brief and the writing folded. */
.wl-inspect h4 { margin:4px 0 -4px; font-size:12px; font-weight:600; color:var(--wl-text-2); }
.wl-inspect-facts { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:4px 16px; margin:0; font-size:13px; line-height:18px; }
.wl-inspect-facts dt { color:var(--wl-text-3); } .wl-inspect-facts dd { margin:0; min-width:0; color:var(--wl-text); font-variant-numeric:tabular-nums; }
.wl-inspect-list { display:grid; gap:2px; margin:0; padding-left:18px; font-size:13px; line-height:18px; color:var(--wl-text-2); overflow-wrap:anywhere; }
.wl-inspect-fold { min-width:0; border:1px solid var(--wl-line); border-radius:var(--r-sm); background:var(--wl-surface); }
.wl-inspect-fold > summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:32px; padding:0 10px; border-radius:var(--r-sm); font-size:13px; color:var(--wl-text-2); cursor:pointer; list-style:none; transition:color var(--wl-quick) var(--wl-ease),background-color var(--wl-quick) var(--wl-ease); }
.wl-inspect-fold > summary::-webkit-details-marker { display:none; }
.wl-inspect-fold > summary:is(:hover,:focus-visible) { color:var(--wl-text); background:var(--wl-raised); outline:none; }
.wl-inspect-fold > summary .wt-glyph { display:flex; flex:none; color:var(--wl-text-3); } .wl-inspect-fold > summary svg { width:14px; height:14px; }
.wl-inspect-fold[open] > summary .wt-glyph { transform:rotate(180deg); }
.wl-inspect-fold pre { margin:0; padding:8px 10px 10px; max-height:320px; overflow:auto; border-top:1px solid var(--wl-line); white-space:pre-wrap; overflow-wrap:anywhere; font-family:var(--wl-font-mono); font-size:12px; line-height:1.5; color:var(--wl-text-2); animation:wl-fade var(--wl-short) var(--wl-ease-out); }
/* The model's reasoning reads as a note (readableThought): paragraphs and lists, not code. */
.wl-inspect:focus { outline:none; }
.wl-inspect-reasoning { display:grid; gap:8px; max-height:420px; overflow:auto; padding:10px 12px 12px; border-top:1px solid var(--wl-line); font-size:13px; line-height:1.6; color:var(--wl-text-2); overflow-wrap:anywhere; animation:wl-fade var(--wl-short) var(--wl-ease-out); }
.wl-inspect-reasoning :is(p,ul,ol) { margin:0; } .wl-inspect-reasoning :is(ul,ol) { padding-left:18px; } .wl-inspect-reasoning strong { color:var(--wl-text); font-weight:600; }
.wl-inspect-reasoning code { font-family:var(--wl-font-mono); font-size:12px; }
@media (max-width:640px) { .wl-inspect-facts { grid-template-columns:minmax(0,1fr); gap:0; } .wl-inspect-facts dd { margin-bottom:6px; } }
@keyframes wl-turn-strip-in { from { opacity:0; transform:translateY(-4px); } }
@media (prefers-reduced-motion:reduce) { @keyframes wl-picker-in { from { opacity:0; } } @keyframes wl-picker-out { to { opacity:0; } } @keyframes wl-turn-strip-in { from { opacity:0; } } }

/* ---- The rail is a shade down the story's right edge, as the top bar has one along its top and the message box
   along its foot: the scene shows through it, darkened, with no line where it ends; it fades into the scene to its
   left and runs up under the top bar. Pins and Pin something at the top, Story memory and Boris at the foot; the open
   one is lit, with the accent bar at its edge. A pin opens in a panel of the same shade beside it, its card solid so
   it reads (game-panel.mjs renderRail, renderPanel). The pills on the bar stay frosted glass, as things that float do.
   On a phone (640px and under) the rail is a strip under the top bar, the two one shaded header that fades out at
   its foot; a pin opens as a glass sheet from the foot, and the message box stays the last thing on the screen. ---- */
body.wb-game-open { --wg-tint:color-mix(in srgb,var(--wl-bg) 68%,transparent); --wg-frost:linear-gradient(var(--wl-glass-fill), color-mix(in srgb,var(--wl-text) 1%,transparent)), var(--wg-tint); --wg-frost-blur:blur(28px) saturate(150%); --wg-shade:color-mix(in srgb,var(--wl-bg) 80%,transparent); --wg-edge:72px; }
body.wb-shell .wb-game .wb-game-rail, body.wb-shell .wb-game .wb-game-panel { border-left:0; background:var(--wg-shade); -webkit-backdrop-filter:none; backdrop-filter:none; box-shadow:none; }
body.wb-shell .wb-game .wb-game-rail { width:48px; padding:4px 0 10px; gap:4px; }
@media (min-width:641px) {
  /* On web (no native desktop window buttons in top-right), lift the rail so its top icon aligns with the top-left game menu button. */
  body.wb-shell.wl-web.wb-game-open:not(.wb-game-new):not(.wb-game-away):not(.wb-game-syncing) .wb-project-bar { pointer-events:none; padding-right:60px; }
  body.wb-shell.wl-web.wb-game-open:not(.wb-game-new):not(.wb-game-away):not(.wb-game-syncing) .wb-game-top { pointer-events:none; }
  body.wb-shell.wl-web.wb-game-open:not(.wb-game-new):not(.wb-game-away):not(.wb-game-syncing) .wb-game-top > :not(.wb-game-drag) { pointer-events:auto; }
  body.wb-shell.wl-web .wb-game:not(.is-new) .wb-game-rail { margin-top:calc(-1 * var(--wb-bar-height)); padding-top:12px; }
}
.wb-game-rail .wb-game-rail-list { gap:4px; }
body .wb-game .wb-game-rail :is(button.wb-game-rail-item, button.wb-game-rail-add) { width:36px; height:36px; border-radius:10px; color:color-mix(in srgb,var(--wl-text) 78%,transparent); transition:background-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease), transform var(--wl-quick) var(--wl-ease-out); }
body .wb-game .wb-game-rail :is(button.wb-game-rail-item, button.wb-game-rail-add):hover { background:color-mix(in srgb,var(--wl-text) 10%,transparent); color:var(--wl-text); }
body .wb-game .wb-game-rail :is(button.wb-game-rail-item, button.wb-game-rail-add):active { transform:scale(.94); }
body.wb-shell .wb-game .wb-game-rail button.wb-game-rail-item.is-active { background:var(--wl-selection-soft); color:var(--wl-selection); box-shadow:none; }
body .wb-game-rail button.wb-game-rail-item.is-active::before { left:-6px; top:9px; bottom:9px; width:2px; border-radius:0 2px 2px 0; background:var(--wl-selection); }
.wb-game-rail .wb-game-rail-item .wb-game-face { width:28px; height:28px; }
.wb-game-rail .wb-game-rail-add .wt-glyph svg, .wb-game-rail .wb-game-rail-item > .wb-game-pin-glyph svg { width:17px; height:17px; }
/* Open for now (D-178): a thin line under the pins, then an icon for each panel open but not pinned. The line shows
   only when something is there, or while a pin is dragged below it. */
/* A face's picture would start the browser's own picture drag and stop the rail's drag: the icon is dragged, not its picture. */
.wb-game-rail .wb-game-rail-item img { -webkit-user-drag:none; user-select:none; pointer-events:none; }
.wb-game-rail-now { display:flex; flex-direction:column; align-items:center; gap:4px; }
.wb-game-rail-now:not(.has-items):not(.is-drop-now) { display:none; }
.wb-game-rail-line { flex:none; width:20px; height:1px; margin:4px 0; border-radius:1px; background:color-mix(in srgb,var(--wl-text) 16%,transparent); transition:background-color var(--wl-quick) var(--wl-ease), height var(--wl-quick) var(--wl-ease); }
.wb-game-rail-now.is-drop-now .wb-game-rail-line { height:2px; background:var(--wl-accent); }
.wb-game-rail-item.is-now.is-fresh { animation:wb-rail-fresh 1.6s var(--wl-ease-out) 1; }
@keyframes wb-rail-fresh { 0%, 40% { box-shadow:0 0 0 2px color-mix(in srgb,var(--wl-accent) 60%,transparent), 0 0 16px -2px var(--wl-accent); } 100% { box-shadow:0 0 0 0 transparent; } }
.wb-game-rail-dot { position:absolute; right:3px; top:3px; width:8px; height:8px; border-radius:50%; background:var(--wl-accent); box-shadow:0 0 0 2px var(--wg-shade, var(--wl-bg)); pointer-events:none; }
/* A drop the rail refuses: the map stays on its own. A red edge on the icon, and one line beside it. */
body .wb-game .wb-game-rail button.wb-game-rail-item.is-drop-refused { box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--wl-danger) 75%,transparent); }
/* The icon being dragged fades over a refused drop, so the red edge under it shows. */
body .wb-game .wb-game-rail button.wb-game-rail-item.is-dragging.is-refused { opacity:.45; }
.wb-game-rail-hint { position:fixed; z-index:60; display:flex; align-items:center; gap:7px; padding:6px 10px; border-radius:10px; background:var(--wl-raised); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--wl-danger) 40%,var(--wl-line)), var(--wl-elev-pop); color:var(--wl-text-2, var(--wl-text)); font-size:12.5px; white-space:nowrap; pointer-events:none; animation:wb-rail-hint var(--wl-quick) var(--wl-ease-out); }
.wb-game-rail-hint b { color:var(--wl-text); font-weight:600; }
.wb-game-rail-hint .wt-glyph { color:var(--wl-danger); }
.wb-game-rail-hint .wt-glyph svg { width:14px; height:14px; display:block; }
@keyframes wb-rail-hint { from { opacity:0; transform:translateX(4px); } }
@media (prefers-reduced-motion:reduce) { .wb-game-rail-item.is-now.is-fresh, .wb-game-rail-hint { animation:none; } }
.wb-game-rail-item.is-boris .wt-orbis-blob { --size:24px; }
body.wb-shell .wb-game-panel .wb-game-card { border-color:var(--wg-line); border-radius:var(--r-lg); background:var(--wg-card); box-shadow:var(--wl-elev-card); }
/* The map on the left (D-246) is the panel's shade on the other side of the story, its card solid; the story's left
   edge fades into it, and it runs up under the top bar as the panel does. */
body.wb-shell .wb-game .wb-game-left { border-right:0; background:var(--wg-shade); -webkit-backdrop-filter:none; backdrop-filter:none; box-shadow:none; }
body.wb-shell .wb-game-left .wb-game-card { border-color:var(--wg-line); border-radius:var(--r-lg); background:var(--wg-card); box-shadow:var(--wl-elev-card); }
@keyframes wb-game-left-in { from { opacity:0; transform:translateX(-18px); } }
.wb-game.has-left-map .wb-game-left.is-opening { animation:wb-game-left-in var(--wl-long) var(--wl-ease-out); }
@media (prefers-reduced-motion:reduce) { @keyframes wb-game-left-in { from { opacity:0; } } }
@media (min-width:641px) and (max-width:1000px) {
  body.wb-shell .wb-game:not(.is-new).has-left-map .wb-game-left::after { content:''; position:absolute; z-index:-1; pointer-events:none; bottom:100%; left:0; right:0; height:var(--wb-bar-height); background:var(--wg-shade); }
  body.wb-shell .wb-game:not(.is-new).has-left-map .wb-game-left::before { content:''; position:absolute; z-index:-1; pointer-events:none; top:calc(-1 * var(--wb-bar-height)); bottom:0; left:100%; width:var(--wg-edge); background:linear-gradient(to left, transparent, 60%, var(--wg-shade)); }
}
@media (max-width:1000px) and (min-width:641px) { body.wb-shell .wb-game .wb-game-panel { right:48px; } }
/* On a tablet the map's column and the panel lie over the story but stop above the message box (its height comes from
   game-workspace.mjs), so send and the narrator stay in reach: lying over it, they took every tap on its right side. */
/* No scroll bars in play (D-284): a card's page and the map's Characters scroll without one, and a card's bottom edge
   fades while there is more below it (a fade driven by its own scrolling, so a card that fits shows none). */
body.wb-shell .wb-game :is(.wb-game-panel, .wb-game-left) :is(.wb-game-card-body, .wb-game-people-list) { scrollbar-width:none; }
body.wb-shell .wb-game :is(.wb-game-panel, .wb-game-left) :is(.wb-game-card-body, .wb-game-people-list)::-webkit-scrollbar { display:none; }
@property --wg-more { syntax:'<length>'; inherits:false; initial-value:0px; }
@keyframes wg-more { from, 97% { --wg-more:28px; } to { --wg-more:0px; } }
@supports (animation-timeline: scroll()) {
  body.wb-shell .wb-game :is(.wb-game-panel, .wb-game-left) .wb-game-card:not(.is-map, .is-boris) > .wb-game-card-body { -webkit-mask-image:linear-gradient(to bottom, #000 calc(100% - var(--wg-more)), transparent); mask-image:linear-gradient(to bottom, #000 calc(100% - var(--wg-more)), transparent); animation:wg-more linear both; animation-timeline:scroll(self); }
}
@media (max-width:1000px) and (min-width:641px) {
  body.wb-shell .wb-game :is(.wb-game-left, .wb-game-panel) { bottom:var(--wb-composer-h, 0px); }
  /* Lying over the story, a card is solid: through the card's tint and the shade, the story's lines showed behind the
     map's Characters. */
  body.wb-shell .wb-game :is(.wb-game-left, .wb-game-panel) .wb-game-card { background:var(--wl-bg); }
}
/* Full screen (D-255): on a wide window nothing is shaded. The rail's icons, the panel's card and the map on the left
   stand on the scene alone, as the story's cards do, so no darker band shows around a card. The shade, its fades and
   its runs up under the bar stay only where a panel lies over the story (1000px and under). */
@media (min-width:1001px) {
  body.wb-shell .wb-game :is(.wb-game-rail, .wb-game-panel, .wb-game-left) { background:transparent; }
}
/* The fade and the run under the bar are drawn by what sits beside the shade, since the rail scrolls and would cut
   off its own: the story column draws the fade, the main area the rail's run up, and the panel its own run up (and its
   own fade where it lies over the story). */
@media (min-width:641px) and (max-width:1000px) {
  body.wb-shell .wb-game:not(.is-new) .wb-game-column::after { content:''; position:absolute; z-index:-1; pointer-events:none; top:calc(-1 * var(--wb-bar-height)); bottom:0; right:0; width:var(--wg-edge); background:linear-gradient(to right, transparent, 60%, var(--wg-shade)); }
  body.wb-shell .wb-game:not(.is-new) .wb-game-main::before, body.wb-shell .wb-game:not(.is-new).has-panel .wb-game-panel::after { content:''; position:absolute; pointer-events:none; bottom:100%; height:var(--wb-bar-height); background:var(--wg-shade); }
  body.wb-shell .wb-game:not(.is-new) .wb-game-main::before { z-index:1; right:0; width:48px; }
  body.wb-shell .wb-game:not(.is-new).has-panel .wb-game-panel::after { z-index:-1; left:0; right:0; }
}
@media (min-width:641px) and (max-width:1000px) {
  body.wb-shell .wb-game:not(.is-new).has-panel .wb-game-column::after { display:none; }
  body.wb-shell .wb-game:not(.is-new).has-panel .wb-game-panel::before { content:''; position:absolute; z-index:-1; pointer-events:none; top:calc(-1 * var(--wb-bar-height)); bottom:0; right:100%; width:var(--wg-edge); background:linear-gradient(to right, transparent, 60%, var(--wg-shade)); }
}
@media (prefers-reduced-transparency:reduce) { body.wb-game-open { --wg-shade:var(--wl-surface); } }
@media (max-width:640px) {
  body.wb-game-open:not(.wb-game-new) .wb-project-bar.wb-project-bar { background:var(--wg-shade); }
  body.wb-game-open:not(.wb-game-new):not(.wb-game-away) .wb-project-bar { pointer-events:none; }
  body.wb-game-open:not(.wb-game-new):not(.wb-game-away) .wb-game-top { pointer-events:none; }
  body.wb-game-open:not(.wb-game-new):not(.wb-game-away) .wb-game-top > :not(.wb-game-drag) { pointer-events:auto; }
  body.wb-game-open:not(.wb-game-away) .wb-project-bar .wb-nav-toggle { display:none !important; }
  body.wb-shell .wb-game:not(.is-new) { padding-top:54px; }
  .wb-game-main { flex-direction:column; }
  .wb-game-column { flex:1; min-height:0; }
  body.wb-shell .wb-game:not(.is-new) .wb-game-column::after { content:''; position:absolute; z-index:-1; pointer-events:none; top:0; left:0; right:0; height:var(--wg-edge); background:linear-gradient(var(--wg-shade), 40%, transparent); }
  /* Move the game rail up one stop into the top bar beside the game menu button so phones get one clean bar. */
  body.wb-shell .wb-game:not(.is-new) .wb-game-rail {
    position:fixed; top:0; left:54px; right:8px; z-index:22;
    order:-1; display:flex; flex:none; flex-direction:row; align-items:center;
    width:auto; height:54px; gap:2px; padding:0 2px;
    border-left:0; border-bottom:0; background:transparent !important;
    overflow-x:auto; overflow-y:hidden; scrollbar-width:none; pointer-events:auto;
  }
  body.wb-shell .wb-game:not(.is-new) .wb-game-rail::-webkit-scrollbar { display:none; }
  body.wb-shell .wb-game:not(.is-new) .wb-game-rail.is-more-right { -webkit-mask-image:linear-gradient(90deg, var(--wl-bg) calc(100% - 24px), transparent); mask-image:linear-gradient(90deg, var(--wl-bg) calc(100% - 24px), transparent); }
  body.wb-shell .wb-game:not(.is-new) .wb-game-rail.is-more-left { -webkit-mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 24px); mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 24px); }
  body.wb-shell .wb-game:not(.is-new) .wb-game-rail.is-more-left.is-more-right { -webkit-mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 24px, var(--wl-bg) calc(100% - 24px), transparent); mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 24px, var(--wl-bg) calc(100% - 24px), transparent); }
  body.wb-game-away .wb-game .wb-game-rail,
  body.wb-game-syncing .wb-game .wb-game-rail { display:none !important; }
  .wb-game-rail .wb-game-rail-list { flex-direction:row; gap:2px; }
  .wb-game-rail .wb-game-rail-now { flex-direction:row; gap:2px; }
  .wb-game-rail .wb-game-rail-line { width:1px; height:20px; margin:0 4px; }
  body .wb-game-rail button.wb-game-rail-item.is-active::before { left:9px; right:9px; top:auto; bottom:-4px; width:auto; height:2px; border-radius:2px 2px 0 0; }
  .wb-game-rail .wb-game-rail-item.is-drop-before::after, .wb-game-rail .wb-game-rail-item.is-drop-after::after { top:4px; bottom:4px; height:auto; width:2px; }
  .wb-game-rail .wb-game-rail-item.is-drop-before::after { left:-4px; right:auto; }
  .wb-game-rail .wb-game-rail-item.is-drop-after::after { right:-4px; left:auto; }
  body.wb-shell .wb-game .wb-game-panel { position:absolute; left:0; right:0; top:auto; bottom:0; z-index:5; width:auto; max-width:none; height:min(82%, calc(100% - 14px)); border:1px solid var(--wg-line); border-bottom:0; border-radius:var(--r-xl) var(--r-xl) 0 0; background:var(--wg-frost); -webkit-backdrop-filter:var(--wg-frost-blur); backdrop-filter:var(--wg-frost-blur); box-shadow:0 -12px 32px color-mix(in srgb, var(--wl-bg) 26%, transparent); }
  body.wb-shell .wb-game.has-map-open .wb-game-panel { top:6px; height:auto; }
  body.wb-shell .wb-game .wb-game-panel.is-panel-full { position:fixed; inset:0; z-index:35; height:100dvh; max-height:100dvh; border:0; border-radius:0; background:var(--wl-bg); }
  body.wb-shell .wb-game-panel .wb-game-stack { padding:10px; }
  /* Map card stretches cleanly to fill vertical space on smaller devices (no dead void under Characters). */
  body.wb-shell .wb-game-panel .wb-game-stack.is-alone > .wb-game-card.is-map { flex:1 1 auto; min-height:0; height:100%; }
  body.wb-shell .wb-game-panel .wb-game-stack.is-alone > .wb-game-card.is-map > .wb-game-card-body { flex:1 1 auto; min-height:0; }
  body.wb-shell .wb-game-panel .wb-game-stack.is-alone > .wb-game-card.is-map .wb-game-map { flex:1 1 auto; min-height:220px; height:auto; max-height:none; }
  body.wb-shell .wb-game-panel .wb-game-card { box-shadow:none; }
}
/* Full-screen panel expand (works on all screen sizes, especially smaller devices) and full-screen Expand card modal on ≤ 820px. */
body.wb-shell .wb-game.has-panel-full { z-index:40; }
body.wb-shell .wb-game .wb-game-panel.is-panel-full { position:fixed; inset:0; left:0; right:0; top:0; bottom:0; z-index:35; width:100vw !important; max-width:none !important; height:100dvh; border:0; border-radius:0; background:var(--wl-bg); }
@media (max-width:820px) {
  .wb-modal-backdrop.is-expanded-card { padding:0 !important; align-items:stretch; justify-content:stretch; }
  .wb-modal.is-expanded-card { width:100vw !important; max-width:100vw !important; height:100dvh !important; max-height:100dvh !important; border:0 !important; border-radius:0 !important; margin:0 !important; }
  body.wb-shell .wb-game-panel .wb-game-stack.is-alone > .wb-game-card.is-map { flex:1 1 auto; min-height:0; height:100%; }
  body.wb-shell .wb-game-panel .wb-game-stack.is-alone > .wb-game-card.is-map > .wb-game-card-body { flex:1 1 auto; min-height:0; }
  body.wb-shell .wb-game-panel .wb-game-stack.is-alone > .wb-game-card.is-map .wb-game-map { flex:1 1 auto; min-height:220px; height:auto; max-height:none; }
}

/* ---- The top bar over the scene: in a game the bar is see-through and the place's picture runs under it with no
   shade of its own. The game's menu is the only thing on it, a round glass button (D-252: a game feels full
   screen; its name is read out, not shown). The new-game screen has the same see-through bar, its picture running up
   under it (2026-11-18: a plain bar there looked like a box over the screen). game-workspace.mjs marks the body
   wb-game-new on that screen (and game-sync.mjs wb-game-syncing below): a :has() on body made every change on the page,
   each new turn among them, look through the whole page. The bar's class is named three times so these rules weigh what the
   :has() ones did and still win over the workspace's own bar colours (.wl-workspace.has-backdrop). ---- */
body.wb-game-open .wb-project-bar.wb-project-bar.wb-project-bar { background:transparent; border-bottom-color:transparent; }
body.wb-shell .wb-game:not(.is-new) { inset:0; padding-top:var(--wb-bar-height); }
body.wb-shell .wb-game.is-new { inset:0; }
body.wb-shell .wb-game.is-new .wl-ng { padding-top:calc(56px + var(--wb-bar-height)); }
@media (max-width:640px) { body.wb-shell .wb-game.is-new .wl-ng { padding-top:calc(160px + var(--wb-bar-height)); } }
body.wb-shell .wb-game:not(.is-new) .wb-game-backdrop { top:calc(-1 * var(--wb-bar-height)); }
body.wb-shell .wb-game-top { gap:8px; }
body.wb-shell .wb-game-top button.wb-game-title { display:inline-flex; align-items:center; justify-content:center; flex:none; width:36px; height:36px; padding:0; border:1px solid var(--wg-line); border-radius:var(--r-pill); background:var(--wg-frost); -webkit-backdrop-filter:var(--wg-frost-blur); backdrop-filter:var(--wg-frost-blur); box-shadow:0 4px 14px color-mix(in srgb, var(--wl-bg) 10%, transparent); white-space:nowrap; cursor:pointer; transition:background-color var(--wl-quick) var(--wl-ease), border-color var(--wl-quick) var(--wl-ease), transform var(--wl-quick) var(--wl-ease-out); }
body.wb-shell .wb-game-top button.wb-game-title { color:var(--wl-text); }
body.wb-shell .wb-game-top button.wb-game-title:is(:hover, .is-open, [aria-expanded="true"]) { background:linear-gradient(color-mix(in srgb, var(--wl-text) 9%, transparent), color-mix(in srgb, var(--wl-text) 5%, transparent)), var(--wg-tint); border-color:color-mix(in srgb,var(--wl-text) 22%,transparent); color:var(--wl-text); }
body.wb-shell .wb-game-top button.wb-game-title:active { transform:scale(.98); }
.wb-game-top .wb-game-title > .wt-glyph { flex:none; display:flex; color:var(--wl-text-2); }
.wb-game-top .wb-game-title > .wt-glyph svg { width:17px; height:17px; display:block; }
body.wb-shell .wb-game-top .wb-game-title-text { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (prefers-reduced-transparency:reduce) { body.wb-shell .wb-game-top button.wb-game-title { background:var(--wl-surface); -webkit-backdrop-filter:none; backdrop-filter:none; } }
/* The game set aside for the workspace (game-workspace.mjs asideGame): the game waits where it was, unseen, and the
   game's part of the bar holds only "Back to the game" (and a failed save, should one fail). Coming back, the game
   fades in again as it did when it opened. */
body.wb-shell .wb-game-top button.wb-game-return { display:none; }
body.wb-game-away section.wb-game { visibility:hidden; pointer-events:none; animation:none; }
body.wb-shell.wb-game-away .wb-project-bar { gap:10px; }
body.wb-shell.wb-game-away .wb-project-bar .wb-projects-button { display:none; }
body.wb-game-away .wb-game-top { flex:none; }
body.wb-shell.wb-game-away .wb-game-top > :not(.wb-game-return, .wb-game-saved) { display:none; }
body.wb-shell.wb-game-away .wb-game-top button.wb-game-return { display:inline-flex; align-items:center; gap:7px; flex:none; height:32px; padding:0 12px 0 10px; border:0; border-radius:var(--r-md); background:var(--wl-selection-soft); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--wl-selection) 34%,transparent); color:var(--wl-text); font-size:var(--t-ui); font-weight:600; white-space:nowrap; cursor:pointer; animation:wl-fade var(--wl-short) var(--wl-ease-out); transition:background-color var(--wl-quick) var(--wl-ease), box-shadow var(--wl-quick) var(--wl-ease), transform var(--wl-quick) var(--wl-ease-out); }
body.wb-shell.wb-game-away .wb-game-top button.wb-game-return:hover { background:color-mix(in srgb,var(--wl-selection) 22%,transparent); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--wl-selection) 48%,transparent); }
body.wb-shell.wb-game-away .wb-game-top button.wb-game-return:active { transform:scale(.98); }
.wb-game-return > .wt-glyph { display:flex; color:var(--wl-selection); }
.wb-game-return > .wt-glyph svg { width:12px; height:12px; display:block; fill:currentColor; }
/* A tablet's bar has room for "Game"; a phone's only for the button itself, round as the game's menu button is in that
   place, and for the Hub's arrow without its word. */
.wb-game-return-short { display:none; }
@media (max-width:1000px) { .wb-game-return-long { display:none; } .wb-game-return-short { display:inline; } }
@media (max-width:640px) {
  body.wb-shell.wb-game-away .wb-game-top button.wb-game-return { width:32px; padding:0; justify-content:center; border-radius:var(--r-pill); }
  .wb-game-return-short { display:none; }
  body.wb-shell.wb-game-away .wb-projects-button > span:not(.wb-button-icon) { display:none; }
}

/* In its column the map takes its own shape (D-255, game-map.mjs shape): as wide as the card, as tall as the whole map
   is then, shrinking when there is less room, and its card ends where the map (and the people under it) end, so no
   empty space is left in the card. */
.wb-game-map.has-shape { flex:0 1 auto; height:auto; aspect-ratio:var(--map-ratio); }
.wb-game-card.is-map.is-shaped, .wb-game-card.is-map.is-shaped > .wb-game-card-body { flex:0 1 auto; }
.wb-game-card.is-map.is-shaped .wb-game-people { flex:0 0 auto; }
body.wb-game-float-resizing { -webkit-user-select:none; user-select:none; }
body.wb-game-float-resizing.is-nesw, body.wb-game-float-resizing.is-nesw * { cursor:nesw-resize !important; }
body.wb-game-float-resizing.is-nwse, body.wb-game-float-resizing.is-nwse * { cursor:nwse-resize !important; }
body.wb-game-float-resizing iframe { pointer-events:none; }
/* The panel and the map's column resize by the same grip (D-285, game-panel.mjs cornerGrip), in the corner at the foot
   of their last card that faces the story: the panel's lower left, the map's lower left on the right and lower right
   on the left. */
.wb-game-card-size { position:absolute; z-index:4; bottom:0; width:18px; height:18px; touch-action:none; }
.wb-game-card-size.is-bl { left:0; cursor:nesw-resize; }
.wb-game-card-size.is-br { right:0; cursor:nwse-resize; }
.wb-game-card-size::after { content:""; position:absolute; inset:5px; border:solid var(--wl-text-3); border-width:0; opacity:.5; transition:opacity var(--wl-quick) var(--wl-ease); }
.wb-game-card-size.is-bl::after { border-left-width:2px; border-bottom-width:2px; border-bottom-left-radius:4px; }
.wb-game-card-size.is-br::after { border-right-width:2px; border-bottom-width:2px; border-bottom-right-radius:4px; }
.wb-game-card:hover > .wb-game-card-size::after, body.wb-game-float-resizing .wb-game-card-size::after { opacity:1; }
/* At rest the corner shows nothing where a pointer can hover, so it never reads as a stray corner by a card's foot. */
@media (hover:hover) { .wb-game-card-size::after { opacity:0; } }
@media (max-width:1000px) { .wb-game-card-size { display:none; } }
@media (pointer:coarse) { .wb-game-card-size { width:28px; height:28px; } }
/* The map's own buttons (its levels, its tools and Places) show only while the pointer is over the map, a key has moved
   into them or the places list is open, so the rest of the time the map stands clean; a touch screen keeps them. */
@media (hover:hover) {
  .wb-game-map > :is(.wb-game-map-levels, .wb-game-map-where), .wb-game-map-canvas > .wb-game-map-controls { opacity:0; transition:opacity var(--wl-quick) var(--wl-ease); }
  .wb-game-map:is(:hover, :has(:focus-visible), :has(.wb-game-map-where.is-open)) > :is(.wb-game-map-levels, .wb-game-map-where),
  .wb-game-map:is(:hover, :has(:focus-visible), :has(.wb-game-map-where.is-open)) .wb-game-map-canvas > .wb-game-map-controls { opacity:1; }
}
/* ---- The map's own column on the right (D-299, game-panel.mjs renderMapSide): next to the story, with the cards after
   it, so a card opens between the map and the rail (the owner, 2026-11-16, D-325). Dragged by its head it slides along
   the window, lifted, and settles on the side it is let go nearer. ---- */
@media (min-width:641px) {
  .wb-game.is-map-right :is(.wb-game-left, .wb-game-panel) { order:1; }
  .wb-game-main > .wb-game-rail { order:2; }
}
@keyframes wb-game-right-in { from { opacity:0; transform:translateX(18px); } }
.wb-game.is-map-right .wb-game-left.is-opening { animation-name:wb-game-right-in; }
@media (prefers-reduced-motion:reduce) { @keyframes wb-game-right-in { from { opacity:0; } } }
.wb-game-left .wb-game-card-head.is-movable { cursor:grab; touch-action:none; }
.wb-game-left.is-dragging { z-index:8; cursor:grabbing; transition:none; }
.wb-game-left.is-dragging .wb-game-card { box-shadow:var(--wl-elev-pop); }
body.wb-game-map-moving, body.wb-game-map-moving * { cursor:grabbing !important; -webkit-user-select:none; user-select:none; }
body.wb-game-map-moving iframe { pointer-events:none; }
@media (min-width:641px) and (max-width:1000px) {
  /* With a card open the map stands beside it. Where the two don't both fit beside the rail (under about 870px with their
     usual widths) they share that room, each at most half, so neither runs off the window or lies over the other. A map
     made large keeps its place by the rail, and an open card lies over it. */
  body.wb-shell .wb-game.has-left-map .wb-game-panel:not(.is-map-large) { max-width:calc((100% - 48px) / 2); }
  body.wb-shell .wb-game.has-panel .wb-game-left:not(.is-map-large) { width:min(var(--left, 440px), calc(100% - 96px), calc(100% - 48px - min(var(--wb-panel-now, 0px), (100% - 48px) / 2))); }
  .wb-game.is-map-right .wb-game-left { left:auto; right:calc(48px + min(var(--wb-panel-now, 0px), (100% - 48px) / 2)); box-shadow:-10px 0 30px color-mix(in srgb, var(--wl-bg) 22%, transparent); }
  .wb-game.is-map-right .wb-game-left.is-map-large { right:48px; }
  /* The card's own fade onto the story would lie over the map beside it. */
  body.wb-shell .wb-game.has-left-map.has-panel .wb-game-panel::before { display:none; }
  body.wb-shell .wb-game:not(.is-new).has-left-map.is-map-right .wb-game-left::before { left:auto; right:100%; background:linear-gradient(to right, transparent, 60%, var(--wg-shade)); }
}
/* Two cards side by side (D-299, game-panel.mjs showPeek): each a column of its own, the same height, the newer first. */
.wb-game-stack.is-side { flex-direction:row; gap:12px; }
.wb-game-stack.is-side > .wb-game-card { flex:1 1 0; min-width:0; }

/* ---- Tokens next to each other stand as a small group, offset on screen by --gx and --gy (game-map.mjs
   groupTokens); after the map's first drawing they glide into place. ---- */
@property --gx { syntax:'<length>'; inherits:false; initial-value:0px; }
@property --gy { syntax:'<length>'; inherits:false; initial-value:0px; }
.wb-game-map .wh-map-marker.is-token.wb-game-token { transform:scale(calc(1 / var(--zoom, 1))) translate(calc(-50% + var(--gx)), calc(-50% + var(--gy))); }
/* A token's name keeps clear of its token at the token's size on screen (--r); where it sits around it is the shared
   rule for names under a token (home-page.css, .wh-map-label.is-under), which follows --gx and --gy too. */
.wb-game-map .wh-map-label.wb-game-token-label { --r:calc(max(10px, calc(16px * min(1, var(--token-n, 1))), var(--token-side, 30px) * var(--token-n, 1) * var(--zoom, 1)) / 2); }
.wb-game-map .wh-map-plane.is-grouping .wh-map-marker.wb-game-token { transition:box-shadow var(--wl-quick) var(--wl-ease), opacity var(--wl-quick) var(--wl-ease), --gx var(--wl-short) var(--wl-ease-out), --gy var(--wl-short) var(--wl-ease-out); }
.wb-game-map .wh-map-plane.is-grouping .wh-map-label.wb-game-token-label { transition:--gx var(--wl-short) var(--wl-ease-out), --gy var(--wl-short) var(--wl-ease-out); }
.wb-game-map .wh-map-marker.wb-game-token.is-grouped { z-index:1; }
.wb-game-map .wh-map-marker.wb-game-token.is-grouped.is-you, .wb-game-map .wh-map-marker.wb-game-token.is-lifted { z-index:2; }
.wb-game-map .wh-map-marker.wb-game-token.is-grouped:not(.is-speaking, .is-lit, .is-selected, .is-lifted) { box-shadow:0 0 0 2px var(--wl-bg), 0 1px 4px color-mix(in srgb, var(--wl-bg) 30%, transparent); }
/* A token whose picture is a cut-out takes the picture's shape: no disc, ring or round shadow. The rings that say
   something (you, a foe, speaking, its turn, aimed at, lifted, gathered) still show. */
.wb-game-map .wh-map-marker.is-token.wb-game-token:is(.is-cutout, :has(> .is-cutout)) { background:none; overflow:visible; }
.wb-game-map .wh-map-marker.is-token.wb-game-token:not(.is-you, .is-foe):is(.is-cutout, :has(> .is-cutout)) { border-color:transparent; }
.wb-game-map .wh-map-marker.is-token.wb-game-token:not(.is-speaking, .is-turn, .is-aim, .is-lifted, .is-grouped):is(.is-cutout, :has(> .is-cutout)) { box-shadow:none; }
@media (prefers-reduced-motion:reduce) { .wb-game-map .wh-map-plane.is-grouping :is(.wh-map-marker.wb-game-token, .wh-map-label.wb-game-token-label) { transition:none; } }

/* ---- Sync is a page of its own over the game: it starts under the top bar, and while it's open the bar is solid
   again, so its way back is never under the bar (game-sync.mjs). The backdrop and story chips hide while Sync is open
   so nothing bleeds behind the bar before or after pulling changes. ---- */
body.wb-shell .wb-game:not(.is-new) > .wl-sync { top:var(--wb-bar-height); }
body.wb-game-open.wb-game-syncing .wb-project-bar.wb-project-bar.wb-project-bar { background:var(--wl-bg,var(--wl-bg)); border-bottom-color:var(--wl-line,var(--wl-line)); }
body.wb-game-open.wb-game-syncing .wb-game-backdrop { visibility:hidden; }
body.wb-game-open.wb-game-syncing .wb-game-chips { display:none; }

/* ---- The message box on a phone: a few lines tall and no scroll bar. When what you write is longer, a button at its
   corner opens it over the story until you send or close it (game-story.mjs renderComposer). ---- */
body .wb-game-composer > button.wl-composer-expand { display:none; }
@media (max-width:640px) {
  body.wb-shell .wb-game-composer { position:relative; }
  body.wb-shell .wb-game-composer textarea.wb-game-input { max-height:148px; scrollbar-width:none; }
  body.wb-shell .wb-game-composer textarea.wb-game-input::-webkit-scrollbar { display:none; }
  body.wb-shell .wb-game-composer.has-more > textarea.wb-game-input { padding-right:34px; }
  body .wb-game-composer.has-more > button.wl-composer-expand { position:absolute; right:6px; z-index:1; display:flex; align-items:center; justify-content:center; width:30px; height:30px; margin-top:-2px; padding:0; border:0; border-radius:8px; background:transparent; box-shadow:none; color:var(--wl-text-3); cursor:pointer; animation:wl-composer-expand-in var(--wl-short) var(--wl-ease-out); }
  body .wb-game-composer > button.wl-composer-expand:is(:hover,:focus-visible,[aria-pressed="true"]) { background:var(--wl-raised); color:var(--wl-text); outline:none; }
  body .wb-game-composer > button.wl-composer-expand svg { width:16px; height:16px; }
  body.wb-shell .wb-game-composer-wrap.is-expanded { position:absolute; inset:0; z-index:8; display:flex; flex-direction:column; padding-top:8px; background:var(--wl-bg); }
  body.wb-shell .wb-game-composer-wrap.is-expanded > .wb-game-composer { flex:1 1 auto; min-height:0; display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto minmax(0,1fr) auto; column-gap:0; animation:wl-composer-open var(--wl-long) var(--wl-ease-out); }
  body.wb-shell .wb-game-composer-wrap.is-expanded > .wb-game-composer > * { grid-column:1 / -1; }
  body.wb-shell .wb-game-composer-wrap.is-expanded > .wb-game-composer > button.wl-composer-face { grid-column:1; grid-row:1; align-self:center; float:none; }
  body.wb-shell .wb-game-composer-wrap.is-expanded > .wb-game-composer > .wl-composer-identity { grid-column:2; grid-row:1; }
  body.wb-shell .wb-game-composer-wrap.is-expanded > .wb-game-composer > textarea.wb-game-input { grid-row:2; align-self:stretch; height:auto; max-height:none; scrollbar-width:thin; }
  body.wb-shell .wb-game-composer-wrap.is-expanded > .wb-game-composer > .wb-game-composer-row { grid-row:3; }
  .wb-game-column:has(> .wb-game-composer-wrap.is-expanded) > .wb-game-latest { display:none; }
}
@keyframes wl-composer-expand-in { from { opacity:0; transform:scale(.85); } }
@keyframes wl-composer-open { from { opacity:.5; transform:translateY(16px); } }
@media (prefers-reduced-motion:reduce) { @keyframes wl-composer-expand-in { from { opacity:0; } } @keyframes wl-composer-open { from { opacity:.5; } } }

/* ---- One frame round the story. The message box is the next player card: as wide as the cards, on the same centre
   (both keep room for the story's scroll bar on each side), with its face and words where theirs are. Over a picture
   the foot is shaded as lightly as the top and the story fades at both edges rather than being cut, so the scene runs
   to the bottom as it does to the top. ---- */
/* The story and the panel scroll with no bar showing (the wheel, a finger or the keys move them), so nothing stands
   beside the story or the card; with no bar on either, the story and the message box keep the same edges. */
body.wb-shell .wb-game :is(.wb-game-scroll, .wb-game-stack) { scrollbar-width:none; }
body.wb-shell .wb-game :is(.wb-game-scroll, .wb-game-stack)::-webkit-scrollbar { display:none; }
body.wb-shell .wb-game-composer-wrap { overflow:hidden; scrollbar-width:none; }
@media (min-width:641px) {
  body.wb-shell .wb-game-composer-wrap { padding-inline:30px; }
  body.wb-shell .wb-game-composer { max-width:800px; }
  body.wb-shell .wb-game-composer:has(> .wl-composer-face) { grid-template-columns:32px minmax(0,1fr); column-gap:12px; padding:18px 22px 12px; }
  body .wb-game-composer > button.wl-composer-face { width:32px; height:32px; margin-top:0; }
  .wb-game-composer > .wl-composer-face > .wb-game-face { width:30px; height:30px; box-shadow:0 0 0 1px var(--wl-line-strong); }
  .wb-game-composer > .wl-composer-face:is(:hover,:focus-visible) > .wb-game-face { box-shadow:0 0 0 1px var(--wl-line-strong), 0 0 0 5px color-mix(in srgb,var(--wl-accent) 20%,transparent); }
}
body .wb-game-composer .wl-composer-identity > button.wl-composer-character { color:var(--wl-text); }
body.wb-shell .wb-game-composer:not(.is-direction) { background:var(--wg-card,var(--wl-bg)); border-color:var(--wg-line,var(--wl-line)); box-shadow:var(--wl-elev-card); }
body.wb-shell .wb-game.has-backdrop .wb-game-composer:not(.is-direction) { background:var(--wg-card,color-mix(in srgb,var(--wl-bg) 94%,transparent)); border-color:var(--wg-line,color-mix(in srgb,var(--wl-text) 13%,transparent)); }
body.wb-shell .wb-game .wb-game-composer:focus-within { border-color:var(--wl-selection); }
body.wb-shell .wb-game.has-backdrop .wb-game-composer-wrap:not(.is-expanded) { background:transparent; }
body.wb-shell .wb-game.has-backdrop .wb-game-scroll { -webkit-mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) 28px, var(--wl-bg) calc(100% - 20px), transparent); mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) 28px, var(--wl-bg) calc(100% - 20px), transparent); }
/* The story runs up under the top bar and fades out toward the window's top edge, so no line under the bar marks
   where it stops: only the menu button and the window's buttons sit over it. Scrolled to the top, the first answer
   starts where it did. On a phone the bar is solid and the story stays under it. */
@media (min-width:641px) {
  body.wb-shell .wb-game:not(.is-new) .wb-game-scroll { margin-top:calc(-1 * var(--wb-bar-height)); padding-top:var(--wb-bar-height); -webkit-mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) calc(var(--wb-bar-height) + 16px)); mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) calc(var(--wb-bar-height) + 16px)); }
  body.wb-shell .wb-game.has-backdrop:not(.is-new) .wb-game-scroll { -webkit-mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) calc(var(--wb-bar-height) + 16px), var(--wl-bg) calc(100% - 20px), transparent); mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) calc(var(--wb-bar-height) + 16px), var(--wl-bg) calc(100% - 20px), transparent); }
  body.wb-shell .wb-game:not(.is-new) .wb-game-column::before { top:calc(-1 * var(--wb-bar-height)); }
}

/* ---- One dark set for the game, from the app's deep blue (tokens.css). Cards and writing are the page's colour at
   94%; the rail, its panel and the top bar's pills are frosted glass that takes the scene's colours (game-polish's
   rail section); menus over the story, like the narrator picker, are glass at 84% so their lists read. One hairline;
   your own cards are told apart by your face, not a tint. Set on the body so the picker, which opens on the body, has
   them too. ---- */
body.wb-game-open { --wg-card:color-mix(in srgb,var(--wl-bg) 94%,transparent); --wg-glass:color-mix(in srgb,var(--wl-bg) 84%,transparent); --wg-line:color-mix(in srgb,var(--wl-text) 13%,transparent); --wg-hover:color-mix(in srgb,var(--wl-text) 8%,transparent); --wg-shadow:var(--wl-elev-card); }
body.wb-shell .wb-game.has-backdrop .wb-game-story > .wb-game-turn.is-gm { border-color:var(--wg-line); }
body.wb-shell button.wb-game-latest { border-color:var(--wg-line); background:var(--wg-frost); -webkit-backdrop-filter:var(--wg-frost-blur); backdrop-filter:var(--wg-frost-blur); transition:transform var(--wl-quick) var(--wl-ease-out); }
/* Back to latest rises in when you scroll up, presses like the rail's buttons, and sinks away with its arrow dipping
   as the story glides down to its end (game-workspace.mjs). */
body.wb-shell button.wb-game-latest:not([hidden]) { animation:wl-latest-in var(--wl-short) var(--wl-ease-out); }
body.wb-shell button.wb-game-latest:active { transform:translateX(-50%) scale(.96); }
body.wb-shell button.wb-game-latest.is-leaving { animation:wl-latest-out var(--wl-short-out) var(--wl-ease) forwards; pointer-events:none; }
body.wb-shell button.wb-game-latest.is-leaving .wt-glyph { animation:wl-latest-dip var(--wl-short-out) var(--wl-ease-out); }
@keyframes wl-latest-in { from { opacity:0; transform:translate(-50%, 8px) scale(.96); } }
@keyframes wl-latest-out { 30% { opacity:1; transform:translate(-50%, -2px) scale(.98); } to { opacity:0; transform:translate(-50%, 12px) scale(.96); } }
@keyframes wl-latest-dip { 45% { transform:translateY(3px); } }
/* On a phone (D-355) it is a small round arrow at the right, over the box, out of the way of the words; its name stays
   on the button for a screen reader. */
@media (max-width:640px) {
  body.wb-shell button.wb-game-latest { left:auto; right:14px; justify-content:center; width:40px; height:40px; padding:0; gap:0; border-radius:50%; transform:none; }
  body.wb-shell button.wb-game-latest > span:not(.wt-glyph) { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  body.wb-shell button.wb-game-latest .wt-glyph svg { width:16px; height:16px; }
  body.wb-shell button.wb-game-latest:not([hidden]) { animation-name:wl-latest-in-round; }
  body.wb-shell button.wb-game-latest:active { transform:scale(.96); }
  body.wb-shell button.wb-game-latest.is-leaving { animation-name:wl-latest-out-round; }
}
@keyframes wl-latest-in-round { from { opacity:0; transform:translateY(8px) scale(.96); } }
@keyframes wl-latest-out-round { 30% { opacity:1; transform:translateY(-2px) scale(.98); } to { opacity:0; transform:translateY(12px) scale(.96); } }
@media (prefers-reduced-motion:reduce) { @keyframes wl-latest-in { from { opacity:0; } } @keyframes wl-latest-out { to { opacity:0; } } @keyframes wl-latest-dip { to { opacity:1; } } @keyframes wl-latest-in-round { from { opacity:0; } } @keyframes wl-latest-out-round { to { opacity:0; } } }

/* ---- Paint the scene: the message box turned into the picture's choices (game-paint.mjs). Who and where are tiles
   of their pictures, lit with a check when they're in; the shapes are small frames; Paint is the one accent. Add
   floats a picker like the narrator's. A picture in the story keeps its shape, no taller than most of the screen,
   with its menu in its corner; while it paints, its card already has that shape. ---- */
body.wb-shell .wb-game-composer.wl-paint { display:flex; flex-direction:column; gap:12px; padding:14px 16px; animation:wl-paint-in var(--wl-short) var(--wl-ease-out); }
@keyframes wl-paint-in { from { opacity:0; transform:translateY(6px); } }
.wl-paint-head { display:flex; align-items:center; gap:10px; }
.wl-paint-head > .wl-paint-mark { display:flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; border-radius:10px; background:color-mix(in srgb,var(--wl-accent) 14%,transparent); color:var(--wl-accent); }
.wl-paint-mark svg { width:16px; height:16px; }
.wl-paint-title { display:flex; flex-direction:column; flex:1; min-width:0; }
.wl-paint-title strong { color:var(--wl-text); font-size:14px; font-weight:650; }
.wl-paint-title small { overflow:hidden; color:var(--wl-text-3); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
body .wl-paint button.wl-paint-close { flex:none; width:30px; height:30px; border-radius:8px; color:var(--wl-text-2); }
.wl-paint-label { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:-4px; color:var(--wl-text-2); font-size:12px; font-weight:600; }
.wl-paint-label small { overflow:hidden; color:var(--wl-text-3); font-size:11.5px; font-weight:400; text-overflow:ellipsis; white-space:nowrap; }
.wl-paint-refs { display:flex; gap:8px; margin:-2px; padding:2px; overflow-x:auto; scrollbar-width:none; }
body button.wl-paint-ref { position:relative; flex:none; width:84px; height:84px; padding:0; overflow:clip; border:1px solid var(--wg-line); border-radius:12px; background:var(--wl-inset); box-shadow:none; cursor:pointer; transition:border-color var(--wl-quick) var(--wl-ease), transform var(--wl-quick) var(--wl-ease-out); }
body button.wl-paint-ref:hover { border-color:color-mix(in srgb,var(--wl-text) 32%,transparent); }
body button.wl-paint-ref:active { transform:scale(.96); }
.wl-paint-ref > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.45; filter:saturate(.5); transition:opacity var(--wl-quick) var(--wl-ease), filter var(--wl-quick) var(--wl-ease); }
.wl-paint-ref.is-on > img { opacity:1; filter:none; }
body button.wl-paint-ref.is-on { border-color:color-mix(in srgb,var(--wl-accent) 75%,transparent); }
.wl-paint-ref-name { position:absolute; left:0; right:0; bottom:0; display:flex; align-items:center; gap:4px; padding:16px 7px 6px; background:linear-gradient(transparent, color-mix(in srgb, var(--wl-bg) 72%, transparent)); color:var(--wl-text); font-size:11px; font-weight:600; line-height:1.2; text-align:left; }
.wl-paint-ref-name > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wl-paint-ref-name .wt-glyph { display:flex; flex:none; opacity:.8; } .wl-paint-ref-name svg { width:11px; height:11px; }
.wl-paint-ref-check { position:absolute; top:6px; right:6px; display:none; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; background:var(--wl-accent); color:var(--wl-on-accent); box-shadow:0 1px 4px color-mix(in srgb, var(--wl-bg) 35%, transparent); }
.wl-paint-ref.is-on .wl-paint-ref-check { display:flex; }
.wl-paint-ref-check svg { width:12px; height:12px; stroke-width:3; }
body button.wl-paint-ref.is-add { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; border-style:dashed; background:transparent; color:var(--wl-text-2); font-size:12px; font-weight:550; }
body button.wl-paint-ref.is-add:hover { color:var(--wl-text); }
.wl-paint-ref.is-add svg { width:18px; height:18px; }
body .wl-paint textarea.wl-paint-words { box-sizing:border-box; width:100%; min-height:58px; max-height:160px; padding:10px 12px; border:1px solid var(--wg-line); border-radius:10px; background:color-mix(in srgb,var(--wl-bg) 55%,transparent); box-shadow:none; color:var(--wl-text); font:inherit; font-size:14px; line-height:1.5; resize:vertical; }
body .wl-paint textarea.wl-paint-words:focus { border-color:var(--wl-selection); box-shadow:none; outline:none; }
.wl-paint-shapes { display:flex; flex-wrap:wrap; gap:6px; }
body button.wl-paint-shape { display:inline-flex; align-items:center; gap:7px; height:32px; padding:0 12px 0 10px; border:1px solid var(--wg-line); border-radius:999px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12px; font-weight:550; 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.wl-paint-shape:hover { color:var(--wl-text); background:var(--wg-hover); }
body button.wl-paint-shape[aria-pressed="true"] { border-color:color-mix(in srgb,var(--wl-accent) 60%,transparent); background:color-mix(in srgb,var(--wl-accent) 12%,transparent); color:var(--wl-text); }
.wl-paint-frame { display:block; flex:none; height:13px; border:1.5px solid currentColor; border-radius:3px; }
.wl-paint-foot { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.wl-paint-painter { display:inline-flex; align-items:center; gap:4px; min-width:0; max-width:min(320px, 100%); height:32px; padding:0 2px 0 10px; border:1px solid var(--wg-line); border-radius:999px; color:var(--wl-text-2); }
.wl-paint-painter > .wt-glyph { display:flex; flex:none; } .wl-paint-painter svg { width:14px; height:14px; }
body button.wl-paint-painter { gap:6px; padding:0 10px; background:transparent; box-shadow:none; color:var(--wl-text); font-size:12px; font-weight:500; cursor:pointer; }
body button.wl-paint-painter:hover { background:var(--wl-raised); }
.wl-paint-painter-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wl-paint-painter-price { flex:none; color:var(--wl-text-3); font-size:11px; }
.wl-paint-painter-more { color:var(--wl-text-3); } .wl-paint-painter-more svg { width:12px; height:12px; }
.wl-paint-note { flex:1 1 120px; min-width:0; color:var(--wl-text-2); font-size:12px; }
body .wl-paint button.wl-paint-cancel { height:34px; padding:0 12px; border:0; border-radius:10px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:13px; cursor:pointer; }
body .wl-paint button.wl-paint-cancel:hover { color:var(--wl-text); background:var(--wg-hover); }
body .wl-paint button.wl-paint-go { display:inline-flex; align-items:center; gap:7px; height:36px; padding:0 16px 0 13px; border:0; border-radius:10px; background:var(--wl-accent); box-shadow:none; color:var(--wl-on-accent); font-size:13px; font-weight:650; cursor:pointer; transition:transform var(--wl-quick) var(--wl-ease-out), filter var(--wl-quick) var(--wl-ease); }
body .wl-paint button.wl-paint-go:hover { filter:brightness(1.06); } body .wl-paint button.wl-paint-go:active { transform:scale(.96); }
.wl-paint-go svg { width:15px; height:15px; }
.wl-paint-picker { position:fixed; z-index:60; display:flex; flex-direction:column; box-sizing:border-box; max-height:min(520px, calc(100vh - 24px)); padding:10px; border:1px solid var(--wg-line, var(--wl-glass-border)); border-radius:16px; background:var(--wg-glass, var(--wl-glass)); -webkit-backdrop-filter:blur(22px) saturate(125%); backdrop-filter:blur(22px) saturate(125%); box-shadow:var(--wl-elev-pop); color:var(--wl-text); font-size:13px; transform-origin:bottom left; animation:wl-picker-in var(--wl-short) var(--wl-ease-out) both; }
.wl-paint-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(86px, 1fr)); gap:8px; min-height:0; margin:0 -2px; padding:4px 2px; overflow-y:auto; }
.wl-paint-grid button.wl-paint-ref { width:auto; height:auto; aspect-ratio:1; }
.wl-paint-quiet { grid-column:1 / -1; margin:10px 4px; color:var(--wl-text-3); font-size:12px; }
.wl-paint-picker-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:6px; padding-top:8px; border-top:1px solid var(--wg-line, var(--wl-line)); color:var(--wl-text-3); font-size:12px; }
body .wl-paint-picker button.wl-paint-done { height:30px; padding:0 14px; border:0; border-radius:999px; background:var(--wl-accent); box-shadow:none; color:var(--wl-on-accent); font-size:12.5px; font-weight:650; cursor:pointer; }
.wb-game-turn.is-picture, .wb-game-turn.is-painting { display:flex; justify-content:center; }
body.wb-shell .wb-game-picture { width:min(100%, calc(min(70vh, 680px) * var(--shape, 1.7778))); border-color:var(--wg-line); border-radius:var(--r-xl); box-shadow:var(--wl-elev-card); }
body .wb-game-picture button.wb-game-picture-more { position:absolute; top:10px; right:10px; display:flex; align-items:center; justify-content:center; width:32px; height:32px; padding:0; border:0; border-radius:50%; background:color-mix(in srgb, var(--wl-bg) 58%, transparent); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); box-shadow:none; color:var(--wl-text); opacity:0; transition:opacity var(--wl-quick) var(--wl-ease); cursor:pointer; }
.wb-game-turn.is-picture:hover button.wb-game-picture-more, body .wb-game-picture button.wb-game-picture-more:focus-visible { opacity:1; }
@media (hover:none) { body .wb-game-picture button.wb-game-picture-more { opacity:1; } }
body.wb-shell .wb-game-picture.is-pending { gap:10px; background:linear-gradient(110deg, var(--wg-card, var(--wl-surface)) 35%, color-mix(in srgb,var(--wl-text) 7%,var(--wg-card, var(--wl-surface))) 50%, var(--wg-card, var(--wl-surface)) 65%) 0 0 / 300% 100%; color:var(--wl-text-2); animation:wl-paint-shimmer 2.4s linear infinite; }
@keyframes wl-paint-shimmer { from { background-position:100% 0; } to { background-position:-200% 0; } }
.wb-game-painting-mark { display:flex; color:var(--wl-accent); } .wb-game-painting-mark svg { width:22px; height:22px; }
.wb-game-painting-after { color:var(--wl-text-3); font-size:11.5px; }
@media (max-width:640px) {
  body.wb-shell .wb-game-composer.wl-paint { gap:10px; padding:12px; }
  .wl-paint-title small { display:none; }
  body button.wl-paint-ref { width:72px; height:72px; }
  .wl-paint-shapes { flex-wrap:nowrap; margin:0 -12px; padding:0 12px; overflow-x:auto; scrollbar-width:none; }
  body button.wl-paint-shape { flex:none; }
  .wl-paint-painter { flex:1 1 100%; max-width:none; }
  .wl-paint-note { flex-basis:100%; order:-1; }
  body .wl-paint button.wl-paint-cancel { margin-left:auto; }
}
@media (prefers-reduced-motion:reduce) { body.wb-shell .wb-game-picture.is-pending { animation:none; } @keyframes wl-paint-in { from { opacity:0; } } }

/* ---- Boris in a game sits on the panel's card like any other page: no surface of its own, the game's hairline,
   your messages and its open tab a quiet raised tint, and its message box the story's (the same line, the blue edge
   while you write). ---- */
body.wb-shell .wb-game-card.is-boris .wt-orbis-panel { border-color:var(--wg-line); background:transparent; -webkit-backdrop-filter:none; backdrop-filter:none; }
body.wb-shell .wb-game-card.is-boris .wt-orbis-tab.is-active { background:color-mix(in srgb,var(--wl-text) 9%,transparent); }
body.wb-shell .wb-game-card.is-boris .wt-orbis-bubble { border:1px solid var(--wg-line); background:color-mix(in srgb,var(--wl-text) 8%,transparent); color:var(--wl-text); }
body.wb-shell .wb-game-card.is-boris .wt-orbis-composer { border-color:var(--wg-line); background:color-mix(in srgb,var(--wl-text) 3%,transparent); box-shadow:none; }
body.wb-shell .wb-game-card.is-boris .wt-orbis-composer:focus-within { border-color:var(--wl-selection); box-shadow:none; }
body.wb-shell .wb-game-card.is-boris .wt-orbis-composer textarea.wt-orbis-input:is(:focus, :focus-visible) { border:0; outline:0; box-shadow:none; }
body.wb-shell .wb-game-card.is-boris :is(button.wt-orbis-share, button.wt-orbis-send) { background:color-mix(in srgb,var(--wl-text) 9%,transparent); }
body.wb-shell .wb-game-card.is-boris :is(button.wt-orbis-mode, select.wt-boris-image-shape) { border-color:var(--wg-line); background-color:transparent; box-shadow:none; }
/* In a card's narrow column: no scroll bars, the chat's edges fade as the story's do (D-284); the token count sits at
   the top right, level with the page Boris sees, so +, Image, the model and send keep one row, as the game's own
   message box keeps the narrator beside send. With messages waiting in the queue it goes back into the row. */
body.wb-shell .wb-game-card.is-boris :is(.wt-orbis-chat, .wt-orbis-receipt-text, .wt-orbis-thought-text) { scrollbar-width:none; }
body.wb-shell .wb-game-card.is-boris :is(.wt-orbis-chat, .wt-orbis-receipt-text, .wt-orbis-thought-text)::-webkit-scrollbar { display:none; }
body.wb-shell .wb-game-card.is-boris .wt-orbis-chat { -webkit-mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) 18px, var(--wl-bg) calc(100% - 14px), transparent); mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) 18px, var(--wl-bg) calc(100% - 14px), transparent); }
body.wb-shell .wb-game-card.is-boris .wt-orbis-composer { position:relative; }
body.wb-shell .wb-game-card.is-boris .wt-orbis-composer-context { padding-right:62px; }
body.wb-shell .wb-game-card.is-boris .wt-orbis-composer-row > button.wt-orbis-ring { position:absolute; top:6px; right:6px; }
body.wb-shell .wb-game-card.is-boris .wt-orbis-composer-row > .wt-orbis-composer-actions { margin-inline-start:4px; }
body.wb-shell .wb-game-card.is-boris .wt-orbis-composer:has(> .wt-orbis-queue:not([hidden])) .wt-orbis-composer-row > button.wt-orbis-ring { position:static; }
body.wb-shell .wb-game-card.is-boris .wt-orbis-composer:has(> .wt-orbis-queue:not([hidden])) .wt-orbis-composer-context { padding-right:0; }

/* ---- Your own turn: its tools sit inside the card, level with your name, so nothing hangs over its edge ---- */
body.wb-shell .wb-game .wb-game-turn.is-player>.wb-game-turn-tools { inset:10px 10px auto auto; padding:0; border:0; background:transparent; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }

/* ---- Your action while you write it (game-story renderComposer): the copy behind the box ---- */
body.wb-shell .wb-game-composer { position:relative; }
body.wb-shell .wb-game-composer>textarea.wb-game-input { position:relative; z-index:1; }
body.wb-shell .wb-game-composer>textarea.wb-game-input.has-look { color:transparent; caret-color:var(--wl-text); }
.wb-game-input-look { position:absolute; z-index:0; box-sizing:border-box; margin:0; overflow:hidden; white-space:pre-wrap; overflow-wrap:break-word; color:var(--wl-text); pointer-events:none; }
.wb-game-input-look .wl-act { font-style:italic; color:var(--wl-text-2); }
.wb-game-input-look .wl-act-mark { color:var(--wl-text-3); }

/* ---- Before the first words: what the narrator is thinking about, over two shimmering lines ---- */
.wl-live-wait { display:grid; gap:12px; align-self:stretch; width:100%; padding:2px 0 8px; animation:wl-fade var(--wl-short) var(--wl-ease-out); }
.wl-live-wait-head { display:flex; align-items:center; gap:8px; min-width:0; margin:0 0 4px; color:var(--wl-text-3); font-size:var(--t-ui); line-height:20px; }
.wl-live-wait-head>span:not(.wl-live-dots) { flex:none; }
.wl-live-wait-head strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--wl-text); font-weight:500; }
.wl-live-dots { display:inline-flex; gap:3px; flex:none; }
.wl-live-dots i { width:4px; height:4px; border-radius:50%; background:var(--wl-text-2); animation:wl-live-dot 1.2s var(--wl-ease) infinite; }
.wl-live-dots i:nth-child(2) { animation-delay:.16s; }
.wl-live-dots i:nth-child(3) { animation-delay:.32s; }
@keyframes wl-live-dot { 0%,80%,100% { opacity:.25; transform:translateY(0); } 40% { opacity:1; transform:translateY(-2px); } }
.wl-live-wait-line { position:relative; display:block; height:12px; overflow:hidden; border-radius:var(--r-pill); background:var(--wl-raised); }
.wl-live-wait-line::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--wl-text) 9%,transparent),transparent); transform:translateX(-100%); animation:wl-live-shimmer 1.6s var(--wl-ease) infinite; }
.wl-live-wait-line+.wl-live-wait-line::after { animation-delay:.2s; }
@keyframes wl-live-shimmer { to { transform:translateX(100%); } }
@media (prefers-reduced-motion:reduce) { .wl-live-dots i, .wl-live-wait-line::after { animation:none; } .wl-live-dots i { opacity:.6; } }

/* ── The Craft play pass (.design/game-redesign-plan.md) ───────────────────────
   Craft's play screen, measured from reference/craft-replay: the opening is a
   poster — eyebrow in micro caps, the game's name in the title face, one
   primary action in steel; the composer is a calm tray whose rim lights
   while it holds you; the send button is filled steel, without a glow; the
   narrator's byline is a micro cap; each new turn rises in. Delete this block
   to return to the previous play surface. */

/* The opening: a poster, not a form. */
body.wb-shell .wb-game-eyebrow { color: var(--wl-text-3); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
body.wb-shell .wb-game-opening h2 { font-family: var(--wl-font-title); font-size: var(--t-title-page); line-height: 1.3; font-weight: 400; letter-spacing: 0; text-transform: none; }
body.wb-shell .wb-game-opening > * { animation: wl-in var(--wl-long, 420ms) var(--wl-ease-out, ease-out) backwards; }
body.wb-shell .wb-game-opening > :nth-child(2) { animation-delay: 70ms; }
body.wb-shell .wb-game-opening > :nth-child(3) { animation-delay: 130ms; }
body.wb-shell .wb-game-opening > :nth-child(4) { animation-delay: 190ms; }
body .wb-game-opening button.wb-game-begin { height: 40px; padding: 0 18px 0 14px; border: 0; border-radius: var(--r-lg); background: var(--wl-accent); color: var(--wl-on-accent); box-shadow: var(--wl-elev-card); animation: wl-in var(--wl-long, 420ms) 190ms var(--wl-ease-out, ease-out) backwards; transition: background var(--wl-quick, 120ms) var(--wl-ease, ease), transform var(--wl-quick, 120ms) var(--wl-ease, ease); }
body .wb-game-opening button.wb-game-begin:hover { background: var(--wl-highlight); transform: translateY(-1px); }
body .wb-game-opening button.wb-game-begin:active { transform: translateY(0) scale(.985); }

/* The story: the narrator's byline is a micro cap; the newest answer carries a
   breath of accent at its rim. A new turn rises in only once (.is-new, atlas-system.css),
   not each time the story is redrawn. */
body.wb-shell .wb-game-turn-who { color: var(--wl-text-3); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
body.wb-shell .wb-game-turn.is-gm.is-latest { box-shadow: 0 0 0 1px color-mix(in srgb, var(--wl-accent) 20%, transparent), var(--wl-elev-card); }
body.wb-shell .wb-game-scene-name { color: var(--wl-text-3); font-family: var(--wl-font-ui); font-size: var(--t-help); letter-spacing: 0; text-transform: none; }
body.wb-shell .wb-game-scene-break .wb-game-name { 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; }

/* The composer: a calm tray. Its rim lights while it holds you; the send button
   is the one filled thing (steel), with a lift. */
body.wb-shell .wb-game-composer { border-radius: var(--r-xl); border-color: var(--wg-line, var(--wl-glass-line)); }
body.wb-shell .wb-game-composer:focus-within { border-color: color-mix(in srgb, var(--wl-selection) 45%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--wl-selection) 22%, transparent), var(--wl-elev-card); }
body .wb-game-composer button.wb-game-tool { border-radius: 10px; }
body .wb-game-composer button.wb-game-send { width: 36px; height: 36px; background: var(--wl-accent, var(--wl-accent)); color: var(--wl-on-accent, var(--wl-on-accent)); box-shadow: none; transition: background var(--wl-quick, 120ms) var(--wl-ease, ease), transform var(--wl-quick, 120ms) var(--wl-ease, ease), box-shadow var(--wl-short, 220ms) var(--wl-ease, ease); }
body .wb-game-composer button.wb-game-send:hover { background: var(--wl-highlight); transform: translateY(-1px); box-shadow: none; }
body .wb-game-composer button.wb-game-send:active { transform: translateY(0) scale(.96); }

/* The rail: glass over the world, calmer corners, a lift under the pointer. */
body button.wb-game-rail-item, body button.wb-game-rail-add { border-radius: 12px; transition: background var(--wl-quick, 120ms) var(--wl-ease, ease), color var(--wl-quick, 120ms) var(--wl-ease, ease), transform var(--wl-quick, 120ms) var(--wl-ease, ease); }
body button.wb-game-rail-item:hover, body button.wb-game-rail-add:hover { transform: translateY(-1px); }
body button.wb-game-rail-item.is-active::before { background: var(--wl-selection); }

/* The pass keeps stillness under reduced motion. */
@media (prefers-reduced-motion: reduce) {
  body.wb-shell .wb-game-opening > *, body .wb-game-opening button.wb-game-begin { animation: none; }
  body.wb-shell .wb-game-story > .wb-game-turn { animation: none; }
  body .wb-game-opening button.wb-game-begin, body .wb-game-composer button.wb-game-send, body button.wb-game-rail-item, body button.wb-game-rail-add { transform: none !important; }
}

/* ---- The test ground (D-157, test-ground.mjs): the game screen on a copy of the world that is never saved ----
   The top bar says the world's name on the menu, with a pill in its middle (Test ground, Start over, Back), and a
   brass edge runs round the window. On a phone the pill keeps its name, and Start over and Back are icons. */
body { --wl-test: var(--wl-warning); }
body.wl-testing::after { content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--wl-test) 70%, transparent), inset 0 0 40px color-mix(in srgb, var(--wl-test) 10%, transparent); }
.wb-game-top.is-test .wb-game-drag { display: flex; align-items: center; justify-content: center; min-width: 0; }
.wl-test-pill { -webkit-app-region: no-drag; display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 4px 0 13px; border: 1px solid color-mix(in srgb, var(--wl-test) 38%, transparent); border-radius: var(--r-pill, 999px); background: color-mix(in srgb, var(--wl-test) 9%, color-mix(in srgb, var(--wl-bg) 72%, transparent)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--wl-text-2); font-size: 12.5px; white-space: nowrap; }
.wl-test-pill-name { display: inline-flex; align-items: center; gap: 7px; padding-right: 8px; color: var(--wl-text); font-weight: 600; cursor: default; }
.wl-test-pill .wt-glyph { display: flex; }
.wl-test-pill .wt-glyph svg { width: 14px; height: 14px; display: block; }
.wl-test-pill-name .wt-glyph { color: var(--wl-test); }
body .wl-test-pill button.wl-test-pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; margin: 0; padding: 0 11px; border: 0; border-radius: var(--r-pill, 999px); background: transparent; box-shadow: none; color: var(--wl-text); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background var(--wl-quick) var(--wl-ease); }
body .wl-test-pill button.wl-test-pill-btn + button.wl-test-pill-btn { background: color-mix(in srgb, var(--wl-text) 8%, transparent); }
body .wl-test-pill button.wl-test-pill-btn:hover { background: color-mix(in srgb, var(--wl-text) 12%, transparent); }
body .wl-test-pill button.wl-test-pill-btn:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: 1px; }
.wl-test-pill-btn .wt-glyph svg { width: 13px; height: 13px; color: var(--wl-text-2); }
@media (max-width: 640px) {
  body.wb-shell .wb-game-top.is-test .wb-game-drag { display: flex; flex: none; }
  body.wb-shell .wb-game-top.is-test button.wb-game-title { flex: none; padding: 0 11px; }
  .wb-game-top.is-test .wb-game-title-text { display: none; }
  .wl-test-pill { gap: 2px; padding: 0 3px 0 10px; }
  .wl-test-pill-name { padding-right: 4px; }
  body .wl-test-pill button.wl-test-pill-btn { width: 34px; height: 28px; padding: 0; justify-content: center; }
  body .wl-test-pill button.wl-test-pill-btn > span:not(.wt-glyph) { display: none; }
  .wl-test-pill-btn .wt-glyph svg { width: 15px; height: 15px; }
}

/* How the test was set up, at the top of its story, and what changed in it since. */
.wb-game-turn.is-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 4px 0 6px; color: var(--wl-text-3); font-size: 12.5px; line-height: 1.5; text-align: center; }
.wb-game-turn.is-note::before, .wb-game-turn.is-note::after { content: ""; flex: 1 1 28px; min-width: 28px; max-width: 120px; height: 1px; background: var(--wl-line); }
.wb-game-turn.is-note > span { flex: 0 1 auto; min-width: 0; max-width: 88ch; text-wrap: balance; }
.wb-game-turn.is-note .wt-glyph { display: inline-flex; margin-right: 8px; vertical-align: -2px; color: var(--wl-test); }
.wb-game-turn.is-note .wt-glyph svg { width: 14px; height: 14px; display: block; }

/* A test line and what it did: the same lines as a script's Test, on a dark card. Its tools sit inside it. */
.wl-test-run { display: flex; flex-direction: column; padding: 8px 0; border-radius: 14px; background: color-mix(in srgb, var(--wl-bg) 78%, transparent); box-shadow: inset 0 0 0 1px var(--wl-line); }
.wb-game-turn.is-line { align-self: stretch; border-radius: 8px; }
.wb-game-turn.is-line:hover { background: color-mix(in srgb, var(--wl-text) 3%, transparent); }
.wl-test-lines { display: flex; flex-direction: column; gap: 2px; padding: 5px 18px; font: 12.5px/1.7 var(--wl-font-mono); }
.wl-test-lines .wl-se-line > .wt-glyph { display: flex; margin: 4px 0 0 -22px; }
.wl-test-lines .wl-se-line > .wt-glyph svg { width: 13px; height: 13px; display: block; }
.wl-test-lines .wl-se-line.is-try { margin-top: 0; }

/* With the narrator off, the box you type in is a test line: code type, and the brass of the test ground. */
body.wb-shell .wb-game-composer.is-test-line textarea.wb-game-input { font-family: var(--wl-font-mono); font-size: 13.5px; }
.wb-game-composer.is-test-line .wl-composer-turn { color: var(--wl-test); }
body .wb-game-composer.is-test-line button.wl-narrator-chip > .wt-glyph:first-child { color: var(--wl-test); }
@media (prefers-reduced-motion: reduce) { body .wl-test-pill button.wl-test-pill-btn { transition: none; } }

/* The Test pin (D-157): first on a test's rail, brass, and its card the setup. */
.wb-game-pin-glyph.is-test { color: var(--wl-test); }
.wl-test-setup { display: flex; flex-direction: column; padding: 4px 18px 18px; }
.wl-test-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 46px; padding: 7px 0; border-bottom: 1px solid var(--wl-line); }
.wl-test-row.is-top { align-items: start; }
.wl-test-row.is-top > .wl-test-k { padding-top: 7px; }
.wl-test-k { color: var(--wl-text-3); font-size: 12.5px; }
.wl-test-v { min-width: 0; }
body .wl-test-setup button.wl-test-pick { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; height: 34px; margin: 0; padding: 0 10px 0 6px; border: 0; border-radius: 9px; background: var(--wl-raised); box-shadow: none; color: var(--wl-text); font-size: 13px; font-weight: 500; cursor: pointer; transition: background var(--wl-quick) var(--wl-ease); }
body .wl-test-setup button.wl-test-pick.no-face { padding-left: 11px; }
body .wl-test-setup button.wl-test-pick:hover { background: color-mix(in srgb, var(--wl-text) 9%, var(--wl-raised)); }
.wl-test-pick > span:not(.wt-glyph):not(.wb-game-face) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-test-setup .wt-glyph { display: flex; flex: none; }
.wl-test-setup .wt-glyph svg { width: 14px; height: 14px; display: block; }
.wl-test-pick > .wt-glyph { color: var(--wl-text-3); }
.wl-test-pick > .wt-glyph:first-child { color: var(--wl-text-2); }
.wl-test-setup .wl-test-face { width: 24px; height: 24px; flex: none; font-size: 9.5px; }
.wl-test-people { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-test-person { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 2px 0 5px; border-radius: var(--r-pill, 999px); background: var(--wl-raised); color: var(--wl-text); font-size: 13px; }
body .wl-test-person button.wt-icon-button { width: 26px; height: 26px; padding: 0; border-radius: 50%; color: var(--wl-text-3); }
body .wl-test-person button.wt-icon-button:hover { color: var(--wl-text); background: color-mix(in srgb, var(--wl-text) 8%, transparent); }
.wl-test-person .wt-icon-button svg { width: 13px; height: 13px; }
body .wl-test-setup button.wl-test-add { display: inline-flex; align-items: center; gap: 7px; height: 34px; margin: 0; padding: 0 12px; border: 1px dashed var(--wl-line-strong, var(--wl-line)); border-radius: var(--r-pill, 999px); background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: 12.5px; cursor: pointer; }
body .wl-test-setup button.wl-test-add:hover { color: var(--wl-text); border-color: var(--wl-text-3); }
.wl-test-quiet { color: var(--wl-text-3); font-size: 12.5px; line-height: 34px; }
.wl-test-seg { display: inline-flex; max-width: 100%; padding: 3px; border-radius: 10px; background: var(--wl-inset); box-shadow: inset 0 0 0 1px var(--wl-line); }
body .wl-test-seg button { height: 28px; min-width: 0; margin: 0; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
body .wl-test-seg button[aria-checked="true"] { background: var(--wl-raised); color: var(--wl-text); box-shadow: 0 1px 2px color-mix(in srgb, var(--wl-bg) 30%, transparent); }
.wl-test-help { margin: 7px 0 0; max-width: 44ch; color: var(--wl-text-3); font-size: 12.5px; line-height: 1.5; }
.wl-test-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 16px; }
body .wl-test-setup button.wl-test-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; margin: 0; padding: 0 14px; border: 0; border-radius: var(--r-pill, 999px); background: var(--wl-raised); box-shadow: none; color: var(--wl-text); font-size: 13px; font-weight: 600; cursor: pointer; }
body .wl-test-setup button.wl-test-btn:hover { background: color-mix(in srgb, var(--wl-text) 9%, var(--wl-raised)); }
.wl-test-btn > .wt-glyph { color: var(--wl-text-2); }
@container (max-width: 340px) { .wl-test-row { grid-template-columns: 1fr; gap: 6px; } .wl-test-row.is-top > .wl-test-k { padding-top: 0; } }
@media (max-width: 640px) { .wl-test-row { grid-template-columns: 88px minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { body .wl-test-setup button.wl-test-pick { transition: none; } }
.wl-test-lines .wl-se-line.is-set { font-family: var(--wl-font-ui); font-size: 13px; color: var(--wl-text); }
.wl-test-lines .wl-se-line.is-set > .wt-glyph { color: var(--wl-test); }

/* ---- Fights (D-159): the bar of who fights, your moves over the box, the map's tokens, lines over them, a fight's
   lines in the story, and the scene a world can begin its fights with. Foes are marked in the danger colour, whose
   turn it is in the accent, and the fallen fade. ---- */
body.wb-shell .wl-fight-bar { position:relative; z-index:2; flex:none; box-sizing:border-box; display:flex; align-items:center; gap:12px; width:calc(100% - 40px); max-width:800px; margin:10px auto 0; padding:6px 8px 6px 14px; border:1px solid var(--wl-line-strong); border-radius:var(--r-lg); background:var(--wl-inset); box-shadow:var(--wl-elev-card); animation:wl-fight-in var(--wl-short) var(--wl-ease-out); }
.wl-fight-round { display:inline-flex; align-items:center; gap:7px; flex:none; color:var(--wl-text-2); font-size:12.5px; font-weight:600; font-variant-numeric:tabular-nums; }
.wl-fight-round .wt-glyph, .wl-fight-hand-head .wt-glyph { display:inline-flex; color:var(--wl-text-3); }
.wl-fight-round .wt-glyph svg, .wl-fight-hand-head .wt-glyph svg { width:15px; height:15px; }
.wl-fight-order { display:flex; align-items:flex-start; gap:8px; flex:1 1 auto; min-width:0; margin:0; padding:2px 2px 4px; list-style:none; overflow-x:auto; scrollbar-width:none; }
/* The turn ring and focus rings stand outside the faces and moves: room for them where the row scrolls. */
.wl-fight-order { margin:-5px 0; padding:7px 6px 8px; }
.wl-fight-one { position:relative; flex:none; display:flex; flex-direction:column; align-items:center; gap:4px; transition:opacity var(--wl-quick) var(--wl-ease); }
body.wb-shell .wl-fight-one-face { width:30px; height:30px; margin:0; padding:0; border:2px solid var(--wl-line-strong); border-radius:50%; background:var(--wl-raised); box-shadow:none; cursor:pointer; overflow:hidden; transition:box-shadow var(--wl-quick) var(--wl-ease), border-color var(--wl-quick) var(--wl-ease), transform var(--wl-quick) var(--wl-ease); }
.wl-fight-one-face .wb-game-face { width:100%; height:100%; margin:0; border:0; font-size:10px; }
.wl-fight-one.is-foe .wl-fight-one-face { border-color:color-mix(in srgb, var(--wl-danger) 75%, transparent); }
.wl-fight-one.is-turn .wl-fight-one-face { box-shadow:0 0 0 2px var(--wl-inset), 0 0 0 4px var(--wl-accent); transform:scale(1.08); }
/* The down fade and the dead fade further, on the face and its health line only, so their marks stay clear (D-352). */
.wl-fight-one.is-down .wl-fight-one-face, .wl-fight-one.is-down .wl-fight-health { filter:grayscale(1); opacity:.42; }
.wl-fight-one.is-dead .wl-fight-one-face { filter:grayscale(1) brightness(.7); opacity:.38; }
/* The dead have no health left to show: the line keeps its room so the order doesn't shift. */
.wl-fight-one.is-dead .wl-fight-health { visibility:hidden; }
.wl-fight-one.is-aim .wl-fight-one-face { box-shadow:0 0 0 2px var(--wl-inset), 0 0 0 4px color-mix(in srgb, var(--wl-danger) 70%, transparent); cursor:crosshair; }
.wl-fight-health { width:24px; height:3px; border-radius:2px; background:linear-gradient(to right, var(--wl-success) calc(var(--left, 1) * 100%), color-mix(in srgb, var(--wl-text-3) 30%, transparent) 0); }
.wl-fight-one.is-foe .wl-fight-health { background:linear-gradient(to right, var(--wl-danger) calc(var(--left, 1) * 100%), color-mix(in srgb, var(--wl-text-3) 30%, transparent) 0); }
body.wb-shell button.wl-fight-end { flex:none; height:28px; margin:0; padding:0 12px; border:0; border-radius:var(--r-pill, 999px); background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12.5px; font-weight:600; cursor:pointer; }
body.wb-shell button.wl-fight-end:hover { background:var(--wl-raised); color:var(--wl-text); }
/* On a phone with the map pinned (D-355): the faces alone in the map's head, in place of the clock (game-fight.mjs
   paintBar): small, the one whose turn it is ringed, each a finger wide; the row moves under a finger, its edges fading
   where there are more. Over the story (the map not pinned) the bar is one slim row. */
@media (max-width:640px) {
  body.wb-shell .wl-fight-bar.is-in-head { flex:0 1 auto; width:auto; max-width:none; min-width:0; height:100%; margin:0; padding:0; gap:0; border:0; border-radius:0; background:none; box-shadow:none; }
  .wl-fight-bar.is-in-head .wl-fight-order { align-items:stretch; gap:0; height:100%; margin:0; padding:0; }
  .wl-fight-bar.is-in-head .wl-fight-order.is-more-right { -webkit-mask-image:linear-gradient(90deg, var(--wl-bg) calc(100% - 24px), transparent); mask-image:linear-gradient(90deg, var(--wl-bg) calc(100% - 24px), transparent); }
  .wl-fight-bar.is-in-head .wl-fight-order.is-more-left { -webkit-mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 24px); mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 24px); }
  .wl-fight-bar.is-in-head .wl-fight-order.is-more-left.is-more-right { -webkit-mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 24px, var(--wl-bg) calc(100% - 24px), transparent); mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 24px, var(--wl-bg) calc(100% - 24px), transparent); }
  .wl-fight-bar.is-in-head .wl-fight-one { justify-content:center; width:40px; gap:0; }
  body.wb-shell .wl-fight-bar.is-in-head .wl-fight-one-face { display:grid; place-items:center; width:100%; height:100%; border:0; border-radius:var(--r-sm); background:transparent; box-shadow:none; overflow:visible; transform:none; }
  .wl-fight-bar.is-in-head .wl-fight-one-face .wb-game-face { width:26px; height:26px; border-radius:50%; box-shadow:0 0 0 1.5px var(--wl-line-strong); transition:box-shadow var(--wl-quick) var(--wl-ease); }
  .wl-fight-bar.is-in-head .wl-fight-one.is-foe .wl-fight-one-face .wb-game-face { box-shadow:0 0 0 1.5px color-mix(in srgb, var(--wl-danger) 75%, transparent); }
  .wl-fight-bar.is-in-head .wl-fight-one.is-turn .wl-fight-one-face .wb-game-face { box-shadow:0 0 0 2px var(--wl-surface), 0 0 0 3.5px var(--wl-accent); }
  .wl-fight-bar.is-in-head .wl-fight-one.is-aim .wl-fight-one-face .wb-game-face { box-shadow:0 0 0 2px var(--wl-surface), 0 0 0 3.5px color-mix(in srgb, var(--wl-danger) 70%, transparent); }
  .wl-fight-bar.is-in-head .wl-fight-health { position:absolute; left:50%; bottom:3px; width:18px; height:2px; transform:translateX(-50%); }
  .wl-fight-bar.is-in-head .wl-fight-one > .wl-fall-mark.is-dead { top:calc(50% - 13px); left:calc(50% - 13px); width:26px; height:26px; }
  .wl-fight-bar.is-in-head .wl-fight-one > .wl-fall-mark.is-down { top:calc(50% + 1px); left:calc(50% + 4px); width:13px; height:13px; }
  body.wb-shell .wl-fight-bar:not(.is-in-head, .is-on-map) { width:calc(100% - 20px); margin:6px auto 0; padding:0 2px 0 12px; gap:8px; }
  body.wb-shell .wl-fight-bar:not(.is-in-head) button.wl-fight-end { height:40px; }
}

/* Over the box: your moves and End turn, who you aim at, or whose turn it is. */
.wl-fight-slot:empty { display:none; }
.wl-fight-hand { box-sizing:border-box; display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; width:100%; max-width:800px; margin:0 auto 8px; padding:8px 8px 8px 12px; border:1px solid var(--wl-line); border-radius:14px; background:var(--wl-inset); animation:wl-fight-in var(--wl-short) var(--wl-ease-out); }
.wl-fight-hand.is-aiming { border-color:color-mix(in srgb, var(--wl-danger) 35%, var(--wl-line)); }
/* Outside a fight (D-160): what you can do here, a quiet row of the same buttons with no box around them. */
.wl-fight-hand.is-calm { padding:0 2px; border:0; background:none; animation:none; }
.wl-fight-hand.is-calm .wl-fight-move { height:30px; background:transparent; border-color:var(--wl-line); font-weight:500; }
/* Actions at hand (D-176): up to three chips, each wearing its picture, then More. The row never wraps. */
.wl-hand-row { display:flex; flex-wrap:nowrap; align-items:center; gap:6px; flex:1 1 auto; min-width:0; overflow:hidden; padding:2px; margin:-2px; }
body.wb-shell .wl-fight-hand.is-calm button.wl-hand-chip { flex:none; max-width:100%; min-width:0; height:34px; padding:0 12px 0 3px; gap:8px; background:color-mix(in srgb,var(--wl-text) 3%,transparent); }
.wl-hand-chip .wl-hand-name { white-space:nowrap; }
.wl-hand-chip small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.wl-hand-pic { flex:none; display:grid; place-items:center; width:26px; height:26px; border-radius:50%; overflow:hidden; background:color-mix(in srgb,var(--wl-text) 7%,transparent); color:var(--wl-text-2); }
.wl-hand-pic.has-picture { display:block; }
body .wl-hand-pic img { display:block; width:100%; height:100%; max-width:none; object-fit:cover; -webkit-user-drag:none; }
.wl-hand-pic .wt-glyph svg { width:14px; height:14px; }
.wl-hand-chip.is-new { border-color:color-mix(in srgb,var(--wl-accent) 55%,var(--wl-line)); }
.wl-hand-chip.is-glow { animation:wl-hand-glow 2.4s var(--wl-ease-out) 1; }
@keyframes wl-hand-glow { 0% { transform:translateY(4px); opacity:0; } 12% { transform:none; opacity:1; box-shadow:0 0 0 3px color-mix(in srgb,var(--wl-accent) 30%,transparent), 0 0 18px -4px var(--wl-accent); } 100% { box-shadow:0 0 0 0 transparent; } }
body.wb-shell .wl-fight-hand.is-calm button.wl-hand-more { flex:none; height:34px; padding:0 12px 0 10px; color:var(--wl-text-2); }
.wl-hand-more small:empty { display:none; }
/* More, on the page: a sheet over the message box with Find an action and the tiles, grouped. */
.wl-fight-hand.is-calm.is-more { flex-direction:column; align-items:stretch; flex-wrap:nowrap; gap:12px; max-height:min(52vh, 460px); padding:14px 16px 16px; border:1px solid var(--wl-line); border-radius:16px; background:var(--wl-surface, var(--wl-inset)); box-shadow:var(--wl-elev-pop); animation:wl-fight-in var(--wl-short) var(--wl-ease-out); }
.wl-hand-sheet-head { display:flex; align-items:center; gap:12px; }
.wl-hand-sheet-head > b { color:var(--wl-text); font-size:15px; font-weight:600; white-space:nowrap; }
body.wb-shell input.wl-hand-find { flex:1; min-width:0; height:32px; margin:0 0 0 auto; max-width:280px; padding:0 12px; border:1px solid var(--wl-line); border-radius:10px; background:var(--wl-inset); color:var(--wl-text); font-size:13px; }
body.wb-shell input.wl-hand-find:focus { border-color:var(--wl-accent); outline:none; box-shadow:none; }
body.wb-shell button.wl-hand-close { flex:none; display:grid; place-items:center; width:30px; height:30px; margin:0; padding:0; border:0; border-radius:8px; background:transparent; box-shadow:none; color:var(--wl-text-2); cursor:pointer; }
body.wb-shell button.wl-hand-close:hover { background:var(--wl-raised); color:var(--wl-text); }
.wl-hand-close .wt-glyph svg { width:16px; height:16px; }
.wl-hand-groups { display:flex; flex-direction:column; gap:14px; min-height:0; overflow-y:auto; margin:0 -4px; padding:0 4px 2px; scrollbar-width:thin; }
.wl-hand-group h4 { margin:0 0 8px; color:var(--wl-text-3); font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.wl-hand-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:8px; }
body.wb-shell button.wl-hand-tile { display:flex; align-items:center; justify-content:flex-start; gap:12px; min-width:0; height:auto; margin:0; padding:9px 12px 9px 9px; border:1px solid var(--wl-line); border-radius:12px; background:var(--wl-inset); box-shadow:none; color:var(--wl-text); text-align:left; cursor:pointer; transition:border-color var(--wl-quick) var(--wl-ease), background-color var(--wl-quick) var(--wl-ease); }
body.wb-shell button.wl-hand-tile:hover:not(:disabled) { border-color:var(--wl-accent); }
body.wb-shell button.wl-hand-tile:disabled { cursor:default; opacity:1; }
.wl-hand-tile .wl-hand-pic { width:38px; height:38px; border-radius:10px; }
.wl-hand-tile .wl-hand-pic .wt-glyph svg { width:17px; height:17px; }
.wl-hand-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.wl-hand-text b { font-size:13.5px; font-weight:600; }
.wl-hand-text small { display:flex; align-items:center; gap:5px; overflow:hidden; color:var(--wl-text-3); font-size:12px; white-space:nowrap; text-overflow:ellipsis; }
.wl-hand-text small .wt-glyph svg { width:12px; height:12px; }
.wl-hand-sub { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.wl-hand-tile.is-faded { background:transparent; }
.wl-hand-tile.is-faded .wl-hand-pic, .wl-hand-tile.is-faded b { opacity:.5; }
.wl-hand-note { margin:0; color:var(--wl-text-3); font-size:13px; line-height:1.45; }
@media (prefers-reduced-motion:reduce) { .wl-hand-chip.is-glow { animation:none; } }
/* @ in your words (D-176): the list takes the row's place over the box; a picked name stays marked in your words. */
.wb-game-composer-wrap.is-at .wl-fight-hand.is-calm { display:none; }
.wl-at-slot:empty { display:none; }
.wl-at { box-sizing:border-box; display:flex; flex-direction:column; gap:2px; width:100%; max-width:800px; max-height:min(40vh, 300px); overflow-y:auto; margin:0 auto 8px; padding:6px; border:1px solid var(--wl-line); border-radius:14px; background:var(--wl-surface, var(--wl-inset)); box-shadow:var(--wl-elev-pop); scrollbar-width:thin; animation:wl-fight-in var(--wl-short) var(--wl-ease-out); }
.wl-at-head { padding:6px 8px 4px; color:var(--wl-text-3); font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.wl-at-head:not(:first-child) { margin-top:4px; }
body.wb-shell button.wl-at-item { display:grid; grid-template-columns:auto auto minmax(0,1fr); align-items:center; column-gap:10px; width:100%; height:auto; min-height:40px; margin:0; padding:5px 10px 5px 6px; border:0; border-radius:10px; background:transparent; box-shadow:none; color:var(--wl-text); text-align:left; cursor:pointer; }
body.wb-shell button.wl-at-item:hover, body.wb-shell button.wl-at-item.is-active { background:var(--wl-raised); }
body.wb-shell button.wl-at-item.is-active { box-shadow:inset 2px 0 0 var(--wl-accent); }
.wl-at-item .wl-hand-pic { width:30px; height:30px; border-radius:8px; }
.wl-at-name { font-size:13.5px; font-weight:600; white-space:nowrap; }
.wl-at-sub { display:flex; align-items:center; gap:5px; min-width:0; overflow:hidden; color:var(--wl-text-3); font-size:12px; white-space:nowrap; text-overflow:ellipsis; }
.wl-at-sub > span { overflow:hidden; text-overflow:ellipsis; }
.wl-at-sub .wt-glyph svg { width:12px; height:12px; }
.wl-at-item.is-faded .wl-hand-pic, .wl-at-item.is-faded .wl-at-name { opacity:.5; }
.wl-at-none { margin:0; padding:8px 10px; color:var(--wl-text-3); font-size:13px; }
/* On a phone (D-355, D-284) the list moves under a finger with no bar; the next part's head showing at its foot says
   there is more. */
@media (max-width:640px) {
  .wl-at { scrollbar-width:none; }
  .wl-at::-webkit-scrollbar { display:none; }
  .wl-at-head { font-size:12px; }
}
/* Your own roll (D-177): in the row's place, the same frame as the @ list. */
.wb-game-composer-wrap.is-rolling .wl-fight-hand.is-calm { display:none; }
.wl-roll-own { box-sizing:border-box; display:flex; flex-direction:column; gap:10px; width:100%; max-width:800px; margin:0 auto 8px; padding:14px 16px 16px; border:1px solid var(--wl-line); border-radius:16px; background:var(--wl-surface, var(--wl-inset)); box-shadow:var(--wl-elev-pop); animation:wl-fight-in var(--wl-short) var(--wl-ease-out); }
.wl-roll-own .wl-hand-close { margin-left:auto; }
.wl-roll-own-label { margin-top:2px; color:var(--wl-text-3); font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.wl-roll-own-stats, .wl-roll-own-dice { display:flex; flex-wrap:wrap; gap:8px; }
body.wb-shell button.wl-roll-stat { height:34px; margin:0; padding:0 14px; border:1px solid var(--wl-line); border-radius:999px; background:var(--wl-inset); box-shadow:none; color:var(--wl-text); font-size:13.5px; font-weight:600; cursor:pointer; }
body.wb-shell button.wl-roll-die { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; width:58px; height:auto; min-height:64px; margin:0; padding:6px 0 5px; border:1px solid var(--wl-line); border-radius:12px; background:var(--wl-inset); box-shadow:none; color:var(--wl-text-2); cursor:pointer; }
.wl-roll-die-face { display:grid; place-items:center; height:34px; pointer-events:none; }
.wl-roll-die-face .wl-dice { gap:0; margin:0; }
.wl-roll-die small { font-size:11.5px; font-weight:600; }
body.wb-shell button.wl-roll-stat:hover, body.wb-shell button.wl-roll-die:hover { border-color:var(--wl-text-3); }
body.wb-shell button.wl-roll-stat.is-on, body.wb-shell button.wl-roll-die.is-on { border-color:var(--wl-accent); box-shadow:inset 0 0 0 1px var(--wl-accent); color:var(--wl-text); }
.wl-roll-own-rows { display:flex; flex-wrap:wrap; gap:10px 22px; padding-top:2px; }
.wl-roll-own-step { display:flex; align-items:center; gap:8px; }
.wl-roll-own-what { color:var(--wl-text-2); font-size:13px; }
.wl-roll-own-step > b { min-width:26px; color:var(--wl-text); font-family:var(--wl-font-mono); font-size:14px; font-variant-numeric:tabular-nums; text-align:center; }
body.wb-shell button.wl-roll-own-btn { display:grid; place-items:center; width:28px; height:28px; margin:0; padding:0; border:1px solid var(--wl-line); border-radius:8px; background:transparent; box-shadow:none; color:var(--wl-text-2); cursor:pointer; }
body.wb-shell button.wl-roll-own-btn:disabled { opacity:.4; cursor:default; }
.wl-roll-own-btn .wt-glyph svg { width:14px; height:14px; }
.wl-roll-own-seg { display:flex; padding:2px; border:1px solid var(--wl-line); border-radius:9px; }
body.wb-shell button.wl-roll-own-opt { height:26px; margin:0; padding:0 10px; border:0; border-radius:7px; background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12.5px; cursor:pointer; }
body.wb-shell button.wl-roll-own-opt.is-on { background:var(--wl-raised); color:var(--wl-text); }
.wl-roll-own-foot { display:flex; align-items:center; gap:12px; padding-top:10px; border-top:1px solid var(--wl-line); }
.wl-roll-own-sum { flex:1; min-width:0; overflow:hidden; color:var(--wl-text-2); font-size:13px; white-space:nowrap; text-overflow:ellipsis; }
body.wb-shell button.wl-roll-own-go { display:inline-flex; align-items:center; gap:8px; height:36px; margin:0; padding:0 18px 0 14px; border:0; border-radius:999px; background:var(--wl-accent); box-shadow:none; color:var(--wl-on-accent); font-weight:600; cursor:pointer; }
.wl-roll-own-go .wt-glyph svg { width:16px; height:16px; }
@media (max-width:640px) { .wl-roll-own { padding:12px; } body.wb-shell button.wl-roll-die { width:calc((100% - 24px) / 4); } .wl-roll-own-rows { gap:10px 16px; } }
.wb-game-input-look .wl-at-named { border-radius:4px; background:color-mix(in srgb,var(--wl-accent) 18%,transparent); box-shadow:0 0 0 2px color-mix(in srgb,var(--wl-accent) 18%,transparent); color:var(--wl-text); }
@media (max-width:640px) { .wl-at-sub { display:none; } body.wb-shell button.wl-at-item { grid-template-columns:auto minmax(0,1fr); } }
/* Your turn (D-176): every move as a picture tile in one box; the picked one beside them with who and Do it. In a
   fight over the message box, and in a scene's actions part. Narrow: the picked one goes under the tiles. */
.wl-turn { box-sizing:border-box; container-type:inline-size; width:100%; max-width:800px; margin:0 auto 8px; padding:12px 14px 14px; border:1px solid color-mix(in srgb,var(--wl-selection) 26%,var(--wl-line)); border-radius:var(--r-xl); background:var(--wl-surface, var(--wl-inset)); box-shadow:var(--wl-elev-pop); animation:wl-fight-in var(--wl-short) var(--wl-ease-out); }
.wl-mplay-actions .wl-turn { max-width:none; margin:10px 0 0; animation:none; }
.wl-turn-head { display:flex; align-items:center; gap:12px; min-height:28px; margin-bottom:8px; }
.wl-turn-who { flex:none; color:var(--wl-selection); font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; white-space:nowrap; }
.wl-turn-meters { flex:0 1 auto; min-width:0; margin-left:auto; overflow:hidden; color:var(--wl-text-3); font-size:12.5px; font-variant-numeric:tabular-nums; white-space:nowrap; text-overflow:ellipsis; }
body.wb-shell .wl-turn-who + button.wl-turn-end { margin-left:auto; }
body.wb-shell .wl-turn-head button.wl-turn-end { height:28px; padding:0 12px; font-size:12.5px; }
.wl-turn-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(210px,280px); gap:16px; align-items:start; }
.wl-turn-body > .wl-turn-says { grid-column:1 / -1; }
.wl-turn-tiles { display:flex; gap:4px; min-width:0; overflow-x:auto; margin:-4px -4px -6px; padding:4px 4px 6px; scrollbar-width:none; }
.wl-turn-tiles::-webkit-scrollbar { display:none; }
.wl-turn-tiles.is-more-right { -webkit-mask-image:linear-gradient(90deg, var(--wl-bg) calc(100% - 40px), transparent); mask-image:linear-gradient(90deg, var(--wl-bg) calc(100% - 40px), transparent); }
.wl-turn-tiles.is-more-left { -webkit-mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 40px); mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 40px); }
.wl-turn-tiles.is-more-left.is-more-right { -webkit-mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 40px, var(--wl-bg) calc(100% - 40px), transparent); mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 40px, var(--wl-bg) calc(100% - 40px), transparent); }
body.wb-shell button.wl-turn-tile { flex:none; display:flex; flex-direction:column; align-items:center; gap:4px; width:84px; height:auto; margin:0; padding:6px 3px 4px; border:0; border-radius:12px; background:transparent; box-shadow:none; color:var(--wl-text); text-align:center; cursor:pointer; transition:background-color var(--wl-quick) var(--wl-ease); }
body.wb-shell button.wl-turn-tile:hover:not(:disabled) { background:color-mix(in srgb,var(--wl-text) 4%,transparent); }
body.wb-shell button.wl-turn-tile:disabled { opacity:1; cursor:default; }
body.wb-shell button.wl-turn-tile:focus-visible { outline:2px solid var(--wl-selection, var(--wl-accent)); outline-offset:1px; }
.wl-hand-pic.wl-turn-pic { position:relative; width:58px; height:58px; margin-bottom:2px; border:1px solid var(--wl-line); border-radius:14px; transition:box-shadow var(--wl-quick) var(--wl-ease), border-color var(--wl-quick) var(--wl-ease); }
.wl-turn-pic .wt-glyph svg { width:22px; height:22px; }
.wl-turn-tile.is-picked .wl-turn-pic { border-color:var(--wl-selection); box-shadow:0 0 0 2px var(--wl-selection), var(--wl-glow-accent); }
.wl-turn-name { max-width:100%; overflow:hidden; font-size:12.5px; font-weight:600; line-height:1.25; white-space:nowrap; text-overflow:ellipsis; }
.wl-turn-sub { max-width:100%; min-height:1.3em; overflow:hidden; color:var(--wl-text-3); font-size:11.5px; line-height:1.3; white-space:nowrap; text-overflow:ellipsis; }
.wl-turn-tile.is-faded .wl-turn-pic, .wl-turn-tile.is-faded .wl-turn-name { opacity:.45; }
.wl-turn-tile.is-new .wl-turn-pic::after { content:''; position:absolute; top:5px; right:5px; width:8px; height:8px; border-radius:50%; background:var(--wl-accent); box-shadow:0 0 0 2px var(--wl-surface, var(--wl-inset)); }
.wl-turn-dots { position:absolute; left:50%; bottom:5px; display:flex; gap:3px; padding:2px 4px; border-radius:6px; background:color-mix(in srgb, var(--wl-bg) 50%, transparent); transform:translateX(-50%); }
.wl-turn-dots i { width:5px; height:5px; border-radius:50%; background:color-mix(in srgb, var(--wl-text) 28%, transparent); }
.wl-turn-dots i.is-on { background:var(--wl-text); }
.wl-turn-check { position:absolute; top:4px; right:4px; display:grid; place-items:center; width:17px; height:17px; border-radius:50%; background:var(--wl-accent); color:var(--wl-on-accent); }
.wl-turn-check .wt-glyph svg { width:11px; height:11px; }
.wl-turn-detail { display:flex; flex-direction:column; gap:8px; min-width:0; padding-left:16px; border-left:1px solid var(--wl-line); }
.wl-turn-what { margin:0; color:var(--wl-text-2); font-size:14px; line-height:1.35; }
.wl-turn-what b { color:var(--wl-text); font-weight:600; }
.wl-turn-says { margin:0; display:-webkit-box; overflow:hidden; color:var(--wl-text-3); font-size:12.5px; line-height:1.45; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.wl-turn-why { display:flex; align-items:center; gap:6px; margin:0; color:var(--wl-text-2); font-size:12.5px; }
.wl-turn-why .wt-glyph svg { width:13px; height:13px; }
.wl-turn-targets { display:flex; flex-wrap:wrap; gap:6px; }
body.wb-shell button.wl-turn-target { display:inline-flex; align-items:center; gap:6px; height:30px; margin:0; padding:0 10px 0 3px; border:1px solid var(--wl-line); border-radius:999px; background:transparent; box-shadow:none; color:var(--wl-text); font-size:12.5px; font-weight:500; cursor:pointer; }
body.wb-shell button.wl-turn-target:hover:not(:disabled) { border-color:color-mix(in srgb,var(--wl-danger) 50%,var(--wl-line)); }
body.wb-shell button.wl-turn-target.is-chosen { border-color:var(--wl-danger); background:color-mix(in srgb,var(--wl-danger) 12%,transparent); }
.wl-turn-target .wb-game-face { width:22px; height:22px; font-size:9px; }
.wl-turn-target small { color:var(--wl-text-3); font-size:11.5px; font-variant-numeric:tabular-nums; }
.wl-turn-detail .wl-mplay-field { margin:0; }
.wl-turn-go-row { display:flex; align-items:center; gap:10px; margin-top:2px; }
body.wb-shell button.wl-turn-go { flex:none; height:32px; margin:0; padding:0 20px; border:0; border-radius:999px; background:var(--wl-accent); box-shadow:none; color:var(--wl-on-accent); font-size:13px; font-weight:600; cursor:pointer; }
body.wb-shell button.wl-turn-go:hover:not(:disabled) { background:var(--wl-highlight); }
body.wb-shell button.wl-turn-go:disabled { opacity:.45; cursor:default; }
body.wb-shell button.wl-turn-go.is-done { background:transparent; color:var(--wl-text-2); box-shadow:inset 0 0 0 1px var(--wl-line); opacity:1; }
.wl-turn-note { color:var(--wl-text-3); font-size:12px; }
@container (max-width:560px) {
  .wl-turn-body { grid-template-columns:minmax(0,1fr); gap:12px; }
  .wl-turn-detail { padding:12px 0 0; border-left:0; border-top:1px solid var(--wl-line); }
  /* Your Health and Heat on a line of their own under whose turn it is, never hidden: on a phone they matter most. */
  .wl-turn-head { flex-wrap:wrap; row-gap:2px; }
  .wl-turn-meters { order:3; flex:1 0 100%; margin-left:0; white-space:normal; }
  body.wb-shell .wl-turn-head button.wl-turn-end { margin-left:auto; }
}
@media (prefers-reduced-motion:reduce) { .wl-turn { animation:none; } }
/* In a scene's actions part (compact): the scene's head says whose turn it is, with your trackers. */
.wl-mplay-meters { margin-left:auto; color:var(--wl-text-3); font-size:12.5px; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
/* The head is marked has-meters when it shows them (game-mechanics.mjs). Not :has() with a plain strong after it: Chrome
   then re-styled every strong on the page whenever anything a :has() reads changed. */
.wl-mplay-actions > .wl-mplay-head.has-meters { gap:12px; margin-bottom:0; }
.wl-mplay-actions > .wl-mplay-head.has-meters > strong { margin-right:0; }
.wl-turn.is-compact { margin:8px 0 0; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
.wl-turn.is-compact .wl-turn-body { grid-template-columns:minmax(0,1fr) minmax(260px,380px); gap:14px; }
.wl-turn.is-compact .wl-turn-tiles { margin:-2px -4px -4px; padding:2px 4px 4px; }
body.wb-shell .wl-turn.is-compact button.wl-turn-tile { flex:1 0 76px; width:auto; max-width:104px; padding:4px 2px 2px; gap:3px; }
.wl-turn.is-compact .wl-hand-pic.wl-turn-pic { width:44px; height:44px; border-radius:12px; }
.wl-turn.is-compact .wl-turn-pic .wt-glyph svg { width:18px; height:18px; }
.wl-turn.is-compact .wl-turn-name { font-size:12px; }
.wl-turn.is-compact .wl-turn-sub { font-size:11px; }
.wl-turn.is-compact .wl-turn-detail { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 10px; padding-left:14px; }
.wl-turn.is-compact .wl-turn-detail > * { grid-column:1 / -1; }
.wl-turn.is-compact .wl-turn-detail > .wl-turn-what { grid-row:1; grid-column:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13.5px; }
.wl-turn.is-compact .wl-turn-detail > .wl-turn-go-row { grid-row:1; grid-column:2; margin:0; }
.wl-turn.is-compact .wl-turn-detail > .wl-turn-go-row .wl-turn-note { display:none; }
.wl-turn.is-compact .wl-turn-targets { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
body.wb-shell .wl-turn.is-compact button.wl-turn-target { flex:none; height:28px; }
.wl-turn.is-compact .wl-turn-says { -webkit-line-clamp:1; font-size:12px; }
body.wb-shell .wl-turn.is-compact button.wl-turn-go { height:30px; padding:0 16px; }
@container (max-width:560px) { .wl-turn.is-compact .wl-turn-detail { padding:10px 0 0; } }
/* Your turn's card on a phone (D-355): one head line (whose turn, your trackers, End turn; your name is left out), the
   moves as smaller tiles, and the picked one's words in two lines at most. While an area is aimed on the map it folds
   to its row of moves and the map grows into the room (game-panel.mjs sizeTop); the map's own line has Cancel. */
@media (max-width:640px) {
  .wl-turn:not(.is-compact) { padding:6px 10px 8px; border-radius:var(--r-lg); }
  .wl-turn:not(.is-compact) .wl-turn-head { flex-wrap:nowrap; gap:8px; min-height:32px; margin-bottom:2px; }
  .wl-turn:not(.is-compact) .wl-turn-who { font-size:12px; letter-spacing:.06em; }
  .wl-turn:not(.is-compact) .wl-turn-who-name { display:none; }
  .wl-turn:not(.is-compact) .wl-turn-meters { order:0; flex:0 1 auto; margin-left:auto; font-size:12px; white-space:nowrap; }
  body.wb-shell .wl-turn:not(.is-compact) .wl-turn-head button.wl-turn-end { position:relative; flex:none; height:32px; padding:0 12px; }
  body.wb-shell .wl-turn:not(.is-compact) .wl-turn-meters + button.wl-turn-end { margin-left:0; }
  body.wb-shell .wl-turn:not(.is-compact) :is(button.wl-turn-end, button.wl-turn-target)::after { content:''; position:absolute; inset:-4px 0; }
  .wl-turn:not(.is-compact) .wl-turn-body { gap:6px; }
  body.wb-shell .wl-turn:not(.is-compact) button.wl-turn-tile { width:64px; padding:4px 2px 2px; gap:2px; border-radius:10px; }
  .wl-turn:not(.is-compact) .wl-hand-pic.wl-turn-pic { width:44px; height:44px; margin-bottom:1px; border-radius:12px; }
  .wl-turn:not(.is-compact) .wl-turn-pic .wt-glyph svg { width:18px; height:18px; }
  .wl-turn:not(.is-compact) .wl-turn-name { font-size:12px; }
  .wl-turn:not(.is-compact) .wl-turn-sub { min-height:0; font-size:12px; }
  .wl-turn:not(.is-compact) .wl-turn-sub:empty { display:none; }
  .wl-turn:not(.is-compact) .wl-turn-detail { gap:6px; padding-top:8px; }
  .wl-turn:not(.is-compact) .wl-turn-what { font-size:13.5px; }
  .wl-turn:not(.is-compact) .wl-turn-says { -webkit-line-clamp:2; }
  .wl-turn:not(.is-compact) .wl-turn-target small { font-size:12px; }
  body.wb-shell .wl-turn:not(.is-compact) button.wl-turn-target { position:relative; height:32px; }
  body.wb-shell .wl-turn:not(.is-compact) button.wl-turn-go { height:40px; }
  .wl-turn.is-aiming-map .wl-turn-detail { display:none; }
}


.wl-fight-hand-head { display:inline-flex; align-items:center; gap:8px; flex:none; margin:0; color:var(--wl-text-2); font-size:13px; }
.wl-fight-hand-head b { color:var(--wl-text); font-weight:600; }
.wl-fight-hand-head .wb-game-face { width:24px; height:24px; font-size:9px; }
.wl-fight-hand-note { color:var(--wl-text-3); font-size:12.5px; line-height:1.4; }
.wl-fight-moves, .wl-fight-targets { display:flex; flex-wrap:wrap; align-items:center; gap:6px; flex:1 1 auto; min-width:0; }
body.wb-shell button.wl-fight-move, body.wb-shell button.wl-fight-target { display:inline-flex; align-items:center; gap:7px; height:32px; margin:0; padding:0 12px 0 10px; border:1px solid var(--wl-line-strong); border-radius:var(--r-pill, 999px); background:var(--wl-raised); box-shadow:none; color:var(--wl-text); font-size:13px; font-weight:600; cursor:pointer; transition:border-color var(--wl-quick) var(--wl-ease), background var(--wl-quick) var(--wl-ease), transform var(--wl-quick) var(--wl-ease); }
body.wb-shell button.wl-fight-move:hover:not(:disabled), body.wb-shell button.wl-fight-target:hover:not(:disabled) { border-color:var(--wl-accent); }
body.wb-shell button.wl-fight-move:active:not(:disabled), body.wb-shell button.wl-fight-target:active:not(:disabled) { transform:scale(.97); }
body.wb-shell button.wl-fight-move:disabled, body.wb-shell button.wl-fight-target:disabled { opacity:.5; cursor:default; }
.wl-fight-move .wt-glyph { display:inline-flex; color:var(--wl-text-2); }
.wl-fight-move .wt-glyph svg { width:15px; height:15px; }
.wl-fight-move small, .wl-fight-target small { color:var(--wl-text-3); font-size:11.5px; font-weight:500; font-variant-numeric:tabular-nums; }
body.wb-shell button.wl-fight-target { padding-left:4px; }
.wl-fight-target .wb-game-face { width:24px; height:24px; font-size:9px; }
body.wb-shell button.wl-fight-target.is-foe { border-color:color-mix(in srgb, var(--wl-danger) 45%, var(--wl-line-strong)); }
body.wb-shell button.wl-fight-btn { display:inline-flex; align-items:center; gap:7px; flex:none; height:32px; margin:0; padding:0 14px; border:0; border-radius:var(--r-pill, 999px); background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:13px; font-weight:600; cursor:pointer; }
body.wb-shell button.wl-fight-btn:hover:not(:disabled) { background:var(--wl-raised); color:var(--wl-text); }
body.wb-shell button.wl-fight-btn.is-primary { background:var(--wl-accent); color:var(--wl-on-accent); }
body.wb-shell button.wl-fight-btn.is-primary:hover:not(:disabled) { background:var(--wl-highlight); color:var(--wl-on-accent); }
body.wb-shell button.wl-fight-btn:disabled { opacity:.5; cursor:default; }
.wl-fight-btn .wt-glyph svg { width:15px; height:15px; }
.wl-fight-hand > .wl-fight-go { margin-left:auto; }
.wl-fight-wait { width:14px; height:14px; border:2px solid color-mix(in srgb, var(--wl-text-3) 35%, transparent); border-top-color:var(--wl-text-2); border-radius:50%; animation:wl-fight-spin .9s linear infinite; }

/* The map's tokens in a fight, and while aiming. */
.wb-game-map .wh-map-marker.wb-game-token.is-foe { border-color:var(--wl-danger); }
.wb-game-map .wh-map-marker.wb-game-token.is-turn { box-shadow:0 0 0 3px var(--wl-bg), 0 0 0 5px var(--wl-accent); }
/* Down and dead on the map (D-160, D-352): the face fades, never the mark over it (the marks are at the end of this file). */
.wb-game-map .wh-map-marker.wb-game-token:is(.is-down, .is-dead) { overflow:visible; border-color:color-mix(in srgb, var(--wl-text-3) 50%, transparent); }
.wb-game-map .wh-map-marker.wb-game-token.is-down > .wb-game-token-face { filter:grayscale(1); opacity:.45; }
.wb-game-map .wh-map-label.wb-game-token-label.is-down { opacity:.55; }
.wb-game-map .wh-map-marker.wb-game-token.is-dead > .wb-game-token-face { filter:grayscale(1) brightness(.7); opacity:.38; }
.wb-game-map .wh-map-label.wb-game-token-label.is-dead { opacity:.5; }
/* Down or dead in the Characters list (D-160). */
.wb-game-person.is-down .wb-game-face { filter:grayscale(1); opacity:.55; }
.wb-game-person.is-dead .wb-game-face { filter:grayscale(1) brightness(.7); opacity:.42; }
.wb-game-person .wb-game-person-text small.wb-game-person-state.is-down { color:var(--wl-text-2); }
.wb-game-person .wb-game-person-text small.wb-game-person-state.is-dead { color:var(--wl-danger); }
.wl-fight-target.is-down { border-style:dashed; }
/* Whom you can aim at, lit: a still ring, never a pulse (DESIGN-SYSTEM.md: a glow is still). */
.wb-game.is-aiming .wb-game-map .wh-map-marker.wb-game-token.is-aim { cursor:crosshair; box-shadow:0 0 0 3px var(--wl-bg), 0 0 0 5px color-mix(in srgb, var(--wl-danger) 80%, transparent); }
.wb-game.is-aiming .wb-game-map .wh-map-marker.wb-game-token:not(.is-aim) { opacity:.6; }
.wb-game-map .wh-map-marker.wb-game-token.is-fighter { overflow:visible; }
.wb-game-map .wh-map-marker.wb-game-token.is-fighter::after { content:""; position:absolute; left:2px; right:2px; bottom:-7px; height:3px; border-radius:2px; background:linear-gradient(to right, var(--wl-success) calc(var(--left, 1) * 100%), color-mix(in srgb, var(--wl-bg) 45%, transparent) 0); }
.wb-game-map .wh-map-marker.wb-game-token.is-fighter.is-foe::after { background:linear-gradient(to right, var(--wl-danger) calc(var(--left, 1) * 100%), color-mix(in srgb, var(--wl-bg) 45%, transparent) 0); }
.wb-game-map .wh-map-marker.wb-game-token.is-fighter.is-down::after, .wb-game-map .wh-map-marker.wb-game-token.is-fighter.is-dead::after { display:none; }
/* The card look (System → Fights): fighters stand as small portrait cards. */

/* A line someone says, over their token for a moment (B). */
.wl-fight-say { position:absolute; z-index:40; box-sizing:border-box; max-width:240px; padding:7px 11px; border:1px solid var(--wl-line-strong); border-radius:12px; background:var(--wl-raised); box-shadow:var(--wl-elev-pop); color:var(--wl-text); font-family:var(--wl-font-reading); font-size:13.5px; line-height:1.4; pointer-events:none; transform:translate(-50%, -100%); animation:wl-fight-say var(--wl-short) var(--wl-ease-out); }
.wl-fight-say::after { content:""; position:absolute; left:50%; bottom:-5px; width:9px; height:9px; border-right:1px solid var(--wl-line-strong); border-bottom:1px solid var(--wl-line-strong); background:var(--wl-raised); transform:translateX(-50%) rotate(45deg); }
.wl-fight-say.is-leaving { opacity:0; transition:opacity var(--wl-short) var(--wl-ease); }

/* A fight's lines in the story: it begins, a new round, someone waits, it ends. */
.wb-game-turn.is-fight { display:flex; flex-direction:column; align-items:center; margin:2px 0 4px; }
.wl-fight-line { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; color:var(--wl-text-2); font-size:12.5px; line-height:1.5; text-align:center; }
.wl-fight-line::before, .wl-fight-line::after { content:""; flex:1 1 28px; min-width:28px; max-width:140px; height:1px; background:var(--wl-line); }
.wl-fight-line > span { flex:0 1 auto; min-width:0; max-width:88ch; text-wrap:balance; }
.wl-fight-line .wt-glyph { display:inline-flex; color:var(--wl-text-3); }
.wl-fight-line .wt-glyph svg { width:14px; height:14px; }
.wl-fight-line.is-start, .wl-fight-line.is-end { color:var(--wl-text); font-weight:600; }
.wl-fight-line.is-start .wt-glyph, .wl-fight-line.is-lost .wt-glyph { color:var(--wl-danger); }
.wl-fight-line.is-won .wt-glyph { color:var(--wl-accent); }
.wl-fight-line.is-round, .wl-fight-line.is-wait { color:var(--wl-text-3); }
.wl-script-done .wl-thing-head .wl-script-turn, .wl-script-done .wl-thing-head .wl-script-with { color:var(--wl-text-3); font-size:12px; }
.wl-script-done .wl-thing-head .wl-script-turn::before { content:"· "; }

/* A scene you enter (C): the place behind, the two sides facing, the lines as it begins. */
.wl-fight-scene { position:absolute; inset:0; z-index:30; display:grid; place-items:center; overflow:hidden; background:color-mix(in srgb, var(--wl-bg) 82%, transparent); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); animation:wl-fade var(--wl-short) var(--wl-ease-out); }
.wl-fight-scene.is-leaving { opacity:0; transition:opacity var(--wl-short) var(--wl-ease); }
.wl-fight-scene-art { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.28; filter:saturate(.8); -webkit-mask-image:radial-gradient(ellipse at center, var(--wl-bg) 30%, transparent 80%); mask-image:radial-gradient(ellipse at center, var(--wl-bg) 30%, transparent 80%); }
.wl-fight-scene-inner { position:relative; box-sizing:border-box; display:flex; flex-direction:column; align-items:center; gap:22px; width:min(640px, 100% - 32px); padding:24px 0; text-align:center; }
.wl-fight-scene-title { display:inline-flex; align-items:center; gap:9px; margin:0; color:var(--wl-text); font-family:var(--wl-font-title); font-size:var(--t-title-section); font-weight:400; letter-spacing:0; animation:wl-fight-rise var(--wl-long) var(--wl-ease-out); }
.wl-fight-scene-title .wt-glyph { display:inline-flex; color:var(--wl-danger); }
.wl-fight-scene-title .wt-glyph svg { width:20px; height:20px; }
.wl-fight-scene-sides { display:flex; align-items:center; justify-content:center; gap:20px; width:100%; }
.wl-fight-scene-side { display:flex; flex-wrap:wrap; justify-content:center; gap:16px; flex:1 1 0; min-width:0; }
.wl-fight-scene-side.is-yours { justify-content:flex-end; animation:wl-fight-from-left var(--wl-long) var(--wl-ease-out); }
.wl-fight-scene-side.is-theirs { justify-content:flex-start; animation:wl-fight-from-right var(--wl-long) var(--wl-ease-out); }
.wl-fight-scene-vs { flex:none; color:var(--wl-text-3); font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.wl-fight-scene-one { display:flex; flex-direction:column; align-items:center; gap:6px; width:92px; }
.wl-fight-scene-one .wb-game-face { width:64px; height:64px; border:2px solid var(--wl-line-strong); font-size:18px; }
.wl-fight-scene-side.is-theirs .wl-fight-scene-one .wb-game-face { border-color:color-mix(in srgb, var(--wl-danger) 70%, transparent); }
.wl-fight-scene-one b { max-width:100%; overflow:hidden; color:var(--wl-text); font-size:13.5px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.wl-fight-scene-one small { color:var(--wl-text-3); font-size:11.5px; font-variant-numeric:tabular-nums; }
.wl-fight-scene-said { min-height:48px; width:100%; }
.wl-fight-scene-said p { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px; margin:0; color:var(--wl-text); font-family:var(--wl-font-reading); font-size:16px; line-height:1.5; animation:wl-fight-rise var(--wl-short) var(--wl-ease-out); }
.wl-fight-scene-said .wb-game-face { width:26px; height:26px; font-size:10px; }
.wl-fight-scene-said b { font-family:var(--wl-font-ui); font-size:13px; font-weight:600; color:var(--wl-text-2); }
.wl-fight-scene-acts { display:flex; align-items:center; gap:8px; }

@keyframes wl-fight-in { from { opacity:0; transform:translateY(-4px); } }
@keyframes wl-fight-rise { from { opacity:0; transform:translateY(6px); } }
@keyframes wl-fight-from-left { from { opacity:0; transform:translateX(-18px); } }
@keyframes wl-fight-from-right { from { opacity:0; transform:translateX(18px); } }
@keyframes wl-fight-say { from { opacity:0; transform:translate(-50%, calc(-100% + 6px)); } }
@keyframes wl-fight-aim { 50% { box-shadow:0 0 0 3px var(--wl-bg), 0 0 0 7px color-mix(in srgb, var(--wl-danger) 45%, transparent); } }
@keyframes wl-fight-spin { to { transform:rotate(360deg); } }
@media (max-width:640px) {
  body.wb-shell .wl-fight-bar { width:calc(100% - 20px); gap:8px; padding:5px 6px 5px 10px; }
  .wl-fight-round > span { display:none; }
  .wl-fight-hand { padding:6px; }
  .wl-fight-moves { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin:-4px; padding:4px; }
  .wl-fight-scene-one { width:72px; }
  .wl-fight-scene-one .wb-game-face { width:48px; height:48px; }
  .wl-fight-scene-sides { gap:10px; }
}
@media (prefers-reduced-motion:reduce) {
  :is(.wl-fight-bar, .wl-fight-hand, .wl-fight-say, .wl-fight-scene, .wl-fight-scene-title, .wl-fight-scene-side, .wl-fight-scene-said p) { animation:none; }
  .wb-game.is-aiming .wb-game-map .wh-map-marker.wb-game-token.is-aim, .wl-fight-wait { animation:none; }
}
/* Missions (game-missions.mjs): the job in focus as a card on top, the others running as rows to tap, the closed
   ones quiet below. Its leads are dots, lit as they are found; a deadline a day away turns red. */
.wb-game-card.is-missions .wb-game-card-body { padding:12px; }
.wb-missions { display:flex; flex-direction:column; gap:4px; }
.wb-missions-empty { display:flex; align-items:flex-start; gap:10px; padding:14px; border:1px dashed var(--wl-line); border-radius:12px; color:var(--wl-text-3); font-size:13px; line-height:1.45; }
.wb-missions-empty p { margin:0; }
.wb-missions-empty .wt-glyph { margin-top:1px; }
.wb-mission { display:flex; flex-direction:column; gap:12px; padding:14px 14px 12px; border:1px solid var(--wl-line); border-radius:14px; background:var(--wl-surface); }
.wb-mission-head { display:flex; align-items:flex-start; gap:10px; }
.wb-mission-titles { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.wb-mission-kicker { color:var(--wl-text-3); font-size:11px; font-weight:600; letter-spacing:.02em; }
.wb-mission-name { margin:0; color:var(--wl-text); font-family:var(--wl-font-title); font-size:var(--t-title-section); font-weight:400; letter-spacing:0; line-height:1.2; overflow-wrap:anywhere; }
body button.wb-mission-open { flex:none; display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; padding:0; border:0; border-radius:9px; background:transparent; box-shadow:none; color:var(--wl-text-3); transition:background-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
body button.wb-mission-open:hover { background:var(--wl-raised); color:var(--wl-text); }
.wb-mission-from { display:flex; align-items:center; gap:8px; color:var(--wl-text-2); font-size:13px; }
.wb-mission-from b { color:var(--wl-text); font-weight:600; }
.wb-mission .wb-mission-face { width:24px; height:24px; font-size:10px; }
.wb-mission-facts { display:flex; flex-direction:column; border-top:1px solid var(--wl-line); }
.wb-mission-fact { display:grid; grid-template-columns:16px 48px minmax(0,1fr); align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--wl-line); font-size:13px; }
.wb-mission-fact > .wt-glyph, .wb-mission-fact-label { color:var(--wl-text-3); }
.wb-mission-fact > .wt-glyph svg, .wb-mission-more .wt-glyph svg { width:15px; height:15px; }
.wb-mission-fact-value { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; min-width:0; color:var(--wl-text); }
.wb-mission-fact.is-near > .wt-glyph, .wb-mission-fact.is-near .wb-mission-fact-value { color:var(--wl-danger); }
.wb-mission-sep { color:var(--wl-text-3); }
.wb-mission-dots { display:inline-flex; gap:5px; }
.wb-mission-dots i { width:9px; height:9px; box-sizing:border-box; border:1.5px solid var(--wl-line-strong); border-radius:50%; }
.wb-mission-dots i.is-found { border-color:var(--wl-accent); background:var(--wl-accent); box-shadow:0 0 6px -1px color-mix(in srgb,var(--wl-accent) 70%,transparent); }
.wb-mission-more { display:flex; align-items:center; gap:8px; margin:0; color:var(--wl-text-3); font-size:12.5px; font-style:italic; }
.wb-missions-label { padding:14px 6px 4px; color:var(--wl-text-3); font-size:11px; font-weight:600; letter-spacing:.02em; }
body button.wb-mission-row { display:flex; align-items:center; justify-content:flex-start; gap:10px; width:100%; height:auto; padding:8px 10px; border:0; border-radius:10px; background:transparent; box-shadow:none; color:var(--wl-text); text-align:left; transition:background-color var(--wl-quick) var(--wl-ease); }
body button.wb-mission-row:hover { background:var(--wl-raised); }
.wb-mission-row > .wt-glyph { color:var(--wl-text-3); }
.wb-mission-row-text { display:flex; flex-direction:column; gap:1px; min-width:0; }
.wb-mission-row-text strong { overflow:hidden; font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.wb-mission-row-text small { color:var(--wl-text-3); font-size:12px; }
.wb-mission-row.is-done > .wt-glyph { color:var(--wl-success); }
.wb-mission-row.is-failed > .wt-glyph { color:var(--wl-danger); }
.wb-mission-row:is(.is-done, .is-failed) strong { color:var(--wl-text-2); font-weight:500; }
/* The story's quiet lines for a running job (D-178): under the turn that did it; a tap opens it in Missions. */
body button.wb-mission-line { display:flex; align-items:center; gap:8px; width:auto; max-width:100%; height:auto; margin:8px 0 0; padding:4px 11px 4px 9px; border:1px solid var(--wl-line); border-radius:999px; background:transparent; box-shadow:none; color:var(--wl-text-2); font:inherit; font-size:12.5px; line-height:1.45; cursor:pointer; transition:color var(--wl-quick) var(--wl-ease), border-color var(--wl-quick) var(--wl-ease), background-color var(--wl-quick) var(--wl-ease); }
body button.wb-mission-line:hover { color:var(--wl-text); border-color:var(--wl-line-strong); background:var(--wl-raised); }
body button.wb-mission-line + button.wb-mission-line { margin-top:6px; }
.wb-mission-line .wt-glyph { display:inline-flex; flex:none; color:var(--wl-accent); }
.wb-mission-line .wt-glyph svg { width:14px; height:14px; }
.wb-mission-line.is-near .wt-glyph { color:var(--wl-danger); }
.wb-mission-line > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---- World light (D-186, DESIGN-SYSTEM.md section 6, "World light") ----
   The game's one lit thing is the message box on your turn: a thin edge in the world's two colours, brightest where
   the light enters at the top left. No glow around the box and no wash inside it (the user, 2026-11-10: "lets drop
   the glow on the composer"), so the box stays the same dark as the story's cards (D-187). Send and the open
   panel's icon on the rail catch the light. While the narrator writes, nothing is lit. --wl-light-* and --wl-glow-*
   are set per world. */
body.wb-shell .wb-game .wb-game-composer.is-your-turn:not(.is-direction),
body.wb-shell .wb-game .wb-game-composer.is-your-turn:not(.is-direction):focus-within {
  border:1px solid transparent;
  background:
    linear-gradient(var(--wg-card, var(--wl-bg)), var(--wg-card, var(--wl-bg))) padding-box,
    linear-gradient(100deg, var(--wl-light-1) 0%, var(--wl-light-1) 22%, var(--wl-light-2) 62%, color-mix(in srgb, var(--wl-light-2) 45%, var(--wl-line)) 100%) border-box;
  /* The lit edge is the box's one outline: no second ring around it while you type. */
  box-shadow:var(--wl-elev-card);
}
/* Send is filled with the same light, with no glow under it either: the box has no glow anywhere. */
body.wb-shell .wb-game .wb-game-composer.is-your-turn button.wb-game-send:not(:disabled) {
  background:linear-gradient(135deg, color-mix(in srgb, var(--wl-light-1) 70%, var(--wl-text)), var(--wl-light-2));
  box-shadow:inset 0 1px 0 0 color-mix(in srgb, var(--wl-text) 55%, transparent);
}
body.wb-shell .wb-game .wb-game-composer.is-your-turn .wl-composer-turn { color:var(--wl-light-1); }
body.wb-shell .wb-game .wb-game-rail button.wb-game-rail-item.is-active { background:color-mix(in srgb, var(--wl-light-1) 11%, transparent); color:var(--wl-light-1); }
body.wb-shell .wb-game .wb-game-rail button.wb-game-rail-item.is-active::before { background:var(--wl-light-1); box-shadow:0 0 12px 1px color-mix(in srgb, var(--wl-glow-1) 70%, transparent); }
/* A hair of the same light along the top edge of each answer, like the rim of smoked glass. */
body.wb-shell .wb-game .wb-game-turn.is-gm::before { content:""; position:absolute; inset:-1px 18px auto 18px; height:1px; pointer-events:none; z-index:2; background:linear-gradient(90deg, transparent, color-mix(in srgb, var(--wl-light-1) 34%, transparent) 30%, color-mix(in srgb, var(--wl-light-2) 34%, transparent) 70%, transparent); }
/* The room: the place's picture behind the story shows a little more, so each place colours its own scene. */
body.wb-shell .wb-game.has-backdrop:not(.is-vn) .wb-game-backdrop::after { background:linear-gradient(180deg, color-mix(in srgb, var(--wl-bg) 44%, transparent), color-mix(in srgb, var(--wl-bg) 62%, transparent) 60%, color-mix(in srgb, var(--wl-bg) 80%, transparent)); }
body.wb-shell .wb-game.has-backdrop:not(.is-vn) .wb-game-backdrop img { filter:blur(10px) saturate(1.25); }
/* The rail and the panel take a lighter shade over the room only where the panel lies over the story (1000px and
   under). On a wide window nothing is shaded (D-255): the rail's icons and the panel's cards stand on the room. */
@media (max-width:1000px) {
  body.wb-shell .wb-game.has-backdrop:not(.is-vn) :is(.wb-game-rail, .wb-game-panel) { background:color-mix(in srgb, var(--wl-bg) 46%, transparent); }
}
@media (max-width:1000px) and (prefers-reduced-transparency: reduce) { body.wb-shell .wb-game.has-backdrop:not(.is-vn) :is(.wb-game-rail, .wb-game-panel) { background:var(--wl-bg); } }
/* Your text size (You → Preferences): the story's own words, a step smaller or larger. */
body.wl-text-small .wb-game :is(.wb-game-prose, .wb-game-line-text) { zoom:.9; }
body.wl-text-large .wb-game :is(.wb-game-prose, .wb-game-line-text) { zoom:1.15; }

/* ---- The map fills its card (E1) and the fight on the map (D4, I4, the tactical overlays) ----
   The map takes the card's height; the list of who is here keeps to a short share under it. The turn order sits
   across the top of the card in a fight (game-fight.mjs paintBar, its slot from game-map.mjs). Everything read on
   the map is a solid chip in the theme's own surface, so it reads on a light map, a dark one and a picture. */
body.wb-shell .wb-game-card.is-map .wb-game-people-list { max-height:min(300px, 24vh); }
.wb-game-map .wb-game-map-canvas { touch-action:none; }
.wb-game-map-fight { flex:none; padding:8px 8px 0; }
.wb-game-map-fight:empty { display:none; }
body.wb-shell .wl-fight-bar.is-on-map { width:100%; max-width:none; margin:0 0 8px; padding:4px 6px 4px 10px; box-shadow:none; }
.wl-fight-one.is-out { opacity:.5; }
.wb-game-map-painting { position:absolute; top:8px; left:50%; z-index:2; max-width:calc(100% - 120px); margin:0; padding:4px 12px; transform:translateX(-50%); border:1px solid var(--wl-line); border-radius:999px; background:var(--wl-inset); color:var(--wl-text-2); font-size:12px; line-height:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; pointer-events:none; }
/* Out of reach of the move you aim: dimmed further than a bystander, its ring dashed, and why on hover. */
.wb-game.is-aiming .wb-game-map .wh-map-marker.wb-game-token.is-out-of-reach { opacity:.45; cursor:not-allowed; box-shadow:0 0 0 3px var(--wl-bg), 0 0 0 5px color-mix(in srgb, var(--wl-text-3) 55%, transparent); }
.wb-game.is-aiming .wb-game-map .wh-map-label.wb-game-token-label.is-out-of-reach { opacity:.6; }
body.wb-shell button.wl-turn-target.is-out, body.wb-shell button.wl-fight-target.is-out { border-style:dashed; cursor:not-allowed; }
body.wb-shell button.wl-turn-target.is-out:disabled { opacity:.55; }
/* The layers: lines drawn twice, a dark halo under the colour. */
.wl-map-layer :is(polyline, circle, polygon).is-halo { fill:none; stroke:var(--wl-bg); stroke-width:4; stroke-dasharray:none; opacity:.4; }
.wl-map-reach-ring { fill:none; stroke:var(--wl-accent); stroke-width:1.5; stroke-dasharray:6 5; opacity:.8; }
.wl-map-reach-line { fill:none; stroke:var(--wl-danger); stroke-width:2; stroke-linecap:round; }
.wl-map-reach-line.is-past:not(.is-halo) { stroke-dasharray:2 5; opacity:.55; }
.wl-map-area-shape { fill:color-mix(in srgb, var(--wl-danger) 16%, transparent); stroke:var(--wl-danger); stroke-width:1.5; stroke-dasharray:5 4; stroke-linejoin:round; }
.wl-map-measure-line:not(.is-halo) { fill:none; stroke:var(--wl-text); stroke-width:1.5; stroke-dasharray:3 4; stroke-linecap:round; }
/* Words and numbers on the map keep their size at any zoom, as names do. */
.wl-map-tag, .wl-fight-number { position:absolute; z-index:6; transform-origin:0 0; white-space:nowrap; pointer-events:none; }
.wl-map-tag { display:inline-flex; align-items:center; gap:4px; max-width:260px; padding:2px 8px; transform:scale(calc(1 / var(--zoom, 1))) translate(-50%, -50%); overflow:hidden; 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; line-height:18px; font-variant-numeric:tabular-nums; text-overflow:ellipsis; }
.wl-map-area-tag { transform:scale(calc(1 / var(--zoom, 1))) translate(-50%, calc(-100% - 26px)); border-color:color-mix(in srgb, var(--wl-danger) 45%, var(--wl-line)); font-family:var(--wl-font-ui); }
.wl-map-block-tag { transform:scale(calc(1 / var(--zoom, 1))) translate(-50%, calc(-100% - 10px)); border-color:color-mix(in srgb, var(--wl-danger) 55%, var(--wl-line)); color:var(--wl-text-2); font-family:var(--wl-font-ui); }
.wl-map-measure-tag { padding-right:2px; pointer-events:auto; }
body.wb-shell button.wl-map-tag-close { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; margin:0; padding:0; border:0; border-radius:var(--r-sm); background:transparent; box-shadow:none; color:var(--wl-text-3); cursor:pointer; }
body.wb-shell button.wl-map-tag-close:hover { background:var(--wl-raised); color:var(--wl-text); }
body.wb-shell button.wl-map-tag-close:focus-visible { outline:2px solid var(--wl-accent); outline-offset:1px; }
.wl-map-tag-close .wt-glyph svg { display:block; width:12px; height:12px; }
.wb-game-map-canvas.is-measuring .wb-game-token { cursor:crosshair; }
/* A hit or a heal: its number rises a little over the token and fades, once (game-fight.mjs noteNumbers). */
.wl-fight-number { padding:0 6px; transform:scale(calc(1 / var(--zoom, 1))) translate(calc(-50% + var(--gx, 0px)), calc(-100% - 20px + var(--gy, 0px) - var(--row, 0) * 22px + var(--wl-rise))); border:1px solid color-mix(in srgb, var(--wl-danger) 60%, var(--wl-line)); border-radius:999px; background:var(--wl-raised); color:var(--wl-danger); font-family:var(--wl-font-mono); font-size:14px; font-weight:700; line-height:20px; font-variant-numeric:tabular-nums; animation:wl-fight-number 2400ms var(--wl-ease-out) both; }
.wl-fight-number.is-heal { border-color:color-mix(in srgb, var(--wl-success) 60%, var(--wl-line)); color:var(--wl-success); }
/* The rise is in screen pixels, after the counter-scale, so it is the same at any zoom. */
@property --wl-rise { syntax:'<length>'; inherits:false; initial-value:0px; }
@keyframes wl-fight-number { 0% { opacity:0; --wl-rise:6px; } 10% { opacity:1; --wl-rise:0px; } 70% { opacity:1; } 100% { opacity:0; --wl-rise:-18px; } }
@keyframes wl-fight-number-fade { 0% { opacity:0; } 6% { opacity:1; } 94% { opacity:1; } 100% { opacity:0; } }
/* Open large (game-panel.mjs): most of the window, a readable column of story left beside it. */
.wb-game { --wb-story-least:420px; }
@media (max-width:1000px) { body .wb-game-panel.is-map-large { width:calc(100% - 96px); } }
/* On a phone the map's sheet already lies over the story, so there is nothing larger to open. */
@media (max-width:640px) { body .wb-game-map-controls button.wb-game-map-grow { display:none; } }
/* The map's buttons (E1): one column at the map's right edge. On a map too short for all of them (a phone, a map
   dragged short) they carry on in a second column to its left instead of being cut off, and they stop above the
   bottom row, where the Where chip is. The rows are the buttons' own size (--wb-map-button), so a button others add
   takes its place in the same way. */
body .wb-game-map-controls { --wb-map-button:28px; display:grid; grid-auto-flow:column; grid-template-rows:repeat(auto-fit, var(--wb-map-button)); grid-auto-columns:var(--wb-map-button); max-height:calc(100% - 56px); direction:rtl; }
body .wb-game-map-controls > * { direction:ltr; }
/* A place's card (game-map.mjs showCard) keeps room for its travel line (game-travel-card.mjs): the Foot · Horse · Cart
   · Boat row needs about 200px across, so the card stays at least 232px wide wherever the map is wide enough (a small
   floating map too), and on a short map (a phone, a map dragged short) it scrolls inside the map instead of being cut
   off at the bottom. */
.wb-game-map-card { min-width:min(232px, calc(100% - 8px)); max-height:calc(100% - 16px); overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; }
/* Touch: the map's buttons and a pinned distance's × take a finger (44px, the design system's touch target); the ×
   keeps its small look and its touch area reaches past it. */
@media (pointer:coarse) {
  body .wb-game-map-controls { --wb-map-button:44px; }
  body .wb-game-map-controls button.wt-icon-button { width:44px; height:44px; }
  body .wb-game-map-levels button.wt-icon-button { width:44px; height:44px; }
  body.wb-shell button.wl-map-tag-close { position:relative; width:28px; height:28px; }
  body.wb-shell button.wl-map-tag-close::before { content:""; position:absolute; inset:-8px; }
}
@media (prefers-reduced-motion:reduce) { .wl-fight-number { animation-name:wl-fight-number-fade; } }

/* ---- Relations and family (D-255, game-relations.mjs): over the story and the panel, under the bar, solid as a card.
   Its head holds who it is about, two tabs and close; its body is the workspace's own relationship graph (its folder
   path left out, as the head names them) or the family tree, drawn down the page. A phone gives it the whole screen. ---- */
.wb-game-relations { position:absolute; z-index:20; inset:calc(var(--wb-bar-height, 60px) + 4px) 60px 12px 12px; display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--wg-line); border-radius:var(--r-lg); background:var(--wl-bg); box-shadow:var(--wl-elev-pop); animation:wb-relations-in var(--wl-short) var(--wl-ease-out); }
.wb-game-relations:focus { outline:none; }
@keyframes wb-relations-in { from { opacity:0; transform:translateY(8px); } }
@media (prefers-reduced-motion:reduce) { @keyframes wb-relations-in { from { opacity:0; } } }
@media (max-width:640px) { .wb-game-relations { inset:var(--wb-bar-height, 60px) 0 0; border:0; border-radius:0; } }
.wb-game-relations-head { flex:none; display:flex; align-items:center; gap:18px; height:52px; padding:0 8px 0 14px; border-bottom:1px solid var(--wg-line); }
.wb-game-relations-who { display:flex; align-items:center; gap:10px; min-width:0; }
.wb-game-relations-who .wb-game-relations-face { flex:none; width:28px; height:28px; font-size:10px; }
.wb-game-relations-name { margin:0; 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; }
.wb-game-relations-tabs { display:flex; align-self:stretch; gap:2px; }
body .wb-game-relations button.wb-game-relations-tab { position:relative; height:100%; padding:0 12px; border:0; border-radius:0; background:none; box-shadow:none; color:var(--wl-text-3); font-size:13.5px; font-weight:600; transition:color var(--wl-quick) var(--wl-ease); }
body .wb-game-relations button.wb-game-relations-tab:hover { color:var(--wl-text); background:none; }
body .wb-game-relations button.wb-game-relations-tab.is-active { color:var(--wl-text); }
.wb-game-relations-tab.is-active::after { content:''; position:absolute; left:12px; right:12px; bottom:-1px; height:2px; border-radius:2px; background:var(--wl-selection); }
.wb-game-relations-gap { flex:1; }
.wb-game-relations-body { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.wb-game-relations-graph { flex:1; min-height:0; display:flex; flex-direction:column; }
.wb-game-relations-head > .wt-pagebar .wt-breadcrumb, .wb-game-relations-graph .wt-map-empty .mod-cta { display:none; }
.wb-game-relations-head > .wt-pagebar { position:static; flex:none; container-type:normal; flex-wrap:nowrap; gap:6px; min-height:0; margin:0; padding:0; border:0; background:none; }
.wb-game-relations-head > .wt-pagebar .wt-page-status:not(:empty) { order:0; flex-basis:auto; white-space:nowrap; }
@media (max-width:640px) { .wb-game-relations-head { gap:10px; } .wb-game-relations-name { display:none; } }

/* A card being edited (D-259): the workspace's in-place boxes and menus on the game's card, without the workspace's
   page around them. */
body.wb-shell .wb-game .wl-card-edit.wt-surface { display: block; overflow: visible; padding: 0; background: transparent; color: inherit; }
body.wb-shell .wb-game .wl-card-edit .wt-card-custom { margin: 0; }
body.wb-shell .wb-game .wl-card-edit .wt-ws-menu-item { box-shadow: none; }
body.wb-shell .wb-game .wl-card-edit .wt-ws-menu-item:is(:hover, :focus-visible) { outline: none; box-shadow: none; background: var(--wl-raised); }

/* ---- The goal and the trackers at the top of the story (D-283; the Trackers in play board, 2026-11-17;
   game-panel.mjs paintTrackerChips) ----
   The current goal, then two tracker chips at most, in the window's bar, centred over the story and gliding with it as
   the panel opens. The chip is the app's (system.css .wl-tk-chip) and the goal is made of the same: words on a dark
   glass over any place's picture, the same in every theme. Pressing one opens the Trackers card at it, and the open
   one keeps a brighter edge. With too little room the second chip goes, then (with a goal) the chips, then the goal is
   cut short. On a phone the goal has a row of its own at the top of the story, under the rail's strip. */
.wb-game-chips, .wb-game-goalbar {
  --wg-pill:color-mix(in srgb, var(--wl-picture-shade) 94%, transparent);
  --wg-pill-line:color-mix(in srgb, var(--wl-on-picture) 16%, transparent);
  --wg-pill-shadow:0 4px 14px color-mix(in srgb, var(--wl-picture-shade) 30%, transparent);
  --wg-pill-mark:color-mix(in srgb, var(--wl-selection) 70%, var(--wl-on-picture));
}
.wb-game-chips { position:absolute; top:50%; left:50%; z-index:1; display:flex; align-items:center; gap:8px; min-width:0; transform:translate(-50%, -50%); -webkit-app-region:no-drag; }
.wb-game-chips.is-placed { transition:left var(--wl-long) var(--wl-ease); }
.wb-game-chips.is-tight > .wl-tk-chip ~ .wl-tk-chip, .wb-game-chips.is-tighter > .wl-tk-chip { display:none; }
body :is(.wb-game-chips, .wb-game-goalbar) > button.wl-tk-chip, body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal { flex:0 1 auto; min-width:0; height:34px; border:1px solid var(--wg-pill-line); background:var(--wg-pill); box-shadow:var(--wg-pill-shadow); color:var(--wl-on-picture); -webkit-app-region:no-drag; transition:background-color var(--wl-quick) var(--wl-ease), border-color var(--wl-quick) var(--wl-ease), box-shadow var(--wl-short) var(--wl-ease), transform var(--wl-quick) var(--wl-ease-out); }
body :is(.wb-game-chips, .wb-game-goalbar) > button.wl-tk-chip { padding:0 13px 0 9px; }
body :is(.wb-game-chips, .wb-game-goalbar) > button.wl-tk-chip:hover, body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal:hover { background:var(--wl-picture-shade); border-color:color-mix(in srgb, var(--wl-on-picture) 28%, transparent); }
body :is(.wb-game-chips, .wb-game-goalbar) > button.wl-tk-chip:active, body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal:active { transform:scale(.98); }
body :is(.wb-game-chips, .wb-game-goalbar) > button.wl-tk-chip.is-active, body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal.is-active { border-color:color-mix(in srgb, var(--wl-on-picture) 62%, transparent); background:var(--wl-picture-shade); }
body :is(.wb-game-chips, .wb-game-goalbar) > button.wl-tk-chip:focus-visible, body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal:focus-visible { outline:2px solid var(--wl-selection); outline-offset:2px; }
:is(.wb-game-chips, .wb-game-goalbar) .wl-tk-chip-k { min-width:0; overflow:hidden; text-overflow:ellipsis; }
/* The goal: a flag, "New goal" for a few seconds when it is new, and the goal, cut short when there is no room. */
body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal { position:relative; display:inline-flex; align-items:center; gap:8px; max-width:440px; margin:0; padding:0 15px 0 11px; border-radius:var(--r-pill); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); font:600 13.5px/1 var(--wl-font-ui); white-space:nowrap; cursor:pointer; }
.wb-game-goal-flag { flex:none; display:inline-flex; color:var(--wg-pill-mark); }
.wb-game-goal-flag svg { display:block; width:15px; height:15px; }
.wb-game-goal-text { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.wb-game-goal-new { flex:none; display:inline-block; max-width:7em; overflow:hidden; color:var(--wg-pill-mark); transition:max-width var(--wl-short) var(--wl-ease), opacity var(--wl-short) var(--wl-ease), margin var(--wl-short) var(--wl-ease); }
body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal.is-fresh { border-color:color-mix(in srgb, var(--wl-selection) 70%, transparent); box-shadow:0 0 0 3px color-mix(in srgb, var(--wl-selection) 22%, transparent), var(--wg-pill-shadow); animation:wl-pop var(--wl-long) var(--wl-ease-out); }
body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal.is-fresh.is-settling { border-color:var(--wg-pill-line); box-shadow:var(--wg-pill-shadow); }
.wb-game-goal.is-settling .wb-game-goal-new { max-width:0; margin-right:-8px; opacity:0; }
.wb-game-goalbar { position:relative; z-index:1; flex:none; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; min-width:0; padding:6px 12px 6px; }
body .wb-game-goalbar > button.wb-game-goal, body .wb-game-goalbar > button.wl-tk-chip { max-width:100%; height:32px; }
@media (min-width:641px) { .wb-game-goalbar { display:none; } }
@media (max-width:640px) { .wb-game-chips { display:none; } }
@media (pointer:coarse) { body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal::after { content:''; position:absolute; inset:-5px 0; } }
@media (prefers-reduced-motion: reduce) {
  .wb-game-chips.is-placed { transition:none; }
  body :is(.wb-game-chips, .wb-game-goalbar) > button.wl-tk-chip:active, body :is(.wb-game-chips, .wb-game-goalbar) > button.wb-game-goal:active { transform:none; }
  .wb-game-goal-new { transition:opacity var(--wl-short) var(--wl-ease); }
}

/* ---- The Trackers card (the Trackers in play board, 2026-11-17; game-panel-trackers.mjs drawTrackers) ----
   Health as a ring round each face, every tracker in its own look with what it means and what moves it, then the
   goals, the current one first. As tall as what it holds (on a phone it fills the sheet, as every card there does);
   no scroll bar, and its bottom edge fades while there is more below, as every card in play. The rail's button shows
   only while the game keeps one of these, with a dot while a goal is new. */
body button.wb-game-rail-item.is-trackers[hidden] { display:none; }
.wb-game-card.is-trackers > .wb-game-card-body { padding:4px 16px 14px; }
@media (min-width:641px) {
  .wb-game-stack:not(.is-side) > .wb-game-card.is-trackers, .wb-game-stack:not(.is-side) > .wb-game-card.is-trackers > .wb-game-card-body { flex:0 1 auto; }
}
.wb-game-tk { display:flex; flex-direction:column; min-width:0; }
.wb-game-tk-sec { display:flex; flex-direction:column; gap:10px; min-width:0; padding:14px 0; }
.wb-game-tk-sec + .wb-game-tk-sec { border-top:1px solid var(--wl-line); }
.wb-game-tk-sec:first-child { padding-top:8px; }
.wb-game-tk-sec:last-child { padding-bottom:4px; }
.wb-game-tk .wb-game-people-head { padding:0; }
.wb-game-tk .wb-game-people-count { margin-left:auto; color:var(--wl-text-3); font-size:11px; font-weight:500; }
/* Someone's health: the ring round their face, their name, and the number out of its most. */
.wb-game-tk-person { display:flex; align-items:center; gap:12px; min-width:0; }
.wb-game-tk-face { position:relative; flex:none; width:42px; height:42px; }
.wb-game-tk-face > .wb-game-face { position:absolute; inset:5px; width:32px; height:32px; }
.wb-game-tk-ring { position:absolute; inset:0; width:42px; height:42px; transform:rotate(-90deg); }
.wb-game-tk-ring circle { fill:none; stroke-width:2.5; }
.wb-game-tk-ring .is-track { stroke:color-mix(in srgb, var(--wl-text) 14%, transparent); }
.wb-game-tk-ring .is-on { stroke:var(--wl-selection); stroke-linecap:round; }
.wb-game-tk-person.is-low .wb-game-tk-ring .is-on { stroke:var(--wl-danger); }
.wb-game-tk-person.is-down .wb-game-tk-face > .wb-game-face { filter:grayscale(1); opacity:.6; }
.wb-game-tk-who, .wb-game-tk-words { display:grid; gap:2px; min-width:0; }
.wb-game-tk-who { flex:1; }
.wb-game-tk-who b, .wb-game-tk-words b { overflow:hidden; color:var(--wl-text); font:600 13.5px/1.25 var(--wl-font-ui); text-overflow:ellipsis; white-space:nowrap; }
.wb-game-tk-who small { color:var(--wl-text-3); font-size:12px; line-height:1.3; }
.wb-game-tk-person.is-down .wb-game-tk-who small { color:var(--wl-danger); }
.wb-game-tk-num { margin-left:auto; display:flex; align-items:baseline; gap:3px; color:var(--wl-text); font:600 15px/1 var(--wl-font-mono); font-variant-numeric:tabular-nums; white-space:nowrap; }
.wb-game-tk-num b { font-weight:600; }
.wb-game-tk-num small { color:var(--wl-text-3); font-size:12px; font-weight:500; }
.wb-game-tk-num.is-pips { align-items:center; gap:4px; }
.wb-game-tk-num.is-pips i { width:8px; height:8px; border-radius:50%; box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--wl-text) 32%, transparent); }
.wb-game-tk-num.is-pips i.is-on { background:var(--wl-selection); box-shadow:none; }
/* A tracker: its mark (the clock's ring, else the mark its chip shows), its name and what it means, its number, then a
   checklist's items and what moves it under its words. */
.wb-game-tk-row { display:grid; grid-template-columns:36px minmax(0, 1fr) auto; align-items:center; column-gap:12px; row-gap:8px; }
.wb-game-tk-row + .wb-game-tk-row { margin-top:6px; }
.wb-game-tk-mark { position:relative; display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:var(--wl-inset); color:var(--wl-text-2); }
.wb-game-tk-row.is-clock > .wb-game-tk-mark { background:none; }
.wb-game-tk-mark .wl-tk-ring { width:36px; height:36px; }
.wb-game-tk-mark > .wt-glyph { display:inline-flex; }
.wb-game-tk-mark > .wt-glyph svg { display:block; width:17px; height:17px; }
.wb-game-tk-minibar { display:block; width:20px; height:5px; overflow:hidden; border-radius:var(--r-pill); background:color-mix(in srgb, var(--wl-text) 16%, transparent); }
.wb-game-tk-minibar i { display:block; height:100%; border-radius:inherit; background:var(--wl-selection); }
.wb-game-tk-owner { position:absolute; right:-3px; bottom:-3px; display:flex; border-radius:50%; box-shadow:0 0 0 2px var(--wg-card, var(--wl-bg)); }
.wb-game-tk-owner > .wb-game-face { width:18px; height:18px; font-size:9px; }
.wb-game-tk-words small { color:var(--wl-text-2); font-size:12.5px; line-height:1.4; }
.wb-game-tk-row > .wl-tk-list { grid-column:2 / 4; min-width:0; }
/* A tracker's own look (D-359): under its row, the width of its words and number. */
.wb-game-tk-row > .wl-tk-own { grid-column:2 / 4; min-width:0; }
.wb-game-tk-row > .wl-tk-list li { font-size:13px; }
.wb-game-tk-rules { grid-column:2 / 4; margin:0; color:var(--wl-text-3); font-size:11.5px; line-height:1.4; }
/* The goals: an open ring for one to do, a tick for one done, a cross for one failed; the current one brighter. */
.wb-game-tk-goal { display:flex; align-items:flex-start; gap:10px; min-width:0; color:var(--wl-text-2); font-size:13.5px; line-height:1.4; }
.wb-game-tk-goal.is-current { color:var(--wl-text); font-weight:600; }
.wb-game-tk-goal-mark { flex:none; box-sizing:border-box; width:16px; height:16px; margin-top:2px; border:1.5px solid currentColor; border-radius:50%; }
.wb-game-tk-goal-text { flex:1; min-width:0; overflow-wrap:anywhere; }
.wb-game-tk-goal.is-completed, .wb-game-tk-goal.is-failed { color:var(--wl-text-3); }
.wb-game-tk-goal.is-completed > .wb-game-tk-goal-text { text-decoration:line-through; text-decoration-color:color-mix(in srgb, var(--wl-text-3) 60%, transparent); }
.wb-game-tk-goal.is-completed > .wb-game-tk-goal-mark { display:inline-flex; width:17px; height:17px; margin-top:1px; border:0; color:var(--wl-success); }
.wb-game-tk-goal.is-completed > .wb-game-tk-goal-mark svg { display:block; width:17px; height:17px; }
.wb-game-tk-goal.is-failed > .wb-game-tk-goal-mark { display:grid; place-items:center; color:var(--wl-danger); }
.wb-game-tk-goal.is-failed > .wb-game-tk-goal-mark > .wt-glyph { display:inline-flex; }
.wb-game-tk-goal.is-failed > .wb-game-tk-goal-mark svg { display:block; width:10px; height:10px; }
.wb-game-tk-new { flex:none; margin-left:auto; padding:0 7px; border-radius:var(--r-pill); background:var(--wl-selection-soft); color:var(--wl-selection); font:600 10.5px/18px var(--wl-font-ui); }
body .wb-game-tk .wb-game-tk-earlier { position:relative; align-self:flex-start; margin-top:2px; color:var(--wl-text-2); font-size:12.5px; }
.wb-game-tk-none { padding:10px 0 6px; }
@media (pointer:coarse) { body .wb-game-tk .wb-game-tk-earlier::after { content:''; position:absolute; inset:-12px -8px; } }
/* The row a chip or the goal opened the card at glows for a moment, and a number that just changed brightens. */
@keyframes wb-tk-lit { from, 35% { background-color:var(--wl-selection-soft); box-shadow:0 0 0 6px var(--wl-selection-soft); } }
@keyframes wb-tk-changed { from, 30% { color:var(--wl-selection); } }
.wb-game-tk .is-lit { border-radius:var(--r-sm); animation:wb-tk-lit 1.6s var(--wl-ease) both; }
.wb-game-tk .is-changed > .wb-game-tk-num > b { animation:wb-tk-changed 1.6s var(--wl-ease) both; }
.wb-game-tk-goal.is-changed > .wb-game-tk-goal-mark { animation:wl-pop var(--wl-long) var(--wl-ease-out); }

/* ---- The map's bar in play (D-300, game-map.mjs showCard): one row over what is picked, as the workspace map's bar
   is, made for play. Glass, as the tools over the map are; 30px buttons; Remove apart at the end, red when pointed at.
   On a map narrower than the bar, words give way and the buttons stay (game-map.mjs fitBar). ---- */
.wb-game-map-card.is-bar { width:auto; min-width:0; max-width:calc(100% - 16px); max-height:none; padding:4px; border-radius:12px; overflow:visible; }
.wl-map-bar { display:flex; align-items:center; gap:2px; min-width:0; }
.wl-map-bar-sep { flex:none; width:1px; height:20px; margin:0 4px; background:var(--wl-line); }
body .wl-map-bar button.wl-map-bar-button { flex:none; display:inline-flex; align-items:center; justify-content:center; gap:6px; height:30px; min-width:30px; padding:0 7px; border:0; border-radius:var(--r-sm); background:transparent; box-shadow:none; color:var(--wl-text-2); font:500 12.5px/1 var(--wl-font-ui); white-space:nowrap; transition:background-color var(--wl-quick) var(--wl-ease-out), color var(--wl-quick) var(--wl-ease-out); }
body .wl-map-bar button.wl-map-bar-button:hover { background:color-mix(in srgb, var(--wl-text) 9%, transparent); color:var(--wl-text); }
body .wl-map-bar button.wl-map-bar-button[aria-pressed="true"] { background:var(--wl-selection-soft); color:var(--wl-text); }
.wl-map-bar-button .wt-glyph svg { width:16px; height:16px; display:block; }
body .wl-map-bar button.wl-map-bar-remove:hover { color:var(--wl-danger); background:color-mix(in srgb, var(--wl-danger) 12%, transparent); }
body .wl-map-bar button.wl-map-bar-act.is-primary { background:color-mix(in srgb, var(--wl-accent) 16%, transparent); color:var(--wl-text); font-weight:600; }
body .wl-map-bar button.wl-map-bar-act.is-primary:hover { background:color-mix(in srgb, var(--wl-accent) 24%, transparent); }
body .wl-map-bar button.wl-map-bar-act.is-primary .wt-glyph { color:var(--wl-accent); }
/* Its name: its face (round for a token) or its mark, opening its page or the map inside it. */
.wl-map-bar-name { flex:0 1 auto; min-width:0; display:flex; align-items:center; gap:8px; height:34px; padding:0 10px 0 3px; border-radius:var(--r-sm); background:var(--wl-raised); color:var(--wl-text); }
body .wl-map-bar button.wl-map-bar-name { border:0; box-shadow:none; cursor:pointer; font:inherit; transition:background-color var(--wl-quick) var(--wl-ease-out); }
body .wl-map-bar button.wl-map-bar-name:hover { background:color-mix(in srgb, var(--wl-text) 10%, var(--wl-raised)); }
.wl-map-bar-name.is-still { background:transparent; padding-left:4px; }
.wl-map-bar-mark { flex:none; width:28px; height:28px; display:grid; place-items:center; border-radius:7px; overflow:hidden; color:var(--wl-text-2); background:color-mix(in srgb, var(--wl-text) 6%, transparent); }
.wl-map-bar-mark.is-round { border-radius:50%; }
.wl-map-bar-mark .wt-glyph svg { width:16px; height:16px; display:block; }
.wl-map-bar-face { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; color:var(--wl-text-2); }
.wl-map-bar-face img { width:100%; height:100%; object-fit:cover; display:block; }
.wl-map-bar-words { min-width:0; display:flex; flex-direction:column; gap:1px; text-align:left; }
.wl-map-bar-words strong { max-width:16em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:600 13px/17px var(--wl-font-ui); }
.wl-map-bar-words small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--wl-text-3); font-size:11px; line-height:14px; }
/* The square it stands on, in the map's numbers. */
.wl-map-bar-square { flex:none; margin:0 2px 0 6px; padding:4px 7px; border:1px solid var(--wl-line); border-radius:999px; color:var(--wl-text-2); font:500 11px/1 var(--wl-font-mono); letter-spacing:.02em; }
/* Under the bar: a place's trip, or a few words about a door or a thing with no page of its own. */
.wl-map-bar-under { margin:4px 2px 0; padding:6px 6px 2px; border-top:1px solid var(--wl-line); }
.wl-map-bar-about { max-width:32em; max-height:6em; margin-bottom:0; overflow:auto; color:var(--wl-text-2); font-size:12px; line-height:1.5; white-space:pre-wrap; }
/* Words give way in two steps: what kind it is, then the square and the action's word. */
.wb-game-map-card.is-tight .wl-map-bar-words small { display:none; }
.wb-game-map-card.is-tighter .wl-map-bar-square, .wb-game-map-card.is-tighter .wl-map-bar-act .wl-map-bar-label { display:none; }
.wb-game-map-card.is-tighter .wl-map-bar-words strong { max-width:9em; }
@media (pointer:coarse) { body .wl-map-bar button.wl-map-bar-button { height:38px; min-width:38px; } .wl-map-size-grip { width:16px; height:16px; margin:-8px 0 0 -8px; } }
/* Move, picking where: a dashed line from them to the square under the pointer, the square at their size, its name. */
.wl-map-aim { position:absolute; inset:0; z-index:6; width:100%; height:100%; overflow:visible; pointer-events:none; }
.wl-map-aim-path { stroke:var(--wl-text); stroke-width:2; stroke-dasharray:7 6; stroke-linecap:round; opacity:.85; }
.wl-map-aim-square { fill:color-mix(in srgb, var(--wl-text) 10%, transparent); stroke:var(--wl-text); stroke-width:2; }
.wl-map-aim-mark { fill:none; stroke:var(--wl-text); stroke-width:1.75; stroke-linecap:round; }
.wl-map-aim-name { position:absolute; z-index:7; transform:translateY(-100%); padding:3px 7px; border-radius:999px; background:color-mix(in srgb, var(--wl-bg) 88%, transparent); color:var(--wl-text); font:600 11px/1 var(--wl-font-mono); pointer-events:none; white-space:nowrap; }
.wl-map-aim-name[hidden] { display:none; }
/* In fog (Add to the map, D-319): the square fades and dashes, and says Not seen yet instead of its name. */
.wl-map-aim.is-unseen .wl-map-aim-square { fill:none; stroke:var(--wl-text-3); stroke-dasharray:4 4; }
.wl-map-aim.is-unseen .wl-map-aim-mark { stroke:var(--wl-text-3); }
.wl-map-aim-name.is-unseen { color:var(--wl-text-2); font-family:var(--wl-font-ui, inherit); font-weight:550; }
/* Over a place that isn't yours, someone added is put in it: the square says its name, in words, not a grid's code. */
.wl-map-aim-name.is-place { font-family:var(--wl-font-ui, inherit); }
/* The hint over the map while a token is moved or someone is put (D-300, D-319): one line as wide as its words, up to
   the map's width less its buttons, and a click on its words reaches the map under it; only Cancel takes one. */
.wl-map-move-hint.is-token-move { width:max-content; pointer-events:none; }
.wl-map-move-hint.is-token-move > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wl-map-move-hint.is-token-move > button { flex:none; pointer-events:auto; }
/* A token's corner: a small ring on its edge, as a door's handles are; dragged, the token grows or shrinks through the
   sizes, its size shown beside a square its size. Drawn over the map in the card's pixels (game-map.mjs addGrip). */
.wl-map-size-grip, .wl-map-size-box, .wl-map-size-tag { position:absolute; z-index:5; }
.wl-map-size-grip { box-sizing:border-box; width:10px; height:10px; margin:-5px 0 0 -5px; border:2px solid var(--wl-selection); border-radius:50%; background:var(--wl-bg); box-shadow:0 1px 3px color-mix(in srgb, #000 35%, transparent); cursor:nwse-resize; pointer-events:auto; touch-action:none; transition:background-color var(--wl-quick) var(--wl-ease-out); }
.wl-map-size-grip::before { content:""; position:absolute; inset:-7px; border-radius:50%; }
.wl-map-size-grip:hover, .wl-map-size-grip.is-dragging { background:var(--wl-selection); }
.wl-map-size-box { box-sizing:border-box; border:1.5px dashed var(--wl-selection); border-radius:6px; background:var(--wl-selection-soft); pointer-events:none; }
.wl-map-size-tag { padding:3px 7px; border-radius:999px; background:var(--wl-selection); color:var(--wl-bg); font:700 11px/1 var(--wl-font-mono); white-space:nowrap; transform:translateY(-50%); pointer-events:none; }
.wl-map-size-grip[hidden], .wl-map-size-box[hidden], .wl-map-size-tag[hidden] { display:none; }
.wb-game-map-canvas.is-sizing-token, .wb-game-map-canvas.is-sizing-token * { cursor:nwse-resize !important; }
@media (prefers-reduced-motion:reduce) { body .wl-map-bar button.wl-map-bar-button, body .wl-map-bar button.wl-map-bar-name { transition:none; } }

/* ---- Add to the map (game-map.mjs, D-319): under the map, in the Characters' place, so the map stays in view. A head
   with × as the Characters' head has; a search box; the story's own as a row of faces; chips by kind when there is more
   than one; rows as the Characters' own, those already on the map faint; someone new as quiet dashed buttons. Solid, as
   everything read in play is. A pick waiting for its place is marked as a chosen thing is (the selection's tint). ---- */
.wb-game-add { display:flex; flex-direction:column; gap:10px; padding:2px 12px 12px; border-top:1px solid var(--wl-line); animation:wl-fade var(--wl-short) var(--wl-ease-out); }
.wb-game-add[hidden] { display:none; }
.wb-game-add-head { display:flex; align-items:center; gap:8px; min-height:44px; padding-left:4px; }
.wb-game-add-head strong { flex:1; min-width:0; color:var(--wl-text-2); font-family:var(--wl-font-title); font-size:var(--t-title-panel); font-weight:400; letter-spacing:0; }
body .wb-game-add-head button.wb-game-add-close { width:28px; height:28px; margin-right:-4px; padding:0; border:0; border-radius:var(--r-sm); background:transparent; box-shadow:none; color:var(--wl-text-3); }
body .wb-game-add-head button.wb-game-add-close:hover { background:var(--wg-hover); color:var(--wl-text); }
.wb-game-add-close .wt-glyph svg { width:14px; height:14px; display:block; }
.wb-game-add-find { display:flex; align-items:center; gap:8px; height:36px; padding:0 12px; border:1px solid var(--wl-line-strong); border-radius:var(--r-md); background:var(--wl-inset); color:var(--wl-text-3); cursor:text; transition:border-color var(--wl-quick) var(--wl-ease), box-shadow var(--wl-quick) var(--wl-ease); }
.wb-game-add-find:focus-within { border-color:var(--wl-selection); box-shadow:0 0 0 1px color-mix(in srgb, var(--wl-selection) 30%, transparent); }
.wb-game-add-find > .wt-glyph { display:flex; }
.wb-game-add-find > .wt-glyph svg { width:14px; height:14px; display:block; }
body .wb-game-add-find input { flex:1; min-width:0; height:100%; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--wl-text); font-size:13px; }
body.wb-shell .wb-game-add-find input:focus, body.wb-shell .wb-game-add-find input:focus-visible { outline:none; box-shadow:none; }
body .wb-game-add-find input::-webkit-search-cancel-button { display:none; }
.wb-game-add-label { display:block; padding:0 4px 6px; color:var(--wl-text-3); font-size:11px; font-weight:600; line-height:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wb-game-add-now[hidden], .wb-game-add-kinds[hidden], .wb-game-add-new[hidden] { display:none; }
.wb-game-add-faces { display:flex; gap:2px; margin:0 -4px; overflow-x:auto; scrollbar-width:none; }
.wb-game-add-faces::-webkit-scrollbar { display:none; }
body button.wb-game-add-face { flex:none; display:flex; flex-direction:column; align-items:center; gap:5px; width:58px; height:auto; padding:6px 2px 5px; border:0; border-radius:var(--r-md); background:transparent; box-shadow:none; color:var(--wl-text-2); cursor:pointer; transition:background-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
body button.wb-game-add-face:hover { background:var(--wg-hover); color:var(--wl-text); }
.wb-game-add-face .wb-game-face { width:40px; height:40px; font-size:13px; }
.wb-game-add-face-name { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; line-height:14px; }
.wb-game-add-kinds { display:flex; flex-wrap:wrap; gap:6px; }
body button.wb-game-add-kind { height:28px; padding:0 12px; border:1px solid var(--wl-line); border-radius:var(--r-pill); background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12px; font-weight:550; transition:border-color var(--wl-quick) var(--wl-ease), background-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
body button.wb-game-add-kind:hover { border-color:var(--wl-line-strong); color:var(--wl-text); }
body button.wb-game-add-kind[aria-pressed="true"] { border-color:color-mix(in srgb, var(--wl-selection) 40%, transparent); background:var(--wl-selection-soft); color:var(--wl-text); }
.wb-game-add-rows { max-height:min(264px, 30vh); margin:0 -4px; padding:0 4px; overflow-y:auto; scrollbar-width:none; }
.wb-game-add-rows::-webkit-scrollbar { display:none; }
/* No scroll bars in play (D-284): an edge fades only where there is more to scroll to. */
.wb-game-add-rows.is-more-below { -webkit-mask-image:linear-gradient(to bottom, var(--wl-bg) calc(100% - 28px), transparent); mask-image:linear-gradient(to bottom, var(--wl-bg) calc(100% - 28px), transparent); }
.wb-game-add-rows.is-more-above { -webkit-mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) 28px); mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) 28px); }
.wb-game-add-rows.is-more-above.is-more-below { -webkit-mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) 28px, var(--wl-bg) calc(100% - 28px), transparent); mask-image:linear-gradient(to bottom, transparent, var(--wl-bg) 28px, var(--wl-bg) calc(100% - 28px), transparent); }
.wb-game-add-faces.is-more-right { -webkit-mask-image:linear-gradient(90deg, var(--wl-bg) calc(100% - 40px), transparent); mask-image:linear-gradient(90deg, var(--wl-bg) calc(100% - 40px), transparent); }
.wb-game-add-faces.is-more-left { -webkit-mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 40px); mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 40px); }
.wb-game-add-faces.is-more-left.is-more-right { -webkit-mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 40px, var(--wl-bg) calc(100% - 40px), transparent); mask-image:linear-gradient(90deg, transparent, var(--wl-bg) 40px, var(--wl-bg) calc(100% - 40px), transparent); }
.wb-game-add-rows > .wb-game-quiet { padding:6px 4px; }
body button.wb-game-add-row { 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); cursor:pointer; transition:background-color var(--wl-quick) var(--wl-ease); }
body button.wb-game-add-row:hover { background:var(--wg-hover); }
.wb-game-add-row .wb-game-face { width:32px; height:32px; font-size:11px; }
.wb-game-add-row.is-on .wb-game-face { opacity:.5; filter:grayscale(.6); }
.wb-game-add-row.is-on .wb-game-person-text strong { color:var(--wl-text-3); font-weight:550; }
body :is(button.wb-game-add-row, button.wb-game-add-face, button.wb-game-add-make)[aria-pressed="true"] { background:var(--wl-selection-soft); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--wl-selection) 40%, transparent); color:var(--wl-text); }
.wb-game-add-new { padding-top:10px; border-top:1px solid var(--wl-line); }
.wb-game-add-makes { display:flex; gap:6px; }
body button.wb-game-add-make { flex:1 1 0; min-width:0; display:inline-flex; align-items:center; justify-content:center; gap:6px; height:34px; padding:0 8px; border:1px dashed var(--wl-line-strong); border-radius:var(--r-md); background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12px; font-weight:600; transition:border-color var(--wl-quick) var(--wl-ease), background-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
body button.wb-game-add-make:hover { border-style:solid; background:var(--wg-hover); color:var(--wl-text); }
.wb-game-add-make > .wt-glyph { display:flex; }
.wb-game-add-make > .wt-glyph svg { width:13px; height:13px; display:block; }
.wb-game-add-make > span:not(.wt-glyph) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* While it is open the map keeps its size and the rows give way, scrolling in less room; the panel takes at most a
   little over half the card, and only with still too little room does the map shrink too, to its least height. */
.wb-game-card.is-map .wb-game-add { flex:0 1 auto; min-height:0; max-height:60%; overflow-y:auto; scrollbar-width:none; }
.wb-game-card.is-map .wb-game-add::-webkit-scrollbar { display:none; }
.wb-game-add > * { flex:none; }
/* The rows keep one row at least, two when there are two; a line saying no one is found keeps its own height. */
.wb-game-add > .wb-game-add-rows { flex:0 1 auto; min-height:0; }
.wb-game-add > .wb-game-add-rows:has(> .wb-game-add-row) { min-height:44px; }
.wb-game-add > .wb-game-add-rows:has(> .wb-game-add-row:nth-of-type(2)) { min-height:72px; }
.wb-game-add > .wb-game-add-rows:not(:has(> .wb-game-add-row)) { flex-shrink:0; }
.wb-game-card-body:has(> .wb-game-add) > .wb-game-map { flex-shrink:.1; }
/* A pick waiting for its place: one line at the top of the panel, just under the map, tinted as the pick is, with
   Cancel, so nothing is laid over the map while the square follows the pointer. */
.wb-game-add-placing { display:flex; align-items:center; gap:8px; min-height:34px; margin-top:-4px; padding:0 4px 0 12px; border-radius:var(--r-md); background:var(--wl-selection-soft); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--wl-selection) 40%, transparent); color:var(--wl-text); font-size:12.5px; line-height:1.3; animation:wl-fade var(--wl-quick) var(--wl-ease-out); }
.wb-game-add-placing > span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body .wb-game-add-placing > button { flex:none; height:26px; padding:0 10px; border:0; border-radius:var(--r-sm); background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12px; font-weight:600; }
body .wb-game-add-placing > button:hover { background:var(--wg-hover); color:var(--wl-text); }
@media (prefers-reduced-motion:reduce) { .wb-game-add, .wb-game-add-placing { animation:none; } }

/* ---- Down and dead, told apart at a glance (D-352): on a token, in the fight's turn order and in Characters. The dead
   wear Lucide's skull over their faded face, in the danger ink with a dark fill, so it reads on any face and at phone
   size; the down keep their fade with a small quiet chip at their foot holding a cracked heart. Drawn by game-fight.mjs
   fallMark. ---- */
.wl-fall-mark { position:absolute; z-index:1; display:grid; place-items:center; box-sizing:border-box; pointer-events:none; }
.wl-fall-mark > .wt-glyph { display:grid; place-items:center; width:100%; height:100%; }
.wl-fall-mark.is-dead { color:var(--wl-danger); }
.wl-fall-mark.is-dead svg { width:70%; height:70%; fill:color-mix(in srgb, var(--wl-bg) 82%, transparent); stroke-width:2.25; filter:drop-shadow(0 1px 1.5px color-mix(in srgb, var(--wl-bg) 70%, transparent)); }
.wl-fall-mark.is-down { border-radius:50%; background:var(--wl-raised); box-shadow:0 0 0 1.5px var(--wl-bg); color:var(--wl-text-2); }
.wl-fall-mark.is-down svg { width:70%; height:70%; stroke-width:2.25; }
/* On a token: the skull fills the disc; the chip sits on its lower right edge. Both scale with the token. */
.wb-game-map .wh-map-marker.wb-game-token > .wl-fall-mark.is-dead { inset:0; }
.wb-game-map .wh-map-marker.wb-game-token > .wl-fall-mark.is-down { right:-3px; bottom:-3px; width:max(11px, 44%); height:max(11px, 44%); }
/* In the turn order: over the 30px face. */
.wl-fight-one > .wl-fall-mark.is-dead { top:0; left:calc(50% - 15px); width:30px; height:30px; }
.wl-fight-one > .wl-fall-mark.is-down { top:17px; left:calc(50% + 5px); width:15px; height:15px; box-shadow:0 0 0 1.5px var(--wl-inset); }
/* In Characters: over the 32px face at the row's start. */
.wb-game-person-open:has(> .wl-fall-mark) { position:relative; }
.wb-game-person-open > .wl-fall-mark.is-dead { top:calc(50% - 16px); left:8px; width:32px; height:32px; }
.wb-game-person-open > .wl-fall-mark.is-down { top:calc(50% + 3px); left:27px; width:15px; height:15px; }

/* ---- How far a move goes, and where no one can (game-map.mjs, as Craft's game map has it): while a move is picked
   the aim says its distance (or why it can't be made there) and impassable ground — Blocked and Water — is marked in
   a hatch that never hides the map under it. ---- */
.wl-map-impassable-ground:not(.is-halo) { fill:color-mix(in srgb, var(--wl-danger) 13%, transparent); stroke:color-mix(in srgb, var(--wl-danger) 60%, transparent); stroke-width:1.5; stroke-dasharray:5 4; stroke-linejoin:round; pointer-events:none; }
.wl-map-aim.is-refused .wl-map-aim-path { stroke:var(--wl-danger); }
.wl-map-aim.is-refused .wl-map-aim-square { fill:color-mix(in srgb, var(--wl-danger) 12%, transparent); stroke:var(--wl-danger); }
.wl-map-aim.is-refused .wl-map-aim-mark { stroke:var(--wl-danger); }
.wl-map-aim-name.is-refused { color:var(--wl-danger); font-family:var(--wl-font-ui, inherit); font-weight:600; }
/* ---- The ruler's measurement, as the workspace map's ruler draws it (map-ruler.js, map-panel-polish.css): the
   warning gold, a dashed line with a dot at each end, and the distance on a plate over its middle. Drawn in the
   map's own units; the line's width, its dashes and the dots' rings keep their screen size (non-scaling), and the
   dots and the plate counter-scale with the view, so it reads the same at any zoom. ---- */
.wb-game-map .wb-map-measurement line { stroke:var(--wl-warning); stroke-width:2; stroke-dasharray:6 4; vector-effect:non-scaling-stroke; }
.wb-game-map .wb-map-measurement circle { fill:var(--wl-warning); stroke:var(--wl-bg); stroke-width:2; vector-effect:non-scaling-stroke; transform-box:fill-box; transform-origin:center; transform:scale(calc(1 / var(--zoom, 1))); }
.wb-game-map .wb-map-distance-tag { position:absolute; left:0; top:0; transform-origin:0 0; transform:scale(calc(1 / var(--zoom, 1))) translate(-50%, calc(-100% - 4px)); padding:0 9px; border:1px solid color-mix(in srgb, var(--wl-warning) 35%, transparent); border-radius:5px; background:var(--wl-bg); color:var(--wl-warning); font:600 12px/23px var(--wl-font-mono); white-space:nowrap; pointer-events:none; }
.wb-game-map-canvas.is-ruling, .wb-game-map-canvas.is-ruling * { cursor:crosshair; }
.wb-game-map-controls button.wb-game-map-ruler[aria-pressed="true"] { color:var(--wl-selection); background:var(--wl-selection-soft); }
.wl-map-move-hint.is-ruling { width:max-content; pointer-events:none; }

/* ---- A picture on a page of its own (game-story.mjs openPicturePage): over the game, the whole picture at its own
   shape with its words under it, the story waiting behind it. Esc, × or a press outside closes it. ---- */
.wb-picture-page { position:absolute; inset:0; z-index:26; display:grid; place-items:center; padding:24px; background:color-mix(in srgb, var(--wl-bg) 78%, transparent); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); animation:wl-fade var(--wl-short) var(--wl-ease-out); }
.wb-picture-page.is-leaving { animation:wb-picture-out var(--wl-quick) var(--wl-ease) both; }
@keyframes wb-picture-out { to { opacity:0; } }
.wb-picture-box { display:flex; flex-direction:column; gap:14px; width:min(920px, 100%); max-height:100%; padding:18px; border:1px solid var(--wg-line, var(--wl-line)); border-radius:var(--r-xl); background:var(--wg-card, var(--wl-bg)); box-shadow:var(--wl-elev-pop); animation:wb-picture-in var(--wl-short) var(--wl-ease-out); }
@keyframes wb-picture-in { from { opacity:0; transform:translateY(10px) scale(.98); } }
@media (prefers-reduced-motion:reduce) { .wb-picture-box { animation:none; } }
.wb-picture-head { display:flex; align-items:center; gap:8px; min-width:0; }
.wb-picture-head h3 { flex:1; min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--wl-text); font-family:var(--wl-font-title); font-size:var(--t-title-panel, 16px); font-weight:400; }
.wb-picture-box .wb-game-picture { margin:0; width:100%; max-height:calc(100vh - 240px); }
.wb-picture-box .wb-game-picture img { object-fit:contain; }
.wb-picture-words { display:flex; align-items:flex-start; gap:8px; margin:0; padding:10px 12px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); color:var(--wl-text-2); font-size:12.5px; line-height:1.5; }
.wb-picture-words .wt-glyph { flex:none; margin-top:2px; color:var(--wl-text-3); }
.wb-picture-words .wt-glyph svg { width:14px; height:14px; display:block; }

/* ---- Test ground: "Make something happen" entry, solid panel above the composer, and story trace block ----
   Midnight Prism: --wl-* tokens only, solid panel above the message box, calm hairline borders, no side accent
   bars, no pulsing, works at phone width and desktop width. */
.wb-game-composer-wrap.is-happening .wl-fight-hand.is-calm { display:none; }
body.wb-shell .wb-game-composer button.wl-happen-open { display:inline-flex; align-items:center; gap:7px; height:32px; margin:0 2px 0 0; padding:0 12px 0 10px; border:1px solid color-mix(in srgb, var(--wl-test) 36%, var(--wl-line)); border-radius:var(--r-pill, 999px); background:color-mix(in srgb, var(--wl-test) 10%, var(--wl-raised)); box-shadow:none; color:var(--wl-text); font-family:var(--wl-font-ui); font-size:12.5px; font-weight:600; white-space:nowrap; cursor:pointer; transition:background var(--wl-quick) var(--wl-ease), border-color var(--wl-quick) var(--wl-ease); }
body.wb-shell .wb-game-composer button.wl-happen-open:hover { background:color-mix(in srgb, var(--wl-test) 16%, var(--wl-raised)); border-color:color-mix(in srgb, var(--wl-test) 55%, var(--wl-line)); }
body.wb-shell .wb-game-composer button.wl-happen-open.is-on { background:var(--wl-selection-soft); border-color:color-mix(in srgb, var(--wl-selection) 55%, var(--wl-line)); color:var(--wl-text); }
body.wb-shell .wb-game-composer button.wl-happen-open:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; }
.wl-happen-open > .wt-glyph { display:flex; flex:none; color:var(--wl-test); }
.wl-happen-open.is-on > .wt-glyph { color:var(--wl-selection); }
.wl-happen-open > .wt-glyph svg { width:14px; height:14px; display:block; }

/* Solid panel over the composer */
.wl-happen-panel { box-sizing:border-box; display:flex; flex-direction:column; width:100%; max-width:800px; max-height:min(58vh, 480px); margin:0 auto 8px; border:1px solid var(--wl-line); border-radius:var(--r-xl); background:var(--wl-surface); box-shadow:var(--wl-elev-pop); overflow:hidden; animation:wl-fight-in var(--wl-short) var(--wl-ease-out); }
.wl-happen-head { flex:none; display:flex; align-items:center; gap:8px; padding:12px 12px 10px 16px; border-bottom:1px solid var(--wl-line); }
.wl-happen-title-wrap { flex:1; min-width:0; display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.wl-happen-title { margin:0; color:var(--wl-text); font-family:var(--wl-font-title); font-size:var(--t-title-panel); font-weight:400; line-height:1.25; }
.wl-happen-count { color:var(--wl-text-3); font-family:var(--wl-font-mono); font-size:11.5px; font-variant-numeric:tabular-nums; }
body.wb-shell button.wl-happen-back, body.wb-shell button.wl-happen-close { flex:none; display:grid; place-items:center; width:30px; height:30px; margin:0; padding:0; border:0; border-radius:var(--r-sm); background:transparent; box-shadow:none; color:var(--wl-text-2); cursor:pointer; }
body.wb-shell button.wl-happen-back:hover, body.wb-shell button.wl-happen-close:hover { background:var(--wl-raised); color:var(--wl-text); }
body.wb-shell button.wl-happen-back:focus-visible, body.wb-shell button.wl-happen-close:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; }
.wl-happen-back .wt-glyph svg, .wl-happen-close .wt-glyph svg { width:16px; height:16px; display:block; }

.wl-happen-body { flex:1 1 auto; min-height:0; overflow-y:auto; padding:12px 16px 14px; scrollbar-width:thin; display:flex; flex-direction:column; gap:10px; }
.wl-happen-body.is-form { gap:8px; }
.wl-happen-empty { display:flex; align-items:flex-start; gap:10px; margin:0; padding:10px 12px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); color:var(--wl-text-2); font-size:13px; line-height:1.5; }
.wl-happen-empty .wt-glyph { flex:none; margin-top:2px; color:var(--wl-test); }
.wl-happen-empty .wt-glyph svg { width:15px; height:15px; display:block; }
.wl-happen-section { margin:2px 0 -4px; color:var(--wl-text-3); font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.wl-happen-list { display:flex; flex-direction:column; gap:4px; }
body.wb-shell button.wl-happen-row { display:flex; align-items:center; gap:11px; width:100%; height:auto; min-height:44px; margin:0; padding:8px 10px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); box-shadow:none; color:var(--wl-text); text-align:left; cursor:pointer; transition:background var(--wl-quick) var(--wl-ease), border-color var(--wl-quick) var(--wl-ease); }
body.wb-shell button.wl-happen-row:hover { background:var(--wl-raised); border-color:var(--wl-line-strong); }
body.wb-shell button.wl-happen-row.has-rules { border-color:color-mix(in srgb, var(--wl-selection) 28%, var(--wl-line)); }
body.wb-shell button.wl-happen-row:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; }
.wl-happen-row-icon { flex:none; display:grid; place-items:center; width:30px; height:30px; border-radius:var(--r-sm); background:var(--wl-raised); color:var(--wl-text-2); }
.wl-happen-row.has-rules .wl-happen-row-icon { background:var(--wl-selection-soft); color:var(--wl-selection); }
.wl-happen-row-icon .wt-glyph svg { width:15px; height:15px; display:block; }
.wl-happen-row-words { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.wl-happen-row-words b { color:var(--wl-text); font-size:13.5px; font-weight:600; line-height:1.25; }
.wl-happen-row-words small { color:var(--wl-text-3); font-size:12px; line-height:1.35; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wl-happen-row-rules { flex:none; max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:3px 9px; border-radius:var(--r-pill, 999px); background:var(--wl-selection-soft); color:var(--wl-selection); font-size:11.5px; font-weight:600; }
.wl-happen-row-go { flex:none; color:var(--wl-text-3); }
.wl-happen-row-go svg { width:15px; height:15px; display:block; }

/* Form controls inside the panel */
.wl-happen-label { margin:4px 0 -2px; color:var(--wl-text-3); font-size:11.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
.wl-happen-quiet { margin:4px 0; color:var(--wl-text-3); font-size:13px; line-height:1.45; }
body.wb-shell input.wl-happen-input, body.wb-shell select.wl-happen-select { box-sizing:border-box; width:100%; height:36px; margin:0; padding:0 11px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); color:var(--wl-text); font-family:var(--wl-font-ui); font-size:13.5px; }
body.wb-shell input.wl-happen-input:focus-visible, body.wb-shell select.wl-happen-select:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; border-color:var(--wl-selection); }
body.wb-shell input.wl-happen-input.is-num { width:76px; flex:none; text-align:center; font-family:var(--wl-font-mono); font-variant-numeric:tabular-nums; }
.wl-happen-chips { display:flex; flex-wrap:wrap; gap:6px; }
body.wb-shell button.wl-happen-chip { display:inline-flex; align-items:center; height:32px; margin:0; padding:0 12px; border:1px solid var(--wl-line); border-radius:var(--r-pill, 999px); background:var(--wl-inset); box-shadow:none; color:var(--wl-text-2); font-size:12.5px; font-weight:500; cursor:pointer; transition:background var(--wl-quick) var(--wl-ease), border-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
body.wb-shell button.wl-happen-chip:hover { background:var(--wl-raised); color:var(--wl-text); }
body.wb-shell button.wl-happen-chip.is-on { background:var(--wl-selection-soft); border-color:var(--wl-selection); color:var(--wl-text); font-weight:600; }
body.wb-shell button.wl-happen-chip:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; }
.wl-happen-seg { display:inline-flex; align-self:flex-start; max-width:100%; padding:3px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); }
body.wb-shell .wl-happen-seg button { height:28px; margin:0; padding:0 12px; border:0; border-radius:var(--r-sm); background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12.5px; font-weight:500; cursor:pointer; }
body.wb-shell .wl-happen-seg button[aria-checked="true"] { background:var(--wl-raised); color:var(--wl-text); font-weight:600; }
body.wb-shell .wl-happen-seg button:disabled { opacity:.4; cursor:default; }
body.wb-shell .wl-happen-seg button:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; }

.wl-happen-pick-list { display:flex; flex-direction:column; gap:3px; max-height:210px; overflow-y:auto; padding:2px; scrollbar-width:thin; }
.wl-happen-pick-list.is-compact { max-height:168px; }
body.wb-shell button.wl-happen-pick-item { display:flex; align-items:center; gap:10px; width:100%; height:auto; min-height:36px; margin:0; padding:6px 10px; border:1px solid transparent; border-radius:var(--r-sm); background:var(--wl-inset); box-shadow:none; color:var(--wl-text); text-align:left; cursor:pointer; }
body.wb-shell button.wl-happen-pick-item.is-tall { padding:8px 10px; }
body.wb-shell button.wl-happen-pick-item:hover { background:var(--wl-raised); }
body.wb-shell button.wl-happen-pick-item.is-on { background:var(--wl-selection-soft); border-color:color-mix(in srgb, var(--wl-selection) 45%, transparent); }
body.wb-shell button.wl-happen-pick-item:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; }
.wl-happen-pick-item > b { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13.5px; font-weight:600; }
.wl-happen-pick-item > small { flex:none; color:var(--wl-text-3); font-size:12px; }
.wl-happen-pick-item > .wt-glyph { flex:none; color:var(--wl-selection); }
.wl-happen-pick-item > .wt-glyph svg { width:15px; height:15px; display:block; }
.wl-happen-pick-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.wl-happen-pick-main b { font-size:13.5px; font-weight:600; }
.wl-happen-pick-main small { color:var(--wl-text-3); font-size:12px; line-height:1.35; }

.wl-happen-amount-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
body.wb-shell button.wl-happen-step { height:34px; min-width:40px; margin:0; padding:0 9px; border:1px solid var(--wl-line); border-radius:var(--r-sm); background:var(--wl-inset); box-shadow:none; color:var(--wl-text-2); font-family:var(--wl-font-mono); font-size:12.5px; font-weight:600; font-variant-numeric:tabular-nums; cursor:pointer; }
body.wb-shell button.wl-happen-step:hover { background:var(--wl-raised); color:var(--wl-text); }
body.wb-shell button.wl-happen-step.is-on { background:var(--wl-selection-soft); border-color:var(--wl-selection); color:var(--wl-text); }
.wl-happen-preview { margin:2px 0 0; color:var(--wl-text-2); font-family:var(--wl-font-mono); font-size:12.5px; font-variant-numeric:tabular-nums; }

.wl-happen-time-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
body.wb-shell button.wl-happen-time-card { display:flex; flex-direction:column; align-items:flex-start; gap:3px; height:auto; margin:0; padding:12px 14px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); box-shadow:none; color:var(--wl-text); text-align:left; cursor:pointer; }
body.wb-shell button.wl-happen-time-card:hover { background:var(--wl-raised); }
body.wb-shell button.wl-happen-time-card.is-on { background:var(--wl-selection-soft); border-color:var(--wl-selection); }
.wl-happen-time-card b { font-size:14px; font-weight:600; }
.wl-happen-time-card small { color:var(--wl-text-3); font-size:12px; line-height:1.35; }

.wl-happen-foot { flex:none; display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:10px 16px 12px; border-top:1px solid var(--wl-line); background:var(--wl-surface); }
.wl-happen-error { flex:1; min-width:0; margin:0; color:var(--wl-danger); font-size:12.5px; line-height:1.4; }
.wl-happen-error[hidden] { display:none; }
body.wb-shell button.wl-happen-go { flex:none; display:inline-flex; align-items:center; gap:7px; height:36px; margin:0; padding:0 18px 0 14px; border:0; border-radius:var(--r-pill, 999px); background:var(--wl-accent); box-shadow:none; color:var(--wl-on-accent); font-size:13px; font-weight:600; cursor:pointer; transition:background var(--wl-quick) var(--wl-ease); }
body.wb-shell button.wl-happen-go:hover:not(:disabled) { background:var(--wl-highlight); }
body.wb-shell button.wl-happen-go:disabled { opacity:.45; cursor:default; }
body.wb-shell button.wl-happen-go:focus-visible { outline:2px solid var(--wl-selection); outline-offset:2px; }
.wl-happen-go .wt-glyph svg { width:14px; height:14px; display:block; }

/* Story trace block (role: 'happen') — calm solid card, no side accent bar, round indentation */
.wb-game-turn.is-happen { align-self:stretch; max-width:none; width:100%; }
.wl-happen-block { display:flex; flex-direction:column; gap:10px; padding:14px 16px; border:1px solid var(--wg-line, var(--wl-line)); border-radius:var(--r-lg); background:var(--wg-card, var(--wl-surface)); box-shadow:var(--wl-elev-card); }
.wl-happen-block-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.wl-happen-eyebrow { display:inline-flex; align-items:center; gap:6px; color:var(--wl-text-3); font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.wl-happen-eyebrow .wt-glyph { display:flex; color:var(--wl-test); }
.wl-happen-eyebrow .wt-glyph svg { width:13px; height:13px; display:block; }
body.wb-shell button.wl-happen-undo { display:inline-flex; align-items:center; gap:5px; height:28px; margin:0; padding:0 10px; border:1px solid var(--wl-line); border-radius:var(--r-pill, 999px); background:transparent; box-shadow:none; color:var(--wl-text-2); font-size:12px; font-weight:600; cursor:pointer; transition:background var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
body.wb-shell button.wl-happen-undo:hover { background:var(--wl-raised); color:var(--wl-text); }
body.wb-shell button.wl-happen-undo:focus-visible { outline:2px solid var(--wl-selection); outline-offset:1px; }
.wl-happen-undo .wt-glyph svg { width:13px; height:13px; display:block; }

.wl-happen-did { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); }
.wl-happen-did-icon { flex:none; margin-top:2px; color:var(--wl-test); }
.wl-happen-did-icon svg { width:16px; height:16px; display:block; }
.wl-happen-did-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.wl-happen-did-text > strong { color:var(--wl-text); font-size:14.5px; font-weight:600; line-height:1.35; }
.wl-happen-told { margin:0; color:var(--wl-text-2); font-size:13.5px; line-height:1.5; }
.wl-happen-say { margin:0; color:var(--wl-text-2); font-size:13.5px; line-height:1.5; }
.wl-happen-say > span { color:var(--wl-text-3); font-weight:600; }

.wl-happen-fired-head { color:var(--wl-text-3); font-size:11.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; }
.wl-happen-steps { display:flex; flex-direction:column; gap:8px; margin:0; padding:0; list-style:none; }
.wl-happen-step { display:flex; flex-direction:column; gap:5px; padding:10px 12px; border:1px solid var(--wl-line); border-radius:var(--r-md); background:var(--wl-inset); }
.wl-happen-step.is-depth-1 { margin-left:18px; }
.wl-happen-step.is-depth-2 { margin-left:36px; }
.wl-happen-step.is-depth-3 { margin-left:54px; }
.wl-happen-step.is-error { border-color:color-mix(in srgb, var(--wl-danger) 40%, var(--wl-line)); }
.wl-happen-step-head { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; }
.wl-happen-step-branch { color:var(--wl-text-3); }
.wl-happen-step-branch svg { width:14px; height:14px; display:block; }
.wl-happen-step-mark { color:var(--wl-success); }
.wl-happen-step-mark.is-error { color:var(--wl-danger); }
.wl-happen-step-mark svg { width:15px; height:15px; display:block; }
.wl-happen-step-name { color:var(--wl-text); font-size:13.5px; font-weight:600; }
.wl-happen-step-on { color:var(--wl-text-2); font-size:13px; }
.wl-happen-step-when { color:var(--wl-text-3); font-size:12.5px; }
.wl-happen-step-round { margin-left:auto; padding:1px 7px; border-radius:var(--r-pill, 999px); background:var(--wl-raised); color:var(--wl-text-3); font-family:var(--wl-font-mono); font-size:11px; font-variant-numeric:tabular-nums; }
.wl-happen-step-error { margin:0; color:var(--wl-danger); font-size:13px; line-height:1.45; }

.wl-happen-pills { display:flex; flex-wrap:wrap; gap:6px; margin-top:2px; }
.wl-happen-pill { display:inline-flex; align-items:center; padding:2px 9px; border:1px solid var(--wl-line); border-radius:var(--r-pill, 999px); background:var(--wl-raised); color:var(--wl-text-2); font-family:var(--wl-font-mono); font-size:11.5px; line-height:1.45; font-variant-numeric:tabular-nums; }
.wl-happen-pill.is-roll { color:var(--wl-selection); border-color:color-mix(in srgb, var(--wl-selection) 32%, var(--wl-line)); background:var(--wl-selection-soft); }

.wl-happen-none { margin:0; padding:2px 2px 0; color:var(--wl-text-2); font-size:13.5px; line-height:1.5; }
.wl-happen-stopped { margin:0; color:var(--wl-warning); font-size:12.5px; line-height:1.45; }

/* Folded rules that did not fire */
.wl-happen-skipped { border-top:1px solid var(--wl-line); padding-top:8px; }
.wl-happen-skipped > summary { display:inline-flex; align-items:center; gap:6px; color:var(--wl-text-3); font-size:12.5px; font-weight:500; cursor:pointer; list-style:none; user-select:none; }
.wl-happen-skipped > summary::-webkit-details-marker { display:none; }
.wl-happen-skipped > summary:hover { color:var(--wl-text-2); }
.wl-happen-skipped > summary:focus-visible { outline:2px solid var(--wl-selection); outline-offset:2px; border-radius:var(--r-xs); }
.wl-happen-skipped-caret { display:flex; transition:transform var(--wl-quick) var(--wl-ease); }
.wl-happen-skipped-caret svg { width:14px; height:14px; display:block; }
.wl-happen-skipped[open] > summary .wl-happen-skipped-caret { transform:rotate(90deg); }
.wl-happen-skipped-list { display:flex; flex-direction:column; gap:6px; margin:8px 0 0; padding:0; list-style:none; }
.wl-happen-skipped-item { display:flex; flex-direction:column; gap:2px; padding:8px 10px; border:1px solid var(--wl-line); border-radius:var(--r-sm); background:var(--wl-inset); }
.wl-happen-skipped-head { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 8px; }
.wl-happen-skipped-head > strong { color:var(--wl-text-2); font-size:13px; font-weight:600; }
.wl-happen-skipped-when { color:var(--wl-text-3); font-size:12px; }
.wl-happen-skipped-why { margin:0; color:var(--wl-text-3); font-size:12.5px; line-height:1.45; }

@media (max-width:640px) {
  .wb-game-composer.has-happen .wb-game-composer-row { flex-wrap:wrap; row-gap:6px; }
  .wb-game-composer.has-happen .wb-game-note { display:none; }
  .wb-game-composer.has-happen .wb-game-tools { flex:1 1 auto; }
  .wl-happen-panel { max-height:min(64vh, 460px); border-radius:var(--r-lg); }
  .wl-happen-head { padding:10px 10px 9px 14px; }
  .wl-happen-body { padding:10px 12px 12px; }
  .wl-happen-row-rules { display:none; }
  .wl-happen-time-grid { grid-template-columns:1fr; }
  .wl-happen-foot { padding:10px 12px; }
  .wl-happen-block { padding:12px; }
  .wl-happen-step.is-depth-1 { margin-left:12px; }
  .wl-happen-step.is-depth-2 { margin-left:24px; }
  .wl-happen-step.is-depth-3 { margin-left:36px; }
}
@media (prefers-reduced-motion:reduce) {
  .wl-happen-panel { animation:none; }
  .wl-happen-skipped-caret { transition:none; }
}
