/* Шрифт Golos Text: подключён здесь, чтобы был и в отдельном окне вопросов спикера. */
@import url("https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&display=swap");

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1b1d24;
  --muted: #6b6f7e;
  --line: #e4e4e7;
  --line-soft: #eceef3;
  --control: #f7f9fb;
  --ink: #1b1d24;          /* тёмные кнопки */
  --ink-hover: #31374d;
  --accent: #f35132;       /* оранжевый — главное действие */
  --accent-text: #c93a1d;  /* оранжевый для ссылок и мелкого текста: контрастнее на белом */
  --accent-soft: #fff1ed;
  --sky: #edf7ff;
  --sky-ink: #3f6f9c;
  --violet: #f6f1fb;
  --violet-ink: #7d55a8;
  --peach: #fef7f0;
  --peach-ink: #9a5a2c;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --warn: #a15c07;
  --warn-soft: #fff7e8;
  --bad: #c62828;
  --bad-soft: #fef2f2;
  --night: #0c0e14;
  --stage: #0c0e14;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(27, 29, 36, 0.04), 0 10px 30px -8px rgba(27, 29, 36, 0.1);
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* подвал прижат к низу и на короткой странице */
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: none; }
/* Подчёркивание при наведении — только у ссылок внутри текста; шапка, меню, кнопки и карточки без него. */
:is(p, li, td, .desc-text, .msg-text) a:not(.btn):hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; }
h2 { margin: 4px 0; font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.muted { margin: 0 0 4px; color: var(--muted); }
.desc { margin: 8px 0 0; color: var(--muted); }
/* Описание вебинара — светлая плашка, как на YouTube: три строки и «ещё»; абзацы сохраняются, ссылки нажимаются. */
.desc-box { margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: #eef0f4; font-size: 14px; line-height: 1.55; }
.desc-text { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.desc-text.open { display: block; white-space: pre-line; } /* свёрнутое — абзацы подряд, раскрытое — с абзацами */
.desc-text a, .msg-text a, .comment-body p a { color: #2459c7; }
.desc-meta { margin: 0 0 4px; font-weight: 600; }
.desc-more { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.desc-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.small { margin-top: 12px; font-size: 13px; }

/* --- Шапка --- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: saturate(1.4) blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #ff7a5c, var(--accent) 55%, #d63d1f);
  box-shadow: inset 0 2px 3px rgba(255, 190, 175, 0.7), inset 0 -2px 3px rgba(160, 40, 15, 0.45);
  color: #fff;
}
.brand-mark svg { width: 14px; height: 14px; margin-left: 2px; }
.brand-logo { display: block; width: auto; height: 24px; }
.brand-sub { padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.auth-body .brand-sub { border-left-color: rgba(255, 255, 255, 0.16); color: #8d93aa; }
.brand-name small { display: block; margin-top: -2px; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; gap: 4px; margin-left: 20px; margin-right: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 500; opacity: 0.75; }
.nav a:hover { opacity: 1; background: var(--control); text-decoration: none; }
.nav a.active { opacity: 1; background: var(--control); }
.me { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 14px; font-weight: 500; }
.nav + .me { margin-left: 0; }
.me form { margin: 0; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--violet);
  color: var(--violet-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: 1px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 56px; }
.wrap.wide { max-width: 1340px; }

/* --- Кнопки, метки, сообщения --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.btn:hover { border-color: #c9cbd3; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn.primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn.primary:hover { border-color: var(--ink-hover); background: var(--ink-hover); }
/* Оранжевая «объёмная» кнопка — главное действие на странице. */
.btn.accent {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 4px 4px rgba(255, 141, 119, 0.75), inset 0 -4px 4px rgba(195, 47, 19, 0.45), 0 10px 24px -10px rgba(243, 81, 50, 0.8);
}
.btn.accent:hover { background: #f5603f; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--control); color: var(--text); }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: transparent; color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.big { min-height: 56px; padding: 15px 26px; border-radius: 16px; font-size: 16px; }
.btn.sm { min-height: 34px; padding: 5px 12px; border-radius: 10px; font-size: 13px; }
.link { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.link:hover { color: var(--text); }

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--violet);
  color: var(--violet-ink);
  font-weight: 600;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.xl { width: 88px; height: 88px; font-size: 28px; }

/* Шапка: фото и имя ведут в профиль. */
.me-link { display: flex; align-items: center; gap: 10px; padding: 3px 12px 3px 3px; color: inherit; text-decoration: none; border-radius: 999px; transition: background 0.15s; }
.me-link:hover { background: #f2f4f7; }

/* Мой профиль. */
.profile h2 { margin: 0 0 4px; font-size: 18px; }
.profile > .form, .profile > .card { margin: 0 0 16px; }
.profile-photo { display: flex; align-items: center; gap: 22px; }
.profile-photo b { display: block; margin-bottom: 4px; }
.profile-photo small { display: block; max-width: 420px; }
.profile-photo .actions { margin-top: 12px; }
.profile-photo .error { margin: 8px 0 0; }
.photo-big.loading { opacity: 0.5; }
.form input:disabled { color: var(--muted); cursor: not-allowed; }
.my-rooms { display: grid; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.my-room { display: flex; align-items: center; gap: 14px; padding: 8px; margin: 0 -8px; border-radius: 12px; color: inherit; text-decoration: none; }
.my-room:hover { background: #f2f4f7; }
.my-room > span:last-child { display: grid; min-width: 0; }
.my-room b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.my-room small { color: var(--muted); }
.user-photo { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.user-photo small { max-width: 280px; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatars { display: flex; flex: none; }
.avatars .avatar + .avatar { margin-left: -7px; box-shadow: 0 0 0 2px rgba(12, 14, 20, 0.55); }

/* Спикеры на странице вебинара: фото, имя и должность в одну строку, переносятся по ширине. */
.speakers { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 14px 0 0; padding: 0; list-style: none; }
.speakers li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.speakers li > span:last-child { display: grid; line-height: 1.3; }
.speakers b { font-size: 14px; font-weight: 600; }
.speakers small { color: var(--muted); font-size: 13px; }

/* Админка: спикеры вебинара — строка «фото · имя · должность · сохранить», под ней ссылка-приглашение. */
.speakers-card h2 { margin-top: 0; }
.speaker-item { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.speaker-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: center; gap: 10px; }
.speaker-row.add { padding-top: 14px; border-top: 1px solid var(--line-soft); }
.speaker-row input:not([type="file"]):not([type="hidden"]) {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--control);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.speaker-row input:focus { outline: none; border-color: var(--ink); background: #fff; }
.photo-pick { position: relative; width: 48px; height: 48px; }
.photo-preview {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px dashed var(--line);
  border-radius: 50%;
  background: var(--violet);
  color: var(--violet-ink);
  font-weight: 600;
  overflow: hidden;
  cursor: pointer;
}
.photo-preview:has(img) { border-style: solid; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview input { display: none; }
.photo-preview.loading { opacity: 0.5; }
.photo-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.speaker-invite { min-width: 0; margin-left: 58px; }
.speaker-invite .copy-field { margin-top: 10px; }
.speaker-invite p { margin: 6px 0 0; }
.speaker-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--control);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}
.chip.sky { background: var(--sky); color: var(--sky-ink); }
.chip.peach { background: var(--peach); color: var(--peach-ink); }
.chip.violet { background: var(--violet); color: var(--violet-ink); }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: 1px;
}
.live-watchers::before { content: "·"; margin: 0 6px 0 2px; opacity: 0.75; }
.live-pill::before, .live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: live-dot 1.4s ease-in-out infinite;
}
@keyframes live-dot { 50% { opacity: 0.35; } }

.notice {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--peach);
  border: 1px solid #f4e2d2;
}
.notice.inline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.back { display: inline-flex; margin-bottom: 14px; color: var(--muted); font-size: 14px; font-weight: 500; }
.back:hover { color: var(--text); text-decoration: none; }
.empty { padding: 32px; border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); text-align: center; }
.error { color: var(--bad); }
.error-box { padding: 12px 16px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 500; }
.ok-box { margin-bottom: 16px; padding: 12px 16px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.warn { color: var(--warn); }
.strong { color: var(--text); font-weight: 600; }
.nowrap { white-space: nowrap; }
.prose { max-width: 760px; }
.prose p { margin: 12px 0 0; }

/* --- Тёмный блок со свечением (заголовок главной, плеер, вход) --- */

.hero-dark {
  position: relative;
  margin-bottom: 32px;
  padding: 30px 34px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(55% 90% at 100% 0%, rgba(56, 92, 214, 0.42), transparent 70%),
    radial-gradient(45% 80% at 0% 100%, rgba(56, 92, 214, 0.22), transparent 70%),
    var(--night);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
/* Тонкая сетка точек, затухающая к краям. */
.hero-dark::before, .auth-body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 60% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 60% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-dark h1, .auth-intro h1 {
  background: linear-gradient(130deg, #fff 0%, #fff 50%, #676e86 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-dark h1 { font-size: 36px; font-weight: 500; }
.hero-dark p { margin: 6px 0 0; max-width: 620px; color: #a9afc4; font-size: 15px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #b9bfd6;
  font-size: 14px;
  font-weight: 500;
}

/* --- Главная: разделы и карточки вебинаров --- */

.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
/* Разделы главной: в эфире, ближайшие, прошедшие. */
.rooms-section + .rooms-section { margin-top: 40px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.section-head .count { padding: 2px 9px; border-radius: 8px; background: #e9ecf2; color: var(--muted); font-size: 14px; font-weight: 600; }
.more { margin-top: 20px; }
.more summary { list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { display: none; }
/* Карточки по три в ряд, на телефоне — по одной. */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }

/* Карточка: обложка во всю карточку, внизу — затемнение и название. --h — цвет свечения, --i — номер для появления по очереди. */
.room-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  aspect-ratio: 4 / 3;
  padding: 14px 16px 16px;
  border-radius: 20px;
  background: var(--night);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(12, 14, 20, 0.08), 0 12px 28px -20px rgba(12, 14, 20, 0.5);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s;
  animation: card-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } }
.room-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(12, 14, 20, 0.08), 0 22px 40px -22px hsl(var(--h, 228) 70% 40% / 0.75); }
.room-card-media { position: absolute; inset: 0; z-index: -2; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s; }
.room-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.room-card:hover .room-card-media { transform: scale(1.05); }
/* Затемнение только под текстом: чуть-чуть сверху под дату и плотнее внизу под название. */
.room-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7, 9, 15, 0.3) 0%, rgba(7, 9, 15, 0) 24%, rgba(7, 9, 15, 0) 42%, rgba(7, 9, 15, 0.85) 100%);
  pointer-events: none;
}
/* Мягкий свет за курсором (координаты ставит cards.js). */
.room-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.12), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.room-card:hover::after { opacity: 1; }

/* Без обложки — свечение своего цвета, сетка точек и тонкие кольца. */
.art {
  background:
    radial-gradient(70% 60% at 90% 0%, hsl(var(--h, 228) 90% 60% / 0.9), transparent 65%),
    radial-gradient(60% 55% at 0% 32%, hsl(calc(var(--h, 228) + 50) 85% 55% / 0.5), transparent 70%),
    radial-gradient(45% 40% at 62% 58%, rgba(243, 81, 50, 0.22), transparent 70%),
    var(--night);
}
.art::before, .art::after { content: ""; position: absolute; pointer-events: none; }
.art::before {
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 70% 18%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 85% 65% at 70% 18%, #000 10%, transparent 70%);
}
.art::after {
  top: -38%;
  right: -22%;
  width: 95%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 9%, rgba(255, 255, 255, 0.09) 9.3% 9.6%);
  -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 70%);
  mask-image: radial-gradient(circle, #000 25%, transparent 70%);
}

.room-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.room-card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.glass-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}
.room-card .live-pill { margin: 0; padding: 4px 10px; border-radius: 999px; }
/* Значки спикера и админа — в углу, поверх ссылки на карточку; с мышью видны при наведении. */
.room-card-tools { position: relative; z-index: 1; display: flex; gap: 6px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10, 12, 18, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.28); }
.icon-btn svg { width: 15px; height: 15px; }
@media (hover: hover) {
  .room-card-tools { opacity: 0; transition: opacity 0.2s; }
  .room-card:hover .room-card-tools, .room-card-tools:focus-within { opacity: 1; }
}
/* «Плей» у эфира и записи. */
.room-card-play {
  position: absolute;
  top: 42%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  transform: translate(-50%, -50%);
  transition: background 0.3s, transform 0.35s;
  pointer-events: none;
}
.room-card-play svg { width: 13px; height: 15px; margin-left: 3px; }
.room-card:hover .room-card-play { background: var(--accent); transform: translate(-50%, -50%) scale(1.08); }

.room-card-body { display: grid; gap: 10px; margin-top: auto; }
.room-card h2 { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.room-card h2 a { color: #fff; }
.room-card h2 a:hover { text-decoration: none; }
/* Вся карточка — ссылка на вебинар. */
.room-card h2 a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.room-card-meta { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.room-card .speaker-line { display: flex; align-items: center; gap: 7px; min-width: 0; color: rgba(255, 255, 255, 0.78); font-size: 13px; }
.room-card .speaker-line > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-card .avatar { width: 24px; height: 24px; background: rgba(255, 255, 255, 0.18); color: #fff; font-size: 10px; }
/* Стрелка «перейти»: при наведении на карточку становится оранжевой. */
.room-card-go {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: background 0.25s, transform 0.25s;
}
.room-card-go svg { width: 14px; height: 14px; }
.room-card:hover .room-card-go { background: var(--accent); transform: translateX(2px); }

/* Идёт эфир — оранжевая обводка. */
.room-card.is-live { box-shadow: 0 0 0 2px var(--accent), 0 18px 40px -22px rgba(243, 81, 50, 0.8); }
.room-card.is-live .room-card-go { background: var(--accent); }
/* Прошедший — картинка приглушена и оживает при наведении. */
.room-card.is-past .room-card-media { filter: saturate(0.35) brightness(0.8); }
.room-card.is-past:hover .room-card-media { filter: none; }

/* Обложка в админке: миниатюра в списке и выбор картинки в форме вебинара. */
.room-cell { display: flex; align-items: center; gap: 14px; }
.thumb { position: relative; flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 10px; background-color: var(--night); overflow: hidden; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-pick { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.cover-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; background-color: var(--night); overflow: hidden; transition: opacity 0.2s; }
.cover-preview img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-preview.loading { opacity: 0.5; }
.cover-side { display: grid; gap: 8px; justify-items: start; }
.cover-side .label { font-size: 14px; font-weight: 500; }
.form .cover-side input[type="file"] { width: 100%; min-height: 0; padding: 7px; }
.cover-side .error { margin: 0; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .room-card, .room-card-media, .room-card-play, .room-card-go { animation: none; transition: none; }
  .room-card:hover, .room-card:hover .room-card-media { transform: none; }
}

.card {
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card > h2:first-child { margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }
.actions.nowrap { flex-wrap: nowrap; }
.actions.spaced { margin-top: 16px; }

/* --- Формы --- */

.form {
  display: grid;
  gap: 18px;
  max-width: 680px;
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
/* Подпись поля и пометка «необязательно» — в одну строку, поле — под ними во всю ширину. */
.form label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 6px; font-size: 14px; font-weight: 500; }
.form label > input, .form label > textarea, .form label > select { flex: 1 0 100%; }
.form .theme-pick input, .form .custom-colors input, .form .check input { flex: none; }
.form small { color: var(--muted); font-size: 13px; font-weight: 400; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form input, .form textarea, .form select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--control);
  color: var(--text);
  font: inherit;
  font-weight: 400;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.form textarea { min-height: 96px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(243, 81, 50, 0.14);
}
.form button { justify-self: start; }
.form h2 { margin: 0; }
.form.danger { border-color: color-mix(in srgb, var(--bad) 25%, var(--line-soft)); box-shadow: none; }
.access { margin: 0; color: var(--muted); font-size: 14px; }
.narrow { max-width: 680px; margin: 0 auto; }
.narrow .form { max-width: none; }

/* Галочка: квадрат с оранжевой рамкой, отмеченная — оранжевая с белой птичкой. */
.check { display: flex !important; align-items: flex-start; gap: 12px; font-weight: 400 !important; cursor: pointer; }
.check input {
  flex: none;
  width: 24px !important;
  min-height: 0 !important;
  height: 24px;
  margin: 0;
  padding: 0 !important;
  border: 1.5px solid var(--accent) !important;
  border-radius: 7px !important;
  background: transparent !important;
  appearance: none;
  cursor: pointer;
}
.check input:checked {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat !important;
}
.check input:focus-visible { outline: 3px solid rgba(243, 81, 50, 0.45); outline-offset: 2px; }
.check span { flex: 1; padding-top: 1px; line-height: 1.45; }
.form .check { flex-wrap: nowrap; }

/* --- Вход и регистрация: тёмная страница, крупные белые поля с подписью внутри --- */

.auth-body {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(50% 55% at 88% 8%, rgba(56, 92, 214, 0.38), transparent 70%),
    radial-gradient(45% 50% at 0% 100%, rgba(56, 92, 214, 0.2), transparent 70%),
    var(--night);
  color: #e8eaf2;
  isolation: isolate;
}
.auth-body::before { position: fixed; }
.auth-body .topbar { background: transparent; border-bottom-color: rgba(255, 255, 255, 0.06); backdrop-filter: none; }
.auth-body .brand { color: #fff; }
.auth-body .brand-name small { color: #8d93aa; }
.auth-body .wrap { max-width: 1160px; }

.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 72px; align-items: center; min-height: calc(100vh - 150px); }
.auth-intro h1 { font-size: 52px; line-height: 1.08; font-weight: 500; }
.auth-intro > p { max-width: 460px; margin: 16px 0 0; color: #a9afc4; font-size: 17px; }
.auth-points { display: grid; gap: 14px; margin: 32px 0 0; padding: 0; list-style: none; }
.auth-points li { display: flex; align-items: center; gap: 14px; color: #c9cede; }
.auth-points svg {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #ff8a70;
}

.auth-form { display: grid; gap: 14px; }
.auth-form h2 { margin: 0 0 6px; color: #fff; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.auth-form .btn.big { width: 100%; margin-top: 8px; }
.auth-form .check { margin-top: 4px; color: #c9cede; font-size: 15px; }
.auth-form .check a { color: #d4d4f0; text-decoration: underline; text-underline-offset: 3px; }
.auth-form .error-box { border: 1px solid rgba(243, 81, 50, 0.4); background: rgba(243, 81, 50, 0.12); color: #ffb4a4; }
.auth-note { margin: 4px 0 0; color: #8d93aa; font-size: 14px; text-align: center; }
.auth-note a { color: #d4d4f0; text-decoration: underline; text-underline-offset: 3px; }
.auth-form .ok-box { border: 1px solid rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.1); color: #bbf7d0; }
.auth-switch { margin: 6px 0 0; color: #a9afc4; text-align: center; }
.auth-form .error-box a, .auth-form .ok-box a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Вход через Telegram и VK ID: две кнопки над формой, ниже — «или по почте» */
.social-login { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 10px; }
.social-btn {
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
}
.social-btn:hover { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1); }
.social-btn svg { width: 20px; height: 20px; flex: none; }
.social-btn.telegram svg, .social-row.telegram > svg, .social-who.telegram > svg { color: #2aabee; }
.social-btn.vk svg, .social-row.vk > svg, .social-who.vk > svg { color: #0077ff; }
.social-btn.vk svg { color: #4a9bff; } /* на тёмном фоне фирменный синий VK слишком тёмный */
.auth-or { display: flex; align-items: center; gap: 12px; color: #7d8399; font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }

/* Шаг «Завершите регистрацию»: с каким аккаунтом пришёл человек */
.social-who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #a9afc4;
  font-size: 13px;
}
.social-who .avatar { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 14px; }
.social-who > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.social-who b { overflow: hidden; color: #fff; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.social-who > svg { width: 22px; height: 22px; flex: none; }

/* Профиль: привязанные соцсети */
.social-rows { display: grid; margin: 4px 0 0; padding: 0; list-style: none; }
.social-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.social-row:first-child { border-top: 0; }
.social-row > svg { width: 24px; height: 24px; flex: none; }
.social-row > span { display: grid; flex: 1; min-width: 0; }
.social-row small { color: var(--muted); font-size: 13px; }
.social-row form { margin: 0; }
.auth-switch a { color: #fff; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.field { position: relative; display: block; }
.field input {
  width: 100%;
  height: 62px;
  padding: 24px 18px 8px;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(243, 81, 50, 0.35); }
.field > span {
  position: absolute;
  top: 50%;
  left: 19px;
  color: #6b6f7e;
  font-size: 16px;
  transform: translateY(-50%);
  transition: top 0.15s, font-size 0.15s;
  pointer-events: none;
}
.field input:focus + span, .field input:not(:placeholder-shown) + span { top: 17px; font-size: 12px; }
.field input:-webkit-autofill + span { top: 17px; font-size: 12px; }
.field-eye {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  color: #6b6f7e;
  transform: translateY(-50%);
  cursor: pointer;
}
.field-eye:hover { background: var(--control); color: var(--text); }
.field-eye svg { width: 22px; height: 22px; }
.field:has(.field-eye) input { padding-right: 58px; }
.field:has(.field-eye) > span { right: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* подпись не заходит под «глаз» */
.field-hint { margin: -6px 0 0 4px; color: #8d93aa; font-size: 13px; }

/* --- Админка --- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px 20px; border-radius: var(--radius-lg); background: var(--sky); }
.stat.peach { background: var(--peach); }
.stat.violet { background: var(--violet); }
.stat b { display: block; font-size: 34px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }

.tabs { display: inline-flex; gap: 4px; margin-bottom: 18px; padding: 4px; border-radius: 14px; background: #e9ecf2; }
.tabs a { padding: 8px 16px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(27, 29, 36, 0.12); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.table th { background: var(--control); color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbfc; }
.table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.num { font-size: 15px; font-weight: 600; }
.table .btn { min-height: 34px; padding: 5px 12px; border-radius: 10px; font-size: 13px; }

.toolbar { position: relative; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.search { display: flex; flex: 1 1 320px; gap: 8px; max-width: 520px; }
.search input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(243, 81, 50, 0.14); }
/* Фильтры зрителей вебинара: в одну строку, на узком экране переносятся. */
/* Отчёт по баннеру на странице «Зрители». */
.banner-report h2 { margin: 0; font-size: 18px; }
.banner-report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 12px; }
.banner-report-head .btn { margin-left: auto; }
.banner-report .table-wrap { margin: 0; }
.banner-report p.small { margin: 10px 0 0; }
.rate { display: inline-block; width: 56px; height: 6px; margin-right: 8px; border-radius: 3px; background: var(--line-soft); vertical-align: middle; overflow: hidden; }
.rate i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.filters input, .filters select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.filters input[type="search"] { flex: 1 1 220px; min-width: 0; }
.filters select { cursor: pointer; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(243, 81, 50, 0.14); }
.min-field { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.filters .min-field input { width: 72px; }
.result-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.yes { color: var(--ok); font-weight: 600; }
.btn.danger-text { color: var(--bad); }
.btn.danger-text:hover { background: var(--bad-soft); color: var(--bad); }
.tag.warn-tag { background: var(--warn-soft); color: var(--warn); }
.chat-muted { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }

.add-user summary { list-style: none; }
.add-user summary::-webkit-details-marker { display: none; }
.add-user .form { position: absolute; right: 0; z-index: 10; width: min(560px, calc(100vw - 32px)); margin-top: 8px; box-shadow: 0 24px 60px -12px rgba(27, 29, 36, 0.3); }

/* --- Комната студента --- */

.room-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.room-head h1 { margin-bottom: 8px; }
.room-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; color: var(--muted); font-size: 14px; font-weight: 500; }
/* Строка под названием: иконка и текст без подложки; дата — тёмным, остальное — серым. */
.meta-item { display: inline-flex; align-items: center; gap: 7px; }
.meta-item svg { flex: none; width: 16px; height: 16px; }
.meta-item.date { color: var(--text); }
.meta-item.date svg { color: var(--muted); }
.room + .desc { max-width: 860px; margin-top: 18px; font-size: 16px; }
.room { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; margin-top: 20px; }
/* Прошедший вебинар: запись и комментарии одной колонкой, как на YouTube. */
.watch { max-width: 980px; margin: 0 auto; }
.room.is-past { grid-template-columns: minmax(0, 1fr); }

/* Лайк и «Поделиться» — справа от названия. */
.room-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #eef0f4;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.pill:hover { background: #e3e6ec; }
.pill svg { width: 20px; height: 20px; }
.pill span:empty { display: none; }
/* Иконки для команды (панель спикера, аналитика, изменить) — перед лайком, отделены чертой. */
.room-tools { display: flex; gap: 6px; margin-right: 4px; padding-right: 10px; border-right: 1px solid var(--line); }
.tool-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #eef0f4; color: var(--text); transition: background 0.15s; }
.tool-btn:hover { background: #e3e6ec; text-decoration: none; }
.tool-btn svg { width: 19px; height: 19px; }
.like-btn.on { color: var(--accent); }
.like-btn.on svg { fill: color-mix(in srgb, var(--accent) 22%, transparent); }
.like-btn:active svg { transform: scale(1.15); }
.share { position: relative; }
.share-menu, .pop-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 230px;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px -16px rgba(12, 14, 20, 0.35);
}
.share-menu > *, .pop-menu > * {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.share-menu > *:hover, .pop-menu > *:hover { background: #f2f4f7; }
.pop-menu { min-width: 200px; }
.pop-menu > .on { font-weight: 600; }
.share-menu svg { width: 18px; height: 18px; }

/* Комментарии к записи. */
.comments { margin-top: 28px; }
.comments-head { display: flex; align-items: center; gap: 24px; margin-bottom: 16px; }
.comments-title { margin: 0; font-size: 20px; }
.comments-sort { position: relative; }
.comments-sort .link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 600; }
.comments-sort svg { width: 20px; height: 20px; }
.comments-sort .pop-menu { left: 0; right: auto; }
.comment-form { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.comment-field { flex: 1; min-width: 0; }
.comment-field textarea {
  display: block;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  resize: none;
  overflow: hidden;
}
.comment-field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.comment-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.comment-field .error { margin: 6px 0 0; }
.comment-list, .replies { margin: 0; padding: 0; list-style: none; }
.comment { position: relative; display: flex; gap: 12px; padding: 10px 36px 10px 0; }
.replies .comment { padding-right: 0; }
.comment > .avatar, .comment-form > .avatar { width: 40px; height: 40px; font-size: 14px; }
.comment > .avatar { background: hsl(var(--h, 260) 70% 93%); color: hsl(var(--h, 260) 40% 35%); }
.replies .comment > .avatar { width: 28px; height: 28px; font-size: 11px; }
.reply-form > .avatar { width: 28px; height: 28px; font-size: 11px; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.comment-meta b { font-weight: 600; }
.comment-meta time { color: var(--muted); }
.comment-body > p { margin: 3px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-left: -8px; }
.comment-actions .link { margin-left: 8px; padding: 6px 10px; border-radius: 999px; color: var(--text); font-size: 13px; font-weight: 600; }
.comment-actions .link:hover { background: #eef0f4; }
/* «Нравится» с числом и «не нравится» — круглые кнопки, как на YouTube. */
.vote, .heart-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.vote:hover, .heart-btn:hover { background: #eef0f4; }
.vote svg { width: 18px; height: 18px; }
.vote.down svg { transform: rotate(180deg); }
.vote.on svg { fill: currentColor; fill-opacity: 0.85; }
.vote-count:empty { display: none; }
.heart-empty { display: grid; color: var(--muted); }
.heart-empty svg { width: 17px; height: 17px; }
/* Сердечко от школы: значок школы с маленьким красным сердцем в углу. */
.heart-badge { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; margin: 0 4px; }
.heart-badge img, .heart-letter { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.heart-letter { display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; }
.heart-badge i { position: absolute; right: -4px; bottom: -3px; display: grid; width: 13px; height: 13px; color: #e5233b; }
.heart-badge i svg { width: 13px; height: 13px; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }
.heart-btn .heart-badge { margin: 0; }
/* ⋮ — в правом верхнем углу комментария. */
.comment-more { position: absolute; top: 6px; right: 0; }
.comment-more-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; }
.comment-more-btn:hover { background: #eef0f4; }
.comment-more-btn svg { width: 20px; height: 20px; }
.replies .comment-more { top: 4px; right: -36px; }
.reply-form { margin: 8px 0 4px; }
.comment-empty { padding: 8px 0; color: var(--muted); }

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: var(--stage);
  overflow: hidden;
  box-shadow: 0 24px 50px -24px rgba(12, 14, 20, 0.6);
}
.player video { display: block; width: 100%; height: 100%; background: #000; }
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  background:
    radial-gradient(60% 70% at 80% 10%, rgba(56, 92, 214, 0.35), transparent 70%),
    radial-gradient(50% 60% at 10% 100%, rgba(56, 92, 214, 0.18), transparent 70%),
    var(--stage);
  color: #e9ebf1;
  text-align: center;
}
.overlay b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.overlay p { max-width: 420px; margin: 0 0 10px; color: #a3a9b8; }
.overlay .btn.primary {
  border-color: transparent;
  background: var(--accent);
  box-shadow: inset 0 4px 4px rgba(255, 141, 119, 0.75), inset 0 -4px 4px rgba(195, 47, 19, 0.45), 0 10px 24px -10px rgba(243, 81, 50, 0.8);
}
/* У вебинара с обложкой она видна в плеере, пока эфир не начался. Посередине, под текстом, — плотнее,
   по краям обложку видно: так надписи читаются на любой картинке, даже пёстрой. */
.overlay.has-cover {
  background:
    radial-gradient(closest-side at 50% 50%, rgba(10, 12, 16, 0.8), rgba(10, 12, 16, 0.62) 55%, rgba(10, 12, 16, 0.3)),
    linear-gradient(180deg, rgba(10, 12, 16, 0.1), rgba(10, 12, 16, 0.5)),
    var(--cover) center / cover no-repeat,
    var(--stage);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6);
}
/* Ожидание эфира: таймер до начала, «уже ждут», звук заранее, календарь — лёгкие, поверх обложки. */
.countdown { display: grid; justify-items: center; gap: 2px; }
.countdown-label { color: #a3a9b8; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.countdown-time { color: #fff; font-size: 56px; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.overlay .waiting-count { gap: 7px; margin-bottom: 4px; }
.waiting-count::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: live-dot 1.6s ease-in-out infinite; }
.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.sound-btn:hover { background: rgba(255, 255, 255, 0.2); }
.sound-on { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: #86efac; font-size: 14px; font-weight: 500; }
.sound-btn svg, .sound-on svg { width: 18px; height: 18px; }
.calendar-links { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; color: #a3a9b8; font-size: 13px; }
.calendar-links svg { width: 16px; height: 16px; }
.calendar-links a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.calendar-links a:hover { text-decoration-color: #fff; }
/* Эфир начался сам, но браузер не дал включить звук без нажатия — большая кнопка посередине видео. */
.unmute-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(12, 14, 20, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.unmute-btn:hover { background: rgba(12, 14, 20, 0.85); }
.unmute-btn svg { width: 22px; height: 22px; }
.player .recording { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; border: 0; background: #000; }
/* Под записью баннер — обычный блок: прилипая к низу экрана, он закрыл бы кнопки перемотки плеера. */
.room-main:has(.recording:not([hidden])) .offer { position: relative; bottom: auto; }
.live-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

/* Свои кнопки плеера (звук, на весь экран) — в правом верхнем углу, чтобы не спорить с баннером внизу. */
.player-controls { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 8px; }
.pc-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(12, 14, 20, 0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.pc-btn:hover { background: rgba(12, 14, 20, 0.8); }
.pc-btn svg { width: 22px; height: 22px; }

/* На весь экран разворачивается плеер вместе с баннером: видео на всю площадь, баннер — поверх его низа. */
.room-main:fullscreen { display: block; width: 100vw; height: 100vh; background: #000; }
.room-main:fullscreen .player { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.room-main:fullscreen .player video { object-fit: contain; }
.room-main:fullscreen .offer {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.room-main:fullscreen .offer-inner { padding-right: 52px; }
.room-main:fullscreen .offer-close { display: grid; }
.room-main:fullscreen.offer-dismissed .offer { display: none; }
.room-main:fullscreen.offer-dismissed .offer-reopen {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.offer-reopen-time { font-variant-numeric: tabular-nums; opacity: 0.9; }

/* --- Продающий баннер (у студента под видео и в предпросмотре у спикера) --- */

.room-main { position: relative; display: grid; gap: 12px; align-content: start; min-width: 0; }
/* Баннер не должен прятаться под краем окна: если не помещается — прилипает к низу экрана поверх видео. */
.room-main .offer { position: sticky; bottom: 12px; z-index: 5; }

.offer {
  --offer-bg: linear-gradient(135deg, #5b21b6 0%, #9333ea 48%, #db2777 100%);
  --offer-ink: #fff;
  --offer-muted: rgba(255, 255, 255, 0.84);
  --offer-chip: rgba(255, 255, 255, 0.18);
  --cd-bg: rgba(255, 255, 255, 0.14);
  --cd-line: rgba(255, 255, 255, 0.26);
  --cta-bg: #fff;
  --cta-ink: #6d28d9;
  position: relative;
  container-type: inline-size; /* раскладка зависит от ширины баннера, а не экрана */
  border-radius: 18px;
  background: var(--offer-bg);
  color: var(--offer-ink);
  box-shadow: 0 18px 40px -12px rgba(17, 24, 39, 0.45);
  overflow: hidden;
  isolation: isolate;
  animation: offer-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Мягкий блик в углу — чтобы градиент не выглядел плоской заливкой. */
.offer::before {
  content: "";
  position: absolute;
  top: -45%;
  right: -10%;
  z-index: -1;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

/* Широкий баннер: [картинка] [текст и цена] [колонка действия: таймер над кнопкой]. */
.offer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 28px; align-items: center; padding: 18px 22px; }
.offer-inner.has-image { grid-template-columns: 150px minmax(0, 1fr) auto; }
/* Картинка — целиком, в своих пропорциях (квадратная, вытянутая, вырезанный человек на прозрачном фоне).
   Тень — по контуру самой картинки, поэтому у вырезанной фигуры нет тёмного прямоугольника вокруг. */
.offer-image {
  justify-self: center;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 170px;
  border-radius: 12px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}
.offer-body { display: grid; gap: 6px; min-width: 0; }
.offer-badge {
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--offer-chip);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.offer-title { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.offer-text { margin: 0; color: var(--offer-muted); font-size: 15px; overflow-wrap: anywhere; }
.offer-prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.offer-old { color: var(--offer-muted); font-size: 16px; }
.offer-price { font-size: 28px; font-weight: 800; line-height: 1.1; }

.offer-action { display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-width: 230px; }
.offer-countdown { display: flex; align-items: center; justify-content: center; gap: 6px; }
.cd-label { margin-right: 4px; font-size: 12px; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: var(--offer-muted); }
.cd-box {
  display: grid;
  justify-items: center;
  min-width: 50px;
  padding: 6px 8px 5px;
  border: 1px solid var(--cd-line);
  border-radius: 10px;
  background: var(--cd-bg);
  line-height: 1;
}
.cd-box b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-box small { margin-top: 3px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--offer-muted); }
.cd-sep { padding-bottom: 12px; font-size: 20px; font-weight: 800; opacity: 0.6; }
.offer-cta {
  display: block;
  padding: 15px 24px;
  border-radius: 12px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.35);
  animation: cta-pulse 2.4s ease-in-out infinite;
}
.offer-cta:hover { text-decoration: none; filter: brightness(1.06); }

/* Средняя ширина: картинка меньше, таймер и кнопка — строкой под текстом. */
@container (max-width: 720px) {
  .offer-inner { grid-template-columns: minmax(0, 1fr); }
  .offer-inner.has-image { grid-template-columns: 96px minmax(0, 1fr); }
  .offer-inner.has-image .offer-action { grid-column: 1 / -1; }
  .offer-action { flex-direction: row; align-items: center; min-width: 0; }
  .offer-countdown { flex: none; }
  .offer-cta { flex: 1; }
}
/* Узкий баннер (телефон): без картинки, всё в одну колонку. */
@container (max-width: 480px) {
  .offer-inner, .offer-inner.has-image { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .offer-image { display: none; }
  .offer-title { font-size: 19px; }
  .offer-text { font-size: 14px; }
  .offer-price { font-size: 24px; }
  .offer-action { flex-direction: column; align-items: stretch; }
}

.offer.theme-ocean { --offer-bg: linear-gradient(135deg, #0c4a6e 0%, #0284c7 52%, #22d3ee 100%); --cta-ink: #0369a1; }
.offer.theme-sunset { --offer-bg: linear-gradient(135deg, #9a3412 0%, #ea580c 48%, #f43f5e 100%); --cta-ink: #c2410c; }
.offer.theme-dark {
  --offer-bg: radial-gradient(120% 160% at 0% 0%, #1e293b 0%, #0b1120 62%);
  --offer-chip: rgba(34, 211, 238, 0.16);
  --cta-bg: linear-gradient(135deg, #22d3ee, #a78bfa);
  --cta-ink: #0b1120;
}
.offer.theme-light {
  --offer-bg: #fff;
  --offer-ink: #111827;
  --offer-muted: #4b5563;
  --offer-chip: #fff1ed;
  --cd-bg: #fef2f2;
  --cd-line: #fecaca;
  --cta-bg: #f35132;
  --cta-ink: #fff;
  border: 1px solid #e5e7eb;
}
.offer.theme-light::before { display: none; }
.offer.theme-light .offer-badge { color: #c93a1d; }
.offer.theme-light .cd-box b { color: #b91c1c; }

/* Крестик и кнопка «вернуть предложение» — только на весь экран, где баннер закрывает видео. */
.offer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: none;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  cursor: pointer;
}
.offer-close:hover { background: rgba(0, 0, 0, 0.5); }
.offer-close svg { width: 16px; height: 16px; }
.offer-reopen { display: none; }

@keyframes offer-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes cta-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .offer, .offer-cta, .waiting-count::before { animation: none; } }

/* --- Форма баннера в панели спикера --- */

.form.compact { max-width: none; margin-top: 12px; padding: 0; border: 0; background: none; box-shadow: none; gap: 14px; }
.banner-status { margin: 0; color: var(--muted); font-size: 14px; }
.banner-status.on { color: var(--ok); font-weight: 600; }
.banner-status.error { color: var(--bad); }
.offer-preview { display: grid; gap: 8px; margin-top: 4px; }
.form .theme-pick { display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 400; }
.form .theme-pick label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.form .theme-pick input {
  width: 28px;
  min-height: 0;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  appearance: none;
  background: var(--swatch);
  cursor: pointer;
}
.form .theme-pick input:checked { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatch-violet { --swatch: linear-gradient(135deg, #5b21b6, #db2777); }
.swatch-ocean { --swatch: linear-gradient(135deg, #0c4a6e, #22d3ee); }
.swatch-sunset { --swatch: linear-gradient(135deg, #9a3412, #f43f5e); }
.swatch-dark { --swatch: linear-gradient(135deg, #1e293b, #0b1120); }
.swatch-light { --swatch: #fff; }
.swatch-custom { --swatch: conic-gradient(#f43f5e, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e); }
.form .custom-colors { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.form .custom-colors label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form .custom-colors input { width: 48px; min-height: 0; height: 34px; padding: 2px; cursor: pointer; }
.image-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.form .image-pick input[type="file"] { flex: 1 1 240px; width: auto; min-height: 0; padding: 7px; }
.form input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Чат --- */

.chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative; /* от него считаются кнопка реакций и всплывающие смайлики */
}
/* Высоту чата задаёт плеер: contain:size не даёт сообщениям растягивать строку сетки. */
.room .chat { contain: size; min-height: 440px; }
/* Чат в стиле современных мессенджеров: имя (у каждого своего цвета) и время над текстом, подряд идущие
   сообщения одного автора склеены, пометки — маленькие, без рамок и подсветки строк. */
.chat-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 52px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.chat-head b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.chat-role { margin-left: auto; color: #4058d6; font-size: 12px; font-weight: 600; cursor: help; }
/* Вкладки «Чат» / «Вопросы» — сегменты, число — неотвеченные вопросы. */
.chat-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #f2f4f7; }
.chat-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.chat-tabs button[aria-selected="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(27, 29, 36, 0.12); }
.tab-count { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.tab-count:empty { display: none; }
.messages { flex: 1; min-height: 0; margin: 0; padding: 26px 0 10px; overflow-y: auto; list-style: none; scrollbar-width: thin; } /* сверху место для плашки действий у первого сообщения */
.messages:empty::before { content: "Сообщений пока нет — напишите первым"; display: block; padding: 6px 16px; color: var(--muted); font-size: 14px; }
/* «Лучшие» и «Вопросы»: только нужные сообщения, порядок — по лайкам (--votes), отвеченные вопросы — в конце. */
.messages.best-tab, .messages.questions-tab { display: flex; flex-direction: column; }
.messages.best-tab .msg { order: calc(-1 * var(--votes, 0)); }
.messages.questions-tab .msg { order: calc(var(--answered, 0) * 100000 - var(--votes, 0)); }
.messages.best-tab .msg:not(.liked), .messages.questions-tab .msg:not(.question) { display: none; }
.messages.best-tab .msg.cont, .messages.questions-tab .msg.cont { padding-top: 7px; }
.messages.best-tab .msg.cont .msg-avatar { visibility: visible; height: 30px; }
.messages.best-tab .msg.cont .msg-head { display: flex; }
.messages.questions-tab:not(:has(.msg.question))::before { content: "Вопросов пока нет. Зрители задают их кнопкой «?» в поле — они появятся здесь"; display: block; padding: 6px 16px; color: var(--muted); font-size: 14px; }
.messages.best-tab:not(:has(.msg.liked))::before { content: "Пока ничего не лайкнули. Наведите на сообщение и нажмите 👍 — понравившееся соберётся здесь"; display: block; padding: 6px 16px; color: var(--muted); font-size: 14px; }
/* Лайки обычного сообщения — «👍 3» под текстом, как реакции в мессенджерах. */
.reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  margin-top: 4px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #6b7080;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.reaction svg { width: 13px; height: 13px; }
.reaction:hover:not(:disabled) { border-color: #b9bdc8; color: var(--text); }
.reaction.on { border-color: rgba(243, 81, 50, 0.45); background: #fff4ef; color: var(--accent-text); }
.reaction:disabled { cursor: default; }
.msg-tool.liked { color: var(--accent); }
.msg { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; padding: 7px 16px 3px; }
.msg.cont { padding-top: 1px; }
.msg:hover { background: #f6f7f9; }
.msg-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  border-radius: 50%;
  background: hsl(var(--h, 260) 60% 90%);
  color: hsl(var(--h, 260) 40% 32%);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg.cont .msg-avatar { visibility: hidden; height: 0; }
.msg-body { min-width: 0; }
.msg-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; margin-bottom: 1px; line-height: 1.3; }
.msg.cont .msg-head { display: none; }
.msg-author { color: hsl(var(--h, 260) 45% 38%); font-size: 13px; font-weight: 600; }
.msg.from-speaker .msg-author { color: var(--accent-text); }
.msg.from-moderator .msg-author { color: #4058d6; }
/* Значок роли после имени — маленький кружок с иконкой, как «галочка» в мессенджерах (в чате и в комментариях). */
.role-badge { display: inline-grid; place-items: center; flex: none; width: 15px; height: 15px; border-radius: 50%; color: #fff; vertical-align: -2px; }
.role-badge svg { width: 9px; height: 9px; }
.role-badge.speaker { background: var(--accent); }
.role-badge.mod { background: #4058d6; }
.role-badge.zoom { background: #2d8cff; }
.role-badge.logo { width: 16px; height: 16px; background: none; }
.role-badge.logo img { width: 16px; height: 16px; border-radius: 50%; }
.role-badge.blocked { width: 14px; height: 14px; background: none; color: var(--warn); }
.role-badge.blocked svg { width: 14px; height: 14px; }
/* Вопрос — как обычное сообщение, без фона: значок «?» после имени (ответили — зелёная галочка). */
.role-badge.question { background: none; box-shadow: inset 0 0 0 1.6px var(--accent); color: var(--accent); }
.role-badge.question svg { width: 10px; height: 10px; }
.role-badge.answered { background: var(--ok); }
.role-badge.answered svg { width: 10px; height: 10px; }
.reaction span:empty { display: none; }
/* Вкладки «Лучшие» и «Вопросы» — ровный список с тонкими разделителями. */
.messages.best-tab .msg, .messages.questions-tab .msg { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.messages.questions-tab .msg.answered { opacity: 0.6; }
.msg-time { color: #a0a4b0; font-size: 11px; opacity: 0; transition: opacity 0.15s; }
.msg:hover .msg-time { opacity: 1; }
.msg-text { color: var(--text); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
/* Ответ — одна тонкая строка над именем, как в Discord и Twitch: изогнутая линия от аватарки к имени того,
   кому ответили, и начало его сообщения серым. Без рамок и фона. */
.msg-reply {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  margin-bottom: 2px;
  padding: 0 0 0 40px;
  border: 0;
  background: none;
  color: #8a8f9c;
  font: inherit;
  font-size: 12.5px;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
}
.msg-reply::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 14px;
  width: 21px;
  height: 11px;
  border: solid #d5d8de;
  border-width: 1.6px 0 0 1.6px;
  border-top-left-radius: 6px;
}
.msg-reply b { flex: none; max-width: 50%; overflow: hidden; color: hsl(var(--rh, 260) 40% 42%); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.msg-reply span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-reply:hover span { color: var(--text); }
.msg.flash { animation: msg-flash 1.4s ease-out; }
@keyframes msg-flash { from { background: #fff1dc; } to { background: transparent; } }
/* Кому отвечаем — серая строка над полем, ✕ отменяет. */
.reply-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 4px 4px 4px 10px; border-radius: 10px; background: #f4f5f7; }
.reply-bar[hidden] { display: none; }
.reply-icon { display: grid; flex: none; color: #8a8f9c; }
.reply-icon svg { width: 16px; height: 16px; }
.reply-label { flex: 1; min-width: 0; overflow: hidden; color: #6b7080; font-size: 12.5px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.reply-label b { color: var(--text); font-weight: 600; }
.reply-label span { color: #8a8f9c; }
.reply-cancel { display: grid; place-items: center; flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: none; color: #8a8f9c; cursor: pointer; }
.reply-cancel:hover { background: #e7e9ee; color: var(--text); }
.reply-cancel svg { width: 15px; height: 15px; }

/* Реакции, которые видят все: сердечко справа над полем, при наведении — столбик смайликов. */
/* Сердечко стоит в строке поля (поле сужено справа), столбик и смайлики поднимаются над чатом. */
.chat:has(.react-dock) .composer { margin-right: 46px; }
.chat:has(.chat-input[hidden]) .react-dock { display: none; } /* кому запретили писать — без реакций */
.react-dock { position: absolute; right: 12px; bottom: 14px; z-index: 4; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.react-dock button { border: 0; background: none; font: inherit; line-height: 1; cursor: pointer; pointer-events: auto; }
.react-main {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line) !important;
  border-radius: 50% !important;
  background: #fff !important;
  font-size: 18px;
  transition: background 0.15s, border-color 0.15s;
}
.react-main:hover { border-color: #b9bdc8 !important; background: #f6f7f9 !important; }
.react-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border-bottom: 8px solid transparent; /* мостик до сердечка: столбик не закрывается, пока ведёшь к нему мышь */
  border-radius: 999px;
  background: #fff;
  background-clip: padding-box;
  box-shadow: 0 6px 18px -6px rgba(27, 29, 36, 0.28);
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  transform-origin: bottom center;
  visibility: hidden;
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.react-stack button { width: 32px; height: 32px; border-radius: 50%; font-size: 19px; transition: transform 0.12s; }
.react-stack button:hover { background: #f2f4f7; transform: scale(1.15); }
.react-dock.open .react-stack { opacity: 1; transform: none; visibility: visible; }
@media (hover: hover) { .react-dock:hover .react-stack { opacity: 1; transform: none; visibility: visible; } }
.float-emoji {
  position: absolute;
  right: 19px;
  bottom: 48px;
  z-index: 5;
  font-size: 26px;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  animation: float-up var(--dur, 2.4s) cubic-bezier(0.2, 0.6, 0.35, 1) forwards;
}
@keyframes float-up {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  12% { opacity: 1; transform: translate(calc(var(--dx) * 0.3), -30px) scale(1); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), -280px) scale(0.9); }
}
.msg.answered .msg-text { color: var(--muted); }
/* Действия при наведении — плашка над верхним краем сообщения, как в Slack и Discord: не закрывает имя, время и 👍. */
.msg-tools {
  position: absolute;
  top: -23px; /* плашка высотой 30px целиком над строкой с именем */
  right: 14px;
  z-index: 3;
  display: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(27, 29, 36, 0.12);
}
.msg:focus-within .msg-tools { display: flex; }
@media (hover: hover) { .msg:hover .msg-tools { display: flex; } }
.msg-tool {
  display: grid;
  place-items: center;
  width: 28px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.msg-tool:hover { background: #f2f4f7; }
.msg-tool svg { width: 16px; height: 16px; }
.msg-tool.on { color: var(--ok); }
.chat:has(.chat-input[hidden]) .reply-tool { display: none; }
/* На телефоне наведения нет: время видно всегда, а «Ответить», 👍 и ⋮ появляются под сообщением по нажатию на него. */
@media (hover: none) {
  .msg-time { opacity: 1; }
  .msg-tools { position: static; grid-column: 2; justify-self: start; margin-top: 4px; box-shadow: none; }
  .msg.active { background: #f6f7f9; }
  .msg.active .msg-tools { display: flex; }
}
.chat-menu { position: fixed; right: auto; z-index: 60; }
.chat-new {
  position: relative;
  z-index: 2;
  align-self: center;
  margin: -46px 0 10px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(12, 14, 20, 0.25);
  cursor: pointer;
}

/* Поле: одна строка — смайлики, текст, «?» (вопрос спикеру), отправка. Без свечения, только тонкая рамка. */
.chat-form { position: relative; display: grid; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line-soft); }
.chat-input { display: grid; }
.composer {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  padding: 0 5px 0 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s;
}
.composer:focus-within { border-color: #b9bdc8; }
.composer input { flex: 1; min-width: 0; height: 100%; padding: 0 6px; border: 0; outline: none; background: none; color: var(--text); font: inherit; font-size: 14px; }
.composer input::placeholder { color: #9aa0ad; }
.composer-btn, .q-toggle span[aria-hidden] {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #8a8f9c;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.composer-btn:hover, .q-toggle span[aria-hidden]:hover, .composer-btn[aria-expanded="true"] { background: #f2f4f7; color: var(--text); }
.composer-btn svg { width: 21px; height: 21px; }
.q-toggle { position: relative; flex: none; cursor: pointer; }
.q-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.q-toggle span[aria-hidden] { width: 30px; height: 30px; border: 1.8px solid currentColor; border-radius: 50%; font-size: 14px; font-weight: 700; transform: scale(0.82); }
.q-toggle input:checked + span[aria-hidden] { border-color: var(--accent); background: var(--accent); color: #fff; }
.q-toggle input:focus-visible + span[aria-hidden] { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-send {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.chat-send:hover { background: #e2462a; }
.chat-send:disabled { background: #e7e9ee; color: #a0a4b0; cursor: default; }
.chat-send svg { width: 18px; height: 18px; }
.emoji-panel {
  position: absolute;
  right: 12px;
  bottom: calc(100% - 4px);
  left: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px -14px rgba(12, 14, 20, 0.3);
}
.emoji-panel button { height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; font-size: 20px; line-height: 1; cursor: pointer; }
.emoji-panel button:hover { background: #f2f4f7; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.q-filter { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 400; cursor: pointer; }
.q-filter input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

/* --- Копирование значений --- */

.copy-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 12px; } /* длинная ссылка прокручивается внутри поля, а не раздвигает карточку */
.copy-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--control);
  font: 13px/1.4 ui-monospace, "JetBrains Mono", Menlo, monospace;
  white-space: nowrap;
  overflow-x: auto;
}
.copy-hint { color: var(--warn); font-size: 13px; }
.notice .copy-field { margin-top: 8px; }

/* --- Панель спикера --- */

.status { padding: 7px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.status.on { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; }
.status.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: live-dot 1.4s ease-in-out infinite; }
.status.off { border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.status.ready { background: #ecfdf3; color: var(--ok); }
.status.warn { background: #fff7ed; color: #c2410c; }

/* Эфир в панели спикера: предпросмотр сигнала из Zoom и «Начать эфир». */
.air-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--stage); overflow: hidden; }
.air-preview video { display: block; width: 100%; height: 100%; background: #000; }
.air-preview-empty { position: absolute; inset: 0; display: grid; place-content: center; margin: 0; padding: 16px; color: #a3a9b8; font-size: 14px; text-align: center; }
.air-preview-label { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 8px; background: rgba(12, 14, 20, 0.6); color: #fff; font-size: 12px; font-weight: 600; }
.air-sound { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 10px; }
.air-sound svg { width: 18px; height: 18px; }
.air-text { margin: 14px 0 12px; font-size: 14px; }
.air-card .actions { margin: 0; }
.air-card #air-start:disabled { opacity: 0.45; cursor: not-allowed; }
.air-card .error { margin: 10px 0 0; }
.qw-air { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #fff7ed; color: #c2410c; font-size: 13px; font-weight: 600; }
.qw-air .btn { min-height: 32px; margin-left: auto; padding: 4px 12px; border-radius: 10px; font-size: 13px; }
.qw-air[data-air="on"] { background: var(--accent); color: #fff; }
.qw-air[data-air="on"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: live-dot 1.4s ease-in-out infinite; }
.speaker-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; margin-top: 20px; }
.speaker-side .card { margin-bottom: 18px; }
.steps { margin: 10px 0 0; padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.viewers { margin: 10px 0 0; padding: 0; list-style: none; columns: 2; }
.viewers li { padding: 3px 0; }
.viewers:empty::before { content: "Пока никого"; color: var(--muted); }
.speaker-chat { height: calc(100vh - 200px); min-height: 540px; position: sticky; top: 84px; }

/* --- Окно вопросов (картинка в картинке или маленькое окно) --- */

body.qw { display: flex; flex-direction: column; height: 100vh; margin: 0; background: var(--bg); }
.qw-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.qw-count { min-width: 24px; padding: 1px 8px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; text-align: center; }
.qw-count:empty { display: none; }
.qw-sound { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 13px; }
.qw-sound input { accent-color: var(--accent); }
.qw-list { flex: 1; margin: 0; padding: 12px 14px; overflow-y: auto; list-style: none; }
.qw-list:empty::before { content: "Новых вопросов нет"; color: var(--muted); }
.qw-item { margin-bottom: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.qw-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.qw-head span { color: var(--muted); }
.qw-item p { margin: 4px 0 10px; font-size: 16px; overflow-wrap: anywhere; }
.qw-item .btn { min-height: 32px; padding: 4px 12px; border-radius: 10px; font-size: 13px; }

/* --- Узкие экраны --- */

@media (max-width: 960px) {
  .wrap { padding: 18px 16px 40px; }
  .topbar { height: 56px; padding: 0 16px; gap: 10px; }
  .brand-name small, .brand-sub, .me-name { display: none; }
  .nav { margin-left: 4px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  h1 { font-size: 26px; }
  .hero-dark { padding: 24px 20px; }
  .hero-dark h1 { font-size: 28px; }
  .room, .speaker-grid { grid-template-columns: minmax(0, 1fr); }
  .room .chat { height: 460px; }
  .overlay { padding-top: 48px; } /* чтобы плашка «В эфире» не наезжала на текст в маленьком плеере */
  .overlay[data-waiting] { gap: 6px; padding: 16px; } /* до эфира плашки нет, а места в плеере мало */
  .countdown-time { font-size: 40px; }
  .speaker-chat { position: static; height: 540px; }
  .room-head { flex-direction: column; }
  .form { padding: 20px; }
  .form .row { grid-template-columns: 1fr; }
  .auth { grid-template-columns: minmax(0, 1fr); gap: 28px; min-height: 0; padding-top: 8px; }
  .auth-intro h1 { font-size: 34px; }
  .auth-intro > p { font-size: 15px; }
  .auth-points { display: none; }
}
@media (max-width: 560px) {
  .nav { display: none; }
  .speaker-row { grid-template-columns: 48px minmax(0, 1fr); }
  .speaker-row input[name="title"], .speaker-row .btn { grid-column: 2; }
  .speaker-invite { margin-left: 0; }
  .overlay[data-waiting] b { font-size: 18px; }
  .overlay[data-waiting] p { margin: 0; font-size: 13px; }
  .overlay[data-waiting="soon"] p { display: none; } /* когда начало — и так видно над плеером */
  .countdown-time { font-size: 34px; }
  .countdown-label { font-size: 11px; }
  .overlay .waiting-count { margin: 0; }
  .sound-btn, .sound-on { min-height: 34px; padding-block: 6px; font-size: 13px; }
  .rooms-grid { grid-template-columns: minmax(0, 1fr); }
  .cover-pick { grid-template-columns: minmax(0, 1fr); }
}

/* Подвал — лёгкий, по ширине страницы: тонкая линия сверху, контакты и соцсети одной строкой, ниже мелко документы. */
body > .wrap { flex: 1 0 auto; width: 100%; }
.site-footer { border-top: 1px solid var(--line-soft); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 22px 24px 26px; }
.footer-inner.wide { max-width: 1340px; }
/* Запись с комментариями — одной колонкой 980px: подвал той же ширины. */
body:has(.watch) .footer-inner { max-width: 1028px; }
body:has(main > .narrow) .footer-inner { max-width: 728px; } /* профиль и формы — колонка 680px */
.footer-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer-brand { flex: none; color: var(--text); font-weight: 700; text-decoration: none; }
.footer-brand img { display: block; width: auto; height: 22px; }
.footer-contacts { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-contacts a { color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.footer-contacts a:hover { color: var(--accent); }
.footer-socials { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef0f4;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.footer-social:hover { background: #e3e6ec; }
.footer-social svg { width: 16px; height: 16px; }
.footer-social .yt-play { fill: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 16px; }
.footer-links a, .footer-copy { color: var(--muted); font-size: 12.5px; text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { margin: 6px 0 0; }
/* На тёмных страницах входа — светлый текст. */
.auth-body .site-footer { border-top-color: rgba(255, 255, 255, 0.07); }
.auth-body .footer-inner { max-width: 1160px; }
.auth-body .footer-brand, .auth-body .footer-contacts a { color: #fff; }
.auth-body .footer-social { background: rgba(255, 255, 255, 0.08); color: #e9ebf1; }
.auth-body .footer-social:hover { background: rgba(255, 255, 255, 0.14); }
.auth-body .footer-social .yt-play { fill: #0c0e14; }
.auth-body .footer-links a, .auth-body .footer-copy { color: #8d93aa; }
.auth-body .footer-links a:hover { color: #fff; }
@media (max-width: 960px) {
  .footer-inner { padding: 20px 16px 24px; }
  .footer-socials { margin-left: 0; }
}

/* --- Главная для гостей: тёмный первый экран (слева о вебинарах, справа ближайший эфир и регистрация), ниже карточки --- */

.landing-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: 48px; align-items: center; margin-bottom: 40px; padding: 36px 40px; }
.landing-intro h1 { margin: 0; font-size: 46px; line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance; }
.landing-intro > p { margin: 16px 0 0; max-width: 520px; font-size: 17px; }
.landing-intro .auth-points { margin-top: 28px; }
.landing-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.landing-live::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: live-dot 1.4s ease-in-out infinite; }

.landing-card { display: grid; gap: 14px; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 22px; background: rgba(255, 255, 255, 0.04); }
.landing-room {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 150px;
  padding: 14px 16px 16px;
  border-radius: 16px;
  overflow: hidden;
}
.landing-room::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 9, 15, 0.25), rgba(7, 9, 15, 0.85)); }
.landing-room-media { position: absolute; inset: 0; z-index: -2; }
.landing-room-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.landing-room h2 { margin: 0 0 8px; color: #fff; font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.landing-room .live-pill { margin: 0; padding: 4px 10px; border-radius: 999px; }
.landing-room .speaker-line { display: flex; align-items: center; gap: 7px; min-width: 0; color: rgba(255, 255, 255, 0.8); font-size: 13px; }
.landing-room .avatar { width: 24px; height: 24px; background: rgba(255, 255, 255, 0.18); color: #fff; font-size: 10px; }
.landing-when { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; color: #a9afc4; font-size: 14px; }
.landing-countdown { display: flex; gap: 6px; }
.landing-countdown span { display: grid; justify-items: center; min-width: 50px; padding: 5px 6px; border-radius: 11px; background: rgba(255, 255, 255, 0.07); color: #8d93aa; font-size: 11px; line-height: 1.2; }
.landing-countdown b { color: #fff; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.landing-onair { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(243, 81, 50, 0.14); color: #ffc4b6; font-size: 14px; }

/* Форма компактнее, чем на странице регистрации: поля ниже, галочки мельче. */
.landing-form { gap: 10px; }
.landing-form h2 { margin: 2px 0 4px; font-size: 22px; }
.landing-form .field input { height: 54px; padding: 20px 16px 6px; border-radius: 14px; font-size: 15px; }
.landing-form .field > span { left: 17px; font-size: 15px; }
.landing-form .field input:focus + span, .landing-form .field input:not(:placeholder-shown) + span, .landing-form .field input:-webkit-autofill + span { top: 14px; font-size: 11.5px; }
.landing-form .check { gap: 10px; margin-top: 0; color: #a9afc4; font-size: 13px; }
.landing-form .check input { width: 20px !important; height: 20px; border-radius: 6px !important; }
.landing-form .check input:checked { background-size: 13px !important; }
.landing-form .check a { color: #c9cede; }
.landing-form .btn.big { margin-top: 4px; }
.landing-form .auth-switch { margin: 2px 0 0; font-size: 14px; }

.section-note { margin: 0 0 0 auto; color: var(--muted); font-size: 14px; }
.room-card-play.locked { background: rgba(255, 255, 255, 0.16); }
.room-card-play.locked svg { width: 18px; height: 18px; margin: 0; }

/* Спикеры школы: лента карточек, на компьютере — по шесть в ряд со стрелками */
.speaker-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 5 * 16px) / 6);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.speaker-strip::-webkit-scrollbar { display: none; }
.speaker-card { display: grid; align-content: start; gap: 3px; min-width: 0; scroll-snap-align: start; }
.speaker-card-photo {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  margin-bottom: 9px;
  overflow: hidden;
  border-radius: 16px;
  background: #eef0f4;
  color: var(--muted);
  font-size: 28px;
  font-weight: 600;
}
.speaker-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.speaker-card b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.speaker-card small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.strip-nav { display: flex; gap: 6px; margin-left: 12px; }
.strip-nav[hidden] { display: none; }
.section-head:not(:has(.section-note)) .strip-nav { margin-left: auto; }
.strip-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.strip-btn svg { width: 16px; height: 16px; }
.strip-btn.prev svg { transform: rotate(180deg); }
.strip-btn:hover:not(:disabled) { border-color: #cfd3dc; background: #f6f7f9; }
.strip-btn:disabled { opacity: 0.4; cursor: default; }

@media (max-width: 960px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px 16px 16px; }
  .landing-intro h1 { font-size: 30px; }
  .landing-intro > p { margin-top: 10px; font-size: 15px; }
  .landing-intro .auth-points { display: none; } /* на телефоне форма — сразу под заголовком */
  .landing-card { padding: 10px; }
  .section-head:has(.section-note) { flex-wrap: wrap; }
  .section-note { flex-basis: 100%; margin: 0; }
  .speaker-strip { grid-auto-columns: calc((100% - 2 * 12px) / 2.4); gap: 12px; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
  .strip-nav { display: none; }
}

/* Гость на странице вебинара: видео и чат под замком, кнопки «Зарегистрироваться» и «Войти» */
.landing-room h2 a { color: inherit; }
.overlay.locked { gap: 10px; }
.overlay.locked p { margin: 0; }
.lock-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lock-icon svg { width: 20px; height: 20px; }
.overlay.locked .landing-countdown { margin: 2px 0; text-shadow: none; }
.overlay.locked .landing-countdown span { background: rgba(255, 255, 255, 0.1); color: #b9bfd0; }
.lock-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; text-shadow: none; }
.btn.glass { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn.glass:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.14); }

.chat-locked { display: grid; place-items: center; }
.chat-ghost { position: absolute; inset: 0; display: grid; align-content: start; gap: 18px; margin: 0; padding: 72px 20px 20px; list-style: none; opacity: 0.55; }
.chat-ghost li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; }
.chat-ghost li::before { content: ""; width: 32px; height: 32px; border-radius: 50%; background: #eef0f4; }
.chat-ghost li::after { content: ""; height: 34px; width: var(--w, 80%); border-radius: 12px; background: #f3f4f7; }
.chat-ghost li:nth-child(2) { --w: 60%; }
.chat-ghost li:nth-child(3) { --w: 90%; }
.chat-ghost li:nth-child(4) { --w: 50%; }
.chat-lock {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 22px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px -16px rgba(12, 14, 20, 0.25);
  text-align: center;
}
.chat-lock .lock-icon { background: #f1f2f5; color: var(--text); }
.chat-lock b { font-size: 16px; }
.chat-lock p { margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* Админка, форма вебинара: «Страница и поиск» — адрес, заголовок и описание для поиска, превью выдачи */
.seo-box { display: grid; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.seo-box h2 { font-size: 18px; }
.slug-field {
  display: flex;
  flex: 1 0 100%;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--control);
  overflow: hidden;
}
.slug-field:focus-within { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(243, 81, 50, 0.14); }
.slug-prefix { flex: none; max-width: 55%; padding-left: 14px; overflow: hidden; color: var(--muted); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.form .slug-field input { min-height: 46px; padding-left: 1px; border: 0; background: transparent; box-shadow: none; }
.form [data-count].over { color: var(--bad); font-weight: 600; }
.serp { display: grid; gap: 3px; padding: 14px 16px; border-radius: 12px; background: #f6f7f9; font-weight: 400; }
.serp-url { overflow: hidden; color: #1a7f37; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { overflow: hidden; color: #1a0dab; font-size: 18px; font-weight: 400; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.serp-desc { display: -webkit-box; overflow: hidden; color: #4d5156; font-size: 14px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Гость на телефоне и планшете: плеер под замком растёт по содержимому (иначе кнопки не помещаются),
   чат — одной карточкой без «призрачных» сообщений. */
@media (max-width: 960px) {
  .player:has(> .overlay.locked) { aspect-ratio: auto; }
  .overlay.locked { position: relative; min-height: 260px; padding: 28px 18px 24px; }
  .room .chat.chat-locked { height: auto; min-height: 0; contain: none; padding: 0; border: 0; background: none; box-shadow: none; }
  .chat-ghost { display: none; }
  .chat-lock { width: 100%; max-width: none; }
}

/* Админка «SEO»: адрес сайта, форма главной, таблица вебинаров глазами поиска */
.seo-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; padding: 14px 18px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); font-size: 14px; }
.seo-status .warn { display: block; margin-top: 4px; color: var(--accent-text); }
.seo-layout { max-width: 760px; margin-bottom: 36px; }
.seo-layout .form h2 + .muted { margin-top: -6px; }
.seo-rooms-head { margin-top: 8px; }
.seo-table td { vertical-align: middle; }
.seo-table .room-cell { align-items: flex-start; }
.seo-snippet { display: grid; gap: 2px; min-width: 0; max-width: 520px; }
.seo-snippet-title { overflow: hidden; color: #1a0dab; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.seo-snippet-url { overflow: hidden; color: #1a7f37; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.seo-snippet-desc { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.seo-chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #eef0f4; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.seo-chip.ok { background: #e7f6ec; color: #1a7f37; }
.seo-chip.warn { background: var(--accent-soft); color: var(--accent-text); }
.seo-chip.muted { background: #f1f2f5; color: #8b90a0; }
.seo-toggle { display: flex; align-items: center; gap: 8px; margin: 0; }
.seo-toggle .link { font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.seo-table tr.is-hidden .seo-snippet { opacity: 0.55; }
.related-rooms { margin-top: 40px; }

/* Админка, форма вебинара по вкладкам: шапка с действиями, вкладки, «Сохранить» внизу экрана */
.room-edit-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.room-edit-head h1 { flex: 1 1 320px; margin: 0; font-size: 26px; line-height: 1.2; }
.room-edit-head .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.room-edit-head form { margin: 0; }
.room-edit .ok-box, .room-edit .error-box { margin-bottom: 14px; }
.edit-tabs { display: flex; flex-wrap: wrap; margin-bottom: 0; }
.edit-tabs a { white-space: nowrap; }
.room-edit .room-form { margin-top: 12px; padding-bottom: 0; }
.room-edit .room-form[hidden] { display: none; }
.tab-panel { display: grid; gap: 18px; }
.tab-panel[hidden] { display: none; }
.room-edit > .tab-panel { margin-top: 12px; }
.room-edit > .tab-panel .speakers-card { margin: 0; }
.room-edit > .tab-panel .speakers-card > h2 { display: none; } /* название — уже на вкладке */
.tab-panel .seo-box { padding-top: 0; border-top: 0; }
.tab-panel .seo-box > h2 { display: none; }
.form-sub { margin: 6px 0 -6px; font-size: 16px; }
.form-save {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px -28px 0;
  padding: 14px 28px;
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.save-state { color: var(--muted); font-size: 13px; }
.save-state.dirty { color: var(--accent-text); font-weight: 600; }
.save-state.dirty::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.form-save .btn { justify-self: auto; }
@media (max-width: 960px) {
  .form-save { margin: 4px -20px 0; padding: 12px 20px; } /* у формы на телефоне поля 20px */
  .save-state { font-size: 12px; }
}

/* Панель спикера: вкладки слева, чат справа виден всегда; точки на вкладках — «в эфире» и «баннер показан» */
.speaker-side .edit-tabs { margin-bottom: 14px; }
.speaker-side .tab-panel { display: block; }
.speaker-side .tab-panel[hidden] { display: none; }
.tab-dot { display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: #22c55e; vertical-align: 2px; }
.tab-dot[hidden] { display: none; }
.tab-dot.live { background: #ef4444; animation: live-dot 1.4s ease-in-out infinite; }

/* Баннер в панели спикера: свой цвет кнопки и текста — галочка и выбор цвета */
.form .color-own-list { display: grid; gap: 8px; margin-top: 14px; }
.form .color-own { display: flex; align-items: center; gap: 12px; }
.form .color-own .check { flex: 0 1 auto; align-items: center; }
.form .color-own input[type="color"] { flex: none; width: 48px; min-height: 0; height: 32px; padding: 2px; cursor: pointer; }
.form .color-own input[type="color"]:disabled { opacity: 0.35; cursor: default; }
