/* ONE CHAT (js/maker/one-chat.js): one conversation, two views.
   Raina, 2026-10-05 23:36. Architecture: Fathom. The look is SONAR'S to
   restyle; this is the working first pass: relay lines quiet and distinct
   from Lux's words, readable at 390 px. */

/* ── THE FRONT: her words, Lux's words, and relay lines. The workshop's rows
   are not shown here, except the relay line a maker entry carries. */
body.one-chat:not(.workshop-open) .chat-history > [data-view="workshop"]:not([data-relay="1"]) { display: none; }
body.one-chat:not(.workshop-open) .chat-history > [data-view="workshop"] > :not(.is-relay) { display: none; }

/* ── THE WORKSHOP: the make rows only. */
body.workshop-open .chat-history > [data-view="front"] { display: none; }
body.workshop-open .chat-history .is-relay { display: none; }

/* A relay line is LUX'S OWN ROW (Sonar), in her voice, with one small TV:
   smaller and quieter than her words, never a system notice. */
.chat-row.is-relay { margin: 8px 0; gap: 8px; align-items: flex-start; }
.chat-row.is-relay .chat-glyph.relay-glyph { display: inline-flex; flex: none; width: 18px; height: 18px; margin-top: 1px;
  align-items: center; justify-content: center; color: var(--amber, #E9A94E); }
/* Lux's own line, in her size, colour and register (Sonar): only the TV glyph marks where she looked. */
.relay-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.relay-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; line-height: 20px;
  border: 1px solid var(--amber, #E9A94E); color: var(--amber, #E9A94E); }
.relay-open { min-height: 40px; font: inherit; font-size: 13px; }

/* The hand-send under each of her lines: present, quiet, right-aligned with her words. */
.front-send { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: -8px 0 10px; font-size: 12px; }
/* A small pill, like every other action (Sonar). */
.front-send-btn { min-height: 32px; padding: 0 12px; border: 1px solid var(--line, #242A31); border-radius: 999px; background: #20242b;
  color: var(--ink, #EAE7E2); font: inherit; font-size: 12px; cursor: pointer; }
.front-send-btn:hover { background: #2A2F37; }
.front-send-btn:focus-visible { outline: 2px solid var(--ink, #EAE7E2); outline-offset: 2px; }

/* ── THE WORKSHOP WINDOW (runner-desk.js, .desk-full.is-workshop): the bar,
   the shots across the top, the conversation under them. */
.desk-full.is-workshop .desk-full-body { flex: none; max-height: 34vh; padding: 12px 16px; border-bottom: 1px solid #1E232A; }
/* ⛔ AND IT IS NOT THERE WHEN IT HAS NOTHING TO CARRY (Raina: "the middle section has no
   room to see"). In done and idle this band repeated the show bar below it — same title,
   same length — and cost the conversation up to 34vh to do it. `shows-work` is set in
   runner-desk.js from the view's mode rather than inferred in CSS, so it does not depend
   on :has() and behaves the same in every engine. */
.desk-full.is-workshop:not(.shows-work) .desk-full-body { display: none; }
.desk-full.is-workshop .desk-full-card { max-width: 420px; margin: 0 auto; }
.desk-full.is-workshop .desk-full-card .tv-card { height: 96px; }
.desk-full.is-workshop .desk-full-card .tv-card-ring { width: 80px; height: 80px; }
.desk-full.is-workshop .desk-full-card .tv-bars { height: 18px; }
.desk-full.is-workshop .desk-full-card .tv-card-name { font-size: 24px; }
.desk-full.is-workshop .tv-frame.is-full { height: min(26vh, 240px); }
.desk-full.is-workshop .tv-strip.is-full { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.desk-full.is-workshop .desk-full-line { font-size: 15px; }
.desk-full.is-workshop .desk-full-meta, .desk-full.is-workshop .desk-full-live, .desk-full.is-workshop .desk-full-waiting { font-size: 13px; }
.desk-full-chat { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.desk-full-chat > #chat-host { flex: 1 1 auto; min-height: 0; margin-right: 0 !important; }
.desk-full-chat .runner-desk { display: none; }
.desk-full-empty { display: none; margin: 16px; color: #B9AE9A; font-size: 14px; }
body.workshop-open.workshop-empty .desk-full-empty { display: block; }
.desk-full-stop { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid #8C3B2E; background: #1A0F0E;
  color: #E8DCC8; font: inherit; font-size: 15px; cursor: pointer; }
.desk-full-stop[hidden] { display: none; }
.desk-full-name { display: inline; }
.desk-full .tv-frame-caption > span { display: block; }

/* ── THE PEEK (hover, fine pointers only): the workshop's last lines, read-only. */
.desk-peek { position: absolute; z-index: 20; width: 260px; margin-top: 8px; padding: 10px 12px; border-radius: 12px;
  background: #14181D; border: 1px solid #3A4048; color: #E8DCC8; font-size: 13px; line-height: 1.4;
  box-shadow: 0 12px 26px rgba(0,0,0,.5); pointer-events: none; }
.desk-peek[hidden] { display: none; }
.desk-peek ul { margin: 6px 0; padding-left: 18px; }
.desk-peek-title { margin: 0; font-weight: 600; }
.desk-peek-none, .desk-peek-hint { margin: 6px 0 0; color: #B9AE9A; font-size: 12px; }
@media not all and (hover: hover) and (pointer: fine) { .desk-peek { display: none !important; } }

/* ── THE TV'S FOURTH STATE: WAITING ON YOU (Sonar). The workshop asked her
   something and nothing is moving: the amber pill, the question in one line,
   the clock frozen as PAUSED. */
.tv-wait       { display: flex; flex-direction: column; gap: 4px; min-height: 60px; justify-content: center; font-size: 12px; line-height: 1.35; }
.tv-pill       { align-self: flex-start; padding: 1px 8px; border-radius: 999px; border: 1px solid #E9A94E; color: #E9A94E; font-size: 11px; font-weight: 600; }
.tv-question   { color: #E8DCC8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-paused     { color: #B9AE9A; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.tv-paused .tv-clock { display: inline; }
.tv-wait.is-full { max-width: 640px; margin: 0 auto; gap: 8px; font-size: 16px; }
.tv-wait.is-full .tv-pill { font-size: 13px; padding: 3px 12px; }
.tv-wait.is-full .tv-question { white-space: normal; }
.desk-full .tv-wait > span { display: block; }
.desk-full .tv-wait > .tv-pill { display: inline-block; align-self: flex-start; }

/* THE RUNNER WAKING (one-chat.js wakingHTML; Sonar's rule): one quiet line where
   the first reply will go, her held lines under it, no bar and no countdown. The
   welcome STAYS: its starters only fill the box, and it is a new person's only
   orientation during the wait (Sonar, #299). */
#waking { padding: 4px 12px 8px; }
#waking .waking-line { margin: 6px 0 10px; color: var(--muted, #8a8f98); font-size: 15px; }

/* ── THE SET'S GRID (Sonar, docs/plans/THE-SET-BOTTOM-VIEW-2026-10-15.md). The top band is what is HAPPENING and is
   sized to its content, never scrolling; the bottom is what EXISTS, the shots themselves, and is the window's ONE
   scrolling region. The transcript is one tap back (.shows-transcript). */
.desk-full.has-grid .desk-full-body { max-height: none; overflow: visible; }
.desk-full.has-grid .desk-full-picture { height: min(24vh, 220px); margin-bottom: 8px; }
.desk-full.has-grid .desk-full-chat > .desk-shots { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 16px; }
.desk-full.has-grid:not(.shows-transcript) .desk-full-chat > #chat-host { flex: none; }
.desk-full.has-grid:not(.shows-transcript) #chat-host .chat-history { display: none; }
.desk-full.has-grid.shows-transcript .desk-full-chat > .desk-shots { display: none; }
.desk-pane-tabs { flex: none; display: flex; gap: 4px; width: 100%; max-width: 1000px; margin: 0 auto; padding: 8px 16px 0; box-sizing: border-box; }
/* A tab, not a button: rai.css rounds every button and WebKit paints its native frame unless appearance is reset
   (Sonar, measured in pixels: a curled underline in Chromium, a framed box in WebKit). */
.desk-pane-tab { -webkit-appearance: none; appearance: none; border-radius: 0; min-height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none;
  color: #B9AE9A; font: inherit; font-size: 14px; cursor: pointer; }
.desk-pane-tab[aria-pressed="true"] { background: none; color: #E8DCC8; border-bottom-color: #E9A94E; font-weight: 600; }
.desk-pane-tab:focus-visible { outline: 2px solid #E9A94E; outline-offset: -2px; }
.desk-grid { list-style: none; max-width: 1000px; margin: 0 auto; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.desk-tile { margin: 0; }
.desk-tile-open { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.desk-tile-open:focus-visible { outline: 2px solid #E9A94E; outline-offset: 2px; border-radius: 8px; }
.desk-tile-pic { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid #1E232A; }
.desk-tile-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.desk-tile-cap { display: flex; flex-direction: column; gap: 2px; padding: 6px 2px 0; font-size: 13px; line-height: 1.3; }
.desk-tile-cap b { font-weight: 600; color: #E8DCC8; overflow-wrap: anywhere; }
.desk-pins { display: flex; flex-direction: column; gap: 8px; max-width: 1000px; margin: 0 auto 12px; }
.desk-pin { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid #E9A94E; background: #1A150D; }
.desk-pin.is-failed { border-color: #C2604E; background: #1A0F0E; }
/* Read the question, THEN act: the button after the text, on its own row, at the right (Sonar, REF-SONAR-SET6). */
.desk-pin p { margin: 0; font-size: 14px; }
.desk-pin-go { align-self: flex-end; }
.desk-pin-go { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid currentColor; background: none;
  color: #E8DCC8; font: inherit; font-size: 13px; cursor: pointer; }
.desk-pin-go:focus-visible { outline: 2px solid #E9A94E; outline-offset: 2px; }
.desk-grid-none { max-width: 1000px; margin: 8px auto; color: #B9AE9A; font-size: 14px; }
body.workshop-open.workshop-empty .desk-grid-none { display: none; }
/* A clip opened from the grid plays above the Set. */
body.desk-open .player { z-index: 60; }
/* THE SHOW BAR STAYS ON THE FRONT (Sonar, REF-SONAR-SET2 item 6). It lives inside the chat panel, so it rode the panel
   into the Set by accident: a third description of one show (the band, the grid, "12s · 1 asset"), and at 390 a second
   Stop about 200px under the Set's own, taking the room the grid needs. */
.desk-full #show { display: none; }
/* And the run-status pill, mounted before the composer on a phone (run-status.js position), for the same reason: in the
   Set its words were already hidden (desk-reports), leaving a bare second Stop. The Set's own Stop has the pill's own
   condition (runner-desk.js paintFull), so nothing is lost in any state (Sonar, REF-SONAR-SET6). */
.desk-full .run-status { display: none; }
