/* Учебная платформа. Палитра: молочный и медь, как на сайте Елены. */
:root {
  --cream: #FAF7F2;
  --cream2: #F3EDE3;
  --paper: #FFFDF9;
  --copper: #C17F3E;
  --copper-dark: #A5672B;
  --copper2: #E8A95A;
  --copper-pale: #F5EDE0;
  --ink: #2C2416;
  --ink2: #1A1208;
  --muted: #7A6A55;
  --line: #E8DFD2;
  --ok: #3E7A4C; --ok-bg: #E4F0E2;
  --warn: #A9611B; --warn-bg: #FBEAD2;
  --bad: #B0473A; --bad-bg: #F7E2DD;
  --info: #56708C; --info-bg: #E5ECF3;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(44, 36, 22, .05), 0 6px 22px rgba(44, 36, 22, .06);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 16px/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--copper-dark); text-decoration: none; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink2); text-wrap: balance; }
h1 { font-size: clamp(30px, 4.5vw, 42px); margin: 6px 0 14px; }
h2 { font-size: 26px; margin: 0 0 12px; }
h3 { font-size: 21px; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .02em; }
.big { font-size: 22px; }
.hot { color: var(--warn); }
.ok { color: var(--ok); font-weight: 600; }
.dim { opacity: .55; }
.lead { font-size: 18px; color: var(--muted); margin-bottom: 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--copper); font-weight: 600; margin: 0; }

/* ---------- Шапка ---------- */
.top { background: rgba(255, 253, 249, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink2); flex-shrink: 0; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 700; white-space: nowrap; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(140deg, var(--copper2), var(--copper)); color: #fff;
  font-family: var(--serif); font-weight: 700; font-size: 20px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.brand-mark.sm { width: 30px; height: 30px; font-size: 17px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 15px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover { color: var(--ink); background: var(--cream2); }
.nav a.on { color: var(--ink2); background: var(--copper-pale); font-weight: 600; }
.badge { background: var(--copper); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px; line-height: 18px; }
.me { position: relative; flex-shrink: 0; }
.me summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px; border-radius: 999px; }
.me summary::-webkit-details-marker { display: none; }
.me-name { font-weight: 500; font-size: 15px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; min-width: 220px; z-index: 30; }
.me-menu a, .me-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.me-menu a:hover, .me-menu button:hover { background: var(--cream2); }
.me-role { padding: 6px 12px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--copper-pale); color: var(--copper-dark);
  display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11.5px; }

/* ---------- Каркас ---------- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 26px 20px 60px; flex: 1; }
.wrap.narrow { max-width: 820px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px; border-top: 1px solid var(--line); }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--copper-dark); }
.crumbs .sep { opacity: .5; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.head-row h1, .head-row h2 { margin-bottom: 0; }
.row-gap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.narrow-card { max-width: 620px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-bottom: 24px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.course-card { display: flex; flex-direction: column; gap: 10px; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; margin: 0; }
a.course-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(44, 36, 22, .06), 0 14px 32px rgba(44, 36, 22, .09); color: var(--ink); }
.course-card h2 { margin: 0; font-size: 25px; }
.course-card h2 a { color: var(--ink2); }
.course-card .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Кнопки и формы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid transparent; font: 600 15px/1.2 var(--sans); cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: var(--copper-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--copper2); background: var(--copper-pale); color: var(--ink); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #31633c; }
.btn-warn { background: var(--warn-bg); color: var(--warn); border-color: #F0D2A8; }
.btn-warn:hover { background: #F7DDB8; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #943A2F; }
.btn-sm { padding: 7px 13px; font-size: 14px; }
.btn-wide { width: 100%; padding: 13px; font-size: 16px; }
.btn.disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; color: var(--muted); font-size: 15px; }
.icon-btn:hover:not(:disabled) { border-color: var(--copper2); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--copper-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--bad); }
form.inline { display: inline; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14.5px; }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.form-inline input[type=text], .form-inline input:not([type]) { flex: 1; min-width: 220px; }
input, textarea, select {
  font: 400 16px/1.5 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 13px; width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--copper2); box-shadow: 0 0 0 3px rgba(232, 169, 90, .22); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--copper); flex-shrink: 0; margin: 2px 0 0; }
input[type=file] { padding: 8px; background: var(--cream); font-size: 14px; }
textarea { resize: vertical; min-height: 90px; }
.form label.check, label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; }
legend { font-weight: 600; font-size: 14.5px; padding: 0 6px; }
.checks { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; }
.file-input { font-weight: 500 !important; }
.search { margin-bottom: 14px; max-width: 360px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filters select { width: auto; min-width: 200px; }
.copy-row { display: flex; gap: 10px; margin-bottom: 12px; }
.copy-row input { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: var(--cream); }

/* ---------- Уведомления и пометки ---------- */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 500; border: 1px solid; }
.flash-ok { background: var(--ok-bg); color: var(--ok); border-color: #CBE2C7; }
.flash-err { background: var(--bad-bg); color: var(--bad); border-color: #EECBC4; }
.flash-warn { background: var(--warn-bg); color: var(--warn); border-color: #F0D2A8; }
.note { background: var(--copper-pale); border-left: 3px solid var(--copper2); padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14.5px; margin: 12px 0; }
.note-warn { background: var(--warn-bg); border-color: var(--warn); }
.note-stop { background: var(--info-bg); border-color: var(--info); }
.pill { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-none { background: var(--cream2); color: var(--muted); }
.pill-viewed { background: var(--info-bg); color: var(--info); }
.pill-review { background: var(--warn-bg); color: var(--warn); }
.pill-revise { background: var(--bad-bg); color: var(--bad); }
.pill-accepted { background: var(--ok-bg); color: var(--ok); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin-left: 8px; vertical-align: 2px; text-transform: lowercase; }
.tag-stop { color: var(--info); border-color: #C9D5E2; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-ico { font-family: var(--serif); font-size: 34px; color: var(--copper2); margin-bottom: 6px; }
.big-empty { padding: 80px 16px; }
.big-empty .empty-ico { font-size: 72px; font-weight: 700; }

/* ---------- Прогресс ---------- */
.progress { height: 8px; background: var(--cream2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--copper2), var(--copper)); border-radius: 999px; transition: width .4s ease; }
.progress-text { font-size: 13.5px; color: var(--muted); margin: 6px 0 12px; }
.mini-progress { display: inline-block; width: 64px; height: 6px; background: var(--cream2); border-radius: 999px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.mini-progress div { height: 100%; background: var(--copper); }

/* ---------- Статистика ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; color: var(--ink); box-shadow: var(--shadow); }
.stat b { font-family: var(--sans); font-size: 34px; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; color: var(--ink2); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; margin-top: 4px; }
a.stat:hover { border-color: var(--copper2); color: var(--ink); }
.stat-hot { background: linear-gradient(140deg, #FFF6EA, var(--copper-pale)); border-color: #EBCB9F; }
.stat-hot b { color: var(--copper-dark); }
.feed { list-style: none; margin: 0 0 12px; padding: 0; }
.feed li a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--radius-sm); color: var(--ink); line-height: 1.35; }
.feed li a > span:nth-child(2) { flex: 1; min-width: 0; }
.feed li a:hover { background: var(--cream); }
.feed li + li { border-top: 1px solid var(--line); }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--cream); }
.tbl td.num { color: var(--muted); font-variant-numeric: tabular-nums; width: 36px; }
.tbl td.actions { text-align: right; }
.tbl td.actions > * { margin-left: 4px; }
.excerpt { max-width: 340px; font-size: 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink2); border-color: var(--copper); font-weight: 600; }
.chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 14px; display: flex; align-items: center; gap: 6px; }
.chips li .icon-btn { width: 24px; height: 24px; border-radius: 50%; font-size: 13px; line-height: 1; }
.chips li:not(:has(form)) { padding-right: 14px; }

/* Сводная таблица */
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.summary-wrap { max-height: 75vh; }
.summary { border-collapse: separate; border-spacing: 0; font-size: 14.5px; min-width: 100%; }
.summary th, .summary td { padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.summary thead th { position: sticky; top: 0; z-index: 2; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; }
.summary .sticky { position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--line); min-width: 170px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.summary thead .sticky { z-index: 3; }
.summary .lc { text-align: center; min-width: 42px; padding: 6px 4px; }
.summary thead .lc a { color: var(--ink); font-weight: 700; }
.summary tfoot td { background: var(--cream); font-weight: 600; position: sticky; bottom: 0; }
.summary tbody tr:hover td { background: var(--cream); }
.cell-mark {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-style: normal;
  font-weight: 700; font-size: 14px; line-height: 1;
}
.c-none { color: #C9BBA8; }
.c-viewed { background: var(--info-bg); color: var(--info); }
.c-review { background: var(--warn-bg); color: var(--warn); }
.c-revise { background: var(--bad-bg); color: var(--bad); }
.c-accepted { background: var(--ok-bg); color: var(--ok); }
a.cell-mark:hover { outline: 2px solid var(--copper2); }
.lesson-key { columns: 2 320px; margin: 4px 0 0; padding-left: 22px; }

/* ---------- Списки уроков ---------- */
.lesson-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lesson-row { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--ink); }
a.lesson-row:hover { border-color: var(--copper2); color: var(--ink); background: #fff; }
.lesson-row .num { width: 30px; height: 30px; border-radius: 50%; background: var(--copper-pale); color: var(--copper-dark); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.lesson-row .t { flex: 1; font-weight: 500; }
.lesson-row.locked { color: var(--muted); background: var(--cream2); }
.lesson-row.locked .num { background: var(--line); color: var(--muted); }
.lesson-list.compact .lesson-row { padding: 9px 12px; box-shadow: none; }
.lesson-list.compact .lesson-row .num { width: 26px; height: 26px; font-size: 12.5px; }
.lock { font-size: 15px; }

/* ---------- Урок ---------- */
.lesson { max-width: 100%; }
.lesson h1 { margin-top: 4px; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink2); border-radius: var(--radius); overflow: hidden; margin: 18px 0 24px; box-shadow: var(--shadow); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose { font-size: 17px; line-height: 1.7; }
.prose h2 { font-size: 28px; margin: 30px 0 10px; }
.prose h3 { font-size: 22px; margin: 24px 0 8px; }
.prose h4 { font-size: 18px; margin: 20px 0 6px; font-family: var(--sans); }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 14px; }
.prose li { margin-bottom: 5px; }
.prose li::marker { color: var(--copper); }
.prose blockquote { margin: 18px 0; padding: 14px 20px; background: var(--copper-pale); border-left: 3px solid var(--copper); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose blockquote p:last-child { margin: 0; }
.prose img { border-radius: var(--radius-sm); margin: 8px 0; display: block; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 28px 0; }
.prose mark { background: #FCE6C3; padding: 0 3px; border-radius: 3px; color: inherit; }
.prose code { background: var(--cream2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.prose pre { background: var(--ink2); color: #F3EDE3; padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 14px; }
.prose pre code { background: none; padding: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(193, 127, 62, .4); word-break: break-word; }
.lead-prose { color: var(--muted); margin-bottom: 18px; }
.block { margin-top: 34px; }
.hw { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.hw-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.hw-head h2 { margin: 0; }
.answer-form { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0 0; flex-wrap: wrap; }
.pager .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.files li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.files a { display: inline-flex; gap: 8px; align-items: center; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 12px; color: var(--ink); max-width: 100%; word-break: break-all; }
.files a:hover { border-color: var(--copper2); }
.files form { display: inline; }

/* Переписка по заданию */
.thread { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.msg { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; background: #fff; max-width: 92%; }
.msg-staff { background: var(--copper-pale); border-color: #EBD8BD; }
.msg-mine { align-self: flex-end; }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 14.5px; }
.msg-text { font-size: 15.5px; }
.msg-text p:last-child { margin-bottom: 0; }
.check-form { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }

details.more > summary { cursor: pointer; font-weight: 600; color: var(--copper-dark); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '▸ '; }
details.more[open] > summary::before { content: '▾ '; }
details.more[open] > summary { margin-bottom: 14px; }
details.card.more { padding: 16px 22px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.creds { display: flex; flex-direction: column; gap: 14px; }
.creds textarea { font-size: 14.5px; background: var(--cream); }

/* ---------- Редактор урока ---------- */
.editor { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; margin-top: -8px; }
.editor textarea { border: 0; border-radius: 0; min-height: 320px; font-size: 15.5px; }
.editor textarea:focus { box-shadow: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--cream); }
.toolbar button { border: 1px solid transparent; background: none; border-radius: 7px; padding: 5px 10px; font: 500 14px var(--sans); color: var(--ink); cursor: pointer; }
.toolbar button:hover { background: #fff; border-color: var(--line); }
.toolbar .tb-right { margin-left: auto; color: var(--copper-dark); font-weight: 600; }
.toolbar button.on { background: var(--copper-pale); border-color: var(--copper2); }
.preview { padding: 18px 20px; min-height: 320px; background: var(--paper); }

/* ---------- Вход ---------- */
body.bare { background: radial-gradient(ellipse at top, #FFF7EC 0%, var(--cream) 55%, var(--cream2) 100%); }
.auth { min-height: calc(100vh - 80px); display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 420px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 38px 32px 28px; box-shadow: 0 2px 6px rgba(44, 36, 22, .05), 0 24px 60px rgba(44, 36, 22, .10); }
.auth-mark { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, var(--copper2), var(--copper)); color: #fff; font: 700 32px var(--serif); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.auth-title { text-align: center; font-size: 34px; margin: 0 0 4px; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 24px; }
.auth .form { margin-bottom: 18px; }

/* ---------- Телефон ---------- */
@media (max-width: 820px) {
  .cols { grid-template-columns: 1fr; }
  .top-in { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .brand-name { font-size: 19px; max-width: 58vw; overflow: hidden; text-overflow: ellipsis; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 12px; }
  .me { margin-left: auto; }
  .me-name { display: none; }
  .wrap { padding: 18px 16px 48px; }
  .card { padding: 18px 16px; }
  .hw { padding: 18px 16px; }
  .prose { font-size: 16.5px; }
  .msg { max-width: 100%; }
  .tbl td.actions { white-space: normal; }
  .filters select { min-width: 0; flex: 1; }
  .summary .sticky { min-width: 130px; max-width: 150px; }
  .summary .col-seen { display: none; }
  .pager .btn { flex: 1; }
  .auth-card { padding: 30px 20px 22px; }
}
