/* Turnip Works area: quiet, modern, genre-neutral chrome; the world is the star.
   One typeface (Inter, OFL, vendored), one icon set (Lucide, ISC, vendored), fixed signals:
   seat colour = cursor, selection, pings · hover = thin neutral outline · hidden-from-players = violet, see-through,
   dashed, "Hidden" pill · unconfirmed = faint moving dash · destructive = one red. Dark first; light designed too. */
@font-face { font-family: Inter; src: url('vendor/inter/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root, [data-theme="dark"] {
  --bg: #15181c; --surface: rgba(28, 31, 36, 0.92); --surface-solid: #1c1f24; --raised: #262a31; --line: rgba(255, 255, 255, 0.09); --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #ecebe7; --ink-2: #b4b2ab; --mute: #85837d; --accent: #e0b04a; --danger: #e5484d; --hidden: #a78bfa; --ok: #7cc47a;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.42), 0 1px 0 rgba(255, 255, 255, 0.04) inset; color-scheme: dark;
}
[data-theme="light"] {
  --bg: #e9e6df; --surface: rgba(252, 251, 248, 0.94); --surface-solid: #fcfbf8; --raised: #f0ede6; --line: rgba(20, 20, 20, 0.14); --line-strong: rgba(20, 20, 20, 0.24);
  --ink: #1a1917; --ink-2: #3d3b36; --mute: #5f5c55; --accent: #a8770f; --danger: #d4363b; --hidden: #7c5cd6; --ok: #2f8a3a;
  --shadow: 0 8px 28px rgba(40, 30, 10, 0.16); color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* ---------- z-order: the one table (Harry 2026-10-20: the ring goes under "the ones that are entirely camera locked,
   like menus and the quickbar") ----------
   Three bands inside #app (position: fixed, so #app is itself one stacking context; things appended to <body> sit over
   all of it). 1. THE WORLD'S OWN OVERLAYS, under the ring: room and building labels, speech bubbles (pawn names and
   damage are drawn in the 3D picture, under everything). 2. THE RING (#ring; a released drag track, .rtrack-out, fades
   at its height). Inside it: buttons, then their curved names (1), a hovered button with its tip (2), the damage box (4),
   readouts and cards (5). 3. EVERYTHING ELSE, which is camera-locked or is the gesture in hand, over the ring, so where
   it overlaps a ring button it is drawn on top and gets the click. Band 3 kept its old numbers; only band 1 and the ring
   moved down (from 8 / 13 / 15). Outside this file: Ring lab's and Label lab's drawers 100 and their open buttons 99
   (ringlab/style.css, lab/style.css, surfaces/ringlab.js, labellab.js), the faction shelf 25 (faction-shelf.js), notices
   990 (notice.js). New layer: give it a name here, never a bare number. */
:root {
  --z-labels: 5; --z-bubbles: 6;                                   /* 1. the world's overlays */
  --z-ring: 7;                                                     /* 2. the selection ring */
  --z-areaveil: 9; --z-pip: 9; --z-hud: 10; --z-marquee: 11;       /* 3. over the ring: the hidden-area frame, the PiP's frame, status line, box select */
  --z-fps: 12; --z-areanone: 12; --z-chat: 14; --z-crumbs: 15;     /*    FPS, "no area", the chat / roll log, the selection crumbs */
  --z-roster: 16; --z-rulers: 16; --z-chips: 17;                   /*    avatars, rulers, undo chips and the buttons beside a building */
  --z-launchers: 18; --z-follow: 19; --z-bar: 20; --z-results: 21; /*    Pawns / Build / Settings (+ the area pills, Other games), Following, the command bar, its results */
  --z-trays: 22; --z-levels: 23; --z-introhint: 24;                /*    Build and Pawns trays, the level meter, the intro's hint */
  --z-whichkey: 25; --z-output: 26; --z-toolcursor: 29;            /*    the chord hint, command output, the tool cursor */
  --z-pipview: 30; --z-sheet: 35;                                  /*    the PiP's picture, the "?" sheet */
  --z-modal: 40; --z-gfxnote: 41; --z-popover: 45;                 /*    Settings, toasts, the dice / say announce, the mode label; the graphics note; pop-up lists */
  --z-drag: 50; --z-ghost: 60; --z-badge: 80;                      /*    drag ghosts; the intro's ghost, tray tips, a dragged figure; the vision badge */
}
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 13px/1.4 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
kbd { display: inline-block; min-width: 18px; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--raised); color: var(--ink-2); font: 500 11px/1.3 Inter, system-ui, sans-serif; text-align: center; white-space: nowrap; }
.ic { flex: none; vertical-align: -3px; }
.mute { color: var(--mute); }

/* start screen */
#start { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
#start .card { width: min(420px, 100%); background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: var(--shadow); }
#start h1 { margin: 0 0 6px; font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
#start form { display: grid; gap: 10px; margin: 18px 0 10px; } #start label { display: grid; gap: 4px; color: var(--ink-2); }
#start input { background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.primary { background: var(--ink); color: var(--bg); border: 0; border-radius: 8px; padding: 9px 12px; font-weight: 600; }
.hint { color: var(--mute); font-size: 12px; }

#app { position: fixed; inset: 0; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: default; }
#c.panning { cursor: grab; }
#pv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: var(--z-pipview); }

/* ---------- the command bar (top centre) ---------- */
#bar { position: absolute; z-index: var(--z-bar); top: 12px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 200px)); display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); backdrop-filter: blur(10px); transition: width .15s ease; }
#bar .lead::before { content: ''; display: block; width: 16px; height: 16px; background: currentColor; opacity: .55; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>') center/contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>') center/contain no-repeat; }
#bar .field { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
/* THE FIELD WRAPS AND THE BAR GROWS DOWN (Harry 2026-11-02: "when I type like a freaking essay into the quickbar, it doesn't
   scale to let me keep going"): a textarea sized by bar.js fit(), up to BAR_LINES lines, then it scrolls inside itself.
   Its height is one line and the padding at rest. What sits under the bar reads --bar-grow: results, #underBar. */
#bar textarea { display: block; flex: 1; min-width: 0; height: 38px; margin: 0; padding: 9px 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; line-height: 20px; resize: none; overflow: hidden; overflow-wrap: anywhere; scrollbar-width: thin; }
#bar textarea::placeholder { color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bar.tall { align-items: flex-start; } #bar.tall .lead { margin-top: 11px; }
#bar .chips { flex: none; max-width: 45%; } #bar .chips .chip { max-width: 100%; }
#bar.tall .field { align-items: flex-start; } #bar.tall .chips { margin-top: 9px; } .tw-hand #bar.tall .chips { margin-top: 11px; } /* (the verb chip stays on the first line of wrapped text, Harry 2026-11-03) */
#bar.over textarea { -webkit-mask-image: linear-gradient(to bottom, transparent 9px, #000 9px); mask-image: linear-gradient(to bottom, transparent 9px, #000 9px); } /* (scrolled: the padding band hides the sliver of the line above, so the top line starts clean) */
#results .res.intent .t { display: flex; align-items: center; gap: 4px; min-width: 0; } #results .res.intent .chip { display: block; min-width: 0; flex: 0 1 auto; } #results .res.intent .chip.verb { flex: none; } /* (block: text-overflow does nothing on an inline-flex. The verb stays whole; the long words get the ellipsis) */
#bar .barmeasure { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; white-space: pre-wrap; overflow-wrap: anywhere; }
#bar.open { width: min(680px, calc(100% - 24px)); border-color: var(--line-strong); }
#bar.open .hint { display: none; }
#bar .chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); font-weight: 550; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.chip.verb { background: var(--ink); color: var(--bg); border-color: transparent; }
.sep { color: var(--mute); margin: 0 2px; }
#results { position: absolute; z-index: var(--z-results); top: calc((58px + var(--bar-grow, 0px)) * var(--ts, 1)); left: 50%; transform: translateX(-50%); width: min(680px, calc(100% - 24px)); max-height: min(560px, calc(100% - 140px - var(--bar-grow, 0px) * var(--ts, 1))); overflow-y: auto; padding: 6px; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); }
#results .bar-status { position: sticky; top: -6px; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; background: var(--surface-solid); border-bottom: 1px solid var(--line); }
#results .bar-status[hidden] { display: none; }
#results .bar-last { color: var(--mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
#results .pick-count { padding: 2px 8px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 650; }
#results .pick-help { color: var(--mute); font-size: 11px; }
#results .pick-check { flex: none; width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 13px; }
#results .res.picked { background: color-mix(in srgb, var(--accent) 14%, transparent); }
#results .res.picked.hi { background: color-mix(in srgb, var(--accent) 23%, transparent); }
#results .res.picked .pick-check { color: var(--bg); background: var(--ink); border-color: var(--ink); }

#results .sec { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.res { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; user-select: none; }
.res.hi { background: var(--raised); }
.res.disabled { opacity: .45; cursor: default; }
.res.danger .t { color: var(--danger); }
.res .ico, .res .avatar, .pvw { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px; background: var(--raised); color: var(--ink-2); }
.pvw { width: 46px; height: 46px; border: 1px solid var(--line); }
.pvw.live { background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.08), transparent 70%), var(--raised); }
.pvw.live > .ic { visibility: hidden; }
.res .avatar { border-radius: 50%; background: var(--c); color: #111; font-weight: 700; }
.res .txt { flex: 1; min-width: 0; display: grid; }
.res .t { display: flex; gap: 4px; align-items: center; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res .s { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res .keys { display: flex; gap: 4px; }
.res.intent { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.res.intent.hi { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.mini { border: 1px solid var(--line); background: var(--surface-solid); border-radius: 6px; padding: 2px 6px; font-size: 11px; display: inline-flex; gap: 4px; align-items: center; color: var(--ink-2); }
#results .empty { padding: 14px; color: var(--mute); text-align: center; }

/* UNDER THE COMMAND BAR, ONE COLUMN (Harry 2026-10-27: "The textbox that describes whats selected covers/is covered by
   the 'area name, open to players, hide' buttons"): the GM's area pills (#areaState, surfaces/areas.js) first, then the
   selection's crumbs. One flow, so neither can land on the other, and picking a thing never moves the pills. The column
   keeps clear of the launchers as the closed bar does (240 px a side, less on a narrow window, never under 540 px wide); a long chain of crumbs wraps onto a second row.
   A conditional button docked at the top sits under the column (--under-bar, surfaces/crumbs.js). The column itself
   makes no stacking context (no z-index, no transform): each pill keeps its own layer in the :root table. */
#underBar { position: absolute; left: clamp(8px, (100% - 540px) / 2, 240px * var(--ts, 1)); right: clamp(8px, (100% - 540px) / 2, 240px * var(--ts, 1)); top: calc((58px + var(--bar-grow, 0px)) * var(--ts, 1)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
/* breadcrumb (under the bar and the area pills, only with a selection) */
#crumbs { position: relative; z-index: var(--z-crumbs); pointer-events: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; max-width: calc(100% - 14px); padding: 3px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); white-space: nowrap; }
#bar.open ~ #underBar #crumbs { display: none; }
.crumb { white-space: nowrap; border: 0; background: transparent; color: var(--ink-2); padding: 2px 6px; border-radius: 6px; display: inline-flex; gap: 4px; align-items: center; min-width: 0; max-width: 100%; box-sizing: border-box; }
.crumb .cname { min-width: 0; overflow: hidden; text-overflow: ellipsis; } .crumb svg { flex: none; } /* (the whole name is the button's title) */
.crumb:hover { background: var(--raised); color: var(--ink); }
.crumb.cur { color: var(--ink); font-weight: 600; }
.crumb .hid { color: var(--hidden); }

/* corner roster */
#roster { position: absolute; z-index: var(--z-roster); top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 40%; }
.av { position: relative; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 2px solid var(--c); background: var(--surface-solid); box-shadow: var(--shadow); display: grid; place-items: center; }
.av .face { width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #141414; display: grid; place-items: center; font-weight: 700; }
.av.agent { border-style: dashed; } .av.agent .face { background: transparent; color: var(--c); }
.av .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--surface-solid); background: var(--mute); }
.av.on .dot { background: var(--ok); } .av.busy .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 35%, transparent); }
.av:not(.on) { opacity: .55; }
.av .where { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--ink-2); white-space: nowrap; max-width: 76px; overflow: hidden; text-overflow: ellipsis; background: var(--surface); padding: 0 4px; border-radius: 4px; }
.av.me { outline: 2px solid var(--line-strong); outline-offset: 2px; }
.drag-ghost { position: fixed; z-index: var(--z-drag); pointer-events: none; opacity: .85; }

/* the selection ring: no circle, just big chunky options (10:00–2:00), ☰ expands to fill the rest of the circle */
#ring { position: absolute; inset: 0; z-index: var(--z-ring); pointer-events: none; --seat: #e0b04a; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; } /* no text selection: a selected caption would start a native drag and cancel the handle's pointer */
#ring input { user-select: text; -webkit-user-select: text; }
#ring > * { position: absolute; pointer-events: auto; }
/* THE RING (2026-10-20, the Ring Lab shape): each button sized by the layout (world size), names in the ring's label style */
#ring > .rl-label-svg { inset: 0; overflow: visible; pointer-events: none; z-index: 1; } #ring > .rl-label-svg path { fill: none; } #ring > .rl-label-svg text { paint-order: stroke fill; stroke: #15201c; }
#ring > .rl-tip { transform: translateX(-50%); white-space: nowrap; padding: 2px 5px; border-radius: 4px; background: #1a2220d9; pointer-events: none; }
/* A PROMPT on the ring (a placeholder pawn's "Set your pawn" / "Choose Bobby's pawn", client/commands.js pawn.choose): in the
   seat's colour, a slow glow, its name always shown under it. Offered, not forced: it is drawn only on that pawn's ring. */
#ring .rbtn.prompt { background: var(--seat); color: #10140f; border-color: #fff8; animation: ringPrompt 2.2s ease-in-out infinite; }
#ring > .rl-tip.prompt-cap { color: #fff; background: #1a2220ee; border: 1px solid var(--seat); padding: 3px 8px; border-radius: 6px; z-index: 3; }
@keyframes ringPrompt { 0%, 100% { box-shadow: var(--shadow), 0 0 0 0 color-mix(in srgb, var(--seat) 70%, transparent); } 50% { box-shadow: var(--shadow), 0 0 0 8px color-mix(in srgb, var(--seat) 0%, transparent); } }
.reduce-motion #ring .rbtn.prompt { animation: none; }
@media (prefers-reduced-motion: reduce) { #ring .rbtn.prompt { animation: none; } }
#ring .rbtn:hover { transform: translate(-50%, -50%) scale(var(--rl-hover, 1.1)); z-index: 2; } #ring .rbtn:active { transform: translate(-50%, -50%) scale(var(--rl-press, .94)); }
#ring .rbtn.painted { background: transparent; border: 0; box-shadow: none; } #ring .rbtn img.paint, #ring .rbtn img.pic { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; pointer-events: none; }
#ring .rbtn .ini { font: 700 1em/1 system-ui, sans-serif; letter-spacing: .02em; } #ring .rbtn .pvw { width: 82%; height: 82%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
#ring .rbtn.nest[aria-pressed="true"] { border-color: var(--seat); box-shadow: 0 0 0 3px var(--seat); }
#ring .rbtn.nest.hidden-area { border: 2px dashed var(--hidden); background: color-mix(in srgb, var(--hidden) 14%, var(--surface-solid)); color: var(--hidden); } /* a hidden area in Send to area: the hidden look, as its tile had */
#ring .rbtn.nest.inherited { border: 2px dashed var(--accent); } /* a faction emblem the piece has through its building or room: dashed, as in the old picker */
#ring .rbtn.leaving { pointer-events: none; }
#ring .rbtn .state { position: absolute; right: -4%; bottom: -4%; width: 42%; height: 42%; border-radius: 50%; display: grid; place-items: center; background: var(--surface-solid); border: 2px solid var(--line-strong); color: var(--ink); } #ring .rbtn .state svg { width: 70%; height: 70%; }
#ring .rbtn.ex { border-radius: 50%; padding: 0; grid-template-rows: none; transform: translate(-50%, -50%); } #ring .rbtn.ex .cap, #ring .rbtn.ex kbd { display: none; }
.rbtn { transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface-solid); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow), 0 0 0 1px rgba(0,0,0,.25); transition: border-color .12s, transform .12s; }
.rbtn.big { width: calc(56px * var(--rs, 1)); height: calc(56px * var(--rs, 1)); } /* --rs: the ring's one size token (surfaces/ring.js RING_SCALE) */
.rbtn:hover { border-color: var(--seat); transform: translate(-50%, -50%) scale(1.06); }
.rbtn.pill { width: auto; min-width: calc(56px * var(--rs, 1)); height: calc(44px * var(--rs, 1)); padding: 0 calc(18px * var(--rs, 1)); border-radius: calc(22px * var(--rs, 1)); font-weight: 650; font-size: calc(15px * var(--rs, 1)); }
.rbtn.menu { background: var(--ink); color: var(--bg); border-color: transparent; }
.rbtn.drag { cursor: grab; touch-action: none; border-color: var(--seat); }
.rbtn.drag:active { cursor: grabbing; }
.rbtn.ex { width: calc(64px * var(--rs, 1)); height: calc(64px * var(--rs, 1)); grid-template-rows: 1fr auto; padding: calc(8px * var(--rs, 1)) 2px calc(6px * var(--rs, 1)); border-radius: calc(18px * var(--rs, 1)); }
.rbtn.ex .cap { font-size: calc(9.5px * var(--rs, 1)); line-height: 1.05; max-width: calc(60px * var(--rs, 1)); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-align: center; overflow-wrap: anywhere; color: var(--ink-2); } /* two lines, so "Hide from players" and "Raise / lower" are read whole (they were cut to "Hide from ...") */
.rbtn.ex .ic { width: calc(22px * var(--rs, 1)); height: calc(22px * var(--rs, 1)); }
.rbtn.ex kbd { position: absolute; top: -8px; right: -8px; font-size: 9px; min-width: 14px; padding: 0 3px; }
.rbtn.disabled { opacity: .4; cursor: default; }
.rbtn.danger { color: var(--danger); }
#ring .count { transform: translate(-50%, -50%); min-width: 28px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--seat); color: #151515; font-weight: 700; display: grid; place-items: center; pointer-events: none; }
.variant { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; display: grid; justify-items: center; gap: 2px; padding: 4px; width: 84px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-solid); box-shadow: var(--shadow); font-size: 10px; color: var(--ink-2); }
.variant .pvw { width: 64px; height: 56px; }
.variant .pvw.glyph, .variant .pvw.img { display: grid; place-items: center; color: var(--ink); }
.variant .pvw.img img { width: 52px; height: 52px; object-fit: contain; }
.variant { cursor: pointer; } .variant:hover { border-color: var(--seat, var(--accent)); color: var(--ink); }
.variant.danger { color: var(--danger); } .variant.back { color: var(--mute); }
.variant.drag { cursor: grab; touch-action: none; border-color: var(--seat); } .variant.drag.active { cursor: grabbing; }
.variant kbd { position: absolute; top: -7px; right: -7px; font-size: 9px; min-width: 14px; padding: 0 3px; }
/* a sub-menu (replace with similar, a room's types / walls / floors, a pawn's conditions): ONE panel, placed by
   surfaces/ring.js at the button that opened it; --cols is set there from the number of tiles */
#ring > .flyout.grid { inset: auto; z-index: 5; display: grid; grid-template-columns: repeat(var(--cols, 4), 84px); max-width: calc(100vw - 16px); gap: 8px; padding: 12px 10px 10px; max-height: min(64vh, 540px); overflow: auto; pointer-events: auto !important; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); }
.flyout.grid .variant { position: relative; transform: none; }
.rbtn.grp .cap { color: var(--ink); }
/* a room's fog height: a slider in the same panel */
#ring > .flyout.grid.slider { display: block; width: 250px; }
.flyout.slider .fogout { margin: 8px 0 2px; font-size: 13px; color: var(--ink-2); } .flyout.slider .fogout b { font-size: 18px; color: var(--ink); }
.flyout.slider input[type=range] { width: 100%; margin: 4px 0 0; accent-color: var(--seat, var(--accent)); touch-action: none; }
.flyout.slider .fogends { display: flex; justify-content: space-between; font-size: 10px; color: var(--mute); }
.flyout.slider .fogdef { margin-top: 8px; width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-size: 12px; cursor: pointer; }
.flyout.slider .fogdef:disabled { opacity: .45; cursor: default; }
.flyout.grid > header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px 0 0; font-size: 12px; font-weight: 650; color: var(--ink-2); }
.flyout.grid > header .fclose { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); cursor: pointer; }
.flyout.grid > header .fclose:hover { color: var(--ink); border-color: var(--seat, var(--accent)); }
.variant span:last-child { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a ring drag (surfaces/ring.js): the frame is frozen; the other buttons step aside, the handle follows the pointer,
   a crosshair marks the centre and a guide line runs from it to the handle */
#ring.dragging > :not(.active):not(.guide):not(.readout) { opacity: 0; pointer-events: none; }
#ring .rbtn.active, #ring .rbtn.active:hover { transform: translate(-50%, -50%) scale(1.08); border-color: var(--seat); cursor: grabbing; }
#ring svg.guide { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; overflow: visible; }
#ring svg.guide line, #ring svg.guide circle { stroke: var(--seat); stroke-width: 2; fill: none; }
#ring svg.guide .gl { stroke-dasharray: 5 5; opacity: .85; }
#ring svg.guide .cross line { stroke-width: 2.5; }
#ring svg.guide .tick { stroke-width: 2; opacity: .55; } #ring svg.guide .tick.on { stroke-width: 4.5; opacity: 1; } /* the turn handle's 45° notches; the caught one */
#ring svg.guide circle { fill: var(--seat); }
#ring .readout { position: fixed; z-index: 5; transform: none; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 650; pointer-events: none; white-space: nowrap; }
.ring-edit { transform: translate(-50%, -50%); width: 200px; padding: 8px 12px; border-radius: 18px; border: 2px solid var(--seat); background: var(--surface-solid); outline: 0; font-weight: 600; font-size: 15px; }

/* chat */
#chat { position: absolute; z-index: var(--z-chat); left: 12px; bottom: 34px; width: min(340px, calc(100% - 24px)); max-height: 128px; overflow: hidden; padding: 6px 8px; border-radius: 10px; background: color-mix(in srgb, var(--surface-solid) 70%, transparent); border: 1px solid var(--line); font-size: 12px; cursor: pointer; mask-image: linear-gradient(transparent, #000 30%); }
#chat.expanded { max-height: 50vh; overflow-y: auto; mask-image: none; background: var(--surface-solid); }
#chat .line { padding: 1px 0; color: var(--ink-2); overflow-wrap: anywhere; } #chat .who { font-weight: 650; } #chat .total { color: var(--ink); }
#bubbles { position: absolute; inset: 0; pointer-events: none; z-index: var(--z-bubbles); }
.bubble { position: absolute; max-width: 260px; padding: 5px 10px; border-radius: 12px 12px 12px 3px; background: var(--surface-solid); border: 1px solid var(--line-strong); border-left: 3px solid var(--c); box-shadow: var(--shadow); font-size: 13px; }

/* modes, marquee, which-key, output, sheet, toast, hud */
#marquee { position: absolute; z-index: var(--z-marquee); border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none; border-radius: 2px; }
#modeLabel.bad { background: var(--danger); color: #fff; }
#modeLabel { position: fixed; z-index: var(--z-modal); padding: 3px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 12px; pointer-events: none; }
#whichkey { position: absolute; z-index: var(--z-whichkey); left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 24px); padding: 8px 12px; border-radius: 10px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.wk { display: inline-flex; gap: 5px; align-items: center; }
#output { position: absolute; z-index: var(--z-output); left: 50%; top: 64px; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); padding: 12px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
#output h3 { margin: 0 0 8px; font-size: 13px; } #output textarea { width: 100%; height: 64px; resize: none; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); font: 11px ui-monospace, monospace; padding: 6px; }
#output .row { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
#output button, .iconbtn { border: 1px solid var(--line); background: var(--raised); border-radius: 7px; padding: 4px 10px; }
#sheet { position: absolute; inset: 0; z-index: var(--z-sheet); display: grid; place-items: center; background: rgba(0,0,0,.35); padding: 16px; }
.sheet-card { width: min(980px, 100%); max-height: 100%; overflow: auto; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 18px 18px; }
.sheet-card header { display: flex; justify-content: space-between; align-items: center; } .sheet-card h2 { font-size: 15px; margin: 4px 0; display: flex; gap: 8px; align-items: center; }
.sheet-cols { columns: 3 260px; column-gap: 24px; }
.sheet-cols section { break-inside: avoid; margin: 10px 0; } .sheet-cols h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); margin: 0 0 4px; }
.sheet-cols .row { display: flex; gap: 6px; align-items: center; padding: 2px 0; } .sheet-cols .row span { flex: 1; }
#toast { position: absolute; z-index: var(--z-modal); left: 50%; bottom: 60px; transform: translateX(-50%); padding: 7px 14px; border-radius: 9px; background: var(--ink); color: var(--bg); font-weight: 550; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; }
#toast.show { opacity: 1; } #toast.bad { background: var(--danger); color: #fff; }
/* Graphics: Auto changed the preset (graphics.js): one line, one Undo */
#gfxNote { position: absolute; z-index: var(--z-gfxnote); left: 50%; bottom: 100px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: min(92vw, 640px); padding: 8px 10px 8px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 550; font-size: 13px; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
#gfxNote button { font: inherit; border: 0; border-radius: 7px; padding: 5px 10px; cursor: pointer; background: var(--accent); color: #fff; white-space: nowrap; }
#gfxNote button.x { background: transparent; color: inherit; padding: 2px 6px; font-size: 16px; }
#hud { position: absolute; z-index: var(--z-hud); right: 12px; bottom: 8px; font: 11px Inter, system-ui, sans-serif; color: var(--mute); pointer-events: none; }
#pipFrame { position: absolute; z-index: var(--z-pip); border: 2px solid var(--line-strong); border-radius: 10px; pointer-events: none; box-shadow: var(--shadow); }
#pipFrame .bar { position: absolute; left: 0; right: 0; top: 0; display: flex; gap: 4px; align-items: center; padding: 3px 6px; background: var(--surface); font-size: 11px; pointer-events: auto; border-radius: 8px 8px 0 0; }
#pipFrame .bar span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pipFrame .bar button { border: 1px solid var(--line); background: var(--raised); border-radius: 5px; padding: 0 6px; font-size: 11px; }

@media (max-width: 640px) {
  #bar { top: 8px; width: calc(100% - 120px); left: 8px; transform: none; }
  #bar.open { width: calc(100% - 16px); }
  #results { left: 8px; transform: none; width: calc(100% - 16px); }
  #underBar { left: 8px; right: 8px; align-items: flex-start; } #crumbs { align-self: stretch; } #areaState { max-width: 100%; }
  #roster { top: 8px; right: 8px; max-width: 104px; }
  .av .where { display: none; }
}

/* ---------- Build launcher and menu (surfaces/build.js): big chunky tiles, labels under the icons ---------- */
#launchers { position: absolute; z-index: var(--z-launchers); top: 12px; left: 12px; display: flex; flex-direction: column; gap: 8px; }
.launcher { position: relative; width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); backdrop-filter: blur(10px); display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 8px 0 6px; cursor: pointer; transition: border-color .12s, transform .12s; }
.launcher:hover { border-color: var(--accent); transform: scale(1.04); }
.launcher.live { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.launcher .lcap { font-size: 11px; font-weight: 650; color: var(--ink-2); line-height: 1; }
.launcher kbd { position: absolute; top: -6px; right: -6px; font-size: 10px; }
#buildMenu { position: absolute; z-index: var(--z-trays); display: flex; flex-direction: column; gap: 8px; width: min(236px, calc((100vw - 44px) / var(--ts, 1))); padding: 10px; box-sizing: border-box; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; animation: tray-in .18s ease-out; }
@keyframes tray-in { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
#buildMenu .banc { display: flex; flex-direction: column; gap: 4px; }
.bchip { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); cursor: pointer; text-align: left; width: 100%; }
.bchip:hover { border-color: var(--accent); }
.bchip span { display: flex; flex-direction: column; font-weight: 650; font-size: 13px; line-height: 1.15; flex: 1; min-width: 0; }
.bchip small { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.bchip kbd { font-size: 9.5px; }
#buildMenu .blevel { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 2px 0; }
#buildMenu .blevel b { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
#buildMenu .blevel kbd { font-size: 10px; }
/* (fluid tracks, not 104 px: a classic vertical scrollbar takes its width out of these columns; fixed ones then overflow sideways. Nick's rule, docs/UI.md) */
.bgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; padding-bottom: 2px; }
.btile { position: relative; width: 100%; height: 112px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); display: grid; grid-template-rows: 70px 1fr; justify-items: center; align-items: center; padding: 6px 4px 4px; cursor: pointer; transition: border-color .1s, transform .1s, background .1s; }
.btile:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.btile.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--raised)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.btile.off { opacity: .5; }
.btile .bl { max-width: 100%; overflow-wrap: anywhere; font-size: 11.5px; font-weight: 600; line-height: 1.15; text-align: center; max-height: 2.3em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--ink-2); }
.btile.sel .bl { color: var(--ink); }
.btile kbd { position: absolute; top: 4px; left: 4px; font-size: 10px; min-width: 15px; padding: 0 3px; }
.btile .more { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--mute); }
.btile em { position: absolute; bottom: 2px; font-size: 9px; color: var(--mute); font-style: normal; }
.nic { width: 64px; height: 64px; border-radius: 10px; object-fit: contain; display: grid; place-items: center; color: var(--ink-2); }
.bchip .nic { width: 32px; height: 32px; border-radius: 8px; }
.nic.fb { background: color-mix(in srgb, var(--ink) 6%, transparent); }
#buildMenu footer { font-size: 11px; color: var(--mute); padding: 2px 2px 0; line-height: 1.5; }
#buildMenu footer kbd { font-size: 10px; }
.launcher .lic { width: 40px; height: 40px; object-fit: contain; }

/* ---------- tool cursor (surfaces/cursor.js): a badge beside a crosshair; every switch pops ---------- */
/* the pointer itself changes with the tool (Harry 2026-10-04): 32-px glyphs (64 px for retina), hotspot = crosshair centre.
   Declared from the most to the least widely supported form; a browser keeps the last one it understands. Space-panning
   (#c.panning, below) still wins while Space is held. */
#c.tool-build { cursor: url(data/cursors/build.png) 6 6, crosshair; cursor: -webkit-image-set(url(data/cursors/build.png) 1x, url(data/cursors/build@2x.png) 2x) 6 6, crosshair; cursor: image-set(url(data/cursors/build.png) 1x, url(data/cursors/build@2x.png) 2x) 6 6, crosshair; }
#c.tool-room { cursor: url(data/cursors/room.png) 6 6, crosshair; cursor: -webkit-image-set(url(data/cursors/room.png) 1x, url(data/cursors/room@2x.png) 2x) 6 6, crosshair; cursor: image-set(url(data/cursors/room.png) 1x, url(data/cursors/room@2x.png) 2x) 6 6, crosshair; }
#c.tool-place { cursor: url(data/cursors/place.png) 6 6, crosshair; cursor: -webkit-image-set(url(data/cursors/place.png) 1x, url(data/cursors/place@2x.png) 2x) 6 6, crosshair; cursor: image-set(url(data/cursors/place.png) 1x, url(data/cursors/place@2x.png) 2x) 6 6, crosshair; }
#c.panning, #c.panning[class*="tool-"] { cursor: grab; }
/* the tool pointer also shows over the Build tray the moment a type or room is picked (Harry 2026-10-04) */
html.tool-build #buildMenu, html.tool-build #buildMenu *, html.tool-build #launchers * { cursor: url(data/cursors/build.png) 6 6, crosshair; cursor: -webkit-image-set(url(data/cursors/build.png) 1x, url(data/cursors/build@2x.png) 2x) 6 6, crosshair; cursor: image-set(url(data/cursors/build.png) 1x, url(data/cursors/build@2x.png) 2x) 6 6, crosshair; }
html.tool-room #buildMenu, html.tool-room #buildMenu *, html.tool-room #launchers * { cursor: url(data/cursors/room.png) 6 6, crosshair; cursor: -webkit-image-set(url(data/cursors/room.png) 1x, url(data/cursors/room@2x.png) 2x) 6 6, crosshair; cursor: image-set(url(data/cursors/room.png) 1x, url(data/cursors/room@2x.png) 2x) 6 6, crosshair; }
/* over the PiP: the select pointer (the arrow); the build tool waits until the pointer returns to the main view */
#c.over-pip, #c.over-pip[class*="tool-"] { cursor: default; }
#toolCursor { position: fixed; left: 0; top: 0; z-index: var(--z-toolcursor); pointer-events: none; will-change: transform; display: flex; align-items: center; gap: 6px; }
#toolCursor .tc-badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-solid); color: var(--ink); border: 2px solid var(--accent); box-shadow: var(--shadow); }
#toolCursor.tc-place .tc-badge { background: color-mix(in srgb, var(--surface-solid) 55%, transparent); }
#toolCursor .tc-pv { width: 42px; height: 42px; display: grid; place-items: center; }
#toolCursor .tc-pv.live > .ic { visibility: hidden; }
#toolCursor .tc-cap { font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 7px; background: var(--ink); color: var(--bg); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
#toolCursor .tc-ring { position: absolute; left: 23px; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid var(--accent); opacity: 0; }
#toolCursor.pop .tc-badge { animation: tc-pop .42s cubic-bezier(.2, 1.6, .4, 1); }
#toolCursor.pop .tc-ring { animation: tc-ring .55s ease-out; }
#toolCursor.pop .tc-cap { animation: tc-cap .5s ease-out; }
@keyframes tc-pop { 0% { transform: scale(.3) rotate(-25deg); } 60% { transform: scale(1.25) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes tc-ring { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes tc-cap { 0% { opacity: 0; transform: translateX(-8px); } 100% { opacity: 1; transform: none; } }

/* ---------- room and building labels (surfaces/labels.js): quiet, legible, the selection handles ---------- */
#labels { position: absolute; inset: 0; z-index: var(--z-labels); pointer-events: none; overflow: hidden; }
.rlabel { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 12px; background: color-mix(in srgb, var(--surface-solid) 78%, transparent); border: 1px solid var(--line); color: var(--ink-2); font-size: 24px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; pointer-events: auto; cursor: pointer; backdrop-filter: blur(4px); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: border-color .1s, color .1s, opacity .15s, visibility 0s; opacity: .82; touch-action: none; user-select: none; } /* Harry 2026-10-05: twice the size (12 → 24 px), a little see-through */
.rlabel:not(.on) { opacity: 0 !important; visibility: hidden; pointer-events: none !important; transition: opacity .15s, visibility 0s .15s; } /* 2026-10-06: a label that is not showing keeps its size (it used to be display: none, measured 0 x 0, and blinked) and fades */
.rlabel:hover { color: var(--ink); border-color: var(--line-strong); opacity: 1; }
.rlabel.building { font-size: 13px; font-weight: 700; color: var(--ink); padding: 4px 10px; border-radius: 8px; gap: 5px; } /* the building's tag keeps its old size: doubled as well, it crowded its own rooms' labels off the screen */
.rlabel.sel { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); opacity: 1; }
.rlabel.hidden-room { color: color-mix(in srgb, #a78bfa 55%, var(--ink)); border-color: color-mix(in srgb, #a78bfa 70%, transparent); border-style: dashed; } /* hidden from players: the hidden violet */
.rlabel .hid { display: inline-flex; color: #a78bfa; } .rlabel .hid[hidden] { display: none; }
.rlabel input { font: inherit; width: 280px; border: 0; outline: 0; background: transparent; color: var(--ink); padding: 0; }
.rlabel.editing { border-color: var(--accent); opacity: 1; }
#pipFrame.lib { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong)); }
#pipFrame.lib #pipSwap { display: none; }

/* ---------- first-visit pantomime (intro.js): the LLM seats' ghost look, on screen ---------- */
#introGhost { position: fixed; left: 0; top: 0; z-index: var(--z-ghost); pointer-events: none; will-change: transform; transition: opacity .35s; }
#introGhost svg { position: absolute; left: -3px; top: -2px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
#introGhost .ig-ring { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #b48cff; border-right-color: transparent; animation: ig-spin 1.4s linear infinite; opacity: .85; }
#introGhost .ig-tag { position: absolute; left: 26px; top: 20px; white-space: nowrap; font-size: 11.5px; font-weight: 650; padding: 3px 8px; border-radius: 8px; background: #b48cff; color: #1b1426; }
#introGhost .ig-tag kbd { font-size: 9.5px; margin-left: 4px; }
#introGhost.tap .ig-ring { animation: ig-tap .3s ease-out, ig-spin 1.4s linear infinite; }
#introGhost.down svg { transform: scale(.88); }
#introGhost.bye { opacity: 0; }
@keyframes ig-spin { to { transform: rotate(360deg); } }
@keyframes ig-tap { 0% { transform: scale(1.8); opacity: 1; } 100% { transform: scale(1); opacity: .85; } }
#introHint { position: absolute; z-index: var(--z-introhint); left: 88px; top: 26px; padding: 8px 12px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); opacity: 0; transform: translateX(-6px); transition: opacity .35s, transform .35s; pointer-events: none; }
#introHint.show { opacity: 1; transform: none; }
#introHint kbd { font-size: 11px; }

/* ---------- floating undo chips (surfaces/undochips.js): another seat's change, one click to undo ---------- */
#undoChips { position: absolute; inset: 0; z-index: var(--z-chips); pointer-events: none; overflow: hidden; }
/* conditional buttons (surfaces/condbutton.js; docs/UI.md): appear only while relevant, one fixed home each, never take focus */
.cbtn { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--ink); font-weight: 650; font-size: 12.5px; box-shadow: var(--shadow); pointer-events: auto; cursor: pointer; white-space: nowrap; transition: opacity .6s, border-color .1s; animation: uchip-in .3s ease-out; }
.cbtn[hidden] { display: none; }
.cbtn:hover { border-color: var(--accent); }
.cbtn.fade { opacity: 0; pointer-events: none; }
.cbtn.done { color: var(--ok); }
.cbtn.docked { left: 50%; transform: translateX(-50%); } .cbtn.dock-top { top: calc(var(--under-bar, 52px) + 10px); } .cbtn.dock-bottom { top: auto; bottom: 96px; } .cbtn.dock-bottom2 { top: auto; bottom: 136px; }
@keyframes uchip-in { from { opacity: 0; } to { opacity: 1; } }
/* big chunky icons everywhere (Harry 2026-10-03): bar results carry 46-px tiles; rooms show their painted icon */
.res .ico.img { background: transparent; }
.res .ico.img img { width: 46px; height: 46px; object-fit: contain; }
#introHint .pad { display: inline-block; margin-top: 4px; font-weight: 550; opacity: .85; }
.rlabel.over { opacity: .45; pointer-events: none; } /* a pawn under it stays clickable */
/* THE LABEL LOOK (Label lab, 2026-10-20; surfaces/labels.js): only a label drawn with a look (the house value or the lab)
   wears .lb; its size and look arrive as variables (--lb-f text px, --lb-k = that / the native 24 or 13 px, --lb-p padding x,
   --lb-r corner px, --lb-o opacity, --lb-fade distance fade). At today's numbers every computed value is the rule above. */
.rlabel.lb { font-size: var(--lb-f); padding: calc(5px * var(--lb-k) * var(--lb-p)) calc(14px * var(--lb-k) * var(--lb-p)); border-radius: calc(var(--lb-r) * var(--lb-k)); gap: calc(8px * var(--lb-k)); opacity: calc(var(--lb-o) * var(--lb-fade, 1)); }
.rlabel.lb.building { padding: calc(4px * var(--lb-k) * var(--lb-p)) calc(10px * var(--lb-k) * var(--lb-p)); border-radius: calc(var(--lb-r) * var(--lb-k) * 8 / 12); gap: calc(5px * var(--lb-k)); }
.rlabel.lb > svg { width: calc(13px * var(--lb-k)); height: calc(13px * var(--lb-k)); } .rlabel.lb .hid svg { width: calc(20px * var(--lb-k)); height: calc(20px * var(--lb-k)); }
.rlabel.lb:hover, .rlabel.lb.sel, .rlabel.lb.editing { opacity: var(--lb-fade, 1); }
.rlabel.lb.over { opacity: calc(.45 * var(--lb-fade, 1)); }

/* ---------- the PiP is a window (Harry 2026-10-04): move by the title bar, resize from edges and corners ---------- */
#pipFrame .bar { cursor: move; user-select: none; }
#pipFrame .bar button { cursor: pointer; }
#pipFrame .rz { position: absolute; pointer-events: auto; z-index: 1; }
#pipFrame .rz[data-d="n"], #pipFrame .rz[data-d="s"] { left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
#pipFrame .rz[data-d="n"] { top: -5px; } #pipFrame .rz[data-d="s"] { bottom: -5px; }
#pipFrame .rz[data-d="e"], #pipFrame .rz[data-d="w"] { top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
#pipFrame .rz[data-d="e"] { right: -5px; } #pipFrame .rz[data-d="w"] { left: -5px; }
#pipFrame .rz[data-d="ne"], #pipFrame .rz[data-d="nw"], #pipFrame .rz[data-d="se"], #pipFrame .rz[data-d="sw"] { width: 14px; height: 14px; }
#pipFrame .rz[data-d="ne"] { top: -6px; right: -6px; cursor: nesw-resize; } #pipFrame .rz[data-d="sw"] { bottom: -6px; left: -6px; cursor: nesw-resize; }
#pipFrame .rz[data-d="nw"] { top: -6px; left: -6px; cursor: nwse-resize; } #pipFrame .rz[data-d="se"] { bottom: -6px; right: -6px; cursor: nwse-resize; }
#labels.passive .rlabel { pointer-events: none; }
/* THE × ON A STAIR'S WARNING (surfaces/stairnotes.js): placed by a transform at its centre. The button is the target and the disc is
   what is drawn: 28 px of target round a 20 px disc with a mouse, 44 px round 28 on a phone. */
#stairNoteX { position: absolute; inset: 0; z-index: var(--z-labels); pointer-events: none; overflow: hidden; }
#stairNoteX.passive .snx { pointer-events: none; }
.snx { position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px; padding: 0; border: 0; background: none; display: grid; place-items: center; color: #15171b; cursor: pointer; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.snx[hidden] { display: none; }
.snx-d { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #f2efe8; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.65); transition: background var(--t-fast, 120ms), color var(--t-fast, 120ms); }
.snx:hover .snx-d, .snx:active .snx-d { background: #b23a33; color: #fff; } /* (light on the dark note: Gemini's blind read lost a dark disc against it) */
@media (pointer: coarse) { .snx { width: 44px; height: 44px; margin: -22px 0 0 -22px; } .snx-d { width: 28px; height: 28px; } }

.rbtn.menu.open { background: var(--surface-solid); color: var(--ink); border-color: var(--line-strong); } /* ☰ open: the same spot, now ×  */
.rbtn.ex { transform: translate(-50%, -50%) scale(var(--exs, 1)); } .rbtn.ex:hover { transform: translate(-50%, -50%) scale(calc(var(--exs, 1) * 1.06)); }

/* ---- announce-then-settle (surfaces/announce.js, Harry 2026-10-04): a said line or a roll, big and centred on a
   translucent dark plate in the speaker's colour, then it flies (shrinking) into its own line in the chat log ---- */
#announce { position: fixed; inset: 0; z-index: var(--z-modal); pointer-events: none; }
#announce .ann { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer;
  max-width: min(78vw, 980px); padding: 18px 30px 20px; border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--c) 70%, transparent);
  background: rgba(16, 17, 15, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 14px 44px rgba(0,0,0,.42), inset 4px 0 0 var(--c); color: #f3efe6; font-size: 40px; line-height: 1.2; text-align: left; }
#announce .ann .aline { font-size: 40px; overflow-wrap: anywhere; }
#announce .ann.long { top: 50%; width: min(78vw, 980px); max-height: calc(100% - 140px); overflow: hidden auto; scrollbar-width: thin; } #announce .ann.long .aline { font-size: clamp(14px, 1vw + 6px, 18px); line-height: 1.4; }
#announce .ann.long.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 44px), transparent); } /* (more below than fits: it fades out; the log has it all) */
#announce .ann .who { color: var(--c); font-weight: 650; }
#announce .ann .sep, #announce .ann .arrow { opacity: .55; font-weight: 400; }
#announce .ann .expr { font-weight: 500; }
#announce .ann .total { font-weight: 800; font-variant-numeric: tabular-nums; }
#announce .ann .dice { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 15px; color: rgba(243,239,230,.72); }
#announce .ann .die { min-width: 26px; padding: 2px 6px; border-radius: 6px; border: 1px solid rgba(243,239,230,.28); text-align: center; font-variant-numeric: tabular-nums; }
#announce .ann .why { margin-left: 6px; font-style: italic; }
#announce .ann.nat20 { box-shadow: 0 14px 44px rgba(0,0,0,.42), inset 4px 0 0 var(--c), 0 0 0 2px rgba(240, 198, 92, .55), 0 0 34px rgba(240, 198, 92, .28); }
#announce .ann.nat20 .total { color: #f3c65a; }
#announce .ann.nat1 .total { color: #ef7f6c; }
#announce .ann.flying { pointer-events: none; }
#chat .line.pending { visibility: hidden; }

/* ---------- Pawns and Settings launchers (surfaces/pawns.js, surfaces/settings.js; Harry 2026-10-04) ----------
   Build, Pawns, Settings sit in one ROW, upper-left, same box size. Settings pulls out a tray like Build's; Pawns
   is a placeholder ("coming soon"). The three trays are mutually exclusive. */
#launchers { flex-direction: row; }
#bar:not(.open) { width: min(560px, max(280px, calc(100% - 480px))); } /* the closed bar clears the three launchers */
.launcher[hidden] { display: none; }
.launcher.open { border-color: var(--accent); }
/* ---------- hold, tap, pin (surfaces/tray.js): the menus' shared head, the pin, the hover names ---------- */
.thead { display: flex; align-items: center; justify-content: space-between; padding: 0 0 0 2px; min-height: 24px; }
.thead b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.tpin { width: 26px; height: 24px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--mute); display: grid; place-items: center; padding: 0; cursor: pointer; }
.tpin:hover { color: var(--ink); background: var(--raised); border-color: var(--line); }
.tpin:not(.on) svg { opacity: .7; transform: rotate(45deg); }
.tpin.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--raised)); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
#traytip { position: fixed; z-index: var(--z-ghost); pointer-events: none; max-width: 260px; padding: 4px 8px; border-radius: 7px; background: #0e1013; color: #f1efe9; font: 600 11.5px/1.3 Inter, system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .14); }
#statustip { position: fixed; z-index: var(--z-ghost); pointer-events: none; max-width: 300px; padding: 4px 9px; border-radius: 7px; background: #0e1013; color: #f1efe9; font: 600 12px/1.3 Inter, system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .14); text-transform: none; }
#statustip.one { font-size: 13px; }
.sphb { display: flex; align-items: center; gap: 4px; }
/* Settings pinned: the window stays, the backdrop goes, the map behind it takes the pointer */
#settingsModal.pinned { background: none; backdrop-filter: none; pointer-events: none; place-items: center end; padding-right: 16px; }
#settingsModal.pinned .smodal { pointer-events: auto; }

/* ---------- the Pawns menu (surfaces/pawns.js; docs/PAWNS.md): the Build tray's family, three tiles wide ---------- */
/* (the tray and Settings wear zoom: var(--ts): inside it 100vw is scaled too, so the room there is divided back by --ts, or the largest text size runs them off a small screen) */
#pawnsTray { position: absolute; z-index: var(--z-trays); display: flex; flex-direction: column; gap: 8px; width: min(348px, calc((100vw - 44px) / var(--ts, 1))); padding: 10px; box-sizing: border-box; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; animation: tray-in .18s ease-out; }
#pawnsTray .pbody { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; padding-right: 2px; }
#pawnsTray .psec { display: flex; flex-direction: column; gap: 6px; }
#pawnsTray .blevel { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; min-height: 24px; }
#pawnsTray .blevel b { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
#pawnsTray .bgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 7px; overflow: visible; flex: none; }
#pawnsTray footer { font-size: 11px; color: var(--mute); padding: 2px 2px 0; line-height: 1.5; }
#pawnsTray footer kbd { font-size: 10px; }
.phbtn { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 6px 0 7px; border-radius: 9px; border: 1px solid var(--line); background: var(--raised); color: var(--ink-2); cursor: pointer; }
.phbtn:hover { border-color: var(--accent); color: var(--ink); }
.phbtn.on { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, var(--raised)); }
.phbtn.has::after { content: ''; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface-solid); }
.phbtn span { font-size: 11.5px; font-weight: 650; }
.phbtn kbd { font-size: 9.5px; min-width: 14px; padding: 0 3px; }
.prows { display: flex; flex-direction: column; gap: 6px; }
/* a party row: the Build tray's chip (the genre button once chosen), grown to carry a portrait */
.prow { position: relative; display: flex; align-items: stretch; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); cursor: grab; user-select: none; touch-action: none; }
.prow:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.prow.none { border-style: dashed; background: none; }
.prow.me { background: color-mix(in srgb, var(--c) 9%, var(--raised)); }
.prow.off .pface, .prow.off .pwho small { opacity: .55; }
.prow.dragging { opacity: .45; cursor: grabbing; }
.prow.drop-before { box-shadow: 0 -3px 0 -1px var(--accent); }
.prow.drop-after { box-shadow: 0 3px 0 -1px var(--accent); }
.prow.cur { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.pface { position: relative; flex: none; width: 74px; height: 74px; padding: 0; border-radius: 12px; border: 3px solid var(--c); background: #000; cursor: pointer; overflow: visible; display: grid; place-items: center; }
.prow.none .pface { width: 46px; height: 46px; align-self: center; margin: 0 14px; }
.pface:disabled { cursor: default; border-style: dashed; background: none; }
.pface:not(:disabled):hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 40%, transparent); }
.pimg { display: block; border-radius: 9px; object-fit: cover; background: #000; }
.pimg.pfb { display: grid; place-items: center; background: color-mix(in srgb, var(--c, #888) 30%, #16181c); color: #fff; font-weight: 800; font-size: 22px; }
.pface kbd { position: absolute; top: -6px; left: -7px; font-size: 10px; min-width: 15px; padding: 0 3px; }
.pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.pwho { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 6px; min-height: 16px; }
.pwho small { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pname { font-weight: 650; font-size: 13.5px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pname em { font-weight: 500; font-style: normal; color: var(--mute); font-size: 12px; }
.pstat { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; }
.pdmg { display: inline-flex; align-items: center; gap: 2px; padding: 0 5px 0 4px; height: 18px; border-radius: 9px; background: color-mix(in srgb, var(--danger) 22%, transparent); color: color-mix(in srgb, var(--danger) 55%, var(--ink)); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pcond { font-style: normal; font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink-2); max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phid { display: inline-flex; color: var(--hidden); }
.pacts { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: 1px; }
.pact { width: 27px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-solid); color: var(--ink-2); display: grid; place-items: center; padding: 0; cursor: pointer; }
.pact:hover { border-color: var(--accent); color: var(--ink); }
.pact.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-solid)); }
.psep { width: 1px; height: 16px; background: var(--line-strong); margin: 0 3px; }
.ppets { display: grid; grid-template-columns: repeat(2, 34px); gap: 4px; align-content: center; flex: none; }
.ppet { position: relative; width: 34px; height: 34px; padding: 0; border-radius: 9px; border: 2px solid var(--c); background: #000; cursor: pointer; display: grid; place-items: center; }
.ppet .pimg { border-radius: 7px; } .ppet .pimg.pfb { font-size: 12px; }
.ppet b { position: absolute; right: -5px; bottom: -5px; display: inline-flex; align-items: center; gap: 1px; font-size: 9px; font-weight: 800; padding: 0 3px; border-radius: 6px; background: var(--danger); color: #fff; }
.ppet:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 40%, transparent); }
.pmore { font-size: 10px; font-weight: 700; color: var(--mute); align-self: center; }
.parea { display: flex; align-items: center; gap: 6px; padding: 4px 4px 0; font-size: 11px; color: var(--ink-2); }
.parea b { font-weight: 700; } .parea small { color: var(--mute); font-size: 10px; }
.parea.hid, .parea.hid small { color: var(--hidden); }
.pempty { margin: 2px 4px; color: var(--mute); font-size: 12px; }
.pnotes textarea { width: 100%; min-height: 96px; max-height: 240px; resize: vertical; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); padding: 8px 9px; font-size: 12.5px; line-height: 1.4; }
.pnotes textarea:focus { outline: none; border-color: var(--accent); }
/* tiles in the Pawns menu: the Build tile, with a figure's thumbnail for its picture */
#pawnsTray .btile, .mptree .btile { text-align: center; }
.nic.fig { object-fit: cover; background: #000; }
.bgrid.c2 { grid-template-columns: repeat(2, 1fr) !important; } .bgrid.c2 .btile { width: auto; }
.btile.ftile.sel .bl { color: var(--ink); }
.btile .fsz { position: absolute; top: 5px; right: 6px; font-style: normal; font-size: 9.5px; font-weight: 800; padding: 0 4px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 80%, #000); color: #fff; }
.btile.mtile .nic, .btile.newp .nic { background: none; border: 2px dashed var(--line-strong); color: var(--ink-2); }
.btile.newp:hover .nic, .btile.mtile:hover .nic { border-color: var(--accent); color: var(--accent); }
.btile.mine .bl, .btile.cast .bl { -webkit-line-clamp: 1; max-height: 1.2em; align-self: start; }
.btile.mine em, .btile.cast em { bottom: 3px; display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.btile.mine.bench .nic, .btile.mine.away .nic { filter: grayscale(.75) brightness(.8); }
.btile.mine.bench, .btile.mine.away { border-style: dashed; background: none; }
.btile.mine.away { opacity: .6; }
.btile .mstar { position: absolute; top: 5px; left: 26px; color: var(--accent); display: inline-flex; } .btile .mstar svg { fill: currentColor; }
.btile kbd + .mstar { left: 26px; } .btile.mine:not(:has(kbd)) .mstar { left: 6px; }
.btile .mstat { position: absolute; left: 6px; right: 6px; bottom: 38px; display: flex; flex-wrap: wrap-reverse; gap: 3px; align-items: center; } /* (bottom-anchored where top: 60px was: a second row of conditions climbs over the picture instead of running off the tile) */
.btile .mstat .pcond { background: rgba(0, 0, 0, .7); color: #fff; } .btile .mstat .pdmg { background: var(--danger); color: #fff; }
.tmenu { position: absolute; top: 4px; right: 4px; width: 22px; height: 20px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-solid); color: var(--ink-2); display: grid; place-items: center; padding: 0; cursor: pointer; }
.tmenu:hover { border-color: var(--accent); color: var(--ink); }
.btile.cast.group .fsz { top: auto; bottom: 26px; right: 8px; }
.cstack { position: relative; width: 70px; height: 64px; display: block; } .cstack .nic { position: absolute; width: 40px; height: 40px; border-radius: 9px; border: 2px solid var(--raised); }
.cstack .nic:nth-child(1) { left: 0; top: 0; z-index: 3; } .cstack .nic:nth-child(2) { left: 18px; top: 12px; z-index: 2; } .cstack .nic:nth-child(3) { left: 32px; top: 24px; z-index: 1; }
.bchip.cur { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--raised)); cursor: default; }
.bchip.psave { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--raised)); }
.bchip.gmtool.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--raised)); }
#pawnsTray .blevel small { font-size: 10.5px; color: var(--mute); margin-left: 6px; margin-right: auto; }
#pawnsTray .blevel.sub b { color: var(--mute); }
#pawnsTray .pbody.tree .banc { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
/* On the table: a kind per row */
.krows { display: flex; flex-direction: column; gap: 5px; }
.krow { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 4px 7px 4px 4px; border-radius: 11px; border: 1px solid var(--line); background: var(--raised); flex: 1; min-width: 0; }
.krow:hover { border-color: var(--line-strong); }
.krow.hid { border: 1.5px dashed var(--hidden); background: color-mix(in srgb, var(--hidden) 13%, var(--raised)); }
.kface { position: relative; flex: none; width: 48px; height: 48px; padding: 0; border-radius: 10px; border: 2px solid var(--line-strong); background: #000; cursor: pointer; display: grid; place-items: center; }
.kface:hover { border-color: var(--accent); } .kface .nic { width: 44px; height: 44px; border-radius: 8px; }
.krow.hid .kface { border-color: var(--hidden); } .krow.hid .kface .nic { opacity: .6; }
.kface .kn { position: absolute; right: -6px; bottom: -5px; font-style: normal; font-size: 11px; font-weight: 800; padding: 0 5px; border-radius: 8px; background: var(--ink); color: var(--surface-solid); }
.kmain { flex: 1 1 96px; min-width: 96px; display: flex; flex-direction: column; gap: 2px; }
.kname { display: flex; align-items: baseline; gap: 5px; } .kname b { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .kname small { color: var(--mute); font-weight: 700; }
.khid { color: var(--hidden); font-size: 10.5px; font-weight: 650; }
.kdmg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; color: color-mix(in srgb, var(--danger) 60%, var(--ink)); } .kdmg b { font-size: 11.5px; font-weight: 800; padding: 0 5px; border-radius: 8px; background: color-mix(in srgb, var(--danger) 22%, transparent); } .kdmg small { font-size: 10px; color: var(--mute); }
.kacts { display: flex; flex-wrap: wrap; gap: 3px; flex: 0 1 auto; min-width: 0; } .pact.rev { color: var(--hidden); border-color: var(--hidden); }
/* a turn order: the same rows, a marker on whose turn it is */
.trow { display: flex; align-items: stretch; gap: 4px; position: relative; } .trow > .prow, .trow > .krow { flex: 1; min-width: 0; }
.prows.turns.can .trow { cursor: grab; touch-action: none; }
.tmark { flex: none; width: 14px; display: grid; place-items: center; color: var(--accent); } .tmark svg { fill: currentColor; }
.trow.cur > .prow, .trow.cur > .krow { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.trow.dragging { opacity: .45; } .trow.drop-before { box-shadow: 0 -3px 0 -1px var(--accent); } .trow.drop-after { box-shadow: 0 3px 0 -1px var(--accent); }
.tinit { position: absolute; right: -4px; top: -6px; font-style: normal; font-size: 10.5px; font-weight: 800; padding: 0 5px; border-radius: 8px; background: var(--accent); color: #17140f; }
/* Settings ▸ Me ▸ My pawns */
.mpl .mpcard { display: flex; align-items: center; gap: 10px; } .mpcard.sel { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.mpimg { border-radius: 10px; object-fit: cover; background: #000; flex: none; display: grid; place-items: center; } .mpimg.none { background: var(--raised); color: var(--mute); border: 1px dashed var(--line-strong); }
.mpn { flex: 1; min-width: 0; display: flex; flex-direction: column; } .mpn small { color: var(--mute); }
.mped { margin-top: 12px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: color-mix(in srgb, var(--ink) 3%, transparent); display: flex; flex-direction: column; gap: 8px; }
.mped h4 { margin: 0; font-size: 14px; }
/* no Save button: a quiet line says the edit took; a value that cannot be kept is said beside its field */
.mphd { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; min-width: 0; }
.mpstat { color: var(--mute); font-size: 11px; } .mpstat.bad { color: var(--danger); }
.mperr { flex: 1 0 100%; color: var(--danger); font-size: 11px; } .mperr:empty { display: none; }
.mpfig { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; } .mpfig > .mpprev { flex: 0 0 150px; } .mpfig > .mptree { flex: 1 1 240px; min-width: 0; }
.mpprev { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; } .mpprev small { color: var(--mute); font-size: 11px; }
.mptree { max-height: 380px; overflow-y: auto; padding: 2px; display: flex; flex-direction: column; gap: 6px; }
.mptree .banc { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; } .mptree .bchip { width: auto; }
.mptree .bgrid { grid-template-columns: repeat(auto-fill, minmax(min(96px, 100%), 1fr)); overflow: visible; flex: none; }
.mped textarea { width: 100%; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); padding: 6px 8px; resize: vertical; }
/* a small menu at an icon (areas, people) */
.ppop { position: fixed; z-index: var(--z-popover); min-width: 190px; max-width: 280px; max-height: 60vh; overflow-y: auto; padding: 6px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 3px; zoom: var(--ts, 1); }
.ppop header { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding: 2px 6px 4px; }
.ppi { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ink); cursor: pointer; text-align: left; }
.ppi:hover { background: var(--raised); border-color: var(--line); }
.ppi.off { color: var(--mute); cursor: default; }
.ppi span { display: flex; flex-direction: column; line-height: 1.2; } .ppi span b { font-weight: 600; font-size: 13px; } .ppi small { font-size: 10.5px; color: var(--mute); }
.ppi.hid, .ppi.hid small { color: var(--hidden); } .ppi.hid { border: 1px dashed color-mix(in srgb, var(--hidden) 60%, transparent); }
.ppi .pdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
#followPill { position: absolute; z-index: var(--z-follow); left: 50%; bottom: 64px; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; padding: 6px 10px 6px 11px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--accent); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; font-size: 12.5px; }
#followPill i { display: grid; place-items: center; color: var(--mute); } #followPill:hover i { color: var(--ink); }
#chat .line.whisper { font-style: italic; color: var(--ink-2); } #chat .line.whisper .wtext { color: var(--ink); } #chat .line.whisper.failed .wtext { text-decoration: line-through; color: var(--mute); }
.launcher .dot { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger, #e5484d); color: #fff; font: 700 10px/16px system-ui, sans-serif; font-style: normal; }
.launcher .dot[hidden] { display: none; }
#settingsModal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; background: rgba(8, 9, 7, .55); backdrop-filter: blur(2px); }
#settingsModal[hidden] { display: none; }
.smodal { display: grid; grid-template-columns: 216px 1fr; width: min(860px, calc((100vw - 32px) / var(--ts, 1))); height: min(640px, calc((100vh - 32px) / var(--ts, 1))); background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow), 0 24px 60px rgba(0,0,0,.45); overflow: hidden; animation: smodal-in .16s ease-out; }
@keyframes smodal-in { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
html.reduce-motion .smodal { animation: none; }
.scats { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; background: var(--raised); border-right: 1px solid var(--line); overflow-y: auto; }
.scats .stitle { font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--mute); padding: 2px 10px 10px; }
.scat { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; position: relative; }
.scat:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.scat.sel { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); }
.scat .badge { margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger, #e5484d); color: #fff; font: 700 10.5px/18px system-ui, sans-serif; font-style: normal; text-align: center; }
.spane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sph { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px; border-bottom: 1px solid var(--line); }
.sph h2 { margin: 0; font-size: 17px; font-weight: 700; }
.sx { border: 0; background: none; color: var(--mute); cursor: pointer; display: grid; place-items: center; padding: 4px; border-radius: 8px; }
.sx:hover { color: var(--ink); background: var(--raised); }
.spb { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 18px 18px; }
.sgrp { margin: 6px 0 16px; }
.sgrp h3 { margin: 0 0 6px; font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.snote { color: var(--mute); font-size: 12px; margin: 2px 0 8px; }
/* label and control on one line where there is room, one over the other where there is not (flex, not a width query: a query's pixels do not follow the text size's zoom) */
.srow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.srow > label { flex: 0 0 190px; max-width: 100%; font-size: 13px; font-weight: 600; color: var(--ink); }
.srow > .sctl { flex: 1 1 240px; }
.srow .snote { flex: 0 1 calc(100% - 202px); min-width: min(100%, 320px); margin: 0 0 0 auto; font-size: 11px; }
.sctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sctl output { font-size: 11px; color: var(--mute); min-width: 30px; font-variant-numeric: tabular-nums; }
.sctl input[type=range] { width: 150px; max-width: 100%; min-width: 60px; flex: 0 1 150px; accent-color: var(--accent); }
.spane input:not([type]), .spane input[type=text], .spane select { height: 30px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--ink); font-size: 13px; min-width: 0; }
.spane input[type=color] { width: 44px; height: 30px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-strong); background: none; }
.stog { position: relative; width: 38px; height: 22px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--raised); cursor: pointer; padding: 0; flex: none; transition: background .12s; }
.stog i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-2); transition: transform .12s, background .12s; }
.stog.on { background: var(--accent); border-color: var(--accent); }
.stog.on i { transform: translateX(16px); background: #fff; }
html.reduce-motion .stog, html.reduce-motion .stog i { transition: none; }
.sinh { font-size: 11px; color: var(--mute); padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.sinh.over { color: var(--ink); background: color-mix(in srgb, var(--accent) 20%, transparent); }
.sbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; max-width: 100%; box-sizing: border-box; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sbtn:hover:not([disabled]) { border-color: var(--accent); }
.sbtn[disabled] { opacity: .45; cursor: default; }
/* Settings ▸ Me / Vision, distance & rules ▸ D&D Beyond (2026-10-29): Beyond20's state in this tab, and the help page in a new tab */
.sddb { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--mute); } .sddb::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.sddb.on { color: var(--ink); } .sddb.on::before { background: var(--ok); }
a.sbtn.sddb-help { text-decoration: none; }
.sbtn.primary { background: var(--accent); border-color: var(--accent); color: #151515; }
.sbtn.danger { color: var(--danger, #e5484d); }
.sbtn.danger.armed { background: var(--danger, #e5484d); color: #fff; }
.sbtn.tiny { min-height: 22px; padding: 0 7px; font-size: 11px; }
.sareas, .slist { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sarea { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.sarea.here { border-color: var(--accent); }
.san { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.san small { font-size: 11px; color: var(--mute); }
.san input { font-weight: 650; }
.sab { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.slist li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--raised); font-size: 13px; }
.slist li > small { color: var(--mute); margin-right: auto; }
.slist li > b + small { margin-left: 4px; }
.slist.dim li { opacity: .7; }
.st-approved { color: #4caf50 !important; } .st-denied { color: var(--danger, #e5484d) !important; } .st-pending { color: var(--accent) !important; }
.snew { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.snew input { flex: 1; min-width: 140px; }
.snew .agentwill { flex-basis: 100%; opacity: 0.75; }
.schk { display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 5px; font-size: 12.5px; margin-right: 10px; }
.scls { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 6px 0; }
.skey code { font-size: 11px; word-break: break-all; background: var(--raised); padding: 2px 5px; border-radius: 5px; }
.skeys { margin-top: 8px; font-size: 12.5px; }
.skeys summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.skeys table { border-collapse: collapse; margin-top: 6px; width: 100%; }
.skeys td { padding: 3px 6px; border-bottom: 1px solid var(--line); }
.skeys td:last-child { text-align: right; }
.sfoot { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
/* Settings on a narrow screen: every section stays in sight, in Harry's order, on as many lines as it takes (they used to be a strip that scrolled sideways: Nick's rule, docs/UI.md) */
@media (max-width: 640px) { .smodal { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); } .scats { flex-direction: row; flex-wrap: wrap; gap: 2px 4px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow-y: visible; } .scats .stitle, .scat kbd { display: none; } .scat { gap: 6px; padding: 5px 8px; font-size: 12.5px; } .scats .other-games { margin-top: 0; } }
/* Settings ▸ Me: text size (personal) scales the chrome; reduced motion stops UI transitions */
#bar, #crumbs, #chat, #roster, #launchers, #buildMenu, #pawnsTray, .smodal, #followPill { zoom: var(--ts, 1); }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { transition-duration: 0s !important; animation-duration: 0s !important; }

/* Settings: section chord letters and area thumbnails (2026-10-04) */
.scat kbd { margin-left: auto; font-size: 10.5px; min-width: 16px; text-align: center; opacity: .7; }
.scat .badge + kbd { margin-left: 6px; }
.sarea .sthumb { flex: 0 0 176px; display: flex; flex-direction: column; gap: 3px; }
.sarea .sthumb img, .sarea .sthumb .ph { width: 176px; height: 110px; border-radius: 7px; object-fit: cover; display: block; background: color-mix(in srgb, var(--ink) 8%, var(--raised)); }
.sarea .sthumb .ph { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--raised)), color-mix(in srgb, var(--ink) 10%, var(--raised))); }
.sarea .sthumb .ph span { font-weight: 650; font-size: 13px; color: var(--ink-2); padding: 0 10px; text-align: center; }
.sarea .sthumb small { font-size: 10.5px; color: var(--ink-3, var(--ink-2)); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 176px; }
.sarea { flex-wrap: wrap; }
@media (max-width: 560px) { .sarea .sthumb { flex-basis: 100%; } .sarea .sthumb img, .sarea .sthumb .ph { width: 100%; height: auto; aspect-ratio: 16 / 10; } }

/* ---------- the level meter (surfaces/cut.js; Harry 2026-10-06) ----------
   A slim rail down the whole left edge: a notch per storey, the level you are on marked with its number (always
   readable), "all levels" as the cap. Quiet while every level shows; the marker goes to the accent colour while the
   view is cut (people forget a cut is on and report vanished buildings). It widens under the pointer to show labels.
   The PiP window is kept off this strip (main.js PIP_EDGE). */
#levelMeter { position: absolute; z-index: var(--z-levels); left: 0; top: 0; bottom: 0; width: 20px; box-sizing: border-box; display: flex; flex-direction: column; padding: 4px 0 6px; overflow: hidden; background: color-mix(in srgb, var(--surface-solid) 62%, transparent); border-right: 1px solid var(--line); color: var(--mute); font: 600 10px/1 Inter, system-ui, sans-serif; white-space: nowrap; user-select: none; -webkit-user-select: none; touch-action: none; transition: width .12s ease-out, background .12s; }
body.drag-in-hand #levelMeter { pointer-events: none; } /* something is in the hand (edgepan.js): the left edge is the map's */
#levelMeter:hover, #levelMeter.scrub { width: 104px; background: var(--surface-solid); border-right-color: var(--line-strong); box-shadow: var(--shadow); color: var(--ink-2); }
#levelMeter .lm-roof { flex: none; height: 20px; display: flex; align-items: center; gap: 6px; padding: 0 0 0 3px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; opacity: .55; } /* the roofs position: above the highest level */
#levelMeter .lm-roof.on { color: var(--accent); opacity: 1; } #levelMeter .lm-roof.on.hid { opacity: .55; }
#levelMeter .lm-roof:hover { color: var(--accent); opacity: 1; } #levelMeter .lm-roof svg { flex: none; }
#levelMeter .lm-all { flex: none; height: 22px; display: flex; align-items: center; gap: 6px; padding: 0 0 0 3px; margin: 0 0 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; cursor: pointer; opacity: .55; }
#levelMeter .lm-all.on { color: var(--ink); opacity: 1; } /* every level is showing */
#levelMeter .lm-all:hover { color: var(--accent); opacity: 1; }
#levelMeter .lm-all svg { flex: none; } #levelMeter .lm-all kbd { font-size: 9px; min-width: 12px; padding: 0 3px; }
#levelMeter .lm-rail { flex: 1; min-height: 0; display: flex; flex-direction: column; cursor: pointer; }
#levelMeter .lm-n { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; }
#levelMeter .lm-n::before { content: ''; flex: none; align-self: stretch; width: 3px; background: var(--ink-2); opacity: .75; } /* the lit column: the levels that are SHOWING (the whole rail with all levels on) */
#levelMeter.on .lm-n::before { background: var(--accent); opacity: 1; }
#levelMeter .lm-n.hid::before { background: transparent; }
#levelMeter .lm-n i { flex: none; width: 6px; height: 1px; background: currentColor; opacity: .6; } /* the notch */
#levelMeter .lm-n.rooms i { width: 11px; height: 3px; border-radius: 0 2px 2px 0; opacity: 1; background: var(--ink-2); } /* something is built on this level */
#levelMeter .lm-n.ground i { width: 16px; } /* the ground runs the rail's whole width */
#levelMeter .lm-n.hid i, #levelMeter .lm-n.hid b { opacity: .4; } /* above the cut: not showing */
#levelMeter .lm-n b { position: absolute; left: 26px; font-weight: 600; }
#levelMeter .lm-n:hover { color: var(--ink); } #levelMeter .lm-n:hover i { background: var(--accent); opacity: 1; }
#levelMeter .lm-n em { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); min-width: 17px; height: 15px; box-sizing: border-box; padding: 0 2px; display: grid; place-items: center; border-radius: 4px; border: 1.5px solid var(--ink-2); background: var(--surface-solid); color: var(--ink); font: 700 10px/1 Inter, system-ui, sans-serif; font-style: normal; } /* the level you are on; outlined while all levels show */
#levelMeter.on .lm-n em { border-color: var(--accent); background: var(--accent); color: #1b1608; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); } /* the view is cut to it */
#levelMeter .lm-n.cur b { color: var(--ink); }
#levelMeter .lm-ping { position: absolute; left: 5px; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 2px var(--surface-solid); animation: lm-ping 0.8s ease-out 3; } /* another seat pinged a level this view is not showing */
@keyframes lm-ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.9); opacity: 0.15; } }
/* the meter owns the left edge: the launchers (and the Build tray under them) and the chat log sit beside it */
#launchers { left: calc(30px / var(--ts, 1)); }
#chat { left: calc(30px / var(--ts, 1)); width: min(340px, calc(100% - 42px)); }
@media (max-width: 640px) { #bar { left: 28px; width: calc(100% - 140px); } #bar.open { width: calc(100% - 36px); } #results { left: 28px; width: calc(100% - 36px); } #underBar { left: 28px; } }
.launcher .dot { right: auto; left: -5px; } /* the key cap has the right corner */

/* the FPS meter (surfaces/fps.js; Harry 2026-10-06): off until asked for in the command bar; lower right, above the status line */
#fpsMeter { position: absolute; z-index: var(--z-fps); right: 12px; bottom: 26px; padding: 3px 8px; border-radius: 7px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 78%, transparent); color: var(--ink-2); font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
#fpsMeter[hidden] { display: none; }

/* ---------- the drag track (surfaces/track.js; Harry 2026-10-06): the path a ring handle slides along ----------
   One look for resize, raise / lower and turn: a thin rail, short ticks, longer named marks, a dot at the current
   value, the travelled stretch solid. Drawn only while a handle is held; it fades on release. Never hit-testable. */
#ring svg.guide .rtrack, .rtrack-out, .rtrack-out * { pointer-events: none; }
#ring svg.guide .rtrack .rail, .rtrack-out .rail { stroke: var(--seat); stroke-width: 1.5; fill: none; opacity: .5; stroke-linecap: round; }
#ring svg.guide .rtrack .fill, .rtrack-out .fill { stroke: var(--seat); stroke-width: 3; fill: none; opacity: .95; stroke-linecap: round; }
#ring svg.guide .rtrack .tick, .rtrack-out .tick { stroke: var(--seat); stroke-width: 1.5; opacity: .6; }
#ring svg.guide .rtrack .tick.on, .rtrack-out .tick.on { stroke-width: 4; opacity: 1; } /* the turn handle's caught notch */
#ring svg.guide .rtrack .mark, .rtrack-out .mark { stroke: var(--seat); stroke-width: 2.5; opacity: 1; }
#ring svg.guide .rtrack .mark.land, .rtrack-out .mark.land { stroke-dasharray: 3 2; }
#ring svg.guide .rtrack .knob, .rtrack-out .knob { fill: var(--seat); stroke: var(--surface-solid); stroke-width: 1.5; }
.rtrack .mlabel { fill: var(--ink); stroke: var(--surface-solid); stroke-width: 3px; paint-order: stroke; font: 600 11px/1 Inter, system-ui, sans-serif; opacity: .9; }
#ring svg.guide .gl { opacity: .35; } /* the dashed line to the centre steps back: the track is the guide now */
.rtrack-out { position: fixed; inset: 0; z-index: var(--z-ring); --seat: #e0b04a; opacity: 1; transition: opacity .18s ease-out; }
.rtrack-out.out { opacity: 0; }
.rtrack-out svg { position: fixed; inset: 0; width: 100vw; height: 100vh; overflow: visible; }
.rtrack-out .readout { position: fixed; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 650; white-space: nowrap; }
/* ---------- action lines in the chat (surfaces/chat.js; Harry 2026-10-06) ----------
   A conditional button whose time is up flies down here (condbutton.js rule 6) and stays as a line with its button.
   Quieter than a say or a roll: smaller, muted, no name in a seat colour. Local to this seat. */
.cbtn.flying { pointer-events: none; z-index: var(--z-modal); animation: none; transition: none; }
#chat .line.act { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 11px; color: var(--mute); padding: 2px 0; }
#chat .line.act > svg { flex: none; opacity: .7; }
#chat .line.act .atext { font-style: italic; }
#chat .abtn { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); font: 650 11px/1.5 Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
#chat .abtn:hover { border-color: var(--accent); }
#chat .abtn kbd { font-size: 9px; min-width: 10px; padding: 0 3px; }
#chat .abtn.off { color: var(--mute); background: transparent; border-style: dashed; cursor: default; opacity: .7; }
#chat .abtn.off:hover { border-color: var(--line-strong); }
#chat .awhy { font-size: 10.5px; color: var(--mute); }
#chat .line.act.done { opacity: .6; } #chat .adone { color: var(--ok); font-weight: 650; }

/* ---- the pawn's ring (Harry 2026-10-06; docs/UI.md "Pawn ring") ---- */
/* every closed ring button says its name on hover, at once (the open circle's buttons carry theirs in words) */
#ring .rbtn.tips[data-tip]:hover::after, .sheetlink[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); padding: 3px 9px; border-radius: 7px; background: var(--ink); color: var(--bg); font: 650 12px/1.4 Inter, system-ui, sans-serif; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow); z-index: 3; }
#ring .rbtn.tips[data-tip]:hover::after { font-size: var(--rl-tip-size, 12px); font-weight: var(--rl-tip-weight, 650); color: var(--rl-tip-color, var(--bg)); background: #1a2220e6; text-shadow: 0 0 var(--rl-tip-halo, 0) #000; } /* (2026-10-20: the ring's label style, set per button by surfaces/ring.js) */
#ring.dragging .rbtn::after { display: none; }
.rbtn .badge { position: absolute; left: 50%; bottom: calc(3px * var(--rs, 1)); transform: translateX(-50%); font: 700 calc(11px * var(--rs, 1))/1 Inter, system-ui, sans-serif; color: var(--ink); pointer-events: none; }
.rbtn:has(.badge) .ic { transform: translateY(calc(-5px * var(--rs, 1))); }
/* damage, typed: a small field at the damage button */
#ring > .dmg-edit { transform: translate(-50%, -100%); width: 190px; padding: 8px 10px 7px; border-radius: 12px; border: 2px solid var(--seat); background: var(--surface-solid); box-shadow: var(--shadow); z-index: 4; }
.dmg-edit label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--ink-2); }
.dmg-edit input { width: 100%; margin-top: 5px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 650 17px/1.2 Inter, system-ui, sans-serif; outline: 0; }
.dmg-edit input:focus { border-color: var(--seat); }
.dmg-edit .dmg-hint { margin-top: 5px; font-size: 11px; color: var(--mute); white-space: nowrap; }
.dmg-edit.bad input { border-color: var(--danger); } .dmg-edit.bad .dmg-hint { color: var(--danger); }
/* the sheet card */
#ring > .flyout.grid.slider.sheet { width: 300px; }
/* who the pawn is (2026-10-11): its name and who moves it, two plain rows above the link */
.flyout.sheet .sh-who { display: grid; gap: 6px; margin-top: 8px; }
.flyout.sheet .sh-row { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--mute); }
.flyout.sheet .sh-name, .flyout.sheet .sh-owner { min-width: 0; width: 100%; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 600 13px/1.3 Inter, system-ui, sans-serif; outline: 0; user-select: text; }
.flyout.sheet .sh-name:focus, .flyout.sheet .sh-owner:focus { border-color: var(--seat, var(--accent)); }
.flyout.sheet .sh-ownedby { font: 600 13px/1.3 Inter, system-ui, sans-serif; color: var(--ink); padding: 3px 0; }
.flyout.sheet .sh-link { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.flyout.sheet .sheetlink { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px; border-radius: 10px; background: var(--seat, var(--accent)); color: #14161a; font: 700 16px/1.2 Inter, system-ui, sans-serif; text-decoration: none; }
.flyout.sheet .sheetlink:hover { filter: brightness(1.08); }
.flyout.sheet .sh-change, .flyout.sheet .sh-save { padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); font-size: 12px; cursor: pointer; }
/* the Attack menu's card (surfaces/attacks.js): the saved attacks, then name / to hit / damage */
.flyout.sheet.atk .atk-list { display: grid; gap: 4px; margin-top: 8px; }
.flyout.sheet.atk .atk-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 8px; background: var(--bg); font-size: 12px; color: var(--mute); }
.flyout.sheet.atk .atk-row b { color: var(--ink); font-size: 13px; }
.flyout.sheet.atk .atk-row.on { outline: 1px solid var(--seat, var(--accent)); }
.flyout.sheet.atk .atk-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.flyout.sheet.atk .atk-err:empty { display: none; }
.flyout.sheet .sh-url { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font-size: 13px; outline: 0; user-select: text; -webkit-user-select: text; }
.flyout.sheet .sh-url:focus, .flyout.sheet .sh-notes:focus { border-color: var(--seat, var(--accent)); }
.flyout.sheet .sh-none { flex: 1; padding: 9px 0; font-size: 13px; color: var(--mute); }
.flyout.sheet .sh-err { min-height: 0; font-size: 11.5px; color: var(--danger); margin-top: 3px; }
.flyout.sheet .sh-tabs { display: flex; gap: 4px; margin-top: 10px; border-bottom: 1px solid var(--line-strong); }
.flyout.sheet .sh-tabs button { padding: 5px 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-2); font: 650 12.5px/1.3 Inter, system-ui, sans-serif; cursor: pointer; margin-bottom: -1px; }
.flyout.sheet .sh-tabs button.on { color: var(--ink); border-bottom-color: var(--seat, var(--accent)); }
.flyout.sheet .sh-notes { width: 100%; margin-top: 8px; padding: 8px 9px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 13px/1.45 Inter, system-ui, sans-serif; resize: vertical; min-height: 96px; max-height: 40vh; outline: 0; user-select: text; -webkit-user-select: text; }
.flyout.sheet .sh-read { margin-top: 8px; padding: 8px 9px; min-height: 60px; max-height: 40vh; overflow: auto; border-radius: 9px; background: var(--bg); color: var(--ink); font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.flyout.sheet .sh-read.none { color: var(--mute); }
.flyout.sheet .sh-foot { margin-top: 4px; font-size: 10.5px; color: var(--mute); }
/* figures in the command bar (2026-10-06): a small picture beside each figure result */
.res .ico.pic { background: color-mix(in srgb, var(--raised) 70%, #000); overflow: hidden; }
.res .ico.pic img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
/* ---------- AREAS: open or hidden (Harry 2026-10-06; surfaces/areas.js, docs/UI.md "Areas: open or hidden") ----------
   The hidden look is the one a hidden thing has: the hidden violet (--hidden), a dashed edge, the eye-off mark. */
.ahid { display: inline-flex; vertical-align: -2px; color: var(--hidden); }
#areaState { position: relative; z-index: var(--z-launchers); display: inline-flex; align-items: center; gap: 8px; pointer-events: none; white-space: nowrap; max-width: 100%; } /* (the first row of #underBar) */
#areaState[hidden] { display: none; }
#areaState > * { pointer-events: auto; flex-shrink: 0; }
#areaState .aname { flex-shrink: 1; min-width: 48px; } #areaState .aname b { overflow: hidden; text-overflow: ellipsis; } /* (a long name shortens first, so the pills stay on screen) */
#areaState .aname { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 10px; font-size: 12.5px; background: color-mix(in srgb, var(--surface-solid) 82%, transparent); border: 1px solid var(--line); color: var(--ink-2); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
#areaState .astate { font-size: 11.5px; color: var(--mute); padding: 4px 8px; border-radius: 8px; background: color-mix(in srgb, var(--surface-solid) 70%, transparent); }
#areaState button { display: inline-flex; align-items: center; gap: 7px; font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 82%, transparent); color: var(--ink-2); padding: 4px 9px; font-size: 11.5px; }
#areaState button:hover { border-color: var(--hidden); color: var(--ink); }
#areaState.is-hidden .aname { color: color-mix(in srgb, var(--hidden) 60%, var(--ink)); border: 1.5px dashed var(--hidden); background: color-mix(in srgb, var(--hidden) 16%, var(--surface-solid)); }
#areaState.is-hidden .aname svg, #areaState.is-hidden button svg { color: var(--hidden); }
#areaState.is-hidden button { padding: 8px 15px; font-size: 14px; font-weight: 700; color: var(--ink); border: 2px dashed var(--hidden); background: color-mix(in srgb, var(--hidden) 26%, var(--surface-solid)); box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--hidden) 18%, transparent); }
#areaState.is-hidden button:hover { background: color-mix(in srgb, var(--hidden) 40%, var(--surface-solid)); }
#areaState.is-hidden button u { text-underline-offset: 3px; }
#areaState.is-hidden .astate { color: var(--hidden); font-weight: 650; border: 1.5px dashed var(--hidden); }
/* the view's frame, in a hidden area: a dashed violet edge all round (never in the way: no pointer events) */
#areaVeil { position: absolute; inset: 0; z-index: var(--z-areaveil); pointer-events: none; border: 4px dashed var(--hidden); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hidden) 40%, transparent), inset 0 0 60px color-mix(in srgb, var(--hidden) 22%, transparent); }
#areaVeil[hidden] { display: none; }
#areaNone { position: absolute; z-index: var(--z-areanone); left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); color: var(--ink-2); }
#areaNone[hidden] { display: none; }
#areaNone b { display: block; color: var(--ink); font-size: 15px; } #areaNone span { font-size: 12.5px; }
/* the picture-in-picture of a hidden area */
#pipFrame.hidden-area { outline: 3px dashed var(--hidden); outline-offset: -3px; }
#pipFrame.hidden-area .bar { background: color-mix(in srgb, var(--hidden) 30%, var(--surface-solid)); }
#pipHid { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--ink); background: color-mix(in srgb, var(--hidden) 30%, transparent); border: 1.5px dashed var(--hidden); border-radius: 7px; padding: 1px 7px; margin-right: 6px; }
#pipHid[hidden] { display: none; } #pipHid svg { color: var(--hidden); }
/* lists: Settings ▸ World navigation, the travel sub-menu, the roster */
.sarea.hidden-area { border: 1.5px dashed var(--hidden); background: color-mix(in srgb, var(--hidden) 9%, var(--raised)); }
.sarea.hidden-area .sthumb img, .sarea.hidden-area .sthumb .ph { outline: 2px dashed var(--hidden); outline-offset: -2px; opacity: .8; }
.avis { color: var(--mute); } .avis.is-hidden { color: var(--hidden); font-weight: 700; }
.flyout .variant.hidden-area { border: 1.5px dashed var(--hidden); background: color-mix(in srgb, var(--hidden) 14%, transparent); }
.flyout .variant.hidden-area .pvw, .flyout .variant.hidden-area span:last-of-type { color: var(--hidden); }
.flyout .variant.locked { opacity: .85; } .flyout .variant.locked .pvw { color: var(--danger); }
.av .where.hidden-area { color: var(--hidden); border: 1px dashed var(--hidden); } .av .where .ahid { margin-right: 2px; }
.cbtn.aopened { border: 1.5px dashed var(--hidden); } .cbtn.aopened svg { color: var(--hidden); }
#ring > .flyout.grid[data-group="travel"] { grid-template-columns: repeat(var(--cols, 2), 128px); } .flyout[data-group="travel"] .variant { width: 128px; height: auto; min-height: 84px; padding-bottom: 6px; }
.flyout[data-group="travel"] .variant > span:not(.pvw) { max-width: 124px; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; text-align: center; line-height: 1.2; }
.flyout .variant .hidtag { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--hidden); white-space: nowrap; }

/* DRAG A FIGURE OUT OF A LIST (Harry 2026-10-06; client/pawns.js app.dragOut): the command bar's figure rows, the Pawns
   menu's tree, cast and bench tiles. A row that drags takes the finger itself (so a touch drag is a drag, not a scroll);
   the list it came from steps aside while it is in the hand, and room labels and the ring never catch the drop. */
.res.drags, #pawnsTray .btile.drags { touch-action: none; }
#pawnsTray .seize { touch-action: none; cursor: grab; } /* a portrait that seizes its pawn (surfaces/pawns.js seizeOut): a finger on it drags the pawn, as a bench tile does */
#results.out, #pawnsTray.out { visibility: hidden; pointer-events: none; }
body.dragging-out, body.dragging-out * { cursor: grabbing !important; }
body.dragging-out #labels .rlabel, body.dragging-out #stairNoteX .snx, body.dragging-out #ring > * { pointer-events: none !important; } /* (nor the selected thing's ring: a pawn beside it is still a place to let go) */
#dragFig { position: fixed; z-index: var(--z-ghost); width: 56px; height: 56px; margin: -66px 0 0 -66px; /* up and left of the pointer: the pawn it is over stays in sight */ border-radius: 12px; overflow: hidden; pointer-events: none; background: var(--raised); border: 2px solid var(--seat, var(--accent)); box-shadow: var(--shadow, 0 6px 18px rgba(0, 0, 0, .35)); opacity: .92; }
#dragFig img { width: 100%; height: 100%; object-fit: cover; display: block; }
#start .mark { display: block; margin: -4px 0 8px -6px; }

/* RULERS AND TEMPLATES (surfaces/rulers.js; the 3D look is RULER_LOOK there) */
#rulers { position: absolute; inset: 0; z-index: var(--z-rulers); pointer-events: none; overflow: hidden; }
#rulers > * { position: absolute; left: 0; top: 0; }
#c.measuring { cursor: crosshair; }
.rlab { margin: -11px 0 0 0; translate: -50% 0; padding: 2px 9px; border-radius: 9px; background: rgba(12, 14, 10, .88); color: #fffdf4; border: 1.5px solid var(--c, #fff); font: 700 13px/1.35 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); pointer-events: auto; }
.rlab[hidden], .rstrip[hidden], .rhandle[hidden], .rchip[hidden] { display: none; }
.rlab.remote, .rlab.quiet { font-size: 12px; font-weight: 600; }
.rlab.move { pointer-events: none; }
.rlab.hit { border-color: #ff5533; border-width: 2px; font-size: 14px; }
.rhandle { width: 16px; height: 16px; margin: -8px 0 0 -8px; padding: 0; border-radius: 50%; border: 2.5px solid #0b0d0a; background: var(--c, #fff); box-shadow: 0 0 0 1.5px #fff, 0 2px 6px rgba(0, 0, 0, .5); cursor: grab; pointer-events: auto; touch-action: none; }
.rhandle.b { border-radius: 4px; } .rhandle.drag { cursor: grabbing; }
.rhandle::after { content: ''; position: absolute; inset: -12px; } /* a finger's worth of target */
.rchip { width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--c, #fff); background: rgba(12, 14, 10, .72); color: var(--c, #fff); opacity: .8; cursor: pointer; pointer-events: auto; }
.rchip:hover, .rchip.on { opacity: 1; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, #fff) 55%, transparent); } .rchip.hid { border-style: dashed; } .rchip.expired { animation: rpulse 1.2s ease-in-out infinite; }
@keyframes rpulse { 50% { opacity: .35; } }
.rstrip { display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.rsrow { display: flex; gap: 5px; align-items: center; }
.rstrip .cbtn { position: static; padding: 5px 9px; } .rstrip .cbtn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--surface-solid)); }
.rstrip .cbtn kbd { font-size: 9.5px; min-width: 14px; padding: 0 3px; }
.rstrip .rnum { cursor: text; } .rstrip .rnum input { width: 38px; border: 0; background: transparent; color: inherit; font: inherit; text-align: right; outline: none; -moz-appearance: textfield; } .rstrip .rnum input::-webkit-inner-spin-button { display: none; }
.rsnote { padding: 5px 9px; border-radius: 10px; background: rgba(12, 14, 10, .85); color: #fffdf4; font-size: 12.5px; font-weight: 650; pointer-events: auto; }
.trow.ttpl > .tplrow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 1px 8px; border-radius: 8px; border: 1px dashed color-mix(in srgb, var(--c, #888) 70%, transparent); color: var(--ink-2); font-size: 11.5px; }
.tplrow svg { color: var(--c, #888); flex: none; } .tplrow b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tplrow .tleft { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; } .tplrow.expired .tleft { color: var(--danger, #e5484d); font-weight: 700; }
.tplrow button { border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); border-radius: 7px; font-size: 11px; padding: 0 6px; cursor: pointer; }
.krows.mtools { display: flex; flex-wrap: wrap; gap: 5px; } .krows.mtools .bchip { width: auto; flex: 0 1 auto; }

/* Faction emblems: two data-grouped rows, shared by ☰ and the first drag-out offer. */
#ring > .flyout.grid.faction-panel { display: block; width: max-content; }
.faction-grid { display: flex; flex-direction: column; gap: 7px; max-width: min(540px, calc(100vw - 48px)); padding: 3px; }
.faction-panel .faction-grid { margin-top: 9px; }
.faction-row { display: flex; flex-wrap: wrap; gap: 6px; min-height: 42px; }
.faction-choice { flex: 0 0 42px; width: 42px; height: 42px; padding: 3px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface-solid); color: var(--ink); cursor: pointer; }
.faction-choice img { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; pointer-events: none; }
.faction-choice:hover, .faction-choice:focus-visible { border-color: var(--accent); }
.faction-choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.faction-choice.inherited { border: 2px dashed var(--accent); }
.faction-choice:disabled { opacity: .3; cursor: default; }
.faction-inherit { align-self: flex-start; padding: 5px 9px; border: 1px dashed var(--line-strong); border-radius: 7px; background: var(--surface-solid); color: var(--ink); cursor: pointer; }
.faction-inherit[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.cbtn.faction-offer { top: calc(var(--under-bar, 52px) + 48px); padding: 7px; cursor: default; max-width: calc(100vw - 32px); }

/* Faction shelves use the same theme tokens as the rest of the library. */
#factionShelf button { background: var(--raised); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; }
#factionShelf button:hover { border-color: var(--accent); }
#factionShelf [data-preview]:not(.live) { background: radial-gradient(circle, var(--line-strong), transparent 65%); }
/* Player portraits fill their actual box, including the smaller no-pawn row and every text/ring size. */
.player-portrait { display: block; position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; border-radius: inherit; background: color-mix(in srgb, var(--c, #888) 30%, #16181c); color: #fff; }
.player-initial { display: grid; width: 100%; height: 100%; place-items: center; font-size: 22px; line-height: 1; font-weight: 800; }
.player-portrait img { position: absolute; width: 200%; height: 200%; max-width: none; left: -50%; top: -6.25%; object-fit: cover; background: #000; }

/* Browser-local seats; quiet escape from automatic resume, available to players and GMs. */
#start { overflow-y: auto; }
#start .card { margin: auto; }
#start .games-title { font-size: 15px; margin: 16px 0 8px; }
#rememberedGames { list-style: none; padding: 0; margin: 0 0 10px; max-height: 32vh; overflow-y: auto; }
#rememberedGames button { display: grid; gap: 4px; width: 100%; text-align: left; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 6px; overflow-wrap: anywhere; }
#rememberedGames small { color: var(--ink-2); }
.games-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.games-actions button, #rerollCampaign { background: var(--raised); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px; }
#forgetGames { font-size: 11px; color: var(--ink-2); }
.campaign-name { display: flex; gap: 6px; }
.campaign-name input[name] { flex: 1; min-width: 0; }
#start #rerollCampaign { font-size: 24px; line-height: 1; width: 38px; padding: 4px; cursor: pointer; }
#otherGames { position: absolute; z-index: var(--z-launchers); left: 30px; top: calc(12px + 70px * var(--ts, 1)); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font-size: 11px; color: var(--ink-2); }
.scats .other-games { margin-top: auto; font-size: 12px; }
/* About · Terms · Privacy · Source (2026-10-21): under Other games in Settings, and on the start card */
.smeta { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 8px 10px 0; font-size: 11.5px; }
.smeta a, #start .metalinks a { color: var(--mute); text-decoration: none; } .smeta a:hover, #start .metalinks a:hover { color: var(--ink); text-decoration: underline; }
#start .accept { margin: 0; font-size: 12px; color: var(--mute); } #start .accept a { color: var(--ink-2); }
#start .metalinks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; }
@media (max-width: 640px) { .smeta { align-items: center; padding: 0 6px; } }

/* A GM preview is always explicit, with a direct way back. */
#visionBadge { position:fixed; top:62px; left:50%; transform:translateX(-50%); z-index: var(--z-badge); padding:8px 16px; border:1px solid #e0b04a; border-radius:18px; background:#30281b; color:#ffe1a0; font:600 14px system-ui; cursor:pointer; }
#visionBadge[hidden] { display:none; }

/* "Email yourself your link" (surfaces/linkmail.js; docs/UI.md "Email yourself your link"). LOUD: a card above the chat,
   the corner it settles into; it never covers the middle of the table and takes nothing by itself. */
.lmcard { position: fixed; z-index: var(--z-chips); left: 12px; bottom: 180px; width: min(400px, calc(100vw - 24px)); box-sizing: border-box; padding: 14px 16px 12px; border-radius: 14px; background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 13px; zoom: var(--ts, 1); }
.lmcard.loud { border: 2px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow); animation: lm-in .45s cubic-bezier(.2,.9,.25,1.15); }
@keyframes lm-in { from { transform: translateY(18px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.lmcard .lm-x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--mute); cursor: pointer; }
.lmcard .lm-x:hover { background: var(--raised); color: var(--ink); }
.lmcard .lm-h { display: flex; align-items: center; gap: 8px; margin: 0 30px 4px 0; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.lmcard .lm-h svg { color: var(--accent); flex: none; } .lmcard .lm-h.ok svg { color: var(--ok); }
.lmcard .lm-sub { color: var(--ink-2); line-height: 1.45; margin: 0 0 10px; }
.lmcard .lm-row { display: flex; gap: 8px; margin: 0; }
.lmcard .lm-email { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); font: 14px Inter, system-ui, sans-serif; }
.lmcard .lm-email:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.lmcard .lm-send { flex: none; padding: 8px 12px; border-radius: 9px; border: 0; background: var(--accent); color: #17140c; font: 700 13.5px Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.lmcard .lm-send:hover { filter: brightness(1.08); } .lmcard .lm-send:disabled { opacity: .6; cursor: default; }
.lmcard .lm-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 9px; font-size: 12px; color: var(--ink-2); }
.lmcard .lm-news { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; } .lmcard .lm-news input { margin: 0; accent-color: var(--accent); }
.lmcard .lm-privacy { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; } .lmcard .lm-privacy:hover { color: var(--accent); }
.lmcard .lm-msg { margin-top: 6px; min-height: 0; font-size: 12px; color: var(--mute); } .lmcard .lm-msg:empty { display: none; } .lmcard .lm-msg.bad { color: var(--danger); }
.lmcard.done .lm-sub { margin: 0; }
@media (prefers-reduced-motion: reduce) { .lmcard.loud { animation: none; } }

/* ---------- ON A PHONE (2026-10-24; docs/UI.md "On a phone"): html.tw-hand, set by index.html for a small screen with
   a touch pointer only (?hand=1 / ?hand=0 force it). Only where things sit and how big a finger's target is: the house
   look (colours, type, the ring's shape) is untouched, and a computer never gets any of this. Portrait stacks the top:
   the command bar across, the launchers under it; landscape moves the chat to the right so the trays have the left. */
.tw-hand kbd, .tw-hand #bar .hint { display: none !important; }    /* (no keyboard: the key caps are noise) */
html.tw-hand, html.tw-hand body { touch-action: pan-x pan-y; } /* (a pinch that starts on the HUD never zooms the page itself; lists still scroll) */
.tw-hand .rlabel { touch-action: none; }  /* (a finger on a room label is a finger on the map: input.js labelPress) */
.tw-hand #bar { min-height: 44px; }
.tw-hand #bar textarea, .tw-hand .lmcard .lm-email { font-size: 16px; } /* (16 px: iOS does not zoom into a field) */
.tw-hand #otherGames { min-height: 40px; padding: 0 12px; font-size: 12px; }
.tw-hand #areaState button { min-height: 40px; padding: 0 12px; }
.tw-hand .tpin { width: 40px; height: 40px; }
.tw-hand .lmcard .lm-x { width: 40px; height: 40px; top: 4px; right: 4px; }
.tw-hand .lmcard .lm-email, .tw-hand .lmcard .lm-send { min-height: 44px; }
.tw-hand .lmcard .lm-news { min-height: 36px; }
.tw-hand .lmcard .lm-privacy { display: inline-flex; align-items: center; min-height: 36px; }
.tw-hand #chat .abtn { min-height: 32px; }
.tw-hand #buildMenu footer, .tw-hand #pawnsTray footer { display: none; } /* (key hints and mouse words) */
.tw-hand .smodal .sx { width: 40px; height: 40px; } .tw-hand .scat { min-height: 40px; } .tw-hand .smodal .sbtn { min-height: 36px; }
.tw-hand #handTool .ht-what { white-space: normal; line-height: 1.3; }
.tw-hand #levelMeter:not(:hover):not(.scrub) { width: 26px; } .tw-hand #levelMeter .lm-roof, .tw-hand #levelMeter .lm-all { height: 30px; padding-left: 6px; } /* (a wider strip for a thumb; it still opens out to 104 px) */
.tw-hand #pipFrame .bar button { min-width: 36px; min-height: 32px; }
.tw-hand #crumbs .crumb { min-height: 36px; }
.tw-hand #bar textarea { height: 42px; line-height: 24px; }
/* "WE ARE PAYING BLOOD PRICE FOR EVERYTHING ON THE SCREEN" (Harry 2026-10-24; docs/UI.md "On a phone"): what stays up all
   the time on a computer is tucked away on a phone; each is still reachable (named here) */
.tw-hand #otherGames { display: none; }                 /* Settings ▸ Other games / New game */
.tw-hand #underBar { display: contents; } .tw-hand #areaState, .tw-hand #crumbs { position: absolute; } /* (a phone places them itself, below, when they show) */
.tw-hand #areaState { display: none !important; }       /* the area's name and Hide / Open to players: Settings ▸ Area, the bar */
.tw-hand #crumbs { display: none !important; }          /* the popup naming the selection (Harry's item 5); the bar's Select parent */
.tw-hand .rlabel .hid { display: none !important; }     /* a hidden room's eye-off mark (its label keeps the hidden colour) */
.tw-hand .av .where { display: none; }                  /* the avatars' area tags: the avatar's own tip, Pawns ▸ Party */
.tw-hand #hud.ok { display: none; }                     /* the connection line: only when something is wrong (not live, unconfirmed) */
.tw-hand #levelMeter.flat { display: none; }            /* one storey, all showing: no levels to pick (it comes back with a second storey) */
@media (orientation: portrait) {
  .tw-hand #bar, .tw-hand #bar.open { top: 8px; left: 30px; right: 54px; width: auto; transform: none; }
  .tw-hand #roster { top: 12px; right: 8px; }
  .tw-hand #launchers { top: 60px; }
  .tw-hand #otherGames { top: 132px; }
  .tw-hand #areaState { left: auto; right: 8px; top: 72px; transform: none; max-width: calc(100% - 240px); }
  .tw-hand #areaState .astate { display: none; }
  .tw-hand #areaState .aname { max-width: 96px; }
  .tw-hand #results { top: calc((58px + var(--bar-grow, 0px)) * var(--ts, 1)); left: 30px; width: calc(100% - 38px); transform: none; }
  .tw-hand #crumbs { top: auto; bottom: 120px; left: 30px; transform: none; max-width: calc(100% - 38px); }
  .tw-hand #buildMenu, .tw-hand #pawnsTray { max-height: 62vh !important; }   /* (the map stays below an open tray) */
  .tw-hand #handTool { left: 50%; bottom: 84px; transform: translateX(-50%); }
}
@media (orientation: landscape) {
  .tw-hand #chat { left: auto; right: 12px; bottom: 26px; width: min(300px, 36vw); }
  .tw-hand .lmcard { left: auto; right: 12px; bottom: 64px; width: min(380px, 48vw); }
  .tw-hand #handTool { left: 30px; bottom: 14px; }
  .tw-hand #areaState { left: auto; right: 58px; top: 14px; transform: none; max-width: none; } .tw-hand #areaState .astate { display: none; } /* (between the bar and the avatars: off the middle, where a ring opens) */
  .tw-hand #areaState .aname { max-width: 96px; }
  .tw-hand .smodal { grid-template-columns: 172px minmax(0, 1fr); } .tw-hand .scats { padding: 8px 6px; } .tw-hand .scats .stitle, .tw-hand .scat kbd { display: none; } /* (a short screen keeps its height for the pane: the sections are a rail that scrolls down) */
}
/* the live tool, and its way out (client/handheld.js): a phone has no Escape and no hover */
#handTool { position: absolute; z-index: var(--z-follow); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 40px); padding: 4px 4px 4px 12px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--accent); box-shadow: var(--shadow); color: var(--ink); font-size: 13px; }
#handTool[hidden] { display: none; }
#handTool .ht-what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#handTool button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); font: 650 13px Inter, system-ui, sans-serif; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- the phone banner (2026-10-24; client/phone.js, docs/UI.md "The phone banner"): the front door on a phone,
   once per visit, over the bottom of the screen; open, it is the "email yourself your link" card's own form ---------- */
#phoneBanner { position: fixed; z-index: var(--z-modal); left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100% - 24px)); transition: opacity .35s, transform .35s; font-size: 14px; }
#phoneBanner.away { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }
#phoneBanner .pb-shut { display: flex; align-items: center; gap: 4px; padding: 2px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
#phoneBanner .pb-shut[hidden] { display: none; }
#phoneBanner .pb-open { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border: 0; background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
#phoneBanner .pb-open svg { flex: none; color: var(--accent); }
#phoneBanner .pb-open b { color: var(--ink); font-weight: 650; }
#phoneBanner .pb-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--mute); cursor: pointer; }
#phoneBanner .lmcard.pb-card { position: static; width: 100%; zoom: 1; border: 2px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow); }
#phoneBanner .lmcard[hidden] { display: none; }
#phoneBanner .lmcard .lm-email { font-size: 16px; min-height: 44px; }
#phoneBanner .lmcard .lm-email::placeholder { color: var(--mute); opacity: 1; } /* (the browser's grey was 3.9:1 on the light field; --mute is 5.8:1) */
#phoneBanner .lmcard .lm-send { min-height: 44px; font-size: 14.5px; }
#phoneBanner .lmcard .lm-news { min-height: 32px; }
#phoneBanner .lmcard .lm-x { width: 40px; height: 40px; top: 4px; right: 4px; }

/* SHARE A BUILD (2026-10-29; client/share.js): the Export / Share link window, in the Settings window's own parts */
#shareModal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; background: rgba(8, 9, 7, .55); backdrop-filter: blur(2px); }
#shareModal[hidden] { display: none; }
.shmodal { width: min(760px, calc((100vw - 32px) / var(--ts, 1))); max-height: calc((100vh - 32px) / var(--ts, 1)); overflow: auto; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow), 0 24px 60px rgba(0,0,0,.45); zoom: var(--ts, 1); }
.shhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.shhead .sx { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); font-size: 18px; cursor: pointer; }
.shbody { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px; padding: 18px; }
.shpic { aspect-ratio: 1.6; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); display: grid; place-items: center; overflow: hidden; color: var(--mute); font-size: 13px; }
.shpic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shside { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.shlab { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.shlab input { box-sizing: border-box; width: 100%; min-width: 0; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; }
.shwhat { margin: 2px 0 0; font-size: 13px; color: var(--ink); } .shwhat small { color: var(--mute); }
.shstrip.dim { opacity: .55; }
.shlink { display: flex; gap: 6px; align-items: center; } .shlink code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; padding: 6px 8px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); user-select: all; }
#shareModal .snote { margin: 0; }
.shreportbox { width: min(620px, calc(100vw - 32px)); }
.shreport { display: flex; flex-direction: column; gap: 8px; padding: 18px; min-width: 0; }
.shlefth { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.shleft { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; max-height: 38vh; overflow: auto; font-size: 13px; }
.shleft li { padding: 6px 8px; border-radius: 6px; background: var(--raised); overflow-wrap: anywhere; }
.shleft small { display: block; color: var(--mute); }
@media (max-width: 640px) { .shbody { grid-template-columns: 1fr; } }

/* ---------- FIRST PERSON (2026-10-29; surfaces/fpv.js, docs/UI.md "First person"). html.tw-fpv while a seat looks through a
   pawn's eyes: the HUD is cut to what you use there (the Exit, the command bar for rolls and words, the chat and roll log,
   the toasts, the turn order); the map's own overlays (labels, the ring, the level meter, the crumbs, the launchers, the
   area pills) go until you leave. */
html.tw-fpv #labels, html.tw-fpv #stairNoteX, html.tw-fpv #ring, html.tw-fpv #levelMeter, html.tw-fpv #launchers, html.tw-fpv #crumbs, html.tw-fpv #undoChips,
html.tw-fpv #introHint, html.tw-fpv #modeLabel, html.tw-fpv #areaState, html.tw-fpv #pipHid, html.tw-fpv #buildMenu, html.tw-fpv #pawnsTray,
html.tw-fpv #rulers, html.tw-fpv #toolCursor, html.tw-fpv #marquee, html.tw-fpv #fpvTags .fpv-tag[data-mine] { display: none !important; }
html.tw-fpv #c { cursor: grab; } html.tw-fpv #c:active { cursor: grabbing; }
#fpvHud { position: absolute; inset: 0; pointer-events: none; z-index: var(--z-launchers); font: 13px Inter, system-ui, sans-serif; }
#fpvHud .fpv-top { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; pointer-events: auto; }
#fpvHud .fpv-top button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--ink); font: 600 13px Inter, system-ui, sans-serif; box-shadow: var(--shadow); cursor: pointer; }
#fpvHud .fpv-top button:hover { border-color: var(--accent); }
#fpvHud .fpv-exit kbd { margin-left: 2px; }
#fpvHud .fpv-who { padding: 6px 10px; border-radius: 9px; background: color-mix(in srgb, var(--surface-solid) 82%, transparent); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
#fpvHud .fpv-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 5px 12px; border-radius: 9px; background: color-mix(in srgb, var(--surface-solid) 75%, transparent); color: var(--mute); white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
#fpvHud .fpv-dot { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(0,0,0,.45); }
#fpvHud .fpv-pad { display: none; position: absolute; right: 16px; bottom: 112px; width: 150px; height: 150px; pointer-events: auto; } /* (clear of the chat bar: Gemini r4, the down arrow "almost touches the bottom chat bar") */
#fpvHud .fpv-hint-hand { display: none; position: absolute; left: 50%; top: 104px; transform: translateX(-50%); padding: 4px 10px; border-radius: 9px; background: color-mix(in srgb, var(--surface-solid) 75%, transparent); color: var(--mute); font-size: 12px; white-space: nowrap; }
.tw-hand #fpvHud .fpv-hint-hand { display: block; }
#fpvHud .fpv-pad button { position: absolute; width: 50px; height: 50px; border-radius: 12px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface-solid) 85%, transparent); color: var(--ink); display: grid; place-items: center; touch-action: manipulation; }
#fpvHud .fpv-pad [data-m=w] { left: 50px; top: 0; } #fpvHud .fpv-pad [data-m=s] { left: 50px; top: 100px; }
#fpvHud .fpv-pad [data-m=a] { left: 0; top: 50px; } #fpvHud .fpv-pad [data-m=d] { left: 100px; top: 50px; }
.tw-hand #fpvHud .fpv-pad { display: block; }
.tw-hand #fpvHud .fpv-hint, .tw-hand #fpvHud .fpv-lock { display: none; }
.tw-hand #fpvHud .fpv-top { top: 64px; }
.tw-hand.tw-fpv #roster { display: none; } /* (on a phone the avatars sat under the command bar in first person: Gemini r7) */
/* the tag other seats see over a pawn someone is looking through: small, in that person's colour, under the HUD */
#fpvTags { position: absolute; inset: 0; pointer-events: none; z-index: var(--z-labels); }
#fpvTags .fpv-tag { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px; border-radius: 999px; font: 600 11px Inter, system-ui, sans-serif; color: #fff; background: color-mix(in srgb, var(--seat, #e0b04a) 78%, #000); border: 1px solid color-mix(in srgb, var(--seat, #e0b04a) 60%, #fff); box-shadow: 0 1px 4px rgba(0,0,0,.35); white-space: nowrap; opacity: .92; }

/* THE NOW-PLAYING NOTE (2026-10-30, client/music.js): bottom right, above the frame counter; it fades by itself; ♪ mutes */
#musicNote { position: absolute; z-index: var(--z-hud); right: 12px; bottom: 26px; display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 14px; background: color-mix(in srgb, var(--surface-solid) 78%, transparent); border: 1px solid var(--line); color: var(--ink-2); font: 600 12px/1.2 Inter, system-ui, sans-serif; opacity: 0; transition: opacity .5s; pointer-events: none; zoom: var(--ts, 1); max-width: min(60vw, 320px); }
#musicNote.show { opacity: .92; pointer-events: auto; }
#musicNote .mn-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: italic; }
#musicNote .mn-mute { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-solid); color: var(--accent); font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
#musicNote .mn-mute:hover { border-color: var(--accent); }
html.reduce-motion #musicNote { transition: none; }
