/* Лента залётов (feed.html). Токены те же, что в dashboard.html (Dark OLED, Fira Sans).
   Форма: чипы и вкладки — pill, кнопки — 12px, карточки — 16px. Акцент один: оранжевый (во сколько раз выше обычного). */
:root {
  --bg: #09090B;
  --s1: #111115;
  --s2: #18181D;
  --s3: #222228;
  --accent: #F97316;
  --accent-soft: rgba(249,115,22,0.12);
  --t1: #F4F4F5;
  --t2: #A1A1AA;
  --t3: #71717A;
  --b1: rgba(255,255,255,0.06);
  --b2: rgba(255,255,255,0.11);
  --sans: 'Fira Sans', -apple-system, system-ui, sans-serif;
  --r-card: 16px;
  --r-btn: 12px;
  --gutter: 16px;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--t1); font: 400 15px/1.5 var(--sans);
  min-height: 100dvh; padding-bottom: calc(72px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }

/* ── Шапка ── */
.top {
  position: sticky; top: 0; z-index: 20;
  padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 8px;
  background: var(--bg);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1200px; margin: 0 auto; }
.brand { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.status { margin-left: auto; text-align: right; font-size: 12px; color: var(--t2); line-height: 1.45; }
.status span.l { display: block; }
.status .live { color: var(--t1); }
.nav-top { display: none; gap: 4px; margin-left: 24px; }
.nav-top a { padding: 8px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--t2); transition: background .2s ease-out, color .2s ease-out; }
.nav-top a:hover { color: var(--t1); background: var(--s2); }
.nav-top a.on { color: var(--t1); background: var(--s3); }

/* ── Фильтры: одна строка с прокруткой ── */
.filters {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter) 6px;
  max-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filters:empty { display: none; }
.chip {
  flex-shrink: 0; min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--s2); color: var(--t2); font-size: 14px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--b1); transition: background .15s ease-out, color .15s ease-out;
  position: relative;
}
.chip::after { content: ''; position: absolute; inset: -4px 0; } /* цель касания ≥ 44px */
.chip:hover { color: var(--t1); }
.chip[aria-pressed="true"] { background: var(--t1); color: var(--bg); border-color: var(--t1); }
.chip:active { transform: scale(0.97); }
.chip-sep { flex-shrink: 0; width: 1px; margin: 6px 4px; background: var(--b2); }
.chip-account { background: var(--accent-soft); color: var(--t1); border-color: rgba(249,115,22,0.35); display: inline-flex; align-items: center; gap: 6px; }

/* ── Страница ── */
.page { max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 8px var(--gutter) 32px; outline: none; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.page-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.page-sub { font-size: 13px; color: var(--t2); white-space: nowrap; }
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ── Карточка ролика ── */
.card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.thumb { position: relative; aspect-ratio: 4 / 5; max-height: 460px; width: 100%; background: var(--s2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; }
.thumb.empty-thumb { aspect-ratio: auto; height: 120px; }
.thumb.empty-thumb .thumb-ph span { font-size: 56px; }
.thumb-ph span { font-size: 96px; font-weight: 700; color: rgba(255,255,255,0.88); line-height: 1; letter-spacing: -0.04em; text-transform: uppercase; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ava { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 15px; color: #fff; text-transform: uppercase; }
.who-text { min-width: 0; }
.who-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.who-meta { font-size: 13px; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.views { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px; }
.views-n { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.views-l { font-size: 15px; color: var(--t2); }
.boost { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.hook { font-size: 16px; line-height: 1.45; color: var(--t1); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hook-label { display: block; font-size: 13px; color: var(--t3); margin-bottom: 2px; }
.hook.caption { color: var(--t2); font-size: 15px; -webkit-line-clamp: 3; }
.small { font-size: 13px; color: var(--t2); }
.card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 48px; border-radius: var(--r-btn); font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: background .15s ease-out, transform .1s ease-out;
}
.btn:active { transform: scale(0.98); }
.btn-main { background: var(--s3); color: var(--t1); }
.btn-main:hover { background: #2A2A31; }
.btn-ghost { min-height: 44px; color: var(--t2); font-weight: 500; }
.btn-ghost:hover { color: var(--t1); }
.btn-solid { background: var(--t1); color: var(--bg); }
.fulltext { border-top: 1px solid var(--b1); padding-top: 12px; display: flex; flex-direction: column; gap: 16px; }
.fulltext h4 { font-size: 13px; font-weight: 500; color: var(--t3); margin-bottom: 4px; }
.fulltext p { font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.fulltext .muted p { color: var(--t2); }
.more-wrap { display: flex; justify-content: center; margin-top: 24px; }
.more-wrap .btn { width: auto; padding: 0 32px; }

/* ── Аккаунты ── */
.group { margin-bottom: 32px; }
.group-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.group-title span { font-size: 13px; font-weight: 400; color: var(--t2); }
.acc-list { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r-card); overflow: hidden; }
.acc { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 64px; padding: 12px 16px; transition: background .15s ease-out; }
.acc + .acc { border-top: 1px solid var(--b1); }
.acc:hover { background: var(--s2); }
.acc:active { background: var(--s3); }
.acc-main { flex: 1; min-width: 0; }
.acc-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.acc-line { font-size: 13px; color: var(--t2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-line.soft { color: var(--t3); }
.acc-right { text-align: right; flex-shrink: 0; }
.acc-best { font-weight: 600; display: block; }
.acc-chev { color: var(--t3); font-size: 18px; flex-shrink: 0; }
.acc.dim .acc-name { color: var(--t2); }

/* ── Пустые состояния и сводка ── */
.empty { text-align: center; padding: 64px 24px; max-width: 420px; margin: 0 auto; }
.empty i { font-size: 40px; color: var(--t3); }
.empty h2 { font-size: 18px; font-weight: 600; margin: 12px 0 6px; }
.empty p { color: var(--t2); margin-bottom: 20px; }
.empty .btn { width: auto; display: inline-flex; padding: 0 24px; }
.prose { max-width: 680px; }
.prose h2 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
.prose h3 { font-size: 16px; font-weight: 600; margin: 16px 0 6px; }
.prose p, .prose li { color: var(--t1); line-height: 1.6; margin-bottom: 8px; }
.prose ul { padding-left: 20px; }
.prose a { color: var(--accent); }
.sect { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r-card); padding: 16px; margin-bottom: 16px; }
.links { display: flex; flex-direction: column; }
.link-row { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 16px; }
.link-row + .link-row { border-top: 1px solid var(--b1); }
.link-row i.lead { font-size: 22px; color: var(--t2); }
.link-row div { flex: 1; }
.link-row b { font-weight: 600; display: block; }

/* ── Скелетоны ── */
.sk { display: inline-block; background: var(--s2); border-radius: 6px; }
.sk-line { height: 12px; vertical-align: middle; }
.card.sk-card .thumb { background: var(--s2); }
.sk-block { display: block; background: var(--s2); border-radius: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .sk, .sk-block, .card.sk-card .thumb { animation: pulse 1.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .55; } }
}

/* ── Нижняя панель (телефон) ── */
.nav-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  padding: 0 8px env(safe-area-inset-bottom); background: rgba(17,17,21,0.94);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: 1px solid var(--b2);
}
.nav-bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; font-size: 11px; font-weight: 500; color: var(--t3); }
.nav-bottom a i { font-size: 24px; }
.nav-bottom a.on { color: var(--t1); }
.nav-bottom a.on i { color: var(--accent); }

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .thumb { max-height: 360px; }
  :root { --gutter: 24px; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .nav-bottom { display: none; }
  .nav-top { display: flex; }
  .top { padding-top: 16px; }
  .filters { max-width: 1200px; margin: 0 auto; padding-left: 0; padding-right: 0; flex-wrap: wrap; overflow: visible; }
  .page-title { font-size: 24px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .accounts-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
}
