/**
 * Anastylose - Web Institutional Portfolio Styles
 * Strict 100vw x 100vh fixed viewport, zero page scroll
 * Layout: Full-height 100vh 9:16 Canvas dominant on left,
 * Header emerging from canvas right border, right info panel beneath header.
 */

:root {
  --bg-color: #0c0e12;
  --panel-bg: #11141a;
  --card-bg: rgba(22, 26, 34, 0.7);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-light: rgba(255, 255, 255, 0.06);
  --text-main: #e6e8ee;
  --text-muted: #888e9b;
  --text-dim: #5c6270;
  --accent-orange: #e65100;
  --accent-blue: #42a5f5;
  --accent-amber: #ffa726;
  --accent-red: #ef5350;
  --header-height: 58px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  /* Жесткий запрет скролла страницы вниз */
  user-select: text;
  -webkit-font-smoothing: antialiased;
}

/* Главный сплит-контейнер (100vw x 100vh) */
.web-app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-color);
}

/* =========================================================================
   1. ЛЕВАЯ ДОМИНАНТА: 9:16 Холст на ВСЮ высоту окна (100vh)
   ========================================================================= */
.canvas-dominant-column {
  position: relative;
  height: 100vh;
  /* Пропорция 9:16 на всю высоту экрана */
  width: calc(100vh * (9 / 16));
  flex-shrink: 0;
  background-color: #000;
  border-right: 1px solid var(--border-color);
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.6);
  z-index: 20;
  /* Выше подложки хэдера */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Сам Canvas */
#web-stage-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: ns-resize;
  /* Подсказка: скролл/драг меняет вмешательство */
}

/* Стеклянный интерфейс поверх фото полотна */
.canvas-dominant-column .photo-glass-bar {
  z-index: 25;
}


/* =========================================================================
   2. ПРАВАЯ ОБЛАСТЬ: Хэдер выходит из-под левого полотна + Инфо-слой
   ========================================================================= */
.right-workspace-column {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-color);
  min-width: 0;
  /* Предотвращение flex overflow */
}

/* Минималистичный монохромный хэдер */
.workspace-header {
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #0d0f12;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 15;
}

/* Мобильные элементы, скрытые на десктопе по умолчанию */
.mobile-menu-btn,
.mobile-reader-bar,
.mobile-drawer {
  display: none;
}

.header-audio-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Кнопка управления звуком (стилизована в точности как переключатель языков) */
.audio-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  color: #656d7b;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.audio-toggle-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Состояние ВКЛЮЧЕНО: светлая рамка как у активного языка */
.audio-toggle-btn.sound-on {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.08);
}

/* Переключение пиктограмм (перечеркнутый динамик по умолчанию, играющий при включении) */
.audio-toggle-btn .audio-icon-muted {
  display: block;
}

.audio-toggle-btn .audio-icon-playing {
  display: none;
}

.audio-toggle-btn.sound-on .audio-icon-muted {
  display: none;
}

.audio-toggle-btn.sound-on .audio-icon-playing {
  display: block;
}

/* Mobile drawer audio button */
.drawer-audio-box {
  margin-bottom: 12px;
}

.drawer-audio-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  padding: 6px 12px;
  color: #656d7b;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-audio-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.drawer-audio-btn.sound-on {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.drawer-audio-btn .audio-icon-muted {
  display: block;
}

.drawer-audio-btn .audio-icon-playing {
  display: none;
}

.drawer-audio-btn.sound-on .audio-icon-muted {
  display: none;
}

.drawer-audio-btn.sound-on .audio-icon-playing {
  display: block;
}

/* Навигация по разделам */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: #727a88;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
  transition: color 0.15s ease;
  position: relative;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-tab-btn:hover {
  color: #ffffff;
}

.nav-tab-btn.active {
  color: #ffffff;
}

.nav-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: #ffffff;
}

/* Правые управляющие кнопки (Языки + Звук) */
.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Селектор языка FR / EN / RU */
.lang-selector {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  background: transparent;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #656d7b;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

/* =========================================================================
   3. ИНФО-ПАНЕЛЬ (Внутренний скролл / No-scroll режим)
   ========================================================================= */
.info-panel-body {
  flex: 1;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(14px, 2.2vh, 26px) clamp(20px, 2.5vw, 40px);
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

/* Строгий No-scroll лок для вкладки «О проекте» */
.info-panel-body.no-scroll-view {
  overflow: hidden !important;
}

/* Тонкий музейный скроллбар для правой панели */
.info-panel-body::-webkit-scrollbar {
  width: 5px;
}

.info-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.info-panel-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.info-panel-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

.info-content-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

/* Шапка активного раздела */
.view-header-block {
  margin-bottom: clamp(14px, 2vh, 24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: clamp(10px, 1.4vh, 16px);
  flex-shrink: 0;
}

.view-main-title {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 6px;
  line-height: 1.18;
}

.view-subtitle {
  font-size: clamp(12px, 0.95vw, 14px);
  color: #848d9c;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* =========================================================================
   МУЗЕЙНАЯ КУРАТОРСКАЯ ВЕРСТКА: РАЗДЕЛ «О ПРОЕКТЕ» (ZERO-SCROLL)
   Чистая швейцарская типографика, без градиентов, карточек и визуального мусора
   ========================================================================= */
.curatorial-text-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
}

/* Квинтэссенция: на полную ширину двух колонок, крупнее модусов */
.curatorial-quintessence {
  width: 100%;
  margin-bottom: clamp(14px, 2vh, 22px);
  padding-bottom: clamp(12px, 1.8vh, 18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.quintessence-title {
  font-size: clamp(11.5px, 0.82vw, 13px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #7d8696;
  text-transform: uppercase;
  margin: 0;
}

.quintessence-lead {
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.56;
  color: #e2e6ee;
  margin: 0;
  text-align: left;
  font-weight: 400;
}

.quintessence-lead em {
  color: #a4cbf5;
  font-style: italic;
}

/* Двухколоночный блок ниже квинтэссенции */
.curatorial-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3.5vw, 48px);
  width: 100%;
  align-items: start;
}

.curatorial-transition {
  font-size: clamp(10.5px, 0.74vw, 11.5px);
  color: #656d7a;
  font-style: italic;
  margin-bottom: 2px;
}

.curatorial-col {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vh, 20px);
}

.curatorial-col.col-divided {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: clamp(24px, 3.5vw, 48px);
}

.curatorial-unified-block {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.2vh, 24px);
}

.curatorial-entry {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.curatorial-subheading {
  font-size: clamp(12px, 0.85vw, 13.5px);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

.curatorial-body {
  font-size: clamp(10.5px, 0.75vw, 11.8px);
  line-height: 1.5;
  color: #9ca3b0;
  margin: 0;
  text-align: left;
}

.curatorial-body em {
  color: #cfd4dc;
  font-style: italic;
}

.view-section h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #d1d5db;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-section h3::before {
  content: '■';
  color: var(--accent-orange);
  font-size: 8px;
}

.view-section p {
  font-size: 14px;
  line-height: 1.8;
  color: #b0b6c2;
  margin-bottom: 14px;
  text-align: justify;
}

.view-section em {
  color: #e2e5eb;
  font-style: italic;
}

.view-section strong {
  color: #fff;
  font-weight: 600;
}

/* Выделенные музейные цитаты */
.view-quote {
  border-left: 2px solid var(--accent-orange);
  background: rgba(230, 81, 0, 0.06);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.7;
  color: #e5e7eb;
}

/* =========================================================================
   МУЗЕЙНАЯ ВЕРСТКА: «ЭКСПЛИКАЦИЯ» (В СТИЛЕ «О ПРОЕКТЕ» И «ДИАЛОГ РЕСТАВРАЦИЙ»)
   Zero-Scroll, чистая швейцарская типографика, двухколоночный грид
   ========================================================================= */

.explication-top-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(16px, 2.5vw, 32px);
  align-items: start;
}

.explication-quintessence-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explication-map-square {
  width: clamp(90px, 12.5vh, 120px);
  height: clamp(90px, 12.5vh, 120px);
  aspect-ratio: 1 / 1;
  background: #050608;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
  align-self: start;
}

.explication-map-square iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  filter: contrast(1.04) saturate(1.1);
}

.curatorial-entry-list {
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.1vh, 11px);
  margin-top: 2px;
}

/* Совместимость со старыми таблицами */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 22px 0;
  font-size: 12.5px;
  font-family: monospace;
}

.tech-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-light);
}

.tech-table td:first-child {
  color: var(--text-muted);
  width: 38%;
}

.tech-table td:last-child {
  color: #fff;
}

.tech-list {
  list-style: none;
  margin: 14px 0;
}

.tech-list li {
  font-size: 13px;
  line-height: 1.75;
  color: #b0b6c2;
  margin-bottom: 10px;
  padding-left: 18px;
  position: relative;
}

.tech-list li::before {
  content: '›';
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--accent-blue);
  font-weight: 700;
}

/* =========================================================================
   МУЗЕЙНАЯ ВЕРСТКА: «ДИАЛОГ РЕСТАВРАЦИЙ» (ZERO-SCROLL, ФОТОЛЕНТА ВНИЗУ)
   Текстовые колонки сверху, все 6 фото в одну линию снизу.
   Ширина текстовых колонок привязана к группам фото.
   ========================================================================= */

/* Корневой контейнер: растягивается на всю доступную высоту */
.dialogue-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  min-height: 0;
  justify-content: space-between;
  gap: clamp(10px, 1.5vh, 16px);
}

/* Текстовый ряд: строго симметричные две колонки 50% / 50% */
.dialogue-text-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 40px);
  width: 100%;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

/* Колонки: общее */
.dialogue-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.dialogue-col-archival {
  /* 1fr */
}

.dialogue-col-modern {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: clamp(24px, 3vw, 40px);
}

/* Равноправные подзаголовки: верстаются абсолютно одинаково с фиксированной высотой для выравнивания */
.dialogue-subheading {
  font-size: clamp(10px, 0.72vw, 11.5px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #8a94a4;
  text-transform: uppercase;
  margin: 0 0 clamp(6px, 0.8vh, 10px) 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.35;
  flex-shrink: 0;
  min-height: 2.7em;
}

/* Текстовые блоки: плотная типографика для zero-scroll */
.dialogue-narrative {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vh, 7px);
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.dialogue-narrative p {
  font-size: clamp(10px, 0.7vw, 11.5px);
  line-height: 1.42;
  color: #9da7b6;
  margin: 0;
}

.dialogue-dilemma {
  color: #e2e8f0 !important;
  font-weight: 500;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 5px;
  margin-top: 2px;
}

/* ==================================
   СЕКЦИОННЫЕ ФОТО ВНУТРИ КОЛОНОК (ДЕФОЛТ / ДЕСКТОП)
   4 фото в секции 1, 2 фото в секции 2
   ================================== */
.dialogue-section-photos {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: clamp(8px, 1.2vh, 14px);
  align-items: center;
  flex-wrap: wrap;
}

.dialogue-photo-card {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.dialogue-photo-card .dialogue-img-caption {
  display: none;
  /* на десктопе подпись доступна в лайтбоксе для сохранения zero-scroll */
}

/* Контейнеры фото: строго фиксированная высота для рамок на десктопе */
.dialogue-img-box {
  height: clamp(75px, 10.5vh, 98px);
  box-sizing: border-box;
  background: #050608;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px;
  cursor: zoom-in;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.2s ease;
  flex-shrink: 0;
}

.dialogue-img-box:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.dialogue-img-box img {
  height: 100%;
  width: auto;
  max-height: 100%;
  object-fit: contain;
  display: block;
  filter: contrast(1.02);
  transition: transform 0.2s ease;
}

.dialogue-img-box:hover img {
  transform: scale(1.02);
}

/* Лайтбокс для детального осмотра высокого разрешения */
.archive-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.archive-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.archive-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.archive-lightbox-content {
  position: relative;
  z-index: 2001;
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.archive-lightbox-close {
  position: absolute;
  top: -38px;
  right: 16px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.archive-lightbox-close:hover {
  opacity: 1;
}

.archive-lightbox-img {
  max-width: 100%;
  max-height: calc(82vh - 40px);
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  background: #0a0c10;
}

.archive-lightbox-caption {
  margin-top: 14px;
  font-size: 13px;
  color: #d1d5db;
  text-align: center;
  letter-spacing: 0.02em;
  max-width: 800px;
}

/* =========================================================================
   ЧИТАТЕЛЬСКИЙ ОВЕРЛЕЙ / LONGREAD / ЭТЮД («КОНТЕКСТ»)
   ========================================================================= */

/* Активация читательского режима для панели */
.info-panel-body.context-reader-active {
  background-color: #0c0e12;
  overflow-y: auto !important;
  padding: clamp(24px, 4vh, 48px) clamp(20px, 3.5vw, 48px);
}

.info-panel-body.context-reader-active .info-content-container {
  max-width: 100%;
  display: block;
}

/* Центральная колонка эссе (max-width: 700px, удобочитаемая, книжная типографика) */
.essay-article-layout {
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 96px;
  color: #d1d5db;
}

/* Вступительная плашка исследования */
.essay-badge-header {
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding-bottom: 24px;
}

.essay-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.essay-category-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
}

.essay-headline {
  font-family: "Charter", "Iowan Old Style", "Georgia", "Cambria", "Times New Roman", serif;
  font-size: clamp(23px, 2.3vw, 32px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0 0 16px 0;
  text-transform: uppercase;
}

.essay-author-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.essay-author-name {
  color: #cbd5e1;
  font-weight: 600;
}

.essay-meta-divider {
  color: #475569;
}

/* Тело текста: книжная благородная антиква */
.essay-text-body {
  font-family: "Charter", "Iowan Old Style", "Georgia", "Cambria", "Times New Roman", serif;
  font-size: clamp(16.5px, 1.15vw, 17.5px);
  line-height: 1.85;
  color: #d1d5db;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.essay-text-body p {
  margin-bottom: 1.7em;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.essay-text-body p em {
  font-style: italic;
  color: #e2e8f0;
}

.essay-lead-paragraph {
  font-size: clamp(17.5px, 1.25vw, 19px);
  line-height: 1.85;
  color: #f1f5f9;
  font-weight: 400;
  padding-bottom: 4px;
}

.essay-divider-ornament {
  text-align: center;
  margin: 36px 0;
  color: rgba(255, 255, 255, 0.25);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.essay-divider-ornament::before,
.essay-divider-ornament::after {
  content: '';
  width: 48px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* Вшитые ссылки и карточка фильма */
.essay-inline-film-link {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(96, 165, 250, 0.4);
  transition: all 0.15s ease;
  font-weight: 500;
}

.essay-inline-film-link:hover {
  color: #93c5fd;
  text-decoration-color: #93c5fd;
}

.essay-media-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin: 32px 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid #60a5fa;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.essay-media-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  border-left-color: #93c5fd;
}

.media-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.media-card-content {
  flex: 1;
  min-width: 0;
}

.media-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.media-card-desc {
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #94a3b8 !important;
  margin-bottom: 0 !important;
  text-align: left !important;
}

.media-card-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.media-card-btn:hover {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

/* Сноски в тексте */
.fn-ref {
  font-size: 11px;
  font-weight: 600;
  line-height: 0;
  vertical-align: super;
  padding: 0 2px;
}

.fn-ref a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.15s ease;
}

.fn-ref a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Блок академических примечаний */
.essay-scholarly-notes {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.notes-heading {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 18px;
}

.notes-list {
  padding-left: 18px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notes-list li {
  font-size: 13px;
  line-height: 1.7;
  color: #94a3b8;
  scroll-margin-top: 80px;
}

.notes-list li:target {
  background: rgba(96, 165, 250, 0.08);
  padding: 6px 10px;
  border-radius: 4px;
}

.note-author {
  color: #f1f5f9;
  font-weight: 600;
}

.note-work {
  color: #cbd5e1;
  font-style: italic;
}

.note-backlink {
  color: #60a5fa;
  text-decoration: none;
  margin-left: 6px;
  font-weight: 600;
}

.note-backlink:hover {
  text-decoration: underline;
}

/* Авторский колофон с копирайтом */
.essay-colophon {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  text-align: center;
}

.colophon-title {
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.06em;
  font-style: italic;
  margin-bottom: 4px !important;
}

.colophon-author {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0 !important;
}

/* =========================================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (Ширина <= 900px)
   ========================================================================= */
@media (max-width: 900px) {

  html,
  body {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .web-app-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
    flex-direction: column;
  }

  /* 1. Мобильный холст на весь экран: 100dvh, чистый визуал без скролла */
  .canvas-dominant-column {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100% !important;
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
    border-right: none;
    box-shadow: none;
    z-index: 10;
    touch-action: none;
    /* Блокировка системных свайпов браузера */
  }

  #web-stage-canvas {
    width: 100%;
    height: 100%;
    touch-action: none;
  }

  /* Нижний тактильный контроллер: гарантированно привязан к видимой нижней границе экрана */
  .canvas-dominant-column .photo-glass-bar,
  .photo-glass-bar {
    position: fixed !important;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    left: 14px !important;
    right: 14px !important;
    width: auto !important;
    max-width: 440px !important;
    margin: 0 auto !important;
    z-index: 40 !important;
    padding: 12px 16px !important;
  }

  .photo-glass-bar .track-wrapper {
    height: 38px !important; /* Удобный большой touch-target для пальца */
  }

  .photo-glass-bar .track-thumb {
    width: 20px !important;
    height: 20px !important;
  }

  body.reader-active .photo-glass-bar {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* 2. Правая колонка на мобильном: контекстный слой */
  .right-workspace-column {
    position: static;
    width: 100%;
    height: 100%;
    overflow: visible;
  }

  /* 3. Мобильный хэдер: лаконичный, фиксирован поверх холста */
  .workspace-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    padding: 0 12px;
    background: rgba(12, 14, 18, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  /* Гамбургер-кнопка слева */
  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4.5px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    cursor: pointer;
    padding: 7px;
    transition: all 0.15s ease;
    z-index: 101;
    flex-shrink: 0;
  }

  .mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
  }

  .mobile-menu-btn .menu-bar {
    width: 20px;
    height: 1.5px;
    background-color: #e6e8ee;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  /* Скрытие десктопной текстовой навигации */
  .header-nav {
    display: none !important;
  }

  /* Правая часть хэдера: ЯЗЫКИ В ХЕДЕРЕ + МЕСТО ПОД АУДИО */
  .header-controls {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  /* Переключатель языков вынесен в мобильный хэдер */
  .header-controls .lang-selector {
    display: flex !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
  }

  .header-controls .lang-btn {
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
  }

  /* Кнопка звука в мобильном хэдере: строгое выравнивание с переключателем языков */
  .header-audio-slot {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    flex-shrink: 0 !important;
  }

  .header-controls .audio-toggle-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 26px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 3px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #888e9b !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .header-controls .audio-toggle-btn:hover {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
  }

  .header-controls .audio-toggle-btn.sound-on {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    background: rgba(255, 255, 255, 0.15) !important;
  }

  /* 4. Мобильное выпадающее меню (Drawer) */
  .mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
  }

  .mobile-drawer.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .mobile-drawer-panel {
    position: relative;
    z-index: 301;
    width: min(84vw, 340px);
    height: 100%;
    background: #0d1015;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.85);
  }

  .mobile-drawer.active .mobile-drawer-panel {
    transform: translateX(0);
  }

  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .drawer-brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #ffffff;
    text-transform: uppercase;
  }

  .drawer-close-btn {
    background: transparent;
    border: none;
    color: #888e9b;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.15s ease;
  }

  .drawer-close-btn:hover {
    color: #ffffff;
  }

  .drawer-nav {
    flex: 1;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
  }

  .drawer-tab-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 13px 16px;
    color: #c0c4cc;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
  }

  .drawer-tab-btn:active,
  .drawer-tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
  }

  .drawer-icon {
    font-size: 11px;
    font-family: monospace;
    color: #656d7b;
    flex-shrink: 0;
  }

  .drawer-tab-btn.active .drawer-icon {
    color: #42a5f5;
  }

  .drawer-footer {
    padding: 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a0c0f;
  }

  .drawer-lang-selector {
    display: flex;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    overflow: hidden;
  }

  .drawer-lang-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #727a88;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 9px 0;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .drawer-lang-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
  }

  /* 5. Полноэкранный режим чтения статей (Reader Mode) */
  .info-panel-body {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    height: 100vh;
    background: #0c0e12;
    z-index: 200;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    display: block;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  }

  .info-panel-body.mobile-reader-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Снятие no-scroll блокировок в мобильном режиме чтения: скролл должен быть естественным */
  .info-panel-body.no-scroll-view {
    overflow-y: auto !important;
  }

  /* Мобильная верхняя плашка статьи */
  .mobile-reader-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    padding: 0 14px;
    background: rgba(12, 14, 18, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 210;
  }

  .mobile-reader-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e6e8ee;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
  }

  .mobile-reader-close:active {
    background: rgba(255, 255, 255, 0.15);
  }

  .mobile-reader-tab-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #888e9b;
    text-transform: uppercase;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-reader-menu-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e6e8ee;
    width: 36px;
    height: 36px;
    border-radius: 3px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  /* 6. Вертикальная «колбаса» для текста статей: комфортная типографика для свободного чтения */
  .info-content-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 18px 90px 18px;
  }

  .view-header-block {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .view-main-title {
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: 0.03em;
    font-weight: 700;
    color: #ffffff;
  }

  .view-subtitle {
    font-size: 14px;
    line-height: 1.6;
    color: #949eb0;
    margin-top: 10px;
  }

  /* Перевод всех двухколоночных сеток в вертикальную ленту */
  .curatorial-columns-grid,
  .dialogue-text-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
  }

  .curatorial-col.col-divided,
  .dialogue-col-modern {
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-left: 0 !important;
    padding-top: 28px !important;
  }

  .curatorial-unified-block {
    gap: 24px;
  }

  .curatorial-quintessence {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .quintessence-title {
    font-size: 16px;
    line-height: 1.45;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
  }

  .quintessence-lead {
    font-size: 15px;
    line-height: 1.7;
    color: #e2e6ee;
    margin-bottom: 16px;
  }

  .curatorial-subheading,
  .dialogue-subheading {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #ffffff;
    margin-top: 20px;
    margin-bottom: 12px;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
    min-height: auto;
  }

  .curatorial-body,
  .dialogue-narrative p {
    font-size: 15px;
    line-height: 1.7;
    color: #cbd1dc;
    margin-bottom: 14px;
    letter-spacing: 0.01em;
  }

  .dialogue-dilemma {
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-top: 12px !important;
    margin-top: 10px !important;
    margin-bottom: 18px !important;
  }

  /* 7. Фотографии: 4 в секции 1 (ч/б), 2 в секции 2 (цвет), ширина 100%, естественная высота */
  .dialogue-section-photos {
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
    margin-top: 16px !important;
    margin-bottom: 24px !important;
    width: 100% !important;
  }

  .dialogue-photo-card {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
  }

  .dialogue-photo-card .dialogue-img-box {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    max-height: none !important;
    display: block !important;
    background: #080a0d !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    padding: 0 !important;
    cursor: zoom-in !important;
  }

  .dialogue-photo-card .dialogue-img-box img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
  }

  /* Подписи к фото на мобильном: читаемые, без искусственного ограничения строк */
  .dialogue-photo-card .dialogue-img-caption {
    display: block !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    color: #9aa3b2 !important;
    margin-top: 8px !important;
    margin-bottom: 6px !important;
    text-align: left !important;
    font-style: normal !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  /* Карта в Экспликации */
  .explication-top-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
  }

  .explication-map-square {
    width: 100% !important;
    height: 250px !important;
    max-width: 100% !important;
  }

  .explication-map-square iframe {
    width: 100% !important;
    height: 100% !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  /* Копирайт в мобильном меню (Drawer footer) */
  .drawer-copyright {
    margin-top: 14px;
    text-align: center;
    font-size: 11px;
    color: #656d7b;
    letter-spacing: 0.04em;
  }

  /* Адаптация эссе для мобильного экрана */
  .essay-article-layout {
    padding: 24px 16px 88px 16px;
  }

  .essay-headline {
    font-size: 21px !important;
    line-height: 1.3 !important;
  }

  .essay-text-body {
    font-size: 15.5px !important;
    line-height: 1.75 !important;
  }

  .essay-text-body p {
    text-align: left !important;
    hyphens: none !important;
    margin-bottom: 1.5em !important;
  }

  .essay-lead-paragraph {
    font-size: 16.5px !important;
    line-height: 1.75 !important;
  }

  .essay-media-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .media-card-btn {
    width: 100%;
    justify-content: center;
  }
}