/* Стили экранов */

.page-date { margin: 0; color: var(--muted); font-weight: 600; }

/* Коробочки */
.box {
  padding: 14px 16px 8px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--box-later);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.box-today { border-left-color: var(--box-today); }
.box-week { border-left-color: var(--box-week); }
.box-nextWeek { border-left-color: var(--box-next); }
.box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.box-head h2 { margin: 0; font-size: var(--fs-lg); }
.count { color: var(--muted); font-size: var(--fs-md); font-weight: 600; white-space: nowrap; }
.count.is-over { color: var(--danger); }
.box-hint { margin: 4px 0 6px; font-size: var(--fs-sm); color: var(--muted); }
.done-today summary { min-height: 40px; display: flex; align-items: center; color: var(--muted); cursor: pointer; }

/* «Сейчас» */
.now-card { border: 2px solid var(--accent); }
.now-card.is-empty { border: 2px dashed var(--border); }
.now-label { margin: 0 0 4px; color: var(--accent); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.now-title { display: block; color: var(--text); font-size: var(--fs-xl); font-weight: 600; line-height: 1.3; text-decoration: none; }
.now-why { margin: 6px 0 0; font-size: var(--fs-md); }

/* Разбор входящих */
.kind-result { margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: var(--fs-md); }

/* Проекты */
.project-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.project-row { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; }
.project-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.project-step { font-size: var(--fs-md); }
.archive summary { min-height: 40px; display: flex; align-items: center; color: var(--muted); cursor: pointer; }
.checkpoint.is-due { border: 2px solid var(--box-week); }
.checkpoint summary { min-height: 28px; cursor: pointer; }
.plan-list, .journal { margin: 8px 0 0; padding: 0; list-style: none; }
.plan-item { display: flex; align-items: center; gap: 6px; min-height: 48px; border-top: 1px solid var(--border); }
.plan-item:first-child { border-top: 0; }
.plan-item > span, .plan-item > label { flex: 1; min-width: 0; margin: 0; }
.journal li { padding: 8px 0; border-top: 1px solid var(--border); font-size: var(--fs-md); }
.journal li:first-child { border-top: 0; }
.journal-meta { display: block; color: var(--muted); font-size: var(--fs-xs); }

/* Подключения */
.connector-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.connector-head h2 { margin: 0; font-size: var(--fs-lg); }
.connector-message { margin: 12px 0 0; color: var(--muted); font-size: var(--fs-md); }
.connector-message.is-error { color: var(--danger); }
.profile-list { margin: 12px 0 0; padding: 0; list-style: none; }
.profile-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.profile-row:first-child { border-top: 0; }
.profile-main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.profile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 12px; }
.preset { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); text-align: left; cursor: pointer; }
.preset:hover { border-color: var(--accent); }
.preset-name { font-weight: 600; }

/* Мастер первого запуска */
.wizard { max-width: 560px; margin: 0 auto; }
.wizard > * + * { margin-top: 14px; }
.wizard-dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wizard-dots li { width: 28px; height: 4px; border-radius: 2px; background: var(--border); }
.wizard-dots .is-done { background: var(--accent-soft); }
.wizard-dots .is-current { background: var(--accent); }
.wizard-title { margin: 0; font-size: var(--fs-2xl); }
.lead { font-size: var(--fs-lg); }
.wizard-points { margin: 0; padding-left: 20px; }
.wizard-points li + li { margin-top: 6px; }

/* Демо-режим и экраны без навигации */
.demo-banner { padding: calc(var(--safe-top) + 6px) 16px 6px; background: var(--warn-soft); font-size: var(--fs-sm); text-align: center; }
.demo-banner + .topbar { padding-top: 8px; }
.shell.is-bare { display: block; }
/* Без меню (вход, регистрация, приглашение, мастер): середина – в высоту экрана и прокручивается, иначе длинная форма обрезалась */
.shell.is-bare > .main { height: 100%; overflow-y: auto; }
.shell.is-bare .rail, .shell.is-bare .panel,
.shell.is-bare .tabbar,
.shell.is-bare .fab,
.shell.is-bare .topbar { display: none; }
.shell.is-bare .view { padding-top: calc(var(--safe-top) + 20px); padding-bottom: calc(var(--safe-bottom) + 32px); }

@media (min-width: 900px) {
  .toast { bottom: 32px; }
  .sheet { margin: auto; border-radius: var(--radius); }
}

/* Ассистент: Claude по подписке */
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.instructions-text { width: 100%; margin-top: 8px; font-size: var(--fs-sm); line-height: 1.4; resize: none; }

/* Чат ассистента */
.claude-card summary { cursor: pointer; }
.sort-row { display: flex; align-items: center; gap: 10px; }
.sort-select { width: auto; min-width: 180px; }

/* Поиск */
.search-bar { display: grid; gap: 8px; }
.search-input { font-size: var(--fs-lg); }
.search-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.search-results { display: grid; gap: 12px; }
.search-list { list-style: none; margin: 0; padding: 0; display: grid; }
.search-hit { display: grid; gap: 2px; padding: 10px 4px; border-bottom: 1px solid var(--surface-2); color: var(--text); text-decoration: none; }
.search-hit:hover, .search-hit:focus-visible { background: var(--surface-2); }
.search-title { font-weight: 600; }
.search-snippet { color: var(--muted); font-size: var(--fs-sm); }
.search-results mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

/* «По времени»: дела на день и встречи */
.box-schedule { border-left-color: var(--accent); }
.schedule-list { list-style: none; margin: 0; padding: 0; display: grid; }
.schedule-row, .missed-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--surface-2); }
.schedule-row.is-past { opacity: 0.55; }
.schedule-time { min-width: 92px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); font-size: var(--fs-base); }
.schedule-main { flex: 1; display: grid; gap: 2px; color: var(--text); text-decoration: none; min-width: 0; }
.missed { border: 1px solid color-mix(in oklch, var(--danger) 45%, var(--border)); }
.missed-row { flex-wrap: wrap; }
.when-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.when-row .input { width: auto; flex: 1 1 120px; }
/* Дата – строкой, время «с – до» – второй строкой: в узком окне ничего не вылезает */
.when-row > .input[type="date"] { flex: 1 1 100%; min-width: 0; }
.when-row > .input[type="time"] { flex: 1 1 0; min-width: 0; }
.missed-row .schedule-main { flex: 1 1 100%; }

/* Календарь */

/* План дня и недели */
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; }
.plan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--surface-2); }
.plan-row a { color: var(--text); flex: 1; min-width: 140px; text-decoration: none; }
.plan-row a:hover { color: var(--accent); }
.plan-row.is-fixed { color: var(--muted); }
.plan-row.is-unplaced a { color: var(--muted); }
.notice-plan { background: var(--warn-soft); color: var(--warn); }

/* Занятость из календарей-подписок */
.schedule-row.is-busy .schedule-time, .cal-item.is-busy .cal-time { color: var(--muted); }
.schedule-row.is-busy .task-title { color: var(--muted); }
.cal-swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }

/* Экран фокуса */
.still-working { border: 1px solid var(--warn); }

/* Итоги: графики и таблица */
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-md); }
.bar-track { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 0 5px 5px 0; background: var(--accent); }
.bar-value { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.spark-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.spark-figure { margin: 0; display: grid; gap: 4px; }
.sparkline { width: 100%; height: 56px; display: block; }
.spark-base { stroke: var(--surface-2); stroke-width: 1; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.day-bar { fill: var(--accent); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 4px 6px; border-bottom: 1px solid var(--surface-2); text-align: left; }
.checkin { border: 1px solid var(--accent); }

/* Карточка задачи как в TickTick (7.5 Б) */
.task-head { display: grid; gap: 8px; }
.task-kind { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.task-head-row { display: flex; align-items: flex-start; gap: 8px; }
.task-head-row > .check { margin-top: 6px; flex: none; }
.title-input {
  flex: 1; min-width: 0; resize: none; overflow: hidden; padding: 4px 0; border: 0; background: none; color: var(--text);
  font: inherit; font-size: var(--fs-xl); font-weight: 600; line-height: 1.3;
}
.title-input:focus { outline: none; box-shadow: inset 0 -2px 0 var(--accent); }
.status-btn {
  flex: none; display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.status-btn .icon svg { width: 14px; height: 14px; }
.status-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.status-btn.is-paused { border-color: var(--warn); color: var(--warn); }
.status-btn.is-done { color: var(--muted); }
.meta-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 32px; max-width: 100%; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.meta-chip .icon svg { width: 16px; height: 16px; }
.meta-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-chip.is-empty { padding: 4px 8px; color: var(--muted); border-style: dashed; }
.meta-chip.is-accent { border-color: var(--accent); color: var(--accent); }
.meta-chip.is-danger { border-color: var(--danger); color: var(--danger); }
.meta-chip.is-warn { border-color: var(--warn); color: var(--warn); }
.meta-chip:hover { background: var(--surface-2); }
.task-body { display: grid; gap: 12px; }
.notes-input { min-height: 72px; }
.attachments-inline { display: grid; gap: 6px; }
.attachments-actions { display: flex; gap: 4px; }
.chip.is-tag { color: var(--accent); }
.action-bar {
  /* Статично под заголовком (ROADMAP 17): не перекрывает поля, когда пишешь */
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.action-bar .btn { display: inline-flex; align-items: center; gap: 6px; }
.action-bar-gap { flex: 1; }
.shell[data-route="task"] .fab { display: none; }
.status-btn { margin-top: 0; min-height: 32px; }
.task-head-row .ai-btn { flex: none; }

/* Канбан (7.5 В) */
.kanban-wrap { display: grid; gap: 8px; }
.kanban-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kanban {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(78vw, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
@media (min-width: 600px) { .kanban { grid-auto-columns: minmax(240px, 280px); } }
.kanban-col {
  display: flex; flex-direction: column; gap: 8px; min-height: 120px; padding: 10px; border-radius: var(--radius);
  background: var(--surface-2); scroll-snap-align: start; transition: box-shadow 0.15s;
}
.kanban-col.is-over { box-shadow: inset 0 0 0 2px var(--accent); }
.kanban-col-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: var(--fs-md); }
.kanban-card {
  display: flex; align-items: flex-start; gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); user-select: none; -webkit-user-select: none;
}
.kanban-card.is-dragging { opacity: 0.35; }
.kanban-ghost { position: fixed; z-index: 100; pointer-events: none; box-shadow: var(--shadow); transform: rotate(2deg); }
.kanban-handle { flex: none; width: 24px; padding: 6px 0; color: var(--muted); text-align: center; cursor: grab; touch-action: none; }
.kanban-card-body { flex: 1; min-width: 0; }
.kanban-open { display: grid; gap: 2px; width: 100%; padding: 4px 2px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.kanban-open.is-done .kanban-title { color: var(--muted); text-decoration: line-through; }
.kanban-title { font-weight: 600; overflow-wrap: anywhere; }
.kanban-meta { color: var(--muted); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.kanban-move { flex: none; width: 32px; height: 32px; }
.kanban-empty { margin: 8px 4px; }
.kanban-columns-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kanban-columns-edit li { display: flex; gap: 4px; align-items: center; }
.kanban-columns-edit .input { flex: 1; min-width: 0; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.segment { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.segment .icon svg { width: 16px; height: 16px; }
.segment[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.meta-chip.is-static { cursor: default; }
.meta-chip.is-static:hover { background: none; }
a.meta-chip { text-decoration: none; }
.shell[data-route="project"] .fab { display: none; }
/* Канбан на широком экране – во всю ширину (остальное на экране – по центру, как было) */
@media (min-width: 900px) {
  .view:has(.kanban) { max-width: none; }
  .view:has(.kanban) > :not(.kanban-wrap):not(:has(.kanban)) { max-width: var(--content-w); margin-left: auto; margin-right: auto; }
  .shell.is-full .view > * { max-width: none !important; }
  .kanban { grid-auto-columns: minmax(220px, 1fr); }
}
.task-meta .is-tag { color: var(--accent); }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-row > .chips { display: contents; }

/* Заметки Anytype (этап 8): цвета типов и тегов как в самом Anytype */
.any-grey { --any-bg: #f1f0ee; --any-fg: #78756e; }
.any-yellow { --any-bg: #fefce8; --any-fg: #a16207; }
.any-orange { --any-bg: #fff7ed; --any-fg: #c2410c; }
.any-red { --any-bg: #fef2f2; --any-fg: #dc2626; }
.any-pink { --any-bg: #fdf2f8; --any-fg: #db2777; }
.any-purple { --any-bg: #faf5ff; --any-fg: #9333ea; }
.any-blue { --any-bg: #eff6ff; --any-fg: #2563eb; }
.any-ice { --any-bg: #f0f9ff; --any-fg: #0284c7; }
.any-teal { --any-bg: #f0fdfa; --any-fg: #0d9488; }
.any-lime { --any-bg: #f7fee7; --any-fg: #4d7c0f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .any-grey { --any-bg: #2c2b30; --any-fg: #a6a39d; }
  :root:not([data-theme="light"]) .any-yellow { --any-bg: #3a3212; --any-fg: #fde047; }
  :root:not([data-theme="light"]) .any-orange { --any-bg: #432a12; --any-fg: #fdba74; }
  :root:not([data-theme="light"]) .any-red { --any-bg: #421e1e; --any-fg: #fca5a5; }
  :root:not([data-theme="light"]) .any-pink { --any-bg: #4a1d34; --any-fg: #f9a8d4; }
  :root:not([data-theme="light"]) .any-purple { --any-bg: #301848; --any-fg: #d8b4fe; }
  :root:not([data-theme="light"]) .any-blue { --any-bg: #182a4a; --any-fg: #93c5fd; }
  :root:not([data-theme="light"]) .any-ice { --any-bg: #132b3d; --any-fg: #7dd3fc; }
  :root:not([data-theme="light"]) .any-teal { --any-bg: #0f3d38; --any-fg: #5eead4; }
  :root:not([data-theme="light"]) .any-lime { --any-bg: #283a12; --any-fg: #bef264; }
}
:root[data-theme="dark"] .any-grey { --any-bg: #2c2b30; --any-fg: #a6a39d; }
:root[data-theme="dark"] .any-yellow { --any-bg: #3a3212; --any-fg: #fde047; }
:root[data-theme="dark"] .any-orange { --any-bg: #432a12; --any-fg: #fdba74; }
:root[data-theme="dark"] .any-red { --any-bg: #421e1e; --any-fg: #fca5a5; }
:root[data-theme="dark"] .any-pink { --any-bg: #4a1d34; --any-fg: #f9a8d4; }
:root[data-theme="dark"] .any-purple { --any-bg: #301848; --any-fg: #d8b4fe; }
:root[data-theme="dark"] .any-blue { --any-bg: #182a4a; --any-fg: #93c5fd; }
:root[data-theme="dark"] .any-ice { --any-bg: #132b3d; --any-fg: #7dd3fc; }
:root[data-theme="dark"] .any-teal { --any-bg: #0f3d38; --any-fg: #5eead4; }
:root[data-theme="dark"] .any-lime { --any-bg: #283a12; --any-fg: #bef264; }
.note-glyph { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--any-bg, var(--surface-2)); color: var(--any-fg, var(--text)); font-weight: 600; font-size: var(--fs-lg); }
.note-glyph.is-sm { width: 26px; height: 26px; border-radius: 8px; font-size: var(--fs-md); }
.note-glyph.is-lg { width: 48px; height: 48px; border-radius: 12px; font-size: var(--fs-2xl); }
.note-list { display: grid; gap: 8px; }
.note-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.note-row:hover { background: var(--surface-2); }
.note-row-main { display: grid; gap: 3px; min-width: 0; }
.note-row-title { font-weight: 600; overflow-wrap: anywhere; }
.note-row-meta { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-row-props { display: flex; flex-wrap: wrap; gap: 4px; }
.note-prop-mini { padding: 1px 8px; border-radius: 999px; background: var(--any-bg, var(--surface-2)); color: var(--any-fg, var(--muted)); font-size: var(--fs-xs); }
.meta-chip[class*=" any-"], .chip[class*=" any-"] { background: var(--any-bg); color: var(--any-fg); border-color: transparent; }
.chip[class*=" any-"][aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--any-fg); }
.note-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.note-links li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note-links a { color: var(--accent); overflow-wrap: anywhere; }
.note-picker { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 45vh; overflow-y: auto; }
.note-pick { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 6px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.note-pick:hover { background: var(--surface-2); }
.note-pick > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-hint.is-warn { color: var(--warn); }
.copy-banner { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: var(--fs-md); }
/* Текст заметки (Markdown) */
.md { line-height: 1.55; overflow-wrap: anywhere; }
.md > * + * { margin-top: 0.6em; }
.md h2, .md h3, .md h4 { margin: 1em 0 0.3em; line-height: 1.3; }
.md ul, .md ol { padding-left: 1.3em; margin: 0.4em 0; }
.md li.md-task { list-style: none; margin-left: -1.3em; }
.md li.md-task.is-done { color: var(--muted); text-decoration: line-through; }
.md blockquote { margin: 0; padding: 4px 12px; border-left: 3px solid var(--border); color: var(--muted); }
.md pre { padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); overflow-x: auto; }
.md code { padding: 1px 4px; border-radius: 4px; background: var(--surface-2); font-size: 0.9em; }
.md a { color: var(--accent); }
.md hr { border: 0; border-top: 1px solid var(--border); }
.note-empty-text { color: var(--muted); font-style: italic; }
.shell[data-route="note"] .fab { display: none; }
/* Типы заметок – одной строкой с прокруткой, чтобы список был виден сразу */
.type-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.type-chips .chip { flex: none; }
.note-editor { min-height: 240px; font-family: ui-monospace, Consolas, monospace; font-size: var(--fs-base); line-height: 1.5; }
.note-pick > .muted { flex: none; max-width: 35%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Панель действий на узком экране: кнопки переносятся, главная – во всю ширину */
.action-bar { flex-wrap: wrap; }
.action-bar > .btn { min-width: 0; }
@media (max-width: 360px) { .action-bar > .btn-primary { flex: 1 1 100%; justify-content: center; } }

/* Ассистент (этап 29, макет): панель «≡ ✦ Ассистент · беседа + Рамка дня», лента, чипы и поле с моделью внизу.
   Одинаково в правой панели и на экране #/assistant (телефон) */
.shell[data-route="assistant"] .main { height: calc(100vh / var(--zoom, 1)); height: calc(100dvh / var(--zoom, 1)); }
.shell[data-route="assistant"] .view { flex: 1; min-height: 0; display: flex; flex-direction: column; max-width: 760px; width: 100%; margin: 0 auto; padding: 0 0 calc(var(--tabbar-h) + var(--safe-bottom)); }
@media (min-width: 760px) { .shell[data-route="assistant"] .view { padding-bottom: 0; } }
.side-chat { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-head { flex: none; display: flex; align-items: center; gap: 4px; height: 42px; padding: 0 8px; border-bottom: 1px solid var(--border); }
.chat-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--text-2); font: inherit; font-size: 16px; cursor: pointer; text-decoration: none; }
.chat-icon:hover, .chat-icon.is-on { background: var(--surface-2); color: var(--text); }
.chat-icon.is-on { color: var(--link); }
.chat-head-title { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-left: 2px; }
.chat-kicker { font-size: var(--fs-2xs); color: var(--link); letter-spacing: 0.04em; text-transform: uppercase; }
.chat-head-name { font-size: var(--fs-sm); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-back { flex: none; display: flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--control); border-radius: 5px; background: none; color: var(--text-2); font: inherit; font-size: var(--fs-xs); white-space: nowrap; cursor: pointer; }
.chat-back:hover { background: var(--surface-2); }
.chat-hist { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; }
.chat-hist-new { margin-bottom: 6px; padding: 8px 10px; border: 1px dashed var(--control); border-radius: 7px; background: none; color: var(--link); font: inherit; text-align: left; cursor: pointer; }
.chat-hist-new:hover { border-color: var(--accent-line); }
.chat-hist-group { padding: 10px 10px 4px; }
.chat-hist-item { display: flex; align-items: flex-start; border-radius: 7px; }
.chat-hist-item:hover, .chat-hist-item.is-current { background: var(--surface-2); }
.chat-hist-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.chat-hist-top { display: flex; align-items: baseline; gap: 8px; }
.chat-hist-title { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-hist-when { flex: none; font-size: var(--fs-2xs); color: var(--label); }
.chat-hist-preview { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-hist-acts { flex: none; display: flex; gap: 2px; margin: 6px 4px 0 0; }
.chat-hist-act { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; }
.chat-hist-act svg { width: 15px; height: 15px; }
.chat-hist-act:hover { background: var(--surface-2); color: var(--text); }
.chat-hist-act.is-danger:hover { color: var(--danger); }
.chat-hist-open.is-editing { padding: 6px 4px 6px 8px; }
.chat-hist-input { width: 100%; padding: 4px 8px; }
.chat-hist-none { margin: 0; padding: 8px 10px; color: var(--muted); }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.chat-log[hidden], .chat-hist[hidden] { display: none; }
.chat-empty { margin: auto 0; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px dashed var(--control); border-radius: 10px; color: var(--text-2); text-wrap: pretty; }
.chat-empty .chat-kicker { text-transform: none; font-family: var(--font); font-size: var(--fs-md); letter-spacing: 0; }
.msg { max-width: 96%; color: var(--text); line-height: 1.6; text-wrap: pretty; }
.msg.is-user { align-self: flex-end; max-width: 85%; padding: 8px 11px; border-radius: 12px 12px 4px 12px; background: var(--accent-soft); color: var(--accent-ink); line-height: 1.45; white-space: pre-wrap; }
.msg.md > :first-child { margin-top: 0; }
.msg.md > :last-child { margin-bottom: 0; }
.chat-tools { margin: 0 0 -8px; font-size: var(--fs-2xs); color: var(--label); }
.chat-typing { font-size: var(--fs-xs); color: var(--muted); }
.chat-error { margin: 0; color: var(--danger); font-size: var(--fs-md); }
.chat-foot { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--border); }
.chat-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chat-chip { padding: 3px 9px; border: 1px solid var(--control); border-radius: 12px; background: none; color: var(--text-2); font: inherit; font-size: var(--fs-xs); white-space: nowrap; cursor: pointer; }
.chat-chip:hover { border-color: var(--accent-line); color: var(--accent-ink); }
.chat-ctx { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-xs); }
.chat-ctx-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-ctx-x { padding: 0 4px; border: 0; background: none; color: inherit; cursor: pointer; }
/* Поле ввода – отдельно, справа значок модели и «Отправить» (2026-10-29) */
.chat-form { display: flex; align-items: flex-end; gap: 6px; }
.chat-attachments { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chat-attachments:empty { display: none; }
.chat-file { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; border: 1px solid var(--border); border-radius: 8px; }
.chat-file-name { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; overflow-wrap: anywhere; text-align: left; padding: 5px 7px; border: 0; background: transparent; color: inherit; }
.chat-file-name img { width: 30px; height: 30px; object-fit: cover; border-radius: 4px; }
.chat-file-name .chat-image { width: auto; height: auto; max-width: 100%; max-height: 220px; object-fit: contain; }
.chat-file-remove { flex: none; padding: 6px; background: transparent; border: 0; color: var(--muted); }
.chat.is-file-drag { outline: 2px dashed var(--accent); outline-offset: -5px; }
.chat-form { flex-wrap: wrap; }
.chat-send { margin-left: auto; }
.smart-capacity.is-ok { color: var(--ok); }
.smart-capacity.is-warn { color: var(--warn); }
.smart-capacity.is-danger { color: var(--danger); }
.chat-field { flex: 1 1 100%; min-width: 0; display: flex; padding: 7px 11px; border: 1px solid var(--control); border-radius: 9px; background: var(--surface); }
.chat-field:focus-within { border-color: var(--accent-line); }
.chat-input { flex: 1; min-width: 0; min-height: 22px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-weight: 400; line-height: 1.45; resize: none; overflow-y: hidden; }
.chat-model { flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--control); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; }
.chat-model:hover, .chat-model:focus-visible { color: var(--accent); border-color: var(--accent-line); }
.chat-send { flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 9px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer; }
.chat-send:disabled { opacity: 0.5; }
.chat-empty-setup { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px; color: var(--text-2); }
.chat-empty-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; align-self: stretch; }
.chat-empty-head .chat-back { text-decoration: none; }
/* Карточка «✦ Изменения» */
.proposal { display: flex; flex-direction: column; gap: 9px; padding: 11px 12px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-soft); }
.proposal.is-rejected, .proposal.is-undone { opacity: 0.7; }
.prop-head { display: flex; align-items: center; gap: 8px; }
.prop-kicker { font-size: var(--fs-2xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--link); white-space: nowrap; }
.prop-title { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-count { font-size: var(--fs-2xs); color: var(--muted); }
.prop-item { display: grid; grid-template-columns: 16px 78px minmax(0, 1fr); gap: 8px; align-items: start; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.prop-item:disabled { cursor: default; }
.prop-item.is-off { opacity: 0.5; }
.prop-item.is-line { grid-template-columns: 12px minmax(0, 1fr); cursor: default; }
.prop-box { margin-top: 1px; width: 15px; height: 15px; display: grid; place-items: center; border: 1.5px solid var(--accent-line); border-radius: 4px; background: var(--accent); color: var(--on-accent); font-size: 10px; }
.prop-item.is-off .prop-box { background: none; }
.prop-dot { color: var(--link); }
.prop-label { font-size: var(--fs-sm); color: var(--muted); }
.prop-vals { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.prop-from { font-size: var(--fs-xs); color: var(--muted); text-decoration: line-through; overflow-wrap: anywhere; }
.prop-to { font-size: var(--fs-sm); color: var(--ok); overflow-wrap: anywhere; }
.prop-item.is-line .prop-to { color: var(--text); }
.prop-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 2px; }
.prop-apply { padding: 5px 12px; border: 0; border-radius: 6px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; cursor: pointer; }
.prop-apply:disabled { opacity: 0.5; cursor: default; }
.prop-btn { padding: 5px 10px; border: 1px solid var(--accent-line); border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; }
.prop-btn.is-ghost { border-color: transparent; color: var(--muted); }
.prop-done { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ok); }
.prop-undo { margin-left: auto; padding: 0; border: 0; background: none; color: var(--link); font: inherit; cursor: pointer; }
.prop-muted { margin: 0; font-size: var(--fs-sm); color: var(--muted); }

@keyframes typing { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
/* Входящие: длинная запись – до 4 строк, полностью – при разборе */
.inbox-list .task-title { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
/* Фильтры одной строкой с прокруткой (9.2): меньше места над списком */
.filter-row.is-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-row.is-scroll::-webkit-scrollbar { display: none; }
.filter-row.is-scroll .chip { flex: none; }
.sort-chip { margin-left: auto; }

/* Виджеты на рабочем столе Windows (9.5): окно прозрачное, внутри – карточка во всю высоту */
html.is-widget, html.is-widget body { background: transparent; overflow: hidden; }
html.is-widget .shell.is-bare .view { padding: 0; max-width: none; height: calc(100vh / var(--zoom, 1)); }
html.is-widget .demo-slot, html.is-widget .activity-bar, html.is-widget .fab { display: none; }
.widget { display: flex; flex-direction: column; height: calc(100vh / var(--zoom, 1)); border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); overflow: hidden; }
.w-head { display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-bottom: 1px solid var(--border); -webkit-app-region: drag; user-select: none; }
.w-head .icon-btn { width: 32px; height: 32px; -webkit-app-region: no-drag; }
.w-head .icon-btn svg { width: 18px; height: 18px; }
.w-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-date { margin-left: 8px; color: var(--muted); font-weight: 400; font-size: var(--fs-sm); }
.w-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 12px; display: grid; align-content: start; gap: 8px; }
.w-label { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.w-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.w-row { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.w-row .check { width: 20px; height: 20px; flex: none; }
.w-row.is-busy { color: var(--muted); }
.w-time { flex: none; color: var(--accent); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.w-title { flex: 1; min-width: 0; padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.w-title:hover { color: var(--accent); }
.w-late { flex: none; color: var(--danger); font-size: var(--fs-xs); }
.w-empty { margin: 0; color: var(--muted); font-size: var(--fs-md); }
.w-now { display: grid; gap: 4px; padding: 10px; border-radius: 10px; background: var(--accent-soft); }
.w-now .w-title { font-weight: 600; }
.w-actions { display: flex; gap: 6px; }
.w-timer { font-size: var(--fs-3xl); font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.w-focus-title { font-weight: 600; font-size: var(--fs-lg); }
.w-month { display: flex; align-items: center; justify-content: space-between; }
.w-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.w-dow { color: var(--muted); font-size: var(--fs-2xs); }
.w-day { position: relative; aspect-ratio: 1; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.w-day:hover { background: var(--surface-2); }
.w-day.is-other { color: var(--muted); opacity: 0.6; }
.w-day.is-today { color: var(--accent); font-weight: 600; }
.w-day.is-selected { background: var(--accent); color: var(--on-accent); }
.w-dot { position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.widget .quick-add .btn { padding: 0 14px; }
.w-row .check { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 2px solid var(--muted); border-radius: 50%; background: none; color: var(--on-accent); cursor: pointer; }
.w-row .check:hover { border-color: var(--accent); background: var(--accent-soft); }
.w-row .check::before { display: none; }

/* ---------- Свои заметки (ROADMAP 12) ---------- */
a.chip { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
a.chip[aria-selected="true"], .chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.view-bar { gap: var(--sp-2); align-items: center; }
@media (max-width: 480px) { .segment-label { display: none; } .view-bar .segment { padding: 0 10px; } }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2); margin-bottom: var(--sp-3); }
.preset { display: grid; justify-items: start; gap: 6px; padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.preset:hover { border-color: var(--accent); }
.preset-name { font-weight: 600; }

.own-note-row { display: flex; align-items: center; gap: var(--sp-3); flex: 1; min-width: 0; padding: 10px 0; color: var(--text); text-decoration: none; }
.own-note-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.own-note-title { font-weight: 600; overflow-wrap: anywhere; }
.own-note-snippet { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.own-note-date { flex: none; }
.note-props-line { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: var(--fs-sm); color: var(--muted); }
.opt-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--any-bg, var(--surface-2)); color: var(--any-fg, var(--text)); font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; white-space: nowrap; }
.meta-chip .opt-chip + .opt-chip { margin-left: 4px; }
.meta-chip.is-placeholder { color: var(--muted); border-style: dashed; }
.meta-chip.is-accent { border-color: var(--accent); color: var(--accent); }
.opt-list { display: grid; gap: 2px; margin-bottom: var(--sp-2); }
.opt-row { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.opt-row.is-selected { background: var(--accent-soft); }

.table-card { padding: 0; overflow-x: auto; }
.notes-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.notes-table th, .notes-table td { padding: 8px 10px; white-space: nowrap; }
.notes-table td:first-child a { color: var(--text); font-weight: 600; text-decoration: none; white-space: normal; }
.notes-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.notes-table tr.is-link { cursor: pointer; }
.notes-table tr.is-link:hover td { background: var(--surface-2); }
.th-sort { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }

.note-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-3); }
.gallery-card { display: grid; align-content: start; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.gallery-cover { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--any-bg, var(--surface-2)); font-size: 2rem; }
.gallery-body { display: grid; min-width: 0; gap: 4px; padding: var(--sp-2) var(--sp-3) var(--sp-3); }
/* Телефон (и крупный шрифт Android): всегда две колонки, обложка ниже; свойства переносятся и сокращаются, а не режутся */
.gallery-card { min-width: 0; }
img.gallery-cover { height: auto; max-height: 220px; }
.gallery-body .note-props-line > * { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .note-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .gallery-cover { aspect-ratio: 4 / 3; font-size: 1.6rem; }
  .gallery-body { padding: 6px 8px 8px; }
  .gallery-body .own-note-title { font-size: var(--fs-sm); }
}

/* Страница заметки */
.page { display: grid; gap: var(--sp-3); }
.page-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.page-head .icon-btn { margin-left: auto; }
.page-type { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 4px; }
.page-title { width: 100%; resize: none; overflow: hidden; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-2xl); font-weight: 600; line-height: 1.25; padding: 0; }
.page-title:focus { outline: none; }
.backlink-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.backlink-list a { display: flex; align-items: center; gap: var(--sp-2); min-height: 40px; color: var(--text); text-decoration: none; }
.backlink-list .icon svg { width: 18px; height: 18px; color: var(--muted); }

/* Блочный редактор */
.blocks { position: relative; display: grid; gap: 2px; padding-bottom: var(--sp-2); }
.blk { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; border-radius: 6px; }
.blk-handle { width: 24px; min-height: 28px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; letter-spacing: -2px; cursor: grab; opacity: 0; touch-action: none; transition: opacity 0.15s; }
.blk:hover .blk-handle, .blk:focus-within .blk-handle { opacity: 0.7; }
@media (pointer: coarse) { .blk-handle { opacity: 0.35; } }
.blk-body { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.blk-text { flex: 1; min-width: 0; min-height: 28px; padding: 2px 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; cursor: text; }
.blk-text.is-editing:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.blocks:not(:has(.blk ~ .blk)) .blk-text:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.blk-h1 .blk-text { font-size: var(--fs-xl); font-weight: 600; padding-top: 10px; }
.blk-h2 .blk-text { font-size: var(--fs-lg); font-weight: 600; padding-top: 8px; }
.blk-h3 .blk-text { font-size: var(--fs-body); font-weight: 600; padding-top: 6px; }
.blk-h1 .blk-handle, .blk-h2 .blk-handle { margin-top: 8px; }
.blk-dot, .blk-num { flex: none; min-width: 18px; padding-top: 2px; color: var(--muted); line-height: 1.55; text-align: right; font-variant-numeric: tabular-nums; }
.blk-check { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 5px; padding: 0; border: 2px solid var(--muted); border-radius: 6px; background: none; color: var(--on-accent); cursor: pointer; }
.blk-check.is-done { background: var(--accent); border-color: var(--accent); }
.blk-check svg { width: 14px; height: 14px; }
.blk-todo.is-done .blk-text { color: var(--muted); text-decoration: line-through; }
.blk-quote .blk-body { padding-left: 12px; border-left: 3px solid var(--border); color: var(--muted); }
.blk-callout .blk-body { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.blk-callout.is-warning .blk-body, .blk-callout.is-danger .blk-body { background: var(--warn-soft); }
.blk-callout-icon { padding-top: 2px; }
.blk-hr { width: 100%; margin: 12px 0; border: 0; border-top: 1px solid var(--border); }
.blk-code-wrap { position: relative; flex: 1; min-width: 0; }
.blk-code { width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font: var(--fs-md)/1.5 ui-monospace, Consolas, monospace; resize: none; overflow: hidden; }
.blk-lang { position: absolute; top: 4px; right: 6px; width: 80px; border: 0; background: none; color: var(--muted); font-size: var(--fs-xs); text-align: right; }
.blk-toggle { display: flex; gap: 4px; flex: 1; min-width: 0; }
.blk-toggle-arrow { flex: none; width: 24px; min-height: 28px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.blk-toggle-main { display: grid; gap: 4px; flex: 1; min-width: 0; }
.blk-toggle-title, .blk-caption { width: 100%; min-height: 28px; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; }
.blk-toggle-body { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; resize: none; overflow: hidden; }
.blk-caption { font-weight: 400; font-size: var(--fs-sm); color: var(--muted); text-align: center; }
.blk-figure { display: grid; gap: 4px; flex: 1; min-width: 0; margin: 4px 0; }
.blk-img { max-width: 100%; max-height: 480px; border-radius: var(--radius-sm); justify-self: center; object-fit: contain; }
.blk-file { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; max-width: 100%; padding: 8px 12px; text-align: left; white-space: normal; overflow-wrap: anywhere; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; }
.blk-file .icon svg { width: 16px; height: 16px; }
.blk-table-wrap { flex: 1; min-width: 0; overflow-x: auto; }
.blk-table { border-collapse: collapse; min-width: 100%; }
.blk-table th, .blk-table td { border: 1px solid var(--border); padding: 0; }
.blk-table th { background: var(--surface-2); }
.blk-cell { width: 100%; min-width: 90px; min-height: 34px; padding: 4px 8px; border: 0; background: none; color: var(--text); font: inherit; }
.blk-table th .blk-cell { font-weight: 600; }
.blk-table-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.blk-menu { position: absolute; left: 24px; z-index: 5; display: grid; width: min(280px, calc(100% - 24px)); max-height: 280px; overflow-y: auto; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 8px 24px rgb(0 0 0 / 18%); }
.blk-menu[hidden] { display: none; }
.blk-menu-item { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); min-height: 38px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.blk-menu-item.is-active, .blk-menu-item:hover { background: var(--accent-soft); }
.blk-tail { min-height: 48px; cursor: text; }
.blk.is-dragging { opacity: 0.4; }
.blk.drop-before { box-shadow: 0 -2px 0 var(--accent); }
.blk.drop-after { box-shadow: 0 2px 0 var(--accent); }
.wikilink { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); cursor: pointer; }
.wikilink.is-missing { color: var(--muted); border-bottom-style: dashed; }

/* Редактор типа */
.popover.is-wide { width: min(560px, calc(100vw - 16px)); }
.type-emoji { flex: none; width: 56px; text-align: center; font-size: var(--fs-xl); }
.color-dot { width: 28px; height: 28px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--any-fg); cursor: pointer; }
.color-dot[aria-checked="true"] { border-color: var(--text); box-shadow: inset 0 0 0 3px var(--surface); }
.filter-new { display: grid; gap: var(--sp-2); }

/* Дашборды */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: var(--sp-3); }
.dash-card { display: grid; gap: var(--sp-2); align-content: start; }
.dash-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); }
.dash-card-title { margin: 0; font-size: var(--fs-base); font-weight: 600; }
.dash-card-head .icon-btn { width: 36px; height: 36px; margin: -6px -8px 0 0; }
.dash-figures { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.dash-value { font-size: var(--fs-3xl); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.dash-badge { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.dash-badge.is-streak { background: var(--warn-soft); }
.dash-badge.is-up { background: var(--accent-soft); color: var(--accent); }
.dash-badge.is-down { color: var(--muted); }
.period-chart { width: 100%; height: auto; overflow: visible; }
.period-hit { fill: transparent; }
.period-bar:hover .day-bar { opacity: 0.8; }
.chart-value { fill: var(--text); font-size: 12px; font-weight: 600; }
.chart-label { fill: var(--muted); font-size: 10px; }
.dash-ai { display: grid; gap: var(--sp-2); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.dash-ai-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3); }
.dash-ai-head .section-title { margin: 0; }
.dash-ai-head p { margin: 0; }
.dash-ai-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.dash-ai-icon svg { width: 22px; height: 22px; }
.dash-ai-text h3 { margin: 10px 0 4px; font-size: var(--fs-base); }
@media (max-width: 420px) { .dash-ai-head { grid-template-columns: auto minmax(0, 1fr); } .dash-ai-head .btn { grid-column: 1 / -1; } }
.notes-table td, .notes-table th { overflow-wrap: normal; }
.notes-table td:first-child { min-width: 200px; }
@media (max-width: 480px) { .notes-table td:first-child { min-width: 130px; } }
.view-bar .chip { min-height: 36px; padding: 0 10px; font-size: var(--fs-sm); }
@media (max-width: 480px) { .view-bar .segment { padding: 0 8px; } }
.blk-file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.blk-figure .blk-file-actions { justify-content: center; }

/* Обзор недели (#/plan/review) */
.review-progress { width: 100%; height: 8px; accent-color: var(--accent); }
.review-head { display: flex; align-items: center; gap: 8px; }
.review-head .check-field { flex: 1; min-width: 0; }
.review-head .check-field strong { overflow-wrap: anywhere; }
.review-step.is-done { opacity: .7; }
.review-step.is-done strong { text-decoration: line-through; text-decoration-color: var(--muted); }

/* Привычки на «Сегодня» */
.habit-week { display: inline-flex; gap: 3px; flex-shrink: 0; }
.habit-week i { width: 7px; height: 14px; border-radius: 2px; background: var(--surface-2); }
.habit-week i.is-on { background: var(--accent); }
.habit-row.is-done .task-title { color: var(--muted); }
.review-head .check-field input { flex-shrink: 0; }

/* СДВГ-помощники на «Сегодня»: победы, «Что делать сейчас?», «Застряло» */
.wins { display: flex; flex-wrap: wrap; gap: 6px; }
.win { padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 600; }
.what-now { width: 100%; justify-content: center; }
.stuck-card { border-left: 3px solid var(--warn); }
.notice-project { display: flex; align-items: center; gap: 8px; }
.notice-project svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Единый ввод и «Записать с ИИ» */
.capture-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.capture-kinds .btn-ai { margin-left: auto; min-height: 36px; padding: 0 12px; }
.capture-kinds .chip { padding-inline: 12px; }
.btn-ai { color: var(--accent); }
.capture-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.capture-item { display: grid; gap: 8px; }
.capture-item > .chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.capture-item > .chips .icon-btn { margin-left: auto; }
.capture-notes { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.capture-ai { max-height: 90vh; overflow-y: auto; }
.list-row { display: flex; align-items: center; gap: 8px; }
.list-row > a { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.blk-img { cursor: zoom-in; }

/* Встроенный просмотр файлов */
.viewer { width: min(960px, 100vw); max-width: 100vw; height: min(92vh, calc(100dvh / var(--zoom, 1))); max-height: calc(100dvh / var(--zoom, 1)); padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); display: flex; flex-direction: column; }
.viewer:not([open]) { display: none; }
.viewer::backdrop { background: rgba(0, 0, 0, .7); }
.viewer-head { display: flex; align-items: flex-start; gap: 8px; padding: 12px 12px 8px 16px; border-bottom: 1px solid var(--border); }
.viewer-title { flex: 1; min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.viewer-body { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; background: var(--surface-2); }
.viewer-image { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-media { max-width: 100%; max-height: 100%; }
.viewer-frame { width: 100%; height: 100%; min-height: 60vh; border: 0; background: #fff; }
.viewer-text { align-self: start; justify-self: stretch; margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; }
.viewer-empty { text-align: center; padding: 24px; display: grid; gap: 8px; justify-items: center; }
.viewer-icon svg { width: 40px; height: 40px; }
.viewer-actions { padding: 10px 12px; border-top: 1px solid var(--border); margin: 0; }
.stakes-chip.is-must { color: var(--danger); border-color: var(--danger); }
.stakes-chip.is-own { color: var(--accent); border-color: var(--accent); }
.task-meta .is-must { color: var(--danger); }

/* Радар обязательного, «для себя», наставник */
.radar { border-left: 3px solid var(--danger); }
.radar-row.is-overdue .task-meta, .radar-row.is-today .task-meta { color: var(--danger); }
.radar-row.is-start .task-meta { color: var(--warn); }
.own-step { border-left: 3px solid var(--accent); }
.own-step-title { display: block; font-weight: 600; font-size: 1.05rem; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.mentor-links { display: flex; flex-wrap: wrap; gap: 8px; }
.notice-soft { background: var(--surface-2); color: var(--text); font-weight: 500; }

/* «Как пользоваться» */
.guide-steps, .guide-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.guide-steps p { margin: 2px 0 0; }
.guide-list li { overflow-wrap: anywhere; }

/* Блок «Файл» в заметке: значок, полное имя, тип и размер */
.blk-file { gap: 10px; padding: 8px 12px 8px 8px; }
.blk-file-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.blk-file-icon svg { width: 18px; height: 18px; }
.blk-file-text { display: grid; gap: 2px; min-width: 0; }
.blk-file-name { font-weight: 600; overflow-wrap: anywhere; }
.blk-file-meta { font-size: .8rem; color: var(--muted); }

/* Окно добавления (как в TickTick): поле, значки, выбранное – чипами */
.composer { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.composer-kinds { display: flex; gap: 4px; flex-wrap: wrap; }
.composer-kind { border: 0; background: none; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.composer-kind[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }
.composer-title { width: 100%; resize: none; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 1.1rem; line-height: 1.4; padding: 4px 2px; min-height: 36px; }
.composer-title::placeholder { color: var(--muted); }
.composer-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.composer-summary:empty, .composer-extra:empty { display: none; }
.composer-chip { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; color: var(--text); }
.composer-chip.is-danger { color: var(--danger); }
.composer-chip.is-warn { color: var(--warn); }
.composer-chip.is-accent, .composer-chip.is-tag, .composer-chip.is-when { color: var(--accent); }
.composer-bar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 8px; }
.composer-gap { flex: 1; }
.composer-add { min-width: 96px; }
.composer-dialog { width: min(640px, 100vw); }
.composer-dialog .composer { border: 0; padding: 0; }
.add-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.add-row:hover { color: var(--text); }
.add-row .icon svg { width: 18px; height: 18px; }

/* «Сегодня»: шапка с настройкой блоков */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.page-head .page-date { margin: 0; }
.now-actions { display: grid; gap: 8px; }
.layout-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.layout-list li { display: flex; align-items: center; gap: 4px; }
.layout-list .check-field { flex: 1; min-width: 0; }

/* Календарь «Неделя» сеткой часов (ROADMAP 17) */
.wk { padding: 0; overflow: hidden; }
.wk-head, .wk-allday { display: grid; border-bottom: 1px solid var(--border); }
.wk-corner, .wk-label { font-size: var(--fs-2xs); color: var(--muted); padding: 6px 4px; text-align: right; }
.wk-day { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.wk-dow { font-size: var(--fs-xs); color: var(--muted); }
.wk-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 600; }
.wk-day.is-today .wk-num { background: var(--accent); color: var(--on-accent); }
.wk-allday-cell { display: grid; align-content: start; gap: 3px; padding: 4px 3px; min-height: 30px; border-left: 1px solid var(--border); }
.wk-chip { display: block; width: 100%; padding: 2px 6px; border: 0; border-radius: 4px; font: inherit; font-size: var(--fs-xs); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; color: var(--text); background: var(--surface-2); }
.wk-scroll { max-height: calc(100dvh / var(--zoom, 1) - 300px); min-height: 360px; overflow-y: auto; }
.wk-body { display: grid; position: relative; }
.wk-hours { position: relative; }
.wk-hour { position: absolute; right: 6px; transform: translateY(-50%); font-size: var(--fs-2xs); color: var(--muted); }
.wk-col { position: relative; border-left: 1px solid var(--border); background-image: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px 48px); cursor: copy; }
.wk-col.is-today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.wk-block { position: absolute; display: grid; align-content: start; gap: 1px; padding: 3px 6px; border: 0; border-radius: 6px; font: inherit; font-size: var(--fs-xs); text-align: left; overflow: hidden; cursor: pointer; color: #fff; background: var(--accent); }
.wk-block-title { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; line-height: 1.25; }
.wk-block-time { opacity: .85; font-size: var(--fs-2xs); }
.wk-block.is-task, .wk-chip.is-task { background: color-mix(in srgb, var(--accent) 80%, #000); color: #fff; }
.wk-col .wk-block { box-shadow: 0 0 0 1px var(--surface); } /* внахлёст – видна граница между блоками */
.wk-block.is-must, .wk-chip.is-must { background: #b3413b; color: #fff; }
.wk-block.is-habit, .wk-chip.is-habit { background: #6f4cc0; color: #fff; } /* привычки – не тем же красным, что обязательное (2026-10-27) */
.wk-block.is-meeting, .wk-chip.is-meeting { background: #2f6fb5; color: #fff; }
.wk-block.is-day, .wk-chip.is-day { background: #b7791f; color: #fff; }
.wk-block.is-busy, .wk-chip.is-busy { background: #8a8d91; color: #fff; cursor: default; }
.wk-block.is-done, .wk-chip.is-done { opacity: .45; text-decoration: line-through; }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.wk-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.wk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.wk-side { display: grid; gap: 12px; position: sticky; top: 72px; }
@media (min-width: 900px) { .shell[data-route="calendar"] .view { max-width: 1440px; } }
.checkin-prompt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.checkin-prompt-icon { font-size: 22px; }
.checkin-prompt-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.checkin-dialog { width: min(560px, 100vw); max-height: 92dvh; overflow-y: auto; }
.checkin-dialog .card { border: 0; padding: 0; background: none; }
.settings-toc { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.settings-toc .chip { flex: none; }
.shell[data-route="settings"] .view > .card { scroll-margin-top: 72px; }
.wk-block.is-note, .wk-chip.is-note { background: #7a4fbf; color: #fff; }

/* Канбан: колонки перетаскиваются за заголовок, двойной клик – переименовать (ROADMAP 19) */
.kanban-col-head { cursor: grab; touch-action: none; user-select: none; }
.kanban-col-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-col-input { height: 30px; padding: 2px 8px; font-weight: 600; }
.kanban-col.is-dragging { opacity: 0.4; }
.kanban-col.drop-before { box-shadow: inset 3px 0 0 var(--accent); }
.kanban-col.drop-after { box-shadow: inset -3px 0 0 var(--accent); }
.kanban-col-ghost { position: fixed; z-index: 1000; pointer-events: none; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); opacity: 0.95; cursor: grabbing; }

/* Неделя: перетаскивание блоков, растягивание, выделение промежутка (ROADMAP 19) */
.wk-block { -webkit-touch-callout: none; user-select: none; }
.wk-block.is-movable { cursor: grab; }
.wk-block.is-movable::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; cursor: ns-resize; }
.wk-block.is-dragging { opacity: 0.35; }
.wk-ghost { z-index: 5; box-shadow: var(--shadow); opacity: 0.95; pointer-events: none; cursor: grabbing; }
.wk-select { position: absolute; left: 2px; right: 2px; z-index: 4; border-radius: 6px; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent); font-size: var(--fs-xs); padding: 2px 6px; pointer-events: none; }
.wk-col { touch-action: pan-y; }
.wk-body { user-select: none; -webkit-user-select: none; } /* протяжка мышью не выделяет подписи часов */
.notice-must { border-color: var(--danger); color: var(--danger); }

/* «Свой сервер» (ROADMAP 20) */
.cloud-code { max-width: 180px; font-size: 1.4rem; letter-spacing: 0.3em; text-align: center; }
.cloud-devices { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cloud-devices li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.cloud-devices li > span:first-child { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.cloud-devices .btn { margin-left: auto; }

/* Экран входа (ROADMAP 20) */
.login-page { display: grid; justify-items: center; align-content: center; gap: 16px; min-height: calc(100dvh / var(--zoom, 1)); padding: calc(var(--safe-top) + 24px) 16px calc(var(--safe-bottom) + 24px); }
.login-card { width: min(420px, 100%); padding: 28px; }
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-lg); }
.login-title { margin: 8px 0 0; font-size: var(--fs-2xl); }
.cloud-login .actions .btn-primary { min-width: 140px; }

/* «По времени» на узком экране (320 px, крупный шрифт): длинные названия переносятся, строка не шире экрана */
.schedule-row { min-width: 0; flex-wrap: wrap; row-gap: 4px; }
.schedule-row .schedule-time { flex: none; }
.schedule-row .schedule-main { flex: 1 1 140px; }
.schedule-row .task-title, .schedule-row .task-meta { overflow-wrap: anywhere; }
.schedule-row > .check, .schedule-row > .badge, .schedule-row > .soon { flex: none; }

/* Фраза ключей (ROADMAP 21) */
.phrase-words { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: word; }
.phrase-words li { counter-increment: word; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font: 600 var(--fs-base)/1.2 ui-monospace, Consolas, monospace; }
.phrase-words li::before { content: counter(word) '. '; color: var(--muted); font-weight: 400; }
.phrase-input { font-family: ui-monospace, Consolas, monospace; }
.keys-card[hidden] { display: none; }
@media (max-width: 360px) { .phrase-words { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Импорт (ROADMAP 21) */
.import-summary { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.import-summary li { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); overflow-wrap: anywhere; }
.import-kinds { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.import-target { border: 0; margin: 0; padding: 0; }
.import-target .check-field { flex-wrap: wrap; }
.input-inline { width: auto; min-width: 0; max-width: 100%; height: 36px; padding: 4px 10px; }

/* «Подключения»: группы с объяснением (ROADMAP 21) */
.connect-group { margin: 12px 4px 0; }
.connect-group-title { margin: 0 0 4px; font-size: var(--fs-lg); }

/* «Где хранить» (ROADMAP 21): заготовки плашками */
.storage-presets { display: grid; gap: 8px; }
.storage-preset { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; }
.storage-preset.is-on { border-color: var(--accent); background: var(--accent-soft); }
.storage-preset input { margin-top: 3px; flex: none; }
.storage-preset > span { display: grid; gap: 2px; min-width: 0; }
.storage-preset strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.storage-groups { border: 0; margin: 0; padding: 0; }
/* «Сегодня» (ROADMAP 22): просроченное – красной коробочкой сверху, сроки – коротко */
.box-overdue { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 40%, var(--surface)); }
.box-overdue .box-head h2 { color: var(--danger); }
.box-overdue .task-row.is-late { background: none; box-shadow: none; }
.radar.is-compact .task-row { min-height: 44px; }
/* Заметки списком и таблицей (ROADMAP 22): только название и свойства, длинное – в две строки; ячейки правятся на месте */
.own-note-title, .kanban-title, .gallery-body .own-note-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Свойства – переносятся строками, ничего не срезаем (этап 33.2: с крупным шрифтом Android срезалась вторая строка) */
.note-props-line { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.cell-edit { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; width: 100%; min-height: 32px; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cell-edit:hover, .cell-edit:focus-visible { border-color: var(--border); background: var(--surface-2); }
.is-num .cell-edit { justify-content: flex-end; }
.cell-check { justify-content: center; font-weight: 600; color: var(--accent); }
.cell-empty { color: var(--muted); opacity: 0.5; }
.table-title { font-weight: 600; color: var(--text); text-decoration: none; }
.table-title:hover { text-decoration: underline; }
.kanban-meta, .project-meta, .project-title { overflow: hidden; text-overflow: ellipsis; }
.kanban-meta, .project-meta { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.project-meta:empty { display: none; }

/* Настройки разделами (ROADMAP 22) */
.settings-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.settings-nav { display: grid; gap: 2px; }
.settings-layout.has-section .settings-nav { display: none; }
.settings-nav-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; min-width: 0; }
.settings-nav-item:hover { background: var(--surface-2); }
.settings-nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.settings-nav-item .icon { flex: none; padding-top: 2px; }
.settings-nav-item .icon svg { width: 20px; height: 20px; }
.settings-nav-text { display: grid; gap: 2px; min-width: 0; }
.settings-nav-title { font-weight: 600; }
.settings-nav-about { color: var(--muted); font-size: var(--fs-sm); }
.settings-back { justify-self: start; padding: 6px 10px 6px 4px; margin: -6px 0 -4px; color: var(--accent); font-weight: 500; text-decoration: none; }
.settings-head h2 { margin: 0 0 4px; font-size: var(--fs-xl); }
.settings-head p { margin: 0; }
@media (min-width: 900px) {
  .shell[data-route="settings"] .view { max-width: 1100px; }
  .settings-layout, .settings-layout.has-section { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
  .settings-layout.has-section .settings-nav { display: grid; position: sticky; top: 80px; }
  .settings-nav-about { display: none; }
  .settings-nav-item { align-items: center; }
}
/* Просмотр картинки с приближением (ROADMAP 23) */
.viewer-zoom { width: 100%; height: 100%; overflow: auto; display: grid; place-items: center; touch-action: pan-x pan-y; cursor: zoom-in; }
.viewer-image.is-zoomable { user-select: none; }
.zoom-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.zoom-level { min-width: 44px; text-align: center; }
.viewer-actions { flex-wrap: wrap; }
.attachment-place { color: var(--muted); overflow-wrap: anywhere; }
.attachment-place.is-warn { color: var(--danger); }
/* Календарь: список справа и перетаскивание (ROADMAP 23) */
.wk-side { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh / var(--zoom, 1) - 160px); position: sticky; top: 80px; overflow: hidden; }
.side-tasks { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; }
.side-task { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; cursor: grab; border: 1px solid transparent; }
.side-task:hover { background: var(--surface-2); border-color: var(--border); }
.side-task-title { overflow-wrap: anywhere; }
.wk-drop { position: absolute; left: 2px; right: 2px; height: 0; border-top: 2px dashed var(--accent); pointer-events: none; z-index: 3; font-size: var(--fs-2xs); color: var(--accent); }
.wk-allday-cell.is-drop { background: var(--accent-soft); }
.wk-chip[draggable="true"] { cursor: grab; }

/* Статистика (ROADMAP 23) */
.stats-head { display: flex; align-items: center; gap: 8px; }
.stats-head .segmented { flex: 1; }
.stats-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat-tile { display: grid; gap: 2px; text-align: center; padding: 8px 4px; border-radius: var(--radius-sm); background: var(--surface-2); }
.stat-tile strong { font-size: 1.5rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.hours-axis { display: flex; justify-content: space-between; }
.year-grid { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.year-week { display: grid; grid-template-rows: repeat(7, 11px); gap: 3px; }
.year-cell { display: inline-block; width: 11px; height: 11px; border-radius: 2px; background: var(--surface-2); }
.year-cell.is-1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
.year-cell.is-2 { background: color-mix(in srgb, var(--accent) 55%, var(--surface-2)); }
.year-cell.is-3 { background: color-mix(in srgb, var(--accent) 80%, var(--surface-2)); }
.year-cell.is-4 { background: var(--accent); }
.year-cell.is-empty { background: none; }
.year-legend { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.home-links { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; margin-right: 8px; }
.page-head { flex-wrap: wrap; }
.stats-head .segmented { min-width: 0; }
.stats-head .segment { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-head .icon-btn { flex: none; }
@media (max-width: 420px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-tile strong { font-size: 1.2rem; } }
.th-drag { cursor: grab; }
.th-drag.is-drop { box-shadow: inset 2px 0 0 var(--accent); }

/* Колонки блоков и размер картинок в заметках (ROADMAP 25) */
.blk-columns { display: grid; gap: 12px; align-items: start; }
.blk-columns > .blk { min-width: 0; }
.blk.drop-side { box-shadow: inset -3px 0 0 var(--accent); }
@media (max-width: 600px) { .blk-columns { grid-template-columns: minmax(0, 1fr) !important; } }
.blk-img-box { position: relative; display: inline-block; max-width: 100%; }
.blk-img-box .blk-img { max-width: 100%; height: auto; display: block; }
.blk-img-grip { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 4px; background: var(--accent); cursor: nwse-resize; opacity: 0; transition: opacity 0.15s; }
.blk-img-box:hover .blk-img-grip, .blk-img-grip:active { opacity: 0.9; }
@media (hover: none) { .blk-img-grip { opacity: 0.7; } }
.viewer-zoom { cursor: grab; }
.viewer-zoom.is-grabbing { cursor: grabbing; }
/* Свойства заметки таблицей (ROADMAP 26): «свойство: значение», длинное переносится – на телефоне ничего не расползается */
.prop-table { display: grid; gap: 2px; min-width: 0; }
.prop-row { display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr) auto auto; align-items: start; gap: 6px; min-width: 0; }
.prop-row.is-hidden { opacity: 0.5; }
.prop-name { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 0; color: var(--muted); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.prop-name .icon svg { width: 14px; height: 14px; flex: none; }
.prop-value { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; min-height: 32px; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; overflow-wrap: anywhere; word-break: break-word; }
.prop-value:hover { background: var(--surface-2); border-color: var(--border); }
.prop-text { white-space: normal; overflow-wrap: anywhere; }
.prop-text a, .prop-link { color: var(--accent); overflow-wrap: anywhere; }
.prop-empty { color: var(--muted); opacity: 0.55; }
.prop-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.prop-row .icon-btn { width: 30px; height: 30px; }
.prop-row .icon-btn svg { width: 15px; height: 15px; }
.prop-ai { color: var(--accent); opacity: 0.55; }
.prop-row:hover .prop-ai { opacity: 1; }
@media (hover: none) { .prop-ai { opacity: 0.8; } }
.prop-actions { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 4px; }
@media (max-width: 480px) { .prop-row { grid-template-columns: minmax(80px, 38%) minmax(0, 1fr) auto auto; } }
/* «Главная» → «День» (ROADMAP 26, как в Capacities): заметка дня по центру, справа месяц и дела по времени */
.day-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .day-layout { grid-template-columns: minmax(0, 1fr) 300px; } .day-side { position: sticky; top: 80px; } }
.day-head { align-items: center; gap: 6px; flex-wrap: nowrap; }
.day-head .page-date { min-width: 0; }
.day-head .composer-gap { flex: 1; }
.day-head .page-date { margin: 0; display: flex; align-items: center; gap: 8px; }
.day-note .page { padding: 0; }
.day-month .dp-day { height: 30px; min-height: 30px; width: 30px; justify-self: center; font-size: var(--fs-xs); }
.day-month .dp-grid { gap: 2px; text-align: center; }
.day-mentions { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.day-mentions a { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.day-mentions a:hover { background: var(--surface-2); }
.home-tools { display: inline-flex; gap: 2px; align-items: center; }
/* Телефон: дата и значки – в одну строку, ссылки плана – под ними */
@media (max-width: 599px) {
  .page-head:has(.home-links) { flex-wrap: wrap; }
  .page-head .home-links { order: 3; width: 100%; margin: 0; }
  .page-head:has(.home-links) .home-tools { margin-left: auto; }
}

/* ---------- Этап 27: Дневник ---------- */
.journal-card { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.journal-card.is-am { border-color: color-mix(in oklch, var(--am) 35%, var(--border)); background: color-mix(in oklch, var(--am-soft) 60%, var(--surface)); }
.journal-card.is-pm { border-color: color-mix(in oklch, var(--pm) 35%, var(--border)); background: color-mix(in oklch, var(--pm-soft) 60%, var(--surface)); }
.journal-card-head { display: flex; align-items: center; gap: 10px; }
.caps.is-am { color: var(--am); }
.caps.is-pm { color: var(--pm); }
.caps.is-tag { color: var(--tag-fg); }
.journal-status { color: var(--muted); font-size: var(--fs-sm); }
.journal-field { display: flex; flex-direction: column; gap: 6px; }
.journal-q { font-weight: 600; }
.journal-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.journal-history { display: flex; flex-direction: column; gap: 10px; }
.journal-history > .caps { margin: 6px 0 0; }
.journal-past { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.journal-day { margin: 0; font-size: var(--fs-body); font-weight: 600; }
.journal-past-part { display: flex; flex-direction: column; gap: 6px; }
.journal-qa { display: flex; flex-direction: column; gap: 1px; }
.journal-q-small { color: var(--muted); font-size: var(--fs-sm); }
.journal-a { font-size: 0.875rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.screen-link { align-self: flex-start; font-size: var(--fs-sm); }

/* ---------- Этап 27: Метки ---------- */
.tag-group { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); }
.tag-group.is-drop-target { border-color: var(--tag-fg); background: color-mix(in oklch, var(--tag-bg) 40%, transparent); }
.tag-group-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag-group-sub { color: var(--muted); font-size: var(--fs-sm); }
.tag-group-tools { margin-left: auto; display: flex; gap: 12px; }
.tag-group-tools .link-btn { color: var(--text-2); font-size: var(--fs-sm); }
.tag-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag-pill {
  display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; white-space: nowrap;
  border: 1px solid color-mix(in oklch, var(--tag-fg) 30%, transparent); background: var(--tag-bg); color: var(--tag-fg); font-size: var(--fs-md); cursor: pointer;
}
.tag-pill:hover { color: var(--tag-fg); border-color: var(--tag-fg); }
.tag-pill[aria-current="true"] { background: var(--tag-fg); color: var(--bg); }
.tag-count { opacity: 0.6; font-size: var(--fs-xs); }
.tag-new { width: 110px; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--control); outline: 0; background: transparent; color: var(--text); font-size: var(--fs-sm); }
.tag-new:focus { border-color: var(--tag-fg); }
.add-dashed { align-self: flex-start; padding: 7px 12px; border-radius: 9px; border: 1px dashed var(--control); background: none; color: var(--link); font: inherit; font-size: var(--fs-sm); cursor: pointer; text-align: left; }
.add-dashed:hover { border-color: var(--accent); }
.seg { margin-left: auto; display: flex; gap: 2px; padding: 2px; border-radius: 7px; background: var(--field); }
.seg-item { padding: 4px 10px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.seg-item[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.kind-chip { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; }
.kind-chip.is-project { background: var(--deed-soft); color: var(--deed); }
.kind-chip.is-note { background: var(--tag-bg); color: var(--tag-fg); }
.tag-rows { display: flex; flex-direction: column; }
.tag-row { display: flex; align-items: center; gap: 10px; min-height: 40px; border-top: 1px solid var(--divider); color: var(--text); }
.tag-row:hover { color: var(--text); background: var(--surface-2); }
.tag-row-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-row-meta { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }

/* ---------- Этап 27: «День» ---------- */
.day-eyebrow { display: flex; align-items: center; gap: 8px; }
.day-eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.view:has(.day-blocks) > * + * { margin-top: 26px; }
.day-top { display: flex; flex-direction: column; gap: 12px; }
.day-top:empty { display: none; }
.journal-strip {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 5px 6px 5px 12px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: var(--fs-md);
}
.journal-strip:hover { color: var(--text); }
.journal-strip.is-am { border-color: color-mix(in oklch, var(--am) 35%, var(--border)); background: var(--am-soft); }
.journal-strip.is-pm { border-color: color-mix(in oklch, var(--pm) 35%, var(--border)); background: var(--pm-soft); }
.journal-strip-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--am); }
.journal-strip.is-pm .journal-strip-dot { background: var(--pm); }
.journal-strip-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.journal-strip-text strong { font-weight: 600; color: var(--am); }
.journal-strip.is-pm .journal-strip-text strong { color: var(--pm); }
.journal-strip-hide { flex: none; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.journal-strip-hide:hover { background: var(--surface-2); color: var(--text); }
.day-notices { display: flex; flex-direction: column; gap: 6px; }

.assist-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--radius); background: color-mix(in oklch, var(--accent-soft) 85%, var(--bg)); border: 1px solid var(--accent-line); }
.assist-head { display: flex; align-items: center; gap: 8px; }
.assist-eyebrow { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); }
.assist-dismiss { margin-left: auto; color: var(--muted); font-size: var(--fs-sm); }
.assist-text { margin: 0; font-size: 0.875rem; line-height: 1.5; text-wrap: pretty; }
.assist-items { display: flex; flex-direction: column; gap: 4px; }
.assist-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.assist-time { font-family: var(--mono); font-size: var(--fs-sm); color: var(--link); }
.assist-what { display: flex; flex-direction: column; min-width: 0; }
.assist-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assist-why { font-size: 11.5px; color: var(--muted); }
.assist-card .actions { margin-top: 0; gap: 6px; }
.btn-accent-outline { border-color: var(--accent-line); color: var(--accent-ink); }
.btn-accent-outline:hover { border-color: var(--accent); }
.btn-warn { background: var(--warn); border-color: var(--warn); color: var(--on-accent); font-weight: 600; }

.day-props { display: flex; flex-direction: column; padding: 6px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.day-props-head { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.day-props-toggle, .day-block-title { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; }
.day-block-title.is-strong { color: var(--text); }
.day-props-eye { margin-left: auto; display: flex; align-items: center; gap: 5px; padding: 2px 7px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.day-props-eye svg { width: 14px; height: 14px; }
.day-props-eye:hover, .day-props-eye.is-on { background: var(--surface-2); color: var(--text); }
.day-props-grid { display: grid; grid-template-columns: 130px minmax(0, 1fr); row-gap: 9px; align-items: center; padding: 6px 0 4px; }
.day-prop-name { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.day-prop-pin { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 11px; cursor: pointer; }
.day-prop-pin.is-on { color: var(--accent); }
.day-prop-value { min-width: 0; }
.prop-value-btn { max-width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-value-btn.mono { font-family: var(--mono); }
.prop-value-btn.is-empty { color: var(--muted); }
.prop-value-btn:hover { color: var(--accent); }
.fuel-dots, .scale-dots { display: flex; align-items: center; gap: 5px; }
.fuel-dot { width: 14px; height: 14px; padding: 0; border-radius: 4px; border: 1px solid var(--control); background: none; cursor: pointer; }
.fuel-dot.is-on { background: var(--accent); border-color: var(--accent); }
html.is-touch .fuel-dot { width: 22px; height: 22px; }
.fuel-word { margin-left: 6px; font-size: var(--fs-sm); color: var(--text-2); }
.scale-dot { width: 22px; height: 22px; padding: 0; border-radius: 6px; border: 1px solid var(--control); background: none; color: var(--muted); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.scale-dot.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day-props-more { align-self: flex-start; padding: 2px 0 4px; font-size: var(--fs-sm); }
@media (max-width: 759px) { .day-props-grid { grid-template-columns: 112px minmax(0, 1fr); } }

.day-blocks { display: flex; flex-direction: column; gap: 26px; }
.day-block { position: relative; display: flex; flex-direction: column; gap: 10px; }
.block-grip { position: absolute; left: -24px; top: -2px; padding: 2px 4px; border: 0; background: none; color: var(--control); font-size: var(--fs-xs); letter-spacing: -1px; cursor: grab; user-select: none; }
.block-grip:hover { color: var(--link); }
@media (max-width: 759px) { .block-grip { position: static; align-self: flex-end; margin-bottom: -26px; } }
.day-note-body .page.is-embed { margin: 0; }
.day-note-body .page.is-embed .blk-text { font-size: var(--fs-body); line-height: 1.7; }
.day-links { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--divider); }

.day-must, .day-tab-body { display: flex; flex-direction: column; gap: 2px; }
.day-block-head { display: flex; align-items: center; gap: 10px; padding: 0 10px 8px; }
.day-hint { margin-left: auto; font-size: var(--fs-xs); color: var(--label); white-space: nowrap; }
.limit-cells { display: flex; gap: 3px; }
.limit-cells span { width: 16px; height: 4px; border-radius: 2px; background: var(--control); }
.limit-cells span.is-on { background: var(--accent); }
.limit-cells span.is-over { background: var(--danger); }
.limit-label { font-size: var(--fs-xs); color: var(--muted); }
.limit-label.is-over { color: var(--danger); }
.day-warn { margin: 0 0 6px; padding: 9px 12px; border-radius: 7px; background: var(--danger-soft); color: var(--danger); font-size: var(--fs-sm); text-wrap: pretty; }
.soft-limit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); border: 1px solid color-mix(in oklch, var(--warn) 40%, transparent); font-size: var(--fs-sm); }
.soft-limit-text { flex: 1; min-width: 200px; text-wrap: pretty; }
.day-rows { display: flex; flex-direction: column; gap: 1px; }
.day-row { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.day-row:hover { background: var(--surface-2); }
html.is-touch .day-row { min-height: 48px; }
.day-check {
  flex: none; display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--control); background: none; color: var(--bg); font-size: 10px; line-height: 1; cursor: pointer;
}
html.is-touch .day-check { width: 22px; height: 22px; }
.day-check.is-danger { border-color: var(--danger); }
.day-check.is-warn { border-color: var(--warn); }
.day-check.is-ok { border-color: var(--ok); }
.day-check[aria-pressed="true"] { background: var(--muted); border-color: var(--muted); }
.day-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.day-row-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-row.is-done .day-row-title { color: var(--muted); text-decoration: line-through; }
.day-row-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: var(--fs-xs); color: var(--muted); } /* переносится, а не срезается (33.2) */
.day-row-proj { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.day-row-proj.is-must { color: var(--danger); }
.day-row-proj.is-own { color: var(--ok); }
.day-working { flex: none; padding: 2px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--mono); font-size: var(--fs-2xs); text-transform: uppercase; }
.day-play { flex: none; padding: 3px 7px; border: 0; border-radius: 5px; background: none; color: var(--muted); font-family: var(--mono); font-size: var(--fs-xs); cursor: pointer; }
.day-play:hover { background: var(--surface-2); color: var(--text); }
.day-promote { flex: none; padding: 3px 7px; border-radius: 5px; border: 1px solid var(--border); background: none; color: var(--muted); font-family: var(--mono); font-size: var(--fs-2xs); white-space: nowrap; cursor: pointer; }
.day-promote:hover { border-color: var(--accent-line); color: var(--accent-ink); }
.day-empty { margin: 0; padding: 6px 10px; color: var(--muted); }
.day-close-link { display: flex; justify-content: flex-end; padding: 6px 10px 0; }
.day-must .add-row { margin: 2px 0 0; }

.day-tabs-block > summary { cursor: pointer; }
.day-tabs-block[open] > :not(summary) { margin-top: 14px; }
.day-tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-row); background: var(--surface); border: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.day-tab { flex: 1; padding: 7px 10px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.day-tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
@media (max-width: 559px) { .day-tabs { flex-wrap: wrap; overflow: visible; } .day-tab { flex: 1 1 40%; } } /* на телефоне вкладки в две строки, а не обрезаны справа (2026-10-27) */
.radar-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 9px; border: 1px solid color-mix(in oklch, var(--danger) 30%, var(--border)); background: color-mix(in oklch, var(--danger-soft) 50%, var(--bg)); color: var(--text); }
.radar-head { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 4px; font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--danger); }
.radar-line { display: flex; align-items: center; gap: 10px; padding: 3px 6px; margin: 0 -6px; border-radius: 6px; color: var(--text); text-decoration: none; }
.radar-line:hover { background: color-mix(in oklch, var(--danger-soft) 70%, transparent); color: var(--text); }
.radar-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radar-due { flex: none; font-size: var(--fs-xs); white-space: nowrap; }
.radar-due.is-danger { color: var(--danger); }
.radar-due.is-warn { color: var(--warn); }
.radar-due.is-ok { color: var(--muted); }
.radar-verdict { flex: none; padding: 1px 7px; border-radius: 4px; font-size: var(--fs-xs); white-space: nowrap; }
.radar-verdict.is-danger { background: var(--danger-soft); color: var(--danger); }
.radar-verdict.is-warn { background: var(--warn-soft); color: var(--warn); }
.radar-verdict.is-ok { background: var(--ok-soft); color: var(--ok); }
.habit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.habit-tile { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 7px 10px; border-radius: var(--radius-row); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.habit-tile.is-done { border-color: color-mix(in oklch, var(--ok) 45%, transparent); }
.habit-tile-check { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--control); color: var(--on-accent); font-size: 12px; }
.habit-tile.is-done .habit-tile-check { background: var(--ok); border-color: var(--ok); }
.habit-tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.habit-tile-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.habit-tile-streak { font-size: 10.5px; color: var(--muted); }
.habit-tile.is-done .habit-tile-streak { color: var(--ok); }
.mention-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.mention-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); }
.mention-card:hover { color: var(--text); border-color: var(--control); }
.mention-type { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--tone); }
.mention-type .side-dot { width: 6px; height: 6px; }
.mention-title { font-weight: 500; }
.mention-meta { font-size: var(--fs-sm); color: var(--muted); }

.day-nav { display: flex; align-items: center; gap: 4px; }
.day-nav .top-btn { font-family: var(--mono); }
.day-chip { padding: 3px 8px; border: 0; border-radius: 4px; background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: var(--fs-xs); white-space: nowrap; cursor: pointer; }
.day-chip:not(.is-today) { background: var(--accent-soft); color: var(--accent-ink); }
.day-pick-body { display: flex; flex-direction: column; gap: 10px; width: 264px; }
.day-pick-head { display: flex; align-items: center; gap: 4px; }
.day-pick-head strong { font-weight: 600; }
.day-pick-hint { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); }
.day-pick-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.day-pick-wd { padding-bottom: 3px; font-size: var(--fs-2xs); color: var(--label); }
.day-pick-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.day-pick-cell:hover { background: var(--surface-2); }
.day-pick-cell.is-other { color: var(--label); }
.day-pick-cell.is-today { box-shadow: inset 0 0 0 1px var(--accent); }
.day-pick-cell.is-selected { background: var(--accent); color: var(--on-accent); }
.day-pick-dot { width: 3px; height: 3px; border-radius: 50%; }
.day-pick-dot.is-on { background: var(--accent); }
.day-pick-cell.is-selected .day-pick-dot.is-on { background: var(--on-accent); }
.day-pick-foot { display: flex; gap: 6px; padding-top: 8px; border-top: 1px solid var(--divider); }
.day-pick-foot .btn { flex: 1; }

/* «Закрыть день» */
.close-day .modal-body { display: flex; flex-direction: column; gap: 12px; }
.close-day-rows { display: flex; flex-direction: column; gap: 8px; }
.close-day-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--divider); }
.close-day-title { flex: 1; min-width: 160px; }
.close-day-row .seg { margin-left: 0; }

/* ---------- Этап 27: «Входящие» – разбор по одному в одной карточке ---------- */
.screen-eyebrow.is-muted { color: var(--muted); }
/* Входящие (этап 29, макет): одна карточка разбора */
.ib-card { display: flex; flex-direction: column; gap: 18px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ib-title { width: 100%; padding: 0; border: 0; outline: 0; resize: none; overflow: hidden; background: none; color: var(--text); font: 500 19px/1.35 var(--font); letter-spacing: -0.01em; }
.ib-qs { display: flex; flex-direction: column; gap: 12px; }
.ib-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--text-2); }
.ib-q > span:first-child { flex: 1; min-width: 0; } /* кнопки «Да/Нет» – всегда справа, длинный вопрос переносится сам (2026-10-27) */
.ib-q .ib-yn { flex: none; flex-wrap: nowrap; }
.ib-yn, .ib-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.ib-opt, .ib-chip { min-height: 30px; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--control); background: none; color: var(--text); font: inherit; cursor: pointer; }
.ib-opt:hover, .ib-chip:hover { background: var(--surface-2); }
.ib-opt.is-on, .ib-chip.is-on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.ib-verdict { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--field); }
.ib-verdict-label { font-size: var(--fs-sm); color: var(--muted); }
.ib-verdict-kind { display: flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }
.ib-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ib-verdict-kind.is-muted { color: var(--muted); }
.ib-verdict-kind.is-accent { color: var(--link); }
.ib-verdict-kind.is-warn { color: var(--warn); }
.ib-verdict-kind.is-idea { color: var(--am); }
.ib-verdict-kind.is-note { color: var(--tag-fg); }
.ib-verdict-hint { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--muted); text-wrap: pretty; }
.ib-wording { display: flex; flex-direction: column; gap: 8px; }
.ib-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-check { display: flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 5px; font-size: var(--fs-sm); white-space: nowrap; }
.ib-check.is-ok { background: var(--ok-soft); color: var(--ok); }
.ib-check.is-warn { background: var(--warn-soft); color: var(--warn); }
.ib-ask { justify-self: start; padding: 5px 10px; border: 1px dashed var(--accent-line); border-radius: 6px; background: none; color: var(--accent-ink); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.ib-ask:disabled { opacity: .7; cursor: default; }
.ib-suggest { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 8px; border: 1px dashed var(--accent-line); }
.ib-suggest-mark { font-size: var(--fs-xs); color: var(--link); }
.ib-suggest-text { flex: 1; min-width: 180px; color: var(--text); }
.ib-suggest-btn { padding: 4px 10px; border: 0; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.ib-where { display: flex; flex-direction: column; gap: 10px; }
.ib-where-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ib-where-row > .caps { min-width: 92px; }
.ib-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ib-actions .btn-primary:disabled { opacity: 0.45; cursor: default; }
.ib-drop { margin-left: auto; color: var(--muted); }
.ib-drop:hover { color: var(--danger); }
.inbox-queue { display: flex; flex-direction: column; gap: 2px; }
.inbox-queue > .caps { margin: 0; padding: 0 10px 6px; }
.inbox-queue-row { padding: 6px 10px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font: inherit; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.inbox-queue-row:hover { background: var(--surface-2); }
.inbox-zero { padding: 40px 20px; text-align: center; }

/* ---------- Этап 27: «Неделя» ---------- */
.week-top, .week-loose { display: flex; flex-direction: column; gap: 2px; padding: 10px 4px 6px; border-radius: var(--radius-row); }
.week-top { border: 1px solid var(--accent-line); background: color-mix(in oklch, var(--accent-soft) 50%, transparent); }
.week-loose { border: 1px dashed var(--control); }
.week-top > .caps, .week-loose > .caps { margin: 0; padding: 0 10px 6px; }
.week-day { display: flex; flex-direction: column; gap: 2px; border-radius: 8px; }
.week-day.is-drop-target { box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in oklch, var(--accent-soft) 40%, transparent); }
.week-day-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 10px; border-bottom: 1px solid var(--divider); }
.week-day-title { font-weight: 600; white-space: nowrap; }
.week-day-title.is-today { color: var(--accent); }
.week-day-events { flex: 1 1 100%; min-width: 0; order: 3; font-size: var(--fs-xs); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } /* встречи дня – не шире экрана, до двух строк (2026-10-27) */
.week-load { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.week-load-bar { width: 80px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.week-load-bar span { display: block; height: 100%; background: var(--ok); }
.week-load-bar .is-almost { background: var(--warn); }
.week-load-bar .is-over { background: var(--danger); }
.week-load-text { font-size: var(--fs-xs); white-space: nowrap; color: var(--muted); }
.week-load-text.is-almost { color: var(--warn); }
.week-load-text.is-over { color: var(--danger); }
.week-deadline { display: flex; align-items: center; gap: 9px; padding: 6px 10px; font-size: var(--fs-sm); color: var(--danger); border-radius: 7px; }
.week-deadline:hover { color: var(--danger); background: var(--surface-2); }
.week-deadline-chip { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--danger-soft); font-family: var(--mono); font-size: var(--fs-2xs); text-transform: uppercase; }
.week-deadline-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-free { margin: 0; padding: 6px 10px; font-size: var(--fs-sm); color: var(--label); }
.view:has(.week-day) > * + * { margin-top: 22px; }

/* ---------- Этап 27: «Обзор недели» ---------- */
.review-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.review-step-tab { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer; }
.review-step-tab .mono { font-size: var(--fs-2xs); font-weight: 400; color: var(--muted); }
.review-step-tab.is-current { border-color: var(--accent); background: var(--accent-soft); }
.review-step-tab.is-current .mono { color: var(--accent); }
.review-step-tab.is-past { color: var(--text-2); }
.review-step-tab.is-past .mono { color: var(--ok); }
.review-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.review-title { margin: 0; font-size: var(--fs-body); font-weight: 600; }
.review-title-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.review-count { font-size: var(--fs-sm); color: var(--muted); }
.review-count.is-full { color: var(--ok); }
.review-text { margin: 0; font-size: 0.875rem; line-height: 1.6; color: var(--text-2); }
.review-ok { margin: 0; color: var(--ok); }
.review-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-row-title { flex: 1; min-width: 140px; color: var(--text); }
.review-pick { display: flex; align-items: center; gap: 10px; padding: 4px 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.review-pick:disabled { opacity: 0.45; cursor: default; }
.review-box { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--accent-line); color: var(--on-accent); font-size: 10px; }
.review-pick.is-on .review-box { background: var(--accent); border-color: var(--accent); }
.review-pick-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-pick-sph { font-size: var(--fs-xs); color: var(--muted); }
.review-pick-sph.is-must { color: var(--danger); }
.review-pick-sph.is-own { color: var(--ok); }
.review-nav { display: flex; justify-content: space-between; }
.review-card .actions { margin-top: 4px; }
@media (max-width: 599px) { .review-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Этап 27: «Календарь» ---------- */
.cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cal-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-title-h { margin: 0; font-weight: 500; font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.cal-head .seg { margin-left: 0; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-legend, .cal-load-legend { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: var(--fs-xs); color: var(--muted); }
.cal-legend > span, .cal-load-legend > span { display: flex; align-items: center; gap: 5px; }
.cal-key { width: 8px; height: 8px; border-radius: 2px; background: var(--muted); }
.cal-key.is-busy { background: var(--control); }
.cal-key.is-meeting { background: var(--meet); }
.cal-key.is-day { background: var(--deed); }
.cal-key.is-task { background: var(--accent); }
.cal-key.is-must { background: #b3413b; }
.cal-key.is-habit { background: #6f4cc0; }
.cal-load-legend .cal-key { width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--control); }
.cal-key.is-load-free { background: var(--bg); }
.cal-key.is-load-half { background: var(--ok-soft); }
.cal-key.is-load-almost { background: var(--warn-soft); }
.cal-key.is-load-over { background: var(--danger-soft); }
.cal-load-hint { margin-left: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid.is-compact { gap: 2px; }
.cal-weekday { padding: 0 4px 2px; font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cal-cell {
  min-width: 0; min-height: 96px; display: flex; flex-direction: column; gap: 3px; padding: 5px; overflow: hidden;
  border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer;
}
.cal-grid.is-compact .cal-cell { min-height: 52px; padding: 4px; }
.cal-cell.is-load-half { background: var(--ok-soft); }
.cal-cell.is-load-almost { background: var(--warn-soft); }
.cal-cell.is-load-over { background: var(--danger-soft); }
.cal-cell.is-other { opacity: 0.45; }
.cal-cell.is-today .cal-num { color: var(--accent); }
.cal-cell.is-selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-cell.is-drop-target { border-color: var(--accent); border-style: dashed; }
.cal-cell-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.cal-num { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-load { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.cal-pill { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 1px 4px; border-radius: 4px; background: var(--surface-2); font-size: 10.5px; line-height: 1.35; }
.cal-pill i { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal-pill span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-pill.is-busy { color: var(--text-2); }
.cal-pill.is-busy i { background: var(--control); }
.cal-pill.is-meeting { background: var(--meet-soft); }
.cal-pill.is-meeting i { background: var(--meet); }
.cal-pill.is-day { background: var(--deed-soft); }
.cal-pill.is-day i { background: var(--deed); }
.cal-pill.is-task { background: var(--accent-soft); }
.cal-more { padding: 0 4px; font-size: var(--fs-2xs); color: var(--muted); }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; margin-top: auto; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.dot.is-busy { background: var(--control); }
.dot.is-meeting { background: var(--meet); }
.dot.is-day { background: var(--deed); }
.dot.is-task, .dot.is-deadline { background: var(--accent); }
.cal-daycard { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.cal-daycard-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cal-daycard-title { margin: 0; font-size: var(--fs-body); font-weight: 600; }
.cal-daycard-load { font-size: var(--fs-sm); color: var(--muted); }
.cal-daycard-load.is-almost { color: var(--warn); }
.cal-daycard-load.is-over { color: var(--danger); }
.cal-daycard-head .btn { margin-left: auto; }
.cal-items, .cal-free { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.cal-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 0; border-top: 1px solid var(--divider); color: var(--text); text-decoration: none; }
.cal-item:hover { color: var(--text); background: var(--surface-2); }
.cal-time { flex: none; width: 92px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-item .cal-title::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.cal-item.is-busy .cal-title::before { background: var(--control); }
.cal-item.is-meeting .cal-title::before { background: var(--meet); }
.cal-item.is-day .cal-title::before { background: var(--deed); }
.cal-item.is-busy { color: var(--text-2); }
.cal-free li { display: flex; gap: 10px; padding: 6px 4px; }
.cal-day.is-today { border: 1px solid var(--accent); }
.view:has(.cal-head) { max-width: none; padding-top: 22px; }
.view:has(.cal-head) > * + * { margin-top: 14px; }

/* ---------- Этап 27: «Сфера» ---------- */
.view:has(.sphere-projects) > * + * { margin-top: 28px; }
.sphere-kicker { display: flex; align-items: center; gap: 8px; }
.sphere-kicker.is-danger { color: var(--danger); }
.sphere-kicker.is-ok { color: var(--ok); }
.sphere-about { cursor: text; }
.sphere-about:hover { color: var(--text); }
.caps.is-strong { color: var(--text); }
.sphere-radar { display: flex; flex-direction: column; gap: 12px; }
.sphere-radar > .caps { margin: 0; }
.radar-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; }
.radar-cell { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 0; border-radius: 6px; background: var(--surface); }
.radar-cell.is-today { background: var(--surface-2); }
.radar-wd { font-size: var(--fs-2xs); color: var(--muted); }
.radar-n { font-size: var(--fs-sm); }
.radar-dot { width: 6px; height: 6px; border-radius: 50%; }
.radar-cell.has-danger { background: var(--danger-soft); }
.radar-cell.has-danger .radar-dot { background: var(--danger); }
.radar-cell.has-warn { background: var(--warn-soft); }
.radar-cell.has-warn .radar-dot { background: var(--warn); }
.radar-cell.has-ok .radar-dot { background: var(--ok); }
.sphere-radar-list { display: flex; flex-direction: column; gap: 1px; }
.sphere-radar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 7px; color: var(--text); }
.sphere-radar-row:hover { color: var(--text); background: var(--surface-2); }
.sphere-radar-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sphere-radar-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sphere-radar-sub { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sphere-projects { display: flex; flex-direction: column; gap: 10px; }
.sphere-projects > .caps { margin: 0; }
.sphere-templates { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); }
.tpl-chip { padding: 3px 10px; border-radius: 6px; border: 1px dashed var(--control); background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.tpl-chip:hover { border-color: var(--accent); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.proj-card { display: flex; flex-direction: column; gap: 8px; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius-row); background: var(--surface); color: var(--text); }
.proj-card:hover { color: var(--text); border-color: var(--control); }
.proj-card-head { display: flex; align-items: center; gap: 8px; }
.proj-card-name { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.proj-card-status { flex: none; padding: 1px 7px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); font-size: var(--fs-xs); white-space: nowrap; }
.proj-card-next { display: flex; flex-direction: column; gap: 3px; }
.proj-card-step { font-size: var(--fs-sm); line-height: 1.45; color: var(--text-2); }
.proj-card-step.is-missing { color: var(--warn); }
.proj-card-foot { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-xs); color: var(--muted); }
.sphere-noproj { display: flex; flex-direction: column; gap: 6px; }
.sphere-noproj strong { color: var(--text); }
.sphere-tasks { display: flex; flex-direction: column; gap: 2px; }
.sphere-tasks-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 0 4px 10px; }
.sphere-tasks-head > .caps { margin-right: 8px; }
.seg-chip { padding: 4px 10px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; }
.seg-chip:hover { color: var(--text); }
.seg-chip[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.sphere-add { width: 24px; height: 24px; font-size: 14px; }
.sphere-tools { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.sphere-tools .seg-chip { border: 1px solid var(--border); border-radius: 6px; }
.sphere-panel { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; padding: 12px 14px; border-radius: var(--radius-row); background: var(--surface); border: 1px solid var(--border); }
.sphere-panel-inline { flex-direction: row; flex-wrap: wrap; gap: 4px; }
.sphere-panel-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sphere-panel-label { width: 80px; font-size: var(--fs-xs); color: var(--muted); }
.sphere-panel .seg-chip { border: 1px solid var(--border); }
.sphere-reset { align-self: flex-end; font-size: var(--fs-sm); }
.sphere-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.sphere-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-row); overflow-x: auto; }
.sphere-table th { padding: 8px 12px; text-align: left; font-weight: 400; background: var(--surface); }
.sphere-table td { padding: 9px 12px; border-top: 1px solid var(--divider); font-size: var(--fs-sm); white-space: nowrap; }
.sphere-table tbody tr { cursor: pointer; }
.sphere-table tbody tr:hover { background: var(--surface-2); }
.sphere-td-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-md); }
.prio-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--control); }
.prio-dot.is-danger { background: var(--danger); }
.prio-dot.is-warn { background: var(--warn); }
.prio-dot.is-accent { background: var(--ok); }
.is-overdue { color: var(--danger); }
.sphere-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.sk-col { display: flex; flex-direction: column; gap: 6px; min-height: 120px; padding: 8px; border-radius: var(--radius-row); background: var(--surface); border: 1px solid var(--divider); }
.sk-col.is-drop-target { border-color: var(--accent); border-style: dashed; }
.sk-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px; }
.sk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--control); }
.sk-dot.is-danger { background: var(--danger); }
.sk-dot.is-warn { background: var(--warn); }
.sk-dot.is-ok { background: var(--ok); }
.sk-dot.is-accent { background: var(--accent); }
.sk-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-count { font-size: var(--fs-xs); color: var(--label); }
.sk-card { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px; border-radius: 8px; background: var(--popover); border: 1px solid var(--border); color: var(--text); cursor: grab; }
.sk-card:hover { color: var(--text); border-color: var(--control); }
.sk-card-title { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.sk-check { flex: none; margin-top: 3px; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--control); }
.sk-check.is-danger { border-color: var(--danger); }
.sk-check.is-warn { border-color: var(--warn); }
.sk-check.is-ok { border-color: var(--ok); }
.sk-card-meta { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-xs); color: var(--muted); }
.sphere-empty { padding: 8px 10px; }
@media (max-width: 599px) { .radar-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* ---------- Этап 27: «Проект» ---------- */
.view:has(.project-head) > * + * { margin-top: 26px; }
.project-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--deed); }
.project-ring { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.project-title-row { display: flex; align-items: flex-start; gap: 8px; }
.project-head .title-input {
  flex: 1; min-width: 0; padding: 0; border: 0; background: none; resize: none; overflow: hidden; outline: 0;
  font-weight: 500; font-size: var(--fs-3xl); line-height: 1.05; letter-spacing: -0.025em; color: var(--text);
}
@media (max-width: 759px) { .project-head .title-input { font-size: var(--fs-2xl); } }
.project-title-row .btn { flex: none; margin-top: 6px; }
.project-title-row .icon-btn { flex: none; margin-top: 2px; }
.project-props { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.project-props > .caps { margin: 0; }
.pp-grid { display: grid; grid-template-columns: 130px minmax(0, 1fr); row-gap: 8px; align-items: center; padding: 6px 0 2px; }
.pp-name { color: var(--muted); }
.pp-value { min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pp-value .meta-chip { min-height: 26px; padding: 2px 8px; border-radius: 5px; font-size: var(--fs-sm); }
.pp-value .status-btn { min-height: 26px; padding: 2px 8px; font-size: var(--fs-sm); }
.pp-plain { font-size: var(--fs-xs); color: var(--text-2); }
.pp-warn { color: var(--warn); }
@media (max-width: 759px) { .pp-grid { grid-template-columns: 112px minmax(0, 1fr); } }
.project-graph > summary { cursor: pointer; }
.project-graph[open] > .project-graph-box { margin-top: 8px; }
.project-graph > .caps { margin: 0; }
.project-graph-box { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.project-graph-svg { display: block; }
.pg-line { stroke: var(--control); stroke-width: 1.2; }
.pg-center { fill: var(--deed-soft); stroke: var(--deed); stroke-width: 1.5; }
.pg-center-label { font-size: 12px; fill: var(--text); font-family: var(--font); }
.pg-node { cursor: pointer; }
.pg-node circle { fill: var(--accent); }
.pg-node.is-note circle { fill: var(--tag-fg); }
.pg-node.is-done circle { fill: var(--control); }
.pg-node text { font-size: 11px; fill: var(--text-2); font-family: var(--font); }
.pg-node:hover text, .pg-node:focus text { fill: var(--text); }
.project-result { display: flex; flex-direction: column; gap: 8px; }
.project-section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.project-result .textarea {
  padding: 2px 0 2px 16px; border: 0; border-left: 2px solid var(--deed); border-radius: 0; background: none;
  font-size: 1rem; line-height: 1.6; color: var(--text); min-height: 0;
}
.view:has(.project-head) .card:not(.checkpoint) { padding: 0; border: 0; background: none; box-shadow: none; }
.view:has(.project-head) .card:not(.checkpoint) .section-title { font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); }
.view:has(.project-head) .checkpoint { border-radius: var(--radius-row); }
.view:has(.project-head) .checkpoint.is-due { border-color: var(--accent-line); background: color-mix(in oklch, var(--accent-soft) 50%, var(--surface)); }
.pp-value .side-square { display: inline-block; vertical-align: 1px; }
.type-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--tone); }
.type-eyebrow .side-dot { background: var(--tone); }

/* ---------- Этап 27: страница объекта ---------- */
.page .page-head .page-type { min-height: 0; padding: 0; border: 0; background: none; color: var(--tone); font-family: var(--mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.page .page-head .page-type .note-glyph, .page .page-head .page-type .type-glyph { font-size: var(--fs-sm); }
.page .page-head .muted.small { font-family: var(--mono); font-size: var(--fs-2xs); }
.page .page-title { font-size: var(--fs-3xl); font-weight: 500; line-height: 1.1; letter-spacing: -0.025em; }
@media (max-width: 759px) { .page .page-title { font-size: var(--fs-2xl); } }
.page .page-editor .blk-text { font-size: var(--fs-body); line-height: 1.7; }
.page .backlinks { padding: 12px 0 0; border: 0; border-top: 1px solid var(--divider); border-radius: 0; background: none; }
.page .backlinks .section-title { font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); }
@media (min-width: 760px) { .composer-dialog { margin-top: 12vh; } }

/* ---------- Этап 27: Фокус ---------- */
.focus { height: calc(100dvh / var(--zoom, 1)); display: flex; flex-direction: column; overflow: hidden; background: var(--sidebar); } /* высота – ровно экран: середина .focus-scroll прокручивается, шапка и нижняя строка на месте */
.focus-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: calc(14px + var(--safe-top, 0px)) clamp(16px, 4vw, 40px) 14px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
.focus-mark { display: flex; align-items: center; gap: 7px; color: var(--link); text-transform: uppercase; }
.focus-dot-big { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.focus-path { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-time { margin: 0 0 0 auto; font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.focus-time.is-done { color: var(--warn); }
.focus-exit { font-family: var(--font); }
.focus-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; justify-content: center; padding: 5vh 20px calc(24px + var(--safe-bottom, 0px)); }
.focus-body { width: 100%; max-width: 680px; display: flex; flex-direction: column; gap: 22px; }
.focus-title { margin: 0; font-size: clamp(26px, 4vw, 40px); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; text-wrap: pretty; }
.focus-why { margin: 0; font-size: var(--fs-body); line-height: 1.65; color: var(--text-2); text-wrap: pretty; }
.focus-step { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-row); background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: var(--fs-body); }
.focus-step .caps { color: var(--link); }
.focus-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: var(--fs-body); }
.focus-modes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.focus-actions { margin-top: 0; }
.focus-body .input { width: 100%; }
.view:has(> .focus) { max-width: none; padding: 0; }

/* ---------- Этап 27: вход и аккаунт ---------- */
.view:has(> .auth-page) { max-width: none; padding: 0; }
.auth-page { min-height: calc(100dvh / var(--zoom, 1)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: calc(32px + var(--safe-top)) 16px calc(32px + var(--safe-bottom)); background: var(--bg); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.auth-logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.auth-card { width: 100%; max-width: 400px; padding: clamp(22px, 4vw, 32px); border-radius: 16px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-pop); }
.auth-body, .auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-title { margin: 0; font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.02em; }
.auth-sub { margin: -6px 0 0; color: var(--text-2); font-size: 0.875rem; line-height: 1.55; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: var(--fs-md); font-weight: 500; }
.auth-input { width: 100%; height: 44px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--control); background: var(--field); color: var(--text); font: inherit; font-size: 15px; outline: 0; }
.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--muted); }
.auth-pass { position: relative; display: block; }
.auth-pass .auth-input { padding-right: 84px; }
.auth-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.auth-show:hover { color: var(--text); }
.auth-pass-block { display: flex; flex-direction: column; gap: 8px; }
.auth-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.auth-meter span { height: 4px; border-radius: 2px; background: var(--border); }
.auth-meter .is-on { background: var(--danger); }
.auth-meter .is-on.is-2 { background: var(--warn); }
.auth-meter .is-on.is-3, .auth-meter .is-on.is-4 { background: var(--ok); }
.auth-rules { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-xs); color: var(--muted); }
.auth-rules li::before { content: '○ '; }
.auth-rules li.is-ok { color: var(--ok); }
.auth-rules li.is-ok::before { content: '✓ '; }
.auth-btn { display: grid; place-items: center; width: 100%; height: 46px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 15px; font-weight: 600; text-align: center; cursor: pointer; }
.auth-btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.auth-btn:disabled { opacity: 0.6; cursor: default; }
.auth-btn.is-outline { background: none; border-color: var(--control); color: var(--text); font-weight: 500; }
.auth-btn.is-outline:hover { border-color: var(--accent); }
.auth-plain { align-self: center; padding: 6px; border: 0; background: none; color: var(--text-2); font: inherit; cursor: pointer; text-align: center; }
.auth-plain:hover { color: var(--text); }
.auth-link { padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: var(--fs-sm); font-weight: 400; cursor: pointer; }
.auth-back { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--text-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-xs); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: var(--fs-sm); }
.auth-error[hidden] { display: none; }
.auth-hint { margin: 0; color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.auth-center { text-align: center; }
.auth-code { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--field); }
.auth-ok { color: var(--ok); font-size: var(--fs-sm); }
.auth-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 24px; }
.auth-icon.is-ok { background: var(--ok-soft); color: var(--ok); }
.auth-icon.is-mail { background: var(--accent-soft); color: var(--accent); }
.auth-icon.is-warn { background: var(--warn-soft); color: var(--warn); }
.auth-links { display: flex; gap: 18px; font-size: var(--fs-sm); }
.auth-links a { color: var(--muted); }
.auth-links a:hover { color: var(--text); }
.auth-card .cloud-login .btn { width: 100%; }

/* Виджеты Windows по макету (этап 27) */
.widget { background: var(--panel); border-color: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.w-label { font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 400; letter-spacing: 0.08em; color: var(--label); }
.w-time { font-family: var(--mono); font-size: var(--fs-xs); }
.w-row .check { width: 16px; height: 16px; border-width: 1.5px; border-color: var(--control); }
.w-now { border: 1px solid var(--accent-line); }
.w-timer { font-family: var(--mono); font-weight: 500; }
.day-assist-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.day-assist-row .mentor-links { display: flex; gap: 8px; flex-wrap: wrap; }
.day-assist-row .btn { min-height: 30px; font-size: var(--fs-sm); }
.day-assist-row .what-now { background: none; border-color: var(--accent-line); color: var(--accent-ink); }
.day-top .card { border-radius: var(--radius); }
.sphere-done { margin-top: 12px; } .sphere-done > summary { padding: 6px 10px; cursor: pointer; } .sphere-tools .chip { min-height: 26px; font-size: var(--fs-xs); }

/* Шапка типа объектов (этап 29, макет): вкладки видов слева, инструменты справа */
.type-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.type-tabs { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.type-tab { flex: none; padding: 5px 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; white-space: nowrap; cursor: pointer; }
.type-tab:hover { color: var(--text); }
.type-tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); font-weight: 500; }
.type-tab.is-plus { color: var(--label); }
.type-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.type-new { margin-left: auto; }
.type-tool { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--control); border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; }
.type-tool:hover { background: var(--surface-2); }
.type-tool.is-on { border-color: var(--accent-line); color: var(--link); }
.type-empty { margin-top: 12px; padding: 28px 16px; text-align: center; }

/* Ширина колонки: экран типа – 960 (макет); при свёрнутых панелях колонка шире и по центру (ТЗ) */
.shell[data-route="notes"] .view { --content-w: 960px; }
.shell.left-hidden .view { --content-w: 880px; }
.shell:not(.right-docked):not(.is-mobile) .view { --content-w: 880px; }
.shell.left-hidden:not(.right-docked):not(.is-mobile) .view { --content-w: 1000px; }
.shell[data-route="notes"].left-hidden .view, .shell[data-route="notes"]:not(.right-docked):not(.is-mobile) .view { --content-w: 1160px; }

/* Окно «Свойства типа» (этап 29, макет): две колонки – настройка и предпросмотр */
.sheet.modal.type-editor { width: min(920px, 100%); padding: 0; }
.te-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.te-top .modal-title { flex: none; font-size: 16px; }
.te-count { flex: 1; font-size: var(--fs-xs); color: var(--muted); }
.te-top .icon-btn { font-size: 20px; }
.te-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; max-height: min(70vh, 640px); overflow: hidden; }
.te-left { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; overflow-y: auto; }
.te-right { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-left: 1px solid var(--border); overflow-y: auto; }
.te-presets { display: flex; flex-direction: column; gap: 6px; }
.te-head { display: flex; align-items: center; gap: 12px; }
.te-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 10px; font-size: 20px; cursor: pointer; }
.te-name { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--control); border-radius: 8px; background: var(--field); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; }
.te-colors { display: flex; flex-direction: column; gap: 6px; }
.te-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.te-props { display: flex; flex-direction: column; gap: 8px; }
.te-prop { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.te-prop-line { display: flex; align-items: center; gap: 8px; }
.te-grip { flex: none; color: var(--label); font-size: 11px; letter-spacing: -1px; cursor: grab; user-select: none; }
.te-glyph { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
.te-glyph svg { width: 13px; height: 13px; }
.te-prop-name { flex: 1; min-width: 0; padding: 4px 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-weight: 500; }
.te-select { flex: none; width: 128px; height: 28px; padding: 0 8px; border: 1px solid var(--control); border-radius: 6px; background: var(--field); color: var(--text); font: inherit; font-size: var(--fs-sm); }
.te-x { flex: none; width: 24px; height: 24px; border: 0; border-radius: 5px; background: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.te-x:hover { color: var(--danger); background: var(--surface-2); }
.te-options { margin-left: 62px; height: 32px; padding: 0 10px; border: 1px solid var(--control); border-radius: 6px; background: var(--field); color: var(--text); font: inherit; font-size: var(--fs-sm); }
.te-add { padding: 9px 10px; border: 1px dashed var(--control); border-radius: 8px; background: none; color: var(--link); font: inherit; text-align: left; cursor: pointer; }
.te-add:hover { border-color: var(--accent-line); }
.te-add.is-ai { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.te-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.te-card-type { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); letter-spacing: 0.06em; text-transform: uppercase; }
.te-card-title { font-size: 18px; font-weight: 600; }
.te-card-props { display: grid; grid-template-columns: 110px minmax(0, 1fr); row-gap: 9px; column-gap: 10px; align-items: center; }
.te-card-name { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.te-card-name .icon svg { width: 13px; height: 13px; }
.te-card-value { min-width: 0; font-size: var(--fs-sm); }
.te-note { margin: 0; font-size: var(--fs-sm); color: var(--muted); text-wrap: pretty; }
.te-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); }
.te-delete { margin-right: auto; color: var(--muted); }
.te-delete:hover { color: var(--danger); }
@media (max-width: 760px) {
  .te-body { grid-template-columns: 1fr; max-height: none; overflow: visible; }
  .te-right { border-left: 0; border-top: 1px solid var(--border); }
  .te-options { margin-left: 0; }
  .te-select { width: 110px; }
}
/* Оценка и прогресс */
.prop-rating { color: var(--warn); letter-spacing: 1px; }
.prop-progress { display: inline-flex; align-items: center; gap: 10px; width: 100%; }
.prop-progress-bar { flex: 1; max-width: 220px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.prop-progress-bar > span { display: block; height: 100%; background: var(--ok); }
.prop-progress .mono { font-size: var(--fs-xs); color: var(--muted); }
.rating-pick { display: flex; gap: 4px; }
.rating-star { width: 36px; height: 36px; border: 1px solid var(--control); border-radius: 8px; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.rating-star.is-on { color: var(--warn); border-color: var(--warn); }

/* Страница объекта (этап 29, макет): «● ТИП», свойства таблицей с узкой колонкой названий, ссылки карточками */
.page .page-head .page-type { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.page .page-head .page-more { margin-left: auto; }
.note-props.prop-table { display: flex; flex-direction: column; padding: 6px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.props-head { display: flex; align-items: center; gap: 6px; padding: 4px 0 6px; }
.props-head .caps { flex: 1; }
.props-tool { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-xs); white-space: nowrap; cursor: pointer; }
.props-tool svg { width: 14px; height: 14px; }
.props-tool:hover, .props-tool.is-on { background: var(--surface-2); color: var(--text); }
.props-tool.is-ai { color: var(--link); }
.props-add { align-self: flex-start; margin-top: 4px; padding: 2px 0; border: 0; background: none; color: var(--link); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.prop-row { grid-template-columns: 130px minmax(0, 1fr) auto auto; min-height: 30px; }
.prop-row .prop-ai { opacity: 0; }
.prop-row:hover .prop-ai, .prop-row:focus-within .prop-ai { opacity: 1; }
@media (hover: none) { .prop-row .prop-ai { opacity: 0.6; } }
@media (max-width: 480px) { .prop-row { grid-template-columns: 110px minmax(0, 1fr) auto auto; } }
.page-links { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--divider); }
.backlink-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); text-decoration: none; }
.backlink-card:hover { border-color: var(--control); }
.backlink-head { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); font-weight: 600; }
.backlink-snippet { font-size: var(--fs-sm); color: var(--muted); }
.page-links-empty { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
/* Связи сворачиваются, фильтр и сортировка (2026-11-10) */
.links-block > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.links-block > summary::-webkit-details-marker { display: none; }
.links-block > summary::before { content: '▸'; font-size: 10px; transition: transform 0.15s; }
.links-block[open] > summary::before { transform: rotate(90deg); }
.links-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.links-tools select { height: 32px; font-size: var(--fs-sm); }
.links-list { display: flex; flex-direction: column; gap: 8px; }

/* Статистика (этап 29, макет): вкладки «Обзор · дашборды · +», четыре числа, тепловая карта, переносы */
.shell[data-route="insights"] .view, .shell[data-route="dash"] .view { --content-w: 820px; }
.stats { display: flex; flex-direction: column; gap: 18px; }
.stats-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stats-tab { padding: 5px 11px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; text-decoration: none; cursor: pointer; }
.stats-tab:hover { color: var(--text); }
.stats-tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); font-weight: 500; }
.stats-tab.is-plus { width: 28px; padding: 4px 0; border: 1px dashed var(--control); color: var(--link); text-align: center; }
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.kpi-value { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.kpi-label { font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 640px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.stat-title { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
.stat-note { margin: 0; font-size: var(--fs-sm); color: var(--muted); text-wrap: pretty; }
.heat { display: grid; grid-template-columns: 24px repeat(13, minmax(0, 1fr)); gap: 4px; align-items: center; }
.heat-hour, .heat-day { font-size: var(--fs-2xs); color: var(--label); text-align: center; }
.heat-cell { height: 20px; border-radius: 4px; background: var(--surface-2); }
.heat-cell.is-1 { background: color-mix(in oklch, var(--accent) 25%, var(--surface-2)); }
.heat-cell.is-2 { background: color-mix(in oklch, var(--accent) 45%, var(--surface-2)); }
.heat-cell.is-3 { background: color-mix(in oklch, var(--accent) 70%, var(--surface-2)); }
.heat-cell.is-4 { background: var(--accent); }
.moved-row { display: flex; align-items: center; gap: 8px; }
.moved-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.moved-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moved-meta { font-size: var(--fs-xs); color: var(--warn); }
.moved-btn { flex: none; padding: 5px 10px; border: 1px solid var(--control); border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; }
.moved-btn.is-ai { border-color: var(--accent-line); color: var(--link); }
.moved-btn:hover { background: var(--surface-2); }

/* Карточка задачи (этап 29, макет): заголовок с кружком, метки, кнопки, «Свойства задачи» таблицей, разделы подписями */
.tc-head { display: flex; align-items: flex-start; gap: 10px; }
.tc-head .title-input { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font-size: 17px; font-weight: 600; line-height: 1.3; resize: none; }
.tc-check { flex: none; width: 20px; height: 20px; margin-top: 2px; display: grid; place-items: center; padding: 0; border: 1.6px solid var(--muted); border-radius: 50%; background: none; color: var(--on-accent); cursor: pointer; }
.tc-check svg { width: 12px; height: 12px; }
.tc-check.is-danger { border-color: var(--danger); }
.tc-check.is-warn { border-color: var(--warn); }
.tc-check.is-accent { border-color: var(--ok); }
.tc-check[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.tc-kind { margin: -4px 0 0 30px; font-size: var(--fs-xs); color: var(--muted); }
.tc-tags { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.task-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 5px; background: var(--tag-bg); color: var(--tag-fg); font-size: var(--fs-sm); }
.tag-pill a { color: inherit; text-decoration: none; }
.tag-pill-x { padding: 0 3px; border: 0; background: none; color: inherit; opacity: 0.6; cursor: pointer; }
.tag-pill-x:hover { opacity: 1; }
.tag-add { padding: 2px 9px; border: 1px dashed var(--control); border-radius: 5px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.tc-ai-link { padding: 2px 8px; border: 1px solid var(--accent-line); border-radius: 12px; background: none; color: var(--link); font: inherit; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; cursor: pointer; }
.tc-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tc-actions .btn-primary, .tc-ai-btn { flex: 1 1 auto; justify-content: center; }
.tc-ai-btn { border-color: var(--accent-line); color: var(--accent-ink); }
.task-props { display: flex; flex-direction: column; gap: 6px; }
.tp-grid { display: grid; grid-template-columns: 108px minmax(0, 1fr); row-gap: 4px; column-gap: 10px; align-items: center; }
.tp-name { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.tp-name .icon svg { width: 14px; height: 14px; }
.tp-value { justify-self: start; max-width: 100%; display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 10px; border: 1px solid var(--control); border-radius: 6px; background: var(--field); color: var(--text); font: inherit; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.tp-value:hover { border-color: var(--accent-line); }
.tp-value.is-empty { border-color: transparent; background: none; color: var(--label); padding-left: 0; }
.tp-value.is-mono { font-family: var(--mono); font-size: var(--fs-sm); }
.tp-value.is-danger { border-color: color-mix(in oklch, var(--danger) 55%, transparent); color: var(--danger); font-family: var(--mono); font-size: var(--fs-sm); }
.tp-value.is-danger-text { border-color: transparent; background: none; color: var(--danger); padding-left: 0; }
.tp-value.is-warn-text { border-color: transparent; background: none; color: var(--warn); padding-left: 0; }
.tp-value.is-accent { color: var(--link); }
.tp-square { width: 8px; height: 8px; border-radius: 2px; background: var(--ok); }
.tp-square.is-must { background: var(--danger); }
.tp-prio { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-prio-btn { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid var(--control); border-radius: 5px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.tp-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tp-prio-btn.is-danger { --c: var(--danger); }
.tp-prio-btn.is-warn { --c: var(--warn); }
.tp-prio-btn.is-accent { --c: var(--ok); }
.tp-prio-btn .tp-dot { background: var(--c); }
.tp-prio-btn[aria-pressed="true"] { border-color: var(--c); color: var(--text); }
.tc-section { display: flex; flex-direction: column; gap: 6px; }
.tc-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc-label .ai-btn { width: auto; height: auto; padding: 0; color: var(--link); }
.tc-section > textarea { min-height: 0; padding: 0; border: 0; background: none; color: var(--text); font: inherit; line-height: 1.5; resize: none; }
.tc-section > textarea:focus { outline: none; }
.tc-hint { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); }
.tc-hint p { margin: 0; line-height: 1.5; }
.tc-hint-kicker { color: var(--link); }
.tc-hint .tc-ai-link { align-self: flex-start; border: 0; padding: 0; }
.tc-checklist { margin: 0; }
.tc-add .input { min-height: 34px; border-style: dashed; background: none; }
.side-card .tc-head .title-input { font-size: 17px; }
.side-card-back { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid var(--control); border-radius: 5px; background: none; color: var(--text-2); font: inherit; font-family: var(--mono); font-size: var(--fs-xs); cursor: pointer; }
.side-card-fill { margin-left: auto; padding: 3px 8px; border: 1px solid var(--accent-line); border-radius: 5px; background: none; color: var(--link); font: inherit; font-size: var(--fs-xs); cursor: pointer; }

/* Окно «Записать» (этап 29, макет): вкладки + esc, поле с камерой/скрепкой/микрофоном, «Когда · Куда · Приоритет», подвал */
.composer-dialog .composer { gap: 0; padding: 0; }
.composer-top { display: flex; align-items: center; gap: 6px; padding: 10px 12px 6px; }
.composer-top .composer-kinds { flex: 1; }
.composer-kind { padding: 4px 10px; border-radius: 6px; font-weight: 500; }
.composer-kind[aria-checked="true"] { background: var(--surface-2); color: var(--text); }
.composer-esc { padding: 2px 6px; border: 0; background: none; color: var(--label); font-size: var(--fs-xs); cursor: pointer; }
.composer-input { display: flex; align-items: center; gap: 2px; padding: 4px 12px 10px 16px; border-bottom: 1px solid var(--border); }
.composer-input .composer-title { flex: 1; min-width: 0; font-size: 16px; }
.composer-icon, .composer-input .icon-btn { flex: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text-2); cursor: pointer; }
.composer-icon:hover, .composer-input .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.composer-icon svg, .composer-input .icon-btn svg { width: 17px; height: 17px; }
.composer-icon span:empty { display: none; }
.composer-icon.is-recording { color: var(--danger); }
.composer .quick-parts:not(:empty), .composer .composer-summary:not(:empty), .composer .composer-extra:not(:empty) { padding: 6px 16px 0; }
.composer-picks { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px; }
.composer-picks:empty { display: none; }
.composer-pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--control); border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; }
.composer-pick .icon svg { width: 14px; height: 14px; }
.composer-pick.is-on { border-color: var(--accent-line); color: var(--accent-ink); background: var(--accent-soft); }
.composer-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--field); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.composer-hint { min-width: 0; padding: 0; border: 0; background: none; color: var(--label); font-size: var(--fs-2xs); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }
.composer-foot .composer-gap { flex: 1; }
@media (max-width: 520px) { .composer-hint { display: none; } }
.composer-input .composer-icon { border: 0; background: none; min-height: 0; }

/* Календарь (этап 29, макет): сетка на всю ширину, справа – «Расставить в календарь» по коробочкам */
.cal-tray { display: flex; flex-direction: column; gap: 12px; }
.tray-hint { margin: 0; font-size: var(--fs-sm); color: var(--muted); text-wrap: pretty; }
.tray-group { display: flex; flex-direction: column; gap: 6px; }
.tray-task { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); text-decoration: none; cursor: grab; }
.tray-task:hover { border-color: var(--control); }
.tray-grip { color: var(--label); font-size: 11px; }
.tray-ring { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ok); }
.tray-ring.is-must { border-color: var(--danger); }
.tray-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tray-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-meta { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-when { flex: none; font-size: var(--fs-2xs); color: var(--label); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Фокус (этап 29, макет): внизу – «Мысль не по теме – во входящие» и поиск */
.focus { display: flex; flex-direction: column; }
.focus-scroll { flex: 1; }
.focus-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 40px; border-top: 1px solid var(--border); }
.focus-field { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); }
.focus-field .icon svg { width: 15px; height: 15px; }
.focus-field-input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; }
.focus-kbd { padding: 1px 5px; border-radius: 3px; background: var(--surface-2); font-size: var(--fs-2xs); }
@media (max-width: 760px) { .focus-foot { grid-template-columns: 1fr; padding: 12px 16px calc(12px + var(--safe-bottom)); } }

/* Настройки окном (этап 29, макет): слева разделы, справа содержимое */
.sheet.modal.settings-modal { width: min(880px, 100%); height: min(680px, calc(100dvh / var(--zoom, 1) - 40px)); padding: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); overflow: hidden; position: fixed; }
.settings-modal[open] { display: grid; }
.settings-modal .settings-nav { display: flex; flex-direction: column; gap: 2px; padding: 18px 10px; border-right: 1px solid var(--border); background: var(--sidebar); overflow-y: auto; }
.settings-modal-title { margin: 4px 10px 12px; font-size: 16px; font-weight: 600; }
.settings-modal .settings-nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; border-radius: 7px; background: none; color: var(--text-2); font: inherit; text-align: left; cursor: pointer; }
.settings-modal .settings-nav-item:hover { background: var(--surface-2); color: var(--text); }
.settings-modal .settings-nav-item[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 500; }
.settings-modal .settings-nav-item .icon svg { width: 16px; height: 16px; }
.settings-modal-body { overflow-y: auto; padding: 22px 24px 28px; }
.settings-modal-close { position: absolute; top: 10px; right: 10px; z-index: 1; font-size: 20px; }
.day-props-fill { padding: 2px 8px; border: 0; border-radius: 5px; background: none; color: var(--link); font: inherit; font-size: var(--fs-xs); white-space: nowrap; cursor: pointer; }
.day-props-fill:hover { background: var(--accent-soft); }

/* Профиль в «Аккаунте» (макет): аватар и имя по центру */
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 16px; text-align: center; }
.profile-card .profile-avatar { width: 76px; height: 76px; font-size: 26px; }
.profile-card .profile-text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.profile-card .profile-text strong { font-size: 16px; }
.profile-card .actions { justify-content: center; margin-top: 6px; }

/* Цвета темы (ROADMAP 30.21): кружки-образцы фона и акцента */
.swatches { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.swatch { position: relative; display: grid; justify-items: center; gap: 4px; width: 64px; padding: 4px 0; border: 0; background: none; color: var(--text-2); font: inherit; font-size: var(--fs-2xs); cursor: pointer; }
.swatch-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px oklch(0.5 0 0 / 0.35); }
.swatch[aria-checked="true"] { color: var(--text); font-weight: 500; }
.swatch[aria-checked="true"] .swatch-dot { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* «✦ Найти связи» (ROADMAP 30.24): предложение галочками под метками */
.links-offer { display: grid; gap: 8px; padding: 10px 12px; border: 1px dashed var(--accent-line); border-radius: 8px; background: color-mix(in oklch, var(--accent-soft) 40%, transparent); }
.links-head { color: var(--accent-ink); font-size: var(--fs-xs); }
.links-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.links-pick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 1px solid var(--control); border-radius: 999px; background: none; color: var(--text-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.links-pick.is-on { border-color: var(--accent-line); color: var(--text); }
.links-box { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--control); border-radius: 4px; font-size: 11px; }
.links-pick.is-on .links-box { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.links-pick.is-tag { color: var(--tag-fg); }
.links-actions { display: flex; gap: 6px; }

/* Дневник (ROADMAP 30.6): итоги, полоса дней, поля ответов, вопросы */
.jr-head-links { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.jr-summary { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.jr-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.jr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.jr-tile { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); min-width: 0; }
.jr-tile-value { font-size: var(--fs-lg, 1.15rem); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-tile-label { color: var(--muted); font-size: var(--fs-xs); }
.jr-strip { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.jr-day { flex: none; display: grid; justify-items: center; gap: 2px; width: 30px; padding: 4px 0; border: 1px solid transparent; border-radius: 7px; background: none; color: var(--text-2); font: inherit; cursor: pointer; }
.jr-day:hover { background: var(--surface-2); }
.jr-day.is-current { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.jr-day-cell { display: grid; grid-template-rows: 1fr 1fr; width: 14px; height: 22px; gap: 2px; }
.jr-day-cell i { border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.jr-day-cell i.is-am.is-on { background: var(--am); box-shadow: none; }
.jr-day-cell i.is-pm.is-on { background: var(--pm); box-shadow: none; }
.jr-day-num { font-size: var(--fs-xs); font-weight: 500; }
.jr-day-dow { font-size: 10px; color: var(--muted); }
.jr-other { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); }
.jr-scale { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.jr-scale-btn { width: 34px; height: 34px; border: 1px solid var(--control); border-radius: 8px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.jr-scale-btn.is-on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.jr-scale.is-fuel .jr-scale-btn { width: 22px; height: 22px; border-radius: 5px; }
.jr-scale.is-fuel .jr-scale-btn.is-on { border-color: var(--am); background: var(--am); }
.jr-scale-word { color: var(--muted); font-size: var(--fs-sm); margin-left: 4px; }
.jr-hours-row { display: inline-flex; align-items: center; gap: 8px; }
.jr-hours { width: 96px; }
.jr-history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.jr-history-head .input { max-width: 260px; }
.jr-past-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-chip { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font-size: var(--fs-sm); }
.jq-dialog { width: min(640px, calc(100vw - 32px)); }
.jq-head h2 { margin: 0 0 4px; }
.jq-body { display: grid; gap: 16px; margin: 14px 0; max-height: 60vh; overflow: auto; }
.jq-part { display: grid; gap: 8px; }
.jq-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 140px auto; gap: 6px; align-items: center; }
.jq-move { display: inline-flex; }
.jq-move .icon-btn, .jq-del { width: 28px; height: 28px; }
.jq-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jq-foot { display: flex; gap: 8px; align-items: center; }
.jq-gap { flex: 1; }
@media (max-width: 520px) { .jq-row { grid-template-columns: auto minmax(0, 1fr) auto; } .jq-kind { grid-column: 2; } }

.trigger-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.trigger-input { width: 44px; text-align: center; font-family: var(--font-mono, monospace); font-size: 1.05rem; }

/* Виджеты Windows по макету (ROADMAP 30.12): «Надо сегодня», «Рамка дня», «Радар», плашка «Сейчас» */
.w-row.is-done .w-title { color: var(--muted); text-decoration: line-through; }
.w-now-line { display: flex; align-items: center; gap: 8px; margin: 0; }
.w-time.is-now { color: var(--danger); font-family: var(--font-mono, monospace); }
.w-now-rule { flex: 1; height: 1px; background: var(--danger); }
.w-row.is-meeting .w-title { color: var(--meet); }
.w-row.is-deed .w-title { color: var(--deed); }
.w-row.is-busy .w-title { color: var(--muted); }
.w-free { color: var(--muted); font-size: var(--fs-sm); }
.w-radar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: color-mix(in oklch, var(--danger-soft) 70%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.w-radar-day { color: var(--danger); font-weight: 700; text-transform: uppercase; font-size: var(--fs-xs); }
.w-radar .w-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-radar-chip { flex: none; padding: 2px 8px; border-radius: 6px; font-size: var(--fs-xs); background: var(--danger); color: #fff; }
.w-radar-chip.is-ok { background: var(--ok); }
.widget.is-now .w-head { display: none; }
.widget.is-now { border-radius: 999px; justify-content: center; -webkit-app-region: drag; }
.w-pill { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 16px; min-width: 0; }
.w-pill button { -webkit-app-region: no-drag; }
.w-pill .w-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.w-pill-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.w-pill .w-timer { flex: none; font-family: var(--font-mono, monospace); font-size: var(--fs-sm); color: var(--text-2); }
.w-pill.is-empty { width: 100%; justify-content: center; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }

/* Тип заметки в «Записать» – такой же кнопкой, как «Когда · Куда · Приоритет» */
.composer-picks.is-note { padding: 4px 0 6px; }
.composer-pick-emoji { font-size: 14px; line-height: 1; }
.composer-pick-caret { color: var(--muted); font-size: 11px; }

/* «✦ Переименовать / ✦ Разобрать» под названием задачи */
.retitle-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.retitle-title { font-weight: 600; }
.retitle-details p { margin: 4px 0 0; white-space: pre-wrap; color: var(--text-2); font-size: var(--fs-sm); }
.retitle-steps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.retitle-steps .caps { width: 100%; }

.tc-retitle { color: var(--accent-ink); border-color: var(--accent-line); }
.tc-retitle.is-hint { background: var(--accent-soft); }

/* Настройки → «Опубликованное» */
.published-list { display: grid; gap: 8px; }
.published-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border); }
.published-row:first-child { border-top: 0; }
.published-main { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.published-title { font-weight: 600; color: var(--text); text-decoration: none; }
.published-url { color: var(--link); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.published-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.is-danger { color: var(--danger); }

/* Галерея: свойства не обрезаются – плашки выше строки текста, поэтому без max-height (пожелание 2026-10-04) */
.gallery-body .note-props-line { max-height: none; overflow: visible; align-items: center; }
.gallery-body .note-props-line > * { max-width: 100%; }
.gallery-card { height: auto; }

/* Просроченное на «Дне» (пожелание 2026-10-03): красная пометка и быстрые решения */
.day-row.is-late .day-check { border-color: var(--danger); }
.day-row-late { color: var(--danger); font-weight: 500; }
.day-row-fix { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
/* Кнопки у просроченной (ROADMAP 32.8): тихие пилюли без рамок, главная – цветом */
.fix-btn { padding: 2px 9px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: var(--fs-xs); line-height: 1.6; cursor: pointer; }
.fix-btn:hover { background: var(--control); color: var(--text); }
.fix-btn.is-main { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.day-carried .day-row:not(.is-late) .fix-btn.is-main { background: var(--accent-soft); color: var(--accent-ink); }
.fix-btn.is-ai { background: var(--accent-soft); color: var(--accent-ink); }
.fix-btn.is-cancel { background: none; color: var(--muted); }
.fix-btn.is-cancel:hover { color: var(--danger); background: none; }
.fix-hint { color: var(--muted); font-size: var(--fs-xs); }
.overdue-banner { padding: 10px 12px; border-radius: 9px; border: 1px solid color-mix(in oklch, var(--danger) 35%, var(--border)); background: color-mix(in oklch, var(--danger-soft) 60%, var(--bg)); color: var(--text-2); font-size: var(--fs-sm); }
.overdue-banner strong { color: var(--danger); }

/* Экран типа: «⚙ Настроить тип» справа на уровне названия */
.type-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.type-title-row .screen-title { margin: 0; min-width: 0; }
.type-settings { flex: none; }

/* Прокрутка длинных списков свойств (пожелание 2026-10-04): колонки окна типа и свойства в «Записать» –
   своей прокруткой, шапка и кнопки внизу на месте. Высота – с учётом масштаба интерфейса */
.te-body { grid-template-rows: minmax(0, 1fr); }
.te-left, .te-right { max-height: min(calc(70dvh / var(--zoom, 1)), 640px); min-height: 0; overscroll-behavior: contain; }
.composer .composer-extra:not(:empty) { max-height: calc(45dvh / var(--zoom, 1)); overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 760px) {
  .te-left, .te-right { max-height: none; }
  .sheet.modal.type-editor { max-height: calc(92dvh / var(--zoom, 1)); overflow-y: auto; }
}

.input-time.is-invalid { border-color: var(--danger); }

/* Голос значком (окно «Записать»): красный пульсирующий микрофон; ✦ умная запись */
.composer-input .composer-icon.is-recording { color: var(--danger); animation: pulse 1.1s ease-in-out infinite; }
.composer-input .composer-magic { color: var(--accent); }
.composer-input .composer-magic:hover { color: var(--accent-ink); background: var(--accent-soft); }
.composer-input .composer-magic.is-recording { color: var(--danger); animation: pulse 1.1s ease-in-out infinite; }
.smart-review { width: min(620px, calc(100vw - 32px)); }
.smart-list { display: grid; gap: 8px; max-height: calc(60dvh / var(--zoom, 1)); overflow-y: auto; margin: 10px 0 14px; }
.smart-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.smart-item input[type="checkbox"] { margin-top: 6px; }
.smart-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.smart-kind { justify-self: start; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .04em; }
.smart-kind.is-task { background: var(--accent-soft); color: var(--accent-ink); }
.smart-kind.is-note { background: var(--tag-bg); color: var(--tag-fg); }
.smart-kind.is-idea { background: var(--am-soft); color: var(--am); }
.smart-kind.is-project { background: var(--warn-soft); color: var(--warn); }
.smart-title { font-weight: 600; }
.smart-notes { color: var(--text-2); font-size: var(--fs-sm); white-space: pre-wrap; }
.smart-warn { color: var(--warn); font-size: var(--fs-xs); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Настройки → «Вложения» */
.attach-card { display: grid; gap: 12px; }
.attach-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.attach-done { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid color-mix(in oklch, var(--warn) 35%, var(--border)); border-radius: 10px; background: color-mix(in oklch, var(--warn-soft) 50%, transparent); }
.attach-done-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: var(--fs-sm); }
.attach-list { display: grid; }
.attach-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.attach-list > .attach-row:first-child { border-top: 0; }
.attach-glyph { flex: none; width: 22px; text-align: center; }
.attach-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.attach-name { justify-self: start; max-width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 500; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.attach-name:hover { color: var(--link); }
.attach-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-xs); color: var(--text-2); }
.attach-owner { color: var(--link); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.attach-owner.is-done { color: var(--muted); }
.btn-danger-outline { border-color: color-mix(in oklch, var(--danger) 50%, var(--control)); color: var(--danger); }

/* Галерея (ROADMAP 31.3): ничего не режется по ширине – чипы и значения переносятся, ссылка – до 2 строк */
.gallery-body .note-props-line > * { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.gallery-body .note-props-line .opt-chip { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.gallery-body .note-props-line .prop-link { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gallery-body .note-prop:has(.prop-link) { display: flex; gap: 2px; min-width: 0; }
.prop-link[role="link"] { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.kanban-open .note-props-line > *, .own-note-row .note-props-line > * { min-width: 0; overflow-wrap: anywhere; }
.gallery-body .note-props-line .opt-chip { border-radius: 10px; }

/* Календарь: ‹ сегодня › у заголовка и подсказка (ROADMAP 31.8) */
.cal-nav { display: inline-flex; align-items: center; gap: 4px; }
.cal-nav .top-btn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 1.1rem; }
.cal-nav .top-btn:hover { background: var(--surface-2); }
.cal-hint { flex-basis: 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; padding: 8px 12px; border: 1px dashed var(--accent-line, var(--border)); border-radius: 10px; background: var(--accent-soft, var(--surface-2)); font-size: var(--fs-sm); }

/* Масштаб − / + (ROADMAP 31.17) */
.zoom-control { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.zoom-stepper { display: inline-flex; align-items: center; gap: 6px; }
.zoom-stepper .btn { min-width: 36px; font-size: 1.1rem; }
.zoom-value { min-width: 4.5ch; text-align: center; }

/* Заметки задачи – редактор без блоков (ROADMAP 31.10): выглядит как поле ввода */
.blocks.is-plain { min-height: 72px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm, 8px); background: var(--field); }
.blocks.is-plain:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.blocks.is-plain .blk { grid-template-columns: minmax(0, 1fr); padding-left: 0; margin-left: 0; }
.blocks.is-plain .blk-handle { display: none; }
.blocks.is-plain .blk-tail { min-height: 12px; }

/* Шаблоны (ROADMAP 31.13) */
.tpl-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tpl-item { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--divider); }
.tpl-item.is-hidden .tpl-main { opacity: .5; }
.tpl-main { display: grid; flex: 1; min-width: 0; gap: 2px; }
.tpl-name { font-weight: 600; overflow-wrap: anywhere; }
.tpl-dialog { width: min(520px, 100vw - 24px); }
.tpl-body { padding: 8px 0 12px; max-height: min(70dvh, 560px); overflow-y: auto; }
.tpl-dialog .jq-head h2 { font-size: var(--fs-lg, 1.15rem); }
.tpl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tpl-chip.is-own { border-style: dashed; }
.tpl-chip.is-gear { text-decoration: none; }

/* Графики с несколькими рядами и доли (ROADMAP 31.14) */
.stack-seg { stroke: none; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--text-2); }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.chart-key { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.chart-legend-label { overflow-wrap: anywhere; }
.chart-legend-value { color: var(--text); font-variant-numeric: tabular-nums; }
.share-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.share-seg { min-width: 4px; flex-basis: 0; }
.type-title-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* «Стереть все данные» (ROADMAP 31.15) */
.wipe-dialog { width: min(520px, calc(100vw - 24px)); }
.wipe-body { padding: 4px 4px 0; }
.wipe-body h2 { margin: 0; }
.wipe-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.wipe-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.wipe-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.wipe-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--divider); }
.wipe-row p { margin: 2px 0 0; }
.ok-text { color: var(--ok); margin: 0; }

/* Фокус – полноэкранный слой поверх оболочки (ROADMAP 32.4): верхняя строка, меню и нижняя панель телефона
   больше не съедают высоту – нижняя строка (во входящие / поиск) всегда на экране, при любом масштабе */
.focus { position: fixed; inset: 0; z-index: 75; height: auto; }
.focus-scroll { padding-top: clamp(16px, 4vh, 48px); }
.focus-title { font-size: clamp(22px, 3.2vw, 36px); }
@media (max-width: 760px) {
  .focus-bar { flex-wrap: wrap; row-gap: 6px; }
  .focus-foot { gap: 8px; }
}
.focus-foot > * { min-width: 0; }
.focus-field { min-width: 0; box-sizing: border-box; }

/* [[Ссылки]] во время правки строки (ROADMAP 32.13): ссылкой, скобки – только когда курсор внутри */
.blk-text.is-editing .wl-name { color: var(--link); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.blk-text.is-editing .wl-edit.is-missing .wl-name { color: var(--muted); text-decoration-style: dashed; }
.blk-text.is-editing .wl-br { font-size: 0; }
.blk-text.is-editing .wl-edit.is-open .wl-br { font-size: inherit; color: var(--muted); }
.blk-text.is-editing .wl-edit.is-open .wl-name { text-decoration: none; }

/* Статусы с иконками и проекты «В плане» (ROADMAP 32.10) */
.popover-icon { display: inline-block; width: 1.4em; margin-right: 6px; text-align: center; }
.status-btn.is-planned { background: var(--surface-2); color: var(--text-2); }
.proj-planned { display: grid; gap: 6px; margin: 8px 0 12px; }
.proj-planned-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text); text-decoration: none; }
.ideas-planned { display: grid; gap: 6px; }

/* Импорт по шагам (ROADMAP 32.5): плитки форматов и приложений, зона перетаскивания */
.import-tiles { display: grid; gap: 8px; }
.import-tiles.is-formats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.import-tiles.is-apps { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.import-tile { display: grid; justify-items: start; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.is-apps .import-tile { justify-items: center; text-align: center; padding: 14px 8px; }
.import-tile:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.import-tile-icon { font-size: 1.4rem; line-height: 1; }
.import-tile-name { font-weight: 600; }
.import-tile-about { color: var(--muted); font-size: var(--fs-xs); }
.import-from { display: flex; align-items: center; gap: 10px; }
.import-drop { display: grid; place-items: center; gap: 6px; min-height: 180px; padding: 20px; border: 2px dashed var(--border); border-radius: 12px; color: var(--text-2); text-align: center; cursor: pointer; }
.import-drop.is-over, .import-drop:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.import-drop-icon { font-size: 1.8rem; }

/* Вводный гайд (ROADMAP 32.19) */
.tour { width: min(560px, calc(100vw - 24px)); }
.tour-body { display: grid; gap: 12px; padding: 8px 6px 4px; }
.tour-icon { font-size: 2.6rem; line-height: 1; }
.tour-title { margin: 0; font-size: var(--fs-xl, 1.4rem); line-height: 1.2; }
.tour-text { margin: 0; color: var(--text-2); line-height: 1.55; }
.tour-where { justify-self: start; }
.tour-dots { display: flex; gap: 6px; justify-content: center; }
.tour-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--control); }
.tour-dots span.is-on { width: 18px; border-radius: 3px; background: var(--accent); }
.tour-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.tour-spheres { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.tour-sphere { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; }
.tour-sphere-name { font-weight: 600; }
.tour-dump { min-height: 160px; }

/* ✦ ИИ в правом верхнем углу карточки разбора (ROADMAP 32.23) */
.ib-head { display: flex; align-items: flex-start; gap: 10px; }
.ib-head .ib-title { flex: 1; min-width: 0; }
.ib-ai { flex: none; padding: 5px 11px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.ib-ai:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); }
.ib-ai:disabled { opacity: .7; cursor: progress; }

.ib-step { display: flex; align-items: center; gap: 6px; }
.ib-step .input { flex: 1; min-width: 0; }

/* Гайд – панель поверх экрана (2026-10-04): тур – карточкой в правом нижнем углу (телефон – внизу), экран видно;
   настройка – по центру, пошире */
.tour-coach { position: fixed; z-index: 90; right: 20px; bottom: 20px; width: min(420px, calc(100vw - 24px)); max-height: calc(100dvh / var(--zoom, 1) - 40px); overflow-y: auto; padding: 16px 18px; border: 1px solid var(--accent-line); border-radius: 16px; background: var(--popover); box-shadow: var(--shadow-modal); }
.tour-coach.is-setup { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: min(560px, calc(100vw - 24px)); }
.tour-coach .tour-body { padding: 0; }
.tour-coach .tour-icon { font-size: 1.8rem; }
.tour-coach .tour-title { font-size: var(--fs-lg, 1.15rem); }
.tour-row { display: flex; align-items: center; gap: 10px; }
@media (max-width: 759px) {
  .tour-coach { left: 8px; right: 8px; bottom: calc(var(--tabbar-h, 64px) + var(--safe-bottom, 0px) + 8px); width: auto; max-height: 52dvh; }
  .tour-coach.is-setup { left: 8px; right: 8px; top: calc(12px + var(--safe-top, 0px)); bottom: calc(12px + var(--safe-bottom, 0px)); transform: none; width: auto; max-height: none; }
}

/* «Задачи» с представлениями (2026-10-04) */
.tv-tabs { display: flex; gap: 4px; overflow-x: auto; }
.tv-add { border-style: dashed; color: var(--muted); }
.tv-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.meta-chip.is-on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.tv-filter { display: grid; gap: 6px; margin-bottom: 10px; }
.tv-group .section-title { margin-bottom: 4px; }

/* ИИ по картинке в «Записать» – цвет ассистента (этап 33.4) */
.composer-input .icon-btn.composer-ai-icon { color: var(--accent-ink); }
.composer-input .icon-btn.composer-ai-icon:hover { color: var(--accent); }

/* ✦ у названия задачи (этап 33.5) */
.tc-head .tc-retitle { flex: none; align-self: flex-start; margin-top: 6px; color: var(--accent-ink); font-size: 1.1rem; }
.tc-head .tc-retitle.is-hint { color: var(--accent); }

/* × у плашек «День» – скрыть на сегодня (этап 33.12) */
.has-close { display: flex; align-items: flex-start; gap: 8px; }
.has-close > span { flex: 1; min-width: 0; }
.banner-x { flex: none; width: 28px; height: 28px; margin: -4px -6px -4px 0; border: 0; border-radius: 6px; background: none; color: inherit; opacity: .7; font-size: 18px; line-height: 1; cursor: pointer; }
.banner-x:hover { opacity: 1; background: color-mix(in oklch, currentColor 12%, transparent); }

/* «Задачи / Идеи / Проекты» (этап 33.6) */
.tv-scopes { align-self: flex-start; }
.tv-scope-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tv-new { display: inline-flex; align-items: center; gap: 6px; }
.tv-new .icon { width: 16px; height: 16px; }
.tv-project { align-items: center; }
.tv-project-icon { flex: none; width: 28px; text-align: center; font-size: 1.05rem; }

.assist-wishes { width: 100%; margin: 4px 0 2px; }

/* Поля карточек (этап 33.9) */
.cl-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.cl-row { display: flex; align-items: center; gap: 4px; min-height: 40px; padding: 2px 4px 2px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.cl-row.is-hidden .cl-label { color: var(--muted); text-decoration: line-through; }
.cl-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cl-row .icon-btn:disabled { opacity: .3; }

/* «День» без коробочек (этап 35.15) */
.day-sub { margin: 10px 0 2px; }
.day-close-link { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: flex-end; }
.day-filters { margin: 4px 0 8px; }
.day-carried .actions { margin: 6px 0; }
.day-note-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.created-list { display: grid; gap: 2px; }
.created-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.created-row:hover { background: var(--surface-2); }
.created-time { color: var(--muted); font-size: var(--fs-sm); }
.created-kind { color: var(--muted); font-size: var(--fs-sm); }
.created-title { min-width: 0; overflow-wrap: anywhere; }
.loose-list { max-width: 420px; }
.loose-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--border); }
.loose-title { flex: 1 1 180px; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.task-row .is-deadline { color: var(--text-2); }

/* Дневник – мягкая пастель (этап 35.7, выбор пользователя): чуть-чуть цвета поверх фона темы, без грязных смесей.
   Утро – тёплый песочный, вечер – сине-фиолетовый; текст обычный, контраст как у остальных карточек */
.journal-card.is-am { border-color: color-mix(in oklch, var(--am) 26%, var(--border)); background: color-mix(in oklch, var(--am) 10%, var(--surface)); }
.journal-card.is-pm { border-color: color-mix(in oklch, var(--pm) 26%, var(--border)); background: color-mix(in oklch, var(--pm) 10%, var(--surface)); }
.journal-strip.is-am { border-color: color-mix(in oklch, var(--am) 28%, var(--border)); background: color-mix(in oklch, var(--am) 9%, var(--surface)); }
.journal-strip.is-pm { border-color: color-mix(in oklch, var(--pm) 28%, var(--border)); background: color-mix(in oklch, var(--pm) 9%, var(--surface)); }

/* «Все объекты» (docs/OBJECTS.md) */
.objects-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.objects-search { flex: 1 1 220px; min-width: 0; }
.objects-sort { flex: 0 1 200px; min-width: 0; }
.objects-done { margin-top: 0; }
.objects-types { margin-bottom: 12px; }
.objects-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.object-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.object-row:hover { background: var(--surface-2); }
.object-row.is-done .object-title { color: var(--muted); text-decoration: line-through; }
.object-title { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .object-row { grid-template-columns: 24px minmax(0, 1fr) auto; } .object-date { display: none; } }
.own-props-add { align-self: flex-start; margin: -4px 0 4px; font-size: var(--fs-sm); }
.te-behaviors { display: grid; gap: 2px; margin-bottom: 10px; } .te-behavior { margin-top: 0; }
.tag-colors { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tag-page .tag-field { width: 100%; }
.tag-page textarea.tag-field { resize: vertical; }
.object-type-chip { align-self: flex-start; margin-bottom: 4px; } .project-eyebrow-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Значок типа у задачи и проекта – как у заметки (docs/OBJECTS.md, шаг 3) */
.object-type-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; padding: 0; border: 0; background: none; color: var(--accent); font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.object-type-chip:hover { text-decoration: underline; }
.day-sub.is-late { color: var(--danger); }
/* Файл как объект (2026-10-09): «↗ Объект» справа у файла и в углу картинки; страница файла */
.blk-file-obj { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 4px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-2); font-size: var(--fs-xs); text-decoration: none; }
.blk-file-obj:hover { background: var(--surface-2); color: var(--text); }
.blk-file-obj .icon svg { width: 13px; height: 13px; }
.blk-img-box .blk-file-obj { position: absolute; top: 6px; right: 6px; background: var(--surface); opacity: 0; transition: opacity .15s; }
.blk-img-box:hover .blk-file-obj, .blk-img-box .blk-file-obj:focus-visible { opacity: 1; }
@media (hover: none) { .blk-img-box .blk-file-obj { opacity: 0.9; } }
.file-object { display: grid; gap: 12px; }
.file-object-head { display: flex; align-items: center; gap: 12px; }
.file-object-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); font-size: 22px; }
.file-object-img { max-width: 100%; max-height: 60vh; border-radius: var(--radius-sm); cursor: zoom-in; justify-self: start; }
.file-object-owner { margin: 0; }
.file-object-head .stack-tight { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
/* Свой цвет (2026-10-09): кружок-радуга, выбранный – своим цветом; цвета вариантов в окне типа */
.color-dot.is-custom { position: relative; display: inline-block; overflow: hidden; background: conic-gradient(#ef4444, #f59e0b, #84cc16, #14b8a6, #3b82f6, #a855f7, #ec4899, #ef4444); }
.color-dot.is-custom[aria-checked="true"] { background: var(--any-fg); }
.color-custom-input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.te-opt-colors { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 0 0 34px; }
.te-opt-colors .opt-chip { border: 0; cursor: pointer; font: inherit; font-size: var(--fs-xs); }
/* Свои свойства в общей сетке (2026-10-09) */
.prop-row-add { grid-column: 1 / -1; justify-self: start; font-size: var(--fs-sm); }
.tp-value.prop-row-value, .pp-value.prop-row-value { text-align: left; border: 0; background: none; padding: 2px 0; color: var(--text); font: inherit; cursor: pointer; }
/* Страница файла (2026-10-09): как у ссылки, файл – акцентом */
.file-page .file-object { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--accent-line, var(--border)); border-radius: var(--radius); background: var(--accent-soft); }
.file-page .file-object-head { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.file-page .file-object-icon { width: 56px; height: 56px; font-size: 28px; background: var(--surface); }
.file-notes-head { margin: 18px 0 4px; }
.pp-name > .icon { display: none; } /* в сетке проекта, сферы, файла названия без значков */
.sphere-props .pp-value .seg { margin-left: 0; }
/* Боты (ROADMAP 36) */
.bots-code { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.bots-code p { margin: 0; }
.bots-code-value { font-size: var(--fs-lg, 1.25rem); letter-spacing: 0.15em; }
.bots-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bots-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bots-prefixes { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.bots-prefixes p { margin: 0; }
.bots-prefix-grid { display: grid; grid-template-columns: 56px 1fr; gap: 6px 10px; align-items: center; }
.bots-prefix-input { width: 56px; text-align: center; }
/* Сообщество ВКонтакте в «О приложении» (ROADMAP 37.1) */
.about-links { margin: 6px 0 0; }
.about-link { display: inline-flex; align-items: center; gap: 8px; color: var(--link); text-decoration: none; }
.about-link:hover { text-decoration: underline; }
.vk-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #0077ff; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: -0.02em; }

/* Дерево в видах «Список» и «Таблица»: подзадачи и задачи проекта (пожелание 2026-10-11) */
.own-notes.is-tree .task-row { gap: 4px; }
.own-notes .task-row.is-sub { padding-left: calc(var(--tree-level, 0) * 24px); }
.tree-toggle { flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; transition: transform 0.15s ease; }
.tree-toggle:hover { background: var(--surface-2); color: var(--text); }
.tree-toggle.is-open { transform: rotate(90deg); }
.tree-toggle.is-empty { cursor: default; pointer-events: none; }
.tree-count { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.tree-count-icon { font-size: 0.95em; opacity: 0.8; }
.tree-cell { display: flex; align-items: center; gap: 6px; padding-left: calc(var(--tree-level, 0) * 22px); }
.tree-cell .table-title { flex: 1; min-width: 0; }
.notes-table tr.is-sub .table-title { font-weight: 500; }
.own-notes .task-row.is-sub .own-note-title { font-weight: 500; }

.notes-table .tree-cell { min-width: 250px; }
@media (max-width: 480px) { .own-notes .task-row.is-sub { padding-left: calc(var(--tree-level, 0) * 16px); } .tree-cell { padding-left: calc(var(--tree-level, 0) * 14px); } }

/* Цвет метки (страница метки → settings.tagMeta): плашки и #метки в строках задач (2026-10-14) */
.tag-tone { --tag-bg: var(--any-bg); --tag-fg: var(--any-fg); }
.task-meta .is-tag.tag-tone { color: var(--any-fg); }
/* Календарь «Подписка – только смотреть» (2026-10-14): событие видно, но время не занимает – пунктиром */
.wk-block.is-event, .wk-chip.is-event { background: transparent; color: var(--text-2); border: 1px dashed var(--control); cursor: default; }
.cal-mode-hint { flex-basis: 100%; margin: 0; }
.wk-head { touch-action: pan-y; }
/* Приоритет строкой и списком (2026-10-16) */
.tp-value .tp-dot, .prio-option .tp-dot { display: inline-block; flex: none; margin-right: 6px; vertical-align: middle; }
.tp-dot.is-danger { background: var(--danger); }
.tp-dot.is-warn { background: var(--warn); }
.tp-dot.is-accent { background: var(--ok); }
.tp-dot.is-none { background: var(--control); }
.prio-option { display: flex; align-items: center; min-height: 36px; font-size: var(--fs-sm); }
.prio-option.is-selected { background: var(--surface-2); font-weight: 600; }
/* «Не сделано в свой день» заметнее, дедлайн в строке – меткой (2026-10-16) */
.day-carried-head { color: var(--warn); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.day-carried-deadlines { color: var(--danger); }
.day-row-deadline { color: var(--text-2); font-weight: 600; white-space: nowrap; }
.day-row-deadline.is-hard { color: var(--danger); }

/* Ширина столбцов таблицы (2026-10-16): ручка у правого края заголовка; заданная ширина – обрезаем с «…» */
.notes-table th { position: relative; }
.th-resize { position: absolute; top: 0; right: -3px; bottom: 0; z-index: 1; width: 7px; cursor: col-resize; touch-action: none; }
.th-resize:hover, .th-resize:active { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.cell-box.is-sized { overflow: hidden; text-overflow: ellipsis; }
.cell-box.is-sized .table-title, .cell-box.is-sized .tree-cell { min-width: 0; }
.notes-table td:has(.cell-box.is-sized) { min-width: 0; }

/* Группы в списке и таблице (2026-10-16) */
.row-groups { display: grid; gap: 14px; }
.row-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; cursor: pointer; list-style: none; }
.row-group-head::-webkit-details-marker { display: none; }
.row-group-head::before { content: '▾'; color: var(--muted); font-size: 12px; }
.row-group:not([open]) .row-group-head::before { content: '▸'; }
.row-group-count { color: var(--muted); font-size: var(--fs-xs); }

/* «Неделя»: время на сферы, проекты и задачи (ROADMAP 39.6) */
.week-budgets { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.week-budget { display: inline-grid; grid-template-columns: auto 64px auto; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.week-budget.is-done { border-color: color-mix(in srgb, var(--ok) 60%, var(--border)); }
.week-budget-title { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-budget-bar { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.week-budget-bar > span { display: block; height: 100%; background: var(--accent); }
.week-budget.is-done .week-budget-bar > span { background: var(--ok); }
.week-budget-time { color: var(--muted); font-size: var(--fs-xs); }
.week-budget-add { padding: 4px 10px; border: 1px dashed var(--control); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.week-budget-add:hover { color: var(--accent); border-color: var(--accent); }
.week-budget-sum { color: var(--muted); font-size: var(--fs-xs); }
.week-budget-sum.is-done { color: var(--ok); }
.budget-minutes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }

/* «✦ Что сделать?» сворачивается (2026-10-17) */
.day-ai-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.day-ai.is-collapsed { padding-block: 10px; }

/* Календарь перехода по дням на телефоне – во всю ширину листа, по центру (2026-10-17: был 264 px и съезжал) */
.day-pick-head strong { flex: 1; text-align: center; white-space: nowrap; }
.day-pick-foot { display: flex; align-items: center; gap: 8px; }
@media (max-width: 759px) {
  .day-pick-body { width: 100%; max-width: 420px; margin: 0 auto; }
  .day-pick-cell { height: 40px; }
}
/* Окно «Свойства типа» на телефоне (2026-10-17): с крупным масштабом шапка вылезала вправо, низ уходил за экран и не
   прокручивался. Теперь – колонка: шапка переносится, середина прокручивается, кнопки внизу всегда видны */
@media (max-width: 760px) {
  .sheet.modal.type-editor { display: flex; flex-direction: column; width: 100%; max-height: calc(94dvh / var(--zoom, 1)); overflow: hidden; }
  .sheet.modal.type-editor .te-top { flex: none; flex-wrap: wrap; row-gap: 2px; }
  .sheet.modal.type-editor .te-top .modal-title { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
  .sheet.modal.type-editor .te-body { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .sheet.modal.type-editor .te-foot { flex: none; flex-wrap: wrap; }
}
/* Свойства проекта/сферы/файла: длинное название («Обязательность») с крупным шрифтом налезало на значение (2026-10-17) –
   колонка названий по самому длинному, но не шире 45%, перенос по слогам; отступ между колонками */
.pp-grid { grid-template-columns: minmax(96px, min(45%, max-content)) minmax(0, 1fr); column-gap: 12px; }
.pp-name { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 759px) { .pp-grid { grid-template-columns: minmax(88px, min(42%, max-content)) minmax(0, 1fr); } }
/* Название проекта на телефоне – на всю ширину, кнопки строкой ниже: рядом с «Обсудить» слова рвались посередине (2026-10-17) */
@media (max-width: 759px) {
  .project-title-row { flex-wrap: wrap; }
  .project-head .title-input { flex-basis: 100%; overflow-wrap: break-word; word-break: normal; }
  .project-title-row .btn, .project-title-row .icon-btn { margin-top: 0; }
}

.budget-own-row { display: flex; gap: 6px; margin-bottom: 6px; }
.budget-own { flex: 1; min-width: 0; }

/* Панель «Расставить»: фильтр и сортировка (2026-10-17) */
.tray-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.tray-select { flex: 1 1 120px; min-width: 0; min-height: 32px; padding: 4px 8px; font-size: var(--fs-sm); }
.tray-check { flex-basis: 100%; font-size: var(--fs-sm); }
.tray-count { display: block; margin-bottom: 6px; }
.tray-when.is-near { color: var(--danger); }

/* Конструктор «Дня» (ROADMAP 35.12): блоки в две колонки – «половина ширины»; на телефоне всё во всю ширину */
.day-blocks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; align-items: start; }
.day-blocks > .day-block { grid-column: 1 / -1; min-width: 0; }
.day-blocks > .day-block.is-half { grid-column: auto; }
.day-blocks > .day-block:empty { display: none; }
@media (max-width: 759px) { .day-blocks > .day-block.is-half { grid-column: 1 / -1; } }
.day-layout-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 6px; }
.day-layout-chips .chip { min-height: 28px; padding: 0 10px; font-size: var(--fs-sm); }
.day-layout-menu { margin-left: auto; color: var(--muted); font-size: var(--fs-sm); }
.journal-mini { display: grid; gap: 8px; }
.journal-mini-part { display: grid; gap: 2px; }
.journal-mini-line { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-frame-box .frame-list { max-height: 420px; overflow-y: auto; }
/* Радар в половине ширины: название важнее пометки – пометку прячем, срок остаётся (2026-10-17) */
.day-block.is-half .radar-line { grid-template-columns: minmax(0, 1fr) auto; }
.day-block.is-half .radar-verdict { display: none; }
.day-block.is-half .radar-head { flex-wrap: wrap; gap: 4px; }
/* Импорт: поля из файлов → свойства типа (2026-10-29) */
.import-map-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr); gap: 6px 8px; align-items: center; }
.import-map-grid select { width: 100%; }
.import-map-field { overflow-wrap: anywhere; }
.chip-add { border-style: dashed; color: var(--link); }
/* Модули (2026-11-10) */
.module-list { display: flex; flex-direction: column; }
.module-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--divider); cursor: pointer; }
.module-row:first-child { border-top: 0; }
.module-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.module-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tp-hint { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
/* Длинное «Когда» и компактная группа инструментов (2026-11-11). */
.tp-value { min-width: 0; white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; }
.tp-value > .tp-dot { flex: none; }
.tv-toolbar { justify-content: flex-start; }
.tv-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-left: auto; min-width: 0; }
.tv-scope-controls { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tv-scope-controls > .icon-btn { width: 28px; height: 28px; color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 559px) { .tv-tools { flex-basis: 100%; } }
/* Сайты в заметках и блоках: один iframe при обычном и развёрнутом просмотре. */
.web-embed { min-width: 0; width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.web-embed-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); }
.web-embed-title { flex: 1 1 120px; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-sm); }
.web-embed-tools .btn { min-height: 28px; padding: 3px 7px; font-size: var(--fs-xs); }
.web-embed-body { display: grid; place-items: center; min-width: 0; max-width: 100%; background: var(--field); }
.web-embed-frame { display: block; width: 100%; height: 100%; border: 0; background: white; }
.web-embed-hint { margin: 0; padding: 5px 8px; font-size: var(--fs-xs); line-height: 1.4; color: var(--muted); }
.web-embed.is-expanded { position: fixed; inset: 0; margin: 0; width: calc(100vw / var(--zoom, 1)); height: calc(100dvh / var(--zoom, 1)); max-width: none; max-height: none; z-index: 1000; display: flex; flex-direction: column; box-sizing: border-box; border-radius: 0; }
.web-embed.is-expanded .web-embed-body { flex: 1; min-height: 0; height: auto !important; }
.web-embed.is-expanded::backdrop { background: var(--overlay); }
.sheet.modal.site-preview { width: min(960px, calc(100vw - 16px)); padding: 12px; max-height: calc(92dvh / var(--zoom, 1)); overflow-y: auto; }
.site-preview .modal-head { margin-bottom: 8px; }
.site-preview .web-embed-body { height: min(60dvh, 540px) !important; }
.site-preview .web-embed.is-expanded .web-embed-body { height: auto !important; }
.blk-embed .blk-body { width: 100%; min-width: 0; }
.day-tabs-block > summary, .day-panel-summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.day-tabs-block > summary::before, .day-panel-summary::before { content: '▸'; flex: none; }
.day-tabs-block[open] > summary::before, .day-custom-panel[open] > summary::before { content: '▾'; }
.panel-config { margin-left: auto; flex: none; font-size: var(--fs-xs); font-weight: normal; text-transform: none; letter-spacing: normal; }
.day-panel-summary > .caps { min-width: 0; overflow-wrap: anywhere; }
.day-panel-summary > .icon-btn { flex: none; width: 26px; height: 26px; }
.day-panel-body { display: grid; gap: 12px; min-width: 0; padding-top: 12px; }
.day-custom-panel:not([open]) > .day-panel-body { display: none; }
.day-panel-content { min-width: 0; }
.day-panel-content + .day-panel-content { border-top: 1px solid var(--border); padding-top: 12px; }
.panel-content-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-content-tools .btn { min-height: 28px; padding: 3px 7px; font-size: var(--fs-xs); }
.panel-collection-results { min-width: 0; overflow-x: auto; }
.sheet.modal.panel-editor { width: min(520px, calc(100vw - 16px)); display: grid; gap: 12px; padding: 16px; max-height: calc(88dvh / var(--zoom, 1)); overflow-y: auto; }
.panel-editor .field { display: grid; gap: 4px; font-size: var(--fs-sm); }
.panel-editor-items { display: grid; gap: 8px; min-width: 0; }
.panel-editor-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.panel-editor-item > .input { grid-column: 1 / -1; }
.panel-editor-item .actions { gap: 4px; }
.panel-editor-item .btn { padding: 3px 7px; min-height: 28px; }
.day-panel-item-title { margin: 0 0 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--label); overflow-wrap: anywhere; }
/* Матрица Эйзенхауэра (2026-11-13): тот же канбан, но квадранты 2×2; на телефоне – друг под другом */
.kanban.is-matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; gap: 10px; scroll-snap-type: none; }
.kanban.is-matrix .kanban-col { width: auto; min-width: 0; max-height: none; }
.kanban.is-matrix .kanban-col[data-col="do"] { border-top: 3px solid var(--danger); }
.kanban.is-matrix .kanban-col[data-col="plan"] { border-top: 3px solid var(--ok); }
.kanban.is-matrix .kanban-col[data-col="quick"] { border-top: 3px solid var(--warn); }
.kanban.is-matrix .kanban-col[data-col="drop"] { border-top: 3px solid var(--border); }
.kanban-hint { margin: -2px 0 6px; font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 559px) { .kanban.is-matrix { grid-template-columns: minmax(0, 1fr); } }
/* Наборы модулей и примеры (2026-11-13) */
.module-sets { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }
.module-sets .muted { margin: 0; }
.module-text strong { cursor: pointer; }
.module-how > summary { cursor: pointer; color: var(--link); font-size: var(--fs-sm); margin-top: 4px; }
.module-how p { margin: 6px 0; color: var(--text-2); }
.module-shot { display: block; width: 100%; max-width: 520px; border: 1px solid var(--border); border-radius: 8px; }
/* Мелочи разом, цели, SMART (2026-11-13) */
.snakes-btn { align-self: flex-start; margin: 6px 0 2px; }
.snakes-list { min-width: min(360px, 86vw); }
.snake-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--divider); }
.snake-title { flex: 1; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.goal-pop .goal-hint { margin: 0 0 8px; max-width: 360px; line-height: 1.45; }
.goal-block > summary { cursor: pointer; }
.smart-strip { display: inline-flex; gap: 3px; }
.smart-letter { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border); color: var(--muted); font-family: var(--mono); font-size: 12px; font-weight: 600; }
.smart-letter.is-on { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.smart-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.smart-card > summary::-webkit-details-marker { display: none; }
.smart-card .section-title { margin: 0; }
.smart-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--divider); }
.smart-row-letter { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-family: var(--mono); font-weight: 700; }
.smart-row.is-on .smart-row-letter { background: var(--ok-soft); color: var(--ok); }
.smart-row-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.smart-row-name { font-size: var(--fs-sm); color: var(--text-2); }
.smart-text { margin: 0; }
.smart-feasible { display: flex; flex-direction: column; gap: 4px; }
/* Профиль (2026-11-13) */
.profile-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile-methods { display: flex; flex-direction: column; }
.profile-method { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--divider); }
.profile-method:first-child { border-top: 0; }
.profile-method-name { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.profile-weights .chip { min-width: 34px; justify-content: center; }

/* Доступ для ИИ-сервисов (MCP, этап 53): ключи, выдача, готовые настройки */
.mcp-keys { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mcp-key { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.mcp-key-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 220px; }
.mcp-key-text strong { overflow-wrap: anywhere; }
.mcp-key-line { overflow-wrap: anywhere; }
.mcp-key .actions { margin: 0; }
.mcp-note { font-weight: 400; }
.mcp-token { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mcp-token code { flex: 1 1 200px; min-width: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-family: var(--font-mono, ui-monospace, monospace); overflow-wrap: anywhere; user-select: all; }
.mcp-snippet { border-top: 1px solid var(--border); padding-top: 8px; }
.mcp-snippet summary { cursor: pointer; font-weight: 600; }
.mcp-code { max-width: 100%; margin: 6px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: var(--fs-sm, 13px); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }

/* Раздел «Матрица» (2026-11-14): фильтры над квадрантами */
.matrix-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.matrix-filters .chips { flex-wrap: wrap; }
.matrix-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.matrix-project { flex: 1 1 180px; max-width: 320px; min-width: 0; }

/* Разбор «Входящих» в одно касание (2026-11-21) */
.ib-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }

/* Быстрая запись поверх всех окон (Windows, 2026-11-21) */
.widget.is-capture { height: auto; padding: 8px; border-radius: 14px; box-shadow: none; }
html.is-widget:has(.is-capture), html.is-widget:has(.is-capture) * { scrollbar-width: none; }
html.is-widget:has(.is-capture) :is(.shell, .view, main) { overflow: hidden; }
.widget.is-capture .quick-add-box { margin: 0; }
.widget.is-capture .input { font-size: 16px; padding-right: 12px; }
.widget.is-capture .quick-field-icons { display: none; }
