/* Sprintup — «Комнаты» (гибрид A+B+C, принят Лукашем 26.09.2026; прототип ui/koncepcii2/ab/).
   Слой поверх tokens.css и ui.css: у каждого раздела свой цвет (--room), свой значок, шапка раздела целиком в его цвете.
   Правила: поверх содержимого прилипают только нижняя панель и поле ввода чата; горизонта нет; цвета клуба в интерфейс не идут
   (skelet/20: «цвета клуба и Сплит не возвращать»), от клуба — название и логотип. Синего нет ни в одной комнате. */

:root {
  --c-feed: #B8342A; --c-spr: #2F6E4E; --c-tasks: #5C2B5C; --c-chat: #9B3F64; --c-me: #A5582A; --c-club: #34383F;
  --room: var(--c-club); --on-room: #FFFFFF;
  --tp: 11%; --tp2: 20%;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 68px;
  --ground: #F4F3EF; --panel: #FFFFFF; --panel-solid: #FFFFFF; --panel-2: #EFEDE7; --rule: #E4E1DA;
  --ink: #1B1C1F; --ink-2: #5F636B; --ink-3: #666A72;
  --warn: #B3261E; --warn-bg: #FCEAE8; --danger: #B3261E; --danger-bg: #FCEAE8; --ok: #1D7A46; --ok-bg: #E4F2E9;
  --shadow: 0 1px 2px rgba(20, 20, 25, .06);
  /* цвета клуба больше не красят интерфейс: всё, что на них держалось, берёт цвет комнаты */
  --club-1-ui: var(--room); --club-2-ui: var(--room); --club-1-text: var(--ink); --club-2-text: var(--ink);
  --on-club-1-ui: #FFFFFF; --on-club-2-ui: #FFFFFF; --club-1-aura: var(--ground); --club-2-aura: var(--ground);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-feed: #9E2E25; --c-spr: #285F43; --c-tasks: #4F2650; --c-chat: #863757; --c-me: #8A4520; --c-club: #363C4A;
    --tp: 26%; --tp2: 40%;
    --ground: #111214; --panel: #1B1C20; --panel-solid: #1B1C20; --panel-2: #26272C; --rule: #2B2D33;
    --ink: #EEEDE9; --ink-2: #A2A5AC; --ink-3: #A2A5AC;
    --warn: #FF8A80; --warn-bg: #3A1F1E; --danger: #FF8A80; --danger-bg: #3A1F1E; --ok: #6FD39A; --ok-bg: #16291E;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --c-feed: #9E2E25; --c-spr: #285F43; --c-tasks: #4F2650; --c-chat: #863757; --c-me: #8A4520; --c-club: #363C4A;
  --tp: 26%; --tp2: 40%;
  --ground: #111214; --panel: #1B1C20; --panel-solid: #1B1C20; --panel-2: #26272C; --rule: #2B2D33;
  --ink: #EEEDE9; --ink-2: #A2A5AC; --ink-3: #A2A5AC;
  --warn: #FF8A80; --warn-bg: #3A1F1E; --danger: #FF8A80; --danger-bg: #3A1F1E; --ok: #6FD39A; --ok-bg: #16291E;
  --shadow: none; color-scheme: dark;
}
:root[data-blue] { --warn: #B3261E; --warn-bg: #FCEAE8; }

/* комната задаётся на body: всё, что считается от --room, объявлено там же, иначе возьмётся цвет с :root */
body.r-feed { --room: var(--c-feed); } body.r-spr { --room: var(--c-spr); } body.r-tasks { --room: var(--c-tasks); }
body.r-chat { --room: var(--c-chat); } body.r-me { --room: var(--c-me); } body.r-club { --room: var(--c-club); }
body {
  --signal: var(--room); --on-signal: #FFFFFF; --signal-text: var(--room);
  --tint: color-mix(in srgb, var(--room) var(--tp), var(--panel)); --tint-2: color-mix(in srgb, var(--room) var(--tp2), var(--panel));
  --track: var(--tint-2);
  --club-1-ui: var(--room); --club-2-ui: var(--room);
  background: var(--ground); letter-spacing: 0;
}
/* ночью цвет комнаты тёмный — текст и кольца цвета комнаты светлеют, фон кнопок остаётся цветом комнаты */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { --signal-text: color-mix(in oklab, var(--room) 45%, #FFFFFF); } }
:root[data-theme="dark"] body { --signal-text: color-mix(in oklab, var(--room) 45%, #FFFFFF); }
.ring .pr { stroke: var(--signal-text); }
.bar > i { background: var(--signal-text); }

/* ---- горизонта нет: цветом выделяется шапка раздела целиком ---- */
.horizon { display: none; }

/* ---- шапка раздела: цвет комнаты во всю ширину, скруглённый низ; не прилипает ---- */
.top.room-head { position: static; display: block; min-height: 0; background: var(--room); color: var(--on-room);
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--s-4) 20px; border-radius: 0 0 28px 28px; border: 0; margin-bottom: var(--s-2); }
body.scrolled .top.room-head { background: var(--room); border: 0; }
.room-head .room-top { display: flex; align-items: center; gap: var(--s-3); min-height: 48px; }
.room-head .club { display: flex; align-items: center; gap: var(--s-2); min-width: 0; flex: 1; }
.room-head .club-name { color: var(--on-room); opacity: .92; font-weight: 700; font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-head .logo-slot { width: 32px; height: 32px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .18); color: var(--on-room); }
.room-head .room-title { font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 0; color: var(--on-room); }
.room-head.sub { padding-bottom: 14px; border-radius: 0 0 22px 22px; }
.room-head h1.title { font-size: var(--fs-l); font-weight: 800; color: var(--on-room); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-head h1.title.sub { font-size: var(--fs-m); }
.room-head .back, .room-head .icon-btn { width: 44px; height: 44px; margin: 0; border-radius: 22px; background: rgba(255, 255, 255, .18); color: var(--on-room); flex: none; }
.room-head .back svg, .room-head .icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.room-head .brand { display: none; }
.room-head .badge { background: rgba(255, 255, 255, .2); color: var(--on-room); }
.room-head + .offline { margin-top: var(--s-2) !important; }
.top + .tabs, body.scrolled .top + .tabs { position: static; background: transparent; margin: 0 var(--s-4); }

/* ---- главная кнопка экрана — в конце содержимого, не висит поверх ---- */
.actions, body.no-nav .actions { position: static; background: none; padding: var(--s-5) 0 var(--s-4); margin: 0; }

/* ---- формы: мягче, как в прототипе ---- */
.card, .list, .post, .stat { background: var(--panel); border-color: var(--rule); box-shadow: var(--shadow); }
.btn { border-radius: 16px; font-weight: 700; }
.btn-secondary { border-color: var(--rule); background: var(--panel); }
.section-h h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.seg > .on, .chip.on, .toggle.on, .check.on, input:checked + .check { background: var(--room); border-color: var(--room); color: #FFFFFF; }
.toggle.on::after { background: #FFFFFF; }
.radio.on { border-color: var(--room); }
.tabs a.on::after { background: var(--room); }
.dots .done i { background: var(--signal-text); border-color: var(--signal-text); }
.dots .cur i { border-color: var(--signal-text); }
.avatar.grade { box-shadow: 0 0 0 3px var(--ground), 0 0 0 6px var(--room); }
.avatar.sm.grade { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--room); }

/* ---- нижняя панель: крупные значки, у каждого раздела свой цвет всегда; активный — заливкой ---- */
.nav { height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); padding: 6px 6px env(safe-area-inset-bottom, 0px); gap: 2px; background: var(--panel); border-top: 1px solid var(--rule); }
.nav a.tab { gap: 3px; min-height: 56px; border-radius: 16px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.nav a.tab.on { color: var(--ink); font-weight: 800; }
.nav a.tab.on::before { display: none; }
.nav .pill { position: relative; width: 52px; height: 32px; border-radius: 16px; display: grid; place-items: center; color: var(--tc); }
.nav .pill svg { width: 26px; height: 26px; stroke-width: 1.9; }
.nav a.tab.on .pill { background: var(--tc); color: #FFFFFF; }
.nav a.tab.dot::after { display: none; }
.nav a.tab.dot .pill::after { content: ""; position: absolute; top: 1px; right: 9px; width: 12px; height: 12px; border-radius: 6px; background: var(--c-feed); border: 2px solid var(--panel); }
.t-feed { --tc: var(--c-feed); } .t-spr { --tc: var(--c-spr); } .t-tasks { --tc: var(--c-tasks); }
.t-chat { --tc: var(--c-chat); } .t-me { --tc: var(--c-me); } .t-club { --tc: var(--c-club); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-club { --tc: #8E95A3; } :root:not([data-theme="light"]) .nav a.tab.dot .pill::after { background: #FF8A80; } }
:root[data-theme="dark"] .t-club { --tc: #8E95A3; }
:root[data-theme="dark"] .nav a.tab.dot .pill::after { background: #FF8A80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a.tab.on.t-club .pill { color: #111214; } }
:root[data-theme="dark"] .nav a.tab.on.t-club .pill { color: #111214; }

/* ---- широкий экран: та же панель колонкой слева; значки тех же цветов ---- */
@media (min-width: 900px) {
  body.wide .side { background: var(--panel); gap: 6px; }
  body.wide .side .club-name { color: var(--ink) !important; }
  body.wide .side .logo-slot { border: 0; background: var(--panel-2); }
  body.wide .side a.item { min-height: 52px; gap: 12px; padding: 0 8px; font-size: var(--fs-m); color: var(--ink-2); }
  body.wide .side a.item .pill { width: 44px; height: 36px; border-radius: 14px; display: grid; place-items: center; color: var(--tc); flex: none; }
  body.wide .side a.item.on { background: transparent; color: var(--ink); font-weight: 800; }
  body.wide .side a.item.on .pill { background: var(--tc); color: #FFFFFF; }
  body.wide .side a.item.dot::after { background: var(--c-feed); }
  body.wide .page > .top.room-head { padding-left: var(--s-5); padding-right: var(--s-5); margin: 0 calc(-1 * var(--s-5)) var(--s-2); border-radius: 0 0 28px 28px; }
}

/* ---- «Клуб» (экран руководителя): профиль строкой в шапке, инструменты сеткой, управление списком ---- */
.me-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; min-height: 60px; padding: 8px 12px; border-radius: 18px; background: rgba(255, 255, 255, .14); color: var(--on-room); }
.me-row .avatar { width: 44px; height: 44px; font-size: 18px; background: rgba(255, 255, 255, .22); color: var(--on-room); }
.me-row b { display: block; font-size: 17px; line-height: 1.25; }
.me-row .d { display: block; font-size: 13px; opacity: .88; line-height: 1.3; }
.me-row .chev { color: var(--on-room); opacity: .8; }
.tools8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 10px 6px; }
.tools8 a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px; min-height: 92px; border-radius: 14px;
  font-size: 12.5px; font-weight: 650; line-height: 1.2; text-align: center; color: var(--ink); }
.icon-sq { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--k, var(--room)) var(--tp), var(--panel)); color: var(--k, var(--room)); flex: none; }
.icon-sq svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-sq { color: color-mix(in oklab, var(--k, var(--room)) 45%, #FFFFFF); } }
:root[data-theme="dark"] .icon-sq { color: color-mix(in oklab, var(--k, var(--room)) 45%, #FFFFFF); }
.k-feed { --k: var(--c-feed); } .k-spr { --k: var(--c-spr); } .k-tasks { --k: var(--c-tasks); } .k-chat { --k: var(--c-chat); } .k-me { --k: var(--c-me); } .k-club { --k: var(--c-club); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .k-club { --k: #8E95A3; } }
:root[data-theme="dark"] .k-club { --k: #8E95A3; }
.glist .row { min-height: 64px; }
.glist .row .icon-sq { width: 40px; height: 40px; border-radius: 12px; }
.gnote { font-size: var(--fs-xs); color: var(--ink-2); margin: var(--s-3) 4px 0; line-height: 1.4; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); margin: var(--s-5) 4px 10px; }
.nav a.tab.on.dot .pill::after, body.wide .side a.item.on.dot::after { display: none; }   /* где ты сейчас, там «новое» уже видно */
body.wide .top.room-head, body.wide.scrolled .top.room-head { background: var(--room); }   /* ui.css гасит шапку на широком экране — у комнаты она цветная всегда */

/* ===================== Лента (шаг 2): «Сделать сейчас» сверху, «В клубе» ниже ===================== */
.room-head .room-sub { margin: 8px 0 0; font-size: 15px; opacity: .9; }
.hbtn { min-width: 44px; height: 44px; border-radius: 22px; background: rgba(255, 255, 255, .18); color: var(--on-room); display: inline-flex; align-items: center;
  justify-content: center; gap: 6px; padding: 0 14px 0 10px; font-weight: 700; font-size: 15px; flex: none; }
.hbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.now-list > * + * { margin-top: 10px; }
.todo { display: block; padding: 14px 14px 16px; border-left: 5px solid var(--k); }
.todo .kind { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--kt); }
.todo .kind svg, .todo .why svg, .calm svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.todo .kind .when { margin-left: auto; color: var(--ink); }
.todo .kind .when.hot { color: var(--warn); }
.todo h3 { margin: 8px 0 0; font-size: 17.5px; line-height: 1.28; font-weight: 700; }
.todo .facts { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.todo .btn { margin-top: 12px; background: var(--k); color: #FFFFFF; }
.todo .why { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; }
.todo .why svg { width: 16px; height: 16px; margin-top: 1px; color: var(--kt); }
.pointer { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; border-left: 5px solid var(--k); color: var(--ink); }
.pointer .icon-sq { width: 40px; height: 40px; border-radius: 12px; }
.pointer b { display: block; font-size: 16px; }
.pointer .d { display: block; font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.cnt { min-width: 26px; height: 26px; border-radius: 13px; padding: 0 8px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--k); color: #FFFFFF; flex: none; }
/* цвет текста раздела на светлой карточке: днём — сам цвет, ночью — светлее (как --signal-text) */
[class*="k-"] { --kt: var(--k); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [class*="k-"] { --kt: color-mix(in oklab, var(--k) 45%, #FFFFFF); } }
:root[data-theme="dark"] [class*="k-"] { --kt: color-mix(in oklab, var(--k) 45%, #FFFFFF); }
.calm { display: flex; gap: 8px; align-items: center; padding: 14px; border-radius: var(--r-l); background: var(--panel); border: 1px solid var(--rule); font-size: var(--fs-s); color: var(--ink-2); }
.calm svg { color: var(--ok); }
.more-link { display: flex; align-items: center; gap: 8px; min-height: 52px; margin-top: 10px; padding: 0 14px; border-radius: var(--r-l); background: var(--panel); border: 1px solid var(--rule); font-weight: 700; }
.more-link span:first-child { flex: 1; }
.more-link .muted { font-weight: 500; font-size: var(--fs-s); }
#klub-posts > .callout, #klub-posts > .pinned { margin-top: 10px; display: block; }
.card.pinned { color: var(--ink); }
.pinned .pin-l { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--signal-text); }
.pinned .pin-l svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pinned b { display: block; margin-top: 8px; line-height: 1.3; }
.pinned .clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: var(--fs-s); color: var(--ink-2); }
.post .ref { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--k) var(--tp), var(--panel)); color: var(--ink); }
.post .ref .icon-sq { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); }
.post .ref b { display: block; font-size: 15.5px; line-height: 1.3; }
.post .ref .d { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.post p { font-size: 16.5px; line-height: 1.5; }
.react button.on, .react a.on { background: var(--tint-2); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--room); }
.react a { background: var(--panel-2); }

/* ---- правки критики шага 1 ---- */
/* ночью значок неактивной вкладки светлее цвета раздела: тёмные --c-* на панели давали 2,0–2,6:1, нужно ≥ 3 */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a.tab:not(.on) .pill, :root:not([data-theme="light"]) body.wide .side a.item:not(.on) .pill { color: color-mix(in srgb, var(--tc) 55%, #FFFFFF); } }
:root[data-theme="dark"] .nav a.tab:not(.on) .pill, :root[data-theme="dark"] body.wide .side a.item:not(.on) .pill { color: color-mix(in srgb, var(--tc) 55%, #FFFFFF); }
.actions .btn svg { width: 22px; height: 22px; }
@media (min-width: 900px) {
  body.wide #app > .page { margin: 0 auto; }                /* колонка по центру, справа не пусто */
  body.wide .room-head .club { visibility: hidden; }       /* клуб уже назван в боковой колонке */
  body.wide .room-head .room-title { margin-top: -8px; }
}
label.row > input:checked + .check svg { visibility: visible; }   /* отмеченный пункт чек-листа — с галочкой, а не только заливкой */
.pointer .grow, .me-row .grow, .post .ref .grow { flex: 1; min-width: 0; }

/* ===================== «Клуб» (шаг 3): «Горит» с кнопками, «Пульс», число на вкладке ===================== */
.nav a.tab.num.dot .pill::after, body.wide .side a.item.num.dot::after { display: none; }
.nav .nb, .side .nb { position: absolute; top: -4px; left: calc(50% + 6px); right: auto; min-width: 12px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--c-feed); color: #FFFFFF;
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; border: 2px solid var(--panel); box-sizing: content-box; }   /* число сбоку от значка, домик виден целиком */
.nav .nb:empty, .side .nb:empty { display: none; }
body.wide .side a.item .pill { position: relative; }
.fire { padding: 0; overflow: hidden; }
.fire + .fire, .fire + details, .fire-more .fire + .fire { margin-top: 10px; }
.fire .ft { display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 0; }
.fire .ft .icon-sq { width: 40px; height: 40px; border-radius: 12px; }
.fire h3 { margin: 0; font-size: 16.5px; line-height: 1.28; font-weight: 700; }
.fire .ft .d { display: block; margin-top: 3px; font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.lvl { flex: none; height: 26px; padding: 0 9px; border-radius: 13px; font-size: 12.5px; font-weight: 800; display: inline-flex; align-items: center; white-space: nowrap; }
.lvl.r { background: var(--warn-bg); color: var(--warn); }
.lvl.y { background: #FBEFD9; color: #7A4B00; }
.lvl.g { background: var(--panel-2); color: var(--ink-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lvl.y { background: #3A2A10; color: #F2C679; } }
:root[data-theme="dark"] .lvl.y { background: #3A2A10; color: #F2C679; }
.fire .who-l { margin: 12px 14px 0; border-top: 1px solid var(--rule); }
.fire .who-l > div { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.fire .who-l > div:last-child { border-bottom: 0; }
.fire .who-l .avatar { width: 30px; height: 30px; font-size: 13px; }
.fire .who-l .grow { flex: 1; min-width: 0; }
.fire .note { margin: 10px 14px 0; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.fire .act { display: grid; gap: 8px; padding: 12px 14px 14px; }
.fire .act.two { grid-template-columns: 1fr 1fr; }
.fire .act .btn { min-height: 48px; font-size: 15.5px; padding: 0 10px; }
.fire .act .btn-primary { background: var(--room); }
.fire-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 52px; margin-top: 10px; padding: 0 14px;
  border-radius: var(--r-l); background: var(--panel); border: 1px solid var(--rule); font-weight: 700; }
.fire-more > summary::-webkit-details-marker { display: none; }
.fire-more > summary span:first-child { flex: 1; }
.fire-more > summary .muted { font-weight: 500; font-size: var(--fs-s); }
.fire-more[open] > summary .chev { transform: rotate(90deg); }
.fire-more > .stack { margin-top: 10px; }
.pulse { display: block; padding: 16px; color: var(--ink); }
.pulse .top-l { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pulse .top-l b { font-size: 18px; }
.pulse .top-l span { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--ink-2); }
.pulse .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pulse .nums b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pulse .nums span { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.25; margin-top: 2px; }

/* ===================== Задачи (шаг 4): счётчики и дни в шапке, лента дня, неделя с датами ===================== */
.room-head .counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.room-head .counts button, .room-head .days button { font: inherit; border: 0; cursor: pointer; }
.room-head .counts button { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 64px; padding: 8px 10px; border-radius: 16px;
  background: rgba(255, 255, 255, .14); color: var(--on-room); text-align: left; }
.room-head .counts b { font-size: 24px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.room-head .counts span { font-size: 12.5px; font-weight: 600; margin-top: 5px; opacity: .92; line-height: 1.15; }
.room-head .counts button.on { background: #FFFFFF; color: var(--c-tasks); }
.room-head .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.room-head .day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; border-radius: 16px;
  background: rgba(255, 255, 255, .14); color: var(--on-room); font-size: 12px; font-weight: 600; }
.room-head .day b { font-size: 19px; font-weight: 800; line-height: 1.1; }
.room-head .day i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .85); margin-top: 3px; }
.room-head .day i.no { background: transparent; }
.room-head .day.on { background: #FFFFFF; color: var(--c-tasks); }
.room-head .day.on i { background: var(--c-tasks); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .room-head .counts button.on, :root:not([data-theme="light"]) .room-head .day.on { background: #EEEDE9; color: #3E2F73; } }
:root[data-theme="dark"] .room-head .counts button.on, :root[data-theme="dark"] .room-head .day.on { background: #EEEDE9; color: #3E2F73; }
#j-today, #j-week, #j-someday, #j-done, .week[data-day] { scroll-margin-top: 12px; }
.tl { position: relative; }
.tl-rail { position: absolute; left: 57px; top: 0; bottom: 0; width: 2px; background: var(--tint-2); border-radius: 1px; }
.tl-item { display: grid; grid-template-columns: 48px 1fr; gap: 18px; position: relative; }
.tl-item + .tl-item, .now + .tl-item { margin-top: 12px; }
.tl-time { font-weight: 800; font-size: 16px; padding-top: 14px; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tl-time small { display: block; font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.tl-time.late, .tl-time.late small { color: var(--warn); }
.tl-card { padding: 14px 14px 14px 18px; position: relative; min-width: 0; }
.tl-card::before { content: ""; position: absolute; left: -17px; top: 19px; width: 16px; height: 16px; border-radius: 50%; background: var(--ground); border: 3px solid var(--signal-text); }
.tl-card.done { background: transparent; border-style: dashed; box-shadow: none; }
.tl-card.done::before { background: var(--signal-text); }
.tl-card.done h3 { text-decoration: line-through; color: var(--ink-2); }
.tl-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tl-card .chip { min-height: 28px; padding: 0 10px; border-radius: 14px; font-size: 13px; font-weight: 600; gap: 5px; background: var(--tint); }
.tl-card .chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tl-card .chip.k-spr { background: color-mix(in srgb, var(--k) var(--tp), var(--panel)); }
.tl-card .chip.k-spr svg { color: var(--kt); }
.tl-t { display: block; color: var(--ink); }
.tl-card h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 700; }
.tl-b { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-card .btn { margin-top: 12px; }
.tl-card .why { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.tl-done { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.linkbtn { font: inherit; font-weight: 700; color: var(--ink); background: none; border: 0; padding: 12px 4px; margin: -12px -4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.now { display: grid; grid-template-columns: 48px 1fr; gap: 18px; margin: 12px 0 0; }
.now span { grid-column: 2; justify-self: start; margin-left: -30px; background: var(--room); color: #FFFFFF; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 12px; }
.cl { list-style: none; margin: 10px 0 0; padding: 0; }
.cl li { display: flex; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--rule); font-size: 16px; }
.cl li.on > span:last-child { color: var(--ink-2); text-decoration: line-through; }
.box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--signal-text); display: grid; place-items: center; flex: none; background: transparent; color: #FFFFFF; padding: 0; cursor: pointer; }
.box svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.box.on { background: var(--room); border-color: var(--room); }
.box.on svg { visibility: visible; }
.cl button.box, .someday button.box { position: relative; }
.cl button.box::after, .someday button.box::after { content: ""; position: absolute; inset: -10px; }   /* палец попадает с запасом: 46 px */
.week { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px; align-items: center; color: var(--ink); }
.week h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; }
.week .d { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.dateblock { width: 56px; height: 60px; border-radius: 14px; background: var(--tint); color: var(--signal-text); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dateblock b { font-size: 22px; line-height: 1; font-weight: 800; }
.dateblock span { font-size: 12px; font-weight: 700; margin-top: 3px; }
.someday { display: flex; align-items: center; gap: 14px; padding: 14px; min-height: 60px; color: var(--ink); }
.someday .grow { flex: 1; min-width: 0; color: var(--ink); }
.someday b { display: block; font-weight: 650; }
.someday .d { display: block; font-size: 13px; color: var(--ink-2); }
.done-list { padding: 4px 14px; }
.done-list > a { display: flex; align-items: center; gap: 12px; min-height: 52px; font-size: 15px; color: var(--ink-2); border-top: 1px solid var(--rule); }
.done-list > a:first-child { border-top: 0; }
.done-list .grow { flex: 1; min-width: 0; }
.done-list .box { width: 24px; height: 24px; cursor: default; }

/* ===================== Справочник (шаг 5): поиск в шапке, плитки глав, направления, полка клуба ===================== */
.room-head .search { margin-top: 14px; min-height: 50px; border-radius: 16px; background: var(--panel); border: 0; color: var(--ink-2); }
.room-head .search input { color: var(--ink); }
.room-head .search input::placeholder { color: var(--ink-2); }
.cont { display: flex; gap: 14px; padding: 14px; align-items: center; color: var(--ink); }
.cont .thumb { width: 64px; height: 64px; border-radius: 16px; background: var(--room); color: #FFFFFF; display: grid; place-items: center; flex: none; }
.cont .thumb svg, .dir-big .ico svg, .tile svg, .shelf-item svg, .shelf-head svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cont .thumb svg { width: 30px; height: 30px; }
.cont .grow { flex: 1; min-width: 0; }
.cont h3 { margin: 2px 0 8px; font-size: 17px; line-height: 1.25; font-weight: 700; }
.cont .d, .dir-big .d { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.cont .bar { display: block; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tiles.after { margin-top: 10px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 128px; padding: 14px; border-radius: var(--r-l);
  background: var(--panel); border: 1px solid var(--rule); box-shadow: var(--shadow); color: var(--ink); }
.tile .tile-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tile .num { font-size: 13px; font-weight: 800; color: var(--signal-text); background: var(--tint); border-radius: 10px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.tile .ico { width: 26px; height: 26px; color: var(--signal-text); }
.tile h3 { margin: 12px 0 0; font-size: 15.5px; line-height: 1.25; font-weight: 700; }
.tile .st { margin-top: 8px; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; line-height: 1.3; }
.tile.read { background: var(--tint); border-color: transparent; }
.tile.read .num { background: var(--panel); }
.tile .st .ok { width: 18px; height: 18px; border-radius: 9px; background: var(--room); color: #FFFFFF; display: grid; place-items: center; flex: none; }
.tile .st .ok svg { width: 12px; height: 12px; stroke-width: 3; }
.tile .icon-sq svg { width: 24px; height: 24px; }
.dir-big { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-l); background: var(--room); color: #FFFFFF; }
.dir-big .ico { width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.dir-big .ico svg { width: 30px; height: 30px; }
.dir-big .grow { flex: 1; min-width: 0; }
.dir-big h3 { margin: 2px 0 4px; font-size: 19px; font-weight: 800; }
.dir-big .d { color: rgba(255, 255, 255, .92); }
.dir-big .bar { display: block; background: rgba(255, 255, 255, .25); margin-top: 10px; }
.dir-big .bar > i { background: #FFFFFF; }
.club-shelf { padding: 6px 16px; }
.shelf-head { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.shelf-head .logo-slot { width: 44px; height: 44px; border-radius: 13px; border: 0; background: var(--panel-2); }
.shelf-head b, .shelf-item b { display: block; font-weight: 650; line-height: 1.3; }
.shelf-head .d, .shelf-item .d { display: block; font-size: 13px; color: var(--ink-2); }
.shelf-head .grow, .shelf-item .grow { flex: 1; min-width: 0; }
.shelf-item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.shelf-item > svg:first-child { width: 22px; height: 22px; color: var(--signal-text); flex: none; }
.shelf-item .chip.new { min-height: 26px; padding: 0 9px; border-radius: 13px; font-size: 12px; font-weight: 700; background: var(--tint); color: var(--ink); white-space: nowrap; }
.shelf-item .st-ok { width: 22px; height: 22px; border-radius: 11px; background: var(--room); color: #FFFFFF; display: grid; place-items: center; flex: none; }
.shelf-item .st-ok svg { width: 13px; height: 13px; stroke-width: 3; }

/* ===================== «Я» (шаг 5): кто я — в шапке, настройки группой ===================== */
.me-hero { text-align: center; padding: 6px 0 4px; }
.me-hero .avatar { width: 88px; height: 88px; font-size: 34px; background: rgba(255, 255, 255, .2); color: var(--on-room); box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.me-hero h1 { margin: 14px 0 0; font-size: 24px; font-weight: 800; color: var(--on-room); letter-spacing: -.01em; }
.me-hero .d { margin: 4px 0 0; font-size: 14.5px; color: var(--on-room); opacity: .92; }
.me-hero .badge-grade { display: inline-flex; margin-top: 4px; background: #FFFFFF; color: var(--c-me); border: 0; font-weight: 800; }   /* 5,0:1 днём, 6,5:1 ночью */
.glist .icon-sq svg { width: 22px; height: 22px; }
.theme-row { flex-wrap: wrap; row-gap: 10px; }
.theme-row .seg { flex-basis: 100%; }
button.danger-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--rule); font: inherit; text-align: left; cursor: pointer; color: var(--danger); }
button.danger-row .t { color: var(--danger); }
button.danger-row .icon-sq { --k: var(--danger); background: var(--danger-bg); color: var(--danger); }
.now span { position: relative; z-index: 1; }   /* «сейчас» поверх линии ленты */
.glist .logo-slot { width: 48px; height: 48px; border-radius: 14px; border: 0; background: var(--panel-2); }
.glist .row .icon-sq.k-club, .glist .row .icon-sq.k-spr, .glist .row .icon-sq.k-me, .glist .row .icon-sq.k-tasks { background: color-mix(in srgb, var(--k) var(--tp), var(--panel)); color: var(--kt); }

/* ---- правки критики: Задачи круг 2, шаг 5 ---- */
.room-head .day.on i.no { background: transparent; }
.theme-row .seg { display: grid; grid-template-columns: 1fr 1.6fr 1fr; }
.theme-row .seg > a { white-space: nowrap; padding: 0 6px; }
@media (min-width: 900px) { body.wide .tiles { grid-template-columns: repeat(3, 1fr); } }

/* ---- «Я» сеткой (прототип 04): плитки из модулей; широкая — баллы и документы ---- */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; grid-auto-flow: dense; }
.bento > .t { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 124px; padding: 14px; color: var(--ink); min-width: 0; }
.bento > .w2 { grid-column: span 2; min-height: 0; }
.bento .th { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bento .th > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: .8; }
.bento .icon-sq { width: 40px; height: 40px; border-radius: 12px; }
.bento .big { display: block; font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bento b { display: block; font-size: 16px; line-height: 1.25; }
.bento .lbl { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.bento .th .lbl { margin: 0; font-weight: 700; }
.bento .accent { background: var(--room); border-color: transparent; color: #FFFFFF; }
.bento .accent .lbl, .bento .accent .tiny { color: rgba(255, 255, 255, .92); }
.bento .accent .big-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bento .accent .small { font-size: 14px; font-weight: 600; opacity: .95; }
.bento .accent .bar { display: block; margin-top: 12px; background: rgba(255, 255, 255, .28); }
.bento .accent .bar > i { background: #FFFFFF; }
.bento .accent .tiny { display: block; margin-top: 8px; font-size: 12.5px; }
.bento .doc-h { display: flex; align-items: center; gap: 10px; }
.bento .doc-h b { font-size: 17px; }
.bento .doc-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; border-top: 1px solid var(--rule); font-size: 15px; }
.bento .doc-line:first-child { border-top: 0; }
.bento .doc-line .chev { width: 18px; height: 18px; }
.chip.warn, .badge-warn { background: #FBEFD9; color: #7A4B00; }            /* «скоро истекает» — жёлтое везде; красное — только «нет» и «истёк» */
.chip.danger { background: var(--danger-bg); color: var(--danger); }
.bento .chip { min-height: 28px; padding: 0 10px; border-radius: 14px; font-size: 13px; font-weight: 700; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.warn, :root:not([data-theme="light"]) .badge-warn { background: #3A2A10; color: #F2C679; } }
:root[data-theme="dark"] .chip.warn, :root[data-theme="dark"] .badge-warn { background: #3A2A10; color: #F2C679; }
