/* ============================================================
   heliograph-client — the listener side of the broadcast.
   Dark, cinematic broadcast-HUD aesthetic to match heliograph.
   ============================================================ */

/* Monospace UI faces (all Google Fonts, OFL) bundled LOCALLY — no runtime
   request to Google, fully self-contained for offline/onion use. The active
   face is selected via the --ui-font custom property (see the FONT toggle). */
@font-face { font-family: "IBM Plex Mono";  src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype");  font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono.ttf") format("truetype");         font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Space Mono";     src: url("fonts/SpaceMono-Regular.ttf") format("truetype");     font-weight: 400; font-display: swap; }
@font-face { font-family: "Share Tech Mono";src: url("fonts/ShareTechMono-Regular.ttf") format("truetype");font-weight: 400; font-display: swap; }
@font-face { font-family: "VT323";          src: url("fonts/VT323-Regular.ttf") format("truetype");         font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;

  /* Active UI font — swapped by the FONT toggle. Default: VT323 (retro-terminal). */
  --ui-font: "VT323", ui-monospace, monospace;

  --bg:        #050608;
  --bg-2:      #0a0b0d;
  --panel:     rgba(22, 24, 26, 0.42);
  --line:      rgba(205, 210, 214, 0.14);
  --line-soft: rgba(210, 214, 218, 0.08);

  /* Neutral greys — the entire UI is greyscale; only the SIGNAL/listening
     states below are coloured. */
  --ink:       #e3e6e8;   /* near-white, primary/active text */
  --ink-dim:   #949a9e;   /* mid grey */
  --ink-faint: #5c6266;   /* dim grey */

  --accent:      #c9cdd0;   /* was phosphor green — now a light neutral grey */
  --accent-deep: #6a6f73;   /* mid grey */
  --accent-glow: rgba(205, 210, 214, 0.4);

  /* THE ONLY COLOURS on the page — signal / listening status. */
  --live:         #57d98b;                  /* GREEN — live / listening (connected) */
  --live-glow:    rgba(87, 217, 139, 0.55);
  --offline:      #ff5555;                  /* RED — offline / no signal */
  --offline-glow: rgba(255, 85, 85, 0.55);

  --edge: 22px;             /* inset of the broadcast frame */
}

/* Light theme — dark stays primary, but be considerate. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef0f1; --bg-2: #e5e7e9;
    --panel: rgba(255,255,255,0.5);
    --line: rgba(60,66,72,0.22); --line-soft: rgba(30,34,38,0.10);
    --ink: #1a1d20; --ink-dim: #4b5157; --ink-faint: #838a90;
    --accent: #5b6167; --accent-deep: #3a4046; --accent-glow: rgba(90,96,102,0.32);
    --live: #1f9d57; --live-glow: rgba(31,157,87,0.35);
    --offline: #d63a3a; --offline-glow: rgba(214,58,58,0.35);
  }
}
:root[data-theme="dark"]  { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html, body { height: 100%; }

/* VT323 is a tall retro-terminal face and renders large — scale the root down
   (rem/em-based sizing follows) and tighten tracking so it matches the others. */
:root[data-font="vt323"] { font-size: 84%; letter-spacing: 0.01em; }
:root[data-font="vt323"] .signal-label,
:root[data-font="vt323"] .channel-meta,
:root[data-font="vt323"] .latency { letter-spacing: 0.1em; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(120, 126, 132, 0.09), transparent 60%),
    radial-gradient(900px 900px at 90% 110%, rgba(90, 96, 102, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%, #030304);
  color: var(--ink);
  font-family: var(--ui-font);
  font-optical-sizing: auto;
  letter-spacing: 0.01em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* --- drifting starfield backdrop --- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.1px 1.1px at 70% 60%, rgba(255,255,255,0.40), transparent),
    radial-gradient(1.3px 1.3px at 40% 80%, rgba(200,255,210,0.35), transparent),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,0.30), transparent),
    radial-gradient(1px 1px at 12% 65%, rgba(255,255,255,0.30), transparent),
    radial-gradient(1.2px 1.2px at 55% 15%, rgba(255,255,255,0.25), transparent);
  opacity: 0.6;
  animation: drift 90s linear infinite;
}
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-40px); } }

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay; opacity: 0.5;
}

/* ---------------- corner ticks (broadcast frame) ---------------- */
.ticks { position: fixed; inset: 0; pointer-events: none; z-index: 6; }
.tick { position: absolute; width: 26px; height: 26px; opacity: 0.7; }
.tick::before, .tick::after { content: ""; position: absolute; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.tick::before { width: 100%; height: 2px; } /* horizontal arm */
.tick::after  { width: 2px; height: 100%; } /* vertical arm */
.tick.tl { top: var(--edge); left: var(--edge); }
.tick.tr { top: var(--edge); right: var(--edge); }
.tick.bl { bottom: var(--edge); left: var(--edge); }
.tick.br { bottom: var(--edge); right: var(--edge); }
.tick.tl::before, .tick.bl::before { left: 0; } .tick.tr::before, .tick.br::before { right: 0; }
.tick.tl::before, .tick.tr::before { top: 0; }  .tick.bl::before, .tick.br::before { bottom: 0; }
.tick.tl::after, .tick.tr::after { top: 0; }    .tick.bl::after, .tick.br::after { bottom: 0; }
.tick.tl::after, .tick.bl::after { left: 0; }   .tick.tr::after, .tick.br::after { right: 0; }

/* ---------------- HUD layout ---------------- */
.hud {
  position: relative; z-index: 7;
  height: 100vh; height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: clamp(10px, 2.2vh, 26px);
  padding: clamp(30px, 5vw, 58px) clamp(30px, 5vw, 64px) clamp(40px, 6vh, 64px);
}

/* header */
.hud-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.hud-top-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.signal { display: flex; align-items: center; gap: 10px; font-size: clamp(0.72rem, 1.4vw, 0.9rem); letter-spacing: 0.22em; }
.signal-label { color: var(--ink-dim); }
/* Offline is the default state — RED dot + text. */
.signal-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--offline); box-shadow: 0 0 10px var(--offline-glow); transition: background .3s, box-shadow .3s; }
.signal-state { color: var(--offline); font-weight: 600; }

/* Live — GREEN dot (pulsing) + text. */
body[data-signal="live"] .signal-dot {
  background: var(--live);
  box-shadow: 0 0 0 0 var(--live-glow);
  animation: pulse 1.4s ease-out infinite;
}
body[data-signal="live"] .signal-state { color: var(--live); text-shadow: 0 0 12px var(--live-glow); }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--live-glow); }
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.channel { text-align: right; }
.channel-name {
  font-family: var(--ui-font);
  font-weight: 600; letter-spacing: 0.14em;
  font-size: clamp(1.05rem, 2.6vw, 1.9rem);
  color: var(--ink);
}
.numero { color: var(--ink-dim); }
.channel-meta {
  margin-top: 4px; font-size: clamp(0.64rem, 1.2vw, 0.82rem);
  letter-spacing: 0.2em; color: var(--ink-dim);
}
.channel-meta .sep { opacity: 0.45; margin: 0 6px; }
.channel-title { margin-top: 6px; font-size: clamp(0.72rem, 1.4vw, 0.92rem); letter-spacing: 0.06em; color: var(--ink); }
.channel-title .ct-note { color: var(--ink-dim); }
.channel-title .ct-note::before { content: " — "; color: var(--ink-faint); }

/* latency HUD */
.latency {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: clamp(0.58rem, 1vw, 0.7rem); letter-spacing: 0.12em;
  color: var(--ink-dim); cursor: help;
}
.lat { display: inline-flex; align-items: baseline; gap: 6px; }
.lat b { color: var(--ink-faint); font-weight: 600; }
/* Each metric is LABEL + value with a consistent 6px gap (from .lat). The value is its NATURAL
   width — NOT a right-aligned min-width cell: that made short values (BUF 6.2 s) sit far from their
   label while long ones (2377 ms) touched it, and because the ch-cell scales with the font it looked
   worse in some faces. tabular-nums keeps the digits themselves even. */
.lat .mono { color: var(--accent); font-variant-numeric: tabular-nums; }
.lat.caveat .mono { color: var(--ink-dim); }
.lat sup { font-size: 0.7em; color: var(--ink-dim); }
/* AUDIO LAG — the headline number */
.lat.headline b { color: var(--ink-dim); }
.lat.headline .mono { color: var(--accent); font-size: 1.05em; text-shadow: 0 0 12px var(--accent-glow); }
.lat.dim { opacity: 0.6; }
.lat.dim .mono { color: var(--ink-dim); }

/* full-bleed visual layer — fills the entire viewport, all 4 corners */
.visual {
  position: fixed; inset: 0; z-index: 1; overflow: hidden;
  background: transparent; /* body gradient + starfield show through in standby */
}
#frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;             /* full-bleed — fill all corners, edge crop is fine */
  opacity: 0; transition: opacity .6s ease;
  transform-origin: center center;
  will-change: transform;
}
body[data-signal="live"] #frame { opacity: 1; }

/* Very slow Ken-Burns breathing zoom — a barely-perceptible living drift while
   live. Scales UP only (1 → 1.06) so `object-fit: cover` never reveals edges. */
@keyframes frame-breathe {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}
body[data-signal="live"] #frame {
  animation: frame-breathe 50s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  body[data-signal="live"] #frame { animation: none; transform: none; }
}

/* legibility vignette — soft dark top & bottom + gentle edge falloff. Minimal:
   the visualizer should dominate. */
.scrim {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(3,4,6,0.70) 0%, rgba(3,4,6,0.14) 16%, rgba(3,4,6,0) 32%,
      rgba(3,4,6,0) 60%, rgba(3,4,6,0.34) 82%, rgba(3,4,6,0.80) 100%),
    radial-gradient(150% 120% at 50% 50%, rgba(0,0,0,0) 52%, rgba(0,0,0,0.34) 100%);
}

/* stage row is now just a transparent flexible spacer */
.stage { min-height: 0; }

/* standby state — full-bleed */
.standby {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center;
  transition: opacity .5s ease;
}
body[data-signal="live"] .standby { opacity: 0; pointer-events: none; }
.standby-ring {
  width: clamp(54px, 9vw, 96px); aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid var(--accent); margin-bottom: 14px;
  box-shadow: 0 0 30px -6px var(--accent-glow), inset 0 0 20px -6px var(--accent-glow);
  position: relative; opacity: 0.85; animation: breathe 3.6s ease-in-out infinite;
}
.standby-ring::after {
  content: ""; position: absolute; inset: 34%; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 16px var(--accent-glow);
}
@keyframes breathe { 0%,100%{ transform: scale(0.94); opacity:.6 } 50%{ transform: scale(1.06); opacity:.95 } }
.standby-title {
  font-family: var(--ui-font); font-weight: 600;
  letter-spacing: 0.42em; font-size: clamp(0.9rem, 2.2vw, 1.4rem); color: var(--ink);
}
.standby-sub { letter-spacing: 0.28em; font-size: 0.72rem; color: var(--ink-dim); }
.standby-last { margin-top: 14px; font-size: 0.78rem; letter-spacing: 0.16em; color: var(--accent); text-shadow: 0 0 12px var(--accent-glow); }
.standby-hint { margin-top: 8px; font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.04em; }

/* Clean, minimal OFFLINE screen — keep only SIGNAL ● NONE + the centre STANDBY.
   Hide the dead metric rows / dashes when nothing is live. */
body[data-signal="offline"] .latency,
body[data-signal="offline"] .channel,
body[data-signal="offline"] .telemetry { display: none; }

/* transport */
.transport {
  display: flex; align-items: center; gap: clamp(14px, 3vw, 30px);
  padding: 14px clamp(16px, 2.5vw, 24px);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(8px);
  border-radius: 4px;
}

.play {
  flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--accent); background: rgba(205,210,214,0.06);
  color: var(--accent); cursor: pointer; position: relative;
  display: grid; place-items: center; transition: transform .15s, background .2s, box-shadow .2s, opacity .2s;
}
.play:hover:not(:disabled) { background: rgba(205,210,214,0.14); box-shadow: 0 0 24px -6px var(--accent-glow); }
.play:active:not(:disabled) { transform: scale(0.94); }
.play:disabled { opacity: 0.35; cursor: not-allowed; border-color: var(--ink-faint); color: var(--ink-faint); }
/* now-playing / listening indicator — GREEN while audio is playing */
body[data-state="playing"] .play { border-color: var(--live); color: var(--live); }
body[data-state="playing"] .play:hover:not(:disabled) { box-shadow: 0 0 24px -6px var(--live-glow); }
.play svg { width: 24px; height: 24px; fill: currentColor; position: absolute; }
.play .i-pause, .play .i-load { display: none; }
.play .i-play { transform: translateX(1px); }
body[data-state="playing"] .play .i-play { display: none; }
body[data-state="playing"] .play .i-pause { display: block; }
body[data-state="loading"] .play .i-play,
body[data-state="loading"] .play .i-pause { display: none; }
body[data-state="loading"] .play .i-load { display: block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.transport-mid { flex: 1 1 auto; min-width: 0; }
.transport-line { display: flex; align-items: baseline; gap: 12px; }
.tx-tag {
  font-family: var(--ui-font); font-weight: 600; letter-spacing: 0.24em;
  font-size: 0.78rem; padding: 2px 8px; border-radius: 2px;
  /* OFFLINE tag — RED to match the signal state */
  border: 1px solid var(--offline); color: var(--offline);
}
/* live but idle (ON AIR) → neutral grey */
body[data-signal="live"] .tx-tag { color: var(--ink); border-color: var(--line); }
/* actively listening (audio playing) → GREEN */
body[data-state="playing"] .tx-tag { color: var(--live); border-color: var(--live); }
.tx-detail { color: var(--ink-dim); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock { margin-top: 6px; font-size: 0.7rem; letter-spacing: 0.16em; color: var(--ink-faint); }
.clock #clockTime, .clock #onAir { color: var(--ink-dim); }
.clock .clock-sep { opacity: 0.4; margin: 0 8px; }

/* board toggle button in the transport */
.board-toggle {
  position: relative; /* anchor for the unread badge */
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 3px;
  background: rgba(205,210,214,0.04); color: var(--ink-dim); cursor: pointer;
  font-family: var(--ui-font); font-weight: 600; letter-spacing: 0.2em; font-size: 0.72rem;
  transition: color .2s, border-color .2s, background .2s;
}
.board-toggle:hover { color: var(--accent); border-color: var(--accent); background: rgba(205,210,214,0.1); }
.board-toggle svg { width: 18px; height: 18px; }
body[data-board="open"] .board-toggle { color: var(--accent); border-color: var(--accent); }

/* FONT cycler — compact, unobtrusive; click cycles the 5 monospace faces */
.font-toggle {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 3px;
  background: rgba(205,210,214,0.04); color: var(--ink-dim); cursor: pointer;
  font-family: var(--ui-font); letter-spacing: 0.14em; font-size: 0.7rem;
  transition: color .2s, border-color .2s, background .2s;
}
.font-toggle:hover { color: var(--accent); border-color: var(--accent); background: rgba(205,210,214,0.1); }
.font-toggle .font-ico { font-weight: 700; font-size: 0.9rem; line-height: 1; color: var(--accent); }
.font-toggle .font-name { min-width: 5.5em; text-align: left; color: var(--ink); }

/* integrated unread count — the single notification indicator */
.board-badge {
  position: absolute; top: -8px; right: -8px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--bg);
  font-family: var(--ui-font); font-weight: 600; font-size: 0.64rem; letter-spacing: 0; line-height: 1;
  box-shadow: 0 0 12px -3px var(--accent-glow); border: 1px solid rgba(0,0,0,0.35);
  animation: notify-in .28s ease-out;
}
.board-badge[hidden] { display: none; }
@keyframes notify-in { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.volume { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.mute { background: none; border: none; color: var(--ink-dim); cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; }
.mute:hover { color: var(--accent); }
.mute svg { width: 22px; height: 22px; fill: currentColor; }
.mute .i-muted { display: none; }
body[data-muted="true"] .mute .i-vol { display: none; }
body[data-muted="true"] .mute .i-muted { display: block; }
body[data-muted="true"] .mute { color: var(--ink); }

.vol-slider { -webkit-appearance: none; appearance: none; width: clamp(70px, 12vw, 130px); height: 3px; background: var(--line); border-radius: 3px; outline: none; cursor: pointer; }
.vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.vol-slider::-moz-range-thumb { width: 13px; height: 13px; border: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }

/* footer */
.hud-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.telemetry { display: flex; flex-wrap: wrap; gap: clamp(12px, 2.4vw, 30px); font-size: clamp(0.6rem, 1.1vw, 0.74rem); letter-spacing: 0.14em; color: var(--ink-dim); }
.telemetry b { color: var(--ink-faint); font-weight: 600; margin-right: 6px; }
.telemetry .mono { color: var(--accent); }

/* ---------------- full-width level meter (fixed bottom edge) ---------------- */
.meter {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  height: 12px; width: 100vw;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(205,210,214,0.03), transparent);
  pointer-events: none;
}
.meter canvas { display: block; width: 100%; height: 100%; }

/* ---------------- message board drawer ---------------- */
.board-scrim {
  position: fixed; inset: 0; z-index: 18; background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s;
}
body[data-board="open"] .board-scrim { opacity: 1; }

.board {
  position: fixed; top: 0; right: 0; z-index: 20;
  width: min(400px, 92vw); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(10,14,18,0.96), rgba(6,9,12,0.98));
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 80px -30px rgba(0,0,0,0.9);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1);
  padding: clamp(20px, 3vw, 30px) clamp(18px, 2.5vw, 26px) 18px;
}
body[data-board="open"] .board { transform: translateX(0); }

.board-head { display: flex; align-items: center; justify-content: space-between; }
.board-title { font-family: var(--ui-font); font-weight: 600; letter-spacing: 0.22em; font-size: 0.92rem; color: var(--ink); }
.board-count { color: var(--accent); font-size: 0.72rem; margin-left: 6px; }
.board-close { background: none; border: none; color: var(--ink-dim); font-size: 1.1rem; cursor: pointer; line-height: 1; padding: 4px; }
.board-close:hover { color: var(--accent); }
.board-note { margin-top: 8px; font-size: 0.68rem; letter-spacing: 0.04em; color: var(--ink-faint); }

.board-list {
  list-style: none; margin: 16px 0; padding: 0 4px 0 0; flex: 1 1 auto;
  overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: var(--accent-deep) transparent;
}
.board-list::-webkit-scrollbar { width: 6px; }
.board-list::-webkit-scrollbar-thumb { background: var(--accent-deep); border-radius: 3px; }
.board-empty { color: var(--ink-faint); font-size: 0.78rem; text-align: center; margin-top: 30px; }

.msg {
  border: 1px solid var(--line-soft); border-left: 2px solid var(--accent-deep);
  border-radius: 3px; padding: 9px 12px; background: rgba(205,210,214,0.02);
}
.msg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.msg-name { font-family: var(--ui-font); font-weight: 600; letter-spacing: 0.06em; color: var(--accent); font-size: 0.82rem; word-break: break-word; }
.msg-time { font-size: 0.62rem; letter-spacing: 0.1em; color: var(--ink-faint); white-space: nowrap; flex: 0 0 auto; }
.msg-text { font-size: 0.86rem; line-height: 1.45; color: var(--ink); word-break: break-word; white-space: pre-wrap; }

.board-form { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.board-name, .board-text {
  background: rgba(0,0,0,0.35); border: 1px solid var(--line); border-radius: 3px;
  color: var(--ink); padding: 9px 11px; font-family: inherit; font-size: 0.82rem; letter-spacing: 0.02em; outline: none;
}
.board-name:focus, .board-text:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-glow); }
.board-name::placeholder, .board-text::placeholder { color: var(--ink-faint); }
.board-send-row { display: flex; gap: 8px; }
.board-text { flex: 1 1 auto; min-width: 0; }
.board-send {
  flex: 0 0 auto; padding: 0 16px; border: 1px solid var(--accent); border-radius: 3px;
  background: rgba(205,210,214,0.08); color: var(--accent); cursor: pointer;
  font-family: var(--ui-font); font-weight: 600; letter-spacing: 0.16em; font-size: 0.76rem;
  transition: background .2s;
}
.board-send:hover:not(:disabled) { background: rgba(205,210,214,0.18); }
.board-send:disabled { opacity: 0.4; cursor: not-allowed; }
.board-status { font-size: 0.68rem; letter-spacing: 0.04em; color: var(--ink-faint); min-height: 1em; }
.board-status.err { color: var(--ink); }
.board-status.ok { color: var(--accent); }

/* ---------------- responsive ---------------- */
@media (max-width: 720px) {
  :root { --edge: 12px; }
  .hud { padding: 26px 20px 40px; gap: 12px; }
  .transport { flex-wrap: wrap; }
  .transport-mid { order: 3; flex-basis: 100%; }
  .hud-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .channel-meta { font-size: 0.6rem; }
}
@media (max-height: 560px) {
  .standby-hint { display: none; }
}
