/* «Голоса Севера» — тёмная полярная ночь, янтарь и редакционная типографика. */
:root {
  --p-night-950: oklch(13% 0.012 70);
  --p-night-900: oklch(16% 0.012 70);
  --p-night-800: oklch(20% 0.015 70);
  --p-night-700: oklch(26% 0.02 70);
  --p-amber-500: oklch(78% 0.16 75);
  --p-amber-600: oklch(68% 0.17 60);
  --p-cream-100: oklch(94% 0.02 90);
  --bg: var(--p-night-900);
  --bg-deep: var(--p-night-950);
  --bg-panel: var(--p-night-800);
  --bg-raised: var(--p-night-700);
  --accent: var(--p-amber-500);
  --accent-deep: var(--p-amber-600);
  --text: oklch(96% 0.015 90 / 0.94);
  --text-dim: oklch(90% 0.018 90 / 0.74);
  --line: oklch(94% 0.02 90 / 0.16);
  --line-strong: oklch(94% 0.02 90 / 0.3);
  --danger: oklch(72% 0.17 30);
  --success: oklch(80% 0.12 145);
  --sidebar-w: 280px;
  --font-display: "Cormorant", "Georgia", serif;
  --font-body: "Golos Text", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.22s;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg-deep); }
svg { flex: none; }

.logo {
  display: inline-block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.logo:hover { color: var(--text); }
.logo em { color: var(--accent); font-style: normal; }
.logo small {
  display: block;
  margin-top: 0.45rem;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-transform: none;
}

/* ---------- Авторизация ---------- */
.auth { min-height: 100dvh; background: var(--bg-deep); }
.auth__media { display: none; }
.auth__panel {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 32px 20px;
  background: radial-gradient(circle at 90% 0%, oklch(35% 0.06 75 / 0.17), transparent 45%), var(--bg-deep);
}
.auth__form-wrap { width: min(100%, 450px); }
.auth__eyebrow {
  margin: 42px 0 8px;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.auth h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 11vw, 3.8rem);
  line-height: 1;
}
.auth__lead { margin: 18px 0 28px; color: var(--text-dim); line-height: 1.6; }
.auth__submit { width: 100%; margin-top: 8px; }
.auth__note { margin: 22px 0 0; color: var(--text-dim); font-size: 0.75rem; line-height: 1.55; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 17px; }
.field > span:first-child { color: var(--text); font-size: 0.85rem; font-weight: 500; }
.field i { color: var(--text-dim); font-size: 0.75rem; font-style: normal; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: var(--bg-panel);
  color: var(--text);
  transition: border-color var(--dur), background var(--dur);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--bg-raised); }
.field input[type="file"] { padding: 8px; font-size: 0.78rem; }
.field input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 10px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
}
.field small { color: var(--text-dim); font-size: 0.72rem; line-height: 1.45; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 52px; }
.password-toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  place-items: center;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.password-toggle:hover { color: var(--accent); }
.password-toggle svg { width: 22px; height: 22px; }
.form-error { margin: 4px 0 12px; color: var(--danger); font-size: 0.85rem; }
/* ---------- Каркас ---------- */
.site-shell { min-height: 100dvh; }
.sidebar { display: none; }
.main { min-height: 100dvh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 70px;
  padding: 10px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: oklch(16% 0.012 70 / 0.94);
  backdrop-filter: blur(12px);
}
.topbar .logo { font-size: 1.1rem; }
.burger {
  display: inline-flex;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  cursor: pointer;
}
.burger span { height: 2px; background: var(--text); transition: transform var(--dur), opacity var(--dur); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav {
  position: sticky;
  top: 70px;
  z-index: 25;
  display: none;
  padding: 8px 18px 16px;
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  background: var(--bg-panel);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a, .mobile-nav__action {
  min-height: 46px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.mobile-nav__action:last-child { border-bottom: 0; }
.account {
  display: flex;
  margin-top: auto;
  padding-top: 18px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.account__avatar {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: none;
  place-items: center;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 700;
}
.account > div { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.account b { font-size: 0.85rem; }
.account div span { color: var(--text-dim); font-size: 0.72rem; }
.icon-btn {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  place-items: center;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.icon-btn:hover { border-color: var(--accent); background: var(--bg-raised); color: var(--accent); }
.icon-btn svg { width: 22px; height: 22px; }
.side-foot { margin: 14px 0 0; color: var(--text-dim); font-size: 0.72rem; line-height: 1.5; }
.side-foot b { color: var(--accent); }

/* ---------- Кнопки ---------- */
.btn, .card-btn, .back-btn {
  display: inline-flex;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out), background var(--dur), border-color var(--dur), color var(--dur);
}
.btn:hover, .card-btn:hover, .back-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn:active, .card-btn:active, .back-btn:active { transform: scale(0.97); }
.btn:disabled, .card-btn:disabled { opacity: 0.55; cursor: wait; transform: none; }
.btn--primary { border-color: var(--accent); background: var(--accent); color: var(--bg-deep); font-weight: 600; }
.btn--primary:hover { border-color: var(--accent-deep); background: var(--accent-deep); color: var(--bg-deep); }
.btn--small { min-height: 44px; padding: 9px 15px; font-size: 0.82rem; }
.btn--outline { background: oklch(20% 0.015 70 / 0.55); }
.card-btn--accent { border-color: var(--accent); background: var(--accent); color: var(--bg-deep); }
.card-btn--accent:hover { background: var(--accent-deep); color: var(--bg-deep); }

/* ---------- Обложка ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: calc(100dvh - 70px);
  overflow: hidden;
  align-items: flex-end;
}
.hero__media { position: absolute; inset: 0; z-index: -2; background: var(--bg) url("../files/naryan-mar-reindeer.jpg") center / cover; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, oklch(13% 0.012 70 / 0.94) 0%, oklch(13% 0.012 70 / 0.64) 52%, oklch(13% 0.012 70 / 0.12) 100%), linear-gradient(to top, var(--bg) 0%, transparent 40%);
  content: "";
}
.hero__inner { width: 100%; max-width: 880px; padding: 80px 22px 48px; }
.hero__kicker, .section__label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 12vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.02;
  text-wrap: balance;
}
.hero__title em { color: var(--accent); font-style: normal; }
.hero__sub { max-width: 620px; margin: 22px 0 28px; color: var(--text); font-size: 1rem; line-height: 1.65; }
.hero__stats {
  display: flex;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
  flex-wrap: wrap;
  gap: 20px 30px;
}
.stat b { display: block; color: var(--accent); font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.stat span { color: var(--text-dim); font-size: 0.75rem; }

/* ---------- Секции ---------- */
.section { padding: 58px 20px; border-top: 1px solid var(--line); }
.section__head { display: flex; margin-bottom: 30px; flex-direction: column; gap: 20px; }
.section__head > div { max-width: 740px; }
.section__title { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 8vw, 3rem); font-weight: 600; line-height: 1.1; }
.section__lead { max-width: 660px; margin: 14px 0 0; color: var(--text-dim); }

/* ---------- Категории ---------- */
.category-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.category-card {
  position: relative;
  display: flex;
  min-height: 280px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  align-items: flex-end;
  background: var(--bg-panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur), box-shadow var(--dur);
}
.category-card:hover { border-color: var(--accent); box-shadow: 0 16px 35px oklch(10% 0.01 70 / 0.35); transform: translateY(-4px); }
.category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur) var(--ease-out); }
.category-card:hover img { transform: scale(1.035); }
.category-card::after { position: absolute; inset: 0; background: linear-gradient(to top, oklch(12% 0.012 70 / 0.97) 5%, oklch(12% 0.012 70 / 0.4) 65%, oklch(12% 0.012 70 / 0.12)); content: ""; }
.category-card__body { position: relative; z-index: 1; width: 100%; padding: 24px; }
.category-card__top { display: flex; margin-bottom: 9px; align-items: center; justify-content: space-between; gap: 12px; }
.category-card__type { color: var(--accent); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.category-card__count { padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 999px; background: oklch(16% 0.012 70 / 0.6); color: var(--text); font-size: 0.72rem; }
.category-card h3 { margin: 0; font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; line-height: 1.1; }
.category-card p { margin: 9px 0 0; color: var(--text); font-size: 0.85rem; line-height: 1.55; opacity: 0.82; }
.category-card__open { display: inline-flex; margin-top: 17px; align-items: center; gap: 8px; color: var(--accent); font-size: 0.8rem; }

/* ---------- Материалы ---------- */
.collection-head { margin-bottom: 26px; }
.back-btn { min-height: 44px; margin-bottom: 26px; padding-left: 13px; }
.collection-head h3 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 600; line-height: 1.1; }
.collection-head > p:last-child { max-width: 700px; margin: 12px 0 0; color: var(--text-dim); }
.toolbar { display: flex; margin-bottom: 22px; flex-direction: column; gap: 10px; }
.search { position: relative; width: 100%; max-width: 480px; }
.search input {
  width: 100%;
  min-height: 48px;
  padding: 11px 46px 11px 43px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  outline: none;
  background: var(--bg-panel);
  color: var(--text);
}
.search input:focus { border-color: var(--accent); }
.search input::placeholder { color: var(--text-dim); }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { display: none; -webkit-appearance: none; appearance: none; }
.search__icon { position: absolute; top: 50%; left: 15px; translate: 0 -50%; color: var(--text-dim); pointer-events: none; }
.search__clear {
  position: absolute;
  top: 2px;
  right: 2px;
  display: none;
  width: 44px;
  height: 44px;
  padding: 12px;
  border: 0;
  border-radius: 50%;
  place-items: center;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.search__clear:hover { color: var(--accent); }
.search.has-value .search__clear { display: grid; }
.archive-search { margin: 0 0 28px; }
.search--global { max-width: 720px; }
.search--global input { min-height: 54px; background: var(--bg-deep); font-size: 1rem; }
.archive-search__hint { margin: 9px 0 0; color: var(--text-dim); font-size: 0.78rem; line-height: 1.5; }
.result-count { margin: 0; color: var(--text-dim); font-size: 0.82rem; }
.result-count b { color: var(--accent); }
.grid { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: stretch; }
.card { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; flex-direction: column; background: var(--bg-panel); transition: transform var(--dur), border-color var(--dur), box-shadow var(--dur); }
.card:hover { border-color: var(--line-strong); box-shadow: 0 16px 35px oklch(10% 0.01 70 / 0.32); transform: translateY(-3px); }
.card.is-hidden { display: none; }
.card__cover { position: relative; overflow: hidden; aspect-ratio: 16 / 9; flex: none; background: var(--bg-raised); }
.card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur); }
.card:hover .card__cover img { transform: scale(1.03); }
.card__badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: oklch(13% 0.012 70 / 0.86); color: var(--accent); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.card__body { display: flex; padding: 20px; flex: 1; flex-direction: column; gap: 8px; }
.card__cat { color: var(--accent); font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase; }
.card__title { margin: 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.15; }
.card__desc { margin: 0; color: var(--text-dim); font-size: 0.88rem; line-height: 1.55; }
.card__meta { display: flex; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 5px 10px; color: var(--text-dim); font-size: 0.73rem; }
.card__meta span + span::before { margin-right: 10px; content: "·"; }
.card__meta .card__stat { display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim); line-height: 1; white-space: nowrap; }
.card__stat svg { width: 14px; height: 14px; }
.card__stat b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.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; }
.card__actions { display: flex; margin-top: 10px; flex-wrap: wrap; gap: 8px; }
.card__source { display: inline-flex; margin-top: 6px; align-items: center; gap: 5px; color: var(--text-dim); font-size: 0.7rem; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.card__source:hover { color: var(--accent); }
.card__uploaded { color: var(--success); }
mark { padding: 0 2px; border-radius: 3px; background: oklch(78% 0.16 75 / 0.28); color: var(--accent); }
.empty { padding: 42px 16px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--text-dim); text-align: center; }
.empty b { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.7rem; }
.empty p { margin: 6px 0 18px; }

/* ---------- Плеер ---------- */
.player { display: flex; margin-top: 12px; flex-direction: column; gap: 12px; }
.player__main { display: flex; align-items: center; gap: 12px; }
.player__btn {
  display: inline-flex;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  flex: none;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg-deep);
  cursor: pointer;
  transition: transform var(--dur), background var(--dur);
}
.player__btn:hover { background: var(--accent-deep); transform: scale(1.05); }
.player__btn:active { transform: scale(0.95); }
.player__track { min-width: 0; flex: 1; }
.player__bar { width: 100%; height: 20px; padding: 7px 0; cursor: pointer; }
.player__bar-inner { height: 6px; overflow: hidden; border-radius: 3px; background: var(--bg-raised); }
.player__fill { width: 0%; height: 100%; background: var(--accent); }
.player__time { display: flex; margin-top: 1px; justify-content: space-between; color: var(--text-dim); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.player__volume { display: flex; min-height: 44px; align-items: center; gap: 8px; color: var(--text-dim); }
.player__volume svg { width: 17px; height: 17px; }
.player__volume input { width: 100%; min-width: 0; height: 44px; accent-color: var(--accent); cursor: pointer; }
.player__volume output { min-width: 34px; font-size: 0.7rem; text-align: right; }

/* ---------- Географическая карта ---------- */
.map-wrap { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: stretch; }
.map-panel, .people-card { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-panel); }
.map-panel { min-width: 0; overflow: hidden; padding: 16px; }
.map-panel__head { display: flex; padding: 2px 2px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.map-panel__head > div { display: flex; flex-direction: column; }
.map-panel__head span { color: var(--text-dim); font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase; }
.map-panel__head b { margin-top: 2px; font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.15; }
.map-panel__extent { white-space: nowrap; }
.map-svg { display: block; width: 100%; height: auto; overflow: hidden; border-radius: 12px; }
.map-ocean { fill: url(#map-ocean-glow); }
.map-graticule { fill: none; stroke: oklch(80% 0.03 200 / 0.14); stroke-dasharray: 3 6; stroke-width: 0.8; }
.map-land { fill: #283334; stroke: #53605c; stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.map-land--russia { fill: #343c35; stroke: #788276; }
.map-place-label { fill: #a6b4ab; font-family: var(--font-body); pointer-events: none; }
.map-place-label--ocean { fill: #768d8d; font-size: 12px; letter-spacing: 4px; }
.map-place-label--country { fill: #8e998f; font-size: 18px; font-weight: 500; letter-spacing: 7px; opacity: 0.5; }
.map-place-label--region { font-size: 11px; letter-spacing: 1.5px; opacity: 0.65; }
.map-marker { cursor: pointer; outline: none; }
.map-marker__halo { fill: var(--accent); opacity: 0.13; transition: opacity var(--dur), transform var(--dur); transform-box: fill-box; transform-origin: center; }
.map-marker__core { fill: var(--bg-deep); stroke: var(--accent); stroke-width: 3; transition: fill var(--dur), stroke var(--dur); }
.map-marker__label { fill: var(--text); font-family: var(--font-body); font-size: 14px; font-weight: 600; paint-order: stroke; stroke: #101b1c; stroke-width: 4px; stroke-linejoin: round; }
.map-marker:hover .map-marker__halo, .map-marker.is-active .map-marker__halo { opacity: 0.35; transform: scale(1.2); }
.map-marker:hover .map-marker__core, .map-marker.is-active .map-marker__core { fill: var(--accent); stroke: var(--text); }
.map-marker.is-active .map-marker__label { fill: var(--accent); }
.map-marker:focus-visible .map-marker__core { stroke: var(--text); stroke-width: 6; }
.map-legend { display: flex; padding: 13px 2px 0; flex-wrap: wrap; justify-content: space-between; gap: 5px 16px; color: var(--text-dim); font-size: 0.68rem; }
.map-legend span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.map-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px oklch(78% 0.16 75 / 0.15); }
.map-people-buttons { display: grid; margin-top: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.map-person-btn { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text-dim); font-size: 0.73rem; cursor: pointer; transition: border-color var(--dur), background var(--dur), color var(--dur); }
.map-person-btn:hover { border-color: var(--accent); color: var(--text); }
.map-person-btn.is-active { border-color: var(--accent); background: var(--accent); color: var(--bg-deep); font-weight: 600; }
.map-note { margin: 14px 0 0; color: var(--text-dim); font-size: 0.68rem; line-height: 1.55; }
.people-card { display: flex; min-width: 0; padding: 26px; border-top: 2px solid var(--accent); flex-direction: column; background: radial-gradient(120% 70% at 100% 0%, oklch(35% 0.05 75 / 0.14), transparent 65%), var(--bg-panel); }
.people-card__eyebrow { margin: 0 0 30px; color: var(--text-dim); font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; }
.people-card__region { margin: 0; color: var(--accent); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.people-card__name { margin: 8px 0 15px; font-family: var(--font-display); font-size: 2.35rem; font-weight: 600; line-height: 1.05; }
.people-card__text { margin: 0; color: var(--text-dim); font-size: 0.88rem; line-height: 1.65; }
.people-card__tags { display: flex; margin-top: 20px; flex-wrap: wrap; gap: 7px; }
.tag { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-dim); font-size: 0.7rem; }
.people-card__footer { display: flex; margin-top: auto; padding-top: 28px; align-items: center; justify-content: space-between; gap: 12px; }
.people-card__collection { margin-top: 1rem; }
.people-card__collection .btn { max-width: 100%; text-align: left; }
.people-card__footer span { color: var(--text-dim); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.map-step { display: grid; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%; place-items: center; background: transparent; color: var(--accent); cursor: pointer; }
.map-step:hover { border-color: var(--accent); background: var(--accent); color: var(--bg-deep); }
@media (min-width: 640px) {
  .map-panel { padding: 22px; }
  .map-people-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .map-wrap { grid-template-columns: minmax(0, 1.75fr) minmax(270px, 0.75fr); }
  .map-people-buttons { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ---------- О проекте ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.about__text { max-width: 720px; }
.about__text p { margin: 0 0 17px; color: var(--text-dim); }
.about__text p:first-child { color: var(--text); font-size: 1.08rem; }
.about-note { padding: 22px; border-left: 1px solid var(--accent); background: var(--bg-panel); }
.about-note b { font-family: var(--font-display); font-size: 1.25rem; }
.about-note p { margin: 9px 0 14px; color: var(--text-dim); font-size: 0.82rem; }
.about-note a { font-size: 0.8rem; text-decoration: underline; text-underline-offset: 3px; }
.footer { display: flex; padding: 26px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--text-dim); font-size: 0.74rem; }

/* ---------- Диалог загрузки ---------- */
.upload-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-deep);
  color: var(--text);
  box-shadow: 0 25px 80px oklch(8% 0.01 70 / 0.65);
}
.upload-dialog::backdrop { background: oklch(8% 0.01 70 / 0.8); backdrop-filter: blur(5px); }
.upload-dialog form { padding: 22px; }
.dialog-head { display: flex; margin-bottom: 24px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-head h2 { margin: 0; font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.upload-form__grid { display: grid; grid-template-columns: 1fr; }
.upload-note { margin: 4px 0 20px; color: var(--text-dim); font-size: 0.75rem; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: min(390px, calc(100% - 32px));
  padding: 13px 17px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: 0 15px 45px oklch(8% 0.01 70 / 0.55);
  font-size: 0.85rem;
}

/* Появление не скрывает содержимое до срабатывания наблюдателя. */
.reveal { opacity: 1; transform: none; }
.reveal.is-visible { animation: reveal-in 0.25s var(--ease-out) both; }
@keyframes reveal-in { from { opacity: 0.75; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Планшет ---------- */
@media (min-width: 640px) {
  .auth__panel { padding: 48px; }
  .category-grid, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__inner { padding: 90px 40px 58px; }
  .section { padding: 70px 40px; }
  .section__head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .toolbar { flex-direction: row; align-items: center; justify-content: space-between; }
  .player { flex-direction: row; align-items: center; }
  .player__main { min-width: 0; flex: 1; }
  .player__volume { width: 120px; flex: none; }
  .about-grid { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); }
  .upload-dialog form { padding: 30px; }
  .upload-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .field--wide { grid-column: 1 / -1; }
  .footer { padding: 28px 40px; }
}

/* ---------- Десктоп ---------- */
@media (min-width: 900px) {
  .auth { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr); }
  .auth__media { position: relative; display: block; min-height: 100dvh; overflow: hidden; }
  .auth__media > img { width: 100%; height: 100%; object-fit: cover; }
  .auth__media::after { position: absolute; inset: 0; background: linear-gradient(to top, oklch(12% 0.012 70 / 0.94), transparent 70%); content: ""; }
  .auth__quote { position: absolute; right: 8%; bottom: 7%; left: 8%; z-index: 1; max-width: 620px; }
  .auth__quote span { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; }
  .auth__quote p { margin: 14px 0 0; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.15; }
  .auth__panel { min-height: 100dvh; }
}

@media (min-width: 1024px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: var(--sidebar-w);
    padding: 30px 26px;
    border-right: 1px solid var(--line);
    flex-direction: column;
    gap: 28px;
    background: var(--bg-deep);
  }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav a { display: block; padding: 9px 10px; border-left: 1px solid transparent; color: var(--text-dim); font-size: 0.9rem; transition: color var(--dur), border-color var(--dur), padding var(--dur); }
  .side-nav a:hover, .side-nav a.is-active { padding-left: 16px; border-left-color: var(--accent); color: var(--text); }
  .main { margin-left: var(--sidebar-w); }
  .topbar, .mobile-nav { display: none !important; }
  .hero { min-height: 100dvh; }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section { padding: 80px 56px; }
  .hero__inner { padding: 100px 56px 64px; }
  .footer { padding: 30px 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal.is-visible { animation: none; }
}


/* ---------- Удобная навигация внутри раздела ---------- */
.collection-back {
  position: sticky;
  top: 78px;
  z-index: 14;
  margin: -8px 0 24px;
  padding: 8px 0;
  background: linear-gradient(var(--bg) 72%, transparent);
}
.collection-back .back-btn {
  border-color: var(--accent);
  background: var(--bg-panel);
  box-shadow: 0 6px 22px oklch(10% 0.01 70 / 0.3);
  color: var(--accent);
  font-weight: 600;
}
.collection-back .back-btn:hover { background: var(--accent); color: var(--bg-deep); }
.collection-back--bottom { position: static; margin: 30px 0 0; padding: 0; background: none; }
.collection-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 600; line-height: 1.1; }
.category-card__count { white-space: nowrap; }
.card__actions .card-btn { min-height: 42px; }
@media (min-width: 1024px) {
  .collection-back { top: 0; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------- Тематические разделы ---------- */
.topic-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.topic-card {
  display: grid;
  min-width: 0;
  min-height: 270px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 16px;
  background: linear-gradient(145deg, oklch(24% 0.022 70 / 0.74), var(--bg-panel));
  color: var(--text);
  text-align: left;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur), box-shadow var(--dur);
}
.topic-card:hover { border-color: var(--accent); box-shadow: 0 16px 35px oklch(10% 0.01 70 / 0.3); color: var(--text); transform: translateY(-3px); }
.topic-card__content { display: flex; min-width: 0; flex-direction: column; }
.topic-card__meta { color: var(--accent); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; }
.topic-card h3 { margin: 14px 0 10px; font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; line-height: 1.12; }
.topic-card p { margin: 0; color: var(--text-dim); font-size: 0.82rem; line-height: 1.55; }
.topic-card__thumb { width: 92px; height: 100%; min-height: 232px; border: 1px solid var(--line); border-radius: 9px; object-fit: cover; }
.topic-card__actions { display: flex; margin-top: auto; padding-top: 20px; flex-wrap: wrap; gap: 7px; }
.topic-card__actions .card-btn { min-height: 38px; padding: 7px 10px; font-size: 0.7rem; }

@media (min-width: 640px) {
  .topic-card { padding: 22px; grid-template-columns: minmax(0, 1fr) 120px; gap: 20px; }
  .topic-card__thumb { width: 120px; }
}
@media (min-width: 900px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .sidebar { overflow-y: auto; }
}
@media (min-width: 1600px) {
  .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topic-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Компенсация закреплённой мобильной шапки при переходе по якорям. */
.section { scroll-margin-top: 70px; }
@media (min-width: 1024px) { .section { scroll-margin-top: 0; } }
