/* =========================================================
   catalog-telega — публичная часть (дизайн v2)
   Идея: каталог выглядит как Telegram — списки каналов как
   список чатов, категории как сообщения, закрепы как истории.
   Акцент, тема, шрифт заголовков и скругления меняются в
   админке (Внешний вид) через CSS-переменные в <head>.
   ========================================================= */

@font-face { font-family: "Fira Sans"; src: url(/assets/fonts/fira-400.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url(/assets/fonts/fira-500.woff) format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url(/assets/fonts/fira-600.woff) format("woff"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url(/assets/fonts/fira-800.woff) format("woff"); font-weight: 800 900; font-display: swap; }
@font-face { font-family: "Bitter"; src: url(/assets/fonts/bitter-var.woff) format("woff"); font-weight: 100 900; font-display: swap; }

:root {
  --accent: #3E5BF2; --on-accent: #FFFFFF; --link: #2F47C9;
  --accent-soft: rgba(62,91,242,.10); --accent-line: rgba(62,91,242,.45);
  --bg: #EEF1F7; --surface: #FFFFFF; --surface2: #F5F7FB; --sunk: #E6EAF2;
  --line: #E1E6EF; --line2: #CCD3E1;
  --ink: #172033; --ink2: #3A4560; --muted: #69738C;
  --pin: #FFB23F; --pin-soft: rgba(255,178,63,.16); --pin-ink: #7A4B00;
  --teal: #12A594; --violet: #7A4CF0;
  --red: #E5484D; --ok: #18A058;
  --bubble-l: 95%; --bubble-s: 80%; --bubble-hover: 91%;
  --shadow: 0 1px 2px rgba(23,32,51,.05), 0 12px 32px -16px rgba(23,32,51,.22);
  --f-display: "Fira Sans", system-ui, sans-serif; --fw-display: 800;
  --f-body: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px; --gut: 16px; --tabbar: 62px; --wrap: 1240px; --top: 64px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0E1424; --surface: #161E33; --surface2: #1B2540; --sunk: #111930;
  --line: #24304B; --line2: #33405F;
  --ink: #E9EDF7; --ink2: #C3CBDD; --muted: #8E98B2;
  --pin-soft: rgba(255,178,63,.14); --pin-ink: #FFC870;
  --red: #FF6B70; --ok: #3DD68C;
  --bubble-l: 21%; --bubble-s: 34%; --bubble-hover: 25%;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 36px -18px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--f-body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden; font-feature-settings: "kern", "liga";
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
.ic { flex: none; display: block; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; z-index: 200; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
@media (min-width: 700px) { :root { --gut: 24px; } }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
@media (max-width: 559px) { .hide-sm { display: none; } }
[hidden] { display: none !important; }

.display { font-family: var(--f-display); font-weight: var(--fw-display); letter-spacing: -.025em; line-height: 1.04; }
.h2 { font-family: var(--f-display); font-weight: var(--fw-display); font-size: clamp(24px, 3vw, 30px); letter-spacing: -.02em; }
.h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.page-h1 { font-size: clamp(30px, 4.6vw, 46px); margin: 6px 0 10px; }
.lead { font-size: 18px; color: var(--ink2); max-width: 62ch; margin-bottom: 20px; }
.eyebrow { font-size: 14px; color: var(--muted); margin-bottom: 4px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.1; cursor: pointer; text-decoration: none !important;
  transition: background-color .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn-lime { background: var(--accent); color: var(--on-accent); }
.btn-lime:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line2); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--link); }
.btn-ink { background: var(--surface); color: var(--ink); }
.btn-ink:hover { background: var(--surface2); }
.btn-outline-ink { background: transparent; color: inherit; border-color: currentColor; }
.btn-outline-ink:hover { background: rgba(255,255,255,.12); }
.btn-danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--red) 10%, transparent); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: wait; }
.link-arrow { font-weight: 600; font-size: 15px; white-space: nowrap; }

/* ---------- Шапка ---------- */
.announce { background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 500; }
.announce-in { padding-top: 8px; padding-bottom: 8px; text-align: center; }
.announce a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; height: var(--top); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; flex: none; }
.logo-mark { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.logo-mark .ic { transform: translate(-1px, 1px); }
.logo-word { font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.logo-word b { color: var(--link); font-weight: inherit; }
.top-search { display: none; position: relative; flex: 1; max-width: 420px; margin-left: 10px; }
.top-search input { width: 100%; height: 42px; border-radius: 999px; border: 1px solid transparent; background: var(--sunk); padding: 0 16px 0 42px; font-size: 15px; outline: none; transition: border-color .15s, background-color .15s; }
.top-search input:focus { background: var(--surface); border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.top-search input::placeholder { color: var(--muted); }
.top-search-ic { position: absolute; left: 15px; top: 12px; color: var(--muted); pointer-events: none; }
.top-nav { display: none; align-items: center; gap: 2px; margin-left: auto; }
.top-nav a:not(.btn) { color: var(--ink2); font-weight: 500; font-size: 15px; padding: 8px 11px; border-radius: 999px; text-decoration: none; }
.top-nav a:not(.btn):hover { background: var(--sunk); color: var(--ink); }
.top-nav a[aria-current="page"] { color: var(--link); background: var(--accent-soft); }
.top-nav .nav-accent { color: var(--link) !important; }
.top-nav .nav-add { margin-left: 8px; }
.icon-link { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); margin-left: auto; flex: none; }
.icon-link:hover { background: var(--sunk); color: var(--link); }
.burger { width: 42px; height: 42px; border: 0; background: transparent; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: pointer; flex: none; }
.burger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 959px) {
  .top-nav.open { display: flex; position: absolute; top: var(--top); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px var(--gut) 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .top-nav.open a:not(.btn) { padding: 12px 14px; font-size: 16px; border-radius: 12px; }
  .top-nav.open .nav-add { margin: 8px 0 0; }
}
@media (min-width: 960px) {
  .top-search, .top-nav { display: flex; }
  .icon-link { margin-left: 0; }
  .burger { display: none; }
}
@media (min-width: 960px) and (max-width: 1139px) { .top-nav a[href="/promo"] { display: none; } .top-search { max-width: 260px; } }

/* ---------- Флеши, хлебные крошки ---------- */
.flash { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--r); font-size: 15px; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent-line); }
.flash-ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.flash-error { background: color-mix(in srgb, var(--red) 10%, transparent); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); margin: 22px 0 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--link); }
.crumbs [aria-current] { color: var(--ink2); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Главная: первый экран ---------- */
.hero { padding: 36px 0 28px; }
@media (min-width: 960px) { .hero { padding: 64px 0 44px; } }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; } .hero-grid.no-day { grid-template-columns: minmax(0, 860px); } }
.hero-h1 { font-size: clamp(38px, 6.4vw, 72px); max-width: 13ch; text-wrap: balance; }
.hero-lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink2); max-width: 54ch; margin-top: 18px; }
.hero-search { position: relative; margin-top: 28px; max-width: 640px; }
.hero-search input {
  width: 100%; height: 62px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  padding: 0 72px 0 24px; font-size: 17px; outline: none; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.hero-search input:focus { border-color: var(--accent-line); box-shadow: var(--shadow), 0 0 0 4px var(--accent-soft); }
.hero-search input::placeholder { color: var(--muted); }
.hero-send { position: absolute; right: 7px; top: 7px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; transition: transform .15s; }
.hero-send .ic { transform: translate(-1px, 1px); }
.hero-send:hover { transform: scale(1.05); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.qbtn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink2); font-weight: 500; font-size: 15px; text-decoration: none !important; }
.qbtn .ic { color: var(--link); }
.qbtn:hover { border-color: var(--accent-line); color: var(--ink); }
.qbtn-main { background: var(--pin-soft); border-color: transparent; color: var(--pin-ink); }
.qbtn-main .ic { color: var(--pin-ink); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 30px 0 0; }
.hero-stats div { display: flex; align-items: baseline; gap: 8px; }
.hero-stats dd { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.hero-stats dt { color: var(--muted); font-size: 15px; }

/* Канал дня — окно чата */
.day { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 10px); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; border-top: 4px solid var(--pin); }
.day-top { display: flex; gap: 14px; align-items: center; }
.day-ava { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: linear-gradient(145deg, hsl(var(--h, 220) 75% 64%), hsl(calc(var(--h, 220) + 25) 70% 50%)); color: #fff; font-weight: 700; font-size: 26px; }
.day-ava img { width: 100%; height: 100%; object-fit: cover; }
.day-head { min-width: 0; }
.day-label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--pin-ink); }
.day-label .ic { fill: var(--pin); stroke: var(--pin); }
.day-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.day-title a { color: var(--ink); }
.day-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.day-bubble { position: relative; background: var(--surface2); border-radius: 18px 18px 18px 6px; padding: 14px 16px; margin-left: 10px; }
.day-bubble::before { content: ""; position: absolute; left: -9px; bottom: 0; width: 14px; height: 14px; background: var(--surface2); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.day-desc { font-size: 15px; color: var(--ink2); }

/* Бегущая строка */
.ticker { border-block: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.ticker-in { display: flex; width: max-content; animation: tick 50s linear infinite; }
.ticker:hover .ticker-in { animation-play-state: paused; }
.ticker-set { display: flex; align-items: center; gap: 16px; padding: 11px 8px; white-space: nowrap; }
.ticker-set a { color: var(--ink2); font-size: 14.5px; font-weight: 500; }
.ticker-set a:hover { color: var(--link); }
.ticker-set i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .55; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-in { animation: none; } .ticker { overflow-x: auto; } html { scroll-behavior: auto; } }

/* ---------- Блоки ---------- */
.block { margin-top: 48px; }
@media (min-width: 960px) { .block { margin-top: 64px; } }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.block-note { color: var(--muted); font-size: 15px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); overflow: hidden; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px 8px; }

/* Закреплено — истории */
.vcards { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px; margin: 0 calc(var(--gut) * -1); padding-inline: var(--gut); scrollbar-width: none; }
.vcards::-webkit-scrollbar { display: none; }
.vcard { flex: 0 0 112px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; color: var(--ink); text-decoration: none !important; padding: 6px 4px; border-radius: 16px; }
.vcard:hover { background: var(--surface); }
.vcard-img { position: relative; width: 88px; height: 88px; border-radius: 50%; padding: 3px; background: var(--line2); flex: none; }
.vcard-pin .vcard-img { background: conic-gradient(from 210deg, var(--accent), var(--teal), var(--pin), var(--accent)); }
.vcard-img > img, .vcard-img > .vcard-ini { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg); }
.vcard-ini { display: grid; place-items: center; background: linear-gradient(145deg, hsl(var(--h, 220) 75% 64%), hsl(calc(var(--h, 220) + 25) 70% 50%)); color: #fff; font-size: 30px; font-weight: 700; }
.vcard-badges { position: absolute; right: -4px; bottom: 0; display: flex; }
.vcard-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; width: 100%; }
.vcard-title { font-size: 14px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard-sub { display: none; }
.vcard-foot { font-size: 12.5px; color: var(--muted); }
.vcard-foot > span { display: none; }
.vcard-foot b { font-weight: 500; }
.vcard-hl .vcard-title { color: var(--link); }
.vcard-cta .vcard-img { background: none; border: 2px dashed var(--line2); padding: 0; display: grid; place-items: center; color: var(--link); }
.vcard-cta:hover .vcard-img { border-color: var(--accent); }
.vcard-plus { display: grid; place-items: center; }
.vcard-cta .vcard-foot b { color: var(--pin-ink); font-weight: 600; }

/* Категории — сообщения */
.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px 12px; }
@media (min-width: 700px) { .cats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 14px; } }
.cat {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 64px;
  padding: 12px 14px 10px 16px; margin-left: 8px; border-radius: 18px 18px 18px 6px;
  background: hsl(var(--h) var(--bubble-s) var(--bubble-l)); color: var(--ink); text-decoration: none !important; transition: background-color .15s;
}
.cat::before { content: ""; position: absolute; left: -8px; bottom: 0; width: 14px; height: 14px; background: inherit; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.cat:hover { background: hsl(var(--h) var(--bubble-s) var(--bubble-hover)); }
.cat-name { font-weight: 600; font-size: 15.5px; line-height: 1.3; align-self: flex-start; }
.cat-cnt { font-size: 12.5px; color: var(--muted); white-space: nowrap; flex: none; }
.cat-adult { --h: 355 !important; }
.btn-more { margin-top: 16px; }
.btn-more .ic { transition: transform .2s; }
.btn-more[aria-expanded="true"] .ic { transform: rotate(180deg); }
.cats.collapsed .cat-extra { display: none; }
@media (min-width: 960px) { .cats.collapsed .cat-extra { display: block; } .btn-more { display: none !important; } }

/* Новые / популярные */
.cols2 { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1000px) { .cols2 { grid-template-columns: 1fr 1fr; gap: 24px; } .cols2.cols1 { grid-template-columns: 1fr; } }

/* ---------- Строка канала (как в списке чатов) ---------- */
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); overflow: hidden; }
.panel .rows { background: none; border: 0; border-radius: 0; }
.row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px 12px 16px; transition: background-color .12s; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 86px; right: 0; height: 1px; background: var(--line); }
.row:hover { background: var(--surface2); }
.row-ava { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, hsl(var(--h, 220) 75% 64%), hsl(calc(var(--h, 220) + 25) 70% 50%)); color: #fff; font-weight: 700; font-size: 22px; }
.row-ava img { width: 100%; height: 100%; object-fit: cover; }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.row-title { font-size: 16px; font-weight: 600; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.005em; }
.row-title a { color: var(--ink); text-decoration: none !important; }
.row-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.row-pin { color: var(--pin); flex: none; display: inline-flex; }
.row-pin .ic { fill: currentColor; }
.row-subs { margin-left: auto; flex: none; display: inline-flex; align-items: baseline; gap: 4px; font-size: 12.5px; color: var(--muted); padding-left: 8px; }
.row-subs b { font-size: 14px; font-weight: 600; color: var(--ink2); }
.row-desc { font-size: 14.5px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.row-handle { color: var(--link); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-cat::before { content: "#"; opacity: .6; margin-right: 1px; }
.row-go { position: relative; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--link); transition: background-color .15s, color .15s; }
.row-go .ic { transform: translate(-1px, 1px); }
.row-go:hover { background: var(--accent); color: var(--on-accent); }
.row-hl { background: var(--pin-soft); }
.row-hl:hover { background: color-mix(in srgb, var(--pin) 22%, var(--surface)); }
@media (max-width: 559px) {
  .row { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
  .row + .row::before { left: 74px; }
  .row-ava { width: 48px; height: 48px; font-size: 19px; }
  .row-go { display: none; }
}

/* Метки */
.tag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap; background: var(--accent-soft); color: var(--link); }
.tag-chat { background: color-mix(in srgb, var(--teal) 14%, transparent); color: color-mix(in srgb, var(--teal) 80%, var(--ink)); }
.tag-bot { background: color-mix(in srgb, var(--violet) 14%, transparent); color: color-mix(in srgb, var(--violet) 80%, var(--ink)); }
.tag-adult { background: var(--red); color: #fff; }
.tag-promo { background: var(--pin-soft); color: var(--pin-ink); }

/* 18+ */
.is-adult img { filter: blur(12px) saturate(.6); transform: scale(1.2); }
.age-ok .is-adult img { filter: none; transform: none; }

/* ---------- Чипсы, вкладки ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips-wrap { flex-wrap: wrap; overflow: visible; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink2); font-size: 14.5px; font-weight: 500; white-space: nowrap; text-decoration: none !important; }
.chip:hover { border-color: var(--accent-line); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip-n { color: var(--muted); font-size: 13px; }
.chip.on .chip-n { color: inherit; opacity: .7; }
.tabs-line { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs-line::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 10px 0 12px; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--link); }
.tab.on::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }

/* ---------- Списки разделов ---------- */
.list-layout { display: grid; gap: 28px; align-items: start; padding-bottom: 20px; }
@media (min-width: 1000px) { .list-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 36px; } }
.list-layout > *, .ch > *, .cols2 > *, .cf > * { min-width: 0; }
.list-main { min-width: 0; }
.list-head { margin-bottom: 20px; }
.list-h1 { font-size: clamp(30px, 4.2vw, 46px); text-wrap: balance; }
.list-intro { margin-top: 12px; color: var(--ink2); font-size: 16.5px; max-width: 70ch; }
.list-intro p + p { margin-top: 8px; }
.list-lead { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.list-lead b { color: var(--ink); font-weight: 600; }
.list-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.list-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.list-facts dt { font-size: 12.5px; color: var(--muted); }
.list-facts dd { margin: 0; font-weight: 700; font-size: 17px; }
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
@media (min-width: 760px) { .filters { flex-direction: row; align-items: flex-end; justify-content: space-between; } .filters .tabs-line { flex: 1; } .filters .chips { padding-bottom: 6px; } }
.list-side { order: 2; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1000px) { .list-side { order: 0; position: sticky; top: calc(var(--top) + 20px); max-height: calc(100vh - var(--top) - 40px); margin-top: 6px; } }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); padding: 14px 8px 8px; display: flex; flex-direction: column; min-height: 0; }
.side-t { font-size: 15px; font-weight: 700; padding: 0 10px 8px; }
.side-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; scrollbar-width: thin; }
.side-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--ink2); font-size: 14.5px; text-decoration: none !important; }
.side-list a:hover { background: var(--surface2); color: var(--ink); }
.side-list a[aria-current] { background: var(--accent-soft); color: var(--link); font-weight: 600; }
.side-list em { font-style: normal; font-size: 12.5px; color: var(--muted); }
@media (max-width: 999px) {
  .side-list { display: flex; gap: 6px; padding: 0 4px 8px; overflow-x: auto; scrollbar-width: none; }
  .side-list::-webkit-scrollbar { display: none; }
  .side-list li { flex: none; }
  .side-list a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
}
.side-cta { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 14px 16px; border-radius: calc(var(--r) + 6px); background: var(--pin-soft); color: var(--pin-ink); text-decoration: none !important; flex: none; }
.side-cta .ic { grid-row: span 2; }
.side-cta b { font-size: 15px; }
.side-cta span { font-size: 13.5px; opacity: .85; }
.related { margin-top: 32px; }
.related h2 { margin-bottom: 12px; }
.empty { padding: 36px 24px; text-align: center; border: 1.5px dashed var(--line2); border-radius: calc(var(--r) + 6px); color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rows .empty, .panel .empty { border: 0; }

/* Пагинация */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 24px 0 0; }
.pager a, .pager span { min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.pager a { background: var(--surface); border: 1px solid var(--line); color: var(--ink2); text-decoration: none; }
.pager a:hover { border-color: var(--accent-line); color: var(--link); }
.pager .cur { background: var(--accent); color: var(--on-accent); }
.pager span:not(.cur) { color: var(--muted); }

/* SEO-текст и FAQ */
.seo-text { margin-top: 40px; max-width: 76ch; color: var(--ink2); font-size: 16px; line-height: 1.65; }
.seo-text h2 { font-size: 23px; font-weight: 700; color: var(--ink); margin: 0 0 12px; letter-spacing: -.01em; }
.seo-text h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 22px 0 8px; }
.seo-text p { margin: 0 0 12px; }
.seo-text ul, .seo-text ol { padding-left: 22px; margin: 0 0 12px; }
.faq-h { margin-bottom: 16px; }
.faq-list { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); overflow: hidden; max-width: 900px; }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; font-weight: 600; font-size: 16.5px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { font-style: normal; width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--link); font-size: 20px; transition: transform .2s; }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-a { padding: 0 20px 18px; color: var(--ink2); max-width: 72ch; }
.faq-a p + p { margin-top: 8px; }

/* Призыв */
.cta { background: var(--accent); color: var(--on-accent); border-radius: calc(var(--r) + 14px); padding: 32px 24px; display: grid; gap: 22px; align-items: center; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 36px solid rgba(255,255,255,.08); pointer-events: none; }
@media (min-width: 860px) { .cta { grid-template-columns: 1fr auto; padding: 44px 48px; } }
.cta-h { font-size: clamp(26px, 3.6vw, 38px); max-width: 20ch; }
.cta-text p { margin-top: 10px; opacity: .9; max-width: 56ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.cta .btn-ink { color: var(--link); }

/* ---------- Страница канала ---------- */
.ch { display: grid; gap: 24px; align-items: start; padding-bottom: 20px; }
@media (min-width: 980px) { .ch { grid-template-columns: 360px minmax(0, 1fr); gap: 32px; } .ch-top { position: sticky; top: calc(var(--top) + 20px); } }
.ch-top { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 10px); padding: 28px 22px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.ch-hl .ch-top { border-top: 4px solid var(--pin); }
.ch-ava { width: 132px; height: 132px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, hsl(var(--h, 220) 75% 64%), hsl(calc(var(--h, 220) + 25) 70% 50%)); color: #fff; font-size: 52px; font-weight: 700; flex: none; }
.ch-ava img { width: 100%; height: 100%; object-fit: cover; }
.ch-head { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ch-h1 { font-size: clamp(24px, 3vw, 30px); line-height: 1.12; text-wrap: balance; }
.ch-handle { color: var(--link); font-size: 15.5px; font-weight: 500; word-break: break-all; }
.ch-kind { color: var(--muted); font-size: 14px; display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ch-stats { margin: 0; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); padding: 14px 0; }
.ch-stats div + div { border-left: 1px solid var(--line); }
.ch-stats dd { margin: 0; font-size: 20px; font-weight: 700; }
.ch-stats dt { font-size: 12.5px; color: var(--muted); }
.ch-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.icon-btns { display: flex; justify-content: center; gap: 2px; flex-wrap: wrap; }
.ibtn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 66px; padding: 8px 6px; border-radius: 12px; border: 0; background: transparent; color: var(--link); font-size: 12.5px; font-weight: 500; cursor: pointer; text-decoration: none !important; }
.ibtn:hover { background: var(--accent-soft); }
.ibtn.done { color: var(--ok); }
.ibtn-hot { color: var(--pin-ink); }
.ibtn-hot:hover { background: var(--pin-soft); }
.ch-body { min-width: 0; }
.ch-body > .h3 { margin: 6px 0 14px; }
.ch-bubble { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 22px 6px; padding: 18px 20px 12px; margin-left: 10px; max-width: 760px; }
.ch-bubble::before { content: ""; position: absolute; left: -10px; bottom: -1px; width: 16px; height: 16px; background: var(--surface); border-bottom: 1px solid var(--line); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.ch-desc { font-size: 16.5px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.ch-date { display: block; text-align: right; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.ch-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0 10px; }
.ch-tags .chip::before { content: "#"; color: var(--muted); margin-right: -3px; }
.ch-similar { margin-top: 36px; }

/* ---------- Вход, регистрация ---------- */
.auth { display: flex; justify-content: center; padding-top: 40px; padding-bottom: 60px; }
.auth-box { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 10px); padding: 30px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
@media (min-width: 560px) { .auth-box { padding: 36px 34px; } }
.auth-h { font-size: 34px; }
.auth-alt { text-align: center; color: var(--muted); font-size: 15px; }

/* Обычные формы */
.ch-form { display: flex; flex-direction: column; gap: 14px; }
.f-row { display: flex; flex-direction: column; gap: 6px; }
.f-row > label { font-weight: 600; font-size: 14px; }
.f-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .f-grid-2 { grid-template-columns: 1fr 1fr; } }
.f-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.f-err { color: var(--red); font-size: 13.5px; margin: 0; }
.ch-form input:not([type=checkbox]):not([type=radio]), .my-promo select, .my-search input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface2); font-size: 16px; outline: none;
}
.ch-form input:focus, .my-promo select:focus, .my-search input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.danger-zone { margin: 36px 0; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- Мои каналы ---------- */
.my-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 28px 0 20px; }
.my-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.my-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.my-bar .chips { flex: 1 1 auto; min-width: 0; }
.my-search { position: relative; flex: 0 1 300px; }
.my-search input { height: 40px; border-radius: 999px; padding-right: 44px; font-size: 15px; }
.my-search button { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.my-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.my-card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.my-card-top { display: flex; gap: 12px; align-items: center; }
.my-card-top .row-ava { width: 48px; height: 48px; flex: none; font-size: 19px; }
.my-card-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.my-card-t a { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-card-t .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; white-space: nowrap; flex: none; }
.st-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: color-mix(in srgb, var(--ok) 80%, var(--ink)); }
.st-wait { background: var(--pin-soft); color: var(--pin-ink); }
.st-bad { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.my-stats { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.my-stats div { background: var(--surface2); border-radius: 10px; padding: 8px 10px; }
.my-stats dt { font-size: 12px; color: var(--muted); }
.my-stats dd { margin: 0; font-weight: 700; }
.my-promos { display: flex; flex-wrap: wrap; gap: 6px; }
.my-promo { display: flex; gap: 8px; }
.my-promo select { height: 42px; font-size: 14.5px; flex: 1; min-width: 0; }
.my-promo .btn { min-height: 42px; }
.my-card-actions { display: flex; gap: 8px; margin-top: auto; }
.req-list { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); overflow: hidden; margin-top: 14px; }
.req { display: flex; justify-content: space-between; gap: 14px; padding: 14px 18px; align-items: center; }
.req + .req { border-top: 1px solid var(--line); }
.req-t, .req-r { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.req-t .muted { font-size: 13.5px; }
.req-r { align-items: flex-end; gap: 6px; }
.pay-info { margin-top: 16px; font-size: 14.5px; max-width: 70ch; }
.my-settings summary { list-style: none; display: inline-flex; }
.my-settings summary::-webkit-details-marker { display: none; }
.my-settings[open] summary { margin-bottom: 16px; }
.my-settings[open] summary .ic:last-child { transform: rotate(180deg); }
.my-settings > form.ch-form { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); padding: 20px; max-width: 720px; }

/* ---------- Продвижение ---------- */
.feat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin-top: 8px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.feat b { font-size: 16px; }
.feat span { color: var(--muted); font-size: 14.5px; }
.h2.block { margin-bottom: 16px; }
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin-top: 14px; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 8px); padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.plan form, .plan > .btn { margin-top: auto; }
.plan-hot { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan-badge { position: absolute; top: -12px; left: 18px; background: var(--pin); color: #3A2400; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan-name { font-size: 19px; font-weight: 700; }
.plan-days { color: var(--muted); font-size: 14px; }
.plan-price { display: flex; align-items: baseline; gap: 10px; margin: 4px 0; }
.plan-price b { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.plan-price s { color: var(--muted); }
.plan-note { font-size: 14px; color: var(--ink2); }
.plan-feats { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14.5px; }
.plan-feats li { padding-left: 24px; position: relative; }
.plan-feats li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.active-box { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--pin); border-radius: var(--r); padding: 16px 18px; margin: 16px 0; }
.active-box ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.active-box li { display: flex; justify-content: space-between; gap: 12px; }

/* 404 */
.page-empty { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.page-empty h1 { font-size: clamp(34px, 7vw, 64px); }

/* ---------- Подвал ---------- */
.foot { margin-top: 72px; background: #131A2C; color: #B8C0D3; padding: 44px 0 calc(var(--tabbar) + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { .foot { padding-bottom: 0; } }
.foot a { color: #DCE2EF; }
.foot a:hover { color: #fff; }
.foot-in { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .foot-in { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; } }
.foot-brand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) { .foot-brand { grid-column: auto; } }
.foot-brand .logo { color: #fff; }
.foot-brand .logo-word b { color: #9DB0FF; }
.foot-brand p { font-size: 14.5px; max-width: 40ch; }
.foot-col { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; min-width: 0; }
.foot-col b { color: #fff; font-size: 15px; margin-bottom: 4px; }
.foot-col a { overflow-wrap: anywhere; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 22px; padding-bottom: 26px; margin-top: 36px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13.5px; color: #8590A8; }

/* Нижнее меню на телефоне */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 500; text-decoration: none !important; min-width: 0; }
.tabbar a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.tabbar a[aria-current="page"] { color: var(--link); }
.tab-plus { width: 44px; height: 32px; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
@media (min-width: 960px) { .tabbar { display: none; } }

/* Служебное */
.to-top { position: fixed; right: 16px; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); z-index: 55; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
@media (min-width: 960px) { .to-top { bottom: 24px; right: 24px; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 20px + env(safe-area-inset-bottom)); z-index: 90; background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow); }
@media (min-width: 960px) { .toast { bottom: 28px; } }
.age-modal { position: fixed; inset: 0; z-index: 100; background: rgba(14,20,36,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.age-box { width: 100%; max-width: 420px; background: var(--surface); border-radius: calc(var(--r) + 10px); padding: 28px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; box-shadow: var(--shadow); }
.age-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; }
.age-box h2 { font-size: 24px; font-weight: 800; }
.age-box p { color: var(--muted); }
.age-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px; }
.m-search { position: fixed; inset: 0; z-index: 70; background: var(--bg); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.m-search form { display: flex; gap: 8px; }
.m-search input { flex: 1; min-width: 0; height: 52px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--surface); padding: 0 18px; font-size: 17px; outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* Переменные для общей формы карточки (form.css) */
:root { --cf-card: var(--surface); --cf-panel: var(--sunk); --cf-input: var(--surface2); --cf-line: var(--line); --cf-line2: var(--line2); --cf-ink: var(--ink); --cf-muted: var(--muted); --cf-accent: var(--accent); --cf-on-accent: var(--on-accent); --cf-accent-text: var(--link); --cf-accent-line: var(--accent-line); --cf-accent-soft: var(--accent-soft); --cf-red: var(--red); --cf-ok: var(--ok); --cf-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { :root { --cf-bottom: 0px; } }
.cf-preview.vcard { flex: none; width: 140px; align-self: flex-start; background: var(--surface); border: 1px solid var(--line); padding: 16px 10px; }
.cf-preview .vcard-sub { display: block; font-size: 12.5px; color: var(--link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-preview .vcard-foot > span { display: block; }
.cf-preview .vcard-img { background: var(--line2); }
.cf-preview .vcard-img > img, .cf-preview .vcard-img > span:first-child { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); display: grid; place-items: center; background: linear-gradient(145deg, hsl(220 75% 64%), hsl(245 70% 50%)); color: #fff; font-size: 30px; font-weight: 700; }
@media (max-width: 559px) {
  .quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); }
  .quick::-webkit-scrollbar { display: none; }
  .qbtn { flex: none; }
  .hero-stats { gap: 6px 22px; }
}
.plan .btn-ink { background: var(--ink); color: var(--surface); }
.plan .btn-ink:hover { background: color-mix(in srgb, var(--ink) 85%, var(--accent)); }
main.wrap > .page-h1:first-child { margin-top: 32px; }
.seo-text * + h2 { margin-top: 28px; }
[data-theme="dark"] .foot { background: #0A0F1C; }
.list-search { margin: 0 0 18px; max-width: none; }
.list-search input { height: 54px; box-shadow: none; }
.list-search .hero-send { width: 42px; height: 42px; top: 6px; right: 6px; }
.m-search > .btn { align-self: flex-start; }
@media (max-width: 559px) {
  .feat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .feat { padding: 12px 14px; }
  .feat b { font-size: 15px; }
  .feat span { font-size: 13.5px; }
  .auth { padding-top: 20px; }
}

/* =========================================================
   Кнопка «Открыть в Telegram»
   ========================================================= */
.tg-btn {
  position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(120deg, #2AABEE 0%, var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #7A4CF0) 100%); background-size: 160% 100%; background-position: 0 0;
  color: #fff; font-weight: 600; font-size: 15px; text-decoration: none !important; white-space: nowrap;
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.22);
  transition: background-position .5s ease, transform .15s ease, box-shadow .25s ease;
}
.tg-btn::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -45%; width: 35%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.tg-btn:hover { background-position: 100% 0; box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--accent) 90%, transparent), inset 0 1px 0 rgba(255,255,255,.22); }
.tg-btn:hover::after { left: 120%; }
.tg-btn:active { transform: scale(.97); }
.tg-btn-ic { position: relative; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2); overflow: hidden; flex: none; }
.tg-btn-ic .ic { transform: translate(-1px, 1px); }
.tg-btn:hover .tg-btn-ic .ic { animation: tg-fly .7s cubic-bezier(.5, 0, .3, 1) 1; }
@keyframes tg-fly { 0% { transform: translate(-1px, 1px); } 45% { transform: translate(22px, -22px); opacity: 1; } 46% { transform: translate(-22px, 22px); opacity: 0; } 55% { opacity: 1; } 100% { transform: translate(-1px, 1px); } }
.tg-btn-sm { min-height: 40px; font-size: 14px; }
.tg-btn-sm .tg-btn-ic, .cf-preview .tg-btn .ic { width: auto; height: auto; background: none; }

/* =========================================================
   Закреплено — сетка карточек
   ========================================================= */
.pins { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); }
.pin { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: calc(var(--r) + 8px); background: var(--surface); border: 1px solid var(--line); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s; }
.pin:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(23, 32, 51, .45); border-color: var(--accent-line); }
.pin-paid { background: linear-gradient(180deg, color-mix(in srgb, var(--pin) 9%, var(--surface)) 0%, var(--surface) 55%); border-color: color-mix(in srgb, var(--pin) 45%, var(--line)); }
.pin-hl { box-shadow: inset 0 0 0 2px var(--pin); }
.pin-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pin-ava { position: relative; width: 58px; height: 58px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 22px; background: linear-gradient(145deg, hsl(var(--h, 220) 75% 64%), hsl(calc(var(--h, 220) + 25) 70% 50%)); }
.pin-ava > img, .pin-ava > span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; overflow: hidden; }
.pin-paid .pin-ava::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; z-index: -1; background: conic-gradient(from 0deg, var(--accent), #2AABEE, var(--teal), var(--pin), var(--accent)); animation: ring-spin 6s linear infinite; }
.pin-paid .pin-ava::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; z-index: -1; background: var(--surface); }
.pin-paid .pin-ava { isolation: isolate; }
@keyframes ring-spin { to { transform: rotate(360deg); } }
.pin-head { min-width: 0; flex: 1; }
.pin-title { font-size: 16px; font-weight: 700; line-height: 1.25; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pin-title a { color: var(--ink); text-decoration: none !important; }
.pin-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.pin-handle { font-size: 13.5px; color: var(--link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.pin-badge { position: absolute; right: -4px; bottom: -4px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--pin); color: #3A2400; box-shadow: 0 0 0 2.5px var(--surface); font-style: normal; }
.pin-ava > img, .pin-ava > span { position: relative; z-index: 1; }
.pin-badge .ic { fill: currentColor; }
.pin-desc { font-size: 14px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.pin-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); margin-top: auto; }
.pin-meta b { color: var(--ink); font-size: 15px; font-weight: 700; }
.pin-cat { background: var(--sunk); border-radius: 999px; padding: 3px 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin .tg-btn { position: relative; z-index: 2; }
.pin-cta { align-items: center; justify-content: center; text-align: center; gap: 8px; border: 2px dashed var(--line2); background: transparent; color: var(--ink); text-decoration: none !important; min-height: 230px; }
.pin-cta:hover { border-color: var(--accent); background: var(--accent-soft); }
.pin-cta b { font-size: 17px; }
.pin-cta > span:not(.pin-cta-ic):not(.pin-cta-btn) { font-size: 14px; color: var(--muted); max-width: 26ch; }
.pin-cta-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--pin-soft); color: var(--pin-ink); animation: bob 2.6s ease-in-out infinite; }
.pin-cta-btn { margin-top: 6px; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--surface); font-weight: 600; font-size: 14px; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-6deg); } }
@media (max-width: 559px) {
  .pins { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pin { padding: 14px 12px; gap: 10px; align-items: center; text-align: center; }
  .pin-top { flex-direction: column; gap: 8px; }
  .pin-title { font-size: 14.5px; }
  .pin-handle { font-size: 12.5px; }
  .pin-desc { display: none; }
  .pin-meta { justify-content: center; }
  .pin-cat { display: none; }
  .pin .tg-btn { min-height: 40px; font-size: 13.5px; padding: 0 10px; gap: 6px; }
  .pin .tg-btn-ic { width: 22px; height: 22px; }
  .pin .tg-btn-t { overflow: hidden; text-overflow: ellipsis; }
  .pin-cta { min-height: 0; grid-column: 1 / -1; }
}

/* =========================================================
   Первый экран: правая колонка и «живая лента»
   ========================================================= */
.hero-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.day .tg-btn { min-height: 50px; font-size: 16px; }
.feed { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 10px); padding: 14px 14px 10px; box-shadow: var(--shadow); }
.feed-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; font-size: 14.5px; }
.feed-head a { margin-left: auto; font-size: 13.5px; font-weight: 600; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: live 1.8s ease-out infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feed-msg { display: flex; align-items: flex-end; gap: 8px; }
.feed-ava { width: 34px; height: 34px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; background: linear-gradient(145deg, hsl(var(--h, 220) 75% 64%), hsl(calc(var(--h, 220) + 25) 70% 50%)); }
.feed-ava img { width: 100%; height: 100%; object-fit: cover; }
.feed-bubble { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; background: var(--surface2); border-radius: 16px 16px 16px 5px; padding: 8px 12px 6px; color: var(--ink); text-decoration: none !important; transition: background-color .15s; }
.feed-bubble:hover { background: var(--accent-soft); }
.feed-bubble b { font-size: 14px; font-weight: 600; color: var(--link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-bubble span { font-size: 13.5px; color: var(--ink2); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-bubble time { align-self: flex-end; font-size: 11.5px; color: var(--muted); }
.feed-typing { display: inline-flex; gap: 4px; padding: 10px 14px; margin-left: 42px; width: max-content; background: var(--surface2); border-radius: 16px 16px 16px 5px; }
.feed-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1.2s ease-in-out infinite; }
.feed-typing span:nth-child(2) { animation-delay: .15s; }
.feed-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (max-width: 979px) { .feed { display: none; } }

/* =========================================================
   Анимации главной (только когда работает JS)
   ========================================================= */
.js .hero-left > * { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.js .hero-left > :nth-child(2) { animation-delay: .08s; }
.js .hero-left > :nth-child(3) { animation-delay: .16s; }
.js .hero-left > :nth-child(4) { animation-delay: .24s; }
.js .hero-left > :nth-child(5) { animation-delay: .32s; }
.js .day { animation: rise-r .8s cubic-bezier(.2, .8, .2, 1) .25s both; }
.js .feed { animation: rise-r .8s cubic-bezier(.2, .8, .2, 1) .35s both; }
.js .feed-msg, .js .feed-typing { animation: msg-in .45s cubic-bezier(.3, 1.3, .5, 1) both; animation-delay: calc(.9s + var(--d) * .45s); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-r { from { opacity: 0; transform: translateX(24px) scale(.98); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(.9); transform-origin: left bottom; } }
.hero-h1 { background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 45%, var(--accent) 50%, var(--ink) 55%, var(--ink) 100%); background-size: 250% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.js .hero-h1 { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both, shine 2.4s ease-in-out .8s 1 both; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
.hero-send { animation: pulse-send 2.8s ease-in-out 2s infinite; }
@keyframes pulse-send { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 9px transparent; } }
.hero-search:focus-within .hero-send { animation: none; transform: rotate(-12deg) scale(1.05); }
.qbtn .ic { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.qbtn:hover .ic { transform: scale(1.18) rotate(-10deg); }

/* Появление блоков при прокрутке */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal] [data-reveal-item] { opacity: 0; transform: translateY(16px) scale(.97); }
.js [data-reveal].is-in [data-reveal-item] { animation: item-in .55s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(min(var(--i, 0), 16) * 45ms); }
@keyframes item-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.js [data-reveal].is-in .cats [data-reveal-item] { animation-name: bubble-in; animation-delay: calc(min(var(--i, 0), 24) * 30ms); }
@keyframes bubble-in { from { opacity: 0; transform: translateX(-14px) scale(.85); transform-origin: left bottom; } to { opacity: 1; transform: none; } }
.js [data-reveal].is-in .rows .row { animation: item-in .5s ease both; }
.js [data-reveal].is-in .rows .row:nth-child(2) { animation-delay: .06s; } .js [data-reveal].is-in .rows .row:nth-child(3) { animation-delay: .12s; }
.js [data-reveal].is-in .rows .row:nth-child(4) { animation-delay: .18s; } .js [data-reveal].is-in .rows .row:nth-child(5) { animation-delay: .24s; }
.js [data-reveal].is-in .rows .row:nth-child(n+6) { animation-delay: .3s; }
.cat { transition: background-color .15s, transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.cat:hover { transform: translateY(-2px) rotate(-.6deg); }
.row-go .ic { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.row-go:hover .ic { transform: translate(2px, -2px) rotate(-10deg); }

/* Самолётики в призыве */
.cta-planes { position: absolute; inset: 0; pointer-events: none; color: rgba(255,255,255,.22); }
.cta-planes .ic { position: absolute; animation: plane 9s linear infinite; }
.cta-planes .ic:nth-child(1) { left: 58%; top: 70%; animation-duration: 11s; }
.cta-planes .ic:nth-child(2) { left: 40%; top: 85%; animation-delay: -4s; }
.cta-planes .ic:nth-child(3) { left: 72%; top: 95%; animation-delay: -7s; animation-duration: 8s; }
@keyframes plane { from { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { transform: translate(260px, -260px); opacity: 0; } }
.cta > *:not(.cta-planes) { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal] [data-reveal-item] { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .js .hero-left > *, .js .day, .js .feed, .js .feed-msg, .js .feed-typing, .hero-send, .pin-paid .pin-ava::before, .cta-planes .ic, .pin-cta-ic, .feed-dot, .feed-typing span { animation: none !important; }
  .js .hero-h1 { animation: none !important; background-position: 0 0; }
  .tg-btn::after, .pin, .cat { transition: none !important; }
  .tg-btn:hover .tg-btn-ic .ic { animation: none; }
}
.pins > * { min-width: 0; }
.tg-btn-s { display: none; }
@media (max-width: 559px) { .pin .tg-btn-t { display: none; } .pin .tg-btn-s { display: inline; } }
@media (max-width: 979px) { .js .day { animation-name: rise; } }
