/* Тема «Запоем» — в духе кино-справочника: белый фон, плотная типографика, список-рейтинг с местами
   и колонкой подборок, карточка сериала-анкета с таблицей фактов. Акцент — фиолетовый
   (у «Серийки» — розовый, у «Мелодрамки» — розовое золото, у «В озвучке» — жёлтый на чёрном).
   Работает вместе с config.layout: title 'profile', list 'rows'. */
:root {
  --bg: #ffffff;
  --panel: #f4f4f6;
  --line: #e4e4e9;
  --text: #16161d;
  --text-soft: #3c3c48;
  --muted: #74747f;
  --accent: #5b3df5;
  --accent-text: #ffffff;
  --score: #1f9d55;
  --font: "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --font-head: var(--font);
  --radius: 4px;
  --radius-sm: 6px;
  --max: 1180px;
  --poster-ratio: 2 / 3;
  --grid-min: 130px;
  --empty-poster: linear-gradient(160deg, #d9d3ff, #f1efff 70%);
  --empty-poster-text: #3b2a9e;
  --header-bg: rgba(255, 255, 255, .96);
  color-scheme: light;
}
body { font-size: 15px; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.5px; margin: 6px 0 12px; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }

/* ---------- шапка ---------- */
.top { padding: 10px 20px; box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
.logo { color: var(--text); font-weight: 800; font-size: 21px; letter-spacing: -.6px; }
.search { max-width: 560px; margin: 0 auto; }
.search input { background: var(--panel); border-color: transparent; border-radius: 999px; padding: 9px 16px; }
.search input:focus { background: #fff; border-color: var(--accent); }
.foot { border-top: 1px solid var(--line); }

/* ---------- чипы, кнопки ---------- */
.chip { background: #fff; border-color: var(--line); color: var(--text-soft); }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.feed-cta { background: var(--accent); color: var(--accent-text); border-radius: 999px; max-width: 340px; padding: 8px 18px 8px 8px; }
.feed-cta-icon { background: rgba(255, 255, 255, .2); color: #fff; }
.pager a { background: #fff; border-color: var(--line); border-radius: 999px; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.intro { color: var(--muted); }

/* ---------- две колонки: список и подборки ---------- */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; }
.with-aside .genres { display: none; }
.chart-aside { position: sticky; top: 76px; padding-top: 8px; }
.chart-aside h2 { font-size: 16px; margin: 0 0 8px; }
.chart-aside ul { list-style: none; margin: 0; padding: 0; }
.chart-aside li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.chart-aside li a:hover, .chart-aside li.on a { color: var(--accent); }
.chart-aside li.on a { font-weight: 700; }
.chart-aside li span { color: var(--muted); font-size: 13px; }

/* ---------- список-рейтинг ---------- */
.chart { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.chart-item { display: grid; grid-template-columns: 44px 72px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line); }
.chart-pos { font-size: 20px; font-weight: 700; color: var(--muted); text-align: center; }
.chart-thumb .poster { border-radius: var(--radius); }
.chart-thumb:hover .poster { transform: none; box-shadow: none; opacity: .9; }
.chart-name { font-size: 17px; font-weight: 700; line-height: 1.25; }
.chart-name:hover { color: var(--accent); }
.chart-meta { color: var(--text-soft); font-size: 14px; margin-top: 3px; }
.chart-genres { color: var(--muted); font-size: 13px; margin-top: 2px; }
.chart-item[data-boost] .chart-meta::after { content: "запоем"; margin-left: 8px; padding: 1px 7px; border-radius: 3px;
  background: #ece8ff; color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; vertical-align: 1px; }
.chart-score { text-align: right; min-width: 64px; }
.chart-score b { display: block; font-size: 20px; font-weight: 700; color: var(--score); }
.chart-score small { color: var(--muted); font-size: 12px; }

/* ---------- карточки в рядах (новинки, похожие) ---------- */
.card-name { font-size: 14px; font-weight: 600; }
.card:hover .poster { transform: none; box-shadow: 0 0 0 2px var(--accent); }
.card[data-boost] { position: relative; }
.card[data-boost]::before { content: "запоем"; position: absolute; z-index: 1; top: 6px; left: 6px; padding: 1px 6px; border-radius: 3px;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }

/* ---------- карточка сериала-анкета ---------- */
.profile { display: grid; grid-template-columns: 300px minmax(0, 1fr) 180px; gap: 12px 40px; align-items: start; }
.profile-poster .poster { border-radius: var(--radius); box-shadow: 0 6px 24px rgba(20, 20, 40, .12); }
.profile-main h1 { margin-top: 0; font-size: 34px; line-height: 1.15; }
.profile-sub { color: var(--muted); margin: -4px 0 18px; font-size: 16px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.profile-actions .story-play { flex: none; min-height: 46px; padding: 0 26px; border-radius: 999px; background: var(--accent); color: var(--accent-text); max-width: none; }
.profile-actions .story-play:hover { filter: brightness(1.08); }
.profile-actions .like-btn { margin: 0; min-height: 46px; padding: 0 20px; border-radius: 999px; background: var(--panel); border: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.profile-actions .like-btn.on { background: #ece8ff; color: var(--accent); }
.profile .story-progress { margin: 14px 0 0; max-width: 320px; }
.profile-h { margin: 28px 0 10px; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 7px 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts dd a { color: var(--accent); }
.facts dd a:hover { text-decoration: underline; }
.profile-side { text-align: left; }
.profile-score b { display: block; font-size: 40px; font-weight: 700; letter-spacing: -1px; color: var(--score); line-height: 1; }
.profile-score small { color: var(--muted); font-size: 13px; }
.profile-badge { display: inline-block; margin: 14px 0 0; padding: 4px 10px; border-radius: 4px; background: #ece8ff; color: var(--accent); font-weight: 700; font-size: 13px; }
.profile-lead, .profile-about, .profile-eps { grid-column: 2 / 4; }
.profile-about h2, .profile-eps h2 { margin-top: 28px; }
.profile-about .desc { font-size: 16px; line-height: 1.6; color: var(--text-soft); }
.title-intro { color: var(--text); font-weight: 500; }

/* серии таблицей: «N-я серия · X мин.», по 20 на вкладке */
.eps-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.eps-table .ep { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; text-align: left; background: none;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 14px; }
.eps-table .ep:hover { color: var(--accent); background: none; }
.eps-table .ep-dur { color: var(--muted); }
.eps-table .ep.ep-current { background: none; color: var(--accent); font-weight: 700; }
.eps-table .ep-watched::after, .eps-table .ep.ep-current.ep-watched::after { position: static; color: var(--score); }
.story-tabs button { border-radius: 999px; background: #fff; }
.related { margin-top: 40px; }

/* ---------- телефон ---------- */
@media (max-width: 960px) {
  .with-aside { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .with-aside .genres { display: flex; }
  .chart-aside { display: none; }
  .profile { grid-template-columns: 200px minmax(0, 1fr); }
  .profile-side { grid-column: 2; }
  .profile-lead, .profile-about, .profile-eps { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  h1 { font-size: 24px; }
  .top { padding: 8px 12px; gap: 10px; }
  .chart-item { grid-template-columns: 26px 56px minmax(0, 1fr); gap: 10px; padding: 12px 0; }
  .chart-pos { font-size: 15px; }
  .chart-name { font-size: 15px; }
  .chart-score { grid-column: 3; text-align: left; display: flex; gap: 6px; align-items: baseline; margin-top: -4px; }
  .chart-score b { font-size: 14px; display: inline; }
  .profile { grid-template-columns: 110px minmax(0, 1fr); gap: 10px 16px; }
  .profile-main h1 { font-size: 22px; }
  .profile-sub { margin-bottom: 10px; font-size: 14px; }
  .profile-actions { grid-column: 1 / -1; }
  .profile-main { display: contents; }
  .profile-main > h1 { grid-column: 2; grid-row: 1; margin: 0; }
  .profile-main > .profile-sub { grid-column: 2; grid-row: 2; margin: 0; }
  .profile-poster { grid-column: 1; grid-row: 1 / 4; }
  .profile-actions, .profile .story-progress, .profile-h, .facts { grid-column: 1 / -1; }
  .profile-actions .story-play { flex: 1; }
  .profile-side { grid-column: 2; grid-row: 3; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
  .profile-score b { font-size: 24px; display: inline; margin-right: 6px; }
  .profile-badge { margin: 0; }
  .facts div { grid-template-columns: 110px minmax(0, 1fr); }
  .eps-table { grid-template-columns: 1fr; }
}
