/* ==== Страница практики ==== */
:root {
  --ql-cover-a: #f3ead6;
  --ql-cover-b: #e9dcc0;
  --ql-gold: #b8924a;
  --ql-gold-deep: #7a5a1a;
  --ql-red: #a3341f;
  --ql-red-soft: #f7e4df;
  --ql-ok-bg: #eef7ee;
  --ql-ok-border: #bcdcbc;
  --ql-ok-text: #24572a;
  --ql-bar-h: 76px;
}
.hidden { display: none !important; }
body.ql { background: var(--bg); }
body.ql.ql-in-room { padding-bottom: calc(var(--ql-bar-h) + env(safe-area-inset-bottom)); }

.ql-main { max-width: 1120px; margin: 0 auto; padding: 16px 16px 40px; }
.ql-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ==== Сцена ==== */
.ql-stage { position: relative; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, var(--ql-cover-a), var(--ql-cover-b)); border: 1px solid var(--border); min-height: 440px; display: flex; flex-direction: column; }
.ql-cover { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 26px 18px 20px; text-align: center; min-height: 440px; }
.ql-cover canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.ql-cover > *:not(canvas) { position: relative; z-index: 1; }
.ql-kicker { font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ql-gold-deep); margin: 0 0 6px; }
.ql-title { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 30px; line-height: 1.2; margin: 0; color: var(--text); }
.ql-meta { margin: 8px 0 0; font-size: 17px; color: var(--text-muted); }
.ql-portrait { width: 196px; height: 196px; border-radius: 50%; overflow: hidden; margin: 26px 0; box-shadow: 0 14px 40px rgba(90, 64, 20, .22); background: #efe6d2; flex: none; }
.ql-portrait img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); display: block; }
.ql-portrait.mark { display: flex; align-items: center; justify-content: center; background: #fbf7ee; }
.ql-portrait.mark .ql-mark-img { width: 78%; height: 78%; object-fit: contain; transform: none; }
.ql-status { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text-muted); background: rgba(255, 255, 255, .72); border-radius: 999px; padding: 7px 14px; margin: 0; }
.ql-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #9aa1a9; }
.ql-status.is-live { color: var(--ql-red); }
.ql-status.is-live::before { background: var(--ql-red); animation: ql-pulse 1.6s ease-in-out infinite; }
@keyframes ql-pulse { 50% { opacity: .35; } }
.ql-speaker { margin-top: 10px; font-size: 15px; color: var(--ql-gold-deep); min-height: 22px; }

.ql-videos { display: grid; gap: 6px; padding: 6px; grid-template-columns: 1fr; background: #1c1a17; flex: 1; align-content: center; }
.ql-videos.two { grid-template-columns: 1fr 1fr; }
.ql-tile { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.ql-tile.main { grid-column: 1 / -1; }
.ql-tile video { width: 100%; height: 100%; object-fit: contain; display: block; }
.ql-tile.cam video { object-fit: cover; }
.ql-tile .ql-name { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; padding: 3px 9px; border-radius: 8px; }
.ql-tile.speaking { box-shadow: inset 0 0 0 3px var(--ql-gold); }

.ql-unmute { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 3; }

/* ==== Карточки и формы ==== */
.ql-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 20px 18px; }
.ql-card h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 22px; line-height: 1.25; margin: 0 0 6px; }
.ql-card .ql-sub { color: var(--text-muted); font-size: 17px; margin: 0 0 16px; }
.ql-field { margin-bottom: 16px; }
.ql-field label, .ql-label { display: block; font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.ql-field input[type=text], .ql-field input[type=datetime-local], .ql-field select {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 13px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff; color: var(--text); min-height: 50px;
}
.ql-field input:focus, .ql-field select:focus { outline: 2px solid var(--ql-gold); outline-offset: 0; border-color: var(--ql-gold); }
.ql-field.has-error input, .ql-field.has-error select { border-color: var(--ql-red); background: #fffafa; }
.ql-hint { font-size: 15px; color: var(--text-muted); margin-top: 5px; }
.ql-ferr { font-size: 15px; color: var(--ql-red); margin-top: 5px; display: none; }
.ql-field.has-error .ql-ferr { display: block; }
.ql-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-muted); font-weight: 400; margin: 4px 0 6px; }
.ql-check input { margin-top: 3px; width: 20px; height: 20px; flex: none; accent-color: var(--ql-gold-deep); }
.ql-check a { text-decoration: underline; }
.ql-choice { display: flex; gap: 8px; flex-wrap: wrap; }
.ql-choice label { flex: 1 1 140px; display: flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; font-weight: 500; font-size: 16px; cursor: pointer; margin: 0; }
.ql-choice input { accent-color: var(--ql-gold-deep); width: 18px; height: 18px; }
.ql-choice label:has(input:checked) { border-color: var(--ql-gold); background: #fff8e6; }

.ql-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 22px; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; background: var(--ql-gold-deep); color: #fff; min-height: 52px; text-decoration: none; }
.ql-btn:hover { background: #6a4d15; text-decoration: none; color: #fff; }
.ql-btn.wide { width: 100%; }
.ql-btn.soft { background: #f4ecda; color: var(--ql-gold-deep); }
.ql-btn.soft:hover { background: #eadfc6; color: var(--ql-gold-deep); }
.ql-btn.small { min-height: 40px; padding: 8px 14px; font-size: 15px; border-radius: 11px; }
.ql-btn.danger { background: var(--ql-red); }
.ql-btn:disabled { opacity: .55; cursor: default; }
.ql-formerr { color: var(--ql-red); font-size: 15px; min-height: 0; margin: 0 0 10px; }
.ql-formerr:empty { display: none; }
.ql-foot { font-size: 15px; color: var(--text-muted); margin: 14px 0 0; }

.ql-notice { padding: 13px 16px; border-radius: 14px; background: var(--warn-bg, #fff7e8); border: 1px solid var(--warn-border, #e6d6a8); color: var(--warn-text, #6b5217); font-size: 16px; }
.ql-notice.ok { background: var(--ql-ok-bg); border-color: var(--ql-ok-border); color: var(--ql-ok-text); }
.ql-notice a { text-decoration: underline; }

/* ==== Ссылка с копированием ==== */
.ql-linkbox { display: flex; gap: 8px; align-items: stretch; margin: 6px 0 4px; }
.ql-linkbox input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: #faf7f0; color: var(--text); }
.ql-copied { color: var(--ql-ok-text); font-size: 14px; min-height: 18px; }

/* ==== Участники ==== */
.ql-panel h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ql-panel h2 span { font-family: inherit; font-size: 16px; color: var(--text-muted); }
.ql-people { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ql-person { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; border: 1px solid var(--border); border-radius: 13px; padding: 10px 12px; background: #fff; }
.ql-person.hand { border-color: var(--ql-gold); background: #fff8e6; }
.ql-person .who { flex: 1 1 140px; min-width: 0; }
.ql-person .who b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-person .who small { color: var(--text-muted); font-size: 14px; }
.ql-person .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.ql-empty-note { color: var(--text-muted); font-size: 15px; margin: 8px 0 0; }

/* ==== Нижняя панель ==== */
.ql-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--border); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.ql-bar-row { display: flex; justify-content: center; gap: 4px; max-width: 720px; margin: 0 auto; }
.ql-tool { flex: 1 1 0; max-width: 104px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 2px; cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.ql-tool .ic { width: 46px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: #f2ede2; transition: background .15s; }
.ql-tool svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ql-tool:hover .ic { background: #e9e1cf; }
.ql-tool.is-off { color: var(--ql-red); }
.ql-tool.is-off .ic { background: var(--ql-red-soft); }
.ql-tool.is-active { color: var(--ql-gold-deep); }
.ql-tool.is-active .ic { background: #f6e7bf; }
.ql-tool.leave { color: var(--ql-red); }
.ql-tool.leave .ic { background: var(--ql-red); color: #fff; }
.ql-tool .badge { position: absolute; transform: translate(16px, -12px); background: var(--ql-red); color: #fff; font-size: 11px; border-radius: 9px; padding: 0 5px; line-height: 17px; }
.ql-tool .ic { position: relative; }

body.ql-in-room #quantum-cookie-bar { bottom: calc(var(--ql-bar-h) + env(safe-area-inset-bottom) + 12px); }

/* ==== Настройки звука ==== */
.ql-sheet { position: fixed; left: 0; right: 0; bottom: calc(var(--ql-bar-h) + env(safe-area-inset-bottom)); z-index: 95; display: flex; justify-content: center; padding: 0 12px 10px; }
.ql-sheet .ql-card { width: 100%; max-width: 460px; box-shadow: 0 -8px 40px rgba(60, 40, 10, .18); }
.ql-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft, #efebe2); font-size: 16px; }
.ql-toggle small { display: block; color: var(--text-muted); font-size: 14px; }
.ql-toggle input { width: 22px; height: 22px; accent-color: var(--ql-gold-deep); flex: none; }

/* ==== Баннеры ==== */
.ql-banners h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 22px; margin: 26px 0 12px; }
.ql-banner-list { display: grid; gap: 12px; grid-template-columns: 1fr; }
.ql-banner { display: block; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.ql-banner:hover { border-color: var(--ql-gold); text-decoration: none; transform: translateY(-1px); }
.ql-banner .k { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ql-gold-deep); }
.ql-banner b { display: block; font-size: 20px; margin: 6px 0 4px; line-height: 1.3; }
.ql-banner p { margin: 0; font-size: 15px; color: var(--text-muted); line-height: 1.5; }
.ql-banner .more { display: inline-block; margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--ql-gold-deep); }

/* ==== Кабинет ведущих ==== */
.ql-narrow { max-width: 640px; margin: 0 auto; }
.ql-page-h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 30px; line-height: 1.2; margin: 8px 0 8px; }
.ql-lead { color: var(--text-muted); font-size: 18px; margin: 0 0 20px; }
.ql-meetings { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ql-meeting b { font-size: 18px; display: block; }
.ql-meeting .when { color: var(--text-muted); font-size: 15px; margin-bottom: 8px; }
.ql-result { border-color: var(--ql-gold); background: #fffdf6; }

.ql-card-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ql-confirm { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 15px; color: var(--ql-red); }
.ql-btn.ghost { background: transparent; color: var(--text-muted); }
.ql-btn.ghost:hover { background: #f4ecda; color: var(--ql-red); }
.ql-past { margin-top: 18px; }
.ql-past summary { cursor: pointer; font-size: 17px; font-weight: 700; color: var(--text-muted); padding: 8px 0; }
.ql-past .ql-meetings { margin-top: 10px; opacity: .85; }

/* ==== Админка ==== */
.qa-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 960px; margin: 0 auto; padding: 14px 16px 0; }
.qa-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 16px; }
.qa-brand:hover { text-decoration: none; }
.qa-brand img { width: 32px; height: 32px; object-fit: contain; }
.qa-wrap { max-width: 960px; margin: 0 auto; }
.qa-login { max-width: 440px; margin: 40px auto 0; }
.qa-login .ql-page-h1 { margin-top: 0; }
.ql-field input[type=password], .ql-field input[type=search], .ql-field textarea {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 13px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff; color: var(--text); min-height: 50px;
}
.ql-field textarea { resize: vertical; min-height: 64px; }
.ql-field textarea:focus, .ql-field input[type=password]:focus { outline: 2px solid var(--ql-gold); border-color: var(--ql-gold); }
.qa-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 18px; }
.qa-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 14px 14px 12px; min-width: 0; }
.qa-stat b { display: block; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 26px; line-height: 1.15; color: var(--ql-gold-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-stat span { font-size: 14px; color: var(--text-muted); line-height: 1.3; display: block; margin-top: 2px; }
.ql-notice.qa-quiet { background: var(--bg-card); border-color: var(--border); color: var(--text-muted); }
.qa-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.qa-tabs::-webkit-scrollbar { display: none; }
.qa-tabs button { border: 0; background: none; font: inherit; font-size: 17px; font-weight: 600; color: var(--text-muted); padding: 10px 14px 12px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.qa-tabs button[aria-selected=true] { color: var(--ql-gold-deep); border-bottom-color: var(--ql-gold); }
.qa-tabs button:hover { color: var(--text); }
.qa-pane { padding: 0; }
.qa-pane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.qa-pane-head .ql-sub { margin: 0; }
.qa-pane .ql-sub { color: var(--text-muted); font-size: 16px; }
.qa-mhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qa-mhead b { min-width: 0; overflow-wrap: anywhere; }
.qa-live { flex: none; font-size: 13px; font-weight: 800; color: #fff; background: var(--ql-red); border-radius: 999px; padding: 3px 10px; }
.qa-soft { flex: none; font-size: 13px; color: var(--text-muted); }
.qa-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.qa-filters select, .qa-filters input { flex: 1 1 0; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); min-height: 46px; }
.qa-people-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 16px; color: var(--text-muted); }
.qa-table-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.qa-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.qa-table th { text-align: left; font-size: 13px; font-weight: 700; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border); background: #faf6ec; }
.qa-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft, #efebe2); vertical-align: top; overflow-wrap: anywhere; }
.qa-table tr:last-child td { border-bottom: 0; }
.qa-table a { color: var(--ql-gold-deep); }
.qa-banner { margin-bottom: 12px; }
.qa-banner .ql-field { margin-bottom: 10px; }
.qa-banner .ql-field label { font-size: 15px; }

@media (max-width: 640px) {
  .qa-stats { gap: 6px; grid-template-columns: 1fr 1fr; }
  .qa-stat { padding: 10px 12px 9px; }
  .qa-stat:last-child { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; }
  .qa-stat:last-child span { order: -1; margin: 0; }
  .qa-stat b { font-size: 22px; }
  .qa-stat span { font-size: 13px; }
  .qa-tabs button { font-size: 15px; padding: 10px 9px 12px; }
  .qa-pane-head { flex-direction: column; }
  .qa-filters { flex-direction: column; }
  .qa-table thead { display: none; }
  .qa-table, .qa-table tbody, .qa-table tr, .qa-table td { display: block; width: 100%; }
  .qa-table tr { padding: 10px 12px; border-bottom: 1px solid var(--border-soft, #efebe2); }
  .qa-table td { padding: 2px 0; border: 0; }
  .qa-table td:first-child { font-weight: 700; font-size: 16px; }
  .qa-table td[data-l="Входов"]::before { content: "Входов: "; color: var(--text-muted); }
  .qa-table td[data-l="Последний вход"]::before { content: "Последний вход: "; color: var(--text-muted); }
  .qa-table td[data-l="Встречи"] { color: var(--text-muted); font-size: 14px; }
}

@media (min-width: 900px) {
  .ql-main { padding-top: 24px; }
  .ql-layout.has-panel { grid-template-columns: 1fr 360px; align-items: start; }
  .ql-panel { position: sticky; top: 84px; max-height: calc(100vh - 180px); overflow-y: auto; }
  .ql-stage, .ql-cover { min-height: 520px; }
  .ql-portrait { width: 230px; height: 230px; }
  .ql-title { font-size: 34px; }
  .ql-banner-list { grid-template-columns: repeat(3, 1fr); }
  .ql-tool { font-size: 13px; }
}
