:root {   /* палитра «Охра и золото» (макет docs\maket-colors-3.html, вариант 1) */
  --bg: #F4EFE6; --panel: #FFFCF6; --panel-2: #ECE5D8; --ink: #211A12; --mute: #6E6252; --line: #E1D7C5; --line-2: #EBE3D5;
  --accent: #A35E12; --accent-ink: #FFFFFF; --warn: #B23A26; --warn-bg: #F6E1D8; --ok: #2B8757; --edge: rgba(122, 104, 80, .26);
  --shade: rgba(30, 26, 21, .35);
  /* цвета областей — одни на весь сайт: графики, плитки, метки */
  --c-sleep: #4A6AD0; --c-work: #2B8757; --c-money: #B8741A; --c-people: #C04878; --c-mood: #7553C2; --c-games: #2788A3;
  --ui: "Manrope", "Segoe UI", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --read: "IBM Plex Serif", Georgia, serif;
  --r: 9px; --rb: 14px; --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
  --nav-w: 200px; --panel-w: 640px; --nav-h: 56px;
}
:root[data-theme="dark"] {
  --bg: #15110D; --panel: #1E1914; --panel-2: #28221B; --ink: #F0E8DA; --mute: #AFA392; --line: #382F26; --line-2: #2E2720;
  --accent: #F0B94A; --accent-ink: #15110D; --warn: #FF8A7A; --warn-bg: #3B231C; --ok: #6ED69A; --edge: rgba(214, 196, 168, .2);
  --shade: rgba(0, 0, 0, .55);
  --c-sleep: #8FA6F0; --c-work: #6ED69A; --c-money: #F59E5B; --c-people: #F08CB8; --c-mood: #B9A2F5; --c-games: #5FD0E8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* полосы прокрутки и системные элементы (выпадающие списки, календарь) — в цвет темы, а не белые по умолчанию */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--mute); background-clip: padding-box; }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; overflow: hidden; display: flex; padding-top: var(--top); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
a { color: var(--accent); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* навигация сверху (новый дизайн 19.10): значок, разделы с чертой под выбранным, поиск-команда, настройки */
body { flex-direction: column; }
.side { height: var(--nav-h); flex: none; display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); background: var(--panel); padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: 12px; flex: none; }
.brand b { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 15px var(--ui); letter-spacing: 0; }
.brand small { font: 11px var(--mono); color: var(--mute); white-space: nowrap; }
.side button { display: flex; align-items: center; gap: 7px; height: var(--nav-h); padding: 0 12px; color: var(--mute); font-weight: 600; white-space: nowrap; flex: none; border-bottom: 2px solid transparent; }
.side button svg { width: 16px; height: 16px; flex: none; }
.side button[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.side button:hover { color: var(--ink); }
.side > button[data-page] svg { display: none; }
.side kbd { font: 11px var(--mono); color: var(--mute); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.side > button[data-page] kbd { display: none; }
.side .sep { flex: 1; min-width: 12px; }
.side #navSearch, .side #navPalette { height: 38px; border-radius: var(--r); background: var(--panel-2); border: 0; padding: 0 12px; font-weight: 500; margin-left: 6px; }
.side #navSearch { min-width: 220px; }
.side #navSearch kbd, .side #navPalette kbd { margin-left: auto; padding-left: 5px; }
.side .foot { display: flex; align-items: center; gap: 2px; margin-left: 6px; flex: none; }
.side .foot button { height: 38px; width: 38px; justify-content: center; padding: 0; border-radius: var(--r); border: 0; }
.side .foot button span { display: none; }
.side .foot button[aria-current="page"] { background: var(--panel-2); color: var(--ink); }
.search .plus { position: absolute; right: 48px; top: 18px; width: 24px; height: 24px; display: none; align-items: center; justify-content: center; color: var(--accent); }

/* центр: карта */
main { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; }
.map { flex: 1; min-width: 0; position: relative; }
#graph { position: absolute; inset: 0; }
.lens { position: absolute; left: 14px; top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; z-index: 2; pointer-events: none; }
.lens > * { pointer-events: auto; }
.seg { display: inline-flex; gap: 4px; }
.seg button, .zoom button, .chip { height: 32px; padding: 0 11px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); font-weight: 500; font-size: 12px; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.time { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); font-family: var(--mono); font-size: 11px; color: var(--mute); }
.time input { width: 120px; accent-color: var(--accent); }
.zoom { position: absolute; right: 14px; top: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.zoom button { width: 32px; padding: 0; font-family: var(--mono); font-size: 14px; }
.legend { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--mute); z-index: 2; pointer-events: none; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { display: inline-block; width: 9px; height: 9px; background: var(--mute); }
.legend i.c { border-radius: 50%; } .legend i.ring { border-radius: 50%; background: none; border: 2px solid var(--mute); width: 7px; height: 7px; }
.legend i.d { transform: rotate(45deg) scale(.85); } .legend i.st { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); width: 11px; height: 11px; }
.legend i.br { width: 18px; height: 0; border-top: 2px dashed var(--accent); background: none; }
.selbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; background: var(--ink); color: var(--panel); padding: 8px 10px 8px 14px; border-radius: var(--r); z-index: 3; font-size: 13px; }
.selbar[hidden] { display: none; }
.selbar button { background: var(--panel); color: var(--ink); height: 28px; padding: 0 10px; border-radius: 4px; font-weight: 500; font-size: 12px; }

/* панель справа */
.panel { width: var(--panel-w); flex: none; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.search { padding: 12px 14px; border-bottom: 1px solid var(--line-2); position: relative; }
.search input { width: 100%; height: 36px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); outline: none; }
.search input:focus { border-color: var(--accent); background: var(--panel); }
.search svg { position: absolute; left: 25px; top: 22px; width: 16px; height: 16px; color: var(--mute); pointer-events: none; }
.search kbd { position: absolute; right: 24px; top: 20px; font: 11px var(--mono); color: var(--mute); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; }
.recent { position: absolute; left: 14px; right: 14px; top: 50px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); z-index: 5; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.recent[hidden] { display: none; }
.recent button { display: block; width: 100%; text-align: left; padding: 8px 12px; color: var(--mute); }
.recent button:hover { background: var(--panel-2); color: var(--ink); }
.tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line-2); }
.tabs button { height: 34px; padding: 0 12px; color: var(--mute); font-weight: 500; border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
main.full > .map, main.full > .panel { display: none; }
.page { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 20px 60px; }
.page[hidden] { display: none; }
.page .wrap { max-width: 1240px; margin: 0 auto; }
.page .bar { grid-template-columns: 170px 1fr 96px; }
.page h1 { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.page .sub { color: var(--mute); font-size: 13px; margin-top: 2px; }
.hgrid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.hcol { display: grid; gap: 14px; min-width: 0; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--rb); padding: 12px 14px; min-width: 0; }
.box > h3 { margin: 0 0 10px; font-size: 13.5px; color: var(--ink); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.box > h3 a, .box > h3 button { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--accent); font-weight: 500; font-size: 13px; text-decoration: none; }
.capture { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 14px; margin: 16px 0; }
.capture input { flex: 1; min-width: 0; border: 0; outline: none; background: none; height: 40px; font-size: 15px; color: var(--ink); }
.capture:focus-within { border-color: var(--accent); }
.trow { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.trow:last-child { border-bottom: 0; }
.trow .tt { font-size: 14px; line-height: 1.4; cursor: pointer; } .trow .tt small { display: block; color: var(--mute); font-size: 12px; margin-top: 1px; }
.trow.done .tt { color: var(--mute); text-decoration: line-through; }
.check { width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 5px; margin-top: 1px; display: grid; place-items: center; }
.check:hover { border-color: var(--accent); } .trow.done .check { background: var(--ok); border-color: var(--ok); }
.trow.done .check::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.mini-acts { display: flex; gap: 4px; } .mini-acts button { font-size: 11px; color: var(--mute); padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 4px; }
.mini-acts button:hover { color: var(--ink); border-color: var(--line); }
.over { color: var(--warn); }
.big2 { font: 600 24px var(--mono); letter-spacing: -.02em; } .lbl { font-size: 12px; color: var(--mute); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 44px; margin-top: 12px; } .spark i { flex: 1; background: var(--line); border-radius: 2px; min-height: 2px; } .spark i.on { background: var(--accent); }
.utbl td:first-child { min-width: 220px; }
.ai-tag { font-size: 11px; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.ai-tag.gemini { color: var(--accent); border-color: var(--accent); }
.airt { display: grid; gap: 2px; }
.airow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(180px, 280px); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.airow:last-child { border-bottom: 0; }
.airow-n { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.airow-why { font-size: 12px; color: var(--mute); line-height: 1.4; }
.airow-auto { font-size: 12px; color: var(--mute); padding: 0 2px; }
.lvl { display: inline-block; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--ink); background: var(--panel-2); white-space: nowrap; }
.lvl-smart { border-color: var(--accent); color: var(--accent); }
.lvl-cheap { color: var(--mute); }
@media (max-width: 640px) { .airow { grid-template-columns: auto minmax(0, 1fr); } .airow .airow-n { grid-column: 1 / -1; } .airt .airow .airow-m { grid-column: auto; } }
.aiplan { display: grid; gap: 8px; padding: 10px 12px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); font-size: 13px; line-height: 1.5; }
.airow .sel { margin: 0; }
.airow .seg button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 640px) { .airow { grid-template-columns: 1fr auto; } .airow .airow-m { grid-column: 1 / -1; } } .ushare { display: flex; align-items: center; gap: 6px; min-width: 120px; }
.ushare i { display: block; height: 6px; border-radius: 3px; background: var(--accent); min-width: 2px; } .ushare span { font-size: 11px; color: var(--mute); }
.tgnotes { background: var(--panel-2); border-radius: var(--r); padding: 8px 12px; font-size: 13px; line-height: 1.7; margin-bottom: 8px; }
.tgtbl td small { display: block; color: var(--mute); font-size: 11px; } .tgtbl td, .tgtbl th { vertical-align: middle; }
.okc { color: var(--ok); font-weight: 500; }
.meter { flex: 1; max-width: 260px; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; } .meter i { display: block; height: 100%; background: var(--accent); }
.tgmedia { margin-top: 14px; } .tgmedia summary { cursor: pointer; font-size: 13px; font-weight: 500; }
.sel { display: block; width: 100%; margin-top: 4px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); color: var(--ink); font: 13px var(--ui); }
.pickwrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.gmode { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; } .gmode[hidden] { display: none; }
.gmode button { font-size: 11px; padding: 3px 7px; color: var(--mute); background: var(--panel); } .gmode button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.pickcol { border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.pickcol header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 14px 8px; }
.pickcol header b { display: block; font-size: 14px; } .pickcol header .lbl { font-size: 12px; }
.pickcount { font: 12px var(--mono); color: var(--accent); white-space: nowrap; padding-top: 2px; }
.picktools { display: flex; gap: 6px; padding: 0 14px 10px; border-bottom: 1px solid var(--line-2); }
.picktools input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); color: var(--ink); }
.picktools .chip-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.picklist { height: 380px; overflow-y: auto; }
.pickrow { display: grid; grid-template-columns: 18px 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.pickrow:hover { background: var(--panel-2); } .pickrow.on { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.pickrow input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.pickrow .av { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: grid; place-items: center; font: 600 12px var(--ui); letter-spacing: .02em; }
.pickrow .nm { min-width: 0; } .pickrow .nm b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickrow .nm small { display: block; font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickbar { position: sticky; bottom: 0; display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 0 2px; background: var(--panel); margin-top: 10px; }
.pickbar .lbl { max-width: 640px; }
@media (max-width: 860px) { .pickwrap { grid-template-columns: 1fr; } .picklist { height: 300px; } .pickbar { flex-direction: column; align-items: stretch; } }
.cirow { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 6px; margin: 3px 0; font-size: 13px; color: var(--mute); }
.cirow div { display: flex; gap: 4px; } .cirow button { flex: 1; height: 30px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 15px; color: var(--ink); }
.cirow button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel)); }
.citags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; } .citags button { font-size: 12px; padding: 3px 9px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--mute); }
.citags button.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.att { display: flex; gap: 10px; padding: 6px 0; font-size: 14px; } .att small { display: block; color: var(--mute); font-size: 12px; }
.att .ic { width: 20px; height: 20px; border-radius: 5px; background: var(--warn-bg); color: var(--warn); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.stabs { display: flex; gap: 4px; margin: 14px 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.stabs::-webkit-scrollbar { display: none; }
.stabs button { flex: none; height: 38px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.stabs button:hover { color: var(--ink); }
.stabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.sgrid > [hidden] { display: none !important; }
.stgo { cursor: pointer; border-radius: var(--r); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.stgo:hover { background: var(--panel-2); }
.stgo-arr { margin-left: auto; color: var(--mute); padding-left: 8px; }
.swarn { margin: 6px 0; padding: 8px 10px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn); font-size: 13px; line-height: 1.6; }
.swarn .chip-btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.sgrid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.stline { display: flex; gap: 8px; align-items: baseline; font-size: 13px; padding: 4px 0; } .stline b { font-weight: 500; }
.dotst { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; transform: translateY(-1px); } .dotst.bad { background: var(--warn); } .dotst.off { background: var(--line); }
.side .badge { font-style: normal; margin-left: 2px; background: var(--panel-2); color: var(--ink); font: 600 11px var(--mono); border-radius: 9px; padding: 0 6px; }
.side .badge + kbd { margin-left: 6px; }
.hidden-link { display: block; text-align: center; color: var(--line); text-decoration: none; font-size: 12px; letter-spacing: .2em; padding: 6px 0 0; }
.bottombar { display: none; }
.palette { position: fixed; inset: 0; background: var(--shade); z-index: 60; display: flex; justify-content: center; padding-top: 12vh; }
.palette[hidden] { display: none; }
.pal { width: min(640px, 92vw); background: var(--panel); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); overflow: hidden; height: max-content; max-height: 70vh; display: flex; flex-direction: column; }
.pal input { border: 0; border-bottom: 1px solid var(--line-2); height: 52px; padding: 0 18px; font-size: 16px; outline: none; background: none; }
#palList { overflow-y: auto; } .pal .gr { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding: 10px 18px 4px; }
.pal .it { display: flex; gap: 12px; align-items: center; padding: 9px 18px; font-size: 14px; cursor: pointer; } .pal .it small { margin-left: auto; color: var(--mute); font: 11px var(--mono); }
.pal .it.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (max-width: 1180px) { .hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hidden-link { display: none; } }
@media (max-width: 860px) {
  .page { position: absolute; inset: 0; padding: 14px 12px 30px; }
  main.full { position: relative; }
  .hgrid, .sgrid { grid-template-columns: 1fr; }
  .bottombar { display: none !important; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + var(--bottom)); justify-content: space-around; }
  .bottombar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--mute); padding: 2px 8px; }
  .bottombar button svg { width: 20px; height: 20px; } .bottombar button[aria-current="page"] { color: var(--accent); }
  main:not(.full) .map { bottom: 46%; } main:not(.full) .panel { bottom: 0; }
}
.cols { flex: 1; min-height: 0; display: flex; }
.list, .detail { flex: 1; min-width: 0; overflow-y: auto; padding: 8px 16px 32px; overscroll-behavior: contain; }
.detail { border-left: 1px solid var(--line); background: var(--panel); }
.detail[hidden] { display: none; }
.cols.split .list { flex: 0 0 240px; padding-right: 10px; }
.list:focus { outline: none; }

/* элементы списков */
.row-btn { display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 10px; align-items: start; width: 100%; text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.row-btn:hover, .row-btn:focus-visible, .row-btn[aria-current="true"] { background: var(--panel-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; width: calc(100% + 16px); border-radius: var(--r); }
.row-btn .sw { width: 10px; height: 10px; border-radius: 2px; margin-top: 5px; }
.row-btn h3 { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.35; }
.row-btn .n { font-family: var(--mono); font-size: 12px; color: var(--mute); padding-top: 1px; white-space: nowrap; }
.row-btn p { grid-column: 2 / 4; margin: 0; font-size: 13px; line-height: 1.45; color: var(--mute); }
.up { color: var(--accent); }
.section-title { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin: 18px 0 6px; font-weight: 500; }
.kv { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--mute); }
.kv b { color: var(--ink); font-weight: 500; }
.empty { color: var(--mute); font-size: 14px; line-height: 1.55; padding: 16px 0; max-width: 46ch; }
.back { color: var(--mute); padding: 6px 0 10px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.mood, .tag { display: inline-block; font-size: 11px; color: var(--mute); background: var(--panel-2); border: 1px solid var(--line-2); padding: 1px 7px; border-radius: 3px; }
.btn-main, .btn-soft, .btn-danger { height: 34px; padding: 0 14px; border-radius: var(--r); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-soft { background: var(--panel-2); border: 1px solid var(--line); }
.btn-danger { color: var(--warn); border: 1px solid transparent; }
.btn-danger:hover { border-color: var(--warn); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 12px; color: var(--mute); }
.form input, .form textarea, .form select { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; outline: none; width: 100%; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--accent); background: var(--panel); }
.form textarea { font-family: var(--read); min-height: 200px; resize: vertical; line-height: 1.55; }
.preview { font-size: 13px; color: var(--mute); padding: 8px 10px; background: var(--panel-2); border-radius: var(--r); }

/* карточка */
.card h2 { font: 500 20px/1.3 var(--ui); margin: 6px 0 10px; letter-spacing: -.01em; }
.card .meta { font-size: 12px; color: var(--mute); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.card .body { font: 15px/1.65 var(--read); white-space: pre-wrap; max-width: 64ch; margin-top: 10px; }
.card .body.clamp { display: -webkit-box; -webkit-line-clamp: 10; -webkit-box-orient: vertical; overflow: hidden; }
.more { color: var(--accent); font-weight: 500; padding: 6px 0; font-size: 13px; }
.ideas { margin: 10px 0 0; padding-left: 18px; font: 14px/1.5 var(--read); }
.tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 5px; }
.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.actions a, .actions button { height: 32px; padding: 0 12px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; }
.linkrow { display: block; width: 100%; text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; line-height: 1.4; }
.linkrow small { display: block; font-size: 12px; color: var(--mute); margin-top: 2px; }
.linkrow:hover, .linkrow:focus-visible { background: var(--panel-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; width: calc(100% + 16px); border-radius: var(--r); }
.result { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.result small { font: 11px var(--mono); color: var(--mute); white-space: nowrap; }
.result em { grid-column: 1 / 3; font: italic 13px/1.4 var(--read); color: var(--mute); }
.bridge { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.ends { display: grid; grid-template-columns: 10px 1fr; gap: 2px 10px; align-items: center; }
.ends .stem { width: 2px; height: 12px; justify-self: center; background: var(--accent); }
.ends button { text-align: left; font-weight: 500; font-size: 14px; padding: 2px 0; }
.why { margin: 8px 0 0 20px; font: italic 13px/1.5 var(--read); color: var(--mute); }
.brief { background: var(--panel-2); border-radius: var(--r); padding: 10px 12px; margin: 10px 0 12px; font-size: 13px; color: var(--mute); }
.brief b { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.brief div { color: var(--ink); } .brief .ideas { margin: 6px 0 0; }
.tgtext { white-space: pre-wrap; } .tgtext blockquote { margin: 2px 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent); white-space: pre-wrap; }
.rich { font: 15.5px/1.65 var(--read); margin-top: 6px; overflow-wrap: anywhere; }
.rich p { margin: 0 0 12px; } .rich h2, .rich h3, .rich h4 { font-family: var(--ui); margin: 20px 0 8px; line-height: 1.3; } .rich h2 { font-size: 21px; } .rich h3 { font-size: 18px; } .rich h4 { font-size: 16px; }
.rich a { color: var(--accent); } .rich hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.rich blockquote { margin: 12px 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--accent); color: var(--ink); }
.rich blockquote.pull { border: 0; padding: 6px 10px; font-size: 18px; font-style: italic; text-align: center; }
.rich cite { display: block; font-size: 13px; color: var(--mute); font-style: normal; margin-top: 4px; } .rich cite::before { content: "— "; }
.rich pre { background: var(--panel-2); padding: 10px 12px; border-radius: var(--r); overflow-x: auto; font: 13px/1.5 var(--mono); }
.rich .math { font-family: var(--mono); } .rich mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; }
.rich figure { margin: 14px 0; } .rich figure img, .rich figure video { width: 100%; max-height: 520px; object-fit: contain; border-radius: var(--r); background: var(--panel-2); display: block; }
.rich figure audio { width: 100%; } .rich figcaption { font: 13px/1.45 var(--ui); color: var(--mute); margin-top: 6px; }
.rich .collage { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px; } .rich .collage > figcaption { grid-column: 1 / -1; }
.rich .collage figure { margin: 0; } .rich .collage img, .rich .collage video { height: 200px; object-fit: cover; }
.rich .slides .strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; } .rich .slides .strip > div { flex: 0 0 85%; scroll-snap-align: start; } .rich .slides figure { margin: 0; }
.rich .rlist { padding-left: 22px; margin: 0 0 12px; } .rich .rlist li { margin: 3px 0; } .rich .rlist li p { margin: 0; }
.rich .rlist li.chk { list-style: none; margin-left: -20px; display: flex; gap: 8px; align-items: baseline; } .rich .rlist li.chk .cbx { flex: none; margin: 0; transform: translateY(2px); }
.rich .rlist li.done > p { color: var(--mute); text-decoration: line-through; }
.rich .cbx { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-radius: 3px; margin-right: 6px; vertical-align: -2px; } .rich .cbx.on { background: var(--ok); border-color: var(--ok); }
.rich .rtable { border-collapse: collapse; width: 100%; font: 14px var(--ui); margin: 12px 0; } .rich .rtable td, .rich .rtable th { padding: 6px 8px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.rich .rtable.bordered td, .rich .rtable.bordered th { border: 1px solid var(--line); } .rich .rtable.striped tr:nth-child(even) { background: var(--panel-2); } .rich .rtable caption { caption-side: bottom; font-size: 13px; color: var(--mute); padding-top: 6px; }
.rich details { margin: 10px 0; } .rich details summary { cursor: pointer; font-weight: 600; font-family: var(--ui); }
.rich .foot { font-size: 13px; color: var(--mute); } .rich .missing, .rich .filelink { display: inline-block; font: 13px var(--ui); color: var(--mute); padding: 8px 10px; background: var(--panel-2); border-radius: var(--r); text-decoration: none; }
.spoiler { background: var(--ink); color: transparent; border-radius: 3px; cursor: pointer; transition: .2s; } .spoiler.open { background: none; color: inherit; }
.rich img.blur { filter: blur(18px); } .rich img.blur:hover { filter: none; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin-top: 12px; }
.gallery a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--r); background: var(--panel-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery.one { grid-template-columns: 1fr; }
.gallery.one a { aspect-ratio: auto; max-height: 420px; }
.gallery.one img { height: auto; max-height: 420px; object-fit: contain; }
.card video { width: 100%; max-height: 420px; border-radius: var(--r); margin-top: 12px; background: #000; }
.att { font-size: 13px; color: var(--mute); margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.urls { margin: 12px 0 0; padding: 0; list-style: none; }
.urls li { padding: 5px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urls small { color: var(--mute); margin-left: 6px; }
.body a { color: var(--accent); }
.body blockquote { margin: 6px 0; padding-left: 10px; border-left: 2px solid var(--line); color: var(--mute); }
.hl-list { margin: 8px 0 0; padding: 0; list-style: none; }
.hl-list li { font: 14px/1.5 var(--read); padding: 7px 10px; margin: 5px 0; border-left: 2px solid var(--accent); background: var(--panel-2); display: flex; justify-content: space-between; gap: 10px; }
.hl-list button { color: var(--mute); font-size: 12px; white-space: nowrap; }
.chart { width: 100%; height: 110px; display: block; }
.cal { display: grid; grid-template-columns: 56px 1fr 64px; gap: 6px 10px; align-items: center; font: 12px var(--mono); color: var(--mute); }
.cal .track { height: 8px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 2px; position: relative; }
.cal .track i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--accent); opacity: .7; }
.cal .track b { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); }
.big { font: 600 32px var(--mono); letter-spacing: -.02em; }
.note-card { font: italic 14px/1.6 var(--read); padding: 10px 12px; background: var(--panel-2); border-left: 2px solid var(--accent); margin: 6px 0 12px; }
.day-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.day-nav b { font-weight: 500; font-size: 16px; }
.source { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.source b { font-weight: 500; }
.tips { margin: 4px 0 0 20px; padding: 0; list-style: none; font: 13px/1.5 var(--read); color: var(--mute); }
.tips li::before { content: "— "; }
.pred { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.pred small { color: var(--mute); font-size: 12px; display: block; margin-top: 2px; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 110px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.bar i { display: block; height: 10px; background: var(--accent); border-radius: 2px; opacity: .8; }
.bar .n { text-align: right; color: var(--mute); }
.stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 8px 0; }
.stat div { background: var(--panel-2); border-radius: var(--r); padding: 10px 12px; }
.stat b { display: block; font: 600 20px var(--mono); letter-spacing: -.02em; }
.stat small { font-size: 12px; color: var(--mute); }
.delta { font-size: 12px; color: var(--mute); }
.delta.up { color: var(--warn); } .delta.down { color: var(--ok); }
.setup { background: var(--panel-2); border-radius: var(--r); padding: 12px 14px; font-size: 13px; line-height: 1.55; }
.setup ol { margin: 6px 0 0; padding-left: 18px; }
.setup code { font: 12px var(--mono); background: var(--panel); padding: 1px 5px; border-radius: 3px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th, .tbl td { padding: 6px 6px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; font-family: var(--mono); }
.tbl th { font-family: var(--ui); font-weight: 500; color: var(--mute); font-size: 11px; }
.tbl td:first-child, .tbl th:first-child { text-align: left; font-family: var(--ui); }
.tbl-wrap { overflow-x: auto; }
.chip-btn { height: 28px; padding: 0 10px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); font-size: 12px; font-weight: 500; }

/* чтение */
.reader { position: fixed; inset: 0; background: var(--panel); z-index: 30; overflow-y: auto; padding: calc(12px + var(--top)) 24px 90px; }
.reader[hidden] { display: none; }
.reader .top { max-width: var(--read-w, 68ch); margin: 0 auto 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--mute); font-size: 13px; flex-wrap: wrap; }
.reader .top .row { gap: 4px; }
.reader .inner { max-width: var(--read-w, 68ch); margin: 0 auto; font: var(--read-size, 17px)/1.7 var(--read); white-space: pre-wrap; }
.reader h2 { font: 500 24px/1.3 var(--ui); margin: 6px 0 18px; }
.hl { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.hl-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + var(--bottom)); display: flex; gap: 8px; z-index: 31; }
.hl-bar[hidden] { display: none; }
.progress { position: fixed; left: 0; top: 0; height: 3px; background: var(--accent); z-index: 32; width: 0; }

/* вход и сообщения */
.gate { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; padding: 32px; z-index: 40; }
.gate[hidden] { display: none; }
.login { display: grid; gap: 12px; width: min(320px, 100%); }
.login strong { font-weight: 600; letter-spacing: .04em; font-size: 16px; }
.login label { display: grid; gap: 5px; font-size: 12px; color: var(--mute); }
.login input { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); outline: none; }
.login input:focus { border-color: var(--accent); }
.err { min-height: 1.3em; margin: 0; font-size: 13px; color: var(--warn); }
.toast { position: fixed; left: 50%; bottom: calc(22px + var(--bottom)); transform: translateX(-50%); background: var(--ink); color: var(--panel); padding: 9px 14px; border-radius: var(--r); font-size: 13px; z-index: 50; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: min(92vw, 640px); }
.toast button { color: var(--panel); text-decoration: underline; font-weight: 500; }

/* узкие экраны: навигация иконками, панель уже, запись вместо списка */
@media (max-width: 1180px) {
  :root { --panel-w: 460px; }
  .side #navSearch { min-width: 0; }
  .side #navSearch span, .side #navPalette, .brand small { display: none; }
  .cols.split .list { display: none; }
  .detail { border-left: 0; }
}
/* телефон: карта сверху, панель-шторка снизу, вкладки вместо навигации */
@media (max-width: 860px) {
  :root { --nav-h: 50px; }
  .side { padding: 0 6px; padding-top: 0; }
  .brand { margin-right: 4px; } .brand b { width: 28px; height: 28px; font-size: 13px; }
  .side button { padding: 0 9px; font-size: 13.5px; }
  .side #navSearch { width: 38px; padding: 0; justify-content: center; margin-left: 2px; }
  .side #navSearch kbd { display: none; }
  .side .foot { margin-left: 0; }
  .side .navlong, .brand small { display: none; }
  .side .sep { min-width: 4px; }
  .side .foot button { width: 34px; }
  main { flex-direction: column; }
  .map { position: absolute; inset: 0 0 46% 0; }
  .lens { left: 10px; top: 10px; right: 56px; }
  .legend { display: none; }
  .zoom { right: 10px; top: 10px; }
  .panel { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; width: auto; border-left: 0; border-top: 1px solid var(--line); border-radius: 12px 12px 0 0; transition: height .25s ease; box-shadow: 0 -8px 24px rgba(0, 0, 0, .12); padding-bottom: var(--bottom); }
  .panel.tall { height: 86%; }
  .grip { display: block; width: 100%; padding: 8px 0 2px; }
  .grip::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto; }
  .tabs { display: flex; gap: 2px; padding: 4px 10px 6px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { height: 32px; padding: 0 10px; border-radius: var(--r); color: var(--mute); font-weight: 500; white-space: nowrap; flex: none; font-size: 13px; }
  .tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); }
  .search { padding: 8px 10px; }
  .search kbd { display: none; }
  .search .plus { display: flex; right: 18px; }
  .cols.split .list { display: none; }
  .detail { border-left: 0; }
  .reader { padding: calc(12px + var(--top)) 18px 90px; }
}
@media (min-width: 861px) { .grip { display: none; } }
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } }

.person { display: grid; grid-template-columns: minmax(0, 1fr) auto 140px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.person .pn b { display: block; font-weight: 500; } .person .pn small { display: block; color: var(--mute); font-size: 12px; margin-top: 2px; }
.ptr { font-size: 12px; color: var(--accent); white-space: nowrap; } .ptr.over { color: var(--warn); }
.pspark { display: flex; align-items: flex-end; gap: 2px; height: 30px; } .pspark i { flex: 1; background: var(--accent); opacity: .7; border-radius: 1px; }
.trait3 { display: grid; grid-template-columns: 200px minmax(0, 1fr) 110px; gap: 4px 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.trait3 > small { grid-column: 1 / -1; grid-row: 2; color: var(--mute); font-size: 12px; } .trait3 > div { display: grid; gap: 3px; } .trait3 > span { text-align: right; }
.ubar { height: 7px; background: var(--panel-2); border-radius: 4px; overflow: hidden; } .ubar i { display: block; height: 100%; border-radius: 4px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.quote { font: italic 13.5px/1.5 var(--read); color: var(--mute); border-left: 2px solid var(--line); padding: 2px 0 2px 10px; margin: 4px 0 4px 8px; }
.qbox { margin-top: 18px; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 14px; } .qbox summary { cursor: pointer; font-weight: 500; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) 80px; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.qrow .sel { margin: 0; }
.periods { display: grid; gap: 10px; margin-top: 10px; } .period { border-left: 3px solid var(--accent); padding: 4px 0 6px 14px; }
.period .pd { font: 12px var(--mono); color: var(--mute); } .period b { display: block; font-size: 16px; margin: 2px 0; } .period p { margin: 4px 0 6px; font-size: 14px; }
@media (max-width: 860px) { .person { grid-template-columns: 1fr auto; } .pspark { grid-column: 1 / -1; } .trait3 { grid-template-columns: 1fr 70px; } .trait3 > div { grid-column: 1 / -1; grid-row: 3; } }

.citags .citune { border-style: dashed; color: var(--accent); }
.ciauto { margin-top: 8px; font-size: 12px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 4px 10px; } .ciauto span { white-space: nowrap; }
.ciauto span::before { content: "· "; }
.trow2 { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; cursor: pointer; }
.trow2 input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); } .trow2 .src { color: var(--mute); }

.bmk { display: inline-block; padding: 3px 10px; border: 1px dashed var(--accent); border-radius: 6px; color: var(--accent); text-decoration: none; font-weight: 500; cursor: grab; }

.order { border-bottom: 1px solid var(--line-2); } .order > summary { cursor: pointer; list-style: none; padding: 9px 0; display: flex; flex-direction: column; gap: 2px; }
.order > summary::-webkit-details-marker { display: none; } .order > summary small { color: var(--mute); font-size: 12px; }
.order[open] > summary { color: var(--accent); }

.qcard { padding: 8px 0 10px; border-bottom: 1px solid var(--line-2); } .qcard:last-child { border: 0; }
.qopts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; } .qopts button { font-size: 12px; padding: 4px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); }
.qopts button:hover { border-color: var(--accent); color: var(--accent); }
.qfree { display: flex; gap: 5px; margin-top: 7px; } .qfree input { flex: 1; min-width: 0; font-size: 12px; padding: 4px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.qfree button { font-size: 12px; padding: 4px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); }
.qmeta { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 11px; color: var(--mute); } .qmeta button { font-size: 11px; color: var(--mute); text-decoration: underline; }
.porder { margin: 0 0 16px; }
.porder-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; font-size: 13px; }
.porder-h small { color: var(--mute); font-family: var(--mono); font-size: 11px; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pcard { display: flex; gap: 10px; padding: 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; min-width: 0; }
.pcard .pic { flex: none; width: 72px; height: 72px; border-radius: 8px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pcard .pic img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pic-ph { font-size: 28px; opacity: .55; }
.pbody { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pname { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pname a { color: var(--ink); text-decoration: none; } .pname a:hover { color: var(--accent); text-decoration: underline; }
.pmeta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mute); }
.pmeta b { color: var(--ink); font-size: 13px; } .pmeta .gift { margin-left: auto; }
.pgift { font-size: 12px; font-weight: 600; }
.pnote-add { align-self: flex-start; font-size: 12px; color: var(--accent); padding: 4px 8px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--r); }
.pnote-add:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pnote { font-size: 12px; background: var(--panel-2); border-radius: var(--r); padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.pnote q { font-style: italic; color: var(--ink); overflow-wrap: anywhere; } .pnote q::before, .pnote q::after { content: none; }
.psum { color: var(--mute); }
.pchips { display: flex; flex-wrap: wrap; gap: 4px; } .pchips:empty { display: none; }
.pchip { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.pnote .link-btn { align-self: flex-start; font-size: 11px; color: var(--mute); text-decoration: underline; }
.pnote-form { display: flex; flex-direction: column; gap: 6px; }
.pnote-form textarea { width: 100%; resize: vertical; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--panel); color: var(--ink); outline: none; }
.pnote-form .link-btn { font-size: 12px; color: var(--mute); text-decoration: underline; }
@media (max-width: 520px) { .pcards { grid-template-columns: 1fr; } .pcard .pic { width: 60px; height: 60px; } }
.gift { font-size: 15px; opacity: .3; filter: grayscale(1); line-height: 1; padding: 2px 4px; border-radius: 6px; } .gift:hover { opacity: .8; } .gift.on { opacity: 1; filter: none; background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ---------- телефон: ничего не шире экрана, кнопки под палец (аудит 15.10, пакет 4) ---------- */
@media (min-width: 861px) { .hgrid.tasks2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; }
.seg button { flex: 0 0 auto; white-space: nowrap; }
.check { position: relative; }
@media (max-width: 860px) {
  .page .row { min-width: 0; max-width: 100%; }
  .seg button { height: 38px; padding: 0 13px; font-size: 13px; }
  .check { width: 24px; height: 24px; } .check::before { content: ""; position: absolute; inset: -10px; }
  .trow { grid-template-columns: 32px minmax(0, 1fr); padding: 10px 0; }
  .trow .mini-acts { grid-column: 2; margin-top: 6px; }
  .mini-acts { gap: 6px; flex-wrap: wrap; } .mini-acts button { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 8px; }
  .chip-btn { min-height: 36px; }
  .qopts button, .qfree button, .qfree input { min-height: 38px; font-size: 13px; padding-left: 12px; padding-right: 12px; }
  .qmeta { gap: 14px; } .qmeta button { min-height: 36px; padding: 6px 2px; font-size: 12px; }
  .cirow button { height: 42px; } .citags button { min-height: 36px; font-size: 13px; padding: 6px 12px; border-radius: 18px; }
  .gift { padding: 9px 10px; font-size: 17px; }
}

/* ---------- «Я → Сейчас / История / Итоги» ---------- */
:root { --st-warm: #B7791F; }
:root[data-theme="dark"] { --st-warm: #E0A85A; }
.st-hero { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; margin-top: 8px; }
.st-kick, .st-when { font: 500 12px var(--mono); color: var(--accent); letter-spacing: .04em; }
.st-hero h1 { font: 600 28px/1.22 var(--read); margin: 8px 0 12px; letter-spacing: -.01em; }
.st-hero p { font: 400 16.5px/1.6 var(--read); margin: 0; max-width: 780px; }
.st-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.st-tiles div { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; }
.st-tiles b { display: block; font: 600 22px/1.1 var(--mono); }
.st-tiles small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 4px; }
.st-tiles i { display: block; font-style: normal; color: var(--accent); font-size: 12px; margin-top: 2px; }
.st-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 6px; }
.st-fb { gap: 6px; margin: -2px 0 10px; }
.st-ago { background: var(--panel-2); border-radius: 12px; padding: 14px 16px; }
.st-ago .st-when { color: var(--st-warm); }
.st-ago p { font: 400 15px/1.6 var(--read); margin: 6px 0 0; }
.st-rec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.st-rec small { display: block; font: 500 11.5px var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .03em; }
.st-rec b { display: block; font: 600 18px/1.35 var(--read); margin: 4px 0 2px; }
.st-rec span { color: var(--mute); font-size: 13px; }
.st-recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.st-chart { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px 8px; margin-top: 8px; }
.st-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--mute); margin: 2px 6px 0; }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.st-legend i.dash { width: 14px; height: 0; border-top: 2px dashed var(--ink); border-radius: 0; }
.st-chs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.st-ch { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; display: flex; flex-direction: column; gap: 3px; }
.st-ch .st-when { color: var(--mute); font-size: 11px; }
.st-ch b { font: 600 15.5px/1.3 var(--read); }
.st-ch > span:last-child { font-size: 12.5px; color: var(--mute); }
.st-ch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.st-open { background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; padding: 20px 22px; margin-top: 12px; }
.st-open h3 { font: 600 25px/1.2 var(--read); margin: 6px 0 10px; }
.st-lead { font: 400 16px/1.65 var(--read); margin: 0 0 14px; }
.st-cmp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.st-cmp div { border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; }
.st-cmp b { display: block; font: 600 18px var(--mono); }
.st-cmp em { display: block; font: normal 13px var(--mono); color: var(--mute); }
.st-cmp small { display: block; color: var(--mute); font-size: 12px; }
.st-cap { font: 500 12px var(--mono); color: var(--mute); margin: 4px 0 6px; }
.st-day { display: grid; grid-template-columns: 150px 1fr; gap: 8px; align-items: center; font-size: 12.5px; color: var(--mute); margin: 4px 0; }
.st-day > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-track { position: relative; height: 14px; background: var(--panel-2); border-radius: 7px; }
.st-seg { position: absolute; top: 0; height: 14px; border-radius: 7px; background: var(--accent); }
.st-hours { display: flex; justify-content: space-between; font: 10.5px var(--mono); }
.st-facts { list-style: none; margin: 10px 0 0; padding: 0; }
.st-facts li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; }
.st-facts li span:first-child { width: 22px; flex: none; text-align: center; }
.st-wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.st-wrap div { border-radius: 14px; padding: 16px; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.st-wrap small { opacity: .85; font-size: 12.5px; }
.st-wrap b { font: 600 32px/1 var(--mono); }
.st-wrap span { font: 400 14px/1.4 var(--read); }
.st-foot { color: var(--mute); font-size: 12.5px; margin-top: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 760px) {
  .st-grid { grid-template-columns: 1fr; }
  .st-tiles, .st-wrap { grid-template-columns: repeat(2, 1fr); }
  .st-cmp { grid-template-columns: 1fr; }
  .st-hero { padding: 18px; } .st-hero h1 { font-size: 22px; }
  .st-day { grid-template-columns: 90px 1fr; }
}

.st-ppl { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.st-pc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.st-pc b { font: 600 16px/1.3 var(--read); }

.mr-letter { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; margin-top: 8px; max-width: 820px; }
.mr-letter p { font: 400 17px/1.7 var(--read); margin: 10px 0 0; }
.mr-q { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-2); font: 400 15.5px/1.6 var(--read); }
.mr-q b { display: block; font: 500 12px var(--mono); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.mr-sum { font: 400 15.5px/1.6 var(--read); margin: 0 0 10px; max-width: 820px; }
@media (max-width: 760px) { .mr-letter { padding: 16px 18px; } .mr-letter p { font-size: 16px; } }

/* «Личность → Портрет» целиком (пакет 3, часть 2) */
.pcover { margin: 6px 0 4px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); font-size: 13px; color: var(--mute); line-height: 1.45; }
.pdots { flex: none; white-space: nowrap; font-size: 12px; color: var(--accent); letter-spacing: 1px; }
.pdots small { color: var(--mute); letter-spacing: 0; margin-left: 2px; }
.pbrief { border-bottom: 1px solid var(--line-2); }
.pbrief summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; cursor: pointer; font-size: 14.5px; list-style: none; }
.pbrief summary::-webkit-details-marker { display: none; }
.pbrief .lbl { padding: 0 0 8px; }
.p3v { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.p3h, .p3r { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 10px; padding: 8px 12px; }
.p3h { font-size: 12px; color: var(--mute); border-bottom: 1px solid var(--line); }
.p3r { border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.p3r:last-child { border-bottom: 0; }
.p3r i { display: none; font-style: normal; color: var(--mute); font-size: 12px; margin-right: 4px; }
.p3v-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--mute); }
.p3v-note .over { color: var(--warn); }
.pfold { margin: 8px 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 0 12px; }
.pfold > summary { padding: 10px 0; cursor: pointer; font-weight: 600; }
.pfold[open] { padding-bottom: 8px; }
@media (max-width: 640px) {
  .p3h { display: none; }
  .p3r { grid-template-columns: 1fr; gap: 3px; }
  .p3r i { display: inline; }
}

/* «Сегодня»: вчера крупно утром, чек-ин первым (пакет 5) */
.ybox .ytiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ybox .ytiles .chip-btn { margin-top: 4px; }
.cinav { margin-left: 8px; margin-right: auto; }
.box > h3 .cinav .chip-btn { margin-left: 0; height: 26px; padding: 0 8px; font-size: 12px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.cimore > summary { cursor: pointer; font-size: 13px; color: var(--mute); padding: 6px 0; }
@media (max-width: 640px) { .ybox .ytiles { grid-template-columns: repeat(2, 1fr); } }

/* ============ новый дизайн 19.10: «Сегодня» плитками, «Дела» доской ============ */
.dhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 2px 0 0; }
.dhead span { color: var(--mute); font-size: 13px; }
.page .capture { border-radius: var(--rb); margin: 12px 0; }
.tgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; grid-auto-flow: row dense; align-items: start; }
.tgrid > .s3 { grid-column: span 3; } .tgrid > .s4 { grid-column: span 4; } .tgrid > .s8 { grid-column: span 8; }
.t { background: var(--panel); border: 1px solid var(--line); border-radius: var(--rb); padding: 12px 14px; min-width: 0; }
.t[hidden] { display: none; }
.t > h3 { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.t > h3 em { margin-left: auto; font: 500 12.5px var(--ui); font-style: normal; color: var(--mute); }
.t > h3 a, .t > h3 > button { margin-left: auto; color: var(--accent); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.t > h3 .cinav .chip-btn { margin-left: 0; height: 26px; padding: 0 8px; font-size: 12px; color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c, var(--mute)); display: inline-block; }
.kpi { background: color-mix(in srgb, var(--c) 6%, var(--panel)); border-color: color-mix(in srgb, var(--c) 25%, var(--line)); align-self: stretch; }
.kpi .lab { font: 600 12.5px var(--ui); display: flex; align-items: center; gap: 7px; color: var(--c); }
.kpi > b { display: block; font: 500 24px/1.2 var(--mono); margin-top: 6px; }
.kpi .dl { font-size: 12px; min-height: 18px; } .kpi .dl small { color: var(--mute); font-size: 12px; }
.kpi .dl .chip-btn { margin-top: 2px; }
.kpi .d { font: 600 12.5px var(--mono); } .d.up { color: var(--c-work); } .d.down { color: var(--warn); } .d.flat { color: var(--mute); }
.kpi .sp { margin-top: 8px; }
.hbars { width: 100%; height: 130px; display: block; }
.hlabels { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--mute); margin-top: 4px; }
.dnums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dnums b { display: block; font: 500 20px/1.2 var(--mono); } .dnums small { color: var(--mute); font-size: 12px; }
.cirow button { border-radius: var(--r); height: 32px; }
.cirow button.on { border-color: var(--c-sleep); background: color-mix(in srgb, var(--c-sleep) 18%, var(--panel)); }
.ctx { font: 600 11.5px var(--ui); padding: 1px 8px; border-radius: 8px; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
/* дела — доска */
.kfilt { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 4px; margin-bottom: 8px; scrollbar-width: none; }
.kfilt button { display: flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 16px; font-size: 13px; white-space: nowrap; border: 1px solid var(--line); background: var(--panel); }
.kfilt button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kan { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 10px; align-items: start; }
.kcol { background: var(--panel-2); border-radius: var(--rb); padding: 10px; min-width: 0; }
.kcolh { display: flex; justify-content: space-between; font-weight: 700; font-size: 13.5px; margin: 0 2px 8px; }
.kcolh span { font: 600 12px var(--mono); color: var(--mute); }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 11px; margin-bottom: 8px; }
.trow.kcard { grid-template-columns: 22px 1fr; border-bottom: 1px solid var(--line); }
.trow.kcard:last-child { border-bottom: 1px solid var(--line); }
.kcard.hot { box-shadow: inset 3px 0 0 var(--warn); }
.kmeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font: 11.5px var(--mono); color: var(--mute); }
.kwhen { margin-left: auto; } .kwhen.over { color: var(--warn); }
.kcard .mini-acts { margin-top: 6px; }
.kpred { font-size: 13.5px; }
.kcard.form input { width: 100%; }
.kcard.form .row { margin-top: 6px; gap: 6px; }
.kdone summary { cursor: pointer; color: var(--mute); font-size: 13px; padding: 4px 2px; }
@media (max-width: 1180px) { .tgrid > .s3 { grid-column: span 6; } .tgrid > .s4 { grid-column: span 6; } .tgrid > .s8 { grid-column: span 12; } .kan { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tgrid { grid-template-columns: 1fr 1fr; } .tgrid > .s4, .tgrid > .s8 { grid-column: span 2; } .tgrid > .s3 { grid-column: span 1; } .kpi > b { font-size: 19px; } .kpi .dl small { display: none; } .kan { grid-template-columns: 1fr; } }

/* ============ «Я» в новом дизайне (макет docs\maket-ya-2.html) ============ */
/* три уровня вкладок: разделы — капсулы, подразделы — черта снизу, третий уровень — маленькие чипы */
.l1 { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; scrollbar-width: none; }
.l1 button { padding: 6px 14px; border-radius: 17px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
.l1 button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.l2 { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.l2 button { padding: 7px 0; font-weight: 600; font-size: 14px; color: var(--mute); border-bottom: 2px solid transparent; white-space: nowrap; flex: none; }
.l2 button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.l3 { display: flex; gap: 5px; flex-wrap: wrap; margin: 0 0 12px; }
.l3 button { padding: 4px 11px; border-radius: 12px; background: var(--panel-2); font-size: 12.5px; white-space: nowrap; }
.l3 button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, var(--panel)); color: var(--accent); font-weight: 700; }
.l3 button[data-mm] { color: var(--mute); background: none; }
.dnav { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.dnav h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.dnav .arr { margin-left: auto; display: flex; gap: 4px; }
.awline { font-size: 12px; margin: -4px 0 10px; }
.tgrid > .s6 { grid-column: span 6; } .tgrid > .s12 { grid-column: span 12; } .tgrid > .s2 { grid-column: span 2; }
.t.lead, .lead { font-size: 15px; line-height: 1.55; } .lead b { font-weight: 700; }
.dayline { display: grid; grid-template-columns: repeat(24, 1fr); height: 30px; border-radius: 7px; overflow: hidden; background: var(--panel-2); }
.dayline i { display: block; }
.t .lead { margin-top: 8px; }
.hb { display: grid; grid-template-columns: minmax(80px, 140px) 1fr 82px; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.hb > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .tr { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.hb .tr i { display: block; height: 100%; border-radius: 4px; }
.hb .r { text-align: right; font: 12.5px var(--mono); }
.mrow { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; min-width: 0; }
.mrow:last-child { border-bottom: 0; }
.mrow .r { margin-left: auto; font: 12.5px var(--mono); color: var(--mute); white-space: nowrap; }
.pchip { display: inline-flex; gap: 5px; align-items: center; padding: 2px 9px; border-radius: 11px; background: var(--panel-2); font-size: 12px; margin-left: 4px; }
.stack7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 160px; }
.stack7 > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stack7 .col { flex: 1; display: flex; flex-direction: column-reverse; gap: 1px; }
.stack7 .col i { display: block; border-radius: 3px; }
.stack7 span { font: 11px var(--mono); color: var(--mute); text-align: center; }
.lgd { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 12px; } .lgd i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.fcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--rb); padding: 12px 14px; margin: 0 0 10px; }
.fgrid .fcard { margin: 0; }
.fcard.ok { box-shadow: inset 3px 0 0 var(--c-work); }
.fcard .fhead { font-size: 15px; font-weight: 600; line-height: 1.45; }
.facet { border-top: 3px solid var(--c); } .facet.wait { border-top-color: var(--line); border-style: dashed; background: transparent; }
.deed { border-left: 4px solid var(--c); } .deed .ctx { --c: inherit; }
.heat td.h { text-align: center; border-radius: 4px; }
/* старые элементы «Я» — в общий стиль, пока страницы не переписаны целиком */
.page .section-title { font-size: 13.5px; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 700; margin: 18px 0 8px; }
.page .bar { grid-template-columns: minmax(80px, 140px) 1fr 72px; }
.page .bar i { height: 8px; border-radius: 4px; opacity: 1; }
.page .bar .n { font: 12.5px var(--mono); }
.page .stat div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--rb); padding: 12px 14px; }
.page .stat b { font-weight: 500; font-size: 21px; }
.page .tbl { font-size: 12.5px; } .page .tbl th { font-weight: 600; font-size: 12px; }
.page .note-card { border-left-color: var(--c-mood); border-radius: 0 var(--r) var(--r) 0; }
@media (max-width: 1180px) { .tgrid > .s6 { grid-column: span 12; } .tgrid > .s2 { grid-column: span 4; } }
@media (max-width: 640px) { .tgrid > .s6, .tgrid > .s12 { grid-column: span 2; } .tgrid > .s2 { grid-column: span 1; } .hb { grid-template-columns: 90px 1fr 70px; } .stack7 { height: 120px; } .dnav h1 { font-size: 18px; } }

/* «Я» по областям: разделы с цветной точкой, общий переключатель периода */
.l1.ya button { display: inline-flex; align-items: center; gap: 7px; }
.l1.ya button .dot { width: 8px; height: 8px; }
.dnav .arr { align-items: center; flex-wrap: wrap; }
.yaper { display: inline-flex; background: var(--panel-2); border-radius: 11px; padding: 3px; gap: 2px; margin-right: 4px; }
.yaper button { padding: 4px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--mute); }
.yaper button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.yalink { cursor: pointer; } .yalink:hover { border-color: var(--c); }
.yafind { margin-top: 2px; }
@media (max-width: 640px) { .dnav .arr { margin-left: 0; width: 100%; } }

/* ---------- бот как окно (19.10): опыты, заполненность, лимиты, «чем пользуюсь» ---------- */
.yafill { margin: -2px 0 12px; }
.yafill.weak { color: var(--warn); }
.excard { margin-top: 12px; }
.exrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.exrow:last-child { border-bottom: 0; }
.exrow .chip-btn { flex: none; height: auto; min-height: 28px; padding: 4px 10px; white-space: normal; text-align: left; }
.vbar { display: block; flex: 1; min-width: 60px; height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.vbar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.limgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; }
.limrow { display: grid; grid-template-columns: 1fr 110px; gap: 4px 10px; align-items: center; font-size: 13.5px; }
.limrow input { width: 100%; }
.limrow .vbar, .limrow small:last-child { grid-column: 1 / -1; }
#visBox .mrow .vbar { max-width: 260px; }
#visBox .mrow > span:first-child { min-width: 170px; }
@media (max-width: 640px) { .exrow { flex-direction: column; align-items: flex-start; } #visBox .mrow > span:first-child { min-width: 120px; } }
