/* Твпоиск */
:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #17171c;
  --ink-2: #3b3b44;
  --muted: #73737e;
  --line: #e7e3d9;
  --line-2: #f1eee6;
  --accent: #ff6a13;
  --accent-dark: #c44d05;
  --accent-soft: #fff1e7;
  --ok: #1f8a4c;
  --r: 10px;
  --wrap: 1220px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
h2 { font-size: 21px; font-weight: 750; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }

.tp-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.tp-main { padding-top: 22px; padding-bottom: 40px; min-height: 60vh; }
.tp-muted { color: var(--muted); }
.tp-small { font-size: 13px; }
.tp-lead { font-size: 17px; color: var(--ink-2); max-width: 820px; }

/* ---------- Шапка ---------- */
.tp-top { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.tp-top__row { display: flex; align-items: center; gap: 22px; padding-top: 14px; padding-bottom: 12px; }
.tp-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 850; font-size: 25px; letter-spacing: -.03em; color: var(--ink); flex: none; }
.tp-mark { width: 34px; height: 34px; color: var(--ink); }
.tp-find { position: relative; flex: 1; display: flex; max-width: 620px; }
.tp-find input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px; font-size: 16px;
  border: 2px solid var(--ink); border-right: 0; border-radius: 10px 0 0 10px; background: #fff; color: var(--ink); outline: none;
}
.tp-find input:focus { border-color: var(--accent); }
.tp-find--page { max-width: 620px; margin: 8px 0 4px; z-index: 10; }
.tp-find input:focus + button { border-color: var(--accent); background: var(--accent); }
.tp-find button {
  height: 46px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 0 10px 10px 0;
  background: var(--ink); color: #fff; font-weight: 700;
}
.tp-suggest {
  position: absolute; top: 50px; left: 0; right: 0; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 10px 30px rgba(23,23,28,.12); overflow: hidden;
}
.tp-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none; }
.tp-suggest a:hover, .tp-suggest a.is-sel { background: var(--accent-soft); }
.tp-suggest img { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
.tp-suggest small { margin-left: auto; color: var(--muted); }
.tp-suggest .tp-suggest__all { color: var(--accent-dark); font-weight: 600; border-top: 1px solid var(--line-2); }
.tp-menu { display: flex; gap: 18px; flex: none; }
.tp-menu a { text-decoration: none; font-weight: 600; color: var(--ink-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.tp-menu a:hover, .tp-menu a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }

.tp-rubrics { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
.tp-rubrics::-webkit-scrollbar { display: none; }
.tp-rubrics a {
  flex: none; padding: 8px 12px 10px; text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600;
  border-bottom: 3px solid transparent;
}
.tp-rubrics a:hover { color: var(--ink); }
.tp-rubrics a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Хлебные крошки ---------- */
.tp-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.tp-crumbs a { color: var(--muted); text-decoration: none; }
.tp-crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Главная ---------- */
.tp-hero { padding: 18px 0 6px; }
.tp-hero h1 { max-width: 860px; }
.tp-hero p { font-size: 17px; color: var(--ink-2); max-width: 820px; }
.tp-abc { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 8px; }
.tp-abc a {
  min-width: 38px; height: 38px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; font-weight: 700;
}
.tp-abc a:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.tp-block { margin-top: 34px; }
.tp-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tp-block__head a { font-weight: 600; color: var(--accent-dark); text-decoration: none; white-space: nowrap; }
.tp-block__head a:hover { text-decoration: underline; }

/* ---------- Карточки каналов ---------- */
.tp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tp-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); min-width: 0;
}
.tp-card:hover { border-color: var(--ink); }
.tp-logo { border-radius: 8px; border: 1px solid var(--line); background: #fff; object-fit: contain; flex: none; vertical-align: middle; }
.tp-card__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tp-card__name { font-weight: 700; }
.tp-card__now { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-bar { display: block; height: 3px; background: var(--line-2); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.tp-bar i { display: block; height: 100%; background: var(--accent); }

/* ---------- Таблица эфира ---------- */
.tp-table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.tp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tp-table th, .tp-table td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tp-table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fdfcf9; }
.tp-table tbody tr:last-child > * { border-bottom: 0; }
.tp-table tbody th { font-weight: 700; white-space: nowrap; }
.tp-table tbody th a, .tp-table td a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.tp-table tbody th a:hover, .tp-table td a:hover { text-decoration: underline; }
.tp-table .tp-bar { max-width: 220px; }
.tp-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); margin-right: 4px; }
.tp-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 4px; background: var(--accent); color: #fff; vertical-align: 1px; }
.tp-tag--soft { background: var(--line-2); color: var(--ink-2); }

/* ---------- Рубрики ---------- */
.tp-rub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tp-rub {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r);
}
.tp-rub:hover { border-color: var(--ink); border-left-color: var(--accent); }
.tp-rub span { color: var(--muted); font-size: 14px; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.tp-chips a, .tp-chips button {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; color: var(--ink); font-size: 15px;
}
.tp-chips a:hover, .tp-chips button:hover { border-color: var(--ink); }
.tp-chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.tp-howto ol { margin: 0; padding-left: 22px; max-width: 860px; }
.tp-howto li { margin-bottom: 8px; }

/* ---------- Словарь А–Я ---------- */
.tp-dict { columns: 4 230px; column-gap: 28px; margin-top: 18px; }
.tp-dict__group { break-inside: avoid; margin-bottom: 18px; scroll-margin-top: 16px; }
.tp-dict__group h2 { font-size: 28px; color: var(--accent); margin-bottom: 6px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.tp-dict ul { list-style: none; margin: 0; padding: 0; }
.tp-dict li a { display: flex; align-items: center; gap: 8px; padding: 3px 0; text-decoration: none; }
.tp-dict li a:hover { text-decoration: underline; }
.tp-dict .tp-logo { border-radius: 5px; }

/* ---------- Страница канала ---------- */
.tp-ch { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 24px; align-items: start; }
.tp-ch__title { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tp-ch__title h1 { margin: 0; }
.tp-ch__sub { margin: 4px 0 0; color: var(--muted); }
.tp-ch__sub a { color: var(--accent-dark); }

.tp-player { position: relative; aspect-ratio: 16 / 9; background: #101014; border-radius: var(--r); overflow: hidden; }
.tp-player video { width: 100%; height: 100%; display: block; background: #101014; }
.tp-player__start {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border: 0; border-radius: 999px; padding: 14px 26px 14px 20px; background: var(--accent); color: #fff; font-size: 18px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 10px;
}
.tp-player__start span { font-size: 22px; line-height: 1; }
.tp-player__start:hover { background: var(--accent-dark); }
.tp-player__sound {
  position: absolute; left: 14px; bottom: 54px; border: 0; border-radius: 8px; padding: 9px 14px;
  background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.tp-player__msg {
  position: absolute; inset: auto 14px 14px 14px; background: rgba(16,16,20,.88); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 15px;
}
.tp-onair { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 6px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.tp-about { margin-top: 22px; max-width: 820px; }
.tp-about p:first-of-type { font-size: 17px; }

.tp-ch__side {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 10px;
  position: sticky; top: 14px;
}
.tp-ch__side h2 { font-size: 18px; }
.tp-days { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; scrollbar-width: thin; }
.tp-days button {
  flex: none; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 14px; color: var(--ink-2);
}
.tp-days button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tp-sched { max-height: 560px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.tp-sched ol { list-style: none; margin: 0; padding: 0; }
.tp-sched li { display: grid; grid-template-columns: 52px 1fr; gap: 6px; padding: 7px 6px; border-bottom: 1px solid var(--line-2); font-size: 15px; border-radius: 6px; }
.tp-sched li small { color: var(--muted); font-size: 12px; }
.tp-sched li.is-past { color: var(--muted); }
.tp-sched li.is-past .tp-time { color: var(--muted); font-weight: 500; }
.tp-sched li.is-now { background: var(--accent-soft); border-bottom-color: transparent; }
.tp-sched li.is-now .tp-time { color: var(--accent-dark); }

.tp-near { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-near a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; }
.tp-near a:hover { border-color: var(--ink); }

.tp-text { max-width: 780px; }
.tp-text h2 { margin-top: 1.4em; }

/* ---------- Подвал ---------- */
.tp-foot { background: var(--ink); color: #d9d9df; margin-top: 30px; }
.tp-foot a { color: #fff; }
.tp-foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding-top: 32px; padding-bottom: 24px; }
.tp-foot h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: #9d9da8; }
.tp-foot ul { list-style: none; margin: 0; padding: 0; }
.tp-foot__grid > div:nth-child(2) ul { columns: 2; column-gap: 16px; }
.tp-foot li { margin-bottom: 6px; }
.tp-foot li a { text-decoration: none; }
.tp-foot li a:hover { text-decoration: underline; }
.tp-brand--foot { color: #fff; margin-bottom: 10px; }
.tp-brand--foot .tp-mark { color: #fff; }
.tp-foot__note { border-top: 1px solid #2d2d35; padding-top: 14px; padding-bottom: 22px; font-size: 14px; color: #9d9da8; }

/* ---------- Телефоны и планшеты ---------- */
@media (max-width: 1000px) {
  .tp-ch { grid-template-columns: 1fr; }
  .tp-ch__side { position: static; }
  .tp-sched { max-height: 420px; }
  .tp-menu { display: none; }
}
@media (max-width: 720px) {
  .tp-wrap { padding: 0 14px; }
  .tp-top__row { flex-wrap: wrap; gap: 10px; }
  .tp-find { order: 3; flex-basis: 100%; max-width: none; }
  .tp-find--page { margin: 6px 0 2px; }
  .tp-find input, .tp-find button { height: 44px; }
  .tp-cards { grid-template-columns: 1fr; }
  .tp-foot__grid { grid-template-columns: 1fr; gap: 18px; }
  .tp-table th, .tp-table td { padding: 8px 10px; }
  .tp-table--now td:nth-child(3), .tp-table--now th:nth-child(3) { display: none; }
  .tp-table tbody th { white-space: normal; }
  .tp-ch__title .tp-logo { width: 48px; height: 48px; }
  .tp-player { border-radius: 0; margin: 0 -14px; }
  .tp-player__start { font-size: 16px; padding: 12px 20px 12px 16px; }
  .tp-abc a { min-width: 34px; height: 34px; }
}
