/* SIGIL's own identity, restored on the graphical client. The tokens are the archived web app's, verbatim
   (origin/archive/sigil src/index.css): abyss and navy panels, muted gold, parchment ink, Georgia for headings and
   narration. Layout is mobile first: a compact HUD, the map as the largest thing on screen, a row of contextual
   controls, the Game Master's panel, a composer and a bottom navigation. Phone landscape and desktop put the map
   beside one side column. */

:root {
  --color-abyss: #061020;
  --color-navy: #0A1628;
  --color-deep: #0d1f38;
  --color-slate: #1a3a5c;
  --color-gold: #C9A84C;
  --color-gold-light: #d4bc7a;
  --color-parchment: #e8d9a8;
  --color-steel: #4a6fa5;
  --color-success: #1D9E75;
  --color-danger: #993C1D;
  --color-warning: #BA7517;

  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --transition: 0.15s ease;

  /* Derived for this client only: readable secondary text, hairlines, the danger tone on navy. */
  --ink-dim: #8fa3c0;
  --line: rgba(201, 168, 76, 0.22);
  --line-soft: rgba(74, 111, 165, 0.35);
  --danger-ink: #e08a6c;
  --tap: 44px;
  --dock: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--color-abyss); color: var(--color-parchment); font: 16px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; background: radial-gradient(120% 80% at 50% 0%, #0d1f38 0%, var(--color-abyss) 60%) fixed; }
h1, h2, h3 { font-family: var(--font-serif); color: var(--color-gold); font-weight: 600; letter-spacing: 0.02em; }
h1 { font-size: 1.35rem; margin: 10px 0 14px; }
h2 { font-size: 1.05rem; margin: 4px 0 10px; }
p { margin: 8px 0; }
.dim { color: var(--ink-dim); }
.bad { color: var(--danger-ink); }
[hidden] { display: none !important; }

/* ── Header: the wordmark, where you are, your purse; the navigation sits here on wide screens ─────────────── */
#bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-height: 44px; background: var(--color-abyss); border-bottom: 1px solid var(--color-slate); position: sticky; top: 0; z-index: 20; }
.brand { font-family: var(--font-serif); color: var(--color-gold); letter-spacing: 0.18em; font-weight: 600; font-size: 15px; flex: none; }
#where { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-parchment); font-size: 14px; }
#where::before { content: '◆'; color: var(--color-gold); font-size: 10px; margin-right: 7px; vertical-align: 1px; }
#where:empty::before { content: none; }
#who { flex: none; white-space: nowrap; color: var(--color-gold-light); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ── Navigation: a bottom bar on a phone held upright, inline in the header otherwise ─────────────────────── */
#nav { display: flex; background: var(--color-abyss); border-top: 1px solid var(--color-slate); }
#nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; margin: 0; padding: 6px 0; border: 0; border-radius: 0; background: none; color: var(--color-steel); font: 600 11px/1 var(--font-sans); letter-spacing: 0.05em; text-transform: uppercase; box-shadow: none; }
#nav button .ico { font-size: 17px; line-height: 1; }
#nav button.on { color: var(--color-gold); }

/* ── Buttons and fields ───────────────────────────────────────────────────────────────────────────────────── */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 9px 14px; margin: 4px 6px 4px 0; border-radius: var(--radius-md); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(26, 58, 92, 0.55), rgba(13, 31, 56, 0.9)); color: var(--color-parchment); font: 500 15px/1.25 var(--font-sans); cursor: pointer; text-decoration: none; transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition); }
button:hover:not(:disabled), .button:hover { border-color: var(--color-gold); }
button:focus-visible, .button:focus-visible, input:focus-visible { outline: 2px solid var(--color-gold-light); outline-offset: 2px; }
button.primary, .button.primary { background: linear-gradient(180deg, var(--color-gold-light), var(--color-gold)); color: var(--color-abyss); border-color: var(--color-gold); font-weight: 600; box-shadow: 0 4px 14px rgba(201, 168, 76, 0.22); }
button.primary:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(201, 168, 76, 0.32); }
button.ghost { background: transparent; border-color: var(--line-soft); color: var(--color-gold-light); }
button:disabled { opacity: 0.45; cursor: default; }
input, select, textarea { width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-slate); background: var(--color-deep); color: var(--color-parchment); font: 15px var(--font-sans); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-gold); }
input::placeholder { color: #6f86a8; font-style: italic; }
label { display: block; margin: 14px 0 6px; color: var(--color-steel); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Cards (sign in, the Builder, the wagon, panels) ──────────────────────────────────────────────────────── */
main { max-width: 720px; margin: 0 auto; padding: 12px 16px 32px; }
.card { background: linear-gradient(180deg, rgba(13, 31, 56, 0.96), rgba(10, 22, 40, 0.96)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; margin: 10px 0; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); }
.signin { display: grid; gap: 6px; }
.signin > button, .signin .acts > button { width: 100%; margin: 0; }
.signin form { display: grid; gap: 2px; margin: 6px 0; }
.signin form label { margin-top: 8px; }
.signin .acts { display: grid; gap: 6px; margin-top: 12px; }
.signin #signin-note:empty { display: none; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--ink-dim); text-transform: none; letter-spacing: 0; font-weight: 400; cursor: pointer; }
.consent input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; padding: 0; flex: 0 0 auto; accent-color: var(--color-gold); }
.consent b { color: var(--color-parchment); }
.consent a { color: var(--color-gold); }
/* The Terms and Privacy Policy pages (client/terms.html, client/privacy.html). */
#bar a.brand { text-decoration: none; }
.legal section { margin: 18px 0; }
.legal h2 { font-size: 1.05rem; margin: 0 0 6px; }
.legal p, .legal li { color: var(--ink-dim); font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--color-gold); }
.options { display: grid; gap: 8px; }
.option { justify-content: flex-start; flex-direction: column; align-items: flex-start; text-align: left; width: 100%; margin: 0; }
.option.chosen { border-color: var(--color-gold); box-shadow: inset 0 0 0 1px var(--color-gold); background: linear-gradient(180deg, rgba(201, 168, 76, 0.16), rgba(13, 31, 56, 0.9)); }
.option small { display: block; color: var(--ink-dim); margin-top: 2px; font-size: 13px; }
.label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-gold); }

/* ── The play screen ──────────────────────────────────────────────────────────────────────────────────────── */
main.playing { max-width: none; padding: 0; }
.play { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'hud' 'stage' 'side'; gap: 8px; padding: 8px 10px calc(var(--dock) + 12px); max-width: 760px; margin: 0 auto; }
.hud { grid-area: hud; }
.stage { grid-area: stage; position: relative; min-width: 0; }
.side { grid-area: side; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.side > :empty { display: none; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: linear-gradient(180deg, rgba(6, 16, 32, 0.6), var(--color-abyss) 30%); padding-bottom: env(safe-area-inset-bottom); }
.dock .composer { max-width: 760px; margin: 0 auto; padding: 8px 10px 6px; }

/* The HUD: one compact card per character the viewer may see, in the scene. */
/* Up to four share the row evenly (one alone takes half of it); a fifth and more scroll sideways inside the HUD. */
.hud { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(84px, 1fr); gap: 6px; overflow-x: auto; scrollbar-width: none; }
.hud[data-n='1'] { grid-auto-columns: minmax(0, 52%); }
.hud::-webkit-scrollbar { display: none; }
.pc { display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 6px; row-gap: 3px; align-items: center; padding: 6px 7px; border-radius: var(--radius-md); background: rgba(13, 31, 56, 0.92); border: 1px solid var(--line-soft); min-width: 0; }
.pc.mine { border-color: var(--color-gold); background: linear-gradient(180deg, rgba(201, 168, 76, 0.12), rgba(13, 31, 56, 0.95)); }
.pc .tile { grid-row: 1 / span 3; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--color-gold); border-radius: var(--radius-sm); font: 600 14px/1 var(--font-serif); color: var(--color-gold-light); background: var(--color-abyss); align-self: start; }
.pc .nm { font: 600 11px/1.15 var(--font-sans); color: var(--color-gold); letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc .nm small { color: var(--ink-dim); font-weight: 500; letter-spacing: 0; }
.bars { display: grid; gap: 2px; }
.bar { height: 4px; border-radius: 2px; background: var(--color-slate); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 2px; transition: width 0.3s ease; }
.bar.hp i { background: var(--color-success); }
.bar.hp.low i { background: var(--color-danger); }
.bar.fp i { background: var(--color-gold); }
.pc .num { font-size: 10px; line-height: 1; color: var(--ink-dim); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc .num b { color: var(--color-parchment); font-weight: 600; }
.pc.down { border-color: var(--color-danger); }
.pc .tag { color: var(--danger-ink); font-weight: 600; }

/* The viewport: the map is the largest thing on the screen. */
.viewport { position: relative; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); background: var(--color-abyss); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(6, 16, 32, 0.8); }
#map { display: block; width: 100%; touch-action: manipulation; background: var(--color-abyss); }
.viewport.nomap { min-height: 120px; display: grid; place-items: center; padding: 18px; text-align: center; color: var(--ink-dim); font: italic 15px/1.5 var(--font-serif); }
/* The overview control: the whole map for a moment, then back to following the walker. */
.camtoggle { position: absolute; right: 8px; top: 8px; margin: 0; min-height: var(--tap); padding: 6px 12px; font-size: 13px; letter-spacing: 0.04em; color: var(--color-gold-light); background: rgba(6, 16, 32, 0.82); border-color: var(--line); z-index: 2; }
.camtoggle[aria-pressed='true'] { border-color: var(--color-gold); color: var(--color-gold); }
.recenter { color: var(--color-gold); }
.hint { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 999px; background: rgba(6, 16, 32, 0.78); border: 1px solid var(--line-soft); color: var(--ink-dim); font-size: 12px; pointer-events: none; }
.hint:empty { display: none; }
/* Top-left of the map, clear of the overview control at the top-right. */
.status { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 150px); width: max-content; padding: 6px 12px; border-radius: var(--radius-md); background: rgba(6, 16, 32, 0.9); border: 1px solid var(--line); color: var(--color-parchment); font-size: 13px; text-align: center; pointer-events: none; z-index: 3; }
.status:empty { display: none; }
.status.bad { border-color: var(--color-danger); color: var(--danger-ink); }
.arrive { position: absolute; left: 0; right: 0; top: 42%; text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.4s; font: 600 20px/1.2 var(--font-serif); color: var(--color-gold-light); letter-spacing: 0.04em; text-shadow: 0 2px 10px #000, 0 0 2px #000; z-index: 2; }
.arrive.on { opacity: 1; }

/* The contextual controls under the map, and the NEARBY menu that opens over the map rather than pushing it. */
.ctl { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.ctl button { margin: 0; }
.ctl .grow { flex: 1 1 auto; }
.ctl .note { flex: 1 1 100%; color: var(--ink-dim); font-size: 13px; margin: 0; }
button.nearby { letter-spacing: 0.1em; font-weight: 600; font-size: 13px; color: var(--color-gold); }
button.nearby[aria-expanded='true'] { border-color: var(--color-gold); background: rgba(201, 168, 76, 0.12); }
.drop { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 12; max-height: min(64vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding: 10px; border-radius: var(--radius-lg); border: 1px solid var(--color-gold); background: rgba(10, 22, 40, 0.98); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6); }
.ctl.down .drop { bottom: auto; top: calc(100% + 6px); max-height: max(220px, calc(100vh - var(--dock) - 310px)); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }
.drop .label { display: flex; justify-content: space-between; align-items: baseline; margin: 2px 4px 8px; }
.drop .label small { color: var(--ink-dim); letter-spacing: 0.04em; text-transform: none; font-weight: 500; }
.dest { display: flex; width: 100%; margin: 0 0 6px; justify-content: space-between; text-align: left; }
.dest .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest .why { flex: none; font-size: 11px; color: var(--color-steel); letter-spacing: 0.04em; text-transform: uppercase; }
.dest .min { flex: none; color: var(--color-gold-light); font-variant-numeric: tabular-nums; font-size: 13px; min-width: 48px; text-align: right; }
.all { margin-top: 4px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.all > button.toggle { width: 100%; justify-content: space-between; margin: 0 0 8px; background: transparent; color: var(--color-gold-light); border-color: var(--line-soft); font-size: 13px; letter-spacing: 0.06em; }
.all input { margin-bottom: 8px; }
.all .count { font-size: 12px; color: var(--ink-dim); margin: 0 4px 6px; }

/* A fight's roster: party then enemies, each with its bar, and what each enemy is readying. */
.fightcard { padding: 10px 12px; margin: 8px 0 0; }
.fightcard h2 { margin: 0 0 6px; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; font-family: var(--font-sans); }
.fighter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.fighter:first-of-type { border-top: 0; }
.fighter b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fighter.enemy b { color: var(--danger-ink); }
.fighter.mine b { color: var(--color-gold); }
.fighter .hpn { color: var(--ink-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.fighter .bar { grid-column: 1 / -1; }
.fighter .bar.foe i { background: #c0573a; }
.fighter .threat { grid-column: 1 / -1; color: #e0785a; font-size: 13px; }
button.fighter { width: 100%; min-height: var(--tap); margin: 0; padding: 6px 0; border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; background: none; box-shadow: none; text-align: left; align-items: center; color: inherit; font: inherit; font-size: 14px; }
button.fighter:hover:not(:disabled) { background: rgba(153, 60, 29, 0.12); }

/* The Game Master's panel: narration in serif, the record as the players' own lines, the narrator's picks as
   numbered choices; collapsible, with the earlier turns this page has seen. */
.gm { position: relative; border-radius: var(--radius-lg); border: 1px solid var(--line); border-left: 3px solid var(--color-gold); background: linear-gradient(180deg, rgba(13, 31, 56, 0.97), rgba(10, 22, 40, 0.97)); padding: 12px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); }
.gm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gm-head .label { flex: 1; }
.gm-head .turn { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.06em; }
.dice { display: inline-flex; gap: 3px; }
.dice span { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 4px; border: 1px solid var(--color-gold); border-radius: 4px; font: 600 11px/1 var(--font-sans); color: var(--color-gold-light); background: var(--color-abyss); }
.gm-head button.fold { min-height: var(--tap); min-width: var(--tap); padding: 4px 8px; margin: -10px -8px -10px 0; font-size: 16px; color: var(--color-gold); background: transparent; border-color: transparent; }
.narration { white-space: pre-wrap; font: 16px/1.6 var(--font-serif); color: var(--color-parchment); }
.gm.folded .narration { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gm.folded .more { display: none; }
.private { white-space: pre-wrap; color: var(--color-gold-light); margin-top: 8px; font: italic 15px/1.5 var(--font-serif); }
.server { color: var(--ink-dim); margin-top: 6px; font-size: 13px; }
.said { margin: 0 0 10px; display: grid; gap: 6px; }
.act { padding: 7px 10px; border-radius: var(--radius-md); background: rgba(26, 58, 92, 0.35); border: 1px solid var(--line-soft); font-size: 14px; }
.act.mine { margin-left: 18%; border-color: var(--line); background: rgba(26, 58, 92, 0.55); }
.act .who { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-gold); }
.act .who .ok { color: var(--color-success); letter-spacing: 0; text-transform: none; }
.act .who .no { color: var(--danger-ink); letter-spacing: 0; text-transform: none; }
.act .what { color: var(--color-parchment); }
.roll { color: var(--ink-dim); font-size: 12px; }
.choices { display: grid; gap: 6px; margin-top: 10px; }
.choice { justify-content: flex-start; width: 100%; margin: 0; text-align: left; border-color: var(--line); }
.choice .rn { flex: none; display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 3px; border: 1px solid var(--color-gold); border-radius: 4px; font: 600 10px/1 var(--font-serif); color: var(--color-gold); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chips span { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(26, 58, 92, 0.45); border: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-dim); }
.chip.refused, .chip.refused-cast, .chip.not-done, .chip.travel-refused { border-color: var(--color-danger) !important; color: var(--danger-ink) !important; }
.chip.arrived, .chip.paid, .chip.cast { border-color: var(--color-success) !important; color: #7fd1b2 !important; }
.chip.fight-ended, .chip.board { border-color: var(--color-gold) !important; color: var(--color-gold-light) !important; }
.history { margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.history > button { width: 100%; justify-content: space-between; margin: 0; background: transparent; border-color: transparent; color: var(--color-gold-light); font-size: 13px; letter-spacing: 0.06em; padding-left: 2px; }
.past { padding: 8px 2px; border-top: 1px solid rgba(74, 111, 165, 0.18); font: 14px/1.5 var(--font-serif); color: #cdbf93; white-space: pre-wrap; }
.past .label { font-family: var(--font-sans); font-size: 10px; display: block; margin-bottom: 2px; }

/* The composer. */
.composer { display: flex; gap: 8px; align-items: center; }
.composer input { flex: 1; min-width: 0; border-radius: var(--radius-md); background: rgba(13, 31, 56, 0.96); border-color: var(--line-soft); }
.composer button.send { flex: none; width: 48px; min-width: 48px; height: 46px; padding: 0; margin: 0; font-size: 18px; border-radius: var(--radius-md); }

/* A target's sheet, the Act list, and the Journal / Character / Settings panels: a contextual panel beside the
   map on wide screens, a bottom sheet over the dock on a phone. */
.sheet { border-radius: var(--radius-lg); border: 1px solid var(--color-gold); background: rgba(10, 22, 40, 0.98); padding: 12px 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55); }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sheet-head h2 { flex: 1; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-head .x { margin: -4px -6px -4px 0; min-width: var(--tap); padding: 0; background: transparent; border-color: transparent; color: var(--color-gold-light); font-size: 20px; }
.sheet .acts { display: grid; gap: 6px; }
.sheet .acts button { justify-content: space-between; width: 100%; margin: 0; text-align: left; }
.sheet .acts button .why, .sheet .acts button .cost { color: var(--ink-dim); font-size: 12px; }
.sheet .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.stat-box { background: var(--color-abyss); border-radius: var(--radius-md); padding: 10px 6px; text-align: center; border: 1px solid var(--line-soft); }
.stat-box b { display: block; font: 600 20px/1.1 var(--font-serif); color: var(--color-parchment); }
.stat-box span { font-size: 10px; color: var(--color-steel); text-transform: uppercase; letter-spacing: 0.06em; }

/* A phone held upright: the navigation is a bottom bar, the composer docks above it, a sheet rises over both. */
@media (max-width: 599px), (max-width: 899px) and (orientation: portrait) {
  :root { --dock: 116px; }
  #sheet:not(:empty), #panel:not(:empty) { position: fixed; left: 0; right: 0; bottom: var(--dock); z-index: 14; max-height: 58vh; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; animation: rise 0.18s ease-out; }
  #nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 16; padding-bottom: env(safe-area-inset-bottom); }
  .dock { bottom: 52px; padding-bottom: 0; }
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Desktop, and a phone held sideways: the map on the left, everything else in one column on the right; the
   navigation moves into the header and the composer into the side column. */
@media (min-width: 900px), (orientation: landscape) and (min-width: 600px) {
  #bar { padding: 4px 14px; }
  #nav { position: static; border: 0; background: none; gap: 2px; margin-left: 6px; }
  #nav button { flex: none; flex-direction: row; gap: 6px; min-height: var(--tap); padding: 6px 10px; border-radius: var(--radius-sm); font-size: 11px; }
  #nav button .ico { font-size: 14px; }
  #nav button.on { background: rgba(201, 168, 76, 0.1); }
  .play { max-width: 1440px; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: 'stage hud' 'stage side' 'stage composer'; column-gap: 12px; padding: 10px 12px 12px; height: calc(100vh - 53px); }
  .side { overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
  .dock { position: static; grid-area: composer; background: none; padding: 0; }
  .dock .composer { padding: 0; max-width: none; }
  .hud { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
  .drop { right: auto; width: min(420px, 100%); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .play { height: calc(100vh - 53px); padding-top: 6px; row-gap: 6px; grid-template-columns: minmax(0, 1fr) minmax(240px, 34%); }
  .gm.folded .narration { -webkit-line-clamp: 2; }
  #nav button .txt { display: none; }
  .brand { display: none; }
  .drop { max-height: 72vh; }
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* A step on a fight's board (handoff 2026-11-04 item 3): the round's allowance, and a planned step riding with an act. */
.moveline { margin: 2px 0 8px; font-size: 0.88rem; color: var(--color-gold); }
.moveline.bad { color: var(--danger-ink); }
.stepnote { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 6px; }
.linkish { min-height: 44px; padding: 0 8px; background: none; border: none; color: var(--color-gold); text-decoration: underline; cursor: pointer; font: inherit; }

/* Abilities (item 4): each one's cost, wait, aim and what it does, from the engine's own catalogue. */
.abilities-list { display: flex; flex-direction: column; gap: 6px; }
.ability { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; text-align: left; }
.ability .ab-name { display: flex; justify-content: space-between; width: 100%; font-weight: 600; }
.ability .ab-meta { font-size: 0.8rem; opacity: 0.8; }
.ability .ab-blurb { font-size: 0.82rem; opacity: 0.9; }
/* No live narrator (item 5): said once, in the Game Master's head. */
.gm.offline .gm-head .turn::after { content: ' · no live narrator'; color: var(--color-gold); }
