/* ============================================================
   Gameloc DB — локальный интерфейс
   Оформление: noir — тёмный игровой портал
   ============================================================ */

/* ---------- Норная тема (noir) ---------- */
:root,
[data-theme="noir"] {
  --bg: #0f0f0f;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --surface-3: #262626;
  --ink: #ffffff;
  --muted: #9a9a9a;
  --faint: #6e6e6e;
  --border: #2a2a2a;
  --border-soft: #202020;
  --accent: #ff1f64;
  --accent-2: #ff5c86;
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 31, 100, .16);
  --accent-line: rgba(255, 31, 100, .45);
  --danger: #ff6b81;
  --ok: #34d399;
  --header-bg: rgba(15, 15, 15, .82);
  --hero-overlay: linear-gradient(100deg, rgba(12, 12, 12, .97) 0%, rgba(12, 12, 12, .82) 42%, rgba(12, 12, 12, .28) 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --avatar-radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  --shadow-hover: 0 18px 46px rgba(0, 0, 0, .6), 0 0 0 1px var(--accent-line);
  --backdrop-opacity: .30;
  --font-display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-num: "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --letter: -.015em;
  --card-lift: -3px;
  --chip-bg: var(--surface-2);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: var(--letter);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

main.page { padding: 30px 0 72px; min-height: 60vh; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }


/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html { scroll-behavior: smooth; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 26px;
  max-width: 190px;
}
.brand-logo { filter: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 6px 18px var(--accent-soft);
}


.brand-dot { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  flex: 0 0 auto;
}

.nav a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color .15s, background .15s;
}

.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--accent); background: var(--accent-soft); }

.search {
  position: relative;
  margin-left: auto;
  flex: 1 1 240px;
  max-width: 360px;
}

.search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--faint);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }


/* ---------- Типографика ---------- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.12;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.display { font-size: clamp(26px, 3.4vw, 40px); }
.page-title { font-size: clamp(24px, 3vw, 34px); }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}

.btn:hover { border-color: var(--accent); transform: translateY(-1px); }

.btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 22px var(--accent-soft);
}

.btn-primary:hover { background: var(--accent); box-shadow: var(--shadow-hover); }
.btn-ghost { background: transparent; }


/* ---------- Хиро ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 370px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 22%;
  filter: saturate(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-overlay);
}

.hero-content { padding: 40px 44px; max-width: 680px; }
.hero-title { font-size: clamp(30px, 5vw, 52px); color: #fff; margin-bottom: 10px; }
.hero-meta { color: rgba(255, 255, 255, .72); font-size: 14px; margin-bottom: 18px; }
.hero-text {
  color: rgba(255, 255, 255, .82);
  font-size: 14.5px;
  margin: 0 0 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28); color: #fff; backdrop-filter: blur(8px); }
.hero .btn-primary { background: var(--accent); border-color: transparent; }
.hero .eyebrow { color: #fff; }
.hero .eyebrow::before { background: var(--accent-2); }

/* ---------- Статистика ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

/* ---------- Крупные кнопки-разделы ---------- */
.home-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.home-action {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 132px;
  padding: 22px 24px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}

.home-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}


.home-action-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: -.01em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .18);
}

.home-action-img {
  position: absolute;
  right: 14px;
  bottom: 8px;
  height: calc(100% - 16px);
  width: auto;
  max-width: 45%;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .28));
  transition: transform .25s ease;
}

.home-action:hover .home-action-img { transform: translateY(-2px) scale(1.02); }

.home-action--persons { background: linear-gradient(115deg, #f0973f 0%, #c1401f 55%, #ab2318 100%); }
.home-action--games { background: linear-gradient(115deg, #8a63ff 0%, #6a44f0 50%, #4a2ad4 100%); }
.home-action--studios { background: linear-gradient(115deg, #6fa2e0 0%, #4a7fc4 55%, #2f5fa8 100%); }

@media (max-width: 900px) {
  .home-actions { grid-template-columns: 1fr; }
  .home-action { min-height: 108px; }
  .home-action-img { right: 12px; bottom: 6px; height: calc(100% - 12px); }
}

.stat {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color .15s, transform .15s, background .15s;
}

a.stat:hover { border-color: var(--accent); transform: translateY(var(--card-lift)); }
.stat-value { font-family: var(--font-num); font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.stat-label { margin-top: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

[data-theme="noir"] .stat-value { background: linear-gradient(120deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Секции ---------- */
.section { margin-top: 42px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-title { font-size: 19px; letter-spacing: -.02em; }
.section-title small { font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.section-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

/* ---------- Постеры игр ---------- */
.grid-posters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px 18px;
}

.poster-card { display: block; text-decoration: none; color: inherit; }

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--surface-3));
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.poster-card:hover .poster { transform: translateY(var(--card-lift)); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.poster-card:hover .poster img { transform: scale(1.045); }

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--muted);
  background:
    radial-gradient(120% 80% at 20% 0%, var(--accent-soft), transparent 60%),
    linear-gradient(160deg, var(--surface-2), var(--surface-3));
}

.poster-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(12, 12, 12, .72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.poster-badge.is-new { background: rgba(34, 211, 166, .88); color: #04231a; }

.poster-body { padding: 10px 1px 0; }
.poster-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster-sub { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.poster-title-secondary {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster-card:hover .poster-title { color: var(--accent); }


/* ---------- Персоны ---------- */
.grid-persons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 22px 18px;
}

.person-card { display: block; text-decoration: none; color: inherit; text-align: center; }

.avatar {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: var(--avatar-radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--surface-3));
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.person-card:hover .avatar { transform: translateY(var(--card-lift)); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.person-card:hover .avatar img { transform: scale(1.05); }

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--muted);
  background:
    radial-gradient(100% 100% at 30% 0%, var(--accent-soft), transparent 65%),
    linear-gradient(160deg, var(--surface-2), var(--surface-3));
}

.person-body { padding: 10px 2px 0; }
.person-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.person-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }

[data-theme="noir"] .person-card:hover .person-name { color: var(--accent); }

/* ---------- Карточки/списки ---------- */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-pad { padding: 20px 22px; }

.list { display: flex; flex-direction: column; }

.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}

.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-row-main { min-width: 0; flex: 1; }
.list-row-title { font-size: 14px; font-weight: 600; }
.list-row-sub { font-size: 12px; color: var(--muted); }
.list-row-side { font-size: 12px; color: var(--faint); white-space: nowrap; }

.thumb {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
  flex: 0 0 auto;
}

.thumb-poster { width: 40px; height: 53px; border-radius: 4px; }
.thumb-avatar { border-radius: var(--avatar-radius); }

.thumb-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 10px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table a { text-decoration: none; font-weight: 600; }
.table a:hover { color: var(--accent); }

/* ---------- Теги ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--accent); }
.chip-role { color: var(--muted); font-size: 11px; }
.chip-accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip-game-title { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.chip-game-title-ru { font-size: 11px; font-weight: 400; opacity: .8; }


.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.dot-off { background: var(--faint); }
.dot-official { background: var(--ok); }
.dot-unofficial { background: #f5c451; }

.detail-hero {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  margin-bottom: 36px;
}

.detail-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-hover);
}

.detail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-hover);
  max-width: 320px;
}
.detail-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-info { min-width: 0; }
.detail-title { font-size: clamp(28px, 4vw, 46px); margin-bottom: 8px; }
.detail-alt { font-size: 15px; color: var(--muted); margin-bottom: 14px; }

.detail-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 20px; font-size: 13.5px; color: var(--muted); }
.detail-facts span { display: inline-flex; align-items: center; gap: 7px; }
.detail-facts strong { color: var(--ink); font-weight: 600; }

.detail-desc {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 74ch;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.detail-desc p { margin: 0 0 10px; }
.detail-desc img { display: none; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--accent); }

.city-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-line);
  transition: border-color .15s, color .15s;
}
.city-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Кнопки соцсетей ---------- */
.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}

.social-btn:hover {
  border-color: var(--accent);
  background: var(--surface-3);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.social-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex: 0 0 auto;
}
.social-icon img { display: block; width: 14px; height: 14px; object-fit: contain; }

.social-name { white-space: nowrap; }

/* Цвета иконок по платформам */
.social-btn--vk .social-icon { background: #0077ff; }
.social-btn--telegram .social-icon { background: #26a5e4; }
.social-btn--youtube .social-icon { background: #ff0000; }
.social-btn--twitch .social-icon { background: #9146ff; }
.social-btn--boosty .social-icon { background: #f8951d; }
.social-btn--kinopoisk .social-icon { background: #f8c000; color: #1a1a1a; }
.social-btn--kinopoisk .social-icon img { filter: brightness(0); }
.social-btn--tiktok .social-icon { background: #111; }
.social-btn--website .social-icon { background: var(--accent); }
.social-btn--link .social-icon { background: var(--muted); }

/* ---------- Мета-карточки ---------- */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.meta {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.meta dt {
  margin: 0 0 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
}
.meta dd { margin: 0; font-size: 14px; font-weight: 600; }
.meta-languages { display: block; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }

/* ---------- Роли / актёрский состав ---------- */
.cast-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.cast-list--game { align-items: start; }
.cast-item { min-width: 0; }
.cast-subsection + .cast-subsection { margin-top: 24px; }
.cast-subsection-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.cast-subsection-title small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.cast-lang-nav { margin-bottom: 18px; }
.cast-lang-nav .chip-count { margin-left: 6px; opacity: .6; }
.cast-subsection[id] { scroll-margin-top: 92px; }

/* ---------- Роли персоны: сетка постеров ---------- */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px 14px;
}

.role-card { display: block; text-decoration: none; color: inherit; }

.role-card-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--surface-3));
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.role-card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.role-card:hover .role-card-poster { transform: translateY(var(--card-lift)); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.role-card:hover .role-card-poster img { transform: scale(1.045); }

.role-card-info { padding: 8px 2px 0; }
.role-card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.role-card:hover .role-card-title { color: var(--accent); }
.role-card-role {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}

.cast-item:hover { border-color: var(--accent); background: var(--surface-3); box-shadow: var(--shadow-hover); transform: translateY(-1px); }

.cast-item--game { align-items: flex-start; padding: 16px 18px; }
.cast-actor-link { display: block; flex: 0 0 auto; line-height: 0; }
.cast-name-link { display: inline-block; color: inherit; text-decoration: none; }
.cast-name-link:hover { color: var(--accent); }
.cast-roles-list--game {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 10px;
  gap: 6px 12px;
  overflow: visible;
}
.cast-role-item--game {
  flex: 0 1 165px;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.cast-role-item--game .cast-role-avatar { width: 48px; height: 48px; }
.cast-role-item--game .cast-role-text { flex: 1 1 0; min-width: 0; }
.cast-role-item--game .cast-role-char,
.cast-role-item--game .cast-role-name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
.cast-roles-list--game .cast-toggle { align-self: center; }

.cast-avatars { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

.cast-character {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}

.cast-poster {
  width: 108px;
  height: 144px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}

.cast-actor {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}

.cast-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 16px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

.cast-role-avatar.cast-fallback .cast-fallback-icon {
  width: 26px;
  height: 26px;
  opacity: .72;
}

.cast-info { min-width: 0; flex: 1; }

.cast-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-role {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Несколько ролей в одной игре ---------- */
.cast-roles-badge {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  flex: 0 0 auto;
}

.cast-roles-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  max-width: 100%;
  overflow: hidden;
}

.cast-roles-list--v {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 4px;
}

.cast-item-group .cast-roles-list { margin-top: 12px; }
.cast-item-group .cast-date { margin-top: 12px; }
.cast-game-title-ru { margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--muted); }

/* ---------- Свёрнутые роли ---------- */
.cast-role-item[data-collapsed] {
  display: none;
}

.cast-roles-list.is-expanded .cast-role-item[data-collapsed] {
  display: flex;
}

.cast-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 2px;
  transition: background .15s, border-color .15s;
}

.cast-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.cast-toggle.is-expanded::after {
  content: '';
}

.cast-role-item {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
  display: flex;
  gap: 8px;
  align-items: center;
}

.cast-item-group .cast-role-item { flex: 1 1 190px; align-items: center; }
.cast-item-group .cast-role-text { flex: 1 1 0; min-width: 0; }
.cast-item-group .cast-role-char,
.cast-item-group .cast-role-name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.cast-role-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}

.cast-role-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cast-role-char {
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-role-name {
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-date {
  font-size: 11px;
  color: var(--faint);
  margin-top: 4px;
}


/* ---------- Роли (персоны) ---------- */
.role-list { display: grid; gap: 5px; }

.role-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
}

.role-row:hover { border-color: var(--accent); background: var(--surface-2); }
.role-person { flex: 1 1 auto; min-width: 0; }
.role-person-name { font-size: 14px; font-weight: 600; }
.role-person-meta { font-size: 12px; color: var(--muted); }
.role-name { flex: 0 0 auto; font-size: 13px; color: var(--muted); text-align: right; }
.role-main { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.role-character {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
  flex: 0 0 auto;
}


/* ---------- Медиа-галерея ---------- */
.grid-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.media-item {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.media-item:hover img { transform: scale(1.05); }

.grid-media--natural { align-items: start; }
.grid-media--natural .media-item { aspect-ratio: auto; align-self: start; }
.grid-media--natural .media-item img { width: 100%; height: auto; object-fit: contain; transform: none; }
.grid-media--natural .media-item:hover img { transform: none; }

/* ---------- Фильтры ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.filters .field { display: inline-flex; align-items: center; gap: 7px; }
.filters-search { margin: 0; max-width: 320px; }
.filters label { font-size: 12px; font-weight: 600; color: var(--muted); }

.filters select {
  height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12.5px;
  cursor: pointer;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.toggle:hover { border-color: var(--accent); color: var(--ink); }
.toggle.is-on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.filters-spacer { flex: 1 1 auto; }
.filters-count { font-size: 12.5px; color: var(--faint); }

.filters--games {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}
.filters--games .field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
}
.filters--games .field select { width: 100%; }
.filters--games .filters-spacer { display: none; }
.filters--games .switch { justify-self: start; }
.filters--games .filters-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

@media (min-width: 760px) {
  .filters--games .filters-actions { grid-column: -3 / -1; }
}

@media (max-width: 1000px) {
  .filters--games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .filters--games { grid-template-columns: 1fr; }
}

.filters--persons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  align-items: end;
}
.filters--persons .field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
}
.filters--persons .field select { width: 100%; }
.filters--persons .filter-toggles { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters--persons .filters-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
@media (min-width: 1000px) {
  .filters--persons .filter-toggles { grid-column: auto; flex-wrap: nowrap; }
  .filters--persons .filters-actions { grid-column: -3 / -1; }
}
@media (min-width: 760px) and (max-width: 999px) {
  .filters--persons .filter-toggles,
  .filters--persons .filters-actions { grid-column: 1 / -1; }
}


/* ---------- Пагинация ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.pager-info { font-size: 13px; color: var(--muted); }
.pager-links { display: flex; gap: 6px; flex-wrap: wrap; }

.pager-links a,
.pager-links span {
  display: inline-flex;
  align-items: center;
  height: 34px;
  min-width: 34px;
  padding: 0 11px;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.pager-links a:hover { border-color: var(--accent); color: var(--accent); }
.pager-links span { color: var(--faint); }


/* ---------- Форма поиска страницы ---------- */
.search-hero {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin: 18px 0 30px;
}
.search-hero input {
  flex: 1;
  height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  outline: none;
}
.search-hero input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Пустые состояния ---------- */
.empty {
  padding: 44px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--surface);
}
.empty strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 16px; margin-bottom: 4px; }

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Биография / prose ---------- */
.prose { font-size: 14.5px; color: var(--muted); max-width: 78ch; }
.prose p { margin: 0 0 12px; }
.prose img { display: none; }
.prose h1, .prose h2, .prose h3 { font-size: 17px; color: var(--ink); margin: 20px 0 8px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 20px; }
.prose a { color: var(--accent); }

/* ---------- Сетка двух колонок ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stack { display: grid; gap: 16px; }

/* ---------- Футер ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 26px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }


/* ---------- Авторы ---------- */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.authors-grid--single { grid-template-columns: 1fr; }

.author-item {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  align-items: start;
  align-content: center;
  gap: 6px 10px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.author-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
}

.author-note { grid-column: 2; color: var(--muted); font-size: 12px; }

.author-item--lead { font-size: 16px; font-weight: 600; }

.author-item--link { transition: border-color .15s, background .15s; }
.author-item--link:hover { border-color: var(--accent); background: var(--surface-2); }

/* ---------- Лайтбокс ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(5, 7, 10, .9);
  backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1120px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .detail-hero { grid-template-columns: 220px minmax(0, 1fr); gap: 26px; }
  .nav a { padding: 7px 9px; }
}

@media (max-width: 900px) {
  .site-header { position: static; }
  .header-inner { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px; }
  .header-inner .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .filters .search { order: 0; flex: 0 0 100%; max-width: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  main.page { padding: 20px 0 52px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 15px; }
  .stat-value { font-size: 22px; }
  .detail-hero { grid-template-columns: minmax(0, 1fr); }
  .detail-poster, .detail-portrait { max-width: 230px; }
  .grid-posters { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
  .hero { min-height: 300px; }
  .hero-content { padding: 22px; }
  .hero-text { -webkit-line-clamp: 2; }
}

@media (max-width: 360px) {
  .nav { gap: 0; margin-left: 0; flex-wrap: wrap; justify-content: center; }
  .nav a { padding: 6px 7px; font-size: 12.5px; }
  .grid-posters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .poster-card:hover .poster img, .person-card:hover .avatar img, .media-item:hover img { transform: none; }
}

/* ---------- Переключатели-пилюли в фильтрах ---------- */
.switch { position: relative; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: border-color .15s, color .15s, background .15s;
}
.switch > span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: .6;
}
.switch:hover > span { border-color: var(--accent); color: var(--ink); }
.switch input:checked + span { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.switch input:checked + span::before { background: currentColor; opacity: 1; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }


/* ---------- Студии ---------- */
.grid-studios {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.studio-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.studio-card:hover { border-color: var(--accent); transform: translateY(var(--card-lift)); box-shadow: var(--shadow-hover); }

.studio-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.studio-logo-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
}

.studio-body { min-width: 0; }
.studio-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.studio-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }


/* ---------- Сетка результатов поиска ---------- */
.result-group { margin-top: 34px; }
.result-count { color: var(--faint); font-weight: 500; }

/* ---------- Мелочи ---------- */
.code { font-family: var(--font-num); font-size: 12px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 999px; }

.chip-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Адаптив для актёров и ролей ---------- */
@media (max-width: 640px) {
  .cast-list { grid-template-columns: 1fr; gap: 10px; }
  .cast-item { padding: 12px 16px; gap: 12px; }
  .cast-actor { width: 60px; height: 60px; }
  .cast-poster { width: 54px; height: 72px; }
}


/* ---------- Одна роль в проекте: строка на всю ширину карточки ---------- */
.cast-roles-list--single .cast-role-item,
.cast-roles-list--single .cast-role-item--game,
.cast-roles-list--single .cast-role-item--game {
  flex: 1 1 100%;
  max-width: 100%;
}
.cast-roles-list--single .cast-role-char,
.cast-roles-list--single .cast-role-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ---------- Соцсети и «Поддержать» в шапке ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-socials a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .15s;
}

.header-socials a:hover {
  background: var(--surface-2);
  border-color: var(--border);
  transform: translateY(-1px);
}

.header-socials img {
  width: 22px;
  height: 22px;
  display: block;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 22px var(--accent-soft);
  transition: transform .15s, box-shadow .15s, filter .15s;
}

.support-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px var(--accent-soft);
}

.support-btn:active { transform: translateY(0); }

.support-btn-heart { font-size: 12px; line-height: 1; }

/* Модалка «Поддержать» */
.support-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.support-modal.is-open { display: flex; }

.support-modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 26px 26px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  animation: supportPop .18s ease-out;
}

@keyframes supportPop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.support-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s, background .15s;
}

.support-modal-close:hover { color: var(--ink); background: var(--surface-3); }

.support-modal-title { font-size: 20px; padding-right: 38px; }

.support-modal-text {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.support-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
}

.support-link:hover {
  border-color: var(--accent-line);
  background: var(--surface-3);
  transform: translateX(2px);
}

.support-link-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
}

.support-link-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.support-link-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.support-link-name { font-size: 14px; font-weight: 700; }
.support-link-desc { font-size: 12px; color: var(--muted); }

.support-link-arrow {
  margin-left: auto;
  color: var(--faint);
  font-size: 16px;
  transition: color .15s, transform .15s;
}

.support-link:hover .support-link-arrow { color: var(--accent); transform: translateX(2px); }

@media (max-width: 1180px) {
  .brand-logo { max-width: 150px; }
  .search { flex-basis: 200px; }
  .nav a { padding: 7px 8px; }
}

@media (max-width: 1040px) {
  .header-socials { display: none; }
}

@media (max-width: 900px) {
  .header-actions { margin-left: auto; }
}

@media (max-width: 640px) {
  .header-actions { gap: 6px; order: 2; }
  .nav { order: 3; flex-basis: 100%; }
  .header-inner .search { order: 4; }
  .support-btn { height: 34px; padding: 0 12px; font-size: 12px; }
}


/* ---------- Длинное описание студии: сворачивание ---------- */
.prose--collapsible { position: relative; }

.prose--collapsible.is-clamped {
  max-height: 340px;
  overflow: hidden;
}

.prose--collapsible.is-clamped::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(to bottom, rgba(15, 15, 15, 0), var(--bg));
  pointer-events: none;
}

.prose--collapsible.is-expanded {
  max-height: none;
}

.prose--collapsible.is-expanded::after { display: none; }

.prose-toggle {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.prose-toggle:hover { text-decoration: underline; }
