/* Слой поверх Primer CSS 21: шрифт, оболочка, экран показа, слайдеры. Цвета только из токенов Primer. */

@font-face { font-family: "Geist"; font-weight: 100 900; font-display: swap;
  src: url(/fonts/geist-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; font-weight: 100 900; font-display: swap;
  src: url(/fonts/geist-latin-wght-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: "Geist Mono"; font-weight: 100 900; font-display: swap;
  src: url(/fonts/geist-mono-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist Mono"; font-weight: 100 900; font-display: swap;
  src: url(/fonts/geist-mono-latin-wght-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; }

:root {
  --fontStack-sansSerif: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --fontStack-monospace: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--fontStack-sansSerif); background: var(--color-canvas-default, var(--bgColor-default)); color: var(--color-fg-default, var(--fgColor-default)); min-height: 100dvh; }
h1, h2, h3 { letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
.num, .mono { font-family: var(--fontStack-monospace); font-variant-numeric: tabular-nums; }
.muted { color: var(--fgColor-muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.octicon { vertical-align: text-bottom; fill: currentColor; flex: none; }
.btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--fgColor-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- оболочка ведущего ---------- */
.topbar { display: flex; align-items: center; gap: 16px; padding: 0 24px; height: 56px; border-bottom: 1px solid var(--borderColor-default);
  background: var(--bgColor-muted); position: sticky; top: 0; z-index: 20; }
.topbar .brand { font-weight: 600; color: var(--fgColor-default); text-decoration: none; letter-spacing: -.01em; }
.topbar .grow { flex: 1; }
.page { max-width: 1120px; margin: 0 auto; padding: 32px 24px 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 600; margin: 0; }
.crumb { color: var(--fgColor-muted); text-decoration: none; font-size: 14px; }
.crumb:hover { color: var(--fgColor-accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--borderColor-default); margin-bottom: 24px; }
.tabs a { padding: 10px 14px; color: var(--fgColor-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.tabs a[aria-current=page] { color: var(--fgColor-default); border-color: var(--borderColor-accent-emphasis, var(--fgColor-accent)); font-weight: 600; }
.session-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 16px; align-items: center; padding: 14px 16px; }
.session-row .title { font-weight: 600; color: var(--fgColor-default); text-decoration: none; }
.session-row .title:hover { color: var(--fgColor-accent); }
.login { max-width: 360px; margin: 18vh auto 0; padding: 0 16px; }
.empty { text-align: center; padding: 64px 24px; }
.empty h2 { font-size: 20px; }
.toast { position: fixed; right: 20px; bottom: 20px; padding: 10px 14px; border-radius: 6px; background: var(--bgColor-emphasis); color: var(--fgColor-onEmphasis);
  z-index: 60; font-size: 14px; max-width: 360px; }
.toast.error { background: var(--bgColor-danger-emphasis); }
dialog { border: 1px solid var(--borderColor-default); border-radius: 12px; padding: 24px; background: var(--bgColor-default); color: var(--fgColor-default); width: min(440px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog h2 { font-size: 18px; margin-top: 0; }

/* редактор */
.editor { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.editor nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.editor nav button { text-align: left; background: none; border: 0; padding: 8px 12px; border-radius: 6px; color: var(--fgColor-default); cursor: pointer; font: inherit; font-size: 14px; }
.editor nav button:hover { background: var(--bgColor-neutral-muted); }
.editor nav button[aria-current=true] { background: var(--bgColor-accent-muted); color: var(--fgColor-accent); font-weight: 600; }
.editor h2 { font-size: 18px; margin: 0 0 4px; }
.editor .hint { margin: 0 0 20px; color: var(--fgColor-muted); font-size: 14px; max-width: 60ch; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.field .help { color: var(--fgColor-muted); font-size: 12px; margin-top: 4px; }
.field .error { color: var(--fgColor-danger); font-size: 12px; margin-top: 4px; }
.field input.invalid, .field textarea.invalid, .field select.invalid { border-color: var(--borderColor-danger-emphasis); }
.grid-fields { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.item { padding: 16px; border-bottom: 1px solid var(--borderColor-muted); }
.item:last-child { border-bottom: 0; }
.item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.item-head b { font-size: 14px; }
.save-state { font-size: 13px; color: var(--fgColor-muted); min-width: 120px; text-align: right; }
.save-state.err { color: var(--fgColor-danger); }
.slide-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.slide-preview { border: 1px solid var(--borderColor-default); border-radius: 6px; overflow: hidden; background: var(--bgColor-default); container-type: inline-size; }
@media (max-width: 860px) { .editor { grid-template-columns: 1fr; } .editor nav { position: static; flex-direction: row; flex-wrap: wrap; } .slide-edit { grid-template-columns: 1fr; } }

/* результаты */
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { text-align: left; font-weight: 600; color: var(--fgColor-muted); padding: 8px 12px; border-bottom: 1px solid var(--borderColor-default); font-size: 13px; white-space: nowrap; }
table.grid td { padding: 8px 12px; border-bottom: 1px solid var(--borderColor-muted); }
table.grid td.r, table.grid th.r { text-align: right; }
table.grid select { width: auto; min-height: 30px; padding: 2px 6px; }

/* подключение */
.join-code { font: 600 56px/1 var(--fontStack-monospace); letter-spacing: .12em; }
.qr { display: inline-block; padding: 14px; border: 1px solid var(--borderColor-default); border-radius: 6px; background: #fff; }
.qr svg { display: block; width: 220px; height: 220px; }

/* ---------- телефон ---------- */
.phone { max-width: 560px; margin: 0 auto; padding: 20px 16px 120px; }
.phone-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.phone-head h1 { font-size: 22px; margin: 0; font-weight: 600; }
.phone-head .sub { font-size: 13px; color: var(--fgColor-muted); }
.block { padding: 16px 0; border-top: 1px solid var(--borderColor-default); }
.block h2 { font-size: 16px; margin: 0 0 6px; }
.role-card { background: var(--bgColor-attention-muted); border: 1px solid var(--borderColor-attention-muted); border-radius: 6px; padding: 14px 16px; margin-bottom: 8px; }
.role-card .t { font-weight: 600; }
.role-card .k { font-size: 12px; color: var(--fgColor-attention); margin-bottom: 2px; }
.proj { padding: 14px 0; border-top: 1px solid var(--borderColor-default); }
.proj .name { font-weight: 600; }
.proj .meta { font-size: 13px; color: var(--fgColor-muted); }
.score-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.score-row input[type=range] { flex: 1; }
.score-val { min-width: 40px; text-align: right; font: 600 26px/1 var(--fontStack-monospace); font-variant-numeric: tabular-nums; }
input[type=range] { accent-color: var(--fgColor-accent); height: 36px; width: 100%; }
.range-ref { position: relative; height: 6px; margin: 0 54px 0 0; background: var(--bgColor-neutral-muted); border-radius: 3px; }
.range-ref .iqr { position: absolute; top: 0; height: 100%; background: var(--bgColor-success-muted); border: 1px solid var(--borderColor-success-muted); border-radius: 3px; box-sizing: border-box; }
.range-ref .med { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--fgColor-success); }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bgColor-default); border-top: 1px solid var(--borderColor-default); z-index: 10; }
.bottom-bar .btn { width: 100%; max-width: 528px; display: flex; justify-content: center; margin: 0 auto; }
.pair { padding: 14px 0; border-top: 1px solid var(--borderColor-default); }
.pair.flag { background: var(--bgColor-danger-muted); border-radius: 6px; padding: 14px 12px; border: 1px solid var(--borderColor-danger-muted); }
.pair .ends { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 14px; }
.pair .ends span:last-child { text-align: right; }
.pair .sv { text-align: center; color: var(--fgColor-muted); font-size: 13px; }
.cr { font: 600 14px var(--fontStack-monospace); padding: 1px 6px; border-radius: 6px; }
.cr.ok { background: var(--bgColor-success-muted); color: var(--fgColor-success); }
.cr.bad { background: var(--bgColor-danger-muted); color: var(--fgColor-danger); }
.wbar { height: 6px; background: var(--bgColor-neutral-muted); border-radius: 3px; overflow: hidden; }
.wbar > i { display: block; height: 100%; background: var(--fgColor-accent); border-radius: 3px; transition: width .4s cubic-bezier(.16, 1, .3, 1); }
.wrow { margin: 10px 0; font-size: 14px; }
.wrow .l { display: flex; justify-content: space-between; margin-bottom: 4px; }

/* ---------- сцена показа (масштабируется по ширине контейнера) ---------- */
.stage-frame { container-type: inline-size; background: var(--bgColor-default); }
.stage { font-size: clamp(12px, 1.55cqw, 28px); padding: 4em 5em 5em; min-height: 100%; line-height: 1.45; }
.stage h1 { font-size: 3.4em; font-weight: 600; line-height: 1.08; margin: 0 0 .35em; max-width: 16em; }
.stage h2 { font-size: 1.9em; font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
.stage h3 { font-size: 1.15em; font-weight: 600; margin: 0 0 .4em; }
.stage .lead { font-size: 1.25em; color: var(--fgColor-muted); max-width: 40em; margin: 0 0 1.4em; }
.stage .cols { display: grid; gap: 4em; grid-template-columns: 1.4fr 1fr; align-items: start; }
.stage .cols.even { grid-template-columns: 1fr 1fr; }
.stage .cols.three { grid-template-columns: repeat(3, 1fr); gap: 3em; }
.stage .big { font: 600 7em/1 var(--fontStack-monospace); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stage ol.points { list-style: none; counter-reset: p; padding: 0; margin: 1.6em 0 0; max-width: 40em; }
.stage ol.points li { counter-increment: p; padding: .7em 0 .7em 2.4em; border-top: 1px solid var(--borderColor-default); position: relative; font-size: 1.45em; line-height: 1.35; }
.stage ol.points li::before { content: counter(p); position: absolute; left: 0; top: .78em; font: 600 .62em var(--fontStack-monospace); color: var(--fgColor-muted); }
.stage table { width: 100%; border-collapse: collapse; font-size: 1em; }
.stage th { text-align: left; font-weight: 500; color: var(--fgColor-muted); font-size: .85em; padding: .5em .8em .5em 0; border-bottom: 1px solid var(--borderColor-default); }
.stage td { padding: .65em .8em .65em 0; border-bottom: 1px solid var(--borderColor-muted); vertical-align: middle; }
.stage .r { text-align: right; }
.stage .num { font-family: var(--fontStack-monospace); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stage .tag { display: inline-block; padding: .05em .55em; border-radius: 2em; font-size: .72em; font-weight: 600; background: var(--bgColor-neutral-muted); }
.stage .tag.ok { background: var(--bgColor-success-muted); color: var(--fgColor-success); }
.stage .tag.bad { background: var(--bgColor-danger-muted); color: var(--fgColor-danger); }
.stage .tag.sel { background: var(--bgColor-accent-muted); color: var(--fgColor-accent); }
.stage .arg { padding: .9em 0; border-top: 1px solid var(--borderColor-default); font-size: 1.15em; }
.stage .arg .who { font-size: .75em; color: var(--fgColor-muted); display: block; margin-bottom: .2em; }
.stage .meter { height: .45em; background: var(--bgColor-neutral-muted); border-radius: 1em; overflow: hidden; }
.stage .meter > i { display: block; height: 100%; background: var(--fgColor-accent); transition: width .5s cubic-bezier(.16, 1, .3, 1); }
.stage .dist { display: flex; align-items: flex-end; gap: .15em; height: 2em; }
.stage .dist i { display: block; width: .6em; background: var(--fgColor-accent); border-radius: .1em .1em 0 0; min-height: .1em; }
.stage .dist i.z { background: var(--bgColor-neutral-muted); }
.stage .qr { padding: 1em; }
.stage .qr svg { width: 17em; height: 17em; }
.stage .timer { position: absolute; top: 1.4em; right: 2em; font: 600 2.2em var(--fontStack-monospace); font-variant-numeric: tabular-nums; padding: .1em .5em; border-radius: .3em; background: var(--bgColor-muted); border: 1px solid var(--borderColor-default); }
.stage .timer.low { color: var(--fgColor-danger); border-color: var(--borderColor-danger-muted); background: var(--bgColor-danger-muted); }
.stage-rel { position: relative; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stage.enter > * { animation: rise .5s cubic-bezier(.16, 1, .3, 1) both; }
.stage.enter > *:nth-child(2) { animation-delay: .06s; }
.stage.enter > *:nth-child(3) { animation-delay: .12s; }

/* экран проектора */
.screen-page { min-height: 100dvh; }
.screen-page .stage-frame { min-height: 100dvh; }

/* пульт показа */
.present { display: grid; grid-template-columns: 1fr 340px; height: calc(100dvh - 56px - 64px); }
.present .stage-wrap { overflow: auto; border-right: 1px solid var(--borderColor-default); }
.present aside { overflow: auto; padding: 16px 20px 32px; background: var(--bgColor-muted); }
.present aside h3 { font-size: 13px; color: var(--fgColor-muted); font-weight: 600; margin: 20px 0 8px; }
.present aside h3:first-child { margin-top: 0; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li button { width: 100%; text-align: left; background: none; border: 0; padding: 6px 10px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--fgColor-muted); cursor: pointer; }
.steps li button:hover { background: var(--bgColor-neutral-muted); }
.steps li.done button { color: var(--fgColor-default); }
.steps li.cur button { background: var(--bgColor-accent-muted); color: var(--fgColor-accent); font-weight: 600; }
.pbar { position: fixed; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px; border-top: 1px solid var(--borderColor-default); background: var(--bgColor-default); z-index: 20; }
.pbar .cur { text-align: center; }
.pbar .cur b { display: block; font-size: 15px; }
.pbar .cur span { font-size: 13px; color: var(--fgColor-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.arg-pick { display: flex; gap: 8px; padding: 8px 0; border-top: 1px solid var(--borderColor-muted); font-size: 13px; align-items: flex-start; }
.arg-pick input { margin-top: 3px; }
@media (max-width: 960px) { .present { grid-template-columns: 1fr; height: auto; } .present aside { border-top: 1px solid var(--borderColor-default); } }

/* Один акцентный цвет: главные кнопки тоже акцентные (синие), зелёный только для смысла "успех" */
.btn-primary { background-color: var(--bgColor-accent-emphasis); border-color: var(--bgColor-accent-emphasis); color: var(--fgColor-onEmphasis); box-shadow: none; }
.btn-primary:hover:not(:disabled) { background-color: var(--bgColor-accent-emphasis); border-color: var(--bgColor-accent-emphasis); filter: brightness(.92); }
.btn-primary:disabled { opacity: .5; }
.btn-primary .octicon { color: inherit; }
.slide-preview .stage { font-size: 1.55cqw; }
.stage h1, .stage h2 { overflow-wrap: break-word; }

/* плотные этапы: таблицы и графики, чтобы всё помещалось на одном экране проектора */
.stage.dense { font-size: clamp(11px, 1.12cqw, 21px); padding-top: 2.6em; }
.stage.dense h1 { font-size: 2.6em; margin-bottom: .5em; }
.stage.dense .stage-lead, .stage.dense .lead { font-size: 1.1em; margin-bottom: 1em; }
.stage .tag { white-space: nowrap; }

/* колода в редакторе */
.deck-wrap { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.deck-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--borderColor-muted); font-size: 14px; }
.deck-row:last-child { border-bottom: 0; }
.deck-row.live { background: var(--bgColor-muted); }
.deck-row.live > span:nth-child(2) { flex: 1; }
.deck-row.live .muted { font-size: 12px; margin-left: 6px; }
.deck-row.slide { cursor: pointer; }
.deck-row.slide:hover { background: var(--bgColor-neutral-muted); }
.deck-row.slide.sel { background: var(--bgColor-accent-muted); }
.deck-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-actions { display: flex; gap: 4px; }
.deck-ico { color: var(--fgColor-muted); display: inline-flex; }
@media (max-width: 960px) { .deck-wrap { grid-template-columns: 1fr; } }

/* QR и код на каждом экране показа */
.join-chip { align-self: flex-end; margin: 0 1.6em 1.4em; display: flex; align-items: center; gap: .9em; padding: .6em .9em;
  background: var(--bgColor-default); border: 1px solid var(--borderColor-default); border-radius: .5em; font-size: clamp(11px, 1.1cqw, 18px); }
.join-chip .qr { padding: .4em; border-radius: .3em; }
.join-chip .qr svg { width: 5.2em; height: 5.2em; }
.join-chip .code { font-size: 1.6em; font-weight: 600; letter-spacing: .12em; }
.present .steps li.slide button { padding-left: 22px; font-size: 13px; }

.stage-rel { display: flex; flex-direction: column; min-height: 100%; position: relative; }
.stage-rel > .stage { flex: 1; }
.present .stage-frame { height: 100%; }
.screen-page .stage-rel { min-height: 100dvh; }

/* проверка перед показом */
.pf-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / .5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pf-card { background: var(--bgColor-default); border: 1px solid var(--borderColor-default); border-radius: 12px; padding: 28px; width: min(560px, 100%); max-height: 90dvh; overflow: auto; }
.pf-card h2 { margin: 0 0 4px; font-size: 22px; }
.pf-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--borderColor-muted); }
.pf-item .Label { flex: none; margin-top: 2px; min-width: 64px; text-align: center; }
.fs-hint { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: var(--bgColor-emphasis); color: var(--fgColor-onEmphasis);
  padding: 8px 14px; border-radius: 6px; font-size: 15px; z-index: 40; transition: opacity .6s; }
details.more { border: 1px solid var(--borderColor-default); border-radius: 6px; padding: 0 16px; margin-bottom: 16px; }
details.more summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
details.more[open] summary { border-bottom: 1px solid var(--borderColor-muted); margin-bottom: 12px; }
.editor nav button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; }
.pbar .btn-large { min-width: 120px; }
.pbar #next { max-width: 50vw; overflow: hidden; text-overflow: ellipsis; }

/* =====================================================================
   Темы оформления (все светлые) и макеты слайдов
   ===================================================================== */
.theme-classic    { --ac: #0969da; --ac-soft: #ddf4ff; --ac-ink: #0550ae; }
.theme-emerald    { --ac: #1a7f4b; --ac-soft: #dafbe1; --ac-ink: #116329; }
.theme-terracotta { --ac: #bc4c00; --ac-soft: #fff1e5; --ac-ink: #953800; }
.theme-violet     { --ac: #8250df; --ac-soft: #fbefff; --ac-ink: #6639ba; }
.theme-graphite   { --ac: #24292f; --ac-soft: #eaeef2; --ac-ink: #24292f; }
.stage-rel { --ac: #0969da; --ac-soft: #ddf4ff; --ac-ink: #0550ae; }

.stage-rel .meter > i, .stage .dist i, .wbar > i { background: var(--ac); }
.stage .tag.sel { background: var(--ac-soft); color: var(--ac-ink); }
.stage ol.points li::before { color: var(--ac); }
.stage .qr svg { width: 17em; height: 17em; }
.stage h1 { letter-spacing: -0.035em; }

.sl-join { display: grid; grid-template-columns: 1.15fr 1fr; gap: 4em; align-items: center; min-height: 62vh; }
.sl-join h1 { font-size: 3.6em; }
.sl-join .mono-url { font-family: var(--fontStack-monospace); font-weight: 600; word-break: break-all; margin-bottom: .2em; }
.sl-join .code-big { color: var(--ac); letter-spacing: .12em; font-size: 1.3em; }
.sl-join .sl-qr { text-align: center; }

.sl-cover { display: grid; grid-template-columns: 1fr; gap: 3em; align-items: center; min-height: 60vh; }
.sl-cover.with-img { grid-template-columns: 1.1fr 1fr; }
.sl-cover:not(.with-img) { grid-template-columns: 1fr 9em; }
.sl-cover h1 { font-size: 5em; line-height: 1.02; }
.sl-cover-block { background: var(--ac); border-radius: 6px; align-self: stretch; min-height: 18em; }
.sl-img { display: block; max-width: 100%; border-radius: 6px; }
.cover-img { width: 100%; max-height: 30em; object-fit: cover; }

.sl-text p { font-size: 1.65em; line-height: 1.5; max-width: 36em; margin: 0 0 .8em; }
.stage .lead strong, .stage b { color: inherit; }

.sl-statement { min-height: 56vh; display: flex; flex-direction: column; justify-content: center; max-width: 24em; }
.sl-statement blockquote { margin: 0; padding-left: .55em; border-left: .13em solid var(--ac); font-size: 3.4em; line-height: 1.14; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.sl-statement.quote blockquote { font-weight: 500; }
.sl-statement .cap { margin: 1.1em 0 0 1.6em; font-size: 1.3em; color: var(--fgColor-muted); }

.sl-figure { margin: 0; }
.sl-figure img { max-height: 28em; width: auto; max-width: 100%; border-radius: 6px; }
.sl-figure figcaption { margin-top: .8em; color: var(--fgColor-muted); font-size: 1.2em; }

.sl-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4em; align-items: center; }
.sl-split.rev > :first-child { order: 2; }
.sl-split.no-img { grid-template-columns: 1fr; }
.side-img { width: 100%; max-height: 28em; object-fit: cover; }

.sl-numbers { display: grid; gap: 3em; grid-template-columns: repeat(auto-fit, minmax(11em, 1fr)); margin-top: 1.4em; }
.num-card { border-top: 1px solid var(--borderColor-default); padding-top: 1em; }
.num-val { font-size: 4.4em; font-weight: 600; line-height: 1.05; letter-spacing: -0.04em; color: var(--ac); font-variant-numeric: tabular-nums; }
.num-lab { margin-top: .4em; font-size: 1.3em; color: var(--fgColor-muted); }

.sl-steps { list-style: none; margin: 1.4em 0 0; padding: 0; max-width: 44em; }
.sl-steps li { display: flex; gap: 1.2em; align-items: center; padding: .75em 0; border-top: 1px solid var(--borderColor-default); font-size: 1.45em; line-height: 1.35; }
.step-n { flex: none; width: 1.9em; height: 1.9em; border-radius: 6px; background: var(--ac-soft); color: var(--ac-ink); font: 600 .9em var(--fontStack-monospace); display: inline-flex; align-items: center; justify-content: center; }

.sl-table { width: 100%; border-collapse: collapse; font-size: 1.35em; margin-top: 1em; }
.sl-table th { text-align: left; color: var(--ac-ink); font-weight: 600; padding: .5em .8em .5em 0; border-bottom: .1em solid var(--ac); }
.sl-table td { padding: .6em .8em .6em 0; border-bottom: 1px solid var(--borderColor-muted); }

.sl-wait { text-align: left; margin-top: 1em; }
.sl-wait .big { color: var(--ac); }
.sl-foot { margin-top: 1.4em; font-size: 1.05em; }
.sl-expl { background: var(--ac-soft); color: var(--ac-ink); border-radius: 6px; padding: .8em 1.1em; font-size: 1.25em; max-width: 36em; }

.sl-bars { margin-top: 1.4em; }
.bar-row { display: grid; grid-template-columns: minmax(10em, 20em) 1fr 7em; gap: 1.1em; align-items: center; margin: .8em 0; font-size: 1.3em; }
.bar-track { height: 1.5em; background: var(--bgColor-neutral-muted); border-radius: 6px; overflow: hidden; }
.bar-track > i { display: block; height: 100%; background: var(--ac); border-radius: 6px; transition: width .5s cubic-bezier(.16, 1, .3, 1); }
.bar-val { text-align: right; white-space: nowrap; }
.bar-row.is-correct .bar-track > i { background: var(--fgColor-success); }
.bar-row.is-correct .bar-lab { font-weight: 600; }
.bar-row.is-wrong { opacity: .6; }

.sl-scale { display: grid; grid-template-columns: 12em 1fr; gap: 3em; align-items: end; margin-top: 1.4em; }
.scale-avg .big { font-size: 6.5em; color: var(--ac); }
.scale-hist { display: flex; align-items: flex-end; gap: .7em; height: 15em; }
.hist-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; text-align: center; }
.hist-bar { background: var(--ac); border-radius: 4px 4px 0 0; min-height: .2em; transition: height .5s cubic-bezier(.16, 1, .3, 1); }
.hist-n { color: var(--fgColor-muted); min-height: 1.4em; }
.hist-v { margin-top: .5em; font-weight: 600; font-size: 1.2em; }
.scale-ends { display: flex; justify-content: space-between; margin: .6em 0 0 15em; }

.sl-cloud { display: flex; flex-wrap: wrap; gap: .3em 1.1em; justify-content: center; align-items: center; min-height: 18em; margin-top: 1.4em; }
.cloud-w { font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.cloud-w.ac { color: var(--ac); } .cloud-w.in { color: var(--fgColor-default); } .cloud-w.mu { color: var(--fgColor-muted); }

.sl-feed { columns: 3 17em; column-gap: 1em; margin-top: 1.4em; }
.feed-card { break-inside: avoid; border: 1px solid var(--borderColor-default); border-radius: 6px; padding: .8em 1em; margin-bottom: .8em; font-size: 1.15em; background: var(--bgColor-default); }

.sl-rank { list-style: none; padding: 0; margin: 1.4em 0 0; }
.sl-rank li { display: grid; grid-template-columns: 2em minmax(8em, 18em) 1fr 3em; gap: 1em; align-items: center; padding: .55em 0; font-size: 1.3em; border-top: 1px solid var(--borderColor-muted); }
.rank-n { font: 600 1em var(--fontStack-monospace); color: var(--ac); }
.rank-track { height: 1em; background: var(--bgColor-neutral-muted); border-radius: 6px; overflow: hidden; }
.rank-track > i { display: block; height: 100%; background: var(--ac); border-radius: 6px; }
.rank-val { text-align: right; }

.round-head { display: flex; align-items: center; gap: 2em; margin-bottom: 1.4em; }
.stage table.plain { width: 100%; }
.stage table.plain.big-rows td { padding: .8em .8em .8em 0; font-size: 1.1em; }

/* =====================================================================
   Редактор слайдов: плёнка, предпросмотр, форма
   ===================================================================== */
.ed-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.filmstrip { position: sticky; top: 72px; max-height: calc(100dvh - 96px); overflow: auto; padding-right: 4px; }
.thumb { display: block; width: 100%; text-align: left; border: 1px solid var(--borderColor-default); border-radius: 6px; padding: 6px; margin-bottom: 8px; background: var(--bgColor-default); cursor: pointer; font: inherit; }
.thumb:hover { border-color: var(--borderColor-emphasis); }
.thumb.sel { border-color: var(--fgColor-accent); box-shadow: 0 0 0 2px var(--bgColor-accent-muted); }
.thumb.dragging { opacity: .4; }
.thumb.over { border-color: var(--fgColor-accent); border-style: dashed; }
.thumb-view { container-type: inline-size; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #fff; border: 1px solid var(--borderColor-muted); pointer-events: none; }
.thumb-view .stage-rel { min-height: 0; }
.thumb-view .stage { font-size: 1.55cqw; padding: 3.2em 4em; min-height: 0; }
.thumb-view .join-chip, .thumb-view .timer { display: none; }
.thumb-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; margin-top: 5px; color: var(--fgColor-muted); }
.thumb-meta b { color: var(--fgColor-default); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.ed-preview { container-type: inline-size; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--borderColor-default); border-radius: 6px; background: #fff; }
.ed-preview .stage-rel { min-height: 0; height: 100%; }
.ed-preview .stage { font-size: 1.55cqw; padding: 3.4em 4.2em; min-height: 0; }
.ed-preview .join-chip { font-size: 1.2cqw; }
.ed-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.ed-form h2 { font-size: 16px; margin: 0 0 12px; }
.type-badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 12px; background: var(--bgColor-accent-muted); color: var(--fgColor-accent); margin-bottom: 10px; }
.img-field { border: 1px dashed var(--borderColor-default); border-radius: 6px; padding: 10px; }
.img-field img { max-width: 100%; max-height: 120px; border-radius: 4px; display: block; margin-bottom: 8px; }
.item-row { display: flex; gap: 6px; margin-bottom: 6px; }
.item-row input { flex: 1; }
.theme-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--fgColor-default); box-shadow: 0 0 0 2px var(--bgColor-default) inset; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.gal-card { text-align: left; border: 1px solid var(--borderColor-default); border-radius: 6px; padding: 8px; background: var(--bgColor-default); cursor: pointer; font: inherit; }
.gal-card:hover { border-color: var(--fgColor-accent); }
.gal-card b { display: block; margin-top: 6px; font-size: 14px; }
.gal-card span { font-size: 12px; color: var(--fgColor-muted); }
.gal-group { font-size: 13px; font-weight: 600; color: var(--fgColor-muted); margin: 14px 0 0; }
dialog.wide { width: min(860px, calc(100vw - 32px)); max-height: 88dvh; overflow: auto; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 14px 0; }
.tpl-card { text-align: left; border: 1px solid var(--borderColor-default); border-radius: 6px; padding: 12px; cursor: pointer; background: var(--bgColor-default); font: inherit; }
.tpl-card[aria-pressed=true] { border-color: var(--fgColor-accent); box-shadow: 0 0 0 2px var(--bgColor-accent-muted); }
.tpl-card b { display: block; margin-bottom: 4px; }
@media (max-width: 1100px) { .ed-wrap { grid-template-columns: 200px 1fr; } .ed-form { grid-column: 1 / -1; } }
@media (max-width: 760px) { .ed-wrap { grid-template-columns: 1fr; } .filmstrip { position: static; max-height: none; display: flex; gap: 8px; overflow-x: auto; } .thumb { min-width: 180px; } }

/* адаптация экрана под слайды: на проекторе без внутренних отступов в 100dvh */
.screen-page .stage-rel { min-height: 100dvh; }

/* телефон: ответы на вопросы */
.opts { display: grid; gap: 8px; margin: 12px 0; }
.opt { text-align: left; padding: 14px 16px; border: 1px solid var(--borderColor-default); border-radius: 6px; background: var(--bgColor-default); font: inherit; font-size: 16px; cursor: pointer; color: var(--fgColor-default); }
.opt.on { border-color: var(--fgColor-accent); background: var(--bgColor-accent-muted); font-weight: 600; }
.opt:disabled { cursor: default; opacity: .8; }
.scale-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 8px; margin: 12px 0; }
.scale-btns .opt { text-align: center; padding: 14px 0; font-weight: 600; }
.scale-ends { display: flex; justify-content: space-between; font-size: 13px; }
.rank-edit { list-style: none; padding: 0; margin: 12px 0; }
.rank-edit li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--borderColor-muted); }
.rank-edit .rl { flex: 1; }
.rank-edit .rn { color: var(--fgColor-muted); width: 1.4em; }
.phone-foot { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 36px; font-size: 12px; }
.phone-foot a { color: var(--fgColor-muted); }

/* миниатюры и предпросмотр: высота определяется содержимым, а не окном браузера */
.thumb-view .sl-join, .thumb-view .sl-cover, .thumb-view .sl-statement, .thumb-view .sl-wait,
.ed-preview .sl-join, .ed-preview .sl-cover, .ed-preview .sl-statement, .ed-preview .sl-wait { min-height: 0; }
.thumb-view .stage, .ed-preview .stage { padding-top: 2.6em; padding-bottom: 2em; }
.thumb-view .sl-statement blockquote, .ed-preview .sl-statement blockquote { font-size: 3em; }
.sl-join .big { font-size: 5em; }
.ed-preview .stage-rel, .thumb-view .stage-rel { overflow: hidden; }
.ed-preview .sl-join, .thumb-view .sl-join { align-items: start; }
.scale-avg .big { font-family: var(--fontStack-sansSerif); letter-spacing: -0.04em; }
.scale-ends { font-size: 1.1em; }
.stage.dense { font-size: clamp(11px, 1.3cqw, 24px); }

/* =====================================================================
   Обновление вида: мягкие градиенты, движение, адаптив
   ===================================================================== */
.theme-classic    { --ac-2: #54aeff; }
.theme-emerald    { --ac-2: #4ac26b; }
.theme-terracotta { --ac-2: #fb8f44; }
.theme-violet     { --ac-2: #c297ff; }
.theme-graphite   { --ac-2: #6e7781; }
.stage-rel { --ac-2: #54aeff; background: #fff; }
:root { --ui-ac: #0969da; --ui-ac-2: #54aeff; }

/* --- градиенты на сцене --- */
.stage-rel.bg-soft {
  background:
    radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--ac-soft) 92%, transparent) 0%, transparent 62%),
    radial-gradient(55% 70% at 0% 100%, color-mix(in srgb, var(--ac-soft) 55%, transparent) 0%, transparent 60%),
    #fff;
}
.sl-cover-block { background: linear-gradient(165deg, var(--ac) 0%, var(--ac-2) 100%); }
.bar-track > i, .rank-track > i, .stage-rel .meter > i, .progress > i { background: linear-gradient(90deg, var(--ac) 0%, var(--ac-2) 100%); }
.hist-bar { background: linear-gradient(180deg, var(--ac-2) 0%, var(--ac) 100%); }
.bar-row.is-correct .bar-track > i { background: linear-gradient(90deg, #1a7f37, #4ac26b); }
.step-n { background: linear-gradient(145deg, var(--ac-soft), #fff); border: 1px solid color-mix(in srgb, var(--ac) 18%, transparent); }
.sl-statement blockquote { border-image: linear-gradient(180deg, var(--ac), var(--ac-2)) 1; }
.num-card { border-top: .2em solid transparent; border-image: linear-gradient(90deg, var(--ac), var(--ac-2)) 1; }
.sl-table th { border-image: linear-gradient(90deg, var(--ac), var(--ac-2)) 1; }
.join-chip { box-shadow: 0 .4em 1.6em rgb(31 35 40 / .08); }
.stage .qr { box-shadow: 0 1em 3em rgb(31 35 40 / .10); border-radius: 12px; }

/* --- градиенты в кабинете и на телефоне --- */
body { background:
  radial-gradient(60% 50% at 100% 0%, rgb(221 244 255 / .65) 0%, transparent 70%),
  var(--bgColor-default); background-attachment: fixed; }
.screen-page, body:has(.present) { background: #fff; }
.topbar { background: rgb(255 255 255 / .82); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.btn-primary { background-image: linear-gradient(180deg, #218bff 0%, #0969da 100%); border-color: #0860ca; }
.btn-primary:hover:not(:disabled) { background-image: linear-gradient(180deg, #1f7fe8 0%, #0757ba 100%); filter: none; }
.wbar > i { background: linear-gradient(90deg, var(--ui-ac), var(--ui-ac-2)); }
.phone::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--ui-ac), var(--ui-ac-2)); z-index: 30; }
.opt.on { background: linear-gradient(180deg, #f1f8ff, #ddf4ff); }
.join-code { background: linear-gradient(90deg, #0969da, #54aeff); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.role-card { background: linear-gradient(160deg, #fff8c5 0%, #fffdf0 100%); }
.Box.empty { background: linear-gradient(180deg, #fff, #f6f8fa); }
.thumb.sel { box-shadow: 0 0 0 2px var(--bgColor-accent-muted), 0 6px 18px rgb(9 105 218 / .12); }
.ed-preview { box-shadow: 0 10px 40px rgb(31 35 40 / .08); }
.pbar { background: rgb(255 255 255 / .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* --- движение --- */
@keyframes growW { from { width: var(--from, 0%); } }
@keyframes growH { from { height: var(--from, 0%); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes bump { 50% { transform: scale(1.14); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } }
.g-w { animation: growW .7s cubic-bezier(.16, 1, .3, 1) both; }
.g-h { animation: growH .7s cubic-bezier(.16, 1, .3, 1) both; }
.pop { animation: pop .5s cubic-bezier(.34, 1.56, .64, 1) both; }
.cloud-w, .feed-card { display: inline-block; }
.feed-card { display: block; }
.bump { display: inline-block; animation: bump .4s cubic-bezier(.34, 1.56, .64, 1); }
.page > *, .login > * { animation: fadeUp .45s cubic-bezier(.16, 1, .3, 1) both; }
.page > *:nth-child(2) { animation-delay: .04s; } .page > *:nth-child(3) { animation-delay: .08s; } .page > *:nth-child(4) { animation-delay: .12s; }
.phone.enter > * { animation: fadeUp .4s cubic-bezier(.16, 1, .3, 1) both; }
.phone.enter > *:nth-child(2) { animation-delay: .05s; } .phone.enter > *:nth-child(3) { animation-delay: .1s; } .phone.enter > *:nth-child(n+4) { animation-delay: .14s; }
dialog[open] { animation: dlgIn .25s cubic-bezier(.16, 1, .3, 1); }
dialog::backdrop { animation: fadeIn .2s ease both; backdrop-filter: blur(2px); }
@keyframes fadeIn { from { opacity: 0; } }
.pf-card { animation: dlgIn .3s cubic-bezier(.16, 1, .3, 1); }
.toast { animation: toastIn .3s cubic-bezier(.16, 1, .3, 1); box-shadow: 0 8px 24px rgb(31 35 40 / .2); }
.btn { transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn-primary:not(:disabled) { box-shadow: 0 1px 0 rgb(31 35 40 / .1), 0 4px 12px rgb(9 105 218 / .18); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 1px 0 rgb(31 35 40 / .1), 0 6px 18px rgb(9 105 218 / .28); }
.thumb, .gal-card, .tpl-card, .session-row, .opt { transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
.thumb:hover, .gal-card:hover, .tpl-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgb(31 35 40 / .08); }
.opt:active { transform: scale(.985); }
.session-row:hover { background: var(--bgColor-muted); }
.tabs a { transition: color .2s ease, border-color .2s ease; }
.save-state { transition: color .2s ease; }
.stage.enter > * { animation: rise .55s cubic-bezier(.16, 1, .3, 1) both; }
.stage.enter > *:nth-child(2) { animation-delay: .07s; } .stage.enter > *:nth-child(3) { animation-delay: .14s; } .stage.enter > *:nth-child(n+4) { animation-delay: .2s; }
.stage.enter .points li, .stage.enter .sl-steps li, .stage.enter .num-card, .stage.enter .bar-row { animation: rise .5s cubic-bezier(.16, 1, .3, 1) both; }
.stage.enter li:nth-child(1), .stage.enter .num-card:nth-child(1), .stage.enter .bar-row:nth-child(1) { animation-delay: .12s; }
.stage.enter li:nth-child(2), .stage.enter .num-card:nth-child(2), .stage.enter .bar-row:nth-child(2) { animation-delay: .19s; }
.stage.enter li:nth-child(3), .stage.enter .num-card:nth-child(3), .stage.enter .bar-row:nth-child(3) { animation-delay: .26s; }
.stage.enter li:nth-child(4), .stage.enter .num-card:nth-child(4), .stage.enter .bar-row:nth-child(4) { animation-delay: .33s; }
.stage.enter li:nth-child(n+5), .stage.enter .bar-row:nth-child(n+5) { animation-delay: .4s; }
.thumb-view *, .ed-preview * { animation: none !important; }
.timer { transition: color .3s ease, background-color .3s ease; }
.timer.low { animation: bump 1s ease-in-out infinite; }

/* --- адаптив --- */
.access-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start; }
@media (max-width: 900px) {
  .page { padding: 20px 16px 72px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head h1 { font-size: 21px; }
  .session-row { grid-template-columns: 1fr; gap: 10px; }
  .session-row > span:empty { display: none; }
  .session-row > .Label { justify-self: start; }
  .session-row > span:last-child { justify-content: flex-start !important; }
  .tabs { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .access-grid { grid-template-columns: 1fr; }
  .access-grid .qr { justify-self: start; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar .muted { display: none; }
  .grid-fields { grid-template-columns: 1fr; }
  .join-code { font-size: 40px; }
  dialog { padding: 18px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 960px) {
  .present { grid-template-columns: 1fr; height: auto; padding-bottom: 76px; }
  .present .stage-wrap { border-right: 0; min-height: 56vw; }
  .present .stage-frame { height: auto; }
  .pbar { padding: 0 12px; gap: 8px; }
  .pbar .cur { display: none; }
  .pbar .btn-large { flex: 1; min-width: 0; justify-content: center; }
  .pbar #next { max-width: none; }
}
@media (max-width: 700px) {
  .sl-join, .sl-cover.with-img, .sl-split, .stage .cols, .stage .cols.even, .stage .cols.three, .sl-scale { grid-template-columns: 1fr; gap: 2em; }
  .sl-cover:not(.with-img) { grid-template-columns: 1fr; }
  .sl-cover-block { display: none; }
  .bar-row { grid-template-columns: 1fr 5.5em; }
  .bar-row .bar-track { grid-column: 1 / -1; order: 3; }
  .scale-ends { margin-left: 0; }
  .stage { padding: 2.4em 1.6em 3em; font-size: clamp(11px, 3cqw, 18px); }
  .join-chip { margin: 0 1em 1em; }
}
@media (max-width: 420px) {
  .phone { padding: 18px 14px 120px; }
  .phone-head h1 { font-size: 20px; }
  .score-val { font-size: 22px; min-width: 34px; }
}
@media (hover: none) { .thumb:hover, .gal-card:hover, .tpl-card:hover { transform: none; box-shadow: none; } }
.ed-preview .stage.dense, .thumb-view .stage.dense { font-size: 1.3cqw; }

/* слайд вписывается в экран: высоту задаёт рамка, а не содержимое */
.stage-rel > .stage { min-height: 0; }
.screen-page .stage-rel { height: 100dvh; min-height: 0; overflow: hidden; }
.present .stage-rel { height: 100%; min-height: 0; }
.ed-preview .stage-rel, .thumb-view .stage-rel { height: 100%; }
.sl-join, .sl-cover, .sl-statement { min-height: 0; flex: 1; }
.stage { display: flex; flex-direction: column; }
.stage > .sl-join, .stage > .sl-cover, .stage > .sl-statement { flex: 1; }
.stage.t-statement, .stage.t-quote, .stage.t-cover, .stage.t-join { justify-content: center; }

/* --- список карточками --- */
.sl-cards { list-style: none; margin: 1.6em 0 0; padding: 0; display: grid; gap: 1.1em; }
.sl-cards.two { grid-template-columns: 1fr 1fr; }
.sl-cards.one { grid-template-columns: 1fr; max-width: 46em; }
.sl-cards li { display: flex; gap: 1em; align-items: flex-start; padding: 1.1em 1.3em; border-radius: 12px; font-size: 1.32em; line-height: 1.35;
  background: linear-gradient(160deg, color-mix(in srgb, var(--ac-soft) 70%, #fff) 0%, #fff 70%); border: 1px solid color-mix(in srgb, var(--ac) 14%, var(--borderColor-default)); }
.sl-cards.one li { font-size: 1.5em; }
.card-n { font: 600 .82em var(--fontStack-monospace); color: var(--ac); padding-top: .2em; flex: none; }
.stage.enter .sl-cards li { animation: rise .5s cubic-bezier(.16, 1, .3, 1) both; }

/* --- шаги цепочкой --- */
.sl-steps { max-width: none; }
.sl-steps.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 1.4em; margin-top: 2em; counter-reset: none; }
.sl-steps.row li { display: flex; flex-direction: column; align-items: flex-start; gap: .9em; padding: 1.3em 1.3em 1.5em; border: 1px solid color-mix(in srgb, var(--ac) 14%, var(--borderColor-default));
  border-radius: 12px; font-size: 1.28em; line-height: 1.35; position: relative;
  background: linear-gradient(170deg, color-mix(in srgb, var(--ac-soft) 75%, #fff) 0%, #fff 62%); }
.sl-steps.row li + li::before { content: ""; position: absolute; left: -1.15em; top: 2.2em; width: .9em; height: 2px; background: linear-gradient(90deg, var(--ac), var(--ac-2)); }
.sl-steps.row .step-n { width: 2.2em; height: 2.2em; border-radius: 50%; font-size: 1em; background: linear-gradient(145deg, var(--ac), var(--ac-2)); color: #fff; border: 0; }
.sl-steps.col { max-width: 48em; }
.sl-steps.col li { border-top: 0; padding: .55em 0; }
.sl-steps.col .step-n { border-radius: 50%; background: linear-gradient(145deg, var(--ac), var(--ac-2)); color: #fff; border: 0; }

/* --- цифры и главная мысль --- */
.num-val { white-space: nowrap; }
.sl-numbers.n4 .num-val { font-size: 3.3em; }
.sl-numbers.n3 .num-val { font-size: 4.4em; }
.sl-numbers.n1 .num-val, .sl-numbers.n2 .num-val { font-size: 6em; }
.sl-numbers { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); margin-top: 2em; }
.num-card { padding: 1.2em 1.2em 1.3em; border: 1px solid color-mix(in srgb, var(--ac) 14%, var(--borderColor-default)); border-radius: 12px; border-image: none;
  background: linear-gradient(170deg, color-mix(in srgb, var(--ac-soft) 75%, #fff) 0%, #fff 62%); }
.num-val { background: linear-gradient(120deg, var(--ac-ink), var(--ac) 55%, var(--ac-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sl-statement { max-width: 30em; }
.sl-statement blockquote { font-size: 3.8em; }
.sl-text p { max-width: 40em; }
@media (max-width: 700px) { .sl-cards.two, .sl-steps.row { grid-template-columns: 1fr; } .sl-steps.row li + li::before { display: none; } }

/* ---------- телефон: редактор и пульт ведущего ---------- */
@media (max-width: 760px) {
  .filmstrip { display: block; overflow: visible; padding-right: 0; }
  .filmstrip > .btn { margin-bottom: 10px; }
  .filmstrip > div { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .filmstrip > div > * { flex: 0 0 170px; min-width: 0; scroll-snap-align: start; }
  .present .stage-wrap { overflow-x: hidden; }
  .present .stage table { table-layout: fixed; width: 100%; font-size: .82em; }
  .present .stage table td, .present .stage table th { overflow-wrap: anywhere; padding-left: .3em; padding-right: .3em; }
  .present .stage .Label { white-space: normal; }
}
.topbar .crumb, .topbar .btn { white-space: nowrap; flex: none; }
.topbar #ttl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .topbar #helpBtn { display: none; } }
.ed-wrap > * { min-width: 0; }
