:root {
  --legacy-pink: #c90068;
  --legacy-blue: #006fb8;
  --legacy-ink: #20202a;
  --legacy-soft-pink: #fff0f7;
  --legacy-soft-blue: #eef9ff;
}

/* Стабильная сетка каталога: контент первого филиала уже занимает место до запуска JS. */
#catalog-branch-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 2rem);
  grid-template-columns: minmax(100px, 0.34fr) repeat(2, minmax(0, 1fr));
}

#catalog-branch-grid .col1 { grid-column: 1; }
#catalog-branch-grid .col2 { grid-column: 2; }
#catalog-branch-grid .col3 { grid-column: 3; }
#catalog-branch-grid .row1 { grid-row: 1; }
#catalog-branch-grid .row2 { grid-row: 2; }
#catalog-branch-grid .row3 { grid-row: 3; }
#catalog-branch-grid .row4 { grid-row: 4; }
#catalog-branch-grid .row5 { grid-row: 5; }
#catalog-branch-grid .row6 { grid-row: 6; }

@media (max-width: 768px) {
  #catalog-branch-grid {
    grid-template-columns: minmax(72px, 0.32fr) minmax(0, 1fr);
  }

  #catalog-branch-grid .grid-item {
    display: none;
  }

  #catalog-branch-grid .grid-item.visible {
    display: block;
  }

  #catalog-branch-grid .col1 { grid-column: 1; }
  #catalog-branch-grid .col2,
  #catalog-branch-grid .col3 { grid-column: 2; }
}

.hero-buttons h1,
.page-header h1,
.contact-title,
.webland__title,
.detail-header h1 {
  font-weight: 800;
}

.hero-buttons > h1 {
  flex: 0 0 100%;
  font-size: calc(1.325rem + 0.9vw);
  margin: 0;
  text-align: center;
}

.page-header h1 {
  font-size: calc(1.325rem + 0.9vw);
  margin-bottom: 2.25rem;
}

.detail-header h1 {
  display: block;
  font-size: var(--font-size-xl);
  line-height: 48px;
  max-width: 100%;
  text-align: center;
}

@media (min-width: 1200px) {
  .hero-buttons > h1,
  .page-header h1 {
    font-size: 2rem;
  }
}

.nav-logo img {
  display: block;
  height: auto;
  max-height: 104px;
  max-width: 220px;
  object-fit: contain;
  width: auto;
}

.footer-list[data-branch] strong {
  color: var(--legacy-pink);
  font-size: 1.05rem;
}

.footer-legal {
  color: var(--dark-color);
  font-size: 0.86rem;
  line-height: 1.45;
  margin-top: 0.55rem;
}

.tooltip.is-open .tooltip-dialog,
.nav-buttons.desktop .tooltip:hover .tooltip-dialog,
.nav-buttons.desktop .tooltip:focus-within .tooltip-dialog {
  opacity: 1;
  visibility: visible;
  z-index: 3;
}

.nav-buttons .tooltip-dialog {
  transition: none;
}

.legacy-cabinet-button {
  align-items: center;
  border-radius: 13px;
  box-sizing: border-box;
  display: inline-flex;
  font-size: 16px;
  font-weight: 400;
  justify-content: center;
  line-height: 24px;
  min-height: 40px;
  max-width: 100%;
  padding: 8px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.legacy-cabinet-button:focus-visible {
  outline: 3px solid rgba(236, 0, 124, 0.28);
  outline-offset: 3px;
}

@media (min-width: 1200px) and (max-width: 1719.98px) {
  .navbar-collapse {
    display: grid;
    gap: 0.35rem 0;
    grid-template-areas:
      "logo menu"
      "logo actions";
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .navbar-collapse > .div_nav-logo {
    grid-area: logo;
  }

  .navbar-collapse > .ul_li {
    grid-area: menu;
    min-width: 0;
  }

  .navbar-collapse > .ul_li .nav-menu {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .navbar-collapse > .nav-buttons.desktop {
    grid-area: actions;
    justify-content: flex-end;
    justify-self: end;
  }

  .navbar-collapse > .nav-buttons.mobile {
    display: none !important;
  }
}

.legacy-info-section {
  background: linear-gradient(180deg, #fff 0%, #fff7fb 100%);
  padding: clamp(1.25rem, 2.5vw, 2.5rem) 0 clamp(3rem, 6vw, 6rem);
}

.legacy-section-heading {
  margin: 0 auto 2rem;
  max-width: 900px;
  text-align: center;
}

.legacy-section-heading h2,
.legacy-license-card h2,
.legacy-founder-card h2 {
  color: var(--legacy-ink);
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 1rem;
}

.legacy-section-heading > p:last-child {
  font-size: 1.1rem;
  margin: 0 auto;
  max-width: 720px;
}

.legacy-eyebrow {
  color: var(--legacy-pink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

.legacy-benefit-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.legacy-benefit-card {
  background: #fff;
  border: 1px solid rgba(229, 10, 127, 0.16);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(75, 25, 56, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.5rem;
}

.legacy-benefit-card--navigator {
  background: var(--legacy-soft-blue);
  border-color: rgba(5, 145, 230, 0.28);
}

.legacy-benefit-card h3 {
  color: var(--legacy-ink);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0.9rem 0 0.6rem;
}

.legacy-benefit-card > p {
  margin: 0 0 1rem;
}

.legacy-benefit-icon {
  align-items: center;
  align-self: flex-start;
  background: var(--legacy-pink);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  min-width: 42px;
  padding: 0.45rem 0.8rem;
}

.legacy-benefit-card--navigator .legacy-benefit-icon {
  background: var(--legacy-blue);
}

.legacy-accordion-button {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(32, 32, 42, 0.1);
  color: var(--legacy-pink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  margin-top: auto;
  padding: 0.9rem 0 0;
  text-align: left;
}

.legacy-accordion-button::after {
  content: "+";
  float: right;
  font-size: 1.25rem;
}

.legacy-accordion-button[aria-expanded="true"]::after {
  content: "−";
}

.legacy-accordion-content {
  display: none;
  padding-top: 0.8rem;
}

.legacy-accordion-content.is-open {
  display: block;
}

.legacy-accordion-content ol {
  margin: 0;
  padding-left: 1.25rem;
}

.legacy-accordion-content li + li {
  margin-top: 0.45rem;
}

.legacy-license-founder-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.legacy-license-card,
.legacy-founder-card {
  background: #fff;
  border: 1px solid rgb(229 10 127 / 12%);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgb(75 25 56 / 8%);
  min-width: 0;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.legacy-license-card--featured {
  align-items: center;
  background: linear-gradient(135deg, #fff 0%, #fff8fb 58%, #fff0f7 100%);
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  padding: clamp(1.35rem, 3vw, 2.4rem);
  position: relative;
}

.legacy-license-copy,
.legacy-license-visual {
  min-width: 0;
  position: relative;
}

.legacy-license-copy {
  z-index: 3;
}

.legacy-license-visual {
  z-index: 2;
}

.legacy-license-lead {
  font-size: clamp(0.98rem, 1.3vw, 1.12rem);
  line-height: 1.48;
  margin: 0.8rem 0 1.1rem;
}

.legacy-license-benefits {
  display: grid;
  gap: 0.78rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.legacy-license-benefits li {
  line-height: 1.45;
  padding-left: 2rem;
  position: relative;
}

.legacy-license-benefits li::before {
  color: var(--legacy-pink);
  content: "✓";
  font-size: 1.25rem;
  font-weight: 800;
  left: 0;
  position: absolute;
  top: -0.1rem;
}

.legacy-license-benefits strong,
.legacy-license-benefits span {
  display: block;
}

.legacy-license-benefits strong {
  color: var(--legacy-ink);
  font-size: 1.05rem;
}

.legacy-license-benefits span {
  color: #5f5f69;
  margin-top: 0.12rem;
}

.legacy-license-benefit-row {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.legacy-license-benefit--interactive {
  z-index: 1;
}

.legacy-license-benefit--interactive.is-open {
  z-index: 40;
}

.legacy-benefit-more {
  align-items: center;
  align-self: center;
  background: #fff;
  border: 1px solid rgb(229 10 127 / 32%);
  border-radius: 50%;
  color: var(--legacy-pink);
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.legacy-benefit-more span {
  color: inherit;
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1;
  margin: 0;
  transform-origin: center;
  transition: transform 180ms ease;
}

.legacy-benefit-more[aria-expanded="true"] {
  background: var(--legacy-pink);
  color: #fff;
}

.legacy-benefit-more[aria-expanded="true"] span {
  transform: rotate(45deg);
}

.legacy-benefit-more:is(:hover, :focus-visible) {
  box-shadow: 0 0 0 4px rgb(229 10 127 / 13%);
  outline: none;
}

.legacy-benefit-popover {
  background: #fff;
  border: 0 solid rgb(229 10 127 / 18%);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgb(75 25 56 / 10%);
  display: grid;
  grid-template-rows: 0fr;
  left: auto;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  position: relative;
  top: auto;
  transform: none;
  transition: grid-template-rows 200ms ease, opacity 160ms ease, margin 200ms ease, border-width 0s linear 200ms, visibility 0s linear 200ms;
  visibility: hidden;
  width: 100%;
  z-index: 2;
}

.legacy-license-benefit--interactive.is-open .legacy-benefit-popover {
  border-width: 1px;
  grid-template-rows: 1fr;
  margin-top: 0.65rem;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
  visibility: visible;
}

.legacy-benefit-popover-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  transition: padding 200ms ease;
}

.legacy-license-benefit--interactive.is-open .legacy-benefit-popover-inner {
  padding: 0.95rem 1rem 1rem;
}

.legacy-benefit-popover h3 {
  color: var(--legacy-ink);
  font-size: 1.15rem;
  margin: 0 0 0.7rem;
  padding-right: 2rem;
}

.legacy-benefit-popover p {
  color: #4f4f59;
  line-height: 1.5;
  margin: 0;
}

.legacy-benefit-popover p + p {
  margin-top: 0.65rem;
}

.legacy-license-files summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  list-style: none;
  min-height: 48px;
}

.legacy-license-files summary::-webkit-details-marker {
  display: none;
}

.legacy-license-files summary::after {
  content: "+";
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  margin-left: 0.75rem;
}

.legacy-license-files[open] summary::after {
  content: "−";
}

.legacy-license-files summary:focus-visible,
.legacy-license-files a:focus-visible {
  outline: 3px solid rgb(5 145 230 / 38%);
  outline-offset: 3px;
}

.legacy-license-visual {
  padding: 0.25rem 0;
}

.legacy-license-splat {
  bottom: -2.5rem;
  height: auto;
  opacity: 0.11;
  pointer-events: none;
  position: absolute;
  right: -2.5rem;
  transform: rotate(-7deg);
  width: min(42%, 230px);
  z-index: 0;
}

.legacy-license-images {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 455px;
  min-height: 470px;
  padding: 0 0 5%;
  position: relative;
  z-index: 1;
}

.legacy-license-sheet {
  background: #fff;
  border: 1px solid var(--gray-color);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgb(32 32 42 / 14%);
  margin: 0;
  overflow: hidden;
}

.legacy-license-sheet img {
  display: block;
  height: auto;
  width: 100%;
}

.legacy-license-sheet--back {
  position: absolute;
  right: 0;
  top: 4%;
  transform: rotate(2.5deg);
  width: 72%;
  z-index: 1;
}

.legacy-license-sheet--front {
  left: 0;
  position: relative;
  width: 72%;
  z-index: 2;
}

.legacy-license-page-link {
  align-items: center;
  background: var(--legacy-pink);
  border: 2px solid var(--legacy-pink);
  border-radius: 999px;
  color: #fff !important;
  display: flex;
  font-weight: 800;
  gap: 0.75rem;
  justify-content: center;
  margin: 0.25rem auto 0;
  max-width: 455px;
  min-height: 50px;
  padding: 0.65rem 1.25rem;
  position: relative;
  text-align: center;
  text-decoration: none !important;
  z-index: 3;
}

.legacy-license-page-link:hover,
.legacy-license-page-link:focus-visible {
  background: #c90068;
  border-color: #c90068;
}

.legacy-license-page-link:focus-visible {
  outline: 3px solid rgb(229 10 127 / 24%);
  outline-offset: 3px;
}

.legacy-license-files {
  margin: -0.25rem auto 0;
  max-width: 480px;
  position: relative;
  z-index: 3;
}

.legacy-license-files summary {
  background: var(--legacy-pink);
  border-radius: 999px;
  color: #fff;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  text-align: center;
}

.legacy-license-files > div {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.8rem 0.35rem 0;
}

.legacy-license-files a {
  align-items: center;
  background: #fff;
  border: 1px solid rgb(229 10 127 / 28%);
  border-radius: 999px;
  color: var(--legacy-pink);
  display: flex;
  font-size: 0.9rem;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  text-align: center;
  text-decoration: none;
}

.legacy-license-files a:hover {
  background: var(--legacy-soft-pink);
  color: var(--legacy-pink);
}

.legacy-founder-card {
  align-items: stretch;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  padding: 0;
}

.legacy-founder-photo {
  border-radius: 20px;
  display: block;
  height: 100%;
  max-height: none;
  min-height: 540px;
  object-fit: cover;
  object-position: center 18%;
  width: 100%;
}

.legacy-founder-content {
  background: linear-gradient(145deg, #e50a7f 0%, #ef3a96 55%, #ff84bf 100%);
  border-radius: 20px;
  color: #fff;
  min-width: 0;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  position: relative;
}

.legacy-founder-content::before,
.legacy-founder-content::after {
  background: rgb(255 255 255 / 10%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
}

.legacy-founder-content::before {
  height: 420px;
  right: -150px;
  top: -190px;
  width: 420px;
}

.legacy-founder-content::after {
  bottom: -210px;
  height: 390px;
  left: -140px;
  width: 390px;
}

.legacy-founder-role,
.legacy-founder-content h2,
.legacy-founder-story {
  position: relative;
  z-index: 1;
}

.legacy-founder-role {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 500;
  margin: 0 0 0.65rem;
}

.legacy-founder-content h2 {
  color: #fff;
  font-size: clamp(2rem, 3.35vw, 3.35rem);
  line-height: 0.98;
  margin: 0 0 clamp(1.3rem, 3vw, 2rem);
  max-width: 760px;
  text-transform: uppercase;
}

.legacy-founder-story {
  background: #fff;
  border-radius: 16px;
  color: var(--legacy-ink);
  padding: clamp(1.2rem, 2.25vw, 1.9rem);
}

.legacy-founder-story p {
  line-height: 1.45;
  margin: 0;
}

.legacy-founder-story p + p {
  margin-top: 0.85rem;
}

.legacy-founder-intro {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 700;
}

.teacher-img {
  flex: 0 0 auto;
  height: 190px !important;
  overflow: hidden;
  width: 190px !important;
  border-radius: 50% !important;
}

.teacher-img img {
  border-radius: 50% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top;
  width: 100% !important;
}

.legacy-dance-teachers > h2 {
  margin-bottom: 1.35rem;
}

.legacy-dance-teachers .legacy-dance-teacher-card {
  align-items: start;
  background: #fff;
  border: 1px solid rgb(229 10 127 / 12%);
  border-radius: 18px;
  box-shadow: 5px 5px 23px rgb(158 158 158 / 15%);
  display: grid;
  gap: clamp(1.25rem, 2.7vw, 2.2rem);
  grid-template-columns: 190px minmax(0, 1fr) minmax(230px, 25%);
  margin: 1rem 0;
  padding: clamp(1.15rem, 2.5vw, 1.75rem);
}

.legacy-dance-teachers .legacy-dance-teacher-card--no-video {
  grid-template-columns: 190px minmax(0, 1fr);
}

.legacy-dance-teachers .legacy-dance-teacher-card .teacher-img {
  margin: 0 !important;
}

.legacy-dance-teachers .legacy-dance-teacher-card .teacher-info-text {
  min-width: 0;
  padding: 0;
}

.legacy-dance-teachers .legacy-dance-teacher-card .teacher-info-text > div:first-child {
  color: var(--legacy-pink);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.legacy-dance-teachers .legacy-dance-teacher-card .teacher-fio {
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.1;
  margin-bottom: 0.85rem;
}

.legacy-dance-teachers .legacy-dance-teacher-card .teacher-achievements {
  color: var(--text-color);
  font-size: 0.92rem;
  line-height: 1.45;
}

.legacy-dance-teachers .legacy-dance-teacher-card .teacher-achievements .bulleted-list {
  margin: 0;
  padding: 0;
}

.legacy-teacher-video {
  align-self: start;
  background: #17171b;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.legacy-teacher-video-label {
  align-items: flex-start;
  background: linear-gradient(180deg, rgb(16 16 19 / 82%) 0%, transparent 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  left: 0;
  padding: 0.85rem 0.95rem 2.4rem;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

.legacy-teacher-video-label span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.8;
  text-transform: uppercase;
}

.legacy-teacher-video-label strong {
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.legacy-teacher-video video {
  aspect-ratio: 16 / 9;
  background: #17171b;
  display: block;
  height: auto;
  min-height: 0;
  object-fit: contain;
  width: 100%;
}

.legacy-dance-video-carousel {
  height: auto !important;
  max-width: 630px;
  overflow: visible;
  padding-bottom: 32px;
  position: relative;
}

.legacy-dance-video-carousel::before {
  content: none !important;
}

.legacy-dance-video-viewport {
  background: #17171b;
  border-radius: 24px;
  box-shadow: 0 16px 36px rgb(30 25 29 / 18%);
  overflow: hidden;
  touch-action: pan-y;
}

.legacy-dance-video-track {
  display: flex;
  transform: translate3d(0, 0, 0);
  transition: transform 380ms ease;
  will-change: transform;
}

.legacy-dance-video-slide {
  flex: 0 0 100%;
  min-width: 0;
  position: relative;
}

.legacy-dance-video-slide video {
  aspect-ratio: 16 / 9;
  background: #17171b;
  border-radius: 0 !important;
  display: block;
  height: auto !important;
  inset: auto !important;
  object-fit: contain;
  position: static !important;
  width: 100%;
}

.legacy-dance-video-label {
  background: var(--legacy-pink);
  border-radius: 999px;
  box-shadow: 0 5px 16px rgb(229 10 127 / 28%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  left: 14px;
  letter-spacing: 0.045em;
  padding: 0.45rem 0.75rem;
  pointer-events: none;
  position: absolute;
  text-transform: uppercase;
  top: 14px;
  z-index: 3;
}

.legacy-dance-video-arrow {
  align-items: center;
  background: #fff;
  border: 2px solid var(--legacy-pink);
  border-radius: 50%;
  box-shadow: 0 7px 18px rgb(30 25 29 / 16%);
  color: var(--legacy-pink);
  cursor: pointer;
  display: flex;
  font-size: 2.35rem;
  height: 46px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 0.18rem;
  position: absolute;
  top: calc(50% - 16px);
  transform: translateY(-50%);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
  width: 46px;
  z-index: 4;
}

.legacy-dance-video-arrow--prev {
  left: -18px;
}

.legacy-dance-video-arrow--next {
  right: -18px;
}

.legacy-dance-video-arrow:is(:hover, :focus-visible) {
  background: var(--legacy-pink);
  color: #fff;
  outline: none;
  transform: translateY(-50%) scale(1.06);
}

.legacy-dance-video-dots {
  align-items: center;
  bottom: 4px;
  display: flex;
  gap: 9px;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
}

.legacy-dance-video-dot {
  background: rgb(229 10 127 / 22%);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 9px;
  padding: 0;
  transition: background-color 180ms ease, width 180ms ease;
  width: 9px;
}

.legacy-dance-video-dot.is-active {
  background: var(--legacy-pink);
  width: 28px;
}

.legacy-dance-video-dot:focus-visible {
  outline: 3px solid rgb(229 10 127 / 24%);
  outline-offset: 3px;
}

@media (max-width: 1199.98px) {
  .legacy-dance-teachers .legacy-dance-teacher-card {
    grid-template-columns: 170px minmax(0, 1fr) 240px;
  }

  .legacy-dance-teachers .legacy-dance-teacher-card .teacher-img {
    height: 170px !important;
    width: 170px !important;
  }

  .legacy-dance-teachers .legacy-dance-teacher-card--no-video {
    grid-template-columns: 170px minmax(0, 1fr);
  }
}

@media (max-width: 991.98px) {
  .legacy-dance-teachers .legacy-dance-teacher-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .legacy-dance-teachers .legacy-dance-teacher-card .teacher-img {
    height: 150px !important;
    width: 150px !important;
  }

  .legacy-dance-teachers .legacy-dance-teacher-card--no-video {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .legacy-dance-teachers .legacy-dance-teacher-card .legacy-teacher-video {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .legacy-dance-teachers .legacy-dance-teacher-card .legacy-teacher-video video {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 575.98px) {
  .legacy-dance-video-carousel {
    padding-bottom: 28px;
  }

  .legacy-dance-video-viewport {
    border-radius: 20px;
  }

  .legacy-dance-video-label {
    font-size: 0.7rem;
    left: 10px;
    padding: 0.38rem 0.62rem;
    top: 10px;
  }

  .legacy-dance-video-arrow {
    height: 40px;
    top: calc(50% - 14px);
    width: 40px;
  }

  .legacy-dance-video-arrow--prev {
    left: 8px;
  }

  .legacy-dance-video-arrow--next {
    right: 8px;
  }

  .legacy-dance-teachers .legacy-dance-teacher-card {
    grid-template-columns: 1fr;
  }

  .legacy-dance-teachers .legacy-dance-teacher-card--no-video {
    grid-template-columns: 1fr;
  }

  .legacy-dance-teachers .legacy-dance-teacher-card .teacher-img {
    margin: 0 auto !important;
  }

  .legacy-dance-teachers .legacy-dance-teacher-card .teacher-info-text {
    text-align: left;
  }

  .legacy-dance-teachers .legacy-dance-teacher-card .legacy-teacher-video {
    grid-column: auto;
  }
}

.branch-records {
  display: grid !important;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.branch-record {
  background: #fff;
  border: 1px solid rgba(229, 10, 127, 0.18);
  border-radius: 20px;
  padding: 1.25rem;
}

.branch-record h2 {
  color: var(--legacy-pink);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.7rem;
}

.branch-record p {
  margin: 0 0 0.5rem;
}

.btn-icon.max {
  background: transparent;
  border: 0;
  height: 33px;
  overflow: visible;
  padding: 0;
  width: 33px;
}

.btn-icon.max img {
  display: block;
  height: 33px;
  width: 33px;
}

.btn-icon.max:is(:hover, :focus-visible, :active) {
  background: transparent;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-icon.max.legacy-max-pending {
  cursor: default;
  opacity: 0.72;
}

.legacy-phone-trigger {
  cursor: pointer;
}

body.legacy-phone-dialog-open {
  overflow: hidden;
}

.legacy-phone-dialog[hidden] {
  display: none;
}

.legacy-phone-dialog {
  align-items: center;
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 1rem;
  position: fixed;
  z-index: 1100;
}

.legacy-phone-dialog-backdrop {
  background: rgba(30, 17, 26, 0.55);
  inset: 0;
  position: absolute;
}

.legacy-phone-dialog-panel {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(60, 20, 46, 0.24);
  max-width: 440px;
  padding: clamp(1.5rem, 5vw, 2.25rem);
  position: relative;
  width: 100%;
  z-index: 1;
}

.legacy-phone-dialog-panel:focus {
  outline: none;
}

.legacy-phone-dialog-close {
  align-items: center;
  background: var(--legacy-pink);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.7rem;
  height: 40px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 3px;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 40px;
}

.legacy-phone-dialog-close:is(:hover, :focus-visible) {
  box-shadow: 0 0 0 4px rgba(229, 10, 127, 0.18);
}

.legacy-phone-dialog-label {
  color: var(--legacy-pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin: 0 3.25rem 0.45rem 0;
  text-transform: uppercase;
}

.legacy-phone-dialog-panel h2 {
  color: var(--legacy-ink);
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 3rem 0.8rem 0;
}

.legacy-phone-dialog-help {
  color: #58515a;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.legacy-phone-dialog-number {
  color: var(--legacy-ink);
  display: block;
  font-size: clamp(1.45rem, 5.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
}

.legacy-phone-dialog-number:is(:hover, :focus-visible) {
  color: var(--legacy-pink);
}

.legacy-phone-dialog-call {
  align-items: center;
  background: var(--legacy-pink);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 1rem;
  font-weight: 800;
  justify-content: center;
  min-height: 52px;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  width: 100%;
}

.legacy-phone-dialog-call:is(:hover, :focus-visible) {
  box-shadow: 0 0 0 4px rgba(229, 10, 127, 0.18);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .btn-icon.max,
  .legacy-benefit-more span,
  .legacy-benefit-popover,
  .legacy-benefit-popover-inner {
    transition: none;
  }
}

.legacy-analytics-consent {
  align-items: center;
  background: #fff;
  border: 1px solid rgb(229 10 127 / 22%);
  border-radius: 20px;
  bottom: 1rem;
  box-shadow: 0 18px 48px rgb(47 20 38 / 20%);
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  left: 50%;
  max-width: 1120px;
  padding: 1rem 1.1rem;
  position: fixed;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  z-index: 10050;
}

.legacy-analytics-consent[hidden] {
  display: none;
}

.legacy-analytics-consent__copy {
  color: #33202d;
  max-width: 720px;
}

.legacy-analytics-consent__copy strong {
  color: var(--legacy-pink);
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.legacy-analytics-consent__copy p {
  line-height: 1.45;
  margin: 0 0 0.3rem;
}

.legacy-analytics-consent__copy a {
  color: #7f174f;
  font-weight: 700;
}

.legacy-analytics-consent__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.6rem;
}

.legacy-analytics-consent__actions button,
.legacy-policy__consent-reset {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 44px;
  padding: 0.65rem 1rem;
}

.legacy-analytics-consent__accept,
.legacy-policy__consent-reset {
  background: var(--legacy-pink);
  color: #fff;
}

.legacy-analytics-consent__reject {
  background: #f4e9ef;
  color: #54233d;
}

.legacy-analytics-consent__actions button:focus-visible,
.legacy-policy__consent-reset:focus-visible {
  outline: 3px solid rgb(229 10 127 / 28%);
  outline-offset: 2px;
}

.legacy-policy-section {
  padding-bottom: 4rem;
}

.legacy-policy {
  color: #382733;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 920px;
}

.legacy-policy h2 {
  color: #7f174f;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  margin: 2rem 0 0.65rem;
}

.legacy-policy p {
  margin: 0 0 0.85rem;
}

.legacy-policy__updated {
  color: #6a5361;
}

@media (max-width: 767.98px) {
  .legacy-analytics-consent {
    align-items: stretch;
    bottom: 0.6rem;
    flex-direction: column;
    gap: 0.85rem;
    width: calc(100% - 1rem);
  }

  .legacy-analytics-consent__actions {
    flex-direction: column;
  }

  .legacy-analytics-consent__actions button {
    width: 100%;
  }
}

/* Афиша: единая сетка месяцев и события в логике PWA */
.legacy-afisha-main {
  --afisha-pink: #ed1764;
  --afisha-pink-soft: #fff0f5;
  --afisha-yellow: #f7c84b;
  --afisha-yellow-soft: #fff8df;
  --afisha-blue: #55add8;
  --afisha-blue-soft: #edf8fd;
  --afisha-ink: #17171b;
  --afisha-muted: #69686f;
  --afisha-line: #e8e5e7;
  background: #fff;
  color: var(--afisha-ink);
  min-height: 60vh;
}

.legacy-afisha-section {
  padding: clamp(1.25rem, 2vw, 2rem) 0 clamp(4rem, 7vw, 7rem);
}

.legacy-afisha-shell {
  max-width: 1240px;
}

.legacy-afisha-heading {
  align-items: end;
  display: grid;
  gap: 0.65rem 2rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.legacy-afisha-heading .legacy-afisha-kicker {
  grid-column: 1;
}

.legacy-afisha-heading h1 {
  font-size: clamp(3rem, 7vw, 6.5rem);
  grid-column: 1;
  grid-row: 1;
  letter-spacing: -0.055em;
  line-height: 0.9;
  margin: 0;
}

.legacy-afisha-heading p {
  color: var(--afisha-muted);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  grid-column: 2;
  grid-row: 1;
  line-height: 1.48;
  margin: 0 0 0.45rem;
  max-width: 660px;
}

.legacy-afisha-kicker {
  color: var(--afisha-pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legacy-month-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legacy-month-card {
  aspect-ratio: 1.18 / 1;
  border: 1px solid rgb(23 23 27 / 6%);
  border-radius: 26px;
  color: var(--afisha-ink) !important;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  justify-content: flex-end;
  min-height: 270px;
  overflow: hidden;
  padding: clamp(1.25rem, 2.7vw, 2rem);
  position: relative;
  text-decoration: none !important;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.legacy-month-card::before,
.legacy-month-card::after {
  border: 2px solid rgb(255 255 255 / 58%);
  border-radius: 999px;
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.legacy-month-card::before {
  height: 210px;
  right: -55px;
  top: -92px;
  width: 210px;
}

.legacy-month-card::after {
  height: 74px;
  right: 42px;
  top: 46px;
  width: 74px;
}

.legacy-month-card:hover {
  box-shadow: 0 18px 40px rgb(41 24 34 / 13%);
  transform: translateY(-4px);
}

.legacy-month-card:focus-visible,
.legacy-event-card:focus-visible,
.legacy-event-dialog-close:focus-visible,
.legacy-event-dialog a:focus-visible {
  outline: 3px solid var(--afisha-ink);
  outline-offset: 4px;
}

.legacy-month-card--pink {
  background: linear-gradient(145deg, #ffdce9 0%, #fff1f6 100%);
}

.legacy-month-card--yellow {
  background: linear-gradient(145deg, #ffe88b 0%, #fff7d6 100%);
}

.legacy-month-card--blue {
  background: linear-gradient(145deg, #cceeff 0%, #eff9fe 100%);
}

.legacy-month-card-season {
  left: clamp(1.25rem, 2.7vw, 2rem);
  position: absolute;
  top: clamp(1.25rem, 2.7vw, 2rem);
}

.legacy-month-card-season,
.legacy-event-card-meta span,
.legacy-event-dialog-meta span {
  background: #fff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.62rem 0.78rem;
}

.legacy-month-card-number {
  font-size: clamp(4.25rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.8;
  opacity: 0.11;
  position: absolute;
  right: 1.45rem;
  top: 1.5rem;
}

.legacy-month-card-name {
  font-size: clamp(1.75rem, 3vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.legacy-month-card-action {
  align-items: center;
  display: flex;
  font-size: 0.92rem;
  font-weight: 700;
  justify-content: space-between;
  margin-top: 1rem;
}

.legacy-month-card-action span {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  display: inline-flex;
  font-size: 1.2rem;
  height: 2.45rem;
  justify-content: center;
  width: 2.45rem;
}

.legacy-breadcrumbs {
  align-items: center;
  color: #85828a;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.84rem;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
}

.legacy-breadcrumbs a {
  color: #66636a !important;
  text-decoration: none !important;
}

.legacy-breadcrumbs a:hover {
  color: var(--afisha-pink) !important;
}

.legacy-page-back {
  align-items: center;
  background: var(--legacy-pink, #e50a7f);
  border: 2px solid var(--legacy-pink, #e50a7f);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgb(229 10 127 / 16%);
  color: #fff !important;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 0.6rem;
  margin: 0 0 1rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  text-decoration: none !important;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.legacy-page-back:hover,
.legacy-page-back:focus-visible {
  box-shadow: 0 12px 26px rgb(229 10 127 / 24%);
  color: #fff !important;
  transform: translateY(-2px);
}

.legacy-page-back:focus-visible {
  outline: 3px solid rgb(229 10 127 / 24%);
  outline-offset: 3px;
}

.legacy-afisha-month-heading {
  align-items: center;
  border-radius: 26px;
  display: flex;
  justify-content: space-between;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  overflow: hidden;
  padding: clamp(1.15rem, 2.4vw, 1.9rem);
  position: relative;
}

.legacy-afisha-month-heading::after {
  border: 2px solid rgb(255 255 255 / 62%);
  border-radius: 50%;
  content: "";
  height: 240px;
  position: absolute;
  right: -55px;
  top: -120px;
  width: 240px;
}

.legacy-afisha-month-heading--pink { background: var(--afisha-pink-soft); }
.legacy-afisha-month-heading--yellow { background: var(--afisha-yellow-soft); }
.legacy-afisha-month-heading--blue { background: var(--afisha-blue-soft); }

.legacy-afisha-month-heading h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
  margin: 0 0 0.4rem;
}

.legacy-afisha-month-heading p {
  color: var(--afisha-muted);
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  margin: 0;
}

.legacy-afisha-month-heading > a {
  align-items: center;
  background: #fff;
  border-radius: 999px;
  color: var(--afisha-ink) !important;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 0.75rem;
  margin-left: 2rem;
  padding: 0.9rem 1.15rem;
  position: relative;
  text-decoration: none !important;
  white-space: nowrap;
  z-index: 1;
}

.legacy-events-list {
  display: grid;
  gap: 0.85rem;
}

.legacy-event-card {
  align-items: center;
  appearance: none;
  background: #f8f7f5;
  border: 1px solid var(--afisha-line);
  border-radius: 22px;
  color: var(--afisha-ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  grid-template-columns: minmax(220px, 34%) minmax(0, 1fr) auto;
  min-height: 210px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  width: 100%;
}

.legacy-event-card:hover {
  border-color: rgb(237 23 100 / 24%);
  box-shadow: 0 14px 34px rgb(37 23 30 / 9%);
  transform: translateY(-2px);
}

.legacy-event-card-image {
  align-self: stretch;
  display: block;
  min-height: 210px;
  overflow: hidden;
}

.legacy-event-card-image img {
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
  width: 100%;
}

.legacy-event-card:hover .legacy-event-card-image img {
  transform: scale(1.025);
}

.legacy-event-card-copy {
  display: flex;
  flex-direction: column;
  padding: 1.4rem clamp(1.25rem, 3vw, 2.1rem);
}

.legacy-event-card-meta,
.legacy-event-dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.legacy-event-card-meta span:first-child,
.legacy-event-dialog-meta span:first-child {
  background: var(--afisha-pink);
  color: #fff;
}

.legacy-event-card-copy > strong {
  font-size: clamp(1.4rem, 2.6vw, 2.15rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-top: 0.9rem;
}

.legacy-event-card-summary {
  color: var(--afisha-muted);
  font-size: 0.98rem;
  line-height: 1.45;
  margin-top: 0.65rem;
  max-width: 710px;
}

.legacy-event-card-arrow {
  align-items: center;
  background: #fff;
  border: 1px solid var(--afisha-line);
  border-radius: 50%;
  display: flex;
  font-size: 1.35rem;
  height: 3rem;
  justify-content: center;
  margin-right: clamp(1rem, 2.5vw, 2rem);
  width: 3rem;
}

.legacy-event-dialog {
  background: transparent;
  border: 0;
  color: var(--afisha-ink);
  height: min(850px, calc(100vh - 40px));
  margin: auto;
  max-height: calc(100vh - 40px);
  max-width: 1120px;
  overflow: visible;
  padding: 0;
  width: min(1120px, calc(100vw - 40px));
}

.legacy-event-dialog::backdrop {
  background: rgb(21 16 19 / 70%);
  backdrop-filter: blur(5px);
}

.legacy-event-dialog-panel {
  background: #fff;
  border-radius: 26px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  height: 100%;
  overflow: hidden;
  position: relative;
}

.legacy-event-dialog-close {
  align-items: center;
  appearance: none;
  background: #fff;
  border: 1px solid var(--afisha-line);
  border-radius: 50%;
  color: var(--afisha-ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 1.65rem;
  height: 3rem;
  justify-content: center;
  line-height: 1;
  padding: 0 0 0.15rem;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 3rem;
  z-index: 3;
}

.legacy-event-dialog-media {
  background: #f3f1f2;
  display: grid;
  gap: 0.55rem;
  grid-template-rows: minmax(0, 1fr) 150px;
  min-height: 0;
  padding: 0.75rem;
}

.legacy-event-dialog-hero {
  border-radius: 18px;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  width: 100%;
}

.legacy-event-dialog-gallery {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
}

.legacy-event-dialog-gallery img {
  border-radius: 14px;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  width: 100%;
}

.legacy-event-dialog-content {
  overflow: auto;
  padding: clamp(2.2rem, 4vw, 4rem) clamp(1.4rem, 4vw, 3.25rem) 2rem;
}

.legacy-event-dialog-content h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: -0.05em;
  line-height: 0.98;
  margin: 1rem 0 1rem;
}

.legacy-event-dialog-content > p {
  color: var(--afisha-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.legacy-event-contact {
  border-top: 1px solid var(--afisha-line);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.legacy-event-contact h3,
.legacy-event-upsell h3 {
  font-size: 1.15rem;
  margin: 0 0 0.8rem;
}

.legacy-event-contact-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legacy-event-contact-grid a {
  background: var(--afisha-pink-soft);
  border-radius: 14px;
  color: var(--afisha-ink) !important;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  text-decoration: none !important;
}

.legacy-event-contact-grid span {
  font-size: 0.84rem;
}

.legacy-event-upsell {
  background: var(--afisha-yellow-soft);
  border-radius: 18px;
  margin-top: 1rem;
  padding: 1.15rem;
}

.legacy-event-upsell-label {
  color: #8b6a00;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.legacy-event-upsell h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.legacy-event-upsell p {
  color: #5f5948;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
}

.legacy-event-course-link {
  align-items: center;
  background: var(--afisha-pink);
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 800;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding: 0.75rem 1rem;
  text-decoration: none !important;
}

.legacy-event-demo-note {
  font-size: 0.75rem !important;
  margin: 0.9rem 0 0 !important;
}

.legacy-afisha-empty {
  align-items: center;
  background: #f8f7f5;
  border: 1px solid var(--afisha-line);
  border-radius: 22px;
  display: flex;
  gap: 1.5rem;
  min-height: 260px;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.legacy-afisha-empty img {
  height: auto;
  max-width: 160px;
  opacity: 0.75;
  width: 24%;
}

.legacy-afisha-empty h2 {
  font-size: clamp(1.75rem, 3vw, 2.7rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.55rem;
}

.legacy-afisha-empty p {
  color: var(--afisha-muted);
  font-size: 1rem;
  margin: 0;
}

body.legacy-event-dialog-open {
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .legacy-month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legacy-event-dialog {
    max-height: calc(100vh - 24px);
    width: calc(100vw - 24px);
  }

  .legacy-event-dialog-panel {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

@media (max-width: 767.98px) {
  .legacy-afisha-section {
    padding-top: 1.5rem;
  }

  .legacy-afisha-heading {
    display: block;
  }

  .legacy-afisha-heading p {
    margin-top: 1.15rem;
  }

  .legacy-month-grid {
    grid-template-columns: 1fr;
  }

  .legacy-month-card {
    aspect-ratio: 1.45 / 1;
    min-height: 235px;
  }

  .legacy-afisha-month-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.2rem;
  }

  .legacy-afisha-month-heading > a {
    margin-left: 0;
  }

  .legacy-event-card {
    align-items: stretch;
    grid-template-columns: 1fr auto;
    min-height: 0;
  }

  .legacy-event-card-image {
    aspect-ratio: 16 / 9;
    grid-column: 1 / -1;
    min-height: 0;
  }

  .legacy-event-card-copy {
    padding: 1.15rem;
  }

  .legacy-event-card-arrow {
    align-self: center;
    margin-right: 1rem;
  }

  .legacy-event-card-summary {
    font-size: 0.9rem;
  }

  .legacy-event-dialog {
    height: 100dvh;
    max-height: 100dvh;
    width: 100vw;
  }

  .legacy-event-dialog-panel {
    border-radius: 0;
    display: block;
    height: 100%;
    overflow: auto;
  }

  .legacy-event-dialog-media {
    grid-template-rows: minmax(280px, 48vh) 105px;
  }

  .legacy-event-dialog-content {
    overflow: visible;
    padding: 1.5rem 1rem 2.5rem;
  }

  .legacy-event-dialog-close {
    position: fixed;
    right: 0.75rem;
    top: 0.75rem;
  }

  .legacy-event-contact-grid {
    grid-template-columns: 1fr;
  }

  .legacy-afisha-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .legacy-afisha-empty img {
    width: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-month-card,
  .legacy-event-card,
  .legacy-event-card-image img {
    transition: none;
  }
}

/*
 * Большие сенсорные панели и экраны 2K/4K.
 * Расширяем сетку и типографику без browser zoom: так весь интерфейс остаётся
 * в пределах экрана и не обрезается справа на встроенных браузерах панелей.
 */
@media (min-width: 1200px) and (pointer: coarse),
       (min-width: 1200px) and (any-pointer: coarse) {
  html {
    font-size: 18px;
  }

  .section-hero .wrapper-video {
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: 1200px;
    width: 72vw;
    width: min(72vw, 1200px, 106.667vh);
  }
}

/*
 * Ширина окна надёжнее высоты для телевизоров: при системном масштабе
 * или zoom браузера 4K-панель может сообщать высоту менее 900/1400 CSS px.
 */
@media (min-width: 1600px) {
  .section-hero .wrapper-video {
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: 1800px;
    width: 52vw;
    width: min(52vw, 1800px, 106.667vh);
  }

  .section-hero .wrapper-video::before {
    padding-top: 0;
  }

  .section-hero .wrapper-video iframe,
  .section-hero .wrapper-video video {
    height: 100%;
    object-fit: cover;
  }
}

@media (min-width: 2000px) {
  html {
    font-size: 20px;
  }

  .container,
  .container_header {
    max-width: 2200px;
  }

  .section-hero .wrapper-video {
    max-width: 1400px;
    width: 55vw;
    width: min(55vw, 1400px, 106.667vh);
  }

  .legacy-analytics-consent {
    max-width: 2200px;
    width: calc(100% - 4rem);
  }

  .legacy-analytics-consent__copy {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
  }

  .legacy-analytics-consent__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 52%;
  }
}

@media (min-width: 3000px) {
  html {
    font-size: 28px;
  }

  .container,
  .container_header {
    max-width: 3400px;
  }

  .section-hero .wrapper-video {
    max-width: 1800px;
    width: 52vw;
    width: min(52vw, 1800px, 106.667vh);
  }

  .navbar-collapse {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .navbar-collapse .nav-menu .nav-link {
    font-size: 32px;
  }

  .navbar-collapse > .div_nav-logo .nav-logo {
    width: 300px;
  }
}

/*
 * На сенсорных панелях и больших дисплеях действия вынесены во
 * второй ряд, поэтому все кнопки остаются в пределах экрана.
 */
@media (min-width: 1200px) and (pointer: coarse),
       (min-width: 1200px) and (any-pointer: coarse),
       (min-width: 2000px) {
  .navbar-collapse {
    display: grid;
    gap: 0.35rem 0;
    grid-template-areas:
      "logo menu"
      "logo actions";
    grid-template-columns: 170px minmax(0, 1fr);
    width: 100%;
  }

  .navbar-collapse > .div_nav-logo {
    grid-area: logo;
  }

  .navbar-collapse > .ul_li {
    grid-area: menu;
    min-width: 0;
  }

  .navbar-collapse > .ul_li .nav-menu {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .navbar-collapse > .nav-buttons.desktop {
    grid-area: actions;
    justify-content: flex-end;
    justify-self: end;
  }

  .navbar-collapse > .nav-buttons.mobile {
    display: none !important;
  }

  .section-hero .hero-header,
  .section-hero .wrapper-video {
    margin-inline: auto;
  }
}

@media (max-width: 1199.98px) {
  .navbar-collapse {
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .header-nav > .nav-logo,
  .header-nav > .navbar-button {
    display: flex !important;
  }

  .navbar-button[data-target="open"] {
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }
}

@media (max-width: 991.98px) {
  .legacy-benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legacy-license-founder-grid,
  .legacy-license-card--featured {
    grid-template-columns: 1fr;
  }

  .legacy-license-visual {
    margin: 0 auto;
    max-width: 680px;
    width: 100%;
  }

  .legacy-benefit-popover {
    border-width: 0;
    box-shadow: 0 12px 30px rgb(75 25 56 / 12%);
    display: grid;
    grid-template-rows: 0fr;
    left: auto;
    margin: 0;
    position: relative;
    top: auto;
    transform: none;
    transition: grid-template-rows 200ms ease, opacity 180ms ease, margin 200ms ease, border-width 0s linear 200ms, visibility 0s linear 200ms;
    width: 100%;
  }

  .legacy-benefit-popover-inner {
    min-height: 0;
    overflow: hidden;
    padding: 0 1rem;
    transition: padding 200ms ease;
  }

  .legacy-license-benefit--interactive.is-open .legacy-benefit-popover {
    border-width: 1px;
    grid-template-rows: 1fr;
    margin-top: 0.75rem;
    transition-delay: 0s;
  }

  .legacy-license-benefit--interactive.is-open .legacy-benefit-popover-inner {
    padding: 1rem;
  }

  .legacy-founder-card {
    grid-template-columns: 1fr;
  }

  .teacher-video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .legacy-benefit-grid,
  .branch-records {
    grid-template-columns: 1fr;
  }

  .legacy-license-images {
    max-width: 340px;
  }

  .legacy-license-files {
    max-width: 340px;
  }

  .legacy-founder-card {
    grid-template-columns: 1fr;
  }

  .legacy-founder-photo {
    aspect-ratio: 4 / 5;
    height: auto;
    margin: 0 auto;
    max-width: none;
    min-height: 0;
  }

  .legacy-license-files > div {
    grid-template-columns: 1fr;
  }

  .teacher-img {
    height: 150px !important;
    width: 150px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-benefit-more span,
  .legacy-benefit-popover,
  .legacy-benefit-popover-inner {
    transition: none;
  }
}

/* Концертная коллекция */
.legacy-concert-feature {
  color: var(--legacy-ink);
  padding: clamp(3.25rem, 6vw, 6.25rem) 0;
}

.legacy-concerts-section,
.legacy-concert-detail-section {
  color: var(--legacy-ink);
  padding: clamp(1.25rem, 2vw, 2rem) 0 clamp(3.25rem, 6vw, 6.25rem);
}

.legacy-concert-feature--home {
  background: linear-gradient(180deg, #fff 0%, #fff4f9 100%);
}

.legacy-concert-feature--gallery {
  background: #fff4f9;
  border: 1px solid #f8cadf;
  border-radius: 34px;
  margin: 0 0 clamp(3rem, 6vw, 5.5rem);
  padding: clamp(1.5rem, 4vw, 3.25rem);
}

.legacy-concert-feature--gallery > .container {
  max-width: none;
  padding: 0;
  width: 100%;
}

.legacy-concert-feature-heading {
  align-items: end;
  display: grid;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.legacy-concert-kicker {
  color: var(--legacy-pink);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.legacy-concert-feature-heading h2,
.legacy-concerts-heading h1,
.legacy-concert-detail-heading h1 {
  font-size: clamp(2rem, 4.5vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0;
}

.legacy-concert-feature-heading p,
.legacy-concerts-heading p,
.legacy-concert-detail-heading p {
  color: #6c6870;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.55;
  margin: 0;
}

.legacy-concert-feature-grid {
  display: grid;
  gap: clamp(0.85rem, 1.5vw, 1.35rem);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.legacy-concert-card {
  background: #fff;
  border: 1px solid #eadfe5;
  border-radius: 25px;
  color: var(--legacy-ink) !important;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
  overflow: hidden;
  text-decoration: none !important;
  transition: box-shadow 180ms ease, transform 180ms ease;
  width: 100%;
}

.legacy-concert-card:hover,
.legacy-concert-card:focus-visible {
  box-shadow: 0 18px 40px rgb(82 23 55 / 14%);
  transform: translateY(-5px);
}

.legacy-concert-card:focus-visible {
  outline: 3px solid rgb(229 10 127 / 28%);
  outline-offset: 3px;
}

.legacy-concert-card-image {
  aspect-ratio: 4 / 3;
  background-color: #eadfe5;
  background-image: linear-gradient(180deg, rgb(23 17 21 / 0%) 30%, rgb(23 17 21 / 44%) 100%), var(--concert-cover);
  background-position: center;
  background-size: cover;
  display: flex;
  overflow: hidden;
  padding: 1rem;
  width: 100%;
}

.legacy-concert-card-image > span {
  align-self: flex-end;
  background: #fff;
  border-radius: 999px;
  color: var(--legacy-pink);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.42rem 0.75rem;
}

.legacy-concert-card--graphic .legacy-concert-card-image {
  align-items: center;
  background-image: radial-gradient(circle at 78% 22%, rgb(255 255 255 / 75%) 0 9%, transparent 10%), linear-gradient(135deg, #f7b9d6 0%, #f42885 100%);
  justify-content: center;
}

.legacy-concert-card--graphic .legacy-concert-card-image > span {
  background: transparent;
  color: #fff;
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  letter-spacing: -0.09em;
  line-height: 1;
  padding: 0;
}

.legacy-concert-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.legacy-concert-card-meta {
  color: #817781;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.legacy-concert-card-body > strong {
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  line-height: 1.15;
}

.legacy-concert-card-link {
  align-items: center;
  color: var(--legacy-pink);
  display: flex;
  font-size: 0.86rem;
  font-weight: 800;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1.2rem;
}

.legacy-concert-card-link b {
  font-size: 1.1rem;
  transition: transform 180ms ease;
}

.legacy-concert-card:hover .legacy-concert-card-link b {
  transform: translateX(4px);
}

.legacy-concert-all-link,
.legacy-concert-back {
  align-items: center;
  border: 2px solid var(--legacy-pink);
  border-radius: 999px;
  color: var(--legacy-pink) !important;
  display: inline-flex;
  font-weight: 800;
  gap: 0.75rem;
  margin-top: 2rem;
  min-height: 50px;
  padding: 0.65rem 1.2rem;
  text-decoration: none !important;
}

.legacy-concert-all-link:hover,
.legacy-concert-all-link:focus-visible,
.legacy-concert-back:hover,
.legacy-concert-back:focus-visible {
  background: var(--legacy-pink);
  color: #fff !important;
}

.legacy-concerts-section,
.legacy-concert-detail-section {
  background: linear-gradient(180deg, #fff 0%, #fff7fb 100%);
  min-height: 65vh;
}

.legacy-concerts-heading {
  max-width: 1050px;
  padding: clamp(0.5rem, 1vw, 1rem) 0 clamp(2.2rem, 4vw, 3.5rem);
}

.legacy-concerts-heading p {
  margin-top: 1.25rem;
  max-width: 800px;
}

.legacy-concerts-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.8rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legacy-concert-detail-shell {
  min-width: 0;
}

.legacy-concert-detail-heading {
  align-items: center;
  background: #fff0f7;
  border-radius: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 0 1rem;
  overflow: hidden;
  padding: clamp(1.1rem, 2vw, 1.65rem);
  position: relative;
}

.legacy-concert-detail-heading--yellow {
  background: #fff5cf;
}

.legacy-concert-detail-heading--blue {
  background: #eaf7ff;
}

.legacy-concert-detail-heading > div {
  max-width: 850px;
  position: relative;
  z-index: 1;
}

.legacy-concert-detail-heading p {
  color: #4f4a51;
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1.4;
  margin-top: 0.55rem;
  max-width: 900px;
}

.legacy-concert-detail-heading h1 {
  font-size: clamp(1.9rem, 3.1vw, 3.1rem);
  line-height: 1.04;
}

.legacy-concert-year {
  color: rgb(229 10 127 / 12%);
  font-size: clamp(5rem, 12vw, 11rem);
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 0.8;
  margin-right: -0.1em;
}

.legacy-concert-detail-heading--yellow .legacy-concert-year {
  color: rgb(247 178 26 / 20%);
}

.legacy-concert-detail-heading--blue .legacy-concert-year {
  color: rgb(5 145 230 / 13%);
}

.legacy-concert-tabs {
  min-width: 0;
}

.legacy-concert-tablist {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

.legacy-concert-tablist button {
  align-items: center;
  background: #fff;
  border: 1px solid #decfd7;
  border-radius: 999px;
  color: var(--legacy-ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.65rem 1.35rem;
}

.legacy-concert-tablist button span {
  color: #887d84;
  font-size: 0.78rem;
}

.legacy-concert-tablist button[aria-selected="true"] {
  background: var(--legacy-pink);
  border-color: var(--legacy-pink);
  color: #fff;
}

.legacy-concert-tablist button[aria-selected="true"] span {
  color: #fff;
}

.legacy-concert-tablist button:focus-visible {
  outline: 3px solid rgb(229 10 127 / 25%);
  outline-offset: 2px;
}

.legacy-concert-tabpanel[hidden] {
  display: none !important;
}

.legacy-concert-photo-grid {
  display: grid;
  gap: clamp(0.6rem, 1.3vw, 1rem);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.legacy-concert-photo {
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  display: block;
  overflow: hidden;
}

.legacy-concert-photo img {
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
  width: 100%;
}

.legacy-concert-photo:hover img,
.legacy-concert-photo:focus-visible img {
  transform: scale(1.04);
}

.legacy-concert-video {
  background: #171419;
  border-radius: 26px;
  box-shadow: 0 18px 45px rgb(32 20 28 / 16%);
  margin: 0 auto;
  max-width: 1180px;
  overflow: hidden;
}

.legacy-concert-video video {
  aspect-ratio: 16 / 9;
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.legacy-concert-empty {
  align-items: center;
  background: #fff;
  border: 1px dashed #e0c7d4;
  border-radius: 20px;
  display: flex;
  min-height: 130px;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.legacy-concert-empty img {
  height: auto;
  opacity: 0.65;
  width: 130px;
}

.legacy-concert-empty strong {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.legacy-concert-empty p {
  color: #736a70;
  margin: 0.5rem 0 0;
}

@media (max-width: 991.98px) {
  .legacy-concert-feature-heading {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .legacy-concert-feature-heading p {
    max-width: 760px;
  }

  .legacy-concert-feature-grid,
  .legacy-concerts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legacy-concert-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .legacy-concert-detail-heading {
    grid-template-columns: 1fr;
  }

  .legacy-concert-year {
    bottom: 0.15em;
    position: absolute;
    right: 0.18em;
  }
}

@media (max-width: 575.98px) {
  .legacy-concert-feature {
    padding: 2.5rem 0;
  }

  .legacy-concerts-section,
  .legacy-concert-detail-section {
    padding: 1.25rem 0 2.5rem;
  }

  .legacy-concert-feature--gallery {
    border-radius: 24px;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding: 1.25rem;
  }

  .legacy-concert-feature-grid,
  .legacy-concerts-grid {
    grid-template-columns: 1fr;
  }

  .legacy-concert-card {
    display: grid;
    grid-template-columns: minmax(118px, 38%) minmax(0, 1fr);
  }

  .legacy-concert-card-image {
    aspect-ratio: auto;
    min-height: 190px;
  }

  .legacy-concert-card--graphic .legacy-concert-card-image > span {
    font-size: 2.8rem;
  }

  .legacy-concert-card-body > strong {
    font-size: 1.05rem;
  }

  .legacy-concert-card-link {
    align-items: flex-start;
    font-size: 0.76rem;
  }

  .legacy-concert-detail-heading {
    border-radius: 20px;
    padding: 1.1rem;
  }

  .legacy-concert-detail-heading h1 {
    font-size: clamp(1.9rem, 9vw, 2.65rem);
  }

  .legacy-page-back {
    font-size: 0.84rem;
    margin-bottom: 0.8rem;
    min-height: 42px;
    padding: 0.5rem 0.9rem;
  }

  .legacy-concert-tablist {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .legacy-concert-tablist button {
    justify-content: center;
  }

  .legacy-concert-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legacy-concert-photo {
    border-radius: 12px;
  }

  .legacy-concert-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .legacy-concert-empty img {
    width: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-concert-card,
  .legacy-concert-card-link b,
  .legacy-concert-photo img {
    transition: none;
  }
}

/* Отдельная страница лицензий */
.legacy-documents-section {
  background: linear-gradient(180deg, #fff 0%, #fff6fa 100%);
  min-height: 65vh;
  padding: clamp(1.25rem, 2vw, 2rem) 0 clamp(3rem, 6vw, 6rem);
}

.legacy-documents-heading {
  max-width: 920px;
  padding: clamp(0.5rem, 1vw, 1rem) 0 clamp(2rem, 4vw, 3.5rem);
}

.legacy-documents-heading h1 {
  color: var(--legacy-ink);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0;
}

.legacy-documents-heading p {
  color: #69636a;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  margin: 1.1rem 0 0;
  max-width: 760px;
}

.legacy-document-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.6rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legacy-document-card {
  align-items: center;
  background: #fff;
  border: 1px solid #efd5e2;
  border-radius: 28px;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1fr);
  overflow: hidden;
  padding: clamp(1.1rem, 2.5vw, 2rem);
}

.legacy-document-card--blue {
  border-color: #cfe8f7;
}

.legacy-document-preview {
  background: #f8f4f6;
  border: 1px solid #d8ced3;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgb(48 31 41 / 12%);
  overflow: hidden;
}

.legacy-document-preview img {
  display: block;
  height: auto;
  width: 100%;
}

.legacy-document-copy > span {
  color: var(--legacy-pink);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legacy-document-card--blue .legacy-document-copy > span {
  color: var(--legacy-blue);
}

.legacy-document-copy h2 {
  color: var(--legacy-ink);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.12;
  margin: 0.6rem 0 0.75rem;
}

.legacy-document-copy p {
  color: #706970;
  margin: 0 0 1.25rem;
}

.legacy-document-copy a {
  align-items: center;
  background: var(--legacy-pink);
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  font-weight: 800;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.65rem 1.15rem;
  text-decoration: none !important;
}

.legacy-document-card--blue .legacy-document-copy a {
  background: var(--legacy-blue);
}

.legacy-document-copy a:hover,
.legacy-document-copy a:focus-visible {
  filter: brightness(0.9);
}

.legacy-document-copy a:focus-visible {
  outline: 3px solid rgb(229 10 127 / 22%);
  outline-offset: 3px;
}

@media (max-width: 991.98px) {
  .legacy-document-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .legacy-documents-section {
    padding: 1.25rem 0 2.5rem;
  }

  .legacy-document-card {
    align-items: start;
    grid-template-columns: minmax(105px, 0.48fr) minmax(0, 1fr);
  }

  .legacy-document-copy h2 {
    font-size: 1.1rem;
  }

  .legacy-document-copy > span {
    font-size: 0.62rem;
  }

  .legacy-document-copy p {
    font-size: 0.78rem;
  }

  .legacy-document-copy a {
    font-size: 0.82rem;
    min-height: 44px;
  }
}

/* Главная: лицензии и способы оплаты в стиле стандартного блока услуги */
.legacy-privilege-section {
  min-width: 0;
}

.legacy-privilege-heading {
  margin: 0 auto clamp(1.4rem, 3vw, 2rem);
  max-width: 880px;
  text-align: center;
}

.legacy-privilege-heading h2 {
  color: var(--legacy-ink);
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0;
}

.legacy-privilege-heading p {
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  line-height: 1.5;
  margin: 0;
}

.legacy-service-benefits {
  padding-top: 50px;
  position: relative;
}

.legacy-service-benefits-strip {
  align-items: center;
  background: var(--legacy-pink);
  border-radius: 16px 16px 0 0;
  color: #fff;
  display: flex;
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
  left: 50%;
  min-height: 50px;
  padding: 0.75rem 1.5rem;
  position: absolute;
  text-align: center;
  top: 0;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 2rem));
  z-index: 2;
}

.legacy-service-benefits-grid {
  background: #fff;
  border-radius: 16px;
  box-shadow: 5px 5px 23px rgb(158 158 158 / 15%);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  padding: clamp(1.7rem, 3vw, 2.25rem) clamp(1rem, 2.5vw, 2.1rem);
}

.legacy-service-benefit {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  min-width: 0;
  padding: 0 clamp(0.8rem, 1.8vw, 1.5rem);
}

.legacy-service-benefit + .legacy-service-benefit {
  border-left: 1px solid rgb(229 10 127 / 14%);
}

.legacy-service-benefit-value {
  color: var(--legacy-pink);
  display: block;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.55rem;
}

.legacy-service-benefit--navigator .legacy-service-benefit-value {
  align-items: center;
  align-self: flex-start;
  background: var(--legacy-blue);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  justify-content: center;
  min-height: 48px;
  padding: 0.55rem 1rem;
}

.legacy-service-benefit > strong {
  color: var(--legacy-ink);
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
  margin-bottom: 0.45rem;
}

.legacy-service-benefit > span:not(.legacy-service-benefit-value) {
  color: #565660;
  display: block;
  font-size: 0.94rem;
  line-height: 1.45;
}

.legacy-service-benefit > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-top: 1px solid rgb(32 32 42 / 10%);
  color: var(--legacy-pink);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 800;
  justify-content: space-between;
  margin-top: auto;
  min-height: 45px;
  padding: 0.8rem 0 0;
  text-align: left;
  width: 100%;
}

.legacy-service-benefit--navigator > button {
  color: var(--legacy-blue);
}

.legacy-service-benefit > button span {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
}

.legacy-service-benefit > button:is(:hover, :focus-visible) {
  color: #be0066;
  outline: none;
}

.legacy-service-benefit--navigator > button:is(:hover, :focus-visible) {
  color: #006fb8;
}

.legacy-service-benefit > button:focus-visible {
  box-shadow: 0 3px 0 rgb(229 10 127 / 24%);
}

.legacy-privilege-dialog {
  background: transparent;
  border: 0;
  max-height: calc(100vh - 2rem);
  max-width: min(680px, calc(100vw - 2rem));
  overflow: visible;
  padding: 0;
  width: 100%;
}

.legacy-privilege-dialog::backdrop {
  background: rgb(26 18 23 / 58%);
  backdrop-filter: blur(3px);
}

.legacy-privilege-dialog-panel {
  background: #fff;
  border: 1px solid rgb(229 10 127 / 16%);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgb(30 16 24 / 28%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: clamp(1.35rem, 4vw, 2.35rem);
  position: relative;
}

.legacy-privilege-dialog-close {
  align-items: center;
  background: var(--legacy-pink);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 1.7rem;
  height: 44px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 0.15rem;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 44px;
}

.legacy-privilege-dialog-close:is(:hover, :focus-visible) {
  background: #bd0065;
  outline: 4px solid rgb(229 10 127 / 16%);
}

.legacy-privilege-dialog-badge {
  background: var(--legacy-pink);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.9rem;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
}

.legacy-privilege-dialog-badge--blue {
  background: var(--legacy-blue);
  font-size: 1rem;
  min-height: 40px;
  padding: 0.55rem 1rem;
}

.legacy-privilege-dialog h3 {
  color: var(--legacy-ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
  margin: 0 3.5rem 1rem 0;
}

.legacy-privilege-dialog p,
.legacy-privilege-dialog li {
  color: #4f4f59;
  line-height: 1.55;
}

.legacy-privilege-dialog p {
  margin: 0;
}

.legacy-privilege-dialog p + p,
.legacy-privilege-dialog ol + p {
  margin-top: 0.8rem;
}

.legacy-privilege-dialog ol {
  margin: 1rem 0 0;
  padding-left: 1.35rem;
}

.legacy-privilege-dialog li + li {
  margin-top: 0.4rem;
}

#legacy-license-dialog .legacy-privilege-dialog-panel > ol {
  counter-reset: legacy-license-benefit;
  display: grid;
  gap: 0.85rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

#legacy-license-dialog .legacy-privilege-dialog-panel > ol > li {
  counter-increment: legacy-license-benefit;
  margin: 0;
  min-height: 1.9rem;
  padding-left: 2.4rem;
  position: relative;
}

#legacy-license-dialog .legacy-privilege-dialog-panel > ol > li::before {
  align-items: center;
  background: rgb(229 10 127 / 10%);
  border: 1px solid rgb(229 10 127 / 24%);
  border-radius: 50%;
  color: var(--legacy-pink);
  content: counter(legacy-license-benefit);
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  height: 1.8rem;
  justify-content: center;
  left: 0;
  line-height: 1;
  position: absolute;
  top: 0.05rem;
  width: 1.8rem;
}

#legacy-license-dialog .legacy-privilege-dialog-panel > ol > li > ul {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
}

#legacy-license-dialog .legacy-privilege-dialog-panel > ol > li > ul > li {
  margin: 0;
  padding-left: 1.1rem;
  position: relative;
}

#legacy-license-dialog .legacy-privilege-dialog-panel > ol > li > ul > li::before {
  background: var(--legacy-pink);
  border-radius: 50%;
  content: "";
  height: 0.42rem;
  left: 0;
  position: absolute;
  top: 0.62rem;
  width: 0.42rem;
}

.legacy-privilege-dialog-link {
  align-items: center;
  background: var(--legacy-pink);
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  font-weight: 800;
  gap: 0.6rem;
  margin-top: 1.25rem;
  min-height: 48px;
  padding: 0.65rem 1.15rem;
  text-decoration: none !important;
}

.legacy-privilege-dialog-link:is(:hover, :focus-visible) {
  background: #bd0065;
  outline: none;
}

body.legacy-privilege-dialog-open {
  overflow: hidden;
}

.detail-hero.detail-hero--text-only {
  justify-content: center;
}

.detail-hero.detail-hero--text-only .detail-hero-start {
  max-width: 760px;
  width: 100%;
}

@media (max-width: 991.98px) {
  .legacy-service-benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.5rem;
  }

  .legacy-service-benefit {
    min-height: 190px;
  }

  .legacy-service-benefit:nth-child(odd) {
    border-left: 0;
  }

  .legacy-service-benefit:nth-child(n + 3) {
    border-top: 1px solid rgb(229 10 127 / 14%);
    padding-top: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .legacy-service-benefits {
    padding-top: 58px;
  }

  .legacy-service-benefits-strip {
    font-size: 0.9rem;
    min-height: 58px;
    width: calc(100% - 1.5rem);
  }

  .legacy-service-benefits-grid {
    grid-template-columns: 1fr;
    padding: 1.4rem 1.15rem;
    row-gap: 0;
  }

  .legacy-service-benefit {
    border-left: 0 !important;
    min-height: 0;
    padding: 1.15rem 0;
  }

  .legacy-service-benefit:first-child {
    padding-top: 0.35rem;
  }

  .legacy-service-benefit--license {
    padding-bottom: 0.7rem;
  }

  .legacy-service-benefit--license > button {
    margin-top: 0.55rem;
  }

  .legacy-service-benefit + .legacy-service-benefit,
  .legacy-service-benefit:nth-child(n + 3) {
    border-top: 1px solid rgb(229 10 127 / 14%);
    padding-top: 1.15rem;
  }

  .legacy-service-benefit > button {
    margin-top: 0.85rem;
  }

  .legacy-privilege-dialog {
    max-height: calc(100vh - 1rem);
    max-width: calc(100vw - 1rem);
  }

  .legacy-privilege-dialog-panel {
    border-radius: 20px;
    max-height: calc(100vh - 1rem);
  }

  .legacy-privilege-dialog-close {
    height: 40px;
    right: 0.8rem;
    top: 0.8rem;
    width: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-dance-video-track,
  .legacy-dance-video-arrow,
  .legacy-dance-video-dot {
    transition: none;
  }

  .legacy-privilege-dialog::backdrop {
    backdrop-filter: none;
  }
}

/*
 * Единая геометрия страниц на телевизорах, сенсорных панелях и при
 * нестандартном масштабе браузера. Старый шаблон одновременно задавал
 * видео фиксированную высоту и процентную прокладку, из-за чего ролик мог
 * выходить из своего блока и перекрывать следующий заголовок.
 */
.container,
.container_header {
  padding-left: clamp(1.25rem, 3.25vw, 4rem);
  padding-right: clamp(1.25rem, 3.25vw, 4rem);
  width: 100%;
}

.wrapper-video:not(.legacy-dance-video-carousel) {
  height: 0;
  max-width: 100%;
  overflow: hidden;
  padding-top: 56.25%;
  position: relative;
}

@supports (aspect-ratio: 16 / 9) {
  .wrapper-video:not(.legacy-dance-video-carousel) {
    aspect-ratio: 16 / 9;
    height: auto;
    padding-top: 0;
  }
}

.wrapper-video:not(.legacy-dance-video-carousel)::before {
  content: none;
  display: none;
  padding-top: 0;
}

.wrapper-video:not(.legacy-dance-video-carousel) > iframe,
.wrapper-video:not(.legacy-dance-video-carousel) > video {
  border-radius: inherit;
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.section-hero .hero-header,
.section-hero .hero-main,
.section-hero .hero-buttons,
.section-hero .hero-buttons > h1 {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.section-hero .hero-header {
  display: flow-root;
}

.section-hero .wrapper-video {
  border-radius: 24px;
  clear: both;
  margin-left: auto;
  margin-right: auto;
  max-width: 58rem;
  width: 100%;
  width: min(100%, 58rem);
}

.section-hero .hero-main {
  clear: both;
  margin-left: auto;
  margin-right: auto;
  max-width: 90rem;
  position: relative;
}

.hero-buttons > h1,
.page-header h1,
.detail-header h1 {
  hyphens: none;
  line-height: 1.16;
  overflow-wrap: break-word;
}

.section-hero .hero-buttons > a {
  max-width: 100%;
  min-width: 0 !important;
}

@media (min-width: 1200px) and (max-height: 900px) {
  .container_header {
    padding-bottom: clamp(0.75rem, 2vh, 1.25rem);
  }

  .main {
    margin-top: clamp(0.5rem, 1.5vh, 1rem);
  }

  .section-hero .wrapper-video {
    width: min(100%, 58rem, calc(177.78vh - 26.667rem));
    width: min(100%, 58rem, calc(177.78svh - 26.667rem));
  }
}

@media (max-width: 767.98px) {
  .section-hero .wrapper-video {
    border-radius: 18px;
  }

  .section-hero .hero-buttons > a {
    width: 100%;
  }
}
