/* ==========================================================================
   torrenttable() — Плитки / Блоки / Лента. Дизайн 2026, родня «Следить за
   комментариями»: одна карточка со шапкой, тёмно-синие чернила, а синий акцент —
   только для смысла «новое». Поверхности — токены темы --tp-*.
   Раскладка — по ширине самого списка (@container), а не экрана.
   ========================================================================== */

:root {
    --tor-ink: #0b1430; --tor-on-ink: #ffffff; --tor-ink-soft: rgba(11, 20, 48, .06);
    --tor-new: var(--tp-accent, #2563eb); --tor-new-soft: var(--tp-accent-soft, #e8f0ff);
    --tor-green: #15803d; --tor-green-soft: #dcfce7;
    --tor-red: #b91c1c;   --tor-red-soft: #fee2e2;
    --tor-amber: #b45309; --tor-amber-soft: #fef3c7;
    --tor-violet: #6d28d9; --tor-violet-soft: #ede9fe;
    --tor-r: 14px; --tor-r-sm: 9px;
    --tor-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
    --tor-lift: 0 14px 30px rgba(11, 20, 48, .22);
    --tor-bg-opacity: .13;
}
[data-tp-theme="dark"] {
    --tor-ink: #eef3fb; --tor-on-ink: #0a1020; --tor-ink-soft: rgba(238, 243, 251, .07);
    --tor-green: #4ade80; --tor-green-soft: rgba(74, 222, 128, .14);
    --tor-red: #f87171;   --tor-red-soft: rgba(248, 113, 113, .14);
    --tor-amber: #fbbf24; --tor-amber-soft: rgba(251, 191, 36, .14);
    --tor-violet: #a78bfa; --tor-violet-soft: rgba(167, 139, 250, .16);
    --tor-shadow: 0 1px 2px rgba(0, 0, 0, .45);
    --tor-lift: 0 14px 30px rgba(0, 0, 0, .6);
    --tor-bg-opacity: .24;
}

/* ── карточка списка ────────────────────────────────────────────────────── */
.tor { container: tor / inline-size; min-width: 0; border: 1px solid var(--tp-border); border-radius: var(--tor-r); background: var(--tp-surface); box-shadow: var(--tor-shadow); color: var(--tp-text-2); font-size: 13px; line-height: 1.4; text-align: left; }
.tor *, .tor *::before, .tor *::after { box-sizing: border-box; }
.tor a { color: inherit; text-decoration: none; }
.tor-slot { margin: 8px 0; }

/* ── шапка ──────────────────────────────────────────────────────────────── */
.tor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--tp-border); border-radius: var(--tor-r) var(--tor-r) 0 0; background: var(--tp-surface-2); }
.tor-count { color: var(--tp-muted); font-size: 12.5px; white-space: nowrap; }
.tor-count b { color: var(--tp-text); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.tor-filter { flex: 1 1 160px; min-width: 120px; max-width: 320px; height: 34px; padding: 0 11px; border: 1px solid var(--tp-border-strong); border-radius: var(--tor-r-sm); background: var(--tp-surface); color: var(--tp-text); font-size: 13px; }
.tor-filter::placeholder { color: var(--tp-muted); }
.tor-filter-count { color: var(--tor-new); font-size: 12px; font-weight: 700; }
.tor-bar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.tor-sort { max-width: 200px; height: 34px; padding: 0 8px; border: 1px solid var(--tp-border-strong); border-radius: var(--tor-r-sm); background: var(--tp-surface); color: var(--tp-text-2); font-size: 13px; cursor: pointer; }
.tor-filter:focus, .tor-sort:focus { outline: 0; border-color: var(--tor-new); }
[data-tp-theme="dark"] .tor-sort { color-scheme: dark; }
.tor-all { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--tp-muted); font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.tor-modes { display: inline-flex; flex: none; gap: 2px; padding: 3px; border: 1px solid var(--tp-border); border-radius: var(--tor-r-sm); background: var(--tp-surface); }
.tor-mode { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--tp-muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tor-mode i { font-size: 11px; }
.tor-mode.is-on { background: var(--tor-ink); color: var(--tor-on-ink); }

/* полоса «есть новые»: то, что раньше терялось под всем списком */
.tor-fresh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-bottom: 1px solid var(--tp-border); background: linear-gradient(90deg, var(--tor-new-soft), transparent 70%); color: var(--tp-text); font-size: 13px; }
.tor-fresh > i { color: var(--tor-new); }
.tor-fresh b { color: var(--tor-new); font-weight: 700; }
.tor-markread { display: inline-flex; align-items: center; gap: 6px; height: 28px; margin-left: auto; padding: 0 11px; border-radius: 8px; background: var(--tor-new); color: #fff !important; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.tor-markread.is-busy { opacity: .6; pointer-events: none; }
.tor-note { padding: 8px 12px; border-bottom: 1px solid var(--tp-border); background: var(--tor-amber-soft); color: var(--tp-text); font-size: 12.5px; }

/* ── общие детали ───────────────────────────────────────────────────────── */
.tor-ic { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--tp-muted); font-size: 13px; line-height: 1; cursor: pointer; transition: background .15s, color .15s; }
.tor-ic.is-on { color: var(--tor-new); }
.tor-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.tor-acts > span { display: inline-flex; }

.tor-dl { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--tor-ink); border-radius: var(--tor-r-sm); background: var(--tor-ink); color: var(--tor-on-ink) !important; font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: opacity .15s; }
.tor-dl.is-lock { border-color: var(--tp-border-strong); background: transparent; color: var(--tp-muted) !important; }
span.tor-dl.is-lock { cursor: not-allowed; }

.tor-b { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 0 5px; border-radius: 5px; font-size: 10px; font-weight: 700; line-height: 17px; letter-spacing: .02em; text-transform: uppercase; }
.tor-b-new { background: var(--tor-new); color: #fff; }
.tor-b-sticky, .tor-b-free { background: var(--tor-amber-soft); color: var(--tor-amber); }
.tor-b-banned { background: var(--tor-red-soft); color: var(--tor-red); }
.tor-b-vip { background: var(--tor-violet-soft); color: var(--tor-violet); }
.tor-icons { display: inline-flex; gap: 3px; flex: none; }
.tor-icons .tor-b { padding: 0 4px; font-size: 0; }
.tor-icons .tor-b i { font-size: 10px; }
.tor-newtag { flex: none; padding: 2px 6px; border-radius: 6px; background: var(--tor-new); color: #fff; font-size: 10px; font-weight: 700; line-height: 1.2; letter-spacing: .02em; text-transform: uppercase; }

.tor-rates { display: inline-flex; flex-direction: column; gap: 2px; }
.tor-sc { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tor-sl { color: var(--tp-muted); font-size: 9.5px; font-weight: 700; letter-spacing: .03em; }
.tor-rate { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; padding: 0 4px; border-radius: 5px; background: var(--tp-surface-3); font-size: 11px; font-weight: 700; line-height: 16px; }
.tor-rate.is-high { background: var(--tor-green-soft); color: var(--tor-green); }
.tor-rate.is-mid { background: var(--tor-amber-soft); color: var(--tor-amber); }
.tor-rate.is-low { background: var(--tor-red-soft); color: var(--tor-red); }
.tor-rate.is-none { min-width: 0; padding: 0; background: transparent; color: var(--tp-muted); font-weight: 400; }

.tor-peers { display: inline-flex; gap: 7px; font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tor-peers span { display: inline-flex; align-items: center; gap: 2px; }
.tor-peers i { font-size: 9px; font-weight: 400; }
.tor-peers strong { font-weight: inherit; }
.tor-peers .up { color: var(--tor-green); }
.tor-peers .down { color: var(--tor-red); }
.tor-bar-h { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--tor-red-soft); overflow: hidden; }
.tor-bar-h.is-empty { background: var(--tp-surface-3); }
.tor-bar-h i { display: block; height: 100%; background: var(--tor-green); }

/* точка стоит перед каждым элементом, а первая в каждой строке обрезается: при переносе строка не начинается с точки */
.tor-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 3px 0 0 -14px; min-width: 0; color: var(--tp-muted); font-size: 12px; line-height: 1.35; clip-path: inset(0 0 0 14px); }
.tor-meta > * { position: relative; display: inline-flex; align-items: center; gap: 4px; min-width: 0; margin-left: 14px; }
.tor-meta > *::before { content: "\00B7 "; position: absolute; left: -9px; opacity: .6; }
.tor-cat { color: var(--tp-text-2); font-weight: 600; white-space: nowrap; }
.tor-tags { display: flex; flex-wrap: wrap; gap: 3px; height: 20px; margin-top: 5px; overflow: hidden; }
.tor-tag { padding: 0 8px; border-radius: 10px; background: var(--tp-surface-3); color: var(--tp-text-2); font-size: 11px; line-height: 20px; white-space: nowrap; transition: background .15s, color .15s; }
.tor-tag.is-on { background: var(--tor-new); color: #fff !important; }
.tor-stats { color: var(--tp-muted); }
.tor-stats span { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; white-space: nowrap; }
.tor-stats span:last-child { margin-right: 0; }
.tor-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tor-who a { font-weight: 600; }
.tor-who img { display: inline-block; height: 16px; vertical-align: middle; }
.tor-who .small { color: var(--tp-muted); font-size: 9px; }
.tor-ago { white-space: nowrap; }
.tor-stops { margin-top: 3px; color: var(--tp-muted); font-size: 11.5px; }
.tor-stops a { color: var(--tp-link); }
.tor-upd { display: block; margin-top: 3px; overflow: hidden; color: var(--tor-green) !important; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.tor-mynote { margin-top: 3px; color: var(--tp-muted); font-size: 11.5px; }
.tor-cb { width: 16px; height: 16px; margin: 0; accent-color: var(--tor-new); cursor: pointer; }
.tor-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tor-item picture { display: block; width: 100%; height: 100%; }
.tor-item .highlight { padding: 0 2px; border-radius: 3px; background: var(--tor-amber-soft); color: inherit; }
.tor-t { color: var(--tp-text) !important; font-weight: 600; }

/* ── Лента ──────────────────────────────────────────────────────────────── */
.tor-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-top: 1px solid var(--tp-border); transition: background .15s; content-visibility: auto; contain-intrinsic-size: auto 72px; }
.tor-list > .tor-row:first-child { border-top: 0; }
.tor-row:focus-within { content-visibility: visible; }
.tor-row.is-new { background: linear-gradient(90deg, var(--tor-new-soft), transparent 55%); }
.tor-row::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.tor-row.is-new::before { background: var(--tor-new); }
.tor-row.is-sticky::before { background: var(--tor-amber); }
.tor-row.is-banned { background: var(--tor-red-soft); }
.tor-row.is-banned::before { background: var(--tor-red); }
.tor-thumb { flex: none; display: block; width: 50px; height: 72px; border-radius: 9px; background: var(--tp-surface-3); overflow: hidden; box-shadow: inset 0 0 0 1px var(--tp-border); }
.tor-main { flex: 1 1 0; min-width: 0; }
.tor-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tor-line .tor-t { min-width: 0; overflow: hidden; font-size: 14px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.tor-row.is-new .tor-line .tor-t { font-weight: 700; }
.tor-side { flex: none; display: flex; align-items: center; gap: 14px; }
.tor-rates { min-width: 46px; }
.tor-swarm { width: 62px; text-align: center; }
.tor-get { display: flex; flex-direction: column; gap: 3px; width: 112px; }
.tor-get .tor-dl { width: 100%; padding: 0 6px; }
.tor-get .tor-acts { justify-content: center; }
.tor-get .tor-ic { width: 22px; height: 22px; font-size: 12px; }
.tor-side-chk { line-height: 0; }

.tor-day { position: sticky; top: var(--tp-nav-h, 60px); z-index: 3; display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-top: 1px solid var(--tp-border); background: var(--tp-surface-2); font-size: 12px; }
.tor-list > .tor-day:first-child { border-top: 0; }
.tor-day a { color: var(--tp-text); font-weight: 700; }
.tor-day-sub { min-width: 0; overflow: hidden; color: var(--tp-muted); white-space: nowrap; text-overflow: ellipsis; }
.tor-day-n { flex: none; margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 9px; background: var(--tp-surface-3); color: var(--tp-text-2); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* ── Плитки: подпись прямо на постере ───────────────────────────────────── */
.tor-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; padding: 12px; }
.tor-tile { position: relative; display: block; min-width: 0; aspect-ratio: 2 / 3; border-radius: 12px; background: var(--tp-surface-3); overflow: hidden; box-shadow: 0 0 0 1px var(--tp-border); transition: transform .16s ease, box-shadow .16s ease; }
.tor-tile.is-new { box-shadow: 0 0 0 2px var(--tor-new); }
.tor-tile.is-sticky { box-shadow: 0 0 0 2px var(--tor-amber); }
.tor-tile.is-banned { box-shadow: 0 0 0 2px var(--tor-red); }
.tor-cover { position: absolute; inset: 0; display: block; }
.tor-top { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; pointer-events: none; }
.tor-flags { flex-wrap: wrap; }
.tor-star { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 1px 6px; border-radius: 6px; background: rgba(6, 11, 24, .78); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; }
.tor-star i { font-size: 9px; }
.tor-star.is-high i { color: #6ee7a0; }
.tor-star.is-mid i { color: #fcd34d; }
.tor-star.is-low i { color: #fca5a5; }
.tor-tile-chk { position: absolute; top: 30px; right: 6px; z-index: 2; padding: 3px; border-radius: 5px; background: rgba(6, 11, 24, .78); line-height: 0; }
/* подпись всегда тёмная: под ней картинка, а не фон темы */
.tor-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 8px 8px; background: linear-gradient(to top, rgba(6, 11, 24, .96) 0, rgba(6, 11, 24, .86) 58%, rgba(6, 11, 24, 0) 100%); color: #dbe4f5; pointer-events: none; }
.tor-cap a, .tor-cap button { pointer-events: auto; }
.tor-cap .tor-cap-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; color: #fff !important; font-size: 12.5px; line-height: 1.25; }
.tor-cap-m { display: flex; flex-wrap: wrap; align-items: center; gap: 1px 7px; margin-top: 3px; font-size: 11px; line-height: 15px; font-variant-numeric: tabular-nums; }
.tor-cap .tor-peers { font-size: 11px; gap: 4px; }
.tor-cap .tor-peers .up { color: #6ee7a0; }
.tor-cap .tor-peers .down { color: #fca5a5; }
.tor-cap-d { margin-left: auto; color: #a9b7d1; }
.tor-cap-x { display: none; margin-top: 6px; }
.tor-cap-who { display: flex; flex-direction: column; gap: 1px; margin-bottom: 5px; color: #a9b7d1; font-size: 11px; }
.tor-cap-who span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tor-cap-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tor-cap .tor-dl { flex: 1 1 100%; height: 26px; border-color: #fff; background: #fff; color: #0b1430 !important; font-size: 11.5px; }
.tor-cap .tor-dl.is-lock { border-color: rgba(255, 255, 255, .35); background: transparent; color: #dbe4f5 !important; }
.tor-cap .tor-ic { width: 24px; height: 24px; color: #dbe4f5; font-size: 12px; }
.tor-cap .tor-ic.is-on { color: #8db7ff; }
#gr .tor-cap a.tor-ic { color: #dbe4f5; } /* groups.css красит все ссылки своим цветом, а тут фон всегда тёмный */

/* ── Блоки: фон карточки — размытый постер раздачи ──────────────────────── */
.tor-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; padding: 12px; }
.tor-card { position: relative; display: flex; min-width: 0; min-height: 148px; border: 1px solid var(--tp-border); border-radius: 12px; background: var(--tp-surface); overflow: hidden; transition: transform .16s ease, box-shadow .16s ease, border-color .16s; content-visibility: auto; contain-intrinsic-size: auto 150px; }
.tor-card.is-new { border-color: var(--tor-new); box-shadow: inset 0 0 0 1px var(--tor-new); }
.tor-card.is-sticky { border-color: var(--tor-amber); }
.tor-card.is-banned { border-color: var(--tor-red); }
.tor-card-bg { position: absolute; inset: -24px; opacity: var(--tor-bg-opacity); filter: blur(22px) saturate(1.5); pointer-events: none; }
.tor-card-img { position: relative; flex: 0 0 100px; display: block; margin: 8px 0 8px 8px; border-radius: 9px; background: var(--tp-surface-3); overflow: hidden; }
.tor-card-img .tor-flags { position: absolute; top: 4px; left: 4px; }
.tor-card-body { position: relative; display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 9px 11px; }
.tor-card-head { display: flex; align-items: flex-start; gap: 6px; }
.tor-card-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; flex: 1; min-width: 0; overflow: hidden; font-size: 13.5px; line-height: 1.28; }
.tor-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; margin-top: auto; padding-top: 7px; }
.tor-card-foot .tor-rates { flex-direction: row; gap: 7px; min-width: 0; }
.tor-card-foot .tor-acts { margin-left: auto; }

/* ── низ ────────────────────────────────────────────────────────────────── */
.tor-bulk { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--tp-border); border-radius: 0 0 var(--tor-r) var(--tor-r); background: var(--tp-surface-2); font-size: 12.5px; }
.tor-bulk-label { margin-right: auto; color: var(--tp-muted); font-weight: 600; }
.tor-bulk .form-select { width: auto; max-width: 280px; }
.tor-bulk .form-control { max-width: 100%; }
.tor-bulk #seo_opt { flex: 1 1 100%; }

/* ── предпросмотр ───────────────────────────────────────────────────────── */
.tor-pv { width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--tp-border); border-radius: var(--tp-radius); background: var(--tp-surface); color: var(--tp-text); box-shadow: var(--tp-shadow-lg); overflow: hidden; }
.tor-pv[open] { display: flex; flex-direction: column; }
.tor-pv::backdrop { background: rgba(6, 11, 24, .6); }
.tor-pv-head { display: flex; flex: none; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--tp-border); }
.tor-pv-title { flex: 1; min-width: 0; overflow: hidden; color: var(--tp-text); font-size: 14px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.tor-pv-body { flex: 1; min-height: 120px; padding: 12px 14px; overflow: auto; }
.tor-pv-load { padding: 40px 0; color: var(--tp-muted); text-align: center; }
.tor-pv-body table { width: 100%; max-width: 100%; margin: 0; background: transparent !important; color: inherit; --mdb-table-bg: transparent; --bs-table-bg: transparent; --mdb-table-color: var(--tp-text); --bs-table-color: var(--tp-text); }
.tor-pv-body td, .tor-pv-body th { border-color: var(--tp-border); background: transparent !important; color: inherit; box-shadow: none !important; }
.tor-pv-body tr:first-child > #res_review { display: none; }
.tor-pv-body #res_review { color: var(--tp-muted); font-size: 11px; font-weight: 400; }
.tor-pv-body img { max-width: 100%; height: auto; }
.tor-pv-body .tab { color: var(--tp-text-2); }

/* ── фокус с клавиатуры ─────────────────────────────────────────────────── */
.tor :focus-visible { outline: 2px solid var(--tor-new); outline-offset: 2px; }
.tor-cover:focus-visible { outline-offset: -3px; }

@media (hover: hover) {
    .tor-row:hover { background: var(--tp-surface-2); }
    .tor-row.is-new:hover { background: linear-gradient(90deg, var(--tor-new-soft), var(--tp-surface-2) 55%); }
    .tor-row.is-banned:hover { background: var(--tor-red-soft); }
    .tor-t:hover, .tor-who a:hover, .tor-stats a:hover, .tor-day a:hover, .tor-cat:hover, .tor-stops a:hover, .tor-ago:hover { color: var(--tor-new) !important; }
    .tor-tag:hover { background: var(--tor-ink); color: var(--tor-on-ink); }
    .tor-ic:hover { background: var(--tor-ink-soft); color: var(--tor-ink); }
    .tor-dl:hover { opacity: .85; }
    a.tor-dl.is-lock:hover { border-color: var(--tor-ink); color: var(--tor-ink) !important; opacity: 1; }
    .tor-markread:hover { opacity: .88; }
    /* Лента: кнопки появляются при наведении; включённые (закладка, слежение) видны всегда. Место занято заранее, строка не прыгает */
    .tor-get .tor-ic:not(.is-on) { opacity: 0; transition: opacity .12s, background .15s, color .15s; }
    .tor-row:hover .tor-get .tor-ic, .tor-row:focus-within .tor-get .tor-ic { opacity: 1; }
    .tor-mode:not(.is-on):hover { color: var(--tp-text); }
    .tor-tile:hover, .tor-tile:focus-within { z-index: 4; transform: translateY(-3px); box-shadow: 0 0 0 1px var(--tp-border-strong), var(--tor-lift); }
    .tor-tile.is-new:hover { box-shadow: 0 0 0 2px var(--tor-new), var(--tor-lift); }
    .tor-tile:hover .tor-cap-x, .tor-tile:focus-within .tor-cap-x { display: block; }
    .tor-tile:hover .tor-cap, .tor-tile:focus-within .tor-cap { padding-top: 34px; background: linear-gradient(to top, rgba(6, 11, 24, .98) 0, rgba(6, 11, 24, .94) 72%, rgba(6, 11, 24, 0) 100%); }
    .tor-cap .tor-ic:hover { background: rgba(255, 255, 255, .16); color: #fff; }
    .tor-cap .tor-t:hover { color: #8db7ff !important; }
    .tor-cap .tor-who a:hover { color: #8db7ff !important; }
    .tor-card:hover { transform: translateY(-2px); border-color: var(--tp-border-strong); box-shadow: var(--tor-lift); }
    .tor-card.is-new:hover { border-color: var(--tor-new); box-shadow: inset 0 0 0 1px var(--tor-new), var(--tor-lift); }
}

/* на тач-экранах наведения нет: кнопки плитки видны всегда, под постером */
@media (hover: none) {
    .tor-tile { aspect-ratio: auto; overflow: visible; box-shadow: none; background: transparent; }
    .tor-cover { position: relative; inset: auto; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--tp-surface-3); }
    .tor-tile.is-new { box-shadow: none; }
    .tor-tile.is-new .tor-cover { box-shadow: 0 0 0 2px var(--tor-new); }
    .tor-cap { position: static; padding: 5px 0 0; background: none; color: var(--tp-text-2); }
    .tor-cap .tor-cap-t { color: var(--tp-text) !important; }
    .tor-cap-d, .tor-cap-who { color: var(--tp-muted); }
    .tor-cap .tor-peers .up { color: var(--tor-green); }
    .tor-cap .tor-peers .down { color: var(--tor-red); }
    .tor-cap-x { display: block; }
    .tor-cap-who { display: none; }
    .tor-cap .tor-dl { border-color: var(--tor-ink); background: var(--tor-ink); color: var(--tor-on-ink) !important; }
    .tor-cap .tor-dl.is-lock { border-color: var(--tp-border-strong); background: transparent; color: var(--tp-muted) !important; }
    .tor-cap .tor-ic { width: 28px; height: 28px; color: var(--tp-muted); }
    .tor-cap .tor-ic.is-on { color: var(--tor-new); }
    #gr .tor-cap a.tor-ic { color: var(--tp-muted); }
}

@media (prefers-reduced-motion: reduce) {
    .tor-tile, .tor-card { transition: none; }
    .tor-tile:hover, .tor-card:hover { transform: none; }
}

/* ── узкий список ───────────────────────────────────────────────────────── */
@container tor (max-width: 860px) {
    .tor-row { flex-wrap: wrap; align-items: flex-start; }
    .tor-main { flex: 1 1 calc(100% - 62px); }
    .tor-side { flex: 1 1 100%; flex-wrap: wrap; gap: 8px 12px; padding-left: 62px; }
    .tor-rates { flex-direction: row; gap: 8px; }
    .tor-get { flex-direction: row; align-items: center; flex: 1 1 auto; width: auto; }
    .tor-get .tor-dl { width: auto; padding: 0 11px; }
    .tor-get .tor-acts { margin-left: auto; justify-content: flex-end; }
    .tor-mode span { display: none; }
    .tor-mode { width: 30px; justify-content: center; padding: 0; }
}
@container tor (max-width: 520px) {
    .tor-bar-end { flex: 1 1 100%; margin-left: 0; }
    .tor-sort { flex: 1; max-width: none; min-width: 0; }
    .tor-tiles { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; padding: 8px; }
    .tor-blocks { grid-template-columns: minmax(0, 1fr); padding: 8px; }
    .tor-card-img { flex-basis: 82px; }
    .tor-markread { margin-left: 0; }
}
