/* =========================================================================
   Ticketing — кастомный слой поверх Tailwind.
   Шрифты подключаются в partials/assets.blade.php (без дубля @import).
   ========================================================================= */

/* ---------- Базовое ---------- */
:root {
  /* Как на bilet96.ru: розовые кнопки/ссылки + фиолетово-синий градиент шапки */
  --brand: #ed1c94;
  --brand-dark: #6a0dac;
  --brand-active: #580e8c;
  --brand-purple: #6c1dae;
  --brand-blue: #0d1bb1;
  --brand-gradient: linear-gradient(to bottom, #6c1dae 0%, #0d1bb1 100%);
  --ink: #212121;
  --muted: #545454;
  --line: #ededed;
  --cloud: #f2f3f9;
  --label: #972fec;
  --head-h: 120px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(237, 28, 148, .12);
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

::selection { background: var(--brand); color: #fff; }

/* Скроллбар */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cloud); }
::-webkit-scrollbar-thumb { background: #c9cbd8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ---------- Контейнер ---------- */
.wrapper {
  max-width: 1210px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* ---------- Кнопка-пилюля ---------- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 44px;
  padding: 0 28px;
  border-radius: 50px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 5px 20px rgba(237, 28, 148, .5);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn-pill:hover { background: var(--brand-blue); box-shadow: 0 10px 30px rgba(13, 27, 177, .35); }
.btn-pill:active { background: #091590; transform: translateY(1px); }
.btn-pill.small { height: 40px; font-size: 10px; padding: 0 20px; }
.btn-pill.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn-pill.ghost:hover { background: var(--brand); color: #fff; }
.btn-pill.dark { background: #fff; color: var(--ink); }
.btn-pill.dark:hover { background: var(--brand); color: #fff; }
.btn-pill[disabled] {
  background: #d7d9e3;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Логотип ---------- */
.site-logo {
  display: block;
  width: auto;
  height: 44px;
  max-width: min(210px, 48vw);
}
.site-logo--light { height: 44px; }
.site-logo--color { height: 40px; }
@media (max-width: 639px) {
  .site-logo--light { height: 36px; }
  .site-logo--color { height: 34px; }
}

/* ---------- Шапка ---------- */
/* fixed, не sticky: overflow-x:hidden на html/body ломает sticky в браузерах. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: #fff;
}
.site-header.is-scrolled {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}
.js-head-spacer {
  width: 100%;
  flex-shrink: 0;
  pointer-events: none;
}

.top-panel { background: var(--brand-gradient); position: relative; z-index: 2; }
.bg-brand-gradient { background: var(--brand-gradient); }
.white-panel { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 1; }
.top-panel.is-search-open { z-index: 5; }

.top-nav-link { position: relative; }
.top-nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: #fff;
  transition: width .25s ease;
}
.top-nav-link:hover::after { width: 100%; }

.main-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 19px;
  font-size: 16px;
  color: var(--ink);
  transition: color .2s ease;
}
.main-nav-link::after {
  content: '';
  position: absolute;
  left: 19px; right: 19px; bottom: 0;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.main-nav-link:hover { color: var(--brand); }
.main-nav-link:hover::after,
.main-nav-link.is-active::after { transform: scaleX(1); }
.main-nav-link.is-active { color: var(--brand); }

.main-navigation {
  flex: 1 1 auto;
  min-width: 0;
}

.main-navigation > ul {
  flex-wrap: nowrap;
}

/* Выпадашки шапки */
.dropdown-box {
  position: absolute;
  top: calc(100% + 10px);
  z-index: 70;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.dropdown-box.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-box.right-0::before { left: auto; right: 24px; }
.dropdown-box::before {
  content: '';
  position: absolute;
  top: -6px; left: 24px;
  width: 12px; height: 12px;
  background: #fff;
  transform: rotate(45deg);
}

/* ---------- Календарь ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.cal-cell.is-empty { pointer-events: none; }
.cal-cell.is-dim { color: #b9bbc6; }
.cal-cell.has-event { font-weight: 700; color: var(--brand); }
.cal-cell.has-event::after {
  content: '';
  position: absolute;
  margin-top: 22px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--brand);
}
.cal-cell:not(.is-empty):hover { background: var(--brand); color: #fff; }
.cal-cell:not(.is-empty):hover::after { background: #fff; }
.cal-cell.is-today { border: 1px solid var(--brand); }

/* ---------- Постеры ---------- */
/* Если у мероприятия есть фотография (data.js -> img), она подставляется
   фоном; градиент остаётся запасным вариантом, пока картинка грузится. */
.poster {
  position: relative;
  overflow: hidden;
  background-color: #2b2b3d;
  background-size: cover;
  background-position: 50% 50%;
  isolation: isolate;
}
.poster::after {
  /* лёгкая «плёнка» поверх градиента */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .18), transparent 60%),
    linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .55) 100%);
}
.poster.has-photo::after { background: none; }
.poster-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 14px 16px;
  font-family: 'PT Sans', 'Roboto', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
.poster-deco {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .55;
  background-repeat: no-repeat;
}
.poster.has-photo .poster-deco { display: none; }

.p-g1  { background-image: linear-gradient(140deg, #ff5f6d 0%, #ffc371 100%); }
.p-g2  { background-image: linear-gradient(140deg, #4776e6 0%, #8e54e9 100%); }
.p-g3  { background-image: linear-gradient(140deg, #11998e 0%, #38ef7d 100%); }
.p-g4  { background-image: linear-gradient(140deg, #ed1c94 0%, #7b2ff7 100%); }
.p-g5  { background-image: linear-gradient(140deg, #0f2027 0%, #2c5364 100%); }
.p-g6  { background-image: linear-gradient(140deg, #f7971e 0%, #ffd200 100%); }
.p-g7  { background-image: linear-gradient(140deg, #b92b27 0%, #1565c0 100%); }
.p-g8  { background-image: linear-gradient(140deg, #614385 0%, #516395 100%); }
.p-g9  { background-image: linear-gradient(140deg, #1f4037 0%, #99f2c8 100%); }
.p-g10 { background-image: linear-gradient(140deg, #ff512f 0%, #dd2476 100%); }
.p-g11 { background-image: linear-gradient(140deg, #2b5876 0%, #4e4376 100%); }
.p-g12 { background-image: linear-gradient(140deg, #c31432 0%, #240b36 100%); }

.poster-deco.d-dots {
  background-image: radial-gradient(rgba(255, 255, 255, .55) 1.5px, transparent 1.6px);
  background-size: 16px 16px;
}
.poster-deco.d-rings {
  background-image:
    radial-gradient(circle at 78% 22%, transparent 28px, rgba(255, 255, 255, .35) 29px, transparent 30px),
    radial-gradient(circle at 78% 22%, transparent 48px, rgba(255, 255, 255, .25) 49px, transparent 50px),
    radial-gradient(circle at 78% 22%, transparent 68px, rgba(255, 255, 255, .18) 69px, transparent 70px);
}
.poster-deco.d-lines {
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .18) 0 2px, transparent 2px 14px);
}
.poster-deco.d-wave {
  background-image:
    radial-gradient(60% 40% at 20% 90%, rgba(255, 255, 255, .35), transparent 70%),
    radial-gradient(50% 35% at 85% 75%, rgba(255, 255, 255, .25), transparent 70%);
}

/* ---------- Карточка события ---------- */
.event-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.event-card .inner {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.event-card:hover .inner { box-shadow: 0 14px 34px rgba(0, 0, 0, .17); transform: translateY(-4px); }
.event-card .poster { transition: transform .5s ease; }
.event-card .event-poster {
  width: 100%;
  height: auto;
  aspect-ratio: 210 / 297;
}
.event-card:hover .poster { transform: scale(1.04); }
.event-card .card-title {
  transition: color .2s ease;
  /* Tailwind CDN не генерит классы из JS-шаблонов — clamp здесь */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.5em;
  line-height: 1.25;
}
.event-card:hover .card-title { color: var(--brand); }
.event-card .card-meta {
  margin-top: auto;
}
.event-card .card-meta .card-venue {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.type-label {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 11px;
  border-radius: 4px;
  background: var(--label);
  color: #fff;
  font-size: 10px;
  letter-spacing: .8px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Карусели ---------- */
.carousel {
  position: relative;
  overflow: hidden;
  /* Не даём браузеру «утащить» страницу вбок по широкому track — свайп обрабатывает JS */
  touch-action: pan-y;
}
.carousel-track {
  display: flex;
  will-change: transform;
  transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}
.carousel-track.no-anim { transition: none !important; }
.carousel-slide { flex: 0 0 100%; }

/* Горизонтальные табы на главной — скролл только внутри ряда */
.js-tabs-row {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.js-tabs-row::-webkit-scrollbar { display: none; height: 0; }
.js-tabs-row .tab-link {
  flex-shrink: 0;
  white-space: nowrap;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  opacity: 0;
  transition: opacity .25s ease, background .2s ease, color .2s ease;
}
.carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: var(--brand); color: #fff; }
.carousel-arrow.prev { left: 20px; }
.carousel-arrow.next { right: 20px; }

.carousel-dots { display: flex; align-items: center; justify-content: center; gap: 8px; }
.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ededed;
  transition: background .2s ease, transform .2s ease;
}
.carousel-dot.is-active { background: var(--brand); transform: scale(1.15); }

/* ---------- Слайдер главной (как на bilet96.ru) ---------- */
#home-slider {
  overflow: hidden;
  margin-bottom: 20px;
  background: #fff;
}
.home-slider-wrap { padding: 40px 0; background: #fff; }
.home-hero-carousel {
  position: relative;
  overflow: hidden;
  background: #fff;
}
.home-hero-carousel .carousel-track {
  background: #fff;
}
.home-hero-carousel .carousel-slide {
  min-width: 0;
  transition: opacity .35s ease;
  background: transparent;
}
.home-hero-carousel .carousel-slide:not(.is-center) {
  opacity: .92;
}
@media (min-width: 1024px) {
  .home-hero-carousel .carousel-slide {
    overflow: visible;
    z-index: 1;
  }
  .home-hero-carousel .carousel-slide.is-center {
    z-index: 3;
  }
  /* Белый зазор между слайдами (gap карусели), без перекрытия */
  .home-hero-carousel .carousel-slide .hero-slide-inner {
    width: 100%;
    margin-left: 0;
    position: relative;
  }
  .home-hero-carousel .carousel-slide:not(.is-center) .hero-slide-inner::before {
    display: none;
  }
}
.home-hero-carousel .carousel-slide .hero-slide-inner {
  box-shadow: none;
}
.home-hero-carousel .carousel-slide.is-center .hero-slide-inner {
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
.hero-slide-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 979 / 460;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background-color: #2b2b3d;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  color: #fff;
}
.hero-slide-inner.has-photo {
  background-color: transparent;
}
.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}
.hero-slide-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to right, rgba(0, 1, 0, 1) 0%, rgba(80, 79, 114, 0) 52%);
}
.hero-slide-content {
  position: relative;
  z-index: 2;
  padding: 62px 60px 80px;
  max-width: 720px;
}
.hero-title {
  font-family: 'PT Sans', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.25;
  margin: 0 0 30px;
  color: #fff;
  text-shadow: 0 0 15px rgba(0, 0, 0, .9);
}
.hero-info-row {
  margin: 0 0 17px;
  position: relative;
}
.hero-info-row span {
  display: block;
  font-size: 16px;
  padding-left: 37px;
  font-weight: 300;
  color: #fff;
  position: relative;
}
.hero-info-row span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.hero-info-location span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M12 21s7-4.5 7-11a7 7 0 1 0-14 0c0 6.5 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}
.hero-info-date span::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 11h18'/%3E%3C/svg%3E");
}
.hero-cta { margin-top: 8px; }
.hero-cta .btn-pill { min-width: 200px; height: 50px; }
.hero-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 0 10px 25px;
}
.home-hero-carousel .carousel-arrow.prev { left: 12px; }
.home-hero-carousel .carousel-arrow.next { right: 12px; }
.rec-photo-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f2f2f2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.rec-photo-wrap.has-photo {
  background-color: #1a1a1a;
}
.rec-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.rec-photo-wrap .poster {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

/* Резерв места до JS — меньше CLS при перезагрузке */
#site-header {
  min-height: 112px;
}
#site-header:not(:empty) {
  min-height: 0;
}
#home-slider:empty {
  min-height: 360px;
  background: #f5f5f5;
}
#home-grid:empty {
  min-height: 420px;
}
#features:empty {
  min-height: 160px;
}
@media (max-width: 768px) {
  #site-header { min-height: 96px; }
  #home-slider:empty { min-height: 280px; }
}
/* ---------- Промо-баннер под афишей ---------- */
.home-promo {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  background: #2b1055 center / cover no-repeat;
  max-width: 1150px;
  margin: 0 auto;
}
.home-promo__inner {
  position: relative;
  z-index: 2;
  padding: 58px 230px 58px 42%;
  line-height: 1.2;
}
.home-promo__title {
  margin: 0 0 10px;
  font-size: 30px;
  color: #fff;
}
.home-promo__subtitle {
  margin: 0;
  font-size: 16px;
  color: #ffec17;
}
.home-promo__cta {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  width: 200px;
}

/* ---------- Баннер между преимуществами и приветствием ---------- */
.home-banner {
  max-width: 1150px;
  margin: 0 auto;
}
.home-banner__link {
  display: block;
  border-radius: 5px;
  overflow: hidden;
  transition: opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.home-banner__link:hover { opacity: .92; }
.home-banner__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  object-fit: contain;
  background: #1a2a5a;
  vertical-align: top;
}
.home-banner .em-node.home-banner__img,
.home-banner img.em-node {
  min-height: 80px;
  background: #f2f3f9;
}

@media (max-width: 1023px) {
  .home-banner {
    max-width: none;
    width: 100%;
    padding: 0 16px;
  }
  .home-banner__link {
    border-radius: 5px;
    background: #0f1a3a;
  }
  .home-banner__img,
  .home-banner .em-node.home-banner__img,
  .home-banner img.em-node {
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    border-radius: 5px;
    object-fit: contain;
    object-position: center;
  }
}

@media (max-width: 767px) {
  .home-banner {
    padding: 0;
  }
  .home-banner__link {
    border-radius: 0;
  }
  .home-banner__img,
  .home-banner .em-node.home-banner__img,
  .home-banner img.em-node {
    border-radius: 0;
  }
}

/* ---------- Табы каталога ---------- */
.tab-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100px;
  padding: 0 22px;
  font-size: 24px;
  color: #9b9db0;
  white-space: nowrap;
  transition: color .2s ease;
}
.tab-link:first-child { padding-left: 0; }
.tab-link:hover { color: var(--ink); }
.tab-link.is-active { color: var(--brand); }

.tabs-underline { position: relative; height: 3px; background: var(--line); }
.tabs-underline .line {
  position: absolute;
  left: 0; top: 0;
  height: 3px;
  background: var(--brand);
  transition: transform .3s ease, width .3s ease;
}

/* ---------- Фичи ---------- */
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 130px; height: 130px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--cloud);
  color: var(--brand);
  transition: transform .3s ease, background .3s ease, color .3s ease;
}
.home-feature:hover .feature-icon { transform: translateY(-6px); background: var(--brand); color: #fff; }

/* ---------- Подписка перед футером ---------- */
.footer-subscribe {
  background: linear-gradient(180deg, #f3ecf9 0%, #e6ebf8 100%);
  padding: 48px 0 52px;
  border-top: 1px solid rgba(108, 29, 174, .12);
}
.footer-subscribe .wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer-subscribe__title {
  margin: 0 0 20px;
  max-width: 520px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.footer-subscribe__form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
}
.footer-subscribe__input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 48px;
  padding: 0 20px;
  border: none;
  border-radius: 50px;
  background: #fff;
  font-size: 16px; /* iOS не зумит при фокусе */
  line-height: 1.25;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.footer-subscribe__input::placeholder { color: #9b9db0; }
.footer-subscribe__input:focus {
  box-shadow: 0 0 0 2px rgba(237, 28, 148, .25);
}
.footer-subscribe__btn {
  flex-shrink: 0;
  height: 48px;
  min-height: 48px;
  padding: 0 28px;
  border: none;
  border-radius: 50px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.footer-subscribe__btn:hover { background: var(--brand-blue); }
.footer-subscribe__btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.footer-subscribe__msg {
  margin: 14px 0 0;
  max-width: 520px;
  font-size: 13px;
}
.footer-subscribe__box {
  width: 100%;
  max-width: 520px;
}
.footer-subscribe__consents {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  text-align: left;
}
.footer-subscribe__msg.is-success { color: var(--brand); }
.footer-subscribe__msg.is-error { color: #c62828; }
@media (max-width: 767px) {
  .footer-subscribe {
    padding: 28px 0 32px;
  }
  .footer-subscribe .wrapper {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    width: 100%;
    box-sizing: border-box;
  }
  .footer-subscribe__title {
    font-size: 17px;
    margin-bottom: 16px;
    padding: 0 4px;
  }
  .footer-subscribe__form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-width: none;
    width: 100%;
  }
  .footer-subscribe__input,
  .footer-subscribe__btn {
    width: 100%;
    max-width: 100%;
    flex: none;
    height: 52px;
    min-height: 52px;
  }
  .footer-subscribe__btn {
    padding: 0 20px;
  }
  .footer-subscribe__msg {
    max-width: none;
    width: 100%;
    text-align: left;
    padding: 0 2px;
  }
  .footer-subscribe__box {
    max-width: none;
  }
}

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink); color: #8f8f8f; }
.site-footer a { color: #d7d7d7; transition: color .2s ease; }
.site-footer a:hover { color: var(--brand); }
.platform-credit--stack {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.platform-credit__label { color: #8f8f8f; }
.platform-credit__link { color: #d7d7d7; }
.platform-credit__link:hover { color: var(--brand); }
.f-title {
  color: #fff;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #3a3a3a;
  color: #d7d7d7;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.social-btn:hover,
.site-footer a.social-btn:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.social-btn--max { font-size: 9px; letter-spacing: .04em; }

/* ---------- Страница события ---------- */
.event-about__text {
  overflow: hidden;
  transition: max-height .35s ease;
}
.event-about__text.is-collapsed {
  mask-image: linear-gradient(180deg, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.event-about__toggle {
  margin-top: 12px;
  color: var(--brand);
  font-size: 14px;
  text-transform: lowercase;
  transition: color .2s ease;
}
.event-about__toggle:hover { color: var(--brand-blue); }

.event-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  width: 70%;
  max-width: 100%;
}
@media (min-width: 640px) {
  .event-media {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .event-media {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.event-media__item {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #1a1a1a;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(22, 24, 41, .08);
}
.event-media__item img,
.event-media__item .event-media__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.event-media__item:hover img,
.event-media__item:hover .event-media__thumb { transform: scale(1.04); }
.event-media__item--video {
  color: #fff;
}
.event-media__item--video .event-media__thumb {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #1a1a1a;
}
.event-media__thumb--empty {
  background: linear-gradient(145deg, #2a2a2a, #111);
}
.event-media__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand);
  font-size: 11px;
  padding-left: 2px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  pointer-events: none;
}
.event-media__item:hover .event-media__play {
  transform: translate(-50%, -50%) scale(1.06);
}

.event-media-modal {
  z-index: 120;
  padding: 0;
  background: transparent;
}
.event-media-modal[hidden] { display: none !important; }
.event-media-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
}
.event-media-modal__panel {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.event-media-modal__stage {
  width: 100%;
  max-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
}
.event-media-modal__img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}
.event-media-modal__video {
  width: min(900px, 100%);
  max-height: calc(100vh - 80px);
  border-radius: 8px;
  background: #000;
}
.event-media-modal .event-video {
  width: min(900px, 100%);
}
.event-media-modal__close {
  position: absolute;
  top: -8px;
  right: -4px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.event-media-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.event-media-modal__nav--prev { left: -8px; }
.event-media-modal__nav--next { right: -8px; }
.event-media-modal__nav.hidden { display: none; }
.event-media-modal__counter {
  margin-top: 12px;
  color: rgba(255,255,255,.8);
  font-size: 13px;
}

.event-video {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  aspect-ratio: 16 / 9;
}
.event-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.event-video--link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cloud);
  aspect-ratio: auto;
  min-height: 120px;
}

/* ---------- Мобильное меню ---------- */
.m-nav {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 90;
  width: 290px;
  background: #fff;
  box-shadow: 4px 0 30px rgba(0, 0, 0, .25);
  transform: translateX(-100%);
  transition: transform .3s ease;
  overflow-y: auto;
}
.m-nav.is-open { transform: translateX(0); }
.m-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.m-overlay.is-open { opacity: 1; visibility: visible; }

/* ---------- Поиск ---------- */
.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  z-index: 80;
  max-height: 380px;
  overflow-y: auto;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}
.search-suggest:empty { display: none; }

/* Мобильный поиск: разворачивается поверх логотипа */
.top-search-expand {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  background: var(--brand-gradient);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(28%) scaleX(.86);
  transform-origin: right center;
  transition: opacity .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1), visibility .22s;
}
.top-panel.is-search-open .top-search-expand {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.top-panel.is-search-open .js-top-logo,
.top-panel.is-search-open .top-panel-actions,
.top-panel.is-search-open .js-m-open {
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.js-top-logo,
.top-panel-actions,
.top-panel .js-m-open {
  transition: opacity .18s ease;
}
.top-search-expand__field {
  position: relative;
  flex: 1;
  min-width: 0;
}
.top-search-expand__input {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 16px; /* iOS: без зума при фокусе */
  padding: 0 44px 0 16px;
  outline: none;
  transition: background .2s ease;
}
.top-search-expand__input::placeholder {
  color: rgba(255, 255, 255, .7);
}
.top-search-expand__input:focus {
  background: rgba(255, 255, 255, .25);
}
.top-search-expand__find {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.top-search-expand__close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-right: -4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Подсказки поиска на мобилке — под строкой, на ширину шапки */
.js-search-mobile .search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: max(0px, env(safe-area-inset-left));
  right: max(0px, env(safe-area-inset-right));
  width: auto;
  max-width: none;
  max-height: min(65vh, 440px);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .28);
  z-index: 120;
}
.js-search-mobile .search-suggest a {
  padding: 14px 16px;
}
@media (min-width: 768px) {
  .top-search-expand { display: none !important; }
}

/* ---------- Схема зала (страница события) ---------- */
.hall {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 10px;
  background: var(--cloud);
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}
.hall-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  padding: 0 4px 4px;
}
.hall-stage {
  width: 62%;
  min-width: 220px;
  padding: 9px 0;
  border-radius: 0 0 60px 60px;
  background: linear-gradient(180deg, #3d3d4d, #21212b);
  color: #fff;
  text-align: center;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hall-row { display: flex; align-items: center; gap: 5px; }
.hall-row-num {
  width: 22px;
  font-size: 11px;
  color: #9b9db0;
  text-align: center;
  flex: 0 0 22px;
}
.seat {
  width: 20px; height: 20px;
  border-radius: 4px 4px 2px 2px;
  border: none;
  cursor: pointer;
  flex: 0 0 auto;
  position: relative;
  background: var(--seat-color, #cfd1dc);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-radius .12s ease, opacity .15s ease;
}
.seat:hover:not(.is-taken):not(.is-picked) { transform: scale(1.25); box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.seat.z1 { --seat-color: #ed1c94; }
.seat.z2 { --seat-color: #7b2ff7; }
.seat.z3 { --seat-color: #23a6d5; }
.seat.z4 { --seat-color: #2ecc71; }
.seat.is-taken { background: #cfd1dc; cursor: not-allowed; transform: none; box-shadow: none; }
.seat.is-taken:hover { transform: none; box-shadow: none; }
.hall.is-filtering .seat:not(.is-taken):not(.is-price-on):not(.is-picked) {
  opacity: .16;
  pointer-events: none;
}
.hall .seat.is-hint:not(.is-taken),
.hall .seat.is-picked,
.hall .seat.is-picked:hover:not(.is-taken) {
  border-radius: 50%;
  transform: scale(1.5);
  box-shadow: 0 0 0 2px #1c1c28, 0 3px 10px rgba(0, 0, 0, .28);
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
}
.hall .seat.is-hint:not(.is-taken)::after,
.hall .seat.is-picked::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
}

.price-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.price-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 10px;
  border: 1px solid #ececf2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 28, 40, .04);
  font-size: 13px;
  color: #1c1c28;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.price-chip:hover { border-color: #d5d6e0; }
.price-chip.is-on {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(237, 28, 148, .12);
}
.price-chip.is-all { padding-right: 10px; color: #5b5d6e; }
.price-chip.is-static { cursor: default; color: #8b8d9c; box-shadow: none; }
.price-chip-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 12px;
}
.price-more { position: relative; }
.price-more-chevron { width: 16px; height: 16px; margin-left: 2px; }
.price-more.is-open .price-more-chevron { transform: rotate(180deg); }
.price-more-list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 160px;
  padding: 8px;
  background: #fff;
  border: 1px solid #ececf2;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(28, 28, 40, .12);
  flex-direction: column;
  gap: 6px;
}
.price-more.is-open .price-more-list { display: flex; }
.price-more-list .price-chip { width: 100%; justify-content: flex-start; }

.seat-balloon {
  position: fixed;
  z-index: 90;
  left: 0;
  top: 0;
  min-width: 118px;
  padding: 10px 14px 11px;
  background: #fff;
  color: #1c1c28;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(28, 28, 40, .18), 0 0 0 1px rgba(28, 28, 40, .06);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-100% - 12px)) scale(.96);
  transition: opacity .12s ease, transform .12s ease, visibility .12s;
}
.seat-balloon.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, calc(-100% - 12px)) scale(1);
}
.seat-balloon::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 2px 2px 4px rgba(28, 28, 40, .08);
  border-radius: 1px;
}
.seat-balloon-price {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.seat-balloon-sector {
  margin-top: 2px;
  font-size: 13px;
  color: #6b6d7e;
  line-height: 1.2;
}
.seat-balloon-place {
  margin-top: 1px;
  font-size: 12px;
  color: #8b8d9c;
  line-height: 1.2;
}

/* ---------- Модалка ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-box {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  transform: translateY(20px) scale(.98);
  transition: transform .25s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal.is-open .modal-box { transform: translateY(0) scale(1); }

.field {
  width: 100%;
  max-width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid #e0e1e9;
  border-radius: 5px;
  font-size: 16px; /* не меньше 16px — иначе iOS зумит форму */
  line-height: 1.25;
  transition: border-color .2s ease, box-shadow .2s ease;
  background: #fff;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.field:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(237, 28, 148, .12);
}
select.field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23545454' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
textarea.field {
  height: auto;
  min-height: 120px;
  padding-top: 12px;
  padding-bottom: 12px;
}
@media (max-width: 767px) {
  .field {
    height: 48px;
    min-height: 48px;
    font-size: 16px;
  }
  textarea.field {
    height: auto;
    min-height: 120px;
  }
  input[type="date"].field {
    min-height: 48px;
  }
}

/* ---------- Аккордеон (FAQ) ---------- */
.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.acc-item.is-open .acc-body { max-height: 600px; }
.acc-item.is-open .acc-chevron { transform: rotate(180deg); }
.acc-chevron { transition: transform .3s ease; }

/* ---------- Появление при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Кнопка «наверх» + VK: столбик справа внизу ---------- */
:root {
  --fab-edge: 26px;
  --fab-stack-gap: 14px;
  --vk-fab-size: 64px;
  --to-top-size: 46px;
}
.to-top {
  position: fixed;
  right: var(--fab-edge);
  bottom: var(--fab-edge);
  z-index: 72;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--to-top-size);
  height: var(--to-top-size);
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(237, 28, 148, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, bottom .25s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* VK снизу, «наверх» над ним — не в одной точке */
body.has-vk-messages .to-top {
  bottom: calc(var(--fab-edge) + var(--vk-fab-size) + var(--fab-stack-gap)) !important;
}
body.has-vk-messages #vk_community_messages {
  z-index: 71;
}

/* Кнопка VK (инжект openapi) — низ правого угла, ниже «наверх» */
body.has-vk-messages #vk_community_messages iframe,
body.has-vk-messages [id^="vkwidget"],
body.has-vk-messages .wcm_button,
body.has-vk-messages #community_messages_button,
body.has-vk-messages #official,
body.has-vk-messages div[class*="button"] {
  z-index: 71 !important;
}

/* ---------- Утилиты ---------- */
.body-lock { overflow: hidden; }
.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f6f6f6 37%, #eee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- Адаптив ---------- */
/* iPad landscape / узкий десктоп: больше колонок = карточки меньше, постеры уже A4 */
@media (min-width: 1024px) and (max-width: 1279px) {
  #home-grid,
  #afisha-grid,
  .similar-events .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    column-gap: 12px !important;
    row-gap: 1.25rem !important;
  }
  .event-card .card-title {
    font-size: 14px !important;
    min-height: 2.3em;
  }
  .event-card .flex.flex-col.flex-1 {
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 12px !important;
  }
  .event-card .card-meta .font-display {
    font-size: 22px !important;
  }
  .event-card .btn-pill.small {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 36px;
    font-size: 12px;
  }
  .event-card .type-label {
    height: 26px;
    padding: 0 8px;
    font-size: 9px;
  }
}

@media (max-width: 1023px) {
  .home-slider-wrap { padding: 0; }
  .hero-slide-content { padding: 32px 30px 70px; }
  .hero-title { font-size: 36px; margin-bottom: 20px; }
  .home-promo__inner { padding: 45px 230px 45px 32%; }
  .tab-link { height: 72px; font-size: 20px; }
  .js-city-wrap { display: none; }
  .white-panel { overflow: hidden; }
  .white-panel .wrapper {
    gap: 0;
    min-width: 0;
  }
  .main-navigation {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none; /* Firefox — без полосы под меню */
    -ms-overflow-style: none;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .main-navigation::-webkit-scrollbar {
    display: none; /* Chrome/Safari — убираем ненужный горизонтальный скроллбар */
    height: 0;
  }
  .main-navigation ul {
    width: max-content;
    flex-wrap: nowrap;
  }
  .main-navigation li,
  .main-nav-link {
    flex-shrink: 0;
  }
  .main-nav-link {
    padding: 0 14px;
    font-size: 15px;
    white-space: nowrap;
  }
  .main-nav-link::after { left: 14px; right: 14px; }
  .search-suggest {
    left: 0;
    right: 0;
    width: auto;
    max-width: min(420px, calc(100vw - 30px));
  }

  /* Планшет (портрет): 2 колонки, постеры A4 */
  #home-grid,
  #afisha-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Слайдер — как на мобилке: full-bleed, текст поверх */
  .home-slider-wrap { padding: 0; }
  .home-hero-carousel .carousel-slide {
    flex: 0 0 100% !important;
  }
  .home-hero-carousel .carousel-slide:not(.is-center) { opacity: 1; }
  .home-hero-carousel .carousel-arrow { display: none; }

  .hero-slide-inner.has-photo {
    display: block;
    position: relative;
    height: auto;
    min-height: 0;
    aspect-ratio: 979 / 460;
    border-radius: 0;
    box-shadow: none;
    background: #1a1a1a;
    overflow: hidden;
  }
  .hero-slide-inner.has-photo::before {
    display: block;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, .88) 0%,
      rgba(0, 0, 0, .55) 42%,
      rgba(0, 0, 0, .15) 70%,
      transparent 100%
    );
  }
  .hero-slide-inner.has-photo .hero-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    background: #1a1a1a;
  }
  .hero-slide-inner.has-photo .hero-slide-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    flex: none;
    padding: 20px 16px 40px;
    max-width: none;
    text-align: left;
    margin: 0;
    color: #fff;
    background: transparent;
  }
  .hero-slide-inner.has-photo .hero-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .65);
  }
  .hero-slide-inner.has-photo .hero-info-row { margin-bottom: 8px; }
  .hero-slide-inner.has-photo .hero-info-row span {
    display: block;
    font-size: 13px;
    color: #fff;
    padding-left: 28px;
    text-align: left;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
  }
  .hero-slide-inner.has-photo .hero-info-location span::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M12 21s7-4.5 7-11a7 7 0 1 0-14 0c0 6.5 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
  }
  .hero-slide-inner.has-photo .hero-info-date span::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 11h18'/%3E%3C/svg%3E");
  }
  .hero-slide-inner.has-photo .hero-cta {
    display: flex;
    justify-content: flex-start;
    margin-top: 12px;
  }
  .hero-slide-inner.has-photo .hero-cta .btn-pill {
    min-width: 160px;
    height: 44px;
  }
  .hero-carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    padding: 0 16px;
    background: transparent;
    pointer-events: none;
  }
  .hero-carousel-dots .carousel-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    pointer-events: auto;
    background: rgba(255, 255, 255, .45);
  }
  .hero-carousel-dots .carousel-dot.is-active {
    background: var(--brand);
  }

  .hero-slide-inner:not(.has-photo) {
    border-radius: 0;
    box-shadow: none;
    aspect-ratio: 979 / 460;
    min-height: 0;
  }
  .hero-slide-inner:not(.has-photo)::before { background: rgba(0, 0, 0, .65); }
  .hero-slide-inner:not(.has-photo) .hero-slide-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 20px 36px;
    max-width: none;
    text-align: center;
    margin: 0 auto;
  }
  .hero-slide-inner:not(.has-photo) .hero-title { font-size: 22px; margin-bottom: 12px; }
  .hero-slide-inner:not(.has-photo) .hero-info-row { margin-bottom: 8px; }
  .hero-slide-inner:not(.has-photo) .hero-info-row span {
    font-size: 13px;
    display: inline-block;
    text-align: left;
  }
  .hero-slide-inner:not(.has-photo) .hero-cta { display: flex; justify-content: center; }

  /* «Рекомендуем» — как было: горизонтальные 16:9, 2 в ряд */
  #recommended-wrap {
    margin-top: 4px;
    margin-bottom: 2rem !important;
  }
  #recommended-wrap h2 {
    font-size: 22px;
    margin-bottom: 0.75rem;
  }
  #recommended .rec-photo-wrap {
    aspect-ratio: 16 / 9;
    max-height: none;
  }
  #recommended .rec-title {
    margin-top: 0.5rem !important;
    font-size: 13px !important;
    line-height: 1.25;
  }
  #recommended .carousel-arrow {
    width: 36px;
    height: 36px;
    margin-top: -18px;
    opacity: 1;
  }
  #recommended .carousel-arrow.prev { left: 2px; }
  #recommended .carousel-arrow.next { right: 2px; }
}

@media (max-width: 768px) {
  /* Преимущества: 2 колонки, компактнее */
  #features {
    gap: 1.25rem 0.75rem !important;
  }
  #features .home-feature {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
  #features .feature-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
  }
  #features .feature-icon span {
    width: 2.25rem !important;
    height: 2.25rem !important;
  }
  #features .home-feature > p:first-of-type {
    font-size: 14px !important;
    margin-bottom: 4px !important;
    line-height: 1.25;
  }
  #features .home-feature > p:last-of-type {
    font-size: 12px !important;
    line-height: 1.35;
    max-width: none !important;
  }

  .similar-events {
    margin-bottom: 2.5rem !important;
  }
  .similar-events h2 {
    font-size: 20px !important;
    margin-bottom: 0.75rem !important;
  }

  /* Афиша: чуть плотнее сетка на узком экране */
  #home-grid,
  #afisha-grid {
    column-gap: 10px !important;
    row-gap: 1.25rem !important;
  }
  .event-card .inner {
    min-height: 0;
  }
  .event-card .card-title {
    font-size: 14px !important;
  }
  .event-card .flex.flex-col.flex-1 {
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 12px !important;
  }
  .event-card .card-meta .font-display {
    font-size: 22px !important;
  }
  .event-card .btn-pill.small {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 36px;
    font-size: 12px;
  }

  /* Мобилка: слайдер выше на 20% (было 979/460) */
  .hero-slide-inner.has-photo,
  .hero-slide-inner:not(.has-photo) {
    aspect-ratio: 979 / 552;
  }
}
@media (max-width: 639px) {
  .home-promo { border-radius: 0; }
  .home-promo__inner { padding: 35px 30px; max-width: 600px; margin: 0 auto; }
  .home-promo__title { font-size: 16px; }
  .home-promo__subtitle { font-size: 13px; }
  .home-promo__cta {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: 200px;
    margin-top: 20px;
  }
  .tab-link { height: 60px; font-size: 17px; padding: 0 14px; }
  .carousel-arrow { display: none; }
  .feature-icon { width: 72px; height: 72px; margin-bottom: 12px; }
  .to-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(14px + var(--safe-bottom));
  }
  body.has-vk-messages {
    --fab-edge: max(14px, env(safe-area-inset-right));
  }
  body.has-vk-messages .to-top {
    bottom: calc(14px + var(--safe-bottom) + var(--vk-fab-size) + var(--fab-stack-gap)) !important;
  }
  .main-nav-link {
    padding: 0 12px;
    font-size: 14px;
  }
  .main-nav-link::after { left: 12px; right: 12px; }
  .seat {
    width: 28px;
    height: 28px;
    border-radius: 5px 5px 2px 2px;
    touch-action: manipulation;
  }
  .hall {
    padding: 18px 6px 14px;
    align-items: stretch;
  }
  .hall-stage {
    width: auto;
    min-width: 0;
    margin: 0 22px 8px;
  }
  .hall-row { gap: 4px; }
  .modal {
    padding: 12px;
    padding-bottom: calc(12px + var(--safe-bottom));
    align-items: flex-end;
  }
  .modal-box {
    padding: 20px 16px;
    max-height: 92vh;
    border-radius: 12px 12px 0 0;
  }
  .event-cart {
    position: sticky;
    bottom: 0;
    z-index: 40;
    margin-top: 8px;
    padding-bottom: var(--safe-bottom);
  }
  .event-cart > div {
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .12);
  }
  body[data-page="event"] .to-top {
    bottom: calc(110px + var(--safe-bottom));
  }
  body[data-page="event"].has-vk-messages .to-top {
    bottom: calc(110px + var(--safe-bottom) + var(--vk-fab-size) + var(--fab-stack-gap)) !important;
  }
  .wrapper {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  /* Hit-area ≥ 44px для иконок шапки (перебиваем Tailwind w-*/h-*) */
  .top-panel button.js-m-open,
  .top-panel button.js-search-toggle,
  .top-panel a.js-top-phone,
  .m-nav button.js-m-close {
    box-sizing: content-box;
    min-width: 44px !important;
    min-height: 44px !important;
    width: auto !important;
    height: auto !important;
    padding: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .top-panel .wrapper { gap: 8px; }
  .event-card { content-visibility: auto; contain-intrinsic-size: 320px; }
}

.ya-widget-frame {
  width: 100%;
  min-height: 640px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.ya-widget-frame iframe {
  width: 100% !important;
  min-height: 640px;
  border: 0;
}

.it-hall {
  width: 100%;
}
.it-hall-frame {
  display: block;
  width: 100%;
  min-height: 720px;
  height: min(85vh, 960px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.it-seances { border-top: 1px solid #eef1f5; }
.it-seance {
  display: grid;
  grid-template-columns: 110px 70px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eef1f5;
}
.it-seance.is-active {
  background: rgba(59, 111, 216, .06);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px;
}
.it-seance__day { font-size: 34px; font-weight: 700; line-height: 1; color: #1a2a44; }
.it-seance__month { color: #8892a0; font-size: 13px; margin-top: 2px; }
.it-seance__weekday { color: #8892a0; font-size: 13px; }
.it-seance__time { font-size: 20px; font-weight: 700; color: #1a2a44; }
.it-seance__venue { font-weight: 600; color: #1a2a44; }
.it-seance__addr { color: #8892a0; font-size: 13px; margin-top: 2px; }
.it-seance__status { color: #8892a0; font-weight: 700; }
a.widget-price, a.it-seance__buy, button.it-seance__buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: #3b6fd8;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease;
}
a.widget-price:hover, a.it-seance__buy:hover, button.it-seance__buy:hover { background: #2f5cbc; }
button.it-seance__buy.is-active { background: #1e4aa8; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
@media (max-width: 767px) {
  .it-seance { grid-template-columns: 1fr; gap: 8px; }
  .it-hall-frame { min-height: 560px; height: 75vh; border-radius: 0; }
  .ya-widget-frame { min-height: 560px; border-radius: 0; }
  .ya-widget-frame iframe { min-height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .carousel-track { transition: none !important; }
  .poster, .event-card .poster { transition: none !important; }
}
