/* «Из личных архивов»: карточки историй и просмотр одной истории. */
.stories-shell { padding-bottom: 72px; }
.stories-head { padding-bottom: 8px; }

.st-intro { width: var(--page-wide); margin: 8px auto 34px; }
.st-intro .story-eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.st-intro h1 { max-width: 900px; margin: 0 0 18px; color: var(--green); font-family: var(--serif); font-size: clamp(28px, 4.6vw, 62px); font-weight: 500; line-height: .98; }
.st-intro-lead { margin: 0 0 18px; max-width: 720px; color: rgb(36, 53, 47); font-size: 17px; line-height: 1.65; }
.st-intro-stat { display: inline-flex; gap: 10px; align-items: baseline; margin: 0; padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--wash); color: var(--muted); font-size: 13px; font-weight: 700; }
.st-intro-stat b { color: var(--green); font-size: 16px; }
.st-intro-stat span { color: var(--line); }

/* Сетка карточек — ровно три в линию. */
.st-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; width: var(--page-wide); margin: 0 auto; }
.st-card { min-width: 0; }
.st-card-open { display: grid; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--soft-shadow); text-align: left; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.st-card-open:hover, .st-card-open:focus-visible { transform: translateY(-3px); border-color: rgba(0, 88, 62, .35); box-shadow: var(--shadow); outline: none; }
.st-card-shot { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--wash); }
.st-card-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.st-card-open:hover .st-card-shot img { transform: scale(1.04); }
.st-card-count { position: absolute; right: 12px; bottom: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(6, 26, 20, .72); color: #fff; font-size: 12px; font-weight: 700; }
.st-card-copy { display: grid; gap: 8px; padding: 18px 20px 22px; }
.st-card-era { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.st-card-copy strong { color: var(--ink); font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.2; }
.st-card-lead { color: var(--text); font-size: 14px; line-height: 1.5; }
.st-card-author { color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* Одна история. */
.st-stories { width: var(--page-wide); margin: 0 auto; }
.st-story { padding-top: 4px; }
.st-back { display: inline-flex; gap: 8px; align-items: center; min-height: 38px; margin-bottom: 22px; padding: 0 16px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--green); font-size: 13px; font-weight: 700; }
.st-back:hover { border-color: var(--green); }
.st-story-head { max-width: 820px; margin-bottom: 22px; }
.st-story-era { margin: 0 0 8px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.st-story-head h2 { margin: 0 0 14px; color: var(--green); font-family: var(--serif); font-size: clamp(24px, 3.4vw, 46px); font-weight: 500; line-height: 1.04; }
.st-story-lead { margin: 0 0 10px; color: rgb(36, 53, 47); font-size: 17px; line-height: 1.6; }
.st-story-author { margin: 0; color: var(--muted); font-size: 13.5px; }
.st-story-text { max-width: 760px; margin-bottom: 30px; padding-left: 20px; border-left: 3px solid var(--line); }
.st-story-text p { margin: 0 0 14px; color: var(--text); font-size: 15.5px; line-height: 1.7; }
.st-story-text p:last-child { margin-bottom: 0; }

.st-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.st-shot { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: var(--wash); box-shadow: var(--soft-shadow); cursor: zoom-in; outline: none; }
.st-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.st-shot:hover img, .st-shot:focus-visible img { transform: scale(1.05); }
.st-shot:focus-visible { box-shadow: 0 0 0 3px rgba(0, 88, 62, .45); }

/* Просмотр снимка. */
.st-lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 40px; background: rgba(6, 26, 20, .9); }
.st-lightbox img { max-width: min(1200px, 92vw); max-height: 86vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.st-lightbox-close { position: absolute; top: 22px; right: 26px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 26px; line-height: 1; }
.st-lightbox-close:hover { background: rgba(255, 255, 255, .28); }
body.has-st-lightbox { overflow: hidden; }

@media (max-width: 1080px) {
  .st-cards, .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  /* Карточки историй — в столбик, снимки — по два: это миниатюры. */
  .st-cards { grid-template-columns: 1fr; gap: 16px; }
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .st-story-text { padding-left: 14px; }
  .st-lightbox { padding: 10px; }
  .st-lightbox img { max-width: 100%; max-height: 82vh; }
  .st-lightbox-close { top: 10px; right: 12px; }
  .alb-part { margin-bottom: 24px; }
  .alb-part-head b { font-size: 19px; }
  .st-card-copy { padding: 16px 18px 20px; }
  .st-card-copy strong { font-size: 19px; }
  .st-intro-lead { font-size: 15.5px; }
  .st-story-lead { font-size: 15.5px; }
}
@media (max-width: 340px) {
  .st-grid { grid-template-columns: 1fr; }
}

/* Атрибут hidden должен побеждать display у сеток и оверлея. */
.st-cards[hidden], .st-story[hidden], .st-lightbox[hidden], .st-intro[hidden] { display: none !important; }

/* Возврат в медиагалерею со списка историй. */
.st-up-row { width: var(--page-wide); margin: 0 auto 16px; }
.st-up { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.st-up:hover { color: var(--green); }

/* Разделы альбома: по ходу события. */
.alb-part { width: var(--page-wide); margin: 0 auto 34px; }
.alb-part-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.alb-part-head b { color: var(--green); font-family: var(--serif); font-size: 22px; font-weight: 500; }
.alb-part-head span { color: var(--muted); font-size: 13.5px; }
.alb-part .st-grid { width: 100%; }

/* Пометка о языке авторского рассказа. */
.st-story-note { margin: 0 0 12px !important; color: var(--muted) !important; font-size: 12.5px !important; font-style: italic; }
