/* ==========================================================================
   Astronomus — «Уточнённое ретро» (direction A)
   Тёмное звёздное небо, cyan-айдентика, оранжевые рубрики, каталог слева.
   App-shell: header + левый каталог (drawer на мобильном) + контент + подвал.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Палитра */
  --bg: #03050b;
  --bg-2: #070c16;
  --panel: #0b1322;
  --panel-2: #0e1a2e;
  --line: #1c2a45;
  --line-soft: #162338;
  --text: #e9f0fb;
  --muted: #93a4c0;
  --muted-2: #6b7c99;
  --cyan: #2fd4ff;
  --cyan-soft: #8cc8ff;
  --orange: #ff8a4c;   /* рубрики / акцент-подписи (ретро-нота старого оранжевого) */
  --link: #2fd4ff;     /* интерактивные ссылки */
  --ink-on-cyan: #04121c;

  /* Размеры */
  --maxw: 1320px;
  --catalog-w: 258px;
  --radius: 14px;
  --radius-sm: 10px;

  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-content: "Golos Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  font-family: var(--font-ui);
  color: var(--text);
  /* Фон-«небо» на html, чтобы он не перекрывал звёздный слой (.starfield, z-index:-1) */
  background:
    radial-gradient(120% 60% at 50% -8%, rgba(22, 51, 92, 0.55), transparent 60%),
    radial-gradient(40% 30% at 88% 4%, rgba(47, 212, 255, 0.10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: transparent;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; text-underline-offset: 0.18em; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: #fff; line-height: 1.15; }

/* Звёздный фон поверх неба, под контентом */
.starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
}

/* Скрытый чекбокс-переключатель меню (drawer) */
.nav-toggle {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px);
}
.site-header__in {
  width: min(var(--maxw), calc(100% - 2.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: #fff; }
.brand__mark {
  flex: none;
  width: 64px; height: 40px;
  /* Сатурн «парит» на тёмном — чёрный фон картинки убирается режимом screen */
  background: url("/media/saturn.jpg") center/contain no-repeat;
  mix-blend-mode: screen;
}
.brand__name { display: flex; flex-direction: column; gap: 5px; line-height: 1.1; }
.brand__name strong { font-size: 1.15rem; letter-spacing: 0.01em; }
.brand__name small {
  font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.header-spacer { flex: 1; }

.header-tools { display: flex; align-items: center; gap: 0.6rem; }
.header-tools a { color: var(--muted); font-size: 0.9rem; }
.header-tools a:hover { color: #fff; }

.site-search {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b1626;
  color: var(--muted);
  font-size: 0.86rem;
  transition: width 0.18s ease, border-color 0.15s ease, color 0.15s ease;
  width: 112px;
}
.site-search:focus-within {
  width: min(32vw, 310px);
  border-color: rgba(47, 212, 255, 0.56);
  color: #fff;
}
.site-search svg { flex: none; }
.site-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.site-search input::placeholder { color: var(--muted); opacity: 1; }
.site-search button {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  background: var(--cyan);
  color: var(--ink-on-cyan);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.site-search:focus-within button { display: inline-flex; }

/* Кнопка-«бутерброд» (видна, когда каталог в режиме drawer) */
.nav-burger, .nav-close {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #0b1626;
  color: var(--text);
  cursor: pointer;
}

/* ===================== Shell (каталог + контент) ===================== */
.shell {
  flex: 1;
  width: min(var(--maxw), calc(100% - 2.5rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--catalog-w) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 3.5rem;
}

/* ===================== Каталог ===================== */
.catalog {
  position: sticky;
  top: 5rem;
  align-self: start;
}
.catalog__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.6rem;
}
.catalog__title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--orange);
}
.catalog__nav { display: flex; flex-direction: column; }
.catalog__top {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.62rem 0.4rem;
  color: var(--text); font-size: 0.93rem; font-weight: 500;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer; list-style: none;
}
.catalog__top::-webkit-details-marker { display: none; }
.catalog__top::marker { content: ""; }
.catalog__top .ico { flex: none; color: var(--cyan-soft); }
.catalog__top .chev { margin-left: auto; color: var(--muted-2); transition: transform 0.18s ease; }
.catalog__top:hover { color: #fff; }
.catalog__top[aria-current="page"] { color: #fff; }
.catalog__top[aria-current="page"] .ico { color: var(--cyan); }
.catalog__group[open] > .catalog__top { color: #fff; }
.catalog__group[open] > .catalog__top .chev { transform: rotate(180deg); }

.catalog__sub { list-style: none; margin: 0; padding: 0.3rem 0 0.65rem 1.95rem; }
.catalog__sub a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.32rem 0; color: var(--muted); font-size: 0.86rem;
}
.catalog__sub a::before {
  content: ""; width: 5px; height: 5px; flex: none;
  border-radius: 50%; background: var(--cyan-soft); opacity: 0.65;
}
.catalog__sub a:hover { color: #fff; }
.catalog__sub a[aria-current="page"] { color: var(--cyan); }
.catalog__sub a[aria-current="page"]::before { opacity: 1; background: var(--cyan); }

.nav-scrim { display: none; }

/* ===================== Hero ===================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.2rem, 4vw, 3.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(90% 120% at 18% 0%, rgba(20, 44, 78, 0.7), transparent 70%),
    #05080f;
}
.hero__saturn {
  position: absolute;
  right: -3%; top: 18%;
  width: clamp(180px, 32%, 360px);
  aspect-ratio: 5 / 3;
  background: url("/media/saturn.jpg") center/contain no-repeat;
  mix-blend-mode: screen;
  opacity: 0.9;
  pointer-events: none;
}
.hero__in { position: relative; max-width: 40rem; }
.hero h1 {
  margin: 0.7rem 0 0.9rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero__lede { margin: 0 0 1.4rem; max-width: 36rem; color: #c2d0e6; font-size: clamp(1rem, 1.6vw, 1.12rem); line-height: 1.6; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1.1rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.95rem;
  background: var(--cyan); color: var(--ink-on-cyan);
  box-shadow: 0 6px 24px -4px rgba(47, 168, 214, 0.5);
}
.btn:hover { color: var(--ink-on-cyan); background: #5bdcff; }
.btn-ghost { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--cyan); font-weight: 600; }

/* ===================== Вводный текст (из home.md) ===================== */
.home-intro {
  margin-top: 2.5rem;
  font-family: var(--font-content);
  font-size: 1.08rem; line-height: 1.75; color: #bcc6da;
}
.home-intro p { margin: 0 0 1rem; text-align: justify; }
.home-intro b { color: #d3dbeb; font-weight: 600; }
.home-intro a { color: var(--orange); font-weight: 700; }
.home-intro a:hover { color: #ffae80; }
.home-intro h1, .home-intro h2 { display: none; } /* заголовок дублирует hero */

/* ===================== Секции главной ===================== */
.section { margin-top: clamp(2.6rem, 4vw, 3.6rem); }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.4rem;
}
.section__head h2 { margin: 0.4rem 0 0; font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 700; }
.section__more { color: var(--cyan); font-weight: 500; font-size: 0.92rem; white-space: nowrap; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 1.1rem;
}
.card {
  display: flex; flex-direction: column; gap: 0.7rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(305deg, rgba(23, 38, 63, 0.6), #0b1322);
  color: var(--text);
}
.card:hover { color: var(--text); border-color: rgba(47, 212, 255, 0.5); transform: translateY(-2px); }
.card { transition: transform 0.15s ease, border-color 0.15s ease; }
.card__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 13px;
  background: #102038; border: 1px solid #27406a; color: var(--cyan);
}
.card h3 { margin: 0; font-size: 1.18rem; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.card__more { margin-top: auto; color: var(--cyan); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.35rem; }

/* ===================== Новости ===================== */
.news-list { display: flex; flex-direction: column; }
.news-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 1.6rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.news-item__date { color: var(--muted); font-size: 0.84rem; }
.news-item__date b { display: block; color: var(--cyan); font-size: 1.5rem; font-weight: 700; line-height: 1; margin-bottom: 0.3rem; }
.news-item__title { margin: 0 0 0.4rem; font-size: 1.06rem; font-weight: 600; }
.news-item__title a { color: var(--text); }
.news-item__title a:hover { color: #fff; }
.news-item__desc { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* Страница /news/ — список карточек */
.news-card {
  display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 1.5rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--line-soft); align-items: baseline;
}
.news-card time { color: var(--muted); font-size: 0.84rem; white-space: nowrap; }
.news-card__body { min-width: 0; }
.news-card__body h2, .news-card__body h3 { margin: 0 0 0.4rem; font-size: 1.1rem; font-weight: 600; }
.news-card__body a { color: var(--text); }
.news-card__body a:hover { color: #fff; }
.news-card__body p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.archive-link { margin-top: 1.6rem; font-weight: 500; }
section.news-list { margin-top: clamp(2rem, 4vw, 2.75rem); }

/* ===================== Поиск ===================== */
.search-page {
  margin-top: clamp(2rem, 4vw, 2.75rem);
}
.search-page__form {
  display: flex;
  gap: 0.7rem;
  max-width: 780px;
}
.search-page__form input {
  flex: 1;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font: 1rem var(--font-ui);
}
.search-page__form input:focus {
  outline: 0;
  border-color: rgba(47, 212, 255, 0.58);
}
.search-page__form button {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem;
  background: var(--cyan);
  color: var(--ink-on-cyan);
  font: 700 0.95rem var(--font-ui);
  cursor: pointer;
}
.search-page__status {
  margin: 1rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.search-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 860px;
}
.search-result {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.search-result h2 {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
  font-weight: 600;
}
.search-result h2 a { color: var(--text); }
.search-result h2 a:hover { color: #fff; }
.search-result__excerpt {
  margin: 0 0 0.5rem;
  color: var(--muted);
  line-height: 1.58;
}
.search-result__excerpt mark {
  border-radius: 0.18rem;
  padding: 0.02rem 0.15rem;
  background: rgba(255, 138, 76, 0.25);
  color: #fff;
}
.search-result__url {
  color: var(--cyan-soft);
  font-size: 0.84rem;
}

/* Архив новостей по годам */
.archive-years { margin-top: clamp(2rem, 4vw, 2.75rem); display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.archive-year {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(305deg, rgba(23, 38, 63, 0.5), #0b1322); color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.archive-year:hover { color: var(--text); border-color: rgba(47, 212, 255, 0.5); transform: translateY(-2px); }
.archive-year strong { font-size: 1.5rem; font-weight: 700; }
.archive-year span { color: var(--muted); font-size: 0.85rem; }

/* Год архива: разбивка по месяцам */
.news-year { margin-top: clamp(2rem, 4vw, 2.75rem); display: flex; flex-direction: column; gap: 2.2rem; }
.news-month > h2 {
  margin: 0 0 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line-soft);
  font-size: 1.15rem; font-weight: 700; text-transform: capitalize; color: #fff;
}
.news-list--compact .news-card { padding: 0.9rem 0; }

@media (max-width: 720px) {
  .news-card { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ===================== Подвал ===================== */
.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.site-footer__in {
  width: min(var(--maxw), calc(100% - 2.5rem));
  margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.8rem 1.5rem;
  padding: 1.6rem 0;
  color: var(--muted); font-size: 0.84rem;
}
.site-footer__links { display: flex; gap: 1.4rem; }
.site-footer__links a { color: var(--muted); }
.site-footer__links a:hover { color: #fff; }

/* ===================== Внутренние страницы (статья) ===================== */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.article-header { max-width: none; margin-bottom: 2.2rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.article-header h1 { font-size: clamp(1.4rem, 2.6vw, 2.15rem); font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
.article-deck { color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.15rem); line-height: 1.6; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; color: var(--muted); font-size: 0.76rem; }
.article-meta span { padding: 0.26rem 0.55rem; border: 1px solid var(--line); border-radius: 99px; }
.article-content { max-width: none; font-family: var(--font-content); font-size: 1.08rem; line-height: 1.75; color: #bcc6da; overflow-x: auto; }
.article-content h1:first-child { display: none; }
.article-content h2 { margin-top: 2.2rem; font-size: 1.55rem; }
.article-content a { color: var(--orange); }
.article-content a:hover { color: #ffae80; }
.article-content table { max-width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 0.88rem; }
.article-content td, .article-content th { padding: 0.55rem; border: 1px solid var(--line); }
.article-content .th { background: rgba(47, 212, 255, 0.12); color: #fff; font-weight: 700; }
.article-content center { display: block; max-width: 100%; overflow-x: auto; }
.article-content img[align="left" i], .article-content img[align="right" i], .article-content img[align="middle" i],
.article-content p[align="center" i] img, .article-content center img, .article-content .legacy-figure img {
  border: 1px solid var(--line); border-radius: 0.25rem; background: rgba(7, 16, 31, 0.42);
}
.article-content img[align="left" i] { float: left; margin: 0.35rem 1.2rem 0.9rem 0; }
.article-content img[align="right" i] { float: right; margin: 0.35rem 0 0.9rem 1.2rem; }
.article-content img[align="middle" i], .article-content p[align="center" i] img, .article-content center img { margin: 0.45rem; }
.missing-legacy-image { display: inline-block; padding: 0.45rem 0.65rem; border: 1px dashed var(--line); color: var(--muted); font-family: var(--font-ui); font-size: 0.8rem; }
.article-content .legacy-figure { margin: 2rem auto; text-align: center; }
.article-content figcaption { margin-top: 0.5rem; color: var(--muted); font-family: var(--font-ui); font-size: 0.82rem; }
.legacy-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.legacy-gallery__item { margin: 0; padding: 0.7rem; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--panel); }
.legacy-gallery__item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.news-source { margin-top: 2rem; font-family: var(--font-ui); color: var(--muted); }
.article-aside { position: sticky; top: 5rem; padding-left: 1.2rem; border-left: 1px solid var(--line); }
.article-aside h2 { margin-top: 0; font-size: 1rem; }
.article-aside a { display: block; padding: 0.4rem 0; color: var(--muted); font-size: 0.82rem; }
.article-aside a:hover { color: #fff; }

/* ===================== Адаптив ===================== */

/* Планшет: уже каталог */
@media (max-width: 1080px) {
  :root { --catalog-w: 222px; }
}

/* Каталог → drawer (узкие экраны / мобильный) */
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .nav-burger { display: inline-flex; }

  .catalog {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(86vw, 330px);
    padding: 1.2rem 1.2rem 2rem;
    background: #080d18;
    border-right: 1px solid var(--line);
    box-shadow: 14px 0 50px rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    transform: translateX(-102%);
    transition: transform 0.25s ease;
  }
  .catalog__head { padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 0.6rem; }
  .nav-close { display: inline-flex; }

  .nav-scrim {
    display: block;
    position: fixed; inset: 0; z-index: 55;
    background: rgba(2, 5, 9, 0.78);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .nav-toggle:checked ~ .shell .catalog { transform: none; }
  .nav-toggle:checked ~ .shell .nav-scrim { opacity: 1; pointer-events: auto; }

  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-aside { position: static; padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 1.2rem; }
}

@media (max-width: 720px) {
  .card-grid { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .news-item__date { display: flex; align-items: baseline; gap: 0.5rem; }
  .news-item__date b { font-size: 1rem; margin: 0; }
}

@media (max-width: 560px) {
  .header-tools .header-link--about { display: none; }
  .site-search {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
  }
  .site-search:focus-within {
    width: min(54vw, 220px);
    padding: 0 0.7rem;
  }
  .site-search input::placeholder { color: transparent; }
  .site-search:focus-within input::placeholder { color: var(--muted); }
  .site-search button { display: none; }
  .site-header__in, .shell, .site-footer__in { width: calc(100% - 2rem); }
  .brand__name small { display: none; }
}

/* ===================== Лайтбокс (галереи/картинки статей) ===================== */
.article-content img { cursor: zoom-in; }
.missing-legacy-image { cursor: default; }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(2, 4, 9, 0.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox__stage {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  max-width: min(1100px, 92vw);
}
.lightbox__img {
  max-width: 100%; max-height: 80vh; width: auto; height: auto; object-fit: contain;
  border: 1px solid var(--line); border-radius: 8px; background: #05080f;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.65);
}
.lightbox__caption { margin: 0; color: var(--muted); font-size: 0.9rem; text-align: center; }
.lightbox__caption:empty { display: none; }

.lightbox__close, .lightbox__nav, .lightbox__play {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(11, 22, 38, 0.82); color: var(--text); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lightbox__close:hover, .lightbox__nav:hover, .lightbox__play:hover {
  background: var(--cyan); color: var(--ink-on-cyan); border-color: var(--cyan);
}
.lightbox__close { top: 1.2rem; right: 1.2rem; width: 44px; height: 44px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lightbox__prev { left: clamp(0.5rem, 2vw, 1.6rem); }
.lightbox__next { right: clamp(0.5rem, 2vw, 1.6rem); }
.lightbox__toolbar {
  position: absolute; bottom: 1.3rem; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.9rem;
}
.lightbox__play { position: static; width: 42px; height: 42px; }
.lightbox__play .ico-pause { display: none; }
.lightbox__play.is-playing .ico-play { display: none; }
.lightbox__play.is-playing .ico-pause { display: inline; }
.lightbox__counter { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .lightbox__nav { width: 42px; height: 42px; top: auto; bottom: 1.3rem; transform: none; }
  .lightbox__prev { left: 1rem; }
  .lightbox__next { right: 1rem; }
  .lightbox__img { max-height: 66vh; }
}
