/* Страница репертуара — по repertoire-page.html. Цвета фиксированные. */
.rep-section, #fp-repertoire {
  --rp-bg: #efe6d6; --rp-card: #fbf7ef; --rp-ink: #2b0f0c; --rp-muted: #7d6b61;
  --rp-brand: #6e1616; --rp-brand-2: #8f2a1c; --rp-accent: #a8391f; --rp-gold: #e3a92b;
  --rp-line: rgba(110,22,22,.2); --rp-radius: 14px; --rp-ease: cubic-bezier(.2,.8,.2,1);
}
#fp-repertoire :focus-visible { outline-color: var(--rp-gold); }
.rep-section {
  background: var(--rp-bg); color: var(--rp-ink); font-family: "Manrope", system-ui, sans-serif;
  padding: 32px 0 96px; -webkit-font-smoothing: antialiased;
}
.rep-section :focus-visible { outline: 3px solid var(--rp-gold); outline-offset: 3px; }
.rep-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rep-empty { text-align: center; padding: 5rem 0; color: var(--rp-muted); font-size: 1.1rem; }

/* ── Фильтры ── */
.rep-tools { margin-bottom: 0; padding: 0 0 8px; }
.rep-search { position: relative; max-width: 360px; margin-bottom: 24px; }
.rep-search input {
  width: 100%; height: 46px; padding: 0 42px; box-sizing: border-box;
  font: 600 15px "Manrope", sans-serif; color: var(--rp-ink);
  background: var(--rp-card); border: 1.5px solid var(--rp-line); border-radius: 999px;
  transition: border-color .25s, box-shadow .25s;
}
.rep-search input::placeholder { color: var(--rp-muted); font-weight: 500; }
.rep-search input:focus { outline: none; border-color: var(--rp-brand); box-shadow: 0 0 0 4px rgba(110,22,22,.1); }
.rep-search input::-webkit-search-cancel-button { display: none; }
.rep-search__ico { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--rp-muted); pointer-events: none; }
.rep-search__clear {
  position: absolute; right: 8px; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border: 0; border-radius: 50%;
  cursor: pointer; background: transparent; color: var(--rp-muted); display: grid; place-items: center;
}
.rep-search__clear:hover { background: rgba(110,22,22,.08); color: var(--rp-brand); }
.rep-search__clear[hidden] { display: none; }
.rep-search kbd {
  position: absolute; right: 14px; top: 50%; translate: 0 -50%;
  font: 700 11px "Manrope", sans-serif; color: var(--rp-muted);
  border: 1px solid var(--rp-line); border-radius: 6px; padding: 2px 7px; background: var(--rp-bg);
}
.rep-search input:focus ~ kbd, .rep-search input:not(:placeholder-shown) ~ kbd { display: none; }

.rep-frow { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.rep-frow__label { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--rp-muted); }
.rep-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rep-chip {
  display: inline-flex; align-items: center; gap: 6px; font: 700 13.5px "Manrope", sans-serif; color: var(--rp-ink);
  background: var(--rp-card); border: 1.5px solid var(--rp-line); border-radius: 999px; padding: 7px 14px;
  cursor: pointer; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, transform .2s, opacity .25s;
}
.rep-chip:hover:not(:disabled) { border-color: var(--rp-brand); }
.rep-chip:active:not(:disabled) { transform: scale(.96); }
.rep-chip[aria-pressed="true"] { background: var(--rp-brand); border-color: var(--rp-brand); color: #fff; }
.rep-chip:disabled { opacity: .38; cursor: not-allowed; }
.rep-chip .n { font-size: 11px; font-weight: 700; opacity: .55; }
.rep-chip[aria-pressed="true"] .n { opacity: .75; }
.rep-chip .n:empty { display: none; }

.rep-resbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 14px 0; border-top: 1px dashed var(--rp-line); }
.rep-count { margin: 0; font-size: 14px; font-weight: 600; color: var(--rp-muted); }
.rep-count b { color: var(--rp-ink); font-weight: 800; }
.rep-reset {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: 800 12px "Manrope", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--rp-brand);
  border-bottom: 1.5px solid transparent; transition: border-color .25s;
}
.rep-reset:hover { border-color: currentColor; }
.rep-reset[hidden] { display: none; }

@media (max-width: 640px) {
  /* фильтры в несколько рядов, без горизонтальной прокрутки; подпись («Вік», «Де», «Тип») — в первой строке тегов */
  .rep-frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
  .rep-frow__label { flex: 0 0 auto; margin-right: 4px; }
  .rep-chips { display: contents; }
  .rep-search { max-width: none; }
}

/* ── Сетка ── */
.rep-grid {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 30px 22px;
}

/* ── Карточка-билет ── */
.rep-card {
  container-type: inline-size;
  filter: drop-shadow(0 1px 1px rgba(60,20,10,.08)) drop-shadow(0 10px 12px rgba(60,20,10,.12));
  transition: transform .45s var(--rp-ease), filter .45s var(--rp-ease);
}
.rep-card[hidden] { display: none !important; }
.rep-card:hover, .rep-card:focus-within {
  transform: translateY(-6px) rotate(-.6deg);
  filter: drop-shadow(0 2px 2px rgba(60,20,10,.08)) drop-shadow(0 22px 20px rgba(110,22,22,.22));
}
.rep-card:nth-child(even):hover, .rep-card:nth-child(even):focus-within { transform: translateY(-6px) rotate(.6deg); }
.rep-ticket {
  --notch: 10px; --cut: calc(100cqw * 7 / 5);
  position: relative; height: 100%; display: flex; flex-direction: column;
  background: var(--rp-card); border-radius: var(--rp-radius);
  -webkit-mask:
    radial-gradient(circle at 0 var(--cut), #0000 var(--notch), #000 calc(var(--notch) + .5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% var(--cut), #0000 var(--notch), #000 calc(var(--notch) + .5px)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle at 0 var(--cut), #0000 var(--notch), #000 calc(var(--notch) + .5px)) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% var(--cut), #0000 var(--notch), #000 calc(var(--notch) + .5px)) right / 51% 100% no-repeat;
}
.rep-poster { position: relative; aspect-ratio: 5 / 7; overflow: hidden; border-radius: var(--rp-radius) var(--rp-radius) 0 0; }
.rep-poster__img, .rep-ph { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--rp-ease); }
.rep-card:hover .rep-poster__img, .rep-card:hover .rep-ph { transform: scale(1.05); }
.rep-poster::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(43,15,12,.1); border-radius: inherit; }
.rep-ph {
  display: grid; place-items: center; padding: 22px; text-align: center; box-sizing: border-box;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,.55) 0 14%, transparent 15%),
    radial-gradient(circle at 80% 85%, rgba(255,255,255,.25) 0 22%, transparent 23%),
    linear-gradient(160deg, hsl(var(--h) 75% 74%), hsl(calc(var(--h) + 45) 60% 50%));
  font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 18px; line-height: 1.15; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.18);
}
.rep-ph span { transform: rotate(-6deg); }

.rep-poster__desc {
  position: absolute; inset: auto 0 0 0; z-index: 2; padding: 56px 16px 16px; color: #fff; font-size: 13px; line-height: 1.45;
  background: linear-gradient(to top, rgba(43,15,12,.94) 35%, transparent);
  transform: translateY(101%); transition: transform .45s var(--rp-ease);
}
.rep-poster__desc p { margin: 0 0 10px; }
.rep-more { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--rp-gold); }
.rep-card:hover .rep-poster__desc, .rep-card:focus-within .rep-poster__desc { transform: none; }

.rep-stamp {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--rp-brand); color: #fff; font: 700 14px "Unbounded", sans-serif;
  outline: 1.5px dashed rgba(255,255,255,.7); outline-offset: -5px; box-shadow: 0 6px 14px -4px rgba(0,0,0,.4);
  transform: rotate(10deg); transition: transform .45s var(--rp-ease);
}
.rep-card:hover .rep-stamp { transform: rotate(-6deg) scale(1.08); }
.rep-ribbon {
  position: absolute; top: 18px; left: -6px; z-index: 3; background: var(--rp-gold); color: var(--rp-ink);
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 5px 12px 5px 14px;
  border-radius: 0 4px 4px 0; box-shadow: 0 4px 10px -4px rgba(0,0,0,.35);
}
.rep-ribbon::after { content: ""; position: absolute; left: 0; bottom: -6px; border-top: 6px solid #9c6b0a; border-left: 6px solid transparent; }

.rep-card__body {
  flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 20px 18px 16px;
  background: repeating-linear-gradient(90deg, var(--rp-line) 0 6px, transparent 6px 11px) center top / calc(100% - 2 * var(--notch) - 14px) 2px no-repeat;
}
.rep-card__title { margin: 0; font-family: "Lora", serif; font-weight: 700; font-size: 17px; line-height: 1.3; text-wrap: balance; color: var(--rp-ink); }
.rep-card__link { color: inherit; text-decoration: none; }
.rep-card__link::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: var(--rp-radius); }
.rep-card__link:focus-visible { outline: none; }
.rep-card:has(.rep-card__link:focus-visible) { outline: 3px solid var(--rp-gold); outline-offset: 3px; }
.rep-card__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rep-tags { list-style: none; margin: 0; padding: 0; display: contents; }
.rep-tags li { display: contents; }
.rep-tag {
  position: relative; z-index: 5; font: 700 11px/1.3 "Manrope", sans-serif; color: var(--rp-muted);
  background: rgba(110,22,22,.05); border: 1px solid var(--rp-line); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
button.rep-tag { cursor: pointer; transition: border-color .15s, background .15s; }
button.rep-tag:hover { border-color: var(--rp-brand); }
button.rep-tag.is-active { background: rgba(110,22,22,.16); border-color: rgba(110,22,22,.5); color: var(--rp-ink); }
.rep-dur { flex: none; margin-left: auto; padding-left: 4px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12.5px; font-weight: 700; color: var(--rp-muted); }
.rep-dur svg { opacity: .7; }

/* ── Пусто ── */
.rep-empty-state { text-align: center; padding: 48px 24px 40px; }
.rep-empty-state[hidden] { display: none; }
.rep-empty-state__art { font: 600 64px/1 "Playfair Display", serif; font-style: italic; color: var(--rp-accent); opacity: .5; }
.rep-empty-state h2 { margin: 16px 0 8px; font-family: "Lora", serif; font-size: 24px; color: var(--rp-ink); }
.rep-empty-state p { margin: 0 0 20px; color: var(--rp-muted); }
.rep-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; background: var(--rp-brand); color: #fff; font: 800 13px "Manrope", sans-serif; padding: 11px 20px; border-radius: 999px; transition: background .25s; }
.rep-btn:hover { background: var(--rp-brand-2); }

/* ── Архив ── */
.rep-archive { border-top: 1px solid var(--rp-line); padding-top: 3rem; }
.rep-archive__title { font-family: "Lora", serif; font-size: 1.9rem; color: var(--rp-ink); margin: 0; }
.rep-archive__lead { margin: 0.4rem 0 1.8rem; color: var(--rp-muted); max-width: 40rem; }
.rep-grid--archive .rep-poster__img { filter: grayscale(.55); transition: filter .3s, transform .8s var(--rp-ease); }
.rep-grid--archive .rep-card:hover .rep-poster__img { filter: none; }

/* ── Анимации ── */
@supports (animation-timeline: view()) {
  .rep-card { animation: rep-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
}
@keyframes rep-rise { from { opacity: 0; translate: 0 36px; } }
::view-transition-group(*) { animation-duration: .4s; animation-timing-function: var(--rp-ease); }
@media (prefers-reduced-motion: reduce) {
  .rep-section *, .rep-section *::before, .rep-section *::after { animation: none !important; transition: none !important; }
}

/* ── Главная: CTA-плитка в конце сетки ── */
.rep-cta {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 100%; box-sizing: border-box; padding: 26px 22px; border-radius: var(--rp-radius);
  background:
    radial-gradient(circle at 85% 15%, rgba(227,169,43,.35) 0 18%, transparent 19%),
    radial-gradient(circle at 10% 95%, rgba(255,255,255,.08) 0 30%, transparent 31%),
    var(--rp-brand);
  color: #fff; text-decoration: none; overflow: hidden;
  transition: transform .45s var(--rp-ease), box-shadow .45s var(--rp-ease);
}
.rep-cta:hover { transform: translateY(-6px); box-shadow: 0 24px 44px -16px rgba(110,22,22,.6); }
.rep-cta:focus-visible { outline: 3px solid var(--rp-gold); outline-offset: 3px; }
.rep-cta__num { font: 700 64px/1 "Unbounded", sans-serif; letter-spacing: -.03em; }
.rep-cta__text { font-family: "Lora", serif; font-size: 20px; font-weight: 700; line-height: 1.25; margin: 10px 0 0; color: #fff; }
.rep-cta__go { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--rp-gold); }
.rep-cta__go svg { transition: transform .3s var(--rp-ease); }
.rep-cta:hover .rep-cta__go svg { transform: translateX(5px); }
#fp-repertoire .rep-grid { margin-top: 0; }
/* на телефоне — первые 5 афиш и плитка */
@media (max-width: 639px) { #fp-repertoire .rep-grid > li.rep-wide-only { display: none; } }
/* бордовая плитка на тёмной секции — светлая рамка */
body.page-dark #fp-repertoire .rep-cta, #fp-repertoire.fp-calendar-dark .rep-cta { box-shadow: inset 0 0 0 1px rgba(227,169,43,.35); }
/* Главная: 10 плиток = 5 + 5 */
@media (min-width: 1024px) { #fp-repertoire .rep-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 1023px) { #fp-repertoire .rep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { #fp-repertoire .rep-grid { grid-template-columns: minmax(0, 1fr); } }

/* Главная: без выезжающего описания на афише */
#fp-repertoire .rep-poster__desc { display: none; }
/* плитка «+N» — цвета шапки календаря (бордовая вкладка) */
#fp-repertoire .rep-cta {
  background:
    radial-gradient(circle at 85% 15%, #C08729 0 18%, transparent 19%),
    radial-gradient(circle at 10% 95%, #37518C 0 30%, transparent 31%),
    linear-gradient(180deg, #B6313A, #750E17);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
#fp-repertoire .rep-cta:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 24px 44px -16px rgba(117,14,23,.6); }
#fp-repertoire .rep-cta__go { color: #ffc069; }
body.page-dark #fp-repertoire .rep-cta, #fp-repertoire.fp-calendar-dark .rep-cta { box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
/* Главная: без приближения афиши при наведении */
#fp-repertoire .rep-card:hover .rep-poster__img, #fp-repertoire .rep-card:hover .rep-ph { transform: none; }

/* Главная: карточка только приподнимается, без доворота (вращение штампа возраста остаётся) */
#fp-repertoire .rep-card:hover, #fp-repertoire .rep-card:focus-within,
#fp-repertoire .rep-card:nth-child(even):hover, #fp-repertoire .rep-card:nth-child(even):focus-within { transform: translateY(-6px); }
