/* Kora Studio pages (guest join and waiting room, host, producer). A Turman Technology product.
   Brand: Night background, Kora Gold primary buttons with Night text, Cream text, Kora Red for
   LIVE / record / cut / errors, Kora Green for ready / connected. Font: Poppins (self-hosted, OFL).
   Phone first; works in the Android WebView of the Kora Studio app.
   These are the people's pages only: the composed on-air picture (program.css) never carries a
   logo, a clock or the tagline. */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("/static/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("/static/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("/static/poppins-700.woff2") format("woff2"); }
:root {
  --night: #0E1424; --card: #1A2238; --card-2: #252F4D; --gold: #FDB203; --cream: #FDF7EE; --red: #CE0601; --green: #019634;
  --bg: var(--night); --panel: var(--card); --fg: var(--cream); --muted: #ADA9A6; --line: rgba(253, 247, 238, .14);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.45 "Poppins", "Segoe UI", Roboto, Arial, sans-serif; }
body { min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
/* ---- host cues (charter d43b297 item 5): readable from 2 m on a phone or tablet; never in the program ---- */
.cues { position: sticky; top: 0; z-index: 20; }
.cue { border-radius: 8px; padding: 10px 14px; margin: 8px 0; background: var(--panel); border-left: 8px solid var(--line); }
.cue-main .cue-text { font-size: max(9vw, 34px); font-weight: 700; line-height: 1.05; }
.cue-small .cue-text { font-size: max(4.5vw, 18px); font-weight: 700; }
.cue-warn { border-left-color: var(--gold); }
.cue-urgent { border-left-color: var(--red); background: #3a0d12; }
.cue-script { font-size: max(4.2vw, 18px); line-height: 1.35; margin-top: 10px; white-space: pre-wrap; }
.cue-flash { animation: cue-flash .5s ease-out 2; }
@keyframes cue-flash { 50% { background: var(--red); } }
.cue-clock { margin: 4px 0 8px; }
@media (min-width: 768px) { .cue-main .cue-text { font-size: max(6vw, 40px); } .cue-small .cue-text { font-size: 3vw; } .cue-script { font-size: 2.6vw; } }
/* producer page Cut: always visible (charter item 8) */
.cut { display: block; width: 100%; padding: 18px; margin: 10px 0; background: var(--red); color: var(--cream); font-size: 20px; font-weight: 700; border: 0; border-radius: 8px; }

/* Brand bar (same on every page) and the footer line */
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.brandbar .logo { height: 40px; width: auto; display: block; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.lang button { background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 0; font-weight: 500; font-size: 14px; }
.lang button[aria-pressed="true"] { background: var(--gold); color: var(--night); }
.powered { margin-top: auto; padding: 18px 16px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); text-align: center; font-size: 12px; color: var(--muted); letter-spacing: .3px; }

main { width: 100%; max-width: 760px; margin: 0 auto; padding: 16px; }
h1 { font-size: 24px; font-weight: 700; margin: 8px 0 12px; }
h2 { font-size: 18px; font-weight: 500; margin: 20px 0 8px; color: var(--gold); }
p { margin: 8px 0; }
.small { font-size: 13px; color: var(--muted); }
.err { background: var(--red); color: var(--cream); padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.err:empty { display: none; }
button, a.big { font: inherit; border: 0; border-radius: 10px; cursor: pointer; }
input, select { font: inherit; background: var(--night); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; }
input::placeholder { color: var(--muted); }
input[type="checkbox"] { accent-color: var(--gold); }
input:focus, select:focus, button:focus-visible, a.big:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
summary { cursor: pointer; color: var(--gold); padding: 6px 0; }
.big { display: block; width: 100%; padding: 16px; margin: 14px 0; background: var(--gold); color: var(--night); font-size: 18px; font-weight: 700; text-align: center; text-decoration: none; }
.big:disabled { opacity: .5; }
.ghost { padding: 10px 14px; background: var(--card-2); color: var(--fg); border: 1px solid var(--line); }
.danger { background: var(--red); color: var(--cream); padding: 10px 14px; font-weight: 500; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.consent { font-size: 18px; padding: 12px; background: var(--panel); border-left: 4px solid var(--gold); border-radius: 6px; }
.tick { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.tick input { width: 22px; height: 22px; flex: none; accent-color: var(--gold); }
video#self { width: 100%; max-height: 50vh; background: #000; border-radius: 10px; transform: scaleX(-1); object-fit: cover; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 6px; font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; }
.badge.wait { background: var(--panel); color: var(--fg); }
.badge.air { background: var(--red); color: var(--cream); }
.badge.wait::before, .status.ok::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: 1px; }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding: 10px 12px; margin: 6px 0; background: var(--panel); border-left: 6px solid var(--muted); border-radius: 6px; }
ul.checks li.green { border-left-color: var(--green); }
ul.checks li.amber { border-left-color: var(--gold); }
ul.checks li.red { border-left-color: var(--red); }
.meter .bar { height: 10px; background: var(--panel); border-radius: 5px; overflow: hidden; margin: 6px 0 12px; }
.meter .bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .1s; }

/* Program monitor: the 1920x1080 stage scaled into the page (low-latency WebRTC, not the channel output). */
.monitor { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: 8px; }
.monitor #stage { position: absolute; left: 0; top: 0; right: auto; bottom: auto; transform-origin: 0 0; }
.monitor .safe { position: absolute; inset: 0; pointer-events: none; }

.card { background: var(--panel); border-radius: 10px; padding: 12px; margin: 10px 0; }
.card .who { font-weight: 700; }
.state { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 13px; font-weight: 700; }
.state.ready { background: var(--green); color: var(--cream); } .state.warning { background: var(--gold); color: var(--night); }
.state.blocked { background: var(--red); color: var(--cream); } .state.not_done { background: var(--card-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.grid video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; object-fit: cover; }
.status { padding: 8px 12px; border-radius: 6px; background: var(--panel); margin: 8px 0; }
.status.ok { border-left: 4px solid var(--green); }
.status.onair { background: var(--red); color: var(--cream); font-weight: 700; }
.log { font: 12px/1.4 ui-monospace, Menlo, monospace; max-height: 240px; overflow: auto; background: #080C17; color: var(--muted); padding: 8px; border-radius: 6px; }
.notice { padding: 10px 12px; background: var(--gold); color: var(--night); border-radius: 6px; margin: 8px 0; font-weight: 500; }

/* Phone camera (Serge, Nov 11): camera, mic and status only; every control is on the tablet. */
body[data-device="camera"] .host-controls { display: none; }
#device .big { display: block; width: 100%; margin: 10px 0; }
