:root {
  --bg: #08070d;
  --bg-soft: #11101a;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(124, 65, 255, 0.15);
  --text: #f5f3ff;
  --muted: #b8b0cf;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #7c41ff;
  --accent-two: #b389ff;
  --good: #b9ffdc;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 65, 255, 0.20), transparent 34rem),
    radial-gradient(circle at 80% 20%, rgba(179, 137, 255, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 75%);
}

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

button, input, select, textarea {
  font: inherit;
}

.page-glow {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}

.page-glow-one {
  background: var(--accent);
  left: -8rem;
  top: 10rem;
}

.page-glow-two {
  background: #31105e;
  right: -8rem;
  bottom: 8rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--max) + 48px);
  margin: 0 auto;
  padding: 18px 24px;
  background: rgba(8, 7, 13, 0.74);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-text {
  color: #f7f2ff;
  font-family: "Segoe UI Variable Display", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  margin-left: 2px;
  text-shadow: 0 8px 28px rgba(124, 65, 255, 0.24);
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(149, 100, 255, 0.42);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 0 20px rgba(124,65,255,0.08), 0 14px 42px rgba(124,65,255,0.22);
  overflow: hidden;
}

.brand-mark img {
  width: 50px;
  height: 50px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(124, 65, 255, 0.18));
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav .nav-cta {
  color: var(--text);
  background: rgba(124, 65, 255, 0.20);
  border: 1px solid rgba(124, 65, 255, 0.38);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 92px 24px;
}

.compact-section {
  padding-top: 68px;
  padding-bottom: 68px;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent-two);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.55rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
  max-width: 900px;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.28rem;
  margin-bottom: 10px;
}

.hero-text,
.section-head p,
.card p,
.price-card p,
.feature-item p,
.step p,
.order-copy p,
.site-footer p {
  color: var(--muted);
}

.hero-text {
  font-size: 1.15rem;
  max-width: 700px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), #5a24d6);
  box-shadow: 0 18px 48px rgba(124, 65, 255, 0.34);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-row span {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 999px;
}

.hero-card {
  position: relative;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -22px;
  background: linear-gradient(145deg, rgba(124,65,255,0.28), rgba(255,255,255,0.04));
  border-radius: 42px;
  transform: rotate(-3deg);
  z-index: -1;
  filter: blur(1px);
}

.phone-frame {
  max-width: 430px;
  margin-left: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 38px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.035));
  box-shadow: var(--shadow);
}

.phone-top {
  width: 88px;
  height: 7px;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
}

.bot-card,
.message,
.bot-buttons button,
.card,
.price-card,
.feature-item,
.step,
.compare-card,
.order-form,
.mini-note {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
}

.bot-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  margin-bottom: 18px;
}

.bot-card h2 {
  font-size: 1.05rem;
  margin-bottom: 2px;
  letter-spacing: 0;
}

.bot-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.bot-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: rgba(124,65,255,0.26);
  border: 1px solid rgba(255,255,255,0.18);
  font-weight: 900;
}

.message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  margin: 10px 0;
  color: var(--muted);
}

.message-user {
  margin-left: auto;
  color: var(--text);
  background: rgba(124,65,255,0.22);
}

.bot-buttons {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.bot-buttons button {
  color: var(--text);
  border-radius: 16px;
  padding: 12px;
  cursor: default;
}

.section-head {
  max-width: 760px;
  margin-bottom: 30px;
}

.cards.three,
.pricing-grid,
.feature-grid {
  display: grid;
  gap: 18px;
}

.cards.three {
  grid-template-columns: repeat(3, 1fr);
}

.card,
.price-card,
.feature-item,
.step,
.compare-card {
  border-radius: var(--radius);
  padding: 24px;
}

.card,
.price-card,
.feature-item,
.step,
.compare-card,
.mini-note {
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  background: rgba(124,65,255,0.18);
  border: 1px solid rgba(124,65,255,0.25);
  font-size: 1.35rem;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}

.card:focus-visible,
.price-card:focus-visible,
.feature-item:focus-visible,
.step:focus-visible,
.compare-card:focus-visible,
.mini-note:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(124, 65, 255, 0.55);
  background: rgba(124, 65, 255, 0.08);
  box-shadow: 0 0 28px rgba(124, 65, 255, 0.20), 0 18px 60px rgba(0, 0, 0, 0.20);
  outline: none;
}

.card:focus-visible .card-icon,
.feature-item:focus-visible span,
.step:focus-visible span {
  border-color: rgba(179, 137, 255, 0.55);
  background: rgba(124, 65, 255, 0.26);
  box-shadow: 0 0 20px rgba(124, 65, 255, 0.20);
  filter: drop-shadow(0 0 10px rgba(179, 137, 255, 0.28));
}

@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .price-card:hover,
  .feature-item:hover,
  .step:hover,
  .compare-card:hover,
  .mini-note:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 65, 255, 0.55);
    background: rgba(124, 65, 255, 0.08);
    box-shadow: 0 0 28px rgba(124, 65, 255, 0.20), 0 18px 60px rgba(0, 0, 0, 0.20);
  }

  .card:hover .card-icon,
  .feature-item:hover span,
  .step:hover span {
    border-color: rgba(179, 137, 255, 0.55);
    background: rgba(124, 65, 255, 0.26);
    box-shadow: 0 0 20px rgba(124, 65, 255, 0.20);
    filter: drop-shadow(0 0 10px rgba(179, 137, 255, 0.28));
  }
}

.pricing-grid {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.price-card {
  position: relative;
  overflow: hidden;
}

.price-card.featured {
  background: linear-gradient(180deg, rgba(124,65,255,0.22), rgba(255,255,255,0.055));
  border-color: rgba(179,137,255,0.32);
}

.price-card.featured::after {
  content: "Популярно";
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--good);
  background: rgba(185,255,220,0.08);
  border: 1px solid rgba(185,255,220,0.25);
  font-size: 0.8rem;
  font-weight: 800;
}

.price-label {
  color: var(--accent-two) !important;
  font-weight: 800;
  margin-bottom: 8px;
}

.price-card h3 {
  font-size: 2.2rem;
}

.price-card ul {
  padding-left: 18px;
  margin-bottom: 0;
  color: var(--muted);
}

.price-card li + li {
  margin-top: 8px;
}

.feature-grid {
  grid-template-columns: repeat(4, 1fr);
}

.feature-item span {
  font-size: 1.5rem;
  display: inline-block;
  margin-bottom: 12px;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.feature-item strong {
  display: block;
  margin-bottom: 7px;
}

.feature-item p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  min-height: 230px;
}

.step span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 14px;
  background: rgba(124,65,255,0.24);
  border: 1px solid rgba(179,137,255,0.30);
  font-weight: 900;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.compare-card.strong {
  background: linear-gradient(135deg, rgba(124,65,255,0.24), rgba(255,255,255,0.055));
  border-color: rgba(179,137,255,0.28);
}

.compare-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.order-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 34px;
  align-items: start;
}

.order-copy {
  position: sticky;
  top: 100px;
}

.mini-note {
  margin-top: 22px;
  border-radius: 18px;
  padding: 16px;
  color: var(--muted);
}

.order-form {
  border-radius: 30px;
  padding: 24px;
}

.order-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 700;
}

.order-form input,
.order-form select,
.order-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0,0,0,0.24);
  color: var(--text);
  color-scheme: dark;
  padding: 13px 14px;
  outline: none;
}

.order-form select {
  background-color: rgba(20, 13, 34, 0.96);
  border-color: rgba(149, 100, 255, 0.36);
}

.order-form select option {
  background: #1b122d;
  color: #f7f2ff;
}

.order-form select option:checked {
  background: #6f3cff;
  color: #ffffff;
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  border-color: rgba(179,137,255,0.7);
  box-shadow: 0 0 0 4px rgba(124,65,255,0.14);
}

.order-form textarea {
  resize: vertical;
}

.hp-field {
  display: none !important;
}

.form-submit {
  width: 100%;
  border: 0;
}

.form-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
}

.form-status.success {
  color: var(--good);
}

.form-status.error {
  color: #ffb3c0;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 24px 58px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  color: var(--text);
}

.site-footer p {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .hero,
  .order-section {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    margin-left: 0;
    max-width: 100%;
  }

  .cards.three,
  .pricing-grid,
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .order-copy {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 74px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(12, 10, 20, 0.96);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    border-radius: 14px;
  }

  .section {
    padding: 58px 16px;
  }

  .hero {
    padding-top: 46px;
  }

  .cards.three,
  .pricing-grid,
  .feature-grid,
  .timeline,
  .comparison {
    grid-template-columns: 1fr;
  }

  .step {
    min-height: auto;
  }

  .site-footer {
    flex-direction: column;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Interactive Telegram demo bot */
.demo-phone {
  width: min(430px, 100%);
  height: 680px;
  max-height: 680px;
  min-height: 680px;
  margin-left: auto;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(39, 34, 59, 0.98), rgba(19, 15, 31, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.telegram-topbar {
  height: 78px;
  min-height: 78px;
  display: grid;
  grid-template-columns: 34px 48px 1fr 28px;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(28, 25, 37, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.telegram-back,
.telegram-menu {
  color: rgba(245, 243, 255, 0.9);
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}

.telegram-menu {
  font-size: 1.8rem;
}

.telegram-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  font-weight: 900;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(149, 100, 255, 0.45);
  box-shadow: 0 12px 34px rgba(124, 65, 255, 0.24);
  overflow: hidden;
}

.telegram-avatar img {
  width: 50px;
  height: 50px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(124, 65, 255, 0.18));
}

.telegram-title {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.telegram-title strong {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telegram-title span {
  color: rgba(184, 176, 207, 0.78);
  font-size: 0.9rem;
}

.telegram-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(179, 137, 255, 0.18), transparent 26%),
    radial-gradient(circle at 82% 10%, rgba(124, 65, 255, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(16, 13, 24, 0.92), rgba(32, 23, 52, 0.88)),
    #100d18;
}

.telegram-body::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(135deg, transparent 0 45%, rgba(255,255,255,0.045) 45% 46%, transparent 46% 100%),
    radial-gradient(circle at 30% 70%, rgba(255,255,255,0.10), transparent 22%);
  background-size: 42px 42px, 100% 100%;
  pointer-events: none;
}

.demo-start-screen,
.demo-chat-screen {
  position: relative;
  z-index: 1;
  height: 100%;
}

.demo-start-screen[hidden],
.demo-chat-screen[hidden] {
  display: none !important;
}

.demo-start-screen {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  gap: 16px;
}

.demo-about-card {
  width: 100%;
  max-height: 455px;
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  color: #f8f7ff;
  background: rgba(27, 27, 31, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  scrollbar-width: thin;
  scrollbar-color: rgba(179, 137, 255, 0.45) transparent;
}

.demo-about-card h2 {
  margin: 0 0 18px;
  font-size: 1.28rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.demo-about-card p {
  margin: 0 0 16px;
  color: rgba(245, 243, 255, 0.92);
  font-size: 1rem;
  line-height: 1.45;
}

.demo-about-card p:last-child {
  margin-bottom: 0;
}

.demo-about-card ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: rgba(245, 243, 255, 0.92);
}

.demo-about-card li + li {
  margin-top: 5px;
}

.telegram-start-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #74a1ff, #5a78ff);
  font-weight: 900;
  font-size: 1rem;
  box-shadow: 0 16px 38px rgba(80, 112, 255, 0.34);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.telegram-start-button:hover,
.telegram-start-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(80, 112, 255, 0.42);
  outline: none;
}

.demo-chat-screen {
  display: grid;
  grid-template-rows: 1fr auto auto;
  padding: 16px;
  gap: 12px;
}

.demo-chat-log {
  min-height: 0;
  overflow-y: auto;
  padding: 2px 4px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(179, 137, 255, 0.45) transparent;
}

.demo-message {
  width: fit-content;
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 18px;
  margin: 9px 0;
  color: rgba(245, 243, 255, 0.94);
  font-size: 0.94rem;
  line-height: 1.42;
  animation: messageIn 0.22s ease both;
  overflow-wrap: anywhere;
}

.demo-message-bot {
  margin-right: auto;
  border-bottom-left-radius: 7px;
  background: rgba(31, 29, 38, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.demo-message-user {
  margin-left: auto;
  border-bottom-right-radius: 7px;
  color: white;
  background: linear-gradient(135deg, rgba(124, 65, 255, 0.78), rgba(89, 91, 255, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.demo-typing {
  width: 62px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 9px 0;
  border-radius: 18px 18px 18px 7px;
  background: rgba(31, 29, 38, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.demo-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 243, 255, 0.72);
  animation: typingDot 1s infinite ease-in-out;
}

.demo-typing span:nth-child(2) {
  animation-delay: 0.12s;
}

.demo-typing span:nth-child(3) {
  animation-delay: 0.24s;
}

.demo-actions {
  display: grid;
  gap: 8px;
  max-height: 184px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(179, 137, 255, 0.35) transparent;
}

.demo-action,
.demo-reset,
.demo-admin-actions button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.demo-action {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-weight: 800;
}

.demo-action:hover,
.demo-action:focus-visible,
.demo-reset:hover,
.demo-reset:focus-visible,
.demo-admin-actions button:hover,
.demo-admin-actions button:focus-visible {
  transform: translateY(-1px);
  background: rgba(124, 65, 255, 0.20);
  border-color: rgba(179, 137, 255, 0.28);
  outline: none;
}

.demo-reset {
  min-height: 38px;
  padding: 8px 10px;
  color: rgba(245, 243, 255, 0.78);
  background: rgba(0, 0, 0, 0.20);
  font-size: 0.88rem;
}

.demo-admin-card {
  display: grid;
  gap: 7px;
  min-width: 240px;
}

.demo-admin-card strong {
  color: white;
  font-size: 1rem;
}

.demo-admin-card span {
  color: rgba(245, 243, 255, 0.82);
}

.demo-admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.demo-admin-actions button {
  min-height: 38px;
  padding: 8px;
  font-weight: 800;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 980px) {
  .demo-phone {
    margin-left: 0;
    margin-right: auto;
  }
}

@media (max-width: 760px) {
  .demo-phone {
    width: 100%;
    height: 640px;
    min-height: 640px;
    max-height: 640px;
    border-radius: 30px;
  }

  .telegram-topbar {
    height: 72px;
    min-height: 72px;
    grid-template-columns: 28px 44px 1fr 24px;
    padding: 12px;
  }

  .telegram-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  font-weight: 900;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(149, 100, 255, 0.45);
  box-shadow: 0 12px 34px rgba(124, 65, 255, 0.24);
  overflow: hidden;
}

  .demo-start-screen {
    padding: 16px;
  }

  .demo-about-card {
    max-height: 438px;
    padding: 18px;
  }

  .demo-message {
    max-width: 92%;
  }
}

@media (max-width: 420px) {
  .demo-phone {
    height: 610px;
    min-height: 610px;
    max-height: 610px;
  }

  .demo-about-card {
    max-height: 410px;
  }
}

/* Demo bot refinements: fixed frame, no menu scrollbars, reset moved to three-dot menu */
.demo-phone {
  width: min(470px, 100%);
  height: 730px;
  min-height: 730px;
  max-height: 730px;
}

.telegram-topbar {
  height: 82px;
  min-height: 82px;
  grid-template-columns: 34px 50px 1fr 34px;
}

.telegram-back,
.telegram-menu-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(245, 243, 255, 0.92);
  cursor: pointer;
  padding: 0;
}

.telegram-back {
  font-size: 2rem;
  line-height: 1;
}

.telegram-menu-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.telegram-menu-button {
  width: 34px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.85rem;
  line-height: 1;
  transition: background 0.18s ease, transform 0.18s ease;
}

.telegram-menu-button:hover,
.telegram-menu-button:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
  outline: none;
}

.telegram-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 168px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(25, 22, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42);
}

.telegram-menu-popover[hidden] {
  display: none !important;
}

.telegram-menu-popover button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.telegram-menu-popover button:hover,
.telegram-menu-popover button:focus-visible {
  background: rgba(124, 65, 255, 0.22);
  transform: translateY(-1px);
  outline: none;
}

.demo-start-screen {
  justify-content: flex-end;
  padding: 22px;
  gap: 16px;
}

.demo-about-card {
  max-height: none;
  overflow: visible;
  padding: 21px;
  font-size: 0.95rem;
}

.demo-about-card h2 {
  margin-bottom: 17px;
  font-size: 1.2rem;
}

.demo-about-card p {
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.42;
}

.demo-about-card ul {
  margin-bottom: 16px;
  padding-left: 19px;
  font-size: 0.95rem;
  line-height: 1.34;
}

.demo-about-card li + li {
  margin-top: 4px;
}

.demo-chat-screen {
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 16px;
  gap: 12px;
}

.demo-actions {
  max-height: none;
  overflow: visible;
  padding-right: 0;
  gap: 8px;
}

.demo-action {
  min-height: 42px;
  padding: 9px 12px;
}

.demo-chat-log {
  scrollbar-width: none;
}

.demo-chat-log::-webkit-scrollbar,
.demo-actions::-webkit-scrollbar,
.demo-about-card::-webkit-scrollbar {
  display: none;
}

@media (max-width: 980px) {
  .demo-phone {
    margin-left: 0;
    margin-right: auto;
  }
}

@media (max-width: 760px) {
  .demo-phone {
    width: 100%;
    height: 700px;
    min-height: 700px;
    max-height: 700px;
    border-radius: 30px;
  }

  .telegram-topbar {
    height: 76px;
    min-height: 76px;
    grid-template-columns: 28px 46px 1fr 30px;
    padding: 12px;
  }

  .telegram-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  font-weight: 900;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(149, 100, 255, 0.45);
  box-shadow: 0 12px 34px rgba(124, 65, 255, 0.24);
  overflow: hidden;
}

  .demo-start-screen {
    padding: 18px;
  }

  .demo-about-card {
    padding: 19px;
  }

  .demo-about-card h2 {
    font-size: 1.14rem;
  }

  .demo-about-card p,
  .demo-about-card ul {
    font-size: 0.91rem;
  }

  .demo-message {
    max-width: 92%;
  }
}

@media (max-width: 420px) {
  .demo-phone {
    height: 670px;
    min-height: 670px;
    max-height: 670px;
  }

  .demo-start-screen {
    padding: 16px;
    gap: 14px;
  }

  .demo-about-card {
    padding: 17px;
  }

  .demo-about-card p,
  .demo-about-card ul {
    font-size: 0.87rem;
    line-height: 1.32;
  }

  .demo-about-card li + li {
    margin-top: 3px;
  }

  .telegram-start-button {
    min-height: 54px;
  }
}

/* Demo bot v3: equal start spacing, role switch, no visible scrollbars */
.demo-shell {
  position: relative;
  width: min(470px, 100%);
  margin-left: auto;
}

.demo-shell .demo-phone {
  width: 100%;
  height: 735px;
  min-height: 735px;
  max-height: 735px;
}

.demo-mode-switch {
  position: absolute;
  top: 86px;
  right: -70px;
  z-index: 6;
  display: grid;
  gap: 10px;
}

.demo-mode-button {
  width: 58px;
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 6px 4px;
  border: 1px solid rgba(179, 137, 255, 0.28);
  border-radius: 18px;
  color: rgba(245, 243, 255, 0.78);
  background: rgba(28, 24, 43, 0.88);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.20);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.demo-mode-button:hover,
.demo-mode-button:focus-visible {
  transform: translateX(-2px);
  color: #fff;
  border-color: rgba(179, 137, 255, 0.55);
  background: rgba(43, 34, 66, 0.96);
  outline: none;
}

.demo-mode-button.active,
.demo-mode-button:disabled {
  color: #ffffff;
  border-color: rgba(130, 94, 255, 0.82);
  background: linear-gradient(145deg, rgba(112, 78, 255, 0.95), rgba(77, 57, 180, 0.95));
  box-shadow: 0 16px 42px rgba(112, 78, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: default;
  transform: translateX(-3px);
}

.demo-mode-icon {
  font-size: 1.18rem;
  line-height: 1;
}

.demo-mode-label {
  font-size: 0.66rem;
  line-height: 1;
  font-weight: 800;
}

.demo-start-screen {
  justify-content: center;
  padding: 28px 22px;
  gap: 16px;
}

.demo-about-card {
  max-height: none;
  overflow: visible;
  padding: 22px;
}

.demo-about-card h2 {
  margin-bottom: 16px;
}

.demo-about-card p {
  margin-bottom: 14px;
  line-height: 1.38;
}

.demo-about-card ul {
  margin-bottom: 16px;
  line-height: 1.32;
}

.demo-about-card li + li {
  margin-top: 4px;
}

.demo-chat-screen {
  padding: 18px 20px 18px;
  gap: 12px;
}

.demo-actions {
  max-height: 218px;
  overflow-y: auto;
  padding: 0 0 1px;
  scrollbar-width: none;
}

.demo-chat-log {
  scrollbar-width: none;
}

.demo-actions::-webkit-scrollbar,
.demo-chat-log::-webkit-scrollbar,
.demo-about-card::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.demo-action {
  min-height: 44px;
}

@media (max-width: 1180px) {
  .demo-mode-switch {
    right: 14px;
    top: auto;
    bottom: 14px;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .demo-mode-button {
    width: 54px;
    min-height: 48px;
    border-radius: 15px;
  }

  .demo-mode-button.active,
  .demo-mode-button:disabled {
    transform: translateY(-2px);
  }
}

@media (max-width: 980px) {
  .demo-shell {
    margin-left: 0;
    margin-right: auto;
  }
}

@media (max-width: 760px) {
  .demo-shell {
    width: 100%;
  }

  .demo-shell .demo-phone {
    height: 720px;
    min-height: 720px;
    max-height: 720px;
  }

  .demo-start-screen {
    padding: 22px 18px;
  }

  .demo-about-card {
    padding: 19px;
  }

  .demo-mode-switch {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 420px) {
  .demo-shell .demo-phone {
    height: 690px;
    min-height: 690px;
    max-height: 690px;
  }

  .demo-start-screen {
    padding: 18px 16px;
    gap: 13px;
  }

  .demo-about-card {
    padding: 17px;
  }

  .demo-about-card p,
  .demo-about-card ul {
    font-size: 0.86rem;
    line-height: 1.28;
  }

  .demo-about-card li + li {
    margin-top: 2px;
  }

  .demo-mode-button {
    width: 50px;
    min-height: 44px;
  }
}

.demo-actions {
  max-height: 218px;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(149, 100, 255, 0.82) rgba(255, 255, 255, 0.08);
}

.demo-actions::-webkit-scrollbar {
  width: 8px;
}

.demo-actions::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.demo-actions::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, #9564ff, #6d7dff);
}

.brand-mark,
.telegram-avatar {
  background: rgba(22, 14, 36, 0.96);
  border-color: rgba(149, 100, 255, 0.34);
  box-shadow: inset 0 0 18px rgba(124, 65, 255, 0.14), 0 12px 34px rgba(0, 0, 0, 0.26);
}

.brand-mark img,
.telegram-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.telegram-topbar {
  column-gap: 10px;
}

@media (max-width: 760px) {
  .telegram-topbar {
    grid-template-columns: 28px 46px minmax(0, 1fr) auto 30px;
    column-gap: 10px;
  }

  .demo-mode-switch.in-topbar {
    position: static;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: auto;
  }

  .demo-mode-switch.in-topbar .demo-mode-button {
    width: 38px;
    min-height: 34px;
    padding: 4px;
    border-radius: 12px;
    box-shadow: none;
    transform: none;
  }

  .demo-mode-switch.in-topbar .demo-mode-button.active,
  .demo-mode-switch.in-topbar .demo-mode-button:disabled {
    transform: none;
    box-shadow: 0 8px 22px rgba(112, 78, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  .demo-mode-switch.in-topbar .demo-mode-icon {
    font-size: 1rem;
  }

  .demo-mode-switch.in-topbar .demo-mode-label {
    display: none;
  }
}

@media (hover: none), (pointer: coarse) {
  .demo-action:hover,
  .demo-action:focus,
  .demo-reset:hover,
  .demo-reset:focus,
  .demo-admin-actions button:hover,
  .demo-admin-actions button:focus {
    transform: none;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    outline: none;
  }

  .telegram-start-button:hover,
  .telegram-start-button:focus {
    transform: none;
  }

  .demo-mode-button:not(.active):not(:disabled):hover,
  .demo-mode-button:not(.active):not(:disabled):focus {
    transform: none;
    color: rgba(245, 243, 255, 0.78);
    border-color: rgba(179, 137, 255, 0.28);
    background: rgba(28, 24, 43, 0.88);
  }
}
