:root {
  color-scheme: light;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --canvas: #f3f6fc;
  --surface: #ffffff;
  --muted: #e9eef6;
  --raised: #eef2f8;
  --text: #1f1f1f;
  --text2: #5f6368;
  --border: #c4c7c5;
  --accent: #0b57d0;
  --on-accent: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --shadow: 0 8px 28px rgb(0 0 0 / 10%);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1180px;
  --nav-h: 52px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #131314;
  --surface: #1e1f20;
  --muted: #252629;
  --raised: #303134;
  --text: #e3e3e3;
  --text2: #bdc1c6;
  --border: #5f6368;
  --accent: #a8c7fa;
  --on-accent: #062e6f;
  --shadow: 0 12px 36px rgb(0 0 0 / 45%);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    color-scheme: dark;
    --canvas: #131314;
    --surface: #1e1f20;
    --muted: #252629;
    --raised: #303134;
    --text: #e3e3e3;
    --text2: #bdc1c6;
    --border: #5f6368;
    --accent: #a8c7fa;
    --on-accent: #062e6f;
    --shadow: 0 12px 36px rgb(0 0 0 / 45%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 480px at 12% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 58%),
    radial-gradient(900px 420px at 92% 8%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 52%),
    var(--canvas);
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

figure {
  margin: 0;
}

a {
  color: var(--accent);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 80;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--nav-h);
  height: auto;
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.nav-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px 12px;
  padding: 8px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-links a {
  color: var(--text2);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 0.84rem;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}

.nav-cta {
  flex: 0 0 auto;
  white-space: nowrap;
}

.seg {
  display: flex;
  align-items: stretch;
  height: 32px;
  background: var(--muted);
  border-radius: 999px;
  padding: 2px;
  border: 1px solid var(--border);
}

.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text2);
  font: inherit;
  font-size: 0.75rem;
  padding: 0 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 44px;
  height: auto;
  align-self: center;
  flex: 0 0 auto;
}

.nav .btn {
  min-height: 32px;
  height: 32px;
  padding: 0 14px;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 24px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 999px;
  padding: 6px 12px;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 16px 0 12px;
}

.lede {
  font-size: 1.12rem;
  color: var(--text2);
  max-width: 38rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 24px 0 12px;
}

.fine {
  color: var(--text2);
  font-size: 0.92rem;
}

.device {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--surface);
  animation: float 8s ease-in-out infinite;
}

.device img,
.phone img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.phone {
  position: absolute;
  width: 32%;
  right: 8%;
  bottom: -8%;
  border-radius: 18px;
  overflow: hidden;
  border: 6px solid var(--surface);
  box-shadow: var(--shadow);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

section,
#demo,
.band {
  scroll-margin-top: 64px;
}

section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.section-sub {
  color: var(--text2);
  max-width: 44rem;
  margin: 0 0 28px;
}

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

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

.showcase {
  display: none;
}

.media-banner {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 20px 0 0;
  height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
}

.media-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.media-banner figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 36px 22px 18px;
  background: linear-gradient(transparent, rgb(10 12 16 / 82%));
  color: #f3f6fc;
}

.media-banner h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.media-banner p {
  margin: 0;
  font-size: 0.95rem;
  color: #d3d8e0;
  max-width: 36rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.card h3 {
  margin: 10px 0 8px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text2);
  font-size: 0.95rem;
}

.icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.icon svg {
  width: 22px;
  height: 22px;
}

.band {
  width: 100%;
  background: var(--muted);
  border-block: 1px solid var(--border);
}

.band-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
}

.band img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.steps {
  display: grid;
  gap: 14px;
  align-content: start;
}

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
}

.num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.shot-row {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 20px;
  align-items: stretch;
}

.shot-row > :last-child {
  min-width: 0;
  display: flex;
}

.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  width: 100%;
  min-height: 460px;
  display: flex;
  flex-direction: column;
}

.shot img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  flex: 1 1 auto;
  object-fit: cover;
  object-position: top center;
}

.shot figcaption {
  padding: 10px 14px 14px;
  color: var(--text2);
  font-size: 0.88rem;
}

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

.checks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
}

.checks li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface);
  outline: 2px solid var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--text2);
  font-size: 0.9rem;
}

.foot-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
}

.legal-open {
  appearance: none;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgb(0 0 0 / 52%);
  display: none;
  place-items: center;
  padding: 20px;
}

.legal-modal.open {
  display: grid;
}

.legal-card {
  width: min(760px, 100%);
  max-height: min(86vh, 880px);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.legal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

.legal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.legal-close {
  appearance: none;
  border: 0;
  background: var(--muted);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.legal-meta {
  margin: 0;
  padding: 8px 22px 0;
  color: var(--text2);
  font-size: 0.85rem;
  line-height: 1.45;
}

.legal-body {
  overflow: auto;
  padding: 8px 22px 24px;
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.55;
}

.legal-body h3 {
  color: var(--text);
  font-size: 0.98rem;
  margin: 1.25em 0 0.45em;
}

.legal-clause {
  margin: 0 0 0.65em;
}

.legal-clause p {
  margin: 0;
}

.legal-num {
  color: var(--text);
  font-weight: 650;
}

.legal-clause ul {
  margin: 0.35em 0 0;
  padding: 0 0 0 1.35em;
}

.legal-clause li {
  margin: 0 0 0.28em;
}

.card-wide {
  grid-column: span 2;
}

.knobs {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knobs li {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  line-height: 1.3;
}

.contact-card {
  width: min(560px, 100%);
  max-height: min(92dvh, 900px);
}

.contact-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.contact-form-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 22px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text);
}

.contact-field input,
.contact-field select,
.contact-field textarea,
.contact-captcha input[type="text"] {
  appearance: none;
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.contact-field textarea {
  resize: vertical;
  min-height: 96px;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus,
.contact-captcha input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
}

.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-captcha {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text);
}

.contact-captcha-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.contact-captcha img {
  width: 180px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--muted);
}

.contact-captcha .btn {
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.contact-status {
  min-height: 1.3em;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text2);
}

.contact-status.is-ok {
  color: var(--accent);
}

.contact-status.is-err {
  color: #b3261e;
}

html[data-theme="dark"] .contact-status.is-err,
html[data-theme="system"] .contact-status.is-err {
  color: #f2b8b5;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .contact-status.is-err {
    color: #f2b8b5;
  }
}

.contact-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 22px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.contact-actions .btn {
  width: 100%;
}

html.vp-modal-open,
html.vp-modal-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links a {
    font-size: 0.78rem;
    padding: 6px 6px;
  }
}

@media (max-width: 960px) {
  .hero,
  .band-inner,
  .grid,
  .grid-4,
  .shot-row {
    grid-template-columns: 1fr;
  }
  .card-wide {
    grid-column: auto;
  }
  .media-banner {
    height: 220px;
    width: 100%;
  }
  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand cta"
      "tools tools";
    align-items: center;
    gap: 8px;
    padding: 8px 0;
  }
  .brand {
    grid-area: brand;
  }
  .nav-cta {
    grid-area: cta;
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.78rem;
  }
  .nav-links {
    display: none;
  }
  .nav-tools {
    grid-area: tools;
    width: 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .nav-tools .nav-theme {
    order: 1;
  }
  .nav-tools .nav-lang {
    order: 2;
  }
  .nav-theme button {
    padding: 0 7px;
    font-size: 0.72rem;
  }
  .shot {
    min-height: 0;
  }
  .shot img {
    min-height: 0;
    height: 280px;
    width: 100%;
    object-fit: cover;
    object-position: top center;
    background: var(--muted);
  }
  .phone {
    display: none;
  }
  .hero {
    padding-top: 28px;
  }
  #vp-contact.legal-modal {
    padding: 0;
    place-items: stretch;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }
  #vp-contact .contact-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
  #vp-contact .contact-form-scroll {
    padding: 10px 16px 8px;
    gap: 10px;
    touch-action: pan-y;
  }
  #vp-contact .legal-head {
    padding: 12px 16px 10px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  #vp-contact .legal-head h2 {
    font-size: 1rem;
  }
  #vp-contact .contact-field textarea {
    min-height: 72px;
  }
  #vp-contact .contact-actions {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

/* Демо чата — оболочка как у веб-версии */
.demo-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 8px;
  padding: 24px 0 56px;
}

.demo {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 560px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.demo-rail {
  background: var(--muted);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 12px;
  min-height: 0;
}

.demo-rail img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.demo-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--canvas);
}

.demo-top {
  padding: 10px 16px;
  font-weight: 650;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}

.demo-stream {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-msg {
  width: fit-content;
  max-width: min(86%, 26rem);
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  animation: demo-in 0.28s ease;
}

.demo-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: 6px;
}

.demo-msg.bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}

.demo-msg.bot:has(.demo-thumb) {
  max-width: min(304px, 86%);
}

.demo-msg .meta {
  font-size: 0.75rem;
  opacity: 0.72;
  margin-bottom: 4px;
}

.demo-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 16px;
}

.demo-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text2);
  animation: demo-dot 1s infinite ease-in-out;
}

.demo-typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.demo-typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes demo-dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes demo-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.demo-news {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  min-width: min(18rem, 100%);
}

.demo-news div {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--muted);
  font-size: 0.85rem;
}

.demo-fx {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.demo-fx span {
  background: var(--muted);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.demo-fx b {
  display: block;
  font-size: 1.05rem;
}

.demo-doc {
  margin-top: 8px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  min-width: min(18rem, 100%);
}

.demo-doc h4 {
  margin: 0 0 8px;
  font-size: 0.88rem;
}

.demo-doc dl {
  margin: 0;
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 6px 10px;
  font-size: 0.85rem;
}

.demo-doc dt {
  color: var(--text2);
}

.demo-chart {
  margin-top: 10px;
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 4px 0;
  min-width: min(16rem, 100%);
}

.demo-chart i {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: var(--accent);
  transform-origin: bottom;
  animation: demo-bar 0.7s ease both;
}

@keyframes demo-bar {
  from {
    transform: scaleY(0.08);
  }
}

.demo-thumb {
  margin-top: 8px;
  width: 280px;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid var(--border);
  position: relative;
  appearance: none;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  display: block;
  color: inherit;
}

.demo-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.demo-cap {
  margin: 8px 0 0;
}

.demo-thumb .hint {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 0.72rem;
  background: rgb(0 0 0 / 55%);
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
}

.demo-skel {
  height: 160px;
  border-radius: 12px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--muted) 25%, var(--raised) 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: demo-shimmer 1.1s linear infinite;
}

@keyframes demo-shimmer {
  to {
    background-position: -200% 0;
  }
}

.demo-composer {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}

.demo-input {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.demo-input .caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 1px;
  background: var(--accent);
  animation: demo-caret 1s steps(1) infinite;
}

@keyframes demo-caret {
  50% {
    opacity: 0;
  }
}

.demo-send {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  cursor: default;
  appearance: none;
  font-size: 1rem;
  line-height: 1;
}

.demo-lb {
  position: absolute;
  inset: 0;
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 6;
  background: rgb(0 0 0 / 72%);
  display: none;
  place-items: center;
  padding: 18px;
  cursor: zoom-out;
}

.demo-lb.open {
  display: grid;
}

.demo-lb img {
  max-width: 78%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgb(0 0 0 / 45%);
}

@media (max-width: 960px) {
  .demo {
    grid-template-columns: 1fr;
    grid-template-rows: 44px minmax(0, 1fr);
    height: 520px;
  }
  .demo-rail {
    flex-direction: row;
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .demo-lb {
    grid-column: 1;
    grid-row: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
