/* Интерактив-зал. Шрифты только системные: в зале может не быть внешнего интернета. */
:root {
  --stage: #16163A;        /* сцена: глубокий индиго */
  --stage-2: #20204F;
  --amber: #FFB547;
  --coral: #FF7A8A;
  --sky: #6FD3FF;
  --mint: #7EE8B5;
  --lilac: #C9A7FF;
  --light: #F4F1FF;

  --paper: #FAFAFD;        /* пульт и телефон */
  --ink: #1C1C3A;
  --ink-2: #55557A;
  --line: #DCDCEA;
  --soft: #EFEFF7;
  --danger: #C2334A;

  --display: Bahnschrift, "DIN Alternate", "Segoe UI", "Arial Narrow", Arial, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--text); color: var(--ink); background: var(--paper); line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
a { color: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 12px; padding: .8em 1.3em; cursor: pointer;
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-danger.is-armed { background: var(--danger); color: #fff; }

.field { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: .8em 1em; background: #fff; }
.field:focus { border-color: var(--ink); outline: none; }

/* ---------- Экран для проектора ---------- */
body.screen { background: var(--stage); color: var(--light); overflow: hidden; height: 100vh; }
body.screen.theme-light { background: #F6F5FB; color: var(--ink); }
.screen-wrap { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr; padding: 4vh 4vw 3vh; }
.screen-q {
  font-family: var(--display); font-weight: 700; font-stretch: semi-condensed;
  font-size: clamp(28px, 5.2vh, 72px); line-height: 1.08; letter-spacing: -.01em;
  max-width: 70%; margin: 0; text-wrap: balance;
}
.screen-q.is-long { font-size: clamp(22px, 3.8vh, 52px); }
.screen-meta { margin-top: 1.2vh; font-size: clamp(14px, 2vh, 26px); opacity: .62; }
.cloud { position: relative; }
.stage { position: relative; margin-top: 2.4vh; min-height: 0; }
.stage > .view { position: absolute; inset: 0; display: none; }
.stage > .view.is-on { display: block; }
.screen-wrap.is-dim { visibility: hidden; }

/* Опрос: полосы */
.poll { display: none; flex-direction: column; justify-content: center; }
.poll.is-on { display: flex !important; }
.poll-rows { display: grid; gap: 2.2vh; }
.poll.is-many .poll-rows { gap: 1.2vh; }
.poll-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2vw; transition: opacity .5s ease; }
.poll-label {
  width: 7vh; height: 7vh; border-radius: 1.6vh; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 4vh; color: #1C1C3A; background: var(--c);
}
.poll-body { min-width: 0; }
.poll-text { font-family: var(--display); font-weight: 600; font-size: clamp(18px, 3.4vh, 46px); line-height: 1.15; margin-bottom: .8vh; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-track { height: 3.2vh; border-radius: 1.6vh; background: rgba(255,255,255,.07); overflow: hidden; }
.poll-fill { height: 100%; width: 0; background: var(--c); border-radius: inherit; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.poll-num { min-width: 12vh; text-align: right; font-family: var(--display); transition: opacity .4s; }
.poll-num b { display: block; font-size: clamp(22px, 5vh, 64px); line-height: 1; }
.poll-num span { font-size: clamp(13px, 2vh, 24px); opacity: .6; }
.poll-num.is-hidden { opacity: 0; }
.poll.is-many .poll-label { width: 5vh; height: 5vh; font-size: 2.8vh; }
.poll.is-many .poll-text { font-size: clamp(16px, 2.6vh, 34px); margin-bottom: .4vh; }
.poll.is-many .poll-track { height: 2.2vh; }
.poll.is-many .poll-num b { font-size: clamp(18px, 3.6vh, 46px); }
.poll.is-letters .poll-text { display: none; }
.poll.is-letters .poll-label { width: 10vh; height: 10vh; font-size: 6vh; }
.poll.is-letters .poll-track { height: 6vh; border-radius: 2vh; }
.poll-row.is-dim { opacity: .3; }
.poll-row.is-correct .poll-text { color: var(--mint); }
.poll-foot { margin-top: 3vh; font-size: clamp(15px, 2.4vh, 30px); opacity: .75; min-height: 1.5em; }
body.screen.theme-light .poll-track { background: rgba(28,28,58,.08); }
body.screen.theme-light .poll-row.is-correct .poll-text { color: #0E7A4C; }

/* Открытый вопрос: стена карточек */
.wall { column-gap: 1.6vw; overflow: hidden; }
.wall[data-size="xl"] { columns: 2; font-size: clamp(20px, 4vh, 54px); }
.wall[data-size="l"] { columns: 3; font-size: clamp(17px, 2.9vh, 40px); }
.wall[data-size="m"] { columns: 4; font-size: clamp(15px, 2.2vh, 30px); }
.wall[data-size="s"] { columns: 5; font-size: clamp(13px, 1.7vh, 24px); }
.wall-card {
  break-inside: avoid; margin: 0 0 1.6vw; padding: 1.1em 1.2em; border-radius: 1.2vh;
  background: rgba(255,255,255,.07); border-left: .35em solid var(--c); line-height: 1.25;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.wall-card.is-new { opacity: 0; transform: translateY(-1.5vh) scale(.96); }
body.screen.theme-light .wall-card { background: #fff; box-shadow: 0 1px 0 rgba(28,28,58,.08); }

/* Режим «результаты после голосования» */
.waiting { display: none; place-items: center; text-align: center; }
.waiting.is-on { display: grid !important; align-content: center; }
.waiting-n { font-family: var(--display); font-weight: 700; font-size: 26vh; line-height: 1; color: var(--amber); }
.waiting-l { font-size: clamp(16px, 3vh, 40px); opacity: .8; margin-top: 2vh; }
body.screen.theme-light .waiting-n { color: #B86A00; }
.cloud-word {
  position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap;
  font-family: var(--display); font-weight: 600; font-stretch: semi-condensed;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), font-size .7s cubic-bezier(.2,.8,.2,1), opacity .5s ease;
  will-change: transform;
}
.cloud-word.is-new { opacity: 0; font-size: 1px !important; }
.cloud-word.is-gone { opacity: 0; }
body.screen.theme-light .cloud-word.is-pale { color: var(--ink) !important; filter: none; }   /* почти белые слова — тёмным */

.join {
  position: fixed; right: 3vw; bottom: 3vh; display: flex; align-items: center; gap: 1.4vw;
  background: rgba(255,255,255,.06); border-radius: 2vh; padding: 1.4vh 1.4vw 1.4vh 1.4vh;
  transition: opacity .4s ease;
}
body.screen.theme-light .join { background: rgba(28,28,58,.05); }
.join img { width: 15vh; height: 15vh; border-radius: 1vh; display: block; background: #fff; }
.join-text { font-size: clamp(13px, 2vh, 26px); line-height: 1.25; }
.join-url { font-family: var(--display); font-weight: 700; font-size: clamp(16px, 2.8vh, 38px); }
.join-code { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 5vh, 64px); letter-spacing: .08em; color: var(--amber); line-height: 1; }
body.screen.theme-light .join-code { color: #B86A00; }
.join.is-hidden { opacity: 0; pointer-events: none; }

/* Пустой экран — приглашение, а не пустота */
.welcome {
  position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 6vh 6vw;
  transition: opacity .5s ease;
}
.welcome.is-hidden { opacity: 0; pointer-events: none; }
.welcome-inner { display: grid; justify-items: center; gap: 3vh; }
.welcome .screen-q { max-width: 22ch; font-size: clamp(32px, 7vh, 96px); }
.welcome img { width: 30vh; height: 30vh; border-radius: 1.6vh; background: #fff; padding: 1vh; }
.welcome-how { font-size: clamp(16px, 2.8vh, 38px); opacity: .85; }
.welcome-how b { font-family: var(--display); color: var(--amber); letter-spacing: .04em; }
body.screen.theme-light .welcome-how b { color: #B86A00; }
.pulse { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--mint); margin-right: .5em; animation: pulse 1.6s ease-in-out infinite; vertical-align: .05em; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }

/* ---------- Участник (телефон) ---------- */
body.phone { background: var(--stage); color: var(--light); min-height: 100vh; min-height: 100dvh; }
.phone-wrap { max-width: 480px; margin: 0 auto; padding: 28px 20px 40px; display: grid; gap: 22px; }
.phone-brand { font-family: var(--display); font-weight: 700; font-size: 15px; opacity: .55; }
.phone-q { font-family: var(--display); font-weight: 700; font-stretch: semi-condensed; font-size: 28px; line-height: 1.12; margin: 0; text-wrap: balance; }
.phone-form { display: grid; gap: 12px; }
.phone .field { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; font-size: 20px; padding: 16px 18px; }
.phone .field::placeholder { color: rgba(244,241,255,.45); }
.phone .field:focus { border-color: var(--amber); }
.phone .btn { background: var(--amber); color: #2A1A00; font-size: 19px; padding: 16px; border-radius: 14px; }
.phone-hint { font-size: 15px; opacity: .7; margin: 0; }
.phone-sent { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.phone-sent li { background: rgba(255,255,255,.1); border-radius: 999px; padding: 6px 14px; font-size: 16px; }
.phone-sent li.is-pending { opacity: .55; }
.phone-sent li.is-pending::after { content: ' · отправляем'; font-size: 13px; }
.phone-note { border-radius: 14px; padding: 16px 18px; background: rgba(255,255,255,.08); font-size: 17px; }
.phone-note.is-done { background: rgba(126,232,181,.14); }
.phone-anon { margin: auto 0 0; padding-top: 24px; text-align: center; font-size: 14px; line-height: 1.45; opacity: .75; }
.phone-anon a { color: inherit; text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 8px 4px; }
/* Проверка вопросов и команда мероприятия */
.mod-queue { border: 2px solid var(--accent, #2A6DF4); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.w-btn.is-ok { font-weight: 700; }
.mod-queue .words li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; }
.mod-queue .w-text { grid-column: 1; }
@media (max-width: 560px) { .mod-queue .words li { grid-template-columns: 1fr auto auto; } .mod-queue .w-text { grid-column: 1 / -1; } }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.team-row div { display: grid; gap: 2px; min-width: 0; }
.team-row span { font-size: 13px; opacity: .7; }
.team-row .btn { flex: none; }
#teamReset { margin-top: 8px; }
.role-mod .act-add, .role-mod #pause, .role-mod #edSettings, .role-mod .topics-box, .role-mod .side .panel.settings, .role-mod #export, .role-mod #diagPanel, .role-mod #edActions { display: none !important; }
.host-legal { max-width: 1500px; margin: 0 auto; padding: 4px 22px 24px; font-size: 14px; line-height: 1.5; opacity: .75; }
.host-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
textarea.field { resize: none; line-height: 1.35; font-size: 18px !important; }
.phone-sent.is-long { display: grid; }
.phone-sent.is-long li { border-radius: 14px; padding: 10px 14px; }
.phone-poll { display: grid; gap: 14px; }
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  border: 1.5px solid rgba(255,255,255,.16); border-radius: 14px; padding: 14px 16px;
  background: rgba(255,255,255,.06); color: var(--light); font-size: 18px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
}
.choice:active { transform: scale(.98); }
.choice:disabled { cursor: default; }
.choice-label {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; background: rgba(255,255,255,.12);
}
.choice.is-picked { border-color: var(--amber); background: rgba(255,181,71,.16); }
.choice.is-picked .choice-label { background: var(--amber); color: #2A1A00; }
.choice.is-right { border-color: var(--mint); background: rgba(126,232,181,.16); }
.choice.is-right .choice-label { background: var(--mint); color: #0B3B26; }
.choice.is-wrong { opacity: .55; }
.choice:disabled:not(.is-picked):not(.is-right) { opacity: .6; }
.phone-poll.is-letters .choices { grid-template-columns: 1fr 1fr; }
.phone-poll.is-letters .choice { flex-direction: column; justify-content: center; min-height: 104px; text-align: center; gap: 6px; }
.phone-poll.is-letters .choice-label { width: auto; height: auto; background: none; font-size: 44px; }
.phone-poll.is-letters .choice.is-picked .choice-label, .phone-poll.is-letters .choice.is-right .choice-label { background: none; color: inherit; }
.choice-sub { font-size: 14px; opacity: .75; }
.counter { font-size: 14px; opacity: .55; text-align: right; margin-top: -6px; }

/* ---------- Пульт ведущего ---------- */
body.host { background: var(--paper); }
.host-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 2; }
.host-brand { font-family: var(--display); font-weight: 700; font-size: 18px; }
.host-code { font-family: var(--display); font-size: 15px; color: var(--ink-2); }
.host-code b { color: var(--ink); font-size: 20px; letter-spacing: .06em; }
.host-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 28px; padding: 24px; max-width: 1400px; margin: 0 auto; }
.host h2 { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.panel + .panel { margin-top: 18px; }
.preview { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--stage); }
.preview iframe { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; border: 0; transform-origin: 0 0; pointer-events: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stats { display: flex; gap: 28px; margin: 14px 0 4px; }
.stat b { display: block; font-family: var(--display); font-size: 34px; line-height: 1; }
.stat span { font-size: 14px; color: var(--ink-2); }
.toggle-open { min-width: 210px; }
.toggle-open.is-closed { background: var(--mint); color: var(--ink); }
.q-edit { display: flex; gap: 10px; }
.q-edit .field { font-size: 17px; }
.words { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow: auto; }
.words li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--soft); }
.words li.is-hidden .w-text { text-decoration: line-through; color: var(--ink-2); }
.w-count { font-family: var(--display); font-weight: 700; color: var(--ink-2); }
.w-forms { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.w-flag { font-size: 12px; color: var(--danger); margin-left: 8px; }
.w-btn { border: 0; background: var(--soft); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 14px; }
.w-btn:hover { background: var(--line); }
.empty { color: var(--ink-2); padding: 12px 4px; }
.settings { display: grid; gap: 12px; }
.settings label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings select { border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 14px; cursor: pointer; }
.seg button.is-on { background: var(--ink); color: #fff; }
.link-line { font-size: 14px; color: var(--ink-2); word-break: break-all; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.is-on { opacity: 1; }

/* Пульт: три колонки — список, редактор, превью */
.host-brand a { text-decoration: none; }
.host-title { flex: 1; max-width: 420px; border: 0; border-bottom: 1.5px dashed var(--line); padding: 6px 2px; font-size: 16px; background: transparent; }
.host-title:focus { outline: none; border-bottom-color: var(--ink); }
.host-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr) 380px; gap: 22px; padding: 22px; max-width: 1600px; margin: 0 auto; align-items: start; }
.acts { position: sticky; top: 84px; display: grid; gap: 14px; }
.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.act { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); cursor: pointer; }
.act:hover { border-color: var(--ink-2); }
.act.is-selected { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.act.is-current { background: #FFF7E8; }
.act-n { font-family: var(--display); font-weight: 700; color: var(--ink-2); }
.act-main { min-width: 0; display: grid; }
.act-main b { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.act-main b em { font-style: normal; color: #B86A00; margin-left: 4px; }
.act-main span { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-count { font-family: var(--display); font-weight: 700; color: var(--ink-2); }
.act-add { display: grid; gap: 6px; }
.act-add > span { font-size: 13px; color: var(--ink-2); }
.act-add .btn { justify-content: flex-start; padding: .6em 1em; }
.act-pause { font-size: 14px; }
.editor .panel + .panel, .side .panel + .panel { margin-top: 16px; }
.ed-type { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.ed-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.ed-spacer { flex: 1; }
.on-air { display: inline-flex; align-items: center; gap: 8px; padding: .8em 1.1em; border-radius: 12px; background: #FFF1D6; color: #8A4F00; font-weight: 600; }
.on-air::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #E8890C; animation: pulse 1.6s ease-in-out infinite; }
.btn-sm { padding: .55em .9em; font-size: 14px; }
.btn-accent { background: var(--amber); color: #2A1A00; }
.check { display: flex !important; justify-content: flex-start !important; gap: 10px; align-items: flex-start; line-height: 1.35; }
.check input { margin-top: 3px; flex: none; }
.check select { margin-left: 6px; }
.hint { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }
.opts { display: grid; gap: 8px; }
.opt-row { display: grid; grid-template-columns: 34px 1fr 38px 38px; gap: 8px; align-items: center; }
.opt-row .field { padding: .6em .8em; }
.opt-l { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--soft); font-family: var(--display); font-weight: 700; }
.opt-ok, .opt-del { height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; color: var(--ink-2); }
.opt-ok.is-on { background: #DDF6EA; border-color: #3CB97A; color: #0E7A4C; }
.opt-del:disabled { opacity: .35; cursor: default; }
.mini-poll { display: grid; gap: 10px; }
.mini-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; }
.mini-row.is-correct .opt-l { background: #DDF6EA; color: #0E7A4C; }
.mini-text { display: grid; gap: 4px; font-size: 15px; }
.mini-bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--ink); border-radius: inherit; transition: width .4s; }
.mini-n { font-family: var(--display); font-weight: 700; color: var(--ink-2); white-space: nowrap; }

@media (max-width: 1250px) {
  .host-layout { grid-template-columns: 260px minmax(0, 1fr); }
  /* Панели справа уходят под редактор, во вторую колонку: список вопросов слева
     прилипает при прокрутке и не должен наезжать на них. */
  .side { grid-column: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
  .side .panel + .panel { margin-top: 0; }
}
@media (max-width: 800px) {
  .host-layout { grid-template-columns: 1fr; padding: 14px; }
  .side { grid-column: auto; }
  .acts { position: static; }
  .host-title { order: 5; max-width: none; flex-basis: 100%; }
  .host-top { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .host-grid { grid-template-columns: 1fr; padding: 16px; }
  .host-top { padding: 12px 16px; }
}

/* ---------- Главная ---------- */
body.home { background: var(--stage); color: var(--light); min-height: 100vh; }
.home-wrap { max-width: 1080px; margin: 0 auto; padding: 48px 24px 64px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; min-height: 100vh; }
.home h1 { font-family: var(--display); font-weight: 700; font-stretch: semi-condensed; font-size: clamp(38px, 6vw, 72px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -.015em; }
.home-lead { font-size: 19px; opacity: .8; max-width: 46ch; margin: 0 0 28px; }
.home-form { display: grid; gap: 12px; max-width: 520px; }
.home .field { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; font-size: 18px; padding: 15px 18px; }
.home .field::placeholder { color: rgba(244,241,255,.45); }
.home .field:focus { border-color: var(--amber); }
.home .btn { background: var(--amber); color: #2A1A00; font-size: 18px; padding: 15px 22px; justify-self: start; }
.home-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.home .btn-ghost-dark { background: rgba(255,255,255,.1); color: #fff; }
.home-small { font-size: 15px; opacity: .65; margin-top: 18px; }
.home-demo { position: relative; aspect-ratio: 4 / 3; }
.home-mine { margin-top: 28px; font-size: 15px; }
.home-mine a { display: block; padding: 6px 0; opacity: .8; }
.home-join { display: flex; gap: 10px; max-width: 360px; margin-top: 10px; }
.home-join .field { font-size: 18px; letter-spacing: .1em; }
.home-join .btn { background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 860px) {
  .home-wrap { grid-template-columns: 1fr; min-height: 0; padding-top: 32px; gap: 24px; }
  .home-demo { order: -1; aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Облако: темы на экране зала ---------- */
/* «Цветом»: подписи тем внизу слева */
.cloud-legend { position: absolute; left: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 1vh 2.4vw; max-width: 70%;
  font-family: var(--display); font-size: clamp(14px, 2.4vh, 30px); font-weight: 600; }
.cloud-legend span { display: inline-flex; align-items: center; gap: .5em; color: var(--c); }
.cloud-legend i { width: .7em; height: .7em; border-radius: 50%; background: var(--c); }
/* «Зонами»: у каждой темы своя область со своим облаком */
.cloud.is-zones > .cloud-word { display: none; }
.zones { position: absolute; inset: 0; display: grid; gap: 1.6vh; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); box-sizing: border-box; }
.zones[data-n="1"] { grid-template-columns: 1fr; }
.zones[data-n="2"], .zones[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zones[data-n="7"], .zones[data-n="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.zone { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); border-radius: 1.6vh; padding: 1.4vh 1.4vw 1vh;
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); min-height: 0; animation: zone-in .5s ease; }
@keyframes zone-in { from { opacity: 0; transform: scale(.98); } }
.zone-h { display: flex; align-items: center; gap: .6em; font-family: var(--display); font-weight: 700; font-size: clamp(14px, 2.6vh, 34px); color: var(--c); }
.zone-h i { width: .6em; height: .6em; border-radius: 50%; background: var(--c); flex: none; }
.zone-h b { margin-left: auto; font-weight: 600; opacity: .55; font-size: .8em; }
.zone-cloud { position: relative; min-height: 0; }
body.screen.theme-light .zone { background: rgba(28,28,58,.035); box-shadow: inset 0 0 0 1px rgba(28,28,58,.06); }
@media (prefers-reduced-motion: reduce) { .zone { animation: none; } }

/* ---------- Облако: словарь и темы на пульте ---------- */
.topics-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; background: #FBFBFE; }
.topics-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.topics-head .hint { margin: 0; flex-basis: 100%; }
.topics-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.topic { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 6px 4px 10px; background: #fff; }
.topic i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.topic-name { border: 0; background: transparent; font-weight: 600; width: 11em; field-sizing: content; min-width: 5em; max-width: 16em; padding: 4px 2px; }
.topic-name:focus { outline: 2px solid var(--sky); border-radius: 4px; }
.topic-n { font-size: 13px; color: var(--ink-2); min-width: 1.5em; text-align: right; }
.topic-del { border: 0; background: transparent; color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.topic-del:hover { background: var(--soft); color: var(--danger); }
.topics-view { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.cloud-words li { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.w-name { border: 0; background: transparent; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: 8px; }
.w-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.w-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.w-flag.is-soft { color: var(--ink-2); }
.w-flag.is-ok { color: #1E8E5A; }
.topic-of { border: 1.5px solid var(--line); border-radius: 8px; padding: 4px 6px; background: #fff; max-width: 10em; font-size: 14px; }
.w-more { grid-column: 1 / -1; background: var(--soft); border-radius: 10px; padding: 10px 12px; margin-top: 4px; display: grid; gap: 10px; font-size: 14px; }
.w-more-h { font-weight: 600; color: var(--ink-2); font-size: 13px; }
.w-forms-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.w-forms-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.w-fix { color: #1E8E5A; }
.w-more-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.w-more-row label { display: flex; align-items: center; gap: 8px; }
.w-more-row select, .w-more-row .field { padding: 5px 8px; font-size: 14px; border-radius: 8px; width: auto; }
.w-remember { font-size: 13px; color: var(--ink-2); }

/* Шрифт Onest: те же файлы, что у сайта; загружаются с этого сервера и только там, где нужны */
@font-face { font-family: Onest; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/onest-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/onest-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/onest-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/onest-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/onest-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Onest; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/onest-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Onest; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/onest-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Onest; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/onest-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest Phone"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/onest-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest Phone"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/onest-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest Phone"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/onest-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest Phone"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/onest-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Пульт и телефон: стиль сайта (палитра, шрифт Onest, «таблетки») ----------
   Только body.host и body.phone: экран зала (body.screen) этот блок не трогает. Шрифт лежит на этом же сервере. */
body.host, body.phone {
  --stage: #16163A; --ink: #16163A; --ink-2: #656686; --line: #E1E6F2; --soft: #EEF2FB; --paper: #F4F6FC;
  --amber: #FFD468; --coral: #FF8568; --sky: #6FD4FF; --amber-soft: #FFEDC2; --sky-2: #4CC6F7;
  --text: Onest, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: Onest, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body.phone {
  --text: "Onest Phone", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Onest Phone", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body:is(.host, .phone) .btn { border-radius: 999px; font-weight: 500; }
body:is(.host, .phone) .brand-mark { width: 36px; height: 36px; display: block; flex: none; }

/* Пульт */
body.host :focus-visible { outline-color: var(--ink); }
body.host .btn { background: var(--sky); color: var(--ink); }
body.host .btn:hover { background: var(--sky-2); }
body.host .btn-ghost, body.host .btn-ghost:hover { background: #fff; }
body.host .btn-accent { background: var(--amber); }
body.host .btn-accent:hover { background: #FFC94A; }
body.host .btn-danger, body.host .btn-danger:hover { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 1.5px #F0CDD3; }
body.host .btn-danger.is-armed, body.host .btn-danger.is-armed:hover { background: var(--danger); color: #fff; transition: none; }   /* предупреждение — сразу, без плавного перехода */
body.host .host-top { padding: 12px 24px; }
body.host .host-brand { font-weight: 700; font-size: 21px; letter-spacing: -.03em; }
body.host .host-brand a { display: flex; align-items: center; gap: 10px; }
body.host .host-title { font-weight: 500; }
body.host .host-code { display: flex; align-items: baseline; gap: 8px; }
body.host .host-code b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.host .panel, body.host .topics-box { border-radius: 20px; }
body.host .panel { padding: 20px; }
body.host h2 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin-bottom: 12px; }
body.host .ed-type { font-size: 14px; font-weight: 500; }
body.host input.field { border-radius: 999px; padding-left: 1.2em; }
body.host .settings select, body.host .seg, body.host .topic-of { border-radius: 999px; }
body.host .seg button.is-on { background: var(--ink); color: #fff; }
body.host input[type=checkbox] { accent-color: var(--ink); width: 17px; height: 17px; }
body.host .preview { border-radius: 14px; }
body.host .act { border-radius: 16px; border-width: 1px; padding: 12px 14px; }
body.host .act.is-selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
body.host .act.is-current { background: #FFF9EA; }
body.host .act-main b { font-weight: 500; }
body.host .act-main b em { background: var(--amber); color: var(--ink); border-radius: 999px; padding: 1px 8px; font-size: 12px; white-space: nowrap; }
body.host .act-n, body.host .act-count, body.host .w-count, body.host .mini-n { font-weight: 600; font-variant-numeric: tabular-nums; }
body.host .on-air { background: var(--amber-soft); color: var(--ink); border-radius: 999px; font-weight: 500; }
body.host .on-air::before { background: var(--coral); }
body.host .w-btn { border-radius: 999px; padding: 6px 14px; }
body.host .opt-l { border-radius: 10px; background: var(--c, var(--soft)); color: var(--ink); font-weight: 600; }
body.host .opt-ok, body.host .opt-del { border-radius: 50%; width: 38px; }
body.host .mini-bar i { background: var(--c, var(--ink)); }
body.host .mod-queue { border: 1px solid var(--amber); background: #FFF9EA; border-radius: 16px; }
body.host .toast { border-radius: 999px; }

/* Телефон участника: тёмный, как доска в зале. Толщины только 400 и 500 — искусственного жирного не допускаем */
body.phone { font-synthesis: none; }
body.phone .phone-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; letter-spacing: -.01em; opacity: 1; }
body.phone .phone-q { font-weight: 500; font-stretch: normal; font-size: 29px; line-height: 1.14; letter-spacing: -.025em; }
body.phone .btn { background: var(--sky); color: var(--ink); border-radius: 999px; font-size: 18px; min-height: 56px; }
body.phone .field { border-radius: 28px; font-size: 18px; padding: 15px 22px; }
body.phone .field:focus { border-color: var(--sky); }
body.phone .choice { border-radius: 20px; padding: 12px 14px; min-height: 62px; font-size: 17px; }
body.phone .choice-text { flex: 1; }
body.phone .choice-label, body.phone .choice.is-picked .choice-label, body.phone .choice.is-right .choice-label { background: var(--c, var(--amber)); color: var(--ink); font-weight: 500; }
body.phone .choice.is-picked { border-color: var(--sky); box-shadow: inset 0 0 0 1px var(--sky); background: rgba(111,212,255,.14); }
body.phone .choice.is-right { border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); background: rgba(126,232,181,.14); }
/* Выбор виден не только цветом: у ответа галочка */
body.phone .choice.is-picked::after, body.phone .choice.is-right::after, body.phone .phone-note.is-done::before {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--tick, var(--sky)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.8 10.3 2.7 2.7 5.7-5.8' fill='none' stroke='%2316163A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.phone .choice.is-right::after { --tick: var(--mint); }
body.phone .phone-poll.is-letters .choice { position: relative; }
body.phone .phone-poll.is-letters .choice-text { flex: none; }
body.phone .phone-poll.is-letters .choice-label, body.phone .phone-poll.is-letters .choice.is-picked .choice-label,
body.phone .phone-poll.is-letters .choice.is-right .choice-label { background: none; color: var(--c, var(--light)); }
body.phone .phone-poll.is-letters .choice.is-picked::after, body.phone .phone-poll.is-letters .choice.is-right::after { position: absolute; right: 12px; top: 12px; }
body.phone .phone-note { border-radius: 20px; }
body.phone .phone-note.is-done { display: flex; align-items: center; gap: 12px; --tick: var(--amber); background: rgba(255,212,104,.14); }

/* ---------- Пульт: участники и тариф (12.2026) ---------- */
body.host .plan-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15px; }
body.host .plan-line b { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
body.host .plan-name { color: var(--ink-2); font-size: 14px; }
body.host .plan-bar { height: 8px; border-radius: 999px; background: var(--soft); margin-top: 10px; overflow: hidden; }
body.host .plan-bar i { display: block; height: 100%; border-radius: inherit; background: var(--sky); transition: width .4s ease-out; }
body.host .plan-bar.is-near i { background: var(--amber); }
body.host .plan-bar.is-full i { background: var(--coral); }
body.host .plan-msg { margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: #FFF4D6; font-size: 14px; }
body.host .plan-line.is-full ~ .plan-msg { background: #FFE6DF; }
body.host .plan-msg.is-thanks { background: rgba(126,232,181,.22); }
body.host .plan-btns { display: grid; gap: 8px; margin-top: 14px; }
body.host .plan-btns .btn { width: 100%; justify-content: center; }
body.host .plan .hint { margin-top: 12px; }

/* ---------- Экран зала: цвета сайта (01.12). Шрифт системный: в зале может не быть интернета ---------- */
body.screen { --amber: #FFD468; --coral: #FF8568; --sky: #6FD4FF; }
body.screen.theme-light { --ink: #16163A; }
body.screen .cloud-word { transition: transform .9s cubic-bezier(.22,.61,.36,1), font-size .9s cubic-bezier(.22,.61,.36,1), opacity .6s ease, color .6s ease; }
body.screen.theme-light :is(.join-code, .waiting-n, .welcome-how b) { color: #8F5E00; }
/* светлая тема: у полосы и плашки буквы тонкий тёмный край, иначе золотистый сливается с фоном */
body.screen.theme-light :is(.poll-fill, .poll-label) { box-shadow: inset 0 0 0 max(1.5px, .2vh) rgba(22,22,58,.45); }
/* Заставка: небольшой логотип сверху; во время вопросов его на экране нет */
body.screen .welcome-brand { position: absolute; left: 4vw; top: 4vh; display: flex; align-items: center; gap: 1.2vh; font-family: var(--display); font-weight: 700; font-size: 3vh; }
body.screen .welcome-brand img { width: 6vh; height: 6vh; padding: 0; background: none; border-radius: 0; }

/* ---------- Метка с числом ответов у слова облака (12.2026): вместо серой подсказки браузера ---------- */
body.screen .cloud-tip {
  position: absolute; left: 0; top: 0; z-index: 5; display: inline-flex; align-items: center; gap: .55em;
  padding: .42em .8em; border-radius: 999px; background: #fff; color: #16163A;
  font: 600 max(14px, 2.2vh)/1.3 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.5); opacity: 0;
  transition: opacity .16s ease-out, transform .9s cubic-bezier(.22,.61,.36,1);
}
body.screen .cloud-tip.is-on { opacity: 1; }
body.screen .cloud-tip i { width: max(10px, .7em); height: max(10px, .7em); border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(22,22,58,.18); flex: none; }
body.screen .cloud-tip::after {
  content: ""; position: absolute; left: calc(50% + var(--a, 0px)); top: 100%; margin-left: -.4em; margin-top: -1px;
  border: .4em solid transparent; border-bottom: 0; border-top-color: #fff;
}
body.screen .cloud-tip.is-below::after { top: auto; bottom: 100%; margin: 0 0 -1px -.4em; border: .4em solid transparent; border-top: 0; border-bottom-color: #fff; }
body.screen.theme-light .cloud-tip { background: #16163A; color: #fff; }
body.screen.theme-light .cloud-tip::after { border-top-color: #16163A; }
body.screen.theme-light .cloud-tip.is-below::after { border-top-color: transparent; border-bottom-color: #16163A; }
body.screen.theme-light .cloud-tip i { box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .cloud-tip { transition: none; } }
