/* ═══════════════════════════════════════════════════════════
   KAI live-paneel – jagatud stiilid (osaleja · moderaator · ekraan)
   ═══════════════════════════════════════════════════════════ */
:root {
  --navy:        #012f60;
  --navy-2:      #0a3d73;
  --navy-3:      #0e4d96;
  --blue:        #2198d2;
  --blue-bright: #009ae1;
  --green:       #aeca20;
  --green-dark:  #55690d;
  --bg:    #eef2f8;
  --panel: #ffffff;
  --text:  #0d1f35;
  --text2: #3a5272;
  --muted: #6b7c93;
  --line:  rgba(1,47,96,.1);
  --amber: #e8a317;
  --rose:  #d85a30;
  --shadow-sm: 0 2px 8px rgba(1,47,96,.08), 0 1px 3px rgba(1,47,96,.05);
  --shadow-md: 0 6px 20px rgba(1,47,96,.1), 0 2px 6px rgba(1,47,96,.06);
  --shadow-lg: 0 20px 60px rgba(1,47,96,.16), 0 8px 24px rgba(1,47,96,.1);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Open Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 130% 70% at 50% -5%, #c5d8ee 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 95% 95%, rgba(174,202,32,.1) 0%, transparent 45%),
    #dfe6f0;
  min-height: 100vh;
  min-height: 100dvh;
}
h1, h2, h3 { font-family: "Lato", sans-serif; }
a { color: var(--blue-bright); }
button { font-family: inherit; }

/* ───────── Header (osaleja + moderaator) ───────── */
.top {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  color: #fff;
}
.top::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 220% 160% at 105% -10%, rgba(33,152,210,.3) 0, transparent 55%),
    radial-gradient(ellipse 100% 120% at -15% 110%, rgba(174,202,32,.1) 0, transparent 50%);
  pointer-events: none;
}
.top-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  /* Turvaala: live.html-il on viewport-fit=cover – vt sama põhjendust styles.css-is. */
  padding: calc(14px + env(safe-area-inset-top, 0px)) calc(18px + env(safe-area-inset-right, 0px)) 14px calc(18px + env(safe-area-inset-left, 0px));
  max-width: 960px; margin: 0 auto;
}
.top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top .logo {
  height: 26px; background: #fff; padding: 4px 9px; border-radius: 7px; display: block;
}
/* min-width:0 on flexis kohustuslik, muidu ei kahane laps ega tööta ellipsis. */
.top-left > div { min-width: 0; }
.top h1 {
  font-size: 16px; font-weight: 900; margin: 0; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top .sub {
  font-size: 11.5px; color: rgba(167,203,235,.8); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Kitsal telefonil ei mahu "Teedepäev 2026 · 12. november 2026" ühele reale ja
   "2026" jäi üksinda teisele reale, vastu Vestluse nuppu. Ürituse nime kordamine
   on siin niikuinii üleliigne – osaleja teab, kus ta on. Kuupäev jääb. */
@media (max-width: 430px) {
  .top .sub-ev, .top .sub-sep { display: none; }
}
/* Kõige kitsamad telefonid (iPhone SE): pealkiri mahub tervikuna ära, kui
   kirja pisut vähendada – parem kui "Küsimused & h…". Nupp ei tohi murduda. */
@media (max-width: 360px) {
  .top h1 { font-size: 14px; }
  .top .back-link { white-space: nowrap; }
}
.top-badge {
  font-family: "Lato", sans-serif; font-weight: 800; font-size: 10px; letter-spacing: .9px;
  color: var(--navy); background: var(--green); padding: 4px 10px; border-radius: 6px;
  text-transform: uppercase; white-space: nowrap;
}
.back-link {
  color: rgba(255,255,255,.85); text-decoration: none; font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 6px 12px;
  transition: background .15s;
}
.back-link:hover { background: rgba(255,255,255,.12); }
.accent {
  height: 3px;
  background: linear-gradient(90deg, var(--green) 0%, var(--blue-bright) 48%, rgba(1,47,96,.35) 100%);
}

/* Ühenduse-indikaator */
.conn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.7);
}
.conn .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #98a8bd;
  transition: background .2s;
}
.conn.live .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(174,202,32,.22); animation: pulse 2s infinite; }
.conn.live { color: var(--green); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 2px rgba(174,202,32,.22); } 50% { box-shadow: 0 0 0 6px rgba(174,202,32,.05); } }

/* ───────── Layout wrap ───────── */
/* Alumine 96px hoiab viimase kaardi koduindikaatorist eemal; turvaala lisandub. */
.wrap {
  max-width: 720px; margin: 0 auto;
  padding: 18px calc(16px + env(safe-area-inset-right, 0px))
           calc(96px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
}
.wrap.wide { max-width: 1100px; }

/* ───────── Card ───────── */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.card-title .count {
  background: #eef2f7; color: var(--navy); border-radius: 999px;
  padding: 2px 9px; font-size: 11px; font-weight: 800;
}

/* ───────── Buttons ───────── */
.btn {
  border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: 14px; padding: 12px 18px;
  background: linear-gradient(145deg, var(--blue-bright), #0878bb); color: #fff;
  box-shadow: 0 4px 16px rgba(0,154,225,.32);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(0,154,225,.42); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn.ghost {
  background: #f4f8fc; color: var(--navy); border: 1.5px solid var(--line); box-shadow: none;
}
.btn.ghost:hover { background: #e9f6fd; border-color: var(--blue-bright); }
.btn.sm { font-size: 12.5px; padding: 7px 12px; border-radius: 9px; }
.btn.danger { background: #fff; color: var(--rose); border: 1.5px solid rgba(216,90,48,.4); box-shadow: none; }
.btn.danger:hover { background: var(--rose); color: #fff; border-color: var(--rose); }

/* ───────── Inputs ───────── */
.field { width: 100%; }
textarea.inp, input.inp {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  /* 16px EI OLE esteetiline valik: iOS Safari suumib lehe sisse iga
     fookuses välja puhul, mille kiri on alla 16px, ega suumi tagasi.
     Ära vii allapoole. Alternatiiv (user-scalable=no) tapaks
     näpuga suurendamise ära ja on ligipääsetavuse regressioon. */
  padding: 12px 14px; font-size: 16px; font-family: inherit; color: var(--text);
  background: #f6f9fc; outline: none; resize: vertical;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
textarea.inp:focus, input.inp:focus {
  border-color: var(--blue-bright); background: #fff;
  box-shadow: 0 0 0 4px rgba(0,154,225,.1);
}
.row { display: flex; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; }
.hint { font-size: 12px; color: var(--muted); }

/* Küsimuse esitamine on ainus koht, kust osaleja ise saab midagi teha –
   pikk küsimuste nimekiri ei tohi seda kerimisega vaate alt ära viia. */
.ask-card { position: sticky; top: 8px; z-index: 40; }
.ask-hint {
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text2);
  margin: -4px 0 12px;
}

/* "Mis praegu käib" – annab küsimusele konteksti (mille kohta ma küsin?) */
.nownow {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 12px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.nownow .now-tag {
  flex: none; font-family: "Lato", sans-serif; font-weight: 900; font-size: 10px;
  letter-spacing: .1em; color: var(--navy); background: var(--green);
  padding: 3px 8px; border-radius: 6px;
}
.nownow .now-txt { font-size: 12.5px; color: var(--text); line-height: 1.35; flex: 1 1 auto; min-width: 0; }
.nownow .now-txt b { color: var(--navy); }
.nownow .now-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* Faasi selgitus, kui küsimusi veel/enam esitada ei saa */
.phase-note {
  background: #eef2f7; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 12px; font-size: 12.5px; color: var(--text2);
}
.char { font-size: 11px; color: var(--muted); }

/* ───────── Question list ───────── */
.q-list { display: flex; flex-direction: column; gap: 10px; }
.q-empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 13.5px; }
.q {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  animation: cardIn .3s cubic-bezier(.2,.7,.3,1) both;
  transition: border-color .15s, box-shadow .15s, opacity .2s;
}
.q.starred { border-color: rgba(232,163,23,.5); background: linear-gradient(180deg,#fffdf6,#fff); }
.q.answered { opacity: .6; }
.q.dismissed { display: none; }
@keyframes cardIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }

.vote {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1.5px solid var(--line); border-radius: 11px; background: #f6f9fc;
  padding: 6px 10px; cursor: pointer; min-width: 46px;
  transition: all .15s cubic-bezier(.2,.7,.3,1);
}
.vote:hover { border-color: var(--blue-bright); background: #e9f6fd; transform: translateY(-1px); }
.vote.voted { background: var(--navy); border-color: var(--navy); color: #fff; }
.vote .arrow { font-size: 13px; line-height: 1; }
.vote .num { font-weight: 900; font-size: 15px; font-family: "Lato", sans-serif; line-height: 1.1; }
.vote.voted .num { color: #fff; }

.q-body { min-width: 0; flex: 1; }
.q-text { font-size: 14.5px; line-height: 1.5; color: var(--text); word-wrap: break-word; }
.q-meta { margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-author { font-size: 12px; color: var(--muted); font-weight: 600; }
.tag {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  border-radius: 999px; padding: 2px 8px;
}
.tag.answered { background: rgba(85,105,13,.14); color: var(--green-dark); }
.tag.star { background: rgba(232,163,23,.16); color: #9a6b06; }
.tag.spot { background: rgba(0,154,225,.14); color: #0078b3; }

/* moderaatori tegevusnupud ühe küsimuse all */
.q-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.icon-btn {
  border: 1.5px solid var(--line); background: #fff; border-radius: 9px;
  padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text2);
  display: inline-flex; align-items: center; gap: 5px; transition: all .14s;
}
.icon-btn:hover { border-color: var(--blue-bright); color: var(--navy); background: #f2f9fe; }
.icon-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.icon-btn.star.on { background: var(--amber); border-color: var(--amber); }
.icon-btn.spot.on { background: var(--blue-bright); border-color: var(--blue-bright); color: #fff; }
/* Küsimustevooru lõpetamine: eraldi real, filtrinuppudest eemal – laval ei tohi
   see sattuda "Aktiivsed/Vastatud/Kõik" kõrvale, kus sõrm käib tihti. */
.q-arch { display: flex; flex-direction: column; gap: 5px; margin-top: 14px;
  padding-top: 13px; border-top: 1px solid var(--line); align-items: flex-start; }
.icon-btn.arch { padding: 8px 13px; }
.icon-btn.arch.armed { background: var(--amber); border-color: var(--amber); color: var(--navy); }

/* ───────── Poll ───────── */
.poll-q { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 14px; line-height: 1.35; }
.poll-opts { display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  position: relative; width: 100%; text-align: left; cursor: pointer; overflow: hidden;
  border: 1.5px solid var(--line); border-radius: 12px; background: #f6f9fc;
  padding: 13px 16px; font-size: 14.5px; font-weight: 700; color: var(--navy);
  transition: all .15s cubic-bezier(.2,.7,.3,1);
}
.opt-btn:hover:not(:disabled) { border-color: var(--blue-bright); background: #e9f6fd; transform: translateY(-1px); }
.opt-btn:disabled { cursor: default; }
/* tulemuse-riba (täidab tausta protsendi võrra) */
.opt-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, rgba(0,154,225,.18), rgba(174,202,32,.2));
  transition: width .6s cubic-bezier(.2,.7,.3,1); z-index: 0;
}
.opt-btn.chosen .opt-bar { background: linear-gradient(90deg, rgba(0,154,225,.32), rgba(0,154,225,.22)); }
.opt-row { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.opt-pct { font-family: "Lato", sans-serif; font-weight: 900; font-size: 14px; color: var(--text2); white-space: nowrap; }
.opt-btn.chosen .opt-pct { color: var(--blue-bright); }
.poll-total { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; }
.poll-status {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  padding: 3px 9px; border-radius: 999px;
}
.poll-status.open { background: rgba(174,202,32,.16); color: var(--green-dark); }
.poll-status.closed { background: #eef2f7; color: var(--muted); }

/* ───────── Toast ───────── */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .3s cubic-bezier(.2,.7,.3,1); z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--rose); }

/* ───────── Moderaatori paigutus ───────── */
.mod-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .mod-grid { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.lock {
  max-width: 380px; margin: 80px auto; text-align: center;
}
.lock .card { padding: 26px 22px; }
.lock h2 { margin: 0 0 6px; color: var(--navy); }
.lock p { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }

/* poll-vormi valikuread */
.opt-edit { display: flex; gap: 8px; margin-bottom: 8px; }
.opt-edit input { flex: 1; }
.opt-edit .rm { flex: 0 0 auto; }

/* ═══════════════════════════════════════════════════════════
   EKRAAN (projektorivaade) – tume, suur
   ═══════════════════════════════════════════════════════════ */
body.screen {
  background:
    radial-gradient(ellipse 90% 70% at 70% 10%, #0e4d8a 0%, transparent 60%),
    radial-gradient(ellipse 70% 90% at 10% 95%, rgba(174,202,32,.1) 0%, transparent 55%),
    #012f60;
  color: #fff; overflow: hidden;
}
.screen-wrap {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: clamp(28px, 5vh, 64px) clamp(28px, 6vw, 110px);
}
.screen-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.screen-head .logo { height: 40px; background: #fff; padding: 6px 13px; border-radius: 10px; }
.screen-head .ev { text-align: right; }
.screen-head .ev b { display: block; font-size: 22px; font-weight: 900; font-family: "Lato",sans-serif; }
.screen-head .ev span { font-size: 14px; color: rgba(167,203,235,.85); }
.screen-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: safe center;
  min-height: 0; overflow: hidden;
  /* varu = liitumisriba TEGELIK kõrgus (mõõdetakse ekraan.js-is) + hingamisruum */
  padding-bottom: calc(var(--railh, 150px) + 28px); }   /* sisu EI tohi päise peale valguda (väiksem aken)  */

/* tühi ootevaade */
.idle { text-align: center; animation: fade .5s both; }
.idle .kicker { font-size: 16px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--green); }
.idle h2 { font-size: clamp(34px, 6vw, 68px); margin: 16px 0; line-height: 1.1; }
.idle p { font-size: clamp(16px, 2vw, 24px); color: rgba(200,220,240,.9); max-width: 22ch; margin: 0 auto; }
.idle .url {
  margin-top: 30px; display: inline-block; font-size: clamp(20px,2.4vw,30px); font-weight: 900;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  padding: 12px 26px; border-radius: 14px; font-family: "Lato",sans-serif; letter-spacing: .5px;
}

/* spotlight küsimus */
.spot-q { animation: fade .5s both; }
.spot-q .kicker { font-size: clamp(14px,1.5vw,20px); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--green); margin-bottom: 22px; }
.spot-q .text { font-size: clamp(34px, 5vw, 76px); font-weight: 900; line-height: 1.15; font-family: "Lato",sans-serif; }
.spot-q .who { margin-top: 28px; font-size: clamp(16px,2vw,26px); color: rgba(167,203,235,.9); }

/* spotlight poll */
.spot-poll { animation: fade .5s both; }
.spot-poll .text { font-size: clamp(28px, 4vw, 56px); font-weight: 900; font-family:"Lato",sans-serif; line-height:1.15; margin-bottom: clamp(24px,4vh,48px); }
.sbars { display: flex; flex-direction: column; gap: clamp(14px,2.4vh,26px); }
.sbar { }
.sbar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sbar-label { font-size: clamp(18px,2.2vw,30px); font-weight: 800; }
.sbar-pct { font-size: clamp(20px,2.6vw,36px); font-weight: 900; font-family:"Lato",sans-serif; color: var(--green); }
.sbar-track { height: clamp(20px,3vh,32px); background: rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; }
.sbar-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-bright), var(--green));
  transition: width .7s cubic-bezier(.2,.7,.3,1);
}
.spot-poll .total { margin-top: clamp(20px,3vh,36px); font-size: clamp(15px,1.6vw,22px); color: rgba(200,220,240,.85); }
.spot-poll .closed-tag { display:inline-block; margin-left:14px; font-size:.7em; vertical-align:middle; background:rgba(255,255,255,.15); padding:4px 12px; border-radius:999px; }
@keyframes fade { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform:none; } }

/* ═══════════════ LAVA-REŽIIM (päevajuht) ═══════════════════════════════════
   Surve all on vaja suuri ilmseid sihtmärke, mitte tihedat nupumaatriksit. */

/* Kinnitatud lavariba: ütleb ALATI, mida saal näeb + üks vajutus puhtaks */
.stagebar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--navy); color: #fff;
  padding: 10px 16px; box-shadow: 0 2px 14px rgba(1,47,96,.28);
}
.stagebar .sb-info { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.stagebar .sb-label {
  flex: none; font-family: "Lato", sans-serif; font-weight: 900; font-size: 10.5px;
  letter-spacing: .12em; background: rgba(255,255,255,.16); padding: 4px 9px; border-radius: 6px;
}
.stagebar .sb-what {
  font-size: 13.5px; color: #cfe0f3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stagebar.active .sb-label { background: var(--green); color: var(--navy); }
.stagebar.active .sb-what { color: #fff; font-weight: 600; }
.sb-clear {
  flex: none; min-height: 44px; padding: 0 18px;
  font-family: "Lato", sans-serif; font-weight: 900; font-size: 13px; letter-spacing: .04em;
  background: #fff; color: var(--navy); border: none; border-radius: 10px; cursor: pointer;
}
.sb-clear:disabled { opacity: .35; cursor: not-allowed; }
.sb-clear:not(:disabled):hover { background: var(--green); }

/* Faasimärgis – punane, kui publik EI SAA vastata */
.phase-badge {
  font-family: "Lato", sans-serif; font-weight: 800; font-size: 11px; letter-spacing: .04em;
  background: rgba(174,202,32,.22); color: var(--green-dark);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.phase-badge.warn { background: rgba(216,90,48,.15); color: var(--rose); }

/* Run-of-show read: üks vajutus = käivita */
.ros {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1.5px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px; background: var(--panel-2, #f6f8fc);
}
.ros.open { border-color: var(--green); background: rgba(174,202,32,.10); }
.ros.done { opacity: .72; }
.ros-main { flex: 1 1 220px; min-width: 0; }
.ros-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 5px; }
.ros-state {
  font-family: "Lato", sans-serif; font-weight: 900; font-size: 10px; letter-spacing: .1em;
  color: var(--navy); background: #e5ebf3; padding: 3px 8px; border-radius: 6px;
}
.ros.open .ros-state { background: var(--green); }
.ros-slot { font-size: 11px; color: var(--muted); }
.ros-q { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.35; }
.ros-timer {
  margin-top: 6px; font-family: "Lato", sans-serif; font-weight: 900; font-size: 20px; color: var(--navy);
}
.ros-timer.soon { color: var(--amber); }
.ros-timer.over { color: var(--rose); }
.ros-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.ros-btn {
  min-height: 56px; padding: 0 22px;
  font-family: "Lato", sans-serif; font-weight: 900; font-size: 15px;
  background: var(--navy); color: #fff; border: none; border-radius: 12px; cursor: pointer;
}
.ros-btn:hover { background: var(--navy-2); }
.ros-btn.stop { background: var(--rose); }
.ros-btn.small { min-height: 44px; padding: 0 14px; font-size: 13px; background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.ros-btn.small:hover { border-color: var(--blue-bright); background: #fff; }

/* Küsimuse esmane tegevus suur, ülejäänud ⋯ alla */
.q-primary {
  min-height: 48px; padding: 0 18px;
  font-family: "Lato", sans-serif; font-weight: 900; font-size: 14px;
  background: var(--navy); color: #fff; border: none; border-radius: 11px; cursor: pointer;
}
.q-primary:hover { background: var(--navy-2); }
.q.spot { border-color: var(--green); box-shadow: 0 0 0 2px rgba(174,202,32,.35); }
.q-more { position: relative; display: inline-block; }
.q-more > summary {
  list-style: none; cursor: pointer; min-height: 48px; min-width: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line); border-radius: 11px; color: var(--navy); font-weight: 700;
}
.q-more > summary::-webkit-details-marker { display: none; }
.q-more-in {
  position: absolute; right: 0; top: 54px; z-index: 20;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px; box-shadow: var(--shadow-md); min-width: 210px;
}

/* Halda: kokkuvolditud, et lava-pinnal ei segaks */
details.manage > summary {
  cursor: pointer; font-family: "Lato", sans-serif; font-weight: 900;
  font-size: 13px; color: var(--muted); letter-spacing: .03em;
}
.manage-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.manage-label { font-family: "Lato", sans-serif; font-weight: 900; font-size: 12px; color: var(--navy); margin-bottom: 4px; }
.icon-btn.ph.on { background: var(--navy); color: #fff; }

/* Kahanev ajariba projektoril – saal tunnetab tempot ise */
.poll-clock {
  height: 10px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.14); margin-bottom: clamp(20px, 3vh, 34px);
}
.poll-clock-fill {
  height: 100%; width: 100%; border-radius: 999px;
  background: var(--green); transition: width .5s linear;
}
.poll-clock-fill.soon { background: var(--amber); }

/* ═══════════ PROJEKTOR: püsiv liitumisriba + suurem kiri ═══════════════════
   Loetavus: max kaugus (m) ≈ 0,56 × CSS px. 30 m vajab ≥54px. */

.joinrail {
  position: absolute; left: clamp(24px, 3vw, 56px); bottom: clamp(20px, 3vh, 44px);
  display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px; padding: clamp(12px, 1.4vh, 20px) clamp(16px, 1.8vw, 26px);
}
.joinrail .jr-qr { flex: none; width: clamp(96px, 9vw, 168px); height: clamp(96px, 9vw, 168px); display: block; }
.joinrail .jr-qr svg { width: 100%; height: 100%; display: block; border-radius: 6px; }
.joinrail .jr-lead {
  font-family: "Lato", sans-serif; font-weight: 900;
  font-size: clamp(18px, 1.7vw, 34px); color: var(--green); letter-spacing: .02em;
}
.joinrail .jr-url {
  font-family: "Lato", sans-serif; font-weight: 900;
  font-size: clamp(28px, 2.9vw, 58px);   /* ≥54px 4K-l → loetav 30 m */
  color: #fff; line-height: 1.1; margin-top: 4px;
}

/* Ühenduse hoiatus – AV-tehnik peab seda üle saali nägema */
/* Ühenduse hoiatust saali ekraanil EI OLE – vt ekraan.js "Ühenduse valve".
   Kui vajad seda kunagi tagasi, siis ainult päevajuhi vaates, mitte siin. */

/* Suurem kiri kaugele vaatamiseks + skaleerumine üle 1920px */
.screen-head .ev b { font-size: clamp(22px, 1.5vw, 34px) !important; }
.screen-head .ev span { font-size: clamp(14px, 1vw, 22px) !important; }
.spot-poll .sbar-label { font-size: clamp(30px, 2.4vw, 50px) !important; }
.spot-poll .sbar-pct { font-size: clamp(30px, 2.6vw, 54px) !important; }
.spot-poll .total { font-size: clamp(22px, 1.7vw, 36px) !important; }
.spot-q .who { font-size: clamp(22px, 1.8vw, 38px) !important; }
/* Tulba taust nähtavaks (oli 1,40:1 – praktiliselt nähtamatu) */
.sbar-track { background: rgba(255,255,255,.28) !important; }
.sbar-fill { background: var(--green) !important; }

/* Ooteekraan: kava, mitte staatiline kaart */

/* Liitumisriba ei tohi sisuga kattuda */


/* ⋯ rippmenüü peab olema KÕIGE ees – muidu jääb järgmise küsimuse kaardi taha */
.q { position: relative; }
.q:has(.q-more[open]) { z-index: 60; }
.q-more[open] { z-index: 61; }
.q-more-in { z-index: 62; }
.q-list { overflow: visible; }

/* Madalas aknas ei tohi liitumisriba varu kogu sisu ära süüa */
@media (max-height: 800px) {
  .joinrail .jr-qr { width: clamp(72px, 8vw, 110px); height: clamp(72px, 8vw, 110px); }
  .screen-wrap { padding: clamp(16px, 3vh, 32px) clamp(20px, 4vw, 60px); }
}

/* hidden-atribuut peab ALATI võitma – muidu näitas projektor korraga
   nii "Suletud" silti kui kutset "hääleta oma telefonis" */
[hidden] { display: none !important; }

/* Suletud küsitlus jääb telefoni tulemustega nähtavale (nagu projektoril),
   aga on selgelt eristatav avatud hääletusest. */
#pollStatus.closed { background: rgba(1,47,96,.10); color: var(--muted); }
.poll-closed .opt-btn { cursor: default; opacity: .92; }

/* ═══════════════════════════════════════════════════════════════
   PROJEKTORI OOTEEKRAAN
   Vaadatakse 20 meetri kauguselt. Kolm kihti: mis toimub (pealkiri),
   kaua veel (kellaaeg + riba), kes räägib (nimed struktuurina).
   Varem oli see üks pealkiri ja üks pikk esinejate rida.
═══════════════════════════════════════════════════════════════ */
.idle-now, .idle-next {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 1.7vh, 22px);
  width: 100%;
}

/* Päiserida: silt vasakul, kellaaeg paremal, vahel joon */
.idle-head {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  width: 100%;
  max-width: 78vw;
}
.idle-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(174, 202, 232, .22);
  order: 2;
}
.idle-tag {
  order: 1;
  font-family: "Lato", sans-serif;
  font-weight: 900;
  font-size: clamp(13px, 1.15vw, 22px);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--green);
  padding: clamp(5px, .6vh, 10px) clamp(12px, 1.2vw, 22px);
  border-radius: 6px;
  white-space: nowrap;
}
.idle-tag.next { background: rgba(255, 255, 255, .16); color: #cfe0f3; }
.idle-clock {
  order: 3;
  font-family: "Lato", sans-serif;
  font-weight: 900;
  font-size: clamp(18px, 1.8vw, 34px);
  font-variant-numeric: tabular-nums;
  color: #eaf1fb;
  white-space: nowrap;
}
.idle-clock em { font-style: normal; font-weight: 400; color: #8fb3d9; }

.idle-title {
  font-family: "Lato", sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 4vw, 78px);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #fff;
  max-width: 22ch;
  text-wrap: balance;
}

/* Edenemisriba – ainus asi, mis ütleb «kaua veel» */
.idle-bar {
  width: 100%;
  max-width: 78vw;
  height: clamp(4px, .55vh, 8px);
  border-radius: 999px;
  background: rgba(174, 202, 232, .30);
  overflow: hidden;
}
.idle-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #d6e85c);
  transition: width 1.2s linear;
}

/* Esinejad */
.idle-people {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.4vh, 20px);
  max-width: 82vw;
}

.idle-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 1.6vh, 22px) clamp(22px, 3vw, 54px);
}
.idle-isik, .idle-solo { text-align: center; }
.idle-isik b, .idle-solo b {
  display: block;
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-size: clamp(19px, 1.75vw, 36px);
  color: #eaf1fb;
  line-height: 1.2;
}
.idle-solo b { font-size: clamp(24px, 2.3vw, 46px); }
.idle-isik i, .idle-solo i {
  display: block;
  font-style: normal;
  font-size: clamp(14px, 1.15vw, 23px);
  color: #8fb3d9;
  margin-top: .15em;
}

/* Moderaator: sama plokk nagu paneelistidel, ainult vaikse pealdisega.
   Pealdis on tuhm, mitte lubjaroheline – lubjaroheline on «otse» jaoks. */
.idle-mod { margin-bottom: clamp(4px, .8vh, 12px); }
.idle-isik .rolle {
  display: block;
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-size: clamp(10px, .78vw, 15px);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #7fa3cc;
  margin-bottom: .35em;
}
