* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #f5f7f3;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #16211f;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
}

.phone-page {
  width: min(650px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--page-bg, #f5f7f3);
}

.block {
  width: 100%;
}

.ad-card {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.image-card {
  background: #fff;
}

.image-card img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.text-card {
  padding: 18px 16px;
}

.text-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.text-card p,
.comment p,
.dialog-message p {
  color: #5b6a65;
  line-height: 1.6;
}

.text-card p {
  margin: 0;
  white-space: pre-wrap;
}

.ad-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.ad-button img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 6px;
}

.fixed-bottom {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(622px, calc(100% - 28px));
  z-index: 20;
}

.blink {
  animation: pulse 1.2s infinite;
}

.fixed-bottom.blink {
  animation: fixedPulse 1.2s infinite;
}

@keyframes pulse {
  50% {
    scale: 1.035;
    filter: brightness(1.18);
    box-shadow: 0 0 0 8px rgba(255, 107, 44, 0.16);
  }
}

@keyframes fixedPulse {
  50% {
    transform: translateX(-50%) scale(1.035);
    filter: brightness(1.18);
    box-shadow: 0 0 0 8px rgba(255, 107, 44, 0.16);
  }
}

.lead-form,
.dialog,
.countdown,
.carousel,
.comment,
.video-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.lead-form h2,
.dialog h2,
.carousel h2,
.comment h2,
.video-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.lead-form label {
  display: grid;
  gap: 6px;
  color: #4d5d58;
  font-size: 13px;
}

.lead-form b {
  color: #ff6b2c;
  margin-left: 3px;
}

.lead-form input {
  height: 44px;
  border: 1px solid #cedbd6;
  border-radius: 12px;
  padding: 0 12px;
  width: 100%;
}

.choice-field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid #d6e0dc;
  border-radius: 12px;
}

.choice-field legend {
  padding: 0 4px;
  color: #4d5d58;
  font-size: 13px;
}

.choice-field label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.choice-field input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.lead-form button {
  height: 46px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

.form-success {
  margin: 0;
  color: #0f766e;
  font-weight: 700;
}

.dialog {
  background: #f7f8fa;
}

.dialog-message {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.dialog-message.is-user {
  flex-direction: row-reverse;
}

.dialog-message img,
.comment-head img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.dialog-message p {
  max-width: 78%;
  margin: 0;
  padding: 9px 11px;
  border-radius: 16px;
  background: #fff;
}

.dialog-message.is-user p {
  background: var(--selected-answer-bg, #0f766e);
  color: var(--selected-answer-color, #fff);
}

.dialog-options,
.dialog-history,
.dialog-current,
.dialog-answer {
  display: grid;
  gap: 8px;
}

.dialog-options button,
.dialog-end {
  border: 1px solid #d6e0dc;
  border-radius: 999px;
  background: #fff;
  padding: 10px 12px;
  color: #263632;
  cursor: pointer;
}

.dialog-options button {
  background: var(--answer-bg, #fff);
  color: var(--answer-color, #263632);
  font-size: var(--answer-size, 14px);
}

.dialog-end {
  background: var(--end-bg, #0f766e);
  color: var(--end-color, #fff);
  font-size: var(--end-size, 14px);
  border: 0;
  font-weight: 800;
}

.countdown {
  text-align: center;
  color: #fff;
  background: var(--countdown-bg, #0f766e);
}

.countdown p {
  margin: 0;
}

.countdown div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.countdown strong {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 12px 6px;
  font-size: inherit;
}

.countdown span {
  color: #d8fffa;
  font-size: 12px;
}

.carousel-view {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: #eef3f1;
}

.carousel-view img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.carousel-view img.active {
  opacity: 1;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  display: none;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: var(--control-color, #0f766e);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  cursor: pointer;
}

.carousel.is-manual .carousel-arrow {
  display: grid;
  place-items: center;
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.next {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.carousel-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.carousel-dots span.active {
  width: 18px;
  border-radius: 999px;
  background: var(--control-color, #0f766e);
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-head span {
  display: block;
  color: #ffb703;
  letter-spacing: 1px;
}

.pl-img {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.comment-photo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
}

.video-card video {
  width: 100%;
  border-radius: 0;
  background: #111;
}

@media (max-width: 520px) {
  .fixed-bottom {
    width: calc(100% - 20px);
  }
}
