/* ===========================================================================
   Афиша Малого театра — тёплая охра с орнаментальными разделителями.

   Приём темы: между разделами не рамки и не карточные тени, а тонкие
   орнаментальные линейки. Рисуются целиком на CSS (скрещённые градиенты и
   повёрнутые квадраты), без картинок и без сторонних запросов.

   Arsenal: кириллица и латиница, woff2, локально.
   =========================================================================== */
@font-face {
  font-family: 'Arsenal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/arsenal-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Arsenal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/arsenal-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Arsenal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/arsenal-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Arsenal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/arsenal-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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #2B2015;
  --deep: #3E2D1C;
  --paper: #FBF3E3;
  --board: #FFFCF4;
  --accent: #A65A1E;
  --accent-soft: #F0DFBF;
  --muted: #6F604C;
  --rule: #D9C49B;
  --rule-soft: #EADFC6;

  --col: 1120px;
  --col-tight: 760px;
  --gap: clamp(18px, 3vw, 34px);
  --band: clamp(38px, 6vw, 76px);
  --r: 3px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Страховка: атрибут hidden проигрывает по специфичности любому своему
   display, и без этого правила фильтры, полка и кнопка меню видны до запуска
   скрипта, а без JavaScript — навсегда. */
[hidden] { display: none !important; }

html {
  scrollbar-color: var(--rule) var(--paper);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb {
  background: var(--rule);
  border: 3px solid var(--paper);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

body {
  margin: 0;
  font-family: 'Arsenal', 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--deep); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px; z-index: 40;
  background: var(--board); padding: 10px 14px;
  border: 1px solid var(--accent);
}

/* --- Мера набора ---------------------------------------------------------- */
.frame {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 40px);
}
.frame--tight { max-width: var(--col-tight); }

/* --- Орнаментальные линейки ----------------------------------------------
   Главный приём темы. Три варианта: ромб между двойными линейками, решётка
   на всю ширину и короткий росчерк под заголовком. */
.orn {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.orn__rule {
  flex: 1 1 auto;
  min-width: 0;
  height: 5px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.orn__gem {
  flex: 0 0 auto;
  width: 9px; height: 9px;
  transform: rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--rule);
}
.orn--lattice .orn__rule {
  height: 12px;
  border: 0;
  background-image:
    linear-gradient(45deg, var(--rule) 25%, transparent 25% 75%, var(--rule) 75%),
    linear-gradient(-45deg, var(--rule) 25%, transparent 25% 75%, var(--rule) 75%);
  background-size: 12px 12px;
  opacity: .75;
}
.orn--lattice .orn__gem { width: 11px; height: 11px; }

/* Короткий росчерк: ставится под заголовком раздела, центрируется. */
.flourish {
  display: block;
  width: 84px;
  height: 7px;
  margin: 14px auto 0;
  background-image:
    linear-gradient(45deg, var(--accent) 25%, transparent 25% 75%, var(--accent) 75%),
    linear-gradient(-45deg, var(--accent) 25%, transparent 25% 75%, var(--accent) 75%);
  background-size: 7px 7px;
  opacity: .55;
}
.flourish--left { margin-inline: 0; }

/* --- Шапка ---------------------------------------------------------------- */
.topline {
  background: var(--board);
  border-bottom: 1px solid var(--rule);
}
.topline__in {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding-block: 12px;
}
.brand {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand__gem {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  transform: rotate(45deg);
  border: 1px solid var(--accent);
  background:
    linear-gradient(45deg, var(--accent-soft) 25%, transparent 25% 75%, var(--accent-soft) 75%),
    linear-gradient(-45deg, var(--accent-soft) 25%, transparent 25% 75%, var(--accent-soft) 75%);
  background-size: 9px 9px;
}
.brand__words { min-width: 0; }
.brand__name {
  display: block;
  font-weight: 700;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand__sub {
  display: block;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  cursor: pointer;
}
.folder__bars { width: 17px; height: 9px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }

.nav { flex: 0 0 auto; min-width: 0; }
.nav__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
}
.nav__link {
  display: block;
  padding: 6px 2px;
  font-size: 15.5px;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.nav__link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.topline.is-compact .topline__in { flex-wrap: wrap; }
.topline.is-compact .nav { flex: 1 1 100%; }
.topline.is-compact .nav__list {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-top: 8px;
  border-top: 1px solid var(--rule-soft);
}
.topline.is-compact .nav__link {
  padding: 12px 2px;
  border-bottom: 1px solid var(--rule-soft);
}

/* Орнаментальная лента под шапкой — подпись темы. */
.ribbon {
  height: 9px;
  background-color: var(--accent-soft);
  background-image:
    linear-gradient(45deg, var(--accent) 25%, transparent 25% 75%, var(--accent) 75%),
    linear-gradient(-45deg, var(--accent) 25%, transparent 25% 75%, var(--accent) 75%);
  background-size: 9px 9px;
  opacity: .45;
}

/* --- Путь по сайту -------------------------------------------------------- */
.trail { padding-top: 20px; }
.trail__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.trail__item + .trail__item::before { content: '◆'; margin-right: 10px; color: var(--rule); font-size: 9px; vertical-align: 2px; }
.trail__item a { color: var(--muted); }

/* --- Разделы -------------------------------------------------------------- */
.band { padding-block: var(--band); }
.band--first { padding-top: clamp(26px, 4vw, 48px); }
.band--tint { background: var(--board); border-block: 1px solid var(--rule-soft); }

.band__head { text-align: center; max-width: 720px; margin: 0 auto clamp(24px, 4vw, 44px); }
.band__head--left { text-align: left; margin-inline: 0; }
.band__num {
  display: block;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.band__title { font-size: clamp(23px, 3.4vw, 34px); }
.band__note { margin-top: 12px; color: var(--muted); font-size: 16px; }
.band__after { margin-top: clamp(22px, 3vw, 34px); text-align: center; font-size: 16px; }
.band__after--left { text-align: left; }

.h1 { font-size: clamp(27px, 4.6vw, 44px); }
.lede { margin-top: 16px; font-size: clamp(16.5px, 1.6vw, 19px); color: var(--deep); }

/* --- Заглавие главной ----------------------------------------------------- */
.portal { padding-top: clamp(28px, 5vw, 58px); padding-bottom: clamp(26px, 4vw, 44px); text-align: center; }
.portal__kicker {
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.portal__h1 { margin-top: 14px; font-size: clamp(30px, 5.6vw, 52px); }
.portal__lede {
  max-width: 640px;
  margin: 18px auto 0;
  font-size: clamp(16.5px, 1.7vw, 19px);
  color: var(--deep);
}
.portal__acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

/* --- Кнопки и ссылки ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.25;
  color: var(--board);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn:hover { background: var(--deep); border-color: var(--deep); color: var(--board); }
.btn--line { color: var(--accent); background: transparent; }
.btn--line:hover { color: var(--board); }
.btn--lg { padding: 14px 26px; font-size: 16.5px; }
.btn--sm { padding: 8px 14px; font-size: 14px; }
.btn--block { display: flex; width: 100%; }

.link { color: var(--accent); font-weight: 700; }

/* --- Полоса чисел --------------------------------------------------------- */
.tally {
  display: grid;
  /* три ячейки: при auto-fit на узком экране они вставали два плюс один,
     и рядом с ценой оставалась пустая клетка */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(26px, 4vw, 40px);
  background: var(--rule-soft);
  border: 1px solid var(--rule);
}
.tally__cell {
  min-width: 0;
  padding: 18px 16px;
  background: var(--board);
  text-align: center;
}
.tally__cell b { display: block; font-size: clamp(21px, 2.6vw, 28px); }
.tally__cell span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }

/* --- Афишный блок: постановка со всеми датами ----------------------------- */
.bills { display: grid; gap: 0; }
.bill {
  display: grid;
  grid-template-columns: minmax(0, 178px) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
  padding-block: clamp(26px, 3.6vw, 38px);
}
.bill + .bill { border-top: 1px solid var(--rule-soft); }
.bill__plate { margin: 0; min-width: 0; }
.bill__plate img {
  display: block;
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--board);
  padding: 5px;
}
.bill__body { min-width: 0; }
.bill__label {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.bill__genre { color: var(--accent); }
.bill__age { padding: 1px 7px; border: 1px solid var(--rule); border-radius: 20px; letter-spacing: .04em; }
.bill__title { margin-top: 10px; font-size: clamp(20px, 2.6vw, 27px); }
.bill__lede { margin-top: 8px; font-size: 15.5px; line-height: 1.55; }
.bill__title a { color: var(--ink); text-decoration: none; }
.bill__title a:hover { color: var(--accent); text-decoration: underline; }
.bill__cast { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.bill__dates { margin-top: 16px; }
.bill__dates-head { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bill__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.bill__price { font-size: 17px; }
.bill__price b { font-size: 21px; }

.dateset { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 7px 11px;
  font-size: 14px;
  color: var(--ink);
  background: var(--board);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  text-decoration: none;
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--deep); }
.chip__day { font-weight: 700; }
.chip__wd { color: var(--muted); font-size: 13px; }
.chip__time { color: var(--accent); font-weight: 700; }

/* --- Компактная карточка: списки, площадка ------------------------------- */
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule); }
.card {
  display: grid;
  grid-template-columns: minmax(0, 104px) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  padding: 18px;
  background: var(--board);
}
.card__plate { margin: 0; min-width: 0; }
.card__plate img { display: block; width: 100%; border: 1px solid var(--rule-soft); }
.card__body { min-width: 0; display: flex; flex-direction: column; }
.card__label { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.card__label span + span::before { content: ' · '; }
.card__title { margin-top: 7px; font-size: 18.5px; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--accent); text-decoration: underline; }
.card__when { margin-top: 7px; font-size: 14.5px; }
.card__when b { color: var(--deep); }
.card__rest { color: var(--muted); }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; }
.card__price { font-size: 15.5px; }
.card__price b { font-size: 18px; }

/* --- Сито фильтров -------------------------------------------------------- */
.sieve {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-bottom: clamp(20px, 3vw, 30px);
  padding: 16px 18px;
  background: var(--board);
  border: 1px solid var(--rule);
}
.sieve__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.sieve__label { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sieve__btn {
  padding: 6px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 20px;
  cursor: pointer;
}
.sieve__btn:hover { border-color: var(--accent); }
.sieve__btn.is-on { background: var(--accent); border-color: var(--accent); color: var(--board); }
.empty { margin-top: 20px; color: var(--muted); }

/* --- Откуда названия ------------------------------------------------------ */
.origins { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(20px, 3vw, 34px); }
.origin { min-width: 0; }
.origin__book { font-size: 19px; }
.origin__who { margin-top: 4px; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.origin__note { margin-top: 12px; font-size: 15.5px; color: var(--deep); }

/* --- Подборки ------------------------------------------------------------- */
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: clamp(20px, 3vw, 32px); }
.pick { min-width: 0; padding-top: 18px; border-top: 2px solid var(--accent-soft); }
.pick__no { font-size: 12.5px; letter-spacing: .2em; color: var(--accent); }
.pick__title { margin-top: 8px; font-size: 19px; }
.pick__title a { color: var(--ink); text-decoration: none; }
.pick__title a:hover { color: var(--accent); text-decoration: underline; }
.pick__text { margin-top: 10px; font-size: 15px; color: var(--muted); }
.pick__count { margin-top: 10px; font-size: 13.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.rails { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(22px, 3vw, 40px); }
.rails__col { min-width: 0; }
.rails__head { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rails__list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stamp {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--ink);
  background: var(--board);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  text-decoration: none;
}
.stamp:hover { border-color: var(--accent); color: var(--accent); }
.stamp b { font-weight: 700; color: var(--accent); font-size: 13.5px; }

/* --- Записи от составителей ---------------------------------------------- */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(20px, 3vw, 34px); counter-reset: n; }
.notes__item { min-width: 0; }
.notes__item::before {
  counter-increment: n;
  content: counter(n, upper-roman);
  display: block;
  font-size: 14px;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 8px;
}
.notes__title { font-size: 18.5px; }
.notes__text { margin-top: 10px; font-size: 15.5px; color: var(--deep); }

/* --- Статьи --------------------------------------------------------------- */
.leaves { display: grid; gap: 0; }
.leaf { min-width: 0; padding-block: 22px; }
.leaf + .leaf { border-top: 1px solid var(--rule-soft); }
.leaf__grid { display: grid; grid-template-columns: minmax(0, 44px) minmax(0, 1fr); gap: 14px; align-items: start; }
.leaf__no { font-size: 24px; color: var(--rule); font-weight: 700; }
.leaf__title { font-size: clamp(19px, 2.2vw, 23px); }
.leaf__title a { color: var(--ink); text-decoration: none; }
.leaf__title a:hover { color: var(--accent); text-decoration: underline; }
.leaf__desc { margin-top: 9px; color: var(--deep); font-size: 15.5px; }
.leaf__date { margin-top: 9px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* --- Вопросы -------------------------------------------------------------- */
.asks { display: grid; gap: 0; max-width: 820px; margin-inline: auto; }
.ask { border-top: 1px solid var(--rule-soft); }
.ask:last-child { border-bottom: 1px solid var(--rule-soft); }
.ask__box > summary {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 17.5px;
}
.ask__box > summary::-webkit-details-marker { display: none; }
.ask__no { flex: 0 0 auto; color: var(--accent); font-size: 14px; }
.ask__q { min-width: 0; }
.ask__box[open] > summary { color: var(--accent); }
.ask__a { padding: 0 0 20px 34px; color: var(--deep); }

/* --- Страница спектакля --------------------------------------------------- */
.playhead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
  padding-top: clamp(24px, 4vw, 40px);
}
.playhead__words { min-width: 0; }
.playhead__label {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.playhead__h1 { margin-top: 12px; font-size: clamp(27px, 4.4vw, 42px); }
.playhead__sub { margin-top: 14px; font-size: 17px; color: var(--deep); }
.playhead__acts { margin-top: 22px; }
.playhead__fine { margin-top: 12px; font-size: 14px; color: var(--muted); }
.playhead__plate { margin: 0; min-width: 0; }
.playhead__plate img { display: block; width: 100%; border: 1px solid var(--rule); background: var(--board); padding: 6px; }
.playhead__plate figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

.outbox {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule);
}
.outbox__cell { min-width: 0; padding: 15px 16px; background: var(--board); }
.outbox__cell dt { font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.outbox__cell dd { margin-top: 5px; font-size: 16px; }

/* Календарь показов: месяц — строки, число крупно */
.cal { margin: 0; }
.cal__month + .cal__month { margin-top: 22px; }
.cal__name { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.cal__list { margin-top: 12px; border-top: 1px solid var(--rule-soft); }
.cal__row {
  display: grid;
  grid-template-columns: minmax(0, 54px) minmax(0, 1fr) minmax(0, auto) minmax(0, auto);
  gap: 6px 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.cal__num { font-size: 24px; font-weight: 700; line-height: 1; }
.cal__mon { font-size: 13px; color: var(--muted); display: block; }
.cal__wd { min-width: 0; font-size: 15.5px; }
.cal__time { font-weight: 700; color: var(--accent); }
.cal__buy { justify-self: end; }
.cal__ics { margin-top: 14px; font-size: 14.5px; }
.cal__note { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* Полоса покупки во всю ширину — вместо боковой колонки */
.tickband {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 22px clamp(18px, 3vw, 30px);
  background: var(--board);
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}
.tickband__left { min-width: 0; }
.tickband__price { font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
.tickband__note { margin-top: 4px; font-size: 14.5px; color: var(--muted); }
.tickband__right { min-width: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.road { margin-top: clamp(22px, 3vw, 30px); }
.road__head { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.road__text { margin-top: 10px; color: var(--deep); }

.cast__list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 2px 20px;
}
.cast__row { min-width: 0; display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px dotted var(--rule); }
.cast__no { flex: 0 0 auto; font-size: 12.5px; color: var(--rule); }
.cast__name { min-width: 0; }
.cast__note { margin-top: 14px; font-size: 14.5px; color: var(--muted); }

.shelf {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px clamp(14px, 4vw, 22px);
  background: var(--board);
  border-top: 2px solid var(--accent);
}
.shelf__price { font-weight: 700; min-width: 0; }
@media (min-width: 900px) { .shelf { display: none; } }

/* --- Проза ---------------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose--wide { max-width: none; }
.prose h2 { margin-top: clamp(26px, 3.4vw, 38px); font-size: clamp(21px, 2.6vw, 26px); }
.prose h2::after {
  content: '';
  display: block;
  width: 60px; height: 6px;
  margin-top: 10px;
  background-image:
    linear-gradient(45deg, var(--accent) 25%, transparent 25% 75%, var(--accent) 75%),
    linear-gradient(-45deg, var(--accent) 25%, transparent 25% 75%, var(--accent) 75%);
  background-size: 6px 6px;
  opacity: .5;
}
.prose h3 { margin-top: 26px; font-size: 19px; }
.prose p { margin-top: 16px; }
.prose ul, .prose ol { margin-top: 16px; display: grid; gap: 9px; }
.prose ul li { padding-left: 22px; position: relative; }
.prose ul li::before { content: ''; position: absolute; left: 2px; top: .68em; width: 7px; height: 7px; transform: rotate(45deg); background: var(--accent); opacity: .7; }
.prose ol { counter-reset: p; }
.prose ol li { padding-left: 30px; position: relative; counter-increment: p; }
.prose ol li::before { content: counter(p) '.'; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.prose a { font-weight: 700; }

.post__stamp { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.prose--drop > p:first-of-type::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: .86;
  font-weight: 700;
  color: var(--accent);
  margin: 4px 10px 0 0;
}

/* --- Подбор -------------------------------------------------------------- */
.sorter {
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(22px, 4vw, 36px);
  background: var(--board);
  border: 1px solid var(--rule);
  position: relative;
}
.sorter::before, .sorter::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px;
  height: 6px;
  background-image:
    linear-gradient(45deg, var(--rule) 25%, transparent 25% 75%, var(--rule) 75%),
    linear-gradient(-45deg, var(--rule) 25%, transparent 25% 75%, var(--rule) 75%);
  background-size: 6px 6px;
}
.sorter::before { top: 7px; }
.sorter::after { bottom: 7px; }
.sorter__step { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sorter__q { margin-top: 10px; font-size: clamp(19px, 2.4vw, 24px); font-weight: 700; line-height: 1.25; }
.sorter__answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin-top: 20px; }
.sorter__a {
  min-width: 0;
  padding: 13px 16px;
  font: inherit;
  font-size: 15.5px;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  cursor: pointer;
}
.sorter__a:hover { border-color: var(--accent); background: var(--accent-soft); }
.sorter__ruler { margin-top: 20px; height: 4px; background: var(--rule-soft); }
.sorter__fill { display: block; height: 100%; background: var(--accent); }
.sorter__off { color: var(--muted); }
.sorter__results { display: grid; gap: 14px; margin-top: 20px; }
.found { padding: 16px 18px; background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--accent); }
.found__t { font-size: 18.5px; font-weight: 700; }
.found__t a { color: var(--ink); text-decoration: none; }
.found__t a:hover { color: var(--accent); text-decoration: underline; }
.found__p { margin-top: 6px; font-weight: 700; color: var(--accent); }
.found__m { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.found__go { margin-top: 12px; }
.sorter__again { margin-top: 20px; }

/* --- Подвал -------------------------------------------------------------- */
.foot {
  margin-top: var(--band);
  background: var(--board);
  border-top: 1px solid var(--rule);
}
.foot__in {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(28px, 4vw, 44px);
}
.foot__col { min-width: 0; }
.foot__name { font-weight: 700; font-size: 18px; }
.foot__head { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.foot__note { margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.foot__links { margin-top: 10px; display: grid; gap: 6px; font-size: 15px; }
.foot__links a { color: var(--ink); text-decoration: none; }
.foot__links a:hover { color: var(--accent); text-decoration: underline; }

/* --- Чем полезна эта афиша --------------------------------------------- */
.merits { padding-block: clamp(22px, 3vw, 34px); }
.merits__list { display: grid; gap: clamp(18px, 2.4vw, 32px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.merits__i { min-width: 0; padding-left: 16px; border-left: 2px solid var(--accent-soft); }
.merits__n { display: block; font-size: 12px; letter-spacing: .16em; color: var(--accent); }
.merits__t { margin-top: 6px; font-size: 16px; font-weight: 700; }
.merits__x { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.foot__col--wide { grid-column: span 2; }
.foot__tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; }
.foot__tags a { color: var(--ink); text-decoration: none; }
.foot__tags a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 739px) { .foot__col--wide { grid-column: auto; } }

/* --- Узкие экраны -------------------------------------------------------- */
@media (max-width: 860px) {
  .playhead { grid-template-columns: minmax(0, 1fr); }
  .playhead__plate { max-width: 340px; }
}
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .bill { grid-template-columns: minmax(0, 1fr); }
  .bill__plate { max-width: 220px; }
  .card { grid-template-columns: minmax(0, 1fr); }
  .card__plate { max-width: 160px; }
  .cal__row { grid-template-columns: minmax(0, 46px) minmax(0, 1fr); }
  .cal__time { grid-column: 2; }
  .cal__buy { grid-column: 2; justify-self: start; }
  .portal__acts .btn { flex: 1 1 100%; }
  .prose--drop > p:first-of-type::first-letter { font-size: 2.9em; }
}
@media (max-width: 380px) {
  .tally { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  .topline, .foot, .shelf, .sorter, .ribbon { display: none; }
  body { background: #fff; }
}

/* На узком экране выключка по центру мешает: абзац в шесть строк по центру
   читается тяжело, а цена с двумя кнопками встаёт лесенкой. Симметрия темы
   остаётся в заголовках, текст и подвал карточки выравниваются по левому краю. */
@media (max-width: 599px) {
  .portal__lede,
  .band__note,
  .band__after { text-align: left; }
  .bill__foot { gap: 10px; }
  .bill__foot .btn { flex: 1 1 100%; }
  .bill__price { flex: 1 1 100%; }
}

/* ==========================================================================
   Правки после второго разбора вёрстки
   ========================================================================== */

/* Номера статей были цветом линейки и сливались с бумагой. */
.leaf__no { color: var(--accent); }

/* Длина строки: на мониторе колонка текста не шире 740 точек. */
.prose { max-width: min(100%, 740px); }
.prose--wide { max-width: min(100%, 900px); }
.portal__lede,
.band__note,
.leaf__desc,
.merits__x,
.notes__text { max-width: min(100%, 740px); }
.band__head { max-width: 680px; }
.portal__lede { margin-inline: auto; }

/* Миниатюра карточки была втрое мельче самого файла. */
@media (min-width: 621px) {
  .card { grid-template-columns: minmax(0, 160px) minmax(0, 1fr); }
}

/* Липкая кнопка не должна накрывать последние строки подвала. */
@media (max-width: 899px) {
  .foot__in { padding-bottom: calc(clamp(28px, 4vw, 44px) + 72px); }
}

/* Остатки длинных строк. */
.cal__note, .bill__lede, .lede, .ask__a p { max-width: min(100%, 740px); }
.bill__cast, .cast__note, .road__text, .road__note { max-width: min(100%, 740px); }
