:root {
  --font: "Montserrat", Arial, sans-serif;
  --blue-header: #61a9ea;
  --cyan: #61a9ea;
  --purple: #7546b8;
  --purple-dark: #803aee;
  --orange: #ff9800;
  --orange-dark: #d25e27;
  --text: #000000;
  --text-muted: #363636;
  --white: #ffffff;
  --border: #c2c9d2;
  --panel-bg: #ffffff;
  --container: 1200px;
  --artboard: 1200px;
  --quiz-panel-w: 1158px;
  --quiz-panel-h: 783px;
  --quiz-aside-w: 340px;
  --header-h: 90px;
  --hero-bg: #efece9;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button,
input {
  font-family: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 990;
  height: var(--header-h);
  background: var(--blue-header);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  min-width: 0;
}

.header__brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 0;
  min-width: 0;
  text-decoration: none;
  color: #ffffff;
}

.header__brand-mark-wrap {
  flex-shrink: 0;
  display: block;
  width: min(204px, 46vw);
  height: 75px;
  line-height: 0;
}

.header__brand-mark {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: left center;
}

.header__center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
}

.header__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
}

.header__hours {
  display: block;
  text-align: right;
  white-space: nowrap;
}

.header__icon {
  flex-shrink: 0;
  width: 30px;
  height: auto;
}

.header__address,
.header__hours {
  font-size: 14px;
  line-height: 1.4;
  color: #ffffff;
  overflow-wrap: break-word;
}

.header__phone {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.header__phone-text {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
  white-space: nowrap;
}

.header__phone-btn {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  text-align: center;
}

.btn--primary {
  background: var(--orange);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 8px;
  padding: 18px 28px;
  min-height: 60px;
  line-height: 1.25;
}

.btn--primary:hover {
  background: var(--orange-dark);
}

.btn--quiz {
  background: var(--purple);
  color: var(--white);
  border-radius: 10px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  min-height: 56px;
  min-width: 138px;
  box-shadow: 0 3px 15px rgba(181, 181, 181, 0.45);
}

.btn--quiz:hover {
  background: var(--purple-dark);
}

.quiz__submit {
  flex: 1 1 auto;
  width: auto;
  max-width: 340px;
  min-height: 60px;
  padding: 14px 28px;
  background: var(--orange-dark);
  border-radius: 10px;
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 28px;
  padding: 12px 24px;
  font-size: 14px;
}

.btn--cookie {
  background: #ebebeb;
  color: #555555;
  border: 1px solid #999999;
  border-radius: 5px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

/* Hero */
.hero {
  padding-top: calc(var(--header-h) + 32px);
  padding-bottom: 40px;
  background: var(--hero-bg);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.hero__container {
  min-width: 0;
}

.hero__content {
  min-width: 0;
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  max-width: 913px;
  margin: 0 0 26px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.hero__title-line {
  display: block;
}

.hero__title-line--black {
  color: var(--text);
}

.hero__title-line--cyan {
  color: var(--cyan);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 347px;
  gap: 0;
  align-items: stretch;
  min-width: 0;
}

.hero__text {
  min-width: 0;
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.hero__lead {
  margin: 0 0 8px;
}

.hero__list {
  margin: 0 0 16px;
}

.hero__list li {
  margin-bottom: 4px;
}

.hero__prices {
  margin: 0 0 12px;
}

.hero__urgent {
  margin: 0;
}

.hero__gallery {
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.hero__gallery img {
  width: 347px;
  max-width: 100%;
  height: 434px;
  border-radius: 20px;
  object-fit: cover;
}

/* Quiz */
.quiz {
  padding: 40px 0 0;
  background: var(--white);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.quiz__container {
  max-width: var(--container);
  margin: 0 auto 25px;
  padding: 0 20px;
}

.quiz__heading {
  margin: 0 0 28px;
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.quiz__panel {
  width: var(--quiz-panel-w);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--purple);
  border-radius: 16px;
  background: var(--panel-bg);
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.quiz__tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  margin: 38px 15px 0 55px;
  max-width: 1090px;
  padding: 8px 16px;
  border: 1px solid var(--purple);
  border-radius: 10px;
  background: var(--white);
}

.quiz__tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  padding: 14px 0;
  border-radius: 10px;
  cursor: default;
  pointer-events: none;
  min-width: 0;
  overflow-wrap: break-word;
}

.quiz__tab.is-active {
  background: var(--purple);
  color: var(--white);
  padding: 14px 28px;
  min-width: 138px;
  min-height: 56px;
  font-weight: 400;
}

.quiz__tab.is-done {
  color: var(--text-muted);
  font-weight: 400;
}

.quiz__tab--last:not([hidden]) {
  margin-left: auto;
  background: var(--purple);
  color: var(--white);
  padding: 14px 28px;
  min-width: 138px;
  min-height: 56px;
}

.quiz__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--quiz-aside-w);
  gap: 0;
  align-items: start;
  min-width: 0;
  flex: 0 0 auto;
  min-height: 0;
}

.quiz__form-wrap {
  padding: 44px 40px 40px 55px;
  min-width: 0;
  border-right: 1px solid #f2f2f2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.quiz__form-wrap.is-success .quiz__success {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.quiz__aside {
  width: var(--quiz-aside-w);
  flex-shrink: 0;
  padding: 12px 10px 10px 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.quiz__aside-card {
  flex: 0 0 auto;
  min-height: 0;
  width: 320px;
  margin: 0 auto;
  padding: 16px 14px;
  border: 1px solid var(--purple);
  border-radius: 10px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.quiz__aside-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.quiz__gifts {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.quiz__gifts li {
  margin-bottom: 2px;
}

.quiz__quote {
  margin: 0 0 20px;
  padding: 0;
  border: none;
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: break-word;
}

.quiz__doctor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 0;
  min-width: 0;
  flex-shrink: 0;
}

.quiz__doctor-photo {
  display: block;
  width: 100px;
  height: 100px;
  max-width: 100px;
  max-height: 100px;
  margin: 0 auto 8px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

.quiz__doctor-info {
  width: 100%;
  text-align: center;
  min-width: 0;
}

.quiz__doctor-name {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.quiz__doctor-role,
.quiz__doctor-exp {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.quiz__doctor-role {
  margin-bottom: 2px;
}

.quiz__step {
  display: none;
}

.quiz__step.is-active {
  display: block;
}

.quiz__question {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.55;
  color: #262626;
  overflow-wrap: break-word;
}

.quiz__hint {
  margin: -12px 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  overflow-wrap: break-word;
}

.quiz__options {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.quiz__option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 57px;
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: break-word;
  min-width: 0;
}

.quiz__option:has(input:checked) {
  border-color: var(--purple);
  background: rgba(117, 70, 184, 0.06);
}

.quiz__option input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--purple);
}

.quiz__option span {
  min-width: 0;
}

.quiz__nav:not([hidden]) {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.quiz__nav[hidden] {
  display: none !important;
}

.quiz__submit-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
}

.quiz__submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin-top: -20px;
}

.quiz__submit-gift {
  width: 156px;
  height: 156px;
  flex-shrink: 0;
  object-fit: contain;
  background: transparent;
}

.form__group {
  margin-bottom: 16px;
}

.form__label {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 400;
}

.form__input {
  width: 100%;
  max-width: 340px;
  min-height: 50px;
  padding: 14px 16px;
  border: 1px solid var(--orange-dark);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  background: #f2f2f2;
}

.form__checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.45;
  cursor: pointer;
  overflow-wrap: break-word;
  min-width: 0;
}

.form__checkbox input {
  flex-shrink: 0;
  margin-top: 2px;
}

.form__checkbox a {
  color: var(--purple);
}

.quiz__consent {
  margin: 0;
  max-width: 340px;
  font-size: 12px;
  line-height: 1.45;
  color: #666666;
  overflow-wrap: break-word;
}

.quiz__consent-link {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quiz__consent-link:hover {
  color: var(--purple-dark);
}

.quiz__form-error {
  margin: 0;
  width: 100%;
  max-width: 520px;
  font-size: 13px;
  line-height: 1.4;
  color: #b42318;
}

.quiz__submit.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.quiz__success {
  min-width: 0;
}

.quiz__success-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.55;
  color: #262626;
  overflow-wrap: break-word;
}

.quiz__success-cta {
  margin-top: auto;
  padding-top: 24px;
  min-width: 0;
}

.quiz__success-label {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.quiz__success-comfort {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.quiz__success-btn {
  display: inline-flex;
  width: 100%;
  max-width: 340px;
  min-height: 60px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  background: var(--orange-dark);
  text-decoration: none;
}

.quiz__success-btn:hover {
  background: #b8521f;
}

[hidden] {
  display: none !important;
}

/* Site footer (under quiz) */
.site-footer {
  background: var(--blue-header);
  color: var(--white);
  min-height: 200px;
  padding: 28px 20px 32px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 40px;
  align-items: start;
  max-width: var(--quiz-panel-w);
  margin: 0 auto;
  min-width: 0;
}

.site-footer__col {
  min-width: 0;
}

.site-footer__col--left {
  font-size: 12px;
  line-height: 1.5;
}

.site-footer__col--center {
  text-align: center;
}

.site-footer__col--right {
  text-align: right;
  font-size: 12px;
  line-height: 1.5;
}

.site-footer__license,
.site-footer__disclaimer,
.site-footer__legal,
.site-footer__contacts {
  margin: 0;
  overflow-wrap: break-word;
}

.site-footer__disclaimer {
  margin-top: 12px;
}

.site-footer__age {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.9;
}

.site-footer__logo {
  display: block;
  width: min(204px, 80vw);
  max-width: none;
  height: 75px;
  margin: 0 auto 14px;
  object-fit: contain;
}

.site-footer__icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.site-footer__icons img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
}

.site-footer__legal {
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.95;
}

.site-footer__policy {
  display: inline-block;
  margin-top: 10px;
  color: var(--white);
  font-size: 12px;
  text-decoration: underline;
}

.site-footer__link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__link:hover,
.site-footer__policy:hover {
  opacity: 0.85;
}

/* Cookie */
.cookie {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(600px, calc(100vw - 40px));
  padding: 14px 16px;
  background: #ebebeb;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.cookie.is-hidden {
  display: none;
}

.cookie__text {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: break-word;
  min-width: 0;
}

.cookie__text a {
  color: var(--purple);
}

/* Scroll top */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 98;
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--blue-header);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.scroll-top.is-visible {
  display: block;
}

/* ≥1200 — десктопный артборд Тильды (screens: 320,1200) */
@media (min-width: 1200px) {
  .container,
  .quiz__container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero__container {
    display: flex;
    justify-content: center;
  }

  .hero__content {
    width: fit-content;
    max-width: 100%;
  }

  .hero__title {
    max-width: none;
  }

  .hero__grid {
    grid-template-columns: auto 347px;
    width: fit-content;
    max-width: 100%;
    gap: 200px;
  }

  .hero__gallery {
    margin-left: 0;
  }

  .hero__text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 434px;
    font-size: 19px;
    line-height: 1.5;
  }

  .hero__text > * {
    margin: 0;
  }

  .hero__list li {
    margin-bottom: 6px;
  }

  .hero__list li:last-child {
    margin-bottom: 0;
  }

  .quiz__panel {
    width: var(--quiz-panel-w);
    height: auto;
  }
}

/* 768–1199 — квиз, футер (верх сайта — в отдельных брейкпоинтах ниже) */
@media (max-width: 1199px) and (min-width: 768px) {
  .container,
  .quiz__container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .quiz {
    padding-top: 36px;
  }

  .quiz__heading {
    margin: 0 0 24px;
    padding: 0 8px;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.35;
  }

  .quiz__container {
    margin-bottom: 22px;
  }

  .quiz__panel {
    width: 100%;
    max-width: min(960px, 100%);
    height: auto;
    min-height: 0;
  }

  .quiz__tabs {
    margin: 20px 16px 0;
    padding: 10px 14px;
    min-height: 56px;
    gap: 12px;
    max-width: none;
  }

  .quiz__tab {
    font-size: 15px;
    padding: 10px 0;
    line-height: 1.35;
  }

  .quiz__tab.is-active,
  .quiz__tab--last:not([hidden]) {
    min-width: 0;
    min-height: 48px;
    padding: 10px 18px;
    font-size: 15px;
  }

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

  .quiz__form-wrap {
    padding: 28px 24px 24px;
    border-right: 1px solid #f2f2f2;
    border-bottom: none;
  }

  .quiz__question {
    font-size: clamp(18px, 2vw, 22px);
  }

  .quiz__aside {
    width: auto;
    padding: 12px 16px 10px 0;
  }

  .quiz__aside-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px 14px;
  }

  .quiz__aside-title {
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.4;
  }

  .quiz__gifts,
  .quiz__quote {
    font-size: 13px;
    line-height: 1.4;
  }

  .quiz__gifts {
    margin-bottom: 10px;
  }

  .quiz__doctor {
    align-items: center;
  }

  .quiz__doctor-info {
    text-align: center;
  }

  .form__input,
  .quiz__submit,
  .quiz__consent,
  .quiz__success-btn {
    max-width: 100%;
  }

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

  .quiz__submit-row {
    max-width: 100%;
  }

  .site-footer {
    padding: 28px 20px 32px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    max-width: min(960px, 100%);
  }

  .site-footer__col--center {
    grid-column: 1 / -1;
    order: -1;
  }

  .site-footer__col--right {
    text-align: left;
  }

  .site-footer__col--left {
    font-size: 11px;
  }
}

/* 992–1199 — маленький ноутбук: хедер в строку, hero как уменьшенный десктоп */
@media (max-width: 1199px) and (min-width: 992px) {
  :root {
    --header-h: 84px;
    --header-gap: 32px;
  }

  .header {
    height: auto;
  }

  .header__inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: auto;
    min-height: 0;
    padding: 10px 0;
    text-align: left;
  }

  .header__brand {
    flex: 1 1 0;
    min-width: 0;
  }

  .header__brand-mark-wrap {
    width: min(174px, 44vw);
    height: 64px;
  }

  .header__brand-mark {
    width: 100%;
    height: 100%;
    max-width: none;
  }

  .header__center {
    flex: 1 1 0;
    justify-content: center;
    gap: 8px;
    min-width: 0;
  }

  .header__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    flex: 1 1 0;
    min-width: 0;
  }

  .header__address,
  .header__hours {
    font-size: 13px;
    line-height: 1.35;
  }

  .header__hours {
    display: block;
    white-space: nowrap;
  }

  .header__phone {
    display: inline-flex;
  }

  .header__icon {
    width: 26px;
    flex-shrink: 0;
  }

  .hero {
    padding-top: calc(var(--header-h) + var(--header-gap));
    padding-bottom: 40px;
  }

  .hero__container {
    display: flex;
    justify-content: center;
  }

  .hero__content {
    width: 100%;
    max-width: 920px;
  }

  .hero__title {
    max-width: none;
    margin: 0 0 28px;
    font-size: 34px;
    line-height: 1.35;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 48px;
    align-items: center;
    width: 100%;
  }

  .hero__gallery {
    order: 0;
    justify-content: flex-end;
    align-items: center;
  }

  .hero__gallery img {
    width: 260px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 347 / 434;
    margin: 0;
    object-fit: cover;
    border-radius: 20px;
  }

  .hero__text {
    font-size: 17px;
    line-height: 1.5;
  }
}

/* 992–1040 — узкий ноутбук: чуть компактнее хедер и hero */
@media (max-width: 1040px) and (min-width: 992px) {
  .header__brand-mark-wrap {
    width: min(156px, 42vw);
    height: 58px;
  }

  .header__brand-mark {
    width: 100%;
    height: 100%;
    max-width: none;
  }

  .header__address,
  .header__hours {
    font-size: 12px;
  }

  .header__icon {
    width: 24px;
  }

  .hero__title {
    font-size: 30px;
    margin-bottom: 24px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 32px;
  }

  .hero__gallery img {
    width: 230px;
  }

  .hero__text {
    font-size: 16px;
  }
}

/* 768–991 — планшет: хедер и hero столбиком */
@media (max-width: 991px) and (min-width: 768px) {
  :root {
    --header-h: 140px;
    --header-gap: 24px;
  }

  .container,
  .quiz__container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header {
    height: auto;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  }

  .header__inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "center"
      "right";
    align-items: center;
    row-gap: 10px;
    height: auto;
    min-height: 0;
    padding: 12px 0 14px;
    text-align: center;
  }

  .header__brand {
    grid-area: brand;
    justify-self: center;
    flex: unset;
    order: unset;
    min-width: 0;
    justify-content: center;
  }

  .header__brand-mark-wrap {
    width: min(178px, 48vw);
    height: 66px;
    margin: 0 auto;
  }

  .header__brand-mark {
    width: 100%;
    height: 100%;
    max-width: none;
    object-position: center center;
  }

  .header__center {
    grid-area: center;
    justify-content: center;
    flex: unset;
    order: unset;
    gap: 8px;
    min-width: 0;
  }

  .header__right {
    grid-area: right;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: unset;
    order: unset;
    min-width: 0;
  }

  .header__address,
  .header__hours {
    font-size: 13px;
    line-height: 1.4;
  }

  .header__hours {
    display: block;
    white-space: normal;
    text-align: center;
  }

  .header__phone {
    display: inline-flex;
  }

  .header__icon {
    width: 24px;
    flex-shrink: 0;
  }

  .hero {
    padding-top: calc(var(--header-h) + var(--header-gap));
    padding-bottom: 32px;
  }

  .hero__container {
    display: block;
  }

  .hero__content {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
  }

  .hero__title {
    max-width: none;
    margin: 0 0 22px;
    font-size: 30px;
    line-height: 1.35;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero__gallery {
    order: -1;
    justify-content: center;
    align-items: center;
  }

  .hero__gallery img {
    width: 100%;
    max-width: min(320px, 100%);
    height: auto;
    margin: 0 auto;
    aspect-ratio: 347 / 434;
    object-fit: cover;
    border-radius: 20px;
  }

  .hero__text {
    font-size: 16px;
    line-height: 1.5;
  }

  .quiz__panel {
    max-width: min(720px, 100%);
  }

  .quiz__body {
    grid-template-columns: 1fr;
  }

  .quiz__form-wrap {
    padding: 24px 20px 20px;
    border-right: none;
    border-bottom: 1px solid #f2f2f2;
  }

  .quiz__aside {
    width: 100%;
    padding: 0 20px 10px;
  }

  .quiz__aside-card {
    padding: 16px 14px;
  }

  .quiz__doctor {
    align-items: center;
  }

  .quiz__doctor-info {
    text-align: center;
  }

  .site-footer__inner {
    max-width: min(720px, 100%);
  }
}

/* ≤767 — мобильная версия */
@media (max-width: 767px) {
  :root {
    --header-h: 156px;
    --header-gap: 28px;
  }

  .container,
  .quiz__container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header {
    height: auto;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  }

  .header__inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "center"
      "right";
    align-items: center;
    row-gap: 12px;
    height: auto;
    min-height: 0;
    padding: 14px 0 16px;
    text-align: center;
  }

  .header__brand {
    grid-area: brand;
    justify-self: center;
    flex: unset;
    order: unset;
    min-width: 0;
    justify-content: center;
  }

  .header__brand-mark-wrap {
    width: min(178px, 48vw);
    height: 66px;
    margin: 0 auto;
  }

  .header__brand-mark {
    width: 100%;
    height: 100%;
    max-width: none;
    object-position: center center;
  }

  .header__center {
    grid-area: center;
    justify-content: center;
    flex: unset;
    order: unset;
    gap: 8px;
    min-width: 0;
  }

  .header__right {
    grid-area: right;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: unset;
    order: unset;
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
    padding: 0 4px;
  }

  .header__address {
    font-size: 12px;
    line-height: 1.4;
  }

  .header__hours {
    display: block;
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
    white-space: normal;
  }

  .header__phone {
    display: inline-flex;
    align-items: center;
    gap: 0;
  }

  .header__phone-text {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
    white-space: nowrap;
  }

  .header__phone-btn {
    display: none;
  }

  .header__icon {
    width: 24px;
    flex-shrink: 0;
  }

  .hero {
    padding-top: calc(var(--header-h) + var(--header-gap));
    padding-bottom: 32px;
  }

  .hero__content {
    width: 100%;
  }

  .hero__title {
    max-width: 100%;
    margin: 0 0 20px;
    font-size: 26px;
    line-height: 1.35;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero__gallery {
    order: 0;
    justify-content: center;
  }

  .hero__gallery img {
    width: 100%;
    height: auto;
    max-width: min(330px, 100%);
    margin: 0 auto;
    aspect-ratio: auto;
  }

  .hero__text {
    font-size: 15px;
    line-height: 1.5;
  }

  .hero__lead br {
    display: none;
  }

  .quiz {
    padding-top: 36px;
  }

  .quiz__heading {
    margin: 0 0 22px;
    padding: 0 4px;
    font-size: 24px;
    line-height: 1.35;
  }

  .quiz__container {
    margin-bottom: 20px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .quiz__panel {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    border-radius: 14px;
  }

  .quiz__tabs {
    margin: 16px 12px 0;
    padding: 8px 10px;
    min-height: 48px;
    gap: 8px;
    max-width: none;
  }

  .quiz__tab {
    font-size: 14px;
    padding: 10px 12px;
    line-height: 1.3;
  }

  .quiz__tab.is-active,
  .quiz__tab--last:not([hidden]) {
    min-width: 0;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .quiz__body {
    grid-template-columns: 1fr;
  }

  .quiz__form-wrap {
    padding: 18px 14px 16px;
    border-right: none;
    border-bottom: 1px solid #f2f2f2;
    min-height: 0;
  }

  .quiz__question {
    margin-bottom: 18px;
    font-size: 18px;
  }

  .quiz__hint {
    margin-top: 0;
    font-size: 13px;
  }

  .quiz__options {
    gap: 10px;
    margin-bottom: 20px;
  }

  .quiz__option {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 14px;
  }

  .quiz__aside {
    display: flex;
    width: 100%;
    padding: 0 14px 10px;
  }

  .quiz__aside-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px 14px;
  }

  .quiz__aside-title {
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.4;
  }

  .quiz__gifts,
  .quiz__quote {
    font-size: 13px;
    line-height: 1.4;
  }

  .quiz__gifts {
    margin-bottom: 10px;
  }

  .quiz__quote {
    margin-bottom: 20px;
  }

  .quiz__doctor {
    align-items: center;
  }

  .quiz__doctor-info {
    text-align: center;
  }

  .form__input,
  .quiz__submit,
  .quiz__consent,
  .quiz__success-btn {
    max-width: 100%;
  }

  .quiz__submit {
    width: 100%;
    flex: unset;
    min-height: 54px;
    font-size: 15px;
  }

  .quiz__submit-block {
    margin-top: 16px;
  }

  .quiz__submit-row {
    max-width: 100%;
    margin-top: 0;
  }

  .quiz__submit-gift {
    display: none !important;
  }

  .quiz__success-title {
    font-size: 19px;
  }

  .quiz__success-label,
  .quiz__success-comfort {
    font-size: 16px;
  }

  .site-footer {
    padding: 22px 12px 26px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
    max-width: 100%;
  }

  .site-footer__col--right,
  .site-footer__col--left {
    text-align: center;
    font-size: 12px;
  }

  .site-footer__logo {
    max-width: 174px;
    height: 64px;
  }

  .cookie {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .scroll-top {
    right: 12px;
    bottom: 72px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* ≤479 — компактные телефоны */
@media (max-width: 479px) {
  :root {
    --header-gap: 24px;
  }

  .container,
  .quiz__container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .header__inner {
    row-gap: 12px;
    padding: 12px 0 14px;
  }

  .header__brand-mark-wrap {
    width: min(161px, 46vw);
    height: 60px;
  }

  .header__brand-mark {
    width: 100%;
    height: 100%;
    max-width: none;
  }

  .header__address {
    font-size: 11px;
  }

  .header__phone-text {
    font-size: 12px;
  }

  .hero__title {
    font-size: 23px;
    margin-bottom: 18px;
  }

  .quiz__heading {
    font-size: 21px;
    margin-bottom: 20px;
  }

  .quiz__tabs {
    margin-left: 8px;
    margin-right: 8px;
    padding: 8px;
  }

  .quiz__tab {
    font-size: 13px;
    padding: 8px 10px;
  }

  .quiz__tab.is-active,
  .quiz__tab--last:not([hidden]) {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ≤390 — узкие экраны */
@media (max-width: 390px) {
  .hero__title {
    font-size: 21px;
  }

  .hero__text {
    font-size: 14px;
  }

  .quiz__heading {
    font-size: 18px;
  }

  .quiz__question {
    font-size: 17px;
  }

  .quiz__option {
    font-size: 14px;
    min-height: 44px;
  }
}

/* ≤320 — минимальная ширина */
@media (max-width: 320px) {
  .header__brand-mark-wrap {
    width: min(151px, 44vw);
    height: 56px;
  }

  .header__brand-mark {
    width: 100%;
    height: 100%;
    max-width: none;
  }

  .hero__text {
    font-size: 13px;
  }

  .quiz__tab {
    font-size: 12px;
    padding: 8px;
  }
}
