/* =========================================================
   Дизайн «TG SPACE»: тёмный космос, фиолетовые акценты,
   боковое меню с категориями. Светлая тема — через переменные.
   ========================================================= */
:root {
  --bg: #F4F3FB;
  --side-bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F5F3FE;
  --surface-3: #ECE8FB;
  --text: #16132E;
  --text-2: #4A4566;
  --muted: #827D9E;
  --line: #E4E0F3;
  --primary: #6D3BF5;
  --primary-2: #5A28E0;
  --primary-soft: #EFE9FF;
  --primary-line: #CDBDFF;
  --on-primary: #FFFFFF;
  --grad: linear-gradient(135deg, #9466FF 0%, #6D3BF5 55%, #5A28E0 100%);
  --ink: #120E36;
  --ink-2: #1D1752;
  --ink-text: #C8C0F0;
  --sun: #FFB31F;
  --sun-soft: #FFF4DC;
  --sun-line: #FFDF9E;
  --sun-text: #8F5B00;
  --accent: #FF6B3D;
  --ok: #12A877;
  --ok-soft: #E2F7EF;
  --warn: #B7791F;
  --warn-soft: #FFF5E0;
  --err: #E5484D;
  --err-soft: #FDECEC;
  --hl: #F6F0FF;
  --hl-line: #B596FF;
  --heart: #F43F6B;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30, 20, 80, .04), 0 4px 14px rgba(30, 20, 80, .05);
  --shadow-lg: 0 22px 44px -18px rgba(40, 20, 110, .3);
  --font: 'Manrope', 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Manrope', 'Golos Text', system-ui, sans-serif;
  --header-h: 72px;
  --side-w: 268px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tile-l: 96%;
  --tile-ico-l: 90%;
  --tile-s: 70%;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #08091A;
  --side-bg: #0A0B1F;
  --surface: #0F1029;
  --surface-2: #161838;
  --surface-3: #1E2046;
  --text: #F3F2FF;
  --text-2: #BDBCDD;
  --muted: #8C8CB4;
  --line: #222445;
  --primary: #8B5CFF;
  --primary-2: #A887FF;
  --primary-soft: #221A52;
  --primary-line: #5636C9;
  --ink: #100D33;
  --ink-2: #1B1550;
  --ink-text: #C2BCEB;
  --sun-soft: #352D1E;
  --sun-line: #6B5420;
  --sun-text: #FFCB66;
  --ok-soft: #133A35;
  --warn-soft: #3A3020;
  --err-soft: #3D1D2B;
  --hl: #1A1540;
  --hl-line: #6B4AE0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .2);
  --shadow-lg: 0 22px 44px -18px rgba(0, 0, 0, .7);
  --tile-l: 14%;
  --tile-ico-l: 24%;
  --tile-s: 40%;
  color-scheme: dark;
}

/* ===== Админка и служебные страницы ===== */
/* ===== Админка ===== */
.admin { padding-top: 24px; }
.admin-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-nav { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; }
.admin-nav-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 10px 8px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); font-weight: 700; font-size: 14px; }
.admin-nav a:hover { background: var(--surface-2); }
.admin-nav a.active { background: var(--primary-soft); color: var(--primary-2); }
.admin-nav .an { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-badge { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 800; }
.admin-body { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.admin-body > p { margin: 0; }
.admin-h1 { font-size: 26px; margin: 0; }
.admin-2col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.admin-2col-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.admin-side { display: flex; flex-direction: column; gap: 16px; }
.admin-tabs { align-self: flex-start; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--text); box-shadow: var(--shadow); }
.stat:hover { border-color: var(--primary-line); color: var(--text); }
.stat b { display: block; font-size: 26px; font-weight: 800; }
.stat span { color: var(--muted); font-size: 13px; }
.stat-warn b { color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input, .filters select, .input-xs, .input-sm {
  height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 500 14px var(--font); color: var(--text); min-width: 0;
}
.filters input[type=search] { flex: 1 1 220px; }
.input-xs { height: 28px; font-size: 12px; padding: 0 8px; border-radius: 8px; }
.check-inline { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; }
.bulk { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px 12px 0 0; border-bottom: 0; }
.bulk-move { display: inline-flex; gap: 4px; }
.table-wrap { width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 12px 12px; -webkit-overflow-scrolling: touch; }
.panel .table-wrap { border: 0; border-radius: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-2); }
.tr-hl td { background: var(--hl); }
.tr-off td { opacity: .55; }
.td-cb { width: 36px; }
.td-ch { min-width: 220px; max-width: 340px; }
.td-ch-in { display: flex; align-items: center; gap: 10px; min-width: 0; }
.td-ch-txt { min-width: 0; display: flex; flex-direction: column; }
.td-ch-txt > a { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-ch-txt small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-ch-txt small a { color: var(--muted); }
.td-actions { white-space: nowrap; text-align: right; }
.td-actions form { display: inline-flex; gap: 4px; margin: 0; }
.td-name { white-space: nowrap; font-weight: 700; }
.td-name a { color: var(--text); }
.t-warn { color: var(--warn); }
.input-num { width: 110px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; font: 600 14px var(--font); background: var(--surface); color: var(--text); }
.input-sort { width: 74px; }
.link-btn { border: 0; background: none; color: var(--primary); font: 700 11px var(--font); cursor: pointer; padding: 0 0 0 4px; text-transform: none; letter-spacing: 0; }
.sticky-save { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 40%); z-index: 5; }
.panel .sticky-save { background: linear-gradient(transparent, var(--surface) 40%); margin-bottom: -12px; }
.kv { list-style: none; padding: 0; margin: 14px 0; font-size: 14px; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv li span { color: var(--muted); }
.kv li b { text-align: right; overflow-wrap: anywhere; }
.kv-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.checklist { padding-left: 20px; margin: 0; }
.checklist li { margin-bottom: 8px; }
.serp { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); font-family: Arial, sans-serif; }
.serp-url { font-size: 13px; color: #1E6E3A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { font-size: 18px; color: #1A0DAB; margin: 2px 0; }
.serp-desc { font-size: 13.5px; color: #4D5156; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; max-height: 420px; overflow-y: auto; padding: 4px; }
.pick { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; font-weight: 600 !important; font-size: 13px !important; overflow: hidden; }
.pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-ex { opacity: .5; }
.refresh-ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.progress { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--primary), #8A63FF); transition: width .3s; }
.refresh-log { margin-top: 14px; max-height: 360px; overflow-y: auto; font: 13px/1.6 ui-monospace, Menlo, Consolas, monospace; background: #15173A; color: #C9CDF0; border-radius: 12px; padding: 12px 14px; }
.refresh-log:empty { display: none; }

@media (max-width: 1024px) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav-title { display: none; }
  .admin-nav a { flex: 0 0 auto; }
  .admin-2col, .admin-2col-even { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.form input[type=file] { height: auto !important; padding: 10px 12px !important; font-size: 14px !important; background: var(--surface-2) !important; cursor: pointer; }
.refresh-state { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 10px; }

/* ===== Новое: главная, закреп, права ===== */
.hero-in { display: flex; flex-direction: column; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 16px; box-shadow: var(--shadow); }
.hero-search { width: 100%; }
.hero-stats { width: 100%; max-width: 640px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-stats div { background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; }
.section-pin { background: linear-gradient(180deg, var(--sun-soft), var(--surface)); border: 1px solid var(--sun-line); border-radius: 20px; padding: 20px; }
.section-pin .card { box-shadow: 0 2px 10px rgba(255, 150, 40, .10); }
.badge-pin { background: var(--sun-soft); color: var(--sun-text); }
.pkg-off { opacity: .55; cursor: not-allowed; }
.packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.status-info { background: var(--primary-soft); color: var(--primary-2); }
.t-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grant-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.grant-row label { flex: 1 1 220px; }
.grant-row .btn { height: 46px; }
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.user-row.is-off { opacity: .6; }
.user-info { flex: 1 1 auto; min-width: 0; }
.user-name { display: flex; align-items: center; gap: 8px; font-weight: 800; min-width: 0; flex-wrap: wrap; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin: 0; flex: 0 0 auto; }
.cta-txt { min-width: 0; }
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero-badge { margin-bottom: 12px; font-size: 12px; }
  .hero-stats { gap: 8px; }
  .hero-stats div { padding: 10px 4px; }
  .section-pin { padding: 14px; border-radius: 16px; margin-left: -4px; margin-right: -4px; }
  .packages { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-row { flex-wrap: wrap; }
  .user-actions { width: 100%; justify-content: flex-start; }
  .grant-row .btn { width: 100%; }
}

@media (max-width: 640px) {
  .section-head h2 { font-size: 18px; }
  .card-foot { padding-top: 10px; }
}

.channel-link code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; }
@media (max-width: 640px) {
  .page-head .page-head-ico { display: none; }
  .channel-head { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .channel-info { width: 100%; }
  .channel-tags { justify-content: center; }
  .channel-link { flex-wrap: nowrap; }
  .channel-link-label { display: none; }
  .channel-link code { flex: 1 1 auto; }
  .channel-link .btn { flex: 0 0 auto; }
  .sidebar { display: none; }
}

.lbl { display: block; }
.my-info { flex: 1 1 0; }
.my-status { margin-top: 6px; }
.form input[type=file]::file-selector-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 700 13px var(--font); padding: 7px 12px; border-radius: 9px; margin-right: 10px; cursor: pointer; }
.pkg-price { white-space: nowrap; }

/* Таблицы админки на телефоне — карточками */
@media (max-width: 760px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr { display: block; width: 100%; }
  .table-cards tr { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; min-width: 0; }
  .table-cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; text-align: left; flex: 0 0 auto; }
  .table-cards td.td-ch { max-width: none; min-width: 0; padding: 0 34px 6px 0; display: block; text-align: left; }
  .table-cards td.td-name { white-space: normal; padding-right: 0; display: block; text-align: left; font-size: 15px; margin-bottom: 4px; }
  .table-cards td.td-cb { position: absolute; top: 14px; right: 14px; width: auto; padding: 0; }
  .table-cards td.td-actions { justify-content: flex-start; padding-top: 8px; }
  .table-cards tr:hover td { background: none; }
  .table-cards .input-num { width: 130px; }
  .bulk { border-radius: 12px 12px 0 0; }
}
.user-info { flex: 1 1 0; }

.nowrap { white-space: nowrap; }
.td-author { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-ch { max-width: 300px; }
.sticky-save, .panel .sticky-save { background: var(--surface); border-top: 1px solid var(--line); margin: 0 -24px -24px; padding: 12px 24px; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 -6px 16px rgba(16,24,40,.06); }
form.form > .sticky-save { margin: 0; border-radius: 14px; border: 1px solid var(--line); }
@media (max-width: 760px) {
  .table-prices.table-cards tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
  .table-prices.table-cards td { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 4px; text-align: left; padding: 0; }
  .table-prices.table-cards td[data-label]::before { font-size: 11px; }
  .table-prices.table-cards td.td-name { grid-column: 1 / -1; display: block; }
  .table-prices.table-cards .input-num { width: 100%; }
  .table-prices.table-cards td.td-actions { flex-direction: row; align-items: center; padding: 0; }
  .sticky-save, .panel .sticky-save { margin: 0 -18px -18px; padding: 10px 18px; }
}
@media (max-width: 640px) { .logo-footer .logo-text { display: inline; } }
@media (max-width: 760px) {
  .table-prices.table-cards td[data-label="Каналов"] { display: none; }
  .table-prices.table-cards td.td-actions { justify-content: flex-start; align-self: end; }
  .table-prices.table-cards td[data-label="Показывать"] { align-items: flex-start; }
  .table-prices.table-cards td[data-label="Показывать"] input { width: 20px; height: 20px; margin: 8px 0; }
}

/* ===== Панель массовых действий ===== */
.bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 0 0; border-bottom: 0; }
.bulk-count { font-size: 13.5px; font-weight: 700; color: var(--text-2); margin-right: 4px; white-space: nowrap; }
.bulk-count b { color: var(--text); }
.bulk-more { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.bulk-more select, .bulk-move-to { height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 30px 0 12px; font: 600 13.5px var(--font); color: var(--text); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B8599' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; -webkit-appearance: none; appearance: none; max-width: 220px; }
.filters select, .input-sm, .input-xs { -webkit-appearance: none; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B8599' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; padding-right: 30px; }
.filters input[type=search] { background: var(--surface); }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.1fr) auto auto; gap: 8px; align-items: center; }
.filters > * { min-width: 0; }
.filters input, .filters select { width: 100%; height: 40px; }
.filters .btn { height: 40px; }
.check-inline { white-space: nowrap; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--primary); }
@media (max-width: 760px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { grid-column: 1 / -1; }
  .filters .btn { grid-column: 1 / -1; }
  .bulk { position: sticky; top: calc(var(--header-h) + 4px); z-index: 20; box-shadow: 0 6px 16px rgba(16,24,40,.08); border-radius: 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
  .bulk-main { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .bulk-more { width: 100%; margin-left: 0; }
  .bulk-more select { flex: 1 1 auto; max-width: none; }
  .bulk-count { width: 100%; }
}
.bulk-main { display: inline-flex; gap: 8px; }
.user-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.user-filters form { display: flex; gap: 8px; flex: 1 1 280px; }
.user-filters input { flex: 1 1 auto; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: 500 14px var(--font); min-width: 0; }
.user-filters .btn { height: 40px; }

/* ===== Продвижение ===== */
.promo-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 16px 18px; }
.promo-wait { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; border-color: var(--warn); background: var(--warn-soft); }
.promo-wait-title { font-weight: 800; margin-bottom: 4px; }
.promo-wait form { margin: 0; }
.promo-list { display: flex; flex-direction: column; gap: 12px; }
.promo-opt { display: flex; align-items: center; gap: 16px; padding: 18px; }
.promo-opt.is-active { border-color: var(--ok); background: linear-gradient(180deg, var(--ok-soft), var(--surface)); }
.promo-opt.is-off { opacity: .6; }
.promo-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 24px; flex: 0 0 auto; }
.promo-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.promo-name { font-weight: 800; font-size: 16px; }
.promo-active { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-weight: 700; font-size: 13px; }
.promo-act { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.promo-price { font-weight: 800; font-size: 17px; color: var(--primary-2); white-space: nowrap; }
@media (max-width: 640px) {
  .promo-opt { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .promo-ico { width: 42px; height: 42px; font-size: 21px; }
  .promo-act { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
  .promo-wait .btn-row .btn, .promo-wait .btn-row form { width: 100%; }
  .promo-wait .btn-row form .btn { width: 100%; }
}
.my-item .btn-row .btn { flex: 0 0 auto; }
@media (max-width: 640px) {
  .my-item .btn-row { display: grid; grid-template-columns: 1fr 1fr; }
  .my-item .btn-row form, .my-item .btn-row form .btn { width: 100%; }
}

.tag-18 { display: inline-block; vertical-align: 1px; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--err); border-radius: 5px; padding: 1px 5px; margin-left: 4px; line-height: 1.3; }

@media (max-width: 760px) {
  .table-cards td.td-author { max-width: none; }
  .bulk-more { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .bulk-more .bulk-move-to { grid-column: 1 / -1; max-width: none; width: 100%; grid-row: 2; }
  .bulk-more select { width: 100%; min-width: 0; }
}
@media (max-width: 640px) { .btn-login .ic { display: none; } .hero-search .ic { display: none; } }

/* ===== Статистика ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.kpi-l { font-size: 13px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.kpi-v { font-size: 28px; font-weight: 800; margin: 4px 0 2px; color: var(--text); }
.kpi-d { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kpi-d.up { color: var(--ok); }
.kpi-d.down { color: var(--err); }
.kpi-note { margin: -4px 0 0; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 3px var(--ok-soft); flex: 0 0 auto; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { width: 12px; height: 12px; border-radius: 3px; background: var(--primary); display: inline-block; }
.lg-line { width: 16px; height: 3px; border-radius: 2px; background: var(--accent); display: inline-block; }
.chart-wrap { position: relative; width: 100%; overflow-x: auto; }
.chart-svg { width: 100%; min-width: 560px; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-base { stroke: var(--muted); stroke-width: 1; }
.ch-ax { fill: var(--muted); font: 600 11px var(--font); }
.ch-bar { fill: var(--primary); opacity: .85; }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.ch-hit { fill: transparent; cursor: crosshair; }
.ch-hit:hover { fill: var(--primary-soft); }
.chart-tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 600; padding: 7px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); z-index: 3; }
.stats-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.stable { width: 100%; border-collapse: collapse; font-size: 14px; }
.stable td { padding: 7px 0; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.stable tr:last-child td { border-bottom: 0; }
.stable td + td { padding-left: 10px; }
.stable .num { text-align: right; white-space: nowrap; }
.stable .sb { width: 38%; }
.sbar { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.sbar span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.t-path { max-width: 0; width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h3.mt { margin-top: 22px; }
.num { font-variant-numeric: tabular-nums; }
.today-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 16px 20px; color: var(--text); }
.today-stats:hover { border-color: var(--primary-line); color: var(--text); }
.ts-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.ts-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; }
.ts-item b { color: var(--text); font-size: 16px; }
.ts-more { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 700; font-size: 14px; }
.my-stats { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
@media (max-width: 1024px) { .stats-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 12px 14px; }
  .kpi-v { font-size: 22px; }
  .ts-more { margin-left: 0; width: 100%; }
}

.panel > .section-head { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 640px) { .legend { width: 100%; } .chart-svg { min-width: 640px; } }

/* ===== Карусель закрепа ===== */
.pin-ctl { display: flex; align-items: center; gap: 8px; }
.pin-ctl .more { margin-right: 6px; }
.pin-carousel { position: relative; margin: 0 -4px; }
.pin-carousel { --cols: min(var(--n, 4), 4); }
.pin-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--cols) - 1) * 16px) / var(--cols)); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 4px 8px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.pin-track::-webkit-scrollbar { display: none; }
.pin-slide { scroll-snap-align: start; display: flex; min-width: 0; }
.pin-slide .card { width: 100%; }
.pin-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.pin-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: var(--sun-line); cursor: pointer; transition: width .2s, background .2s; }
.pin-dots button.on { width: 22px; background: var(--sun); }
@media (max-width: 1180px) { .pin-carousel { --cols: min(var(--n, 3), 3); } }
@media (max-width: 860px) { .pin-carousel { --cols: min(var(--n, 2), 2); } }
.pin-carousel[style*="--n:1"] .pin-track { grid-auto-columns: min(100%, 420px); }
@media (max-width: 640px) {
  .pin-track { grid-auto-columns: 86%; gap: 10px; }
  .section-pin .section-head h2 { font-size: 18px; }
  .pin-ctl .btn-icon { display: none; }
}

/* ===== Переобход Яндекса ===== */
.url-list { width: 100%; font: 12.5px/1.55 ui-monospace, Menlo, Consolas, monospace !important; height: auto !important; padding: 10px 12px !important; background: var(--surface-2) !important; white-space: pre; overflow: auto; resize: vertical; border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.recrawl-progress { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; }
.recrawl-parts { display: flex; flex-direction: column; gap: 8px; }
.recrawl-part { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface); }
.recrawl-part summary { cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; list-style: none; }
.recrawl-part summary::-webkit-details-marker { display: none; }
.recrawl-part summary::before { content: '▸'; color: var(--muted); }
.recrawl-part[open] summary::before { content: '▾'; }
.recrawl-part[open] summary { margin-bottom: 10px; }
.rp-name { font-weight: 800; }
.recrawl-part .btn-row { margin-top: 8px; }
.slug-field{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.slug-field input{flex:1 1 220px;min-width:0}
.slug-field span{overflow-wrap:anywhere}

/* ===== Публичная часть ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15.5px; line-height: 1.55;
  color: var(--text); background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--text); }
h1 { font: 700 32px/1.15 var(--display); letter-spacing: -.02em; }
h2 { font: 600 22px/1.25 var(--display); letter-spacing: -.015em; }
h3, .h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; font-size: 13px; word-break: break-all; color: var(--text); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; color: #fff; }

.container { width: 100%; max-width: 1260px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.main { min-height: 60vh; padding-bottom: 56px; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 18px; border-radius: 13px; border: 1px solid transparent;
  font: 600 14.5px/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .12s var(--ease);
  color: var(--text); background: var(--surface); -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn .ic, .btn svg { flex: 0 0 auto; }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-line); }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-primary:hover { background: var(--primary-2); color: var(--on-primary); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary-line); background: var(--surface-2); color: var(--text); }
.btn-tg, .btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-tg:hover, .btn-soft:hover { background: var(--primary-line); color: var(--primary-2); }
.btn-success { background: var(--ok); color: #fff; }
.btn-success:hover { filter: brightness(.94); color: #fff; }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { filter: brightness(.94); color: #fff; }
.btn-danger-soft { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.btn-danger-soft:hover { border-color: var(--err); color: var(--err); }
.btn-danger-text { color: var(--err); }
.btn-danger-text:hover { color: var(--err); border-color: var(--err); background: var(--err-soft); }
.btn-white { background: #fff; color: #15173A; }
.btn-white:hover { background: #EEF0FF; color: #15173A; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15.5px; border-radius: 16px; }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; gap: 6px; }
.btn-xs { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; gap: 5px; }
.btn-icon { width: 36px; padding: 0; }
.btn-xs.btn-icon { width: 32px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row form { margin: 0; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 13px; border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background .18s, color .18s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ===== Шапка ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.burger { display: none; flex: 0 0 auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); flex: 0 0 auto; min-width: 0; }
.logo:hover { color: var(--text); }
.logo-mark {
  width: 38px; height: 38px; flex: 0 0 auto; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px 14px 14px 5px;
  background: linear-gradient(140deg, #5B7BFF, #3D5AFE 55%, #7A5CFF);
  box-shadow: 0 8px 18px -8px rgba(61, 90, 254, .8);
  transition: transform .3s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
.logo-mark svg { margin-left: -2px; }
.logo-text { font: 700 17px/1 var(--display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mainnav { display: flex; gap: 2px; margin-left: 8px; }
.mainnav a { padding: 8px 12px; border-radius: 11px; color: var(--text-2); font-weight: 600; font-size: 14.5px; transition: background .18s, color .18s; }
.mainnav a:hover { background: var(--surface); color: var(--text); }
.mainnav a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search { position: relative; flex: 1 1 auto; max-width: 420px; margin-left: auto; }
.search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--surface);
  font: 500 14.5px var(--font); color: var(--text); outline: none; transition: border-color .18s, box-shadow .18s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-ic { position: absolute; left: 13px; top: 12px; color: var(--muted); pointer-events: none; }
.header-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
.theme-btn svg { transition: transform .5s var(--ease); }
.theme-btn.spin svg { transform: rotate(180deg); }
.fav-count {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--heart); color: #fff; font: 700 11px/18px var(--font); text-align: center; border: 2px solid var(--bg);
}
.fav-count.bump { animation: bump .45s var(--ease); }
.usermenu { position: relative; margin-left: 4px; }
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; display: flex; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 6px; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none;
  transition: opacity .18s, transform .22s var(--ease);
}
.usermenu.open .dropdown { opacity: 1; transform: none; pointer-events: auto; }
.dropdown a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14px; }
.dropdown a:hover { background: var(--surface-2); }
.dropdown-head { padding: 8px 12px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Мобильное меню ===== */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-bg { position: absolute; inset: 0; background: rgba(10, 12, 40, .5); opacity: 0; transition: opacity .25s; }
.drawer.open .drawer-bg { opacity: 1; }
.drawer-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: min(86vw, 340px);
  background: var(--surface); transform: translateX(-100%); transition: transform .35s var(--ease);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom); border-radius: 0 24px 24px 0;
}
.drawer.open .drawer-panel { transform: none; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px 20px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.drawer-title { font: 700 17px var(--display); }
.drawer-sub { padding: 18px 20px 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.drawer-nav { display: flex; flex-direction: column; padding: 0 10px; }
.drawer-nav a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--text); font-weight: 600; }
.drawer-nav a:hover { background: var(--surface-2); }
.drawer-cats a .cn, .side-cats a .cn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-cats a .ci, .side-cats a .ci { width: 22px; text-align: center; flex: 0 0 auto; }
.drawer-cats a .cc, .side-cats a .cc { font-size: 12px; color: var(--muted); font-weight: 700; flex: 0 0 auto; }
body.no-scroll { overflow: hidden; }

/* ===== Главная: первый экран с живой лентой ===== */
.hero { padding: 24px 0 8px; }
.hero-box {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 40px; align-items: center;
  padding: 56px 56px 56px 60px; border-radius: 32px; background: var(--ink); color: #fff;
}
.hero-box::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 90% at 75% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 90% at 75% 40%, #000 30%, transparent 75%);
}
.hero-box::after {
  content: ''; position: absolute; z-index: -1; width: 520px; height: 520px; right: -120px; top: -160px;
  background: radial-gradient(closest-side, rgba(92, 112, 255, .55), transparent); filter: blur(10px);
}
.hero-main { min-width: 0; }
.hero h1 { color: #fff; font-size: 46px; line-height: 1.08; letter-spacing: -.03em; margin-bottom: 18px; max-width: 12em; }
.hero-sub { color: var(--ink-text); font-size: 17px; max-width: 34em; margin-bottom: 28px; }
.hero-search {
  position: relative; display: flex; gap: 8px; max-width: 560px;
  background: #fff; padding: 6px; border-radius: 18px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .55);
}
.hs-ic { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #8186AD; pointer-events: none; }
.hero-search input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: none; padding: 0 12px 0 44px; height: 50px;
  font: 500 16px var(--font); color: #15173A; background: transparent;
}
.hero-search input::placeholder { color: #8186AD; }
.hero-search .btn { height: 50px; padding: 0 26px; border-radius: 14px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; max-width: 600px; }
.hero-chips a {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 99px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #E4E6FF;
  font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .18s, border-color .18s, transform .18s var(--ease);
}
.hero-chips a:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; transform: translateY(-1px); }

/* лента «Новые в каталоге» — окно чата */
.feed {
  position: relative; min-width: 0; border-radius: 26px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
}
.feed-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.feed-ava { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, #5B7BFF, #7A5CFF); color: #fff; flex: none; }
.feed-title { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.feed-title b { font-size: 15px; color: #fff; }
.feed-title small { color: var(--ink-text); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live { width: 9px; height: 9px; border-radius: 50%; background: #3BE29B; flex: none; box-shadow: 0 0 0 0 rgba(59, 226, 155, .6); animation: pulse 2s infinite; }
.feed-body { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 16px 16px 18px; height: 352px; overflow: hidden; }
.msg { display: flex; align-items: flex-end; gap: 9px; color: inherit; min-width: 0; flex: none; }
.msg .ava { flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.bubble {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 100%;
  background: #fff; color: #15173A; padding: 9px 13px 8px; border-radius: 16px 16px 16px 5px;
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .6); transition: transform .2s var(--ease);
}
.msg:hover .bubble { transform: translateX(3px); }
.bubble b { font-size: 14px; color: color-mix(in srgb, var(--c) 70%, #15173A); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-cat { font-size: 13px; color: #4A4F7A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-meta { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; color: #8186AD; font-weight: 600; }
.msg-meta time { font-weight: 500; flex: none; }
.msg.enter { animation: msg-in .6s var(--ease) both; }
.msg.leave { animation: msg-out .45s ease both; }

@keyframes msg-in { from { opacity: 0; transform: translateY(28px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes msg-out { to { opacity: 0; transform: translateY(-14px) scale(.96); margin-top: -76px; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(59, 226, 155, .55); } 70% { box-shadow: 0 0 0 10px rgba(59, 226, 155, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 226, 155, 0); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes heart-pop { 0% { transform: scale(1); } 30% { transform: scale(1.35); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(260%) skewX(-20deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ===== Секции ===== */
.section { margin-top: 48px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.h-ico { font-size: .9em; }
.more {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 14px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
  font: 600 13.5px var(--font); white-space: nowrap; cursor: pointer; flex: none; transition: border-color .18s, color .18s;
}
.more::after { content: ''; width: 6px; height: 6px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); margin-left: 4px; transition: transform .2s var(--ease); }
.more:hover { border-color: var(--primary-line); color: var(--primary); }
.more:hover::after { transform: translateX(2px) rotate(45deg); }
button.more::after { display: none; }

/* появление при прокрутке (один раз) */
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
.js [data-reveal].in { animation: rise .55s var(--ease) both; animation-delay: var(--d, 0s); opacity: 1; transform: none; }

/* ===== Категории ===== */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cat-tile {
  --h: 230;
  position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 76px;
  padding: 14px 16px; border-radius: 18px; color: var(--text);
  background: hsl(var(--h) var(--tile-s) var(--tile-l)); border: 1px solid hsl(var(--h) 60% 50% / .14);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.cat-tile:hover { color: var(--text); transform: translateY(-3px); box-shadow: 0 16px 30px -18px hsl(var(--h) 70% 40% / .55); border-color: hsl(var(--h) 70% 50% / .35); }
.cat-ico {
  width: 46px; height: 46px; border-radius: 15px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; font-size: 23px; line-height: 1;
  background: hsl(var(--h, 230) var(--tile-s) var(--tile-ico-l));
  transition: transform .35s var(--ease);
}
.cat-tile:hover .cat-ico { transform: rotate(-8deg) scale(1.08); }
.cat-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.cat-name { font-weight: 700; font-size: 15px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cat-count { font-size: 12.5px; color: var(--text-2); margin-top: 3px; white-space: nowrap; opacity: .8; }
.cat-all { display: none; margin-top: 12px; }
.cat-more { margin-top: 14px; }
.cat-more summary { list-style: none; cursor: pointer; }
.cat-more summary::-webkit-details-marker { display: none; }
.cat-more summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: 8px; transition: transform .25s var(--ease); }
.cat-more[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.cat-more[open] .cat-cloud { animation: rise .4s var(--ease) both; }
.cat-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cat-cloud a {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px;
  background: hsl(var(--h, 230) var(--tile-s) var(--tile-l)); border: 1px solid hsl(var(--h, 230) 60% 50% / .16);
  color: var(--text); font-size: 14px; font-weight: 600; max-width: 100%; transition: border-color .18s, transform .18s var(--ease);
}
.cat-cloud a:hover { border-color: hsl(var(--h, 230) 70% 50% / .5); color: var(--text); transform: translateY(-1px); }
.cat-cloud a span { color: var(--muted); font-weight: 700; font-size: 12px; }

/* ===== Карточки каналов ===== */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: transform .28s var(--ease), box-shadow .28s, border-color .28s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-line); }
.card--hl {
  border: 1.5px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--sun), #FF7AA8 50%, var(--primary)) border-box;
}
.card--hl:hover { border-color: transparent; }
.card--top .card-head .ava { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.card--pin { padding-top: 30px; }
.card-ribbon {
  position: absolute; top: 0; left: 18px; display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px; border-radius: 0 0 10px 10px; background: var(--sun); color: #3A2600; font-size: 12px; font-weight: 700;
}
.card-head { display: flex; align-items: center; gap: 13px; min-width: 0; padding-right: 34px; }
.card-head .ava { transition: transform .35s var(--ease); }
.card:hover .card-head .ava { transform: scale(1.06) rotate(-3deg); }
.card-meta { min-width: 0; flex: 1 1 auto; }
.card-title {
  font-size: 15.5px; font-weight: 700; margin: 0 0 2px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.card-title a { color: var(--text); }
.card-title a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); z-index: 1; }
.card-title a:hover { color: var(--primary); }
.card-user { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-desc {
  margin: 14px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; height: calc(1.5em * 3); flex: 0 0 auto;
}
.card-tags { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; min-width: 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 16px; min-width: 0; }
.card-tags + .card-foot, .card-desc + .card-foot { margin-top: 14px; }
.card-foot .btn { margin-left: auto; position: relative; z-index: 2; flex: 0 0 auto; }
.subs { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--text); flex: 0 0 auto; }
.subs svg { color: var(--muted); }
.btn-open { background: var(--primary-soft); color: var(--primary); border-radius: 99px; padding: 0 14px 0 16px; }
.btn-open svg { transition: transform .25s var(--ease); }
.btn-open:hover { background: var(--primary); color: var(--on-primary); }
.btn-open:hover svg { transform: translate(2px, -2px); }
.fav-btn {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer; background: transparent; color: var(--muted);
  transition: color .2s, background .2s;
}
.card--pin .fav-btn { top: 26px; }
.fav-btn svg { fill: transparent; transition: fill .2s; }
.fav-btn:hover { background: var(--surface-2); color: var(--heart); }
.fav-btn[aria-pressed="true"] { color: var(--heart); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }
.fav-btn.pop svg { animation: heart-pop .5s var(--ease); }
.verified {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: 2px;
  width: 16px; height: 16px; margin-left: 5px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 10px; font-weight: 900;
}

/* Аватары */
.ava {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  border-radius: 50%; color: #fff; font-weight: 700; object-fit: cover; background: var(--surface-3);
  font-family: var(--display);
}
.ava-sm { width: 36px; height: 36px; font-size: 14px; }
.ava-md { width: 54px; height: 54px; font-size: 20px; }
.ava-xl { width: 120px; height: 120px; font-size: 44px; }

/* Чипы, бейджи, статусы */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 600;
}
a.chip:hover { border-color: var(--primary-line); color: var(--primary); }
.chip-lg { height: 36px; padding: 0 14px; font-size: 14px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.badge-cat { position: relative; z-index: 2; background: var(--surface-2); color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 24px; }
a.badge-cat:hover { color: var(--primary); background: var(--primary-soft); }
.badge-top { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.badge-hl { background: var(--sun-soft); color: var(--sun-text); }
.badge-pin { background: var(--sun-soft); color: var(--sun-text); }
.status { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; flex: 0 0 auto; }
.status-ok { background: var(--ok-soft); color: var(--ok); }
.status-warn { background: var(--warn-soft); color: var(--warn); }
.status-err { background: var(--err-soft); color: var(--err); }
.status-info { background: var(--primary-soft); color: var(--primary); }
.tag-18 { display: inline-block; vertical-align: 1px; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--err); border-radius: 5px; padding: 1px 5px; margin-left: 4px; line-height: 1.3; }

/* ===== Общие страницы ===== */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); padding: 20px 0 10px; min-width: 0; }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--primary); }
.crumbs > span:last-child { color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.page-head { display: flex; gap: 18px; align-items: center; padding: 8px 0 24px; }
.page-head-row { justify-content: space-between; flex-wrap: wrap; padding-top: 28px; }
.page-head-ico {
  width: 64px; height: 64px; border-radius: 20px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: var(--surface); border: 1px solid var(--line);
}
.page-head-txt { min-width: 0; }
.page-head h1 { margin-bottom: 6px; }
.page-head h1 small { font-size: .55em; color: var(--muted); font-weight: 600; font-family: var(--font); }
.lead { color: var(--text-2); font-size: 16px; margin: 0; max-width: 46em; }

.layout-side { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 28px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-width: thin; border-radius: var(--radius); }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.side-title { font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px 10px 8px; }
.side-cats { display: flex; flex-direction: column; }
.side-cats a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 11px; color: var(--text); font-size: 14px; font-weight: 600; transition: background .15s; }
.side-cats a:hover { background: var(--surface-2); }
.side-cats a.active { background: var(--primary-soft); color: var(--primary); }
.content { min-width: 0; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 15px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .2s, color .2s; }
.tab span { color: var(--muted); font-size: 12px; margin-left: 3px; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { background: var(--text); color: var(--bg); }
.tab.active span { color: inherit; opacity: .7; }
.sort { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-3); font-size: 13.5px; font-weight: 600; }
.sort a { color: var(--text-2); padding: 6px 12px; border-radius: 10px; }
.sort a.active { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 32px 0 8px; }
.pg { min-width: 42px; height: 42px; padding: 0 10px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, color .15s; }
a.pg:hover { border-color: var(--primary); color: var(--primary); }
.pg-cur { background: var(--text); border-color: var(--text); color: var(--bg); }
.pg-dots { border: 0; background: none; min-width: 20px; }

.empty { text-align: center; padding: 52px 20px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty-ico { font-size: 46px; margin-bottom: 10px; display: inline-block; animation: float 5s ease-in-out infinite; }
.empty-404 { margin-top: 40px; border-style: solid; }
.empty p { color: var(--text-2); max-width: 30em; margin-left: auto; margin-right: auto; }

.cta {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 56px; padding: 36px 40px; border-radius: 28px; color: #fff; background: var(--ink);
}
.cta::before {
  content: ''; position: absolute; z-index: -1; inset: auto -60px -140px auto; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(122, 92, 255, .6), transparent);
}
.cta h2 { color: #fff; margin-bottom: 8px; }
.cta p { margin: 0; color: var(--ink-text); max-width: 40em; }
.cta-act { flex: none; }
.cta-sm { padding: 24px 28px; margin-top: 32px; border-radius: 22px; }
.cta-sm h2 { font-size: 18px; }

.seo-text { margin-top: 48px; padding: 32px 36px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-2); font-size: 15.5px; line-height: 1.7; }
.seo-text h2 { font-size: 19px; margin-top: 1.4em; }
.seo-text h2:first-child { margin-top: 0; }
.seo-text p { max-width: 70ch; }
.seo-text p:last-child { margin-bottom: 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* ===== FAQ ===== */
.faq { margin-top: 32px; }
.faq h2 { font-size: 21px; margin-bottom: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; transition: border-color .2s; overflow: hidden; }
.faq-item[open] { border-color: var(--primary-line); }
.faq-item summary { cursor: pointer; list-style: none; padding: 17px 56px 17px 20px; font-weight: 700; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; right: 18px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233D5AFE' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") no-repeat center;
  transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(135deg); }
.faq-a { padding: 0 20px 18px; color: var(--text-2); line-height: 1.65; }
.faq-item[open] .faq-a { animation: rise .35s var(--ease) both; }

/* ===== Главная: темы, недавние ===== */
.themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.theme { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; min-width: 0; position: relative; overflow: hidden; }
.theme::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: hsl(var(--h, 230) 75% 60%); }
.theme-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); margin-bottom: 10px; min-width: 0; }
.theme-head span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-head:hover { color: var(--primary); }
.theme-ico { width: 36px; height: 36px; border-radius: 12px; background: hsl(var(--h, 230) var(--tile-s) var(--tile-ico-l)); display: grid; place-items: center; font-size: 18px; flex: none; }
.mini-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.mini-list a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 12px; color: var(--text); min-width: 0; transition: background .15s; }
.mini-list a:hover { background: var(--surface-2); }
.ml-n { width: 16px; flex: none; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.mini-list .ava { flex: none; }
.ml-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-s { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.theme-more { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--primary); }
.recent-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.recent-row::-webkit-scrollbar { display: none; }
.recent-item {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto; max-width: 260px; padding: 8px 16px 8px 8px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px;
  animation: rise .4s var(--ease) both; animation-delay: var(--d, 0s);
}
.recent-item:hover { border-color: var(--primary-line); color: var(--primary); }
.recent-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Закреп ===== */
.section-pin { background: linear-gradient(180deg, var(--sun-soft), color-mix(in srgb, var(--sun-soft) 30%, var(--bg))); border: 1px solid var(--sun-line); border-radius: 28px; padding: 22px; }
.pin-ctl { display: flex; align-items: center; gap: 8px; }
.pin-carousel { position: relative; margin: 0 -4px; --cols: min(var(--n, 4), 4); }
.pin-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--cols) - 1) * 16px) / var(--cols)); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 4px 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.pin-track::-webkit-scrollbar { display: none; }
.pin-slide { scroll-snap-align: start; display: flex; min-width: 0; }
.pin-slide .card { width: 100%; }
.pin-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.pin-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: var(--sun-line); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.pin-dots button.on { width: 24px; background: var(--sun); }
@media (max-width: 1180px) { .pin-carousel { --cols: min(var(--n, 3), 3); } }
@media (max-width: 860px) { .pin-carousel { --cols: min(var(--n, 2), 2); } }
.pin-carousel[style*="--n:1"] .pin-track { grid-auto-columns: min(100%, 420px); }

/* ===== Категория: баннер ===== */
.cat-hero {
  --h: 230;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 28px; padding: 32px 36px; margin-bottom: 22px; border-radius: 28px;
  background: hsl(var(--h) var(--tile-s) var(--tile-l)); border: 1px solid hsl(var(--h) 60% 50% / .16);
}
.cat-hero::before {
  content: ''; position: absolute; z-index: -1; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(closest-side, hsl(var(--h) 90% 70% / .45), transparent);
}
.cat-hero-txt { min-width: 0; flex: 1; }
.cat-hero h1 { font-size: 30px; margin-bottom: 10px; }
.cat-hero .lead { color: var(--text-2); }
.cat-hero-ico {
  flex: none; width: 112px; height: 112px; border-radius: 34px; display: grid; place-items: center; font-size: 56px; line-height: 1;
  background: hsl(var(--h) var(--tile-s) var(--tile-ico-l)); box-shadow: 0 20px 40px -22px hsl(var(--h) 70% 35% / .6);
  animation: float 6s ease-in-out infinite;
}
.cat-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cat-meta span { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 75%, transparent); font-size: 13px; color: var(--text-2); }
.cat-meta b { color: var(--text); }

.top10 { margin-top: 32px; }
.top10 h2 { font-size: 20px; margin-bottom: 14px; }
.top-list { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.top-list li { position: relative; display: grid; grid-template-columns: 30px 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; min-width: 0; transition: background .15s; }
.top-list li:hover { background: var(--surface-2); }
.tl-n { width: 30px; height: 30px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font: 600 13px var(--display); color: var(--text-2); }
.top-list li:nth-child(1) .tl-n { background: linear-gradient(140deg, #FFD66B, #FFB31F); color: #4A3000; }
.top-list li:nth-child(2) .tl-n { background: linear-gradient(140deg, #E8EBF5, #BFC5DA); color: #2B3050; }
.top-list li:nth-child(3) .tl-n { background: linear-gradient(140deg, #FFC9A0, #E58F55); color: #4A2200; }
.tl-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tl-t { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-t::after { content: ''; position: absolute; inset: 0; }
.tl-t:hover { color: var(--primary); }
.tl-bar { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.tl-bar i { display: block; height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, var(--primary), #8A63FF); transform-origin: left; }
.js .top10 .tl-bar i { transform: scaleX(0); transition: transform 1s var(--ease); }
.js .top10.in .tl-bar i { transform: none; }
.tl-s { font-size: 14px; font-weight: 700; white-space: nowrap; }
.related { margin-top: 32px; }
.related h2 { font-size: 20px; margin-bottom: 14px; }

/* ===== Страница канала ===== */
.channel-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; margin-top: 4px; }
.channel-side { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.channel { padding: 0; overflow: hidden; }
.ch-cover { position: relative; height: 168px; overflow: hidden; background: var(--c, var(--primary)); }
.ch-cover img { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(34px) saturate(1.4); transform: scale(1.1); opacity: .9; }
.ch-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .18), transparent 40%), linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--surface) 35%, transparent)); }
.ch-cover-pattern { position: absolute; inset: 0; opacity: .25; background-image: radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1.4px); background-size: 18px 18px; }
.channel-body { padding: 0 28px 28px; }
.channel-head { display: flex; gap: 22px; align-items: flex-end; min-width: 0; margin-top: -60px; position: relative; }
.channel-head .ava { box-shadow: 0 0 0 6px var(--surface); animation: pop-in .6s var(--ease) both; }
.channel-info { min-width: 0; padding-bottom: 4px; }
.channel-info h1 { font-size: 28px; margin-bottom: 4px; overflow-wrap: anywhere; }
.channel-user { color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.channel-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.channel-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 0; }
.channel-stats div { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.channel-stats b { display: block; font: 600 20px/1.2 var(--display); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-stats span { font-size: 12.5px; color: var(--muted); }
.channel-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; }
.btn-join { position: relative; overflow: hidden; height: 54px; font-size: 16px; border-radius: 16px; }
.btn-join::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-120%) skewX(-20deg); }
.btn-join:hover::after { animation: shine .9s ease; }
.btn-square { width: 54px; height: 54px; padding: 0; border-radius: 16px; }
.btn-square[aria-pressed="true"] { color: var(--heart); border-color: color-mix(in srgb, var(--heart) 40%, transparent); background: color-mix(in srgb, var(--heart) 10%, var(--surface)); }
.btn-square svg { fill: transparent; transition: fill .2s; }
.btn-square[aria-pressed="true"] svg { fill: currentColor; }
.btn-square.pop svg { animation: heart-pop .5s var(--ease); }
.channel-desc { margin-top: 28px; }
.channel-desc h2 { font-size: 18px; }
.desc-text { color: var(--text-2); overflow-wrap: anywhere; line-height: 1.65; }
.channel-about { margin: 16px 0 0; line-height: 1.6; }
.channel-link { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--surface-2); font-size: 14px; color: var(--muted); min-width: 0; }
.channel-link code { min-width: 0; flex: 1; border: 0; background: none; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; font-size: 14px; }
.channel-link .btn { flex: none; }
.owner-bar { margin-top: 16px; }
.report { margin-top: 18px; }
.report > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.report > summary::-webkit-details-marker { display: none; }
.report > summary:hover { color: var(--err); }
.report-form { margin-top: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; animation: rise .35s var(--ease) both; }
.report-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.report-reasons label { cursor: pointer; }
.report-reasons input { position: absolute; opacity: 0; pointer-events: none; }
.report-reasons span { display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .18s; }
.report-reasons input:checked + span { border-color: var(--err); background: var(--err-soft); color: var(--err); }
.report-reasons input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-line); }
.report-form textarea { width: 100%; min-height: 70px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 14px var(--font); resize: vertical; }
.report-done { color: var(--ok); font-weight: 600; font-size: 14px; }
.side-promo { background: var(--ink); color: #fff; border: 0; position: relative; overflow: hidden; isolation: isolate; }
.side-promo::before { content: ''; position: absolute; z-index: -1; width: 240px; height: 240px; right: -80px; bottom: -110px; border-radius: 50%; background: radial-gradient(closest-side, rgba(122, 92, 255, .65), transparent); }
.side-promo h2 { color: #fff; }
.side-promo p { color: var(--ink-text); }
.side-share { display: flex; flex-direction: column; gap: 10px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 400; transform: translate(-50%, 20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-lg); transition: opacity .25s, transform .35s var(--ease); pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Формы ===== */
.form { display: flex; flex-direction: column; gap: 16px; }
.form h3 { margin: 10px 0 0; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; min-width: 0; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface);
  font: 500 15px var(--font); color: var(--text); outline: none; transition: border-color .18s, box-shadow .18s;
}
.form textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form .check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.form .check input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--primary); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.lbl { display: block; }
.packages { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.packages legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.pkg { position: relative; cursor: pointer; display: block !important; }
.pkg input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-body { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .18s, background .18s, transform .18s var(--ease); }
.pkg:hover .pkg-body { transform: translateY(-2px); }
.pkg input:checked + .pkg-body { border-color: var(--primary); background: var(--primary-soft); }
.pkg input:focus-visible + .pkg-body { box-shadow: 0 0 0 3px var(--primary-line); }
.pkg-off { opacity: .55; cursor: not-allowed; }
.pkg-name { font-weight: 700; font-size: 14.5px; }
.pkg-desc { font-weight: 500; font-size: 12.5px; color: var(--muted); flex: 1 1 auto; }
.pkg-price { font: 600 16px var(--display); color: var(--primary); white-space: nowrap; }
.pkg-hint { grid-column: 1 / -1; margin: 0; }
.form input[type=file] { height: auto !important; padding: 10px 12px !important; font-size: 14px !important; background: var(--surface-2) !important; cursor: pointer; }
.form input[type=file]::file-selector-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 13px var(--font); padding: 7px 12px; border-radius: 9px; margin-right: 10px; cursor: pointer; }
.preview { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); min-width: 0; }

/* Алерты */
.flashes { padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.alert { padding: 13px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; border: 1px solid transparent; overflow-wrap: anywhere; animation: rise .35s var(--ease) both; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert-error { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.alert-info { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-line); }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }

/* Авторизация */
.auth-wrap { display: flex; justify-content: center; padding-top: 40px; }
.auth { width: 100%; max-width: 440px; }
.auth h1 { font-size: 26px; }
.auth-switch { text-align: center; margin: 18px 0 0; font-size: 14px; }

/* Мои каналы */
.my-list { display: flex; flex-direction: column; gap: 12px; }
.my-item { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.my-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.my-info { min-width: 0; flex: 1 1 0; }
.my-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-title a { color: var(--text); }
.my-info .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-status { margin-top: 6px; }

/* 18+ */
.age-gate { position: fixed; inset: 0; z-index: 200; background: rgba(10, 12, 40, .85); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.age-box { background: var(--surface); border-radius: 26px; padding: 34px; max-width: 420px; width: 100%; text-align: center; animation: pop-in .4s var(--ease) both; }
.age-ico { font-size: 50px; }
.age-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Жалобы в админке */
.report-list { display: flex; flex-direction: column; gap: 10px; }
.report-item { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.report-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.report-ch { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.report-ch a { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-comment { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.report-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* HTML-карта сайта */
.map-grid { columns: 3 260px; column-gap: 20px; }
.map-block { break-inside: avoid; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.map-block h2 { font-size: 15px; font-family: var(--font); font-weight: 700; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.map-block h2 a { color: var(--text); }
.map-block ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.map-block li { padding: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-block li a { color: var(--text-2); }
.map-block li a:hover { color: var(--primary); }

/* ===== Подвал ===== */
.footer { background: var(--ink); color: var(--ink-text); padding: 52px 0 26px; margin-top: 56px; border-radius: 32px 32px 0 0; }
.footer a { color: #E4E6FF; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1.4fr; gap: 36px; }
.logo-footer .logo-text { color: #fff; }
.footer-about p { font-size: 14px; margin-top: 14px; max-width: 34em; }
.footer-h { color: #fff; font: 600 14px var(--display); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer-cats-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; font-size: 14px; }
.footer-cats-list a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; }

/* ===== Адаптив ===== */
@media (max-width: 1240px) {
  .mainnav { display: none; }
  .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-box { padding: 44px 40px; gap: 28px; }
  .hero h1 { font-size: 38px; }
  .channel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .layout-side { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .burger { display: inline-flex; margin-left: -8px; }
  .channel-layout { grid-template-columns: minmax(0, 1fr); }
  .channel-side { position: static; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-box { grid-template-columns: minmax(0, 1fr); }
  .feed-body { height: 300px; }
}
@media (max-width: 860px) {
  .cards, .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-add span { display: none; }
  .btn-add { width: 42px; padding: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .cta { flex-direction: column; align-items: stretch; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  body { font-size: 15px; }
  .container { padding: 0 14px; }
  h1 { font-size: 24px; }
  h2 { font-size: 19px; }
  .header-in { gap: 4px; }
  .logo-text { display: none; }
  .search { margin-left: 4px; }
  .search input { height: 40px; font-size: 16px; padding-left: 36px; }
  .search-ic { left: 11px; top: 11px; }
  .icon-btn { width: 38px; height: 38px; }
  .btn-login { padding: 0; width: 40px; height: 40px; }
  .btn-login span { display: none; }
  .btn-add { height: 40px; width: 40px; }
  .header-actions .fav-link { display: none; }
  .hero { padding-top: 12px; }
  .hero-box { padding: 28px 20px 20px; border-radius: 26px; gap: 22px; }
  .hero h1 { font-size: 29px; margin-bottom: 12px; }
  .hero-sub { font-size: 15px; margin-bottom: 20px; }
  .hero-search { padding: 4px; border-radius: 15px; }
  .hs-ic { left: 14px; }
  .hero-search input { height: 46px; padding-left: 36px; font-size: 16px; }
  .hero-search .btn { height: 46px; padding: 0 16px; }
  .hero-chips { flex-wrap: nowrap; overflow-x: auto; margin: 16px -20px 0; padding: 0 20px 2px; scrollbar-width: none; }
  .hero-chips::-webkit-scrollbar { display: none; }
  .feed { border-radius: 20px; margin: 0 -6px; }
  .feed-body { height: 236px; padding: 12px; }
  .section { margin-top: 36px; }
  .section-head h2 { font-size: 18px; }
  .more { height: 32px; padding: 0 12px; font-size: 13px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { flex-direction: column; align-items: flex-start; padding: 12px; gap: 10px; min-height: 112px; border-radius: 16px; }
  .cat-ico { width: 40px; height: 40px; font-size: 20px; border-radius: 13px; }
  .cat-txt { width: 100%; flex: 1 1 auto; justify-content: space-between; }
  .cat-name { font-size: 14px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
  .cat-count { font-size: 12px; }
  .cards, .cards-3 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .card { padding: 15px; border-radius: 18px; }
  .card:hover { transform: none; }
  .card-desc { height: auto; max-height: calc(1.5em * 3); margin-top: 10px; }
  .ava-md { width: 48px; height: 48px; font-size: 18px; }
  .ava-xl { width: 92px; height: 92px; font-size: 34px; }
  .page-head { gap: 12px; padding-bottom: 16px; }
  .page-head .page-head-ico { display: none; }
  .lead { font-size: 15px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .tabs { width: 100%; }
  .tab { flex: 1 0 auto; text-align: center; }
  .sort { align-self: flex-end; }
  .cta { padding: 26px 22px; border-radius: 24px; }
  .cta .btn { width: 100%; }
  .seo-text { padding: 22px 18px; font-size: 15px; }
  .panel { padding: 18px; border-radius: 18px; }
  .cat-hero { flex-direction: column-reverse; align-items: flex-start; gap: 14px; padding: 22px 18px; border-radius: 22px; }
  .cat-hero h1 { font-size: 23px; }
  .cat-hero-ico { width: 68px; height: 68px; font-size: 34px; border-radius: 22px; }
  .cat-meta span { height: 28px; font-size: 12.5px; }
  .top-list li { grid-template-columns: 28px 36px minmax(0, 1fr) auto; gap: 10px; padding: 9px 4px; }
  .tl-s .muted { display: none; }
  .channel { border-radius: 22px; }
  .ch-cover { height: 120px; }
  .channel-body { padding: 0 16px 20px; }
  .channel-head { flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-top: -48px; }
  .channel-info { width: 100%; }
  .channel-info h1 { font-size: 22px; }
  .channel-tags { justify-content: center; }
  .channel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .channel-stats div { padding: 12px; }
  .channel-stats b { font-size: 17px; }
  .channel-actions { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  .btn-join { height: 52px; font-size: 15px; }
  .channel-actions { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  .channel-actions .btn-join { grid-column: auto; }
  .channel-actions .btn-square { width: 52px; height: 52px; }
  .pod-medal { width: 24px; height: 24px; top: 6px; left: 6px; font-size: 12px; border-radius: 8px; }
  .pod-medal .ui-ic { width: 14px; height: 14px; }
  .pod { padding-top: 26px; }
  .btn-square { width: 52px; height: 52px; }
  .channel-link-label { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .packages { grid-template-columns: 1fr; }
  .footer { border-radius: 26px 26px 0 0; padding-top: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; }
  .logo-footer .logo-text { display: inline; }
  .pg { min-width: 38px; height: 38px; }
  .auth-wrap { padding-top: 20px; }
  .themes { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -14px; padding: 0 14px 6px; scrollbar-width: none; }
  .themes::-webkit-scrollbar { display: none; }
  .theme { flex: 0 0 86%; scroll-snap-align: center; }
  .section-pin { padding: 14px; border-radius: 22px; margin-left: -4px; margin-right: -4px; }
  .pin-track { grid-auto-columns: 86%; gap: 10px; }
  .pin-ctl .btn-icon { display: none; }
  .faq h2 { font-size: 19px; }
  .faq-item summary { padding: 15px 52px 15px 16px; }
  .faq-a { padding: 0 16px 16px; }
  .map-grid { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
.msg .bubble { flex: 0 1 auto; min-width: 220px; max-width: calc(100% - 46px); }
.feed-body { height: 404px; -webkit-mask-image: linear-gradient(transparent, #000 44px); mask-image: linear-gradient(transparent, #000 44px); }
@media (max-width: 1024px) { .feed-body { height: 330px; } }
@media (max-width: 640px) { .feed-body { height: 250px; } }
.channel-head { margin-top: -52px; }
@media (max-width: 640px) { .channel-head { margin-top: -46px; } }
.panel.channel { padding: 0; }
@media (max-width: 640px) {
  .btn-login .ic { display: inline-block; }
  .channel-actions { grid-template-columns: 1fr 1fr; }
  .btn-join { grid-column: 1 / -1; }
  .channel-actions .btn-square { width: 100%; height: 46px; }
}
.admin-nav-title, .side-title { text-transform: none; letter-spacing: 0; }

/* ================= v2: карточка канала ================= */
.ch-cover { height: 190px; }
.ch-blob { position: absolute; width: 340px; height: 340px; border-radius: 50%; filter: blur(30px); opacity: .7; }
.ch-blob.b1 { left: -60px; top: -140px; background: radial-gradient(closest-side, rgba(255, 255, 255, .55), transparent); animation: drift1 14s ease-in-out infinite alternate; }
.ch-blob.b2 { right: 10%; top: -60px; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 40%, #7A5CFF), transparent); animation: drift2 18s ease-in-out infinite alternate; }
.ch-cover-emoji { position: absolute; right: 28px; bottom: -18px; font-size: 120px; line-height: 1; opacity: .22; transform: rotate(-12deg); filter: saturate(.6); }
@keyframes drift1 { to { transform: translate(260px, 60px) scale(1.2); } }
@keyframes drift2 { to { transform: translate(-220px, 40px) scale(.85); } }
.ava-ring { position: relative; display: inline-flex; border-radius: 50%; flex: none; }
.ava-ring.is-hot::before {
  content: ''; position: absolute; inset: -9px; border-radius: 50%; z-index: 0;
  background: conic-gradient(from 0deg, var(--sun), #FF7AA8, var(--primary), #3BE29B, var(--sun));
  animation: spin 6s linear infinite;
}
.ava-ring .ava { position: relative; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.chip-rank { background: var(--sun-soft); border-color: var(--sun-line); color: var(--sun-text); }
a.chip-rank:hover { color: var(--sun-text); border-color: var(--sun); }
.channel-stats .st { position: relative; overflow: hidden; transition: transform .25s var(--ease), background .25s; }
.channel-stats .st:hover { transform: translateY(-2px); }
.channel-stats .st i { position: absolute; right: 10px; top: 8px; font-style: normal; font-size: 18px; opacity: .55; transition: transform .35s var(--ease), opacity .25s; }
.channel-stats .st:hover i { transform: scale(1.25) rotate(-10deg); opacity: 1; }
.st-subs { background: linear-gradient(140deg, var(--primary-soft), var(--surface-2)) !important; }
.desc-text.is-long { position: relative; max-height: 11.5em; overflow: hidden; transition: max-height .5s var(--ease); }
.desc-text.is-long::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4em; background: linear-gradient(transparent, var(--surface)); transition: opacity .3s; }
.desc-text.is-long.open { max-height: 200em; }
.desc-text.is-long.open::after { opacity: 0; }
.desc-more { margin-top: 8px; border: 0; background: none; padding: 0; color: var(--primary); font: 600 14px var(--font); cursor: pointer; }
.ch-place { margin-top: 26px; padding: 20px 22px; border-radius: 20px; background: linear-gradient(140deg, var(--primary-soft), color-mix(in srgb, var(--sun-soft) 60%, var(--surface))); }
.ch-place-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ch-place h2 { font-size: 17px; margin-bottom: 4px; }
.ch-place p { margin: 0; color: var(--text-2); font-size: 14px; }
.ch-place-rank { flex: none; display: flex; flex-direction: column; align-items: flex-end; font: 700 30px/1 var(--display); color: var(--primary); letter-spacing: -.03em; }
.ch-place-rank small { font: 600 12px var(--font); color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.ch-place-bar { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 70%, transparent); margin: 16px 0 10px; overflow: hidden; }
.ch-place-bar i { display: block; height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, var(--primary), #8A63FF, #FF7AA8); transform-origin: left; }
.js .ch-place .ch-place-bar i { transform: scaleX(0); transition: transform 1.2s var(--ease) .2s; }
.js .ch-place.in .ch-place-bar i { transform: none; }
.ch-place-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.ch-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 22px 0 0; }
.ch-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); min-width: 0; font-size: 14px; }
.ch-facts dt { color: var(--muted); flex: none; }
.ch-facts dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 70;
  display: none; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translateY(140%); transition: transform .4s var(--ease);
}
.join-bar.show { transform: none; }
.join-bar-t { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1024px) { .join-bar { display: flex; } }

/* ================= v2: категория ================= */
.cat-hero { min-height: 190px; }
.cat-hero-art { position: relative; flex: none; width: 150px; height: 130px; display: grid; place-items: center; }
.spark { position: absolute; font-size: 22px; opacity: .55; animation: spark 7s ease-in-out infinite; }
.spark.s1 { left: 0; top: 6px; }
.spark.s2 { right: -4px; top: 0; font-size: 16px; animation-delay: -2.3s; }
.spark.s3 { right: 8px; bottom: -2px; font-size: 19px; animation-delay: -4.6s; }
@keyframes spark { 0%, 100% { transform: translate(0, 0) rotate(0); opacity: .35; } 50% { transform: translate(6px, -14px) rotate(18deg); opacity: .8; } }
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 14px; align-items: end; margin-bottom: 22px; }
.pod {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0;
  padding: 22px 16px 0; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.pod:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-line); }
.pod-1 { padding-top: 30px; border-color: var(--sun-line); background: linear-gradient(180deg, var(--sun-soft), var(--surface) 70%); }
.pod-medal { position: absolute; top: 10px; left: 12px; font-size: 24px; }
.pod-ava { display: inline-flex; border-radius: 50%; padding: 3px; background: var(--line); transition: transform .35s var(--ease); }
.pod-1 .pod-ava { background: linear-gradient(140deg, #FFD66B, #FFB31F); }
.pod-1 .pod-ava .ava { width: 66px; height: 66px; }
.pod:hover .pod-ava { transform: scale(1.06); }
.pod-ava .ava { box-shadow: 0 0 0 3px var(--surface); }
.pod-name { font-weight: 700; font-size: 15px; line-height: 1.3; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pod-subs { font-size: 13px; color: var(--muted); }
.pod-subs b { color: var(--text); }
.pod-step { align-self: stretch; margin: 12px -16px 0; height: 34px; display: grid; place-items: center; font: 700 16px var(--display); color: var(--text-2); background: var(--surface-2); border-top: 1px solid var(--line); }
.pod-1 .pod-step { height: 52px; background: linear-gradient(140deg, #FFD66B, #FFB31F); color: #4A3000; border-top: 0; }
.pod-2 .pod-step { height: 40px; }
.cat-toolbar { position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; padding: 8px; margin: 0 -8px 18px; border-radius: 18px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.cat-search { position: relative; flex: 1 1 220px; max-width: 300px; }
.cat-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.cat-search input { width: 100%; height: 44px; padding: 0 14px 0 38px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: 500 14.5px var(--font); outline: none; transition: border-color .18s, box-shadow .18s; }
.cat-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.toolbar-end { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.view-switch { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-3); }
.view-switch button { width: 34px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.view-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search-note { margin: -6px 0 16px; font-size: 14px; color: var(--text-2); }
.side-cta { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding: 16px; border-radius: 18px; color: var(--text); background: hsl(var(--h, 230) var(--tile-s) var(--tile-l)); border: 1px solid hsl(var(--h, 230) 60% 50% / .18); transition: transform .25s var(--ease); }
.side-cta:hover { color: var(--text); transform: translateY(-2px); }
.side-cta b { font-size: 14.5px; }
.side-cta span { font-size: 13px; color: var(--primary); font-weight: 600; }
/* вид «списком» */
.cards.is-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cards.is-list .card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; grid-template-areas: "head desc foot" "head tags foot"; align-items: center; gap: 4px 20px; padding: 14px 16px; }
.cards.is-list .card-head { grid-area: head; padding-right: 0; }
.cards.is-list .card-desc { grid-area: desc; margin: 0; height: auto; -webkit-line-clamp: 2; max-height: 3em; }
.cards.is-list .card-tags { grid-area: tags; margin: 0; }
.cards.is-list .card-foot { grid-area: foot; margin: 0; padding: 0; gap: 14px; }
.cards.is-list .fav-btn { position: relative; top: auto; right: auto; order: 3; }
.cards.is-list .card-foot .btn { margin-left: 0; }
.cards.is-list .card:hover { transform: translateX(3px); }
.cards.swap .card { animation: rise .4s var(--ease) both; }
.cards.is-list .card--pin { padding-top: 14px; }

@media (max-width: 860px) {
  .cards.is-list .card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head foot" "desc desc" "tags tags"; }
}
@media (max-width: 640px) {
  .ch-cover { height: 132px; }
  .ch-cover-emoji { font-size: 84px; right: 14px; }
  .ch-facts { grid-template-columns: minmax(0, 1fr); }
  .ch-place { padding: 16px; }
  .ch-place-rank { font-size: 24px; }
  .cat-hero-art { width: 110px; height: 80px; align-self: flex-start; }
  .cat-hero { min-height: 0; }
  .podium { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pod { padding: 18px 8px 0; border-radius: 18px; }
  .pod-1 { padding-top: 24px; }
  .pod-medal { font-size: 18px; top: 6px; left: 8px; }
  .pod-ava .ava { width: 44px; height: 44px; font-size: 17px; }
  .pod-1 .pod-ava .ava { width: 54px; height: 54px; }
  .pod-name { font-size: 13px; }
  .pod-subs { font-size: 12px; }
  .pod-subs { display: flex; flex-direction: column; }
  .pod-step { margin: 10px -8px 0; }
  .cat-toolbar { flex-direction: row; flex-wrap: wrap; margin: 0 -14px 14px; padding: 8px 14px; border-radius: 0; top: var(--header-h); }
  .cat-search { flex: 1 1 100%; max-width: none; }
  .cat-toolbar .tabs { flex: 1 1 100%; }
  .toolbar-end { margin-left: 0; width: 100%; justify-content: space-between; }
  .sort { align-self: auto; }
  .cards.is-list .card { padding: 12px 14px; }
  .channel-stats .st i { font-size: 15px; }
}
@media (max-width: 640px) { .cat-toolbar { position: static; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; margin: 0 0 14px; } }
.hero-search-page { max-width: 760px; margin: 0 0 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
:root[data-theme="dark"] .hero-search-page { border-color: transparent; }
.search-cats { margin: 0 0 22px; }
@media (max-width: 640px) {
  .card-tags + .card-foot, .card-desc + .card-foot { margin-top: 4px; }
  .card-foot { padding-top: 12px; }
}
.cards.is-list .card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto 34px; grid-template-areas: "head desc foot fav" "head tags foot fav"; }
.cards.is-list .fav-btn { grid-area: fav; position: relative; top: auto; right: auto; }
@media (max-width: 860px) {
  .cards.is-list .card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head fav" "desc desc" "foot foot"; gap: 8px 12px; }
  .cards.is-list .card-tags { display: none; }
  .cards.is-list .card-foot { justify-content: space-between; }
  .cards.is-list .card-foot .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  .cards.is-list .card-desc { -webkit-line-clamp: 1; max-height: 1.5em; }
  .cards.is-list .card-head .ava { width: 42px; height: 42px; font-size: 16px; }
}

/* ================= Закреп на главной: без прокрутки ================= */
.pins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pin-item {
  position: relative; display: flex; align-items: center; gap: 13px; min-width: 0;
  padding: 14px 14px 14px 16px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--sun-line); transition: border-color .25s, box-shadow .25s;
}
.pin-item:hover { border-color: var(--sun); box-shadow: 0 14px 30px -18px rgba(143, 91, 0, .45); }
.pin-item .ava { flex: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sun); }
.pin-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pin-title { color: var(--text); font-weight: 700; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-title::after { content: ''; position: absolute; inset: 0; border-radius: 18px; }
.pin-title:hover { color: var(--primary); }
.pin-meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pin-meta b { color: var(--text); }
.pin-cat { overflow: hidden; text-overflow: ellipsis; padding-left: 8px; border-left: 1px solid var(--line); }

/* кнопка «Открыть в Telegram» */
.tg-go {
  position: relative; z-index: 2; flex: none; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 6px; border-radius: 99px;
  color: #fff; font-weight: 700; font-size: 14px; text-decoration: none;
  background: linear-gradient(135deg, #37BBFE, #1E96E8 55%, #3D5AFE);
  box-shadow: 0 8px 18px -8px rgba(30, 150, 232, .8);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.tg-go:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 24px -10px rgba(30, 150, 232, .9); }
.tg-go:active { transform: scale(.96); }
.tg-go::before {
  content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateX(-130%) skewX(-20deg); animation: tg-shine 4.5s ease-in-out infinite;
}
.pin-item:nth-child(3n+2) .tg-go::before { animation-delay: 1.5s; }
.pin-item:nth-child(3n) .tg-go::before { animation-delay: 3s; }
.tg-go-ic { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .22); overflow: hidden; animation: tg-ring 2.4s ease-out infinite; }
.tg-go-ic svg { transition: transform .45s var(--ease), opacity .3s; margin-left: -1px; }
.tg-go:hover .tg-go-ic svg { animation: plane-fly .7s var(--ease); }
@keyframes tg-shine { 0%, 60% { transform: translateX(-130%) skewX(-20deg); } 85%, 100% { transform: translateX(260%) skewX(-20deg); } }
@keyframes plane-fly { 0% { transform: none; } 45% { transform: translate(18px, -18px) rotate(-10deg); opacity: 0; } 46% { transform: translate(-18px, 18px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes tg-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 70%, 100% { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); } }

@media (max-width: 1180px) { .pins { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .pins { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pin-item { padding: 11px 11px 11px 12px; gap: 11px; border-radius: 16px; }
  .pin-item .ava { width: 46px; height: 46px; font-size: 18px; }
  .pin-title { font-size: 14.5px; }
  .pin-meta { font-size: 12.5px; }
  .pin-cat { display: none; }
  .tg-go { height: 40px; padding: 0 13px 0 5px; font-size: 13.5px; gap: 6px; }
  .tg-go-ic { width: 30px; height: 30px; }
}
.pin-cat { display: none; }
.pin-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pin-item { min-height: 80px; }


/* =========================================================
   TG SPACE: каркас с боковым меню
   ========================================================= */
body { font-size: 15px; }
:root[data-theme="dark"] body { background: radial-gradient(1200px 600px at 75% -10%, rgba(110, 60, 255, .10), transparent 60%), var(--bg); background-attachment: fixed; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.shell-main { min-width: 0; display: flex; flex-direction: column; }
.shell-main .main { flex: 1 0 auto; }
.container { max-width: 1320px; padding: 0 28px; }

/* боковое меню */
.snav {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  background: var(--side-bg); border-right: 1px solid var(--line); padding: 18px 14px 22px;
  display: flex; flex-direction: column; z-index: 90;
}
.snav::-webkit-scrollbar { width: 6px; } .snav::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 9px; }
.snav-top { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 22px 6px; }
.snav-close { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand:hover { color: var(--text); }
.brand-mark { flex: 0 0 auto; display: inline-flex; filter: drop-shadow(0 6px 14px rgba(123, 77, 255, .45)); transition: transform .3s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) translateY(-1px); }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt b { font: 800 25px/1 var(--display); letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-txt small { font-size: 12.5px; color: var(--text-2); margin-top: 5px; font-weight: 500; white-space: nowrap; }
.snav-nav { display: flex; flex-direction: column; gap: 2px; }
.snav-nav a, .snav-cats a, .snav-all {
  display: flex; align-items: center; gap: 14px; color: var(--text); border-radius: 12px; border: 1px solid transparent;
  transition: background .18s, border-color .18s, color .18s;
}
.snav-nav a { padding: 10px 14px; font-weight: 600; font-size: 15px; }
.snav-nav a .ui-ic { color: var(--text-2); flex: 0 0 auto; }
.snav-nav a:hover, .snav-cats a:hover { background: var(--surface-2); color: var(--text); }
.snav-nav a.on, .snav-cats a.on {
  background: linear-gradient(90deg, rgba(139, 92, 255, .34), rgba(139, 92, 255, .12));
  border-color: rgba(139, 92, 255, .75); box-shadow: inset 0 0 18px rgba(139, 92, 255, .18), 0 0 0 1px rgba(139, 92, 255, .12);
}
.snav-nav a.on .ui-ic { color: var(--text); }
:root:not([data-theme="dark"]) .snav-nav a.on, :root:not([data-theme="dark"]) .snav-cats a.on { color: var(--primary-2); }
.snav-h { margin: 18px 4px 8px; padding: 18px 10px 0; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.snav-cats { display: flex; flex-direction: column; gap: 1px; }
.snav-cats a { padding: 7px 10px 7px 12px; font-size: 14.5px; font-weight: 500; gap: 12px; }
.sc-ic { width: 22px; display: inline-flex; justify-content: center; color: var(--text-2); flex: 0 0 auto; }
.sc-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-c { flex: 0 0 auto; min-width: 32px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-3); border-radius: 99px; padding: 2px 8px; }
.ui-emoji { font-size: 17px; line-height: 1; }
.snav-all {
  margin-top: 16px; padding: 13px 14px; font-weight: 700; font-size: 15px;
  background: linear-gradient(90deg, rgba(139, 92, 255, .22), rgba(139, 92, 255, .08)); border-color: rgba(139, 92, 255, .7);
}
.snav-all span { flex: 1 1 auto; }
.snav-all:hover { color: var(--text); background: linear-gradient(90deg, rgba(139, 92, 255, .34), rgba(139, 92, 255, .14)); }
.snav-bg { display: none; }

/* верхняя панель */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.brand-m { display: none; }
.brand-m .brand-mark svg { width: 34px; height: 34px; }
.brand-m .brand-txt b { font-size: 19px; }
.top-crumbs { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; font-size: 15px; }
.top-crumbs a { color: var(--text-2); display: inline-flex; }
.top-crumbs a:hover { color: var(--text); }
.top-crumbs > .ui-ic { color: var(--muted); }
.top-search { position: relative; flex: 1 1 auto; max-width: 520px; display: flex; align-items: center; }
.top-search .ui-ic { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.top-search input {
  width: 100%; height: 44px; padding: 0 14px 0 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 500 14.5px var(--font); outline: none; transition: border-color .18s, box-shadow .18s;
}
.top-search input::placeholder { color: var(--muted); }
.top-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.btn-primary { background: var(--grad); border: 1px solid rgba(190, 160, 255, .35); box-shadow: 0 10px 26px -10px rgba(123, 77, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.1); }
.btn-add { height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: 15px; }
.user-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0 0 0 6px; cursor: pointer; color: var(--text-2); font: 600 14.5px var(--font); }
.user-btn:hover { color: var(--text); }
.user-ava { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; border: 1.6px solid currentColor; color: var(--text); }
.user-login-t { display: none; }
.usermenu { margin-left: 0; }
.icon-btn { border-radius: 12px; }
.theme-btn .i-sun, .theme-btn .i-moon { display: inline-flex; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: inline-flex; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }

/* заголовки секций */
.section { margin-top: 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 26px; margin: 0; }
.section-head .more { display: inline-flex; align-items: center; gap: 8px; color: var(--primary-2); font-weight: 600; font-size: 14.5px; background: none; border: 0; padding: 0; height: auto; }
.section-head .more::after { content: '→'; width: auto; height: auto; border: 0; margin: 0; transform: none; font-size: 17px; line-height: 1; transition: transform .2s var(--ease); }
.section-head .more:hover::after { transform: translateX(3px); }
.section-head .more:hover { color: var(--primary); }

/* ===== Главная ===== */
.home { padding-top: 4px; }
.hx {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; min-height: 282px;
  padding: 30px 40px 28px; border: 1px solid rgba(139, 92, 255, .5);
  background: radial-gradient(700px 300px at 85% 10%, rgba(120, 70, 255, .35), transparent 70%), linear-gradient(120deg, #0B0A24 0%, #120E3A 55%, #1A1150 100%);
  box-shadow: 0 30px 60px -30px rgba(90, 40, 230, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  color: #fff;
}
.hx-art { position: absolute; inset: 0 0 0 36%; z-index: -1; }
.hx-art svg { width: 100%; height: 100%; display: block; }
.hx-plane { transform-origin: 560px 170px; animation: plane-float 6s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(40, 10, 140, .6)); }
@keyframes plane-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-1.5deg); } }
.hx-main { position: relative; max-width: 640px; }
.hx h1 { color: #fff; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.08; margin: 0 0 10px; }
.grad { background: linear-gradient(92deg, #B99BFF 0%, #8B5CFF 45%, #C7A6FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hx-sub { font-size: clamp(16px, 1.6vw, 22px); color: #D6D2F2; margin: 0 0 22px; font-weight: 500; }
.hx-search {
  position: relative; display: flex; align-items: center; height: 50px; max-width: 620px; border-radius: 12px;
  background: rgba(12, 10, 34, .72); border: 1px solid rgba(214, 205, 255, .45); padding-left: 48px;
  transition: border-color .18s, box-shadow .18s;
}
.hx-search:focus-within { border-color: #A98BFF; box-shadow: 0 0 0 4px rgba(139, 92, 255, .25); }
.hx-search > .ui-ic { position: absolute; left: 16px; color: #CFC9F0; }
.hx-search input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: #fff; font: 500 16px var(--font); }
.hx-search input::placeholder { color: #A9A4CC; }
.hx-search .btn { height: calc(100% + 2px); margin: -1px -1px -1px 0; border-radius: 0 12px 12px 0; padding: 0 28px; font-size: 16px; font-weight: 700; }
.hx-stats { display: flex; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.hx-stat { display: flex; align-items: center; gap: 12px; padding: 0 34px; color: #D6D2F2; }
.hx-stat:first-child { padding-left: 4px; }
.hx-stat + .hx-stat { border-left: 1px solid rgba(255, 255, 255, .18); }
.hx-stat span { display: flex; flex-direction: column; font-size: 14.5px; line-height: 1.25; }
.hx-stat b { color: #fff; font-size: 21px; font-weight: 800; }

.section-pin + .home-grid { margin-top: 10px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.home-grid > .home-col > .section:first-child { margin-top: 26px; }

.pcat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pcat {
  display: flex; align-items: center; gap: 14px; padding: 16px 14px 16px 18px; min-height: 66px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text);
  transition: border-color .2s, transform .2s var(--ease), background .2s;
}
.pcat:hover { color: var(--text); border-color: var(--primary-line); transform: translateY(-2px); background: var(--surface-2); }
.pcat-ic { color: var(--text-2); display: inline-flex; flex: 0 0 auto; }
.pcat-ic .ui-emoji { font-size: 26px; }
.pcat-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pcat-t b { font-size: 14.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; }
.pcat-t small { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pcat > .ui-ic { color: var(--muted); flex: 0 0 auto; transition: transform .2s var(--ease); }
.pcat:hover > .ui-ic { transform: translateX(3px); color: var(--text); }

.seg { display: inline-flex; padding: 3px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); }
.seg button { border: 0; background: none; color: var(--text-2); font: 600 13.5px var(--font); padding: 8px 18px; border-radius: 8px; cursor: pointer; transition: background .18s, color .18s; }
.seg button[aria-selected="true"] { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(123, 77, 255, .9); }

/* Топ недели */
.topw { position: sticky; top: calc(var(--header-h) + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 16px 10px; }
.topw-head { display: flex; align-items: center; gap: 12px; padding: 0 4px 14px; color: var(--text); }
.topw-head h2 { margin: 0; font-size: 22px; }
.topw-list { list-style: none; margin: 0; padding: 0; }
.topw-list li { display: grid; grid-template-columns: 26px 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--line); }
.topw-n { font-weight: 800; font-size: 16px; text-align: center; color: var(--text); }
.topw-n1, .topw-n2, .topw-n3 { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; display: inline-grid; place-items: center; justify-self: center; }
.topw-n1 { background: linear-gradient(135deg, #F7C25A, #C88A1E); color: #3A2400; }
.topw-n2 { background: linear-gradient(135deg, #C9CCDA, #8D92A8); color: #1E2030; }
.topw-n3 { background: linear-gradient(135deg, #E0965E, #A85A2A); color: #2E1505; }
.topw-list .ava { width: 40px; height: 40px; font-size: 15px; }
.topw-t { min-width: 0; display: flex; flex-direction: column; }
.topw-t a { color: var(--text); font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topw-t a:hover { color: var(--primary-2); }
.topw-t small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topw-v { font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.topw-more { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 0 6px; border-top: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--primary-2); }

/* ===== Карточки каналов ===== */
.cards { gap: 14px; }
.card { padding: 18px 18px 16px; border-radius: 16px; background: var(--surface); }
.card:hover { transform: translateY(-3px); border-color: var(--primary-line); box-shadow: 0 20px 40px -22px rgba(110, 60, 255, .55); }
.card-head { gap: 14px; align-items: flex-start; }
.card-head .ava, .ava-md { width: 56px; height: 56px; font-size: 21px; }
.card-title { font-size: 17px; font-weight: 800; margin: 2px 0 6px; -webkit-line-clamp: 1; }
.card-meta .badge-cat { display: inline-block; height: 24px; line-height: 24px; padding: 0 11px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-weight: 600; font-size: 12px; }
.card-meta .badge-cat:hover { background: var(--primary-soft); color: var(--primary-2); }
.card-desc { margin-top: 12px; font-size: 14px; color: var(--text-2); -webkit-line-clamp: 2; height: calc(1.5em * 2); }
.card-tags { margin-top: 10px; }
.card-foot { padding-top: 14px; }
.subs { font-weight: 500; color: var(--text-2); font-size: 13.5px; gap: 8px; min-width: 0; }
.subs b { color: var(--text); font-weight: 700; }
.subs svg { color: var(--text-2); }
.btn-go {
  position: relative; z-index: 2; flex: 0 0 auto; margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  display: inline-grid; place-items: center; color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn-go:hover, .card:hover .btn-go { background: var(--grad); border-color: transparent; color: #fff; }
.btn-go:hover svg { transform: translateX(2px); }
.btn-go svg { transition: transform .2s var(--ease); }
.verified { width: 18px; height: 18px; margin-left: 7px; vertical-align: -2px; background: var(--grad); color: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent); }
.card--hl { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #C4A8FF, #8B5CFF 50%, #5A28E0) border-box; }
.card--top .card-head .ava { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--primary); }
.fav-btn { top: 12px; right: 12px; }
.badge-top { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary-2); }
.cards.is-list .card-meta .badge-cat { display: none; }

/* общие элементы под новую палитру */
.tg-go { background: var(--grad); box-shadow: 0 8px 20px -8px rgba(123, 77, 255, .85); }
.tg-go:hover { box-shadow: 0 14px 26px -10px rgba(123, 77, 255, .95); }
.pin-item { background: var(--surface); }
.section-pin { background: linear-gradient(135deg, rgba(139, 92, 255, .14), rgba(139, 92, 255, .04)); border: 1px solid rgba(139, 92, 255, .35); }
.footer { margin-top: 40px; }
.footer .brand-txt b { font-size: 20px; }
.cta { background: radial-gradient(500px 220px at 85% 0%, rgba(150, 100, 255, .45), transparent 70%), linear-gradient(120deg, #120E3A, #2A1680); border: 1px solid rgba(139, 92, 255, .5); }

/* список категорий на странице категории заменён общим боковым меню */
.layout-side { grid-template-columns: minmax(0, 1fr); }
.layout-side > .sidebar { display: none; }

/* ===== Адаптив ===== */
@media (max-width: 1320px) {
  .pcat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 1180px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .topw { position: static; margin-top: 26px; }
  .topw-list { columns: 2; column-gap: 24px; }
  .topw-list li { break-inside: avoid; }
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .snav {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 300px); height: auto; z-index: 120;
    transform: translateX(-102%); transition: transform .32s var(--ease); box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .6);
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
  .snav.open { transform: none; }
  .snav-close { display: inline-flex; }
  .snav-bg { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(5, 4, 20, .6); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .snav.open + .snav-bg { opacity: 1; pointer-events: auto; }
  .burger { display: inline-flex; }
  .brand-m { display: inline-flex; }
  .brand-m .brand-txt small { display: none; }
  .top-crumbs { display: none; }
  .topbar { padding: 0 18px; gap: 10px; }
  .container { padding: 0 18px; }
}
@media (max-width: 900px) {
  .hx { padding: 26px 24px 24px; min-height: 0; }
  .hx-art { inset: 0 -20% 0 30%; opacity: .55; }
  .hx-stat { padding: 0 18px; }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar .top-search { display: none; }
  .brand-m { margin-right: auto; }
  .topw-list { columns: 1; }
}
@media (max-width: 640px) {
  :root { --header-h: 62px; }
  .container { padding: 0 14px; }
  .topbar { padding: 0 10px; gap: 4px; }
  .btn-add { width: 42px; padding: 0; }
  .btn-add span { display: none; }
  .user-ava { width: 38px; height: 38px; }
  .user-btn > .ui-ic { display: none; }
  .fav-link { display: none; }
  .hx { border-radius: 20px; padding: 22px 16px 20px; }
  .hx-art { inset: -10% -40% 30% 25%; opacity: .45; }
  .hx-search { height: 48px; padding-left: 42px; }
  .hx-search > .ui-ic { left: 13px; }
  .hx-search .btn { padding: 0 16px; }
  .hx-stats { margin-top: 18px; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; }
  .hx-stat { padding: 0 10px; gap: 6px; }
  .hx-stat .ui-ic { display: none; }
  .hx-stat .ui-ic { width: 22px; height: 22px; }
  .hx-stat b { font-size: 17px; }
  .hx-stat span { font-size: 12.5px; }
  .section-head h2 { font-size: 21px; }
  .section-head { flex-wrap: wrap; }
  .cards-3 { grid-template-columns: minmax(0, 1fr); }
  .pcat { padding: 13px 12px; gap: 10px; min-height: 0; }
  .pcat-ic .ui-ic { width: 24px; height: 24px; }
  .pcat-t b { font-size: 13.5px; }
  .seg button { padding: 7px 13px; }
}
@media (max-width: 340px) {
  .brand-m .brand-txt { display: none; }
  .pcat-grid { grid-template-columns: minmax(0, 1fr); }
}


/* =========================================================
   TG SPACE v2: канал, категория, общие блоки, анимации
   ========================================================= */
@keyframes orbit-spin { to { transform: rotate(348deg); } }
@keyframes glow-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 255, .45), 0 20px 50px -20px rgba(139, 92, 255, .8); } 50% { box-shadow: 0 0 0 10px rgba(139, 92, 255, 0), 0 20px 50px -20px rgba(139, 92, 255, .8); } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes ring-rot { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.space-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.space-art .orb-a { transform-box: fill-box; transform-origin: center; }

/* общие панели */
.panel { border-radius: 20px; background: var(--surface); }
.crumbs { padding: 6px 0 14px; font-size: 13.5px; }
.crumbs a { color: var(--text-2); }
.crumbs > span:not(:last-child) { opacity: .5; }

/* ---------- Страница канала ---------- */
.channel-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; }
.panel.channel { overflow: hidden; border-color: color-mix(in srgb, var(--primary) 28%, var(--line)); }
.chx-cover {
  position: relative; height: 210px; overflow: hidden; isolation: isolate;
  background: radial-gradient(500px 220px at 20% 120%, color-mix(in srgb, var(--c, #7B4DFF) 45%, transparent), transparent 70%), linear-gradient(120deg, #0B0A24, #140F40 55%, #1E1258);
}
.chx-cover-img { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(36px) saturate(1.3); opacity: .45; z-index: -1; }
.chx-cover::after { content: ''; position: absolute; inset: auto 0 0; height: 60px; background: linear-gradient(transparent, var(--surface)); }
.chx-cover-ic {
  position: absolute; right: 30px; top: 26px; width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); animation: float-y 6s ease-in-out infinite;
}
.chx-cover-ic .ui-emoji { font-size: 44px; }
.channel-body { padding: 0 30px 30px; position: relative; }
.chx-head { display: flex; align-items: flex-end; gap: 22px; margin-top: -64px; position: relative; z-index: 2; }
.chx-ava { position: relative; flex: none; border-radius: 50%; padding: 4px; background: conic-gradient(from 0deg, #C4A8FF, #8B5CFF, #5A28E0, #C4A8FF); box-shadow: 0 18px 40px -16px rgba(110, 60, 255, .8); }
.chx-ava::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px dashed rgba(196, 168, 255, .45); animation: ring-rot 26s linear infinite; }
.chx-ava.is-hot { animation: glow-pulse 2.6s ease-in-out infinite; }
.chx-ava .ava { width: 124px; height: 124px; font-size: 46px; box-shadow: 0 0 0 4px var(--surface); }
.chx-info { min-width: 0; flex: 1; padding-bottom: 4px; }
.chx-info h1 { font-size: clamp(24px, 2.6vw, 34px); margin: 0 0 4px; overflow-wrap: anywhere; line-height: 1.15; }
.chx-info h1 .verified { width: 24px; height: 24px; vertical-align: 3px; margin-left: 8px; }
.chx-user { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chx-user .ui-ic { color: var(--primary-2); flex: none; }
.chx-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chx-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); transition: border-color .2s, color .2s, transform .2s var(--ease);
}
a.chx-tag:hover { color: var(--text); border-color: var(--primary-line); transform: translateY(-1px); }
.chx-tag .ui-ic { color: var(--primary-2); }
.chx-tag .ui-emoji { font-size: 14px; }
.chx-tag--top { color: #FFB38A; border-color: rgba(255, 140, 90, .35); background: rgba(255, 120, 60, .1); }
.chx-tag--top .ui-ic { color: #FF8A5B; }
.chx-tag--hl { color: var(--primary-2); border-color: var(--primary-line); background: var(--primary-soft); }
.chx-tag--rank { color: #FFD27A; border-color: rgba(255, 200, 90, .4); background: rgba(255, 190, 60, .1); }
.chx-tag--rank .ui-ic { color: #FFC24D; }
:root:not([data-theme="dark"]) .chx-tag--rank { color: #8F5B00; }
:root:not([data-theme="dark"]) .chx-tag--top { color: #C2410C; }

.chx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; margin-top: 24px; }
.chx-st {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; min-width: 0;
  background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); transition: border-color .25s, transform .25s var(--ease);
}
.chx-st:hover { border-color: var(--primary-line); transform: translateY(-2px); }
.chx-st-ic { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 10px 20px -10px rgba(123, 77, 255, .9); }
.chx-st:nth-child(2) .chx-st-ic { background: linear-gradient(135deg, #4FC3FF, #3B6BFF); box-shadow: 0 10px 20px -10px rgba(60, 130, 255, .9); }
.chx-st:nth-child(3) .chx-st-ic { background: linear-gradient(135deg, #FF7AA8, #E8406F); box-shadow: 0 10px 20px -10px rgba(240, 70, 120, .9); }
.chx-st:nth-child(4) .chx-st-ic { background: linear-gradient(135deg, #46D7A8, #13A07A); box-shadow: 0 10px 20px -10px rgba(20, 170, 120, .9); }
.chx-st-t { min-width: 0; display: flex; flex-direction: column; }
.chx-st-t b { font-size: 19px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chx-st-t small { font-size: 12.5px; color: var(--muted); }

.channel-actions { margin-top: 18px; }
.btn-join { height: 56px; border-radius: 16px; font-size: 16.5px; font-weight: 800; gap: 10px; }
.btn-join svg { transition: transform .35s var(--ease); }
.btn-join:hover svg { transform: translate(3px, -3px) rotate(-6deg); }
.btn-square { width: 56px; height: 56px; border-radius: 16px; }
.channel-desc, .chx-facts-wrap { margin-top: 26px; padding: 22px 24px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.channel-desc h2, .chx-facts-wrap h2 { font-size: 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.channel-desc h2::before, .chx-facts-wrap h2::before { content: ''; width: 4px; height: 18px; border-radius: 4px; background: var(--grad); }
.desc-text { font-size: 15.5px; color: var(--text); }
.desc-text.is-long::after { background: linear-gradient(transparent, var(--surface-2)); }
.channel-about { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.ch-place { border: 1px solid var(--primary-line); background: radial-gradient(400px 160px at 100% 0%, rgba(139, 92, 255, .35), transparent 70%), linear-gradient(140deg, var(--primary-soft), var(--surface)); }
.ch-place-rank { flex-direction: row; align-items: center; gap: 8px; color: var(--primary-2); }
.ch-place-rank small { margin: 0 0 0 4px; align-self: flex-end; }
.ch-place-rank .ui-ic { color: #FFC24D; }
.ch-place-bar i { background: linear-gradient(90deg, #8B5CFF, #C4A8FF, #FF7AA8); background-size: 200% 100%; animation: shimmer 4s linear infinite; }
.chx-facts-wrap .ch-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 0; }
.chx-facts-wrap .ch-facts div {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "ic dt" "ic dd"; column-gap: 10px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 14px;
}
.cf-ic { grid-area: ic; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2); }
.chx-facts-wrap .ch-facts dt { grid-area: dt; font-size: 12px; }
.chx-facts-wrap .ch-facts dd { grid-area: dd; text-align: left; font-weight: 700; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.channel-link { margin-top: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.channel-link-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; flex: none; }
.channel-link code { color: var(--text); font-size: 14px; }
.side-promo {
  position: relative; overflow: hidden; isolation: isolate; border: 1px solid rgba(139, 92, 255, .55);
  background: radial-gradient(300px 200px at 100% 0%, rgba(170, 120, 255, .45), transparent 70%), linear-gradient(150deg, #160F48, #2B1585);
}
.side-promo::before { display: none; }
.side-promo-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 14px; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); animation: float-y 5s ease-in-out infinite; }
.side-promo .btn-white { color: #2A1680; font-weight: 800; }
.channel-side { position: sticky; top: calc(var(--header-h) + 8px); display: flex; flex-direction: column; gap: 16px; }
.channel-side .panel h2 { font-size: 18px; }
.mini-list a { padding: 8px; }
.mini-list .ml-t { font-weight: 600; }
.mini-list .ml-s { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.theme-more { color: var(--primary-2); display: inline-flex; align-items: center; gap: 6px; }
.theme-more::after { content: '→'; transition: transform .2s var(--ease); }
.theme-more:hover::after { transform: translateX(3px); }
.join-bar { background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--primary-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* ---------- Карточка: метки в строке под названием ---------- */
.card-line { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: nowrap; }
.card-line .badge-cat, .card-line .card-user { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.card-line .badge { flex: none; height: 24px; border-radius: 99px; padding: 0 9px; }
.card-line .badge-cat { flex: 0 1 auto; }
.card-line .badge-hl { padding: 0 7px; background: var(--primary-soft); color: var(--primary-2); }
.card-user { font-size: 13px; color: var(--muted); }
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(260px 120px at var(--mx, 80%) -10%, rgba(139, 92, 255, .22), transparent 70%);
}
.card:hover::before { opacity: 1; }
.card-head .ava { box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .6); }

/* ---------- Страница категории ---------- */
.cx-hero {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 24px; min-height: 250px;
  padding: 32px 36px; border-radius: 24px; color: #fff; border: 1px solid rgba(139, 92, 255, .5);
  background: linear-gradient(120deg, #0B0A24 0%, #120E3A 55%, #1A1150 100%);
  box-shadow: 0 30px 60px -30px rgba(90, 40, 230, .55);
}
.cx-hero .space-art { z-index: -1; left: 30%; width: 70%; }
.cx-hero-txt { position: relative; flex: 1; min-width: 0; max-width: 760px; }
.cx-kicker { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; color: #D9CCFF; background: rgba(139, 92, 255, .2); border: 1px solid rgba(170, 130, 255, .4); margin-bottom: 14px; }
.cx-hero h1 { color: #fff; font-size: clamp(26px, 3vw, 40px); margin: 0 0 10px; }
.cx-hero h1 small { font-size: .55em; color: #C9C2F0; font-weight: 600; }
.cx-hero .lead { color: #D3CEF0; font-size: 15.5px; margin: 0 0 18px; max-width: 62ch; }
.cx-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.cx-stats span { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; font-size: 14px; color: #D3CEF0; background: rgba(10, 8, 30, .55); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.cx-stats b { color: #fff; font-weight: 800; }
.cx-stats .ui-ic { color: #B99BFF; }
.cx-orb { position: relative; flex: none; width: 150px; height: 150px; display: grid; place-items: center; margin-right: 20px; }
.cx-orb::before, .cx-orb::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(190, 160, 255, .45); }
.cx-orb::before { inset: -14px; border-style: dashed; animation: ring-rot 30s linear infinite; }
.cx-orb::after { inset: 6px; border-color: rgba(190, 160, 255, .25); }
.cx-orb-in { width: 112px; height: 112px; border-radius: 34px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 24px 50px -18px rgba(139, 92, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .3); animation: float-y 6s ease-in-out infinite; transform: rotate(-6deg); }
.cx-orb-in .ui-emoji { font-size: 52px; }

/* подиум */
.podium { margin: 22px 0 20px; gap: 14px; }
.pod { border-radius: 20px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); overflow: hidden; }
.pod-1 { border-color: rgba(255, 195, 80, .55); background: radial-gradient(260px 140px at 50% 0%, rgba(255, 190, 70, .22), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.pod-medal { top: 12px; left: 12px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font: 800 14px var(--display); color: var(--text-2); background: var(--surface-3); }
.pod-1 .pod-medal { background: linear-gradient(135deg, #FFD66B, #E9A21B); color: #3A2400; box-shadow: 0 8px 18px -8px rgba(255, 180, 40, .9); }
.pod-2 .pod-medal { background: linear-gradient(135deg, #E3E6F2, #9AA0B8); color: #1E2030; }
.pod-3 .pod-medal { background: linear-gradient(135deg, #F0A673, #B0612E); color: #2E1505; }
.pod-ava { background: conic-gradient(from 0deg, #C4A8FF, #8B5CFF, #5A28E0, #C4A8FF); }
.pod-1 .pod-ava { background: conic-gradient(from 0deg, #FFE08A, #F2B12C, #C98412, #FFE08A); animation: glow-pulse 3s ease-in-out infinite; }
.pod-step { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; background: var(--surface-3); border-top: 1px solid var(--line); }
.pod-1 .pod-step { background: linear-gradient(135deg, #FFD66B, #E9A21B); }
.pod-2 .pod-step { background: linear-gradient(135deg, rgba(227, 230, 242, .25), rgba(154, 160, 184, .2)); }
.pod-3 .pod-step { background: linear-gradient(135deg, rgba(240, 166, 115, .25), rgba(176, 97, 46, .2)); }

/* панель фильтров */
.cat-toolbar { padding: 10px; margin: 0 0 18px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line); gap: 10px; }
.cat-search { position: relative; flex: 1 1 220px; max-width: 340px; display: flex; align-items: center; }
.cat-search svg { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.cat-search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 500 14px var(--font); outline: none; }
.cat-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.cat-toolbar .tabs { background: var(--surface-2); border-radius: 12px; }
.tab { border-radius: 9px; }
.tab.active, .sort a.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(123, 77, 255, .9); }
.tab.active span { color: #fff; }
.sort { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.sort a { border-radius: 9px; }
.view-switch { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.view-switch button { border-radius: 9px; }
.view-switch button[aria-pressed="true"] { background: var(--grad); color: #fff; }

/* топ-10 */
.top10 { padding: 24px; border-color: color-mix(in srgb, var(--primary) 25%, var(--line)); }
.top-list li { border-radius: 14px; }
.tl-n { border-radius: 10px; }
.tl-bar { height: 6px; }
.tl-bar i { background: linear-gradient(90deg, #8B5CFF, #C4A8FF); }

/* CTA, облако категорий, SEO-текст, FAQ, пагинация */
.cta { display: flex; align-items: center; gap: 20px; border-radius: 22px; }
.cta-ic { flex: none; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); animation: float-y 5s ease-in-out infinite; }
.cta .cta-txt { flex: 1; }
.cta .btn-white { color: #2A1680; font-weight: 800; }
.cat-cloud a {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 12px; font-weight: 600; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.cat-cloud a:hover { border-color: var(--primary-line); background: var(--surface-2); }
.cc-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2); flex: none; }
.cc-ic .ui-emoji { font-size: 15px; }
.seo-text { border-radius: 20px; background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.seo-text h2 { display: flex; align-items: center; gap: 10px; }
.seo-text h2::before { content: ''; flex: none; width: 4px; height: 1em; border-radius: 4px; background: var(--grad); }
.faq-item { border-radius: 16px; }
.faq-item summary { transition: color .2s; }
.faq-item summary:hover { color: var(--primary-2); }
.faq-item summary::after { background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A887FF' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") no-repeat center; }
.faq-item[open] { background: linear-gradient(160deg, var(--primary-soft), var(--surface) 60%); }
.pg { border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, transform .2s var(--ease); }
.pg:hover { border-color: var(--primary-line); color: var(--text); transform: translateY(-2px); }
.pg-cur { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(123, 77, 255, .9); }
.pg-dots { border: 0; background: none; }
.empty { border-radius: 20px; border-color: var(--primary-line); background: radial-gradient(400px 160px at 50% 0%, rgba(139, 92, 255, .14), transparent 70%), var(--surface); }
.empty-ico { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; margin: 0 auto 14px; color: #fff; background: var(--grad); font-size: 38px; box-shadow: 0 16px 34px -14px rgba(123, 77, 255, .9); }

/* подвал */
.footer { border-radius: 24px; margin: 48px 28px 22px; padding: 40px 0 22px; border: 1px solid var(--line); background: radial-gradient(600px 240px at 90% 0%, rgba(139, 92, 255, .18), transparent 70%), var(--surface); color: var(--text-2); }
.footer a { color: var(--text-2); transition: color .2s; }
.footer a:hover { color: var(--text); }
.footer-h { color: var(--text); font-weight: 800; }
.footer-bottom { border-top-color: var(--line); color: var(--muted); }
.footer .brand-txt b { color: var(--text); }

/* «Лучшие по темам» */
.theme { border-radius: 20px; }
.theme::before { background: var(--grad); height: 3px; }
.theme-ico { background: var(--primary-soft); }

/* адаптив v2 */
@media (max-width: 1180px) {
  .channel-layout { grid-template-columns: minmax(0, 1fr); }
  .channel-side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) { .footer { margin: 40px 18px 18px; } }
@media (max-width: 900px) {
  .chx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chx-facts-wrap .ch-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-orb { width: 110px; height: 110px; margin-right: 6px; }
  .cx-orb-in { width: 84px; height: 84px; border-radius: 26px; }
  .cx-orb-in .ui-ic { width: 42px; height: 42px; }
}
@media (max-width: 760px) {
  .channel-side { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}
@media (max-width: 640px) {
  .chx-cover { height: 150px; }
  .chx-cover-ic { width: 64px; height: 64px; border-radius: 20px; right: 14px; top: 14px; }
  .chx-cover-ic .ui-ic { width: 32px; height: 32px; }
  .channel-body { padding: 0 16px 20px; }
  .chx-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: -56px; }
  .chx-ava .ava { width: 96px; height: 96px; font-size: 36px; }
  .chx-stats { gap: 8px; margin-top: 18px; }
  .chx-st { padding: 10px; gap: 9px; border-radius: 14px; }
  .chx-st-ic { width: 36px; height: 36px; border-radius: 11px; }
  .chx-st-ic .ui-ic { width: 18px; height: 18px; }
  .chx-st-t b { font-size: 16px; }
  .chx-st-t small { font-size: 11.5px; }
  .btn-join { height: 52px; font-size: 15px; }
  .channel-actions { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  .channel-actions .btn-join { grid-column: auto; }
  .channel-actions .btn-square { width: 52px; height: 52px; }
  .pod-medal { width: 24px; height: 24px; top: 6px; left: 6px; font-size: 12px; border-radius: 8px; }
  .pod-medal .ui-ic { width: 14px; height: 14px; }
  .pod { padding-top: 26px; }
  .btn-square { width: 52px; height: 52px; }
  .channel-desc, .chx-facts-wrap { padding: 16px; margin-top: 18px; }
  .chx-facts-wrap .ch-facts { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .channel-link { flex-wrap: wrap; padding: 12px; }
  .channel-link code { flex: 1 1 100%; order: 2; }
  .channel-link .btn { order: 3; width: 100%; }
  .cx-hero { flex-direction: column-reverse; align-items: flex-start; padding: 22px 18px; gap: 16px; border-radius: 20px; min-height: 0; }
  .cx-hero .space-art { left: 0; width: 100%; opacity: .6; }
  .cx-orb { width: 74px; height: 74px; margin: 6px 0 0 6px; }
  .cx-orb::before { inset: -8px; }
  .cx-orb-in { width: 60px; height: 60px; border-radius: 18px; }
  .cx-orb-in .ui-ic { width: 30px; height: 30px; }
  .cx-orb-in .ui-emoji { font-size: 30px; }
  .cx-hero .lead { font-size: 14.5px; }
  .cx-stats span { height: 34px; padding: 0 11px; font-size: 13px; }
  .cat-toolbar { padding: 8px; border-radius: 16px; margin: 0 0 14px; background: var(--surface); }
  .cat-search { max-width: none; }
  .cta { flex-direction: column; align-items: flex-start; padding: 22px 18px; }
  .cta .btn { width: 100%; }
  .cta-ic { width: 50px; height: 50px; border-radius: 15px; }
  .footer { margin: 32px 12px 12px; padding: 28px 0 18px; border-radius: 20px; }
  .seo-text { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .chx-ava::before, .cx-orb::before, .cx-orb-in, .chx-cover-ic, .side-promo-ic, .cta-ic, .hx-plane, .ch-place-bar i, .pod-1 .pod-ava, .chx-ava.is-hot { animation: none; }
}

/* ---------- Оплата ---------- */
.pay-note { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); animation: rise .45s var(--ease) both; }
.pay-note-ic { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--grad); }
.pay-note--ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: linear-gradient(140deg, var(--ok-soft), var(--surface) 70%); }
.pay-note--ok .pay-note-ic { background: linear-gradient(135deg, #46D7A8, #13A07A); }
.pay-note--err { border-color: color-mix(in srgb, var(--err) 45%, transparent); background: linear-gradient(140deg, var(--err-soft), var(--surface) 70%); }
.pay-note--err .pay-note-ic { background: linear-gradient(135deg, #FF7A8A, #D63A50); }
.pay-note--wait .pay-note-ic { animation: glow-pulse 2s ease-in-out infinite; }
.pay-note-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--text-2); }
.pay-note-t b { font-size: 17px; color: var(--text); }
.pay-due { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; font-size: 14px; color: var(--text-2); border: 1px solid var(--primary-line); background: linear-gradient(140deg, var(--primary-soft), var(--surface)); }
.pay-due b { color: var(--text); }
@media (max-width: 640px) {
  .pay-note { flex-wrap: wrap; padding: 14px; }
  .pay-note .btn { width: 100%; }
  .pay-due .btn { width: 100%; }
}

/* ---------- Списки, категории, поиск, заголовки страниц ---------- */
.cards:not(.cards-3) { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.page-head { padding-top: 4px; }
.page-head h1 { font-size: clamp(26px, 2.6vw, 36px); }
.page-head-ico { width: 64px; height: 64px; border-radius: 20px; color: #fff; border: 0; background: var(--grad); box-shadow: 0 16px 32px -14px rgba(123, 77, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cat-tile { background: var(--surface); border: 1px solid var(--line); overflow: hidden; isolation: isolate; }
.cat-tile::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(220px 100px at 0% 50%, rgba(139, 92, 255, .22), transparent 70%); }
.cat-tile:hover { border-color: var(--primary-line); box-shadow: 0 18px 34px -20px rgba(110, 60, 255, .7); }
.cat-tile:hover::after { opacity: 1; }
.cat-ico { background: var(--primary-soft); color: var(--primary-2); }
.cat-tile:hover .cat-ico { background: var(--grad); color: #fff; }
.cat-ico .ui-emoji { font-size: 22px; }
.cat-count { color: var(--muted); opacity: 1; }
.hero-search.hero-search-page { background: var(--surface); border: 1px solid var(--line); box-shadow: none; max-width: 720px; }
.hero-search-page input { color: var(--text); }
.hero-search-page input::placeholder { color: var(--muted); }
.hero-search-page:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.theme-ico { color: var(--primary-2); display: grid; place-items: center; }
.theme-ico .ui-emoji { font-size: 18px; }
@media (max-width: 640px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { padding: 12px; gap: 10px; min-height: 64px; flex-direction: column; align-items: flex-start; }
  .cat-ico { width: 40px; height: 40px; border-radius: 12px; }
  .cards:not(.cards-3) { grid-template-columns: minmax(0, 1fr); }
  .page-head-ico { width: 52px; height: 52px; border-radius: 16px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Вход и регистрация ---------- */
.ax-wrap { padding-top: 10px; padding-bottom: 10px; }
.ax {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); max-width: 1040px; margin: 0 auto; min-height: 600px;
  border-radius: 28px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line)); background: var(--surface);
  box-shadow: 0 40px 80px -40px rgba(90, 40, 230, .6); animation: rise-in .6s var(--ease) both;
}
.ax-side { position: relative; overflow: hidden; isolation: isolate; color: #fff; background: linear-gradient(150deg, #0B0A24, #160F48 50%, #2B1585); padding: 44px 40px; display: flex; }
.ax-side .space-art { z-index: -1; opacity: .9; }
.ax-side-in { position: relative; display: flex; flex-direction: column; justify-content: center; }
.ax-logo { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; margin-bottom: 26px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: float-y 5s ease-in-out infinite; box-shadow: 0 20px 40px -20px rgba(139, 92, 255, .9); }
.ax-side h2 { color: #fff; font-size: 32px; margin: 0 0 10px; }
.ax-side p { color: #CFC9F0; font-size: 15.5px; margin: 0 0 26px; max-width: 30em; }
.ax-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ax-perks li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: #E9E4FF; animation: rise-in .5s var(--ease) both; animation-delay: calc(.25s + var(--i) * .08s); }
.ax-perks li > span { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(139, 92, 255, .3); border: 1px solid rgba(190, 160, 255, .35); color: #fff; }
.ax-main { padding: 40px 44px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.ax-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 26px; isolation: isolate; }
.ax-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 10px; color: var(--text-2); font-weight: 700; font-size: 14.5px; transition: color .25s; }
.ax-tabs a.on { color: #fff; }
.ax-tabs-bg { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--grad); box-shadow: 0 8px 20px -8px rgba(123, 77, 255, .9); transition: transform .35s var(--ease); }
.ax-tabs-bg.is-r { transform: translateX(100%); }
.ax-main h1 { font-size: 30px; margin: 0 0 6px; }
.ax-sub { color: var(--text-2); margin: 0 0 22px; }
.ax-err { margin-bottom: 14px; animation: rise-in .35s var(--ease) both; }
.ax-form { display: flex; flex-direction: column; gap: 14px; }
.ax-field { display: flex; flex-direction: column; gap: 7px; margin: 0; animation: rise-in .45s var(--ease) both; animation-delay: calc(var(--i, 0) * .06s); }
.ax-lbl { font-size: 13.5px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.ax-lbl .muted { font-weight: 500; }
.ad-count { margin-left: auto; }
.form .ax-in input:not([type=checkbox]):not([type=radio]), .form .ax-in select, .ax-field .ax-in input, .ax-field .ax-in select { padding: 0 46px !important; height: 50px; border-radius: 13px; margin: 0; background-color: var(--surface-2); }
.form .ax-in input:focus, .form .ax-in select:focus { background-color: var(--surface); }
.form .ad-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100% !important; padding: 0 !important; opacity: 0; }
.ad-form .ad-drop { flex-direction: row; text-align: left; align-self: end; margin-top: 0; }
.ad-form .grid-2 { align-items: end; }
.ax-in { position: relative; display: flex; align-items: center; }
.ax-in > .ui-ic { position: absolute; left: 15px; color: var(--muted); pointer-events: none; transition: color .2s; }
.ax-in input, .ax-in select, .ad-form textarea {
  width: 100%; height: 50px; padding: 0 46px 0 46px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font: 500 15px var(--font); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.ad-form textarea { height: auto; min-height: 132px; padding: 14px 16px; line-height: 1.55; resize: vertical; }
.ax-in select { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238C8CB4' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.ax-in input::placeholder, .ad-form textarea::placeholder { color: var(--muted); }
.ax-in input:focus, .ax-in select:focus, .ad-form textarea:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }
.ax-in:focus-within > .ui-ic { color: var(--primary-2); }
.ax-eye { position: absolute; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.ax-eye:hover, .ax-eye.on { color: var(--primary-2); background: var(--primary-soft); }
.ax-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.ax-meter i { height: 4px; border-radius: 4px; background: var(--surface-3); transition: background .3s; }
.ax-meter[data-s="1"] i:nth-child(-n+1) { background: #E5484D; }
.ax-meter[data-s="2"] i:nth-child(-n+2) { background: #F5A524; }
.ax-meter[data-s="3"] i:nth-child(-n+3) { background: #8B5CFF; }
.ax-meter[data-s="4"] i { background: #13A07A; }
.ax-submit { margin-top: 6px; height: 54px; gap: 10px; font-weight: 800; }
.ax-submit .ui-ic { transition: transform .25s var(--ease); }
.ax-submit:hover .ui-ic { transform: translateX(4px); }
.ax-switch { margin: 18px 0 0; text-align: center; color: var(--text-2); font-size: 14.5px; }
.ax-switch a { font-weight: 700; color: var(--primary-2); }

/* ---------- Добавление канала ---------- */
.ad-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 30px 34px; border-radius: 24px; color: #fff; border: 1px solid rgba(139, 92, 255, .5); background: linear-gradient(120deg, #0B0A24, #120E3A 55%, #1A1150); margin-bottom: 20px; }
.ad-hero .space-art { z-index: -1; }
.ad-hero-txt { max-width: 640px; }
.ad-hero h1 { color: #fff; font-size: clamp(26px, 3vw, 38px); margin: 0 0 8px; }
.ad-hero p { color: #D3CEF0; margin: 0; }
.ad-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.ad-steps li { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: #D9D2FF; background: rgba(10, 8, 30, .55); border: 1px solid rgba(255, 255, 255, .14); }
.ad-steps b { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 13px; }
.ad-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.ad-form { display: flex; flex-direction: column; gap: 16px; }
.ad-block { padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; transition: border-color .25s, box-shadow .25s; }
.ad-block:focus-within { border-color: var(--primary-line); box-shadow: 0 20px 40px -26px rgba(110, 60, 255, .7); }
.ad-block-h { display: flex; align-items: center; gap: 14px; }
.ad-block-h h2 { font-size: 19px; margin: 0; }
.ad-block-h p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.ad-num { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); box-shadow: 0 10px 20px -10px rgba(123, 77, 255, .9); }
.ad-count { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.ad-count.is-low { color: var(--err); }
.ad-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ad-type { position: relative; cursor: pointer; }
.ad-type input { position: absolute; opacity: 0; pointer-events: none; }
.ad-type span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 13.5px; transition: all .2s var(--ease); }
.ad-type span .ui-ic { color: var(--muted); transition: color .2s, transform .25s var(--ease); }
.ad-type:hover span { border-color: var(--primary-line); }
.ad-type input:checked + span { border-color: var(--primary); color: var(--text); background: linear-gradient(160deg, var(--primary-soft), var(--surface-2)); box-shadow: 0 10px 22px -14px rgba(123, 77, 255, .9); }
.ad-type input:checked + span .ui-ic { color: var(--primary-2); transform: scale(1.12); }
.ad-type input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-line); }
.ad-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 50px; margin-top: 25px; border-radius: 13px; border: 1.5px dashed var(--primary-line); background: var(--surface-2); cursor: pointer; transition: border-color .2s, background .2s; }
.ad-drop:hover, .ad-drop.has-file { border-color: var(--primary); background: var(--primary-soft); }
.ad-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ad-drop-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--grad); }
.ad-drop-t { display: flex; flex-direction: column; min-width: 0; }
.ad-drop-t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-drop-t small { color: var(--muted); font-size: 12px; }
.ad-pkgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border: 0; padding: 0; margin: 0; }
.ad-pkgs .pkg { position: relative; display: block; margin: 0; cursor: pointer; }
.ad-pkgs .pkg input { position: absolute; opacity: 0; pointer-events: none; }
.ad-pkgs .pkg-body { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ic name" "ic desc" "ic price"; column-gap: 12px; row-gap: 2px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); height: 100%; transition: all .25s var(--ease); }
.ad-pkgs .pkg-ic { grid-area: ic; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2); transition: all .25s; }
.ad-pkgs .pkg-name { grid-area: name; font-weight: 800; font-size: 15px; color: var(--text); }
.ad-pkgs .pkg-desc { grid-area: desc; font-size: 13px; color: var(--muted); line-height: 1.4; }
.ad-pkgs .pkg-price { grid-area: price; margin-top: 6px; font-weight: 800; color: var(--primary-2); font-size: 15px; }
.ad-pkgs .pkg-check { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad); opacity: 0; transform: scale(.5); transition: all .25s var(--ease); }
.ad-pkgs .pkg:hover .pkg-body { border-color: var(--primary-line); transform: translateY(-2px); }
.ad-pkgs .pkg input:checked + .pkg-body { border-color: var(--primary); background: linear-gradient(160deg, var(--primary-soft), var(--surface-2) 70%); box-shadow: 0 16px 30px -20px rgba(123, 77, 255, .9); }
.ad-pkgs .pkg input:checked + .pkg-body .pkg-check { opacity: 1; transform: none; }
.ad-pkgs .pkg input:checked + .pkg-body .pkg-ic { background: var(--grad); color: #fff; }
.ad-pkgs .pkg-off { opacity: .5; cursor: not-allowed; }
.pkg-hint { margin: 0; }
.ad-submit { padding: 20px 24px; border-radius: 20px; background: radial-gradient(400px 140px at 100% 0%, rgba(139, 92, 255, .2), transparent 70%), var(--surface); border: 1px solid var(--primary-line); display: flex; flex-direction: column; gap: 14px; }
.ad-submit .btn { height: 54px; font-weight: 800; }
.ad-side { position: sticky; top: calc(var(--header-h) + 8px); display: flex; flex-direction: column; gap: 16px; }
.ad-pv-wrap { padding: 16px; border-radius: 20px; border: 1px solid var(--primary-line); background: radial-gradient(300px 160px at 100% 0%, rgba(139, 92, 255, .25), transparent 70%), var(--surface); }
.ad-pv-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 12px; }
.ad-pv { transform: none !important; }
.ad-pv-ava { overflow: hidden; transition: background .3s; }
.ad-pv-ava img { width: 100%; height: 100%; object-fit: cover; }
.ad-pv .card-title { overflow-wrap: anywhere; }
.ad-tips h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.ad-tips h2 .ui-ic { color: var(--primary-2); }
.ad-tips ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 14px; color: var(--text-2); }
.ad-tips li { position: relative; padding-left: 22px; }
.ad-tips li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 9px; height: 9px; border-radius: 3px; background: var(--grad); }

/* ---------- HTML-карта сайта ---------- */
.map-main { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 22px; }
.map-main a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 14px; transition: border-color .2s, transform .2s var(--ease); }
.map-main a:hover { border-color: var(--primary-line); transform: translateY(-2px); color: var(--text); }
.map-main a span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2); flex: none; }
.map-grid { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; align-items: start; }
.map-block { margin: 0; padding: 0; overflow: hidden; border-radius: 18px; }
.map-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--text); border-bottom: 1px solid var(--line); background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.map-h:hover { color: var(--text); }
.map-h > .ui-ic { color: var(--muted); margin-left: auto; transition: transform .2s var(--ease); flex: none; }
.map-h:hover > .ui-ic { transform: translateX(3px); color: var(--primary-2); }
.map-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.map-ic .ui-emoji { font-size: 18px; }
.map-t { display: flex; flex-direction: column; min-width: 0; }
.map-t b { font-size: 15px; line-height: 1.25; }
.map-t small { color: var(--muted); font-size: 12.5px; }
.map-block ul { padding: 10px 16px 4px; counter-reset: m; }
.map-block li { position: relative; padding: 5px 0 5px 22px; counter-increment: m; }
.map-block li::before { content: counter(m); position: absolute; left: 0; top: 7px; font-size: 11px; font-weight: 700; color: var(--muted); width: 16px; text-align: right; }
.map-block li a { color: var(--text-2); }
.map-more { display: block; padding: 6px 16px 14px 38px; font-size: 13px; font-weight: 700; color: var(--primary-2); }
.map-empty { margin: 0; padding: 14px 16px; font-size: 13.5px; color: var(--muted); }

@media (max-width: 1180px) {
  .ad-grid { grid-template-columns: minmax(0, 1fr); }
  .ad-side { position: static; order: -1; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .ax { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ax-side { padding: 26px 24px; }
  .ax-logo { width: 60px; height: 60px; border-radius: 18px; margin-bottom: 14px; }
  .ax-logo svg { width: 40px; height: 40px; }
  .ax-side h2 { font-size: 24px; }
  .ax-side p { margin-bottom: 14px; }
  .ax-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; }
  .ax-perks li > span { width: 30px; height: 30px; border-radius: 9px; }
  .ax-main { padding: 26px 24px 30px; }
}
@media (max-width: 760px) {
  .ad-side { grid-template-columns: minmax(0, 1fr); }
  .ad-tips { display: none; }
}
@media (max-width: 640px) {
  .ax { border-radius: 22px; }
  .ax-side { padding: 20px 18px; }
  .ax-perks { grid-template-columns: minmax(0, 1fr); }
  .ax-perks li:nth-child(n+3) { display: none; }
  .ax-main { padding: 20px 18px 24px; }
  .ax-main h1 { font-size: 24px; }
  .ad-hero { padding: 22px 18px; border-radius: 20px; }
  .ad-steps li { height: 32px; font-size: 12.5px; padding-right: 10px; }
  .ad-steps b { width: 22px; height: 22px; }
  .ad-block { padding: 18px 16px; gap: 14px; }
  .ad-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-pkgs { grid-template-columns: minmax(0, 1fr); }
  .ad-drop { margin-top: 0; }
  .ad-submit { padding: 16px; position: static; }
  .map-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .map-block li:nth-child(n+5) { display: none; }
  .map-block ul { padding-top: 8px; }
}

/* ---------- Центр импорта ---------- */
.imp { display: flex; flex-direction: column; gap: 16px; }
.imp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.imp-card { padding: 24px; border-radius: 20px; position: relative; overflow: hidden; }
.imp-card > h2, .imp-found-h h2 { font-size: 22px; margin: 2px 0 14px; }
.imp-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: linear-gradient(90deg, #FF7AA8, #A887FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.imp-src { display: flex; flex-direction: column; gap: 14px; }
.imp-src-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.imp-srv { background: radial-gradient(420px 200px at 100% 0%, rgba(139, 92, 255, .2), transparent 70%), var(--surface); }
.imp-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.imp-steps li { display: flex; gap: 12px; align-items: flex-start; }
.imp-steps li > b { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 13px; background: linear-gradient(135deg, #FF7AA8, #8B5CFF); box-shadow: 0 8px 18px -8px rgba(255, 100, 160, .8); }
.imp-steps strong { display: block; font-size: 15px; }
.imp-steps span { display: block; color: var(--text-2); font-size: 13.5px; }
.imp-cmd { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; background: #07071A; border: 1px solid var(--line); margin-bottom: 10px; min-width: 0; }
.imp-cmd code { flex: 1; min-width: 0; border: 0; background: none; padding: 0; color: #9BE7C4; font-size: 12.5px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.imp-cmd .btn { flex: none; }
.imp-found { border-color: var(--primary-line); }
.imp-found-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.imp-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 16px; }
.imp-hint { font-size: 12px; color: var(--muted); line-height: 1.35; }
.imp-seo { grid-column: span 2; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--primary-line); background: linear-gradient(140deg, var(--primary-soft), var(--surface)); cursor: pointer; }
.imp-seo input { margin-top: 3px; width: 18px; height: 18px; accent-color: #8B5CFF; flex: none; }
.imp-seo span { display: flex; flex-direction: column; gap: 3px; }
.imp-seo b { display: inline-flex; align-items: center; gap: 6px; }
.imp-seo b .ui-ic { color: var(--primary-2); }
.imp-seo small { color: var(--text-2); font-size: 13px; }
.imp-filter { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.imp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.imp-chip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font: 700 13px var(--font); cursor: pointer; transition: all .2s; }
.imp-chip.is-ok { color: #46D7A8; border-color: rgba(70, 215, 168, .35); }
.imp-chip.is-check { color: #F7C25A; border-color: rgba(247, 194, 90, .35); }
.imp-chip.is-none { color: #FF8A9B; border-color: rgba(255, 138, 155, .35); }
.imp-chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.imp-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px; border-radius: 14px; border: 1px dashed var(--line); font-size: 13.5px; color: var(--text-2); }
.imp-bulk-sel { min-width: 220px; flex: 0 1 260px; }
.imp-bulk-sel select { height: 38px !important; padding: 0 36px 0 12px !important; }
.imp-list { display: flex; flex-direction: column; gap: 8px; max-height: 620px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.imp-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 330px); gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); transition: border-color .2s; }
.imp-row:hover { border-color: var(--primary-line); }
.imp-row.flash { animation: glow-pulse 1s ease-out 1; }
.imp-row[data-lvl="none"] { border-style: dashed; }
.imp-cb { position: relative; width: 24px; height: 24px; cursor: pointer; }
.imp-cb input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.imp-cb span { position: absolute; inset: 0; border-radius: 7px; border: 1.5px solid var(--line); background: var(--surface); transition: all .2s; }
.imp-cb input:checked + span { background: linear-gradient(135deg, #FF7AA8, #8B5CFF); border-color: transparent; }
.imp-cb input:checked + span::after { content: ''; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }
.imp-row-t { min-width: 0; display: flex; flex-direction: column; }
.imp-row-t b { font-size: 15px; }
.imp-row-t a { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-row-c { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.imp-row-c .ax-in { width: 100%; }
.imp-row-c select { height: 40px !important; padding: 0 36px 0 12px !important; font-size: 14px !important; }
.imp-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.imp-badge.is-ok { color: #46D7A8; background: rgba(70, 215, 168, .12); border: 1px solid rgba(70, 215, 168, .35); }
.imp-badge.is-check { color: #F7C25A; background: rgba(247, 194, 90, .12); border: 1px solid rgba(247, 194, 90, .35); }
.imp-badge.is-none { color: #FF8A9B; background: rgba(255, 138, 155, .1); border: 1px solid rgba(255, 138, 155, .35); }
.imp-note { font-size: 11.5px; color: var(--muted); }
.imp-go { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.imp-jobs { display: flex; flex-direction: column; gap: 10px; }
.imp-job { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.imp-job-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.imp-job-act { margin-left: auto; }
.imp-job-act form { display: flex; gap: 6px; margin: 0; }
.imp-st { height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; }
.imp-st.is-run { color: #fff; background: var(--grad); animation: glow-pulse 2s ease-in-out infinite; }
.imp-st.is-ok { color: #46D7A8; background: rgba(70, 215, 168, .14); }
.imp-st.is-stop { color: #F7C25A; background: rgba(247, 194, 90, .14); }
.imp-bar { height: 8px; border-radius: 99px; background: var(--surface-3); margin: 12px 0 10px; overflow: hidden; }
.imp-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FF7AA8, #8B5CFF, #C4A8FF); background-size: 200% 100%; animation: shimmer 3s linear infinite; transition: width .5s var(--ease); }
.imp-job-s { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.imp-job-s b { color: var(--text); }
.imp-log { margin-top: 10px; }
.imp-log summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--primary-2); }
.imp-log pre { margin: 8px 0 0; max-height: 220px; overflow: auto; padding: 12px; border-radius: 10px; background: #07071A; color: #C9C5EA; font-size: 12px; white-space: pre-wrap; }
.imp-listmode > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-listmode > summary::-webkit-details-marker { display: none; }
.imp-listmode > summary b { font-size: 18px; }
.imp-listmode[open] > summary { margin-bottom: 14px; }
@media (max-width: 1180px) { .imp-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .imp-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .imp-card { padding: 18px 14px; }
  .imp-opts { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .imp-seo { grid-column: auto; }
  .imp-row { grid-template-columns: 28px minmax(0, 1fr); }
  .imp-row-c { grid-column: 1 / -1; }
  .imp-go { flex-direction: column; align-items: stretch; }
  .imp-go .btn { width: 100%; }
}

/* ---------- Продвижение ---------- */
.pr-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px 32px; border-radius: 24px; color: #fff; border: 1px solid rgba(139, 92, 255, .5); background: linear-gradient(120deg, #0B0A24, #120E3A 55%, #1A1150); margin-bottom: 20px; }
.pr-hero .space-art { z-index: -1; }
.pr-hero-ch { display: flex; align-items: center; gap: 18px; min-width: 0; }
.pr-hero-ch .chx-ava .ava { width: 72px; height: 72px; font-size: 28px; }
.pr-hero-t { min-width: 0; }
.pr-hero h1 { color: #fff; font-size: clamp(22px, 2.6vw, 32px); margin: 6px 0 2px; overflow-wrap: anywhere; }
.pr-hero-m { color: #CFC9F0; font-size: 14px; }
.pr-hero-s { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-on { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 11px; font-size: 13px; font-weight: 700; background: rgba(70, 215, 168, .16); border: 1px solid rgba(70, 215, 168, .4); color: #8FF0CD; }
.pr-off { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 11px; font-size: 13px; color: #CFC9F0; background: rgba(10, 8, 30, .5); border: 1px solid rgba(255, 255, 255, .14); }
.pr-wait { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: 18px; margin-bottom: 20px; border: 1px solid rgba(247, 194, 90, .45); background: linear-gradient(140deg, rgba(247, 194, 90, .12), var(--surface) 70%); }
.pr-wait-ic { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #2A1A00; background: linear-gradient(135deg, #FFD66B, #E9A21B); animation: glow-pulse 2.4s ease-in-out infinite; }
.pr-wait-t { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--text-2); }
.pr-wait-t b { font-size: 16px; color: var(--text); }
.pr-wait form { margin: 0; }
.pr-sh { margin-top: 6px; }
.pr-sh h2 { font-size: 22px; }
.pr-bundles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.pr-bundle { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 22px; border: 1px solid var(--primary-line); background: radial-gradient(360px 180px at 100% 0%, rgba(139, 92, 255, .28), transparent 70%), var(--surface); transition: transform .3s var(--ease), box-shadow .3s; }
.pr-bundle:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -30px rgba(110, 60, 255, .9); }
.pr-bundle--max { color: #fff; border-color: rgba(255, 200, 90, .5); background: radial-gradient(360px 200px at 100% 0%, rgba(255, 190, 70, .3), transparent 70%), linear-gradient(150deg, #1B1050, #3A1A8F); }
.pr-bundle--max .pr-b-h span, .pr-bundle--max .pr-feats { color: #DCD5FF; }
.pr-bundle--max .pr-b-h b, .pr-bundle--max .pr-price b { color: #fff; }
.pr-bundle--max .pr-ic { background: linear-gradient(135deg, #FFD66B, #E9A21B); color: #2A1A00; box-shadow: 0 12px 24px -10px rgba(255, 180, 40, .9); }
.pr-bundle--max .btn-white { color: #2A1680; font-weight: 800; }
.pr-bundle::after { content: ''; position: absolute; z-index: -1; top: -40%; left: -60%; width: 40%; height: 180%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent); transform: rotate(20deg); animation: pr-shine 6s ease-in-out infinite; }
.pr-bundle--max::after { animation-delay: 3s; }
@keyframes pr-shine { 0%, 70% { left: -60%; } 100% { left: 140%; } }
.pr-ribbon { position: absolute; top: 22px; right: -42px; transform: rotate(35deg); width: 170px; text-align: center; padding: 4px 0; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: linear-gradient(90deg, #FF7AA8, #8B5CFF); box-shadow: 0 6px 16px -6px rgba(255, 100, 160, .8); }
.pr-b-h { display: flex; align-items: center; gap: 14px; }
.pr-b-h b { display: block; font-size: 22px; font-weight: 800; }
.pr-b-h span { color: var(--text-2); font-size: 14px; }
.pr-ic { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 12px 24px -10px rgba(123, 77, 255, .9); animation: float-y 5s ease-in-out infinite; }
.pr-ic--sm { width: 46px; height: 46px; border-radius: 14px; animation: none; }
.pr-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.pr-feats li { display: flex; align-items: center; gap: 9px; }
.pr-feats .ui-ic { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: rgba(70, 215, 168, .16); color: #46D7A8; }
.pr-price { display: flex; align-items: baseline; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.pr-price b { font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.pr-price s { color: var(--muted); font-size: 15px; }
.pr-save { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12.5px; font-weight: 800; color: #0B3B2C; background: linear-gradient(135deg, #7CF0C5, #2EC48F); }
.pr-active { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: #46D7A8; }
.pr-bundle .btn { height: 50px; font-weight: 800; }
.pr-bundle.is-off, .pr-opt.is-off { opacity: .55; }
.pr-bundle.is-active { box-shadow: inset 0 0 0 1px rgba(70, 215, 168, .5); }
.pr-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pr-opt { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, transform .25s var(--ease); }
.pr-opt:hover { border-color: var(--primary-line); transform: translateY(-3px); }
.pr-opt.is-active { border-color: rgba(70, 215, 168, .45); }
.pr-opt-t { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pr-opt-t b { font-size: 17px; }
.pr-opt-t > span { color: var(--text-2); font-size: 14px; }
.pr-slots { font-size: 12.5px; color: var(--muted); }
.pr-opt-a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.pr-opt-a b { font-size: 20px; font-weight: 800; }
.pr-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.pr-how div { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ic t" "ic s"; column-gap: 12px; align-items: center; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.pr-how span { grid-area: ic; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2); }
.pr-how b { grid-area: t; font-size: 15px; }
.pr-how small { grid-area: s; color: var(--muted); font-size: 13px; }
@media (max-width: 1024px) {
  .pr-opts { grid-template-columns: minmax(0, 1fr); }
  .pr-opt { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .pr-opt-a { border-top: 0; padding-top: 0; flex-direction: column; align-items: flex-end; }
}
@media (max-width: 760px) {
  .pr-bundles { grid-template-columns: minmax(0, 1fr); }
  .pr-how { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pr-hero { padding: 20px 16px; border-radius: 20px; }
  .pr-hero-ch .chx-ava .ava { width: 56px; height: 56px; font-size: 22px; }
  .pr-bundle { padding: 20px 16px; }
  .pr-b-h b { font-size: 19px; }
  .pr-price b { font-size: 28px; }
  .pr-opt { padding: 16px; }
  .pr-opt-a { flex-direction: row; width: 100%; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
  .pr-wait .btn-row { width: 100%; }
  .pr-wait .btn-row .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .pr-ic, .pr-bundle::after, .pr-wait-ic { animation: none; } }
.pcat-t b { hyphens: manual; overflow-wrap: normal; word-break: normal; }
@media (max-width: 640px) {
  .hx-art { inset: -18% -55% 35% 30%; opacity: .32; }
  .hx-plane { display: none; }
  .home .section-head { flex-wrap: nowrap; }
  .home .section-head h2 { font-size: 20px; }
  .section-head .more { font-size: 13px; white-space: nowrap; }
  .pcat-t b { font-size: 13px; }
  .pcat > .ui-ic { display: none; }
}

/* ---------- Админка: таблица «Категории и цены» ---------- */
@media (min-width: 1025px) { .admin-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; } }
.admin-nav { top: calc(var(--header-h) + 8px); }
.table-prices { table-layout: auto; }
.table-prices th, .table-prices td { padding: 8px 6px; vertical-align: middle; }
.table-prices th:first-child, .table-prices td:first-child { padding-left: 14px; }
.table-prices th { font-size: 11px; line-height: 1.3; white-space: normal; vertical-align: bottom; }
.table-prices .th-price { min-width: 92px; }
.table-prices .th-price .link-btn { display: block; padding: 3px 0 0; font-size: 11px; }
.table-prices .td-name { white-space: nowrap; }
.tp-name { display: flex; align-items: center; gap: 8px; min-width: 150px; max-width: 200px; }
.tp-name a { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tp-name small { flex: none; }
.tp-ic { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-2); }
.tp-ic .ui-emoji { font-size: 14px; }
.table-prices .input-num { width: 74px; height: 36px; text-align: right; padding: 0 10px; }
.table-prices .td-actions .btn { width: 36px; padding: 0; }
.table-prices .input-sort { width: 56px; }
.table-prices td[data-label="Каналов"] { text-align: center; color: var(--text-2); }
.table-prices input[type=checkbox] { width: 18px; height: 18px; accent-color: #8B5CFF; display: block; margin: 0 auto; }
.table-prices .td-actions .btn { padding: 0 10px; }
.table-prices tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.panel > .table-wrap { margin: 0 -8px; width: calc(100% + 16px); }
@media (max-width: 1280px) {
  .tp-name { min-width: 130px; max-width: 170px; }
  .table-prices .input-num { width: 76px; }
  .table-prices .input-sort { width: 56px; }
}

@media (max-width: 760px) {
  .table-prices.table-cards .tp-name { min-width: 0; max-width: none; }
  .table-prices.table-cards .input-num { width: 100%; }
  .table-prices.table-cards input[type=checkbox] { margin: 0; }
}

/* ---------- Админка: общее ---------- */
.admin { padding-top: 6px; }
.admin-nav { padding: 12px; border-radius: 18px; gap: 2px; }
.admin-nav a { gap: 10px; padding: 9px 10px; border-radius: 11px; font-weight: 600; border: 1px solid transparent; }
.admin-nav a.active { background: linear-gradient(90deg, rgba(139, 92, 255, .3), rgba(139, 92, 255, .1)); border-color: rgba(139, 92, 255, .6); color: var(--text); }
.an-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.admin-nav a.active .an-ic { background: var(--grad); color: #fff; }
.admin-h1 { font-size: 28px; }
.stat { border-radius: 16px; }
.stat b { font-size: 28px; }
.table th { background: var(--surface-2); }
@media (max-width: 1024px) {
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding: 8px; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav-title { display: none; }
  .admin-nav a { flex: none; }
}
/* поля без своего класса (поиск в админке и т.п.) — в общем стиле */
.main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([class]), .main select:not([class]), .main textarea:not([class]) {
  min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 500 14.5px var(--font); outline: none; transition: border-color .2s, box-shadow .2s;
}
.main textarea:not([class]) { padding: 10px 14px; }
.main input:not([class])::placeholder, .main textarea:not([class])::placeholder { color: var(--muted); }
.main input:not([class]):focus, .main select:not([class]):focus, .main textarea:not([class]):focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
/* превью сниппета — как в поиске, на белом фоне */
.serp { background: #fff; border-color: #E3E3EA; box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .5); }
.serp::before { content: 'Так страница выглядит в поиске'; display: block; font: 700 11px var(--font); letter-spacing: .06em; text-transform: uppercase; color: #8C8CB4; margin-bottom: 8px; }
.table-prices .input-sort { width: 62px; padding: 0 8px; text-align: center; }
.admin-nav a { padding: 6px 8px; }
.admin-nav .an { white-space: normal; line-height: 1.25; }
.an-ic { width: 28px; height: 28px; }

/* =========================================================
   Мобильная версия: страница не должна сдвигаться вбок
   ========================================================= */
html { overflow-x: hidden; }
@supports (overflow: clip) { html { overflow-x: clip; } body { overflow-x: clip; } }
.shell, .shell-main, .main { max-width: 100%; }
img, svg, video, iframe, table { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }
/* тень меню только когда оно открыто — иначе у левого края видна тёмная полоса */
@media (max-width: 1100px) {
  .snav { box-shadow: none; visibility: hidden; transition: transform .32s var(--ease), visibility 0s linear .32s; }
  .snav.open { box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .6); visibility: visible; transition: transform .32s var(--ease), visibility 0s; }
}
.user-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.user-filters form { display: flex; gap: 8px; flex: 1 1 260px; min-width: 0; margin: 0; }
.user-filters form input { flex: 1 1 auto; min-width: 0; width: auto; }
@media (max-width: 760px) {
  /* iPhone увеличивает страницу при фокусе на поле со шрифтом меньше 16px — отсюда «прыжки» */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
  .user-filters > .btn { width: 100%; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .admin-body, .admin-body > * { min-width: 0; max-width: 100%; }
}
@media (max-width: 640px) {
  .my-item .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .my-item .btn-row > *, .my-item .btn-row form .btn { width: 100%; min-width: 0; }
  .my-item .btn-row .btn { white-space: normal; text-align: center; height: auto; min-height: 38px; padding: 6px 10px; }
  .my-item .btn-row form { margin: 0; display: flex; }
  .my-row { min-width: 0; }
  .my-info { min-width: 0; }
  .my-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
