/* Webinar System — фирменный стиль LazyCommission */
:root {
  --bg: #071a11;
  --paper: #0c2418;
  --ink: #effaf2;
  --gold: #ffc62f;
  --gold-deep: #f5b301;
  --muted: #9db8a6;
  --line: rgba(255, 255, 255, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
header {
  background: var(--paper);
  border-bottom: 2px solid var(--gold);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
header img.mascot { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
header .live-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #e5484d; animation: pulse 1.6s infinite; flex-shrink: 0;
}
header .live-dot.gold { background: var(--gold); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
header h1 { font-size: 18px; font-weight: 800; letter-spacing: .2px; }
header h1 .brand { color: var(--gold); }
header .sub { color: var(--muted); font-size: 13px; margin-left: auto; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.video-box { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--line); touch-action: manipulation; }
.video-box iframe, .video-box #player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Свой плеер: видео без своих кнопок, клики наружу перехватываются */
.vp-guard { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.vp-bigplay {
  position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--gold);
  background: rgba(7, 26, 17, .88); color: var(--gold); font-size: 30px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding-left: 6px;
}
.vp-bigplay:hover { background: var(--gold); color: #1a1405; }
.vp-bigplay.hidden { display: none; }
.vp-bigplay .vp-bp-txt { display: none; }
.vp-bigplay.is-sound {
  width: auto; height: auto; max-width: 92%;
  border-radius: 999px; padding: 14px 22px;
  gap: 10px; font-size: 17px; font-weight: 700; line-height: 1.25;
  white-space: normal; text-align: center;
  animation: bpPulse 2.2s ease-in-out infinite;
}
.vp-bigplay.is-sound .vp-bp-ico { font-size: 24px; }
.vp-bigplay.is-sound .vp-bp-txt { display: inline; }
@keyframes bpPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(255, 198, 47, .35); }
  50% { transform: translate(-50%, -50%) scale(1.045); box-shadow: 0 0 0 14px rgba(255, 198, 47, 0); }
}
@media (max-width: 640px) {
  .vp-bigplay.is-sound { font-size: 15px; padding: 11px 16px; }
  .vp-bigplay.is-sound .vp-bp-ico { font-size: 20px; }
}
.vp-bar {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
}
.vp-bar button {
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
  min-width: 38px; height: 38px; border-radius: 10px; font-size: 16px; cursor: pointer; flex-shrink: 0; padding: 0 8px;
}
.vp-bar button:hover { background: var(--gold); color: #1a1405; border-color: var(--gold); }
.vp-bar input[type=range] { flex: 1; accent-color: var(--gold); cursor: pointer; min-width: 40px; }
.vp-time { font-size: 12px; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vp-live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; letter-spacing: 1px; color: #ff5252; white-space: nowrap; }
.vp-live::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #ff2d2d; animation: pulse 1.6s infinite; }
.vp-spacer { flex: 1; }
.vp-endcard {
  position: absolute; inset: 0; z-index: 5; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 20px;
}
.vp-endcard.hidden { display: none; }
.vp-endcard img { width: 90px; height: 90px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.vp-endcard-title { font-size: 20px; font-weight: 800; }
.vp-endcard-btn {
  background: var(--gold); color: #1a1405; border: 0; border-radius: 12px;
  padding: 12px 26px; font-weight: 800; font-size: 15px; cursor: pointer;
}
.cta-bar {
  display: none; margin-top: 14px; background: linear-gradient(135deg, #2a1f08, #4a3208);
  border: 2px solid var(--gold); border-radius: 14px; padding: 18px 20px;
  align-items: center; gap: 16px;
}
.cta-bar.show { display: flex; animation: slidein .4s ease; }
@keyframes slidein { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.cta-bar .cta-mascot { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cta-bar .cta-text { flex: 1; font-size: 16px; font-weight: 600; }
.cta-bar a.cta-btn {
  background: var(--gold); color: #1a1405; font-weight: 800; font-size: 17px;
  padding: 14px 30px; border-radius: 12px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 18px rgba(255, 198, 47, .35);
}
.cta-bar a.cta-btn:hover { filter: brightness(1.08); }
.chat-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; height: 560px; overflow: hidden; }
.chat-card h2 { padding: 14px 16px; font-size: 15px; border-bottom: 1px solid var(--line); }
#chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.msg .msg-name { font-size: 12px; color: var(--gold); font-weight: 700; margin-bottom: 2px; }
.msg .msg-text { font-size: 14px; line-height: 1.45; word-wrap: break-word; }
.msg .msg-time { font-size: 11px; color: var(--muted); margin-left: 6px; }
.chat-form { padding: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.chat-form input[type=text] {
  background: #08130d; border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; width: 100%;
}
.chat-form input[type=text]:focus { outline: none; border-color: var(--gold); }
.chat-form .row { display: flex; gap: 8px; }
.chat-form button {
  background: var(--gold); color: #1a1405; border: 0; border-radius: 10px;
  padding: 10px 18px; font-weight: 800; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.chat-form button:disabled { opacity: .5; cursor: default; }
.notice { padding: 40px 20px; text-align: center; color: var(--muted); }
.notice img { width: 120px; border-radius: 50%; margin-bottom: 16px; border: 2px solid var(--gold); }
/* Админка */
.admin-wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.panel h2 { font-size: 16px; margin-bottom: 12px; }
.panel label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.panel input[type=text], .panel input[type=password], .panel input[type=datetime-local] {
  width: 100%; background: #08130d; border: 1px solid var(--line);
  color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.panel input:focus { outline: none; border-color: var(--gold); }
.panel select {
  background: #08130d; border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit;
}
.panel select:focus { outline: none; border-color: var(--gold); }
.panel input[type=file] { font-size: 13px; color: var(--muted); max-width: 100%; }
.panel input[type=file]::file-selector-button {
  background: rgba(255, 198, 47, .12); border: 1px solid rgba(255, 198, 47, .5); color: var(--gold);
  border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; margin-right: 10px;
}
.btn { display: inline-block; background: var(--gold); color: #1a1405; border: 0; border-radius: 10px; padding: 10px 20px; font-weight: 800; font-size: 14px; cursor: pointer; margin-top: 10px; }
.btn.danger { background: #e5484d; color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.msg-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.msg-row .ops { display: flex; gap: 10px; flex-shrink: 0; }
.msg-row button { background: none; border: 0; color: #e5484d; cursor: pointer; font-size: 13px; }
.badge { display: inline-block; background: var(--gold); color: #1a1405; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 20px; }
.viewers { display: inline-block; background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.5); color: #ffd766; font-size: 14px; font-weight: 700; padding: 5px 14px; border-radius: 999px; white-space: nowrap; }
a { color: var(--gold); }

/* --- Адаптив: планшет --- */
@media (max-width: 1024px) {
  .wrap { grid-template-columns: 1fr; }
  .chat-card { height: 480px; }
}
/* --- Адаптив: мобильный --- */
@media (max-width: 640px) {
  header { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  header img.mascot { width: 36px; height: 36px; }
  header h1 { font-size: 15px; }
  header .sub { font-size: 12px; }
  .viewers { font-size: 12px; padding: 4px 10px; }
  .wrap { padding: 12px; gap: 12px; }
  .video-box { border-radius: 10px; }
  .chat-card { height: 62vh; min-height: 380px; border-radius: 12px; }
  .cta-bar.show { flex-direction: column; text-align: center; gap: 12px; }
  .cta-bar a.cta-btn { width: 100%; text-align: center; }
  .chat-form input[type=text] { font-size: 16px; } /* без авто-зума на iOS */
  .vp-bigplay { width: 68px; height: 68px; font-size: 24px; }
  .vp-bar { padding: 8px 10px; gap: 8px; }
  .vp-bar button { min-width: 34px; height: 34px; font-size: 14px; }
  .vp-time { font-size: 11px; }
  .admin-wrap { padding: 16px 12px; }
  .panel { padding: 16px; }
}
/* --- Админка: строки формы --- */
.panel .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel .row .btn { margin-top: 0; }
.panel input[type=number] {
  background: #08130d; border: 1px solid var(--line);
  color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 14px;
}

/* --- Регистрация зрителя: красивая фирменная форма --- */
.reg-gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(1200px 600px at 50% -10%, #0e3a24 0%, var(--bg) 60%);
  overflow-y: auto;
}
.reg-gate.hidden { display: none; }
.reg-card {
  width: 100%; max-width: 430px;
  background: linear-gradient(160deg, #0e2c1d 0%, #08170f 100%);
  border: 1px solid rgba(255, 198, 47, .35);
  border-radius: 22px; padding: 34px 30px 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 0 0 6px rgba(255, 198, 47, .05);
  text-align: center; animation: reg-in .45s ease;
}
@keyframes reg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.reg-mascot { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); box-shadow: 0 6px 24px rgba(255, 198, 47, .25); }
.reg-kicker { margin-top: 12px; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.reg-title { margin: 8px 0 6px; font-size: 24px; font-weight: 800; }
.reg-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.reg-card label { display: block; text-align: left; font-size: 13px; color: var(--muted); margin: 12px 0 5px; font-weight: 600; }
.reg-card input {
  width: 100%; background: #08130d; border: 1px solid var(--line); color: var(--ink);
  border-radius: 12px; padding: 13px 14px; font-size: 16px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.reg-card input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 198, 47, .18); }
.reg-btn {
  width: 100%; margin-top: 20px; padding: 15px; font-size: 16px; border-radius: 14px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #1a1405; font-weight: 800; border: 0; cursor: pointer;
  box-shadow: 0 8px 26px rgba(255, 198, 47, .35);
  transition: transform .12s, box-shadow .15s;
}
.reg-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(255, 198, 47, .45); }
.reg-btn:active { transform: translateY(0); }
.reg-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.reg-err { min-height: 20px; margin-top: 10px; font-size: 13px; color: #ff8a8a; }
.reg-note { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* --- Экран ожидания запланированного вебинара --- */
.wait { max-width: 720px; margin: 0 auto; padding: 24px 20px 40px; }
.wait-card {
  background: linear-gradient(160deg, #0e2c1d 0%, #08170f 100%);
  border: 1px solid rgba(255, 198, 47, .35); border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
/* Баннер: ширина 100%, высота — по родной пропорции 16/9 (height: auto обязателен:
   без него атрибут height тега img задаёт фикс. высоту 743px и object-fit режет
   картинку по краям). Баннер показывается целиком, без обрезки. */
.wait-banner { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; object-position: 50% 25%; }
.wait-body { padding: 26px 34px 32px; text-align: center; }
.wait-kicker { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.wait-title { margin: 10px 0 6px; font-size: 30px; font-weight: 800; }
.wait-date { font-size: 17px; color: var(--ink); margin-bottom: 24px; }
.wait-date::before { content: '📅 '; }
.wait-topic { font-size: 19px; font-weight: 700; color: var(--gold); line-height: 1.45; margin: -10px 0 24px; }
.wait-cd { display: flex; align-items: stretch; justify-content: center; gap: 10px; }
.wait-cell {
  background: #08130d; border: 1px solid rgba(255, 198, 47, .4); border-radius: 14px;
  min-width: 86px; padding: 12px 8px;
}
.wait-cell b { display: block; font-size: 34px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.wait-cell span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.wait-sep { align-self: center; font-size: 30px; font-weight: 800; color: var(--gold); opacity: .7; }
.wait-note { margin-top: 20px; font-size: 15px; color: var(--gold); font-weight: 700; animation: pulse 1.6s infinite; }
/* Планшеты и маленькие ноутбуки: карточка уже, чем на большом десктопе */
@media (max-width: 1024px) {
  .wait { max-width: 640px; }
}
/* Низкие широкие экраны (ноутбук с панелями браузера, телефон в ландшафте):
   ужимаем баннер и отступы, чтобы отсчёт не уезжал под фолд */
@media (max-height: 560px) and (orientation: landscape) {
  .wait { padding-top: 12px; }
  
  .wait-body { padding: 16px 18px 20px; }
  .wait-title { font-size: 22px; }
}
@media (max-width: 640px) {
  .wait { padding: 16px 12px 32px; }
  
  .wait-body { padding: 22px 18px 26px; }
  .wait-title { font-size: 22px; }
  .wait-date { font-size: 15px; }
  .wait-topic { font-size: 16px; }
  .wait-cd { gap: 6px; }
  .wait-cell { min-width: 0; flex: 1; padding: 10px 4px; }
  .wait-cell b { font-size: 24px; }
  .wait-sep { font-size: 20px; }
}

/* Живой отсчёт на приветственном баннере: главный таймер поверх видео-зоны */
.wait-media { position: relative; }
.wait-cd--overlay {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3;
  width: max-content; max-width: calc(100% - 28px); padding: 10px 12px;
  border: 1px solid rgba(255, 198, 47, .55); border-radius: 18px;
  background: rgba(3, 13, 8, .84); box-shadow: 0 18px 45px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.wait-cd--overlay .wait-cell { background: rgba(255, 198, 47, .08); border-color: rgba(255, 198, 47, .28); min-width: 76px; padding: 9px 7px; }
.wait-cd--overlay.soon, .wait-cd--overlay.is-zero {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 198, 47, .38), 0 20px 55px rgba(0, 0, 0, .55), 0 0 34px rgba(255, 198, 47, .30);
}
.wait-cd--overlay.soon .wait-cell, .wait-cd--overlay.is-zero .wait-cell { min-width: 88px; padding: 12px 9px; }
.wait-cd--overlay.soon .wait-cell b, .wait-cd--overlay.is-zero .wait-cell b { font-size: 46px; }
@media (max-width: 640px) {
  .wait-cd--overlay { bottom: 10px; max-width: calc(100% - 20px); padding: 8px; border-radius: 15px; }
  .wait-cd--overlay .wait-cell { min-width: 0; flex: 1 1 0; padding: 8px 3px; }
  .wait-cd--overlay .wait-cell b { font-size: 26px; }
  .wait-cd--overlay.soon .wait-cell, .wait-cd--overlay.is-zero .wait-cell { min-width: 0; padding: 10px 3px; }
  .wait-cd--overlay.soon .wait-cell b, .wait-cd--overlay.is-zero .wait-cell b { font-size: 34px; }
}


/* Отсчёт зоны ожидания T-15: отдельная плашка ПОД картинкой (не поверх неё) */
.wait-cd--below {
  margin: 14px auto 0; width: max-content; max-width: calc(100% - 28px); padding: 10px 12px;
  border: 1px solid rgba(255, 198, 47, .55); border-radius: 18px;
  background: rgba(3, 13, 8, .84); box-shadow: 0 18px 45px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.wait-cd--below .wait-cell { background: rgba(255, 198, 47, .08); border-color: rgba(255, 198, 47, .28); min-width: 76px; padding: 9px 7px; }
.wait-cd--below.soon, .wait-cd--below.is-zero {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 198, 47, .38), 0 20px 55px rgba(0, 0, 0, .55), 0 0 34px rgba(255, 198, 47, .30);
}
.wait-cd--below.soon .wait-cell, .wait-cd--below.is-zero .wait-cell { min-width: 88px; padding: 12px 9px; }
.wait-cd--below.soon .wait-cell b, .wait-cd--below.is-zero .wait-cell b { font-size: 46px; }
@media (max-width: 640px) {
  .wait-cd--below { max-width: calc(100% - 20px); padding: 8px; border-radius: 15px; }
  .wait-cd--below .wait-cell { min-width: 0; flex: 1 1 0; padding: 8px 3px; }
  .wait-cd--below .wait-cell b { font-size: 26px; }
  .wait-cd--below.soon .wait-cell, .wait-cd--below.is-zero .wait-cell { min-width: 0; padding: 10px 3px; }
  .wait-cd--below.soon .wait-cell b, .wait-cd--below.is-zero .wait-cell b { font-size: 34px; }
}

/* --- Архив вебинаров: карточки записей --- */
.archive { max-width: 1280px; margin: 0 auto; padding: 28px 20px 40px; }
.archive h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.archive .archive-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.archive-card {
  display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; text-decoration: none; color: var(--ink);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.archive-card:hover { transform: translateY(-3px); border-color: rgba(255, 198, 47, .5); box-shadow: 0 14px 34px rgba(0, 0, 0, .4); }
.archive-date { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.archive-title { margin: 8px 0 14px; font-size: 17px; font-weight: 800; line-height: 1.35; }
.archive-go { display: inline-block; background: rgba(255, 198, 47, .12); border: 1px solid rgba(255, 198, 47, .5); color: var(--gold); font-weight: 700; font-size: 14px; padding: 9px 18px; border-radius: 10px; }

/* --- Кнопка PDF-бонуса (отдельно от офферной) --- */
.bonus-bar { display: none; margin-top: 14px; }
.bonus-slots { display: none; flex-direction: column; gap: 8px; margin-top: 10px; }
.bonus-slots.show { display: flex; }
.bonus-slots .bonus-btn { text-align: center; }
.bonus-bar.show { display: block; }
.bonus-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; border: 2px solid var(--gold); color: var(--gold);
  font-weight: 800; font-size: 15px; padding: 13px 24px; border-radius: 14px;
  text-decoration: none; transition: background .15s, color .15s, transform .12s;
}
.bonus-btn:hover { background: var(--gold); color: #1a1405; transform: translateY(-1px); }

/* --- Админка: таблицы --- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.tbl input[type=text], .tbl input[type=datetime-local], .panel input[type=email], .panel input[type=tel] {
  background: #08130d; border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; width: 100%;
}
.tbl input:focus, .panel input[type=email]:focus, .panel input[type=tel]:focus { outline: none; border-color: var(--gold); }
.tbl .btn { margin-top: 0; padding: 7px 14px; font-size: 12px; }
.tbl .row-actions { white-space: nowrap; }
.badge-live { display: inline-block; background: #e5484d; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 20px; letter-spacing: 1px; }
.badge-ended { display: inline-block; background: rgba(255, 255, 255, .1); color: var(--muted); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.chat-as { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.chat-as b { color: var(--gold); }
@media (max-width: 640px) {
  .reg-card { padding: 26px 20px 22px; }
  .reg-title { font-size: 20px; }
  .tbl-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
  .tbl { min-width: 560px; }
}

/* --- Счётчик мест со скидкой и таймер оффера --- */
.spots-bar { display: none; margin-top: 14px; background: linear-gradient(135deg, #241a06, #3a2a08); border: 2px solid var(--gold); color: #ffe9b0; border-radius: 14px; padding: 12px 18px 14px; }
.spots-bar.show { display: block; animation: slidein .4s ease; }
.spots-bar .spots-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.spots-bar .spots-caption { font-size: 16px; font-weight: 700; }
.spots-bar .spots-num { font-size: 26px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.spots-bar .spots-track { margin-top: 10px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.spots-bar .spots-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #d9a514, var(--gold)); transition: width .8s ease; }
.spots-bar.st-amber { border-color: #ffab2e; color: #ffe1b3; }
.spots-bar.st-amber .spots-num { color: #ffab2e; }
.spots-bar.st-amber .spots-fill { background: linear-gradient(90deg, #d97e06, #ffab2e); }
.spots-bar.st-red, .spots-bar.st-finale { border-color: #ff5147; color: #ffd9d4; animation: spotsPulse 1.6s ease-in-out infinite; }
.spots-bar.st-red .spots-num, .spots-bar.st-finale .spots-num { color: #ff7a6e; }
.spots-bar.st-red .spots-fill, .spots-bar.st-finale .spots-fill { background: linear-gradient(90deg, #d92c20, #ff5147); }
.spots-bar.st-none { border-color: #5a6070; background: linear-gradient(135deg, #171a21, #22262f); color: #aab1c0; }
.spots-bar.st-none .spots-fill { background: #5a6070; }
@keyframes spotsPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,81,71,0); } 50% { box-shadow: 0 0 22px 2px rgba(255,81,71,.45); } }
.timer-bar { display: none; margin-top: 14px; background: linear-gradient(135deg, #2a1f08, #4a3208); border: 2px solid var(--gold); border-radius: 14px; padding: 16px 20px; align-items: center; justify-content: center; gap: 14px; font-size: 16px; font-weight: 700; }
.timer-bar.show { display: flex; animation: slidein .4s ease; }
.timer-digits { font-size: 40px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: 2px; text-shadow: 0 2px 14px rgba(255, 198, 47, .45); }

/* ============================================================
   Комфорт зрителя на всех экранах (2026-10-18)
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
button, a, input { touch-action: manipulation; }
.bonus-btn { max-width: 100%; }
img, iframe { max-width: 100%; }

/* Десктоп: чат тянется по высоте колонки видео, а не фиксированные 560px */
@media (min-width: 1025px) {
  .chat-card { height: calc(100vh - 170px); height: calc(100dvh - 170px); max-height: 760px; min-height: 440px; }
}

/* Планшет и ниже: одна колонка, чат — доля высоты экрана */
@media (max-width: 1024px) {
  .wrap { padding: 16px; gap: 16px; }
  .chat-card { height: 52vh; height: 52dvh; min-height: 400px; }
}

/* Телефон */
@media (max-width: 640px) {
  .wrap { padding: 10px; gap: 10px; }
  .chat-card { height: 58vh; height: 58dvh; min-height: 340px; }
  .chat-form { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .chat-form button { padding: 12px 20px; font-size: 15px; }
  .vp-bar button { min-width: 40px; height: 40px; }
  .cta-bar { padding: 14px; }
  .cta-bar .cta-text { font-size: 15px; }
  .spots-bar { padding: 10px 12px 12px; }
  .spots-bar .spots-caption { font-size: 14px; }
  .spots-bar .spots-num { font-size: 22px; }
  .timer-bar { padding: 12px; gap: 10px; font-size: 14px; flex-wrap: wrap; }
  .timer-digits { font-size: 30px; letter-spacing: 1px; }
  .bonus-btn { display: flex; justify-content: center; width: 100%; font-size: 14px; padding: 12px 14px; }
  .archive { padding: 20px 12px 32px; }
  .archive-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
  .reg-gate { padding: 12px; }
  .notice { padding: 28px 14px; }
}

/* Короткие экраны: форма регистрации не должна упираться в края */
@media (max-height: 680px) {
  .reg-gate { align-items: flex-start; }
}

/* Телефон в ландшафте: компактнее видео-бар и чат повыше */
@media (max-height: 500px) and (orientation: landscape) {
  .chat-card { height: 86vh; height: 86dvh; min-height: 0; }
  .vp-bigplay { width: 56px; height: 56px; font-size: 20px; }
  header { padding: 6px 12px; }
}

/* Спокойствие для вестибулярки: без анимаций по запросу системы */
@media (prefers-reduced-motion: reduce) {
  .cta-bar.show, .spots-bar.show, .timer-bar.show { animation: none; }
  header .live-dot, .vp-live::before, .wait-note, .vp-bigplay.is-sound { animation: none; }
  .reg-card { animation: none; }
}

/* Блок слайдов презентации (live + повтор) */
.slides-bar { display: none; margin-top: 14px; background: #0a1f14; border: 1px solid #1d4630; border-radius: 14px; overflow: hidden; }
.slides-bar.show { display: block; animation: slidein .4s ease; }
.slides-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #9db8a9; }
.slides-count { font-weight: 700; color: var(--gold); text-transform: none; letter-spacing: 0; }
.slides-img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { .slides-bar.show { animation: none; } }

/* Компоновка как у Хомича + постоянная кнопка заявки (19.10.2026):
   десктоп — слева колонка [кнопка заявки / чат], справа видео;
   телефон — видео, кнопка заявки, чат. */
.wrap { grid-template-columns: 340px 1fr; grid-template-areas: "apply video" "chat video"; }
.video-col { grid-area: video; min-width: 0; }
.apply-bar { grid-area: apply; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #e5484d, #c62f36); color: #fff; font-weight: 900; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; padding: 16px 14px; border-radius: 14px; box-shadow: 0 6px 22px rgba(229, 72, 77, .35); text-align: center; }
.apply-bar:hover { filter: brightness(1.07); }
.chat-card { grid-area: chat; }
@media (min-width: 1025px) { .chat-card { height: calc(100vh - 170px); height: calc(100dvh - 170px); max-height: 760px; min-height: 440px; } }
@media (max-width: 1024px) {
  .wrap { grid-template-columns: 1fr; grid-template-areas: "video" "apply" "chat"; }
}

/* Ответы AI-агентов в чате (адресные, из панели модератора) */
.msg.agent { display: flex; gap: 9px; align-items: flex-start; background: rgba(232,201,90,.08); border: 1px solid rgba(232,201,90,.45); border-left: 3px solid var(--gold); border-radius: 10px; padding: 8px 10px; }
.msg.agent .agent-ava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold); flex-shrink: 0; }
.msg.agent .agent-body { min-width: 0; }
.msg.agent .msg-name { color: var(--gold); }
.msg.agent .agent-role { font-weight: 400; color: var(--muted); font-size: 11px; }

/* Один ряд действий под видео: [Бронирование] + [Текущий бонус] */
.action-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.action-row .cta-bar { flex: 1 1 380px; }
.action-row .bonus-slots { flex: 1 1 180px; margin-top: 14px; }
.action-row .bonus-slots .bonus-btn { display: flex; align-items: center; justify-content: center; height: 100%; box-sizing: border-box; text-align: center; }

/* Responsive fix 2026-10-21 (audit): ряд действий не шире колонки видео;
   подпись CTA не сжимается в узкий столбец, на телефоне кнопка — на всю ширину. */
.action-row .cta-bar { min-width: 0; flex-wrap: wrap; }
.action-row .cta-text { min-width: 0; flex: 1 1 170px; }
@media (max-width: 640px) {
  .action-row .cta-bar, .action-row .bonus-slots { flex: 1 1 100%; min-width: 0; }
  .action-row .cta-bar a.cta-btn { white-space: normal; width: 100%; text-align: center; line-height: 1.25; }
}
/* Экран результатов: видео-блок под линейкой пака, плавный показ/уход */
.results-screen { display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(10px); margin-top: 0; min-width: 0; transition: grid-template-rows .45s ease, opacity .35s ease, transform .35s ease, margin-top .35s ease; }
.results-screen.show { grid-template-rows: 1fr; opacity: 1; transform: none; margin-top: 14px; }
.results-screen-inner { overflow: hidden; min-height: 0; min-width: 0; background: linear-gradient(180deg, #0e2c1d, #0a2115); border: 1px solid rgba(232,201,90,.45); border-radius: 14px; }
.results-screen-title { padding: 12px 16px 10px; font-size: 15px; font-weight: 700; color: #ffd766; text-align: left; }
.results-screen-media { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.results-screen-media iframe, .results-screen-media video { display: block; width: 100%; height: 100%; border: 0; }
.results-screen-media video { object-fit: contain; }
@media (max-width: 640px) { .results-screen-title { font-size: 14px; padding: 10px 12px 8px; } }
@media (prefers-reduced-motion: reduce) { .results-screen { transition: none; } }

/* ============================================================
   Layout fix 2026-10-22: компактные кнопки ряда действий,
   кнопка бонуса отдельным рядом под бронью,
   чат — по высоте колонки контента
   ============================================================ */

/* Красная кнопка заявки слева: компактная полоса вместо растянутой плашки */
.apply-bar { align-self: start; min-height: 52px; padding: 10px 14px; font-size: 16px; line-height: 1.2; }

/* Чат: низ карточки — на уровне низа колонки контента (десктоп) */
@media (min-width: 1025px) {
  .wrap { grid-template-rows: auto 1fr; }
  .chat-card { height: 100%; max-height: none; min-height: 380px; }
}

/* Ряд 1: [карточка брони с золотой кнопкой] + [плашка мест] */
.action-row { gap: 10px; margin-top: 12px; }
.action-row .cta-bar { flex: 1 1 330px; margin-top: 0; padding: 8px 10px 8px 12px; gap: 10px; border-radius: 12px; }
.action-row .cta-bar .cta-mascot { width: 36px; height: 36px; }
.action-row .cta-text { font-size: 14px; font-weight: 700; line-height: 1.2; }
.action-row .cta-bar a.cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 20px; border-radius: 10px;
  background: linear-gradient(180deg, #ffd94d, #f0b41d); color: #1a1405;
  font-size: 15px; font-weight: 800; white-space: nowrap;
  box-shadow: 0 0 16px rgba(255, 198, 47, .45), 0 4px 10px rgba(0, 0, 0, .35);
}
.action-row .spots-bar { flex: 1 1 210px; margin-top: 0; padding: 7px 12px 8px; border-radius: 12px; }
.action-row .spots-bar .spots-caption { font-size: 13px; }
.action-row .spots-bar .spots-num { font-size: 20px; }
.action-row .spots-bar .spots-track { margin-top: 5px; height: 5px; }

/* Ряд 2: кнопка текущего бонуса — отдельным рядом под бронью */
.bonus-slots { align-items: flex-start; }
.bonus-slots .bonus-btn {
  min-height: 42px; padding: 8px 20px; border-radius: 10px;
  background: linear-gradient(180deg, #ffd94d, #f0b41d); color: #1a1405;
  border: 1px solid #ffdf6b; font-size: 15px; font-weight: 800;
  box-shadow: 0 0 16px rgba(255, 198, 47, .45);
  animation: bonusGlow 1.8s ease-in-out infinite;
}
@keyframes bonusGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 198, 47, .30); }
  50% { box-shadow: 0 0 22px rgba(255, 198, 47, .65); }
}

@media (max-width: 640px) {
  .action-row .cta-bar, .action-row .spots-bar { flex: 1 1 100%; }
  .action-row .cta-bar { padding: 10px 12px; }
  .action-row .cta-bar a.cta-btn { width: 100%; height: 44px; }
  .bonus-slots { align-items: stretch; }
  .bonus-slots .bonus-btn { width: 100%; min-height: 44px; padding: 6px 14px; font-size: 14px; line-height: 1.15; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .bonus-slots .bonus-btn { animation: none; }
}

/* Live-badge: живой индикатор эфира в кадре плеера (задача live-dot, восстановлено 2026-10-22) */
.live-badge {
  position: absolute; top: 12px; left: 12px; z-index: 6;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  background: rgba(5, 18, 10, .55);
  border: 1.5px solid rgba(46, 230, 107, .6);
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .14em;
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s ease;
  pointer-events: none; user-select: none;
}
.live-badge.on { opacity: 1; visibility: visible; }
.live-badge .lb-dot {
  position: relative; width: 10px; height: 10px; border-radius: 50%;
  background: #2ee66b; box-shadow: 0 0 10px rgba(46, 230, 107, .9);
  flex: 0 0 auto;
}
.live-badge .lb-dot::before,
.live-badge .lb-dot::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid rgba(46, 230, 107, .7);
  animation: liveRing 2s ease-out infinite;
}
.live-badge .lb-dot::after { animation-delay: 1s; }
@keyframes liveRing {
  0% { transform: scale(.55); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* === Bonus gift button (owner redesign 2026-10-22) === */
.bonus-slots .bonus-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  height: 50px; min-height: 50px; max-width: 100%;
  padding: 5px 16px 5px 6px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe066, #f5b81d 55%, #e79b0c);
  color: #231a00; text-decoration: none; border: 1px solid #ffdf7e;
  box-shadow: 0 6px 22px rgba(245,184,29,.45), inset 0 1px 0 rgba(255,255,255,.65);
  animation: bonusGlow 2.2s ease-in-out infinite, bbIn .35s ease;
}
.bonus-slots .bonus-btn .bb-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: radial-gradient(circle at 32% 30%, #fff3c4, #f0b41d 62%, #cf8a06);
  box-shadow: inset 0 1px 3px rgba(255,255,255,.8), inset 0 -2px 4px rgba(120,72,0,.45), 0 2px 6px rgba(90,55,0,.35);
}
.bonus-slots .bonus-btn .bb-txt { display: flex; flex-direction: column; justify-content: center; line-height: 1.12; min-width: 0; text-align: left; }
.bonus-slots .bonus-btn .bb-txt b { font-size: 15px; font-weight: 900; letter-spacing: .2px; white-space: nowrap; }
.bonus-slots .bonus-btn .bb-txt i { font-style: normal; font-size: 12px; font-weight: 700; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bonus-slots .bonus-btn .bb-dl { flex: 0 0 auto; font-size: 14px; font-weight: 900; opacity: .75; }
.bonus-slots .bonus-btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); animation: bbShine 3s ease-in-out infinite; pointer-events: none;
}
@keyframes bbShine { 0%, 55% { left: -70%; } 90%, 100% { left: 135%; } }
@keyframes bbIn { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .bonus-slots .bonus-btn { display: flex; width: 100%; height: 50px; min-height: 50px; }
  .bonus-slots .bonus-btn .bb-txt { flex: 1 1 auto; }
  .bonus-slots .bonus-btn .bb-txt b { overflow: hidden; text-overflow: ellipsis; }
}

/* === Chat height lock (owner final 2026-10-22) ===
   Desktop: the chat card must not size the grid row by its content.
   contain:size makes its intrinsic size zero, so row 2 is sized by the
   spanning content column alone; the card fills it exactly and the
   message list scrolls inside. Mobile: hard vh caps. */
@media (min-width: 1025px) {
  .wrap { grid-template-rows: auto minmax(0, 1fr); }
  .chat-card { contain: size; height: 100%; min-height: 0; max-height: none; }
}
@media (max-width: 640px) {
  .chat-card { height: 48vh; height: 48dvh; max-height: 48vh; max-height: 48dvh; min-height: 300px; }
}

/* === Mobile CTA fix 2026-10-22 (комната повтора): на телефоне .cta-bar —
   колонка (flex-direction: column), и десктопное правило
   .action-row .cta-text { flex: 1 1 170px } (basis = ШИРИНА в ряде)
   превращается в 170px ВЫСОТЫ текстового бокса + flex-grow добирает
   остаток: заголовок вверху, кнопка прибита к низу, между ними пустота
   (бар 294px вместо ~158px). На мобильном текст — только по контенту. === */
@media (max-width: 640px) {
  .action-row .cta-text { flex: 0 1 auto; }
}
