/* Editorial atlas: shared chrome, quiet work surfaces, a generous reading page.
   Loaded last to unify the existing adapters without restyling user-authored HTML. */
body.wb-shell:is(.theme-dark, .theme-light) {
  --canvas: var(--wl-bg); --inset: var(--wl-inset); --surface: var(--wl-surface);
  --hover: var(--wl-raised); --zebra: var(--wl-inset); --hairline: var(--wl-line);
  --strong: var(--wl-line-strong); --ink: var(--wl-text); --slate: var(--wl-text-2);
  --tertiary: var(--wl-text-3); --soft: var(--wl-text); --wb-accent: var(--wl-accent);
  --interactive-accent: var(--wl-accent); --interactive-accent-hover: var(--wl-text);
  --text-on-accent: var(--wl-on-accent); --text-on-accent-inverted: var(--wl-on-accent);
  --wl-glass: var(--wl-surface); --wl-glass-border: var(--wl-line);
  --text-error: var(--wl-danger); --text-success: var(--wl-success);
  --font-interface: var(--wl-font-ui);
}
body.wb-shell :is(.wb-project-bar, .workspace-tab-header-container, .wt-header, .wt-field-rail, .wt-inspector, .wt-orbis-panel) {
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.wb-shell :is(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--wl-selection); outline-offset: 3px;
}
body.wb-shell :is(button, input, textarea, select) { font-family: var(--wl-font-ui); }
body.wb-shell [hidden] { display: none !important; }
.wl-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body.wb-shell .wb-project-bar { gap: var(--sp-5); }
/* Home's cover name sits tight on its lines; its face is the title face (look.css, D-184). */
body.wb-shell .wh-hero-text h1 { line-height: 1.08; }
body.wb-shell :is(.wp-card, .wt-entry-card, .wh-type-card, .wt-type-card) { border-radius: var(--r-md); }
body.wb-shell :is(.wp-nav-link, .vertical-tab-nav-item).is-active {
  color: var(--wl-text); background: var(--wl-selection-soft);
}
body.wb-shell .wp-card:hover { border-color: var(--wl-line-strong); }
body.wb-shell .wp-game-card .wp-game-play {
  opacity: 1; background: color-mix(in srgb, var(--wl-bg) 78%, transparent); border: 1px solid color-mix(in srgb, var(--wl-text) 35%, transparent);
}
/* Play retains the same shell and exposes its essential actions in one place. */
body.wb-shell .wb-game-top button.wb-game-saved {
  display: inline-flex; align-items: center; gap: var(--sp-2); background: none;
  border: 0; box-shadow: none; color: var(--wl-text-3); padding: var(--sp-2);
  font-size: var(--t-help); white-space: nowrap;
  /* Room for "Saving…", so Sync beside it doesn't shift on every save. */
  min-width: 6.75em;
}
.wb-game-saved::before { content: ''; width: 5px; height: 5px; border-radius: var(--r-pill); background: var(--wl-success); }
.wb-game-saved[data-state="saving"]::before { background: var(--wl-text-3); }
body.wb-shell .wb-game-top button.wb-game-saved[data-state="error"] { color: var(--wl-danger); }
.wb-game-saved[data-state="error"]::before { background: var(--wl-danger); }
body.wb-shell .wb-game-scroll { mask-image: none; -webkit-mask-image: none; scrollbar-width: thin; scrollbar-color: var(--wl-line-strong) transparent; scroll-padding: var(--sp-5); }
body.wb-shell .wb-game-story {
  max-width: var(--wl-reading-width); padding: var(--sp-7) var(--sp-6) var(--sp-6); gap: var(--sp-6); justify-content: flex-start;
}
body.wb-shell .wb-game-story:has(.wb-game-opening) { justify-content: center; }
body.wb-shell .wb-game-line { width: 100%; max-width: 100%; padding: var(--sp-4) var(--sp-5); border: 0; border-left: 2px solid var(--wl-line-strong); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--wl-inset); }
body.wb-shell .wb-game-line-who { font-size: var(--t-ui); font-weight: 500; }
body.wb-shell .wb-game-line-mood { color: var(--wl-text-3); }
body.wb-shell .wb-game-opening { padding: var(--sp-7) 0; }
body.wb-shell .wb-game-turn.is-player .wb-game-bubble { background: var(--wl-selection-soft); border-color: var(--wl-line); border-radius: var(--r-md); }
body.wb-shell .wb-game-scene-break { margin: var(--sp-3) 0; color: var(--wl-text-3); }
body.wb-shell .wb-game-composer-wrap { padding: var(--sp-3) var(--sp-5) var(--sp-5); background: var(--wl-bg); border-top: 1px solid var(--wl-line); }
body.wb-shell .wb-game-composer { max-width: var(--wl-reading-width); border-radius: var(--r-md); border-color: var(--wl-line-strong); background: var(--wl-inset); box-shadow: none; }
body.wb-shell .wb-game-composer:focus-within { border-color: var(--wl-selection); }
body.wb-shell textarea.wb-game-input { font-size: var(--t-body); font-weight: 400; line-height: 1.65; min-height: 54px; }
body.wb-shell .wb-game-composer button.wb-game-send { background: var(--wl-accent); color: var(--wl-on-accent); border-radius: var(--r-sm); width: 36px; height: 36px; }
body.wb-shell .wb-game-composer button.wb-game-send.is-stop { background: var(--wl-raised); color: var(--wl-danger); }
body.wb-shell .wb-game-composer button.wb-game-model { color: var(--wl-text-2); font-size: var(--t-help); font-weight: 400; }
body.wb-shell button.wb-game-latest {
  position: absolute; z-index: 3; bottom: 160px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4);
  height: var(--wl-control); border: 1px solid var(--wl-line-strong); border-radius: var(--r-pill);
  background: var(--wl-surface); color: var(--wl-text); box-shadow: 0 4px 16px color-mix(in srgb, var(--wl-bg) 20%, transparent); font-size: var(--t-help);
}
.wb-game-latest .wt-glyph svg { display: block; width: 14px; height: 14px; }
body.wb-shell .wb-game-backdrop img { filter: none; opacity: .48; inset: 0; width: 100%; height: 100%; }
body.wb-shell .wb-game-backdrop::after { background: color-mix(in srgb, var(--wl-bg) 65%, transparent); }
body.wb-shell .wb-game.has-backdrop .wb-game-column::before {
  background: linear-gradient(90deg, color-mix(in srgb, var(--wl-bg) 40%, transparent), color-mix(in srgb, var(--wl-bg) 96%, transparent) calc(50% - 380px), color-mix(in srgb, var(--wl-bg) 96%, transparent) calc(50% + 380px), color-mix(in srgb, var(--wl-bg) 40%, transparent));
}
body.wb-shell .wb-game-card { border-color: var(--wl-line); border-radius: var(--r-md); }
body.wb-shell .wb-game-rail-item.is-active { color: var(--wl-selection); background: var(--wl-selection-soft); }
body.wb-shell .wb-game-vn-text { font-family: var(--wl-font-reading); font-weight: 400; line-height: 1.8; }
body.wb-shell .wb-game.is-vn .wb-game-column::before { opacity: .25; }
body.wb-shell .wb-game.is-vn .wb-game-backdrop img { opacity: .85; }
body.wb-shell .wb-game.is-new { overflow-y: auto; background: var(--wl-bg); }
body.wb-shell .wb-game-start-error { color: var(--wl-danger); font-size: var(--t-ui); line-height: 1.6; margin: var(--sp-3) 0 0; }
@media (hover: hover) {
  body.wb-shell .wp-card:hover { transform: translateY(-2px); }
  }
@media (max-width: 1000px) {
  body.wb-shell .wb-game-panel { box-shadow: -12px 0 36px color-mix(in srgb, var(--wl-bg) 24%, transparent); }
}
@media (max-width: 640px) {
  body.wb-shell .wb-project-bar { gap: var(--sp-2); }
        body.wb-shell .wb-game-story { padding: var(--sp-5) var(--sp-4); gap: var(--sp-5); }
  body.wb-shell .wb-game-line { padding: var(--sp-3); }
  body.wb-shell .wb-game-line-text { padding-left: 0; }
  body.wb-shell .wb-game-composer-wrap { padding: var(--sp-2) var(--sp-2) max(var(--sp-2), env(safe-area-inset-bottom)); }
  body.wb-shell textarea.wb-game-input { font-size: 16px; }
  body.wb-shell .wb-game-top button.wb-game-saved { width: 20px; min-width: 0; padding: 0; overflow: hidden; font-size: 0; flex: none; }
  body.wb-shell .wb-game-saved::before { flex: none; width: 7px; height: 7px; }
  body.wb-shell .wb-game-top button.wb-game-saved[data-state="error"] { width: auto; font-size: 11px; }
}

/* Native controls can override the browser's hidden rule; honour it in the top bar too. */
.wb-game-top [hidden] { display: none !important; }
body.wb-shell .wb-game-composer:focus-within { box-shadow: 0 0 0 1px var(--wl-selection); }
body.wb-shell textarea.wb-game-input:focus-visible { outline: none; }
/* A new answer rises a few pixels as it fades in; your own turn just appears. */
body.wb-shell .wb-game-turn.is-new { animation: wl-in var(--wl-long) var(--wl-ease-out); }
body.wb-shell .wb-game-turn.is-player.is-new { animation: wl-fade var(--wl-short) var(--wl-ease-out); }
body.wb-shell .wb-game.is-vn .wb-game-latest { display: none; }
body.wb-shell .wb-game.has-backdrop .wb-game-composer { background: var(--wl-inset); backdrop-filter: none; -webkit-backdrop-filter: none; }

@media (max-width: 640px) {
  body.wb-shell .wb-game-back span:not(.wt-glyph), .wb-game-slash, .wb-game-drag { display: none; }
  body.wb-shell .wb-game-top { gap: 4px; }
  body.wb-shell .wb-game-top button.wb-game-back { width: 32px; flex: none; padding: 0; justify-content: center; }
  body.wb-shell .wb-game-top button.wb-game-title { flex: 1; padding-inline: 4px; }
  body.wb-shell .wb-game-composer button.wb-game-model { max-width: 90px; padding-inline: 6px; gap: 4px; }
}

/* Narration reads as a continuous scene, with inset character speech. */
body.wb-shell .wb-game-story {max-width:860px;margin-inline:auto;}
/* The story's words, narration and what people say, are in the reading serif at one size and leading, like a page of a
   book; the app's own face is for everything you press. Set here only. */
body.wb-shell :is(.wb-game-prose, .wb-game-line-text) {font-family:var(--wl-font-reading);font-size:18px;font-weight:400;line-height:1.7;letter-spacing:0;color:var(--wl-text);}
@media(max-width:1024px){body.wb-shell :is(.wb-game-prose, .wb-game-line-text) {font-size:17px;}}
@media(max-width:640px){body.wb-shell :is(.wb-game-prose, .wb-game-line-text) {font-size:16px;}}
body.wb-shell .wb-game-prose {white-space:pre-wrap;}
body.wb-shell .wb-game-prose p {margin:0 0 1.2em;}
body.wb-shell .wb-game-prose strong {font-weight:550;}
body.wb-shell .wb-game-line {padding:18px 20px;border:1px solid var(--wl-line);border-radius:16px;background:color-mix(in srgb,var(--wl-surface) 85%,transparent);}
body.wb-shell .wb-game-line-text {padding-left:0;margin-top:10px;white-space:pre-wrap;}
/* Authored openings use the same controls as file editing. */
.wl-opening-editor {padding:24px;border:1px solid var(--wl-line);border-radius:16px;display:flex;flex-direction:column;gap:16px;background:var(--wl-inset);}
.wl-opening-editor h2 {margin:0;font-size:21px;}
.wl-opening-script {display:flex;flex-direction:column;gap:14px;}
.wl-opening-beats {display:flex;flex-direction:column;gap:16px;}
.wl-opening-beat {padding:18px;border:1px solid var(--wl-line);border-radius:12px;background:var(--wl-surface);display:flex;flex-direction:column;gap:12px;}
.wl-opening-beat-head {display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.wl-opening-beat-head .wt-control {flex:1;min-width:140px;}
.wl-opening-beat textarea {width:100%;line-height:1.7;resize:vertical;}
.wl-opening-preview {margin:20px 0;padding:18px;border:1px solid var(--wl-line);border-radius:12px;white-space:pre-wrap;}
@media(max-width:760px){.wl-opening-editor {padding:16px;}}

body.wb-shell .wb-game-prose:has(>p),body.wb-shell .wb-game-line-text:has(>p){white-space:normal;}
body.wb-shell .wb-game-prose p {margin-bottom:.9em;}

.wl-game-card-actions {display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-bottom:1px solid var(--wl-line);}
body.wb-shell .wl-game-card-actions button {font-size:12px;padding:4px;height:auto;}
body.wb-shell .wb-modal.wl-expanded-card {width:min(1000px,calc(100% - 48px));max-width:1000px;padding:24px;max-height:90dvh;overflow:auto;}

.wt-ws-stage.is-game-preview .wt-ws-dock {display:none;}
.wt-ws-game-hint {font-size:11px;opacity:.8;}

/* Game Starts are authored scenarios: one clear page, using the existing fields and save flow. */
body.wb-shell .wl-game-start-page {max-width:1000px;width:100%;margin:0 auto;padding:32px;box-sizing:border-box;}
body.wb-shell .wl-game-start-page.is-edit .wl-game-start-form {display:grid;grid-template-columns:1fr 1fr;gap:24px;max-width:none;}
.wl-game-start-form>.wt-control,.wl-game-start-form>.wl-opening-editor {grid-column:1/-1;min-width:0;margin:0;}
body.wb-shell .wl-game-start-form .wl-opening-editor .wt-control {margin:0;}
.wl-game-start-form [data-start-field="image"] {order:-2;}
.wl-game-start-form [data-start-field="name"] {order:-1;}
body.wb-shell .wl-game-start-form [data-start-field="name"] input {height:auto;min-height:58px;padding:10px 14px;font-family:var(--wl-font-reading);font-size:32px;line-height:1.25;}
body.wb-shell .wl-game-start-form [data-start-field="image"] .wt-picture-input {display:flex;flex-direction:column;gap:12px;align-items:stretch;padding:0;}
body.wb-shell .wl-game-start-form [data-start-field="image"] .wt-picture-thumb {width:100%;height:180px;min-height:180px;max-width:none;border-radius:16px;background:var(--wl-inset);overflow:clip;}
body.wb-shell .wl-game-start-form [data-start-field="image"] .wt-picture-thumb img {width:100%;height:100%;object-fit:cover;}
body.wb-shell .wl-game-start-form [data-start-field="image"] .wt-picture-side {display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:12px;}
body.wb-shell .wl-game-start-form [data-start-field="description"] textarea {min-height:110px;line-height:1.7;font-size:15px;}
.wl-game-start-form [data-start-field="starting_location"] {grid-column:1;align-self:start;padding:20px;border:1px solid var(--wl-line);border-radius:14px;background:var(--wl-inset);}
.wl-game-start-form [data-start-field="playable_characters"] {grid-column:2;align-self:start;padding:20px;border:1px solid var(--wl-line);border-radius:14px;background:var(--wl-inset);}
body.wb-shell .wl-game-start-form .wt-link-input {display:grid;grid-template-columns:1fr;gap:8px;max-height:280px;overflow:auto;}
body.wb-shell .wl-game-start-form .wt-link-option {display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--wl-line);border-radius:10px;background:var(--wl-surface);font-weight:500;}
body.wb-shell .wl-game-start-form .wt-link-option:has(input:checked) {border-color:var(--wl-selection);background:var(--wl-selection-soft);}
body.wb-shell .wl-game-start-form .wt-link-option .wt-portrait-small {width:40px;height:44px;min-height:0;flex:none;margin:0;border-radius:7px;}
.wl-start-eyebrow {display:block;color:var(--wl-text-3);font:500 11px/1.5 var(--wl-font-ui);}
body.wb-shell .wl-game-start-form .wl-opening-editor {padding:28px;gap:18px;border-radius:18px;background:var(--wl-surface);}
body.wb-shell .wl-game-start-form .wl-opening-editor h2 {font-family:var(--wl-font-reading);font-size:29px;font-weight:400;}
.wl-opening-editor>.wt-muted {margin:0;font-size:14px;line-height:1.65;max-width:60ch;}
body.wb-shell .wl-opening-editor .wl-opening-beat {background:var(--wl-inset);padding:20px;border-radius:14px;}
.wl-opening-beat-head>span:first-child,.wl-opening-index {display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:7px;background:var(--wl-selection-soft);color:var(--wl-text-2);font:500 11px var(--wl-font-ui);}
body.wb-shell .wl-opening-editor .wl-opening-beat textarea {min-height:132px;font-size:15px;line-height:1.75;padding:14px;}
body.wb-shell .wl-opening-editor .wl-opening-beat-head button {height:30px;padding:4px 9px;font-size:12px;}
.wl-start-preview {overflow:hidden;border:1px solid var(--wl-line);border-radius:20px;background:var(--wl-surface);}
.wl-start-preview-hero {position:relative;isolation:isolate;min-height:200px;display:flex;align-items:end;background:var(--wl-inset);}
.wl-start-preview-cover {position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;}
.wl-start-preview-hero:has(img)::after {content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,color-mix(in srgb,var(--wl-bg) 94%,transparent),color-mix(in srgb,var(--wl-bg) 22%,transparent));}
.wl-start-preview-intro {padding:36px;max-width:75ch;}
.wl-start-preview-intro h1 {font:400 clamp(28px,4vw,42px)/1.14 var(--wl-font-reading);margin:12px 0;}
.wl-start-preview-intro p {color:var(--wl-text-2);font-size:15px;line-height:1.75;margin:0;white-space:pre-wrap;}
.wl-start-preview-hero:has(img) {color:var(--wl-text);}
/* The cover comes before the words (scenario-setup.mjs startPreview), so a sibling says there is one. Not :has() with a
   plain p after it: Chrome then re-styled every paragraph on the page whenever anything a :has() reads changed. */
.wl-start-preview-cover ~ .wl-start-preview-intro :is(p,.wl-start-eyebrow) {color:var(--wl-text-2);}
.wl-start-preview-facts {display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:24px 36px;border-block:1px solid var(--wl-line);background:var(--wl-inset);}
.wl-start-preview-facts .wl-start-eyebrow {margin-bottom:8px;}
.wl-start-preview-facts strong {font-size:14px;line-height:1.6;font-weight:500;}
body.wb-shell .wl-start-location-link {padding:0;border:0;background:transparent;box-shadow:none;height:auto;text-decoration:underline;text-underline-offset:4px;font-weight:500;}
.wl-start-preview-opening,.wl-start-preview-notes {padding:30px 36px;}
.wl-start-preview-opening>h2 {font-size:16px;font-weight:500;margin:22px 0 12px;}
.wl-opening-preview {background:var(--wl-inset);padding:20px;border-radius:14px;}
.wl-opening-preview-head {display:flex;align-items:center;gap:10px;font-size:13px;}
.wl-opening-preview p,.wl-start-preview-notes p {font-size:15px;line-height:1.8;white-space:pre-wrap;margin:14px 0 0;}
.wl-start-preview-notes {border-top:1px solid var(--wl-line);color:var(--wl-text-2);}
.wh-save-status {margin-left:auto;font-size:12px;color:var(--wl-text-3);}.wh-save-status.is-error {color:var(--wl-danger);}
.wh-editable[data-save-state="error"] {outline:1px solid var(--wl-danger);outline-offset:4px;}
@media(max-width:760px){body.wb-shell .wl-game-start-page {padding:20px 16px;}body.wb-shell .wl-game-start-page.is-edit .wl-game-start-form {grid-template-columns:1fr;gap:18px;}.wl-game-start-form [data-start-field="starting_location"],.wl-game-start-form [data-start-field="playable_characters"] {grid-column:1;grid-row:auto;}.wl-start-preview-facts {grid-template-columns:1fr;padding:20px 24px;}.wl-start-preview-intro,.wl-start-preview-opening,.wl-start-preview-notes {padding:24px;}body.wb-shell .wl-game-start-form .wl-opening-editor {padding:20px;}.wh-edit-bar-text {display:none;}}

.wl-opening-add {display:flex;flex-wrap:wrap;gap:10px;}.wl-opening-add button {min-height:34px;}
.wh-editable[aria-invalid="true"] {outline:1px solid var(--wl-danger);outline-offset:4px;}

/* Scene transcript (D-060): each thing has one home. A narrator response is one quiet card: its
   Actions line (what the narrator did), then the story. Your turn has no card: your face, your
   name, what you typed. An entry's tools float on its lower edge while it is pointed at or focused.
   These rules belong to the reading view; creator-authored cards keep their own design. */
body.wb-shell .wb-game-story {max-width:820px;gap:var(--sp-5);padding:36px 32px 28px;}
body.wb-shell .wb-game-turn:focus {outline:none;}
body.wb-shell .wb-game-turn.is-gm {align-self:stretch;min-width:0;gap:0;padding:20px 24px;border:1px solid color-mix(in srgb,var(--wl-line) 80%,transparent);border-radius:var(--r-lg);background:color-mix(in srgb,var(--wl-surface) 42%,var(--wl-bg));box-shadow:none;transition:border-color var(--wl-quick) var(--wl-ease);}
body.wb-shell .wb-game-turn.is-gm:is(:hover,:focus-within) {border-color:var(--wl-line);}
body.wb-shell .wb-game-turn.is-gm.is-live {border-color:var(--wl-line-strong);}
body.wb-shell .wb-game-turn.is-live::before {display:none;}
.wl-narrative-content {box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;gap:var(--sp-4);width:100%;min-width:0;}
.wl-narrative-content:empty {display:none;}
body.wb-shell .wb-game.has-backdrop:not(.is-vn) .wb-game-column::before {background:linear-gradient(90deg,color-mix(in srgb,var(--wl-bg) 25%,transparent),color-mix(in srgb,var(--wl-bg) 48%,transparent) 35%,color-mix(in srgb,var(--wl-bg) 48%,transparent) 65%,color-mix(in srgb,var(--wl-bg) 25%,transparent));}
body.wb-shell .wb-game.has-backdrop .wb-game-turn.is-gm {background:color-mix(in srgb,var(--wl-surface) 40%,color-mix(in srgb,var(--wl-bg) 90%,transparent));}

/* The story: prose, and speech as face · name · how they say it, then the words in the reading face. */
body.wb-shell .wl-narrative-content>.wb-game-prose {max-width:66ch;text-wrap:pretty;}
body.wb-shell .wl-narrative-content .wb-game-name {text-decoration-color:var(--wl-line-strong);}
body.wb-shell .wl-narrative-content .wb-game-name:is(:hover,:focus-visible) {text-decoration-color:currentColor;}
body.wb-shell .wl-narrative-content>.wb-game-line {position:relative;box-sizing:border-box;width:100%;min-width:0;max-width:none;margin:0;padding:0 0 0 46px;border:0;border-radius:0;background:transparent;box-shadow:none;}
body.wb-shell .wl-narrative-content .wb-game-line-head {display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;min-height:20px;margin:0;}
body.wb-shell .wl-narrative-content .wb-game-line-face {position:absolute;inset-inline-start:0;top:2px;width:32px;height:32px;font-size:11px;box-shadow:0 0 0 1px var(--wl-line-strong);}
body.wb-shell .wl-narrative-content .wb-game-line-face.is-cast {box-shadow:none;}
body.wb-shell .wb-game-line-who {max-width:100%;white-space:normal;overflow-wrap:anywhere;color:var(--wl-text);font-size:var(--t-help);font-weight:600;line-height:1.6;}
body.wb-shell .wb-game-line-mood {max-width:100%;color:var(--wl-text-3);font-size:var(--t-help);font-style:italic;line-height:1.6;overflow-wrap:anywhere;}
body.wb-shell .wb-game-line-mood::before {display:none;}
body.wb-shell .wb-game-line-text {max-width:600px;margin-top:2px;padding:0;}

/* Actions: one folded line at the top of a response. Open, a list on a hairline rule: an icon,
   then the step; values are brighter, an old value is struck. While writing, it is the live step. */
.wl-actions {align-self:stretch;margin:-6px 0 12px -8px;color:var(--wl-text-3);font-size:var(--t-help);}
.wl-actions>summary {display:inline-flex;align-items:center;gap:6px;max-width:100%;min-height:28px;padding:0 8px;border-radius:var(--r-sm);cursor:pointer;list-style:none;line-height:18px;transition:color var(--wl-quick) var(--wl-ease),background-color var(--wl-quick) var(--wl-ease);}
.wl-actions>summary::-webkit-details-marker {display:none;}
.wl-actions>summary:is(:hover,:focus-visible) {color:var(--wl-text-2);background:var(--wl-raised);outline:none;}
.wl-actions>summary .wt-glyph {display:flex;flex:none;}.wl-actions>summary svg {width:14px;height:14px;}
.wl-actions[open]>summary .wt-glyph {transform:rotate(180deg);}
.wl-actions>ol {display:grid;margin:6px 0 4px 8px;padding:0 0 0 14px;border-inline-start:1px solid var(--wl-line);list-style:none;animation:wl-fade var(--wl-short) var(--wl-ease-out);}
.wl-actions>ol:empty {display:none;}
.wl-actions li {display:grid;grid-template-columns:14px minmax(0,1fr);align-items:start;gap:10px;min-height:28px;padding:5px 0;line-height:18px;}
.wl-actions li>.wt-glyph {display:flex;color:var(--wl-text-3);}.wl-actions li svg {width:14px;height:14px;margin-top:2px;}
.wl-act-text {min-width:0;color:var(--wl-text-2);overflow-wrap:anywhere;}
.wl-act-value,.wl-act-text ins {color:var(--wl-text);text-decoration:none;}
.wl-act-text del {color:var(--wl-text-3);text-decoration-color:var(--wl-line-strong);}
.wl-act-to,.wl-act-quiet {color:var(--wl-text-3);}
.wl-act-text .wb-game-name {color:var(--wl-text);font-weight:500;text-decoration-color:var(--wl-line-strong);}
.wl-actions.is-live>summary {color:var(--wl-text-2);}
.wl-actions.is-live>summary>span:not(.wl-live-dot) {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wl-live-dot {width:6px;height:6px;flex:none;border-radius:50%;background:var(--wl-selection);animation:wb-game-breathe 1.6s ease-in-out infinite;}
body.wb-shell .wb-game-turn.is-live .wb-game-caret {width:2px;background:var(--wl-selection);}

/* Your turn: face, name, then exactly what you typed; quoted words in the reading face. It is inset
   by the card's padding and border, so faces line up with the faces in a response. */
body.wb-shell .wb-game-turn.is-player {align-self:stretch;display:grid;grid-template-columns:32px minmax(0,1fr);align-items:start;gap:14px;max-width:none;padding:0 25px;}
body.wb-shell .wb-game-turn.is-player .wb-game-turn-face {position:static;width:32px;height:32px;font-size:11px;box-shadow:0 0 0 1px var(--wl-line-strong);}
body.wb-shell .wb-game-turn.is-player .wb-game-bubble {min-width:0;padding:0;border:0;border-radius:0;background:transparent;}
body.wb-shell .wb-game-turn-who {display:inline-block;margin-bottom:2px;color:var(--wl-text);font-size:var(--t-help);font-weight:600;line-height:1.6;}
body.wb-shell .wb-game-player-text {color:var(--wl-text-2);font-size:var(--t-body);line-height:1.75;}
.wb-game-player-text .wl-said {color:var(--wl-text);font-family:var(--wl-font-reading);font-size:16.5px;}

/* A direction to the narrator: a dashed box, out of the story. */
body.wb-shell .wb-game-turn.is-direction {align-self:stretch;max-width:none;}
body.wb-shell .wb-game-direction {flex-wrap:wrap;gap:4px 8px;padding:14px 24px;border:1px dashed var(--wl-line-strong);border-radius:var(--r-lg);background:transparent;color:var(--wl-text-2);font-size:var(--t-body);line-height:1.6;}
body.wb-shell .wb-game-direction>span:last-child {flex:1 1 240px;min-width:0;overflow-wrap:anywhere;}
body.wb-shell .wb-game-direction-label {color:var(--wl-text-3);font-size:var(--t-help);letter-spacing:0;text-transform:none;}

/* Tools: a small glass bar on an entry's lower edge, shown while it is pointed at, focused or tapped. */
body.wb-shell .wb-game-turn>.wb-game-turn-tools {position:absolute;inset-inline:auto 14px;top:auto;bottom:-15px;z-index:2;display:flex;gap:2px;margin:0;padding:2px;border:1px solid var(--wl-glass-border);border-radius:var(--r-md);background:var(--wl-glass);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 6px 18px color-mix(in srgb,var(--wl-bg) 20%,transparent);opacity:0;pointer-events:none;transform:none;transition:opacity var(--wl-quick) var(--wl-ease);}
body.wb-shell .wb-game-turn:is(:hover,:focus-within)>.wb-game-turn-tools {opacity:1;pointer-events:auto;}
body.wb-shell .wb-game-turn-tools button.wt-icon-button {width:28px;height:28px;border-radius:var(--r-sm);color:var(--wl-text-3);}
body.wb-shell .wb-game-turn-tools button.wt-icon-button:hover {color:var(--wl-text);background:var(--wl-raised);}

/* Something that needs you: one block for any type, filled from its file. */
body.wb-shell .wb-game-turn.is-interaction {align-self:stretch;}
.wl-thing {display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 10px 10px 12px;border:1px solid var(--wl-line);border-radius:var(--r-md);background:transparent;}
.wl-thing-tile {display:flex;align-items:center;justify-content:center;width:36px;height:36px;overflow:hidden;border-radius:var(--r-sm);background:var(--wl-raised);color:var(--wl-text-2);}
.wl-thing-tile .wt-glyph {display:flex;}.wl-thing-tile svg {width:16px;height:16px;}.wl-thing-tile img {width:100%;height:100%;object-fit:cover;}
.wl-thing-body {min-width:0;}
.wl-thing-head {display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;font-size:var(--t-ui);line-height:1.5;}
.wl-thing-head b {color:var(--wl-text);font-weight:600;}
.wl-thing-head span {color:var(--wl-text-3);font-size:var(--t-help);}
.wl-thing-line {display:flex;align-items:center;gap:8px;min-width:0;margin:4px 0 0;color:var(--wl-text-2);font-family:var(--wl-font-reading);font-size:15px;line-height:1.5;}
.wl-thing-line>span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wl-thing-line>.wb-game-face {width:18px;height:18px;flex:none;font-size:8px;}
body.wb-shell button.wl-thing-act {min-height:32px;padding:0 12px;border:1px solid var(--wl-line);border-radius:var(--r-sm);background:transparent;box-shadow:none;color:var(--wl-text);font-size:var(--t-ui);cursor:pointer;transition:background-color var(--wl-quick) var(--wl-ease);}
body.wb-shell button.wl-thing-act:hover {background:var(--wl-raised);}
/* A script's button pressed (D-150): what it said happened, what changed, and Why? under it. */
body.wb-shell .wb-game-turn.is-script {align-self:stretch;}
.wl-script-done {grid-template-columns:36px minmax(0,1fr);align-items:start;}
.wl-script-done .wl-thing-head .wb-game-name {cursor:pointer;}
.wl-script-told {margin:4px 0 0;color:var(--wl-text-2);font-family:var(--wl-font-reading);font-size:15px;line-height:1.5;}
.wl-script-when {display:inline-flex;align-items:center;gap:6px;padding:1px 9px 1px 7px;border-radius:var(--r-pill);background:var(--wl-raised);color:var(--wl-text-2);font-size:var(--t-help);}
.wl-script-when > svg, .wl-script-when > .wt-glyph {width:13px;height:13px;color:var(--wl-accent);}
.wl-script-say {display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:6px 0 0;font-family:var(--wl-font-reading);font-size:15px;line-height:1.5;}
.wl-script-say > span {flex:none;color:var(--wl-text);font-family:var(--wl-font-ui, inherit);font-size:var(--t-help);font-weight:600;}
.wl-script-say > .wb-game-name {cursor:pointer;}
.wl-script-say q {color:var(--wl-text);}
.wl-script-say q::before {content:"“";} .wl-script-say q::after {content:"”";}
.wl-script-picked {margin:6px 0 0;color:var(--wl-text-3);font-size:var(--t-help);}
/* A script's card (D-172): it waits under the line; once closed, the line keeps its title as the receipt's head. */
.wl-script-card {margin:10px 0 2px;}
.wl-script-done.is-asking:has(.wl-script-card) .wl-thing-tile {box-shadow:none;}
.wl-script-folded {display:flex;align-items:center;gap:6px;margin:6px 0 0;color:var(--wl-text-2);font-size:var(--t-ui);font-weight:600;}
.wl-script-folded > svg, .wl-script-folded > .wt-glyph {width:14px;height:14px;color:var(--wl-text-3);}
.wl-script-ask {display:grid;gap:8px;margin:10px 0 2px;padding:10px 12px;border-radius:12px;background:var(--wl-inset);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--wl-accent) 30%, var(--wl-line));}
.wl-script-question {display:flex;align-items:flex-start;gap:8px;margin:0;color:var(--wl-text);font-family:var(--wl-font-reading);font-size:15px;line-height:1.5;}
.wl-script-question > svg, .wl-script-question > .wt-glyph {flex:none;width:16px;height:16px;margin-top:3px;color:var(--wl-accent);}
.wl-script-answers {display:flex;flex-wrap:wrap;gap:6px;}
body.wb-shell button.wl-script-answer {min-height:32px;padding:0 14px;border:1px solid var(--wl-line-strong);border-radius:var(--r-pill);background:var(--wl-surface);box-shadow:none;color:var(--wl-text);font-size:var(--t-ui);font-weight:600;cursor:pointer;transition:background-color var(--wl-quick) var(--wl-ease),border-color var(--wl-quick) var(--wl-ease);}
body.wb-shell button.wl-script-answer:hover:not(:disabled) {border-color:var(--wl-accent);background:var(--wl-raised);}
body.wb-shell button.wl-script-answer:disabled {opacity:.5;cursor:default;}
.wl-script-done.is-asking .wl-thing-tile {box-shadow:0 0 0 2px color-mix(in srgb, var(--wl-accent) 45%, transparent);}
.wl-script-changes {display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 0;padding:0;list-style:none;}
.wl-script-changes li {padding:2px 10px;border-radius:var(--r-pill);background:var(--wl-raised);color:var(--wl-text-2);font-size:var(--t-help);line-height:1.6;}
.wl-script-why {margin-top:6px;color:var(--wl-text-3);font-size:var(--t-help);}
.wl-script-why summary {width:max-content;cursor:pointer;list-style:none;}
.wl-script-why summary::-webkit-details-marker {display:none;}
.wl-script-why summary:hover {color:var(--wl-text-2);}
.wl-script-why p {margin:4px 0 0;line-height:1.5;}
/* A finished script shown, not said (D-173): the closed card small beside the sentence, what changed as pills, a
   thing that changed hands as a swap, and the words under Details at the top right. */
.wl-script-done.is-shown {position:relative;}
.wl-script-done.is-shown .wl-thing-head {padding-right:76px;}
.wl-script-done.is-shown .wl-script-why {margin-top:0;}
.wl-script-done.is-shown .wl-script-why > summary {position:absolute;top:12px;right:14px;display:inline-flex;align-items:center;gap:3px;}
.wl-script-why > summary .wt-glyph {width:13px;height:13px;transition:transform var(--wl-quick) var(--wl-ease);}
.wl-script-why[open] > summary .wt-glyph {transform:rotate(180deg);}
.wl-script-done.is-shown .wl-script-why[open] {margin-top:10px;padding-top:8px;border-top:1px solid var(--wl-line);}
.wl-script-done.is-shown .wl-script-why .wl-script-changes {margin-top:6px;}
.wl-rc {display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px 16px;margin-top:8px;}
.wl-rc.is-plain {display:block;margin-top:0;}
.wl-card-tile {position:relative;flex:0 0 228px;max-width:100%;}
.wl-rc-side {flex:1 1 240px;min-width:0;}
.wl-rc:not(.is-plain) .wl-rc-side > :first-child {margin-top:0;}
.wl-rc-row {display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin-top:8px;}
.wl-rc-pill {display:inline-flex;align-items:center;gap:7px;min-height:30px;padding:0 11px 0 9px;border-radius:var(--r-pill);background:var(--wl-inset);box-shadow:inset 0 0 0 1px var(--wl-line);color:var(--wl-text-2);font-size:var(--t-ui);font-variant-numeric:tabular-nums;}
.wl-rc-pill > .wt-glyph {width:15px;height:15px;color:var(--wl-text-3);}
.wl-rc-pill > .wt-glyph.is-heart {color:var(--wl-danger);}
.wl-rc-pill > .wt-glyph.is-coins, .wl-rc-way > .wt-glyph.is-coins {color:var(--wl-warning);}
.wl-rc-pill > .wt-glyph.is-zap {color:var(--wl-selection);}
.wl-rc-pill.is-grow > .wt-glyph {color:var(--wl-accent);}
.wl-rc-ticks {display:inline-flex;gap:3px;}
.wl-rc-ticks i {width:7px;height:7px;box-sizing:border-box;border:1.5px solid var(--wl-line-strong);border-radius:50%;}
.wl-rc-ticks i.is-on {border-color:var(--wl-accent);background:var(--wl-accent);}
.wl-rc-learned {color:var(--wl-text-3);font-size:var(--t-help,12px);}
.wl-rc-pill b, .wl-rc-now {color:var(--wl-text);font-weight:600;}
.wl-rc-pill .is-up {color:var(--wl-success);}
.wl-rc-pill .is-down {color:var(--wl-danger);}
.wl-rc-pill img {width:22px;height:22px;border-radius:5px;object-fit:cover;background:color-mix(in srgb,var(--wl-bg) 35%,transparent);}
.wl-rc-bar {position:relative;display:inline-block;width:72px;height:6px;border-radius:var(--r-pill);background:color-mix(in srgb,var(--wl-text) 8%,transparent);overflow:hidden;}
.wl-rc-bar i {position:absolute;inset:0 auto 0 0;background:var(--wl-text-3);opacity:.55;}
.wl-rc-bar b {position:absolute;top:0;bottom:0;background:var(--wl-success);}
.wl-rc-bar b.is-down {background:var(--wl-danger);opacity:.5;}
/* A small bone die: its light and dark faces and its pips are mixes of the system's colours that can't be told from the
   drawn ones (under 2 in CIEDE2000). */
.wl-rc-die {--die-pip:color-mix(in srgb,var(--wl-warning) 11%,var(--wl-bg));display:inline-grid;grid-template:repeat(3,1fr)/repeat(3,1fr);width:20px;height:20px;padding:3px;border-radius:5px;background:linear-gradient(145deg,color-mix(in srgb,var(--wl-text) 91%,var(--wl-warning)),color-mix(in srgb,var(--wl-highlight) 66%,var(--wl-warning)));box-shadow:inset 0 -2px 3px color-mix(in srgb,var(--wl-bg) 14%,transparent);}
.wl-rc-die i {width:4px;height:4px;margin:auto;border-radius:50%;background:var(--die-pip);visibility:hidden;}
.wl-rc-die i.on {visibility:visible;}
.wl-rc-die.is-number {place-items:center;padding:0;color:var(--die-pip);font-size:11px;font-weight:700;}
.wl-rc-pill.is-done {--tone:var(--wl-success);color:var(--tone);background:color-mix(in srgb, var(--tone) 12%, transparent);box-shadow:none;}
.wl-rc-pill.is-done.is-danger {--tone:var(--wl-danger);}
.wl-rc-pill.is-done > .wt-glyph {color:inherit;}
.wl-rc-swap {display:flex;align-items:center;gap:12px;width:max-content;max-width:100%;margin-top:10px;padding:10px 14px;border-radius:12px;background:var(--wl-inset);box-shadow:inset 0 0 0 1px var(--wl-line);}
.wl-rc-who {display:grid;justify-items:center;gap:4px;color:var(--wl-text-2);font-size:var(--t-help);}
.wl-rc-face {display:grid;place-items:center;width:44px;height:44px;border-radius:12px;overflow:hidden;background:var(--wl-raised);color:var(--wl-text-3);font-size:13px;font-weight:600;}
.wl-rc-face img {width:100%;height:100%;object-fit:cover;}
.wl-rc-ways {display:grid;gap:7px;min-width:0;padding:0 4px;}
.wl-rc-way {display:flex;align-items:center;gap:7px;min-width:0;color:var(--wl-text-2);font-size:var(--t-help);}
.wl-rc-way b {color:var(--wl-text);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wl-rc-way img {flex:none;width:44px;height:24px;object-fit:contain;}
.wl-rc-way > .wt-glyph {flex:none;width:15px;height:15px;color:var(--wl-text-3);}
.wl-rc-way > .wt-glyph.is-flip {transform:scaleX(-1);}
@media (max-width:520px) {.wl-card-tile {flex-basis:100%;} .wl-rc-swap {width:100%;}}
/* A roll in the story (D-174): the card's 3D dice, what was tried, the sum and what it needed, how it went. In an
   answer it comes before the telling, like a script used; your own roll stands on its own in the middle. */
.wl-roll {display:flex;align-items:center;gap:16px;width:max-content;max-width:100%;margin:0 0 14px;padding:10px 16px 10px 14px;border-radius:12px;background:var(--wl-inset);box-shadow:inset 0 0 0 1px var(--wl-line);font-family:var(--wl-font-ui, inherit);}
.wl-roll .wl-dice {flex:none;gap:12px;padding:4px 2px 8px;}
.wl-roll.is-flat {gap:12px;padding:8px 14px 8px 12px;}
.wl-roll.is-flat .wl-dice {gap:7px;padding:2px 0 4px;}
.wl-roll.is-small {gap:10px;margin:0 0 10px;padding:5px 14px 5px 7px;border-radius:var(--r-pill, 999px);background:transparent;}
.wl-roll-faces {display:inline-flex;flex:none;gap:4px;}
.wl-roll.is-small .wl-roll-words {display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;}
.wl-roll.is-small .wl-roll-what {color:var(--wl-text-2);font:13px/1.4 var(--wl-font-ui, inherit);}
.wl-roll-words {display:grid;justify-items:start;gap:3px;min-width:0;}
.wl-roll-what {color:var(--wl-text);font:15px/1.4 var(--wl-font-reading);}
.wl-roll-meta {color:var(--wl-text-3);font-size:var(--t-help);font-variant-numeric:tabular-nums;}
.wl-roll-meta b {color:var(--wl-text);font-size:14px;font-weight:600;}
.wl-roll-out {--tone:var(--wl-success);display:inline-flex;align-items:center;gap:6px;margin-top:3px;padding:2px 10px 2px 8px;border-radius:var(--r-pill);background:color-mix(in srgb, var(--tone) 12%, transparent);color:var(--tone);font-size:var(--t-help);font-weight:600;line-height:1.6;}
.wl-roll-out.is-warn {--tone:var(--wl-warning);}
.wl-roll-out.is-danger {--tone:var(--wl-danger);}
.wl-roll-out > .wt-glyph {width:14px;height:14px;}
.wb-game-turn.is-roll > .wl-roll {margin:0;}
.wl-live-rolls:empty {display:none;}
@media (max-width:520px) {.wl-roll {width:100%;}}
/* A script the GM used for the player's words (D-151), over the answer's words. */
.wl-script-used {margin:0 0 14px;padding:10px 12px;border-radius:12px;background:var(--wl-inset);box-shadow:inset 0 0 0 1px var(--wl-line);font-family:var(--wl-font-ui, inherit);}
.wl-script-used-head {display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;color:var(--wl-text-2);font-size:var(--t-help);}
.wl-script-used-head > svg, .wl-script-used-head > .wt-glyph {width:14px;height:14px;color:var(--wl-text-3);}
.wl-script-used-head b {color:var(--wl-text);font-weight:600;}
.wl-script-used-head .wb-game-name {cursor:pointer;}
.wl-script-used .wl-script-changes {margin-top:6px;}
.wl-script-used-why {margin:4px 0 0;color:var(--wl-text-2);font-size:var(--t-help);line-height:1.5;}

/* Map edits made by you between turns: one folded line, separate from the narrator's Actions. */
.wl-game-actions {align-self:stretch;max-width:100%;padding:0;border:0;border-radius:0;color:var(--wl-text-3);background:transparent;font-size:var(--t-help);}
.wl-game-actions summary {width:fit-content;max-width:100%;min-height:28px;padding:4px 0;cursor:pointer;line-height:20px;color:var(--wl-text-3);}
.wl-game-actions summary:is(:hover,:focus-visible) {color:var(--wl-text);}.wl-game-actions[open] {padding-bottom:12px;border-bottom:1px solid var(--wl-line);}
.wl-game-action-rows {padding-top:10px;display:flex;flex-direction:column;gap:8px;}
.wl-game-action-rows>.wb-game-turn {display:flex;align-items:center;gap:16px;min-width:0;padding:6px 0;}
.wl-game-action-rows .wb-game-changes {flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.6;}
body.wb-shell .wl-game-action-rows>.wb-game-turn>.wb-game-turn-tools {position:static;flex:none;padding:0;border:0;background:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;opacity:1;pointer-events:auto;}
body.wb-shell .wb-game-turn.is-error {flex-wrap:wrap;overflow-wrap:anywhere;padding:14px 16px;border:1px solid color-mix(in srgb,var(--wl-danger) 22%,var(--wl-line));border-radius:var(--r-md);background:color-mix(in srgb,var(--wl-danger) 5%,var(--wl-inset));}
body.wb-shell .wb-game-people {flex:none;padding:0;overflow:visible;border-top:1px solid var(--wl-line);}
body.wb-shell summary.wb-game-people-head {display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 16px;cursor:pointer;list-style:none;font-size:12px;line-height:1.5;text-transform:none;letter-spacing:0;}
.wb-game-people-head::-webkit-details-marker {display:none;}.wb-game-people-head>.wt-glyph {display:flex;transform:rotate(-90deg);}.wb-game-people[open]>.wb-game-people-head>.wt-glyph {transform:none;}
.wb-game-people-head .wt-glyph svg {display:block;width:14px;height:14px;}.wb-game-people-count {margin-left:auto;font-size:11px;color:var(--wl-text-3);}
.wb-game-people-list {max-height:300px;overflow-y:auto;padding:0 8px 12px;scrollbar-width:thin;}
body.wb-shell :is(.workspace-split.mod-left-split, .wl-side-panel.is-left) :is(.workspace-tab-container,:is(.workspace-leaf, .wl-tab-page)) {background-color:var(--wl-surface);}
body.wb-shell .wb-game-composer-wrap {padding:12px 32px 20px;border-top:0;background:transparent;}
body.wb-shell .wb-game-composer {width:100%;max-width:756px;transform:none;padding:12px 14px 10px 18px;border-color:var(--wl-line-strong);border-radius:14px;background:var(--wl-inset);box-shadow:0 8px 28px color-mix(in srgb,var(--wl-bg) 8%,transparent);}
body.wb-shell .wb-game-composer:focus-within {border-color:var(--wl-selection);box-shadow:0 0 0 1px color-mix(in srgb,var(--wl-selection) 30%,transparent);}
body.wb-shell textarea.wb-game-input {min-height:46px;font-size:15px;line-height:1.75;}
.wl-composer-identity {display:flex;align-items:center;gap:8px;min-width:0;margin-bottom:8px;color:var(--wl-text-2);}
.wl-composer-identity>.wb-game-face {width:22px;height:22px;font-size:8px;}
.wl-composer-character {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:550;}
.wl-composer-turn {flex:none;margin-inline-start:auto;color:var(--wl-text-3);font-size:11px;}
body.wb-shell .wb-game-composer button.wb-game-send {width:36px;height:36px;border-radius:11px;}
body.wb-shell .wb-game-scene-break {margin:6px 0 4px;gap:18px;}
body.wb-shell .wb-game-scene-break::before {display:none;}
body.wb-shell .wb-game-scene-break::after {min-width:24px;}
/* A new scene's rule draws out from its name. */
body.wb-shell .wb-game-scene-break.is-new::after {transform-origin:left;animation:wl-rule-draw var(--wl-long) var(--wl-ease-out) both;}
@keyframes wl-rule-draw {from{transform:scaleX(0);}}
body.wb-shell .wb-game-scene-name {max-width:90%;padding:0;border:0;color:var(--wl-text-2);font-family:var(--wl-font-reading);font-size:22px;line-height:1.4;font-weight:400;text-transform:none;white-space:normal;}
body.wb-shell .wb-game-scene-name>.wb-game-name {font-weight:400;overflow-wrap:anywhere;}
body.wb-shell .wb-game-scene-name .wt-glyph {flex:none;color:var(--wl-text-3);}
body.wb-shell .wb-game-scene-lead {font-family:var(--wl-font-ui);font-size:12px;font-weight:400;}
body.wb-shell .wl-narrative-content :is(.wb-game-prose,.wb-game-line-text)>:last-child {margin-bottom:0;}
/* While the narrator writes nothing moves but the caret and the ✦: words ink in and new blocks fade in where they are. */
.wl-story-chunk {animation:wl-story-ink var(--wl-short) var(--wl-ease-out);}
.wl-narrative-content>.is-revealing {animation:wl-fade var(--wl-short) var(--wl-ease-out);}
@keyframes wl-story-ink {from{opacity:.3;}to{opacity:1;}}
@media(max-width:760px){
  body.wb-shell .wb-game-story {padding:22px 16px;gap:20px;}
  body.wb-shell .wb-game-turn.is-gm {padding:16px;border-radius:var(--r-md);}
  body.wb-shell .wl-narrative-content {gap:14px;}
  body.wb-shell .wb-game-turn.is-player {gap:12px;padding:0 17px;}
  body.wb-shell .wb-game-direction {padding:12px 16px;}
  .wl-actions li {padding:4px 0;}
  .wl-thing {grid-template-columns:36px minmax(0,1fr);}
  body.wb-shell button.wl-thing-act {grid-column:2;justify-self:start;}
  body.wb-shell .wb-game-turn>.wb-game-turn-tools {inset-inline-end:8px;}
  body.wb-shell .wb-game-turn-tools button.wt-icon-button {width:36px;height:36px;}
  body.wb-shell .wb-game-scene-break {margin-inline-start:0;}.wb-game-scene-name {font-size:20px;}
  .wl-game-action-rows>.wb-game-turn {gap:8px;}
}
@media(max-width:640px){
  body.wb-shell .wb-game-composer-wrap {padding:8px 12px max(12px,env(safe-area-inset-bottom));}
  body.wb-shell .wb-game-composer {width:100%;transform:none;padding:10px 10px 10px 14px;}
  body.wb-shell textarea.wb-game-input {font-size:16px;}
  body.wb-shell .wb-game-composer-row {flex-wrap:wrap;gap:6px 4px;}
  body.wb-shell .wb-game-composer button.wb-game-model {max-width:106px;margin-inline-start:auto;}
}
@media(max-width:360px){body.wb-shell .wb-game-composer button.wb-game-model {max-width:80px;padding-inline:6px;gap:4px;}}
@media(prefers-reduced-motion:reduce){@keyframes wl-rule-draw {from{opacity:0;}}.wl-live-dot,body.wb-shell .wb-game-turn.is-live .wb-game-caret {animation:none;}body.wb-shell .wb-game-turn>.wb-game-turn-tools,.wl-actions>summary,body.wb-shell .wb-game-turn.is-gm {transition:none;}}

/* Thought: the narrator's thinking, read on a click from its Actions row, in a small panel by it. */
body.wb-shell button.wl-act-open { height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--wl-line-strong); text-underline-offset: 3px; transition: color var(--wl-quick) var(--wl-ease), text-decoration-color var(--wl-quick) var(--wl-ease); }
body.wb-shell button.wl-act-open:is(:hover, :focus-visible, [aria-expanded="true"]) { color: var(--wl-text); text-decoration-color: currentColor; }
.wl-thought { position: fixed; z-index: 60; box-sizing: border-box; display: flex; flex-direction: column; max-height: min(72vh, 680px); border: 1px solid var(--wl-line-strong); border-radius: var(--r-lg); background: var(--wl-surface); box-shadow: 0 12px 32px color-mix(in srgb, var(--wl-bg) 28%, transparent); animation: wl-fade var(--wl-quick) var(--wl-ease-out); }
.wl-thought:focus { outline: none; }
.wl-thought-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--wl-line); font-size: var(--t-help); }
.wl-thought-head > .wt-glyph { display: flex; color: var(--wl-text-3); }
.wl-thought-head svg { width: 14px; height: 14px; }
.wl-thought-head strong { color: var(--wl-text); font-weight: 600; }
.wl-thought-head button { margin-inline-start: auto; }
.wl-thought-text { overflow-y: auto; padding: 14px 20px 18px; color: var(--wl-text); font-size: calc(var(--t-ui) + 1.5px); line-height: 1.7; overflow-wrap: anywhere; }
.wl-thought-text > :is(p, ul, ol) { margin: 0 0 .85em; max-width: 68ch; } .wl-thought-text > :last-child { margin-bottom: 0; }
.wl-thought-text :is(ul, ol) { padding-inline-start: 1.3em; } .wl-thought-text li + li { margin-top: .3em; }
.wl-thought-text strong { font-weight: 650; } .wl-thought-text code { padding: 0 4px; border-radius: var(--r-xs); background: var(--wl-raised); font: .92em/1.5 var(--wl-font-mono); }

/* Sync: the top bar's button, then a page over the game with Pull and Push. */
.wl-sync .wt-glyph { display: flex; }
.wl-sync-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: var(--r-pill); background: var(--wl-selection-soft); color: var(--wl-text); font-size: 11px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.wl-sync { --sync-update: var(--wl-warning); position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; overflow-y: auto; background: var(--wl-bg); }
.wl-sync:focus { outline: none; }
/* A page over the game rises in on Long; Back takes it away faster. */
.wl-sync { animation: wl-in var(--wl-long) var(--wl-ease-out); }
.wl-sync.is-leaving { animation: wl-out var(--wl-long-out) var(--wl-ease) forwards; pointer-events: none; }
.wl-sync-page { box-sizing: border-box; flex: 1 0 auto; width: 100%; max-width: 880px; margin: 0 auto; padding: 24px 32px 28px; }
body.wb-shell button.wl-sync-back { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin: 0 0 14px -8px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: none; box-shadow: none; color: var(--wl-text-3); font-size: var(--t-help); }
body.wb-shell button.wl-sync-back:hover { background: var(--wl-raised); color: var(--wl-text); }
.wl-sync-back svg { width: 14px; height: 14px; }
.wl-sync-head h1 { text-wrap: balance; display: flex; align-items: center; gap: 10px; margin: 0; color: var(--wl-text); font-size: 22px; font-weight: 600; line-height: 1.3; }
.wl-sync-head h1 .wt-glyph { color: var(--wl-text-3); }
.wl-sync-head h1 svg { width: 18px; height: 18px; }
.wl-sync-lead { max-width: 62ch; margin: 6px 0 0; color: var(--wl-text-3); font-size: var(--t-ui); line-height: 1.6; }
.wl-sync-tabs { display: inline-flex; gap: 2px; margin: 20px 0 16px; padding: 3px; border-radius: var(--r-md); background: var(--wl-raised); }
body.wb-shell .wl-sync-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: var(--t-ui); font-weight: 500; transition: background-color var(--wl-quick) var(--wl-ease), color var(--wl-quick) var(--wl-ease); }
body.wb-shell .wl-sync-tabs button:not([aria-selected="true"]):hover { background: color-mix(in srgb, var(--wl-surface) 55%, transparent); color: var(--wl-text); }
body.wb-shell .wl-sync-tabs button:not([aria-selected="true"]):active { background: var(--wl-surface); }
body.wb-shell .wl-sync-tabs button[aria-selected="true"] { background: var(--wl-surface); color: var(--wl-text); box-shadow: 0 1px 3px color-mix(in srgb, var(--wl-bg) 16%, transparent); }
.wl-sync-tabs svg { width: 15px; height: 15px; }
.wl-sync-body { display: flex; flex-direction: column; gap: 16px; }
.wl-sync-loading { margin: 24px 0; color: var(--wl-text-3); font-size: var(--t-ui); }
.wl-sync-done, .wl-sync-error { margin: 0; padding: 10px 14px; border-radius: var(--r-md); color: var(--wl-text); font-size: var(--t-ui); line-height: 1.5; }
.wl-sync-done { background: color-mix(in srgb, var(--wl-success) 14%, transparent); }
.wl-sync-error { background: color-mix(in srgb, var(--wl-danger) 14%, transparent); }
.wl-sync-base { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--wl-line); border-radius: var(--r-lg); background: var(--wl-surface); }
.wl-sync-tile { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--wl-raised); color: var(--wl-text-2); }
.wl-sync-tile svg { width: 18px; height: 18px; }
.wl-sync-base > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wl-sync-eyebrow { color: var(--wl-text-3); font-size: 11px; font-weight: 600; }
.wl-sync-base strong { color: var(--wl-text); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.wl-sync-when { display: inline-flex; align-items: center; gap: 7px; color: var(--wl-text-3); font-size: var(--t-help); }
.wl-sync-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--wl-success); }
.wl-sync-calm { display: flex; flex-direction: column; align-items: center; padding: 44px 16px 28px; text-align: center; }
.wl-sync-calm-mark { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 28px; border: 1px solid var(--wl-line-strong); border-radius: 50%; background: var(--wl-raised); color: var(--wl-text); box-shadow: 0 0 0 12px color-mix(in srgb, var(--wl-line) 35%, transparent), 0 0 0 26px color-mix(in srgb, var(--wl-line) 16%, transparent); }
.wl-sync-calm-mark svg { width: 22px; height: 22px; }
.wl-sync-calm h2 { margin: 0; color: var(--wl-text); font-size: 18px; font-weight: 600; }
.wl-sync-calm p { max-width: 48ch; margin: 8px 0 0; color: var(--wl-text-2); font-size: var(--t-ui); line-height: 1.6; }
.wl-sync-changes { overflow: hidden; border: 1px solid var(--wl-line); border-radius: var(--r-lg); background: var(--wl-surface); }
.wl-sync-changes-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 16px 12px; }
.wl-sync-changes-head h2 { margin: 0; color: var(--wl-text); font-size: 15px; font-weight: 600; }
.wl-sync-changes-head span { color: var(--wl-text-3); font-size: var(--t-help); }
.wl-sync-kinds { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
body.wb-shell button.wl-sync-kind { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px; border: 1px solid var(--wl-line); border-radius: var(--r-pill); background: transparent; box-shadow: none; color: var(--wl-text-2); font-size: var(--t-ui); transition: border-color var(--wl-quick) var(--wl-ease), background-color var(--wl-quick) var(--wl-ease); }
body.wb-shell button.wl-sync-kind:hover:not(:disabled) { background: var(--wl-raised); }
body.wb-shell button.wl-sync-kind[aria-pressed="true"] { border-color: var(--wl-line-strong); color: var(--wl-text); }
body.wb-shell button.wl-sync-kind:disabled { opacity: .5; cursor: default; }
.wl-sync-tick { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; box-sizing: border-box; border: 1px solid var(--wl-line-strong); border-radius: 50%; color: transparent; transition: background-color var(--wl-quick) var(--wl-ease); }
.wl-sync-tick svg { width: 11px; height: 11px; }
.wl-sync-kind[aria-pressed="true"] .wl-sync-tick { border-color: var(--wl-text); background: var(--wl-text); color: var(--wl-bg); }
.wl-sync-kind.is-update .wl-sync-dot { background: var(--sync-update); }
.wl-sync-kind.is-delete .wl-sync-dot { background: var(--wl-danger); }
.wl-sync-n { color: var(--wl-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.wl-sync-group-head { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-top: 1px solid var(--wl-line); color: var(--wl-text-2); font-size: var(--t-ui); }
.wl-sync-group-head .wt-glyph { color: var(--wl-text-3); }
.wl-sync-group-head svg { width: 15px; height: 15px; }
.wl-sync-group-head strong { color: var(--wl-text); font-weight: 600; }
.wl-sync-group-head .wl-sync-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: var(--r-sm); background: var(--wl-raised); font-size: 11px; }
.wl-sync-of { margin-inline-start: auto; color: var(--wl-text-3); font-size: var(--t-help); font-variant-numeric: tabular-nums; }
.wl-sync input[type="checkbox"]:not([role="switch"]) { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--wl-text); cursor: pointer; }
.wl-sync input[type="checkbox"]:disabled { cursor: default; }
.wl-sync-group ul { margin: 0; padding: 0; list-style: none; }
.wl-sync-row { padding: 10px 16px 12px; border-top: 1px solid color-mix(in srgb, var(--wl-line) 60%, transparent); }
.wl-sync-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 24px; cursor: pointer; }
.wl-sync-row.is-blocked { opacity: .65; }
.wl-sync-row.is-blocked .wl-sync-row-head { cursor: default; }
.wl-sync-badge { padding: 2px 7px; border-radius: var(--r-xs); font-size: 11px; font-weight: 600; line-height: 16px; }
.wl-sync-badge.is-add { background: color-mix(in srgb, var(--wl-success) 16%, transparent); color: color-mix(in srgb, var(--wl-success) 75%, var(--wl-text)); }
.wl-sync-badge.is-update { background: color-mix(in srgb, var(--sync-update) 16%, transparent); color: var(--sync-update); }
.wl-sync-badge.is-delete { background: color-mix(in srgb, var(--wl-danger) 16%, transparent); color: color-mix(in srgb, var(--wl-danger) 80%, var(--wl-text)); }
.wl-sync-name { min-width: 0; color: var(--wl-text); font-size: var(--t-ui); font-weight: 600; overflow-wrap: anywhere; }
.wl-sync-type { color: var(--wl-text-3); font-size: var(--t-help); }
.wl-sync-detail { display: grid; gap: 3px; margin: 6px 0 0 26px; color: var(--wl-text-2); font-size: var(--t-help); line-height: 1.55; }
.wl-sync-detail p { margin: 0; overflow-wrap: anywhere; }
.wl-sync-field { margin-inline-end: 6px; color: var(--wl-text-3); }
.wl-sync-detail del { color: var(--wl-text-3); text-decoration-color: var(--wl-line-strong); }
.wl-sync-detail ins { color: var(--wl-text); text-decoration: none; }
.wl-sync-to { margin: 0 5px; color: var(--wl-text-3); }
.wl-sync-note { color: var(--wl-text-3); }
.wl-sync-version { padding: 14px 16px; border: 1px solid var(--wl-line); border-radius: var(--r-lg); background: var(--wl-surface); }
.wl-sync-switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.wl-sync-switch > span { display: flex; flex-direction: column; gap: 2px; }
.wl-sync-switch strong { color: var(--wl-text); font-size: var(--t-ui); font-weight: 600; }
.wl-sync-switch span span { color: var(--wl-text-3); font-size: var(--t-help); line-height: 1.5; }
.wl-sync-switch input[role="switch"] { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 36px; height: 20px; margin: 1px 0 0; border: 0; border-radius: var(--r-pill); background: var(--wl-line-strong); cursor: pointer; transition: background-color var(--wl-quick) var(--wl-ease); }
.wl-sync-switch input[role="switch"]::before { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--wl-surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--wl-bg) 25%, transparent); transition: transform var(--wl-quick) var(--wl-ease); }
.wl-sync-switch input[role="switch"]:checked { background: var(--wl-text); }
.wl-sync-switch input[role="switch"]:checked::before { transform: translateX(16px); }
.wl-sync-switch input[role="switch"]:focus-visible { outline: 2px solid var(--wl-selection); outline-offset: 2px; }
.wl-sync-version-fields { display: grid; gap: 12px; margin: 14px 0 0 48px; }
.wl-sync-version-fields label { display: grid; gap: 5px; }
.wl-sync-version-fields label > span { color: var(--wl-text-3); font-size: var(--t-help); }
.wl-sync-version-fields :is(input, textarea) { box-sizing: border-box; width: 100%; font-size: var(--t-ui); }
.wl-sync-version-fields textarea { min-height: 72px; resize: vertical; }
.wl-sync-foot { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px max(32px, calc((100% - 816px) / 2)); border-top: 1px solid var(--wl-line); background: var(--wl-bg); }
.wl-sync-foot > :first-child { margin-inline-end: auto; }
.wl-sync-foot .wl-sync-error { padding: 8px 12px; }
.wl-sync-total { color: var(--wl-text-3); font-size: var(--t-ui); font-variant-numeric: tabular-nums; }
body.wb-shell button.wl-sync-cancel { height: 36px; padding: 0 14px; border: 0; background: none; box-shadow: none; color: var(--wl-text-2); font-size: var(--t-ui); }
body.wb-shell button.wl-sync-cancel:hover { background: var(--wl-raised); color: var(--wl-text); }
body.wb-shell button.wl-sync-go { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; font-size: var(--t-ui); }
.wl-sync-go svg { width: 15px; height: 15px; }
.wl-confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@media (max-width: 760px) {
  .wl-sync-page { padding: 18px 20px 24px; }
  .wl-sync-foot { padding: 12px 20px; }
}
@media (max-width: 640px) {
  .wl-sync-page { padding: 14px 16px 24px; }
  .wl-sync-head h1 { font-size: 19px; }
  .wl-sync-tabs { display: flex; }
  body.wb-shell .wl-sync-tabs button { flex: 1; justify-content: center; padding: 0 8px; }
  .wl-sync-detail, .wl-sync-version-fields { margin-inline-start: 0; }
  .wl-sync-version-fields :is(input, textarea) { font-size: 16px; }
  .wl-sync-foot { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .wl-sync-foot > :first-child { flex-basis: 100%; margin-inline-end: 0; }
  body.wb-shell button.wl-sync-go { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .wl-sync-switch input[role="switch"]::before { transition: none; }
}
