:root {
  --bg: #f6f5f3;
  --bg-elev: #ffffff;
  --ink: #141414;
  --muted: #6b6b6b;
  --line: #e6e4e0;
  --accent: #e31e24;
  --accent-press: #c4181e;
  --ok: #1f9d55;
  --shadow: 0 18px 50px rgba(20, 20, 20, 0.12);
  --radius: 16px;
  --font: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, #fff 0%, transparent 55%),
    linear-gradient(180deg, #fbfaf8 0%, var(--bg) 40%, #efece7 100%);
}

body {
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.page {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 20px 20px 110px;
}

.top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: -4px 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(0.72rem, 3.4vw, 0.84rem);
  font-weight: 600;
}

.top-brand {
  justify-self: start;
  min-width: 0;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-brand:hover {
  color: var(--accent-press);
}

.top-city {
  justify-self: center;
  color: var(--muted);
  font-weight: 600;
}

.top-phone {
  justify-self: end;
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-phone:hover {
  color: var(--accent);
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: rise 0.7s ease both;
}

.avatar-wrap {
  width: 120px;
  height: 120px;
  border-radius: 22px;
  overflow: hidden;
  background: #ddd;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 6px;
  font-size: clamp(1.75rem, 5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.name-verified {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.5);
  animation: pulse 2.2s ease infinite;
}

.stats {
  width: 100%;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 84px;
  padding: 12px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: center;
}

a.stat-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  animation: statNudge 4.5s ease-in-out 1.2s infinite;
  will-change: transform;
}

a.stat-link:hover {
  border-color: #d0cdc8;
  box-shadow: 0 6px 18px rgba(20, 20, 20, 0.06);
}

a.stat-link:active {
  animation: none;
  transform: scale(0.97);
}

.reviews {
  scroll-margin-top: 24px;
  scroll-margin-bottom: 80px;
}

.stat-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stat-ok {
  background: #22a45a;
}

.stat-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--muted);
  max-width: 9.5em;
}

.about {
  width: 100%;
  text-align: left;
  margin-top: 28px;
  animation: rise 0.8s ease 0.08s both;
}

.about h2,
.block h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.about ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.about li {
  position: relative;
  padding-left: 18px;
  color: #2b2b2b;
  line-height: 1.45;
  font-size: 0.98rem;
}

.about li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.cta {
  width: 100%;
  margin-top: 28px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 18px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  animation: rise 0.85s ease 0.12s both;
}

.cta:hover {
  background: var(--accent-press);
}

.cta:active {
  transform: scale(0.985);
}

.messengers-hint {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
  text-transform: none;
}

.messengers {
  width: 100%;
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  animation: rise 0.85s ease 0.12s both;
}

.messenger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, transform 0.15s ease;
}

.messenger:active {
  transform: scale(0.98);
}

.messenger-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.messenger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-tg {
  color: #229ed9;
  background: rgba(34, 158, 217, 0.08);
}

.messenger-tg .messenger-icon {
  background: #229ed9;
}

.messenger-tg:hover {
  background: rgba(34, 158, 217, 0.14);
}

.messenger-wa {
  color: #1faa55;
  background: rgba(31, 170, 85, 0.08);
}

.messenger-wa .messenger-icon {
  background: #1faa55;
}

.messenger-wa:hover {
  background: rgba(31, 170, 85, 0.14);
}

.block {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  animation: rise 0.9s ease 0.16s both;
}

.block p {
  margin: 0;
  color: #2f2f2f;
  line-height: 1.55;
}

.promo-banner {
  width: 100%;
  margin: 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff8e8;
  border: 1px solid #f0dfb0;
  border-radius: 14px;
  color: #5a4510;
  font-size: 0.95rem;
  font-weight: 700;
}

.promo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f5b400;
  color: #1a1400;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.prices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.prices li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
}

.prices li:first-child {
  border-top: 0;
}

.prices strong {
  font-weight: 800;
  white-space: nowrap;
}

.reviews-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.reviews-heading h2 {
  margin: 0;
}

.reviews-score {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  flex-shrink: 0;
}

.reviews-score-value {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.reviews-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.review {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.review-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.review-stars svg {
  display: block;
}

.review-author {
  font-weight: 700;
  color: var(--ink);
}

.review-date {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: auto;
  flex: 1 1 auto;
  text-align: right;
}

.review-service {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.review-text {
  margin: 8px 0 0;
  color: #2f2f2f;
  line-height: 1.5;
}

.review-reply {
  margin-top: 12px;
  padding: 12px 0 0 14px;
  border-left: 2px solid var(--line);
}

.review-reply-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.review-reply-text {
  margin: 4px 0 0;
  color: #2f2f2f;
  line-height: 1.5;
  font-size: 0.95rem;
}

.reviews-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.reviews-more:hover:not(:disabled) {
  border-color: #d0cdc8;
  background: #fff;
}

.reviews-more:disabled {
  cursor: wait;
  opacity: 0.85;
}

.reviews-more.is-loading .reviews-more-label {
  opacity: 0.7;
}

.reviews-more-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: reviewsSpin 0.7s linear infinite;
}

@keyframes reviewsSpin {
  to { transform: rotate(360deg); }
}

.foot {
  margin-top: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.foot p {
  margin: 0;
}

.foot-links {
  margin-top: 8px !important;
}

.foot-links a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--accent);
}

.foot-credit {
  margin-top: 18px !important;
  font-size: 0.78rem;
  color: var(--muted);
}

.foot-credit a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.foot-credit a:hover {
  color: var(--ink);
}

/* Sticky dual action bar + chat */
.chat-widget {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.chat-widget > * {
  pointer-events: auto;
}

.action-bar {
  width: min(440px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(20, 20, 20, 0.08);
  padding-bottom: env(safe-area-inset-bottom);
  animation: launcherIn 0.45s ease 0.25s both;
}

.action-bar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  border: 0;
  font: inherit;
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.action-call {
  color: #fff;
  background: #2a2a2a;
}

.action-call:active {
  background: #1a1a1a;
}

.action-chat {
  color: #fff;
  background: var(--accent);
}

.action-chat:active {
  background: var(--accent-press);
}

.chat-widget.is-open .action-chat {
  background: var(--accent-press);
}

.action-bar-badge {
  position: absolute;
  top: 8px;
  right: 18%;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #141414;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.action-bar-badge[hidden] {
  display: none !important;
}

.chat-panel {
  width: min(440px, 100%);
  height: min(70vh, 560px);
  margin-bottom: 0;
  background: var(--bg-elev);
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(227, 30, 36, 0.18);
  border-bottom: 0;
  box-shadow:
    0 0 0 3px rgba(227, 30, 36, 0.06),
    0 -18px 40px rgba(20, 20, 20, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom center;
  animation: panelIn 0.22s ease;
}

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

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff7f7 0%, #fff 100%);
}

.chat-head-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-head-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8e4de;
}

.chat-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.chat-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-close {
  border: 0;
  background: #f2f1ee;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
}

.chat-name-bar {
  padding: 14px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 -8px 24px rgba(20, 20, 20, 0.06);
}

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

.chat-panel:has(#nameBar:not([hidden])) .chat-form {
  display: none;
}

.name-bar-intro {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.chat-name-bar label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}

.chat-name-bar .phone-label {
  margin-top: 4px;
}

.chat-name-bar .optional {
  font-weight: 500;
  color: var(--muted);
}

.chat-name-bar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  outline: none;
  background: #fff;
  min-width: 0;
}

.chat-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  outline: none;
  background: #fff;
  min-width: 0;
}

.chat-name-bar input:focus,
.chat-form input:focus {
  border-color: #c9c5be;
}

.name-next,
.chat-form button {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
}

.name-next {
  margin-top: 4px;
  width: 100%;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #fff 0%, #faf9f7 100%);
}

.bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.4;
  font-size: 0.92rem;
  white-space: pre-wrap;
  word-break: break-word;
  animation: bubbleIn 0.2s ease;
}

.bubble.client {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.bubble.master {
  align-self: flex-start;
  background: #efeee9;
  color: var(--ink);
  border-bottom-left-radius: 5px;
}

.bubble.system {
  align-self: center;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  max-width: 95%;
  padding: 4px 8px;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-form button {
  min-width: 44px;
  font-size: 1.15rem;
}

.chat-form button:disabled,
.chat-form input:disabled,
.name-next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.empty-hint {
  margin: auto;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 240px;
}

@keyframes statNudge {
  0%, 78%, 100% {
    transform: translateX(0) rotate(0);
  }
  82% {
    transform: translateX(-2px) rotate(-1.2deg);
  }
  86% {
    transform: translateX(2px) rotate(1.2deg);
  }
  90% {
    transform: translateX(-1.5px) rotate(-0.8deg);
  }
  94% {
    transform: translateX(1px) rotate(0.5deg);
  }
  97% {
    transform: translateX(0) rotate(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  a.stat-link {
    animation: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(31, 157, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); }
}

@keyframes launcherPulse {
  0% { box-shadow: 0 0 0 0 rgba(227, 30, 36, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(227, 30, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(227, 30, 36, 0); }
}

@keyframes glowBreath {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes launcherIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 720px) {
  .page {
    padding-top: 48px;
  }
}

@media (min-width: 720px) {
  .chat-panel {
    border-radius: 18px;
    border-bottom: 1px solid rgba(227, 30, 36, 0.18);
    margin-bottom: 10px;
    height: min(620px, 72vh);
  }

  .action-bar {
    border-radius: 16px 16px 0 0;
    overflow: hidden;
  }
}
