/* ============================================================
   ЭПОС О КОЛЯСКЕ — слайдшоу-стили
   ============================================================ */

:root {
  --bg-1: #1a1620;        /* основной фон, тёплый тёмный */
  --bg-2: #221c2a;        /* второй слой */
  --bg-3: #2c2535;        /* подложка для картинок */
  --night: #1f1922;
  --ink: #2a2230;
  --bone: #f5ecda;        /* основной светлый */
  --parchment: #efe2c4;
  --gold: #d4a85a;        /* теплее и ярче */
  --gold-bright: #f4d889;
  --blood: #8a1d23;
  --blood-bright: #c5343a;
  --cocoa: #3a1c0a;
  --cocoa-deep: #2a1206;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --display: "Cinzel", "Cormorant Garamond", "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-1);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
main,
section,
.hero-frame,
.scene-caption,
.scroll-paper {
  min-width: 0;
}

/* ---------- Глобальные эффекты (мягко) ---------- */

.grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9000;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.vignette {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 8000;
  background: radial-gradient(ellipse at center,
    transparent 55%,
    rgba(0,0,0,0.18) 85%,
    rgba(0,0,0,0.42) 100%);
}

.progress-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 10000;
  background: rgba(255,255,255,0.06);
}
.progress-bar span {
  display: block; height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blood-bright), var(--gold-bright));
  box-shadow: 0 0 12px var(--gold-bright);
  transition: width 80ms linear;
}

/* ---------- Sound toggle (только OFF) ---------- */

.sound-toggle {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9500;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 14px;
  background: linear-gradient(135deg, rgba(138,29,35,0.65), rgba(60,30,10,0.85));
  border: 1px solid var(--gold-bright);
  border-radius: 999px;
  color: var(--bone);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 24px rgba(244,216,137,0.25);
  opacity: 1;
  transform: translateY(0);
  transition: opacity .5s ease, transform .5s ease, background .3s, box-shadow .3s;
}
.sound-toggle.is-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
.sound-toggle:hover {
  background: linear-gradient(135deg, rgba(197,52,58,0.8), rgba(80,40,15,0.9));
  transform: translateY(-2px);
}
.sound-toggle:active { transform: scale(0.97); }
.sound-toggle.is-muted {
  background: rgba(34,28,42,0.7);
  border-color: rgba(212,168,90,0.3);
  color: rgba(245,236,218,0.5);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}
.sound-toggle.is-muted .sound-icon span {
  background: rgba(212,168,90,0.4);
  animation: none !important;
  height: 25% !important;
}

.sound-icon {
  display: inline-flex; align-items: flex-end; gap: 2px;
  height: 14px; width: 18px;
}
.sound-icon span {
  display: inline-block; width: 2px; background: var(--gold-bright);
  height: 30%;
  border-radius: 1px;
  animation: bars 1.1s ease-in-out infinite;
}
.sound-icon span:nth-child(2) { animation-delay: .15s; }
.sound-icon span:nth-child(3) { animation-delay: .3s; }
.sound-icon span:nth-child(4) { animation-delay: .45s; }
.sound-icon span:nth-child(5) { animation-delay: .6s; }
@keyframes bars {
  0%,100% { height: 25%; }
  50%     { height: 95%; }
}

/* ---------- Topbar ---------- */

.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 7000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 36px;
  background: linear-gradient(to bottom, rgba(26,22,32,0.92), transparent);
  pointer-events: none;
}
.topbar a { pointer-events: auto; }

.sigil {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display);
  letter-spacing: 0.3em;
}
.sigil-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 14px;
}
.sigil-text { font-size: 11px; color: var(--bone); opacity: 0.8; }

.topbar nav {
  display: flex; gap: 24px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.topbar nav a {
  position: relative;
  color: var(--bone);
  opacity: 0.85;
  transition: opacity .2s, color .2s;
}
.topbar nav a:hover { opacity: 1; color: var(--gold-bright); }
.topbar nav a::after {
  content: "";
  position: absolute; left: 50%; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gold-bright);
  transition: width .25s, left .25s;
}
.topbar nav a:hover::after { width: 100%; left: 0; }

/* ---------- Общие элементы ---------- */

.latin-kicker {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 64px;
  padding: 0 24px;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 0.04em;
  margin-top: 14px;
  text-transform: uppercase;
}
.section-head .latin-kicker { display: inline-block; }

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  padding: 100px 64px 100px;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(212,168,90,0.10), transparent 60%),
    radial-gradient(ellipse at 30% 80%, rgba(138,29,35,0.18), transparent 60%),
    var(--bg-1);
}
.hero-art {
  display: grid; place-items: center;
  position: relative;
  width: 100%;
  /* Жёсткий потолок: картинка не больше высоты экрана за вычетом верхней/нижней зоны */
  max-height: calc(100vh - 200px);
}
.hero-art::before {
  content: "";
  position: absolute; inset: -20px;
  background: radial-gradient(ellipse at center, rgba(244,216,137,0.18), transparent 65%);
  filter: blur(20px);
  z-index: 0;
}
.hero-art img {
  position: relative;
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 200px);
  width: auto; height: auto;
  object-fit: contain;
  border: 1px solid rgba(212,168,90,0.35);
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.5),
    0 0 60px rgba(244,216,137,0.10);
  animation: heroBreath 10s ease-in-out infinite alternate;
  z-index: 1;
}
@keyframes heroBreath {
  from { transform: scale(1); }
  to   { transform: scale(1.015); }
}

.hero-frame {
  position: relative;
  text-align: left;
  max-width: 640px;
}
.hero-frame .latin-kicker { margin-bottom: 24px; display: block; }

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.95;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.hero h1 .line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: heroLine 1.2s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero h1 .line-1 {
  font-size: clamp(38px, 5vw, 78px);
  letter-spacing: 0.2em;
  color: var(--gold-bright);
  animation-delay: 0.3s;
}
.hero h1 .line-2 {
  font-size: clamp(56px, 7.5vw, 120px);
  letter-spacing: 0.04em;
  margin: 6px 0;
  color: var(--bone);
  animation-delay: 0.6s;
  text-shadow: 0 0 60px rgba(244,216,137,0.3), 0 4px 24px rgba(0,0,0,0.6);
}
.hero h1 .line-3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(18px, 2.2vw, 28px);
  margin-top: 14px;
  color: rgba(245,236,218,0.92);
  animation-delay: 0.9s;
}
@keyframes heroLine {
  to { opacity: 1; transform: none; }
}

.hero-sub {
  margin-top: 28px;
  font-style: italic;
  font-size: clamp(15px, 1.4vw, 18px);
  color: rgba(245,236,218,0.78);
  max-width: 540px;
  opacity: 0;
  animation: heroLine 1.2s ease 1.2s forwards;
}

.hero-actions {
  margin-top: 40px;
  display: inline-flex; gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroLine 1.2s ease 1.5s forwards;
}

.btn {
  position: relative;
  display: inline-block;
  padding: 16px 28px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--bone);
  transition: color .25s, background .25s, border-color .25s;
  overflow: hidden;
  cursor: pointer;
}
.btn span { position: relative; z-index: 1; }
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--blood-bright), var(--gold));
  transform: translateY(101%);
  transition: transform .35s ease;
}
.btn:hover::before { transform: none; }
.btn:hover {
  color: #1a1620;
  border-color: var(--gold-bright);
}
.btn-primary {
  background: linear-gradient(135deg, var(--blood), var(--cocoa));
  color: var(--gold-bright);
}
.btn-primary:hover { color: #1a1620; }
.btn-ghost { background: transparent; }

.hero-scrollhint {
  position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(245,236,218,0.65);
}
.hero-scrollhint span {
  display: inline-block; width: 1px; height: 50px;
  background: linear-gradient(to bottom, transparent, var(--gold-bright));
  animation: drip 2.4s ease-in-out infinite;
}
@keyframes drip {
  0%   { transform: scaleY(0.2); transform-origin: top; opacity: 0.2; }
  50%  { transform: scaleY(1);   transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1);   transform-origin: bottom; }
  100% { transform: scaleY(0.2); transform-origin: bottom; opacity: 0.2; }
}

/* ============================================================
   SCENE — слайды эпоса
   ============================================================ */

.scene {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  gap: 56px;
  padding: 100px 64px;
  background: var(--bg-1);
}
/* Альтернативная фон-полоса для нечётных сцен */
.scene:nth-of-type(even) {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(212,168,90,0.06), transparent 55%),
    var(--bg-2);
}
.scene:nth-of-type(odd) {
  background:
    radial-gradient(ellipse at 20% 80%, rgba(138,29,35,0.08), transparent 55%),
    var(--bg-1);
}

/* Портретный layout: картинка + подпись рядом */
.scene-portrait {
  grid-template-columns: minmax(300px, 1fr) minmax(420px, 740px);
}
.scene-portrait.scene-flip {
  grid-template-columns: minmax(420px, 740px) minmax(300px, 1fr);
}
.scene-portrait.scene-flip .scene-image { order: 2; }
.scene-portrait.scene-flip .scene-caption { order: 1; }

/* Широкий layout: картинка сверху (в полную ширину), подпись снизу */
.scene-wide {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
}

/* ---------- Картинка ---------- */

.scene-image {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  max-height: 82vh;
}
.scene-image::before {
  content: "";
  position: absolute; inset: -10px;
  background: radial-gradient(ellipse at center, rgba(212,168,90,0.10), transparent 70%);
  filter: blur(24px);
  z-index: 0;
  pointer-events: none;
}
.scene-image img {
  position: relative;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(212,168,90,0.4);
  box-shadow:
    0 30px 70px -20px rgba(0,0,0,0.7),
    0 0 60px rgba(244,216,137,0.1);
  z-index: 1;
}
.scene-image figcaption {
  position: relative;
  margin-top: 16px;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  z-index: 1;
  text-align: center;
}
.scene-image figcaption span {
  color: var(--gold-bright);
  font-weight: 600;
}

.scene-image-wide {
  max-height: 80vh;
}
.scene-image-wide img {
  max-width: 1100px;
  max-height: 75vh;
}

/* ---------- Подпись ---------- */

.scene-caption {
  position: relative;
  max-width: 680px;
}
.scene-caption-center {
  text-align: center;
  margin: 0 auto;
  max-width: 880px;
}

.scene-num {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.5em;
  color: var(--gold-bright);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.scene-caption h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 3.8vw, 50px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--bone);
  text-shadow: 0 2px 18px rgba(0,0,0,0.4);
}
.scene-caption p {
  font-size: clamp(19px, 1.45vw, 22px);
  line-height: 1.65;
  color: rgba(245,236,218,0.92);
  margin-bottom: 16px;
}
.scene-quote {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(212,168,90,0.4);
  font-style: italic;
  font-size: 21px;
  color: var(--gold-bright);
}
.scene-quote-big {
  font-size: clamp(22px, 2.2vw, 28px);
}

/* ---------- Особые тональности сцен ---------- */

.scene-light {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(244,216,137,0.18), transparent 60%),
    var(--bg-2) !important;
}
.scene-cocoa {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(138,69,18,0.18), transparent 60%),
    linear-gradient(180deg, #221710 0%, #1a1108 100%) !important;
}
.scene-hell {
  background:
    radial-gradient(ellipse at 50% 60%, rgba(197,52,58,0.22) 0%, transparent 55%),
    linear-gradient(180deg, #1d1015 0%, #15080a 100%) !important;
}

/* ============================================================
   DRAMATIS PERSONAE — внутри Сцены I
   ============================================================ */

.dramatis {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(212,168,90,0.35);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dramatis-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
  padding: 8px 0 8px 14px;
  border-left: 1px solid rgba(212,168,90,0.2);
}
.dramatis-portrait {
  width: 64px; height: 64px;
  display: block;
  border: 1px solid var(--gold);
  border-radius: 50%;
  overflow: hidden;
  background: var(--ink);
  position: relative;
}
.dramatis-portrait img {
  position: absolute;
  width: 240px;
  height: auto;
  max-width: none;
  filter: contrast(1.1) brightness(1.05);
}
/* Кадрирование одной групповой картинки на двух персонажей.
   Изображение 1023×1537. При width: 240px → display ≈ 240×360.
   Белая маска: ~25% × 57% (display ≈ 60, 205).
   Кошачья:    ~72% × 57% (display ≈ 173, 205).
   По просьбе автора лица свопнуты: Феликс ↔ Япроклят. */
.portrait-felix img {
  left: -141px;
  top: -149px;
}
.portrait-yaproklyat img {
  left: -28px;
  top: -173px;
}
.scene-caption .dramatis-rank {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.dramatis-text h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  margin-bottom: 4px;
}
.portrait-felix + .dramatis-text h3 { color: #d4dde9; }
.portrait-yaproklyat + .dramatis-text h3 { color: #f1a565; }
.scene-caption .dramatis-line {
  font-style: italic;
  font-size: 13px;
  color: rgba(245,236,218,0.78);
  margin: 0;
  line-height: 1.35;
}

/* ============================================================
   ABYSSUS — заголовок и статистика в Сцене X
   ============================================================ */

.abyssus-h {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(40px, 6.5vw, 96px);
  line-height: 0.92;
  background: linear-gradient(180deg, #f8e4b4 0%, #d4a85a 40%, #8a4a14 80%, #3a1c0a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(58,28,10,0.5);
}
.abyssus-stats {
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 560px;
  border-top: 1px solid rgba(212,168,90,0.4);
  border-bottom: 1px solid rgba(212,168,90,0.4);
  padding: 22px 0;
}
.abyssus-stats > div {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.abyssus-stats .big {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 64px);
  color: var(--gold-bright);
  line-height: 1;
}
.abyssus-stats em {
  font-style: italic;
  font-size: 12px;
  color: rgba(245,236,218,0.85);
  letter-spacing: 0.08em;
}

/* ============================================================
   SCROLL — пергамент с полным текстом
   ============================================================ */

.scroll-section {
  padding: 140px 24px 160px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(138,29,35,0.14), transparent 60%),
    var(--night);
}
.scroll-paper {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px clamp(32px, 7vw, 96px);
  background:
    linear-gradient(180deg, rgba(239,226,196,0.98) 0%, rgba(228,212,178,0.97) 100%);
  color: #2a1d0c;
  position: relative;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.6),
    inset 0 0 120px rgba(120,80,30,0.12);
  border-radius: 2px;
}
.scroll-paper::before,
.scroll-paper::after {
  content: "";
  position: absolute; left: 0; right: 0; height: 28px;
  background:
    repeating-linear-gradient(90deg,
      rgba(80,50,15,0.18) 0 8px,
      transparent 8px 18px);
  pointer-events: none;
}
.scroll-paper::before { top: 0; }
.scroll-paper::after  { bottom: 0; transform: scaleY(-1); }

.scroll-paper h3 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(26px, 3.2vw, 38px);
  text-align: center;
  color: #3d1f08;
  line-height: 1.2;
}
.scroll-paper h3::after {
  content: "✦";
  display: block;
  margin: 24px auto 36px;
  font-size: 18px;
  color: var(--blood);
}
.scroll-paper h4 {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 14px;
  color: var(--blood);
  margin: 36px 0 14px;
  text-align: center;
}
.scroll-paper p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  color: #2a1d0c;
  margin-bottom: 16px;
  text-align: justify;
  hyphens: auto;
}
.dropcap {
  float: left;
  font-family: var(--display);
  font-weight: 800;
  font-size: 64px;
  line-height: 0.85;
  color: var(--blood);
  margin: 6px 12px 0 0;
}
.scroll-sign {
  margin-top: 48px;
  text-align: center;
  font-family: var(--display);
  font-style: normal;
  letter-spacing: 0.4em;
  color: var(--blood);
  font-size: 14px;
}

/* ---------- Footer ---------- */

.bottombar {
  padding: 80px 24px 60px;
  text-align: center;
  background: var(--bg-1);
  border-top: 1px solid rgba(212,168,90,0.2);
}
.bottombar .latin-kicker { display: block; margin-bottom: 14px; }
.bottombar p {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(245,236,218,0.85);
  margin-bottom: 8px;
}
.bottombar-faint {
  margin-top: 28px;
  font-size: 10px !important;
  letter-spacing: 0.5em !important;
  color: rgba(245,236,218,0.45) !important;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 96px 32px 80px;
    text-align: center;
    gap: 36px;
  }
  .hero-art {
    max-height: 50vh;
  }
  .hero-art img { max-height: 50vh; }
  .hero-frame {
    margin: 0 auto;
    text-align: center;
    max-width: 760px;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  .scene-portrait,
  .scene-portrait.scene-flip {
    grid-template-columns: 1fr;
  }
  .scene-portrait.scene-flip .scene-image,
  .scene-portrait.scene-flip .scene-caption { order: initial; }
  .scene-image { max-height: 60vh; }
  .scene-image img { max-height: 60vh; }
  .scene-caption { max-width: 720px; margin: 0 auto; }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .topbar {
    padding: 12px 14px;
    gap: 14px;
    background: linear-gradient(to bottom, rgba(26,22,32,0.96), rgba(26,22,32,0.72), transparent);
  }
  .topbar nav {
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: calc(100vw - 70px);
    padding-bottom: 4px;
  }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a {
    flex: 0 0 auto;
    font-size: 9px;
    letter-spacing: 0.14em;
    white-space: nowrap;
  }
  .sigil-text { display: none; }

  .hero {
    padding: 78px 18px 64px;
    gap: 26px;
  }
  .hero-art,
  .hero-art img {
    max-height: 42vh;
  }
  .hero h1 {
    line-height: 1;
  }
  .hero h1 .line-1 {
    font-size: clamp(28px, 10vw, 42px);
    letter-spacing: 0.12em;
  }
  .hero h1 .line-2 {
    font-size: clamp(40px, 15vw, 64px);
  }
  .hero h1 .line-3 {
    font-size: clamp(18px, 6vw, 24px);
  }
  .hero-sub {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.45;
  }
  .hero-actions {
    width: 100%;
    margin-top: 26px;
    gap: 10px;
  }
  .btn {
    flex: 1 1 100%;
    padding: 14px 16px;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-align: center;
  }
  .hero-scrollhint {
    display: none;
  }

  .section-head {
    margin-bottom: 40px;
    padding: 0;
  }
  .section-head h2 {
    font-size: clamp(28px, 9vw, 42px);
    line-height: 1.12;
  }

  .scene {
    padding: 58px 18px;
    gap: 28px;
    min-height: auto;
  }
  .scene-image,
  .scene-image-wide {
    max-height: none;
  }
  .scene-image img,
  .scene-image-wide img {
    width: 100%;
    max-height: 54vh;
    object-fit: contain;
  }
  .scene-image figcaption {
    margin-top: 10px;
    font-size: 9px;
    letter-spacing: 0.22em;
  }
  .scene-caption {
    width: 100%;
    max-width: 100%;
  }
  .scene-num {
    font-size: 10px;
    letter-spacing: 0.28em;
  }
  .scene-caption h2 {
    font-size: clamp(26px, 8.5vw, 38px);
    line-height: 1.12;
    margin-bottom: 18px;
    overflow-wrap: anywhere;
  }
  .scene-caption p {
    font-size: 18px;
    line-height: 1.55;
  }
  .scene-quote {
    margin-top: 18px;
    padding-top: 14px;
  }

  .dramatis { grid-template-columns: 1fr; gap: 12px; }
  .dramatis-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    padding-left: 10px;
  }
  .dramatis-portrait {
    width: 58px;
    height: 58px;
  }
  .dramatis-portrait img {
    width: 218px;
  }
  .portrait-felix img {
    left: -128px;
    top: -135px;
  }
  .portrait-yaproklyat img {
    left: -25px;
    top: -157px;
  }
  .dramatis-text h3 {
    font-size: 15px;
    letter-spacing: 0.12em;
    overflow-wrap: anywhere;
  }

  .abyssus-h {
    font-size: clamp(34px, 13vw, 54px);
    line-height: 1;
    overflow-wrap: anywhere;
  }
  .abyssus-stats {
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 320px;
    margin-top: 26px;
    padding: 18px 0;
  }
  .abyssus-stats .big {
    font-size: 42px;
  }

  .scroll-section { padding: 74px 14px 92px; }
  .scroll-paper {
    padding: 48px 20px;
    box-shadow:
      0 20px 50px -18px rgba(0,0,0,0.65),
      inset 0 0 80px rgba(120,80,30,0.12);
  }
  .scroll-paper h3 {
    font-size: clamp(26px, 8vw, 38px);
    line-height: 1.15;
  }
  .scroll-paper h4 {
    font-size: 12px;
    letter-spacing: 0.22em;
  }
  .scroll-paper p {
    font-size: 17px;
    line-height: 1.62;
  }
  .dropcap::first-letter {
    font-size: 50px;
  }

  .sound-toggle .sound-label { display: none; }
  .sound-toggle { padding: 12px 14px; }
}

@media (max-width: 420px) {
  .hero {
    padding-left: 14px;
    padding-right: 14px;
  }
  .hero h1 .line-2 {
    font-size: clamp(34px, 14vw, 52px);
  }
  .scene {
    padding-left: 14px;
    padding-right: 14px;
  }
  .scene-caption p {
    font-size: 17px;
  }
  .dramatis-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
  }
  .dramatis-portrait {
    width: 54px;
    height: 54px;
  }
  .scene-caption .dramatis-line {
    font-size: 12px;
  }
  .scroll-paper {
    padding-left: 16px;
    padding-right: 16px;
  }
}
