.aitts-home .hero {
  display: flex;
  align-items: stretch;
  padding: 0;
}

.tts-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.82fr);
  gap: clamp(24px, 2.6vw, 40px);
  align-items: center;
  min-height: calc(100svh - var(--header-height));
  box-sizing: border-box;
  padding: clamp(8px, 1vw, 14px) 0 clamp(22px, 3vw, 34px);
}

.tts-hero-copy h1 {
  max-width: 8.2ch;
}

.tts-hero-copy .lead strong {
  color: var(--text-high);
}

.tts-hero-visual {
  position: relative;
  min-height: clamp(308px, 32vw, 430px);
  display: grid;
  justify-items: start;
  align-content: center;
  transform: translateY(clamp(4px, 1vw, 12px));
}

.tts-demo-stack {
  width: min(100%, 392px);
  min-width: 0;
  display: grid;
  gap: 20px;
}

.tts-demo-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 20px;
  border: 1px solid rgba(145, 185, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    linear-gradient(180deg, #141c2f 0%, #0d1423 100%);
  box-shadow: var(--shadow-xl);
  overflow: visible;
}

.tts-demo-card::before,
.tts-demo-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.tts-demo-card::before {
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 26%),
    linear-gradient(180deg, rgba(160, 195, 255, 0.06), transparent 22%, transparent 82%, rgba(103, 135, 232, 0.04));
}

.tts-demo-card::after {
  inset: auto 12% -18% 12%;
  height: 24%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(64, 108, 225, 0.18), transparent 68%);
  filter: blur(28px);
  opacity: 0.82;
}

.tts-demo-card > * {
  position: relative;
  z-index: 1;
}

.tts-demo-script {
  min-height: clamp(160px, 15vw, 198px);
  padding: 24px 26px 12px;
  border-radius: 20px 20px 0 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(102, 136, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(13, 19, 32, 0.92), rgba(9, 15, 26, 0.94));
}

.tts-demo-script p {
  margin: 0;
  max-width: none;
  color: var(--text-high);
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 0.92vw, 0.94rem);
  line-height: 1.5;
  letter-spacing: -0.035em;
}

.tts-demo-token {
  color: rgba(232, 240, 255, 0.8);
  transition: color 140ms ease, opacity 140ms ease, text-shadow 140ms ease;
}

.tts-demo-token--brand {
  font-weight: 700;
  color: #dbe6ff;
}

.tts-demo-token.is-past {
  color: rgba(216, 228, 255, 0.7);
}

.tts-demo-token.is-active {
  color: #f4f8ff;
  text-shadow: 0 0 18px rgba(112, 153, 255, 0.32);
}

.tts-demo-token.is-upcoming {
  color: rgba(214, 225, 248, 0.44);
}

.tts-demo-script strong {
  color: #dbe6ff;
}

.tts-demo-audio {
  position: relative;
  height: 68px;
  padding: 8px 58px 8px 10px;
  border-top: 1px solid rgba(145, 185, 255, 0.18);
  border-radius: 0 0 20px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(12, 18, 30, 0.98), rgba(10, 16, 28, 0.98));
}

.tts-demo-voices {
  display: grid;
  justify-items: center;
  gap: 10px;
  justify-self: center;
}

.tts-demo-voice-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tts-demo-voice {
  flex: 0 0 91px;
  width: 91px;
  height: 91px;
  border-radius: 999px;
}

.tts-demo-voice {
  position: relative;
  border: 1px solid rgba(145, 185, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
  padding: 0;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tts-demo-voice:hover,
.tts-demo-voice:focus-visible {
  border-color: rgba(175, 208, 255, 0.34);
  box-shadow: 0 10px 20px rgba(5, 10, 20, 0.24);
}

.tts-demo-voice:focus-visible {
  outline: 2px solid rgba(184, 212, 255, 0.34);
  outline-offset: 2px;
}

.tts-demo-voice.is-active {
  border-color: rgba(195, 222, 255, 0.46);
  box-shadow: 0 0 0 3px rgba(107, 145, 255, 0.14);
}

.tts-demo-voice::after {
  content: attr(data-voice-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgba(8, 12, 22, 0.48);
  color: rgba(232, 240, 255, 0.92);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition: opacity 180ms ease, background 180ms ease;
}

.tts-demo-voice:hover::after,
.tts-demo-voice:focus-visible::after {
  opacity: 1;
}

.tts-demo-avatar,
.tts-demo-voice-more {
  position: relative;
}

.tts-demo-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 1px solid rgba(161, 195, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
}

.tts-demo-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 180ms ease;
}

.tts-demo-voice:hover .tts-demo-avatar img,
.tts-demo-voice:focus-visible .tts-demo-avatar img {
  filter: brightness(0.52);
}

.tts-demo-voice-more {
  color: rgba(218, 229, 249, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
}

.tts-demo-waveform {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding-bottom: 3px;
  width: max-content;
  min-width: 100%;
}

.tts-demo-waveform::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(150, 188, 255, 0.14), rgba(150, 188, 255, 0.4) 28%, rgba(150, 188, 255, 0.16));
}

.tts-demo-waveform span {
  display: block;
  flex: 0 0 4px;
  width: 4px;
  height: var(--wave-h, 20%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(170, 192, 236, 0.72), rgba(82, 105, 174, 0.22));
  transform-origin: bottom center;
  opacity: 0.44;
  transition: background 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

.tts-demo-waveform span.is-played {
  background: linear-gradient(180deg, rgba(223, 234, 255, 0.98), rgba(126, 157, 236, 0.44));
  opacity: 0.92;
}

.tts-demo-waveform span.is-current {
  background: linear-gradient(180deg, rgba(248, 251, 255, 1), rgba(163, 191, 255, 0.62));
  opacity: 1;
  box-shadow: 0 0 14px rgba(111, 153, 255, 0.34);
}

.tts-demo-play {
  position: absolute;
  right: -12px;
  bottom: 42px;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(145, 185, 255, 0.28);
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(30, 45, 76, 0.96), rgba(15, 23, 39, 0.98));
  color: var(--text-high);
  box-shadow: 0 14px 26px rgba(5, 10, 20, 0.32);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tts-demo-play:hover,
.tts-demo-play:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(170, 204, 255, 0.4);
  box-shadow: 0 18px 30px rgba(5, 10, 20, 0.36);
}

.tts-demo-play:focus-visible {
  outline: 2px solid rgba(184, 212, 255, 0.48);
  outline-offset: 3px;
}

.tts-demo-play svg {
  width: 22px;
  height: 22px;
}

.tts-demo-play .icon-pause {
  display: none;
}

.tts-demo-card.is-playing .tts-demo-play .icon-play {
  display: none;
}

.tts-demo-card.is-playing .tts-demo-play .icon-pause {
  display: block;
}

@media (max-width: 1120px) {
  .tts-hero-grid,
  .tts-trust-grid,
  .tts-model-grid {
    grid-template-columns: 1fr;
  }

  .tts-stat-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .tts-hero-copy h1 {
    max-width: none;
  }

  .tts-hero-grid {
    min-height: auto;
    padding: 28px 0 34px;
  }

  .tts-hero-visual {
    min-height: 316px;
    transform: translateY(6px);
  }

  .tts-demo-stack {
    width: min(100%, 360px);
  }

  .tts-demo-card {
    width: 100%;
  }

  .tts-demo-voices {
    gap: 9px;
  }

  .tts-demo-voice-row {
    gap: 10px;
  }

  .tts-demo-voice {
    flex-basis: 84px;
    width: 84px;
    height: 84px;
  }

  .tts-demo-script {
    min-height: 184px;
    padding: 20px 20px 15px;
  }

  .tts-demo-script p {
    max-width: none;
    font-size: clamp(0.78rem, 2.2vw, 0.86rem);
  }

  .tts-demo-audio {
    height: 62px;
    padding: 8px 52px 8px 8px;
  }

  .tts-demo-play {
    right: -12px;
    bottom: 40px;
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 520px) {
  .tts-demo-stack {
    width: 100%;
  }

  .tts-demo-card {
    width: 100%;
  }

  .tts-demo-voices {
    gap: 8px;
  }

  .tts-demo-voice-row {
    gap: 9px;
  }

  .tts-demo-voice {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }

  .tts-demo-voice-more {
    font-size: 0.74rem;
  }

  .tts-demo-script {
    min-height: 178px;
    padding: 18px 18px 14px;
  }

  .tts-demo-script p {
    max-width: none;
    font-size: 0.76rem;
  }

  .tts-demo-audio {
    height: 58px;
    padding: 7px 46px 8px 7px;
  }

  .tts-demo-play {
    right: -8px;
    bottom: 38px;
    width: 46px;
    height: 46px;
  }

  .tts-demo-play svg {
    width: 18px;
    height: 18px;
  }
}

.tts-models-stack {
  display: grid;
  gap: var(--content-gap);
}

.tts-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--content-gap);
}

.tts-preview-block {
  display: grid;
  gap: 18px;
}

.tts-preview-shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}

.tts-preview-frame {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(143, 184, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(16, 22, 34, 0.94);
  box-shadow: 0 22px 54px rgba(3, 8, 18, 0.26);
}

.tts-preview-frame img {
  width: 100%;
  display: block;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  transition: transform 220ms ease, opacity 180ms ease;
}

.tts-preview-shot:hover img,
.tts-preview-shot:focus-visible img {
  transform: scale(1.01);
}

.tts-preview-shot:focus-visible {
  outline: 2px solid rgba(164, 196, 255, 0.62);
  outline-offset: 4px;
}

.tts-preview-caption {
  margin: 0;
  width: 100%;
  color: var(--text-med);
}

.tts-model-detail--kokoro {
  min-height: 100%;
}

.tts-model-detail--kitten {
  min-height: 100%;
}

.tts-model-detail span,
.tts-trust-card span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-faint);
  color: var(--accent-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tts-model-detail h3,
.tts-trust-card h3 {
  margin-top: 16px;
}

.tts-model-detail p,
.tts-trust-card p {
  max-width: 34ch;
}

.tts-stat-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tts-stat {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(143, 184, 255, 0.1);
}

.tts-stat span {
  display: block;
  color: var(--text-low);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tts-stat strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.05em;
}

.tts-stat p {
  margin: 8px 0 0;
  color: var(--text-med);
}

.tts-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--content-gap);
}

.tts-trust-card {
  min-height: 196px;
}

.tts-install-panel {
  position: relative;
  overflow: hidden;
}

.tts-install-panel::before {
  content: "";
  position: absolute;
  inset: auto -8% -44% auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(95, 72, 235, 0.18), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}

.tts-install-panel::after {
  content: "";
  position: absolute;
  inset: -16% auto auto -8%;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(50, 109, 241, 0.14), transparent 70%);
  pointer-events: none;
}

.tts-install-panel > * {
  position: relative;
  z-index: 1;
}

.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 40px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.shot-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.shot-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 8, 16, 0.76);
  backdrop-filter: blur(12px);
  cursor: zoom-out;
}

.shot-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  border-radius: 28px;
  border: 1px solid rgba(143, 184, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0)),
    rgba(10, 16, 28, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 220ms ease;
}

.shot-lightbox.is-open .shot-lightbox-dialog {
  transform: translateY(0) scale(1);
}

.shot-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 8, 12, 0.64);
  color: var(--text-high);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.shot-lightbox-image {
  width: 100%;
  max-height: min(78vh, 920px);
  object-fit: contain;
  background: #0a0f18;
}

.shot-lightbox-caption {
  padding: 16px 22px 20px;
  color: var(--text-med);
  font-size: 0.98rem;
}

body.is-lightbox-open {
  overflow: hidden;
}

