/* Shared look of the PoC 1 apps (interpreter station, user app, B-side app). Each is laid out for a portrait
   frame (about 900 x 1200) so that the stage can show three side by side and they stay readable. */
:root {
  --bg: #eef1f5; --surface: #ffffff; --fg: #17202c; --muted: #5b6676; --line: #d5dbe4;
  --accent: #2557d6; --ok: #127a3a; --warn: #a15c07; --bad: #b42318;
  --me: #2557d6; --them: #17202c;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #10151c; --surface: #18202a; --fg: #e4e9f0; --muted: #98a3b3; --line: #2c3746;
  --accent: #7aa2ff; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --me: #8fb1ff; --them: #e4e9f0; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #10151c; --surface: #18202a; --fg: #e4e9f0; --muted: #98a3b3; --line: #2c3746;
  --accent: #7aa2ff; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --me: #8fb1ff; --them: #e4e9f0; color-scheme: dark }
* { box-sizing: border-box; }
body { margin: 0; font: 18px/1.4 var(--font); background: var(--bg); color: var(--fg); }
.app { display: grid; gap: 12px; padding: 14px; max-width: 980px; margin: 0 auto; }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.title { font-weight: 600; font-size: 22px; margin-right: auto; }
.title small { color: var(--muted); font-weight: 400; font-size: 15px; margin-left: 6px; }
button { font: inherit; font-size: 17px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--bad); border-color: var(--bad); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
input { font: inherit; font-size: 17px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); min-width: 0; }
.chip { padding: 3px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 15px; }
.chip.available, .chip.connected, .chip.up { color: var(--ok); border-color: var(--ok); }
.chip.unavailable, .chip.queued, .chip.wrap-up, .chip.ringing, .chip.calling { color: var(--warn); border-color: var(--warn); }
.status { font-size: 20px; font-weight: 500; min-height: 1.4em; }
.stage-video { position: relative; }
.stage-video video.remote { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; display: block; }
.stage-video video.local { position: absolute; right: 10px; bottom: 10px; width: 26%; border: 2px solid rgba(255,255,255,.7); border-radius: 6px; background: #000; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 8px; min-width: 0; }
.panel h2 { font-size: 15px; margin: 0; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.textwin { min-height: 88px; max-height: 160px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 21px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.textwin .me { color: var(--me); }
.textwin .them { color: var(--them); }
.textwin:empty::before { content: attr(data-empty); color: var(--muted); font-size: 16px; }
.typehere { width: 100%; }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 12px; font-size: 15px; }
.meter { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: center; }
.meter i { display: block; height: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.meter b { display: block; height: 100%; width: 0; background: var(--ok); transition: width .2s linear; }
.offer { border: 2px solid var(--accent); }
.leg { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.leg .top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.leg .top b { margin-right: auto; }
.leg .media { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.log { height: 90px; overflow: auto; font: 12px/1.3 var(--mono); color: var(--muted); white-space: pre-wrap; }
.hidden { display: none !important; }
/* the stage marks what the demo is about to click */
.pointing { box-shadow: 0 0 0 4px #f59e0b, 0 0 22px 6px rgba(245, 158, 11, .55) !important; transition: box-shadow .2s; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* inside the demo stage: no debug log, shorter text windows, so each app fits its pane without scrolling */
.in-stage .log { display: none; }
.in-stage .textwin { min-height: 58px; max-height: 118px; }
.in-stage .app { gap: 10px; }
.in-stage body.station .stage-video video.remote { max-height: 390px; }
