/* =========================================================
   Попай-морячок — общие стили сайта
   Тёмная морская палитра + латунный акцент + песочный
   ========================================================= */

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/oswald-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/oswald-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

:root {
  --navy-deep: #071c28;
  --navy: #0c2a3a;
  --navy-light: #123c50;
  --teal: #1d5a63;
  --teal-light: #3a8a8f;
  --brass: #c9a24b;
  --brass-light: #e4c579;
  --sand: #ecdfc0;
  --sand-dim: #cdbd93;
  --text-main: #eef2ee;
  --text-muted: #b9c7c9;
  --rope: #a3855b;
  --shadow: rgba(2, 10, 16, 0.45);

  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Oswald", var(--font-main);

  --radius: 10px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: var(--navy-deep);
  background-image:
    radial-gradient(ellipse at top, rgba(58, 138, 143, 0.12), transparent 55%),
    radial-gradient(ellipse at bottom, rgba(12, 42, 58, 0.6), transparent 60%);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brass-light);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.2;
  color: var(--sand);
  margin: 0 0 0.6em;
}

h2, h3, h4 {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); }

p { margin: 0 0 1em; }

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brass-light);
  font-weight: 700;
  margin-bottom: 0.9em;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(7, 28, 40, 0.97), rgba(7, 28, 40, 0.9));
  border-bottom: 1px solid rgba(201, 162, 75, 0.25);
  backdrop-filter: blur(6px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sand);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
}

.brand:hover {
  text-decoration: none;
}

.brand .brand-icon {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand .brand-tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: rgba(201, 162, 75, 0.14);
  text-decoration: none;
  color: var(--brass-light);
}

.nav-list a[aria-current="page"] {
  background: rgba(201, 162, 75, 0.22);
  color: var(--brass-light);
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 75, 0.4);
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.burger span,
.burger::before,
.burger::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sand);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger::before { transform: translateY(-7px); }
.burger::after { transform: translateY(6px); }

.burger[aria-expanded="true"] span { opacity: 0; }
.burger[aria-expanded="true"]::before { transform: translateY(0) rotate(45deg); }
.burger[aria-expanded="true"]::after { transform: translateY(-2px) rotate(-45deg); }

/* Восемь пунктов меню в строку требуют около 1000px — ниже уходим в бургер. */
@media (max-width: 1000px) {
  .burger {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--navy-deep);
    border-bottom: 1px solid rgba(201, 162, 75, 0.25);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .main-nav.is-open {
    max-height: 520px;
  }

  .nav-list {
    flex-direction: column;
    padding: 10px 20px 20px;
    gap: 2px;
  }

  .nav-list a {
    display: block;
    padding: 12px 10px;
    border-radius: 8px;
  }
}

/* ---------- Dividers ---------- */

.divider {
  width: 100%;
  height: 22px;
  margin: 0;
  display: block;
}

.divider-wave { color: var(--teal-light); opacity: 0.7; }
.divider-rope { height: 16px; opacity: 0.85; }

section {
  padding: 56px 0;
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 40px;
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(7, 28, 40, 0.88), rgba(7, 28, 40, 0.96) 65%, var(--navy-deep) 100%),
    url("img/pd/aivazovsky-stormy-seas.jpg");
  background-size: cover;
  background-position: center 30%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-art {
  border-radius: var(--radius);
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brass-light), var(--brass));
  color: var(--navy-deep);
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(1.06);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(236, 223, 192, 0.5);
  color: var(--sand);
  box-shadow: none;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 1.6em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  align-items: center;
}

.about-sailor {
  width: 260px;
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 10px 20px rgba(2, 10, 16, 0.5));
}

@media (max-width: 700px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-sailor {
    order: -1;
    width: 190px;
  }
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.card {
  background: linear-gradient(165deg, rgba(18, 60, 80, 0.55), rgba(7, 28, 40, 0.65));
  border: 1px solid rgba(201, 162, 75, 0.2);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 75, 0.5);
}

.card .card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: var(--brass-light);
}

.card h3 a {
  color: var(--sand);
}

.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card {
  position: relative;
}

.card p {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 0;
}

/* ---------- Quotes ---------- */

.quote-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

blockquote.saying {
  margin: 0;
  padding: 22px 24px;
  border-left: 3px solid var(--brass);
  background: rgba(236, 223, 192, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.05rem;
  color: var(--sand);
  font-style: italic;
}

blockquote.saying footer {
  margin-top: 10px;
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Story / Byki cards ---------- */

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.story {
  background: rgba(18, 60, 80, 0.28);
  border: 1px solid rgba(201, 162, 75, 0.16);
  border-radius: var(--radius);
  padding: 24px 26px;
}

.story h3 {
  margin-bottom: 0.35em;
}

.story .story-author {
  display: block;
  font-size: 0.82rem;
  color: var(--brass-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9em;
}

.story p:last-child {
  margin-bottom: 0;
}

/* ---------- Anekdoty ---------- */

.joke-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.joke-section h2 .rubric-icon {
  width: 30px;
  height: 30px;
  color: var(--brass-light);
  flex: none;
}

.joke-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.joke-list li {
  background: rgba(18, 60, 80, 0.28);
  border: 1px solid rgba(201, 162, 75, 0.14);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.joke-list li p {
  margin: 0;
}

/* ---------- Slovar ---------- */

.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.term {
  background: rgba(18, 60, 80, 0.28);
  border: 1px solid rgba(201, 162, 75, 0.16);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.term dt {
  font-weight: 800;
  color: var(--brass-light);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.term dd {
  margin: 0 0 10px;
  color: var(--text-main);
}

.term .credit-figure.inline-figure-right {
  width: 108px;
  margin: 0 0 10px 14px;
}

.term .credit-figure figcaption {
  padding: 6px 8px;
  font-size: 0.68rem;
  line-height: 1.35;
}

.term .credit-figure .credit-title {
  font-size: 0.68rem;
}

.term .joke-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-style: italic;
  border-top: 1px dashed rgba(201, 162, 75, 0.3);
  padding-top: 8px;
}

/* ---------- Zhurnal ---------- */

.log-list {
  margin-top: 30px;
  display: grid;
  gap: 22px;
}

.log-entry {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  background: rgba(18, 60, 80, 0.28);
  border: 1px solid rgba(201, 162, 75, 0.16);
  border-radius: var(--radius);
  padding: 22px 26px;
}

@media (max-width: 640px) {
  .log-entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.log-date {
  font-weight: 800;
  color: var(--brass-light);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.log-entry h3 {
  margin-bottom: 0.4em;
}

.log-entry p:last-child {
  margin-bottom: 0;
}

.contact-box {
  margin-top: 46px;
  padding: 30px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(201, 162, 75, 0.12), rgba(18, 60, 80, 0.35));
  border: 1px solid rgba(201, 162, 75, 0.3);
  text-align: center;
}

.contact-box h2 {
  margin-bottom: 0.3em;
}

.mail-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---------- Page header (inner pages) ---------- */

.page-hero {
  padding: 50px 0 10px;
  text-align: center;
}

.page-hero .lead {
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(201, 162, 75, 0.2);
  background: var(--navy-deep);
  padding: 40px 0 30px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sand);
  font-weight: 800;
}

.footer-brand .brand-icon {
  width: 28px;
  height: 28px;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.disclaimer {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed rgba(201, 162, 75, 0.25);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.disclaimer p {
  margin: 0 0 0.5em;
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

/* ---------- Hidden easter-egg cards ---------- */

.easter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 16, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

.easter-overlay.is-open {
  display: flex;
}

.easter-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: linear-gradient(165deg, rgba(18, 60, 80, 0.97), rgba(7, 28, 40, 0.99));
  border: 1px solid rgba(201, 162, 75, 0.4);
  border-radius: var(--radius);
  padding: 32px 26px 26px;
  text-align: center;
  box-shadow: 0 20px 50px var(--shadow);
}

.easter-card svg {
  width: 160px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  border-radius: 6px;
}

.easter-card .easter-phrase {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--sand);
  margin: 0;
}

.easter-card-plain {
  max-width: 320px;
  padding: 28px 24px;
}

/* Логотип в шапке раздела и гифка-проходка — декор, поэтому скромно. */
.hero-logo {
  display: block;
  width: 100%;
  max-width: 210px;
  height: auto;
  margin: 26px 0 0;
}

.walk-gif {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  margin: 20px 0 0;
}

.adult-illustration {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto 20px;
  border-radius: var(--radius);
}

/* ---------- Оживший герой-блок: качка, волны, чайки ---------- */

/* Кораблик качается на волне: небольшой крен плюс подъём на волне.
   Точка вращения — по ватерлинии, иначе судно вертится вокруг клотика. */
.hero-boat {
  transform-origin: 225px 262px;
  animation: boatRock 6.5s ease-in-out infinite;
}

@keyframes boatRock {
  0%, 100% { transform: rotate(-2.2deg) translateY(0); }
  25%      { transform: rotate(0deg)    translateY(3px); }
  50%      { transform: rotate(2.2deg)  translateY(0); }
  75%      { transform: rotate(0deg)    translateY(3px); }
}

/* Волны уезжают ровно на два периода (200 ед.), поэтому стык не виден.
   Разная скорость у слоёв даёт ощущение глубины. */
.wave-back  { animation: waveDrift 13s linear infinite; }
.wave-mid   { animation: waveDrift  9s linear infinite; }
.wave-front { animation: waveDrift  6s linear infinite; }

@keyframes waveDrift {
  from { transform: translateX(0); }
  to   { transform: translateX(-200px); }
}

/* Чайки: взмах крыльев через сжатие по вертикали от середины размаха. */
.gull-wings {
  transform-box: fill-box;
  transform-origin: 50% 60%;
  animation: gullFlap 0.9s ease-in-out infinite;
}

@keyframes gullFlap {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.3); }
}

/* Медленный снос по ветру, у каждой чайки свой темп и своя фаза взмаха. */
.gull-drift { animation: gullDrift 22s ease-in-out infinite; }
.gull-drift-1 { animation-duration: 19s; }
.gull-drift-2 { animation-duration: 26s; animation-delay: -7s; }
.gull-drift-3 { animation-duration: 23s; animation-delay: -13s; }

.gull-drift-1 .gull-wings { animation-duration: 0.8s; }
.gull-drift-2 .gull-wings { animation-duration: 1.05s; animation-delay: -0.4s; }
.gull-drift-3 .gull-wings { animation-duration: 0.72s; animation-delay: -0.2s; }

@keyframes gullDrift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(34px, -12px); }
}

/* Кому движение мешает — статичная картинка, как было. */
@media (prefers-reduced-motion: reduce) {
  .hero-boat,
  .wave-back,
  .wave-mid,
  .wave-front,
  .gull-wings,
  .gull-drift {
    animation: none;
  }
}

.manual-outro {
  margin: 46px auto 0;
  max-width: 420px;
  text-align: center;
}

.manual-outro img {
  width: 100%;
  max-width: 300px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(2, 10, 16, 0.5));
}

.manual-outro figcaption {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
}

.easter-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 18px;
  border-radius: var(--radius);
}

.easter-card-plain .easter-phrase {
  font-size: 1.1rem;
  font-weight: 600;
}

.easter-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.easter-close:hover,
.easter-close:focus-visible {
  color: var(--brass-light);
}

/* ---------- Utility ---------- */

.section-alt {
  background: rgba(29, 90, 99, 0.1);
  border-top: 1px solid rgba(201, 162, 75, 0.12);
  border-bottom: 1px solid rgba(201, 162, 75, 0.12);
}

.center {
  text-align: center;
}

.mt-0 { margin-top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Credit figures (inline PD/CC images) ---------- */

.credit-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(201, 162, 75, 0.22);
  background: rgba(7, 28, 40, 0.4);
  box-shadow: 0 12px 26px var(--shadow);
}

.credit-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.credit-figure figcaption {
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px dashed rgba(201, 162, 75, 0.25);
}

.credit-figure figcaption .credit-title {
  display: block;
  color: var(--sand);
  font-weight: 700;
  margin-bottom: 2px;
}

.figure-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin: 30px 0;
}

.figure-row-narrow {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.inline-figure-right {
  float: right;
  width: 220px;
  margin: 6px 0 18px 26px;
}

.inline-figure-left {
  float: left;
  width: 220px;
  margin: 6px 26px 18px 0;
}

@media (max-width: 700px) {
  .inline-figure-right,
  .inline-figure-left {
    float: none;
    width: 100%;
    margin: 0 0 20px;
  }
}

/* ---------- Manual / nastavlenie page ---------- */

.manual-list {
  list-style: none;
  counter-reset: manual;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.manual-list li {
  position: relative;
  padding: 18px 22px 18px 64px;
  background: rgba(18, 60, 80, 0.28);
  border: 1px solid rgba(201, 162, 75, 0.16);
  border-radius: var(--radius);
}

.manual-list li::before {
  counter-increment: manual;
  content: counter(manual, decimal-leading-zero);
  position: absolute;
  left: 20px;
  top: 18px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--brass-light);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.manual-list li p {
  margin: 0;
}

.manual-list li p + p {
  margin-top: 0.6em;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.manual-note {
  margin-top: 28px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(201, 162, 75, 0.12), rgba(18, 60, 80, 0.35));
  border: 1px solid rgba(201, 162, 75, 0.3);
}

.manual-note p {
  margin: 0;
}

/* ---------- Source table (istochniki page) ---------- */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  margin-top: 26px;
  border: 1px solid rgba(201, 162, 75, 0.2);
  border-radius: var(--radius);
}

.source-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.source-table caption {
  caption-side: top;
  text-align: left;
  padding: 14px 16px 4px;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--brass-light);
  font-size: 0.95rem;
}

.source-table th,
.source-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(201, 162, 75, 0.14);
  vertical-align: top;
}

.source-table th {
  background: rgba(18, 60, 80, 0.4);
  color: var(--sand);
  font-weight: 700;
  white-space: nowrap;
}

.source-table td {
  color: var(--text-muted);
}

.source-table td.cell-file {
  color: var(--sand);
  font-family: monospace;
  font-size: 0.85rem;
}

.source-table tr:last-child td {
  border-bottom: none;
}

.source-block {
  margin-top: 20px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: rgba(18, 60, 80, 0.28);
  border: 1px solid rgba(201, 162, 75, 0.16);
}

.source-block ul {
  margin: 0.6em 0 0;
  padding-left: 1.2em;
  color: var(--text-muted);
}

.source-block li {
  margin-bottom: 0.3em;
}

/* ---------- Gallery page ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.gallery-grid .credit-figure {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gallery-grid .credit-figure .figure-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-grid .credit-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.credits-note {
  margin-top: 40px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: rgba(18, 60, 80, 0.28);
  border: 1px solid rgba(201, 162, 75, 0.18);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.credits-note a {
  font-weight: 700;
}

/* Байка 18+ — раскрывается только по щелчку */
.adult-spoiler {
  margin-top: 44px;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 162, 75, 0.28);
  background: rgba(7, 28, 40, 0.55);
  overflow: hidden;
}

.adult-spoiler > summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-size: 0.98rem;
  color: var(--sand-dim);
}

.adult-spoiler > summary::-webkit-details-marker {
  display: none;
}

.adult-spoiler > summary:hover,
.adult-spoiler > summary:focus-visible {
  color: var(--sand);
  background: rgba(18, 60, 80, 0.35);
}

.adult-badge {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brass);
  color: var(--navy-deep);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.adult-summary-text {
  flex: 1 1 auto;
}

.adult-spoiler[open] > summary {
  border-bottom: 1px solid rgba(201, 162, 75, 0.18);
}

.adult-spoiler-body {
  padding: 4px 24px 24px;
}

/* Явное скрытие, чтобы текст не зависел от встроенных стилей движка. */
.adult-spoiler:not([open]) .adult-spoiler-body {
  display: none;
}

.adult-warning {
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

.adult-spoiler-body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .adult-spoiler > summary,
  .adult-spoiler-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* ---------- Старинная рама: латунный багет, паспарту, музейная табличка ---------- */

.antique {
  max-width: 780px;
  margin: 0 auto 30px;
}

/* Багет собран из двух слоёв: диагональная штриховка даёт фактуру металла,
   а градиент - блики, как на золочёной раме под боковым светом. */
.antique-frame {
  padding: 16px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 3px, rgba(0, 0, 0, 0.05) 3px 6px),
    linear-gradient(135deg, #6d4f1a 0%, #c9a24b 16%, #f2e2ad 30%, #c9a24b 46%,
                    #86641f 60%, #e4c579 76%, #9c7a2c 100%);
  box-shadow:
    0 0 0 2px #3a2a0e,
    inset 0 0 0 2px rgba(255, 244, 214, 0.4),
    inset 0 0 26px rgba(45, 30, 8, 0.6),
    0 20px 45px rgba(2, 10, 16, 0.6);
}

/* Паспарту - картонная подложка песочного тона, как в старых багетных мастерских. */
.antique-mat {
  padding: 20px;
  background: linear-gradient(180deg, #efe5cb 0%, #ddd0ae 100%);
  box-shadow:
    inset 0 0 0 1px rgba(60, 42, 14, 0.45),
    inset 0 3px 8px rgba(60, 42, 14, 0.3);
}

.antique-mat img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow:
    0 0 0 1px rgba(35, 24, 8, 0.6),
    0 8px 18px rgba(2, 10, 16, 0.45);
}

/* Табличка на раме - как в музее, без пояснений. */
.antique-plate {
  margin: 14px auto 0;
  max-width: 380px;
  padding: 7px 16px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2a1e08;
  background: linear-gradient(180deg, #e4c579, #b28c35);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 224, 0.7),
    0 3px 8px rgba(2, 10, 16, 0.5);
}

@media (max-width: 640px) {
  .antique-frame { padding: 10px; }
  .antique-mat { padding: 12px; }
  .antique-plate { font-size: 12px; letter-spacing: 0.1em; }
}

/* ---------- Кочегарка: снимок и реплика рядом ---------- */
.stokehold {
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  margin: 0 0 36px;
}

.stokehold .credit-figure,
.stokehold blockquote.saying { margin: 0; }

/* Реплика набрана в старой орфографии, поэтому чуть крупнее обычной присказки. */
.stokehold blockquote.saying p { font-size: 1.08em; }

@media (max-width: 700px) {
  .stokehold { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- Вывеска во всю ширину раздела ---------- */
.poster-wide {
  max-width: 980px;
  margin: 36px auto 0;
}

.poster-wide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(2, 10, 16, 0.5);
}

/* ---------- Реплика без картинки ---------- */
.stokehold-quote {
  max-width: 760px;
  margin: 0 auto 34px;
}

.stokehold-quote blockquote.saying {
  margin: 0;
}

.stokehold-quote blockquote.saying p {
  font-size: 1.08em;
}
