/* Стили статей блога — выборка из css/styles.css (tools/stili_statej.mjs). Не править руками. */
:root {
  --bg: #0e1030;
  --surface: #1b1e42;
  --surface-2: #2a2e54;
  --face: #3b4066;
  --border: #2e3360;
  --text: #f2f3fa;
  --muted: #a6adcd;
  --primary: #7b86ff;
  --on-primary: #0e1030;   /* текст на кнопках основного цвета: 5.9:1 */
  --primary-dark: #5c68ee;
  --primary-soft: #262b57;
  --lavender: #b9b6ff;
  --green: #37d18e;
  --green-soft: #16342a;
  --red: #ff5f61;
  --red-soft: #3a1b25;
  --amber: #f5a623;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 34px rgba(0, 0, 0, 0.45);
  --radius: 14px;

  /* производные, чтобы обе темы жили на одних правилах */
  --hover: #353a68;
  --hover-border: #4b5187;
  --face-text: var(--text);
  --face-sub: #d7dbf0;
  --face-divider: rgba(255, 255, 255, 0.25);
  --track-off: #4a4f7d;
  --track-on: #4255ff;
  --seg-fill: #8b93bd;
  --ok-text: #6ee7b5;
  --no-text: #ff9b9d;
  --on-green: #06301f;
  --disabled-bg: #3d4372;
  --disabled-text: #9aa1c4;
  --danger-border: #59283a;
  --badge-rus: #6fd3ff;
  --badge-eng: #f08a48;
  --badge-hsk30: #3ddc97;
  --badge-hsk20: #86a396;
  --backdrop: rgba(4, 5, 20, 0.65);
  --dot: var(--lavender);
  --dot-hover: #d8d6ff;
  --pinyin: #b9b6ff;
}
:root[data-theme='light'] {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef0f8;
  --face: #ffffff;
  --border: #e1e5f0;
  --text: #1f2333;
  --muted: #646b80;
  --primary: #4255ff;
  --on-primary: #ffffff;
  --primary-dark: #2f40e0;
  --primary-soft: #e8ebff;
  --lavender: #ddd9ff;
  --green: #12a668;
  --green-soft: #e6f7ef;
  --red: #e5484d;
  --red-soft: #fdecec;
  --amber: #cf7a1c;
  --shadow: 0 2px 8px rgba(30, 45, 80, 0.08);
  --shadow-lg: 0 12px 30px rgba(30, 45, 80, 0.16);

  --hover: #e3e7f4;
  --hover-border: #b9c1de;
  --face-text: #1f2333;
  --face-sub: #4a5163;
  --face-divider: rgba(20, 25, 50, 0.15);
  --track-off: #c3c8dc;
  --track-on: #4255ff;
  --seg-fill: #9aa2c2;
  --ok-text: #0c7a47;
  --no-text: #b3262a;
  --on-green: #ffffff;
  --disabled-bg: #c8cde0;
  --disabled-text: #7d849b;
  --danger-border: #f0c4c6;
  --badge-rus: #1a7fa8;
  --badge-eng: #e8742e;
  --badge-hsk30: #0b8250;
  --badge-hsk20: #577a69;
  --backdrop: rgba(20, 28, 55, 0.45);
  --dot: #8f8bd8;
  --dot-hover: #6f6ac4;
  --pinyin: #5a54c4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  /* Слева бургер и лого вплотную друг к другу, всё остальное — направо.
     При space-between лого уезжало на середину шапки и висело в пустоте. */
  justify-content: flex-start;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}
.logo-panda { color: #f2f3fa; }
:root[data-theme='light'] .logo-panda { color: #2b2f3a; }
.logo-ved { color: #e8742e; }
.logo-icon {
  height: 38px;
  width: 38px;
  display: block;
}
.topnav { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
}
.nav-link:hover { background: var(--bg); color: var(--text); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 16px;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.theme-toggle:hover { background: var(--hover); }
.theme-toggle svg { width: 19px; height: 19px; display: block; }
.burger-wrap { position: relative; margin-right: 6px; }
.burger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.burger-btn:hover { background: var(--hover); }
.burger-btn.is-open { background: var(--hover); border-color: var(--border); }
.burger-btn svg { width: 21px; height: 21px; display: block; }
.burger-menu { left: 0; right: auto; min-width: 250px; }
.burger-menu .create-item { text-decoration: none; }
.create-wrap { position: relative; }
.create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.create-btn:hover { background: var(--primary-dark); }
.create-btn.is-open { transform: rotate(45deg); }
.create-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  min-width: 210px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.create-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.create-item:hover { background: var(--surface-2); }
.create-item.danger { color: var(--red); }
.create-item.danger .ico { color: var(--red); }
.create-item .ico {
  display: inline-flex;
  width: 22px;
  justify-content: center;
  color: var(--muted); /* серые контурные иконки — как папки в панели слева */
  flex: none;
}
.create-item .ico svg { width: 20px; height: 20px; display: block; }
html,
body { max-width: 100%; overflow-x: clip; }
.app {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  /* Ничто внутри не должно раздвигать страницу шире экрана: на телефоне
     одна широкая сетка растягивала весь viewport, и полноэкранные
     карточки вместе с крестиком уезжали за правый край. */
  overflow-x: hidden;
  overflow-x: clip;
}
main#app { min-height: 100vh; }
@media (min-width: 1600px) {
.app { max-width: 1200px; }
}
.tabbar { display: none; }
@media (max-width: 900px) {
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    /* Не к низу страницы, а к низу видимой части: в Safari низ страницы
       уходит под панель браузера, и подписи оказывались наполовину скрыты. */
    bottom: var(--vv-b, 0px);
    z-index: 58;
    display: flex;
    background: var(--surface);
    border-top: 1px solid var(--border);
    /* Вырез под кнопку «домой» у айфона: без этого подписи лезут под неё */
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 4px 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    /* «Создать» — кнопка, а не ссылка; выглядеть должна так же */
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
  }
.tabbar-item.is-on { color: var(--primary); }
.tabbar-item > span:last-child { white-space: nowrap; }
@media (max-width: 420px) {
.tabbar-item { font-size: 10px; padding-left: 2px; padding-right: 2px; }
}
.tabbar-ico { display: block; line-height: 0; }
.tabbar-ico svg { width: 24px; height: 24px; display: block; }
body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 760px) and (max-width: 900px) {
.tabbar { left: 72px; }
}
@media (min-width: 760px) {
body { padding-left: 72px; }
}
.footer {
  color: var(--muted);
  font-size: 13px;
  padding: 34px 22px 26px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* 4 колонки на русском, 3 на английском */
  gap: 20px 30px;
  align-items: start;
}
.footer-name { grid-column: 1 / -1; font-size: 16px; font-weight: 700; color: var(--text); }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2px;
}
.footer-col a { color: var(--muted); text-decoration: none; padding: 4px 0; line-height: 1.3; }
.footer-col a:hover { color: var(--text); }
.footer-tail a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-tail a:hover { color: var(--primary); }
.footer-tail {
  max-width: 1080px;
  margin: 26px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}
.footer-legal { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) {
.footer-grid { gap: 20px 24px; }
}
@media (max-width: 620px) {
.footer { padding: 24px 18px 20px; font-size: 12.5px; }
.footer-grid { grid-template-columns: 1fr 1fr; gap: 18px 18px; }
.footer-col { gap: 6px; }
.footer-name { font-size: 15px; }
.footer-tail { margin-top: 18px; padding-top: 12px; }
.footer-col:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 18px;
  }
.footer-col:last-child .footer-head { grid-column: 1 / -1; }
}
h1 { font-size: 28px; margin: 0 0 4px; }
h2 { font-size: 20px; margin: 28px 0 14px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  /* Кнопкой бывает и <a>: без этой строки браузер подчеркнёт её, и в одном
     ряду с настоящей <button> она выглядит иначе. */
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-text); cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
input[type='checkbox'] { accent-color: var(--primary); width: 18px; height: 18px; }
input[type='number'] {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--surface-2);
  color: var(--text);
}
input[type='text'],
input[type='number'],
input[type='password'],
textarea,
select {
  font: inherit;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  background: var(--surface);
  color: var(--text);
}
input[type='text']:focus,
input[type='password']:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
textarea { resize: vertical; min-height: 80px; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.folder-ico {
  display: inline-flex;
  align-items: center;
  flex: none;
  color: var(--primary);
  opacity: 0.85;
}
.folder-ico svg { width: 16px; height: 16px; display: block; }
.lang-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid currentColor;
  white-space: nowrap; /* «HSK 3.0» в узкой строке не должен ломаться пополам */
}
.lang-badge.ch-rus { color: var(--badge-rus); }
.lang-badge.ch-eng { color: var(--badge-eng); }
.lang-badge.hsk-30 {
  color: var(--on-green);
  background: var(--badge-hsk30);
  border-color: var(--badge-hsk30);
}
.lang-badge.hsk-20 { color: var(--badge-hsk20); }
.pinyin { color: var(--text); font-size: 15px; font-weight: 500; letter-spacing: 0.2px; margin-top: 4px; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.bookmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.bookmark svg { width: 18px; height: 18px; display: block; fill: none; }
.bookmark:hover { color: var(--text); border-color: var(--hover-border); }
.bookmark.is-on { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.bookmark.is-on svg { fill: currentColor; }
.ico-svg { display: inline-flex; flex: none; }
.ico-svg svg { width: 18px; height: 18px; display: block; }
button svg,
a svg { width: 1em; height: 1em; display: block; }
.fc-overlay {
  position: fixed;
  left: var(--vv-l, 0px);
  top: var(--vv-t, 0px);
  width: var(--vv-w, 100%);
  height: var(--vv-h, 100dvh);
  /* Пинч двумя пальцами внутри занятия — это почти всегда случайность */
  touch-action: pan-y;
  z-index: 90;
  background: var(--bg);
  padding: 18px 24px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  overflow: auto;
}
.mq { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 720px) {
.mq { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
.topnav .nav-link { display: none; }
}
@media (max-width: 620px) {
.topbar { padding: 10px 14px; gap: 8px; }
.logo { font-size: 17px; gap: 6px; }
.logo-icon { width: 30px; height: 30px; }
.topnav { gap: 4px; }
.nav-link { padding: 6px 8px; font-size: 13px; }
.theme-toggle { width: 32px; height: 32px; }
.theme-toggle svg { width: 17px; height: 17px; }
.create-btn { width: 36px; height: 36px; font-size: 20px; }
}
@media (max-width: 620px) {
.fc-overlay { padding: 10px 10px calc(14px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
h1 { font-size: 24px; }
.app { padding: 20px 16px 48px; }
.fc-overlay { padding: 14px 14px calc(16px + env(safe-area-inset-bottom, 0px)); }
}
.account-wrap { position: relative; }
.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
  transition: background 0.15s;
}
.account-btn:hover { background: var(--hover); }
.account-btn.is-guest { background: var(--surface-2); color: var(--muted); }
.account-btn svg { width: 19px; height: 19px; display: block; }
@media (max-width: 620px) {
.account-btn { width: 32px; height: 32px; }
.account-btn svg { width: 17px; height: 17px; }
}
.account-menu { min-width: 240px; }
.account-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.account-head .muted { font-size: 13px; }
.cmp-wrap { overflow-x: auto; margin: 4px 0 10px; -webkit-overflow-scrolling: touch; }
.cmp {
  width: 100%;
  min-width: 380px;
  border-collapse: collapse;
  font-size: 15px;
}
.cmp th,
.cmp td { padding: 11px 14px; text-align: center; }
.cmp thead th { vertical-align: bottom; padding-bottom: 14px; }
.cmp tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.cmp tbody tr + tr th,
.cmp tbody tr + tr td { border-top: 1px solid var(--border); }
@media (max-width: 470px) {
.cmp { min-width: 0; font-size: 14px; }
.cmp th,
.cmp td { padding: 10px 6px; }
}
.cmp.cmp-perenos tbody th { white-space: normal; }
.crumbs ol {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs li + li::before { content: '›'; margin: 0 7px; color: var(--muted); opacity: 0.7; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }
@media (max-width: 900px) {
.crumbs ol {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-right: -16px;
    padding-right: 16px;
  }
.crumbs ol::-webkit-scrollbar { display: none; }
.crumbs li { flex: none; }
}
.blog-cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.blog-plashka {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--text);
  font-size: 15px;
}
.blog-plashka a { color: var(--primary); font-weight: 600; white-space: nowrap; }
.blog-date { font-size: 13px; margin: 0 0 10px; }
.blog-list { display: flex; flex-direction: column; gap: 22px; margin-top: 22px; }
.blog-item h2 { margin: 2px 0 6px; font-size: 19px; }
.blog-item h2 a { color: var(--text); text-decoration: none; }
.blog-item h2 a:hover { color: var(--primary); }
.blog-item p { margin: 0; color: var(--muted); line-height: 1.55; }
.blog-item .blog-date { margin: 0; }
.st-fig { margin: 16px 0 18px; }
.st-fig svg { display: block; width: 100%; height: auto; max-width: 720px; margin: 0 auto; font-family: inherit; }
.st-shot img {
  display: block; max-width: 100%; height: auto; margin: 0 auto;
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.st-fig figcaption { margin-top: 8px; }
.st-h3 { font-size: 15px; margin: 14px 0 6px; }
.st-keys th[scope="row"],
.st-keys td:last-child { font-size: 18px; letter-spacing: 2px; }
.faq { display: grid; gap: 8px; margin: 0; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  transition: border-color 0.15s, background 0.15s;
}
.faq-item[open] { border-color: var(--primary); }
.faq-item > summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: '+';
  margin-left: auto;
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--primary);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.18s, background 0.15s;
}
.faq-item[open] > summary::after { content: '−'; background: var(--primary); color: var(--on-primary); }
.faq-item > summary:hover::after { background: var(--hover); }
.faq-item[open] > summary:hover::after { background: var(--primary); }
.faq-answer { padding: 0 0 16px; line-height: 1.6; color: var(--text); }
.faq-answer p { margin: 0 0 8px; }
.faq-answer p:last-child { margin-bottom: 0; }
.st-anim { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 14px 0 4px; }
.st-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.st-cell > div:first-child {
  width: 120px; height: 120px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.st-cell svg { display: block; }
.st-cap { font-size: 20px; color: var(--muted); }
.st-anim-rules .st-cell > div:first-child { width: 88px; height: 88px; }
.st-anim-rules .st-cap { font-size: 16px; }
.doc .cmp th,
.doc .cmp td { text-align: left; }
.doc .cmp thead th { font-size: 13px; }
.voc-levels { display: flex; flex-wrap: wrap; gap: 6px 10px; font-weight: 600; line-height: 1.6; }
.voc-levels a { color: var(--primary); text-decoration: none; }
.voc-levels a:hover { text-decoration: underline; }
.voc-note { margin: 0 0 12px; font-size: 13px; line-height: 1.6; }
.doc { max-width: 720px; }
.doc h1 { font-size: 28px; margin: 0 0 6px; }
.doc-block { margin-top: 26px; }
.doc-block h2 { font-size: 17px; margin: 0 0 8px; }
.doc-block p { margin: 0 0 8px; line-height: 1.6; color: var(--text); }
.doc a:not(.btn):not(.lang-badge) { color: var(--primary); }
.about-lead { font-size: 15px; line-height: 1.6; }
.about-caption { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 8px 0 4px; text-align: center; }
.doc-list { margin: 4px 0 8px; padding-left: 22px; }
.doc-list li { margin-bottom: 6px; line-height: 1.6; color: var(--text); }
.doc-list li::marker { color: var(--muted); }
:root {
  --tone1: #ff5a52;   /* ā — красный */
  --tone2: #35c46a;   /* á — зелёный */
  --tone3: #5b8cff;   /* ǎ — синий */
  --tone4: #c96bff;   /* à — фиолетовый */
  --tone5: #a6adcd;   /* нейтральный — серый */
}
:root[data-theme='light'] {
  --tone1: #e02020;
  --tone2: #00a03e;
  --tone3: #1a5fe0;
  --tone4: #9b30c9;
  --tone5: #8a90a6;
}
.tone1 { color: var(--tone1); }
.tone2 { color: var(--tone2); }
.tone3 { color: var(--tone3); }
.tone4 { color: var(--tone4); }
.tone5 { color: var(--tone5); }
.ia { display: none; margin: 16px 0 20px; padding: 16px 18px; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface); }
.ia.is-ready { display: block; }
.ia-title { margin: 0 0 10px; font-weight: 700; font-size: 16px; }
.ia-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ia-chip.is-on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.ia-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.ia-input { width: 100%; max-width: 360px; padding: 10px 12px; font-size: 18px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg); color: var(--text); }
.ia-out { margin-top: 8px; }
.ia-big { font-size: 30px; line-height: 1.3; margin: 6px 0; font-weight: 600; word-break: break-all; }
.ia-read { margin: 0 0 10px; font-size: 18px; color: var(--pinyin, var(--muted)); }
.ia-rules { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.ia-bad { color: var(--muted); text-decoration: line-through; }
.ia-tones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.ia-tone { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text);
  cursor: pointer; font: inherit; }
.ia-tone:hover:not(:disabled) { border-color: var(--primary); }
.ia-tone:disabled { cursor: default; opacity: .6; }
.ia-tone-n { font-size: 12px; color: var(--muted); }
.ia-tone-p { font-size: 18px; font-weight: 700; }
.ia-tone-z { font-size: 34px; line-height: 1.2; }
.ia-tone-r { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.25; }
@media (max-width: 520px) {
.ia-tones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ia-py-now { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.ia-py-now b { color: var(--text); font-size: 18px; }
.ia-py-wrap { margin-top: 14px; max-height: 70vh; overflow: auto; border: 1px solid var(--border);
  border-radius: 12px; background: var(--bg); -webkit-overflow-scrolling: touch; }
.ia-py-wrap:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ia-py { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.ia-py th,
.ia-py td { padding: 2px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.ia-py thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 6px 4px;
  color: var(--muted); font-weight: 600; }
.ia-py-ini { position: sticky; left: 0; z-index: 1; background: var(--surface); padding: 0 8px;
  color: var(--muted); font-weight: 700; border-right: 1px solid var(--border); }
.ia-py thead .ia-py-corner { left: 0; z-index: 3; }
.ia-py .ia-py-gr { border-left: 2px solid var(--border); }
.ia-py-cell { min-width: 44px; min-height: 32px; padding: 4px 6px; border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--text); font: inherit; cursor: pointer; }
.ia-py-cell:hover { border-color: var(--primary); }
.ia-py-cell.is-on { background: var(--primary); color: var(--on-primary); }
.ia-mini-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 190px; margin: 6px 0 10px; padding: 18px; border: 1px solid var(--border);
  border-radius: 16px; background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.ia-mini-card:hover { border-color: var(--primary); }
.ia-mini-card .ia-zh { font-size: 64px; line-height: 1.1; }
.ia-mini-card.is-long .ia-zh { font-size: 44px; }
.ia-mini-card.is-xlong .ia-zh { font-size: 32px; }
.ia-mini-back { display: none; flex-direction: column; align-items: center; gap: 2px; }
.ia-mini-card.is-flipped .ia-mini-back { display: flex; }
.ia-mini-card.is-flipped .ia-mini-hint { display: none; }
.ia-mini-p { font-size: 22px; font-weight: 700; color: var(--pinyin, var(--primary)); }
.ia-mini-r { font-size: 17px; }
.ia-mini-hint { font-size: 13px; color: var(--muted); }
.ia-mini-btns .btn { flex: 1 1 0; }
.ia-mini-btns[hidden] { display: none; }
.ia-ear .ia-ear-play { margin: 6px 0 4px; }
.ia-ear-res { margin: 10px 0 8px; font-size: 17px; }
.ia-ear-res span[lang] { font-size: 26px; margin: 0 4px; }
.ia-ear-res.is-ok { color: var(--ok-text); }
.ia-ear-res.is-no { color: var(--no-text); }
.ia-phrases { display: grid; gap: 8px; margin-top: 10px; }
.ia-phrase { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px;
  align-items: baseline; text-align: left; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.ia-phrase:hover { border-color: var(--primary); }
.ia-phrase .ia-zh { grid-row: 1 / span 2; font-size: 28px; }
.ia-phrase-p { font-weight: 700; color: var(--primary); }
.ia-phrase-r { color: var(--muted); font-size: 14px; }
.ia.is-hidden .ia-phrase:not(.is-open) .ia-phrase-r { visibility: hidden; }
.ia-q { font-size: 18px; margin: 4px 0 10px; }
.ia-q .ia-zh { font-size: 30px; }
.ia-count { font-size: 13px; margin: 0; }
.ia-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ia-answer { padding: 10px; font-size: 15px; white-space: normal; }
.ia-answer.is-ok { background: var(--green-soft); border-color: var(--green); color: var(--text); }
.ia-answer.is-no { background: var(--red-soft); border-color: var(--red); color: var(--text); }
.ia-next { margin-top: 10px; }
@media (max-width: 420px) {
.ia-answers { grid-template-columns: 1fr; }
}
.footer-soc { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: -8px; }
.footer-soc-head { font-size: 12px; color: var(--muted); margin-right: 2px; }
.soc-link { display: inline-flex; width: 22px; height: 22px; color: var(--muted); border-radius: 6px; }
.soc-link svg { width: 100%; height: 100%; display: block; }
.soc-link:hover,
.soc-link:focus-visible { color: var(--primary); }
.demo-video { display: flex; align-items: center; gap: 16px; margin: 14px 0 18px; }
.demo-video video { width: 150px; height: auto; flex: none; border-radius: 18px; border: 1px solid var(--border);
  background: var(--surface-2); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); }
.demo-video figcaption { font-size: 15px; line-height: 1.5; color: var(--muted); }
.demo-video figcaption b { color: var(--text); }
@media (max-width: 520px) {
.demo-video { gap: 12px; }
.demo-video video { width: 118px; border-radius: 14px; }
.demo-video figcaption { font-size: 14px; }
}
.demo-video-big video { width: 240px; }
@media (max-width: 520px) {
.demo-video-big { flex-direction: column; align-items: flex-start; }
.demo-video-big video { width: 220px; }
}
.demo-video-wide { margin: 18px 0 22px; }
.demo-video-wide video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); }
.demo-video-wide figcaption { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.demo-video-wide figcaption b { color: var(--text); }
@media (max-width: 520px) {
.demo-video-wide figcaption { font-size: 14px; }
}
.blog-niz {
  position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: blog-niz-in .25s ease-out;
}
.blog-niz[hidden] { display: none; }
.blog-niz-text { flex: 1; min-width: 0; line-height: 1.3; }
.blog-niz-text b { display: block; font-size: 15px; color: var(--text); }
.blog-niz-text span { display: block; font-size: 13px; color: var(--muted); }
.blog-niz .btn { flex: none; padding: 9px 14px; }
.blog-niz-x {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
body.has-niz { padding-bottom: 150px; }
@keyframes blog-niz-in { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
.blog-niz { animation: none; }
}
@media (min-width: 769px) {
.blog-niz { display: none !important; }
}
.blog-poprobuj { display: flex; align-items: center; gap: 16px; margin: 26px 0 8px; padding: 18px 20px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--border); }
.blog-poprobuj-text { flex: 1; }
.blog-poprobuj-text b { display: block; font-size: 17px; margin-bottom: 4px; color: var(--text); }
.blog-poprobuj-text span { font-size: 15px; color: var(--muted); }
.blog-poprobuj .btn { flex: none; white-space: nowrap; }
@media (max-width: 520px) {
.blog-poprobuj { flex-direction: column; align-items: stretch; }
}
.cv-tab .cv-sw { display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px;
  border-radius: 4px; border: 1px solid var(--border); }
.cv-tab .cv-zh { font-size: 18px; }
.cmp.zh-big td { font-size: 22px; line-height: 1.3; }
.cmp.zh-first tbody th { font-size: 26px; font-weight: 400; }
.blog-seredina { display: flex; align-items: center; gap: 12px; margin: 22px 0; padding: 12px 16px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border); }
.blog-seredina span { flex: 1; font-size: 15px; color: var(--muted); line-height: 1.4; }
.blog-seredina .btn { flex: none; white-space: nowrap; }
@media (max-width: 520px) {
.blog-seredina { flex-direction: column; align-items: stretch; }
.blog-seredina .btn { text-align: center; }
}
.ia-dalshe { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 15px; font-weight: 600; }
.blog-korotko { margin: 18px 0 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.blog-korotko > b { display: block; margin-bottom: 8px; font-size: 15px; }
.blog-korotko ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; }
.blog-korotko li { white-space: nowrap; font-size: 15px; }
.bk-n { display: inline-block; min-width: 2.2em; color: var(--muted); font-variant-numeric: tabular-nums; }
.bk-z { font-size: 19px; }
.bk-p { color: var(--muted); }
.blog-korotko p { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
@media (max-width: 420px) {
.blog-korotko ul { grid-template-columns: 1fr 1fr; }
.blog-korotko li { font-size: 14px; }
.blog-korotko li.bk-wide { grid-column: 1 / -1; }
}
html.pechataet .tabbar,
html.pechataet .blog-niz { display: none !important; }
html.pechataet body { padding-bottom: 0; }
@media (max-width: 480px) {
.cmp.cv-tab th,
.cmp.cv-tab td { padding: 9px 5px; font-size: 14px; }
.cmp.cv-tab .cv-zh { font-size: 17px; }
.cmp.cv-tab .cv-sw { width: 14px; height: 14px; margin-right: 5px; }
.cmp.cv-tab tbody th { text-align: left; white-space: normal; }
}
@media (max-width: 600px) {
.app:has(> .auth-page) { padding-top: 8px; }
}
