/* =========================================================
   Оформление платформы. Две темы: «графит» и «молоко».
   Матовое стекло = слой фона + blur + очень тонкая рамка.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;500;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* длинные запасные списки: если Google Fonts недоступны или в шрифте нет
     нужного знака, браузер возьмёт следующий, а не покажет «ромбик» */
  --display: 'Unbounded', 'Inter', 'Segoe UI', system-ui, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, 'Apple Color Emoji', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', 'Liberation Mono', monospace;

  --r-lg: 30px;  /* «айсовские» скругления */
  --r-md: 20px;
  --r-sm: 14px;
  --pad: clamp(16px, 3vw, 26px);

  --ok: #62E0A6;
  --bad: #FF7D8D;
  --warn: #FFC77A;
}

html[data-theme='dark'] {
  --bg: #08090D;
  --bg-2: #0E1017;
  --ink: #EDEFF6;
  --ink-2: #9AA1B6;
  --ink-3: #626A82;
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .085);
  --line: rgba(255, 255, 255, .085);
  --line-2: rgba(255, 255, 255, .16);
  --accent: #8B9BFF;
  --shadow: 0 24px 60px rgba(0, 0, 0, .55);
  --blob-1: #3B49C9;
  --blob-2: #1E7F6B;
  --blob-3: #6A3AA8;
}
html[data-theme='light'] {
  --bg: #EDEFF4;
  --bg-2: #F7F8FB;
  --ink: #12141A;
  --ink-2: #5A6176;
  --ink-3: #8C93A6;
  --glass: rgba(255, 255, 255, .62);
  --glass-2: rgba(255, 255, 255, .82);
  --line: rgba(18, 20, 26, .07);
  --line-2: rgba(18, 20, 26, .14);
  --accent: #4E5DD8;
  --shadow: 0 20px 46px rgba(30, 38, 66, .13);
  --blob-1: #A9B6FF;
  --blob-2: #9BE7D2;
  --blob-3: #D9C2FF;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* мягкие световые пятна под стеклом */
body::before, body::after {
  content: ''; position: fixed; z-index: 0; pointer-events: none;
  width: 62vw; height: 62vw; border-radius: 50%;
  filter: blur(90px); opacity: .5;
}
body::before { top: -22vw; left: -14vw; background: radial-gradient(circle, var(--blob-1), transparent 65%); }
body::after { bottom: -26vw; right: -16vw; background: radial-gradient(circle, var(--blob-2), transparent 65%); }
.blob-3 {
  position: fixed; z-index: 0; pointer-events: none;
  top: 30vh; right: 8vw; width: 34vw; height: 34vw; border-radius: 50%;
  background: radial-gradient(circle, var(--blob-3), transparent 65%);
  filter: blur(100px); opacity: .35;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- стеклянные поверхности ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  box-shadow: var(--shadow);
}
.card { padding: var(--pad); }
.soft { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-md); }

/* ---------- каркас ---------- */
#app { position: relative; z-index: 1; min-height: 100%; }
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; max-width: 1280px; margin: 0 auto; padding: 22px; }

.rail { position: sticky; top: 22px; align-self: start; padding: 18px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 17px;
  background: linear-gradient(150deg, var(--accent), transparent 140%);
  border: 1px solid var(--line-2); color: #fff;
}
html[data-theme='light'] .brand-mark { color: #fff; }
.brand-name { font-family: var(--display); font-weight: 500; letter-spacing: -.02em; font-size: 15px; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 14px; font-weight: 500; transition: background .18s, color .18s;
}
.nav a:hover { background: var(--glass-2); color: var(--ink); }
.nav a.on { background: var(--glass-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav .ico { width: 18px; text-align: center; opacity: .85; font-size: 15px; }
.rail-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }

main { min-width: 0; display: flex; flex-direction: column; gap: 18px; padding-bottom: 90px; }

/* ---------- типографика ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(24px, 4vw, 36px); line-height: 1.08; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
p { margin: 0; line-height: 1.6; }
.muted { color: var(--ink-2); font-size: 14px; }
.tiny { font-size: 12px; color: var(--ink-3); }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* ---------- элементы управления ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--glass); backdrop-filter: blur(14px); cursor: pointer;
  font-size: 14px; font-weight: 500; transition: transform .15s, background .18s, border-color .18s;
}
.btn:hover { background: var(--glass-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 10px 26px -12px var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.block { width: 100%; }

input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(10px);
  transition: border-color .18s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2);
  cursor: pointer; transition: background .16s, color .16s, border-color .16s;
}
.chip:hover { background: var(--glass-2); color: var(--ink); }
.chip.on { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.tag { font-family: var(--mono); font-size: 11px; padding: 4px 8px; border-radius: 7px; background: var(--glass-2); border: 1px solid var(--line); color: var(--ink-2); }
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

/* ---------- сетки ---------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }

/* ---------- метрика ---------- */
.metric { padding: 18px; }
.metric .v { font-family: var(--display); font-size: 30px; font-weight: 500; line-height: 1; letter-spacing: -.03em; }
.metric .k { font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.metric .hint { font-size: 11px; color: var(--ink-3); margin-top: 3px; font-family: var(--mono); }

/* ---------- ПОДПИСЬ ПРОЕКТА: лента заданий ---------- */
.strip-wrap { overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.strip { display: flex; gap: 7px; min-width: max-content; }
.cell {
  --fill: var(--ink-3);
  position: relative; width: 46px; flex: 0 0 46px; height: 62px; border-radius: 15px;
  background: var(--glass); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 8px; cursor: pointer; overflow: hidden;
  transition: transform .16s, border-color .16s;
}
.cell:hover { transform: translateY(-3px); border-color: var(--line-2); }
.cell .n { font-family: var(--mono); font-size: 13px; font-weight: 600; z-index: 2; }
.cell .p { font-size: 9px; z-index: 2; color: var(--ink-3); font-family: var(--mono); margin-top: 2px; }
.cell .bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--h, 0%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--fill) 55%, transparent), var(--fill));
  opacity: .55; transition: height .5s cubic-bezier(.2, .8, .2, 1);
}
.cell.blank { border-style: dashed; opacity: .6; }
.cell.done { --fill: var(--ok); }
.cell.mid { --fill: var(--warn); }
.cell.weak { --fill: var(--bad); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; }

/* ---------- задача ---------- */
.task { display: flex; flex-direction: column; gap: 14px; }
.task-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-no {
  font-family: var(--display); font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid var(--line-2);
}
.task-text { font-size: 15.5px; line-height: 1.7; white-space: pre-wrap; }
.source {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.source b { font-weight: 600; color: var(--ink-2); }
.verdict { padding: 14px 16px; border-radius: var(--r-md); font-size: 14px; line-height: 1.6; border: 1px solid var(--line-2); }
.verdict.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.verdict.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 38%, transparent); }
.verdict.neutral { background: var(--glass-2); }
.solution { font-size: 14px; line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; }

/* ---------- список ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { padding: 14px 16px; border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--line); transition: border-color .16s, transform .16s; }
.item:hover { border-color: var(--line-2); transform: translateX(2px); }
.item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.clip { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- прогресс ---------- */
.bar-line { height: 7px; border-radius: 99px; background: var(--glass-2); overflow: hidden; border: 1px solid var(--line); }
.bar-line i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--ok))); transition: width .6s cubic-bezier(.2, .8, .2, 1); }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 46px; }
.spark i { flex: 1; min-width: 3px; border-radius: 3px 3px 1px 1px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.spark i.zero { background: var(--glass-2); }

/* ---------- вход ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth { width: 100%; max-width: 430px; padding: 30px; }
.auth h1 { font-size: 27px; margin-bottom: 8px; }
.switch { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); margin: 18px 0; }
.switch button { flex: 1; padding: 9px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.switch button.on { background: var(--glass-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- прочее ---------- */
.err { color: var(--bad); font-size: 13px; }
.empty { padding: 34px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }
.toast-box { position: fixed; z-index: 60; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 11px 18px; border-radius: 999px; font-size: 13.5px; animation: rise .3s ease; max-width: 90vw; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.fade { animation: none; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

.tabbar { display: none; }

/* ---------- телефон ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  .rail { position: static; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
  .rail .nav, .rail .rail-foot { display: none; }
  .brand { padding: 0; }
  main { padding-bottom: 96px; }
  .tabbar {
    display: flex; position: fixed; z-index: 50; bottom: 12px; left: 12px; right: 12px;
    padding: 7px; justify-content: space-between; border-radius: 26px;
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 2px; border-radius: 18px; font-size: 10px; color: var(--ink-3);
  }
  .tabbar a.on { background: var(--glass-2); color: var(--ink); }
  .tabbar .ico { font-size: 17px; }
  .metric .v { font-size: 25px; }
}

/* =========================================================
   Добавлено во второй партии: иконки, картинки к заданиям,
   теория, редактор предмета, запрет случайного выделения.
   ========================================================= */

/* Случайное выделение текста при тапе и прокрутке — выключено везде,
   кроме содержательных мест: условие, разбор, теория, поля ввода. */
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.selectable, input, textarea, select, .task-text, .solution, .theory-body, .source {
  -webkit-user-select: text;
  user-select: text;
}

/* ---------- свои иконки ---------- */
.ico { display: inline-flex; align-items: center; justify-content: center; }
.nav .ico { width: 20px; height: 20px; opacity: .8; }
.nav .ico svg { width: 19px; height: 19px; }
.nav a.on .ico { opacity: 1; color: var(--accent); }
.tabbar .ico svg { width: 21px; height: 21px; }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.brand { text-decoration: none; }

/* ---------- картинки в заданиях ---------- */
.shots { display: flex; gap: 10px; flex-wrap: wrap; }
.shots img {
  /* важно: у SVG без явных размеров браузер может дать нулевую высоту,
     поэтому задаём ширину явно, а высоту считаем по пропорции */
  width: min(100%, 460px); height: auto; min-height: 60px;
  border-radius: var(--r-md);
  border: 1px solid var(--line); background: #fff; display: block;
}
.shots-edit { display: flex; gap: 8px; flex-wrap: wrap; }
.shot-mini { position: relative; }
.shot-mini img {
  width: 92px; height: 72px; object-fit: cover; border-radius: var(--r-sm);
  border: 1px solid var(--line); display: block;
}
.shot-mini button {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); cursor: pointer;
  font-size: 14px; line-height: 1; display: grid; place-items: center;
}
.task-tools { gap: 8px; }

/* ---------- теория ---------- */
.theory-body {
  margin-top: 14px; font-size: 15px; line-height: 1.75; white-space: pre-wrap;
  color: var(--ink); max-width: 66ch;
}
.theory h2 { font-size: 21px; }
.cell.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ---------- редактор предмета ---------- */
.nrow {
  display: flex; gap: 8px; align-items: center; padding: 8px;
  border-radius: var(--r-sm); border: 1px solid var(--line); margin-bottom: 8px;
  background: var(--glass);
}
.nrow input, .nrow select { padding: 9px 11px; border-radius: 10px; }
.nrow > input:first-of-type { flex: 1 1 180px; min-width: 120px; }
.nrow .btn { padding: 7px 10px; }
@media (max-width: 700px) {
  .nrow { flex-wrap: wrap; }
  .nrow > input:first-of-type { flex: 1 1 100%; }
}

/* поле выбора цвета */
input[type='color'] { cursor: pointer; }

/* моноширинные вставки в подсказках */
code {
  font-family: var(--mono); font-size: 12px; padding: 2px 6px; border-radius: 7px;
  background: var(--glass-2); border: 1px solid var(--line); white-space: nowrap;
}

/* =========================================================
   Партия 4: исходные тексты и проверка развёрнутых ответов
   ========================================================= */
.passage {
  margin: 4px 0 2px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--glass);
  overflow: hidden;
}
.passage > summary {
  cursor: pointer; padding: 12px 16px; font-size: 13.5px; color: var(--ink-2);
  display: flex; align-items: center; gap: 10px; list-style: none;
  transition: background .16s;
}
.passage > summary::-webkit-details-marker { display: none; }
.passage > summary::after {
  content: ''; margin-left: auto; width: 7px; height: 7px; opacity: .55;
  border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg); transition: transform .2s;
}
.passage[open] > summary::after { transform: rotate(225deg); }
.passage > summary:hover { background: var(--glass-2); color: var(--ink); }
.ptag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.passage-body {
  padding: 4px 18px 18px; font-size: 15px; line-height: 1.8; white-space: pre-wrap;
  color: var(--ink); max-width: 68ch; border-top: 1px solid var(--line);
  padding-top: 16px; margin-top: 0;
}

/* ответ ученика на развёрнутое задание */
.answer-box {
  margin-top: 10px; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--glass-2); border: 1px solid var(--line);
  font-size: 14px; line-height: 1.65; white-space: pre-wrap; max-height: 260px; overflow: auto;
}

/* =========================================================
   Партия 5: ключи к варианту и печать
   ========================================================= */
.keys { margin-top: 4px; }
.keys h3 { font-family: var(--display); font-size: 15px; margin-bottom: 10px; }
.keys-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.keys-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--line);
  font-family: var(--mono);
}
.keys-table td:first-child { width: 64px; color: var(--ink-2); }
.keys-table td:last-child { width: 64px; text-align: right; color: var(--ink-3); }

/* ---------- печатный вид ---------- */
@media print {
  @page { margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body::before, body::after, .blob-3 { display: none !important; }
  .rail, .tabbar, .no-print, .toast-box, .task-tools, .legend, .spark { display: none !important; }
  .shell { display: block !important; max-width: none; padding: 0; }
  main { gap: 0 !important; padding: 0 !important; }

  /* стекло на бумаге — это серые пятна, убираем всё */
  .glass, .soft, .card, .item, .passage, .verdict, .answer-box {
    background: #fff !important; border: 0 !important; box-shadow: none !important;
    backdrop-filter: none !important; border-radius: 0 !important;
    padding-left: 0 !important; padding-right: 0 !important;
  }
  .glass.card.task {
    border-top: 1px solid #ccc !important; padding: 10px 0 !important;
    break-inside: avoid; page-break-inside: avoid;
  }
  .task-no {
    background: #eee !important; color: #000 !important; border: 1px solid #999 !important;
    border-radius: 4px !important;
  }
  .tag { border-color: #bbb !important; color: #444 !important; }
  .task-text, .passage-body { color: #000 !important; font-size: 12pt; }
  h1 { font-size: 18pt; } h2 { font-size: 13pt; }

  /* исходный текст печатается целиком, если его раскрыли */
  .passage > summary { list-style: none; font-weight: 600; padding: 8px 0 !important; }
  .passage > summary::after { display: none; }
  .passage[open] .passage-body { display: block !important; border-top: 0 !important; }

  /* поля для ответа вместо интерактивных элементов */
  input[type='text'], input:not([type]), textarea {
    border: 0 !important; border-bottom: 1px solid #000 !important; border-radius: 0 !important;
    background: transparent !important; min-height: 0 !important; padding: 2px 0 !important;
  }
  textarea { min-height: 90px !important; border: 1px solid #999 !important; }
  .chips[data-pts] { display: none !important; }

  /* ключи печатаются на отдельной странице и только если их попросили */
  #keysBox { display: none; }
  body.print-keys #keysBox {
    display: block !important; break-before: page; page-break-before: always;
  }
  body.print-keys #printBox { display: block !important; }
  body.print-keys #printBox .chips, body.print-keys #printBox .row,
  body.print-keys #printBox p, body.print-keys #printBox .eyebrow,
  body.print-keys #printBox h2 { display: none !important; }
  .keys-table td { border-bottom: 1px solid #ccc !important; }
}

/* мини-диаграмма наполнения по номерам задания */
.mini-bars {
  display: flex; align-items: flex-end; gap: 3px; height: 74px; margin-top: 10px;
  padding: 8px 10px; border-radius: var(--r-md);
  background: var(--glass); border: 1px solid var(--line);
}
.mini-bars i {
  flex: 1; min-width: 3px; border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 45%, transparent));
  height: 3%; transition: height .7s cubic-bezier(.2,.8,.2,1);
}

/* =========================================================
   Группы в боковом меню
   ========================================================= */
.nav-group { margin-bottom: 4px; }
.nav-title {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: 0; cursor: pointer; padding: 9px 12px 5px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); transition: color .15s;
}
.nav-title:hover { color: var(--ink-2); }
.nav-title i {
  width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .2s; opacity: .7;
}
.nav-group.closed .nav-title i { transform: rotate(-45deg); }
.nav-links { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.nav-group.closed .nav-links { display: none; }

/* =========================================================
   Аккуратные таблицы
   ========================================================= */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--glass); }
.tbl th {
  text-align: left; padding: 11px 14px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  background: var(--glass-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--glass-2); }
.tbl td.num, .tbl th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl.compact th, .tbl.compact td { padding: 8px 12px; font-size: 13px; }
.tbl .tag { font-size: 11px; }

/* =========================================================
   Компактная печать: экономим бумагу
   ========================================================= */
@media print {
  body.print-compact main { column-count: 2; column-gap: 12mm; }
  body.print-compact .glass.card.task {
    break-inside: avoid; page-break-inside: avoid;
    padding: 6px 0 !important; margin: 0 0 6px !important;
    border-top: 1px solid #ccc !important;
  }
  body.print-compact .task-text, body.print-compact .passage-body { font-size: 10.5pt; line-height: 1.35; }
  body.print-compact .page-head, body.print-compact h1 { column-span: all; }
  body.print-compact .glass.card:not(.task) { column-span: all; }
  body.print-compact .shots img { max-width: 74mm; }
  body.print-compact textarea { min-height: 42px !important; }
  body.print-compact .source { font-size: 7.5pt; }
  body.print-compact .task-no { padding: 1px 5px !important; font-size: 9pt; }
  /* задания с рисунком не рвём и не сжимаем в колонку слишком сильно */
  body.print-compact .glass.card.task:has(.shots) { column-span: all; }
}

/* =========================================================
   Печатный отчёт «класс к экзамену»
   ========================================================= */
.report-sheet {
  background: #fff; color: #14171F; padding: 22px 26px;
  border-radius: var(--r-md); border: 1px solid var(--line);
}
.report-sheet .tbl { background: #fff; font-size: 12.5px; }
.report-sheet .tbl th { background: #F3F5FB; color: #5A6172; }
.report-sheet .tbl td { color: #14171F; border-color: #E3E7F0; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding-bottom: 12px; border-bottom: 2px solid #14171F; }
.report-foot { margin-top: 16px; padding-top: 10px; border-top: 1px solid #E3E7F0; color: #7A8296; }

@media print {
  body.print-report aside, body.print-report .tabbar, body.print-report .no-print { display: none !important; }
  body.print-report main { padding: 0 !important; max-width: none !important; }
  body.print-report .report-sheet { border: 0; padding: 0; border-radius: 0; }
  body.print-report .report-sheet .tbl { page-break-inside: auto; }
  body.print-report .report-sheet tr { page-break-inside: avoid; }
  body.print-report .tag { border: 1px solid #999 !important; background: none !important; color: #14171F !important; }
}

/* =========================================================
   Экран «Сегодня»
   ========================================================= */
.today-hero { display: flex; gap: 26px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.today-left { flex: 1 1 320px; }
.today-right { flex: 0 0 auto; }
.btn.big { font-size: 16px; padding: 15px 28px; border-radius: var(--r-md); }

/* кольцо дневной цели */
.ring { position: relative; width: 150px; height: 150px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .ring-bg { stroke: var(--line); }
.ring .ring-fg { stroke: var(--accent); transition: stroke-dasharray .8s cubic-bezier(.2,.8,.2,1); }
.ring-mid {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.ring-mid b { font-size: 32px; font-family: var(--mono); line-height: 1; }
.ring-mid span { font-size: 11.5px; color: var(--ink-3); }

/* календарь занятий */
.heat { display: flex; gap: 4px; flex-wrap: wrap; }
.heat i {
  width: 16px; height: 16px; border-radius: 4px;
  background: var(--glass-2); border: 1px solid var(--line);
}
.heat i.on { background: var(--accent); border-color: transparent; }

/* сессия */
.session-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.session-top .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--glass-2); overflow: hidden; border: 1px solid var(--line); }
.session-top .bar i { display: block; height: 100%; background: var(--accent); transition: width .5s ease; }
.session-why { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.done-mark {
  width: 74px; height: 74px; margin: 0 auto; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 38px;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 720px) {
  .today-hero { flex-direction: column-reverse; align-items: flex-start; }
  .ring { width: 118px; height: 118px; }
  .ring-mid b { font-size: 26px; }
}

/* плитки раздела «Материалы» */
.tile { display: block; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
section.tile:hover { transform: none; border-color: var(--line); }
.tile .ico { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--glass-2); color: var(--accent); }

/* переключатель роли и выбор возможностей */
.view-switch { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.hat {
  display: flex; gap: 10px; align-items: flex-start; flex: 1 1 220px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--glass); border: 1px solid var(--line); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.hat:hover { border-color: var(--accent); }
.hat.on { border-color: var(--accent); background: var(--glass-2); }
.hat input { width: auto; margin: 3px 0 0; flex: 0 0 auto; }

/* =========================================================
   Модальные окна (замена системных confirm/prompt)
   ========================================================= */
.modal-wrap { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-back { position: absolute; inset: 0; background: rgba(6, 8, 16, .62); backdrop-filter: blur(3px); }
.modal {
  position: relative; width: min(460px, 100%); max-height: 86vh; overflow: auto;
  background: var(--bg-2, var(--glass)); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.modal h3 { font-family: var(--display); font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.modal-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.modal-choice {
  text-align: left; padding: 13px 15px; border-radius: var(--r-sm);
  background: var(--glass); border: 1px solid var(--line); color: var(--ink);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.modal-choice:hover { border-color: var(--accent); background: var(--glass-2); }
.modal-choice b { display: block; font-size: 14.5px; }
.modal-choice span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.45; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal-actions .btn { flex: 0 0 auto; }
.btn.danger { background: var(--bad, #D6553F); color: #fff; border-color: transparent; }

/* =========================================================
   Телефон: кнопка меню в шапке + просторнее интерфейс
   ========================================================= */
.rail-more { display: none; }
@media (max-width: 900px) {
  .rail-more {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 42px; height: 42px; padding: 0 11px; flex: 0 0 auto;
    border-radius: 13px; background: var(--glass-2); border: 1px solid var(--line); cursor: pointer;
  }
  .rail-more span { display: block; height: 2px; border-radius: 2px; background: var(--ink-2); }
  .brand-sub.num { display: none; }           /* версия сборки — только на большом экране */

  .shell { padding: 12px; gap: 12px; }
  main { padding-bottom: 104px; }

  /* воздух: на телефоне всё читалось слишком тесно */
  .card { padding: 18px 16px; border-radius: 18px; }
  .glass.card + .glass.card { margin-top: 14px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
  .page-head h1 { font-size: 26px; line-height: 1.2; }
  h2 { font-size: 18px; }
  .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: 1fr; gap: 12px; }
  .row { flex-wrap: wrap; gap: 10px; }
  .row > * { min-width: 0; }

  /* кнопки и поля — под палец */
  .btn { min-height: 46px; padding: 12px 18px; font-size: 14.5px; }
  .btn.sm { min-height: 40px; padding: 10px 14px; }
  input, select, textarea { min-height: 46px; font-size: 16px; }  /* 16px — иначе iOS зумит страницу */
  .chip { min-height: 36px; display: inline-flex; align-items: center; }

  /* таблицы прокручиваются, а не ломают вёрстку */
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 520px; }

  /* задание читается крупнее */
  .task-text { font-size: 16px; line-height: 1.62; }
  .modal { padding: 18px; border-radius: 20px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}
@media (max-width: 420px) {
  .tabbar a { font-size: 9.5px; }
  .page-head h1 { font-size: 23px; }
}

/* согласие при регистрации */
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; cursor: pointer; line-height: 1.5; }
.consent input { width: auto; min-height: 0; margin: 2px 0 0; flex: 0 0 auto; }
.consent a { color: var(--accent); }

/* ---------- компактная форма входа и регистрации ---------- */
.auth .field { margin-top: 12px; }
.auth .field label { font-size: 12.5px; margin-bottom: 6px; }
.auth-row { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.chips.sm .chip { padding: 7px 12px; font-size: 13px; min-height: 0; }
.auth-more { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.auth-more summary { cursor: pointer; font-size: 13.5px; color: var(--ink-2); list-style: none; }
.auth-more summary::-webkit-details-marker { display: none; }
.auth-more summary::after { content: '+'; float: right; color: var(--ink-3); }
.auth-more[open] summary::after { content: '–'; }
.auth-more input { width: 100%; }
.auth .consent { margin-top: 12px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; }
.auth-links a { color: var(--ink-3); text-decoration: none; }
.auth-links a:hover { color: var(--accent); }

/* настоящий логотип вместо буквы */
.brand-logo { width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto; display: block; }

/* =========================================================
   ТЕЛЕФОН — второй проход (плавность и плотность)
   ========================================================= */
@media (max-width: 900px) {
  /* ПЛАВНОСТЬ. Размытие фона под каждой стеклянной карточкой телефон
     пересчитывает в каждом кадре прокрутки — отсюда подлагивания.
     Заменяем на плотный фон: выглядит так же, работает в разы легче. */
  .glass, .tabbar, .modal, .soft {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html[data-theme='light'] .glass { background: rgba(255, 255, 255, .96); }
  html[data-theme='dark'] .glass { background: rgba(20, 22, 32, .97); }
  html[data-theme='light'] .tabbar { background: rgba(255, 255, 255, .98); }
  html[data-theme='dark'] .tabbar { background: rgba(18, 20, 30, .98); }
  .glass { box-shadow: 0 4px 16px rgba(10, 12, 25, .06); }
  /* светящиеся пятна с размытием 90–100px — тоже тяжёлые, на телефоне убираем */
  body::before, body::after, .blob-3 { display: none !important; }
  html[data-theme='light'] body { background: linear-gradient(180deg, #F3F4FA 0%, #ECEEF6 100%); }
  html[data-theme='dark'] body { background: linear-gradient(180deg, #0B0C12 0%, #0E1017 100%); }

  /* ШАПКА. Переключатель ролей уже есть в меню «☰» — в шапке он
     дублировался и выстраивался столбиком на полэкрана */
  .rail .view-switch { display: none !important; }
  .rail { padding: 10px 12px; gap: 10px; }
  .brand { min-width: 0; flex: 1 1 auto; gap: 10px; }
  .brand > div { min-width: 0; }
  .brand-name { font-size: 16px; }
  .brand-sub {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 62vw; display: block;
  }
  .brand-logo { width: 38px; height: 38px; }

  /* ПЛОТНОСТЬ. Цифры — по две в ряд, а не по одной на экран */
  .grid.g3, .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .metric { padding: 13px 14px; }
  .metric .v { font-size: 22px; }
  .metric .k { font-size: 11.5px; margin-top: 6px; }
  .metric .hint { font-size: 10.5px; }

  .page-head { margin-bottom: 14px; }
  .page-head h1 { font-size: 23px; }
  .card { padding: 16px 15px; }
  .glass.card + .glass.card { margin-top: 12px; }

  /* НИЖНИЕ ВКЛАДКИ: подпись в одну строку, без переносов */
  .tabbar { bottom: 10px; left: 10px; right: 10px; padding: 6px; }
  .tabbar a {
    font-size: 10.5px; padding: 7px 2px; gap: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
  }
  main { padding-bottom: 104px; }

  /* кнопки в строке карточки — переносятся ровно, не налезают */
  .item .row { gap: 8px; }
  .item .row .btn { flex: 1 1 auto; }

  /* всплывающие уведомления — над нижними вкладками, а не под ними */
  .toast-box { bottom: 92px; }
}
@media (max-width: 900px) {
  /* пары цифр — тоже в ряд; обычные карточки в .g2 остаются столбиком */
  .grid.g2:has(> .metric) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
}
@media (max-width: 900px) {
  /* таблица номеров у куратора — без горизонтальной прокрутки */
  .tbl.fit { min-width: 0; }
  .tbl.fit td, .tbl.fit th { padding: 8px 6px; }
}

/* навигатор по заданиям в пробнике и диагностике */
.series-dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.sdot { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass);
  color: var(--ink-2); font-size: 12.5px; font-family: var(--mono); cursor: pointer; padding: 0; }
.sdot.ok { background: rgba(92, 200, 150, .16); border-color: rgba(92, 200, 150, .5); color: var(--ink); }
.sdot.skip { background: rgba(255, 199, 122, .14); border-color: rgba(255, 199, 122, .5); }
.sdot.cur { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; color: var(--ink); font-weight: 700; }

/* страница ввода кода */
.join-wrap { max-width: 440px; margin: 6vh auto 0; }
.join-card { text-align: center; }
.join-input { margin-top: 18px; text-align: center; font-family: var(--mono); font-size: 30px; letter-spacing: .28em;
  padding: 16px 12px; min-height: 64px; text-transform: uppercase; }

/* =========================================================
   Полноэкранный слой: справочник и проектор
   ========================================================= */
.ovl { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: flex; flex-direction: column; }
.ovl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line); }
.ovl-head b { font-family: var(--display); font-size: 17px; }
.ovl-close { min-width: 42px; }
.ovl-body { flex: 1; overflow: auto; padding: 18px; -webkit-overflow-scrolling: touch; }

/* таблица Менделеева */
.pt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.pt-grid { display: grid; grid-template-columns: repeat(18, minmax(44px, 1fr)); grid-template-rows: repeat(7, auto) 10px auto auto;
  gap: 3px; min-width: 820px; }
.pt-el { border: 1px solid var(--line); border-radius: 6px; padding: 3px 2px 4px; background: var(--glass-2);
  display: flex; flex-direction: column; align-items: center; cursor: pointer; line-height: 1.1; color: var(--ink); }
.pt-el i { font-style: normal; font-size: 9px; color: var(--ink-3); align-self: flex-start; padding-left: 3px; }
.pt-el b { font-size: 15px; }
.pt-el span { font-size: 9.5px; color: var(--ink-2); }
.pt-s { background: rgba(255, 130, 150, .16); } .pt-p { background: rgba(255, 205, 110, .18); }
.pt-d { background: rgba(110, 160, 255, .16); } .pt-f { background: rgba(110, 210, 150, .16); }
.pt-el:hover { border-color: var(--accent); }
.pt-label { font-size: 10.5px; color: var(--ink-3); align-self: center; }
.pt-info { margin-top: 10px; min-height: 20px; }

/* таблица растворимости */
.sol { border-collapse: collapse; font-size: 12.5px; min-width: 760px; }
.sol th, .sol td { border: 1px solid var(--line); padding: 5px 6px; text-align: center; }
.sol thead th { font-weight: 600; background: var(--glass-2); position: sticky; top: 0; }
.sol tbody th { background: var(--glass-2); white-space: nowrap; text-align: left; position: sticky; left: 0; }
.sol .s-r { background: rgba(92, 200, 150, .15); } .sol .s-m { background: rgba(255, 199, 122, .2); }
.sol .s-n { background: rgba(255, 125, 141, .16); } .sol .s-x { color: var(--ink-3); }

/* ряд активности и справочные строки */
.act-row { display: flex; flex-wrap: wrap; gap: 6px; }
.act-row span { padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass-2); font-weight: 600; }
.act-row .act-h { border-color: var(--accent); color: var(--accent); }
.ref-rows { display: flex; flex-direction: column; }
.ref-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.ref-row span { color: var(--ink-2); font-size: 14px; }
.ref-row b { font-family: var(--mono); font-size: 14px; text-align: right; }

/* проектор: крупно, контрастно, без интерфейса вокруг */
.proj-ovl .ovl-head { border-bottom: none; padding: 10px 16px; }
.proj { max-width: 1400px; margin: 0 auto; padding: 1vh 3vw 4vh; }
.proj-no { font-family: var(--mono); color: var(--ink-3); font-size: clamp(14px, 1.4vw, 20px); letter-spacing: .08em; text-transform: uppercase; }
.proj-text { margin-top: 1.6vh; font-size: clamp(22px, 2.6vw, 42px); line-height: 1.45; }
.proj[data-size="1"] .proj-text { font-size: clamp(26px, 3.3vw, 54px); }
.proj[data-size="2"] .proj-text { font-size: clamp(30px, 4vw, 66px); }
.proj-img { display: block; max-width: 100%; max-height: 50vh; margin: 2vh auto 0; background: #fff; border-radius: 8px; }
.proj-key { margin-top: 3vh; }
.proj-answer { font-size: clamp(20px, 2.2vw, 36px); padding: 14px 18px; border-radius: 14px;
  background: rgba(92, 200, 150, .15); border: 1px solid rgba(92, 200, 150, .5); display: inline-block; }
.proj-sol { margin-top: 2vh; font-size: clamp(17px, 1.7vw, 28px); line-height: 1.55; color: var(--ink-2); }
.proj-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4vh; }
.proj-bar .btn { flex: 0 0 auto; }
.ref-img-link { display: block; }
.ref-img { display: block; max-width: 100%; margin: 0 auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }

/* значок «развернуть» в углу задания */
.expand-btn { margin-left: auto; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--ink-3); transition: color .15s, background .15s, border-color .15s; }
.expand-btn:hover { color: var(--ink); background: var(--glass-2); border-color: var(--line); }
.item-head .expand-btn { width: 30px; height: 30px; }
#sRef + .expand-btn { margin-left: 6px; }

/* полоска для гостя: на компьютере — над содержимым справа, на телефоне — под шапкой */
.guest-bar { grid-column: 2; grid-row: 1; align-self: start; padding: 10px 14px; border-radius: 14px;
  background: rgba(255, 199, 122, .16); border: 1px solid rgba(255, 199, 122, .45); font-size: 13.5px; color: var(--ink-2); }
.guest-bar a { color: var(--accent); font-weight: 600; text-decoration: none; }
.shell > .guest-bar + main { grid-column: 2; grid-row: 2; }
.shell > .rail { grid-row: 1 / span 2; }
@media (max-width: 900px) {
  .guest-bar { grid-column: auto; grid-row: auto; font-size: 13px; }
  .shell > .guest-bar + main { grid-column: auto; grid-row: auto; }
  .shell > .rail { grid-row: auto; }
}
.rep-task summary { cursor: pointer; font-size: 13px; color: var(--ink-2); margin-top: 8px; }

/* вкладки «Управления» */
.admin-tabs { position: sticky; top: 0; z-index: 5; margin: 6px 0 14px; padding: 10px 0 12px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.admin-tabs .chips { flex-wrap: wrap; }
.admin-tabs .chip { font-weight: 600; }
.atab-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.admin-tabs input { max-width: 460px; }
@media (max-width: 900px) { .admin-tabs { top: 0; } .admin-tabs .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; } }

/* =========================================================
   СПОКОЙНЫЙ РЕЖИМ УЧЕНИКА
   Один экран — одно действие. Без световых пятен, теней и стекла:
   ничего не спорит с заданием за внимание.
   ========================================================= */
body.calm::before, body.calm::after, body.calm .blob-3 { display: none; }
body.calm .glass {
  backdrop-filter: none; -webkit-backdrop-filter: none;
  background: var(--bg-2); box-shadow: none; border-color: var(--line);
}
html[data-theme='dark'] body.calm .glass { background: #10121A; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.calm-h { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 3vw, 28px); margin: 6px 0 4px; letter-spacing: -.01em; }
.calm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.calm-today {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 18px; padding: clamp(24px, 8vh, 80px) 12px 20px;
}
.calm-today .ring { width: 168px; height: 168px; }
.calm-title { font-family: var(--display); font-weight: 500; font-size: clamp(19px, 2.6vw, 24px); margin: 0; }
.calm-go { min-width: 220px; }
.calm-line {
  color: var(--ink-2); font-size: 14px; max-width: 34ch; line-height: 1.5;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2);
}
.calm-line:hover { color: var(--ink); }
.calm-meta { color: var(--ink-3); font-size: 13px; margin: 0; }

.calm-list { width: 100%; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; }
.calm-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 16px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.calm-row:last-child { border-bottom: 1px solid var(--line); }
.calm-row b { font-weight: 500; font-size: 15px; }
.calm-row span { color: var(--ink-3); font-size: 13px; text-align: right; }
.calm-row:hover b { color: var(--accent); }
.calm-note { padding: 16px 4px; border-top: 1px solid var(--line); }
.calm-note-head { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.calm-note-head span { color: var(--ink-3); font-size: 13px; }
.calm-note p { margin: 6px 0 8px; font-size: 14.5px; line-height: 1.55; }
.calm-note a { color: var(--accent); font-size: 13.5px; }
.calm-link {
  background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13.5px;
  color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--line-2); align-self: flex-start;
}
.calm-link:hover { color: var(--ink); }
.calm-empty { color: var(--ink-3); text-align: center; padding: 48px 12px; }

/* переключатель: один ряд, без рамок у каждого пункта */
.seg {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--glass-2); border: 1px solid var(--line); max-width: 100%; overflow-x: auto;
}
.seg button {
  border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.seg button.on { background: var(--bg-2); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
html[data-theme='dark'] .seg button.on { background: #1B1E2A; }

/* сессия */
.icon-btn {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.session-note { color: var(--ink-3); font-size: 13px; margin: -4px 0 12px; }
.session-note a { color: var(--accent); }
.task.lean .task-tools { margin-top: 4px; }
.more-btn { font-size: 18px; letter-spacing: .08em; padding-left: 14px; padding-right: 14px; }
.hint {
  margin-top: 12px; padding: 12px 14px; border-left: 2px solid var(--accent);
  background: var(--glass-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 14.5px; line-height: 1.55;
}
.hint a { color: var(--accent); }
.why-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.why-row .chip { padding: 6px 12px; font-size: 13px; min-height: 0; }
.why-row a { color: var(--accent); }
.strategy { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.strategy p { margin: 6px 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* результаты: одно число и несколько строк текста */
.res-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.res-head b { font-size: 15px; font-weight: 600; }
.res-score { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 6px; flex-wrap: wrap; }
.res-num { font-family: var(--display); font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.res-sub { color: var(--ink-3); font-size: 13.5px; }
.res-text p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; }
.res-text .strategy { margin-top: 12px; }

/* профиль: вторичное свёрнуто */
.folds { padding-top: 6px; padding-bottom: 6px; }
.fold { border-top: 1px solid var(--line); }
.fold:first-child { border-top: 0; }
.fold summary {
  list-style: none; cursor: pointer; padding: 15px 2px; font-size: 15px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: '+'; color: var(--ink-3); font-size: 18px; font-weight: 400; }
.fold[open] summary::after { content: '−'; }
.fold-body { padding: 0 2px 16px; }
.profile-foot { display: flex; gap: 22px; justify-content: center; padding: 6px 0 20px; }
.profile-foot .calm-link { align-self: center; }

@media (prefers-reduced-motion: reduce) {
  .ring .ring-fg, .session-top .bar i { transition: none; }
}

/* =========================================================
   ПЛОТНЫЙ МИНИМАЛИЗМ (сборка calm-2)
   Меньше пустоты, больше смысла на экране: каждая плитка —
   одно число или одно действие, без рамок-украшений.
   ========================================================= */
body.calm main { gap: 12px; }
body.calm .glass.card { padding: 18px; }

/* ---------- шапка: название платформы и тихий профиль ---------- */
.brand { align-items: center; }
.brand-name { font-size: 19px; font-weight: 600; letter-spacing: -.03em; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; }
.me {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 8px 2px;
  border-top: 1px solid var(--line); text-decoration: none; color: var(--ink-2); min-width: 0;
}
.me:hover { color: var(--ink); }
.me-ava {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--glass-2); border: 1px solid var(--line-2); color: var(--ink-2);
}
.me-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.me-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 900px) {
  .rail .me { margin: 0; padding: 0; border: 0; flex: 0 0 auto; }
  .rail .me-txt { display: none; }
  .rail .me-ava { width: 34px; height: 34px; }
  .brand-name { font-size: 18px; }
  .brand-logo { width: 32px; height: 32px; }
}
.build-line { text-align: center; font-size: 11px; color: var(--ink-3); opacity: .7; padding-bottom: 8px; font-family: var(--mono); }

/* ---------- плитка ---------- */
.tile {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--ink); text-decoration: none; min-width: 0;
}
html[data-theme='dark'] .tile { background: #10121A; }
a.tile:hover { border-color: var(--line-2); }
.t-k { font-size: 12.5px; color: var(--ink-3); }
.t-v { font-family: var(--display); font-weight: 500; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.t-v i { font-style: normal; font-size: 16px; color: var(--ink-3); margin-left: 8px; font-family: var(--body); letter-spacing: 0; }
.t-v.t-muted { font-size: 18px; color: var(--ink-2); font-family: var(--body); font-weight: 500; }
.t-s { font-size: 13px; color: var(--ink-2); }

/* ---------- «Сегодня» ---------- */
.seg-wide { align-self: flex-start; }
.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.t-main { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 20px; padding: 18px 20px; }
.ring.sm { width: 112px; height: 112px; flex: 0 0 auto; }
.ring.sm .ring-mid b { font-size: 26px; }
.t-main-r { display: flex; flex-direction: column; gap: 12px; min-width: 0; flex: 1; }
.t-title { font-family: var(--display); font-weight: 500; font-size: 19px; margin: 0; letter-spacing: -.01em; }
.t-go { align-self: flex-start; min-width: 160px; padding: 14px 26px; font-size: 16px; }
.goal-bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 4px 0 2px; }
.goal-bar b { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 4px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-3); }
.wd i { width: 100%; max-width: 22px; aspect-ratio: 1; border-radius: 6px; background: var(--line); }
.wd.on i { background: var(--accent); }
.wd.td { color: var(--ink); font-weight: 600; }
.wd.td i { outline: 1.5px solid var(--line-2); outline-offset: 2px; }
@media (max-width: 520px) {
  .t-main { gap: 16px; padding: 16px; }
  .ring.sm { width: 96px; height: 96px; }
  .t-go { width: 100%; min-width: 0; }
  .t-v { font-size: 24px; }
}
@media (min-width: 901px) {
  .today-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .t-main { grid-column: auto; grid-row: span 1; }
}

/* ---------- «Задания»: плитки ---------- */
.ptiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 901px) { .ptiles { grid-template-columns: repeat(3, 1fr); } }
.ptile { gap: 4px; padding: 16px; }
.ptile b { font-weight: 600; font-size: 15px; }
.ptile span:last-child { font-size: 12.5px; color: var(--ink-3); }
.ptile-ico { width: 22px; height: 22px; color: var(--accent); margin-bottom: 6px; }
.ptile-ico svg { width: 22px; height: 22px; }

/* ---------- «Результаты»: карта номеров ---------- */
.nmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 5px; margin: 14px 0 6px; }
.ncell {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px;
  font-size: 12.5px; font-family: var(--mono); text-decoration: none; color: var(--ink);
}
.n0 { background: var(--line); color: var(--ink-3); }
.n1 { background: color-mix(in srgb, var(--bad) 45%, transparent); }
.n2 { background: color-mix(in srgb, var(--warn) 50%, transparent); }
.n3 { background: color-mix(in srgb, var(--ok) 45%, transparent); }
.ncell.nf { outline: 2px solid var(--accent); outline-offset: 1px; }
.nlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--ink-3); }
.nlegend span { display: inline-flex; align-items: center; gap: 5px; }
.nlegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.nlegend i.nf { outline: 2px solid var(--accent); background: none; width: 8px; height: 8px; }
.res-score { margin-top: 10px; }
.res-num { font-size: 42px; }

/* сессия: плотнее */
.session-top { margin-bottom: 6px; }
.session-note { margin: 0 0 6px; }
.t-map { grid-column: 1 / -1; }
.t-map .nmap { margin-top: 6px; }
.t-week .t-v { font-size: 24px; }
.t-week .t-v i { font-size: 12.5px; }
main > .calm-list { max-width: none; }
@media (min-width: 901px) { .t-map .nmap { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); } }
.task #hintOut:empty, .task #verdict:empty, .task #taskOut:empty { display: none; }

/* =========================================================
   ФОРМУЛЫ (движок public/math.js)
   ========================================================= */
.m-rad{display:inline-flex;align-items:stretch;white-space:nowrap;vertical-align:-.2em;position:relative}
.m-rs{position:relative;flex:0 0 auto;width:.62em;overflow:hidden;text-indent:3em;white-space:nowrap;margin-right:-.02em}
.m-rs::before{content:'';position:absolute;inset:0;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 20' preserveAspectRatio='none'><path d='M.4 11.6 2.6 10.4 5.2 19.2 9.6 .55H10' fill='none' stroke='black' stroke-width='1.15' stroke-linejoin='round'/></svg>") no-repeat 0 0/100% 100%;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 20' preserveAspectRatio='none'><path d='M.4 11.6 2.6 10.4 5.2 19.2 9.6 .55H10' fill='none' stroke='black' stroke-width='1.15' stroke-linejoin='round'/></svg>") no-repeat 0 0/100% 100%}
.m-rc{border-top:max(1.5px,.08em) solid currentColor;padding:.2em .14em .04em .06em;line-height:1.1}
.m-ri{font-size:.55em;align-self:flex-start;margin:.15em -.5em 0 .05em;position:relative;z-index:1;line-height:1}
.m-rc .m-sup{vertical-align:.5em}
.m-fr {
  display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle;
  margin: 0 .14em; font-size: .9em; line-height: 1.18;
}
.m-nu { border-bottom: max(1.5px, .07em) solid currentColor; padding: 0 .22em .06em; }
.m-de { padding: .06em .22em 0; }
.m-sup, .m-sub { font-size: .7em; line-height: 0; }
.m-sup { vertical-align: .62em; }
.m-sub { vertical-align: -.28em; }
.m-v { font-family: 'Times New Roman', 'STIX Two Text', Cambria, serif; font-style: italic; font-size: 1.08em; padding: 0 .02em; }
.task-text .m-fr, .solution .m-fr { font-size: .95em; }

/* =========================================================
   ОФОРМЛЕНИЯ (скины). Включаются поверх тёмной основы.
   ========================================================= */
html[data-skin] { color-scheme: dark; }
html[data-skin] body { background: var(--bg); }
html[data-skin] .tile, html[data-skin] body.calm .glass { background: var(--bg-2); }

/* ---------- ЧЁРНЫЙ: чистый, без цвета ---------- */
html[data-skin='black'] {
  --bg: #000; --bg-2: #0A0A0A; --ink: #F4F4F4; --ink-2: #A0A0A0; --ink-3: #5E5E5E;
  --glass: rgba(255,255,255,.035); --glass-2: rgba(255,255,255,.07);
  --line: #1B1B1B; --line-2: #333; --accent: #FFFFFF; --shadow: none;
  --ok: #8CFFBE; --bad: #FF6464; --warn: #FFD27A;
}
html[data-skin='black'] .btn.primary { color: #000; box-shadow: none; }
html[data-skin='black'] .btn.primary:hover { filter: none; background: #D9D9D9; }
html[data-skin='black'] .tabbar, html[data-skin='black'] .rail { background: #000 !important; border-color: var(--line); }
html[data-skin='black'] .tabbar a.on, html[data-skin='black'] .nav a.on { background: #fff; color: #000; }
html[data-skin='black'] .tabbar a.on .ico, html[data-skin='black'] .nav a.on .ico { color: #000; }
html[data-skin='black'] .brand-logo { filter: grayscale(1) contrast(1.2); }
html[data-skin='black'] .seg button.on { background: #fff; color: #000; }
html[data-skin='black'] .n1 { background: #3A1414; } html[data-skin='black'] .n2 { background: #3A3214; }
html[data-skin='black'] .n3 { background: #143A26; } html[data-skin='black'] .n0 { background: #141414; }

/* ---------- ГОТИКА: чёрный, кровь, острые углы, зерно ---------- */
html[data-skin='goth'] {
  --bg: #000; --bg-2: #060606; --ink: #EAEAEA; --ink-2: #9A9A9A; --ink-3: #565656;
  --glass: rgba(255,255,255,.03); --glass-2: rgba(255,255,255,.06);
  --line: #1E1E1E; --line-2: #3B3B3B; --accent: #E10600; --shadow: none;
  --ok: #D8D8D8; --bad: #E10600; --warn: #8A8A8A;
  --r-lg: 3px; --r-md: 2px; --r-sm: 2px;
  --goth: 'Dela Gothic One', 'Unbounded', system-ui, sans-serif;
}
html[data-skin='goth'] body.calm::after {
  display: block; content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html[data-skin='goth'] .brand-name, html[data-skin='goth'] .calm-h, html[data-skin='goth'] .t-title,
html[data-skin='goth'] .res-num, html[data-skin='goth'] .t-v, html[data-skin='goth'] .ev-title {
  font-family: var(--goth); font-weight: 400; letter-spacing: .01em;
}
html[data-skin='goth'] .brand-name { font-size: 20px; letter-spacing: .02em; text-transform: uppercase; }
html[data-skin='goth'] .brand-logo { filter: grayscale(1) contrast(1.4); }
html[data-skin='goth'] .t-k, html[data-skin='goth'] .me-role, html[data-skin='goth'] .nlegend,
html[data-skin='goth'] .tabbar a, html[data-skin='goth'] .nav a, html[data-skin='goth'] .seg button, html[data-skin='goth'] .btn {
  text-transform: uppercase; letter-spacing: .16em; font-size: 11px;
}
html[data-skin='goth'] .btn { font-weight: 600; }
html[data-skin='goth'] .btn.primary { background: transparent; color: var(--ink); border: 1px solid var(--ink); box-shadow: none; }
html[data-skin='goth'] .btn.primary:hover { background: var(--ink); color: #000; filter: none; }
html[data-skin='goth'] .btn.big, html[data-skin='goth'] .t-go { font-size: 12.5px; letter-spacing: .24em; }
html[data-skin='goth'] .tabbar, html[data-skin='goth'] .rail { background: #000 !important; border-color: var(--line); }
html[data-skin='goth'] .tabbar a.on, html[data-skin='goth'] .nav a.on { background: transparent; color: var(--accent); box-shadow: inset 0 -1px 0 var(--accent); }
html[data-skin='goth'] .tile, html[data-skin='goth'] body.calm .glass { border-color: #222; }
html[data-skin='goth'] .ring-fg { stroke: var(--accent); }
html[data-skin='goth'] .goal-bar b, html[data-skin='goth'] .wd.on i { background: var(--accent); }
html[data-skin='goth'] .n0 { background: #0F0F0F; } html[data-skin='goth'] .n1 { background: #3D0402; color: #FFB3AE; }
html[data-skin='goth'] .n2 { background: #1E1E1E; } html[data-skin='goth'] .n3 { background: #E9E9E9; color: #000; }
html[data-skin='goth'] .ncell { border-radius: 1px; }
html[data-skin='goth'] .ncell.nf { outline-color: var(--accent); }
html[data-skin='goth'] .seg button.on { background: transparent; color: var(--accent); box-shadow: none; }
html[data-skin='goth'] ::selection { background: var(--accent); color: #000; }

/* ---------- ТЫКВА: событийное, остаётся у прошедших испытание ---------- */
html[data-skin='pumpkin'] {
  --bg: #0A0610; --bg-2: #130C1A; --ink: #F5ECE2; --ink-2: #B5A79A; --ink-3: #6F6276;
  --glass: rgba(255,140,40,.04); --glass-2: rgba(255,140,40,.08);
  --line: #24182C; --line-2: #3A2843; --accent: #FF7A1A; --shadow: none;
  --spook: 'Rubik Wet Paint', 'Unbounded', system-ui, sans-serif;
}
html[data-skin='pumpkin'] .brand-name { font-family: var(--spook); font-weight: 400; color: var(--accent); font-size: 21px; }
html[data-skin='pumpkin'] .btn.primary { color: #1A0C00; box-shadow: 0 10px 30px -12px #FF7A1A; }
html[data-skin='pumpkin'] .tabbar, html[data-skin='pumpkin'] .rail { background: #0A0610 !important; border-color: var(--line); }
html[data-skin='pumpkin'] .tabbar a.on, html[data-skin='pumpkin'] .nav a.on { background: #23122A; color: var(--accent); }
html[data-skin='pumpkin'] .calm-h { font-family: var(--spook); font-weight: 400; color: var(--accent); }

/* ---------- выбор оформления в профиле ---------- */
.skins { display: flex; flex-direction: column; gap: 10px; }
.skins-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.skins-head a { font-size: 12.5px; color: var(--ink-3); }
.skins-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.skin {
  display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); cursor: pointer; font: inherit; text-align: left;
}
.skin.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.skin.locked { opacity: .55; }
.sk-prev {
  position: relative; display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(128,128,128,.25); background: var(--pb); color: var(--pi);
}
.sk-prev b { font-family: var(--pf); font-weight: 600; font-size: 22px; line-height: 1; }
.sk-prev i { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--pa); }
.sk-default { --pb: #EDEFF4; --pi: #12141A; --pa: #4E5DD8; --pf: 'Unbounded', sans-serif; }
.sk-black { --pb: #000; --pi: #fff; --pa: #fff; --pf: 'Onest', 'Inter', sans-serif; }
.sk-paper { --pb: #F3EEE4; --pi: #26221C; --pa: #1F5F4A; --pf: 'Literata', Georgia, serif; }
.sk-sakura { --pb: #FFF1F5; --pi: #3A2533; --pa: #E0559A; --pf: 'Comfortaa', 'Nunito', sans-serif; }
.sk-goth { --pb: #000; --pi: #EAEAEA; --pa: #E10600; --pf: 'Dela Gothic One', sans-serif; }
.sk-pumpkin { --pb: #0A0610; --pi: #FF8A2A; --pa: #FF7A1A; --pf: 'Rubik Wet Paint', sans-serif; }
.sk-name { font-size: 12.5px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 4px; }
.badge-ev { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; font-size: 12.5px;
  background: #140B18; color: #FFB27A; border: 1px solid #2E1B33; }
.badge-ev svg { width: 22px; height: 22px; }

/* =========================================================
   СОБЫТИЯ
   ========================================================= */
.t-event {
  grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px;
  background: radial-gradient(120% 140% at 0% 0%, #2A1230 0%, #0E0712 60%) !important;
  border-color: #3A1F3F !important; color: #F6E9DC;
}
.t-event:hover { border-color: #FF7A1A !important; }
.ev-ico svg { width: 44px; height: 44px; display: block; filter: drop-shadow(0 0 14px rgba(255,122,26,.45)); }
.ev-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ev-txt b { font-family: 'Rubik Wet Paint', var(--display); font-weight: 400; font-size: 17px; color: #FF8A2A; letter-spacing: .01em; }
.ev-txt span { font-size: 12.5px; color: #C9B7A8; line-height: 1.4; }
.ev-count { font-family: var(--display); font-size: 24px; color: #FF8A2A; flex: 0 0 auto; }
.ev-count i { font-style: normal; font-size: 13px; color: #8C7686; }

.ev-page { display: flex; flex-direction: column; gap: 14px; }
.ev-halloween .ev-head {
  display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--r-md);
  background: radial-gradient(130% 160% at 0% 0%, #2A1230 0%, #0B0610 65%); border: 1px solid #33193A; color: #F6E9DC;
}
.ev-big svg { width: 64px; height: 64px; display: block; filter: drop-shadow(0 0 20px rgba(255,122,26,.5)); }
.ev-title { font-family: 'Rubik Wet Paint', var(--display); font-weight: 400; font-size: clamp(24px, 4vw, 32px); color: #FF8A2A; margin: 0; line-height: 1.1; }
.ev-lead { margin: 6px 0 0; font-size: 14px; color: #CDBBAD; line-height: 1.5; }
.candles { display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px; align-items: end; padding: 4px 2px; }
.candle { display: flex; flex-direction: column; align-items: center; height: 46px; justify-content: flex-end; }
.candle i { width: 60%; max-width: 12px; height: 22px; border-radius: 2px 2px 1px 1px; background: #2B2230; position: relative; }
.candle.lit i { background: linear-gradient(#F3E6D4, #CDB89F); }
.candle.lit i::before {
  content: ''; position: absolute; left: 50%; bottom: 100%; width: 9px; height: 15px; transform: translateX(-50%);
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: radial-gradient(circle at 50% 70%, #FFF3B0 0 25%, #FFB13B 45%, #FF6A00 75%, transparent 76%);
  filter: drop-shadow(0 0 6px #FF8A2A); animation: flick 1.6s ease-in-out infinite alternate;
}
.candle:nth-child(3n).lit i::before { animation-duration: 1.2s; }
.candle:nth-child(4n).lit i::before { animation-duration: 2s; }
@keyframes flick { 0% { transform: translateX(-50%) scale(1, 1) rotate(-2deg); } 100% { transform: translateX(-50%) scale(.92, 1.08) rotate(2deg); } }
.ev-done { text-align: center; padding: 28px 16px; border-radius: var(--r-md); background: radial-gradient(120% 120% at 50% 0%, #2A1230, #0B0610 70%); border: 1px solid #33193A; color: #F6E9DC; }
.ev-done .ev-big svg { margin: 0 auto 10px; width: 84px; height: 84px; }
.ev-done h2 { font-family: 'Rubik Wet Paint', var(--display); font-weight: 400; color: #FF8A2A; font-size: 28px; margin: 0 0 8px; }
.ev-done p { color: #CDBBAD; max-width: 420px; margin: 0 auto 18px; line-height: 1.55; }
@media (prefers-reduced-motion: reduce) { .candle.lit i::before { animation: none; } }

/* правки оформлений после осмотра */
html[data-skin='goth'] .tabbar a { letter-spacing: .05em; font-size: 9.5px; }
html[data-skin='goth'] .tabbar a.on, html[data-skin='goth'] .nav a.on { box-shadow: none; }
html[data-skin='goth'] .nlegend { text-transform: none; letter-spacing: 0; font-size: 11.5px; }
html[data-skin='goth'] .n0 { background: transparent; box-shadow: inset 0 0 0 1px #262626; color: #555; }
html[data-skin='goth'] .n2 { background: #4A4A4A; color: #fff; }
html[data-skin='goth'] .nlegend i.n0 { box-shadow: inset 0 0 0 1px #3a3a3a; }
.skins-row { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 901px) { .skins-row { grid-template-columns: repeat(6, 1fr); } }
.ev-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
#evNote { color: #FF8A2A; }

/* ---------- общие правила для всех оформлений: шрифты из переменных ---------- */
html[data-skin] body { font-family: var(--body); }
html[data-skin] .brand-name, html[data-skin] .calm-h, html[data-skin] .t-title, html[data-skin] .t-v,
html[data-skin] .res-num, html[data-skin] .ring-mid b { font-family: var(--display); }
html[data-skin][data-theme='light'] .tabbar, html[data-skin][data-theme='light'] .rail { background: var(--bg-2) !important; }

/* ---------- ЧЁРНЫЙ: Onest — строгий, современный ---------- */
html[data-skin='black'] { --display: 'Onest', 'Inter', system-ui, sans-serif; --body: 'Onest', 'Inter', system-ui, sans-serif; }
html[data-skin='black'] .calm-h, html[data-skin='black'] .t-title { font-weight: 600; letter-spacing: -.02em; }
html[data-skin='black'] .t-v, html[data-skin='black'] .res-num { font-weight: 500; letter-spacing: -.03em; }

/* ---------- ГОТИКА: тяжёлый гротеск, красное, заглавные ---------- */
html[data-skin='goth'] { --display: var(--goth); }
html[data-skin='goth'] .calm-h, html[data-skin='goth'] .t-title { text-transform: uppercase; font-size: clamp(17px, 2.4vw, 22px); letter-spacing: .02em; }
html[data-skin='goth'] .t-v, html[data-skin='goth'] .res-num { letter-spacing: 0; }
html[data-skin='goth'] .t-k, html[data-skin='goth'] .me-role { font-family: var(--mono); }

/* ---------- БУМАГА: тёплая, книжная, глазам спокойно ---------- */
html[data-skin='paper'] {
  --bg: #F3EEE4; --bg-2: #FBF8F2; --ink: #26221C; --ink-2: #6B6357; --ink-3: #9C9384;
  --glass: rgba(255,255,255,.5); --glass-2: rgba(255,255,255,.75);
  --line: rgba(38,34,28,.10); --line-2: rgba(38,34,28,.2); --accent: #1F5F4A; --shadow: none;
  --ok: #3E8E5E; --bad: #B4483B; --warn: #C38B2C;
  --display: 'Literata', Georgia, 'Times New Roman', serif; --body: 'Onest', 'Inter', system-ui, sans-serif;
  --r-lg: 14px; --r-md: 10px; --r-sm: 8px;
}
html[data-skin='paper'] .task-text, html[data-skin='paper'] .solution, html[data-skin='paper'] .theory-body, html[data-skin='paper'] .hint {
  font-family: 'Literata', Georgia, serif; font-size: 17px; line-height: 1.65;
}
html[data-skin='paper'] .calm-h, html[data-skin='paper'] .t-title { font-weight: 600; letter-spacing: -.01em; }
html[data-skin='paper'] .btn.primary { box-shadow: none; }
html[data-skin='paper'] .tabbar a.on, html[data-skin='paper'] .nav a.on { background: #EAE3D6; color: var(--ink); }
html[data-skin='paper'] .seg button.on { background: #fff; }

/* ---------- САКУРА: мягкая, светлая, округлая ---------- */
html[data-skin='sakura'] {
  --bg: #FFF1F5; --bg-2: #FFFFFF; --ink: #3A2533; --ink-2: #8A6478; --ink-3: #B596A6;
  --glass: rgba(255,255,255,.7); --glass-2: rgba(255,255,255,.9);
  --line: rgba(160,60,110,.12); --line-2: rgba(160,60,110,.22); --accent: #E0559A; --shadow: 0 16px 40px -18px rgba(224,85,154,.35);
  --ok: #4CB98A; --bad: #E2506A; --warn: #F0A43C;
  --display: 'Comfortaa', 'Nunito', system-ui, sans-serif; --body: 'Nunito', system-ui, sans-serif;
  --r-lg: 28px; --r-md: 22px; --r-sm: 16px;
}
html[data-skin='sakura'] body { background: radial-gradient(120% 60% at 100% 0%, #FFD9E7 0%, transparent 60%), radial-gradient(90% 50% at 0% 100%, #F3E1FF 0%, transparent 60%), var(--bg); background-attachment: fixed; }
html[data-skin='sakura'] .calm-h, html[data-skin='sakura'] .t-title { font-weight: 700; }
html[data-skin='sakura'] .tile, html[data-skin='sakura'] body.calm .glass { box-shadow: var(--shadow); }
html[data-skin='sakura'] .tabbar a.on, html[data-skin='sakura'] .nav a.on { background: #FFE3EE; color: #C2397C; }
html[data-skin='sakura'] .btn.primary { background: linear-gradient(135deg, #F06BAE, #C86BF0); }



/* =========================================================
   ДРУЗЬЯ, ВЫЗОВЫ, БЕЗ СЕТИ
   ========================================================= */
.t-friends, .t-ch, .t-nudge { grid-column: 1 / -1; }
.t-ch { border-color: var(--accent); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--bg-2)), var(--bg-2)); }
.t-ch b, .t-nudge b { font-size: 16px; font-weight: 600; }
.t-nudge { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.fr-row { display: flex; gap: 6px; margin: 2px 0; }
.fr { position: relative; }
.fr .me-ava { width: 34px; height: 34px; font-size: 14px; }
.fr.ok::after {
  content: '✓'; position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ok); color: #06210F; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg-2);
}
.fr-code { font-family: var(--mono); font-size: 26px; letter-spacing: .14em; flex: 1; }
.fr-list { display: flex; flex-direction: column; margin-top: 6px; }
.fr-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.fr-item:first-child { border-top: 0; }
.fr-item .me-ava { width: 36px; height: 36px; }
.fr-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fr-txt b { font-size: 15px; font-weight: 600; }
.fr-txt span { font-size: 12.5px; color: var(--ink-3); }
.ch-head { gap: 10px; }
.ch-title { font-size: 18px; font-weight: 600; }
.ch-res { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.ch-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); }
.ch-row.me { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ch-row b { flex: 1; font-weight: 600; }
.ch-place { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--line); }
.ch-row:first-child .ch-place { background: var(--accent); color: #fff; }
.ch-review { display: flex; flex-direction: column; gap: 6px; }
.ch-rv { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.ch-rv.ok { color: var(--ink-2); }
.off-head { gap: 10px; border-style: dashed; }

/* =========================================================
   КАРТОЧКИ И ИТОГИ МЕСЯЦА
   ========================================================= */
.deck { gap: 6px; }
.deck-bar { display: block; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.deck-bar i { display: block; height: 100%; background: var(--accent); }
.flash { align-items: center; text-align: center; gap: 18px; padding: 28px 18px; min-height: 300px; justify-content: center; }
.stress-word { display: flex; flex-wrap: wrap; justify-content: center; font-family: var(--display); font-size: clamp(30px, 8vw, 46px); letter-spacing: .01em; line-height: 1.3; }
.stress-word span { padding: 0 1px; }
.sv {
  font: inherit; color: var(--accent); background: none; border: 0; border-bottom: 3px dotted color-mix(in srgb, var(--accent) 55%, transparent);
  padding: 0; margin: 0; line-height: inherit; cursor: pointer; border-radius: 6px;
}
.sv:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sv.right { color: #fff; background: var(--ok); border-color: transparent; text-transform: uppercase; }
.sv.wrong { color: #fff; background: var(--bad); border-color: transparent; }
.sv:disabled { cursor: default; }
.flash-out { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 64px; font-size: 16px; }
.ok-t { color: var(--ok); font-weight: 600; font-size: 18px; }
.flash-q { font-family: var(--display); font-size: clamp(24px, 6vw, 34px); line-height: 1.3; }
.flash-a { font-size: 20px; line-height: 1.5; padding: 14px 18px; border-radius: var(--r-sm); background: var(--glass-2); }
.recap-wrap { display: flex; justify-content: center; }
.recap-wrap canvas { width: min(100%, 360px); height: auto; aspect-ratio: 9 / 16; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 24px 60px -30px rgba(0,0,0,.6); }

/* =========================================================
   ПРОВЕРКА ВТОРОЙ ЧАСТИ
   ========================================================= */
.essay-area { min-height: 260px; font-size: 15.5px; line-height: 1.6; }
.c2-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.c2-photo { cursor: pointer; }
.c2-wait { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 14px; padding: 12px 0; }
.c2 { display: flex; flex-direction: column; gap: 4px; }
.c2-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 14px; }
.c2-head .goal-bar { grid-column: 1 / -1; }
.c2-score { font-family: var(--display); font-size: 40px; line-height: 1; }
.c2-score i { font-style: normal; font-size: 18px; color: var(--ink-3); }
.c2-cap { font-size: 13px; color: var(--ink-3); }
.c2-crit { display: flex; flex-direction: column; margin-top: 10px; }
.c2-k { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.c2-id { font-family: var(--mono); font-size: 12.5px; padding: 3px 0; text-align: center; border-radius: 6px; background: var(--line); }
.c2-k.full .c2-id { background: color-mix(in srgb, var(--ok) 40%, transparent); }
.c2-k.part .c2-id { background: color-mix(in srgb, var(--warn) 45%, transparent); }
.c2-k.zero .c2-id { background: color-mix(in srgb, var(--bad) 40%, transparent); }
.c2-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c2-t b { font-size: 14px; font-weight: 600; }
.c2-t span { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.c2-s { font-weight: 600; font-size: 14px; }
.c2-sec { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.c2-sec > b { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.c2-m { display: flex; gap: 8px; align-items: baseline; font-size: 14px; line-height: 1.5; }
.c2-m .tag { flex: 0 0 auto; }
.c2-p { font-size: 14px; line-height: 1.5; }
.c2-p.bad { color: var(--bad); }
.c2-advice { margin-top: 12px; padding: 12px 14px; border-left: 2px solid var(--accent); background: var(--glass-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 14.5px; line-height: 1.5; }
.p2-nums { display: flex; flex-direction: column; margin-top: 4px; }
.p2-n { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.p2-n:first-child { border-top: 0; }
.p2-n:hover span:nth-child(2) { color: var(--accent); }

/* =========================================================
   ОГОНЬКИ
   ========================================================= */
.flames {
  grid-column: 1 / -1; display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; align-items: flex-start;
}
.flames::-webkit-scrollbar { display: none; }
.fl, .fl-add { display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; color: var(--ink-2); flex: 0 0 auto; position: relative; }
.fl i, .fl-add i { font-style: normal; font-size: 11.5px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl .me-ava { width: 58px; height: 58px; font-size: 20px; border: 2px solid var(--line-2); background: var(--bg-2); }
.fl.lit .me-ava { border-color: #FF7A1A; box-shadow: 0 0 0 3px color-mix(in srgb, #FF7A1A 25%, transparent); }
.fl.wait .me-ava { border-color: color-mix(in srgb, #FF7A1A 45%, var(--line-2)); border-style: dashed; }
.fl.inc .me-ava { border-color: var(--accent); }
.fl-n {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink);
}
.fl.lit .fl-n { background: #FF7A1A; color: #1A0A00; border-color: #FF7A1A; }
.fl-add span {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 300;
  border: 2px dashed var(--line-2); color: var(--accent);
}
.fl-hint { font-size: 13px; color: var(--ink-3); align-self: center; max-width: 240px; line-height: 1.4; }
.fl-big { display: inline-flex; align-items: center; gap: 2px; font-size: 18px; filter: grayscale(.7); opacity: .7; flex: 0 0 auto; }
.fl-big b { font-family: var(--display); font-size: 17px; }
.fl-big.lit { filter: none; opacity: 1; }
.add-card { gap: 10px; }
.add-card .btn.big { align-self: stretch; }
.fold-mini summary { cursor: pointer; font-size: 13px; color: var(--ink-3); list-style: none; }
.fold-mini summary::-webkit-details-marker { display: none; }
.add-ava { position: relative; }
.add-ava .me-ava { width: 96px; height: 96px; font-size: 38px; border: 3px solid #FF7A1A; }
.add-ava b { position: absolute; right: -6px; bottom: -6px; font-size: 32px; }

/* =========================================================
   ЛЕНТА — листаешь вверх, одна карточка на экран
   ========================================================= */
.feed-wrap { position: relative; margin: -4px -2px 0; }
.feed {
  height: calc(100dvh - 210px); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  border-radius: var(--r-md); scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
@media (min-width: 901px) { .feed { height: calc(100dvh - 90px); max-width: 560px; margin: 0 auto; } }
.feed-top {
  position: absolute; top: 10px; left: 12px; right: 12px; z-index: 3; display: flex; justify-content: space-between; pointer-events: none;
}
@media (min-width: 901px) { .feed-top { max-width: 536px; margin: 0 auto; } }
.feed-goal, .feed-combo { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.feed-combo:empty { display: none; }
.feed-combo.hot { color: #1A0A00; background: #FF7A1A; border-color: #FF7A1A; font-weight: 700; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.06); } }
.fcard {
  height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: 56px 20px 28px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px;
  transition: box-shadow .3s, border-color .3s; overflow-y: auto;
}
.fcard.good { border-color: var(--ok); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ok) 45%, transparent); }
.fcard.bad { border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); }
.fc-k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.fc-note { font-size: 13px; color: var(--ink-3); margin-top: -8px; }
.fc-hint { font-size: 13px; color: var(--ink-3); text-align: center; }
.fc-body { font-size: 18px; line-height: 1.6; }
.fc-img { max-width: 100%; max-height: 30vh; object-fit: contain; border-radius: 10px; background: #fff; }
.fc-q { font-family: var(--display); font-size: clamp(20px, 5vw, 26px); line-height: 1.35; text-align: center; }
.f-card .stress-word { margin: 8px 0; }
.fc-out { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 40px; }
.fc-pop { font-family: var(--display); font-size: 30px; color: var(--ok); animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fc-right { font-size: 15px; }
.fc-sol { font-size: 14.5px; line-height: 1.55; max-height: 26vh; overflow-y: auto; align-self: stretch; }
.fc-done { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.fc-done h2 { margin: 0; font-family: var(--display); font-weight: 500; }
.fc-done p { color: var(--ink-2); max-width: 340px; line-height: 1.5; margin: 0; }
@media (prefers-reduced-motion: reduce) { .feed-combo.hot, .fc-pop { animation: none; } }

/* =========================================================
   ДУЭЛЬ
   ========================================================= */
.t-duel { grid-column: 1 / -1; border-color: #E5484D; background: linear-gradient(135deg, color-mix(in srgb, #E5484D 14%, var(--bg-2)), var(--bg-2)); }
.t-duel b { font-size: 16px; font-weight: 600; }
.duel-vs { display: flex; align-items: center; gap: 18px; }
.duel-vs .me-ava { width: 72px; height: 72px; font-size: 28px; }
.duel-vs b { font-family: var(--display); font-size: 26px; color: #E5484D; }
.duel-bars { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.db-row { display: grid; grid-template-columns: 76px 1fr 24px; gap: 10px; align-items: center; font-size: 13px; }
.db-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.db-row b { text-align: right; font-size: 15px; }
.db-dots { display: flex; gap: 4px; }
.db-dots i { flex: 1; height: 10px; border-radius: 3px; background: var(--line); transition: background .25s; }
.db-dots i.ok { background: var(--ok); } .db-dots i.bad { background: var(--bad); }
.db-row.opp .db-dots i { opacity: .8; }
.duel-timer { text-align: center; font-family: var(--mono); font-size: 22px; letter-spacing: .06em; margin-bottom: -4px; }
.duel-count { display: flex; flex-direction: column; align-items: center; padding: 60px 0; }
.duel-count b { font-family: var(--display); font-size: 120px; line-height: 1; color: #E5484D; animation: pop .9s ease-out infinite; }
.duel-task { gap: 12px; }
.duel-task .task-text { font-size: 18px; }
.duel-flash { position: fixed; inset: 0; display: grid; place-items: center; font-size: 120px; pointer-events: none; z-index: 200; animation: duelflash .6s ease-out forwards; }
.duel-flash.ok { color: var(--ok); } .duel-flash.bad { color: var(--bad); }
@keyframes duelflash { from { opacity: .9; transform: scale(.8); } to { opacity: 0; transform: scale(1.3); } }
.duel-cup { font-size: 72px; }
.duel-score { font-family: var(--display); font-size: 44px; }
.duel-end .duel-bars { width: 100%; max-width: 420px; }


/* конфетти — на первом верном ответе нового ученика */
.cf { position: absolute; top: -12px; left: var(--x); width: 8px; height: 14px; border-radius: 2px; background: hsl(var(--h) 85% 60%); animation: fall 1.8s var(--d) ease-in forwards; }
@keyframes fall { to { transform: translateY(520px) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cf { display: none; } }

/* =========================================================
   ПЕРВЫЕ 60 СЕКУНД
   ========================================================= */
body.onb .tabbar, body.onb .rail .nav, body.onb .rail .me { display: none; }
section.onb { display: flex; flex-direction: column; gap: 16px; max-width: 520px; margin: 0 auto; padding: clamp(10px, 4vh, 40px) 4px 24px; }
.onb-dots { display: flex; gap: 6px; }
.onb-dots i { height: 4px; flex: 1; border-radius: 2px; background: var(--line); transition: background .3s; }
.onb-dots i.on { background: var(--accent); }
.onb-title { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 6vw, 32px); line-height: 1.15; margin: 6px 0 0; letter-spacing: -.01em; }
.onb-sub { margin: -6px 0 0; color: var(--ink-2); font-size: 14.5px; }
.onb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onb-chips.goal { display: grid; grid-template-columns: repeat(3, 1fr); }
.onb-chip {
  font: inherit; font-size: 15px; padding: 12px 16px; border-radius: 14px; cursor: pointer;
  background: var(--bg-2); color: var(--ink); border: 1.5px solid var(--line-2); transition: transform .12s, border-color .2s, background .2s;
}
.onb-chip:active { transform: scale(.97); }
.onb-chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg-2)); font-weight: 600; }
.onb-chip.big { font-family: var(--display); font-size: 24px; padding: 18px 0; }
.onb-go { align-self: stretch; margin-top: 6px; }
.onb-go:disabled { opacity: .45; }
.onb-skip { align-self: center; }
.onb-task .task { margin: 0; }
.onb-path { display: flex; flex-direction: column; gap: 10px; }
.onb-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.onb-row > span:first-child { font-size: 22px; line-height: 1.2; }
.onb-row b { color: var(--ink); }
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 230; overflow: hidden; }
.burst .cf { top: -14px; }
.pw-text { white-space: pre-wrap; font-size: 15px; line-height: 1.6; margin-top: 8px; }

/* =========================================================
   ДОВОДКА: карточка задания и лента
   ========================================================= */
.tt-tools { display: inline-flex; gap: 4px; margin-left: auto; }
.tt-tools + .expand-btn { margin-left: 2px; }
.tt-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.tt-btn:hover { border-color: var(--line-2); color: var(--ink); }
.tt-btn.more { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.task.lean .task-top { flex-wrap: nowrap; }
.task.lean .task-top .tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#ans.is-ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--bg-2)); }
#ans.is-bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 7%, var(--bg-2)); }
.btn.next { background: var(--ink); color: var(--bg); box-shadow: none; }
html[data-skin] .btn.next { background: var(--accent); color: var(--bg); }
.vline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 15px; }
.vline.ok b:first-child { color: var(--ok); }
.vline.bad b:first-child { color: var(--bad); }
.vsol summary { cursor: pointer; font-size: 13.5px; color: var(--ink-2); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.vsol summary::-webkit-details-marker { display: none; }
.vsol summary::after { content: '▾'; font-size: 11px; }
.vsol[open] summary::after { content: '▴'; }
.vsol .solution { margin-top: 8px; font-size: 14.5px; }
.why-row.compact { margin-top: 0; gap: 6px; }
.why-row.compact .chip { padding: 5px 10px; font-size: 12.5px; }
.task.lean { gap: 12px; }
.feed { height: calc(100dvh - 210px); }
@media (min-width: 901px) { .feed { height: calc(100dvh - 90px); } }
.f-card .stress-word { font-size: clamp(40px, 11vw, 56px); }

/* финишная прямая */
.t-finish { grid-column: 1 / -1; gap: 8px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.fin-big { font-family: var(--display); font-weight: 500; font-size: 22px; }
.t-finish .btn { align-self: flex-start; }
.fin-res { font-weight: 600; color: var(--ok); }
.fin-strip { display: grid; grid-template-columns: repeat(31, 1fr); gap: 2px; margin-top: 4px; }
.fin-strip i { height: 6px; border-radius: 2px; background: var(--line); }
.fin-strip i.done { background: var(--ok); }
.fin-strip i.miss { background: color-mix(in srgb, var(--ink-3) 35%, transparent); }
.fin-strip i.today { background: var(--accent); }
.fin-strip i.exam { background: var(--bad); }


/* =========================================================
   iPhone: безопасные зоны и устойчивое нижнее меню
   На телефоне прокручивается только область контента (.shell),
   а не весь документ: так меню снизу и шапка сверху никуда
   не прыгают при смене страниц и «резиновой» прокрутке iOS.
   ========================================================= */
@media (max-width: 900px) {
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  #app { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .shell {
    height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
    align-content: start;   /* короткая страница не растягивает строки сетки — контент сразу под шапкой */
    padding-top: max(14px, env(safe-area-inset-top));
    padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right));
  }
  main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .tabbar { bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateZ(0); }
  .toast-box { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .auth-wrap { padding-top: env(safe-area-inset-top); }
}

/* ---------- БЕЛЫЙ: зеркало «Чёрного» ---------- */
html[data-skin='white'] {
  --bg: #FFFFFF; --bg-2: #FFFFFF; --ink: #0A0A0A; --ink-2: #5E5E5E; --ink-3: #9A9A9A;
  --glass: rgba(0,0,0,.025); --glass-2: rgba(0,0,0,.05);
  --line: #EBEBEB; --line-2: #D6D6D6; --accent: #0A0A0A; --shadow: none;
  --ok: #12A150; --bad: #E5484D; --warn: #D99A24;
  --display: 'Onest', 'Inter', system-ui, sans-serif; --body: 'Onest', 'Inter', system-ui, sans-serif;
}
html[data-skin='white'] .btn.primary { color: #fff; box-shadow: none; }
html[data-skin='white'] .btn.primary:hover { filter: none; background: #2A2A2A; }
html[data-skin='white'] .tabbar, html[data-skin='white'] .rail { background: #fff !important; border-color: var(--line); }
html[data-skin='white'] .tabbar a.on, html[data-skin='white'] .nav a.on { background: #0A0A0A; color: #fff; }
html[data-skin='white'] .tabbar a.on .ico, html[data-skin='white'] .nav a.on .ico { color: #fff; }
html[data-skin='white'] .brand-logo { filter: grayscale(1) contrast(1.2); }
html[data-skin='white'] .seg button.on { background: #0A0A0A; color: #fff; }
html[data-skin='white'] .calm-h, html[data-skin='white'] .t-title { font-weight: 600; letter-spacing: -.02em; }
html[data-skin='white'] .t-v, html[data-skin='white'] .res-num { font-weight: 500; letter-spacing: -.03em; }
html[data-skin='white'] .n0 { background: #F3F3F3; color: #9A9A9A; } html[data-skin='white'] .n1 { background: #FBD5D6; }
html[data-skin='white'] .n2 { background: #F8E7B9; } html[data-skin='white'] .n3 { background: #CDEFD9; }
html[data-skin='white'] .tile { border-color: #EBEBEB; }
.sk-white { --pb: #fff; --pi: #0A0A0A; --pa: #0A0A0A; --pf: 'Onest', 'Inter', sans-serif; }
/* чистка аккаунтов: обычные галочки, а не поля ввода */
#pcBox input[type='checkbox'] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: 0 0 auto; accent-color: var(--bad); border-radius: 4px; }
#pcBox .item { padding: 12px 14px; }
#pcBox .item b { font-size: 15px; }

/* =========================================================
   iPhone, доводка: полоса под «островом», нижний бар ниже,
   размытие всего, что уходит под бар
   ========================================================= */
@media (max-width: 900px) {
  #app:has(> .shell) { overflow: hidden; }
  /* то, что прокручивается под вырез сверху, закрыто полосой цвета фона */
  #app::before {
    content: ''; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); z-index: 45; pointer-events: none;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  /* нижний бар: ближе к краю, над полоской «домой» */
  .tabbar { bottom: max(8px, calc(env(safe-area-inset-bottom) - 12px)); }
  main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  /* всё, что уходит под бар, мягко размывается */
  #app::after {
    content: ''; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; pointer-events: none;
    height: calc(92px + env(safe-area-inset-bottom));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    -webkit-mask-image: linear-gradient(to top, #000 45%, transparent);
    mask-image: linear-gradient(to top, #000 45%, transparent);
    background: linear-gradient(to top, color-mix(in srgb, var(--bg) 55%, transparent), transparent);
  }
  #app:not(:has(> .shell))::after { display: none; }
  /* сам бар — полупрозрачное стекло (у оформлений — свой цвет, как было) */
  html:not([data-skin]) .tabbar {
    background: color-mix(in srgb, var(--bg-2) 80%, transparent) !important;
    backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  }
}
.feed { position: relative; }

/* быстрая правка задания */
.fix-pen { margin-left: auto; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; font-size: 14px; }
.fix-sheet { position: fixed; inset: 0; z-index: 160; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
.fix-card {
  width: min(620px, 100%); max-height: 88vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px 22px 0 0;
}
@media (min-width: 901px) { .fix-sheet { align-items: center; } .fix-card { border-radius: 22px; } }
.fix-head { display: flex; justify-content: space-between; align-items: center; }
.fix-card textarea { min-height: 0; font-size: 15px; line-height: 1.5; }
.fix-prev { padding: 10px 12px; border-radius: 10px; background: var(--glass-2); font-size: 15px; }

/* «ещё такое же» и аудит банка */
.again-btn { align-self: flex-start; }
.au-why { margin-top: 6px; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--glass-2); }
.au-why.key { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.au-why.text { background: color-mix(in srgb, var(--warn) 16%, transparent); }
/* скрытое атрибутом hidden не должно проявляться из-за display у .row/.source */
[hidden] { display: none !important; }

/* быстрые действия под ответом — тонкой строкой, без плиток */
.quick-row { display: flex; gap: 2px 18px; flex-wrap: wrap; align-items: center; margin-top: -2px; }
.qk {
  background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13.5px; color: var(--ink-3);
  cursor: pointer; text-decoration: none; letter-spacing: .01em;
}
.qk:hover { color: var(--ink); }
.qk-skip { margin-left: auto; }

/* под разбором — воздух между блоками, чтобы кнопки не слипались */
.vsol { margin-top: 2px; }
.vsol[open] { margin-bottom: 4px; }
.vsol .solution { padding-bottom: 2px; }
.again-btn { margin-top: 10px; }
.why-row.compact { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
#verdict .vline + .vsol { margin-top: 6px; }

/* =========================================================
   СВОИ ИКОНКИ вместо эмодзи
   ========================================================= */
.tt-btn svg { width: 18px; height: 18px; }
.c2-photo svg { width: 17px; height: 17px; margin-right: 6px; vertical-align: -3px; }
.btn > svg { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; flex: 0 0 auto; }
.btn[data-duel] > svg { margin-right: 0; }
.ico-k { display: inline-flex; align-items: center; gap: 6px; }
.ico-k svg { width: 15px; height: 15px; }
.onb-ico svg { width: 24px; height: 24px; color: var(--accent); display: block; }
.duel-cup svg { width: 76px; height: 76px; color: var(--accent); stroke-width: 1.4; }
.i-fire { display: inline-flex; vertical-align: -2px; }
.i-fire svg { width: 1em; height: 1em; color: #FF7A1A; }
.fl-n .i-fire svg { width: 12px; height: 12px; margin-right: 1px; }
.fl.lit .fl-n .i-fire svg { color: #1A0A00; }
.fl-big .i-fire svg { width: 20px; height: 20px; }
.add-ava b .i-fire svg { width: 34px; height: 34px; }
.i-lock { display: inline-flex; margin-left: 5px; vertical-align: -2px; opacity: .8; }
.i-lock svg { width: 13px; height: 13px; }

/* =========================================================
   КОЛЕСО ЗАГРУЗКИ в «Чёрном» и «Белом» — радужное, переливается,
   с лёгким свечением (везде, где есть колесо)
   ========================================================= */
html[data-skin='black'] .spin, html[data-skin='white'] .spin {
  border: 0; position: relative;
  background: conic-gradient(from 0deg, #FF3D7F, #FF9F1C, #FFE14D, #3DFFB0, #3DB8FF, #8C6BFF, #FF3D7F);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  animation: sp .8s linear infinite, rainbow 2.4s linear infinite;
}
html[data-skin='black'] .spin { filter: drop-shadow(0 0 6px rgba(140,107,255,.55)) drop-shadow(0 0 2px rgba(61,255,176,.45)); }
html[data-skin='white'] .spin { filter: drop-shadow(0 0 5px rgba(140,107,255,.35)); }
@keyframes rainbow { from { filter: hue-rotate(0deg) drop-shadow(0 0 6px rgba(140,107,255,.5)); } to { filter: hue-rotate(360deg) drop-shadow(0 0 6px rgba(140,107,255,.5)); } }
.auth-wrap .spin { width: 28px; height: 28px; }
@media (prefers-reduced-motion: reduce) { html[data-skin] .spin { animation: sp 1.6s linear infinite; } }

/* строка друга: подпись в одну строку, кнопки — значками */
.fr-txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-item .btn[data-nudge], .fr-item .btn[data-duel] { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; }
.fr-item .btn[data-nudge] svg, .fr-item .btn[data-duel] svg { margin: 0; width: 18px; height: 18px; }
.fr-item { gap: 8px; }
.fl-big { flex: 0 0 auto; }

/* карта номеров в «Чёрном» и «Белом» — сочные цвета вместо приглушённых */
html[data-skin='black'] .n3 { background: #1FBF5F; color: #04140A; }
html[data-skin='black'] .n2 { background: #F2B035; color: #1A1000; }
html[data-skin='black'] .n1 { background: #F0445A; color: #FFFFFF; }
html[data-skin='black'] .n0 { background: #141414; color: #6E6E6E; box-shadow: inset 0 0 0 1px #2C2C2C; }
html[data-skin='white'] .n3 { background: #24B45C; color: #FFFFFF; }
html[data-skin='white'] .n2 { background: #F3AA2C; color: #1A1000; }
html[data-skin='white'] .n1 { background: #EC4452; color: #FFFFFF; }
html[data-skin='white'] .n0 { background: #F2F2F2; color: #9A9A9A; box-shadow: inset 0 0 0 1px #E2E2E2; }
html[data-skin='black'] .ncell, html[data-skin='white'] .ncell { font-weight: 600; }

/* особые пробники */
.t-special { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--bg-2)), var(--bg-2)); }
.t-special b { font-size: 17px; font-weight: 600; }
.sp-head { gap: 10px; }
.sp-title { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(24px, 6vw, 32px); line-height: 1.1; }
.sp-lead { margin: 0; color: var(--ink-2); line-height: 1.5; }
.sp-review { display: flex; flex-direction: column; gap: 10px; }
.sp-rv .solution { margin-top: 6px; font-size: 14px; }
.sp-rv.ok { color: var(--ink-2); }
.sp-ed textarea { font-family: var(--mono); font-size: 13px; line-height: 1.5; }

/* =========================================================
   ПАСХАЛКА «СЕРЕБРО» (только «Чёрный» и «Белый», data-silver)
   Металл с редким мягким бликом: 9 секунд покоя → один проход.
   ========================================================= */
html { --sv-a: #8E8E93; --sv-b: #E9E9EE; --sv-c: #FFFFFF; --sv-glow: rgba(255,255,255,.28); }
html[data-skin='white'] { --sv-a: #6E6E73; --sv-b: #C7C7CC; --sv-c: #F2F2F7; --sv-glow: rgba(0,0,0,.12); }
.sg0 { stop-color: var(--sv-a); } .sg1 { stop-color: var(--sv-b); } .sg2 { stop-color: var(--sv-c); }
html[data-silver][data-skin='black'] .ring-fg, html[data-silver][data-skin='white'] .ring-fg {
  stroke: url(#silverG); filter: drop-shadow(0 0 4px var(--sv-glow));
}
html[data-silver][data-skin='black'] :is(.wd.on i, .goal-bar b, .session-top .bar i, .fin-strip i.done, .deck-bar i, .db-dots i.ok),
html[data-silver][data-skin='white'] :is(.wd.on i, .goal-bar b, .session-top .bar i, .fin-strip i.done, .deck-bar i, .db-dots i.ok) {
  background: linear-gradient(110deg, var(--sv-a) 0%, var(--sv-b) 28%, var(--sv-c) 45%, var(--sv-b) 60%, var(--sv-a) 100%);
  background-size: 260% 100%; background-position: 100% 0;
  box-shadow: 0 0 6px var(--sv-glow);
  animation: silverSweep 9s ease-in-out infinite;
}
@keyframes silverSweep { 0%, 82% { background-position: 100% 0; } 100% { background-position: -60% 0; } }
html[data-silver][data-skin='black'] .wd.on i { box-shadow: 0 0 8px var(--sv-glow), inset 0 1px 0 rgba(255,255,255,.6); }
.build-line { cursor: default; user-select: none; -webkit-user-select: none; }
@media (prefers-reduced-motion: reduce) {
  html[data-silver] :is(.wd.on i, .goal-bar b, .session-top .bar i, .fin-strip i.done, .deck-bar i, .db-dots i.ok) { animation: none; }
}

/* =========================================================
   ТИХИЕ МЕЛОЧИ: номер ученика, золотые 100, ночь, ×10, юбилеи
   ========================================================= */
.rail .brand-logo { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.memb { position: fixed; inset: 0; z-index: 240; display: grid; place-items: center; background: rgba(0,0,0,.35); perspective: 900px; }
.memb-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 34px; min-width: 230px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; text-align: center;
  animation: membIn .6s cubic-bezier(.2,1.2,.3,1) both; transform-style: preserve-3d;
}
.memb.out .memb-card { animation: membOut .3s ease-in both; }
@keyframes membIn { from { transform: rotateY(-100deg) scale(.9); opacity: 0; } to { transform: rotateY(0) scale(1); opacity: 1; } }
@keyframes membOut { to { transform: rotateY(80deg) scale(.95); opacity: 0; } }
.memb-k { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.memb-no { font-family: var(--display); font-size: 52px; line-height: 1; font-weight: 500; }
.memb-s { max-width: 240px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.gold-once { animation: gold100 2.4s ease-out 1; }
@keyframes gold100 {
  0% { color: inherit; text-shadow: none; }
  25% { color: #E8C766; text-shadow: 0 0 18px rgba(232,199,102,.75), 0 0 2px #FFF3C4; }
  70% { color: #D4AF37; text-shadow: 0 0 10px rgba(212,175,55,.5); }
  100% { color: inherit; text-shadow: none; }
}
.night-line { color: var(--ink-3); font-style: italic; }
.rainbow-once {
  background: linear-gradient(90deg, #FF3D7F, #FF9F1C, #FFE14D, #3DFFB0, #3DB8FF, #8C6BFF, #FF3D7F) !important;
  background-size: 300% 100% !important; color: #0B0B0F !important; border-color: transparent !important;
  animation: rainbowRun 1.8s linear 1 !important; box-shadow: 0 0 16px rgba(140,107,255,.55);
}
@keyframes rainbowRun { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.milestone { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); letter-spacing: .01em; }
.fc-out .milestone { text-align: center; }
@media (prefers-reduced-motion: reduce) { .memb-card, .gold-once, .rainbow-once { animation: none !important; } }

/* годовщина */
.t-anniv { grid-column: 1 / -1; gap: 10px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.anniv-title { font-family: var(--display); font-weight: 500; font-size: 20px; }
.anniv-task { padding: 12px 14px; border-radius: var(--r-sm); background: var(--glass-2); font-size: 15px; }
/* манифест */
.mf { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 28px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: mfIn .5s ease both; cursor: pointer; }
.mf.out { animation: mfOut .35s ease both; }
@keyframes mfIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mfOut { to { opacity: 0; } }
.mf-in { max-width: 560px; display: flex; flex-direction: column; gap: 22px; align-items: center; text-align: center; }
.mf-line { margin: 0; min-height: 2.6em; font-family: var(--display); font-weight: 500; font-size: clamp(24px, 6vw, 36px); line-height: 1.25; letter-spacing: -.01em; }
.mf-line::after { content: ''; display: inline-block; width: 2px; height: .9em; margin-left: 4px; vertical-align: -.08em; background: currentColor; animation: caretBlink 1s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.mf-k { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.mf-full { gap: 6px; }
.mf-full p { margin: 0; font-family: var(--display); font-size: clamp(16px, 3.6vw, 20px); line-height: 1.5; }
.mf-full .mf-k { margin-top: 18px; }
.rail .brand-name { -webkit-user-select: none; user-select: none; }
@media (prefers-reduced-motion: reduce) { .mf, .mf.out { animation: none; } .mf-line::after { animation: none; } }

/* =========================================================
   РЕЗУЛЬТАТЫ: главное — балл и рост
   ========================================================= */
.res-top { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 4px 18px; margin: 4px 0 6px; }
.res-top .res-score { display: flex; align-items: baseline; gap: 12px; }
.res-top .res-sub { grid-column: 1 / 2; font-size: 13.5px; color: var(--ink-2); }
.res-delta { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.res-delta.up { color: var(--ok); }
.res-delta.down { color: var(--bad); }
.res-spark { grid-column: 2; grid-row: 1 / 3; width: 100%; height: 56px; align-self: center; }
.res-spark polyline { stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.res-spark circle { fill: var(--accent); }
@media (max-width: 520px) {
  .res-top { grid-template-columns: 1fr; }
  .res-spark { grid-column: 1; grid-row: auto; height: 44px; }
}
.res-line { margin: 8px 0 0; font-size: 14.5px; line-height: 1.45; }
.res-more { margin-top: 6px; }
.res-more summary { cursor: pointer; font-size: 13px; color: var(--ink-3); list-style: none; display: inline-flex; gap: 6px; align-items: center; padding: 6px 0; }
.res-more summary::-webkit-details-marker { display: none; }
.res-more summary::after { content: '▾'; font-size: 11px; }
.res-more[open] summary::after { content: '▴'; }
.res-more .res-text p { margin: 6px 0; }

/* календарь и числа */
.day-line { color: var(--accent); }
.egg-line { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); font-style: italic; }
.zero { gap: 10px; }
.zero-no { font-family: var(--display); font-size: 96px; line-height: 1; font-weight: 500; }
.zero-ok { font-weight: 600; color: var(--ok); }
/* код Konami: восьмибитная карта */
html.pix .ncell, html.pix .nlegend i {
  border-radius: 0 !important; font-family: var(--mono); font-weight: 700;
  box-shadow: inset -4px -4px 0 rgba(0,0,0,.28), inset 4px 4px 0 rgba(255,255,255,.28) !important;
  animation: pixIn .5s steps(4) both;
}
html.pix .res-spark polyline { stroke-linejoin: miter; stroke-width: 3; }
@keyframes pixIn { from { transform: scale(.6); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { html.pix .ncell { animation: none; } }

/* =========================================================
   НОВЫЙ ИНТЕРФЕЙС (html[data-ui='zen'])
   вид платформы прежний; левый блок — без рамки и разделителей:
   только разделы, которые крутятся колесом и тают после выбора
   ========================================================= */
html[data-ui='zen'] .blob-3 { display: none; }
.shell.zen { display: block; max-width: none; margin: 0; padding: 96px 24px 48px; }
/* всё основное — строго по центру экрана; разделы живут слева поверх пустого поля */
.shell.zen > main { width: min(820px, max(560px, calc(100vw - 600px))); margin: 0 auto; min-width: 0; }
/* на компьютере нижнего бара нет — и запаса под него не нужно: главная помещается в экран и не «плавает» от колёсика */
@media (min-width: 901px) { .shell.zen > main { padding-bottom: 0; } }
.zn-col { display: none; }
/* узкий компьютер: содержимое всегда по центру; когда колесо выезжает — оно ложится поверх, а страница приглушается */
@media (min-width: 901px) and (max-width: 1180px) {
  .shell.zen > main { width: min(820px, calc(100vw - 64px)); }
  .shell.zen.zw-open > main { opacity: .16; }
  .shell.zen > main { transition: opacity .35s ease; }
  .zw-rail { left: 9px; }
}

/* шапка: кружок профиля над разделами, надпись над содержимым */
.zh {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 84px; pointer-events: none;
  background: linear-gradient(var(--bg) 50%, transparent);
}
.zh-in { position: relative; display: flex; align-items: center; justify-content: center; height: 100%; }
.zh-in > * { pointer-events: auto; }
.zh-me {
  position: absolute; left: calc(max(22px, calc((100vw - 1280px) / 2 + 22px)) + 12px); top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink); text-decoration: none;
  background: var(--glass-2); border: 1px solid var(--line-2);
  font: 600 15px/1 var(--body); transition: background .25s, color .25s, border-color .25s;
}
.zh-me:hover, .zh-me.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.zh-word {
  font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1;
  letter-spacing: -.03em; color: var(--ink); text-decoration: none; padding: 6px 4px;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}

/* разделы: тихий барабан с белой «таблеткой» по центру */
.zw, .zw-zone { position: fixed; left: max(22px, calc((100vw - 1280px) / 2 + 22px)); width: 250px; }
.zw {
  top: 50%; height: 0; z-index: 36; opacity: 0; pointer-events: none; transform: translate3d(-14px, 0, 0);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}
.zw.on { opacity: 1; pointer-events: auto; transform: none; transition-duration: .32s, .45s; }
/* линейка у края: колесо «сворачивается» в неё, когда уходит */
.zw-rail {
  position: fixed; z-index: 34; top: 50%; transform: translateY(-50%); pointer-events: none;
  left: calc(max(22px, calc((100vw - 1280px) / 2 + 22px)) + 20px);
  display: flex; flex-direction: column; gap: 9px; opacity: 1; transition: opacity .7s ease .35s;
}
.zw-rail i {
  display: block; width: 9px; height: 2px; border-radius: 2px; background: var(--ink); opacity: .22;
  transition: width .45s cubic-bezier(.2, .8, .2, 1), opacity .45s ease;
}
.zw-rail i.cur { width: 20px; opacity: .85; }
.zw-rail.still { opacity: .3; }
.zw.on + .zw-rail { opacity: 0; transition: opacity .18s ease; }
.zw[hidden] + .zw-rail, .zw-rail[hidden] { display: none; }
/* смена раздела: содержимое проявляется снизу, без вспышек */
.shell.zen > main.zen-enter > :not(.zen-home) { animation: zenIn .38s cubic-bezier(.2, .8, .2, 1) both; }
.zw-zone { top: 84px; bottom: 0; z-index: 35; }
.zw-band {
  position: absolute; left: 0; right: 0; top: 0; height: 50px; transform: translateY(-50%);
  border-radius: var(--r-sm); transition: opacity .35s ease;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
}
.zw.unmarked .zw-band { opacity: 0; }
.zw a {
  position: absolute; left: 0; right: 0; top: 0; height: 50px; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none;
  font-size: 16px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  transition: color .3s ease;
  will-change: transform, opacity;
  -webkit-tap-highlight-color: transparent;
}
.zw a .ico { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; }
.zw a .ico svg { width: 20px; height: 20px; }
.zw a.cur { color: var(--ink); }
.zw a:not(.cur):hover { color: var(--ink); opacity: 1 !important; }
.tabbar.zt, .zt-pull { display: none; }

/* главная: заголовок дня, тонкая полоса плана и одна кнопка */
.zen-home {
  min-height: calc(100vh - 190px); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; animation: zenIn .8s cubic-bezier(.2, .8, .2, 1) both;
}
.zen-eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.zen-title { font-size: clamp(32px, 4vw, 48px); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; margin: 4px 0 10px; }
.zen-bar { width: 260px; max-width: 70%; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.zen-bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; animation: zenBar 1.2s cubic-bezier(.2, .8, .2, 1) both .15s; }
.zen-meta { font-size: 13.5px; color: var(--ink-2); }
.btn.zen-go { margin-top: 22px; min-width: 230px; height: 60px; padding: 0 44px; border-radius: 999px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.zen-quiet { margin-top: 10px; font-size: 13px; color: var(--ink-3); max-width: 360px; line-height: 1.5; }
.zen-note {
  margin-top: 4px; background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 3px 0; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--ink-2);
}
.zen-note:hover { color: var(--ink); border-color: var(--ink); }
@keyframes zenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes zenBar { from { transform: translateX(-100%); } }

/* занятие: подсказка, «⋯», «Разобрать», «Теория», «Справочник», «Пропустить» — всегда на месте */
html[data-ui='zen'] .session-note, html[data-ui='zen'] .task .why-row, html[data-ui='zen'] .fc-note { display: none; }
/* занятие появляется мягко, а не «выпрыгивает» */
html[data-ui='zen'] main.zen-sess > * { animation: zenIn .45s cubic-bezier(.2, .8, .2, 1) both; }
html[data-ui='zen'] main.zen-sess > :nth-child(2) { animation-delay: .06s; }
/* второе касание для подтверждения */
.armed { color: var(--bad) !important; }
.qk-skip.armed, #leave.armed { font-weight: 600; }
#leave.armed { width: auto; padding: 0 12px; border-radius: 999px; font-size: 13px; opacity: 1 !important; }
/* крупнее зоны нажатия на телефоне — меньше промахов */
@media (pointer: coarse) {
  .qk { padding: 10px 0; }
  .quick-row { gap: 4px 22px; }
  .tt-btn { width: 40px; height: 40px; }
}

/* переключатель в профиле */
.ui-switch {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; cursor: pointer;
  padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass); color: var(--ink); font: inherit;
}
.ui-switch:hover { border-color: var(--line-2); }
.ui-sw-t { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ui-sw-t b { font-size: 15px; font-weight: 600; }
.ui-sw-t span { font-size: 12.5px; color: var(--ink-3); }
.sw { position: relative; flex: 0 0 auto; width: 46px; height: 28px; border-radius: 14px; background: var(--line-2); transition: background .25s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.sw.on { background: var(--ink); }
.sw.on::after { transform: translateX(18px); background: var(--bg); }
.zen-vs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* телефон: шапка с кружком и надписью, бар уходит вниз и появляется по касанию */
@media (max-width: 900px) {
  .zw, .zw-zone, .zw-rail, .zn-col { display: none; }
  .shell.zen > main { width: auto; margin: 0; }
  .shell.zen {
    padding: calc(72px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  }
  .shell.zen > main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .zh { height: calc(64px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .zh-in { padding: 0 16px; }
  .zh-me { left: max(16px, env(safe-area-inset-left)); width: 36px; height: 36px; font-size: 14px; }
  .zh-word { font-size: 20px; }
  .tabbar.zt {
    display: flex; opacity: 0; pointer-events: none; transform: translateY(calc(100% + 28px));
    transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .6s ease;
  }
  .tabbar.zt.on { opacity: 1; pointer-events: auto; transform: none; }
  .zt-pull {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; height: calc(34px + env(safe-area-inset-bottom));
    background: none; border: 0; padding: 0; cursor: pointer; transition: opacity .4s; -webkit-tap-highlight-color: transparent;
  }
  .zt-pull i {
    position: absolute; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); width: 38px; height: 4px; margin-left: -19px;
    border-radius: 4px; background: var(--ink); opacity: .2;
  }
  .zt-pull.off { opacity: 0; pointer-events: none; }
  #app::after { transition: opacity .6s; }
  #app:has(.zt:not(.on))::after { opacity: 0; }
  .zen-home { min-height: calc(100dvh - 210px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .zen-title { font-size: 32px; }
  .btn.zen-go { width: 100%; max-width: 320px; }
}
@media (min-width: 901px) { html[data-ui='zen'] .feed { height: calc(100dvh - 150px); } }

/* занятие на ПК — на уровне глаз: задание стоит ровно посередине экрана */
@media (min-width: 901px) {
  html[data-ui='zen'] main.zen-sess {
    min-height: calc(100vh - 144px); display: flex; flex-direction: column; justify-content: center;
    padding-bottom: 48px;
  }
}

/* =========================================================
   МАТОВОСТЬ (новый интерфейс): живой подсвеченный фон
   и стекло как в iOS — полупрозрачное, с размытием и бликом
   ========================================================= */
.zen-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
html:not([data-ui='zen']) .zen-bg { display: none; }
.zen-bg i { position: absolute; border-radius: 50%; }
.zb1 { width: 78vmax; height: 78vmax; left: -26vmax; top: -30vmax; }
.zb2 { width: 70vmax; height: 70vmax; right: -24vmax; bottom: -32vmax; }
.zb3 { width: 46vmax; height: 46vmax; left: 38%; top: 30%; }
.zl { display: none; }
/* тёмная: холодный лунный свет на чёрном */
html[data-ui='zen'][data-theme='dark'] .zb1 { background: radial-gradient(closest-side, rgba(255, 255, 255, .095), rgba(255, 255, 255, .03) 55%, transparent); }
html[data-ui='zen'][data-theme='dark'] .zb2 { background: radial-gradient(closest-side, rgba(200, 210, 255, .075), rgba(200, 210, 255, .02) 55%, transparent); }
html[data-ui='zen'][data-theme='dark'] .zb3 { background: radial-gradient(closest-side, rgba(255, 255, 255, .05), transparent); }
html[data-ui='zen'][data-theme='dark'] .zl { background: radial-gradient(closest-side, rgba(255, 255, 255, .055), transparent); }
/* светлая: жемчужные тени на белом */
html[data-ui='zen'][data-theme='light'] body { background: #F7F7F9; }
html[data-ui='zen'][data-theme='light'] .zb1 { background: radial-gradient(closest-side, rgba(255, 255, 255, 1), rgba(255, 255, 255, .6) 50%, transparent); }
html[data-ui='zen'][data-theme='light'] .zb2 { background: radial-gradient(closest-side, rgba(110, 114, 126, .12), rgba(110, 114, 126, .035) 55%, transparent); }
html[data-ui='zen'][data-theme='light'] .zb3 { background: radial-gradient(closest-side, rgba(0, 0, 0, .045), transparent); }
html[data-ui='zen'][data-theme='light'] .zl { background: radial-gradient(closest-side, rgba(255, 255, 255, .9), transparent); }
/* зерно — та самая «матовость» */
.zgrain {
  position: absolute; inset: -50%; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html[data-ui='zen'][data-theme='light'] .zgrain { opacity: .07; mix-blend-mode: multiply; filter: invert(1); }
@keyframes zbA { to { transform: translate3d(14vmax, 10vmax, 0) scale(1.12); } }
@keyframes zbB { to { transform: translate3d(-12vmax, -14vmax, 0) scale(1.08); } }
@keyframes zbC { to { transform: translate3d(-18vmax, 8vmax, 0) scale(.9); } }
html[data-ui='zen'] .shell.zen { position: relative; z-index: 1; }

/* стекло */
/* ПЛАВНОСТЬ: размытие под каждой карточкой браузер пересчитывает на каждом кадре прокрутки и
   при каждом движении колеса — отсюда подлагивания. Фон под карточками — гладкий свет, размытый он
   выглядит так же, как неразмытый, поэтому карточки — полупрозрачное стекло без размытия.
   Настоящее размытие оставлено только там, где под стеклом проезжает текст: шапка, нижний бар, окна */
html[data-ui='zen'][data-skin] body :is(.glass, .tile, .fcard, .soft, .ui-switch) { backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-ui='zen'][data-skin] body .modal { backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
html[data-ui='zen'][data-theme='dark'][data-skin] body :is(.glass, .tile, .fcard, .soft, .ui-switch, .modal) {
  background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 60px -20px rgba(0, 0, 0, .6);
}
html[data-ui='zen'][data-theme='light'][data-skin] body :is(.glass, .tile, .fcard, .soft, .ui-switch, .modal) {
  background: rgba(255, 255, 255, .58); border-color: rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 1px 0 rgba(0, 0, 0, .03), 0 24px 60px -24px rgba(30, 34, 60, .16);
}
html[data-ui='zen'][data-skin] .modal-back { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
html[data-ui='zen'][data-theme='dark'] input, html[data-ui='zen'][data-theme='dark'] textarea { background: rgba(255, 255, 255, .04); }
html[data-ui='zen'][data-theme='light'] input, html[data-ui='zen'][data-theme='light'] textarea { background: rgba(255, 255, 255, .7); }

/* шапка — матовая полоса, растворяющаяся книзу */
html[data-ui='zen'] .zh {
  background: linear-gradient(color-mix(in srgb, var(--bg) 55%, transparent), transparent);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
html[data-ui='zen'] .zh-me {
  backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
}
html[data-ui='zen'][data-theme='light'] .zh-me { background: rgba(255, 255, 255, .6); border-color: rgba(0, 0, 0, .07); }

/* «таблетка» разделов — кусочек стекла */
html[data-theme='dark'] .zw-band { background: rgba(255, 255, 255, .075); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .06); }
html[data-theme='light'] .zw-band { background: rgba(255, 255, 255, .7); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(0, 0, 0, .05), 0 10px 30px -12px rgba(30, 34, 60, .18); }

/* главная кнопка — с мягким свечением */
html[data-ui='zen'][data-theme='dark'] .btn.zen-go { box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 18px 50px -14px rgba(255, 255, 255, .24); }
html[data-ui='zen'][data-theme='light'] .btn.zen-go { box-shadow: 0 18px 44px -16px rgba(0, 0, 0, .45); }

/* телефон: бар — настоящее стекло; карточки без размытия (плавность прокрутки), но полупрозрачные */
@media (max-width: 900px) {
  .zl { display: none; }
  html[data-ui='zen'] .tabbar.zt {
    backdrop-filter: blur(26px) saturate(180%) !important; -webkit-backdrop-filter: blur(26px) saturate(180%) !important;
  }
  html[data-ui='zen'][data-theme='dark'] .tabbar.zt { background: rgba(28, 28, 30, .55) !important; border-color: rgba(255, 255, 255, .08); }
  html[data-ui='zen'][data-theme='light'] .tabbar.zt { background: rgba(255, 255, 255, .6) !important; border-color: rgba(255, 255, 255, .9); }
  /* стекло и на телефоне — как в iOS */
  html[data-ui='zen'][data-skin] body .modal {
    backdrop-filter: blur(20px) saturate(160%) !important; -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  }
  html[data-ui='zen'][data-theme='dark'][data-skin] body :is(.glass, .tile, .fcard, .soft, .ui-switch) { background: rgba(255, 255, 255, .05); }
  html[data-ui='zen'][data-theme='dark'] .zh-me, html[data-ui='zen'] .zh { backdrop-filter: blur(18px) saturate(160%) !important; -webkit-backdrop-filter: blur(18px) saturate(160%) !important; }
  /* пятна света на телефоне ярче и ближе — чтобы стеклу было что размывать */
  html[data-ui='zen'][data-theme='dark'] .zb1 { background: radial-gradient(closest-side, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04) 55%, transparent); }
  html[data-ui='zen'][data-theme='dark'] .zb2 { background: radial-gradient(closest-side, rgba(200, 210, 255, .1), rgba(200, 210, 255, .03) 55%, transparent); }
  html[data-ui='zen'][data-theme='dark'] .zb3 { background: radial-gradient(closest-side, rgba(255, 255, 255, .08), transparent); width: 70vmax; height: 70vmax; left: 10%; top: 35%; }
  #app::after { display: none; }
}

/* шрифт: заголовки и крупные числа — фирменный Unbounded; текст — Onest; надпись «нобалл» — прежняя */
html[data-ui='zen'] { --display: 'Unbounded', 'Onest', system-ui, sans-serif; }
html[data-ui='zen'] .zh-word { font-family: 'Onest', 'Inter', system-ui, sans-serif; }
html[data-ui='zen'] :is(h1, h2, .calm-h, .t-title, .zen-title, .sp-title, .onb-title) { font-weight: 500; letter-spacing: -.035em; }
html[data-ui='zen'] .zen-title { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; }
html[data-ui='zen'] :is(.res-num, .t-v, .metric .v, .memb-no) { font-weight: 500; letter-spacing: -.05em; }
html[data-ui='zen'] h3 { font-family: var(--body); font-weight: 600; letter-spacing: -.015em; }
html[data-ui='zen'] .task .task-no { font-weight: 500; letter-spacing: -.02em; }
@media (max-width: 900px) { html[data-ui='zen'] .zen-title { font-size: 28px; } }

/* =========================================================
   ПАЛИТРА НОВОГО ИНТЕРФЕЙСА: никаких кричащих цветов.
   Карта номеров — оттенки белого на стекле, смысловые цвета приглушены
   ========================================================= */
html[data-ui='zen'] { --ok: #B4E6CA; --bad: #F2A9A9; --warn: #E6D1A1; }
/* карта номеров: уверенно — белый, нестабильно — полупрозрачный, проседает — штриховка, не пробовали — стекло */
html[data-ui='zen'][data-skin] .n3 { background: rgba(255, 255, 255, .92); color: #0A0A0A; box-shadow: 0 6px 18px -8px rgba(255, 255, 255, .45); }
html[data-ui='zen'][data-skin] .n2 { background: rgba(255, 255, 255, .28); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
html[data-ui='zen'][data-skin] .n1 {
  color: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .26) 0 1.5px, transparent 1.5px 6px), rgba(255, 255, 255, .03);
}
html[data-ui='zen'][data-skin] .n0 { background: rgba(255, 255, 255, .035); color: rgba(255, 255, 255, .34); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
html[data-ui='zen'] .nlegend i { width: 11px; height: 11px; border-radius: 3px; }
html[data-ui='zen'] .nlegend i.n1 { background-size: auto; }
/* прирост балла — светлым, без зелёного неона */
html[data-ui='zen'] .res-delta.up { color: #FFFFFF; opacity: .9; }
html[data-ui='zen'] .res-delta.down { color: var(--bad); }
/* метки «решено» / «была ошибка» — тихие */
html[data-ui='zen'] .tag.ok { color: rgba(255, 255, 255, .78); border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .05); }
html[data-ui='zen'] .tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); background: color-mix(in srgb, var(--bad) 7%, transparent); }
html[data-ui='zen'] .tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
/* огоньки, комбо — серебром, а не оранжевым */
html[data-ui='zen'] .i-fire svg { color: #FFFFFF; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .5)); }
html[data-ui='zen'] .fl.lit .me-ava { border-color: #FFFFFF; box-shadow: 0 0 0 3px rgba(255, 255, 255, .18), 0 0 18px rgba(255, 255, 255, .25); }
html[data-ui='zen'] .fl.wait .me-ava { border-color: rgba(255, 255, 255, .35); }
html[data-ui='zen'] .fl.lit .fl-n { background: #FFFFFF; color: #0A0A0A; border-color: #FFFFFF; }
html[data-ui='zen'] .add-ava .me-ava { border-color: #FFFFFF; }
html[data-ui='zen'] .feed-combo.hot { color: #0A0A0A; background: #FFFFFF; border-color: #FFFFFF; }
/* ответ: верно / неверно — мягко */
html[data-ui='zen'] #ans.is-ok { border-color: color-mix(in srgb, var(--ok) 70%, transparent); background: color-mix(in srgb, var(--ok) 6%, transparent); }
html[data-ui='zen'] #ans.is-bad { border-color: color-mix(in srgb, var(--bad) 70%, transparent); background: color-mix(in srgb, var(--bad) 6%, transparent); }
html[data-ui='zen'] .fcard.good { border-color: color-mix(in srgb, var(--ok) 50%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }
html[data-ui='zen'] .fcard.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
/* онбординг: без колеса и бара */
body.onb .zw, body.onb .zw-zone, body.onb .zw-rail, body.onb .zt, body.onb .zt-pull { display: none !important; }

/* регистрация и вход: ничего лишнего */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none;
  color: var(--ink-3); cursor: pointer; display: grid; place-items: center; border-radius: 10px;
}
.pw-eye:hover { color: var(--ink); }
.pw-eye svg { width: 20px; height: 20px; }
.switch.role-switch { margin: 0; }
.switch.role-switch button { padding: 9px 4px; font-size: 12.5px; white-space: nowrap; }
.auth-fine { margin: 12px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--ink-3); text-align: center; }
.auth-fine a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-2); }
.auth .field label { margin-bottom: 6px; }

/* приветствие: миссия и два действия */
.auth.hello { max-width: 460px; padding: 34px 32px 26px; text-align: center; }
.hello-brand { justify-content: center; padding: 0 0 26px; }
.hello-h { font-size: clamp(25px, 6vw, 29px); line-height: 1.14; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.hello-sub { margin: 14px auto 0; max-width: 320px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.btn.hello-go { margin-top: 28px; }
.auth.hello .btn + .btn { margin-top: 10px; }
.hello-guest { margin-top: 16px; background: none; border: 0; padding: 6px; font: inherit; font-size: 13px; color: var(--ink-3); cursor: pointer; }
.hello-guest:hover { color: var(--ink); }
@media (max-width: 480px) { .auth.hello { padding: 30px 22px 22px; } .hello-h { font-size: 25px; } }

.zen-admin { text-decoration: none; }
.za-arrow { font-size: 20px; color: var(--ink-2); }
/* в новом интерфейсе — только свой матовый фон: цветные пятна обычного оформления не показываем */
html[data-ui='zen'] body::before, html[data-ui='zen'] body::after { display: none !important; }

/* тарифы */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.plan {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px; border-radius: var(--r-md); cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); color: var(--ink); font: inherit; transition: border-color .2s, background .2s;
}
.plan:hover { border-color: var(--line-2); }
.plan.on { border-color: var(--ink); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--ink); }
.plan-t { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.plan-p { font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.plan-m { font-size: 13px; color: var(--ink-2); }
.plan-l { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; margin-top: 4px; }
.plan.patron .plan-p { background: linear-gradient(90deg, var(--ink), var(--ink-3), var(--ink)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* =========================================================
   ПАНЕЛЬ РАЗДЕЛОВ — вместо колеса
   Матовое стекло внизу экрана, всегда под рукой (кроме занятия). Текущий раздел — белая
   «таблетка», которая при переходе перетекает к новому разделу с лёгкой пружинкой.
   ========================================================= */
.shell.zen { padding-bottom: 0; }
@media (min-width: 901px) {
  .shell.zen > main { padding-bottom: 116px; }
  .zen-home { min-height: calc(100vh - 212px); }
  html[data-ui='zen'] .feed { height: calc(100dvh - 212px); }
}
.nbt {
  position: fixed; z-index: 45; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 6px; border-radius: 999px;
  background: rgba(30, 30, 33, .46); border: 1px solid rgba(255, 255, 255, .09);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 26px 60px -18px rgba(0, 0, 0, .85);
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s ease;
}
html[data-theme='light'] .nbt { background: rgba(255, 255, 255, .6); border-color: rgba(255, 255, 255, .9); box-shadow: inset 0 1px 0 #fff, 0 20px 50px -20px rgba(30, 34, 60, .3); }
.nbt a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 18px; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  transition: color .3s ease .08s; -webkit-tap-highlight-color: transparent;
}
.nbt a .ico { display: grid; place-items: center; width: 18px; height: 18px; }
.nbt a .ico svg { width: 18px; height: 18px; }
.nbt a:not(.on):hover { color: var(--ink); }
.nbt a.on { color: #0A0A0A; }
html[data-theme='light'] .nbt a.on { color: #FFFFFF; }
.nbt a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.nbt-pill {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 999px; pointer-events: none;
  background: #FFFFFF; box-shadow: 0 10px 28px -10px rgba(255, 255, 255, .45);
  transition: transform .6s cubic-bezier(.3, 1.3, .4, 1), width .6s cubic-bezier(.3, 1.3, .4, 1), opacity .3s ease;
}
html[data-theme='light'] .nbt-pill { background: #0A0A0A; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
/* содержимое растворяется перед панелью, а не режется о неё */
.nbt-fade {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; height: 120px; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--bg) 88%, transparent) 72%); transition: opacity .4s ease;
}
/* в занятии панель уходит вниз — на экране только задание */
body.zsess .nbt, body:has(main.zen-sess) .nbt { transform: translate(-50%, calc(100% + 48px)); opacity: 0; pointer-events: none; }
body.zsess .nbt-fade, body:has(main.zen-sess) .nbt-fade, body.onb .nbt-fade, body.onb .nbt { opacity: 0; pointer-events: none; }
@media (max-width: 900px) {
  .nbt {
    left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); transform: none;
    bottom: calc(10px + env(safe-area-inset-bottom)); padding: 5px; border-radius: 28px;
  }
  .nbt a { flex: 1 1 0; min-width: 0; height: 52px; padding: 0 2px; flex-direction: column; justify-content: center; gap: 4px; font-size: 10.5px; letter-spacing: 0; border-radius: 23px; }
  .nbt a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .nbt a .ico, .nbt a .ico svg { width: 20px; height: 20px; }
  .nbt-pill { top: 5px; bottom: 5px; border-radius: 23px; }
  .nbt-fade { height: 110px; }
  body.zsess .nbt, body:has(main.zen-sess) .nbt { transform: translateY(calc(100% + 30px)); }
}

/* =========================================================
   РЕЗУЛЬТАТЫ: прирост — понятной фразой и своим цветом
   ========================================================= */
.res-top .res-score { align-items: center; gap: 14px; }
.res-unit { font-size: 12.5px; line-height: 1.3; color: var(--ink-3); }
.res-gain {
  grid-column: 1 / 2; justify-self: start; display: inline-flex; align-items: center; gap: 7px; margin: 4px 0 2px;
  padding: 6px 13px 6px 10px; border-radius: 999px; font-size: 13.5px; white-space: nowrap;
  color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 24%, transparent);
}
.res-gain b { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.res-gain-ico svg { display: block; width: 10px; height: 10px; fill: currentColor; }
.res-gain.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, transparent); border-color: color-mix(in srgb, var(--bad) 24%, transparent); }
.res-spark { grid-row: 1 / 4; }
@media (max-width: 520px) { .res-spark { grid-row: auto; } }

/* панель уходит, пока человек работает; тонкая полоска внизу возвращает её */
body.dock-off .nbt { transform: translate(-50%, calc(100% + 48px)); opacity: 0; pointer-events: none; }
body.dock-off .nbt-fade { opacity: 0; }
.nbt-handle {
  position: fixed; z-index: 45; left: 50%; bottom: calc(4px + env(safe-area-inset-bottom)); width: 120px; height: 30px; margin-left: -60px;
  display: grid; place-items: center; background: none; border: 0; padding: 0; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .35s ease; -webkit-tap-highlight-color: transparent;
}
.nbt-handle i {
  display: block; width: 46px; height: 5px; border-radius: 5px;
  background: rgba(255, 255, 255, .28); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 4px 14px rgba(0, 0, 0, .5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .2s, width .25s cubic-bezier(.2, .8, .2, 1);
}
.nbt-handle:hover i { background: rgba(255, 255, 255, .5); width: 58px; }
html[data-theme='light'] .nbt-handle i { background: rgba(0, 0, 0, .25); }
body.dock-off:not(.zsess):not(.onb) .nbt-handle { opacity: 1; pointer-events: auto; }
body:has(main.zen-sess) .nbt-handle { opacity: 0 !important; pointer-events: none !important; }
@media (max-width: 900px) {
  body.dock-off .nbt { transform: translateY(calc(100% + 30px)); }
  .nbt-handle { height: 34px; }
}

/* =========================================================
   КОЛЛЕКЦИЯ: подписки как показ — линии с разными фактурами (названия фактур — только для CSS)
   ========================================================= */
.coll-link { text-decoration: none; }
.coll { display: flex; flex-direction: column; align-items: center; text-align: center; overflow: visible; }
.coll-head { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 12px; }
.coll-eyebrow { font-family: 'Onest', var(--body); font-weight: 600; font-size: 15px; letter-spacing: -.02em; color: var(--ink-3); }
.coll-title { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 4.6vw, 54px); letter-spacing: -.045em; line-height: 1; margin: 0; }
.coll-sub { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; }
.coll-now { margin-top: 8px; padding: 7px 14px; border-radius: 999px; font-size: 13px; background: var(--glass-2); border: 1px solid var(--line-2); }

/* подиум: на всю ширину экрана, образ по центру */
.shell.zen { overflow-x: clip; }
.runway {
  position: relative; /* карточки меряют отступ от показа, а не от страницы — иначе в обычном оформлении центр съезжал */
  align-self: stretch; margin: 0 calc(50% - 50vw); padding: 14px calc(50vw - 170px) 22px;
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none;
  overscroll-behavior-x: contain;
}
.runway::-webkit-scrollbar { display: none; }
.look {
  --d: 1;
  flex: 0 0 340px; scroll-snap-align: center; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; padding: 12px 12px 20px; border-radius: 30px;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 30px 70px -30px rgba(0, 0, 0, .8);
  transform: scale(calc(1 - var(--d) * .07)); opacity: calc(1 - var(--d) * .55);
  transition: border-color .4s ease; will-change: transform, opacity;
}
.look.on { cursor: default; border-color: rgba(255, 255, 255, .16); }
.look-cap { display: flex; justify-content: space-between; align-items: center; margin: 14px 8px 0; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.look-mine { padding: 3px 9px; border-radius: 999px; background: #fff; color: #0A0A0A; font-weight: 600; font-size: 10px; }
.look-name { font-family: var(--display); font-weight: 500; font-size: 30px; letter-spacing: -.04em; line-height: 1.05; margin: 8px 8px 0; }
.look-line { margin: 8px 8px 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); min-height: 40px; }
/* вшитая этикетка «Состав» */
.look-label {
  margin: 14px 8px 0; display: flex; flex-direction: column; font-size: 12.5px;
}
.look-label b { font-size: 11px; font-weight: 600; color: var(--ink-3); margin-bottom: 2px; }
.look-label div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.look-label div:last-child { border-bottom: 1px solid rgba(255, 255, 255, .07); }
.look-label div span:first-child { color: var(--ink-3); }
.look-label div span:last-child { color: var(--ink); text-align: right; }
.look-price { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 14px 8px 0; }
.look-price b { font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: -.035em; white-space: nowrap; }
.look-price span { font-size: 12px; color: var(--ink-3); text-align: right; }

/* ПЛАСТИНА: материал линии. Без шума и фактур — только свет, как на металле и лаке.
   Сверху — тираж и сезон, крупно — срок. Номер экземпляра выбит справа внизу */
.plate {
  position: relative; height: 164px; border-radius: 20px; overflow: hidden; padding: 16px 18px;
  display: flex; flex-direction: column; justify-content: space-between; color: rgba(255, 255, 255, .92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.plate::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(130% 100% at 15% 0%, rgba(255, 255, 255, .14), transparent 55%); }
.pl-top { position: relative; z-index: 1; display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .62; }
.pl-mid { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 10px; }
.pl-big { font-family: var(--display); font-weight: 300; font-size: 76px; line-height: .8; letter-spacing: -.07em; text-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 -1px 0 rgba(0, 0, 0, .35); }
.pl-unit { font-size: 13px; opacity: .6; }
.pl-no { position: absolute; z-index: 1; right: 18px; bottom: 16px; font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: -.02em; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #0A0A0A; }
/* основа: матовая светлая пластина */
.pl-paper { background: linear-gradient(160deg, #EDECE8, #CFCECA); color: #141416; }
.pl-paper::after { background: radial-gradient(130% 100% at 15% 0%, rgba(255, 255, 255, .55), transparent 55%); }
.pl-paper .pl-big { text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
/* сезон: шлифованная сталь */
.pl-steel { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px), linear-gradient(165deg, #4A4B50, #2A2B2F 60%, #1F2023); }
/* два сезона: сланец */
.pl-slate { background: linear-gradient(165deg, #34353A, #1B1C1F); }
/* год: графит с атласным бликом */
.pl-graphite { background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .09) 48%, transparent 64%), linear-gradient(165deg, #2A2A2E, #131315); }
/* абсолют: чёрный лак в серебряной рамке, блик медленно проходит по поверхности */
.pl-lacquer {
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .16) 46%, rgba(255, 255, 255, .03) 56%, transparent 70%) 0 0 / 260% 100%, linear-gradient(165deg, #121214, #030304);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34), inset 0 0 0 5px #050506, inset 0 0 0 6px rgba(255, 255, 255, .1);
  animation: lacquer 8s ease-in-out infinite alternate;
}
.look:not(.on) .pl-lacquer { animation-play-state: paused; }
@keyframes lacquer { from { background-position: 0% 0, 0 0; } to { background-position: 100% 0, 0 0; } }
/* сколько номеров разошлось: тонкая линия под ценой */
.look-ed { display: flex; flex-direction: column; gap: 7px; margin: 14px 8px 0; font-size: 11.5px; color: var(--ink-3); letter-spacing: .02em; }
.look-ed i { position: relative; display: block; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.look-ed i::before { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--ink); }
.look.gone .plate { filter: grayscale(1) brightness(.6); }
.look.gone .look-price b { text-decoration: line-through; text-decoration-thickness: 1px; opacity: .5; }
/* меценат — одна строка под показом */
.coll-patron {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; padding: 8px 16px 8px 8px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--ink-2); background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .08);
  transition: border-color .3s, color .3s;
}
.coll-patron:hover { color: var(--ink); border-color: rgba(255, 255, 255, .2); }
.coll-patron b { color: var(--ink); font-weight: 600; }
.coll-patron .num { color: var(--ink-3); }
.cp-dot { width: 26px; height: 26px; border-radius: 999px; animation: none; }

.coll-dots { display: flex; gap: 8px; margin: 4px 0 0; }
.coll-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .22); cursor: pointer; transition: width .45s cubic-bezier(.3, 1.3, .4, 1), background .3s; }
.coll-dots button.on { width: 22px; background: #fff; }
.coll-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 22px; width: 100%; max-width: 420px; }
.btn.coll-go { min-width: 280px; height: 56px; padding: 0 30px; font-size: 15.5px; font-weight: 600; }
.btn.coll-go:disabled { opacity: .55; }
.coll-note { margin: 0; font-size: 12.5px; color: var(--ink-3); }
#payOut:empty { display: none; }
@media (max-width: 900px) {
  .runway { padding: 10px calc(50vw - 150px) 18px; gap: 12px; }
  .look { flex-basis: 300px; }
  .plate { height: 126px; padding: 14px 16px; }
  .pl-big { font-size: 58px; }
  .look-label div { padding: 5px 0; }
  .look-line { min-height: 0; }
  .btn.coll-go { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .pl-lacquer { animation: none; } }
/* в обычном (светлом) оформлении коллекция — тёмный шоурум посреди платформы:
   показ всегда проходит в темноте, а заодно это предпоказ нового интерфейса */
html:not([data-ui='zen']) .coll, html[data-ui='zen'][data-theme='light'] .coll {
  --ink: #F2F2F2; --ink-2: #A3A3A6; --ink-3: #6B6B70; --glass-2: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .16);
  color: var(--ink); background: radial-gradient(90% 60% at 50% 0%, #1E1E22, #08080A 70%); border-radius: 30px;
  padding: 34px 0 30px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5);
}
html:not([data-ui='zen']) .coll .runway, html[data-ui='zen'][data-theme='light'] .coll .runway { margin: 0; padding: 14px calc(50% - 170px) 22px; }
html:not([data-ui='zen']) .coll .btn.primary, html[data-ui='zen'][data-theme='light'] .coll .btn.primary { background: #FFFFFF; color: #0A0A0A; border-color: #FFFFFF; box-shadow: none; }
html:not([data-ui='zen']) .coll .verdict, html[data-ui='zen'][data-theme='light'] .coll .verdict { color: var(--ink); background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
@media (max-width: 900px) { html:not([data-ui='zen']) .coll .runway, html[data-ui='zen'][data-theme='light'] .coll .runway { padding: 10px calc(50% - 150px) 18px; } html:not([data-ui='zen']) .coll, html[data-ui='zen'][data-theme='light'] .coll { border-radius: 24px; padding: 26px 0 24px; } }

/* показ открывается выходом: первым — образ по центру, за ним соседи */
.look { animation: walkIn .8s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--k, 0) * 90ms + 60ms); }
@keyframes walkIn { from { translate: 0 46px; opacity: 0; } }
/* профиль: маленький образец того, что «на вас» */
.coll-link { gap: 14px; }
.cm-sw { position: relative; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.cm-sw::before, .cm-sw::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.cm-sw::after { background: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .18), transparent 60%); }
@media (prefers-reduced-motion: reduce) { .look { animation: none; } }

/* полотно дня: каждое решённое задание — нить основы; уток идёт поперёк «через одну» — получается настоящее переплетение */
.weave {
  display: flex; gap: 3px; width: clamp(150px, calc(var(--n, 6) * 15px), 260px); height: 150px; margin: 0 auto 8px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 8px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 8px repeat-x;
}
.weave i {
  flex: 1 1 0; display: block; border-radius: 2px 2px 0 0; transform-origin: top;
  animation: thread .75s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 60ms + 150ms);
}
.weave i.ok { background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--bg) 62%, transparent) 0 3px, transparent 3px 10px), linear-gradient(var(--ink), color-mix(in srgb, var(--ink) 80%, transparent)); }
.weave i.no { background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--bg) 62%, transparent) 0 3px, transparent 3px 10px), color-mix(in srgb, var(--ink) 15%, transparent); }
.weave i:nth-child(even) { background-position: 0 5px, 0 0; }
@keyframes thread { from { transform: scaleY(0); } }
.weave-cap { margin: 0 auto 6px; max-width: 300px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); text-align: center; }
@media (prefers-reduced-motion: reduce) { .weave i { animation: none; } }

/* =========================================================
   КЛУБ: номер экземпляра рядом с именем, в логотипе и в профиле.
   Сезон и Год — графит, Абсолют — серебро, Меценат — серебро с бегущим бликом
   ========================================================= */
.mm {
  display: inline-flex; align-items: center; vertical-align: .12em; margin-left: 7px; padding: 2px 7px 2px; border-radius: 999px;
  font-family: var(--display); font-weight: 500; font-size: 10.5px; line-height: 1.35; letter-spacing: -.01em; white-space: nowrap;
  color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}
.mm-y1p {
  color: #0A0A0B; border-color: transparent;
  background: linear-gradient(120deg, #F4F5F7, #B9BDC4 38%, #FFFFFF 52%, #A9AEB6 70%, #E9EBEE);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 1px 6px -2px rgba(0, 0, 0, .5);
}
.mm-ultra {
  /* меценат — наоборот: чёрный лак, серебряная кайма и переливающиеся цифры */
  border-color: rgba(255, 255, 255, .55); background: #050506; box-shadow: 0 0 0 1px #050506, 0 0 12px -3px rgba(255, 255, 255, .35);
}
.mm-ultra { color: transparent; -webkit-background-clip: padding-box; }
.mm-ultra { background-image: linear-gradient(120deg, #FFFFFF, #C4C8CE 40%, #FFFFFF 55%, #D2D5DA 75%); background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text; animation: mmShine 4.5s ease-in-out infinite alternate; outline: 1px solid rgba(255, 255, 255, .5); outline-offset: -1px; }
@keyframes mmShine { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* номер в логотипе: «нобалл⁰⁰⁷» */
.zh-word { position: relative; }
.wm-no { position: absolute; left: calc(100% - 3px); top: 3px; margin-left: 0; font-family: var(--display); font-weight: 500; font-size: .42em; letter-spacing: 0; line-height: 1; opacity: .55; }
.wm-y1p, .wm-ultra {
  opacity: 1; background: linear-gradient(120deg, #F4F5F7, #9EA3AB 40%, #FFFFFF 55%, #9EA3AB 75%); background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wm-ultra { animation: mmShine 4.5s ease-in-out infinite alternate; }

/* в профиле под именем */
.club-id { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 8px; margin: 2px 0 10px; text-decoration: none; color: var(--ink-2); font-size: 13px; }
.club-id .mm { margin-left: 0; font-size: 12px; padding: 3px 9px; }
.club-id i { flex-basis: 100%; font-style: normal; font-size: 12px; color: var(--ink-3); }
.coll-joke { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* Абсолют и Меценат: панель внизу с серебряной таблеткой */
body.club-y1p .nbt-pill, body.club-ultra .nbt-pill {
  background: linear-gradient(120deg, #F4F5F7, #C3C7CD 38%, #FFFFFF 52%, #B3B8BF 70%, #EEF0F2);
}
body.club-ultra .nbt-pill { background-size: 240% 100%; animation: mmShine 6s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .mm-ultra, .wm-ultra, body.club-ultra .nbt-pill { animation: none; } }

/* =========================================================
   СУМЕРКИ: за неделю — от привычного светлого до чёрного, как небо вечером, без серого.
   0 — день, 1 — голубой час, 2 — сумерки (тёмно-синий), 3 — ночь, 4 — чёрный
   ========================================================= */
html[data-ui='zen'][data-dusk='0'] { --bg: #F4F5F8; --dusk-acc: #4E5DD8; --dusk-acc-ink: #FFFFFF; }
html[data-ui='zen'][data-dusk='1'] { --bg: #E7E8F7; --dusk-acc: #3A43B0; --dusk-acc-ink: #FFFFFF; --ink-2: #4E5170; --ink-3: #7A7E9C; }
html[data-ui='zen'][data-dusk='2'] { --bg: #151833; --bg-2: #1B1F3E; --ink-2: #A7AAC8; --ink-3: #6F7396; }
html[data-ui='zen'][data-dusk='3'] { --bg: #090A14; --bg-2: #10121F; --ink-2: #A0A2B8; --ink-3: #626580; }
html[data-ui='zen'][data-dusk] body { background: var(--bg); transition: background-color .6s ease; }
/* главная кнопка и таблетка панели в светлых стадиях — привычный синий, потом он «выцветает» */
html[data-ui='zen'][data-theme='light'][data-dusk] .btn.primary,
html[data-ui='zen'][data-theme='light'][data-dusk] .btn.zen-go { background: var(--dusk-acc); border-color: var(--dusk-acc); color: var(--dusk-acc-ink); }
html[data-ui='zen'][data-theme='light'][data-dusk] .nbt-pill { background: var(--dusk-acc); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--dusk-acc) 60%, transparent); }
html[data-ui='zen'][data-theme='light'][data-dusk] .nbt a.on, html[data-ui='zen'][data-theme='light'][data-dusk] .nbt button.on { color: var(--dusk-acc-ink); }
html[data-ui='zen'][data-dusk='1'] .zb2 { background: radial-gradient(closest-side, rgba(120, 128, 230, .16), rgba(120, 128, 230, .05) 55%, transparent); }
html[data-ui='zen'][data-dusk='2'] .zb1 { background: radial-gradient(closest-side, rgba(150, 160, 255, .2), rgba(150, 160, 255, .06) 55%, transparent); }
html[data-ui='zen'][data-dusk='2'] .zb2 { background: radial-gradient(closest-side, rgba(110, 90, 210, .2), rgba(110, 90, 210, .05) 55%, transparent); }
html[data-ui='zen'][data-dusk='3'] .zb1 { background: radial-gradient(closest-side, rgba(140, 150, 255, .1), rgba(140, 150, 255, .03) 55%, transparent); }
html[data-ui='zen'][data-dusk='3'] .zb2 { background: radial-gradient(closest-side, rgba(110, 100, 220, .08), transparent); }

.dusk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 4px 14px; font-size: 12.5px; color: var(--ink-3); }
.dusk-bar { display: flex; gap: 4px; }
.dusk-bar i { width: 16px; height: 16px; border-radius: 6px; background: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); opacity: .35; }
.dusk-bar i.on { opacity: 1; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quiet-link { display: block; margin: 6px 4px 14px; font-size: 12.5px; color: var(--ink-3); text-decoration: none; }
.quiet-link:hover { color: var(--ink-2); }
/* показ коллекции — всегда тёмный шоурум, даже в светлых стадиях */
/* светлые стадии: всё, что в тёмном нарисовано белым, здесь рисуем чернилами;
   смысловые цвета — насыщеннее, чтобы читались на светлом */
html[data-ui='zen'][data-theme='light'] { --ok: #1E8E55; --bad: #D4474B; --warn: #B9861F; }
html[data-ui='zen'][data-theme='light'][data-skin] .n3 { background: var(--dusk-acc, #111); color: var(--dusk-acc-ink, #fff); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--dusk-acc, #111) 60%, transparent); }
html[data-ui='zen'][data-theme='light'][data-skin] .n2 { background: color-mix(in srgb, var(--dusk-acc, #111) 30%, transparent); color: var(--ink); box-shadow: none; }
html[data-ui='zen'][data-theme='light'][data-skin] .n1 {
  color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 45%, transparent);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 22%, transparent) 0 1.5px, transparent 1.5px 6px), rgba(255, 255, 255, .4);
}
html[data-ui='zen'][data-theme='light'][data-skin] .n0 { background: rgba(0, 0, 0, .035); color: var(--ink-3); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07); }
html[data-ui='zen'][data-theme='light'] .res-delta.up { color: var(--ok); opacity: 1; }
html[data-ui='zen'][data-theme='light'] .tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: color-mix(in srgb, var(--ok) 7%, transparent); }
html[data-ui='zen'][data-theme='light'] .i-fire svg { color: var(--ink); filter: none; }
html[data-ui='zen'][data-theme='light'] .fl.lit .me-ava { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
html[data-ui='zen'][data-theme='light'] .fl.wait .me-ava { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
html[data-ui='zen'][data-theme='light'] .fl.lit .fl-n { background: var(--ink); color: var(--bg); border-color: var(--ink); }
html[data-ui='zen'][data-theme='light'] .add-ava .me-ava { border-color: var(--ink); }
html[data-ui='zen'][data-theme='light'] .feed-combo.hot { color: #fff; background: var(--dusk-acc, #111); border-color: var(--dusk-acc, #111); }
html[data-ui='zen'][data-theme='light'] .seg .on, html[data-ui='zen'][data-theme='light'] .seg button.on { background: var(--dusk-acc, #111); color: var(--dusk-acc-ink, #fff); }
/* голубой час: стекло чуть плотнее, чтобы на сиреневом фоне карточки не терялись */
html[data-ui='zen'][data-dusk='1'][data-skin] body :is(.glass, .tile, .fcard, .soft, .ui-switch, .modal) { background: rgba(255, 255, 255, .62); border-color: rgba(255, 255, 255, .85); }
/* сумерки и ночь: стекло с лёгкой синевой */
html[data-ui='zen'][data-dusk='2'][data-skin] body :is(.glass, .tile, .fcard, .soft, .ui-switch, .modal) { background: rgba(170, 180, 255, .06); border-color: rgba(190, 200, 255, .12); }
/* обычный интерфейс на телефоне: нижняя панель не должна закрывать последний блок страницы */
@media (max-width: 900px) { html:not([data-ui='zen']) main#main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); } }

/* приглашение в телеграм: стеклянная карточка над нижней панелью */
.tg-inv {
  position: fixed; z-index: 60; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); width: min(440px, calc(100vw - 24px));
  transform: translateX(-50%); display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 24px;
  color: var(--ink); background: color-mix(in srgb, var(--bg) 72%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .45), inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  animation: tgIn .55s cubic-bezier(.2, .9, .25, 1) both, tgArm .5s step-end both;
}
.tg-inv.out { animation: tgOut .3s ease forwards; }
@keyframes tgIn { from { opacity: 0; translate: 0 22px; } }
@keyframes tgOut { to { opacity: 0; translate: 0 16px; } }
@keyframes tgArm { from { pointer-events: none; } to { pointer-events: auto; } }
.tg-ico { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tg-ico svg { width: 19px; height: 19px; }
.tg-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.tg-txt b { font-size: 14.5px; font-weight: 600; }
.tg-txt > span { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.tg-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.tg-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 15px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.tg-btn.ghost { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
html[data-ui='zen'][data-theme='light'] .tg-btn:not(.ghost) { background: var(--dusk-acc, var(--ink)); border-color: var(--dusk-acc, var(--ink)); color: #fff; }
.tg-x { flex: 0 0 auto; width: 30px; height: 30px; margin: -4px -4px 0 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--ink-3); font-size: 20px; line-height: 1; cursor: pointer; }
.tg-x:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
body.dock-off .tg-inv { bottom: calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 901px) { .tg-inv { bottom: 104px; } }
@media (prefers-reduced-motion: reduce) { .tg-inv { animation: tgArm .5s step-end both; } }
/* имя друга обрезается, а знак клуба — никогда */
.fr-txt b { display: flex; align-items: center; min-width: 0; }
.fr-txt b .fr-nm { min-width: 3.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; color: inherit; }
.fr-txt b .mm { flex: 0 0 auto; font-size: 10.5px; color: var(--ink); overflow: visible; }
.fr-txt b .mm-y1p { color: #0A0A0B; }
/* знак клуба у друга — в начале второй строки: там он всегда целиком */
.fr-txt > span .mm { margin: 0 6px 0 0; font-size: 10px; color: var(--ink); vertical-align: .05em; }
.fr-txt > span .mm-y1p { color: #0A0A0B; }
/* оформление в профиле: тёмное или светлое */
.look-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin: 10px 4px 14px; }
.look-l { font-size: 14px; font-weight: 600; }
.look-n { flex-basis: 100%; font-size: 12.5px; color: var(--ink-3); }

/* «Где вы ошибались» на телефоне: тема и «открыто» не влезали — таблица уезжала вбок */
@media (max-width: 600px) { .hot-tbl th:nth-child(3), .hot-tbl td:nth-child(3), .hot-tbl th:nth-child(5), .hot-tbl td:nth-child(5) { display: none; } }

/* ===== МИНИМАЛИЗМ (2026-10-11): меньше плиток, подписей-дублей и повторяющихся ярлыков ===== */
/* строка цифр вместо четырёх плиток с подсказками */
.zstats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 4px 2px 20px; }
.zstats .zs { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.zstats .zs b { font: 600 30px/1 var(--display, inherit); letter-spacing: -.03em; color: var(--ink); }
.zstats .zs span { font-size: 12.5px; color: var(--ink-3, var(--ink-2)); }
/* пояснение «как это работает» — свёрнуто, одной строкой */
.zfold { margin: 6px 2px 10px; }
.zfold summary { cursor: pointer; font-size: 13px; color: var(--ink-3, var(--ink-2)); list-style: none; display: inline-flex; gap: 6px; align-items: center; padding: 6px 0; }
.zfold summary::-webkit-details-marker { display: none; }
.zfold summary::after { content: '▾'; font-size: 11px; }
.zfold[open] summary::after { content: '▴'; }
.zfold p { margin: 6px 0 0; max-width: 560px; }
/* надпись над заголовком, повторяющая сам заголовок («повторение» над «Пора вспомнить») — убираем.
   Остаются только надписи с настоящими данными (дата, предмет, номер) — у них класс keep */
html[data-ui='zen'] .page-head > div > .eyebrow:not(.keep) { display: none; }
html[data-ui='zen'] .page-head > div > .eyebrow:not(.keep) + h1 { margin-top: 0 !important; }
/* подсказки под цифрами в плитках — шум: цифра и подпись говорят сами */
html[data-ui='zen'] .metric .hint { display: none; }
/* «Где ошибок больше всего» — список вместо широкой таблицы */
.hot-list { display: flex; flex-direction: column; }
.hot-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.hot-row:first-child { border-top: 0; }
.hot-row .hot-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.hot-row .hot-t i { font-style: normal; font-size: 12px; color: var(--ink-3, var(--ink-2)); }
.hot-row b { font-size: 15px; color: var(--ink-2); }
.hot-row b small { font-size: 11.5px; font-weight: 400; color: var(--ink-3, var(--ink-2)); }
@media (max-width: 600px) {
  .zstats { flex-wrap: nowrap; justify-content: space-between; gap: 10px; }
  .zstats .zs b { font-size: 26px; white-space: nowrap; }
  .zstats .zs span { white-space: nowrap; }
}
.zstats { margin-top: 12px; }
.hot-row .task-no { min-width: 36px; justify-content: center; text-align: center; }

/* ===== ТИХИЙ РЕЖИМ ЗАНЯТИЯ (2026-10-11) =====
   Не «пусто кроме задания», а приглушённо: всё на месте, но взгляд падает на задание.
   • логотип и верхняя полоска приглушены; пока вводите ответ — уходят почти в ноль;
   • полоска прогресса тоньше, счётчик тише; тема задания не показывается — только номер;
   • пояснение («разминка…») само тает через несколько секунд; фон спокойнее */
html[data-ui='zen'] body:has(main.zen-sess) .zh-word { opacity: .38; transition: opacity .5s ease; }
html[data-ui='zen'] body:has(main.zen-sess) .zh-word:hover { opacity: 1; }
html[data-ui='zen'] main.zen-sess .session-top { transition: opacity .5s ease; }
html[data-ui='zen'] main.zen-sess .session-top .bar { height: 3px; border: 0; }
html[data-ui='zen'] main.zen-sess .session-top .tiny { opacity: .55; }
html[data-ui='zen'] main.zen-sess .task-top .tag { display: none; }
/* приглушаем, когда человек начал печатать (поле в фокусе само по себе ещё ничего не значит) */
html[data-ui='zen'] body:has(main.zen-sess :is(#ans, textarea):focus:not(:placeholder-shown)) .zh-word { opacity: .08; }
html[data-ui='zen'] main.zen-sess:has(:is(#ans, textarea):focus:not(:placeholder-shown)) .session-top { opacity: .22; }
html[data-ui='zen'] main.zen-sess .session-note:not(:has(a)) { animation: sessNote 6s ease forwards; }
@keyframes sessNote { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
html[data-ui='zen'] body:has(main.zen-sess) .zen-bg { opacity: .5; transition: opacity 1.2s ease; }
@media (prefers-reduced-motion: reduce) { html[data-ui='zen'] main.zen-sess .session-note { animation: none; } }
/* появление шапки занятия не должно «держать» непрозрачность после анимации — иначе она не приглушается */
html[data-ui='zen'] main.zen-sess > .session-top { animation-fill-mode: backwards; }
