
  :root {
    /* ТЕМА «Тёмная фиолетовая» */
    --bg: #0e1118; --panel: #161a24; --panel2: #1c2130; --line: #232a3a;
    --text: #dde3ee; --muted: #8b96ad; --accent: #6c5ce7; --accent2: #a99bff;
    --on-accent: #ffffff;
    --grad: #1a1f3a; --rowhover: #1a2130; --featrow: #201c3a;
    --card: #10141d; --cardline: #2c3446; --skel1: #161a24; --skel2: #1e2432;
    --favoff: #55607a; --footer: #5c6478;
    --shadow: 0 12px 34px rgba(0,0,0,.4); --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  }
  * { box-sizing: border-box; margin: 0; }
  .is-hidden { display: none !important; }
  body {
    background: radial-gradient(1200px 500px at 70% -10%, var(--grad) 0%, var(--bg) 60%);
    color: var(--text); font: 15px/1.5 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh; padding: 40px 20px; overflow-x: hidden;
  }
  .wrap { width: 100%; max-width: 1260px; margin: 0 auto; }
  /* проза читается узкой колонкой, широкий контейнер нужен только таблице */
  .about, .sub, .searchrow, .opts, .status { max-width: 1060px; }
  h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
  h1 a { color: inherit; text-decoration: none; }
  h1 a:hover { opacity: .85; }
  h1 .tg { color: var(--accent2); }
  .sub { color: var(--muted); margin: 6px 0 26px; }
  .searchrow { display: flex; gap: 10px; }
  input[type=text] {
    flex: 1; background: var(--panel2); border: 1px solid var(--line);
    border-radius: 10px; padding: 13px 16px; color: var(--text); font-size: 16px;
    outline: none; transition: border-color .15s;
  }
  input[type=text]:focus { border-color: var(--accent); }
  button {
    background: var(--accent); color: var(--on-accent); border: 0; border-radius: 10px;
    padding: 0 26px; font-size: 16px; font-weight: 700; cursor: pointer;
  }
  button:hover { background: #7d6ff5; }
  button:disabled { background: #2a3040; color: #6b7385; cursor: default; }
  .opts { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 14px 2px 4px; color: var(--muted); font-size: 14px; }
  .opts label { display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
  .opts input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
  .opts input[type=number] {
    width: 70px; background: var(--panel2); border: 1px solid var(--line);
    border-radius: 7px; color: var(--text); padding: 5px 8px;
  }
  .status { margin: 18px 2px 10px; color: var(--muted); font-size: 14px; min-height: 21px; }
  .status .err { color: #ff8f8f; }
  table { width: 100%; min-width: 0; border-collapse: collapse; background: var(--panel);
    border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
  .tablebox { border-radius: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    max-width: 100%; min-width: 0; width: 100%; }
  th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
  th { background: var(--panel2); color: var(--muted); font-size: 13px;
    text-transform: uppercase; letter-spacing: .05em; cursor: pointer; white-space: nowrap; }
  th:hover { color: var(--text); }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: var(--rowhover); }
  /* прирост за месяц под числом подписчиков */
  .growth { display: block; font-size: 11px; font-weight: 600; line-height: 1.3; }
  .growth.up { color: #7ee29a; }
  .growth.down { color: #ff9b9b; }
  .growth.flat { color: var(--muted); font-weight: 500; }
  td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  /* Заголовок числового столбца — по правому краю, как и сами числа:
     раньше подписи стояли слева, а цифры справа, и не читались как один столбец. */
  table:has(td.num:nth-child(1)) th:nth-child(1),
  table:has(td.num:nth-child(2)) th:nth-child(2),
  table:has(td.num:nth-child(3)) th:nth-child(3),
  table:has(td.num:nth-child(4)) th:nth-child(4),
  table:has(td.num:nth-child(5)) th:nth-child(5),
  table:has(td.num:nth-child(6)) th:nth-child(6),
  table:has(td.num:nth-child(7)) th:nth-child(7),
  table:has(td.num:nth-child(8)) th:nth-child(8),
  table:has(td.num:nth-child(9)) th:nth-child(9) { text-align: right; }
  td a { color: var(--accent2); text-decoration: none; font-weight: 600; }
  td a:hover { text-decoration: underline; }
  .src { display: inline-block; padding: 2px 9px; border-radius: 20px;
    font-size: 12px; background: #22304d; color: #9fc0ff; white-space: nowrap; }
  .adbtn { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 14px;
    font-size: 11.5px; background: transparent; border: 1px solid var(--line);
    color: var(--muted) !important; font-weight: 500 !important; }
  .adbtn:hover { border-color: var(--accent); color: var(--accent2) !important; text-decoration: none !important; }
  .applink { display: inline-block; padding: 2px 10px; border-radius: 14px;
    font-size: 12px; background: #14351f; border: 1px solid #1f6b3a;
    color: #7ee29a !important; font-weight: 600 !important; text-decoration: none !important;
    overflow-wrap: anywhere; }
  .applink:hover { background: #1c4527; }
  .iconbtn { display: inline-block; margin-left: 5px; padding: 2px 6px; border-radius: 10px;
    font-size: 12px; background: transparent; border: 1px solid var(--line);
    text-decoration: none !important; opacity: .75; }
  .iconbtn:hover { opacity: 1; border-color: var(--accent); }
  .unamecell { white-space: nowrap; }
  #box .unamecell { white-space: normal; overflow-wrap: anywhere; }
  tr.featured td { background: var(--featrow); }
  .featbadge { display: inline-block; padding: 2px 9px; border-radius: 20px;
    font-size: 12px; background: #3d3320; color: #ffce7a; white-space: nowrap; }
  .desc { color: var(--muted); font-size: 13px; margin-top: 3px;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .toolbar { display: flex; justify-content: flex-end; margin: 10px 2px; }
  .toolbar button { background: var(--panel2); font-size: 14px; padding: 8px 16px; }
  .toolbar button:hover { background: var(--line); }
  .spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--line);
    border-top-color: var(--accent2); border-radius: 50%; animation: spin .8s linear infinite;
    vertical-align: -2px; margin-right: 7px; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .toprow { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
  .topactions { display: flex; gap: 10px; flex-wrap: wrap; }
  .filtertoggle, .catalogtoggle { display: none; }
  .dlbtn { background: var(--panel2); border: 1px solid var(--line); color: var(--text);
    border-radius: 10px; padding: 10px 18px; text-decoration: none; font-weight: 600;
    white-space: nowrap; transition: border-color .15s; }
  .dlbtn:hover { border-color: var(--accent); color: var(--accent2); }
  .tgbtn { border-color: #2AABEE55; color: #4fc0f0; }
  .tgbtn:hover { border-color: #2AABEE; color: #6fd0ff; }
  .about { margin-top: 34px; padding: 20px 24px; background: var(--panel);
    border: 1px solid var(--line); border-radius: 14px; color: var(--muted); font-size: 14px;
    box-shadow: var(--shadow); }
  .about h2 { color: var(--text); font-size: 16px; margin: 14px 0 8px; }
  .about h2:first-child { margin-top: 0; }
  .about h3 { color: var(--text); font-size: 14px; margin: 12px 0 4px; }
  .about p, .about li { margin: 6px 0; }
  .about a { color: var(--accent2); text-decoration: none; font-weight: 500; }
  .about a:hover { text-decoration: underline; }
  .about ol, .about ul { padding-left: 22px; }
  footer { margin: 26px 2px 6px; color: var(--footer); font-size: 13px; }
  select { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px;
    color: var(--text); padding: 5px 8px; font: inherit; }
  .crumb { margin: 2px 2px 14px; color: var(--muted); font-size: 13px; }
  .crumb a { color: var(--accent2); text-decoration: none; }
  .crumb a:hover { text-decoration: underline; }
  .pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 16px 2px 6px; font-size: 14px; }
  .pager a, .pager b { min-width: 34px; padding: 7px 10px; text-align: center; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
  .pager a { color: var(--accent2); }
  .pager a:hover { border-color: var(--accent2); }
  .pager b { color: var(--text); background: var(--panel); }
  .catlinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 16px 2px 2px; }
  .catlinks a { background: var(--panel2); border: 1px solid var(--line); border-radius: 20px;
    padding: 5px 13px; font-size: 13px; color: var(--muted); text-decoration: none; transition: .15s; }
  .catlinks a:hover { border-color: var(--accent); color: var(--accent2); }
  .favstar { cursor: pointer; font-size: 17px; color: var(--favoff); user-select: none; line-height: 1; }
  .favstar.on { color: #ffce55; }
  th.mini, td.mini { text-align: center; width: 1%; white-space: nowrap; }
  /* ширины колонок, чтобы таблица влезала и не обрезалась */
  /* Фиксированная раскладка нужна ТОЛЬКО таблице результатов (9 колонок):
     раньше она росла по содержимому и уезжала за край. У SEO-таблицы ниже
     колонок меньше — на неё эти проценты навешивать нельзя, слипаются шапки. */
  #box table { table-layout: fixed; }
  #box .titlecell { width: 26%; font-weight: 500; overflow-wrap: anywhere; }
  #box th:nth-child(1), #box td.rownum { width: 44px; }
  #box th:nth-child(2) { width: 34px; }
  #box .unamecell { width: 17%; }
  #box th:nth-child(5), #box th:nth-child(6), #box th:nth-child(7) { width: 9%; }
  #box th:nth-child(8) { width: 13%; }
  #box th:nth-child(9) { width: 10%; }
  .titlecell { min-width: 160px; max-width: 340px; font-weight: 500; }
  th:nth-child(5), td.num { white-space: nowrap; }
  th:nth-child(6), #rows td:nth-child(6) { max-width: 120px; }
  .livebtn { cursor: pointer; background: transparent; border: 1px solid var(--line); color: var(--muted);
    border-radius: 7px; padding: 3px 9px; font-size: 12px; font-weight: 500; }
  .livebtn:hover { border-color: var(--accent); color: var(--accent2); }
  .live { font-size: 12px; white-space: nowrap; line-height: 1.35; }
  .live b { display: inline-block; padding: 1px 7px; border-radius: 12px; font-weight: 600; }
  .live.act b { background: #14351f; color: #7ee29a; }
  .live.slow b { background: #3a3320; color: #ffce7a; }
  .live.dead b { background: #3a2020; color: #ff9a9a; }
  .live small { color: var(--muted); }
  .favbar { display: flex; align-items: center; gap: 14px; }
  .favbar button { background: var(--panel2); font-size: 14px; padding: 8px 16px; }
  .favbar button:hover { background: var(--line); }
  .favbar .cnt, .favtop .cnt { color: var(--accent2); font-weight: 600; }
  .favtop.on, #favtoggle.on { border-color: #ffce55; color: #ffce55; }
  .catmatch { color: var(--accent2); font-weight: 600; }
  .catprimary { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
  .topicmeta { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
  .topicreport { display: block; margin-top: 4px; padding: 2px 6px; border: 0;
    background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
  .topicreport:hover { color: #ffce7a; text-decoration: underline; }
  .emptyfav { padding: 28px 12px !important; text-align: center; color: var(--muted); }
  .plan-summary { margin-right: auto; color: var(--muted); font-size: 13px; }
  .plan-summary b { color: var(--accent2); }
  .metric { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 9px; margin-top: 14px; }
  .catalog-card { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; background: var(--card); box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s, border-color .12s; }
  .catalog-card:hover { border-color: var(--accent); color: var(--accent2); transform: translateY(-2px); box-shadow: var(--shadow); }
  .catalog-card b { color: var(--accent2); font-variant-numeric: tabular-nums; }
  .catalog-card small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
  .catalog-section { overflow: hidden; }
  .catalog-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px 22px; margin-top: 16px; }
  .catalog-item { display: flex; align-items: baseline; min-width: 0; padding: 7px 9px; border-radius: 9px; color: var(--text); text-decoration: none; transition: background .12s, color .12s, transform .12s; }
  .catalog-item:hover { background: var(--panel2); color: var(--accent2); transform: translateX(2px); }
  .catalog-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  .catalog-dots { flex: 1 1 18px; min-width: 12px; margin: 0 8px 4px; border-bottom: 2px dotted var(--line); opacity: .9; }
  .catalog-count { flex: 0 0 auto; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel2); color: var(--accent2); font-size: 12px; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; }
  .catalog-item:hover .catalog-dots { border-color: var(--accent); }
  .catalog-item:hover .catalog-count { border-color: var(--accent); }
  body[data-path="/"] .catalog-section:not(.expanded) .catalog-item:nth-child(n+13) { display: none; }
  .catalog-more { display: none; margin: 12px auto 2px; background: var(--panel2);
    border: 1px solid var(--line); color: var(--text); border-radius: 20px;
    padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; }
  body[data-path="/"] .catalog-more { display: block; }
  .catalog-more:hover { border-color: var(--accent); color: var(--accent2); }
  @media (max-width: 1050px) {
    .catalog-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @media (max-width: 780px) {
    .catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap-column: 14px; }
  }
  .profile-stats { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; margin: 16px 0; }
  .profile-stats div { padding: 10px 11px; border: 1px solid var(--line); background: var(--panel2); border-radius: 9px; }
  .profile-stats dt { color: var(--muted); font-size: 12px; }
  .profile-stats dd { margin: 2px 0 0; color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
  .handle { color: var(--accent2); font-size: .8em; font-weight: 500; }
  .profile-open { display: inline-block; padding: 8px 12px; border-radius: 8px; text-decoration: none; background: #14351f; border: 1px solid #1f6b3a; color: #7ee29a; font-weight: 600; }
  .similar ul { padding-left: 19px; }
  .similar li { margin: 8px 0; }
  .similar small { color: var(--muted); margin-left: 4px; }
  .channel-history { margin-top: 14px; }
  .channel-history > p { margin-bottom: 12px; }
  .history-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
  .history-summary div { padding: 10px 11px; border: 1px solid var(--line); background: var(--panel2); border-radius: 9px; }
  .history-summary span, .history-summary small { display: block; color: var(--muted); font-size: 12px; }
  .history-summary b { display: block; margin: 2px 0; font-size: 18px; font-variant-numeric: tabular-nums; }
  .growth-pos { color: #65d889; }
  .growth-neg { color: #ff8585; }
  .growth-flat { color: var(--text); }
  .channel-history svg { width: 100%; height: 92px; display: block; padding: 8px 0; border-radius: 9px; background: var(--panel2); }
  .channel-history polyline { fill: none; stroke: var(--accent2); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .history-axis { display: flex; justify-content: space-between; margin-top: 5px; color: var(--muted); font-size: 12px; }
  /* карточка-превью при наведении */
  #hovercard { position: fixed; z-index: 50; width: 330px; max-width: 92vw;
    background: var(--card); border: 1px solid var(--cardline); border-radius: 12px;
    box-shadow: var(--shadow); padding: 14px; display: none; }
  #hovercard .hc-top { display: flex; gap: 12px; align-items: center; }
  #hovercard img { width: 56px; height: 56px; border-radius: 50%; flex: none;
    object-fit: cover; background: var(--panel2); }
  #hovercard .hc-name { font-weight: 600; color: var(--text); font-size: 15px; }
  #hovercard .hc-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
  #hovercard .hc-desc { color: var(--text); font-size: 13px; margin-top: 10px;
    line-height: 1.45; max-height: 120px; overflow: hidden; }
  #hovercard .hc-empty { color: var(--muted); font-size: 12.5px; margin-top: 8px; font-style: italic; }
  .hc-actions { display: flex; gap: 6px; margin-top: 12px; }
  .hc-btn { flex: 1; text-align: center; padding: 7px 4px; border-radius: 8px;
    font-size: 12px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
  .hc-btn.app { background: #14351f; border: 1px solid #1f6b3a; color: #7ee29a !important; }
  .hc-btn.app:hover { background: #1c4527; }
  .hc-btn.web { background: #16233f; border: 1px solid #274a7e; color: #7fb0ff !important; }
  .hc-btn.web:hover { background: #1d2f52; }
  .hc-btn.ad { background: var(--panel2); border: 1px solid var(--line); color: var(--muted) !important; flex: 0 0 auto; padding: 7px 10px; }
  .hc-btn.ad:hover { border-color: var(--accent); }
  /* анимация загрузки — скелетон-строки */
  .loading { padding: 8px 0; }
  .skel { height: 46px; border-radius: 8px; margin: 8px 0;
    background: linear-gradient(90deg, var(--skel1) 25%, var(--skel2) 37%, var(--skel1) 63%);
    background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
  @keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
  .loadbar { position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent2)); z-index: 60;
    transition: width .3s ease; }
  .addbtn { background: var(--panel2); border: 1px solid var(--line); color: var(--text);
    border-radius: 10px; padding: 10px 16px; text-decoration: none; font-weight: 600;
    white-space: nowrap; cursor: pointer; }
  .addbtn:hover { border-color: var(--accent); color: var(--accent2); }
  .modal-bg { position: fixed; inset: 0; background: rgba(6,8,12,.7); z-index: 70;
    display: none; align-items: center; justify-content: center; padding: 20px; }
  .modal-bg.on { display: flex; }
  .modal { background: var(--card); border: 1px solid var(--cardline); border-radius: 14px;
    padding: 24px; width: 440px; max-width: 100%; box-shadow: var(--shadow); }
  .modal h3 { font-size: 18px; margin-bottom: 6px; }
  .modal p { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
  .modal .row { display: flex; gap: 8px; }
  .modal input { flex: 1; }
  .modal .msg { margin-top: 12px; font-size: 14px; }
  .modal .msg.ok { color: #7ee29a; } .modal .msg.err { color: #ff9a9a; }
  .modal .close { float: right; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; }
  footer a { color: var(--accent2); text-decoration: none; }
  #hovercard .hc-close { position: absolute; top: 8px; right: 10px; cursor: pointer;
    color: var(--muted); font-size: 20px; line-height: 1; display: none; }
  #rows tr { cursor: pointer; }
  /* мобильная адаптация */
  @media (max-width: 640px) {
    body { padding: 10px 10px 18px; }
    h1 { font-size: 20px; line-height: 1.18; }
    .sub { font-size: 12.5px; line-height: 1.4; margin: 5px 0 10px; }
    .toprow { display: block; }
    .topactions { flex-wrap: nowrap; gap: 7px; overflow-x: auto; padding: 0 0 9px;
      scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .topactions::-webkit-scrollbar, .catlinks::-webkit-scrollbar { display: none; }
    .topactions .dlbtn, .topactions .addbtn { flex: 0 0 auto; min-height: 36px;
      padding: 8px 11px; font-size: 12.5px; border-radius: 9px; white-space: nowrap; }
    .searchrow { position: sticky; top: 0; z-index: 20; gap: 7px; padding: 6px 0;
      background: linear-gradient(var(--bg) 78%, transparent); }
    .searchrow input { font-size: 15px; padding: 11px 13px; }
    .searchrow button { padding: 0 15px; }
    .filtertoggle, .catalogtoggle { width: 100%; display: flex; align-items: center;
      justify-content: space-between; border: 1px solid var(--line); background: var(--panel);
      color: var(--muted); padding: 8px 11px; margin: 3px 0 5px; font-size: 12.5px;
      font-weight: 650; border-radius: 9px; }
    .filtertoggle::after, .catalogtoggle::after { content: "⌄"; font-size: 15px; }
    .filtertoggle[aria-expanded="true"]::after,
    body.catalog-open .catalogtoggle::after { transform: rotate(180deg); }
    .opts { display: none; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 8px;
      padding: 10px; border: 1px solid var(--line); border-radius: 10px;
      background: var(--panel); font-size: 12px; }
    .opts.open { display: grid; }
    .opts > span { display: none; }
    .opts label { display: grid; gap: 4px; align-content: start; }
    .opts label:last-child { display: flex; grid-column: 1 / -1; align-items: center; }
    .opts input[type=number], .opts select { width: 100% !important; min-height: 36px; }
    .catlinks { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 6px;
      margin: 4px 0 6px; padding-bottom: 2px; scrollbar-width: none;
      -webkit-overflow-scrolling: touch; }
    .catlinks a { flex: 0 0 auto; font-size: 12px; padding: 6px 10px; }
    body.has-results .catlinks, body.has-results .catalogtoggle,
    body.has-results .catalog-section { display: none !important; }
    body[data-path="/"] .catalog-section { display: none; }
    body[data-path="/"].catalog-open .catalog-section { display: block; }
    body:not([data-path="/"]) .catalogtoggle { display: none; }
    .catalog-section { margin-top: 7px; }
    .catalog-section h2 { font-size: 15px; }
    .catalog-section > p { display: none; }
    .status { margin: 7px 2px 6px; min-height: 18px; font-size: 12.5px; }
    .toolbar { overflow-x: auto; justify-content: flex-start; gap: 6px; margin: 5px 0 7px;
      scrollbar-width: none; }
    .toolbar .plan-summary { display: none; }
    .toolbar button { flex: 0 0 auto; padding: 7px 10px; font-size: 12px; }
    /* Результаты на телефоне — карточки вместо таблицы шириной в несколько экранов. */
    .tablebox { overflow: visible; border-radius: 0; }
    table { display: block; width: 100%; min-width: 0; border: 0; background: transparent;
      box-shadow: none; }
    thead { display: none; }
    tbody { display: grid; gap: 9px; }
    #rows tr { display: grid; grid-template-columns: 32px repeat(3,minmax(0,1fr));
      gap: 5px 8px; padding: 12px; border: 1px solid var(--line); border-radius: 13px;
      background: var(--panel); box-shadow: var(--shadow-sm); }
    #rows td { display: block; min-width: 0; padding: 0; border: 0; background: transparent;
      text-align: left; white-space: normal; }
    #rows td:nth-child(1) { display: none; }
    #rows td:nth-child(2) { grid-column: 1; grid-row: 1 / span 2; font-size: 23px; }
    #rows td:nth-child(3) { grid-column: 2 / 5; grid-row: 1; font-size: 15px;
      max-width: none; font-weight: 700; }
    #rows td:nth-child(4) { grid-column: 2 / 5; grid-row: 2; width: auto; }
    #rows td:nth-child(4) .applink { padding: 1px 7px; font-size: 11.5px; }
    #rows td:nth-child(5) { grid-column: 2; grid-row: 3; }
    #rows td:nth-child(6) { grid-column: 3; grid-row: 3; }
    #rows td:nth-child(7) { grid-column: 4; grid-row: 3; }
    #rows td:nth-child(5)::before, #rows td:nth-child(6)::before,
    #rows td:nth-child(7)::before { display: block; color: var(--muted); font-size: 9.5px;
      font-weight: 500; text-transform: none; }
    #rows td:nth-child(5)::before { content: "подписчики"; }
    #rows td:nth-child(6)::before { content: "ср. охват"; }
    #rows td:nth-child(7)::before { content: "ER"; }
    #rows td:nth-child(8) { grid-column: 2 / 5; grid-row: 4; color: var(--muted);
      font-size: 11px; }
    #rows td:nth-child(9) { grid-column: 2 / 5; grid-row: 5; }
    #rows .emptyfav { grid-column: 1 / 5; padding: 20px !important; }
    .about { padding: 14px 15px; font-size: 13.5px; }
    /* карточка — плашка снизу на весь экран */
    #hovercard { position: fixed; left: 0 !important; right: 0; bottom: 0;
      top: auto !important; width: 100%; max-width: 100%; border-radius: 16px 16px 0 0;
      padding: 18px 16px 22px; box-shadow: 0 -8px 40px rgba(0,0,0,.6); }
    #hovercard .hc-close { display: block; font-size: 26px; top: 12px; right: 16px; }
    .hc-btn { padding: 11px 4px; font-size: 13px; }
    .catalog-list { grid-template-columns: 1fr; gap: 2px; margin-top: 12px; }
    .catalog-item { padding: 8px 6px; }
    .catalog-name { font-size: 13.5px; }
    .plan-summary { width: 100%; margin: 0 0 2px; }
    .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  }
  /* cookie-баннер */
  #cookiebar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
    background: var(--card); border: 1px solid var(--cardline); border-radius: 12px;
    padding: 14px 16px; box-shadow: 0 8px 30px rgba(20,30,50,.25); max-width: 980px;
    margin: 0 auto; }
  #cookiebar .cb-text { flex: 1; min-width: 240px; color: var(--muted); font-size: 13px; line-height: 1.5; }
  #cookiebar .cb-btns { display: flex; gap: 10px; flex-wrap: wrap; }
  .cb-sec, .cb-pri { padding: 10px 16px; font-size: 14px; border-radius: 9px; cursor: pointer; border: 1px solid var(--line); }
  .cb-sec { background: var(--panel2); color: var(--text); }
  .cb-pri { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
  /* возрастной гейт */
  #agegate { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center;
    justify-content: center; background: rgba(6,8,12,.92); padding: 20px; }
  #agegate .ag-box { background: var(--panel); border: 1px solid var(--line);
    border-radius: 14px; padding: 26px; max-width: 380px; text-align: center; }
  #agegate .ag-title { font-size: 20px; font-weight: 700; color: var(--accent2); margin-bottom: 8px; }
  #agegate p { color: var(--muted); font-size: 14px; margin: 10px 0 18px; }
  #agegate .ag-btns { display: flex; gap: 10px; justify-content: center; }
  /* юридические страницы */
  .legal h2 { font-size: 17px; margin: 18px 0 6px; }
  .legal p, .legal li { color: var(--text); font-size: 14px; line-height: 1.6; }
  .legal ul { margin: 6px 0 6px 20px; }
  .legal-upd { color: var(--muted); font-size: 12px; margin-top: 18px; }
  /* № колонка */
  td.rownum { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums;
    width: 1%; white-space: nowrap; padding-right: 6px; }
  /* бейджи качества канала */
  .ch-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
  .badge { font-size: 12px; padding: 3px 11px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
  .b-ok { background: #14351f; color: #7ee29a; }
  .b-hot { background: #33244d; color: #c4b3ff; }
  .b-reach { background: #16233f; color: #8fb8ff; }
  .b-warn { background: #3a2020; color: #ff9a9a; }
  .b-mute { background: #2a2a33; color: #a6a6b4; }
  .ch-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
  .ch-share, .report-link, .claim-link { font-size: 13px; text-decoration: none; padding: 8px 13px;
    border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
  .ch-share:hover, .report-link:hover, .claim-link:hover { border-color: var(--accent); color: var(--accent2); }
  .claim-code { max-width: 420px; margin: 18px 0; padding: 15px 17px;
    border-radius: 10px; border: 1px dashed var(--accent); background: var(--panel2); }
  .claim-code span { display: block; color: var(--muted); font-size: 12px; }
  .claim-code b { display: block; margin-top: 4px; color: var(--accent2);
    font: 700 19px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: .04em; user-select: all; }
  .promote-link { font-size: 13px; text-decoration: none; padding: 8px 13px;
    border-radius: 8px; border: 1px solid #7a6330; color: #ffce7a !important;
    background: #2b2518; font-weight: 650 !important; }
  .promote-link:hover { border-color: #ffce7a; text-decoration: none !important; }
  .rating-updated { color: var(--muted); font-size: 12.5px; }
  .rating-table { margin: 12px 0 24px; }
  .rating-table small { color: var(--muted); }
  .rating-table table { width: 100%; }
  .rating-table th, .rating-table td { padding: 9px 10px; }
  .rating-table td:first-child { width: 34px; }
  .rating-table td:nth-child(2) { max-width: 340px; }
  .rating-table td:nth-child(2) a { overflow-wrap: anywhere; }
  .rating-table td:nth-child(2) small { display: block; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
  /* rating card mobile: на узком экране таблица рейтинга -> карточки */
  @media (max-width: 640px) {
    .rating-table table, .rating-table tbody, .rating-table tr, .rating-table td { display: block; width: auto; }
    .rating-table table { width: 100%; }
    .rating-table thead { display: none; }
    .rating-table tr { position: relative; padding: 12px 14px 12px 42px;
      border-bottom: 1px solid var(--line); }
    .rating-table td { padding: 3px 0; border: 0; max-width: none; text-align: left; white-space: normal; }
    .rating-table td.rownum { position: absolute; left: 12px; top: 12px; width: auto;
      color: var(--muted); font-weight: 700; font-size: 13px; }
    .rating-table td:nth-child(2) { margin-bottom: 6px; max-width: none; }
    .rating-table td:nth-child(2) small { white-space: normal; }
    .rating-table td.num { display: flex; justify-content: space-between; gap: 14px;
      font-variant-numeric: tabular-nums; }
    .rating-table td.num::before { content: attr(data-label); color: var(--muted);
      font-weight: 500; white-space: nowrap; }
  }
  .channel-compare { margin-top: 14px; }
  .compare-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  .compare-grid > div { background: var(--panel2); border: 1px solid var(--line);
    border-radius: 10px; padding: 12px; }
  .compare-grid span, .compare-grid small { display: block; color: var(--muted); font-size: 12px; }
  .compare-grid b { display: block; color: var(--accent2); font-size: 14px; margin: 4px 0; }
  .compare-note { color: var(--muted) !important; font-size: 12px !important; margin-top: 10px !important; }
  /* страницы первого контура монетизации */
  .offer-hero { max-width: 1060px; }
  .eyebrow { display: inline-block; margin-bottom: 6px; color: var(--accent2);
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .offer-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px; margin: 18px 0; }
  .offer-card, .price-card { background: var(--card); border: 1px solid var(--line);
    border-radius: 12px; padding: 18px; }
  .offer-card h3, .price-card h3 { color: var(--text); font-size: 16px; margin: 0 0 8px; }
  .offer-card ul { margin: 12px 0 18px; padding-left: 19px; }
  .offer-btn { display: inline-block; padding: 10px 16px; border-radius: 9px;
    border: 1px solid var(--accent); color: var(--accent2) !important;
    text-decoration: none !important; font-weight: 700 !important; }
  .offer-btn.primary { background: var(--accent); color: #fff !important; }
  .offer-btn:hover { filter: brightness(1.12); }
  .offer-link { display: inline-block; margin: 11px 0 0 12px; }
  .offer-note { margin-top: 16px !important; padding: 11px 13px; border-radius: 9px;
    background: var(--panel2); color: var(--muted); font-size: 12.5px; }
  .price-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px; margin: 18px 0; }
  .price-card { position: relative; }
  .price-card b { display: block; color: var(--accent2); font-size: 22px; }
  .price-card small { color: var(--muted); }
  .price-card p { margin-top: 10px; }
  .featured-price { border-color: var(--accent); }
  .featured-price > span { position: absolute; top: -10px; right: 10px;
    padding: 2px 8px; border-radius: 12px; background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700; }
  .offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin: 18px 0; }
  .lead-form { max-width: 720px; display: grid; grid-template-columns: 1fr 1fr;
    gap: 13px; margin: 22px 0; padding: 18px; border: 1px solid var(--line);
    border-radius: 12px; background: var(--card); }
  .lead-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
  .lead-form .lead-wide { grid-column: 1 / -1; }
  .lead-form input, .lead-form select, .lead-form textarea { width: 100%; min-width: 0;
    box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 8px; background: var(--panel2); color: var(--text); font: inherit; }
  .lead-form textarea { min-height: 92px; resize: vertical; }
  .lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus {
    outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-color: var(--accent); }
  .lead-consent { display: flex !important; grid-template-columns: 18px 1fr !important;
    align-items: start; gap: 9px !important; line-height: 1.45; }
  .lead-consent input { width: 18px; margin-top: 2px; }
  .lead-hint { grid-column: 1/-1; margin: -4px 0 6px; font-size: 13px; color: var(--muted); line-height: 1.45; }
  .lead-submit { justify-self: start; cursor: pointer; background: var(--accent);
    color: #fff; border: 0; padding: 11px 18px; border-radius: 9px;
    font-weight: 700; }
  .lead-hp { position: absolute !important; left: -10000px !important;
    width: 1px !important; height: 1px !important; overflow: hidden !important; }
  @media (max-width: 640px) { .lead-form { grid-template-columns: 1fr; padding: 14px; }
    .lead-form .lead-wide { grid-column: auto; } }
  @media (max-width: 640px) {
    .offer-grid, .price-grid { grid-template-columns: 1fr; }
    .offer-link { margin-left: 0; }
    .compare-grid { grid-template-columns: 1fr; }
  }
