@charset "UTF-8";
/* Дневники вампира — тема для чистой семантической разметки (build_clean.py).
   Приёмы sverhi.me, палитра — индиго-фиолетовый с бордовым. */

/* ---------- шрифты: свои файлы + заменители с подогнанными метриками (без прыжка при загрузке) ---------- */

@font-face { font-family: "Inter"; src: url(/theme/fonts/inter-cyrillic.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; src: url(/theme/fonts/inter-latin.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; src: url(/theme/fonts/cormorant-cyrillic.woff2) format("woff2"); font-weight: 600 700; font-style: normal; font-display: block; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; src: url(/theme/fonts/cormorant-latin.woff2) format("woff2"); font-weight: 600 700; font-style: normal; font-display: block; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* метрики замерены в браузере: Inter против Arial, Cormorant против Times New Roman.
   Cormorant грузится с font-display: block (есть preload): заголовки не рисуются запасным шрифтом, а сразу появляются в Cormorant, без прыжка */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"); size-adjust: 106.37%; ascent-override: 91.19%; descent-override: 22.56%; line-gap-override: 0%; }
@font-face { font-family: "Cormorant Fallback"; src: local("Times New Roman"), local("TimesNewRomanPSMT"); size-adjust: 89.72%; ascent-override: 102.55%; descent-override: 32.32%; line-gap-override: 0%; }

:root {
  --bg: #12101d;
  --bg-rgb: 18, 16, 29;
  --bg-2: #0c0b14;
  --fill: #1d1b2e;
  --fill-2: #2a2840;
  --screen: #08070f;
  --line: rgba(214, 205, 255, .08);
  --line-2: rgba(214, 205, 255, .2);
  --head: rgba(18, 16, 29, .55);
  --tx: #efeaf6;
  --tx-2: #b3adc8;
  --tx-3: #9892b3;   /* контраст не ниже 4,5:1 на фоне карточек */
  --main: #cc2334;
  --main-2: #b01d2d;
  --rose: #ff8a96;
  --rose-2: #ffb0b8;
  --star: #f0b23c;

  --serif: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
  --sans: "Inter", "Inter Fallback", Arial, sans-serif;

  --f-s: 14px;
  --f-m: 16px;
  --f-l: 24px;
  --f-xl: 34px;
  --f-xxl: 56px;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 72px;
  --gutter: 24px;
  --wide: 1120px;
  --read: 820px;
  --top: 72px;
  --btn: 48px;
  --r: 6px;
  --t: .15s;

  --shadow-screen: 0 30px 80px -20px rgba(0, 0, 0, .75), 0 0 0 1px var(--line);
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
    --s4: 44px;
    --f-m: 15px;
    --f-l: 21px;
    --f-xl: 26px;
    --f-xxl: 34px;
    --top: 60px;
    --btn: 44px;
  }
}

/* ---------- база ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--top); }
html, body { margin: 0; background: var(--bg); }

body {
  font-family: var(--sans);
  font-size: var(--f-m);
  line-height: 1.6;
  color: var(--tx);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--rose); text-decoration: none; transition: color var(--t), background-color var(--t); }
a:hover { color: var(--rose-2); }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
::selection { background: var(--main); color: #fff; }

.container {
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-read {
  width: 100%;
  max-width: calc(var(--read) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- размытый фон из кадра (--hero-img задаёт сборка) ---------- */

#body-fict {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  min-height: 100vh;
}

#body-fict::before,
#body-fict::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
}

#body-fict::before {
  inset: -60px -60px auto;
  height: 1160px;
  background-image:
    var(--hero-img, none),
    radial-gradient(50% 45% at 22% 18%, rgba(160, 24, 48, .55), transparent 70%),
    radial-gradient(45% 45% at 80% 8%, rgba(88, 56, 160, .5), transparent 70%);
  background-size: cover, auto, auto;
  background-position: center 30%, 0 0, 0 0;
  background-repeat: no-repeat;
  filter: blur(36px) saturate(1.25) brightness(1.15);
  opacity: .9;
  -webkit-mask-image: linear-gradient(#000 45%, transparent 90%);
  mask-image: linear-gradient(#000 45%, transparent 90%);
}

#body-fict::after {
  top: 0;
  height: 1100px;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), .15) 0%, rgba(var(--bg-rgb), .55) 35%, rgba(var(--bg-rgb), .85) 60%, var(--bg) 80%);
}

.page-home::before,
.page-home::after { display: none; }

/* ---------- шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--head);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}

.header-content {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--top);
}

.logo { flex: 0 0 auto; transition: opacity var(--t); }
.logo:hover { opacity: .8; }
.logo img { width: 210px; height: auto; }

.mainmenu { flex: 1 1 auto; display: flex; justify-content: center; }
.mainmenu-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }

.mainmenu-list a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--r);
  font-size: var(--f-s);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}

.mainmenu-list a:hover,
.mainmenu-list a[aria-current] { color: #fff; background: rgba(255, 255, 255, .08); }

.mainmenu-toggle { display: none; }

.social-vk,
.mainmenu-toggle {
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  padding: 0 12px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
}

.social-vk { display: inline-flex; }
.social-vk:hover { color: #fff; background: var(--main); box-shadow: none; }

@media (max-width: 1100px) {
  .header-content { position: relative; flex-wrap: wrap; align-content: flex-start; row-gap: 0; }
  .logo { display: flex; align-items: center; min-height: var(--top); margin-right: auto; }
  .mainmenu { order: 3; flex: 1 0 100%; display: block; }
  .social-vk { order: 2; }

  .mainmenu-toggle {
    position: absolute;
    top: calc((var(--top) - 36px) / 2);
    right: calc(var(--gutter) + 52px);
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    width: 36px;
    padding: 0 9px;
  }

  .mainmenu-toggle span { display: block; width: 100%; height: 2px; border-radius: 1px; background: #fff; }
  .mainmenu-list { display: none; }

  .mainmenu.is-open .mainmenu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s1);
    padding: var(--s1) 0 var(--s3);
  }

  .mainmenu.is-open .mainmenu-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .mainmenu.is-open .mainmenu-list a {
    width: 100%;
    height: 44px;
    justify-content: center;
    background: rgba(255, 255, 255, .06);
  }
}

@media (max-width: 760px) {
  .logo img { width: 170px; }
}

/* ---------- заголовок страницы ---------- */

.page-head {
  padding-top: var(--s4);
  padding-bottom: var(--s3);
  text-align: center;
}

.kicker {
  margin-bottom: var(--s2);
  font-size: var(--f-s);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rose);
}

h1 {
  max-width: 860px;
  margin-inline: auto;
  font-family: var(--serif);
  font-size: var(--f-xxl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--tx);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
  text-wrap: balance;
}

.ep-title,
.page-sub,
.hero-sub {
  margin-top: var(--s2);
  font-family: var(--serif);
  font-size: var(--f-l);
  font-weight: 600;
  font-style: italic;
  line-height: 1.2;
  color: var(--rose);
  text-wrap: balance;
}

.ep-title::before { content: "\00AB"; }
.ep-title::after { content: "\00BB"; }

/* ---------- плеер ---------- */

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--screen);
  box-shadow: var(--shadow-screen);
}

.player::before {
  content: "";
  position: absolute;
  inset: -5%;
  background: var(--hero-img, none) center / cover no-repeat;
  filter: blur(16px) brightness(.45);
}

.player video-player {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- кнопки ---------- */

.btn,
.nav-prev,
.nav-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn);
  padding: 0 var(--s3);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.btn:hover, .nav-prev:hover { color: #fff; background: rgba(255, 255, 255, .12); }

.btn-main,
.nav-next { background: var(--main); box-shadow: none; }
.btn-main:hover,
.nav-next:hover { color: #fff; background: var(--main-2); }

.nav-prev::before,
.nav-next::after,
.btn-main::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  transition: transform var(--t);
}

.nav-prev { padding-left: 18px; }
.nav-next { padding-right: 18px; }
.nav-prev::before { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 18l-6-6 6-6'/%3E%3C/svg%3E"); }
.nav-next::after { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.btn-main::before { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E"); }
.nav-prev:hover::before { transform: translateX(-3px); }
.nav-next:hover::after { transform: translateX(3px); }

/* ---------- навигация по сериям и рейтинг ---------- */

.episode-nav {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s3);
  padding-block: var(--s2);
  border-block: 1px solid var(--line);
}

.episode-nav .nav-prev { margin-right: auto; }
.episode-nav .nav-next { margin-left: auto; }

.rating { display: flex; align-items: center; gap: 12px; }

.rating-value {
  display: grid;
  place-items: center;
  width: 56px;
  height: var(--btn);
  border-radius: var(--r);
  background: var(--main);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}

.rating-body { display: grid; gap: 5px; }

.stars {
  --shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E");
  display: block;
  width: 200px;
  height: 18px;
  background: linear-gradient(90deg, var(--star) var(--fill), rgba(255, 255, 255, .14) var(--fill));
  -webkit-mask: var(--shape) left center / 20px 18px repeat-x;
  mask: var(--shape) left center / 20px 18px repeat-x;
}

.rating-meta { font-size: 13px; color: var(--tx-3); }

@media (max-width: 760px) {
  .episode-nav { flex-wrap: wrap; gap: 12px 8px; }
  .episode-nav .nav-prev, .episode-nav .nav-next { flex: 1 1 0; min-width: 0; margin: 0; height: auto; min-height: var(--btn); padding: 8px 10px; font-size: 13px; }
  .episode-nav .nav-next { justify-content: flex-end; text-align: right; }
  .episode-nav .rating { order: 3; flex: 1 0 100%; justify-content: center; padding-top: 4px; }
  .rating-value { width: 52px; font-size: 20px; }
}

/* ---------- текст ---------- */

.page-text,
.episode-text {
  padding-top: var(--s4);
  font-size: var(--f-m);
  line-height: 1.7;
  color: var(--tx-2);
  overflow-wrap: break-word;
}

.page-text h2,
.episode-text h2,
.seasons > h2 {
  font-family: var(--serif);
  font-size: var(--f-xl);
  font-weight: 700;
  line-height: 1.15;
  color: var(--tx);
  text-wrap: balance;
}

.page-text h2,
.episode-text h2 { margin-bottom: var(--s2); }
.page-text p + h2,
.episode-text p + h2 { margin-top: var(--s4); }
.page-text p + p,
.episode-text p + p,
.page-text figure + p,
.episode-text figure + p { margin-top: var(--s2); }
.page-text a, .episode-text a { box-shadow: inset 0 -1px 0 rgba(255, 138, 150, .35); }
.page-text a:hover, .episode-text a:hover { box-shadow: inset 0 -1px 0 currentColor; }
.page-text strong, .episode-text strong { color: var(--tx); }

.still { margin-block: var(--s3); }

.still img {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  border-radius: var(--r);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
}

/* ---------- карточки серий (главная и сезоны) ---------- */

.ep-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px var(--s2);
}

.ep-card a { display: grid; gap: 4px; color: var(--tx); }

.ep-card-img {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 6px;
  border-radius: var(--r);
  background: var(--fill);
}

.ep-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s, filter .3s;
}

.ep-card-img::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--main) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 22px no-repeat;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .2s, transform .2s;
}

.ep-card a:hover .ep-card-img img { transform: scale(1.05); filter: brightness(.7); }
.ep-card a:hover .ep-card-img::after { opacity: 1; transform: none; }
.ep-card-num { font-size: 13px; color: var(--tx-3); }

.ep-card-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.ep-card a:hover .ep-card-title { color: var(--rose); }
.season-episodes { padding-top: var(--s3); }

@media (max-width: 991px) { .ep-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .ep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .ep-card-title { font-size: 14px; }
}

/* ---------- главная: hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(86vh, 760px);
  margin-top: calc(-1 * var(--top));
  padding: calc(var(--top) + var(--s4)) 0 var(--s4);
  background: var(--bg);
}

/* подложка — отдельный слой справа; левый и нижний края растворяются маской, без шва на широких экранах */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.hero::before {
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 1500px);
  background: url(/media/dnevniki-vampira-home.webp) center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .35) 22%, #000 48%), linear-gradient(0deg, transparent 0%, #000 38%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .35) 22%, #000 48%), linear-gradient(0deg, transparent 0%, #000 38%);
  mask-composite: intersect;
}

.hero::after {
  inset: 0 0 auto;
  height: 30%;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), .65), transparent);
}

.hero h1 { max-width: 620px; margin: 0; font-size: calc(var(--f-xxl) * 1.15); }
.hero .kicker { margin-bottom: var(--s2); }
.hero-sub { max-width: 620px; margin-top: var(--s1); }

.badges { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s3); }

.badges li {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r);
  background: rgba(var(--bg-rgb), .35);
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-2);
  white-space: nowrap;
}

.hero-text {
  max-width: 600px;
  margin-top: var(--s3);
  line-height: 1.7;
  color: var(--tx-2);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
}

.hero-acts { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s3); }

@media (max-width: 760px) {
  .hero { align-items: flex-end; min-height: 600px; }

  .hero::before {
    width: 100%;
    bottom: auto;
    height: 78%;
    background-position: 68% top;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 55%);
    mask-image: linear-gradient(0deg, transparent 0%, #000 55%);
    filter: brightness(.62);   /* на телефоне текст лежит на картинке — притемняем */
  }

  .hero h1 { font-size: 40px; }
  .hero-acts { flex-wrap: nowrap; }
  .hero-acts .btn { flex: 1 1 auto; padding: 0; }
  .kicker { font-size: 13px; }
}

/* ---------- главная: вкладки сезонов ---------- */

.seasons { padding-top: var(--s3); }
.seasons > h2 { margin-bottom: var(--s3); }

.season-tabs {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--s1);
}

.season-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 var(--s2);
  border-radius: var(--r);
  background: var(--fill);
  font-size: var(--f-s);
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.season-tab:hover { color: #fff; background: var(--fill-2); }
.season-tab[aria-selected="true"] { background: var(--main); }

.season-pane { margin-top: var(--s3); }
.js-tabs .season-pane:not(.is-active) { display: none; }

.season-pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s2);
  margin-bottom: var(--s3);
  font-size: var(--f-s);
  color: var(--tx-3);
}

.season-pane-head h3 { font-family: var(--serif); font-size: var(--f-l); line-height: 1.2; }
.season-pane-head h3 a { color: var(--tx); }
.season-pane-head h3 a:hover { color: var(--rose); }

@media (max-width: 760px) {
  .season-tabs {
    display: flex;
    overflow-x: auto;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .season-tabs::-webkit-scrollbar { display: none; }
  .season-tab { flex: 0 0 auto; }
}

/* ---------- главная: список сезонов ---------- */

.season-list { padding-top: var(--s4); }
.season-list ul { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--s2); }

.season-list li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--s2) var(--s1);
  border-radius: var(--r);
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  color: var(--tx-3);
  transition: background-color var(--t);
}

.season-list a {
  font-family: var(--serif);
  font-size: var(--f-l);
  font-weight: 700;
  color: var(--tx);
  white-space: nowrap;
}

.season-list a::after { content: ""; position: absolute; inset: 0; }
.season-list li:hover { background: var(--fill-2); }
.season-list li:hover a { color: var(--rose); }

@media (max-width: 991px) { .season-list ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- актёры ---------- */

.actor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px var(--s3); padding-top: var(--s3); }

.actor-card-img {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--fill);
}

.actor-card-img img { width: 100%; height: 100%; object-fit: cover; }
.actor-card figcaption { display: grid; gap: 2px; margin-top: 12px; }
.actor-card strong { font-size: 16px; font-weight: 600; color: var(--tx); }
.actor-card figcaption span { font-size: 14px; color: var(--tx-3); }

@media (max-width: 760px) { .actor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; } }

/* ---------- футер ---------- */

.footer-container {
  margin-top: var(--s4);
  padding-block: 40px;
  background: var(--bg-2);
  box-shadow: 0 -1px 0 var(--line);
}

.bottom-bar-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}

.copyright-info { font-size: 13px; line-height: 1.6; color: var(--tx-3); text-align: right; }
.copyright-info a { font-weight: 600; color: var(--rose); }
.copyright-info a:hover { color: var(--rose-2); }

@media (max-width: 760px) { .copyright-info { text-align: left; } }

/* ---------- кнопка «наверх» ---------- */

.upbutton {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fill-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--t), transform var(--t), visibility var(--t), background-color var(--t);
}

.upbutton.is-visible { opacity: 1; visibility: visible; transform: none; }
.upbutton:hover { background: var(--main); }

.upbutton::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(45deg);
}

/* ---------- страница героя ---------- */

.actor-card a { display: block; color: inherit; }
.actor-card a .actor-card-img img { transition: transform .3s, filter .3s; }
.actor-card a:hover .actor-card-img img { transform: scale(1.04); filter: brightness(.85); }
.actor-card a:hover strong { color: var(--rose); }

.character-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--s3);
  align-items: start;
  max-width: calc(var(--read) + 2 * var(--gutter));
}

.character-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
}

.character-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px var(--s3);
  margin: 0;
  padding: var(--s3);
  border-radius: var(--r);
  background: rgba(var(--bg-rgb), .5);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--f-s);
}

.character-facts dt { color: var(--tx-3); }
.character-facts dd { margin: 0; color: var(--tx); }
.character .page-text { padding-top: var(--s4); }

.others-title {
  margin-top: var(--s4);
  font-family: var(--serif);
  font-size: var(--f-xl);
  font-weight: 700;
  line-height: 1.15;
}

.actor-grid-small { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); }
.actor-grid-small strong { font-size: 14px; }
.actor-grid-small figcaption span { font-size: 13px; }
.others-all { margin-top: var(--s3); }

@media (max-width: 760px) {
  .character-card { grid-template-columns: 1fr; }
  .character-photo { max-width: 260px; margin-inline: auto; }
  .character-facts { grid-template-columns: 1fr; gap: 2px; }
  .character-facts dd + dt { margin-top: 10px; }
  .actor-grid-small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
