/* Страница спикера: подготовка + вид во время эфира (светлая фирменная тема). */

/* ---------- подготовка ---------- */
.setup-card { padding: 34px 36px 26px; }
.setup-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.setup-card h1 { font-size: 52px; margin-top: 30px; }
.rejoin-box { display: flex; align-items: center; gap: 12px; background: var(--ok-bg); color: #0E5560; border: 1px solid rgba(18, 108, 121, .16); border-radius: var(--radius-s); padding: 12px 16px; margin: -6px 0 18px; font-size: 15px; }
.rejoin-box .spinner { flex: none; border-top-color: var(--petrol); }
.btn-main.pulse { animation: rjPulse 1.4s ease-out infinite; }
@keyframes rjPulse { 0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, .5); } 100% { box-shadow: 0 0 0 14px rgba(6, 182, 212, 0); } }
@media (prefers-reduced-motion: reduce) { .btn-main.pulse { animation: none; } }
.setup-grid { display: grid; grid-template-columns: 1.12fr 1fr 1fr; gap: 16px; margin-top: 8px; }
.setup-grid.two { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.deck-later { margin: 0 0 12px; }
.step { background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .8); border-radius: var(--radius-m); padding: 18px; min-width: 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 10px 30px -22px rgba(15, 23, 42, .35); }
.step-h { margin: 2px 0 14px; }

.preview { position: relative; aspect-ratio: 16 / 9; background: #15171A; border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.preview-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: #B8BCC2; padding: 18px; font-size: 14px; }
.res-badge { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-family: var(--label); font-size: 13px; line-height: 1; padding: 4px 9px; border-radius: 99px; }
.dev-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dev-row label.field { margin-bottom: 8px; font-size: 13px; }
.dev-row select { font-size: 14px; padding: 9px 34px 9px 12px; }
.level-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin: 6px 0 7px; }
.meter.big { height: 12px; }
.range-row { display: grid; grid-template-columns: auto 1fr 52px; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.range-row output { text-align: right; font-variant-numeric: tabular-nums; }

.deck-current { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--hair); border-radius: 16px; padding: 10px; margin-bottom: 10px; }
.deck-current img { width: 116px; aspect-ratio: 16 / 9; object-fit: contain; background: var(--canvas); border-radius: 10px; flex: none; }
.deck-name { font-weight: 500; word-break: break-word; }
.drop { border: 1.5px dashed rgba(0, 0, 0, .18); border-radius: 18px; padding: 20px 16px; text-align: center; background: rgba(255, 255, 255, .7); display: grid; gap: 6px; justify-items: center; transition: border-color .15s, background .15s; font-size: 14px; }
.drop.over { border-color: var(--cyan); background: rgba(165, 243, 252, .25); }
.drop-icon { width: 30px; height: 30px; color: var(--ink); }
.link-row { display: flex; gap: 8px; margin-top: 10px; }
.link-row input { flex: 1; min-width: 0; font-size: 14px; padding: 9px 12px; }
.deck-feats { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.deck-feats li { padding-left: 16px; position: relative; }
.deck-feats li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--aura); }
.deck-feats b { color: var(--ink); font-weight: 500; }
/* min-width: 0 и колонка minmax(0, 1fr): длинное имя файла обрезается многоточием, а не растягивает панель за края */
.upload { margin-top: 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; max-width: 100%; }
.upload-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; min-width: 0; }
.upload-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.upload-row span:last-child { flex: none; }
.upload .progress { min-width: 0; }
#upStage, #upStage2 { overflow-wrap: anywhere; }

.checks { display: grid; gap: 8px; margin: 6px 0 16px; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.chk .st { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(0, 0, 0, .18); flex: none; position: relative; }
.chk.run .st { border-color: rgba(0, 0, 0, .1); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.chk.ok .st { background: var(--teal); border-color: var(--teal); }
.chk.ok .st::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.chk.warn .st { background: #F59E0B; border-color: #F59E0B; }
.chk.warn .st::after { content: '!'; position: absolute; inset: 0; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.chk.bad .st { background: var(--rec); border-color: var(--rec); }
.chk.bad .st::after { content: '×'; position: absolute; inset: 0; color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; line-height: 1; }

@media (max-width: 1020px) {
  .setup-grid, .setup-grid.two { grid-template-columns: 1fr; }
  .setup-card h1 { font-size: 38px; }
  .setup-card { padding: 24px 20px 20px; }
}

/* ---------- эфир ---------- */
.stage {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  background-color: var(--canvas);
  background-image:
    radial-gradient(900px 360px at 10% -140px, rgba(6, 182, 212, .18), transparent 70%),
    radial-gradient(900px 360px at 60% -200px, rgba(186, 185, 224, .22), transparent 70%),
    radial-gradient(800px 360px at 95% -140px, rgba(146, 222, 221, .18), transparent 70%);
  background-repeat: no-repeat; color: var(--ink); overflow: hidden;
}
.stage > * { min-width: 0; flex: none; }
.stage > .st-main { flex: 1 1 auto; }
.st-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; }
.st-left, .st-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-mark { width: 30px; height: 30px; flex: none; }
/* живая миниатюра камеры: видно, что камера работает (и кадры с неё точно идут в эфир) */
.cam-mini { position: relative; width: 44px; height: 44px; flex: none; padding: 0; border: 2px solid #fff; border-radius: 50%; overflow: hidden; background: #15171A; box-shadow: 0 0 0 1px var(--hair), 0 6px 16px -8px rgba(0, 0, 0, .5); cursor: pointer; }
.cam-mini video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.cam-mini .cam-dot { position: absolute; right: 2px; bottom: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); border: 2px solid #fff; }
.cam-mini.bad { border-color: var(--rec); box-shadow: 0 0 0 3px rgba(250, 61, 29, .35); animation: camPulse 1.4s ease-in-out infinite; }
.cam-mini.bad .cam-dot, .cam-mini.off .cam-dot { background: var(--rec); }
@keyframes camPulse { 50% { box-shadow: 0 0 0 7px rgba(250, 61, 29, .12); } }
.st-share { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 0 18px 6px; padding: 6px 8px 6px 6px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 500; font-size: 15px; }
.st-share video { width: 72px; height: 40px; object-fit: contain; background: #000; border-radius: 999px; }
.st-share .btn { background: #fff; color: var(--ink); }
.st-alert { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 0 18px 6px; padding: 9px 10px 9px 18px; border-radius: 999px; background: var(--rec); color: #fff; font-weight: 500; font-size: 15px; text-align: center; }
.st-alert .btn { background: #fff; color: var(--ink); }
.st-title { font-weight: 400; color: var(--graphite); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; margin-left: 4px; }
.stage .pill { font-size: 13px; padding: 6px 12px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--hair); background: var(--glass-strong); color: var(--ink); font-size: 14px; position: relative;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: #fff; border-color: var(--hair-2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.icon-btn.off { background: var(--rec); border-color: var(--rec); color: #fff; }
.icon-btn.off::after { content: ''; position: absolute; left: 12px; top: 50%; width: 21px; height: 2px; background: currentColor; transform: rotate(-45deg); }
.icon-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.st-banner { margin: 0 18px 4px; padding: 10px 18px; text-align: center; font-weight: 500; font-size: 15px; border-radius: 999px; }
.st-banner.info { background: rgba(255, 255, 255, .85); color: var(--ink); border: 1px solid var(--hair); }
.st-banner.warn { background: #FFF4DF; color: #7A4700; border: 1px solid rgba(245, 158, 11, .3); }
.st-banner.bad { background: var(--rec); color: #fff; }
.st-banner.ok { background: var(--ink); color: #fff; }

.st-main { display: flex; gap: 14px; min-height: 0; padding: 8px 18px 12px; }
.st-main > .st-slides { flex: 1 1 auto; }
.st-main > .notes { flex: none; width: clamp(300px, 28vw, 440px); }
.st-slides { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; padding: 0 56px; }
.st-slides.has-dock { padding-bottom: 60px; }
.slide-wrap { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; container-type: size; }
.slide-box {
  position: relative; aspect-ratio: var(--ar, 16 / 9); width: min(100cqw, calc(100cqh * var(--arn, 1.7778))); max-height: 100cqh;
  border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 30px 70px -30px rgba(15, 23, 42, .45), 0 2px 10px -4px rgba(15, 23, 42, .12);
}
.slide-box > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; cursor: pointer; opacity: 0; pointer-events: none; }
/* два слоя: новый слайд сначала декодируется, затем мягко проявляется поверх старого — без белых вспышек */
.slide-box > img.on { opacity: 1; z-index: 1; pointer-events: auto; }
.slide-box > img.top { z-index: 2; }
.slide-box > img.fade { animation: slideIn .2s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes slideIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .slide-box > img.fade { animation: none; } }
.media-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.sm-item { position: absolute; overflow: hidden; pointer-events: auto; cursor: pointer; }
.sm-item video, .sm-item img { position: absolute; display: block; object-fit: fill; }
.sm-item .sm-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; transition: opacity .2s; }
.sm-item .sm-play::after { content: ''; margin-left: 5px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent #fff; }
.sm-item.playing .sm-play { opacity: 0; }
.sm-item.gif { cursor: default; }

.media-dock { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 120px); z-index: 3; }
.md-item { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--hair); border-radius: 999px; padding: 5px 6px 5px 6px; box-shadow: var(--shadow-s); font-size: 13px; }
.md-item button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.md-item button.ghost { background: rgba(0, 0, 0, .06); color: var(--ink); }
.md-item button svg { width: 15px; height: 15px; }
.md-item .md-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--graphite); }
.md-item .md-bar { width: 110px; height: 4px; border-radius: 4px; background: rgba(0, 0, 0, .1); overflow: hidden; }
.md-item .md-bar i { display: block; height: 100%; width: 0; background: var(--aura); }
.md-item .md-mute { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--graphite); padding: 0 8px 0 2px; white-space: nowrap; }
.md-item .md-mute svg { width: 14px; height: 14px; }
.md-item .md-time { font-family: var(--label); font-size: 13px; line-height: 1; color: var(--ink); min-width: 74px; text-align: right; padding-right: 6px; }

.no-deck { text-align: center; color: var(--graphite); max-width: 520px; display: grid; justify-items: center; gap: 6px; }
.no-deck .mark { width: 64px; height: 64px; }
.no-deck h2 { margin: 16px 0 0; font-size: 30px; font-weight: 300; letter-spacing: -.03em; color: var(--ink); }
.no-deck p { margin: 0; }
.nav-zone { position: absolute; top: 0; bottom: 0; width: 48px; border: 0; background: transparent; color: rgba(0, 0, 0, .25); font-size: 56px; display: flex; align-items: center; justify-content: center; border-radius: 16px; font-weight: 200; }
.nav-zone:hover:not(:disabled) { background: rgba(255, 255, 255, .5); color: var(--ink); }
.nav-zone:disabled { opacity: .3; cursor: default; }
.nav-zone.left { left: 0; } .nav-zone.right { right: 0; }
.self-pip { position: absolute; left: 64px; bottom: 10px; width: 220px; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow-s); z-index: 4; }
.self-pip video { width: 100%; display: block; transform: scaleX(-1); }
.self-pip span { position: absolute; left: 8px; bottom: 8px; font-family: var(--label); font-size: 12px; line-height: 1; color: #fff; background: rgba(0, 0, 0, .5); padding: 3px 8px; border-radius: 99px; }

/* боковая панель: заметки · чат · студия */
.notes { display: flex; flex-direction: column; min-height: 0; background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .8); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.notes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--hair); }
.notes-tools { display: flex; gap: 6px; }
.notes-text { overflow: auto; padding: 16px 18px 20px; font-size: var(--notes-fs, 22px); line-height: 1.45; letter-spacing: -.01em; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.notes-text.empty { color: var(--faint); font-size: 16px; }
.notes-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 12px 16px 14px; border-top: 1px solid var(--hair); }
.notes-next { display: grid; gap: 6px; }
.notes-next img { height: 74px; aspect-ratio: 16 / 9; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--hair); }
.notes-clock { display: grid; justify-items: end; gap: 2px; margin-left: auto; }
.notes-clock .pixel { font-size: 30px; line-height: 1; }

.st-foot { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 0 18px 10px; padding: 10px 14px; background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, .8); border-radius: 999px; box-shadow: var(--shadow); }
.big-nav { height: 58px; border-radius: 999px; border: 1px solid var(--hair); background: rgba(255, 255, 255, .9); color: var(--ink); font-size: 18px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .06s, background .15s; }
.big-nav:hover:not(:disabled) { background: #fff; }
.big-nav:active { transform: translateY(1px); }
.big-nav:disabled { opacity: .35; cursor: default; }
.big-nav .arr { font-size: 30px; line-height: 1; margin-top: -4px; font-weight: 300; }
.big-nav.primary { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6); }
.big-nav.primary:hover:not(:disabled) { background: #1b1c1f; }
#prevBtn { justify-self: end; width: min(260px, 100%); }
#nextBtn { justify-self: start; width: min(260px, 100%); }
.counter { display: grid; justify-items: center; line-height: 1; gap: 2px; min-width: 120px; }
.counter .pixel { font-size: 33px; color: var(--ink); }
.next-thumb { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 10px; }
.next-thumb img { height: 46px; aspect-ratio: 16 / 9; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--hair); }
.live-ctl { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; display: inline-block; }
.st-hint { text-align: center; color: var(--faint); font-size: 12px; padding: 0 0 10px; }
.st-hint b { color: var(--graphite); font-weight: 500; }

.drawer-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .25); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); z-index: 800; }
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(400px, calc(100vw - 20px)); background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, .9); border-radius: 26px; color: var(--text); z-index: 801; overflow: auto; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .45); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--hair); }
.drawer-sec { padding: 16px 18px; border-bottom: 1px solid var(--hair); }
.drawer-sec:last-child { border-bottom: 0; }
.drawer-sec h3 { margin: 0 0 12px; font-size: 15px; font-weight: 500; }
.deck-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid var(--hair); margin-bottom: 8px; cursor: pointer; background: rgba(255, 255, 255, .7); }
.deck-item:hover { background: #fff; }
.deck-item.cur { border-color: var(--ink); background: #fff; }
.deck-item img { width: 72px; aspect-ratio: 16 / 9; object-fit: contain; background: var(--canvas); border-radius: 8px; }
.deck-item div { font-size: 14px; min-width: 0; }
.deck-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

.offstage { position: fixed; left: -10px; top: -10px; width: 4px; height: 4px; overflow: hidden; opacity: .01; pointer-events: none; }
.offstage video, .offstage canvas { width: 4px; height: 4px; }

@media (max-width: 1100px) {
  .st-main { flex-direction: column; }
  .st-main > .notes { width: auto; height: 38%; min-height: 170px; }
  .st-main > .st-slides { min-height: 0; }
  .st-thumbs, .ts-open { display: none !important; }
  .notes-next { display: none; }
}
@media (max-width: 900px) {
  .icon-btn .lbl { display: none; }
  .st-bar { flex-wrap: wrap; padding: 8px 10px; gap: 8px; }
  .st-right { gap: 6px; flex-wrap: wrap; }
  .icon-btn { height: 34px; padding: 0 10px; }
  .st-banner { font-size: 14px; padding: 8px 12px; margin: 0 10px 4px; border-radius: 16px; }
  .counter { min-width: 70px; }
  .counter .pixel { font-size: 25px; }
  .st-title { display: none; }
  .st-main { padding: 6px 10px 8px; }
  .st-slides { padding: 0 36px; }
  .nav-zone { width: 34px; font-size: 40px; }
  .next-thumb { display: none; }
  .live-ctl { position: static; transform: none; grid-column: 1 / -1; justify-self: center; }
  .st-foot { grid-template-columns: 1fr auto 1fr; border-radius: 26px; margin: 0 10px 8px; }
  .big-nav { height: 50px; font-size: 16px; }
  .st-hint { display: none; }
  .media-dock { max-width: calc(100% - 72px); }
  .md-item .md-bar, .md-item .md-name { display: none; }
}

/* ---------- фото спикера ---------- */
.photo-row { display: flex; gap: 12px; align-items: center; margin: 0 0 14px; }
.photo-av { width: 58px; height: 58px; border-radius: 50%; flex: none; overflow: hidden; background: var(--aura); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 20px; color: #0b1115; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--hair); }
.photo-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-txt { font-size: 14px; min-width: 0; }
.photo-txt b { font-weight: 500; }
.photo-txt .opt { color: var(--faint); font-size: 12px; }
.photo-txt .faint { font-size: 12.5px; line-height: 1.35; }
.photo-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 3px; }
.photo-btns .link-btn { font-size: 13px; }

/* ---------- документы перед эфиром ---------- */
.legal-box { margin-top: 16px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .85); border-radius: var(--radius-m); padding: 18px; box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 10px 30px -22px rgba(15, 23, 42, .35); }
.legal-lead { color: var(--muted); font-size: 14px; margin: 0 0 14px; max-width: 900px; }
.legal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 760px) { .legal-fields { grid-template-columns: 1fr; } }
.legal-docs { display: grid; gap: 10px; }
.ldoc { border: 1px solid var(--hair); border-radius: 16px; padding: 12px 14px; background: #fff; }
.ldoc .check-line { margin: 0; font-size: 15px; }
.ldoc .check-line b { font-weight: 500; }
.ldoc .read { margin-left: 28px; font-size: 13px; }
.ldoc .restr { margin: 10px 0 0 28px; display: grid; gap: 6px; }
.ldoc .restr-h { font-size: 13px; color: var(--muted); }
.ldoc .restr-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.ldoc .restr-row label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.ldoc .restr textarea { min-height: 54px; font-size: 14px; padding: 8px 10px; }
.ldoc .restr .warn { font-size: 12.5px; color: #7A4700; }
.legal-signed { background: var(--ok-bg); color: #0E5560; border: 1px solid rgba(18, 108, 121, .16); border-radius: var(--radius-s); padding: 11px 14px; font-size: 14px; margin-bottom: 12px; }
.legal-join { display: grid; gap: 6px; margin-top: 14px; max-width: 520px; }
.doc-modal { max-width: 820px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.doc-modal .doc-body { overflow: auto; flex: 1 1 auto; font-size: 14.5px; line-height: 1.55; color: var(--text); margin-bottom: 16px; padding-right: 6px; }
.doc-body h2 { font-size: 15px; font-weight: 600; margin: 16px 0 6px; }
.doc-body p { margin: 0 0 8px; color: var(--text); }
.doc-body ul { margin: 0 0 8px 18px; padding: 0; }

/* ---------- верхняя панель: связь со студией и таймеры ---------- */
.pill.talk { background: var(--rec); color: #fff; border-color: var(--rec); }
.pill.talk .dot { background: #fff; animation: blink 1s infinite; }
.pill.hear { background: rgba(18, 108, 121, .09); color: #0E5560; border-color: rgba(18, 108, 121, .22); }
.st-timers { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; align-items: stretch; }
.next-thumb { display: none !important; }
.icon-btn { white-space: nowrap; }
.st-left { flex: 1 1 auto; overflow: hidden; }
.st-left .pill { flex: none; }
/* счётчик зрителей (число от студии, с её коэффициентом) */
.pill.viewers { gap: 6px; background: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.pill.viewers svg { width: 16px; height: 16px; flex: none; }
.pill.viewers b { font-weight: 600; font-size: 15px; }
.pill.viewers.bump b { animation: vwBump .5s ease; }
@keyframes vwBump { 40% { transform: scale(1.18); } }
@media (max-width: 700px) { .pill.viewers .vw-l { display: none; } }
.st-right { flex: none; }
.tmr { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 4px 12px 5px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--hair); min-width: 84px; }
.tmr .tl { font-family: var(--label); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--graphite); }
.tmr .pixel { font-size: 21px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tmr.amber { background: #FFF4DF; border-color: rgba(245, 158, 11, .35); }
.tmr.amber .pixel { color: #9A5B00; }
.tmr.red { background: rgba(250, 61, 29, .1); border-color: rgba(250, 61, 29, .35); }
.tmr.red .pixel { color: var(--rec); }
.tmr.over { background: var(--rec); border-color: var(--rec); animation: talkPulse 1.2s ease-in-out infinite; }
.tmr.over .tl, .tmr.over .pixel { color: #fff; }
@keyframes talkPulse { 50% { box-shadow: 0 0 0 6px rgba(250, 61, 29, .2); } }
.icon-btn .badge { position: absolute; top: -5px; right: -5px; }
.badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--rec); color: #fff; font-size: 11px; align-items: center; justify-content: center; font-weight: 600; font-style: normal; }
.st-q { margin: 0 18px 4px; padding: 8px 16px; border-radius: 16px; display: flex; gap: 12px; align-items: baseline; font-size: 15px; border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--aura) border-box; }
.st-q .kicker { white-space: nowrap; }

/* ---------- миниатюры слайдов ---------- */
.st-thumbs { flex: none; width: 172px; display: flex; flex-direction: column; min-height: 0; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, .8); border-radius: 20px; box-shadow: var(--shadow-s); overflow: hidden; }
.ts-head { display: flex; align-items: center; gap: 5px; padding: 10px 8px 6px 12px; }
.ts-head .kicker { font-size: 17px; }
.ts-head .kicker { flex: 1; }
.ts-head input { width: 44px; padding: 5px 6px; font-size: 14px; text-align: center; border-radius: 10px; }
.ts-head .icon-btn.sm { padding: 0 9px; }
.ts-deck { margin: 0 8px 8px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(18, 108, 121, .2); background: rgba(18, 108, 121, .08); color: #0E5560; border-radius: 12px; padding: 6px 9px; font-size: 12px; font-weight: 500; text-align: left; line-height: 1.2; }
.ts-deck .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }
.ts-deck.off { background: var(--warn-bg); color: #7A4700; border-color: rgba(245, 158, 11, .35); }
.ts-deck.off .dot { background: #F59E0B; }
.ts-deck:disabled { opacity: .6; cursor: default; }
.ts-list { flex: 1 1 auto; overflow-y: auto; padding: 2px 10px 12px; display: grid; gap: 8px; align-content: start; overscroll-behavior: contain; }
.ts-item { position: relative; border: 2px solid transparent; border-radius: 11px; padding: 0; background: #fff; cursor: pointer; box-shadow: 0 4px 12px -8px rgba(0, 0, 0, .35); }
.ts-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; border-radius: 9px; }
.ts-item .n { position: absolute; left: 4px; top: 4px; font-family: var(--label); font-size: 12px; line-height: 1; background: rgba(0, 0, 0, .66); color: #fff; padding: 2px 6px; border-radius: 6px; }
.ts-item:hover { border-color: var(--hair-2); }
.ts-item.cur { border-color: var(--ink); }
.ts-item.cur .n { background: var(--rec); }
.ts-item.has-media::after { content: '▶'; position: absolute; right: 5px; bottom: 5px; font-size: 10px; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 6px; padding: 2px 5px; }
.ts-open { flex: none; width: 30px; border: 1px solid var(--hair); background: var(--glass-strong); border-radius: 15px; color: var(--graphite); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 20px; }
.ts-open span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--label); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.ts-open:hover { background: #fff; color: var(--ink); }

/* презентация скрыта из эфира */
.slide-box.off > img.on, .slide-box.off .media-layer { filter: grayscale(.7); opacity: .45; }
.slide-box.off > img.fade { animation: none; }
.deck-off { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); background: rgba(10, 12, 14, .86); color: #fff; border-radius: 18px; padding: 12px 14px 12px 18px; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center; font-size: 14px; z-index: 4; }
.deck-off b { font-weight: 500; font-size: 15px; }
.deck-off span { color: rgba(255, 255, 255, .72); font-size: 13px; grid-column: 1; max-width: 460px; }
.deck-off .btn { grid-column: 2; grid-row: 1 / span 2; background: #fff; color: var(--ink); }
.goto { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(10, 12, 14, .86); color: #fff; font-family: var(--label); font-size: 44px; line-height: 1; padding: 14px 28px 12px; border-radius: 22px; z-index: 6; text-align: center; pointer-events: none; }
.goto small { display: block; font-size: 20px; opacity: .7; margin-top: 4px; }

/* панель: вкладки «Чат зрителей · Заметки» — крупный переключатель-сегмент, видно, где вы */
.side-tabs { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px; border-bottom: 1px solid var(--hair); flex: none; }
.side-tabs .seg { flex: 1 1 auto; display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(19, 26, 36, .07); min-width: 0; }
.side-tabs .seg button { flex: 1 1 0; min-width: 0; border: 0; background: none; padding: 9px 10px; border-radius: 12px; font-size: 15px; color: var(--graphite); display: inline-flex; gap: 8px; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, color .15s; }
.side-tabs .seg button svg { width: 18px; height: 18px; flex: none; }
.side-tabs .seg button:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.side-tabs .seg button.on { background: var(--ink); color: #fff; font-weight: 500; box-shadow: 0 6px 16px -10px rgba(19, 26, 36, .7); }
.side-tabs.single .seg { background: none; padding: 0; }
.side-tabs.single .seg button.on { background: none; color: var(--ink); justify-content: flex-start; padding-left: 4px; box-shadow: none; }
.side-tabs .side-x { flex: none; width: 36px; height: 36px; border: 1px solid var(--hair); border-radius: 12px; background: rgba(255, 255, 255, .7); color: var(--graphite); font-size: 20px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.side-tabs .side-x:hover { color: var(--ink); background: #fff; }
.side-open { flex: none; width: 34px; border: 1px solid var(--hair); background: var(--glass-strong); border-radius: 15px; color: var(--graphite); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 20px; }
.side-open .so-t { writing-mode: vertical-rl; font-family: var(--label); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.side-open:hover { background: #fff; color: var(--ink); }
.side-pane { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.side-pane[data-pane="notes"] .notes-text { flex: 1 1 auto; min-height: 0; }
.chat-wrap { flex: 1 1 auto; min-height: 0; }
.chat-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* служебное сообщение студии — крупно поверх слайдов */
.alert-ov { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .3); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 750; padding: 16px; animation: aoIn .22s ease-out; }
@keyframes aoIn { from { opacity: 0; } }
.ao-card { position: relative; border-radius: 30px; padding: 30px 44px 32px; max-width: min(960px, 94vw); text-align: center; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .6); overflow: hidden; border: 3px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--aura) border-box; animation: aoPop .28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes aoPop { from { transform: scale(.92); } }
.ao-from { font-family: var(--label); font-size: 15px; text-transform: uppercase; letter-spacing: .12em; color: var(--graphite); }
.ao-text { font-size: clamp(30px, 4.6vw, 64px); font-weight: 500; letter-spacing: -.025em; line-height: 1.1; margin: 10px 0 24px; text-wrap: balance; color: var(--ink); word-break: break-word; }
.ao-card .btn { padding: 12px 30px; font-size: 17px; }
.ao-bar { position: absolute; left: 0; bottom: 0; height: 6px; width: 100%; background: var(--rec); transform-origin: left; }

@media (max-width: 1500px) { .st-right .icon-btn .lbl { display: none; } .st-right #micBtn .lbl, .st-right #camBtn .lbl { display: inline; } }
@media (max-width: 1240px) { .st-right #micBtn .lbl, .st-right #camBtn .lbl { display: none; } .st-timers .tmr.clock { display: none; } }
@media (max-width: 900px) {
  .st-left, .st-right { flex: 1 1 100%; }
  .st-right { flex-wrap: wrap; }
  .st-main > .notes { height: 46%; }
  .dm-head { display: none; }
  .st-timers { position: static; transform: none; grid-column: 1 / -1; justify-self: center; order: -1; }
  .tmr { min-width: 70px; padding: 3px 8px; }
  .tmr .pixel { font-size: 16px; }
  .ao-card { padding: 22px 20px 24px; }
}

/* ---- вход по PIN и «ссылка занята» ---- */
.pin-form, .busy-box { display: grid; gap: 10px; margin-top: 6px; }
.pin-form.hidden, .busy-box.hidden { display: none; }
.pin-input { max-width: 240px; justify-self: center; width: 100%; }
.pin-form .err { margin: 0; }
.pin-form .fine, .busy-box .fine { text-align: center; }
#bootHome { margin-top: 14px; justify-self: start; }

/* ---- «в эфире чужая презентация → показать мою» ---- */
.st-deckbar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 18px 4px; padding: 6px 8px 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .85); border: 1px solid var(--hair); font-size: 14px; }
.st-deckbar.hidden { display: none; }
.st-deckbar .kicker { color: var(--muted); }
.st-deckbar #deckBarName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
@media (max-width: 720px) { .st-deckbar { margin: 0 10px 4px; border-radius: 16px; padding: 6px 10px; } .st-deckbar #deckBarName { max-width: 100%; } }

/* ---- документы: 18+, ссылки ---- */
.adult-line { margin: 12px 0 0; font-size: 15px; }
.adult-line b { font-weight: 500; }
.legal-links { margin: 10px 0 0; }
.legal-links:empty { display: none; }
.legal-links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---- другие спикеры: кто говорит ---- */
.pill.peer { background: rgba(255, 255, 255, .8); color: var(--muted); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.peer .dot { background: #9AA6B2; }
.pill.peer.on { color: #0E5560; border-color: rgba(18, 108, 121, .35); background: rgba(165, 243, 252, .35); }
.pill.peer.on .dot { background: #06B6D4; box-shadow: 0 0 0 4px rgba(6, 182, 212, .2); }
/* 18+ на экране PIN-кода: отдельной строкой над кнопкой, текст слева */
.adult-pin { margin: 2px 0 0; padding: 10px 12px; border-radius: 14px; background: rgba(165, 243, 252, .18); border: 1px solid rgba(18, 108, 121, .16); text-align: left; font-size: 14.5px; }
.adult-pin b { font-weight: 600; }
.adult-pin.need { border-color: rgba(250, 61, 29, .55); background: rgba(250, 61, 29, .06); }

/* ---- умный старт: отсчёт, готовность, «Вы в эфире» ---- */
.seq-card { position: fixed; top: 86px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; justify-items: center; gap: 4px; min-width: 300px; max-width: calc(100vw - 32px); padding: 14px 26px 16px; border-radius: 24px; background: rgba(19, 26, 36, .9); color: #fff; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); text-align: center; }
.seq-card.hidden { display: none; }
.seq-kick { font-family: var(--label); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #7FD6E3; }
.seq-big { font-family: var(--label); font-size: 54px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.seq-sub { font-size: 14px; color: rgba(232, 237, 245, .82); max-width: 46ch; }
.seq-card .btn { margin-top: 6px; }
.ready-bg { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 20, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ready-bg.hidden { display: none; }
.ready-card { width: min(520px, 100%); display: grid; gap: 12px; justify-items: center; text-align: center; padding: 30px 28px 24px; border-radius: 28px; background: #fff; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.ready-card h2 { margin: 0; font-size: 30px; font-weight: 400; letter-spacing: -.02em; text-wrap: balance; }
.ready-card p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 42ch; }
.ready-card .seq-kick { color: #126C79; }
.ready-count { font-family: var(--label); font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.ready-count:empty { display: none; }
.ready-card .btn-main { width: 100%; }
.ready-card.done .btn-main { display: none; }
.onair-ov { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle at center, rgba(250, 61, 29, .18), transparent 60%); animation: onairIn .25s ease-out; }
.onair-ov.hidden { display: none; }
.onair-badge { display: inline-flex; align-items: center; gap: 20px; padding: 26px 48px; border-radius: 999px; background: #FA3D1D; color: #fff; font-size: clamp(36px, 7vw, 72px); font-weight: 600; letter-spacing: .02em; box-shadow: 0 30px 80px -20px rgba(250, 61, 29, .7); }
.onair-badge .dot { width: .42em; height: .42em; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
@keyframes onairIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.roster-bar { margin: 0 18px 4px; padding: 8px 16px; border-radius: 999px; background: #FFF4DF; color: #7A4700; border: 1px solid rgba(245, 158, 11, .3); font-size: 14px; text-align: center; }
.roster-bar.hidden { display: none; }
.roster-bar b { font-weight: 600; }
@media (max-width: 720px) { .seq-card { top: 70px; padding: 10px 16px 12px; min-width: 0; } .seq-big { font-size: 40px; } .roster-bar { margin: 0 10px 4px; border-radius: 16px; } }

/* ---- язычок «чат · заметки» в узкой раскладке — полосой ---- */
@media (max-width: 1100px) {
  .side-open { width: auto; height: 38px; flex-direction: row; gap: 8px; }
  .side-open .so-t { writing-mode: horizontal-tb; }
  .side-open > span:first-child { transform: rotate(-90deg); }
}

/* ---- телефон вертикально: экран не поворачивается; слайд во всю ширину сверху, под ним чат/заметки,
   внизу компактные «Назад / Вперёд». Всё на одном экране без прокрутки ---- */
@media (max-width: 760px) and (orientation: portrait) {
  .st-bar { flex-wrap: nowrap; padding: 6px 8px; gap: 6px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
  .st-left { flex: 0 1 auto; gap: 6px; }
  .st-right { flex: 1 1 auto; justify-content: flex-end; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .st-right::-webkit-scrollbar { display: none; }
  .st-mark, .st-title { display: none; }
  .cam-mini { width: 36px; height: 36px; }
  .stage .pill { font-size: 12px; padding: 4px 9px; }
  #netText { display: none; }
  #netPill { padding: 4px 7px; }
  .icon-btn { height: 34px; padding: 0 9px; flex: none; }
  .st-banner, .roster-bar, .st-deckbar, .st-q, .st-alert { margin: 0 8px 4px; font-size: 13px; padding: 6px 10px; border-radius: 14px; }
  .st-main { padding: 4px 8px 6px; gap: 8px; }
  .st-main > .st-slides { flex: none; padding: 0; width: 100%; aspect-ratio: 16 / 9; height: auto; max-height: 42vh; }
  .st-slides.has-dock { padding-bottom: 0; }
  .nav-zone { width: 20%; font-size: 0; }
  .st-main > .notes { flex: 1 1 auto; height: auto; min-height: 120px; border-radius: 18px; }
  .side-tabs { padding: 6px; }
  .side-tabs .seg button { font-size: 14px; padding: 8px 6px; }
  .notes-text { padding: 10px 12px 14px; }
  .st-foot { margin: 0 8px calc(6px + env(safe-area-inset-bottom, 0px)); padding: 6px; gap: 6px 8px; border-radius: 22px; }
  .big-nav { height: 46px; font-size: 15px; }
  .big-nav .arr { font-size: 24px; }
  .counter { min-width: 54px; }
  .counter .pixel { font-size: 20px; }
  .counter .kicker { display: none; }
  .st-timers { gap: 4px; }
  .tmr { min-width: 60px; padding: 2px 8px; }
  .live-ctl .btn { padding: 8px 16px; font-size: 14px; }
  .self-pip { width: 32%; }
}

/* ---- «в эфире — чья презентация» и «кто не подключился» — в одну строку, низко: больше места слайду ---- */
.st-strip { display: flex; gap: 8px; margin: 0 18px 4px; min-width: 0; }
.st-strip:not(:has(> :not(.hidden))) { display: none; }
.st-strip > * { flex: 1 1 0; min-width: 0; margin: 0 !important; }
.st-strip > .hidden { display: none !important; }
.st-strip .st-deckbar, .st-strip .roster-bar { padding: 4px 12px; font-size: 13px; line-height: 1.35; min-height: 32px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; border-radius: 16px; }
.st-strip .st-deckbar .btn { padding: 3px 12px; font-size: 13px; }
.st-strip .st-deckbar #deckBarName { max-width: none; }
@media (max-width: 760px) { .st-strip { flex-direction: column; gap: 4px; margin: 0 8px 4px; } }

/* «Выйти из эфира» — справа внизу, рядом с «Начать/Завершить эфир» (спрашивает подтверждение) */
.live-ctl { display: flex; align-items: center; gap: 8px; }
.btn-leave { display: inline-flex; align-items: center; gap: 7px; }
.btn-leave svg { width: 17px; height: 17px; flex: none; }

/* эфирная: «Загрузить или заменить презентацию» над миниатюрами слайдов */
.ts-up { margin: 8px 8px 0; display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 12px; border: 1px dashed rgba(19, 26, 36, .22); background: rgba(255, 255, 255, .75); color: var(--ink); font: inherit; font-size: 12px; font-weight: 500; line-height: 1.2; text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.ts-up:hover { background: #fff; border-color: var(--teal); }
.ts-up svg { width: 17px; height: 17px; flex: none; color: var(--teal); }
.no-deck .btn { margin-top: 14px; }
/* ход загрузки — карточкой внизу слева, видно поверх эфирной */
.up-float { position: fixed; left: 18px; bottom: 92px; z-index: 60; width: min(340px, calc(100vw - 36px)); margin: 0; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .96); border: 1px solid var(--hair); box-shadow: 0 18px 40px -18px rgba(19, 26, 36, .45); }
.up-float.hidden { display: none; }
/* выбор: заменить файл своей презентации или загрузить новую */
.deck-pick { width: min(520px, calc(100vw - 32px)); }
.dp-list { display: grid; gap: 8px; margin: 4px 0 16px; max-height: 50vh; overflow: auto; }
.dp-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid var(--hair); background: rgba(255, 255, 255, .8); }
.dp-item.cur { border-color: var(--ink); background: #fff; }
.dp-item img { width: 80px; aspect-ratio: 16 / 9; object-fit: contain; background: var(--canvas); border-radius: 8px; flex: none; }
.dp-t { flex: 1; min-width: 0; font-size: 14px; display: grid; gap: 2px; }
.dp-t b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-item .btn { flex: none; }

/* «Все участники»: маленькие окна других спикеров (сверху справа над слайдами) */
.peers-pip { position: absolute; right: 12px; top: 12px; z-index: 5; width: 352px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 7px; border-radius: 16px; background: rgba(19, 26, 36, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); color: #E8EDF5; }
.peers-pip.hidden { display: none; }
.pp-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 0 4px; }
.pp-head .kicker { color: #A5F3FC; font-size: 11px; }
.pp-x { border: 0; background: transparent; color: #E8EDF5; font-size: 14px; padding: 2px 6px; border-radius: 8px; cursor: pointer; }
.pp-x:hover { background: rgba(255, 255, 255, .12); }
.pp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: auto; min-height: 0; }
.pp-t { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #16191E; }
.pp-t > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.pp-t.has > img { display: block; }
.pp-t.off > img { display: none !important; }
.pp-ini { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--label, monospace); font-size: 18px; letter-spacing: .06em; color: rgba(232, 237, 245, .75); }
.pp-ini img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.pp-t.has:not(.off) .pp-ini { display: none; }
.pp-n { position: absolute; left: 5px; right: 5px; bottom: 4px; font-size: 11px; line-height: 1.2; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: max-content; max-width: calc(100% - 10px); }
.pp-empty { grid-column: 1 / -1; margin: 6px 4px; font-size: 13px; color: rgba(232, 237, 245, .7); }
.pp-note { font-size: 10.5px; color: rgba(232, 237, 245, .5); padding: 0 4px; }
@media (max-width: 760px) { .peers-pip { width: 232px; } .pp-grid { grid-template-columns: 1fr; } .pp-note { display: none; } }

/* ---------- приветствие при входе по ссылке (страница спикера и окно входа ВМ1) ---------- */
.welcome { position: relative; overflow: hidden; text-align: center; flex-direction: column; padding-top: 104px; padding-bottom: 64px; }
.welcome::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: min(920px, 130vw); aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(165, 243, 252, .55), rgba(186, 185, 224, .5), rgba(146, 222, 221, .45), rgba(6, 182, 212, .28), rgba(165, 243, 252, .55));
  filter: blur(90px); opacity: 0; transform: translate(-50%, -50%) scale(.75); transition: opacity 1.6s ease, transform 2.2s ease;
  animation: wlSpin 48s linear infinite; pointer-events: none;
}
.welcome.wl-reveal::before { opacity: .8; transform: translate(-50%, -50%) scale(1); }
@keyframes wlSpin { to { rotate: 360deg; } }
.wl { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 920px; min-height: 320px; justify-content: center; }
.wl-logo { height: 30px; position: absolute; z-index: 1; top: 44px; left: 50%; transform: translateX(-50%); opacity: .9; }
.wl-loader {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(18, 108, 121, 0), #126C79 30%, #06B6D4 62%, #A5F3FC 88%, rgba(165, 243, 252, 0));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  animation: spin .9s linear infinite; transition: opacity .35s ease, transform .35s ease;
}
.welcome.wl-loaded .wl-loader { opacity: 0; transform: scale(.6); }
.wl-body { visibility: hidden; display: flex; flex-direction: column; align-items: center; padding: 0 8px 10px; }
.welcome.wl-reveal .wl-body { visibility: visible; }
.wl-hello { font-size: clamp(46px, 8.2vw, 96px); font-weight: 300; letter-spacing: -.045em; line-height: 1.02; margin: 0; color: var(--ink); text-wrap: balance; }
.wl-word { display: inline-block; white-space: nowrap; }
.wl-ch { display: inline-block; opacity: 0; transform: translateY(.32em); filter: blur(10px); }
.wl-reveal .wl-ch { animation: wlCh .95s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 45ms + 300ms); }
@keyframes wlCh { to { opacity: 1; transform: none; filter: blur(0); } }
.wl-line { width: 0; height: 2px; border-radius: 2px; background: var(--aura); margin: 26px auto 0; transition: width 1.4s cubic-bezier(.2, .7, .2, 1) .9s; }
.wl-reveal .wl-line { width: 132px; }
.wl-ev { margin-top: 26px; opacity: 0; transform: translateY(12px); max-width: 760px; }
.wl-reveal .wl-ev { animation: wlUp .85s ease both; animation-delay: var(--wl-ev-delay, 1.3s); }
.wl-when { color: var(--petrol); }
.wl-title { font-size: clamp(22px, 3.3vw, 34px); font-weight: 400; letter-spacing: -.02em; line-height: 1.2; margin-top: 12px; text-wrap: balance; overflow-wrap: anywhere; }
.wl-who { color: var(--muted); font-size: 15px; margin-top: 10px; }
.wl-go { width: auto; min-width: 280px; padding: 17px 32px; margin-top: 36px; opacity: 0; transform: translateY(12px); }
.wl-reveal .wl-go { animation: wlUp .75s ease both; animation-delay: var(--wl-go-delay, 2s); }
@keyframes wlUp { to { opacity: 1; transform: none; } }
.welcome.wl-leave .wl { animation: wlOut .42s ease both; }
@keyframes wlOut { to { opacity: 0; transform: translateY(-14px) scale(.985); } }
.wl-in { animation: wlIn .55s ease both; }
@keyframes wlIn { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 600px) { .welcome { padding-top: 96px; } .wl-logo { top: 36px; } .wl-go { min-width: 0; width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .welcome::before, .wl-loader, .wl-in, .welcome.wl-leave .wl { animation: none; }
  .wl-ch, .wl-ev, .wl-go { opacity: 1; transform: none; filter: none; animation: none !important; }
  .wl-line { transition: none; }
}

/* квадратный кадр камеры (1:1): в узких окнах раскладки спикер отправляет только квадрат по центру */
.preview.sq-guide::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; height: 100%; aspect-ratio: 1; transform: translateX(-50%); box-shadow: 0 0 0 100vmax rgba(10, 12, 16, .45); outline: 2px dashed rgba(255, 255, 255, .6); outline-offset: -2px; pointer-events: none; }
.sq-cap { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); max-width: calc(100% - 24px); z-index: 2; text-align: center; font-size: 12px; line-height: 1.3; color: #fff; background: rgba(0, 0, 0, .55); padding: 4px 10px; border-radius: 99px; pointer-events: none; }
.self-pip.sq { width: 168px; }
.self-pip.sq video { aspect-ratio: 1; object-fit: cover; object-position: 50% 30%; }
@media (max-width: 720px) { .self-pip.sq { width: 26%; } }

/* отзыв о платформе после эфира */
.fb-modal { max-width: 440px; }
.fb-lead { margin: 0 0 12px; }
.fb-stars { display: flex; gap: 6px; justify-content: center; margin: 4px 0 2px; }
.fb-stars button { font-size: 38px; line-height: 1; width: 52px; height: 52px; border: 0; background: none; color: #D5D9DE; cursor: pointer; border-radius: 12px; transition: transform .12s ease, color .12s ease; }
.fb-stars button.on { color: #F2A900; }
.fb-stars button:hover { transform: scale(1.12); }
.fb-stars button:focus-visible { outline: 2px solid var(--accent, #0A84FF); outline-offset: 2px; }
.fb-hint { text-align: center; font-size: 13px; color: #6B7280; min-height: 18px; margin-bottom: 10px; }
.fb-modal textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 12px; border: 1px solid #D5D9DE; resize: vertical; min-height: 90px; margin-bottom: 12px; }
/* «Завершить эфир для всех» (27.10): заметная, но отдельная от «Выйти из эфира»; два подтверждения */
.btn-stopall { font-weight: 700; letter-spacing: .01em; }
.modal .btn-danger[disabled] { opacity: .55; cursor: not-allowed; }
