/* Поток · ИИ-репетиторы (edu). Светлая тема по умолчанию, тёмная переключателем, адаптив: телефон / планшет / компьютер.
   Облегчённый режим — по умолчанию (без анимации); «красивый режим» включает поднимающиеся точки, как на основном сайте. */
:root {
  --page-w: 1480px;
  --bg: #ffffff; --surface: #ffffff; --ink: #182c2b; --muted: #60716e; --accent: #146452; --accent-ink: #ffffff;
  --soft: #edf5f1; --warm: #faf6ef; --warm-ink: #ac4e25; --line: #e1e8e4; --field: #81968a; --danger: #ad3a30; --focus: #af6029;
  --hover: #f4f7f5; --shadow: 0 6px 24px rgba(24, 44, 43, .08); --radius: 12px; --star: #b7791f;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1918; --surface: #142321; --ink: #e8f1ee; --muted: #9db3ae; --accent: #4fc3a1; --accent-ink: #072019;
  --soft: #18302b; --warm: #2a241b; --warm-ink: #e0a070; --line: #243a36; --field: #5b7770; --danger: #f08a80; --focus: #f0a35e;
  --hover: #1a2d2a; --shadow: 0 6px 24px rgba(0, 0, 0, .35); --star: #f2c14e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Arial, "Helvetica Neue", sans-serif; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: var(--accent); text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 40px; line-height: 1.15; letter-spacing: -1.4px; font-weight: 700; }
h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.4px; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.4; font-weight: 700; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 24px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* кнопки и поля */
.btn { min-height: 46px; padding: 11px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--field); border-radius: 8px; background: var(--surface); font-weight: 600; font-size: 15px; text-decoration: none; text-align: center; color: var(--ink); }
.btn:hover:not(:disabled) { background: var(--hover); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--accent); }
.btn-ghost { border-color: transparent; color: var(--accent); background: none; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { min-width: 44px; padding: 10px; }
.linkbtn { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; font-weight: 600; padding: 4px 0; }
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: 15px; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--field); border-radius: 8px; background: var(--surface); }
.textarea { min-height: 110px; resize: vertical; }
.hint { font-size: 14px; color: var(--muted); }
.err { color: var(--danger); font-size: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* плашки */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; background: var(--soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.chip-warm { background: var(--warm); color: var(--warm-ink); }
.chip-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.notice { display: flex; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--soft); font-size: 15px; }
.notice-warn { background: var(--warm); }
.notice-err { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.panel-soft { background: var(--soft); border-color: transparent; }
.panel-warm { background: var(--warm); border-color: transparent; }
.bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* деньги: рубли крупно, звёзды мелко (на edu всё считается в рублях по закону, звёзды — внутренняя единица) */
.money { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.money.left { align-items: flex-start; }
.money .m-rub { font-weight: 700; font-size: 1.15em; }
.money .m-st { font-size: 13px; color: var(--muted); font-weight: 400; }
.money.big .m-rub { font-size: 32px; letter-spacing: -.8px; }
.money.big .m-st { font-size: 14px; }
.money .m-old { font-size: 14px; color: var(--muted); text-decoration: line-through; font-weight: 400; }
.star { color: var(--star); }

/* каркас */
.topbar { position: sticky; top: 0; z-index: 30; height: 104px; display: flex; align-items: center; gap: 20px; padding: 0 max(40px, calc((100% - var(--page-w)) / 2 + 40px)); background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.5px; color: var(--ink); text-decoration: none; }
.brand-logo { height: 92px; width: auto; display: block; border-radius: 6px; }
[data-theme="dark"] .brand-logo { background: #f4f8f5; padding: 4px 12px; }
.free-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--accent); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.free-cta { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--r, 16px); background: var(--soft); border: 1px solid var(--line, transparent); margin: 24px 0; }
.free-cta b { font-size: 20px; }
.badge-free { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.brand-sub { color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0; }
.topnav { display: flex; gap: 28px; margin: 0 auto; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 8px 0; border-bottom: 2px solid transparent; }
.topnav a.on { color: var(--accent); border-color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topnav + .top-right { margin-left: 0; }
.balance { text-align: right; line-height: 1.2; cursor: pointer; }
.balance .b-label { font-size: 13px; color: var(--muted); }
.balance .b-stars { font-weight: 700; font-size: 17px; white-space: nowrap; }
.balance .b-rub { font-size: 13px; color: var(--muted); }
.avatar { text-decoration: none; width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; }
.shell { display: flex; min-height: calc(100vh - 104px); max-width: var(--page-w); margin-inline: auto; width: 100%; }
.side { width: 224px; flex: none; border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 104px; height: calc(100vh - 104px); }
.side a, .side button.navitem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; text-align: left; width: 100%; }
.side a:hover, .side button.navitem:hover { background: var(--hover); }
.side a.on { background: var(--soft); color: var(--accent); }
.side .side-slot { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; margin: 12px 0; }
.side .side-foot { margin-top: auto; display: grid; gap: 12px; font-size: 14px; color: var(--muted); }
.main { flex: 1; min-width: 0; padding: 40px 44px 64px; max-width: 1240px; margin-inline: auto; }
.bnav { display: none; }
.heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.heading p { margin-top: 8px; color: var(--muted); }
.crumbs { font-size: 14px; margin-bottom: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { text-decoration: none; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 36px 0 16px; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }

/* карточки предметов */
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; text-align: left; transition: box-shadow .15s, border-color .15s; color: var(--ink); }
button.card:hover, a.card:hover { box-shadow: var(--shadow); border-color: var(--field); }
.card .ico { width: 48px; height: 48px; border-radius: 10px; background: var(--soft); color: var(--accent); display: grid; place-items: center; font-size: 22px; }
.card .card-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; color: var(--accent); font-size: 14px; font-weight: 600; }
.card.soon { opacity: .6; }
.seg { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.seg button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 44px; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin: 18px 0 4px; overflow: auto; }
.tabs button { padding: 12px 0; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--accent); border-color: var(--accent); }

/* список тем */
.sec-title { margin: 22px 0 6px; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.topic { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.topic:hover { background: var(--hover); }
.topic .num { width: 28px; color: var(--muted); font-size: 14px; flex: none; }
.topic .t-body { flex: 1; min-width: 0; }
.topic .t-title { font-weight: 700; }
.topic .t-meta { color: var(--muted); font-size: 14px; }
.topic .t-end { text-align: right; flex: none; max-width: 140px; }
.score { display: inline-flex; padding: 1px 8px; border-radius: 6px; font-size: 13px; font-weight: 700; background: var(--warm); color: var(--warm-ink); cursor: pointer; }
.score.ok { background: var(--soft); color: var(--accent); }

/* лендинг */
.landing { padding: 56px 40px 32px; max-width: 1240px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; min-height: 560px; }
.hero h1 { font-size: 62px; letter-spacing: -2.4px; line-height: 1.04; margin: 14px 0 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .intro { font-size: 19px; color: var(--muted); max-width: 540px; margin-bottom: 28px; }
.hero-photo { position: relative; padding-left: 40px; }
.hero-photo img { width: 100%; height: 454px; object-fit: cover; object-position: center 25%; border-radius: 20px; display: block; background: var(--soft); }
.floatcard { position: absolute; left: 0; right: 40px; bottom: -22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; box-shadow: var(--shadow); }
.promo-banner { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 28px; border: 1px solid var(--line); background: var(--soft); }
.promo-banner img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.promo-banner .promo-timer { position: absolute; right: 14px; bottom: 14px; background: var(--accent); color: var(--accent-ink); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.promo-line { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--accent); color: var(--accent-ink); border-radius: 12px; font-weight: 700; margin-bottom: 24px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 64px 0 24px; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.features .n { color: var(--accent); font-size: 14px; margin-bottom: 8px; }
.showcase { margin-top: 56px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 28px 40px 40px; max-width: 1240px; margin: 0 auto; color: var(--muted); font-size: 14px; }
.footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer button, .footer a { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }

/* вход */
.auth { max-width: 460px; margin: 56px auto; padding: 0 20px; }
.auth .panel { padding: 32px; display: grid; gap: 18px; }

/* знакомство */
.steps { display: flex; gap: 8px; font-size: 14px; flex-wrap: wrap; color: var(--muted); margin-bottom: 22px; }
.steps span { padding: 5px 10px; border-radius: 6px; }
.steps .on { background: var(--soft); color: var(--accent); font-weight: 700; }
.setup { display: grid; grid-template-columns: 1fr 330px; gap: 48px; align-items: start; }
.setup-photo { width: 100%; height: 290px; object-fit: cover; object-position: center 30%; border-radius: 14px; background: var(--soft); display: block; }

/* чат */
.chat { display: grid; grid-template-columns: 250px 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); min-height: 640px; }
.chat-rail { background: var(--soft); border-right: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chat-rail img { width: 100%; aspect-ratio: 1 / 1.1; object-fit: cover; border-radius: 10px; background: var(--line); }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-body { flex: 1; overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; max-height: 560px; min-height: 300px; }
.bubble { max-width: 78%; padding: 14px 18px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.bubble.bot { background: var(--soft); align-self: flex-start; border-top-left-radius: 4px; }
.bubble.me { background: var(--accent); color: var(--accent-ink); align-self: flex-end; border-top-right-radius: 4px; }
.bubble.note { align-self: center; background: transparent; color: var(--muted); font-size: 14px; padding: 4px; }
.bubble.typing { color: var(--muted); font-style: italic; }
.opts { display: grid; gap: 12px; }
.opt-label { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { padding: 8px 14px; border: 1px solid var(--field); border-radius: 999px; font-size: 14px; background: var(--surface); }
.opt.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.composer { border-top: 1px solid var(--line); padding: 16px 22px; }
.inputrow { display: flex; gap: 10px; align-items: flex-end; border: 1px solid var(--field); border-radius: 10px; padding: 6px; background: var(--surface); }
.inputrow textarea { flex: 1; border: 0; background: none; resize: none; padding: 8px 10px; min-height: 42px; max-height: 140px; outline: none; }
.composer .meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }

/* окна */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(8, 20, 18, .55); display: grid; place-items: center; padding: 20px; overflow: hidden auto; overscroll-behavior: contain; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border-radius: 16px; padding: 28px; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: hidden auto; box-sizing: border-box; }
.modal > * { min-width: 0; max-width: 100%; }
.modal select, .modal input, .modal textarea { width: 100%; max-width: 100%; box-sizing: border-box; text-overflow: ellipsis; }
.modal .field { min-width: 0; }
.modal .check input { width: 22px; height: 22px; flex: none; }
.modal .check span { min-width: 0; flex: 1 1 auto; }
.modal h2 { font-size: 22px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.rules { max-height: 280px; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; white-space: pre-wrap; }
.legal h3 { margin: 18px 0 6px; font-size: 17px; }
.legal p, .legal li { font-size: 15px; color: var(--ink); }
.legal ul { padding-left: 20px; }

/* toast, cookie */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(92vw, 460px); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-size: 15px; box-shadow: var(--shadow); }
.toast.err { background: var(--danger); color: #fff; }
.cookie { position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 110; max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--field); border-radius: 14px; padding: 16px 20px; display: flex; gap: 16px; align-items: center; box-shadow: var(--shadow); font-size: 14px; }

/* таблицы админки репетиторов */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 400; color: var(--muted); font-size: 14px; padding: 10px 8px; }
.table td { padding: 14px 8px; border-top: 1px solid var(--line); }
.table tr:hover td { background: var(--hover); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* частицы красивого режима */
#fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: none; }
html.fx #fx { display: block; }
.topbar, .shell, .landing, .footer, .auth { position: relative; z-index: 1; }

/* планшет */
@media (max-width: 1150px) {
  .main { padding: 32px 28px 56px; } .topbar { padding: 0 24px; } .side { width: 192px; }
  .hero { gap: 36px; } .hero h1 { font-size: 50px; } .with-aside { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .grid3 { grid-template-columns: repeat(2, 1fr); } .setup { gap: 28px; grid-template-columns: 1fr 290px; }
}
@media (max-width: 900px) {
  .side { display: none; } .topnav { gap: 18px; } .chat { grid-template-columns: 210px 1fr; }
  .hero h1 { font-size: 44px; } .with-aside { grid-template-columns: 1fr; }
}
/* телефон */
@media (max-width: 650px) {
  h1 { font-size: 32px; letter-spacing: -1px; } h2 { font-size: 21px; }
  .topbar { height: 88px; padding: 0 16px; gap: 10px; } .brand { font-size: 20px; } .brand-sub, .topnav { display: none; } .brand-logo { height: 76px; } .topbar .top-right > [data-act="fx"], .topbar .top-right > [data-act="topup"].btn-icon, .top-right:has(.balance) [data-act="theme"] { display: none; } .free-chip .free-word { display: none; }
  .balance .b-label { display: none; } .balance .b-stars { font-size: 15px; } .ctl-label { display: none; } .chat-head .small { display: none; }
  .main { padding: 22px 16px 96px; } .landing { padding: 28px 16px 12px; } .footer { padding: 20px 16px 96px; }
  .heading { flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .grid2, .grid3, .two, .setup, .features { grid-template-columns: 1fr; }
  .features { gap: 20px; margin-top: 36px; }
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: 0; } .hero h1 { font-size: 40px; letter-spacing: -1.6px; }
  .hero .intro { font-size: 17px; } .hero-photo { padding-left: 0; } .hero-photo img { height: 320px; }
  .floatcard { left: 10px; right: 10px; padding: 14px; }
  .panel { padding: 18px; } .modal { padding: 20px; }
  .setup aside { order: -1; } .setup-photo { height: 200px; }
  .topic { gap: 10px; align-items: flex-start; } .topic .num { width: 20px; } .topic .t-end { max-width: 110px; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bg); border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); }
  .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; padding: 4px 10px; font-size: 13px; color: var(--muted); text-decoration: none; }
  .bnav .on { color: var(--accent); font-weight: 700; }
  #toasts { bottom: 84px; } .cookie { bottom: 76px; flex-direction: column; align-items: stretch; }
  .chat { display: flex; flex-direction: column; min-height: 0; height: calc(100dvh - 190px); }
  .chat-rail { flex-direction: row; align-items: center; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .chat-rail img { width: 44px; aspect-ratio: 1; border-radius: 8px; } .chat-rail .rail-long { display: none; }
  .chat-main { flex: 1; min-height: 0; } .chat-body { max-height: none; padding: 14px; } .bubble { max-width: 92%; }
  .chat-head { padding: 12px 14px; } .composer { padding: 10px 12px; }
  .table thead { display: none; } .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; } .table td { border: 0; padding: 4px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Места под баннеры (PR 47). Пока админ ничего не выбрал, мест нет. */
.slot { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.slot iframe { display: block; width: 100%; height: 100%; border: 0; }
.slot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.slot a { display: block; width: 100%; height: 100%; }
.slot-home { aspect-ratio: 4 / 1; margin-top: 20px; }
.slot-side { height: 60%; width: 100%; }

/* PR 48: имя преподавателя, подвал, мобильные окна и чат */
.rail-role { font-size: 13px; color: var(--muted); }
.rail-name { font-size: 20px; line-height: 1.2; margin: 2px 0 0; }
.tn-live { font-size: 22px; font-weight: 700; margin-top: 2px; }
.note-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); line-height: 1.5; }
.footer .note-ai { flex: 1 1 280px; font-size: 13px; color: var(--muted); }
@media (max-width: 650px) {
  .overlay { place-items: end stretch; padding: 0; }
  .modal { max-width: none; width: 100%; border-radius: 18px 18px 0 0; padding: 20px 16px max(20px, env(safe-area-inset-bottom)); max-height: 90dvh; gap: 14px; border-bottom: 0; }
  .modal h2 { font-size: 20px; }
  .modal-actions { justify-content: stretch; } .modal-actions .btn { flex: 1 1 130px; }
  .rules { max-height: 34dvh; }
  .main:has(.chat) { padding: 8px 8px 84px; } .main:has(.chat) .crumbs { display: none; }
  .chat { height: calc(100dvh - 88px - 74px - 16px); border-radius: 12px; }
  .chat-rail { gap: 10px; padding: 8px 12px; } .chat-rail .grow { min-width: 0; } .rail-name { font-size: 17px; } .rail-role { font-size: 12px; }
  .chat-rail .linkbtn { font-size: 13px; }
  .chat-head { padding: 8px 12px; } .chat-head h3 { font-size: 16px; } .chat-head .btn { padding: 8px 12px; white-space: nowrap; flex: none; }
  .chat-body { padding: 12px; min-height: 0; }
  .composer { padding: 8px 10px; } .inputrow textarea { min-height: 38px; padding: 6px 8px; font-size: 16px; }
  .composer .meta { font-size: 12.5px; margin-top: 6px; gap: 2px 10px; }
  .note-foot { margin-top: 24px; padding-bottom: 8px; }
  .setup-photo { height: 150px; object-position: center 20%; }
  .steps { gap: 2px 4px; font-size: 12.5px; } .steps span { padding: 3px 6px; white-space: nowrap; }
}

/* PR 49: возрастная маркировка */
.age-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 6px; border: 1.5px solid currentColor; border-radius: 6px; font-weight: 800; font-size: 13px; line-height: 1; color: var(--ink); flex: none; }
.footer { align-items: center; }

/* PR 53: колесо «встроено» в меню без рамки и на всю свободную высоту */
.slot:has(iframe[data-game]) { border: 0; background: none; border-radius: 0; overflow: visible; }
.side-slot:has(iframe[data-game]) .slot-side { height: 100%; }

/* PR 54: окно согласия перед входом на курс */
.gate-rules { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.gate-rules li + li { margin-top: 4px; }

.btn.voice-on { background: var(--soft); border-color: var(--accent); color: var(--accent); }
