/* Certificate page only: preserve the existing catalogue and studio card styles. */
body.certificate-live {
  --mfh-cert-heading-size: 56px;
  --mfh-cert-person-title-size: 24px;
  --mfh-cert-surface: #f5f5f7;
}
/* Match the existing "Выберите массаж" heading at each breakpoint. */
body.certificate-live #lineup-title,
body.certificate-live #certificate-studios-title,
body.certificate-live #certificate-team-title,
body.certificate-live #faq-title,
body.certificate-live .lc-gallery > .container-section > h2,
body.certificate-live .site-reviews--certificate .site-reviews__head h2 {
  font-family: inherit;
  font-size: var(--mfh-cert-heading-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: normal;
}
body.certificate-live #certificate-team .mfh-cert-team__caption h3,
body.certificate-live .mfh-cert-team-modal .master-modal__title {
  font-family: inherit;
  font-size: var(--mfh-cert-person-title-size);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: normal;
}
body.certificate-live .mfh-cert-team-modal { font-family: inherit; }
body.certificate-live .site-reviews--certificate {
  margin: 0;
  padding: 76px 0;
  background: var(--mfh-cert-surface);
}
body.certificate-live .site-reviews--certificate > .container-section.lc-wrap {
  max-width: none;
  padding: 0;
}
body.certificate-live .site-reviews--certificate .site-reviews__head > div:first-child { min-width: 0; }
body.certificate-live .site-reviews--certificate .site-reviews__head h2 { margin: 0; }
body.certificate-live .site-reviews--certificate .site-reviews__nowrap { white-space: normal; }
body.certificate-live .site-reviews--certificate .subtitle:empty { display: none; }
body.certificate-live .mfh-cert-network {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin: 22px auto 28px;
  color: #fff;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
body.certificate-live .mfh-cert-network__links { display: grid; gap: 7px; width: 100%; max-width: 470px; }
body.certificate-live .mfh-cert-network__links a {
  display: block;
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  font-size: 17px;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  color: rgba(255, 255, 255, .94);
}
body.certificate-live .mfh-cert-network__tail { display: inline-block; white-space: nowrap; }
body.certificate-live .mfh-cert-network svg { display: inline-block; margin-left: 7px; vertical-align: -.15em; }
body.certificate-live .mfh-cert-network__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
body.certificate-live .mfh-cert-network__links a:focus-visible { outline: 2px solid #fff; outline-offset: 5px; border-radius: 4px; }
body.certificate-live .mfh-cert-locations {
  --mfh-locations-olive: #89966f;
  --mfh-locations-border: #e0e0e5;
  margin: 0;
  padding: 88px 0 92px;
  background: var(--mfh-cert-surface);
  color: #1d1d1f;
  scroll-margin-top: 100px;
}
body.certificate-live .mfh-cert-locations__heading { margin: 0 0 34px; }
body.certificate-live .mfh-cert-locations h2 {
  max-width: 1100px;
  margin: 0;
  color: #1d1d1f;
  font-size: var(--mfh-cert-heading-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: normal;
  text-align: left;
  text-wrap: balance;
}
body.certificate-live .mfh-cert-locations__lead {
  margin: 23px 0 0;
  color: #1d1d1f;
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.025em;
}
body.certificate-live .mfh-cert-locations__count { color: var(--mfh-locations-olive); }
body.certificate-live .mfh-cert-locations__map-frame {
  overflow: hidden;
  border: 1px solid var(--mfh-locations-border);
  border-radius: 26px;
  background: #ebebef;
}
body.certificate-live .mfh-cert-locations .mfh-cert-locations__map {
  position: relative;
  width: 100%;
  height: 410px;
  min-height: 410px;
  margin: 0;
  border-radius: 0;
}
body.certificate-live .mfh-cert-locations .map__canvas { width: 100%; height: 100%; border-radius: 0; }
body.certificate-live .mfh-cert-locations__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 30px;
  color: var(--mfh-locations-olive);
  text-align: center;
}
body.certificate-live .mfh-cert-locations__placeholder p { max-width: 440px; margin: 0; color: #48533b; font-size: 18px; line-height: 1.45; }
body.certificate-live .mfh-cert-locations__map-load {
  border: 1px solid #b6c0a9;
  border-radius: 999px;
  padding: 11px 21px;
  background: #fff;
  color: #42522e;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
body.certificate-live .mfh-cert-locations__map-load:hover { background: #f8faf5; }
body.certificate-live .mfh-cert-locations__map-load:disabled { opacity: .6; cursor: progress; }
body.certificate-live .mfh-cert-locations__list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 25px 0 14px;
}
body.certificate-live .mfh-cert-locations__list-heading p { margin: 0; color: #6e6e73; font-size: 15px; line-height: 1.45; }
body.certificate-live .mfh-cert-locations .studio_info_metro-icon { display: inline-block; width: 30px; height: 20px; object-fit: contain; flex: 0 0 30px; margin: 0; vertical-align: middle; }
body.certificate-live .mfh-cert-locations__metro-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
body.certificate-live .mfh-cert-locations__addresses {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}
body.certificate-live .mfh-cert-locations__addresses li { min-width: 0; margin: 0; padding: 0; border-bottom: 1px solid var(--mfh-locations-border); list-style: none; }
body.certificate-live .mfh-cert-locations__address {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  min-height: 83px;
  padding: 16px 10px 16px 12px;
  color: #2f2f2f;
  text-decoration: none;
  border-radius: 0;
  transition: color .16s ease, background-color .16s ease;
}
body.certificate-live .mfh-cert-locations__address:hover { color: #2f2f2f; background: rgba(0, 0, 0, .025); text-decoration: none; }
body.certificate-live .mfh-cert-locations__address::before { content: ''; position: absolute; top: 18px; bottom: 18px; left: 0; width: 3px; background: transparent; border-radius: 2px; }
body.certificate-live .mfh-cert-locations__address[aria-expanded="true"] { color: #2f2f2f; background: transparent; text-decoration: none; }
body.certificate-live .mfh-cert-locations__address[aria-expanded="true"]::before { background: var(--mfh-locations-olive); }
body.certificate-live .mfh-cert-locations__address[aria-expanded="true"] strong { font-weight: 600; }
body.certificate-live .mfh-cert-locations__address .mfh-cert-locations__check { display: none; }
body.certificate-live .mfh-cert-locations__address[aria-expanded="true"] .mfh-cert-locations__chevron { display: none; }
body.certificate-live .mfh-cert-locations__address[aria-expanded="true"] .mfh-cert-locations__check { display: block; }
body.certificate-live .mfh-cert-locations__address-text { display: flex; flex-direction: column; min-width: 0; gap: 6px; }
body.certificate-live .mfh-cert-locations__address strong { font-size: 17px; font-weight: 500; line-height: 1.3; overflow-wrap: break-word; }
body.certificate-live .mfh-cert-locations__metro { display: flex; align-items: center; gap: 7px; color: #6e6e73; font-size: 13px; line-height: 1.4; }
body.certificate-live .mfh-cert-locations__metro svg,
body.certificate-live .mfh-cert-locations__arrow { flex-shrink: 0; color: var(--mfh-locations-olive); }
body.certificate-live .mfh-cert-locations__text-button { border: 0; padding: 6px 0; background: transparent; color: #59644c; font: inherit; font-size: 15px; line-height: 1.5; cursor: pointer; }
body.certificate-live .mfh-cert-locations__text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
body.certificate-live .mfh-cert-locations button:focus-visible,
body.certificate-live .mfh-cert-locations a:focus-visible { outline: 2px solid var(--mfh-locations-olive); outline-offset: 4px; }
body.certificate-live .mfh-cert-locations a.mfh-cert-locations__address:focus-visible { outline: none; background: #fff; box-shadow: inset 0 -2px 0 var(--mfh-locations-olive); }
body.certificate-live .mfh-cert-locations__selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--mfh-locations-border); }
body.certificate-live .mfh-cert-locations__selection-bar p { margin: 0; color: #59644c; font-size: 15px; }
body.certificate-live .mfh-cert-locations__selection-bar button span { padding-left: 7px; font-size: 24px; vertical-align: -1px; }
body.certificate-live .mfh-cert-locations__selected { scroll-margin-top: 110px; }
body.certificate-live .mfh-cert-locations__selected:focus { outline: none; }
body.certificate-live .mfh-cert-locations__selected .studio_item { margin: 20px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.certificate-live .mfh-cert-locations__selected .studio_info { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; }
body.certificate-live .mfh-cert-locations__selected .studio_info > .studio-yandex--compact { margin-top: 0; }
body.certificate-live .mfh-cert-locations [hidden] { display: none !important; }
@media (max-width: 1100px) {
  body.certificate-live .mfh-cert-locations { padding: 65px 0; }
  body.certificate-live .mfh-cert-locations__metro-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}
@media (min-width: 1101px) and (max-width: 1439px) {
  body.certificate-live .mfh-cert-locations__address { min-height: 100px; }
  body.certificate-live .mfh-cert-locations__address strong { font-size: 16px; }
}
@media (max-width: 767px) {
  body.certificate-live { --mfh-cert-heading-size: 28px; --mfh-cert-person-title-size: 22px; }
  body.certificate-live .site-reviews--certificate { padding: 48px 0; }
  body.certificate-live .mfh-cert-network { gap: 14px; margin: 32px auto 24px; }
  body.certificate-live .mfh-cert-network__links { max-width: 330px; gap: 14px; }
  body.certificate-live .mfh-cert-network__links a { gap: 6px; font-size: 15px; line-height: 1.35; }
  body.certificate-live .mfh-cert-locations { padding: 48px 0 52px; scroll-margin-top: 80px; }
  body.certificate-live .mfh-cert-locations h2 { max-width: 560px; }
  body.certificate-live .mfh-cert-locations__lead { margin-top: 20px; font-size: 22px; }
  body.certificate-live .mfh-cert-locations__heading { margin-bottom: 25px; }
  body.certificate-live .mfh-cert-locations .mfh-cert-locations__map { height: 380px; min-height: 380px; }
  body.certificate-live .mfh-cert-locations__map-frame { border-radius: 20px; }
  body.certificate-live .mfh-cert-locations__list-heading { margin-top: 21px; }
  body.certificate-live .mfh-cert-locations__metro-groups { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body.certificate-live .mfh-cert-locations__addresses { grid-template-columns: 1fr; gap: 0; }
  body.certificate-live .mfh-cert-locations__address { min-height: 76px; padding: 14px 8px 14px 12px; }
  body.certificate-live .mfh-cert-locations__address strong { font-size: 17px; }
  body.certificate-live .mfh-cert-locations__metro { font-size: 13px; }
  body.certificate-live .mfh-cert-locations__selected .studio_item { padding: 0; border-radius: 0; }
  body.certificate-live .mfh-cert-locations__selected { scroll-margin-top: 88px; }
}
/* Keep floating help clear of certificate selection and map controls. */
body.certificate-live:has(#selection-basket:not([hidden])) .mfcw,
body.certificate-live:has(#certificate-details:not([hidden])) .mfcw,
body.certificate-live:has(.booking__map.is-open, .master-modal.is-open, .info-detail-modal.is-open, .help_modal.active, .category-modal.active, .sidebar.active, .certificate-preview-modal:not([hidden]), .certificate-delivery-map-modal:not([hidden])) .mfcw {
  visibility: hidden;
  pointer-events: none;
}
body.certificate-live:has(.booking__map.is-open) .header {
  visibility: hidden;
  pointer-events: none;
}
/* Long address labels remain readable on narrow phones. */
@media (max-width: 479px) {
  body.certificate-live .checkout-panel__delivery-address {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.certificate-live .checkout-panel__delivery-address > .checkout-panel__field:has([data-sert-flat]),
  body.certificate-live .checkout-panel__delivery-address > .checkout-panel__field--half {
    grid-column: 1 / -1;
  }
}
/* Keep the certificate hero below the fixed header on short landscape screens. */
@media (orientation: landscape) and (max-height: 600px) {
  body.certificate-live .glavnaya_content {
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    padding: 112px 0 16px;
    transform: none !important;
  }
  body.certificate-live .glavnaya h1.h1 {
    max-width: 720px;
    margin: 0;
    flex-shrink: 0;
    font-size: clamp(24px, 3.8vw, 32px);
    line-height: 1.08;
    text-wrap: balance;
  }
  body.certificate-live .mfh-cert-network {
    margin: 12px auto;
    gap: 0;
    flex-shrink: 0;
  }
  body.certificate-live .mfh-cert-network__links { max-width: 470px; gap: 4px; }
  body.certificate-live .mfh-cert-network__links a { font-size: 13px; line-height: 1.25; }
  body.certificate-live .glavnaya_buttons {
    max-width: 100%;
    margin: 8px auto 0;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
  }
  body.certificate-live .glavnaya_buttons a {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 10px 20px;
    font-size: 16px;
    line-height: 1.25;
    animation: none;
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.certificate-live .mfh-cert-locations__address { transition: none; }
}
