/* Admin v0 — styles and structure from the owner's Figma mockup
   («Razgrom» → «Admin», Desktop-1/2/3, 1440×1024). No radii, no shadows,
   five colours. Every number below that came from the mockup is a token. */

@font-face {
  font-family: "Jersey 25";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/jersey25-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jersey 25";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/jersey25-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* palette — the whole of it */
  --black: #000000;
  --white: #ffffff;
  --red: #ff0000;
  --green: #00ff00;
  --blue: #0000ff;

  /* layout */
  --header-h: 122px;
  --header-pad-x: 40px;
  --sidebar-w: 246px;
  --control-h: 46px;
  --border-w: 5px;
  --pad: 10px;
  --gap: 10px;
  --search-w: 464px;
  --logo-w: 150px;
  --logo-h: 92px;
  --info-pad: 12px 18px;

  /* type */
  --font: "Jersey 25", system-ui, sans-serif;
  --fs-control: 24px;   /* search, domain tabs, buttons */
  --fs-nav: 36px;       /* sidebar items */
  --fs-profile: 32px;   /* ADMIN */
  --fs-info: 14px;      /* version / contour */
  --fs-body: 20px;

  /* the active domain's colour; app.js sets --c per element from data-color */
  --c: var(--red);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--white);
  color: var(--black);
  font: 400 var(--fs-body) / 1.2 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8em; }

/* ------------------------------------------------------------- frame --- */

.frame {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 1100px;
  background: var(--white);
  border: 1px solid var(--black);
}

/* ------------------------------------------------------------ header --- */

.top {
  flex: none;
  height: var(--header-h);
  padding: 0 var(--header-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--black);
  color: var(--white);
}

.logo { display: block; flex: none; }
.logo img { display: block; width: var(--logo-w); height: var(--logo-h); object-fit: contain; }

.search {
  flex: 0 1 var(--search-w);
  min-width: 200px;
  height: var(--control-h);
  padding: var(--pad);
  display: flex;
  align-items: center;
  gap: var(--gap);
  background: var(--white);
  color: var(--black);
  cursor: text;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--black);
  font: inherit;
  font-size: var(--fs-control);
  line-height: 1;
  outline: none;
}

.search input::placeholder { color: var(--black); opacity: 1; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.domains { display: flex; gap: var(--gap); flex: none; }

.domain {
  height: var(--control-h);
  padding: var(--pad);
  display: flex;
  align-items: center;
  gap: var(--gap);
  border: var(--border-w) solid var(--c);
  color: var(--c);
  background: transparent;
  font-size: var(--fs-control);
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.domain.is-active { background: var(--c); color: var(--black); }
.domain:focus-visible, .side-item:focus-visible { outline: 3px dashed var(--white); outline-offset: 2px; }

.profile {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--gap);
  font-size: var(--fs-profile);
  line-height: 1;
  text-transform: uppercase;
  color: var(--white);
}

/* ------------------------------------------------------------- icons --- */

.icon { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-24 { width: 24px; height: 24px; }
.icon-32 { width: 32px; height: 32px; }
.icon svg { display: block; }

/* -------------------------------------------------------------- main --- */

.main { display: flex; flex: 1; min-height: 0; }

.side {
  flex: none;
  width: var(--sidebar-w);
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--c);
}

.side-nav { display: flex; flex-direction: column; gap: var(--gap); }

.side-item {
  height: var(--control-h);
  padding: var(--pad);
  display: flex;
  align-items: center;
  gap: var(--gap);
  border: var(--border-w) solid var(--c);
  color: var(--white);
  font-size: var(--fs-nav);
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.side-item .label { overflow: hidden; text-overflow: clip; }
.side-item.is-active { background: var(--white); border-color: var(--white); color: var(--c); }

.info {
  padding: var(--info-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  font-size: var(--fs-info);
  line-height: 1;
  color: var(--white);
}

.info-inline { flex-direction: row; padding: 0; }
.info-inline .env[data-env="dev"] { border: 1px solid var(--white); }

/* contour marker: prod is plain text; dev is a black chip plus a warning line,
   so a dev tab can never be mistaken for the production one */
.env { text-transform: lowercase; }
.env[data-env="dev"] { background: var(--black); color: var(--white); padding: 4px 8px; }
.env-warn { text-transform: uppercase; }
.frame[data-env="dev"] .info { border-top: 3px solid var(--black); }
.content .env[data-env="dev"] { color: var(--white); }
.content .env[data-env="prod"] { border: 1px solid var(--black); padding: 4px 8px; }

/* ----------------------------------------------------------- content --- */

.content {
  flex: 1;
  min-width: 0;
  padding: 20px var(--header-pad-x) 60px;
  overflow: auto;
  color: var(--black);
}

.page-head { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .btn { margin-left: auto; }
.page-title { margin: 0; font-size: var(--fs-nav); line-height: 1; font-weight: 400; text-transform: uppercase; }
.page-fresh { font-size: var(--fs-body); }
.section-title { margin: 30px 0 10px; font-size: 28px; line-height: 1; font-weight: 400; text-transform: uppercase; }
.summary, .lead { margin: 0 0 12px; }
.hint { margin: 12px 0 0; font-size: 16px; }
.empty { margin: 0; font-size: var(--fs-control); }
.error, .err { color: var(--red); }
.strong { font-size: 1.1em; }
.cell-note { font-size: 15px; margin-top: 2px; }
ul.plain { margin: 0 0 12px; padding-left: 24px; }

.btn {
  height: var(--control-h);
  padding: var(--pad);
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  border: var(--border-w) solid var(--black);
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: var(--fs-control);
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

.btn.is-primary { background: var(--black); color: var(--white); }
.btn.is-danger { border-color: var(--red); color: var(--red); }
.btn.is-small { height: 36px; padding: 6px 8px; border-width: 3px; font-size: 20px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:focus-visible, .field:focus-visible { outline: 3px dashed var(--black); outline-offset: 2px; }

.field {
  height: var(--control-h);
  padding: var(--pad);
  border: var(--border-w) solid var(--black);
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: var(--fs-control);
  line-height: 1;
  min-width: 0;
}

.field.is-small { height: 36px; padding: 6px 8px; border-width: 3px; font-size: 20px; width: 220px; }
.field::placeholder { color: var(--black); opacity: 0.5; }

/* the save-path editor (INGEST review, M7j): globs live one per line, so the
   control is monospace and as wide as its column -- neither the 320px-tall
   document editor (.is-code) nor a fixed 220px single-line field. */
.field.is-cell {
  height: auto;
  min-height: 44px;
  width: 100%;
  max-width: 100%;
  resize: vertical;
  padding: 6px 8px;
  border-width: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.3;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

/* the root picker is a <select>, and a select ignores rows/resize: give it a
   line box tall enough not to clip its own text. */
select.field.is-cell { line-height: 1.4; white-space: normal; padding: 8px; }

.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.notice {
  margin: 0 0 20px;
  padding: var(--pad);
  border: var(--border-w) solid var(--black);
  font-size: var(--fs-control);
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notice.is-error { border-color: var(--red); color: var(--red); }
.notice.is-ok { border-color: var(--green); }
.notice-detail { font-size: 16px; }

.cards { display: flex; flex-wrap: wrap; gap: var(--gap); margin: 0 0 12px; }
.card { min-width: 160px; padding: var(--pad); border: var(--border-w) solid var(--black); }
.card .num { font-size: 48px; line-height: 1; }
.card .cap { font-size: var(--fs-body); text-transform: uppercase; }
.card .card-note { font-size: 15px; margin-top: 4px; }
/* alert card: a non-zero number an operator must not scroll past (failed, unconfirmed saves) */
.card.is-alert { border-color: var(--red); }
.card.is-alert .num { color: var(--red); }

/* filter chips + the cards-window toggle (SESSIONS) */
.chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chips-label { font-size: var(--fs-body); text-transform: uppercase; }
.chips-sep { margin-left: 24px; }
.btn.is-on { background: var(--black); color: var(--white); }

/* cursor pagination under the table */
.pager { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; }
.pager-label { font-size: var(--fs-body); text-transform: uppercase; margin-right: 8px; }

.tag {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--black);
  font-size: 15px;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag.is-ok { background: var(--green); }
.tag.is-bad { background: var(--red); }
.tag.is-warn { background: var(--blue); color: var(--white); }

.scroll { overflow-x: auto; }

table.grid { border-collapse: collapse; width: 100%; font-size: var(--fs-body); line-height: 1.2; }
.grid th, .grid td { border: 1px solid var(--black); padding: 8px 10px; text-align: left; vertical-align: top; }
.grid th { background: var(--black); color: var(--white); font-weight: 400; text-transform: uppercase; white-space: nowrap; }
.grid td.actions { white-space: nowrap; }

/* the save-path editor's grid (INGEST review, M7j): fixed columns so the
   REMOVE button cannot be pushed off the right edge by a long glob, and the
   controls fill their cell instead of the .field default width. */
table.grid.is-savepaths { table-layout: fixed; }
.grid.is-savepaths th:nth-child(1), .grid.is-savepaths td:nth-child(1) { width: 24%; }
.grid.is-savepaths th:nth-child(2), .grid.is-savepaths td:nth-child(2) { width: 34%; }
.grid.is-savepaths th:nth-child(3), .grid.is-savepaths td:nth-child(3) { width: 24%; }
.grid.is-savepaths th:nth-child(4), .grid.is-savepaths td:nth-child(4) { width: 18%; }
.grid.is-savepaths th { white-space: normal; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 20px; }
.facts dt { text-transform: uppercase; }
.facts dd { margin: 0; }

/* ------------------------------------------------------------- login --- */

.login-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 60px 40px; }
.login-form { width: var(--search-w); display: flex; flex-direction: column; gap: var(--gap); }
.login-form .page-title { margin-bottom: 10px; }
.lbl { font-size: var(--fs-body); text-transform: uppercase; margin-top: 10px; }
.lbl-note { text-transform: none; font-size: 15px; display: block; }
.login-form .btn { align-self: flex-start; margin-top: 10px; }
.login-form .error { margin: 0; font-size: var(--fs-body); }
.login-form .hint { margin: 0; }

/* ------------------------------------------------ session detail + charts ---
   Same five colours as everything else. Chart lines: blue/red are the two
   categorical hues (they pass the CVD and contrast checks on white); black is
   ink and appears only as a REFERENCE series, always dashed or stepped so
   identity never rests on colour alone. Grid = recessive dashed hairlines. */

.back { margin: 0 0 4px; }
.back-link { font-size: var(--fs-body); text-transform: uppercase; color: var(--black); }
.row-link { color: var(--black); text-decoration: underline; }
.row-link:hover { background: var(--black); color: var(--white); }

.chart-block { margin: 0 0 18px; }
.chart-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 6px; }
.chart-title { font-size: var(--fs-body); font-weight: 400; text-transform: uppercase; margin: 0; }
.chart-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lg-val { margin-left: 2px; }
.sw { display: inline-block; width: 20px; height: 0; border-top: 3px solid var(--black); }
.sw.is-blue { border-top-color: var(--blue); }
.sw.is-red { border-top-color: var(--red); }
.sw.is-black { border-top-color: var(--black); }
.sw.is-dashed { border-top-style: dashed; }

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--black);
  background: var(--white);
  cursor: crosshair;
  touch-action: none;       /* the drag IS the gesture — no scroll fight */
  user-select: none;
}
.chart-svg text { font-family: var(--font); }
.c-grid { stroke: var(--black); stroke-width: 1; stroke-dasharray: 2 7; fill: none; }
.c-axis { stroke: var(--black); stroke-width: 1; fill: none; }
.c-lbl { font-size: 13px; fill: var(--black); }
.c-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-line.c-blue { stroke: var(--blue); }
.c-line.c-red { stroke: var(--red); }
.c-line.c-black { stroke: var(--black); }
.c-dashed { stroke-dasharray: 6 5; }
.c-dot { r: 3px; }
.c-dot.c-blue { fill: var(--blue); }
.c-dot.c-red { fill: var(--red); }
.c-dot.c-black { fill: var(--black); }
/* switch markers: ink triangles + a hairline down to the axis */
.c-mark { fill: var(--black); }
.c-mark-line { stroke: var(--black); stroke-width: 1; stroke-dasharray: 1 5; }
/* the bridge's own warn threshold (status red — reserved semantics) */
.c-warn { stroke: var(--red); stroke-width: 1; stroke-dasharray: 5 4; }
.c-warn-lbl { fill: var(--red); }
/* ------------------------------------------------- chart interactivity ---
   app.js drives these with delegated pointer events: the crosshair hairline
   lives inside each SVG (hidden until hover), the brush rectangle appears
   during a drag-zoom, the tooltip is one body-level fixed <div> positioned
   through the CSSOM (CSP allows that; inline style= attributes stay banned). */
.c-cursor { stroke: var(--black); stroke-width: 1; pointer-events: none; }
.c-brush { fill: var(--blue); fill-opacity: 0.12; stroke: var(--blue); stroke-width: 1; pointer-events: none; }

/* `el.hidden` alone loses to the author `display: flex` below (author rules
   beat the UA [hidden] rule regardless of specificity) — restate it. */
.chart-tip[hidden] {
  display: none;
}
.chart-tip {
  position: fixed;
  z-index: 10;
  max-width: 360px;
  padding: 8px 10px;
  border: 2px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-size: 15px;
  line-height: 1.35;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tip-time { text-transform: uppercase; }
.tip-row { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tip-val { font-size: 1.15em; min-width: 72px; }
.tip-lbl { opacity: 0.85; }

/* the zoom strip above the charts */
.zoombar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; }
.zoombar-label { font-size: var(--fs-body); text-transform: uppercase; }
.chart-hint { margin: 0 0 10px; font-size: 15px; }
.zoombar .chart-hint { margin: 0; }

/* ---------------------------------------------- catalog: display + rawg ---
   Same language: 5 px borders, uppercase captions, no radii, the five
   colours. Images come from media.rawg.io (search previews) or our media
   domain (attached cover/screenshots) — both need the admin site's img-src
   widened (README «CSP»); a blocked image degrades to its alt text inside
   the bordered box (white on black — still readable). */

.display-form { display: flex; flex-direction: column; gap: var(--gap); max-width: 720px; }
.field.is-area { height: auto; min-height: 120px; resize: vertical; font-size: var(--fs-body); line-height: 1.3; }

.rawg-results { display: flex; flex-wrap: wrap; gap: var(--gap); margin: 12px 0 0; }
.rawg-card { width: 320px; border: var(--border-w) solid var(--black); display: flex; flex-direction: column; }
.rawg-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-bottom: var(--border-w) solid var(--black);
  background: var(--black);
  color: var(--white);
  text-transform: uppercase;
}
.rawg-card-body { padding: var(--pad); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* The RAWG type-ahead of the intake form (M7j wave 2). A list, not a card
   wall: it appears under the field WHILE typing, so it has to be scannable in
   one glance and never push the rest of the form off the screen. */
.typeahead {
  border: var(--border-w) solid var(--black);
  border-top: 0;
  max-height: 320px;
  overflow-y: auto;
  background: var(--white);
}
.typeahead-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid var(--black);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.typeahead-row:last-child { border-bottom: 0; }
.typeahead-row:hover,
.typeahead-row:focus-visible { background: var(--black); color: var(--white); }
.typeahead-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 36px;
  object-fit: cover;
  background: var(--black);
  border: 1px solid var(--black);
}
.typeahead-name { flex: 1 1 auto; font-weight: 700; }
.typeahead-meta { flex: 0 0 auto; opacity: 0.7; font-size: 12px; }

.media-strip { display: flex; flex-wrap: wrap; gap: var(--gap); margin: 12px 0; }
.media-item { margin: 0; border: 1px solid var(--black); padding: 4px; }
.media-item img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 135px;
  object-fit: cover;
  background: var(--black);
  color: var(--white);
}
.media-item.is-cover img { width: 320px; height: 180px; }

.attribution { margin: 12px 0 0; font-size: 16px; }

/* ---------------------------------------- title detail: tabs + workbench ---
   The research/36 Д3 wave: OVERVIEW / BUILDS / ROLLOUT / COVERAGE / AUDIT.
   Same language as the domain tabs — hard borders, uppercase, ink-on-white
   inverted for the active one. */

.tabs { display: flex; flex-wrap: wrap; gap: var(--gap); margin: 0 0 20px; }
.tab {
  display: inline-block;
  padding: 8px 14px;
  border: 3px solid var(--black);
  color: var(--black);
  font-size: 20px;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.tab.is-active { background: var(--black); color: var(--white); }
.tab:focus-visible { outline: 3px dashed var(--black); outline-offset: 2px; }

/* document viewer (pretty-printed manifest JSON) and the line diff */
.doc {
  margin: 0;
  padding: var(--pad);
  border: 1px solid var(--black);
  background: var(--white);
  font-size: 14px;
  line-height: 1.4;
  max-height: 480px;
  overflow: auto;
  white-space: pre;
}
.doc.is-console { max-height: 360px; }
.doc .dup { background: var(--black); color: var(--white); padding: 0 6px; }
.doc .dl { display: block; }
.doc .dl.is-add { background: var(--green); }
.doc .dl.is-del { background: var(--red); color: var(--white); }

/* the config-revision editor (BUILDS, ADR-0022): a document, not a sentence —
   monospace, tall, and horizontally scrolling rather than wrapping a path. */
.field.is-code {
  height: auto;
  min-height: 320px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

/* the promote flow (ROLLOUT) */
.promote-form { display: flex; flex-direction: column; gap: var(--gap); max-width: 720px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: var(--fs-body); text-transform: uppercase; }
.chk input { width: 20px; height: 20px; accent-color: var(--black); }
.chk .lbl-note { text-transform: none; }

/* audit detail cell: raw JSON, kept narrow */
td.audit-detail { max-width: 420px; overflow-wrap: anywhere; font-size: 13px; }

/* ------------------------------------ session screenshots (M7i wave 4) ---
   The strip next to the QoE charts and the viewer over it. Same language as
   everything else: 5 px black borders, uppercase captions, no radii, the five
   colours — and the pictures themselves letterboxed on black, which is both
   the mockup's palette and the only honest background for a screenshot whose
   aspect ratio is the guest's, not ours.

   Links come from the broker as short-lived presigned GETs (research/41
   §4.4 — a player's screen is never publicly addressable), so the admin
   site's CSP `img-src` must include the S3/R2 endpoint host; without it every
   cell degrades to its alt text inside the same black box, and the layout
   holds. */

.shot-strip {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  overflow-x: auto;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--black);
}
.shot {
  flex: 0 0 auto;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.shot-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 113px; /* 16:9 of 200px — the guest's usual shape, letterboxed anyway */
  border: 3px solid var(--black);
  background: var(--black);
  color: var(--white);
  overflow: hidden;
}
.shot.is-bad .shot-frame { border-color: var(--red); }
.shot:hover .shot-frame, .shot:focus-visible .shot-frame { border-color: var(--blue); }
.shot-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shot-blank { padding: 6px; font-size: 15px; text-transform: uppercase; text-align: center; }
.shot-blank.is-big { color: var(--white); font-size: var(--fs-body); }
.shot-stamp { font-size: 18px; text-transform: uppercase; }
.shot-mark {
  align-self: flex-start;
  padding: 1px 5px;
  border: 2px solid var(--black);
  font-size: 15px;
  text-transform: uppercase;
}
.shot-mark.is-bad { border-color: var(--red); color: var(--red); }
.shot-mark.is-warn { border-color: var(--blue); color: var(--blue); }
/* The cadence divider: where the owner's schedule steps down (30 s → 1 min →
   5 min → 10 min). The cells are evenly spaced on purpose, so THIS is what
   carries the timeline's shape. */
.shot-gap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 113px; /* the height of a frame box, so the rule runs beside them */
  padding: 0 2px;
  border-left: 1px dashed var(--black);
  /* Set along the rule rather than across it: a horizontal label costs ~90 px
     of strip per divider, which is half a frame's worth of screen spent on a
     caption. */
  writing-mode: vertical-rl;
  font-size: 15px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.75;
}

/* the fullscreen viewer */
.shot-viewer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
}
.sv-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
  max-height: 100%;
  padding: var(--pad);
  border: var(--border-w) solid var(--white);
  background: var(--black);
  color: var(--white);
}
.sv-head, .sv-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.sv-head { justify-content: space-between; }
.sv-title { font-size: var(--fs-body); text-transform: uppercase; }
.sv-head .btn.is-small { border-color: var(--white); background: var(--black); color: var(--white); }
.sv-body { display: flex; align-items: center; gap: 8px; min-height: 0; }
.sv-img { max-width: 100%; max-height: 72vh; object-fit: contain; display: block; }
.sv-step {
  flex: 0 0 auto;
  width: 44px;
  height: 88px;
  border: 3px solid var(--white);
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}
.sv-step:hover, .sv-step:focus-visible { background: var(--white); color: var(--black); }
.sv-foot { font-size: 16px; }
.sv-foot .shot-mark { border-color: var(--white); }
.sv-foot .shot-mark.is-bad { border-color: var(--red); color: var(--red); }
.sv-foot .shot-mark.is-warn { border-color: var(--blue); color: var(--blue); }
.sv-foot .chart-hint { margin: 0; }
.sv-digest { opacity: 0.8; }

/* ---------------------------------- session diagnostics (spec 02 §5) ---
   CONNECTIVITY on the overview, the DIAGNOSTICS tab (timeline · devices ·
   logs) and the INFRA / STATUS connectivity block. Same language: hard
   borders, uppercase captions, the five colours — red is reserved for a
   failed stage / rejected candidate / error row, blue for the warn tag and
   the relay share, ink for everything that merely IS. */

/* the stage strip: one box per stage, left to right, the failed one red */
.stages { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--gap); margin: 0 0 12px; padding: 0; list-style: none; }
.stage { display: flex; flex-direction: column; gap: 4px; min-width: 150px; padding: 8px 10px; border: 3px solid var(--black); }
.stage.is-failed { border-color: var(--red); color: var(--red); }
.stage.is-total { border-style: dashed; }
.stage-name { text-transform: uppercase; font-size: var(--fs-body); line-height: 1; }
.stage-t { font-size: 14px; }
.stage-note { font-size: 15px; }
.stage .tag { align-self: flex-start; }

/* candidates: the chosen row is bold ink, a rejected one carries its cause in red */
.grid.is-candidates tr.is-chosen td { font-weight: 400; background: var(--white); }
.grid.is-candidates tr.is-chosen td:first-child { box-shadow: inset 5px 0 0 var(--black); }
.grid.is-candidates tr.is-rejected td:first-child { box-shadow: inset 5px 0 0 var(--red); }

/* the timeline: a source label per row, a left rule per lane so the eye
   can follow one source down the table without a colour per lane */
.src { display: inline-block; text-transform: uppercase; font-size: 15px; letter-spacing: 0.02em; }
.grid.is-timeline tr.ev-client td:first-child { box-shadow: inset 5px 0 0 var(--blue); }
.grid.is-timeline tr.ev-guest td:first-child { box-shadow: inset 5px 0 0 var(--black); }
.grid.is-timeline tr.ev-node td:first-child { box-shadow: inset 5px 0 0 var(--green); }
.grid.is-timeline tr.ev-relay td:first-child { box-shadow: inset 5px 0 0 var(--red); }
.grid.is-timeline tr.ev-broker td:first-child { box-shadow: inset 5px 0 0 transparent; }
.grid.is-timeline td:nth-child(-n+3) { white-space: nowrap; }
.grid.is-timeline td:nth-child(4) { overflow-wrap: anywhere; }
ul.plain.lanes { font-size: 16px; }
.chips .field.is-small { height: 36px; width: 220px; }

/* the log viewer: tools row + a taller console; part dividers inverted */
.log-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.log-tools .field.is-small { width: 320px; }
.doc.is-log { max-height: 560px; font-size: 13px; }
.doc .log-mark { display: inline-block; width: 100%; background: var(--black); color: var(--white); padding: 0 6px; margin-top: 4px; }

/* INFRA / STATUS: the path-share bar and the narrow percentile table */
.share-svg { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 0 6px; }
.sh-frame { fill: none; stroke: var(--black); stroke-width: 1; }
.sh-seg.sh-direct { fill: var(--black); }
.sh-seg.sh-relay { fill: var(--blue); }
.sh-seg.sh-web { fill: var(--red); }
.sh-lbl { font: 400 15px/1 var(--font); text-transform: uppercase; fill: var(--white); }
.grid.is-narrow { width: auto; min-width: 420px; }

/* INFRA / MONITORING (ADR-0031): the ALERTS table — the Watchdog row is the
   dead-man and reads muted, so it is not mistaken for an incident. */
.grid.is-alerts tr.is-watchdog td { color: #555; }
.grid.is-alerts td:nth-child(4) { max-width: 520px; }
/* The one INFRA label the mockup's sidebar width cannot hold at the nav
   size (10 wide glyphs): a touch smaller instead of a clipped «MONITORIN». */
.side-item[data-item="monitoring"] { font-size: 31px; }

/* --------------------------------------- CONTROLS — the layout editor ---
   The title's control_profile (ADR-0033, M-GC4): src/controls-editor.js +
   src/controls-canvas.js. Same language as the rest of the workbench —
   hard borders, uppercase captions, monospace numbers, the five colours:
   blue = the selection and the touch halo, red = hidden/overlap/errors,
   green = «matches», ink for everything that merely is. The canvas is an
   SVG whose geometry travels as presentation attributes and whose state
   travels as classes — no inline style anywhere (CSP default-src 'self'). */

.ctl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 12px; font-size: var(--fs-body); }
.ctl-rev { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ctl-libs { display: inline-flex; gap: 6px; }
.ctl-views { display: inline-flex; gap: 6px; margin-left: auto; }

.ctl-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(420px, 1fr) minmax(300px, 360px);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1500px) {
  .ctl-grid { grid-template-columns: minmax(280px, 320px) minmax(360px, 1fr); }
  .ctl-right { grid-column: 1 / -1; }
}
/* the device picker carries the frame's full name — never a clipped «iPhone 16e landscape · 85» */
.field.is-small.ctl-device { width: auto; min-width: 280px; }
.ctl-col { min-width: 0; }
.ctl-h { margin: 14px 0 8px; font-size: 22px; line-height: 1; font-weight: 400; text-transform: uppercase; }
.ctl-h:first-child { margin-top: 0; }
.ctl-lbl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 16px; text-transform: uppercase; }
.ctl-lbl .lbl-note { text-transform: none; }

/* layouts list */
.ctl-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ctl-item { display: flex; align-items: center; gap: 6px; border: 3px solid var(--black); }
.ctl-item.is-active { background: var(--black); color: var(--white); }
.ctl-pick {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ctl-item-label { font-size: var(--fs-body); }
.ctl-item-id { font-size: 13px; }
.ctl-item.is-active .cell-note { color: var(--white); }
.ctl-marks { display: inline-flex; gap: 4px; padding-right: 6px; }
.ctl-add { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; padding: 8px; border: 3px dashed var(--black); }

/* rules table: compact cells, the simulator's hit marked green on the left rule */
.grid.is-rules td { padding: 4px 6px; }
.grid.is-rules select.field.is-cell { width: 100%; min-width: 88px; min-height: 0; padding: 4px; font-size: 15px; }
.grid.is-rules select[multiple] { height: auto; }
.ctl-rule.is-selected td { box-shadow: inset 0 0 0 2px var(--blue); }
.ctl-rule.is-hit td:first-child { box-shadow: inset 5px 0 0 var(--green); }
.ctl-cycle { margin: 0 0 8px; padding-left: 24px; }
.ctl-cycle-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 0; }

/* the canvas */
.ctl-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.ctl-layout-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-body); }
.ctl-stage { border: var(--border-w) solid var(--black); background: var(--white); }
.ctl-stage .empty { margin: 8px; font-size: var(--fs-body); }
.ctl-canvas { display: block; width: 100%; height: auto; background: var(--white); touch-action: none; user-select: none; }
.ctl-canvas text { font-family: var(--font); pointer-events: none; }
.ctl-screen { fill: var(--white); stroke: var(--black); stroke-width: 1; }
.ctl-safe { fill: none; stroke: var(--black); stroke-width: 1; stroke-dasharray: 4 4; }
.ctl-safe-lbl { fill: var(--black); opacity: 0.6; }
.ctl { cursor: grab; }
.ctl-canvas.is-readonly .ctl { cursor: pointer; }
.ctl-shape { fill: var(--white); stroke: var(--black); stroke-width: 2; }
.ctl-frame { fill: none; stroke: var(--black); stroke-width: 1; stroke-dasharray: 2 3; }
.ctl-inner { fill: none; stroke: var(--black); stroke-width: 1.5; }
.ctl-ring { fill: none; stroke: var(--black); stroke-width: 2; stroke-dasharray: 6 4; }
.ctl-icon { fill: var(--black); }
.ctl-txt { fill: var(--black); }
.ctl-txt.is-unknown { fill: var(--red); }
.ctl-sym { fill: var(--black); opacity: 0.7; }
.ctl-idlbl { fill: var(--black); opacity: 0.6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ctl.is-selected .ctl-shape, .ctl.is-selected .ctl-ring, .ctl.is-selected .ctl-frame { stroke: var(--blue); stroke-width: 3; }
.ctl.is-selected .ctl-idlbl { fill: var(--blue); opacity: 1; }
.ctl.is-hidden { opacity: 0.35; }
.ctl-slash { stroke: var(--red); stroke-width: 2; }
.ctl-hit { fill: var(--blue); fill-opacity: 0.08; stroke: var(--blue); stroke-width: 1; stroke-dasharray: 3 3; }
.ctl-hit.is-exact { stroke-dasharray: none; }
.ctl.is-overlap .ctl-hit { fill: var(--red); fill-opacity: 0.15; stroke: var(--red); }
.ctl-handle { fill: var(--white); stroke: var(--blue); stroke-width: 2; cursor: nwse-resize; }
.ctl-badge circle { fill: var(--black); }
.ctl-badge text { fill: var(--white); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ctl-zone { fill: none; stroke: var(--black); stroke-width: 1; stroke-dasharray: 2 4; pointer-events: none; }
.ctl-zone.is-summon { stroke: var(--blue); }
.ctl-zone-lbl { fill: var(--black); opacity: 0.6; }
/* the float zones of the selected stick are draggable (owner 2026-09-14): an invisible wide stroke along the
   outline takes the pointer (the area inside stays the controls'), a corner square resizes */
.ctl-zone-grip { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; cursor: move; }
.ctl-zone-grip:hover { stroke: var(--blue); stroke-opacity: 0.12; }
.ctl-zone-handle { fill: var(--white); stroke: var(--blue); stroke-width: 2; cursor: nwse-resize; }
/* the "which button is this" badge of a custom-glyph control — the iOS kit's PadButtonBadge, previewed */
.ctl-orig circle { fill: var(--black); fill-opacity: 0.85; stroke: var(--white); stroke-width: 1; }
.ctl-orig text { fill: var(--white); font-weight: 700; }
.ctl.is-hidden .ctl-orig { opacity: 0.6; }
/* v1.1 hold_stick: the full-deflection ring around a held button, pointer-inert so the hit-test is the button's */
.ctl-holdstick { fill: none; stroke: var(--black); stroke-width: 1.5; stroke-dasharray: 5 3; opacity: 0.55; pointer-events: none; }
.ctl-holdstick-lbl { fill: var(--black); opacity: 0.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ctl.is-selected .ctl-holdstick { stroke: var(--blue); opacity: 0.9; }
.ctl.is-selected .ctl-holdstick-lbl { fill: var(--blue); opacity: 1; }
/* v1.5 hold_gyro: the gyroscope-driven stick named above the button with a dotted tilt arc, pointer-inert like the ring */
.ctl-holdgyro { pointer-events: none; }
.ctl-holdgyro-arc { fill: none; stroke: var(--black); stroke-width: 1.5; stroke-dasharray: 1.5 2; opacity: 0.55; }
.ctl-holdgyro-lbl { fill: var(--black); opacity: 0.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ctl.is-selected .ctl-holdgyro-arc { stroke: var(--blue); opacity: 0.9; }
.ctl.is-selected .ctl-holdgyro-lbl { fill: var(--blue); opacity: 1; }
/* v1.6 also (chord): a small diamond marker naming the extra wires the button ALSO holds, pointer-inert like the ring/arc — deliberately a different shape from both */
.ctl-also { pointer-events: none; }
.ctl-also-mark { fill: var(--black); opacity: 0.55; }
.ctl-also-lbl { fill: var(--black); opacity: 0.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ctl.is-selected .ctl-also-mark { fill: var(--blue); opacity: 0.9; }
.ctl.is-selected .ctl-also-lbl { fill: var(--blue); opacity: 1; }
.ctl-keys { margin: 6px 0 10px; font-size: 14px; }

/* the simulator bar */
.ctl-sim { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 3px solid var(--black); }
.ctl-sim-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ctl-sim-verdict { font-size: var(--fs-body); }
.ctl-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; white-space: nowrap; }
.ctl-chip input { width: 16px; height: 16px; margin: 0; accent-color: var(--black); }
.field.is-num { width: 110px; }

/* properties */
.ctl-props { display: flex; flex-direction: column; gap: 8px; }
.ctl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ctl-zone-row .ctl-zone-key { min-width: 64px; }
.ctl-zone-row .field.is-num { width: 84px; }
.ctl-glyph, .ctl-when-block, .ctl-variants, .ctl-addctl, .ctl-holdstick-block, .ctl-holdgyro-block, .ctl-also-block, .ctl-zone-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--black);
}
.ctl-holdstick-block .hint, .ctl-holdgyro-block .hint, .ctl-also-block .hint { margin: 0; font-size: 14px; }
.ctl-also-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ctl-also-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; white-space: nowrap; }
/* the v1.1 compatibility line — persistent wherever a look / hold_stick field is set */
.ctl-compat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 14px; }
.ctl-compat .err { color: var(--red); }
.ctl-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--black);
}
.ctl-iconbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 2px solid transparent;
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ctl-iconbtn:hover { border-color: var(--black); }
.ctl-iconbtn.is-on { background: var(--black); color: var(--white); }
.ctl-thumb { display: block; }
.ctl-when { display: flex; flex-direction: column; gap: 4px; }
.ctl-when-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ctl-variant-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.ctl-variant { padding-left: 8px; border-left: 3px solid var(--black); }
.facts.is-compact { gap: 4px 16px; margin-bottom: 10px; }

/* checks + save + preview */
.ctl-issues { margin: 18px 0 12px; }
.ctl-issue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow: auto; }
.ctl-issue {
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--black);
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.ctl-issue:hover { background: var(--black); color: var(--white); }
.ctl-issue.is-error { border-color: var(--red); }
.ctl-save { display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.ctl-preview { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; }

/* JSON / HISTORY / wizard */
.ctl-json { display: flex; flex-direction: column; gap: 8px; }
.field.is-tall { min-height: 520px; }
.ctl-history .grid tr.is-selected td { box-shadow: inset 5px 0 0 var(--blue); }
.ctl-wizard { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.ctl-import { display: flex; flex-direction: column; gap: 8px; }

/* --------------------------------------------- INFRA / RELAY v3 (M7k) --- */

/* A relay is a card, not a row: the fleet grew a second dimension (the agent
   and its heartbeat) that does not fit a column. */
.relay-cards { display: flex; flex-wrap: wrap; gap: var(--gap); margin: 0 0 12px; }
.relay-card { flex: 1 1 420px; min-width: 380px; padding: var(--pad); border: var(--border-w) solid var(--black); }
.relay-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.relay-name { font-size: 28px; line-height: 1; text-transform: uppercase; }
.relay-id { font-size: 13px; margin-left: auto; }
.relay-card .facts { gap: 6px 18px; margin-bottom: 10px; }
.relay-card .cards { margin-bottom: 10px; }
.section-title.is-sub { font-size: 20px; margin: 12px 0 6px; }
.cards.is-tight .card { min-width: 96px; padding: 6px 8px; border-width: 3px; }
.cards.is-tight .card .num { font-size: 28px; }
.cards.is-tight .card .cap { font-size: 15px; }

/* The node x relay matrix: cells are dense on purpose — a publication carries
   its name, its block, both reach legs and the router's verdict. */
.grid.is-matrix th, .grid.is-matrix td { vertical-align: top; }
.grid.is-matrix th { white-space: normal; }
.grid.is-matrix .cell-note { max-width: 34ch; }
.pub-cell { min-width: 260px; }
.reach { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.pub-verb { margin-top: 8px; }
/* The legacy per-pair alias: present, readable, and visibly not the route. */
.pub-alias { margin-top: 4px; font-size: 12px; }
/* Creating a publication from an empty cell — a form inside a table cell. */
.pub-form { display: flex; flex-direction: column; gap: 4px; }
.pub-form .field { width: 100%; }
/* The node-wide relay gate, on the node's own cell. */
.relay-gate { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--black); }
/* A node nobody may relay: the whole row reads as excluded, and its
   publication cells STAY — turning the gate back on restores them, so hiding
   them would hide exactly what comes back. */
.grid.is-matrix tr.is-not-relayed td { opacity: 0.45; }
.grid.is-matrix tr.is-not-relayed td:first-child { opacity: 1; }

/* One-time secrets: a dialog that only its own CLOSE button dismisses. No
   backdrop click, no Escape — the value exists in exactly one place. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.modal-box {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: var(--pad);
  border: var(--border-w) solid var(--black);
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); }
.modal-title { font-size: var(--fs-body); text-transform: uppercase; }
.modal-box .lead, .modal-box .hint { margin: 0; }
.field.is-token { width: 100%; font-size: 18px; letter-spacing: 0.02em; }

/* PRODUCT / SUPPORT (research/60 §3.3): the console — context block, the
   conversation as bubbles, the reply box. CONTENT / HELP: the step editor.
   Same tokens, no new colours: player bubbles are outlined, operator bubbles
   inverted, read marks are text. */
.support-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: var(--gap); align-items: start; }
.support-side { display: flex; flex-direction: column; gap: var(--gap); }
.chat { display: flex; flex-direction: column; gap: var(--gap); padding: var(--pad); border: var(--border-w) solid var(--black); max-height: 60vh; overflow-y: auto; }
.bubble { max-width: 78%; padding: var(--pad); border: var(--border-w) solid var(--black); font-size: var(--fs-body); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.is-user { align-self: flex-start; background: var(--white); color: var(--black); }
.bubble.is-op { align-self: flex-end; background: var(--black); color: var(--white); }
.bubble.is-sys { align-self: center; max-width: 90%; border-style: dashed; font-size: var(--fs-info); }
.bubble-meta { display: block; margin-top: 4px; font-size: var(--fs-info); opacity: 0.8; }
.chat-empty { padding: var(--pad); font-size: var(--fs-info); }
.reply-box { display: flex; flex-direction: column; gap: var(--gap); }
.reply-box textarea.field { min-height: 92px; resize: vertical; font-family: var(--font); }
.badge { display: inline-block; min-width: 1.6em; padding: 0 6px; border: var(--border-w) solid var(--black); background: var(--black); color: var(--white); text-align: center; font-size: var(--fs-info); }
.step-list { display: flex; flex-direction: column; gap: var(--gap); }
.step { display: flex; flex-direction: column; gap: 6px; padding: var(--pad); border: var(--border-w) solid var(--black); }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); }
.step textarea.field { min-height: 72px; resize: vertical; font-family: var(--font); }
.rating { font-size: var(--fs-body); letter-spacing: 0.1em; }
