/* Контраст C — Strong Editorial (решение Человека, PDA-3): тёмная колонка
   навигации, светлая рабочая зона, выбранное залито тушью, сильнее
   иерархия текста. Без яркого цвета. */
:root {
  --paper: #F6F3EE; --surface: #FFFFFF; --wash: #E9E2D6; --ink: #0D0A07; --muted: #4D453D; --accent: #8A4826;
  --hair: rgba(36,28,20,0.30); --hair2: rgba(36,28,20,0.16);
  --done: #22643E; --done-bg: #E4EFE7; --active: #955B00; --active-bg: #F6ECD6; --wait: #2C4D84; --wait-bg: #E4EAF2; --ret: #A62B1D; --ret-bg: #F5E1DD; --none: #6B6259; --none-bg: #EFE9E0;
  --serif: Literata, Georgia, 'Times New Roman', serif; --sans: 'Golos Text', system-ui, -apple-system, sans-serif;
  --sidebar: 216px;
  --text2: #211C17; --accent-ink: #632F15; --accent-wash: rgba(138,72,38,0.10);
  /* Тёмная колонка и всё, что залито тушью: светлый текст, вторичный, янтарный акцент. */
  --side-bg: #1E1A15; --side-text: #EEE7DC; --side-muted: #ADA295;
  --on-ink: #FBF8F3; --on-ink-2: #CFC5B8; --on-ink-acc: #E3B48C;
  /* Подложка переключателей и рамки элементов первого уровня. */
  --seg-bg: #E2D9CB; --ctl-border: rgba(36,28,20,0.32); --ctl-border-strong: rgba(36,28,20,0.45);
  /* Вторая строка отбора: светлая полоса под первым уровнем. */
  --ctx-bg: #E4DCCF;
  --page-max: 1240px; --gutter: 28px; --lib-cols: 3;
  /* Тёмная тема (19.11.2026) переопределяет только эти токены. Ниже —
     прежние точечные цвета, вынесенные в токены без изменения вида. */
  color-scheme: light;
  --shadow-rgb: 31,27,22; --scrim: rgba(31,27,22,0.32);
  --nav-hover: rgba(243,238,230,0.7); --sep-c: rgba(107,98,89,0.5); --on-ink-hover: rgba(255,255,255,0.14);
  --hl: #F1DDB6; --machine: #5B4A8B; --mark-ai-bg: #F1DEC9; --mark-ch-line: #6F8DBE;
  --card-line: rgba(36,28,20,0.18); --track-line: rgba(36,28,20,0.10);
  --glass: rgba(255,255,255,0.55); --glass-strong: rgba(255,255,255,0.92);
  --ph-a: #EEE6D9; --ph-b: #E2D8C8; --ph-text: #5E5448;
  --side-nav: #DDD5C9; --side-strong: #FFFFFF;
}
/* Тёмная тема: data-theme ставит js/theme-boot.js до первой отрисовки —
   по системе («Как в системе») или по выбору в меню «Данные». Те же оттенки
   состояний, только светлее на тёмном. Обложки, превью публикации (.app-*),
   холст конструктора и фотографии свои цвета не берут отсюда. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1E1B17; --surface: #26221D; --wash: #352E27; --ink: #E3DBCF; --muted: #ABA092; --accent: #D9966F;
  --hair: rgba(239,232,221,0.24); --hair2: rgba(239,232,221,0.12);
  --done: #7DBF93; --done-bg: #223529; --active: #DDA757; --active-bg: #3D3019; --wait: #9DB5DF; --wait-bg: #232E3F; --ret: #E89A8F; --ret-bg: #42261F; --none: #A89D90; --none-bg: #302A23;
  --text2: #D3CABD; --accent-ink: #E6B392; --accent-wash: rgba(224,154,114,0.14);
  --side-bg: #161411; --side-text: #DCD4C8; --side-muted: #A89D90; --side-nav: #CEC5B8; --side-strong: #E6DED2;
  /* Выбранное залито тушью: на тёмном туш светлая, текст на ней тёмный. */
  --on-ink: #1E1B17; --on-ink-2: #4D453D; --on-ink-acc: #8A4826; --on-ink-hover: rgba(0,0,0,0.10);
  --seg-bg: #322B24; --ctl-border: rgba(239,232,221,0.30); --ctl-border-strong: rgba(239,232,221,0.42);
  --ctx-bg: #2B2620;
  --shadow-rgb: 0,0,0; --scrim: rgba(0,0,0,0.6);
  --nav-hover: rgba(255,255,255,0.06); --sep-c: rgba(181,170,155,0.5);
  --hl: #3D301B; --machine: #B9A9EC; --mark-ai-bg: #47311F; --mark-ch-line: #9AB8EA;
  --card-line: rgba(239,232,221,0.14); --track-line: rgba(239,232,221,0.14);
  --glass: rgba(255,255,255,0.03); --glass-strong: rgba(38,34,29,0.92);
  --ph-a: #352E27; --ph-b: #2C2620; --ph-text: #ABA092;
}
/* Колонка навигации тёмная в обеих темах: её текст на туши остаётся светлым. */
:root[data-theme="dark"] .sidebar { --on-ink: #E6DED2; --on-ink-acc: #DDB08A; }
/* Дорожки ползунков конструктора (это панель, не холст обложки). */
:root[data-theme="dark"] .cc { --cc-track: rgba(239,232,221,0.22); }
/* Тень на тёмном не видна: край окна — тонкой линией. */
:root[data-theme="dark"] .modal { box-shadow: 0 0 0 1px var(--hair), 0 24px 60px rgba(0,0,0,0.5); }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--accent-ink); }
button { font: inherit; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.hidden, [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Каркас */
.app { display: flex; min-height: 100vh; }
/* Колонка навигации тёмная, рабочая зона светлая. Всё в колонке читается
   на тёмном: подписи — светлым тёплым серым, знак — на светлом кольце. */
.sidebar { width: var(--sidebar); flex-shrink: 0; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border-right: 0; background: var(--side-bg); color: var(--side-text); }
.sidebar :focus-visible { outline-color: var(--on-ink-acc); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand img { width: 34px; height: 34px; display: block; }
.sidebar .brand img { border-radius: 9px; box-shadow: 0 0 0 1.5px rgba(251,248,243,0.85); }
.brand .name { font-family: var(--serif); font-weight: 600; font-size: 14.5px; line-height: 1.1; color: var(--on-ink); }
.brand .sub { font-size: 10.5px; color: #C9BBA9; letter-spacing: 0.05em; text-transform: uppercase; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
/* Меню стоит на месте при любой прокрутке страницы (решение владельца 19.11,
   п.5): если окно низкое, прокручиваются только пункты, низ меню виден всегда. */
.sidebar .nav { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.side-row { display: flex; align-items: center; gap: 4px; }
.side-row .side-shut-btn { flex: 1; min-width: 0; }
.theme-sw { display: inline-flex; flex-shrink: 0; gap: 2px; padding: 2px; border-radius: 8px; }
.sidebar .theme-sw { background: rgba(255,255,255,0.06); }
.theme-sw button { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--side-muted); cursor: pointer; }
.theme-sw button:hover { color: var(--side-strong); }
.theme-sw button[aria-checked=true] { background: rgba(255,255,255,0.14); color: var(--side-strong); }
.mobile-nav .theme-sw { display: none; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 6px; color: var(--ink); }
.nav-item:hover { background: var(--nav-hover); color: var(--ink); }
.nav-item.on { background: var(--wash); font-weight: 600; }
.sidebar .nav-item { color: var(--side-nav); }
.sidebar .nav-item:hover { background: rgba(255,255,255,0.06); color: var(--side-strong); }
.sidebar .nav-item.on { background: rgba(255,255,255,0.10); color: var(--side-strong); font-weight: 600; box-shadow: inset 3px 0 0 #C98A5E; }
.nav-item.later { color: var(--muted); opacity: 0.7; cursor: default; }
.nav-sect { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; padding: 18px 10px 6px; }
.demo-tag { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 6px; border-radius: 4px; border: 1px solid var(--on-ink-acc); color: var(--on-ink-acc); letter-spacing: 0.04em; vertical-align: 1px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 14px; }
.storage-note { display: flex; gap: 8px; font-size: 12px; color: #BDB2A4; line-height: 1.45; padding: 12px 10px 6px; border-top: 1px solid rgba(255,255,255,0.10); }
.storage-note .ic { flex-shrink: 0; margin-top: 2px; }
.side-data { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--side-text); cursor: pointer; text-align: left; }
.side-data:hover { background: rgba(255,255,255,0.06); }
.side-data .chev { margin-left: auto; color: var(--side-muted); }
.sidebar .user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; color: var(--side-text); width: 100%; }
.sidebar .user:hover { background: rgba(255,255,255,0.06); }
.user .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; } .user .nm { font-weight: 500; } .user .rl { font-size: 12px; color: var(--side-muted); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--wash); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; border: 0; color: var(--ink); }
.sidebar .avatar { background: rgba(255,255,255,0.12); color: var(--side-strong); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-bottom: var(--dock-h, 44px); overflow-x: clip; }
.view { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.demo-line { display: flex; align-items: center; gap: 8px; padding: 7px var(--gutter); background: var(--accent-wash); border-bottom: 1px solid var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 500; }
.main-note { display: none; align-items: flex-start; gap: 6px; padding: 6px var(--gutter); border-bottom: 1px solid var(--hair2); font-size: 12px; line-height: 1.45; color: var(--muted); }
.main-note .ic { flex-shrink: 0; margin-top: 2px; }
.topbar { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 28px; border-bottom: 1px solid var(--hair); background: var(--surface); flex-wrap: wrap; }
/* Шапка раздела и строка отбора стоят на месте при прокрутке (решение
   владельца 19.11, п.5): поиск и фильтры всегда под рукой. Высоты шапки и
   полосы телефона меряет main.js (--head-h, --nav-h). Фон строки отбора
   доходит до краёв колонки тенью, обрезанной по бокам .main. */
.topbar { position: sticky; top: var(--nav-h, 0px); z-index: 25; }
.lib .content > .ltools, .mat .content > .ltools, .bk .content > .lsticky, .tk .content > .tk-seg { position: sticky; top: calc(var(--nav-h, 0px) + var(--head-h, 0px)); z-index: 24; background: var(--paper); box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(-12px -100vmax -10px -100vmax); }
.topbar .title { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1 1 240px; flex-wrap: wrap; }
.topbar .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; margin-left: auto; }
.topbar h1 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.crumb { color: var(--text2); }
.topbar .sp { flex: 1; }
.search { display: flex; align-items: center; gap: 8px; height: 32px; width: 340px; max-width: 100%; padding: 0 10px; border-radius: 6px; border: 1px solid var(--hair); background: var(--surface); color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; flex: 1; min-width: 0; color: var(--ink); }
.content { padding: 18px 28px 28px; display: flex; flex-direction: column; gap: 14px; }

/* Кнопки, чипы, поля */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px; font-weight: 500; font-size: 13px; cursor: pointer; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); white-space: nowrap; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-accent { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-icon { padding: 0; width: 32px; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.input { height: 32px; border-radius: 6px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); font: inherit; padding: 0 10px; width: 100%; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; font-family: var(--serif); font-size: 15px; }
.input:disabled { background: var(--wash); border-color: transparent; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 11px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .span2 { grid-column: span 2; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--wash); flex-wrap: wrap; }
.seg-item { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.seg-item.on { background: var(--ink); color: var(--paper); }
.seg-item .n { color: var(--muted); font-variant-numeric: tabular-nums; } .seg-item.on .n { color: var(--paper); opacity: 0.8; }
.seg-form { width: 100%; } .seg-form .seg-item { flex: 1; justify-content: center; } .seg-form input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; } .checkbox input { margin-top: 3px; }
/* Задержка — нейтрально: порогов и сроков команда не утверждала. */
.delay { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Библиотека */

/* Книга и материалы */
.cards { display: flex; flex-direction: column; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid var(--hair); }
.dot.done { background: var(--done); border-color: var(--done); } .dot.active { background: var(--active); border-color: var(--active); } .dot.wait { background: var(--wait); border-color: var(--wait); } .dot.ret { background: var(--ret); border-color: var(--ret); } .dot.pub { background: var(--accent); border-color: var(--accent); }
.linkbtn { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 500; background: transparent; border: 0; cursor: pointer; padding: 0; font: inherit; }
.linkbtn.done { color: var(--done); }

/* Редактор */
.editor { display: flex; min-height: 0; }
.editor-main { flex: 1; min-width: 0; padding: 18px 24px 28px 28px; display: flex; flex-direction: column; gap: 16px; }
.editor-rail { width: 272px; flex-shrink: 0; border-left: 1px solid var(--hair2); background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.rail-title { font-weight: 600; margin-bottom: 4px; }
.hist { display: flex; flex-direction: column; gap: 8px; }
.hist div { display: flex; gap: 10px; font-size: 12px; line-height: 1.3; } .hist .t { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; width: 62px; flex-shrink: 0; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--wash); font-size: 12px; color: var(--muted); }

/* Календарь */

/* Календарь — слой публикаций: плановое и вышедшее спокойно, без цветных
   плашек и цветов серьёзности. Два вида одних данных: нижняя панель на
   экранах разделов (свёрнута — одна строка, раскрыта — неделя) и полная
   страница #/calendar. */
.caldock { position: fixed; left: var(--sidebar); right: 0; bottom: 0; z-index: 30; display: flex; flex-direction: column; max-height: 340px; background: var(--surface); border-top: 1.5px solid var(--ink); }
.caldock[hidden] { display: none !important; }
.calhead { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; flex-shrink: 0; }
.caltoggle { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; font: inherit; color: var(--ink); cursor: pointer; white-space: nowrap; }
.caltoggle b { font-weight: 700; }
.caltoggle .range { color: var(--muted); }
.calsum { font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.calhead .sp { flex: 1; }
.weeknav { display: flex; align-items: center; gap: 2px; }
.calgo { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.calgo:hover { color: var(--accent-ink); }
.calhint { margin: 0; padding: 6px 16px 8px; font-size: 12px; line-height: 1.4; color: var(--text2); border-top: 1px solid var(--hair2); }
.caldays { display: flex; flex: 1; min-height: 168px; overflow: auto; border-top: 1px solid var(--hair2); }
.calday { position: relative; flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-left: 1px solid var(--hair2); }
.calday:first-child { border-left: 0; }
.calday .dh { display: flex; align-items: baseline; gap: 5px; font-size: 12px; color: var(--muted); }
.calday .dh b { font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--ink); }
/* Прошедшие дни тише; сегодня залито тушью, как выбранное. */
.calday.past .dh b, .calday.past .dh .wd { color: var(--muted); }
.calday.today .dh b { background: var(--ink); color: var(--paper); border-radius: 5px; padding: 1px 6px; }
.calday.today .dh .wd { color: var(--ink); font-weight: 600; }
.calday .dh .td { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--ink); }
.calday.over { background: var(--accent-wash); outline: 1px dashed var(--accent); outline-offset: -4px; }
.calday.over::after { content: attr(data-drop-label); position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px; border-radius: 6px; background: var(--surface); color: var(--accent); font-size: 12px; text-align: center; box-shadow: 0 1px 2px rgba(var(--shadow-rgb),0.12); }
/* Карточка одна и та же в панели, на странице и в лотке. Подпись состояния
   («план прошёл · не готово») переносится на свою строку, а не вылезает за
   рамку: колонка страницы ~130px. Кнопка меню — в правом нижнем углу, у
   строки книги, которая и так обрезается многоточием. */
.calitem { position: relative; padding: 6px 8px; border-radius: 6px; background: var(--paper); border: 1px solid var(--hair); font-size: 12px; line-height: 1.3; cursor: grab; }
.calitem.published { cursor: default; border-left-width: 3px; }
.calitem.notready { border-style: dashed; }
.calitem.dragging { opacity: 0.4; }
.calitem .k { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 6px; font-size: 11px; color: var(--muted); }
.calitem .k .st { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; text-align: right; }
.calitem.published .k .st { color: var(--done); font-weight: 500; }
.calitem.ready .k .st { color: var(--text2); }
/* План, чья дата прошла: подпись приглушена, цвета нет — это не тревога, а факт. */
.calitem.past .k .st { color: var(--muted); font-style: italic; }
.calitem .t { margin-top: 2px; font-family: var(--serif); font-size: 13px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.calitem .b { margin-top: 1px; padding-right: 18px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calitem.published .b { padding-right: 0; }
.calmenu { position: absolute; right: 2px; bottom: 2px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.calmenu:hover { background: var(--wash); color: var(--ink); }
.caladd { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; border: 0; background: transparent; font: inherit; font-size: 12px; color: var(--text2); cursor: pointer; }
.caladd:hover, .caladd:focus-visible { color: var(--accent); }
/* Узкая колонка дня (страница на 900–1350 px) режет подпись многоточием, а не
   выпускает её в соседний день; полная подпись с датой — в aria-label. */
.caladd span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) {
  .calmenu { opacity: 0; } .calitem:hover .calmenu, .calitem:focus-within .calmenu { opacity: 1; }
  /* «+» виден слабо и без наведения — иначе пустая неделя выглядит мёртвой. */
  .caladd { opacity: 0.5; } .calday:hover .caladd, .calday:focus-within .caladd { opacity: 1; }
}

/* Страница #/calendar: неделя во всю высоту, справа мини-месяц и лоток. */
.cal { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pweeknav { display: inline-flex; gap: 6px; }
/* Рамка кнопок недели — та же, что у инструментов первого уровня (.ltool). */
.pweeknav .btn { border-color: var(--ctl-border-strong); }
.pweeknav .btn-icon { width: 34px; }
.pweeknav .btn-primary { border-color: var(--ink); }
.cal-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 14px 24px 24px; }
.cal-lead { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; font-size: 13px; line-height: 1.5; color: var(--text2); }
.cal-lead .calsum { font-weight: 600; font-size: 13.5px; }
.cal-grid { flex: 1; display: flex; gap: 20px; align-items: stretch; min-height: 0; }
.cweek { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--hair); border-radius: 10px; overflow: hidden; }
/* Шапки — первой строкой сетки, дни — второй (в разметке шапка идёт перед
   своим днём). В узкой колонке «сегодня» уходит на свою строку, а не
   наезжает на шапку соседнего дня. */
.cday-h { grid-row: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 52px; padding: 10px 10px 8px; border-bottom: 1.5px solid var(--ink); border-left: 1px solid var(--hair2); }
.cday-h.first { border-left: 0; }
.cday-h .wd { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cday-h .dn { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.cday-h .mo { font-size: 11.5px; color: var(--muted); }
.cday-h.past .dn { color: var(--muted); }
.cday-h.today .wd { color: var(--ink); }
.cday-h.today .dn { background: var(--ink); color: var(--paper); border-radius: 7px; padding: 4px 7px 3px; }
.cday-h .td { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--ink); }
.cday { grid-row: 2; min-width: 0; flex: none; min-height: 440px; padding: 10px 8px 12px; gap: 8px; border-left: 1px solid var(--hair2); }
.cday.first { border-left: 0; }
/* Прошедшие дни отступают на бумагу; сегодня держится залитой датой в шапке, без заливки колонки. */
.cday.past { background: var(--paper); }
.cday.over::after { bottom: auto; top: 10px; }
.cday .calitem .t { font-size: 13.5px; line-height: 1.3; }
/* «+» идёт сразу за последней карточкой (в пустом дне — под шапкой), там же, где и подсказка переноса. */
.cday .caladd { margin-top: 0; max-width: 100%; opacity: 0.55; }
.ctray { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.ctray-h { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.ctray-h .n { color: var(--muted); font-weight: 500; letter-spacing: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ctray-list { display: flex; flex-direction: column; gap: 8px; }
.ctray .calitem { background: var(--surface); }
.ctray .calitem .t { font-size: 13.5px; }
.ctray-note, .ctray-empty { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ctray-empty b { color: var(--text2); font-weight: 600; }
.ctray-passed { margin-top: 2px; align-self: stretch; display: inline-flex; align-items: center; gap: 5px; padding: 10px 0 0; border: 0; border-top: 1px solid var(--hair2); background: transparent; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-align: left; }
.ctray-passed:hover { color: var(--accent-ink); }
/* Мини-месяц: ориентация, не второй календарь. */
.mm { padding: 12px 10px 8px; background: var(--surface); border: 1px solid var(--hair); border-radius: 10px; }
.mm-h { font-family: var(--serif); font-size: 15px; font-weight: 600; padding: 0 4px 8px; }
.mm-wd, .mm-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mm-wd span { font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
.mm-row { border-radius: 7px; }
/* Показанная неделя — тушью: контур строки и полоса слева, без бежевой заливки. */
.mm-row.on { box-shadow: inset 0 0 0 1.5px var(--ink), inset 3px 0 0 var(--ink); }
.mm-d { position: relative; height: 30px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.mm-d:hover { background: var(--accent-wash); }
.mm-d.out { color: var(--muted); opacity: 0.5; }
.mm-d.today { background: var(--ink); color: var(--paper); font-weight: 600; }
.mm-d.has::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.mm-d.has.pub::after { background: var(--done); opacity: 1; }
.mm-d.today.has::after { background: var(--paper); }

/* Всплывающие и модальные */
.toasts { position: fixed; left: 50%; bottom: calc(var(--dock-h, 44px) + 16px); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 13px; box-shadow: 0 8px 24px rgba(var(--shadow-rgb),0.2); transition: opacity 0.3s; max-width: 90vw; }
.toast-error { background: var(--ret); } .toast.out { opacity: 0; }
.modal-back { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; border-radius: 12px; background: var(--paper); box-shadow: 0 24px 60px rgba(var(--shadow-rgb),0.28); display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 14px; border-bottom: 1px solid var(--hair2); } .modal-title { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.modal-body { padding: 18px 24px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px 18px; border-top: 1px solid var(--hair2); }
.menu-pop { position: absolute; z-index: 45; background: var(--surface); border: 1px solid var(--hair); border-radius: 8px; box-shadow: 0 12px 32px rgba(var(--shadow-rgb),0.14); padding: 4px; display: flex; flex-direction: column; min-width: 200px; }
.menu-pop button { text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: inherit; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 12px; } .menu-pop button:hover { background: var(--wash); }
.menu-pop { max-width: 340px; } .menu-pop .menu-head { padding: 8px 10px 10px; font-size: 12px; line-height: 1.5; color: var(--muted); border-bottom: 1px solid var(--hair2); margin-bottom: 4px; } .menu-pop .menu-head b { color: var(--ink); font-weight: 600; }
.menu-pop hr { border: 0; border-top: 1px solid var(--hair2); margin: 4px 0; } .menu-pop button.on { font-weight: 600; } .menu-pop button.danger { color: var(--ret); }

/* Библиотека. Общее сказано одной строкой над списком, на книге — только
   то, что её отличает. Книги лежат на бумаге, без коробок. */
.lib { display: flex; flex-direction: column; }
.lib .topbar, .lib .content, .mat .topbar, .mat .content { padding-left: max(var(--gutter), calc((100% - var(--page-max)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--page-max)) / 2)); }
.lib .content, .mat .content { gap: 16px; }
.lib .content { padding-top: 18px; } .mat .content { padding-top: 20px; }
.acc { color: var(--accent); font-weight: 600; }
.v-done { color: var(--done); }
.sep { margin: 0 6px; color: var(--sep-c); }
.nw { white-space: nowrap; }
/* Строка через «·», которая может переноситься. Точка стоит перед каждым
   элементом в зазоре шириной --dot; у элемента, начавшего строку, она
   уходит за левый край и обрезается — висящих точек нет ни в конце, ни в начале. */
.dots { --dot: 13px; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--dot); overflow: hidden; }
.dots > * { min-width: 0; }
.dots > *::before { content: '·'; display: inline-block; width: var(--dot); margin-left: calc(-1 * var(--dot)); text-align: center; color: var(--sep-c); font-weight: 400; }

.lfilters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lfilters .sp { flex: 1; }
.lchip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--ctl-border); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer; }
.lchip .lbl { color: var(--muted); }
.lchip .val { font-weight: 500; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.lchip .ic { color: var(--muted); }
.lchip select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font: inherit; }
/* Выбранное залито тушью; подписи и числа на туши — светлые. */
.lchip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.lchip.on .lbl, .lchip.on .ic { color: var(--on-ink-2); }
.lchip:focus-within { border-color: var(--accent); }
.lchip.more[aria-expanded="true"]:not(.on) { background: var(--wash); }
.lchip.toggle .n { color: var(--muted); margin-left: 2px; font-variant-numeric: tabular-nums; }
.lchip.toggle.on .n { color: var(--on-ink-acc); }
.ltoken { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--hair); background: transparent; color: var(--text2); font: inherit; font-size: 12px; cursor: pointer; }
.ltoken:hover { color: var(--accent); border-color: var(--accent); }
.lreset { border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 0 4px; }
.more-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 8px; background: var(--wash); }
.more-panel[hidden] { display: none; }
.more-note { margin: 0; font-size: 12px; color: var(--muted); }

/* Первый уровень: быстрые сегменты с живыми числами и «Фильтры»; порядок и вид — в шапке. */
.ltools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ltools .sp { flex: 1; }
.lseg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--seg-bg); }
.lseg button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.lseg button .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.lseg button .n.zero { opacity: 0.7; }
.lseg button.on { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.lseg button.on .n { color: var(--on-ink-acc); }
.ltool { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--ctl-border-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.ltool .ic { color: var(--ink); }
.ltool .n { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--surface); font-size: 11px; font-weight: 600; }
/* Вид: «Список» (основной) и «Плитка». */
.vtabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--seg-bg); }
.vtabs button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.vtabs button:hover { color: var(--ink); }
.vtabs button.on { background: var(--ink); color: var(--on-ink); font-weight: 600; }
/* Одна строка над списком: сколько показано, снятие условий и то, что одинаково у книг. */
.lnote { display: flex; align-items: flex-start; gap: 7px; margin-top: -4px; font-size: 12.5px; line-height: 1.5; color: var(--text2); }
.lnote .ic { flex-shrink: 0; margin-top: 3px; }
.lnote .ltoken { vertical-align: 1px; margin-left: 6px; height: 22px; }
.lshown { color: var(--ink); font-weight: 500; margin-right: 14px; padding-right: 14px; border-right: 1px solid var(--hair); }
.lshown .lreset { margin-left: 8px; font-size: 12.5px; }
.lempty { display: flex; flex-direction: column; gap: 4px; padding: 40px 0 48px; border-top: 1px solid var(--hair); text-align: center; color: var(--muted); font-size: 13px; }
.lempty b { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--ink); }

/* Отбор по контексту — модель B (FILTER_STUDY §6). Первый уровень короткий:
   сегменты, выбор с вводом букв, «Фильтры». Вторая строка — светлая полоса,
   только в контексте. «Фильтры» — белая панель. Выбранное залито тушью. */
.lib .topbar .actions { gap: 10px; }
.lib .topbar .actions .lchip { height: 34px; border-radius: 7px; border-color: var(--ctl-border-strong); }
/* На узком экране поиск, как везде, во всю ширину (блок ≤ 900px). */
@media (min-width: 901px) { .lib .topbar .search { width: 300px; } }
/* Сегменты Материалов — того же вида, что у Библиотеки. */
.ltools .mseg { padding: 3px; border-radius: 9px; background: var(--seg-bg); flex-wrap: nowrap; }
.ltools .mseg button { gap: 7px; height: 30px; padding: 0 13px; color: var(--ink); font-weight: 500; }
.ltools .mseg button .n { font-size: 13px; }
.ltools .mseg button.on { font-weight: 600; }
.ltools .mseg button.on .n { color: var(--on-ink-acc); }
.ltool[aria-expanded="true"], .ltool.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ltool[aria-expanded="true"] .ic, .ltool.on .ic { color: var(--on-ink-acc); }
.ltool.on .n { background: var(--on-ink-acc); color: var(--ink); }
/* «Автор», «Книга»: выбранное — залитый чип со значением и крестиком. */
.pchip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.pchip:hover { border-color: var(--accent); }
.pchip .ic { color: var(--muted); flex-shrink: 0; }
.pchip.on { padding: 0; gap: 0; background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pchip.on .lbl, .pchip.on .ic { color: var(--on-ink-acc); }
.pchip-main { display: inline-flex; align-items: center; gap: 6px; height: 100%; max-width: 340px; padding: 0 4px 0 12px; border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; }
.pchip .val { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pchip-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 100%; border: 0; border-radius: 0 6px 6px 0; background: transparent; color: var(--on-ink); cursor: pointer; }
.pchip-x:hover { background: var(--on-ink-hover); }
/* Вторая строка: подпись контекста капителью, группы пилюль, одинаковое словами, итог справа. */
.ctxbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-top: -6px; padding: 7px 14px 7px 12px; border-radius: 9px; background: var(--ctx-bg); }
.ctx-k { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.cgroup { display: inline-flex; align-items: center; gap: 7px; }
.clbl { font-size: 13px; color: var(--text2); }
.cpills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cpill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 14px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.cpill .n { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cpill:hover:not(:disabled) { border-color: var(--accent); }
.cpill:disabled { cursor: default; color: var(--muted); background: transparent; border-color: var(--hair2); }
.cpill.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 600; }
.cpill.on .n { color: var(--on-ink-acc); }
.cpill .x { display: inline-flex; margin: 0 -3px 0 -1px; }
.cpill.cview { border-radius: 7px; }
.cfacts { font-size: 12.5px; line-height: 1.4; color: var(--text2); }
.ctail { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.ctail .lreset { margin-left: 8px; padding-right: 0; font-size: 12.5px; }
/* Панель «Фильтры»: подпись грани слева, варианты справа. */
.fpanel { display: flex; flex-direction: column; gap: 10px; margin-top: -6px; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--hair); box-shadow: 0 1px 3px rgba(var(--shadow-rgb),0.06); }
.frow { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 12px; }
.flbl { font-size: 13px; line-height: 28px; color: var(--text2); }
.fnote { margin: 0; padding-left: 124px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
/* Список с вводом букв. */
.picker-pop { position: fixed; z-index: 45; width: 420px; max-width: calc(100vw - 16px); display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--hair); box-shadow: 0 12px 32px rgba(var(--shadow-rgb),0.18); }
.picker-pop .search { width: 100%; }
.picker-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; }
.popt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: 14px; text-align: left; color: var(--ink); cursor: pointer; }
.popt:hover:not(:disabled) { background: var(--accent-wash); }
.popt:disabled { color: var(--muted); cursor: default; }
.popt .pt { display: flex; flex-direction: column; min-width: 0; }
.popt .pl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popt .ps { font-size: 12px; color: var(--muted); }
.popt .pn { flex-shrink: 0; font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.popt .pn.zero { color: var(--muted); }
.popt[hidden], .phead[hidden] { display: none; }
.phead { margin-top: 4px; padding: 8px 10px 4px; border-top: 1px solid var(--hair2); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pnote { margin: 0; padding: 6px 10px 2px; border-top: 1px solid var(--hair2); font-size: 12px; color: var(--muted); }
/* Имя автора в строке книги ставит фильтр «Автор». */
.au-link { all: unset; cursor: pointer; color: inherit; }
.au-link:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.au-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Строка итога над списком: сколько показано, снимаемые условия, «Сбросить всё». */
.fsum { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.fsum .lshown { border-right: 0; margin: 0; padding: 0; font-size: 12.5px; }
.fsum .ltoken { margin-left: 6px; height: 22px; vertical-align: 1px; }
.fsum .lreset { margin-left: 8px; font-size: 12.5px; }
.lib .lnote .lshown { margin-right: 10px; padding-right: 10px; }
.lnote-t { display: inline-block; }

/* Список — книги как книги, в две колонки: обложка 80×120, название не
   больше двух строк, второе название, автор, языки и годы, одна тихая
   строка о работе. Без коробок: запись отделена линейкой тушью. */
.ld { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 44px; }
.ld-item { display: flex; gap: 20px; min-width: 0; padding: 18px 0; border-top: 1.5px solid var(--ink); cursor: pointer; }
.lbk-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lbk-t { font-family: var(--serif); font-size: 17.5px; font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ld-item:hover .lbk-t { color: var(--accent-ink); }
.lbk-alt { margin-bottom: 2px; font-family: var(--serif); font-size: 14px; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbk-m { display: flex; align-items: baseline; min-width: 0; margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--muted); white-space: nowrap; }
.lbk-m .au { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.lbk-m .rest { flex-shrink: 0; }
.lbk-s { margin-top: auto; padding-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.lbk-s b { font-weight: 600; }
.lbk-tags { font-size: 12.5px; line-height: 1.5; }

/* Обложка. Настоящая — из библиотеки; нет её — бумажная заглушка с
   названием, без выдуманного рисунка. */
.bcover { display: inline-block; flex-shrink: 0; overflow: hidden; border-radius: 2px; background: var(--wash); box-shadow: 0 1px 2px rgba(var(--shadow-rgb),0.20), 0 0 0 1px rgba(var(--shadow-rgb),0.06); }
.bcover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bcover.none { display: inline-flex; align-items: flex-start; padding: 6px 5px; background: linear-gradient(180deg, var(--ph-a), var(--ph-b)); color: var(--ph-text); font-family: var(--serif); font-weight: 600; line-height: 1.2; box-shadow: inset 3px 0 0 rgba(var(--shadow-rgb),0.06), 0 0 0 1px rgba(var(--shadow-rgb),0.08); }
.bcover.none span { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }

/* Плитка: колонки задаёт --lib-cols. Единый ритм: под название всегда
   отведены ровно две строки, остальное идёт плотно под ним — без пустот
   посреди записи и без «рваных» рядов. */
.lgrid { display: grid; grid-template-columns: repeat(var(--lib-cols), minmax(0, 1fr)); column-gap: 40px; row-gap: 0; align-items: start; margin-top: 4px; }
.entry { display: flex; flex-direction: column; gap: 4px; padding: 16px 0 22px; border-top: 1px solid var(--hair); cursor: pointer; min-width: 0; }
.entry:hover .e-title { color: var(--accent-ink); }
.e-cover { margin-bottom: 10px; line-height: 0; }
.e-title { margin: 0; min-height: 2.6em; font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.e-alt { font-family: var(--serif); font-size: 14px; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-meta { display: flex; align-items: baseline; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--muted); white-space: nowrap; }
.e-meta .au { color: var(--text2); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.e-meta .rest { flex-shrink: 0; }
.e-sig { --dot: 15px; font-size: 13px; line-height: 1.45; color: var(--text2); }
.langs { letter-spacing: 0.02em; }
.ltag { color: var(--accent); }

/* Материалы — «Тихая студия». Карточка начинается с текста; работа над
   материалом — одна цепочка из пяти шагов, текущий назван словами. */
.mseg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--ctx-bg); flex-wrap: wrap; }
.mseg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: var(--text2); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.mseg button .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.mseg button.on { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.mseg button.on .n { color: var(--on-ink-2); }
.m-summary { margin: 0; font-size: 13px; color: var(--muted); }
.mcard { position: relative; display: flex; border-radius: 10px; background: var(--surface); border: 1px solid var(--card-line); overflow: hidden; }
.mcard:hover { border-color: var(--hair); }
.mcard.dragging { opacity: 0.4; }
.m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 18px 24px 16px; cursor: pointer; }
.m-title { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.3; }
.m-title a { color: var(--ink); } .m-title a:hover { color: var(--accent-ink); }
.m-title a.empty { color: var(--muted); font-weight: 400; font-style: italic; }
.m-excerpt { margin: 0; max-width: 80ch; font-family: var(--serif); font-size: 15px; line-height: 1.55; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m-meta { display: flex; align-items: center; flex-wrap: wrap; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.m-note { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.m-grip { position: absolute; left: 5px; top: 50%; transform: translateY(-50%); color: var(--muted); opacity: 0; cursor: grab; }
@media (hover: hover) { .mcard[draggable=true]:hover .m-grip { opacity: 0.55; } }
.m-flow { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 14px; border-left: 1px solid var(--hair2); }
.m-status { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.3; } .m-status.pub b { color: var(--accent); }
.m-status b { font-weight: 600; color: var(--ink); }
.m-status .w { color: var(--muted); font-size: 14px; }
.m-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.m-steps li { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.m-steps .mk { width: 12px; flex-shrink: 0; display: inline-flex; justify-content: center; font-size: 11px; }
.m-steps .mk .dot { width: 8px; height: 8px; align-self: center; }
.m-steps li.cur { color: var(--ink); } .m-steps li.cur b { font-weight: 600; } .m-steps li.cur .w { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.m-steps li.done { color: var(--done); }
.m-steps li.cur.wait .w { color: var(--wait); } .m-steps li.cur.ret .w { color: var(--ret); } .m-steps li.cur.active .w { color: var(--active); } .m-steps li.cur.done .w { color: var(--done); }
.m-extra { display: flex; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text2); }
.m-actions { margin-top: auto; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding-top: 6px; }
.m-plan { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 0; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.m-plan:hover { color: var(--accent); }
.m-open { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 500; }
.m-open:hover { background: var(--accent-wash); color: var(--accent-ink); }

/* Экран книги — продолжение Библиотеки: название один раз, тихая строка
   сведений, издания — вторым уровнем, ниже материалы. */
.bk { display: flex; flex-direction: column; }
.bk .bk-head, .bk .content { padding-left: max(var(--gutter), calc((100% - var(--page-max)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--page-max)) / 2)); }
.bk-head { display: flex; align-items: flex-start; gap: 24px; padding-top: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--hair2); }
.bk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bk-crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-bottom: 6px; align-self: flex-start; }
.bk-title { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.bk-alt { font-family: var(--serif); font-size: 16px; line-height: 1.4; color: var(--muted); }
.bk-author { margin-top: 4px; font-size: 15px; color: var(--text2); }
.bk-meta { display: flex; align-items: center; flex-wrap: wrap; font-size: 13px; line-height: 1.5; color: var(--muted); }
.bk-eds { margin-top: 6px; font-size: 13px; color: var(--text2); }
.bk-eds summary { cursor: pointer; color: var(--accent); width: max-content; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.bk-eds summary::-webkit-details-marker { display: none; }
.bk-eds summary .ic { transition: transform 0.15s; }
.bk-eds[open] summary .ic { transform: rotate(180deg); }
.bk-eds ul { margin: 8px 0 0; padding: 0 0 0 2px; list-style: none; display: flex; flex-direction: column; gap: 4px; line-height: 1.45; }
.bk-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; padding-top: 22px; }
.bk .content { gap: 14px; padding-top: 22px; }
.bk-sec { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bk-sec h2 { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.bk-sec .n { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.bk-useful { margin-left: 8px; font-size: 13px; color: var(--text2); }
/* Форма редакционных отметок: канон — текстом. */
.ro { padding: 12px 14px; border-radius: 8px; background: var(--wash); display: flex; flex-direction: column; gap: 8px; }
.ro-h { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); font-size: 12px; padding-top: 2px; } .dl dd { margin: 0; line-height: 1.45; }
.local-note { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* Редактор — оригинал главный. Слои текста строятся по данным: сейчас
   «Оригинал» и «Версия редакции»; Existing RU, AI и Final PD встанут
   колонками, когда для них появятся данные. */
.ed { display: flex; flex-direction: column; }
.ed-head { display: flex; align-items: flex-start; gap: 20px; padding: 14px 28px 16px; border-bottom: 1px solid var(--hair2); }
.ed-h-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ed-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.ed-back { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; margin-right: 8px; padding: 0 10px 0 6px; border: 1px solid var(--hair); border-radius: 7px; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.ed-back:hover { border-color: var(--accent); }
.ed-title-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.ed-title { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.ed-title.empty { color: var(--muted); font-weight: 400; font-style: italic; }
.ed-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.ed-state .dot { width: 8px; height: 8px; }
.ed-state.pub { color: var(--accent); } .ed-state.done { color: var(--done); } .ed-state.wait { color: var(--wait); } .ed-state.ret { color: var(--ret); } .ed-state.active { color: var(--active); }
.ed-source { font-size: 13px; color: var(--muted); }
.ed-h-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-top: 24px; }
.ed-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ed-status.dirty { color: var(--active); } .ed-status.err { color: var(--ret); }
.editor { display: flex; min-height: 0; }
.editor-main { flex: 1; min-width: 0; padding: 18px 28px 32px; display: flex; flex-direction: column; gap: 18px; }
.ed-note { padding: 10px 14px; border-radius: 8px; background: var(--accent-wash); border-left: 3px solid var(--accent); }
.ed-note .lbl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--accent-ink); }
.ed-note p { margin: 4px 0 0; font-family: var(--serif); font-size: 15px; line-height: 1.5; color: var(--text2); white-space: pre-line; }
.ed-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--hair2); }
.ed-tabs a { padding: 4px 0 8px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; }
.ed-tabs a:hover { color: var(--ink); }
.ed-tabs a.on { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.ed-tabs a .n { color: var(--muted); font-variant-numeric: tabular-nums; }
/* Языковые версии истории (PD-multilang, 19.11.2026): RU, EN, HI — плитки
   над вкладками материала. Готовность — словом и полоской из четырёх шагов,
   не только цветом; цвета — токены состояний, светлая и тёмная темы. */
.langbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin: 0 0 12px; }
@media (max-width: 560px) { .langbar { gap: 6px; } .lb-item { min-width: 0; padding: 8px 9px 9px; } .lb-name { display: none; } .lb-mid { flex-wrap: wrap; row-gap: 4px; } .lb-steps i { width: 10px; } .lb-pub { font-size: 11px; } }
.lb-item { display: flex; flex-direction: column; gap: 6px; min-height: 44px; padding: 9px 12px 10px; border: 1px solid var(--ctl-border); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; }
.lb-item:hover { border-color: var(--ctl-border-strong); background: var(--paper); }
.lb-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lb-item.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.lb-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.lb-code { font-weight: 600; font-size: 13px; letter-spacing: 0.06em; }
.lb-name { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-mid { display: flex; align-items: center; gap: 8px; }
.lb-steps { display: inline-flex; gap: 3px; }
.lb-steps i { width: 14px; height: 4px; border-radius: 2px; background: var(--track-line); }
.lb-word { font-size: 13px; font-weight: 500; }
.lb-pub { font-size: 12px; color: var(--muted); }
.lb-item.st-none { border-style: dashed; }
.lb-item.st-none .lb-word { color: var(--muted); }
.lb-item.st-draft .lb-steps i.on { background: var(--none); }
.lb-item.st-translation .lb-steps i.on { background: var(--active); }
.lb-item.st-translation .lb-word { color: var(--active); }
.lb-item.st-review .lb-steps i.on { background: var(--wait); }
.lb-item.st-review .lb-word { color: var(--wait); }
.lb-item.st-ready .lb-steps i.on { background: var(--done); }
.lb-item.st-ready .lb-word { color: var(--done); }
.lb-item.out .lb-pub { color: var(--done); font-weight: 500; }
.lb-hint { margin: -4px 0 12px; font-size: 13px; line-height: 1.45; color: var(--text2); }
/* Хинди: деванагари — свой шрифт и больший интерлиньяж (надстрочная черта,
   огласовки над и под строкой). Длина строки — по колонке, слова не
   переносятся по слогам: перенос только между словами. */
:lang(hi) { --serif: 'Noto Serif Devanagari', Literata, Georgia, serif; --sans: 'Noto Sans Devanagari', 'Golos Text', system-ui, sans-serif; }
.ws-c:lang(hi) .ws-t, .ws-ed:lang(hi) .ws-er { font-family: var(--serif); line-height: 1.8; hyphens: manual; }
.lb-name:lang(hi) { font-family: var(--sans); }
.layers { display: grid; grid-template-columns: repeat(var(--layers), minmax(0, 1fr)); gap: 28px; }
.layer { min-width: 0; display: flex; flex-direction: column; }
.layer-h { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--hair); }
.layer-h b { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.layer-h span { font-size: 12px; color: var(--muted); }
.layer-editor .layer-h { border-bottom-color: var(--accent); } .layer-editor .layer-h b { color: var(--accent); }
.layer-text { font-family: var(--serif); font-size: 16px; line-height: 1.65; color: var(--ink); white-space: pre-line; }
textarea.input.layer-input { font-family: var(--serif); font-size: 16px; line-height: 1.65; min-height: 340px; padding: 12px 14px; }
.layer-hint { margin: -6px 0 0; font-size: 12px; color: var(--muted); }
/* Слои архива канала (этап 2): режим колонок, подсветка различий, ИИ-перевод. */
.ed-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ed-viewbar .seg-item { border: 0; background: transparent; color: var(--accent-ink); font: inherit; font-size: 13px; }
.ed-viewbar .seg-item.on { background: var(--ink); color: var(--paper); }
.ed-viewbar .seg-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ed-legend { font-size: 12px; color: var(--muted); } .ed-legend.dirty { color: var(--active); }
mark.m-ai, mark.m-ch { color: inherit; border-radius: 3px; padding: 0 1px; }
mark.m-ai { background: var(--mark-ai-bg); box-shadow: inset 0 -2px 0 #C98A5E; }
mark.m-ch { background: var(--wait-bg); box-shadow: inset 0 -2px 0 var(--mark-ch-line); }
.layer-channel .layer-h { border-bottom-color: var(--wait); } .layer-channel .layer-h b { color: var(--wait); }
.layer-machine .layer-h { border-bottom-color: var(--machine); } .layer-machine .layer-h b { color: var(--machine); }
.layer-existing .layer-h b { color: var(--wait); }
.ai-notes { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--hair); font-size: 13px; line-height: 1.45; color: var(--text2); }
.ai-notes summary { cursor: pointer; color: var(--accent-ink); font-weight: 500; }
.ai-notes ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.ai-acts { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 12px; }
.ed-start { min-height: 340px; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 20px; text-align: center; border: 1px dashed var(--hair); border-radius: 8px; background: var(--surface); font-size: 14px; }
.ed-start p { margin: 0; } .ed-start .muted { font-size: 12px; max-width: 34ch; }
.ed-start .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
/* «Сравнение» по смысловым фрагментам: ряды с одинаковой сеткой колонок,
   следующий фрагмент начинается на одной высоте во всех текстах. */
.al { display: grid; gap: 2px; }
.al-row { position: relative; display: grid; grid-template-columns: repeat(var(--al-cols), minmax(0, 1fr)); gap: 28px; padding: 10px 12px; margin: 0 -12px; border-radius: 8px; }
.al-head { position: sticky; top: 0; z-index: 2; background: var(--paper); padding-top: 4px; padding-bottom: 0; }
.al-head .layer-h { margin-bottom: 0; }
.al-h-existing { border-bottom-color: var(--wait); } .al-h-existing b { color: var(--wait); }
.al-h-machine { border-bottom-color: var(--machine); } .al-h-machine b { color: var(--machine); }
.al-row[data-al] { cursor: pointer; }
.al-row[data-al] + .al-row[data-al] { box-shadow: 0 -1px 0 var(--hair2); }
@media (hover: hover) { .al-row[data-al]:hover { background: var(--accent-wash); } }
.al-row[data-al]:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.al-row.on, .al-row.on:hover { background: var(--hl); box-shadow: inset 4px 0 0 var(--active), 0 0 0 1px rgba(149,91,0,0.35); }
.al-row.on + .al-row[data-al] { box-shadow: none; }
.al-cell { min-width: 0; font-family: var(--serif); font-size: 16px; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.al-cell .pil { color: var(--muted); opacity: 0.55; font-family: var(--sans); font-size: 12px; margin-right: 4px; user-select: none; }
.al-miss { display: flex; align-items: flex-start; }
.al-miss-t { font-family: var(--sans); font-size: 12px; color: var(--ret); background: var(--ret-bg); border-radius: 4px; padding: 2px 8px; }
.al-original.al-miss .al-miss-t { color: var(--none); background: var(--none-bg); }
.al-flag { position: absolute; top: -9px; right: 12px; font-family: var(--sans); font-size: 11px; font-weight: 500; color: var(--active); background: var(--active-bg); border: 1px solid rgba(149,91,0,0.35); border-radius: 999px; padding: 0 8px; line-height: 17px; }
.al-flag.inline { position: static; display: inline-block; }
.al-row.doubt { box-shadow: inset 3px 0 0 rgba(149,91,0,0.45); }
.al-row.doubt.on { box-shadow: inset 4px 0 0 var(--active), 0 0 0 1px rgba(149,91,0,0.35); }
.al-foot { cursor: default; padding-top: 0; }
@media (max-width: 900px) {
  .al-row { grid-template-columns: 1fr; gap: 6px; }
  .al-head { position: static; } .al-head .layer-h { margin-bottom: 4px; }
  .al-cell[data-label]::before { content: attr(data-label); display: block; font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: normal; }
  .al-foot > div:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) { .al-row { transition: none; } }
/* Архив канала: блок поста, оригинал не найден, признаки в карточке. */
.chan { background: var(--surface); border: 1px solid var(--hair2); border-radius: 10px; }
.chan > summary { cursor: pointer; padding: 10px 14px; font-size: 13px; }
.chan-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; padding: 4px 16px 16px; }
.chan-shots { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.chan-shot { position: relative; display: block; border: 1px solid var(--hair2); border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.chan-shot img { display: block; width: 220px; height: auto; }
.chan-shot .sz { position: absolute; right: 6px; bottom: 6px; background: rgba(13,10,7,.72); color: #FBF8F3; font-size: 11px; border-radius: 4px; padding: 1px 6px; }
.chan-facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13.5px; align-content: start; }
.chan-facts dt { color: var(--muted); font-size: 12.5px; } .chan-facts dd { margin: 0; }
.chan-facts .cover-t { font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.3; }
.chan-facts .cover-s { font-family: var(--serif); font-size: 14px; color: var(--text2); }
.chan-facts .warn { display: inline-block; margin-top: 4px; font-size: 11.5px; color: var(--active); background: var(--active-bg); border-radius: 4px; padding: 1px 6px; }
.orig-missing { display: grid; gap: 8px; padding: 16px; border: 1px dashed var(--hair); border-radius: 8px; background: var(--surface); font-size: 14px; }
.orig-missing p { margin: 0; } .orig-missing .muted { font-size: 12px; }
.m-origin { color: var(--wait); }
.m-conf.exact { color: var(--done); } .m-conf.likely { color: var(--active); } .m-conf.not_found { color: var(--ret); }
.ctxbar.archive { margin-bottom: 8px; }
@media (max-width: 900px) { .chan-body { grid-template-columns: 1fr; } .chan-facts { grid-template-columns: 1fr; } }
.ed-sec { border-top: 1px solid var(--hair2); padding-top: 12px; }
.ed-sec summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text2); }
.ed-sec summary::-webkit-details-marker { display: none; }
.ed-sec summary .muted { font-weight: 400; }
.ed-sec summary .ic, .rstage-d summary .ic { color: var(--muted); transition: transform 0.15s; }
.ed-sec[open] summary .ic, .rstage-d[open] summary .ic { transform: rotate(180deg); }
.ed-sec .dl { margin-top: 12px; max-width: 680px; }
.ed-sec-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.ed-demo-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ed-span2 { grid-column: span 2; }
.ed-sig { display: flex; gap: 28px; flex-wrap: wrap; padding: 14px 16px; border-radius: 8px; background: var(--wash); }
.sig-col { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.sig-col .h { display: flex; align-items: baseline; gap: 10px; }
.sig-col .h b { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sig-col .h .linkbtn { margin-left: auto; font-size: 12px; }
.linkbtn:disabled { color: var(--muted); opacity: 0.6; cursor: default; }
.sig-text { font-family: var(--serif); font-size: 14px; line-height: 1.5; white-space: pre-line; }
.sig-empty { font-size: 13px; }
.sig-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.sig-missing { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.ed-compare-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.ed-compare-bar select { width: auto; }
.rstage-d { border-bottom: 1px solid var(--hair2); }
.rstage-d summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 0; cursor: pointer; font-size: 13px; }
.rstage-d summary::-webkit-details-marker { display: none; }
.rstage-d summary b { font-weight: 500; color: var(--text2); }
.rstage-d.cur summary b { font-weight: 600; color: var(--ink); }
.rstage-d summary .s { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rstage-d .rbody { display: flex; flex-direction: column; gap: 8px; padding: 0 0 14px 20px; }
.rstage-d .sub { font-size: 12px; line-height: 1.4; color: var(--muted); }
.rstage-d select { height: 28px; font-size: 12px; }
.rstage-d .acts { display: flex; flex-direction: column; gap: 6px; }
.rnote { font-size: 12px; line-height: 1.4; color: var(--muted); }
.btn-o { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-o:hover:not(:disabled) { background: var(--accent-wash); }

/* Адаптивность */
.mobile-nav { display: none; }

@media (max-width: 1100px) {
  :root { --sidebar: 56px; }
  .sidebar { padding: 16px 8px; } .sidebar .brand { justify-content: center; padding: 4px 0 18px; } .sidebar .brand .name, .sidebar .brand .sub, .sidebar .nav-item span, .sidebar .nav-sect, .sidebar .user .who, .sidebar .storage-note, .side-data span, .side-data .chev { display: none; } .side-data, .sidebar .user { justify-content: center; padding: 0; height: 36px; } .main-note { display: flex; }
  .lgrid { --lib-cols: 2; }
  /* Порядок, вид, поиск и «Добавить книгу» переносятся, а не уходят за край. */
  .lib .topbar .actions { flex-shrink: 1; min-width: 0; justify-content: flex-end; }
  .m-flow { width: 280px; } .sidebar .nav-item { justify-content: center; padding: 0; } .sidebar .brand img { width: 30px; height: 30px; }
  .side-row { flex-direction: column; align-items: stretch; } .sidebar .theme-sw { justify-content: center; background: transparent; } .sidebar .theme-sw button[aria-checked=false] { display: none; } .sidebar .theme-sw button { width: 36px; height: 32px; margin: 0 auto; }
  .editor-rail { width: 250px; }
  .cday { min-height: 360px; }
}
@media (max-width: 900px) {
  .editor { flex-direction: column; } .editor-rail { width: auto; border-left: 0; border-top: 1px solid var(--hair2); }
  .layers { grid-template-columns: 1fr; } .ed-head { flex-direction: column; gap: 8px; } .ed-h-actions { padding-top: 0; } .ed-demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding: 8px 16px; } .content { padding: 14px 16px 24px; }
  .search { width: 100%; }
  .mcard { flex-direction: column; } .m-flow { width: auto; border-left: 0; border-top: 1px solid var(--hair2); }
  .ld { grid-template-columns: 1fr; }
  .bk-head { flex-direction: column; gap: 12px; } .bk-actions { flex-direction: row; align-items: center; padding-top: 0; }
  /* Неделя страницы в одну колонку: каждый день под своей шапкой. */
  .cal-grid { flex-direction: column; } .ctray { width: auto; } .cweek { grid-template-columns: 1fr; grid-template-rows: none; } .cday-h, .cday { grid-row: auto; border-left: 0; } .cday-h { min-height: 0; } .cday-h:not(.first) { border-top: 1px solid var(--hair2); } .cday { min-height: 72px; }
}
@media (max-width: 700px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--hair2); overflow-x: auto; background: var(--paper); position: sticky; top: 32px; z-index: 35; }
  .mobile-nav .brand { padding: 0 6px 0 0; } .mobile-nav .brand img { width: 26px; height: 26px; }
  .mobile-nav .nav-item { height: 30px; font-size: 12px; white-space: nowrap; }
  .mobile-nav { top: 0; }
  .ltools .mseg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .mobile-nav .theme-sw { display: inline-flex; align-self: center; } .mobile-nav .theme-sw button { width: 32px; height: 30px; color: var(--muted); } .mobile-nav .theme-sw button[aria-checked=true] { background: transparent; color: var(--ink); } .mobile-nav .theme-sw button[aria-checked=false] { display: none; }
  .topbar .actions { margin-left: 0; width: 100%; }
  .form-grid { grid-template-columns: 1fr; } .form-grid .span2 { grid-column: auto; }
  .mobile-nav .sp { flex: 1; } .mobile-nav .avatar { cursor: pointer; } .mobile-nav .nav-item span { display: none; } .mobile-nav .nav-item { width: auto; padding: 0 10px; }
  .lgrid { --lib-cols: 1; }
  .caldock { max-height: 60vh; } .calhead { gap: 8px; padding: 0 10px; } .calhead .calsum { display: none; } .caldock.open .calhead .calsum { display: inline; }
  .caldays { flex-direction: column; } .calday { border-left: 0; border-top: 1px solid var(--hair2); min-height: 72px; }
}
@media (prefers-reduced-motion: reduce) { .toast, .bk-eds summary .ic, .ed-sec summary .ic, .rstage-d summary .ic { transition: none; } }

/* Вход сотрудника (PDA-4, шаг 2.1) */
.signin { max-width: 400px; margin: 0 auto; padding: 64px 16px 32px; gap: 12px; }
.signin h1 { margin: 8px 0 0; font-family: var(--serif); font-size: 24px; }
.signin-brand { display: flex; align-items: center; gap: 10px; }
.signin-brand img { width: 40px; height: 40px; display: block; }
.signin-brand .name { font-family: var(--serif); font-weight: 600; font-size: 15px; line-height: 1.1; }
.signin-brand .sub { font-size: 10.5px; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 2px; }
.signin-form { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.signin-form .input { font-size: 15px; padding: 10px 12px; }
.signin-form .btn { align-self: flex-start; min-height: 40px; padding: 0 20px; }
.signin-error { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--ret-bg); color: var(--ret); font-size: 13px; }
.signin-alt { font-size: 12.5px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Публикации материала и календарь по публикациям (PDA-4, шаг 2.6).
   Красный — только серверная неготовность к выпуску (ТЗ владельца
   A-6664816937 пп. 6, 9); задержки и прошедшие планы по-прежнему без цвета (PDA-3). */
.pubs { display: flex; flex-direction: column; gap: 8px; }
.pubrow { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 6px; background: var(--paper); border: 1px solid var(--hair2); font-size: 12px; line-height: 1.4; }
.pubrow.blocked { border-left: 3px solid var(--ret); }
.pubrow.ok { border-left: 3px solid var(--done); }
.pubrow.out { border-left: 3px solid var(--accent); }
.pubrow .pr-h { display: flex; align-items: baseline; gap: 6px; }
.pubrow .pr-h b { font-family: var(--serif); font-size: 13px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pubrow .lang { flex-shrink: 0; padding: 0 4px; border-radius: 3px; background: var(--wash); color: var(--text2); font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; }
.pubrow .pr-l { color: var(--muted); }
.pubrow .acts { margin-top: 4px; }
.pubs-empty { margin: 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.pr-ok { color: var(--done); font-weight: 500; }
.pr-miss-h { color: var(--ret); font-weight: 500; }
.pr-miss { margin: 0; padding-left: 16px; color: var(--ret); }
.pr-alert { background: var(--ret-bg); color: var(--ret); margin: 0; }
.pr-when { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pr-tz { margin: 0; font-size: 12px; }
.pr-reasons { font-size: 13px; line-height: 1.45; display: flex; flex-direction: column; gap: 4px; }
.pub-modal .modal-actions { flex-wrap: wrap; }
/* Карточка публикации в календаре не переносится: время — в её меню. */
.calitem.scheduled, .calitem.pub { cursor: default; }
.calitem.scheduled .k .st { display: inline; }
.calitem.blocked { border-left: 3px solid var(--ret); }
.calitem.blocked .nr { color: var(--ret); font-style: normal; font-weight: 500; }
/* Просмотр истории перед «Публикация готова»: только чтение. */
.story-preview { max-height: 55vh; overflow: auto; padding: 12px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--hair2); font-size: 14px; line-height: 1.5; }
.story-preview img { max-width: 100%; height: auto; display: block; border-radius: 4px; }
.story-preview figure { margin: 8px 0; }
.story-preview .sp-cover { margin-top: 0; }
.story-preview .sp-cover img { max-height: 200px; width: auto; }
.story-preview figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.story-preview h3 { margin: 8px 0 2px; font-family: var(--serif); font-size: 18px; }
.story-preview h4 { margin: 12px 0 4px; font-family: var(--serif); font-size: 15px; }
.story-preview .sp-meta { margin: 0 0 8px; font-size: 12px; }
.story-preview .dl { margin: 4px 0 10px; }
.story-preview .sp-body p { margin: 0 0 8px; }
.story-preview blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--hair); font-family: var(--serif); }
.story-preview blockquote footer { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 2px; }
.story-preview .sp-verse { font-family: var(--serif); font-style: italic; }
.story-preview .sp-sig { color: var(--muted); font-size: 13px; text-align: right; }
@media (max-width: 700px) { .pr-when { grid-template-columns: 1fr; } }

/* Публикация внутри материала: единый редактор, главная иллюстрация,
   предпросмотр «близко к PD App» (PDA-4, шаг 2.7). Только токены выше;
   App-превью — цвета iOS, как в прототипе (P/css/app.css:656-709). */
.ed-tabs { flex-wrap: wrap; row-gap: 4px; }
.pubrow.cur { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pubrow .pr-h a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; }
.pubrow .pr-h a:hover { text-decoration-color: var(--ink); }
.pe { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pe-notes { display: flex; flex-direction: column; gap: 8px; }
.pe-notes:empty { display: none; }
.pe-notes .notice { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.45; }
.pe-notes .notice .ic { vertical-align: -2px; }
.pe-notes .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pe-conflict { background: var(--ret-bg); color: var(--ret); border-left: 3px solid var(--ret); }
.pe-conflict p { margin: 0; color: var(--ink); }
.pe-ro { background: var(--wash); color: var(--text2); }
.pe-approved { background: var(--done-bg); color: var(--done); }
/* Исправление вышедшей (PDA-4, 11.11): заметное, но не тревожное — читатели ещё видят прежнее. */
.pe-fix.on { background: var(--accent-wash); color: var(--ink); border-left: 3px solid var(--accent); }
.pe-fix-err { margin: 0; color: var(--ret); }
.pubrow .pr-withdrawn { color: var(--muted); }
.pe-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pe-seg .seg-item { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; }
.pe-seg .seg-item.on { background: var(--ink); color: var(--paper); }
.pe-write { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* Главная иллюстрация: пустая панель — сама кнопка, на неё же бросают файл. */
.pe-cover { border-radius: 10px; }
.pe-cover.drop { outline: 2px dashed var(--accent); outline-offset: 2px; }
.pe-cover-add { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 96px; padding: 16px 18px; border: 1.5px dashed var(--ctl-border-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pe-cover-add:hover { border-color: var(--accent); background: var(--accent-wash); }
.pe-cover-add b { font-size: 14px; font-weight: 600; }
.pe-cover-add span { font-size: 12px; line-height: 1.45; color: var(--muted); }
.pe-cover-add .ic { color: var(--accent); }
.pe-cover-none { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--wash); font-size: 13px; color: var(--muted); }
.pe-cover.filled { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pe-cover-fig { margin: 0; flex: 0 1 320px; min-width: 0; }
.pe-cover-fig img { display: block; max-width: 100%; max-height: 240px; border-radius: 8px; box-shadow: 0 0 0 1px var(--hair2); }
.pe-cover.bad .pe-cover-fig img { box-shadow: 0 0 0 2px var(--ret); }
.pe-cover-side { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pe-cover-k { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pe-cover-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pe-cover-hint { font-size: 12px; }
.pe-cover-busy { margin: 6px 0 0; font-size: 12px; color: var(--active); }
.pe-cover .notice { margin: 0; }
/* Название публикации — над текстом, вне документа. */
.pe-title-l { display: flex; flex-direction: column; gap: 4px; }
.pe-music-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pe-music { width: auto; min-width: 180px; }
.pe-music-n { font-size: 12px; }
/* Люди истории (справочник людей, 17.11.2026) */
.pe-people { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.pe-people-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pe-people-l select { width: auto; min-width: 220px; }
.pe-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pe-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 2px; border: 1px solid var(--hair2); border-radius: 999px; background: var(--surface); }
.pe-chip-x { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; border: 0; background: none; color: var(--muted); border-radius: 50%; cursor: pointer; }
.pe-chip-x:hover { background: var(--wash); color: var(--ink); }
.pe-add-person { min-height: 28px; }
/* Раздел «Люди» */
.pp-note { margin: 0 0 14px; max-width: 70ch; }
.pp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.pp-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--hair2); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pp-row:hover { border-color: var(--hair); }
.pp-main { display: flex; flex-direction: column; min-width: 0; }
.pp-name { font-weight: 600; }
.pp-sub { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-av { flex-shrink: 0; border-radius: 50%; object-fit: cover; background: var(--wash); }
.pp-av-none { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; font-weight: 600; }
.pp-photo { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pp-photo-a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pp-f { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.pp-hint { font-size: 12px; }
.pp-err { color: var(--ret); }
/* Раздел «Биографии» (19.11.2026) */
a.pp-row { text-decoration: none; }
.bio-row .pp-main { flex: 1; }
.bio-chip { flex-shrink: 0; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.bio-chip.none { color: var(--none); background: var(--none-bg); } .bio-chip.active { color: var(--active); background: var(--active-bg); } .bio-chip.done { color: var(--done); background: var(--done-bg); }
.bio-card { max-width: 760px; }
.bio-hero { margin: 0 0 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bio-hero img { display: block; max-width: min(100%, 360px); max-height: 420px; border-radius: 12px; object-fit: cover; background: var(--wash); }
.bio-hero-none { display: inline-flex; align-items: center; justify-content: center; width: 160px; height: 200px; border-radius: 12px; background: var(--wash); color: var(--muted); font-size: 34px; font-weight: 600; }
.bio-hero figcaption { font-size: 12px; }
.bio-name { margin: 0; font-family: var(--serif); font-size: 28px; line-height: 1.2; }
.bio-years { margin: 4px 0 0; }
.bio-role { margin: 6px 0 0; max-width: 70ch; }
.bio-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 4px; }
.bio-status .lseg { flex-wrap: wrap; }
.bio-sec { margin-top: 20px; scroll-margin-top: calc(var(--nav-h, 0px) + var(--head-h, 0px) + 12px); }
.bio-sec h2:focus { outline: none; }
/* Задачи редакции (п.7 решений владельца 19.11) */
.tk .topbar, .tk .content { padding-left: max(var(--gutter), calc((100% - var(--page-max)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--page-max)) / 2)); }
.tk-seg { align-self: flex-start; flex-wrap: wrap; }
.tk-head p { margin: 0 0 4px; max-width: 90ch; }
.tk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tk-row { display: flex; align-items: flex-start; gap: 16px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 10px; background: var(--surface); }
.tk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-title { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.tk-title:hover { color: var(--accent); }
.tk-meta { font-size: 12px; }
.tk-why { margin: 4px 0 0; color: var(--text2); line-height: 1.5; }
.tk-open { flex-shrink: 0; gap: 4px; }
@media (max-width: 700px) { .tk-row { flex-direction: column; gap: 8px; } }
.bio-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pp-have { display: flex; gap: 12px; font-size: 12px; color: var(--text2); }
.pp-have > span { display: inline-flex; align-items: center; gap: 4px; }
.pp-howto { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; max-width: 78ch; padding: 10px 12px; border-radius: 8px; background: var(--wash); color: var(--ink); font-size: 13px; line-height: 1.5; }
.pp-howto .ic { flex-shrink: 0; margin-top: 2px; color: var(--muted); }
.bio-sec h2 { margin: 0 0 8px; font-size: 16px; }
.bio-short, .bio-more p { margin: 0 0 10px; font-family: var(--serif); font-size: 17px; line-height: 1.6; max-width: 70ch; }
.bio-more summary, .bio-notes summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; color: var(--accent); }
.bio-more[open] summary { margin-bottom: 8px; }
.bio-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bio-pill { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: var(--wash); font-size: 12px; }
.bio-box { padding: 10px 12px; margin-bottom: 8px; border-radius: 8px; background: var(--none-bg); max-width: 70ch; font-size: 14px; line-height: 1.45; }
.bio-box.warn { background: var(--active-bg); }
.bio-box b { display: block; margin-bottom: 2px; }
.bio-notes ul { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; max-width: 70ch; }
.bio-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.bio-edit textarea { font-family: var(--serif); font-size: 16px; line-height: 1.5; }
.bio-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bio-cand { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bio-pick { position: relative; display: block; width: 100%; padding: 0; border: 2px solid var(--hair2); border-radius: 10px; overflow: hidden; background: var(--wash); cursor: pointer; }
div.bio-pick { cursor: default; }
.bio-pick img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.bio-cand.on .bio-pick { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.bio-on { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--surface); font-size: 12px; font-weight: 600; }
.bio-cap { font-size: 13px; line-height: 1.35; }
.bio-terms { font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bio-src { font-size: 12px; }
/* «Люди» = справочник + биографии (19.11.2026): отбор и запись справочника в карточке */
.pp-seg { margin: 0 0 12px; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.pp-dl { margin: 0; display: flex; flex-direction: column; gap: 6px; max-width: 70ch; }
.pp-kv { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.pp-kv dt { font-size: 13px; } .pp-kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) { .pp-kv { grid-template-columns: 1fr; gap: 0; } }
.bio-card textarea[data-bio-comment] { width: 100%; }
@media (max-width: 700px) { .bio-cands { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bio-name { font-size: 24px; } }
.pe-title { width: 100%; border: 0; border-bottom: 1px solid var(--hair); background: transparent; padding: 4px 0 6px; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.25; color: var(--ink); outline: 0; }
.pe-title:focus-visible { border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.pe-title:disabled { color: var(--text2); border-bottom-color: transparent; }
.pe-field-err { font-size: 12px; color: var(--ret); }
/* Панель оформления — одна, закреплённая; на телефоне — ниже мобильной навигации. */
.pe-editor { display: flex; flex-direction: column; min-width: 0; }
.pe-loading { margin: 0; padding: 18px 0; }
.pe-toolbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--hair2); border-radius: 8px 8px 0 0; background: var(--surface); }
.pe-tb { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; }
.pe-tb:hover { background: var(--wash); }
.pe-tb[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pe-tb[aria-disabled="true"] { color: var(--muted); opacity: 0.45; cursor: default; background: transparent; }
.pe-tb-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--hair2); }
.pe-toolbar.pe-ro { opacity: 0.6; }
.pe-doc { position: relative; padding: 14px 18px 18px 46px; border: 1px solid var(--hair2); border-top: 0; border-radius: 0 0 8px 8px; background: var(--surface); }
.pe-doc.pe-readonly { background: var(--paper); }
.pe-plus { position: absolute; left: 8px; width: 30px; height: 30px; margin-top: -15px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--ctl-border); border-radius: 50%; background: var(--surface); color: var(--accent); cursor: pointer; }
.pe-plus:hover, .pe-plus[aria-expanded="true"] { background: var(--accent-wash); border-color: var(--accent); }
.pe-pm { min-height: 280px; outline: 0; font-family: var(--serif); font-size: 17px; line-height: 1.6; color: var(--ink); }
.pe-pm > * + * { margin-top: 12px; }
.pe-pm p { margin: 0; }
.pe-pm .pe-h { margin: 22px 0 0; font-size: 21px; font-weight: 600; line-height: 1.3; }
.pe-pm .pe-list { margin: 0; padding-left: 26px; }
.pe-pm .pe-list li + li { margin-top: 4px; }
.pe-pm .pe-verse { white-space: pre-wrap; font-style: italic; padding-left: 20px; }
.pe-pm .pe-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.pe-pm .pe-link-bad { color: var(--ret); text-decoration-style: wavy; }
.pe-placeholder::before { content: attr(data-placeholder); position: absolute; color: var(--muted); font-style: italic; pointer-events: none; }
.pe-quote { margin: 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--hair); }
.pe-quote-text { font-style: italic; }
.pe-quote-a { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.pe-quote-a .input { height: 28px; max-width: 320px; font-size: 13px; }
.pe-dropcursor { background: var(--accent); }
.ProseMirror-selectednode { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
/* Блоки-атомы: фото, альбом, разделитель, ссылка на историю, подпись, незнакомый. */
.pe-nv { position: relative; font-family: var(--sans); font-size: 13px; line-height: 1.45; }
.pe-nv .pe-more { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; background: var(--glass-strong); border: 1px solid var(--hair2); }
.pe-nv[draggable="true"] { cursor: grab; }
.pe-fig { margin: 0; display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 8px; background: var(--paper); }
.pe-fig-img { display: flex; justify-content: center; border-radius: 6px; overflow: hidden; background: var(--wash); }
.pe-fig-img img { display: block; max-width: 100%; max-height: 360px; }
.pe-fig-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.pe-fig-f { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.pe-fig-f .input { height: 30px; font-size: 13px; cursor: text; }
.pe-missing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; width: 100%; color: var(--muted); }
.pe-gal { display: flex; flex-direction: column; gap: 8px; padding: 10px 44px 10px 10px; border-radius: 8px; background: var(--paper); }
.pe-gal-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pe-gal-strip { display: flex; gap: 6px; overflow-x: auto; }
.pe-gal-strip img, .pe-gal-strip .pe-thumb-miss { flex: 0 0 auto; width: 96px; height: 72px; object-fit: cover; border-radius: 4px; }
.pe-thumb-miss { display: inline-flex; align-items: center; justify-content: center; background: var(--wash); color: var(--muted); }
.pe-divider { padding: 10px 44px 10px 0; }
.pe-divider hr { margin: 0; border: 0; border-top: 1px solid var(--hair); }
.pe-story { display: flex; align-items: center; gap: 10px; padding: 10px 44px 10px 12px; border: 1px solid var(--hair2); border-radius: 10px; }
.pe-story .t { display: flex; flex-direction: column; min-width: 0; }
.pe-story small { color: var(--muted); font-size: 11px; }
.pe-story b { font-family: var(--serif); font-size: 15px; }
.pe-story-note { color: var(--active); font-size: 12px; }
.pe-sig { padding: 12px 0 0; border-top: 1px solid var(--hair2); }
.pe-sig-lines { font-family: var(--serif); font-size: 15px; color: var(--text2); }
.pe-sig-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.pe-opaque { padding: 10px 44px 10px 12px; border: 1.5px dashed var(--hair); border-radius: 8px; color: var(--muted); }
/* Предпросмотр на странице публикации. */
.pe-preview { padding: 16px 12px 24px; border-radius: 10px; background: var(--wash); }
/* Проверка текста. */
.pe-check:empty { display: none; }
.pe-check { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.pe-check.ok { background: var(--done-bg); }
.pe-check.ok .pe-check-h { color: var(--done); }
.pe-check.bad { background: var(--ret-bg); border-left: 3px solid var(--ret); }
.pe-check.bad .pe-check-h { color: var(--ret); }
.pe-check-h { margin: 0; font-weight: 500; }
.pe-check-h .ic { vertical-align: -2px; }
.pe-check-note { margin: 0; font-size: 12px; }
.pe-check .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pe-diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pe-diff > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pe-diff q { font-family: var(--serif); font-size: 14px; color: var(--ink); overflow-wrap: anywhere; quotes: none; }
.pe-sec .pe-sec-body { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.pe-basis-meta { margin: 0; font-size: 12px; }
.pe-basis-text { max-height: 50vh; overflow: auto; padding: 12px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--hair2); }
.pe-basis-text mark { background: var(--active-bg); color: var(--ink); box-shadow: 0 0 0 2px var(--active-bg); border-radius: 2px; }
.pe-info { display: flex; flex-direction: column; gap: 12px; max-width: 680px; }
.pe-info .dl { margin: 0; }
.pe-sigpv { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--wash); }
.pe-attr { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pe-warn { color: var(--active); }
.pe-journal li { list-style: none; }
.pe-journal { margin: 0; padding: 0; }
.pe-journal li.ok span:last-child { color: var(--done); }
.pe-busy { background: var(--ink); color: var(--paper); }
/* Окна: альбом, выбор снимка, сравнение версий, создание, утверждение. */
.pe-gal-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pe-gal-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pe-gal-thumb img, .pe-gal-thumb .pe-thumb-miss { display: block; width: 72px; height: 54px; object-fit: cover; border-radius: 4px; }
.pe-gal-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pe-gal-f .input { height: 30px; font-size: 13px; }
.pe-gal-b { display: flex; gap: 2px; }
.pe-gal-empty { padding: 10px 0; font-size: 13px; }
.pe-gal-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.pe-gal-pool summary { cursor: pointer; font-size: 13px; color: var(--text2); }
.pe-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.pe-pick { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid var(--hair2); border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; font-size: 11px; color: var(--muted); }
.pe-pick img, .pe-pick .pe-thumb-miss { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 4px; }
.pe-pick input { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; margin: 0; }
.pe-pick:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }
.pe-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pe-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pe-compare section { min-width: 0; padding: 12px 8px; border-radius: 10px; background: var(--wash); }
.pe-compare h4 { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); text-align: center; }
.pe-review { max-height: 60vh; background: var(--wash); }
.pe-facts { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--hair2); font-size: 13px; }
.pe-facts .muted { margin: 4px 0; }
.pe-create-facts { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 8px; background: var(--wash); font-size: 13px; line-height: 1.45; }
.pe-create-l { margin: 0; }
.pe-create-sig { display: flex; flex-direction: column; gap: 2px; }
.pe-create-facts .notice { margin: 4px 0 0; background: var(--active-bg); color: var(--active); }
/* Предпросмотр «близко к PD App»: колонка ленты шириной iPhone, шрифты и
   отступы — как в App (книжная гарнитура 18, блоки через 18, поля 20). */
.pv-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 auto 8px; max-width: 390px; font-size: 12px; color: var(--muted); }
.pv-h b { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.pv-h .linkbtn { font-size: 12px; }
.pv-limits { max-width: 390px; margin: 0 auto 12px; font-size: 12px; color: var(--muted); }
.pv-limits summary { cursor: pointer; color: var(--text2); }
.pv-limits ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; line-height: 1.45; }
.app-pub { --app-serif: ui-serif, 'New York', Georgia, 'Times New Roman', serif; --app-2: rgba(60,60,67,0.6); max-width: 390px; margin: 0 auto; background: #FFFFFF; color: #000000; border-radius: 22px; overflow: hidden; box-shadow: 0 1px 2px rgba(31,27,22,0.10), 0 8px 28px rgba(31,27,22,0.12); font-family: -apple-system, BlinkMacSystemFont, 'Golos Text', system-ui, sans-serif; }
.app-cover { display: flex; justify-content: center; background: #F2F2F7; }
.app-cover img { display: block; max-width: 100%; max-height: 390px; }
.app-cover .app-missing { aspect-ratio: 1.5; }
.app-cover-none { align-items: center; min-height: 120px; padding: 16px; text-align: center; color: #A62B1D; font-size: 14px; border-bottom: 1px dashed rgba(166,43,29,0.45); }
.app-body { display: flex; flex-direction: column; gap: 18px; padding: 20px 20px 24px; }
.pe-preview .app-body [data-pi] { cursor: pointer; border-radius: 4px; }
@media (hover: hover) { .pe-preview .app-body [data-pi]:hover { box-shadow: 0 0 0 4px rgba(138,72,38,0.10); background: rgba(138,72,38,0.05); } }
.app-head { display: flex; flex-direction: column; gap: 8px; }
.app-title { margin: 0; font-family: var(--app-serif); font-size: 28px; font-weight: 700; line-height: 1.2; }
.app-title.empty { color: var(--app-2); font-style: italic; font-weight: 400; }
.app-meta { font-size: 15px; color: var(--app-2); }
.app-p, .app-q p, .app-verse, .app-list { margin: 0; font-family: var(--app-serif); font-size: 18px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.app-p a, .app-q a, .app-list a, .app-fig a, .app-gal-c a { color: #007AFF; }
.app-h { margin: 10px 0 0; font-family: var(--app-serif); font-size: 22px; font-weight: 600; line-height: 1.25; }
.app-q { margin: 0; display: flex; flex-direction: column; gap: 8px; padding-left: 17px; border-left: 3px solid rgba(60,60,67,0.30); }
.app-q p { font-style: italic; }
.app-q cite { font-style: normal; font-size: 15px; color: var(--app-2); }
.app-verse { font-style: italic; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; white-space: normal; }
.app-list { padding-left: 26px; display: flex; flex-direction: column; gap: 8px; white-space: normal; }
.app-list li::marker { color: var(--app-2); }
.app-fig { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.app-fig img { display: block; width: 100%; border-radius: 10px; }
.app-fig figcaption { font-size: 13px; line-height: 1.4; color: var(--app-2); }
.app-credit { font-size: 12px; color: var(--app-2); }
.app-sig { padding-top: 10px; display: flex; flex-direction: column; gap: 4px; font-family: var(--app-serif); font-size: 15px; line-height: 1.4; color: var(--app-2); }
.app-sig::before { content: ''; display: block; width: 48px; height: 1px; margin-bottom: 8px; background: rgba(60,60,67,0.29); }
.app-hr { width: 100%; margin: 8px 0; border: 0; border-top: 1px solid rgba(60,60,67,0.29); }
.app-missing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 1.5; width: 100%; background: #F2F2F7; color: var(--app-2); font-size: 15px; text-align: center; padding: 12px; }
.app-missing small { font-size: 11px; overflow-wrap: anywhere; }
.app-skip { padding: 8px 10px; border: 1.5px dashed rgba(60,60,67,0.35); border-radius: 8px; font-size: 13px; line-height: 1.4; color: var(--app-2); }
.app-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: transparent; color: #007AFF; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; align-self: flex-start; }
.app-gal { display: flex; flex-direction: column; gap: 10px; }
.app-gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 10px; background: #F2F2F7; aspect-ratio: 1.5; }
.app-gal-track::-webkit-scrollbar { display: none; }
.app-gal-page { flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: center; justify-content: center; min-width: 0; }
.app-gal-page img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.app-gal-page .app-missing { aspect-ratio: auto; height: 100%; }
.app-gal-nav { display: flex; align-items: center; justify-content: center; gap: 10px; }
.app-gal-nav .btn { width: 32px; height: 32px; }
.app-dots { display: flex; justify-content: center; gap: 5px; }
.app-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(60,60,67,0.35); }
.app-dots i.on { background: #000000; }
.app-gal-n { font-size: 12px; color: var(--app-2); font-variant-numeric: tabular-nums; }
.app-gal-cap { display: flex; flex-direction: column; gap: 2px; }
.app-gal-c { font-size: 13px; line-height: 1.4; color: var(--app-2); }
.app-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 12px; border: 1px solid rgba(60,60,67,0.29); border-radius: 12px; }
.app-link > .ic { color: var(--app-2); flex-shrink: 0; }
.app-link .t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-link small { font-size: 12px; color: var(--app-2); }
.app-link b { font-family: var(--app-serif); font-size: 17px; font-weight: 600; }
.app-link .t span { font-size: 13px; color: var(--app-2); }
.app-plaque { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border: 1px solid rgba(60,60,67,0.18); border-radius: 12px; }
.app-plaque .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; color: var(--app-2); }
.app-plaque .t b { font-family: var(--app-serif); font-size: 15px; font-weight: 600; color: #000000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-plaque .k { font-size: 12px; }
/* Хинди в превью App: системный деванагари iOS (Kohinoor Devanagari), в
   Studio — Noto Serif Devanagari; строки выше, заголовок без сжатия. */
.app-pub:lang(hi) { --app-serif: 'Kohinoor Devanagari', 'Noto Serif Devanagari', 'Devanagari Sangam MN', serif; }
.app-pub:lang(hi) .app-p, .app-pub:lang(hi) .app-q p, .app-pub:lang(hi) .app-verse, .app-pub:lang(hi) .app-list { line-height: 1.75; }
.app-pub:lang(hi) .app-title { line-height: 1.4; }
.app-pub:lang(hi) .app-h { line-height: 1.4; }
@media (max-width: 900px) { .pe-compare { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  /* Панель — под закреплённой мобильной навигацией; цели — 44 px. */
  .pe-toolbar { top: 43px; }
  .pe-tb { width: 44px; height: 44px; }
  .pe-plus { width: 44px; height: 44px; margin-top: -22px; left: 2px; }
  .pe-doc { padding: 12px 12px 16px 50px; }
  .pe-nv .pe-more { width: 44px; height: 44px; }
  .pe-fig-fields, .pe-diff { grid-template-columns: 1fr; }
  .pe-gal-row { grid-template-columns: 56px minmax(0, 1fr); }
  .pe-gal-b { grid-column: 1 / -1; justify-content: flex-end; }
  .pe-gal-b .btn { width: 44px; height: 44px; }
  .pe-title { font-size: 22px; }
  .pe-cover-acts .btn, .pe-notes .acts .btn, .pe-check .acts .btn, .pe-seg .seg-item { min-height: 44px; }
  .pe-preview { padding: 12px 0 20px; background: transparent; }
  .pe-pick input { width: 24px; height: 24px; }
}

/* ---------- Конструктор фирменной обложки (PDA-5) ---------- */
.cc { max-width: 1040px; }
/* Обложка всегда видна целиком слева; панель справа прокручивается сама.
   Размер обложки — по месту в окне: не больше 540 px и не выше окна за
   вычетом заголовка, кнопок и подписи под обложкой. */
.cc { --cc-side: min(540px, calc(100vh - 290px)); }
.cc-body { flex-direction: row; align-items: stretch; gap: 24px; overflow: hidden; flex: 1 1 auto; min-height: 0; }
.cc-stage { flex: 0 0 auto; width: max(240px, var(--cc-side)); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cc-canvas-wrap { position: relative; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--wash); box-shadow: 0 0 0 1px var(--hair2); user-select: none; -webkit-user-select: none; }
.cc-canvas.cc-canvas-quote { cursor: default; }
.cc-canvas.cc-canvas-quote.cc-movable { cursor: ns-resize; }
.cc-canvas.cc-canvas-quote.dragging { cursor: grabbing; }
/* Подсветка элемента, который можно тянуть, — поверх холста, не на нём:
   в файл обложки не попадает. */
/* Подсветка элемента под мышью — тонкая белая обводка с тёмной волосяной
   линией (видна на любом фоне), без заливки; появляется плавно. */
.cc-hit { position: absolute; pointer-events: none; border: 1px solid rgba(255,255,255,0.95); border-radius: 4px; box-shadow: 0 0 0 1px rgba(13,10,7,0.32), 0 1px 4px rgba(13,10,7,0.12); }
.cc-hit:not([hidden]) { animation: cc-fade 0.12s ease-out; }
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cc-hit:not([hidden]) { animation: none; } }
/* «Показать границы» — служебный слой поверх холста, не в файле обложки:
   тонкие линии чернильного синего, нарушения — тонкой красной; подписи —
   маленькие плашки над рамкой, текст обложки не закрывают. */
.cc-bounds { position: absolute; inset: 0; pointer-events: none; }
.cc-bound { position: absolute; border-radius: 3px; }
.cc-bound[data-label]::after { content: attr(data-label); position: absolute; left: -1px; bottom: 100%; margin-bottom: 3px; font-size: 10.5px; line-height: 1.4; padding: 0 5px; border-radius: 3px; white-space: nowrap; background: rgba(255,255,255,0.92); box-shadow: 0 0 0 1px rgba(13,10,7,0.10); }
.cc-bound-field { border: 1px solid rgba(44,77,132,0.55); }
.cc-bound-field::after { color: #2C4D84; }
.cc-bound-off { border-top: 1px solid rgba(44,77,132,0.55); border-radius: 0; background: repeating-linear-gradient(135deg, rgba(44,77,132,0.07) 0 6px, transparent 6px 12px); }
.cc-bound-off[data-label]::after { bottom: auto; top: 4px; left: 6px; margin: 0; color: #2C4D84; }
.cc-bound-bad { border: 1.5px solid rgba(166,43,29,0.85); background: rgba(166,43,29,0.04); }
.cc-bound-bad[data-label]::after { left: auto; right: -1px; color: #A62B1D; }
/* Ручки размера логотипа — маленькие белые кружки по углам (как в Keynote
   и Figma); захват 40×40 px — невидимый, в коде окна. */
.cc-handle { display: none; position: absolute; width: 9px; height: 9px; margin: -5.5px 0 0 -5.5px; background: #fff; border: 1px solid rgba(13,10,7,0.45); border-radius: 50%; box-shadow: 0 1px 3px rgba(13,10,7,0.30); }
.cc-hit-logo .cc-handle { display: block; }
.cc-hit-logo { border-radius: 2px; }
.cc-handle[data-c="nw"] { left: 0; top: 0; } .cc-handle[data-c="ne"] { left: 100%; top: 0; }
.cc-handle[data-c="sw"] { left: 0; top: 100%; } .cc-handle[data-c="se"] { left: 100%; top: 100%; }
.cc-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.cc-canvas.dragging { cursor: grabbing; }
.cc-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cc-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 15px; font-weight: 600; color: var(--muted); background: var(--wash); }
.cc-msg { margin: 0; min-height: 1.4em; font-size: 13px; color: var(--muted); }
.cc-msg.bad { color: var(--ret); }
.cc-under { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-under .btn.on { background: var(--active-bg); color: var(--active); }
.cc-size { font-size: 12px; }
.cc-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }
.cc-sec { display: flex; flex-direction: column; gap: 6px; }
.cc-hook { resize: vertical; font: inherit; }
.cc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cc-note { font-size: 12px; }
.cc-note.bad { color: var(--ret); }
/* «Расположение» — компактный блок вверху панели. */
.cc-place { gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair2); }
.cc-place .cc-auto-place { margin-top: 8px; }
.cc-breaks summary { font-size: 14px; color: var(--ink); font-weight: 600; }
.cc-breaks[open] { gap: 6px; }
/* «Вернуть автоматическое расположение» — заметная, во всю ширину раздела. */
.cc-auto-place { align-self: flex-start; margin-top: 4px; }
/* Подсказка о применимости цитатного шаблона: подходит / с оговоркой / не лучший выбор. */
.cc-hint { display: block; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.cc-hint[data-level="good"] { color: var(--done); background: var(--done-bg); }
.cc-hint[data-level="warn"] { color: var(--wait); background: var(--wait-bg); }
.cc-hint[data-level="weak"] { color: var(--ret); background: var(--ret-bg); }
.cc-sig { margin: 0; font-size: 14px; }
.cc-lines summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 24px; }
.cc-lines[open] summary .ic { transform: rotate(180deg); }
.cc-lines textarea { margin: 6px 0; width: 100%; font: inherit; }
.cc-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--hair2); background: var(--surface); border-radius: 0 8px 8px 0; font-size: 14px; line-height: 1.5; max-height: 220px; overflow: auto; }
.cc-tpl { align-self: flex-start; }
.cc-slider { display: grid; grid-template-columns: 130px minmax(0, 1fr) 84px; align-items: center; gap: 8px; font-size: 13px; }
.cc-slider input { width: 100%; min-height: 24px; }
/* Ползунки окна обложки: тонкая дорожка, заполненная часть — тон ползунков
   (синий — выбор владельца 10.11; галочка и фокус — тем же тоном),
   белый круглый бегунок с тенью. --p — заполнение, ставит окно. Контраст
   заливки к бумаге — больше 3:1 (WCAG 1.4.11). */
.cc { --cc-tone: #2B83D6; --cc-tone-hover: #1F6BB5; --cc-track: rgba(36,28,20,0.16); }
.cc .cc-check input { accent-color: var(--cc-tone); }
.cc-slider input[type=range] { -webkit-appearance: none; appearance: none; height: 24px; background: transparent; cursor: pointer; }
.cc-slider input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--cc-tone) 0 var(--p, 50%), var(--cc-track) var(--p, 50%) 100%); }
.cc-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; border: 1px solid rgba(36,28,20,0.55); box-shadow: 0 1px 3px rgba(13,10,7,0.28); transition: box-shadow 0.12s, transform 0.12s; }
.cc-slider input[type=range]:hover::-webkit-slider-thumb { box-shadow: 0 1px 4px rgba(13,10,7,0.35), 0 0 0 4px rgba(36,28,20,0.08); }
.cc-slider input[type=range]:hover::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--cc-tone-hover) 0 var(--p, 50%), rgba(36,28,20,0.22) var(--p, 50%) 100%); }
.cc-slider input[type=range]:active::-webkit-slider-thumb { transform: scale(1.08); }
.cc-slider input[type=range]:focus-visible { outline: none; }
.cc-slider input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cc-tone); }
.cc-slider input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--cc-track); }
.cc-slider input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--cc-tone); }
.cc-slider input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 1px solid rgba(36,28,20,0.55); box-shadow: 0 1px 3px rgba(13,10,7,0.28); }
.cc-slider input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cc-tone); }
.cc-slider input[type=range]:disabled { cursor: not-allowed; opacity: 0.45; }
@media (prefers-reduced-motion: reduce) { .cc-slider input[type=range]::-webkit-slider-thumb { transition: none; } }
.cc-slider output { font-variant-numeric: tabular-nums; text-align: right; color: var(--muted); }
.cc-check { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 24px; }
.cc-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.cc-pick-text { max-height: 46vh; overflow: auto; padding: 12px 14px; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair2); line-height: 1.55; user-select: text; }
.cc-pick-text p { margin: 0 0 10px; }
.cc-pick-row { margin: 0; }
@media (max-width: 900px) {
  /* Узкое окно: обложка сверху, всегда на виду; панель под ней прокручивается. */
  .cc-body { flex-direction: column; align-items: center; }
  .cc-stage { width: min(100%, 42vh); }
  .cc-side { width: 100%; flex: 1 1 auto; }
  .cc-side .btn, .cc-under .btn { min-height: 44px; }
}

/* Начало цикла (16.11.2026): инструменты текста, выбор версий, права. */
.ed-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; }
.ed-tools .muted { font-size: 12.5px; }
.ed-tools [data-ai-translate][disabled] { opacity: .55; cursor: not-allowed; }
.input-sm { padding: 3px 8px; font-size: 13px; height: auto; max-width: 100%; }
.layer-h .input-sm { font-weight: 600; }
.cmp-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cmp-pick select { max-width: 260px; }
.cmp-pick .warn { color: var(--ret); font-size: 12.5px; }
.ed-rights .h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ed-rights .dl { margin-top: 8px; }
.ed-rights { border: 1px solid var(--hair2); border-radius: 8px; padding: 10px 12px; margin: 12px 0; background: var(--surface); }
.ed-sources { border: 1px solid var(--hair2); border-radius: 8px; padding: 10px 12px; margin: 12px 0; background: var(--surface); }
.ed-sources .h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.src-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.src-list .src-main { font-weight: 500; }
.src-fs { border: 1px solid var(--hair2); border-radius: 8px; padding: 8px 12px 4px; margin: 0 0 10px; }
.src-fs legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.rights-badge { display: inline-block; font-size: 12px; border-radius: 4px; padding: 1px 7px; font-weight: 500; }
.rights-badge.warn { color: var(--active); background: var(--active-bg); }
.rights-badge.bad { color: var(--ret); background: var(--ret-bg); }
.rights-badge.ok { color: var(--done); background: var(--done-bg); }
.pr-warn { color: var(--active); background: var(--active-bg); border-radius: 4px; padding: 3px 7px; margin-top: 6px; font-size: 12.5px; }
@media (max-width: 720px) { .cmp-pick select { max-width: 100%; flex: 1 1 100%; } }

/* ---------- PDA-3, повторная приёмка 17.11: рабочее место текстов ----------
   Одна сетка: ряды — абзацы канала, колонки — выбранные тексты. Каждая
   ячейка стоит на своём месте (grid-area), поэтому ряд растягивается по
   самому длинному тексту, а следующий абзац начинается на одной высоте во
   всех колонках. Прокрутка одна — страница; поля ввода растут по тексту. */
.ws { display: flex; flex-direction: column; gap: 10px; }
.ws-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.ws-bar .seg-item { border: 0; background: transparent; color: var(--accent-ink); font: inherit; font-size: 13px; cursor: pointer; }
.ws-bar .seg-item.on { background: var(--ink); color: var(--paper); }
.ws-bar .seg-item:focus-visible, .ws-tog:focus-visible, .ws-grip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ws-togs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.ws-tog { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--ctl-border); background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.ws-tog.on { background: var(--surface); color: var(--ink); border-color: var(--ctl-border-strong); box-shadow: inset 0 -2px 0 var(--ws-tone, var(--ink)); }
.ws-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ws-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.ws-legend .dirty, .ws-sub .dirty { color: var(--active); }
.ws-hint { margin: 0; font-size: 13px; color: var(--muted); }
.ws-k-original { --ws-tone: var(--ink); } .ws-k-existing { --ws-tone: var(--wait); } .ws-k-machine { --ws-tone: var(--machine); } .ws-k-editor { --ws-tone: var(--accent); }

.ws-grid { display: grid; grid-template-columns: var(--ws-cols); column-gap: 0; align-items: stretch; margin: 0 -10px; }
.ws-grid.resizing { cursor: col-resize; user-select: none; }
.ws-h { position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 8px 18px 9px 10px; background: var(--paper); border-bottom: 2px solid var(--ws-tone); }
.ws-h b { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ws-tone); }
.ws-h .ws-pick { max-width: 100%; height: 28px; font-size: 12px; font-weight: 600; color: var(--ws-tone); }
.ws-sub { font-size: 12px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.ws-take { font-size: 12px; align-self: flex-start; }
.ws-h .seg-sm { align-self: flex-start; margin-top: 2px; }
.ws-h .seg-sm .seg-item { border: 0; background: transparent; font: inherit; font-size: 12px; padding: 2px 8px; color: var(--accent-ink); cursor: pointer; }
.ws-h .seg-sm .seg-item.on { background: var(--ink); color: var(--paper); }
.ws-start { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
/* Граница колонок: тянется мышью или стрелками. Хватательная зона 12 px. */
.ws-grip { position: absolute; top: 4px; bottom: -2px; right: -6px; width: 12px; cursor: col-resize; z-index: 4; touch-action: none; }
.ws-grip::after { content: ''; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: transparent; }
.ws-grip:hover::after, .ws-grip:focus-visible::after, .ws-grid.resizing .ws-grip::after { background: var(--accent); }

.ws-c { position: relative; min-width: 0; padding: 12px 18px 14px 10px; border-bottom: 1px solid var(--hair2); }
.ws-c.last { border-bottom: 0; }
.ws-c + .ws-c, .ws-h + .ws-h { box-shadow: -1px 0 0 var(--hair2); }
.ws-t { font-family: var(--serif); font-size: 16px; line-height: 1.6; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.ws-grid.compare .ws-c[data-r] { cursor: pointer; }
@media (hover: hover) { .ws-grid.compare .ws-c[data-r]:hover { background: var(--accent-wash); } }
.ws-c.on { background: var(--hl) !important; }
.ws-c[data-ws-row-sel]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ws-c .al-flag { top: 2px; right: auto; left: 10px; }
.ws-c .al-flag + .ws-t { padding-top: 12px; }
mark.ws-lone { color: inherit; background: transparent; text-decoration: underline dotted var(--active) 2px; text-underline-offset: 4px; }
/* Правка: поле во всю ячейку, растёт по тексту, без своей прокрутки. */
.ws-edit { display: block; width: 100%; min-height: 3.2em; resize: none; overflow: hidden; margin: -6px 0 -8px -8px; padding: 6px 8px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; font-family: var(--serif); font-size: 16px; line-height: 1.6; color: var(--ink); }
.ws-c.ws-k-editor { background: var(--glass); }
.ws-edit:hover { border-color: var(--hair2); }
.ws-edit:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-wash); }
.ws-edit::placeholder { color: var(--muted); opacity: .5; }
.ws-whole { border-bottom: 0; }
.ws-whole .ws-edit { min-height: 12em; }
/* «в редакцию» у абзаца — видно при наведении и фокусе в ряду; на касании всегда. */
.ws-to-ed { position: absolute; right: 8px; bottom: 4px; display: inline-flex; align-items: center; gap: 3px; min-height: 24px; padding: 0 8px; border: 1px solid var(--ctl-border); border-radius: 999px; background: var(--surface); color: var(--accent-ink); font: inherit; font-size: 11.5px; cursor: pointer; opacity: 0; transition: opacity .12s; }
.ws-c:hover .ws-to-ed, .ws-to-ed:focus-visible { opacity: 1; }
@media (hover: none) { .ws-to-ed { opacity: 1; position: static; margin-top: 6px; } }
.ws-foot { padding: 4px 18px 0 10px; }
@media (prefers-reduced-motion: reduce) { .ws-to-ed { transition: none; } }
/* Узкое окно: абзац за абзацем, тексты ряда друг под другом. */
@media (max-width: 760px) {
  .ws-grid { display: block; margin: 0; }
  .ws-h { position: static; border-bottom-width: 1px; }
  .ws-c { padding: 8px 0; border-bottom: 0; } .ws-c + .ws-c { box-shadow: none; }
  .ws-c[data-ws-row-sel] { border-top: 1px solid var(--hair2); padding-top: 14px; }
  .ws-grip { display: none; }
  .ws-c[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ws-tone); }
  .ws-c[data-label] .al-flag { position: static; display: inline-block; margin-bottom: 4px; }
}

/* Шапка материала: миниатюра поста, этапы сворачиваются. */
.ed-thumb { flex-shrink: 0; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--hair2); background: var(--wash); align-self: center; }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rail-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-mini { display: none; list-style: none; margin: 8px 0 0; padding: 0; flex-direction: column; align-items: center; gap: 14px; }
.editor.rail-shut .editor-rail { width: 48px; padding: 12px 6px; align-items: center; }
.editor.rail-shut .editor-rail > :not(.rail-title):not(.rail-mini) { display: none; }
.editor.rail-shut .rail-title span { display: none; }
.editor.rail-shut .rail-mini { display: flex; }
.rail-mini .dot { display: block; width: 10px; height: 10px; }
.rail-mini li.cur .dot { box-shadow: 0 0 0 3px var(--accent-wash); }

/* Список материалов (17.11): миниатюра поста, компактная карточка, пять
   этапов одной полосой справа. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mcard { align-items: stretch; }
.m-thumb { flex-shrink: 0; width: 88px; margin: 12px 0 12px 14px; height: 88px; border-radius: 8px; overflow: hidden; background: var(--wash); border: 1px solid var(--hair2); cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.m-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-thumb.none { opacity: .7; }
.mcard .m-main { gap: 3px; padding: 11px 18px 11px 16px; }
.mcard .m-title { font-size: 17px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mcard .m-excerpt { font-size: 14.5px; line-height: 1.5; -webkit-line-clamp: 2; }
.mcard .m-meta { margin-top: 1px; font-size: 12.5px; }
.mcard .m-flow { width: 380px; gap: 6px; padding: 12px 16px 10px; }
.m-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
.m-track li { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 11px; line-height: 1.2; color: var(--muted); }
.m-track li > i { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--none-bg); box-shadow: inset 0 0 0 1px var(--track-line); font-style: normal; font-size: 0; }
.m-track li > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-track li.done > i { background: var(--done); box-shadow: none; }
.m-track li.done { color: var(--done); }
.m-track li.cur > i { background: var(--ink); box-shadow: none; }
.m-track li.cur.active > i { background: var(--active); } .m-track li.cur.wait > i { background: var(--wait); } .m-track li.cur.ret > i { background: var(--ret); } .m-track li.cur.done > i { background: var(--done); } .m-track li.cur.pub > i { background: var(--accent); }
.m-track li.cur.none > i { background: repeating-linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 7px); opacity: .55; }
.m-track li.cur > span { color: var(--ink); }
.mcard .m-status { font-size: 13px; gap: 6px; }
.mcard .m-status .w { font-size: 13px; }
.m-status.active .w { color: var(--active); } .m-status.wait .w { color: var(--wait); } .m-status.ret .w { color: var(--ret); } .m-status.done .w { color: var(--done); }
.mcard .m-actions { padding-top: 2px; }
.mcard .m-open { height: 28px; }
@media (max-width: 1100px) { .mcard .m-flow { width: 330px; } .m-thumb { width: 72px; height: 72px; } }
@media (max-width: 720px) { .mcard { flex-wrap: wrap; } .mcard .m-flow { width: 100%; border-left: 0; border-top: 1px solid var(--hair2); } .m-thumb { width: 56px; height: 56px; } }

/* ---- PDA-3, полный пакет 17.11: единый редактор версии редакции ---- */
/* Один редактор на всю колонку; его ряды — строки общей сетки (subgrid),
   поэтому абзац редакции стоит на высоте абзаца канала. */
.ws-ed { display: grid; grid-template-rows: subgrid; min-width: 0; background: var(--glass); box-shadow: -1px 0 0 var(--hair2); outline: none; caret-color: var(--accent); }
.ws-ed:focus-visible { box-shadow: -1px 0 0 var(--hair2), inset 0 0 0 2px var(--accent-wash); }
.ws-er { min-width: 0; padding: 12px 18px 14px 10px; border-bottom: 1px solid var(--hair2); font-family: var(--serif); font-size: var(--ws-fs, 16px); line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.ws-er.last { border-bottom: 0; }
.ws-er.on { background: var(--hl); }
.ws-er p { margin: 0; }
.ws-er p + p { margin-top: 0.8em; }
/* Пустой ряд: тонкая подсказка, где можно писать. */
.ws-ed[contenteditable="true"] .ws-er:only-child p:only-child:has(> br:only-child)::before,
.ws-ed[contenteditable="true"] .ws-er > p:only-child:has(> br:only-child)::before { content: '·'; color: var(--hair); position: absolute; pointer-events: none; }
.ws-ed[contenteditable="true"] .ws-er { position: relative; cursor: text; }
.ws-t { font-size: var(--ws-fs, 16px); }
.ws-base { font-size: 12px; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
.ws-start { flex-wrap: wrap; }
.ws-start span { color: var(--muted); }
.ws-tip { color: var(--muted); }
@media (hover: none) { .ws-tip { display: none; } }
/* Ручная поправка сопоставления — у выделенного ряда. */
.ws-fix { display: inline-flex; gap: 4px; margin-top: 6px; }
.ws-fix button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 26px; border: 1px solid var(--ctl-border); border-radius: 6px; background: var(--surface); color: var(--accent-ink); cursor: pointer; }
.ws-fix button:hover { border-color: var(--accent); }
.ws-fix button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 760px) {
  .ws-ed { display: block; box-shadow: none; border-top: 2px solid var(--accent); margin-top: 12px; }
  .ws-er { padding: 8px 0; }
}
/* Размер текста в колонках. */
.ws-fs { display: inline-flex; gap: 2px; }
.ws-fs .btn { min-width: 32px; padding: 0 6px; font-family: var(--serif); font-weight: 600; }
.ws-fs small { font-size: 11px; margin-left: 1px; }
/* Свёрнутое левое меню: только значки (как на узком экране). */
html.side-shut { --sidebar: 56px; }
html.side-shut .sidebar { padding: 16px 8px; }
html.side-shut .sidebar .brand { justify-content: center; padding: 4px 0 18px; }
html.side-shut .sidebar .brand img { width: 30px; height: 30px; }
html.side-shut .sidebar .brand .name, html.side-shut .sidebar .brand .sub, html.side-shut .sidebar .nav-item span, html.side-shut .sidebar .nav-sect, html.side-shut .sidebar .user .who, html.side-shut .sidebar .storage-note, html.side-shut .side-data span, html.side-shut .side-data .chev { display: none; }
html.side-shut .side-data, html.side-shut .sidebar .user { justify-content: center; padding: 0; height: 36px; }
html.side-shut .sidebar .nav-item { justify-content: center; padding: 0; }
html.side-shut .main-note { display: flex; }
html.side-shut .side-row { flex-direction: column; align-items: stretch; }
html.side-shut .theme-sw { justify-content: center; background: transparent; }
html.side-shut .theme-sw button[aria-checked=false] { display: none; }
html.side-shut .theme-sw button { width: 36px; height: 32px; margin: 0 auto; }
.side-shut-btn { color: var(--side-muted); }
@media (max-width: 1100px) { .side-shut-btn { display: none; } }
/* Одна история из нескольких постов канала (ТЗ 17.11.2026, PDA-3 п.2) */
.merge-note, .merge-ask { margin: 0 0 12px; font-size: 13px; line-height: 1.45; color: var(--ink, inherit); }
.merge-ask { background: var(--active-bg); }
.merge-ask p { margin: 0 0 6px; }
.merge-why { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.merge-why ul { margin: 4px 0 0; padding-left: 18px; }
.merge-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* «Читатели» (App#2, PD-030): числа с сервера и праздничные публикации. */
.rd-nodata { color: var(--muted); font-size: 14px; font-weight: 400; font-style: italic; }
.rd-warn { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--active-bg); color: var(--text2); margin: 0 0 12px; max-width: 90ch; }
.rd-hint { font-size: 12px; margin: 0 0 12px; max-width: 80ch; }
.rd-period { flex-direction: row; align-items: center; gap: 6px; }
.rd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 18px; }
.rd-tile { border: 1px solid var(--hair2); border-radius: 10px; background: var(--surface); padding: 12px 14px; min-width: 0; }
.rd-k { font-size: 12px; color: var(--muted); }
.rd-v { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.2; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.rd-next .rd-v { font-size: 22px; }
.rd-s { font-size: 12px; }
.rd-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; }
@media (max-width: 900px) { .rd-two { grid-template-columns: minmax(0, 1fr); } }
.rd-sec { margin-bottom: 22px; min-width: 0; }
.rd-sec h2 { font-size: 16px; margin: 0 0 8px; }
.rd-sec h3 { font-size: 14px; margin: 14px 0 8px; }
.rd-sech { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rd-chart { margin: 0; border: 1px solid var(--hair2); border-radius: 10px; background: var(--surface); padding: 10px; color: var(--accent); }
.rd-chart svg { display: block; width: 100%; height: 160px; }
.rd-chart figcaption { font-size: 12px; margin-top: 6px; }
.rd-empty { display: flex; align-items: center; justify-content: center; min-height: 80px; margin: 0; }
.rd-countries { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rd-countries li { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; align-items: center; gap: 8px; font-size: 13px; }
.rd-bar { height: 8px; border-radius: 4px; background: var(--wash); overflow: hidden; }
.rd-bar span { display: block; height: 100%; background: var(--accent); }
.rd-cv { font-variant-numeric: tabular-nums; color: var(--muted); }
.rd-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.rd-switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.rd-events { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rd-events li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--hair2); border-radius: 8px; background: var(--surface); }
.rd-left { margin-left: auto; font-size: 12px; }
.rd-due { display: flex; gap: 6px; align-items: flex-start; padding: 8px 12px; border-radius: 8px; background: var(--wait-bg); color: var(--text2); margin: 0 0 10px; }
.badge { display: inline-block; font-size: 12px; border-radius: 4px; padding: 1px 7px; font-weight: 500; }
.badge.b-done { color: var(--done); background: var(--done-bg); }
.badge.b-wait { color: var(--wait); background: var(--wait-bg); }
.badge.b-ret { color: var(--ret); background: var(--ret-bg); }
.badge.b-none { color: var(--none); background: var(--none-bg); }
.rd-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rd-card { border: 1px solid var(--hair2); border-radius: 10px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.rd-prev { display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.rd-prev canvas, .rd-eprev { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.rd-cmeta { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 6px; font-size: 13px; }
.rd-cmeta .badge { align-self: flex-start; margin-top: 4px; }
.rd-rights { font-size: 12px; }
.rd-cact { padding: 0 12px 12px; display: flex; gap: 6px; }
.rd-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rd-eprev { border-radius: 8px; }
@media (max-width: 700px) { .rd-edit { grid-template-columns: minmax(0, 1fr); } }
.rd-warn > span, .rd-due > span { flex: 1; min-width: 0; }
.rd-warn .ic, .rd-due .ic { flex-shrink: 0; margin-top: 3px; }

/* ---------- «Календарь» — вайшнавский календарь GCAL (19.11.2026) ---------- */
.vc .topbar, .vc .content { padding-left: max(var(--gutter), calc((100% - var(--page-max)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--page-max)) / 2)); }
/* Город, год и управление закреплены при прокрутке (решение владельца 19.11.2026). */
.vc .topbar { position: sticky; top: var(--vc-stick, 0px); z-index: 30; }
.vc-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 18px; margin: 4px 0 6px; padding: 8px 12px; border: 1px solid var(--hair); border-radius: 10px; background: var(--surface); font-size: 12.5px; line-height: 1.4; }
.vc-legend dt { font-weight: 600; color: var(--ink); }
.vc-legend dd { margin: 0; color: var(--text2); }
.vc-swh { display: flex; flex-direction: column; gap: 0; flex: 1 1 160px; min-width: 0; }
.vc-swh .hint { font-size: 12px; line-height: 1.35; }
.vc-year { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.vc-place select { font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--hair); border-radius: 6px; padding: 1px 4px; min-height: 28px; cursor: pointer; }
.vc-year b { min-width: 44px; text-align: center; font-size: 15px; }
.vc-year .btn { min-width: 32px; min-height: 32px; font-size: 18px; }
.vc-src { margin: 0 0 12px; font-size: 13px; }
.vc-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 8px; }
.vc-count { font-size: 13px; margin: 6px 0 4px; }
.vc-empty { padding: 24px 0; }
.vc-clash { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text2); background: var(--wait-bg); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.vc-month h2, .vc-soon h2 { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 22px 0 6px; }
.vc-list, .vc-soon-list, .vc-stories { list-style: none; margin: 0; padding: 0; }
.vc-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--hair); }
.vc-row.today { background: var(--accent-wash); border-radius: 8px; }
.vc-date { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.vc-date b { font-size: 19px; font-variant-numeric: tabular-nums; }
.vc-date span { font-size: 12px; color: var(--muted); }
.vc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 0; color: var(--ink); font: inherit; cursor: pointer; min-height: 44px; justify-content: center; }
.vc-main:hover .vc-title { text-decoration: underline; text-underline-offset: 3px; }
.vc-title { font-size: 15px; font-weight: 500; }
.vc-row.on .vc-title { font-weight: 650; }
.vc-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.vc-tag { display: inline-flex; padding: 1px 7px; border-radius: 999px; background: var(--wash); color: var(--text2); font-size: 12px; }
.vc-tag.g-lord, .vc-chip.g-lord { background: var(--accent-wash); color: var(--accent-ink); }
.vc-tag.g-prabhupada, .vc-chip.g-prabhupada { background: var(--done-bg); color: var(--done); }
.vc-tag.g-ekadashi, .vc-chip.g-ekadashi { background: var(--active-bg); color: var(--active); }
.vc-tag.g-caturmasya, .vc-chip.g-caturmasya { background: var(--wait-bg); color: var(--wait); }
.vc-fast { color: var(--text2); }
.vc-sws { display: flex; gap: 14px; }
.vc-sw { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--text2); min-height: 32px; }
.vc-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vc-sw-t { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--ctl-border); transition: background .15s; flex: none; }
.vc-sw-t::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .3); transition: transform .15s; }
.vc-sw input:checked + .vc-sw-t { background: var(--done); }
.vc-sw input:checked + .vc-sw-t::after { transform: translateX(14px); }
.vc-sw input:focus-visible + .vc-sw-t { outline: 2px solid var(--accent); outline-offset: 2px; }
.vc-sw.exc .vc-sw-l::after { content: ' ·'; color: var(--accent); font-weight: 700; }
.vc-soon { background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; padding: 4px 16px 10px; margin-bottom: 6px; }
.vc-soon h2 { margin-top: 12px; }
.vc-soon-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.vc-soon-list li:last-child .vc-soon-row { border-bottom: 0; }
.vc-left { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vc-left.warn { color: var(--wait); font-weight: 600; }
.vc-flags { font-size: 12.5px; color: var(--text2); }
.vc-ready { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--ret-bg); color: var(--ret); }
.vc-ready.ok { background: var(--done-bg); color: var(--done); }
.vc-monthbar { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; }
.vc-monthbar h2 { font-family: var(--serif); font-size: 20px; margin: 0; min-width: 170px; text-align: center; }
.vc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
.vc-wh { font-size: 12px; color: var(--muted); padding: 6px 8px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); background: var(--wash); }
.vc-cell { min-height: 108px; padding: 4px 5px 6px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; gap: 3px; min-width: 0; background: var(--surface); }
.vc-cell.out { background: var(--paper); }
.vc-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.vc-dn { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vc-chip { display: block; width: 100%; text-align: left; border: 0; border-radius: 5px; padding: 2px 6px; font: inherit; font-size: 12px; line-height: 1.3; background: var(--wash); color: var(--text2); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 22px; }
.vc-chip.on { outline: 1.5px solid currentColor; font-weight: 600; }
.vc-chip.main { font-weight: 700; }
.vc-more { font-size: 11.5px; }
.vc-detail .vc-d-meta { margin: 0 0 4px; }
.vc-detail .vc-d-gcal { margin: 0 0 12px; font-size: 12px; }
.vc-detail > .field + .field { margin-top: 10px; }
.vc-detail .hint { font-size: 12.5px; line-height: 1.4; }
.vc-detail .vc-two { margin-bottom: 10px; }
.vc-fs { border: 1px solid var(--hair); border-radius: 10px; padding: 8px 12px 10px; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.vc-fs legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.vc-tri { flex: 1 1 150px; margin: 0; }
.vc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vc-stories li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.vc-stories { margin: -4px 0 12px; }
.vc-d-hint { font-size: 12.5px; margin: 8px 0 0; }
@media (max-width: 900px) {
  .vc-row { grid-template-columns: 44px minmax(0, 1fr); }
  .vc-sws { grid-column: 2; gap: 12px; flex-wrap: wrap; }
  .vc-soon-row { grid-template-columns: 1fr auto; }
  .vc-soon-row .vc-flags { display: none; }
  .vc-cell { min-height: 64px; }
  .vc-chip { font-size: 10.5px; padding: 1px 3px; }
  .vc-two { grid-template-columns: 1fr; }
  .vc-legend { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* под липкой строкой меню телефона; шапка календаря сжимается до одной-двух строк */
  .vc { --vc-stick: 43px; }
  .vc .topbar { gap: 6px 10px; padding-top: 6px; padding-bottom: 6px; min-height: 0; }
  .vc .topbar h1 { font-size: 20px; }
}

/* ---------- Уведомления (PD-023, 19.11.2026) ---------- */
.lseg a { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px; border-radius: 6px; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.lseg a .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.lseg a.on { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.lseg a.on .n { color: var(--on-ink-acc); }
.ntf-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ntf-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; background: var(--none-bg); color: var(--text2); }
.ntf-pill.ok { background: var(--done-bg); color: var(--done); }
.ntf-pill.off { background: var(--active-bg); color: var(--active); }
.ntf-chip { flex-shrink: 0; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ntf-chip.none { color: var(--none); background: var(--none-bg); } .ntf-chip.ok { color: var(--done); background: var(--done-bg); }
.ntf-chip.wait { color: var(--wait); background: var(--wait-bg); } .ntf-chip.done { color: var(--done); background: var(--done-bg); } .ntf-chip.off { color: var(--muted); background: var(--none-bg); }
.ntf-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ntf-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--surface); }
.ntf-item.off { opacity: 0.6; }
.ntf-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.ntf-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.ntf-thumb.none { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--wash); color: var(--muted); }
.ntf-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ntf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ntf-t { font-weight: 600; }
.ntf-b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.ntf-meta { font-size: 12.5px; }
.ntf-pub { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--accent-ink); white-space: nowrap; }
.ntf-date { width: 150px; flex-shrink: 0; font-variant-numeric: tabular-nums; color: var(--text2); }
.ntf-cal-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.ntf-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border-radius: 10px; overflow: hidden; }
.ntf-table th, .ntf-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--hair2); vertical-align: top; }
.ntf-table th { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.ntf-table tr.off { opacity: 0.55; }
.ntf-table input[type=checkbox] { width: 20px; height: 20px; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--accent-ink); cursor: pointer; text-align: left; }
.ntf-dl-mode { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 12px; font-weight: 600; background: var(--wait-bg); color: var(--wait); }
.ntf-dl-mode.live { background: var(--done-bg); color: var(--done); }
.ntf-dl { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.ntf-dl li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.ntf-dl-err { color: var(--ret); }
.ntf-rules { display: grid; gap: 14px; max-width: 720px; }
.ntf-sw { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.ntf-sw input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; }
.ntf-sw span { display: flex; flex-direction: column; gap: 2px; }
.ntf-h { margin: 6px 0 -6px; font-size: 15px; }
.ntf-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
/* Форма уведомления: поля слева, предпросмотр справа. */
.langbar.ntf-langbar { margin: 4px 0 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ntf-langbar .lb-item { min-width: 0; font: inherit; text-align: left; cursor: pointer; }
.ntf-langbar .lb-name { min-width: 0; }
.ntf-langbar .lb-mid { flex-wrap: wrap; row-gap: 4px; }
[data-ntf-langpart] { display: grid; gap: 12px; min-width: 0; }
.ntf-gets { margin: 2px 0 8px; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 12.5px; }
.ntf-lang-acts { padding-top: 2px; }
.ip-wrap:lang(hi) .ip-title, .ip-wrap:lang(hi) .ip-body { font-family: 'Kohinoor Devanagari', 'Noto Sans Devanagari', system-ui, sans-serif; line-height: 1.5; }
.ntf-form { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.ntf-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.ntf-when { min-width: 0; }
.ntf-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.ntf-kind { font-size: 12.5px; color: var(--muted); }
.ntf-body { resize: vertical; min-height: 92px; }
.ntf-count { font-weight: 400; font-variant-numeric: tabular-nums; }
.ntf-redraft { justify-self: start; }
.ntf-hint { margin: -4px 0 0; font-size: 13px; }
.ntf-warn { margin: 0; font-size: 13px; color: var(--active); }
.ntf-notes:empty { display: none; }
.ntf-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.ntf-check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.ntf-check input[type=checkbox], .ntf-check input[type=radio] { width: 18px; height: 18px; }
.ntf-inline { display: inline-flex; align-items: center; gap: 8px; }
.ntf-inline .input { width: auto; }
.ntf-when { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.ntf-at { width: auto; margin-left: 4px; }
.ntf-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ntf-empty { display: grid; gap: 10px; justify-items: start; }
.ntf-modal .modal { width: 100%; }
@media (max-width: 860px) { .ntf-form { grid-template-columns: minmax(0, 1fr); } .ntf-when .ntf-check { flex-wrap: wrap; max-width: 100%; } .ntf-at { max-width: 100%; } .ntf-date { width: auto; } .ntf-item { flex-wrap: wrap; } }
/* Предпросмотр iPhone: вид iOS, под тему Studio не перекрашивается. */
.ip-wrap { display: grid; gap: 28px; justify-items: center; }
.ip-phone { position: relative; width: 280px; border-radius: 40px; padding: 14px 10px 16px; background: linear-gradient(160deg, #3b2a1e 0%, #7a4b2c 45%, #1f2a3c 100%); box-shadow: 0 0 0 7px #111, 0 10px 30px rgba(0,0,0,0.25); font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif; color: #fff; }
.ip-island { width: 86px; height: 24px; margin: 0 auto 10px; border-radius: 14px; background: #000; }
.ip-lock { text-align: center; margin-bottom: 18px; }
.ip-date { font-size: 13px; font-weight: 600; opacity: 0.9; }
.ip-time { font-size: 62px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.ip-banner { display: flex; gap: 9px; align-items: flex-start; padding: 10px 11px; border-radius: 18px; background: rgba(245,242,238,0.78); backdrop-filter: blur(18px); color: #111; }
.ip-icon { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
.ip-txt { flex: 1; min-width: 0; }
.ip-head { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: rgba(0,0,0,0.5); }
.ip-app { text-transform: uppercase; letter-spacing: 0.2px; }
.ip-title { font-size: 14px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-body { font-size: 13.5px; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ip-body-full { -webkit-line-clamp: 12; }
.ip-thumb { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; flex-shrink: 0; align-self: center; }
.ip-expanded { padding-bottom: 12px; background: linear-gradient(160deg, #2a2a2e, #141418); }
.ip-card { border-radius: 18px; overflow: hidden; background: rgba(245,242,238,0.92); color: #111; }
.ip-photo { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.ip-card-txt { padding: 10px 12px 12px; display: grid; gap: 2px; }
.ip-cap { margin-top: 8px; text-align: center; font-size: 11px; opacity: 0.7; }
@media (max-width: 860px) {
  .ntf .topbar .actions { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ntf .lseg { flex-wrap: nowrap; }
  .ntf .content, .ntf .topbar { min-width: 0; max-width: 100%; }
  .ntf-item { flex-wrap: wrap; }
  .ntf-open { flex-basis: 100%; }
  .ntf-table { display: block; overflow-x: auto; }
}
