/* app.css — оболочка и экраны веб-приложения (на токенах kit.css).
 * Блоки: ОБОЛОЧКА · ЛЕНТА · ПОСТ · ТЕГ И ПОИСК · ОТКРЫТКА · УСТАНОВКА. */

/* == ОБОЛОЧКА ============================================================ */
.app { min-height: 100dvh; }
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 2px;
  height: calc(var(--hdr-h) + var(--safe-t));
  padding: var(--safe-t) calc(4px + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
  background: var(--bar);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap);
  color: var(--panel-fg); font-size: 19px; font-weight: 800; letter-spacing: -.01em;
}
.brand b { color: var(--lav); font-weight: 900; }
.brand .ki { color: var(--lav); font-size: 22px; }
/* Логотип «Лунный кот» (04.10.2026): малый горизонтальный локап, цвета —
   --logo-m/-s/-w из kit.css (тёмная/светлая тема). */
.brand .logo-svg { height: 26px; width: auto; display: block; }
.hdr-sp { flex: 1; }
.hbtn {
  display: inline-grid; place-items: center; flex: none;
  width: var(--tap); height: var(--tap);
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-mid);
  cursor: pointer;
  transition: background-color var(--dur-press) linear, color var(--dur-press) linear;
}
.hbtn .ki { font-size: 22px; }
.hbtn:active { background: var(--accent-wash-2); }
.hbtn.on { color: var(--lav); }
.hbtn[hidden] { display: none; }
.fish-pill {
  display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap);
  padding: 0 10px; border-radius: 999px; color: var(--warm-ink);
  font-size: 14px; font-weight: 800;
  transition: background-color var(--dur-press) linear;
}
.fish-pill:active { background: var(--accent-wash-2); }
.fish-pill .ki { font-size: 18px; }
/* «нет связи» — /me не ответил: тап повторяет (boot.js), вкладки кота вернутся сами. */
.net-pill {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px;
  border: 0; border-radius: 999px; background: var(--accent-wash-2); color: var(--ink-mid);
  font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
  transition: background-color var(--dur-press) linear;
}
.net-pill:active { background: var(--accent-wash-3); }
.main {
  max-width: 640px; margin: 0 auto; outline: none;
  padding: calc(var(--hdr-h) + var(--safe-t)) var(--safe-r)
           calc(var(--tab-h) + var(--safe-b) + 24px) var(--safe-l);
}
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tab-h) + var(--safe-b));
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 0; min-height: var(--tab-h);
  color: var(--ink-dim); font-size: 12px; font-weight: 700;
  transition: color var(--dur-press) linear;
}
.tab .ki { font-size: 24px; }
.tab.on { color: var(--lav); }
.tab-ic { position: relative; display: inline-grid; }
.tab-lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-bdg {
  position: absolute; top: -4px; left: calc(100% - 8px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent-grad); color: var(--ink-on-accent);
  font-size: 12px; font-weight: 900; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.nojs { padding: 80px 16px; text-align: center; }

/* Экраны и переходы: вкладка → вкладка — кроссфейд, вглубь — въезд справа
 * на 24 px, назад — обратный и быстрее. Уходящий экран замирает fixed. */
.scr { position: relative; z-index: 1; min-height: calc(100dvh - var(--hdr-h) - var(--tab-h) - var(--safe-t) - var(--safe-b)); }
.scr.is-out {
  position: fixed; left: 0; right: 0; z-index: 0;
  max-width: 640px; margin: 0 auto; padding: 0 var(--safe-r) 0 var(--safe-l);
  pointer-events: none;
}
.scr.out-pop { z-index: 2; }
.scr.in-push { animation: scr-in-push var(--dur-slow) var(--ease-out) both; }
.scr.out-push { animation: scr-out-fade var(--dur-fast) var(--ease-in) both; }
.scr.in-pop, .scr.in-fade { animation: scr-in-fade var(--dur-base) var(--ease-out) both; }
.scr.out-pop { animation: scr-out-pop var(--dur-fast) var(--ease-in) both; }
.scr.out-fade { animation: scr-out-fade var(--dur-fast) var(--ease-in) both; }
@keyframes scr-in-push { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes scr-out-pop { to { opacity: 0; transform: translateX(24px); } }
@keyframes scr-in-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scr-out-fade { to { opacity: 0; } }
.sub-head {
  position: sticky; top: calc(var(--hdr-h) + var(--safe-t)); z-index: 20;
  display: flex; align-items: center; gap: 4px; min-height: 52px;
  padding: 4px var(--gutter) 4px 4px; background: var(--bg);
}
.sub-title { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 900; }
/* Заголовок без «назад» слева (корни вкладок: Находки, Ошейник, свой профиль) —
   на линии отступа карточек, а не прижат к краю (left 4px — под кнопку «назад»). */
.sub-head > .sub-title:first-child { padding-left: calc(var(--gutter) - 4px); }
/* Топ Двора: на 360–390 строка «@жетон · лапки · комментарии» резалась
   многоточием посреди счётчиков — переносим на вторую строку (stage3.css — только токены). */
.tp-row .tp-who small { white-space: normal; text-overflow: clip; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) {
  .scr.in-push, .scr.out-push, .scr.in-pop, .scr.in-fade, .scr.out-pop, .scr.out-fade { animation: none; }
}

/* == ЛЕНТА =============================================================== */
.seg {
  position: sticky; top: calc(var(--hdr-h) + var(--safe-t)); z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 8px var(--gutter); background: var(--bg);
}
.seg-b {
  display: flex; align-items: center; justify-content: center; min-width: 0; min-height: var(--tap);
  padding: 0 4px; border-radius: 999px; color: var(--ink-mid);
  font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background-color var(--dur-press) linear, color var(--dur-press) linear;
}
.seg-b.on { background: var(--accent-wash-3); color: var(--panel-fg); }
/* Лента (20.10): прокрутка вниз прячет полоску под шапку (screens/feed.js
   tuckOnScroll), вверх — возвращает. Только transform/opacity — вёрстка не
   прыгает: липкая полоса лежит поверх ленты, место под ней не держится.
   Шапка полупрозрачная (blur), поэтому ещё и гасим — иначе вкладки
   просвечивали бы сквозь неё. */
.scr-feed > .seg {
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-base) linear;
}
.scr-feed > .seg.is-tucked {
  transform: translateY(-100%); opacity: 0; pointer-events: none;
  transition: transform var(--dur-base) cubic-bezier(.4, 0, .7, 1), opacity var(--dur-base) linear var(--dur-press);
}
@media (prefers-reduced-motion: reduce) {
  .scr-feed > .seg, .scr-feed > .seg.is-tucked { transition: opacity var(--dur-fast) linear; }
}
.seg-b:active { background: var(--accent-wash-2); }
.seg-b.on:active { background: var(--accent-wash-3); }
@media (hover: hover) and (pointer: fine) {
  .seg-b:hover { background: var(--accent-wash); color: var(--panel-fg); }
  .seg-b.on:hover { background: var(--accent-wash-3); }
}
.feed-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 10px; }
.feed-top:empty { display: none; }
.feed-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.feed-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.feed-foot:empty { margin: 0; }
.feed-more-btn { justify-self: center; }
.feed-more { height: 1px; }
.sk-cardw { margin: 0 var(--gutter); padding: 8px; border-radius: var(--r-5); box-shadow: inset 0 0 0 1px var(--line); }
.sk-media { aspect-ratio: 4 / 5; margin-top: 6px; border-radius: var(--r-3); }

/* Карточка */
.card {
  margin: 0 var(--gutter); overflow: hidden;
  border-radius: var(--r-5); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line);
}
.card.is-new { animation: card-in var(--dur-slow) var(--ease-out); }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pc-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; }
.pc-ava {
  display: grid; place-items: center; flex: none;
  width: var(--tap); height: var(--tap); border-radius: var(--r-3); background: var(--accent-wash);
}
.pc-who { display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0; min-height: var(--tap); color: var(--panel-fg); }
.pc-name { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 15px; font-weight: 900; }
.pc-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-off { flex: none; color: var(--lav); font-size: 13px; }
.pc-gem { flex: none; font-size: 13px; }
.pc-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-dim); font-size: 12px; font-weight: 700; }
.ts { font-size: 12px; }
/* Рамка кадра (mediaframe.js): ширина и пропорция — инлайном по кадру,
   кадр целиком (contain), поля — размытая притемнённая копия кадра. */
.mf {
  position: relative; max-width: 100%; margin-inline: auto; overflow: hidden;
  background: var(--sk-1);
}
.mf-media { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.mf-bg {
  position: absolute; inset: -10%; background: center / cover no-repeat;
  filter: blur(22px) brightness(var(--mf-dim)) saturate(1.15);
}
:root { --mf-dim: .55; }
:root[data-theme="light"] { --mf-dim: .82; }
.pc-media { display: flex; justify-content: center; }
.card.is-full .pc-media { background: var(--sink); }
.md {
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.md:not(.is-loaded):not(.md-video):not(.md-album):not(.is-broken) {
  background: linear-gradient(100deg, var(--sk-1) 40%, var(--sk-2) 50%, var(--sk-1) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
.md img.mf-media { opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.md.is-loaded img.mf-media, .alb-s.is-loaded img.mf-media { opacity: 1; }
.md.is-broken img, .alb-s.is-broken img { visibility: hidden; }
.md.is-broken::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 64px; height: 64px;
  background: var(--line-strong);
  -webkit-mask: url("shared/pet/sit.png") center / contain no-repeat;
  mask: url("shared/pet/sit.png") center / contain no-repeat;
}
.md-video { background: var(--sink); }
.md-video video { background: transparent; }
/* Звук ролика ленты: плюш-динамик на тёмной таблетке, тап — звук этому, остальным тишина. */
.mf-snd {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  display: grid; place-items: center; width: var(--tap); height: var(--tap);
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-on-accent);
  cursor: pointer;
}
.mf-snd::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--backdrop);
  transition: transform var(--dur-press) var(--ease-out);
}
.mf-snd:active::before { transform: scale(.9); }
.mf-snd .ki { position: relative; font-size: 18px; }
.alb { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.alb::-webkit-scrollbar { display: none; }
.alb-s { position: relative; flex: 0 0 100%; overflow: hidden; scroll-snap-align: center; }
.alb-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.alb-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-on-accent); opacity: .5;
  transition: opacity var(--dur-fast) linear, transform var(--dur-fast) var(--ease-out);
}
.alb-dots i.on { opacity: 1; transform: scale(1.25); }
.alb-n {
  position: absolute; top: 8px; right: 8px; padding: 2px 9px; border-radius: 999px;
  background: var(--backdrop); color: var(--ink-on-accent); font-size: 12px; font-weight: 800;
}
.alb-nav {
  position: absolute; top: 50%; z-index: 2; display: none; place-items: center;
  width: 36px; height: 36px; margin-top: -18px; padding: 0; border: 0; border-radius: 50%;
  background: var(--backdrop); color: var(--ink-on-accent); cursor: pointer;
  opacity: 0; transition: opacity var(--dur-fast) linear;
}
.alb-prev { left: 8px; }
.alb-next { right: 8px; }
.alb-next svg { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) {
  .alb-nav:not([hidden]) { display: grid; }
  .md-album:hover .alb-nav, .alb-nav:focus-visible { opacity: 1; }
}
.pc-cap { margin: 10px 12px 0; color: var(--ink-soft); font-size: 15px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.tag-link { color: var(--lav); font-weight: 800; }
.pc-extra { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 10px 12px 0; }
.pc-extra:empty { display: none; }
.pc-acts { display: flex; align-items: center; gap: 2px; padding: 4px 6px 6px; }
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: var(--tap); height: var(--tap); padding: 0 10px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-mid);
  font-size: 14px; font-weight: 800; cursor: pointer;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  transition: background-color var(--dur-press) linear, color var(--dur-press) linear;
}
.act .ki { font-size: 22px; }
.act:active { background: var(--accent-wash-2); }
.act-n:empty { display: none; }
.act-paw.on, .cm-paw.on { color: var(--hot); }
/* Мышь: действия под постом отзываются на наведение. Поставленная лапка
   остаётся розовой и получает розовую подложку — видно, что она «включена»
   и нажатие её снимет (подсказка: «Убрать лапку»). Включённое состояние под
   наведением не должно выглядеть выключенным — сторож toggle_hover_audit. */
@media (hover: hover) and (pointer: fine) {
  .act:hover { background: var(--accent-wash); color: var(--panel-fg); }
  .act-paw.on:hover, .cm-paw.on:hover {
    background: color-mix(in srgb, var(--hot) 16%, transparent); color: var(--hot);
  }
}
.rx-emo { font-size: 20px; line-height: 1; }
.paw-ic { display: inline-grid; }
.act-paw.is-pop .paw-ic { animation: paw-pop var(--dur-slow) var(--ease-pop); }
@keyframes paw-pop { from { transform: scale(.9); } to { transform: none; } }
.act-stats { margin-left: auto; }
/* Лента 16.11: закладка «Сохранённое» — у правого края ряда действий. */
.act-save { margin-left: auto; }
.act-save + .act-stats { margin-left: 0; }
.act-save.on { color: var(--gold-ink); }
.pc-pin { color: var(--lav); font-weight: 800; }
.saved-note { display: flex; align-items: center; gap: 6px; margin: 4px var(--gutter) 10px; color: var(--ink-dim); font-size: 13px; font-weight: 700; }
.saved-note .ki { color: var(--gold-ink); font-size: 18px; }
.paws-line { display: flex; align-items: center; gap: 6px; min-height: var(--tap); margin: 0 var(--gutter); color: var(--ink-mid); font-size: 14px; -webkit-user-select: none; user-select: none; transition: color var(--dur-press) linear; }
.paws-line b { color: var(--panel-fg); font-weight: 900; }
.paws-line .ki { color: var(--hot); font-size: 18px; }
.paws-line:active { color: var(--panel-fg); }
.fl-rx { margin-left: 6px; font-size: 15px; }
.paw-burst {
  position: fixed; z-index: 90; width: 84px; height: 84px; margin: -42px 0 0 -42px;
  color: var(--hot); pointer-events: none;
  animation: paw-burst var(--dur-slow) var(--ease-out) forwards;
}
.paw-burst .ki { width: 100%; height: 100%; }
@keyframes paw-burst {
  0% { opacity: 0; transform: scale(.9); }
  45% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.3) translateY(-12px); }
}
.rx-pick {
  position: fixed; z-index: 85; display: flex; gap: 2px; padding: 4px;
  border-radius: 999px; background: var(--bg-2); box-shadow: var(--e3), inset 0 0 0 1px var(--line);
  animation: rx-in var(--dur-base) var(--ease-pop);
  transition: opacity var(--dur-fast) var(--ease-in), transform var(--dur-fast) var(--ease-in);
}
.rx-pick.is-leaving { opacity: 0; transform: scale(.92); }
.rx-pick.is-fast { transition-duration: var(--dur-press); }
.rx-pick button {
  width: var(--tap); height: var(--tap); border: 0; border-radius: 50%;
  background: transparent; font-size: 26px; cursor: pointer;
  transition: background-color var(--dur-press) linear;
}
.rx-pick button:active { background: var(--accent-wash-3); }
@keyframes rx-in { from { opacity: 0; transform: scale(.92) translateY(6px); } to { opacity: 1; transform: none; } }
.pc-top {
  display: flex; align-items: center; gap: 8px; min-height: var(--tap);
  margin: 0 8px 8px; padding: 4px 10px; border-radius: var(--r-3);
  background: var(--sink); color: var(--ink-soft); font-size: 14px;
}
.pc-top b { color: var(--panel-fg); }
.tc-ava { flex: none; display: inline-grid; }
.tc-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-n { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-dim); font-size: 12px; font-weight: 800; }
.poll { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.poll-o {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: var(--tap); padding: 0 14px; overflow: hidden;
  border: 0; border-radius: var(--r-3); background: var(--raise-2); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--panel-fg); font-size: 14px; font-weight: 700; text-align: left; cursor: pointer;
  transition: background-color var(--dur-press) linear;
}
.poll-o::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%);
  background: var(--accent-wash-3); transition: width var(--dur-slow) var(--ease-out);
}
.poll-o > span { position: relative; }
.poll-o.on { box-shadow: inset 0 0 0 2px var(--lav); }
.poll-p { font-weight: 900; }
.poll-sum { color: var(--ink-dim); font-size: 12px; font-weight: 700; }
/* Музыка поста (20.10): кружок с нотой; тап — плавно разворачивается вправо
   в тонкую плашку с названием (ширина 24px → 24 + --tc-open + 10 px, меряет
   music.js), текст проявляется, когда плашка уже раскрылась; сворачивание —
   наоборот: сначала гаснет текст, потом сжимается плашка. Над кадром —
   тёмное стекло (одинаково в обеих темах: под ним фото), в текстовой
   открытке — обычная лавандовая подложка. Область касания — 44px (::after). 20.10: 34→24px — крупный кружок перекрывал кадр. */
.tchip {
  --tc-d: 24px;
  position: relative; justify-self: start; flex: none;
  display: inline-flex; align-items: center; overflow: hidden;
  width: var(--tc-d); max-width: 100%; height: var(--tc-d);
  padding: 0; border: 0; border-radius: 999px;
  background: var(--accent-wash-2); color: var(--panel-fg);
  font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: width var(--dur-unfold) var(--ease-unfold) var(--dur-press), background-color var(--dur-press) linear, transform var(--dur-press) var(--ease-out);
}
.tchip::after { content: ""; position: absolute; inset: -10px; }
.tchip:active { transform: scale(.94); }
.tchip.playing {
  width: calc(var(--tc-d) + var(--tc-open, 80px) + 10px);
  transition: width var(--dur-unfold) var(--ease-unfold), background-color var(--dur-press) linear, transform var(--dur-press) var(--ease-out);
}
.tc-slot { position: relative; flex: none; display: grid; place-items: center; width: var(--tc-d); height: var(--tc-d); }
.tc-ic, .tc-eq { grid-area: 1 / 1; transition: opacity var(--dur-base) linear, transform var(--dur-slow) var(--ease-pop); }
.tc-ic { font-size: 12px; transform-origin: 50% 70%; }
.tc-eq { display: inline-flex; gap: 1.5px; align-items: flex-end; height: 9px; opacity: 0; transform: scale(.4); }
.tc-eq i { width: 2px; height: 100%; border-radius: 1px; background: currentColor; transform-origin: 50% 100%; animation: tc-eq 1s ease-in-out infinite paused; }
.tc-eq i:nth-child(2) { animation-direction: reverse; }
.tc-eq i:nth-child(3) { animation-direction: alternate-reverse; }
.tchip.playing .tc-eq { opacity: 1; transform: none; }
.tchip.playing .tc-eq i { animation-play-state: running; }
.tchip.playing .tc-ic { opacity: 0; transform: scale(.4) rotate(-20deg); }
/* Нота покачивается при касании — та же «живая» отдача, что у плюш-иконок. */
.tchip:not(.playing):active .tc-ic { animation: tc-wob var(--dur-unfold) var(--ease-pop); }
.tc-nm {
  flex: none; padding-right: 2px; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateX(-6px);
  transition: opacity var(--dur-press) linear, transform var(--dur-base) var(--ease-in);
}
.tchip.playing .tc-nm {
  flex: 0 1 auto; min-width: 0; opacity: 1; transform: none;
  transition: opacity var(--dur-slow) linear var(--dur-base), transform var(--dur-slow) var(--ease-out) var(--dur-fast);
}
/* Кружок поверх кадра: левый нижний угол (у ролика справа — кнопка звука; у
   альбома внизу точки — там кружок наверху слева, справа сверху счётчик). */
.tc-over {
  /* зеркально значку keriteri в открытке 1080x1350: он в 62px от правого края и центром в 64px от низа —
     кружок чуть ближе к краю слева (по глазу Ангела) и центром на той же высоте (в долях кадра, чтобы совпадало на любом экране) */
  position: absolute; left: max(8px, 4.6%); bottom: max(8px, calc(4.74% - var(--tc-d) / 2)); z-index: 2;
  max-width: calc(100% - 20px);
  background: var(--photo-glass); color: var(--ink-on-accent);
  -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: var(--photo-glass-e), inset 0 0 0 1px var(--photo-glass-edge);
}
.tc-over .tc-nm { text-shadow: var(--photo-text-shadow); }
.md-video .tc-over { max-width: calc(100% - 20px - 52px); }
.md-album .tc-over { top: 10px; bottom: auto; max-width: calc(100% - 20px - 56px); }
/* В просмотре поста у ролика внизу родные кнопки плеера — кружок наверх. */
.card.is-full .md-video .tc-over { top: 10px; bottom: auto; max-width: calc(100% - 20px); }
@keyframes tc-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes tc-wob { 30% { transform: rotate(-16deg) scale(1.12); } 65% { transform: rotate(10deg); } }
@media (prefers-reduced-motion: reduce) {
  .tchip, .tchip.playing, .tc-nm, .tchip.playing .tc-nm, .tc-ic, .tc-eq { transition: none; }
  .tchip:not(.playing):active .tc-ic { animation: none; }
}

/* Плашки над лентой */
.plate-finds {
  display: flex; align-items: center; gap: 10px; min-height: var(--tap);
  margin: 0 var(--gutter); padding: 6px 12px 6px 8px; border-radius: var(--r-4);
  background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--panel-fg); font-size: 14px; -webkit-user-select: none; user-select: none;
  transition: background-color var(--dur-press) linear;
}
.plate-finds:active { background: var(--accent-wash-3); }
.plate-finds .pl-ava { flex: none; display: block; width: 28px; height: 28px; }
.plate-hour {
  display: flex; align-items: center; gap: 8px; min-height: var(--tap);
  margin: 0 var(--gutter); padding: 6px 12px; border-radius: var(--r-4);
  background: color-mix(in srgb, var(--gold-ink) 14%, transparent); color: var(--panel-fg); font-size: 14px;
}
.pl-ic .ki { color: var(--gold-ink); font-size: 20px; }
.pl-tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-go { flex: none; color: var(--gold-ink); font-size: 12px; font-weight: 800; }
.tr-row {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 var(--gutter); scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 12px, black calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 12px, black calc(100% - 28px), transparent 100%);
}
.tr-row::-webkit-scrollbar { display: none; }
.tr-chip {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap);
  padding: 0 14px; border-radius: 999px; background: var(--raise-2); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--panel-fg); font-size: 14px; font-weight: 800; white-space: nowrap;
  transition: background-color var(--dur-press) linear;
}
.tr-chip:active { background: var(--accent-wash-3); }
.plate-homes { margin: 0 var(--gutter); padding: 4px 0 6px; border-radius: var(--r-4); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.ph-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 12px; color: var(--ink-mid); font-size: 13px; font-weight: 900; }
.ph-all { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; font-size: 13px; font-weight: 800; }
.ph-row { display: flex; gap: 6px; overflow-x: auto; padding: 0 8px; scrollbar-width: none; }
.ph-row::-webkit-scrollbar { display: none; }
.ph-home {
  flex: none; display: grid; justify-items: center; gap: 2px; width: 84px; padding: 6px 4px;
  border-radius: var(--r-3); color: var(--panel-fg);
  transition: background-color var(--dur-press) linear;
}
.ph-home:active { background: var(--accent-wash-2); }
.ph-nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 800; }
.ph-cozy { color: var(--ink-dim); font-size: 12px; }
.mine-head {
  display: flex; align-items: center; gap: 12px; margin: 0 var(--gutter); padding: 10px 12px;
  border-radius: var(--r-5); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); color: var(--panel-fg);
}
.mh-ava { flex: none; display: inline-grid; }
.mh-who { display: grid; gap: 2px; min-width: 0; }
.mh-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 900; }
.mh-who span { color: var(--ink-dim); font-size: 13px; font-weight: 700; }

/* «Тяни, чтобы обновить». Выезжает из-под липкой полосы экрана (сегмент
   лент / шапка тега — --ptr-top её высота, z-index ниже её), а не поверх
   вкладок «Свежее»/«Друзья». */
.scr-feed { --ptr-top: 60px; }        /* .seg: 8 + 44 (--tap) + 8 */
.scr-tag { --ptr-top: 52px; }         /* .sub-head: min-height */
.scr-pub { --ptr-top: 52px; }         /* паблик — та же .sub-head */
.ptr {
  position: fixed; left: 50%; top: calc(var(--hdr-h) + var(--safe-t) + var(--ptr-top, 0px) + 8px); z-index: 15;
  display: grid; place-items: center; width: 40px; height: 40px; margin-left: -20px;
  border-radius: 50%; background: var(--bg-2); box-shadow: var(--e2);
  opacity: 0; pointer-events: none;
  transform: translateY(calc(var(--ptr, 0px) - 56px));
}
.ptr.is-anim { transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out); }
.ptr:not(.is-busy) .kt-spin svg, .ptr:not(.is-busy) .kt-spin circle { animation-play-state: paused; }
.scr:not(.is-on) .ptr { display: none; }

/* Переливы редких окрасов гасим только на самых мелких портретах (превью
   коммента, комментарии, поиск): там их десятки и на 22–32 px не видно.
   В карточке ленты (40 px) перелив оставлен — его там ищут (17.10). */
.tc-ava [class*="coat-anim-"] image,
.cm-ava [class*="coat-anim-"] image, .sr-ava [class*="coat-anim-"] image { animation: none; }

/* == ПОСТ ================================================================ */
.card.is-full { margin: 0; border-radius: 0; background: transparent; box-shadow: none; }
.cmts { padding: 4px var(--gutter) 96px; }
.cmts-h { margin: 8px 0; font-size: 15px; font-weight: 900; color: var(--ink-mid); }
.cmts-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.cm { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; }
.cm.is-new { animation: card-in var(--dur-slow) var(--ease-out); }
.cm-ava { display: grid; place-items: center; flex: none; width: var(--tap); height: var(--tap); border-radius: var(--r-3); background: var(--accent-wash); }
.cm-main { flex: 1; min-width: 0; padding-top: 2px; }
.cm-meta { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 900; }
.cm-meta .ts { flex: none; color: var(--ink-dim); font-weight: 700; }
.cm-ed { flex: none; color: var(--ink-dim); font-size: 12px; }
.cm-text { margin: 2px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.cm-paw .ki { font-size: 18px; }
.cmts-more { display: grid; justify-items: center; padding-top: 6px; }
.cmts-more:empty { display: none; }
.cbar {
  position: fixed; left: 0; right: 0; z-index: 35;
  bottom: calc(var(--tab-h) + var(--safe-b));
  display: flex; align-items: flex-end; gap: 6px;
  max-width: 640px; margin: 0 auto;
  padding: 8px calc(var(--gutter) + var(--safe-r)) 8px calc(var(--gutter) + var(--safe-l));
  background: var(--bar);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.cbar-in {
  flex: 1; min-height: var(--tap); max-height: 104px; padding: 10px 14px; resize: none;
  border: 0; border-radius: 22px; background: var(--raise-2); box-shadow: var(--inset-well), inset 0 0 0 1px var(--line);
  color: var(--panel-fg); font-size: 16px; line-height: 22px; outline: none;
}
.cbar-in:focus-visible { box-shadow: var(--inset-well), inset 0 0 0 2px var(--lav); }
.cbar-send { color: var(--lav); }
.cbar-send:disabled { color: var(--ink-dim); opacity: .6; }
html.kb-open .tabbar, html.kb-open .fab { visibility: hidden; }
html.kb-open .cbar { bottom: var(--kb, 0px); }      /* kb-open — только при открытой клавиатуре (kb.js) */
.cbar-login {
  position: fixed; left: 50%; z-index: 35; transform: translateX(-50%);
  bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  /* left: 50% даёт кнопке лишь половину ширины — «Войди, чтобы ответить»
     ломалось на две строки; ширина по тексту, но не шире экрана. */
  width: max-content; max-width: calc(100vw - 2 * var(--gutter)); white-space: nowrap;
  box-shadow: var(--e2);
}
/* `.cbar{display:flex}` — автор всегда перебивает UA-стиль [hidden] при равной
   специфичности, так что без этого правила `hidden` не скрыл бы панель,
   пока пост (или вход гостя) ещё не загрузился (I-3). */
.cbar[hidden], .cbar-login[hidden] { display: none; }
.cm-edit { display: grid; gap: 10px; }
.cm-edit-in {
  min-height: 96px; padding: 10px 12px; resize: vertical; border: 0; border-radius: var(--r-3);
  background: var(--raise-2); box-shadow: var(--inset-well), inset 0 0 0 1px var(--line);
  color: var(--panel-fg); font-size: 16px;
}
.ask-login .es { padding: 8px 8px 16px; }

/* == ТЕГ И ПОИСК ========================================================= */
.tag-banner {
  display: grid; gap: 2px; margin: 0 var(--gutter); padding: 12px 14px;
  border-radius: var(--r-5); background: var(--raise); box-shadow: inset 0 0 0 1px var(--line);
}
.tag-banner b { font-size: 18px; font-weight: 900; overflow-wrap: anywhere; }
.tag-banner span { color: var(--ink-dim); font-size: 13px; font-weight: 700; }
.tag-banner.is-trend { background: color-mix(in srgb, var(--lav) 12%, transparent); }
.tb-emo { font-size: 26px; }
.srch { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; min-height: 50dvh; }
.sf {
  position: relative; display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 4px 0 12px;
  border-radius: var(--r-4); background: var(--raise-2); box-shadow: var(--inset-well), inset 0 0 0 1px var(--line);
  transition: box-shadow var(--dur-fast) var(--ease-out);
}
.sf.is-focus { box-shadow: var(--inset-well), inset 0 0 0 2px var(--lav); }
.sf-ic { display: inline-grid; color: var(--ink-dim); }
.sf-input {
  flex: 1; min-width: 0; height: 46px; border: 0; background: transparent;
  color: var(--panel-fg); font-size: 16px; outline: none;
}
.sf-input::-webkit-search-cancel-button { display: none; }
.sf-clear {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap);
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-dim); cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-in), background-color var(--dur-press) linear;
}
.sf.has-text .sf-clear { opacity: 1; pointer-events: auto; transition-timing-function: var(--ease-out); }
.sf-x { position: relative; width: 14px; height: 14px; }
.sf-x::before, .sf-x::after {
  content: ""; position: absolute; left: 6px; top: 0; width: 2px; height: 14px; border-radius: 1px;
  background: currentColor; transform: rotate(45deg);
}
.sf-x::after { transform: rotate(-45deg); }
.sf-clear .kt-spin { display: none; }
.sf.is-busy .sf-clear { opacity: 1; }
.sf.is-busy .sf-clear .sf-x { display: none; }
.sf.is-busy .sf-clear .kt-spin { display: inline-block; }
.srch-res { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.srch-hint { margin: 12px 4px; color: var(--ink-dim); font-size: 14px; font-weight: 700; text-align: center; }
.srch-retry { justify-self: center; }
/* Недавние под пустым полем поиска (searchlogic.js). */
.srch-recent-h {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 2px 4px 0 6px; color: var(--ink-dim); font-size: 13px; font-weight: 800;
}
.srch-recent-x {
  min-height: var(--tap); padding: 0 8px; border: 0; border-radius: var(--r-3);
  background: transparent; color: var(--lav); font: inherit; font-weight: 800; cursor: pointer;
}
.srch-recent-x:active { background: var(--accent-wash-2); }
.sr-row {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 8px;
  border-radius: var(--r-3); color: var(--panel-fg);
  transition: background-color var(--dur-press) linear;
}
.sr-row:active { background: var(--accent-wash-2); }
.sr-ava { flex: none; display: inline-grid; }
.sr-who { display: grid; min-width: 0; }
.sr-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 900; }
.sr-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-dim); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .card.is-new, .act-paw.is-pop .paw-ic, .paw-burst, .rx-pick, .tc-eq i,
  .md:not(.is-loaded):not(.md-video):not(.md-album):not(.is-broken) { animation: none; }
  .cm.is-new { animation: none; }
}

/* == ОТКРЫТКА ============================================================ */
:root { --fab-bottom: 16px; --fab-h: 52px; --fab-gap: 12px; }
.fab {
  position: fixed; z-index: 36; right: calc(16px + var(--safe-r));
  bottom: calc(var(--tab-h) + var(--safe-b) + var(--fab-bottom));
  display: none; align-items: center; gap: 6px; min-height: var(--fab-h); padding: 0 20px 0 16px;
  border: 0; border-radius: 26px; background: var(--accent-grad); color: var(--ink-on-accent);
  box-shadow: var(--e3); font-size: 15px; font-weight: 900; cursor: pointer;
  transition: opacity var(--dur-press) linear, transform var(--dur-base) var(--ease-out);
}
.fab .ki { font-size: 22px; }
.fab:active { opacity: .88; }
html.on-feed .fab { display: inline-flex; animation: fab-in var(--dur-base) var(--ease-out); }
/* FAB плавает поверх ленты — последней карточке нужен запас от её футпринта
   (отступ от панели + своя высота + зазор), иначе ряд реакций прячется под ней. */
html.on-feed .main {
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + var(--fab-bottom) + var(--fab-h) + var(--fab-gap));
}
@keyframes fab-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-bottom: 4px; }
.cmp-pick {
  position: relative; display: grid; place-items: center; gap: 6px; min-height: 160px; padding: 16px;
  overflow: hidden; border-radius: var(--r-4); cursor: pointer;
  background: var(--raise-2); box-shadow: inset 0 0 0 2px var(--line-strong);
  color: var(--ink-mid); font-size: 15px; font-weight: 800;
  transition: background-color var(--dur-press) linear;
}
.cmp-pick:active { background: var(--accent-wash-2); }
.cmp-pick-ic .ki { font-size: 34px; color: var(--lav); }
.cmp-pick.has-photo { min-height: 0; padding: 0; aspect-ratio: 4 / 5; max-height: 46dvh; }
.cmp-prev { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-pick.has-photo .cmp-pick-ic { display: none; }
.cmp-pick.has-photo .cmp-pick-tx {
  position: absolute; left: 50%; bottom: 10px; z-index: 1; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px; background: var(--backdrop); color: var(--ink-on-accent); font-size: 13px;
}
.cmp-cap {
  width: 100%; min-height: 88px; padding: 10px 12px; resize: vertical; border: 0; border-radius: var(--r-3);
  background: var(--raise-2); box-shadow: var(--inset-well), inset 0 0 0 1px var(--line);
  color: var(--panel-fg); font-size: 16px;
}
.cmp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cmp-n { color: var(--ink-dim); font-size: 12px; font-weight: 800; }
.cmp-n.is-over { color: var(--danger-ink); }
.cmp-prog { height: 4px; overflow: hidden; border-radius: 2px; background: var(--line); }
.cmp-prog i {
  display: block; height: 100%; background: var(--lav);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur-base) linear;
}
@media (prefers-reduced-motion: reduce) {
  html.on-feed .fab { animation: none; }
}

/* == УСТАНОВКА =========================================================== */
.inst {
  position: fixed; z-index: 37; left: calc(var(--gutter) + var(--safe-l)); right: calc(var(--gutter) + var(--safe-r));
  bottom: calc(var(--tab-h) + var(--safe-b) + var(--fab-bottom) + var(--fab-h) + var(--fab-gap));   /* над FAB */
  display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 0 auto; padding: 8px 4px 8px 12px;
  border-radius: var(--r-4); background: var(--bg-2); box-shadow: var(--e3), inset 0 0 0 1px var(--line);
  animation: inst-in var(--dur-slow) var(--ease-out);
  transition: opacity var(--dur-fast) var(--ease-in), transform var(--dur-fast) var(--ease-in);
}
.inst.is-leaving { opacity: 0; transform: translateY(8px); }
.inst-pic { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--r-3); background: var(--accent-wash-2); color: var(--lav); }
.inst-pic .ki { font-size: 22px; }
.inst-tx { flex: 1; margin: 0; font-size: 14px; line-height: 1.35; }
.inst-go { flex: none; }
/* Подсказка — только на лентах: на посте она закрывала последний комментарий и его «⋯». */
html:not(.on-feed) .inst { display: none; }
@keyframes inst-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .inst { animation: none; }
}

/* Подпись в ленте (правило 15.10.2026, capfold.js): под кадром, длинная —
 * три строки и «…ещё». Раскрытая — обычный блок в потоке: карточка растёт
 * вниз, кадр и шапка на месте, ничего не перекрывается. */
.pc-cap.cap-fold:not(.is-open) {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden;
}
.pc-cap.cap-fold.is-long, .pc-cap.cap-fold.is-open { cursor: pointer; }
.pc-cap.cap-fold.is-open { display: block; overflow: visible; }
.pc-more {
  display: block; margin: 2px 12px 0; padding: 4px 0; border: 0; background: none;
  color: var(--ink-mid); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
}
.pc-more[hidden] { display: none; }
.pc-more:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; border-radius: 6px; }

/* Ленивый экран в пути (main.js navWait): тонкая бегущая полоска под шапкой —
   тап сработал, экран догружается. */
html.nav-wait .app::after {
  content: ""; position: fixed; z-index: 45; left: 0; right: 0;
  top: calc(var(--hdr-h) + var(--safe-t)); height: 2px;
  background: linear-gradient(90deg, transparent, var(--lav), transparent);
  transform-origin: left; animation: navWait 1.2s var(--ease-out) infinite;
  pointer-events: none;
}
html.in-thread.nav-wait .app::after, html.in-cards.nav-wait .app::after { top: var(--safe-t); }
@keyframes navWait {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  html.nav-wait .app::after { animation: none; opacity: .7; }
}

/* Скелетон первого входа (index.html): место под вкладки ленты — карточка
   встаёт туда же, где появится настоящая, без прыжка. */
.boot-sk { display: none; padding-top: 64px; }
html.boot-feed .boot-sk { display: block; }

/* Шторка с полем ввода над клавиатурой iPhone (sheet.js sheetLift): встаёт
   над ней и умещается в видимой области — «Отправить» не прячется. */
.sheet.is-kb {
  bottom: var(--sh-kb, 0px);
  max-height: calc(var(--sh-vh, 100dvh) - 12px);
  padding-bottom: 12px;
}

/* «Войди»: вторая дверь для гостя без кота (ui/states.js). */
.es-alt {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px;
  color: var(--lav); font-size: 14px; font-weight: 800; text-decoration: none; border-radius: var(--r-3);
}
.es-alt:active { background: var(--accent-wash-2); }
.nf-find { margin-top: -4px; }

/* == ОСМОТР 30.10 (docs/audit-2026-10-30/web.md) ========================= */
/* Карточка без рамки на рамке: разделение фоном и отступом 16 (визуал, п.5). */
:root { --card-bg: var(--bg-2); --cta-gold: linear-gradient(180deg, #ffe7c2, #ffd9a0); --on-gold: #2c2347; }
:root[data-theme="light"] { --card-bg: #fff; }
.card { background: var(--card-bg); box-shadow: none; }
.feed-list, .feed-foot { gap: 16px; }
.sk-cardw { box-shadow: none; background: var(--card-bg); }
/* Плашки над лентой стоят после первой карточки (CLS): там grid-gap ленты
   — свой отступ не нужен. В «Моём коте» шапка держит место заранее. */
.feed-top.is-slot { margin: 0; }
.feed-top.is-mine { min-height: 88px; }
/* Хэштеги тренда уходят за край мягко — видно, что ряд листается (№24). */
.tr-row {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 12px, black calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 12px, black calc(100% - 48px), transparent 100%);
}

/* Гость: что это (№1) и «Нравится? Заведи своего» (№7). Золото — одному CTA. */
.guest-hi {
  position: relative; display: grid; gap: 10px; margin: 4px var(--gutter) 16px; padding: 14px 44px 14px 16px;
  border-radius: var(--r-5); background: var(--card-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warm-ink) 35%, transparent);
}
.gh-t { margin: 0; color: var(--panel-fg); font-size: 15px; font-weight: 700; line-height: 1.45; }
.gh-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.gh-go { background: var(--cta-gold); color: var(--on-gold); box-shadow: none; }
.gh-x { position: absolute; top: 4px; right: 4px; color: var(--ink-dim); font-size: 22px; }
.guest-loop {
  display: grid; gap: 10px; justify-items: start; margin: 0 var(--gutter); padding: 14px 16px;
  border-radius: var(--r-5); background: var(--accent-wash-2);
}
.guest-loop p { margin: 0; color: var(--panel-fg); font-size: 15px; line-height: 1.45; }
.guest-loop[hidden] { display: none; }
.post-cta { margin: 8px var(--gutter) 112px; }
.scr-post .cmts:has(~ .post-cta:not([hidden])) { padding-bottom: 8px; }

/* «Войди, чтобы ответить» — сплошная панель внизу, как поле ответа у
   вошедшего, а не кнопка поверх текста (№10). */
.cbar-guest { justify-content: center; align-items: center; }
.cbar-guest .cbar-login {
  position: static; transform: none; flex: 1; width: auto; max-width: 420px; box-shadow: none;
}

/* Подпись на самой открытке — под кадром остаются только #теги (№9). */
.pc-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; }

/* Поиск: пусто — шаг дальше (№30). */
.srch-none-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.es-split { margin: 0; max-width: 340px; color: var(--ink-mid); font-size: 14px; line-height: 1.5; text-align: left; }

/* Подэкраны на телефоне: одна шапка «‹ Заголовок» вместо двух (56 + 52 px,
   №26) — шапка приложения уезжает, подшапка встаёт к верху. */
@media (max-width: 1023px) {
  html:has(.main > .scr.is-on > .sub-head [data-back]) .hdr { transform: translateY(-100%); visibility: hidden; }
  html:has(.main > .scr.is-on > .sub-head [data-back]) .main { padding-top: var(--safe-t); }
  html:has(.main > .scr.is-on > .sub-head [data-back]) .scr.is-on > .sub-head { top: var(--safe-t); }
}
.hdr { transition: transform var(--dur-base) var(--ease-out); }

/* Широкий экран (≥1024, №14): навигация слева, колонка 600, справа — Топ
   (≥1240). --tab-h: 0 — нижней панели нет, всё, что от неё отступало
   (поле ответа, кнопка «+», запас ленты), встаёт к низу окна. */
@media (min-width: 1024px) {
  :root { --tab-h: 0px; --col-x: max(260px, calc(50% - 300px + 122px)); }
  .main { max-width: 600px; margin: 0 0 0 var(--col-x); }
  .scr.is-out { left: var(--col-x); right: auto; width: 600px; max-width: 600px; margin: 0; }
  .cbar { left: var(--col-x); right: auto; width: 600px; max-width: 600px; margin: 0; }
  .ptr { left: calc(var(--col-x) + 300px); }
  .fab { right: auto; left: calc(var(--col-x) + 600px + 24px); bottom: 24px; }
  .tabbar {
    top: calc(var(--hdr-h) + var(--safe-t)); bottom: auto; right: auto; left: calc(var(--col-x) - 244px);
    width: 220px; height: auto; padding: 16px 0; grid-auto-flow: row; grid-auto-columns: auto; grid-auto-rows: 52px;
    gap: 4px; align-content: start; background: transparent; border-top: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .tab {
    flex-direction: row; justify-content: flex-start; gap: 14px; min-height: 52px; padding: 0 16px;
    border-radius: 999px; font-size: 16px; font-weight: 800;
  }
  .tab.on { background: var(--accent-wash-3); }
  .tab:hover { background: var(--accent-wash-2); }
  .tab.on:hover { background: var(--accent-wash-3); }
  .tab .tab-bdg { left: calc(100% - 6px); }
}
@media (min-width: 1240px) {
  :root { --col-x: calc(50% - 584px + 244px); }
}
.side-top { display: none; }
@media (min-width: 1240px) {
  .side-top {
    position: fixed; z-index: 30; top: calc(var(--hdr-h) + var(--safe-t) + 16px);
    left: calc(var(--col-x) + 600px + 24px); width: 300px; display: grid; gap: 4px; padding: 12px;
    border-radius: var(--r-5); background: var(--card-bg);
  }
  html.in-thread .side-top, html.in-cards .side-top { display: none; }
}
.st-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 6px; }
.st-h b { font-size: 17px; font-weight: 900; }
.st-h a { font-size: 14px; font-weight: 800; }
.st-row {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 8px; border-radius: var(--r-3);
  color: var(--panel-fg);
}
.st-row:hover { background: var(--accent-wash-2); }
.st-n { flex: none; width: 18px; color: var(--ink-dim); font-size: 14px; font-weight: 900; text-align: center; }
.st-ava { flex: none; display: inline-grid; }
.st-who { display: grid; min-width: 0; }
.st-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 900; }
.st-who small { color: var(--ink-dim); font-size: 13px; font-weight: 700; }
.st-cta { display: grid; gap: 8px; margin-top: 8px; padding: 12px; border-radius: var(--r-4); background: var(--accent-wash-2); }
.st-cta p { margin: 0; font-size: 14px; line-height: 1.45; }

/* == ЗНАКОМСТВА (19.11.2026) ============================================= */
/* Токены раздела и то, что стоит на первом экране: сердце в шапке, плашка
   над лентой, строка Ошейника. Сами экраны — dates.css (грузится лениво). */
:root {
  --dt-hot: #ff7d9c;
  --dt-violet: #b58cff;
  --dt-grad: linear-gradient(135deg, #ff6f93 0%, #d977e6 55%, #9c7bff 100%);
  --dt-grad-soft: linear-gradient(160deg, rgba(255, 125, 156, .22), rgba(156, 123, 255, .16) 60%, rgba(156, 123, 255, .04));
  --dt-stage: radial-gradient(120% 90% at 50% 8%, rgba(255, 125, 156, .34), rgba(181, 140, 255, .2) 45%, rgba(28, 23, 48, 0) 78%), #1c1730;
  --dt-ink-hot: #ffb3c5;
  --dt-on: #fff;
  --dt-on-cut: rgba(255, 255, 255, .55);
  --dt-edge: rgba(255, 125, 156, .34);
  --dt-shadow: 0 6px 16px rgba(255, 111, 147, .4);
  --dt-ping: rgba(255, 125, 156, .6);
  --dt-ping-0: rgba(255, 125, 156, 0);
}
:root[data-theme="light"] {
  --dt-hot: #e0356a;
  --dt-violet: #7a58d8;
  --dt-grad: linear-gradient(135deg, #e8457a 0%, #c04fd0 55%, #7a58d8 100%);
  --dt-grad-soft: linear-gradient(160deg, rgba(232, 69, 122, .13), rgba(122, 88, 216, .1) 60%, rgba(122, 88, 216, .02));
  --dt-stage: radial-gradient(120% 90% at 50% 8%, rgba(232, 69, 122, .2), rgba(122, 88, 216, .14) 45%, rgba(246, 241, 233, 0) 78%), #f6f1e9;
  --dt-ink-hot: #b81f52;
  --dt-edge: rgba(224, 53, 106, .3);
  --dt-shadow: 0 6px 16px rgba(224, 53, 106, .28);
  --dt-ping: rgba(224, 53, 106, .5);
  --dt-ping-0: rgba(224, 53, 106, 0);
}
/* Сердце в шапке: розовое, с бейджем как у колокола и точкой «новое». */
.hbtn.hdate { position: relative; color: var(--dt-hot); }
.hbtn.hdate.on { background: var(--dt-grad-soft); }
.hdate .tab-bdg { top: 4px; left: auto; right: 2px; background: var(--dt-grad); }
.hdate-dot {
  position: absolute; top: 8px; right: 7px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--dt-hot); box-shadow: 0 0 0 2px var(--bg);
  animation: hdate-ping 1.2s ease-out infinite;
}
@keyframes hdate-ping {
  0% { box-shadow: 0 0 0 2px var(--bg), 0 0 0 0 var(--dt-ping); }
  100% { box-shadow: 0 0 0 2px var(--bg), 0 0 0 9px var(--dt-ping-0); }
}
/* Плашка над лентой: анонс раздела и «тебя ждут N». */
.dt-plate {
  position: relative; display: flex; align-items: center; gap: 12px; overflow: hidden;
  margin: 0 12px 12px; padding: 14px 14px 14px 12px; border-radius: var(--r-5);
  background: var(--dt-grad-soft), var(--bg-2); color: var(--panel-fg);
  box-shadow: inset 0 0 0 1px var(--dt-edge), var(--e2);
}
.dt-plate:active { opacity: .9; }
.dt-plate-ic {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--dt-grad); color: var(--dt-on); font-size: 24px; box-shadow: var(--dt-shadow);
}
.dt-plate-ic .ki, .osh-date-ic .ki { --ic-warm: var(--dt-on); --ic-cut: var(--dt-on-cut); }
.dt-plate.is-promo .dt-plate-ic { animation: dt-plate-beat 1.2s ease-in-out infinite; }
.dt-plate-tx { display: grid; flex: 1; min-width: 0; gap: 1px; }
.dt-plate-tx b { font-size: 16px; font-weight: 900; line-height: 1.2; }
.dt-plate-tx small { color: var(--ink-mid); font-size: 13px; font-weight: 600; line-height: 1.35; }
.dt-plate-new {
  justify-self: start; margin-bottom: 3px; padding: 1px 8px; border-radius: 999px;
  background: var(--dt-grad); color: var(--dt-on); font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase;
}
.dt-plate-go {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px;
  background: var(--dt-grad); color: var(--dt-on); font-size: 14px; font-weight: 900;
}
.dt-plate.is-promo { padding-right: 40px; }
.dt-plate.is-promo .dt-plate-go { display: none; }
.dt-plate-x {
  position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-dim); font-size: 16px; cursor: pointer;
}
.dt-plate-x:active { background: var(--accent-wash-2); }
.dt-plate-hearts { position: absolute; inset: 0; pointer-events: none; }
.dt-plate-hearts i {
  position: absolute; bottom: -14px; width: 12px; height: 12px; background: var(--dt-hot); opacity: 0;
  clip-path: path("M6 11C2 8 0 5.8 0 3.6 0 1.7 1.4.4 3.1.4 4.2.4 5.3 1.1 6 2 6.7 1.1 7.8.4 8.9.4 10.6.4 12 1.7 12 3.6 12 5.8 10 8 6 11z");
  animation: dt-plate-up 3s ease-in infinite;
}
.dt-plate-hearts i:nth-child(1) { right: 64px; }
.dt-plate-hearts i:nth-child(2) { right: 30px; animation-delay: 1s; }
.dt-plate-hearts i:nth-child(3) { right: 96px; animation-delay: calc(1s + 1s); }
@keyframes dt-plate-beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.12); } 28% { transform: scale(.98); } 42% { transform: scale(1.07); } 60% { transform: scale(1); } }
@keyframes dt-plate-up { 0% { opacity: 0; transform: translateY(0) scale(.7); } 15% { opacity: .7; } 100% { opacity: 0; transform: translateY(-96px) scale(1.1) rotate(16deg); } }
/* Строка-дверь в Ошейнике. */
.osh-date {
  display: flex; align-items: center; gap: 12px; min-height: 68px; margin: 0 0 12px; padding: 10px 14px;
  border-radius: var(--r-5); background: var(--dt-grad-soft), var(--bg-2); color: var(--panel-fg);
  box-shadow: inset 0 0 0 1px var(--dt-edge);
}
.osh-date:active { opacity: .9; }
.osh-date-ic {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--dt-grad); color: var(--dt-on); font-size: 22px;
}
.osh-date-tx { display: grid; flex: 1; min-width: 0; }
.osh-date-tx b { font-size: 16px; font-weight: 900; }
.osh-date-tx small { color: var(--ink-mid); font-size: 13px; font-weight: 700; }
.osh-date-go { flex: none; padding: 5px 12px; border-radius: 999px; background: var(--dt-grad); color: var(--dt-on); font-size: 13px; font-weight: 900; }
.osh-date .osh-chev { display: none; }
/* «Поговорить с котом» (23.11) — ночная дверь кот-свата: крыша и тёплый
   свет. Ночь — в обеих темах, поэтому токены одни (как у matchmaker.css). */
:root {
  --talk-ink: #f4efff; --talk-mute: #bfb3e6; --talk-night: #21183f; --talk-moon: #fff1cf;
  --talk-amber: #ffc46b; --talk-amber-hi: #ffd88f; --talk-on: #2b1600;
  --talk-edge: rgba(255, 196, 107, 0.3); --talk-glow: rgba(255, 196, 107, 0.16);
  --talk-cut: rgba(255, 241, 207, 0.6);
  --talk-shade: rgba(21, 15, 41, 0.94); --talk-shade-2: rgba(21, 15, 41, 0.55);
}
.osh-talk {
  color: var(--talk-ink); box-shadow: inset 0 0 0 1px var(--talk-edge);
  background: linear-gradient(100deg, var(--talk-shade) 35%, var(--talk-shade-2)),
    url("/assets/matchmaker/rooftop_bg_sm.webp") right 30% / cover, var(--talk-night);
}
.osh-talk .osh-date-ic { background: var(--talk-glow); color: var(--talk-moon); }
.osh-talk .osh-date-ic .ki { --ic-warm: var(--talk-amber); --ic-cut: var(--talk-cut); }
.osh-talk .osh-date-tx small { color: var(--talk-mute); }
.osh-talk .osh-date-go { color: var(--talk-on); background: linear-gradient(180deg, var(--talk-amber-hi), var(--talk-amber)); }
@media (prefers-reduced-motion: reduce) {
  .hdate-dot, .dt-plate-ic, .dt-plate-hearts i, .ki .ic-hb, .ki .ic-hsp { animation: none !important; }
  .dt-plate-hearts { display: none; }
}
