:root {
  --color-bg: #f0f0f0;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #979797;
  --color-border: #272727;
  --color-accent: #ff2190;
  --color-bot-bubble: #ffffff;
  --color-user-bubble: #000000;
  --color-user-text: #ffffff;
  --color-dark: #000000;
  --color-dark-hover: #222222;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --font: 'Inter', system-ui, sans-serif;
  --max-content: 560px;
  --max-quiz: 480px;
  --max-desktop: 1360px;
  /* Палитра canvas-сферы на лендинге (rgb-триплеты) */
  --tenant-sphere-rgb: 151, 151, 151;
  --tenant-sphere-rgb-soft: 39, 39, 39;
  --tenant-sphere-rgb-mid: 151, 151, 151;
  --tenant-sphere-rgb-deep: 39, 39, 39;
  --tenant-sphere-rgb-strong: 255, 33, 144;
}

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


button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* App shell — fullscreen */
.app {
  min-height: 88dvh;
  padding: 0px!important;
  color: #272727;
  background: none;
  display: flex;
  flex-direction: column;
}

.footer{
  display: none;
}

.container{
  padding: 0px!important;
}
.header__container{
  padding-right: 20px!important;
  padding-left: 20px!important;
}
.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 88dvh;
  overflow: hidden;
}

.screen-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen-action-bar,
.quiz-action-bar {
  flex-shrink: 0;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
}

#screen-landing .screen-action-bar {
  max-width: none;
  margin-top: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

#screen-landing .screen-action-bar .btn {
  width: 100%;
  max-width: none;
  display: block;
}

.disclaimer-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 auto;
  width: 100%;
  max-width: fit-content;
  box-sizing: border-box;
  color: #979797;
}

.disclaimer-note__icon {
  display: none;
  flex-shrink: 0;
  width: 12px;
  height: 10px;
  margin-top: 3px;
  color: #979797;
}

.disclaimer-note__text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #979797;
  text-align: left;
}

#screen-landing .disclaimer-note {
  margin-top: 4px;
}

.questionnaire__footer .disclaimer-note {
  margin-top: 4px;
}

@media (min-width: 768px) {
  .disclaimer-note {
    max-width: fit-content;
  }
}

.landing__consent {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-self: stretch;
  gap: 8px;
  text-align: left;
  width: 100%;
  max-width: none;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #272727;
}

#screen-landing .landing__consent,
#screen-landing .landing__consent span {
  color: #272727 !important;
}

#screen-landing .landing__consent a {
  color: #979797 !important;
}

#screen-landing .landing__consent .checkbox {
  position: relative;
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

#screen-landing .landing__consent .checkbox input {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  pointer-events: none;
}

#screen-landing .landing__consent .checkbox__box {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  background: #fff !important;
  border: 1px solid #979797 !important;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#screen-landing .landing__consent .checkbox input:checked + .checkbox__box {
  background: #272727 !important;
  border-color: #272727 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6L5 9L10 3' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

#screen-landing #btn-start:disabled,
#screen-landing #btn-start.disabled {
  background: #e8e8e8 !important;
  color: #979797 !important;
  border-color: #e8e8e8 !important;
  opacity: 1 !important;
  pointer-events: none;
}

#screen-landing #btn-start:not(:disabled) {
  background: #272727 !important;
  color: #fff !important;
  border-color: #272727 !important;
}

#screen-landing .screen-scroll {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Landing — экран 1 */
.landing {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 24px 16px;
  text-align: center;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

.landing__avatar-slot {
  flex: 1 1 0;
  min-height: 120px;
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  container-type: size;
  margin-bottom: 16px;
  overflow: visible;
}

.landing__avatar {
  position: relative;
  /* круг по меньшей стороне слота, прижат к верху — целиком внутри рамки */
  width: min(100%, 28dvh);
  height: min(100%, 28dvh);
  width: min(100cqi, 100cqb, 100%);
  height: min(100cqi, 100cqb, 100%);
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 50%;
  background: transparent;
  margin: 0;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(closest-side, #000 98%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 98%, transparent 100%);
}

.landing__avatar-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  pointer-events: auto;
  border-radius: 50%;
  background: transparent;
}

/* Собственный размер bitmap canvas не должен растягивать слот */
.landing__avatar > .landing__avatar-canvas {
  position: absolute;
  inset: 0;
}

.landing__title {
  font-size: clamp(28px, 8vw, 50px);
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.landing__text {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  max-width: 360px;
  flex-shrink: 0;
}

.landing__consent a{
  color: #272727;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }

.screen-action-bar .btn,
.quiz-action-bar .btn {
  width: 100%;
}

.quiz-action-bar--recommendations {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-action-bar[hidden],
#recommendations-section[hidden] {
  display: none !important;
}

.quiz-action-bar .questionnaire__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  width: 100%;
}

/* Вебвью приложения: две нижние кнопки (Дальше + Пропустить и аналоги) ближе друг к другу */
@media (max-width: 768px) {
  #app.is-only-content .quiz-action-bar .questionnaire__footer:has(> .btn + .btn),
  #app.is-only-content #recommendations-footer:has(> .btn + .btn) {
    gap: 8px;
  }

  #app.is-only-content .quiz-action-bar .questionnaire__footer:has(> .btn + .btn) > .btn,
  #app.is-only-content #recommendations-footer:has(> .btn + .btn) > .btn {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* Под «Начать подбор» ближе к дисклеймеру, отступ над кнопкой не меняется */
  #app.is-only-content #screen-landing .screen-action-bar {
    gap: 8px;
  }

  #app.is-only-content #screen-landing .landing__consent {
    margin-bottom: 8px;
  }

  #app.is-only-content #screen-landing .disclaimer-note {
    margin-top: 0;
  }

  #app.is-only-content #screen-landing #btn-start {
    margin-bottom: 0 !important;
  }
}

.screen--active {
  display: flex;
}

.screen-top {
  display: flex;
  justify-content: flex-end;
  padding: 20px 24px 0;
}

.lang-select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text);
}

.checkbox__box {
  width: 18px;
  height: 18px;
  background: #E0E0E0;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.checkbox input:checked + .checkbox__box {
  background: var(--color-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6L5 9L10 3' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Fork — экран 2 */
.fork {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.fork__title {
  font-size: 25px;
  margin: 0 0 8px;
  text-align: center;
}

.fork__subtitle {
  font-size: 13px;
  margin: 0 0 32px;
  text-align: center;
}

.fork__cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.fork-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
  background-color: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  text-align: left;
  width: 100%;
}

.fork-card:hover {
  border: 1px solid var(--color-accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.fork-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  margin-bottom: 4px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

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

.fork-card__title {
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 3px;
}

.fork-card__desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Quiz — экран 3 */
.screen--quiz {
  background: none;
}

.screen--quiz.screen--active {
  max-height: 88dvh;
}

.quiz-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0 16px 0;
  width: 100%;
}

.quiz-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.quiz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 16px 0 68px;
}

.quiz-toolbar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
}

.quiz-toolbar__btn:disabled {
  cursor: default;
  opacity: 0.35;
}

.quiz-toolbar__btn img {
  display: block;
}

.quiz-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.quiz-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.quiz-progress {
  height: 2px;
  background: #eee;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.quiz-progress__bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width 0.35s ease;
}

#recommendations-footer:not([hidden]) {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  z-index: 40;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  /* те же боковые отступы, что у .quiz-wrap */
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--color-bg);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
}

#recommendations-footer .btn,
#recommendations-footer .recommendations__cart-btn,
#recommendations-footer .recommendations__add-all {
  width: 100%;
  /* ширина как у .quiz-card */
  max-width: 560px;
  box-sizing: border-box;
  margin-top: 0;
}

#screen-route1:has(#recommendations-footer:not([hidden])) .quiz-scroll {
  padding-bottom: 160px;
}

.questionnaire__title {
  font-size: 25px;
  font-weight: 400;
  margin: 0 0 6px;
  line-height: 1.35;
}

.questionnaire__block {
  margin-bottom: 32px;
}

.questionnaire__block:last-of-type {
  margin-bottom: 8px;
}

.questionnaire__block .questionnaire__title {
  font-size: 25px;
}

.questionnaire__subtitle {
  font-size: 13px;
  margin: 0 0 24px;
  line-height: 1.5;
}

.questionnaire__options--cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 500;
  min-height: 120px;
  color: #272727;
}

.option-card:hover { border: 1px solid #ff2190; }

.option-card--selected {
  border: 1px solid #FF2190;

}

.option-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: 1px solid;
  border-radius: 50%;
  box-sizing: border-box;
}

.option-card__icon img {
  display: block;
  width: auto;
  height: auto;
  max-width: 22px;
  max-height: 22px;
}

.questionnaire__options--pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  margin-left: 2px;
}

.option-pill {
  padding: 10px 14px;
  min-width: 72px;
  width: auto;
  color: #272727;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  border: 1px solid transparent;
}

.option-pill:hover { border: 1px solid #ff2190; }

.option-pill--selected {
  border: 1px solid #FF2190;

}

.questionnaire__options--tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.option-tag {
  padding: 8px 20px;
  border-radius: 8px;
  background: #fff;
  color: #272727;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  border: 1px solid transparent;
}

.option-tag:hover { border: 1px solid #ff2190; }

.option-tag--selected {
  border: 1px solid #FF2190;

}

.questionnaire__options--list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  color: #272727;
  background: #ffffff;
  border-radius: 8px;
  font-size: 15px;
  border: 1px solid transparent;
}

.option-btn__label {
  display: block;
  color: #272727;
  font-size: 15px;
  line-height: 1.35;
}

.option-btn__description {
  display: block;
  color: #979797;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
}

.option-btn:hover { border: 1px solid #ff2190; }

.option-btn--selected {
  border: 1px solid #FF2190;
}

.questionnaire__summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.questionnaire__summary dt { color: var(--color-text-muted); }
.questionnaire__summary dd { margin: 0; font-weight: 500; text-align: right; }

/* Profile summary — экран подтверждения профиля */
.questionnaire-panel--profile-summary {

  width: 100%;
}

.profile-summary__heading {
  font-size: 25px;
  margin: 0 0 6px;
  line-height: 1.25;
  color: var(--color-text);
}

.profile-summary__lead {
  margin: 0 0 20px;
  font-size: 13px;
  color: #272727;
  line-height: 1.4;
}

.profile-summary__card {
  width: 100%;
  margin: 40px 0 40px 0;
  padding: 4px 20px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}

.profile-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 20px 0 12px;
  border-bottom: 1px solid #ececec;
}

.profile-summary__row:last-child {
  border-bottom: none;
}

.profile-summary__row dt {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.profile-summary__row dd {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
}

.profile-summary__tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: #e8e8e8;
  border-radius: var(--radius-md);
}

.profile-summary__tip-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #6b6b6b;
}

.profile-summary__tip-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text);
}

.questionnaire-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 16px 14px 12px;
  background: #ececec;
  border-left: 2px solid #272727;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.questionnaire-hint[hidden] {
  display: none !important;
}

.restrictions-page__title {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.3;
  color: #272727;
}

.restrictions-page__hint {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.45;
  color: #272727;
}

.restrictions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.restrictions-multi {
  margin-bottom: 6px;
}

.restrictions-multi .questionnaire__title {
  font-size: 16px;
  margin-bottom: 12px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #fff;
  border-radius: 12px;
}

.switch-row__label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  color: #272727;
  text-align: left;
}

.switch {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease;
}

.switch__thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-accent);
  transform: translateY(-50%);
  transition: left 0.22s ease, background-color 0.22s ease;
  pointer-events: none;
}

.switch--on {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.switch--on .switch__thumb {
  left: calc(100% - 23px);
  background: #fff;
}

.questionnaire-hint[hidden] {
  display: none !important;
}

.restrictions-page__title {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.3;
  color: #272727;
}

.restrictions-page__hint {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.45;
  color: #272727;
}

.restrictions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.restrictions-multi-options {
  margin: 2px 0 8px;
}

.restrictions-other {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 8px;
  padding: 14px 16px;
  box-sizing: border-box;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  cursor: text;
}

.restrictions-other__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  color: #272727;
  padding: 0;
}

.restrictions-other__input::placeholder {
  color: #979797;
}

.restrictions-other__arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.restrictions-other__arrow svg {
  display: block;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #fff;
  border-radius: 12px;
}

.switch-row__label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  color: #272727;
  text-align: left;
}

.switch {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 1.5px solid var(--color-accent);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease;
}

.switch__thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-accent);
  transform: translateY(-50%);
  transition: left 0.22s ease, background-color 0.22s ease;
  pointer-events: none;
}

.switch--on {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.switch--on .switch__thumb {
  left: calc(100% - 23px);
  background: #fff;
}

.questionnaire-hint__icon.mo,
.mo.questionnaire-hint__icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  max-width: none;
  align-self: center;
  display: inline-flex;
  position: relative;
}

.mo {
  display: inline-flex;
  width: 18px;
  height: 18px;
  position: relative;
  flex-shrink: 0;
}

.md {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7D7D7D;
}

.md:nth-child(1) {
  top: 0;
  left: 7px;
  background: #7D7D7D;
  animation: of 2s ease-in-out infinite;
}

.md:nth-child(2) {
  top: 7px;
  right: 0;
  background: #1B1B1B;
  animation: of 2s ease-in-out 0.3s infinite;
}

.md:nth-child(3) {
  bottom: 0;
  left: 7px;
  background: #4F3F3F;
  animation: of 2s ease-in-out 0.6s infinite;
}

.md:nth-child(4) {
  top: 7px;
  left: 0;
  background: #7D7D7D;
  animation: of 2s ease-in-out 0.9s infinite;
}

.md:nth-child(5) {
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  background: #1B1B1B;
  animation: oc 2s ease-in-out infinite;
}

@keyframes of {
  0%, 100% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0.4;
  }
  50% {
    transform: translate(0, -2px) scale(1);
    opacity: 1;
  }
}

@keyframes oc {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.questionnaire-hint__text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #272727;
  text-align: left;
}

.questionnaire-panel--profile-summary .questionnaire__footer .btn--next {
  margin-top: 4px;
}

.budget-slider {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.budget-slider__input { width: 100%; accent-color: var(--color-accent); }

.budget-slider__value {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

/* Photo upload step animation */
.photo-upload-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  width: 100%;
  text-align: center;
}

.photo-upload-anim__title {
  margin: 0;
  font-size: 25px;
  margin-bottom: -10px;
  line-height: 1.3;
  color: #272727;
}

.photo-upload-anim__lead {
  margin: 0;
  max-width: 320px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #272727;
}

.photo-upload-anim__scan-outer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(270px, 100%);
  height: 160px;
  margin-top: 4px;
  border-radius: 80px;
  border: 2px dashed rgba(151, 151, 151, 0.45);
  background: rgba(151, 151, 151, 0.06);
}

.photo-upload-anim__scan-inner {
  position: relative;
  width: calc(100% - 16px);
  max-width: 254px;
  height: 146px;
  border-radius: 74px;
  border: 1px solid rgba(151, 151, 151, 0.18);
}

.photo-upload-anim__scan-line {
  position: absolute;
  left: 10%;
  width: 80%;
  height: 2px;
  opacity: 0.5;
  background: linear-gradient(90deg, transparent, #272727, transparent);
  animation: photoUploadScan 3s ease-in-out infinite;
}

@keyframes photoUploadScan {
  0%   { top: 15%; opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.5; }
  100% { top: 85%; opacity: 0; }
}

.photo-upload-anim__corner {
  position: absolute;
  width: 16px;
  height: 16px;
}

.photo-upload-anim__corner svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(151, 151, 151, 0.45);
  stroke-width: 1.5;
}

.photo-upload-anim__corner--tl { top: 16px; left: 16px; }
.photo-upload-anim__corner--tr { top: 16px; right: 16px; transform: scaleX(-1); }
.photo-upload-anim__corner--bl { bottom: 16px; left: 16px; transform: scaleY(-1); }
.photo-upload-anim__corner--br { bottom: 16px; right: 16px; transform: scale(-1); }

.photo-upload-anim__tags {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #272727;
  letter-spacing: 0.02em;
}
/*.formblock__btn{*/
/*  margin-top: 0px!important;*/
/*}*/
.photo-upload-anim__tips {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  width: 100%;
}

.photo-upload-anim__tip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(151, 151, 151, 0.35);
  text-align: left;
}

.photo-upload-anim__tip:first-child {
  border-top: 0px;
}
.photo-upload-anim__tip:last-child {
  border-bottom: 0px;
}

.photo-upload-anim__tip-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: block;
}

.photo-upload-anim__tip-text {
  font-size: 13px;
  line-height: 1.45;
  color: #272727;
}

.questionnaire-panel--photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.questionnaire-panel--photo-upload .quiz-action-bar .questionnaire__footer,
.questionnaire-panel--photo-upload + .quiz-action-bar .questionnaire__footer {
  margin-top: 0;
  width: 100%;
  max-width: none;
}

.questionnaire-panel--photo-upload .quiz-action-bar .questionnaire__footer .btn,
#questionnaire-footer .questionnaire__footer .btn {
  width: 100%;
}

@media (min-width: 768px) {

  .questionnaire-hint{
    width: 100%;
  }
  .photo-upload-anim__title {
    font-size: 20px;
  }

  .photo-upload-anim__lead {
    max-width: 360px;
    font-size: 15px;
  }
}

.questionnaire__footer {
  margin-top: 8px;
}

.questionnaire__text {
  margin-bottom: 16px;
}

.questionnaire__text-input {
  width: 100%;
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

.questionnaire__text-input:focus {
  border-color: #aaa;
}

.questionnaire__text-input::placeholder {
  color: var(--color-text-muted);
}

.questionnaire__footer .btn--next {
  width: 100%;
  text-transform: uppercase;
  font-size: 13px;
  padding: 16px;
}

.questionnaire__footer .btn--next:disabled {
  color: rgb(151, 151, 151);
  opacity: 1;
  pointer-events: none;
  cursor: not-allowed;
}

/* Prompt — экран 4 */
.prompt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.prompt__title {
  font-size: 22px;
  margin: 0 0 8px;
  text-align: center;
}

.prompt__subtitle {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 32px;
  text-align: center;
}

.prompt-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.prompt-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 4px;
  background: transparent;
  min-width: 0;
}

.prompt-input::placeholder { color: var(--color-text-muted); }

.prompt-input__attach,
.prompt-input__mic,
.prompt-input__send {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.prompt-input__send {
  color: var(--color-text);
}

.prompt-input__attach:hover,
.prompt-input__mic:hover,
.prompt-input__send:hover { color: var(--color-text); }

/* Chat — экран 5 */
.screen--chat {
  background: none;
  margin: 0 auto;
  width: 100%;
}

.screen--chat .chat-toolbar {
  padding: 16px 16px 12px;
  width: 100%;
  box-sizing: border-box;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.chat-header__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.icon-btn {
  display: none;
  visibility: hidden;
  position: relative;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  border-radius: var(--radius-sm);
}

.icon-btn:hover { opacity: 0.6; }

.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  background: var(--color-dark);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}



.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: var(--max-content);
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 1024px) {
  :root {
    --max-quiz: var(--max-desktop);
    --max-content: var(--max-desktop);
  }

  .screen-top {
    max-width: var(--max-desktop);
    margin: 0 auto;
    width: 100%;
    padding: 40px 40px 0;
  }

  .landing {
    max-width: 100%;
    padding: 40px 40px 16px;
  }

  .landing__avatar-slot {
    margin-bottom: 24px;
  }

  .landing__title {
    font-size: 50px;
  }

  .landing__text {
    max-width: 400px;
    font-size: 15px;
  }

  #app .btn--wide {
    max-width: var(--max-desktop);
  }

  .fork {
    max-width: var(--max-desktop);
    padding: 40px;
  }

  .fork__cards {
    flex-direction: column;
    gap: 20px;
  }

  .fork-card {
    flex: 1;
  }

  .quiz-wrap {
    padding: 0 40px;
    align-items: stretch;
  }

  .quiz-card {
    max-width: var(--max-desktop);
    box-shadow: none;
  }

  .screen-action-bar,
  .quiz-action-bar {
    max-width: var(--max-desktop);
  }

  #recommendations-footer:not([hidden]) {
    padding-left: 40px;
    padding-right: 40px;
  }

  #recommendations-footer .btn,
  #recommendations-footer .recommendations__cart-btn,
  #recommendations-footer .recommendations__add-all {
    max-width: var(--max-desktop);
  }

  .recommendations {
    max-width: none;
    margin-top: 32px;
  }

  .recommendations__title {
    font-size: 24px;
  }

  .questionnaire-panel--sensitivity .questionnaire__title {
    font-size: 24px;
  }

  .sensitivity-display__value {
    font-size: 55px;
  }

  .sensitivity-slider__thumb {
    width: 16px;
    height: 16px;
  }

  .prompt {
    max-width: 720px;
    padding: 60px 40px;
  }

  .chat-body {
    max-width: var(--max-desktop);
    margin: 0 auto;
    width: 100%;
  }

  .chat-messages {
    margin: 0;
    max-width: none;
    padding: 32px 40px;
  }

  .chat-footer,
  .chat-go-cart-bar {
    margin: 0;
    max-width: none;
    padding-left: 40px;
    padding-right: 40px;
  }

  .message {
    max-width: 60%;
  }

  .routine-step__row,
  .routine-alt__row {
    gap: 16px;
  }

  .routine-step__reason,
  .routine-alt__reason {
    font-size: 13px;
  }

  .routine-tabs__btn {
    padding: 12px 16px;
  }
}

/* Messages — экран 5 */
.message { max-width: 88%; }

.message--user {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message--bot {
  align-self: flex-start;
}

.message__bubble {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  line-height: 1.5;
  font-size: 13px;
  word-break: break-word;
}

.message--bot .message__bubble {
  border: 1px solid #e0e0e0;
  border-top-left-radius: 4px;
}

.message--user .message__bubble {
  background: var(--color-user-bubble);
  color: var(--color-user-text);
  border-bottom-right-radius: 4px;
}

.message__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.message--bot .message__link {
  color: var(--color-text);
}

.message--user .message__link {
  color: var(--color-user-text);
  opacity: 0.92;
}

.message__link:hover {
  opacity: 0.75;
}

.message__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.message__image {
  max-width: 200px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.message__time {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.chat-loader {
  position: absolute;
  bottom: 16px;
  padding: 10px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.loader { display: flex; gap: 4px; }

.loader__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: bounce 1.2s infinite;
}

.loader__dot:nth-child(2) { animation-delay: 0.2s; }
.loader__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.chat-go-cart-bar {
  padding: 0px 32px 0px;
  max-width: var(--max-content);
  margin: 0 auto;
  width: 100%;
}

.chat-go-cart-bar .formblock__btn {
  display: block;
  width: 100%;
  text-align: center;
}

.chat-footer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 32px 16px;
  background: none;
  max-width: var(--max-content);
  margin: 0 auto;
  width: 100%;
}

.chat-input-wrap {
  max-height: 50px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 20px 4px 20px;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-md);
}

.chat-input {
  flex: 1;
  resize: none;
  border: none;
  background: transparent;
  padding: 10px 4px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  max-height: 100px;
  outline: none;
  min-width: 0;
}

.chat-input::placeholder { color: var(--color-text-muted); }

.chat-input__attach,
.chat-input__mic {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.chat-input__mic.is-recording { color: var(--color-accent); animation: pulse 1s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chat-send {
  width: 44px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  flex-shrink: 0;
}

.chat-send:disabled { opacity: 0.35; cursor: not-allowed; }

/* Кнопки — стили сайта (.btn.formblock__btn), доп. модификаторы только внутри #app */
#app .btn--wide {
  width: 100%;
  max-width: 400px;
}

#app .skinbot-btn--outline {
  background-color: transparent !important;
  color: #272727 !important;
  border-color: #272727 !important;
}

#app .skinbot-btn--outline:hover {
  background-color: #272727 !important;
  color: #fff !important;
}

#app .btn--sm {
  padding: 8px 14px !important;
  font-size: 12px !important;
}

#app .product-card__cart-btn {
  width: 100%;
  margin-top: 4px;
}

#app #btn-start.disabled,
#app #btn-start:disabled {
  color: rgb(151, 151, 151);
  opacity: 1;
  pointer-events: none;
}

/* Products */
.products, .recommendations__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.product-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.product-card__image {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f5f5f5;
}

.product-card__image img { width: 100%; height: 100%; object-fit: cover; }

.product-card__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.product-card__brand { font-size: 11px; color:  var(--color-text); text-transform: uppercase; }

.product-card__name { font-size: 11px; font-weight: 500; color: var(--color-text-muted); text-decoration: none; }

.product-card__meta { display: flex; gap: 8px; align-items: center; }

.product-card__price {font-size: 13px; }

.product-card__reason { font-size: 12px; color: var(--color-text-muted); margin: 0; }

.recommendations {
  width: 100%;
  max-width: none;
  margin: 24px 0 0;
  box-sizing: border-box;
}

.routine-view,
.routine-steps,
.routine-step {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.routine-step__row,
.routine-alt__row {
  cursor: pointer;
}

.recommendations__add-all {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recommendations__add-all--hidden,
#app.is-only-content .recommendations__add-all--remove {
  display: none !important;
}

#app.is-only-content #recommendations-footer .recommendations__add-all {
  margin-top: 0;
}

#app.is-only-content .routine-view > .recommendations__pdf-btn {
  margin-top: 8px;
}

.recommendations__cart-btn--disabled,
#app .recommendations__cart-btn.recommendations__cart-btn--disabled {
  background-color: #e8e8e8 !important;
  color: #979797 !important;
  border-color: #e8e8e8 !important;
  pointer-events: none;
  cursor: not-allowed;
}

.recommendations__header {
  margin-bottom: 16px;
}

.recommendations__title {
  font-size: 25px;
  margin: 0 0 8px;
  line-height: 1.3;
}

.recommendations__subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.recommendations__footer {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
  padding-top: 8px;
  width: 100%;
}

.recommendations__cart-btn,
.recommendations__pdf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.recommendations__pdf-btn {
  margin-top: 20px;
}

.recommendations__cart-btn {
  background-color: #272727 !important;
  color: #fff !important;
  border-color: #272727 !important;
}

.recommendations__cart-btn:hover {
  background-color: #000 !important;
}

/* Routine — рутина с альтернативами */
.routine-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.routine-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}

.routine-tabs__btn {
  border: 1px solid #272727;
  flex: 1;
  color: #272727;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.routine-tabs__btn:hover{
  background: #272727;
  color: #fff;
}

.routine-tabs__btn--active {
  background: #272727;
  color: #fff;
}

.routine-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.routine-step {
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.routine-step__head {
  padding: 12px 16px 0;
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.routine-step__body {
  padding: 12px 16px 16px;
}

.routine-step__row {
  display: flex;
  gap: 12px;
}

.routine-step__image {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f5f5f5;
}

.routine-step__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.routine-step__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.routine-step__brand {
  font-size: 11px;
  color: var(--color-text);
  text-transform: uppercase;
}

.routine-step__name {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  line-height: 1.35;
}

.routine-step__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.routine-step__volume {
  color: var(--color-text-muted);
}

.routine-step__price {
}

.routine-step__reason-block {
  margin: 12px 0 0;
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.routine-step__reason-block.long-text {
  max-height: 90px;
  overflow: hidden;
  cursor: pointer;
}

.routine-step__reason-block.long-text::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 35px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0%) 0%, rgb(255 255 255) 100%);
  pointer-events: none;
}

.routine-step__reason {
  margin: 0;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
}

.routine-step__actions {
  display: flex;
  margin-top: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.routine-alt__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.routine-product-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.routine-product-expand svg {
  display: block;
}

.routine-product-expand:hover {
  opacity: 0.7;
}

.routine-step__alternatives {
  padding: 12px 16px 16px;
  margin: 12px 16px 16px;
  border-radius: 8px;
  background: #fafafa;
}

.routine-step__alternatives-title {
  font-size: 11px;
  font-weight: 400;
  color: #979797;
  margin-bottom: 12px;
}

.routine-alt {
  padding: 10px 0;
}

.routine-alt:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.routine-alt__row {
  display: flex;
  gap: 12px;
}

.routine-alt__image {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}

.routine-alt__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.routine-alt__info {
  flex: 1;
  min-width: 0;
}

.routine-alt__brand {
  font-size: 11px;
  text-transform: uppercase;
}

.routine-alt__name {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.35;
  margin-top: 2px;
}

.routine-alt__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
}

.routine-alt__volume {
  color: var(--color-text-muted);
}

.routine-alt__price {
}

.routine-alt__reason-block {
  margin: 8px 0 0;
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.routine-alt__reason-block.long-text {
  max-height: 72px;
  overflow: hidden;
  cursor: pointer;
}

.routine-alt__reason-block.long-text::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 28px;
  background: linear-gradient(180deg, rgb(250 250 250 / 0%) 0%, rgb(250 250 250) 100%);
  pointer-events: none;
}

.routine-alt__reason {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.routine-alt__actions {
  display: flex;
  margin-top: 8px;
}

.add-to-cart-btn {
  width: 120px;
  display: block;
  padding: 14px 20px;
  background: #fff;
  color: #272727;
  border: 1px solid #272727;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.routine-step__actions .add-to-cart-btn {
  background: #272727;
  color: #fff;
  border-color: #272727;
}

.routine-step__actions .add-to-cart-btn:hover {
  background: #000;
  color: #fff;
}

.routine-alt__actions .add-to-cart-btn {
  background: #fff;
  color: #272727;
  border-color: #272727;
}

.routine-alt__actions .add-to-cart-btn:hover {
  background: #272727;
  color: #fff;
}

.add-to-cart-btn:hover {
  background: #272727;
  color: #fff;
}

.add-to-cart-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Sensitivity slider */
.questionnaire-panel--sensitivity .questionnaire__title {
  font-size: 20px;
}

.sensitivity-bot {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.sensitivity-bot__avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0f0f0;
  color: var(--color-accent);
}

.sensitivity-bot__text {
  font-size: 14px;
  line-height: 1.45;
}

.sensitivity-display {
  text-align: center;
  margin-bottom: 28px;
}

.sensitivity-display__value {
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 12px;
}

.sensitivity-display__description {
  font-size: 15px;
  height: 30px;
  line-height: 1.4;
  color: #272727;
}

.sensitivity-display__description {
  font-size: 15px;
  line-height: 1.4;
  color: #272727;
}

.sensitivity-display__label {
  font-size: 14px;
  color: var(--color-text-muted);
}

.sensitivity-slider {
  position: relative;
  margin-bottom: 24px;
  margin: 0 10px;
}

.sensitivity-slider__rail {
  position: relative;
  height: 20px;
  margin-bottom: 10px;
}

.sensitivity-slider__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: var(--color-dark);
}

.sensitivity-slider__thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-dark);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  transition: left 0.1s ease;
}

.sensitivity-slider__input {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.sensitivity-slider__labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Cart */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 100;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 100vw;
  background: var(--color-surface);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s;
}

.cart-drawer--open { transform: none; }

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.cart-drawer__header h2 { margin: 0; font-size: 18px; font-weight: 600; }

.cart-drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px; }

.cart-drawer__footer {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}

.cart-drawer__footer .btn { flex: 1; }

.cart-empty { text-align: center; color: var(--color-text-muted); padding: 40px 0; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-item__image { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); }

.cart-item__info { flex: 1; min-width: 0; }

.cart-item__name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cart-item__price { font-size: 12px; color: var(--color-text-muted); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  padding: 12px 20px;
  background: var(--color-dark);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.toast--success { background: #2eaa50; }
.toast--error { background: #c0392b; }

.global-loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.global-loader[hidden] { display: none !important; }

.global-loader__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 24px;
}

.global-loader__sphere {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  -webkit-mask-image: radial-gradient(closest-side, #000 98%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 98%, transparent 100%);
}

.global-loader__sphere .landing__avatar-canvas {
  border-radius: 50%;
  background: transparent;
}

.global-loader__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-text-muted);
  text-align: center;
  min-height: 1.4em;
  opacity: 1;
  transition: opacity 0.45s ease;
}

.global-loader__text.is-fading {
  opacity: 0;
}

@media (min-width: 768px) {
  .global-loader__sphere {
    width: 160px;
    height: 160px;
  }

  .global-loader__text {
    font-size: 16px;
  }
}

@media (max-width: 480px) {

  .quiz-action-bar{
    padding: 0;
  }
  #recommendations-footer:not([hidden]) {
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .quiz-toolbar{

    padding: 16px 0 16px !important;
  }
  .questionnaire-panel--photo-upload{

    max-width: 420px;
  }
  .questionnaire__options--cards {
    grid-auto-flow: column;
  }
  .option-card { min-height: 100px; }
  .chat-body{ max-height: 72dvh; }
}

/* Product detail modal */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
}

.product-modal-overlay[hidden],
.product-modal[hidden] {
  display: none !important;
}

.product-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  max-width: 100vw;
  background: var(--color-surface);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-sizing: border-box;
}

.product-modal.product-modal--open {
  transform: none;
}

.product-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.product-modal__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 24px 8px;
  text-align: center;
  flex-shrink: 0;
}

.product-modal__avatar {
  width: 40px;
  height: 40px;
}

.product-modal__avatar .md {
  width: 8px;
  height: 8px;
}

.product-modal__avatar .md:nth-child(1) { top: 2px; left: 16px; }
.product-modal__avatar .md:nth-child(2) { top: 16px; right: 2px; left: auto; }
.product-modal__avatar .md:nth-child(3) { bottom: 2px; left: 16px; }
.product-modal__avatar .md:nth-child(4) { top: 16px; left: 2px; }
.product-modal__avatar .md:nth-child(5) {
  top: 12px;
  left: 12px;
  width: 14px;
  height: 14px;
}

.product-modal__title {
  margin: 0;
  width: 100%;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.3;
  color: #272727;
  text-align: left;
}

.product-modal__body {
  flex: 0 1 auto;
  overflow-y: auto;
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-height: calc(100% - 120px);
}

.product-modal__step {
  margin: 0 0 12px;
  font-size: 12px;
  color: #979797;
  text-align: left;
}

.product-modal__product {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 16px;
  text-align: left;
}

.product-modal__image {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f5f5f5;
}

.product-modal__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-modal__info {
  flex: 1;
  min-width: 0;
}

.product-modal__brand {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #272727;
}

.product-modal__name {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.35;
  color: #272727;
}

.product-modal__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
}

.product-modal__volume {
  color: #979797;
}

.product-modal__price {
  font-weight: 600;
  color: #272727;
}

.product-modal__reason {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #979797;
}

.product-modal__footer {
  display: none;
}

.product-modal__cart-btn {
  margin-top: 40px !important;
  width: 100%;
}

body.product-modal-open {
  overflow: hidden;
}
.product-card__actions{
  margin-right: 0;
  margin-left: auto;
  width: 140px;
}
.vh-contact-fab{
  display: none!important;
}
/* Mobile: bottom sheet */
@media (max-width: 768px) {
  .chat-go-cart-bar{
    padding: 0px 16px 0px;
  }
  .chat-footer{
    padding: 20px 16px 0px;
  }
  .product-card__actions{
    margin-top: -25px;
  }
  .screen--chat {
    background: none;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }
  .screen--chat .chat-toolbar,
  .prompt-toolbar {
    max-width: 560px;
  }
  .product-modal {
    top: 200px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    max-height: min(92vh, 100%);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    justify-content: flex-start;
  }

  .product-modal.product-modal--open {
    transform: translateY(0);
  }

  .option-card:hover { border: 1px solid transparent; }
  .option-card--selected:hover { border: 1px solid #ff2190; }
  .option-btn:hover { border: 1px solid transparent; }
  .option-btn--selected:hover { border: 1px solid #ff2190; }
  .option-pill:hover { border: 1px solid transparent; }
  .option-pill--selected:hover { border: 1px solid #ff2190}
  .option-tag:hover { border: 1px solid transparent; }
  .option-tag--selected:hover { border: 1px solid #ff2190}
  .add-to-cart-btn--remove:hover{
    background: #272727!important;
    color: #fff!important;
    border-color: #272727!important;
  }
  .routine-alt__actions .add-to-cart-btn:hover{
    background: #fff!important;
    color: #272727!important;
  }
  .product-modal__header {
    padding-top: 20px;
  }

  .product-modal__body {
    max-height: none;
    flex: 1 1 auto;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* --- Chat UI overrides (additive; keep HEAD product/sensitivity/modal/toolbar) --- */
.screen--chat .chat-toolbar,
.prompt-toolbar {
  padding: 16px 24px 12px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.message__bubble {
  padding: 20px 20px;
  border-radius: 24px;
}

.message--bot .message__bubble {
  background: var(--color-bot-bubble);
  border: 1px solid transparent;
  border-radius: 20px 20px 20px 0px;
}

.message--user .message__bubble {
  background: #FFFFFF;
  color: #272727;
  border: 1px solid #979797;
  border-radius: 20px 20px 0 20px;
}

.chat-loader {
  position: relative;
  align-self: flex-start;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  max-width: 88%;
}

.chat-loader[hidden] {
  display: none !important;
}

.chat-typing {
  max-width: 100%;
}

.chat-typing__bubble {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 96px;
}

.chat-typing__icon {
  margin: 2px 0 0;
}

.chat-input__attach,
.chat-input__mic {
  width: 32px;
  height: 32px;
  color: #272727;
  border-radius: 50%;
  background: #fff;
}

.message__bubble .products {
  width: 100%;
  margin-top: 14px;
  gap: 14px;
}

.message__bubble .product-card {
  background: #fff;
}

.add-to-cart-btn--remove,
#app .add-to-cart-btn.add-to-cart-btn--remove {
  background: #272727;
  color: #fff;
  border-color: #272727;
}.add-to-cart-btn--remove,
#app .add-to-cart-btn.add-to-cart-btn--remove:hover {
   background: #fff;
   color: #272727;
  border-color: #272727;
}

@media (max-width: 480px) {
  .product-card__actions{
    margin-top: 0px;
  }
  .screen--chat .chat-toolbar,
  .prompt-toolbar {
    padding: 10px 16px 8px!important;
  }

  .message__bubble .product-card {
    gap: 8px;
    padding: 10px;
  }

  .message__bubble .product-card__image {
    width: 56px;
    height: 56px;
  }
}
