html {
  color-scheme: light;
}

body {
  background: var(--color-white);
  color: var(--color-graphite);
  font-family: Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.btn--max,
.btn--max:link,
.btn--max:visited,
.btn--max:hover,
.btn--max:focus,
.btn--max:focus-visible,
.btn--max:active,
.contact-max,
.contact-max:link,
.contact-max:visited,
.contact-max:hover,
.contact-max:focus,
.contact-max:focus-visible,
.contact-max:active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6c4dff, #4a7dff) !important;
  color: #ffffff !important;
  opacity: 1;
  visibility: visible;
  box-shadow: 0 8px 20px rgba(93, 76, 255, 0.28);
  transition: 0.2s ease;
}

.btn--max:hover,
.btn--max:focus,
.btn--max:focus-visible,
.contact-max:hover,
.contact-max:focus,
.contact-max:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(92, 92, 255, 0.28);
}

.contact-whatsapp,
.contact-whatsapp:link,
.contact-whatsapp:visited {
  border-color: #16a34a !important;
  background: #16a34a !important;
  color: #ffffff !important;
}

.contact-whatsapp:hover,
.contact-whatsapp:focus,
.contact-whatsapp:focus-visible,
.contact-whatsapp:active {
  border-color: #12833c !important;
  background: #12833c !important;
  color: #ffffff !important;
}

.contact-reviews,
.contact-reviews:link,
.contact-reviews:visited {
  border-color: #ffd1da !important;
  background: #fff0f3 !important;
  color: #ff3152 !important;
}

.contact-reviews:hover,
.contact-reviews:focus,
.contact-reviews:focus-visible,
.contact-reviews:active {
  border-color: #ffd1da !important;
  background: #ffe2e8 !important;
  color: #e92849 !important;
}

.referral-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: center;
  width: min(100% - var(--page-gutter) * 2, var(--container-width));
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(255, 41, 66, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 41, 66, 0.1), transparent 44%),
    var(--color-white);
  box-shadow: 0 18px 42px rgba(32, 33, 36, 0.08);
}

.referral-promo--partners {
  width: 100%;
}

.referral-promo__content {
  display: grid;
  gap: 12px;
}

.referral-promo__eyebrow {
  margin: 0;
  color: var(--color-brand-red);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.referral-promo__title {
  margin: 0;
  color: var(--color-graphite);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.referral-promo__subtitle,
.referral-promo__text,
.referral-promo__note {
  margin: 0;
  color: var(--color-soft-graphite);
  line-height: 1.6;
}

.referral-promo__subtitle {
  color: var(--color-graphite);
  font-size: 18px;
  font-weight: 800;
}

.referral-promo__bonus {
  justify-self: start;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 41, 66, 0.1);
  color: var(--color-brand-red);
  font-weight: 900;
}

.referral-promo__note {
  max-width: 680px;
  font-size: 13px;
}

.referral-promo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.referral-promo__actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
}

.referral-promo__actions .button--secondary {
  border-color: var(--color-line);
  background: var(--color-white);
  color: var(--color-graphite);
}

.referral-promo__badge {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 160px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.3), transparent 30%),
    linear-gradient(145deg, var(--color-brand-red), #202124);
  color: var(--color-white);
}

.referral-promo__badge span {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.referral-promo__badge strong {
  font-size: 14px;
  letter-spacing: 0;
}

.floating-contact {
  position: fixed;
  right: 12px;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  gap: 6px;
}

.floating-contact__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 42px;
  padding: 0 8px;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(32, 33, 36, 0.16);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.floating-contact__item--max {
  min-height: 46px;
}

.floating-contact__item--whatsapp {
  background: #16a34a;
}

.floating-contact__item--reviews,
.floating-contact__item--telegram {
  border: 1px solid #ffd1da;
  background: #fff0f3;
  color: #ff3152;
}

.floating-contact__item--max:hover,
.floating-contact__item--max:focus-visible {
  color: var(--color-white);
}

.floating-contact__item--whatsapp:hover,
.floating-contact__item--whatsapp:focus-visible {
  background: #12833c;
  color: var(--color-white);
}

.floating-contact__item--reviews:hover,
.floating-contact__item--reviews:focus-visible {
  border-color: #ffd1da;
  background: #ffe2e8;
  color: #e92849;
}

.floating-contact__item--whatsapp,
.floating-contact__item--reviews {
  font-size: 0;
}

.floating-contact__item--whatsapp::after {
  content: "WA";
  font-size: 11px;
}

.floating-contact__item--reviews::after {
  content: "Отзывы";
  font-size: 10px;
}

.famall-mascot {
  position: fixed;
  left: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 30;
  width: var(--mascot-size, 72px);
  height: calc(var(--mascot-size, 72px) * 0.78);
  pointer-events: none;
  transform: translateX(0);
  transition: transform calc(1.8s / var(--mascot-speed, 1)) ease, opacity 0.24s ease;
}

.famall-mascot__cat {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(32, 33, 36, 0.16));
  animation: famallMascotBreathe 4.8s ease-in-out infinite;
}

.famall-mascot__ball {
  position: absolute;
  right: -12px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffd6dd;
  opacity: 0;
  box-shadow: 0 8px 16px rgba(255, 41, 66, 0.18);
  transition: opacity 0.22s ease, transform 0.8s ease;
}

.famall-mascot__close {
  position: absolute;
  right: -10px;
  top: -13px;
  z-index: 1;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 41, 66, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-brand-red);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.famall-mascot.is-walk {
  transform: translateX(min(18vw, 190px));
}

.famall-mascot.is-sit .famall-mascot__cat {
  transform: translateY(4px) scaleY(0.94);
}

.famall-mascot.is-chase-ball {
  transform: translateX(min(26vw, 260px));
}

.famall-mascot.is-chase-ball .famall-mascot__ball {
  opacity: 1;
  transform: translateX(26px);
}

.famall-mascot.is-ball-hidden .famall-mascot__ball {
  display: none;
}

.famall-mascot.is-reduced-motion,
.famall-mascot.is-reduced-motion .famall-mascot__cat,
.famall-mascot.is-reduced-motion .famall-mascot__ball {
  animation: none;
  transition: none;
}

@keyframes famallMascotBreathe {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
  }

  .referral-promo {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .referral-promo__actions .button {
    width: 100%;
  }

  .referral-promo__badge {
    min-height: 118px;
  }

  .floating-contact {
    right: 2px;
    left: auto;
    bottom: max(24px, env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 1px;
    border: 1px solid rgba(230, 232, 236, 0.78);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(32, 33, 36, 0.14);
    backdrop-filter: blur(12px);
  }

  .floating-contact__item {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 999px;
    box-shadow: none;
    font-size: 8px;
    line-height: 1;
    white-space: nowrap;
  }

  .floating-contact__item--max {
    min-height: 32px;
  }

  .floating-contact__item--whatsapp {
    font-size: 0;
  }

  .floating-contact__item--whatsapp::after {
    content: "WA";
    font-size: 9px;
  }

  .floating-contact__item--reviews {
    font-size: 0;
  }

  .floating-contact__item--reviews::after {
    content: "Отз";
    font-size: 8px;
  }

  .famall-mascot {
    left: 10px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    width: 54px;
  }

  .famall-mascot__close {
    right: -8px;
    top: -12px;
    width: 20px;
    height: 20px;
  }

  .famall-mascot.is-walk,
  .famall-mascot.is-chase-ball {
    transform: translateX(54px);
  }

}
