.demo-fullscreen {
  gap: 0.45rem;
  display: flex;
  font-size: 0.88rem;
  align-items: center;
  color: var(--emerald);
  text-underline-offset: 0.2rem;
  min-height: var(--control-height);
}
.demo-carousel {
  color: var(--ink);
  border-radius: 0.8rem;
  background: #f4f7f5;
  border: 1px solid #c7d7cb;
  box-shadow: 0 0.9rem 2.5rem #0c261e17;
}
.demo-controls {
  gap: 0.5rem;
  display: grid;
  padding: 0.65rem;
  align-items: center;
  background: white;
  border-radius: 0.8rem 0.8rem 0 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.demo-controls[hidden] {
  display: none;
}
.demo-controls button {
  gap: 0.37rem;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.85rem;
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 0.33rem 0.65rem;
  background: var(--paper);
  border: 1px solid #cbd9cf;
  min-width: var(--control-height);
  min-height: var(--control-height);
  border-radius: var(--control-radius);
}
.demo-controls button:hover {
  background: #e3f1e7;
}
#demo-playback {
  justify-self: start;
}
.demo-slide-info {
  display: grid;
  line-height: 1.2;
  text-align: center;
}
.demo-slide-info strong {
  font-size: 0.97rem;
}
.demo-slide-info span {
  font-size: 0.8rem;
  margin-top: 0.18rem;
  color: var(--muted);
}
.demo-direction {
  gap: 0.35rem;
  display: flex;
  justify-content: end;
}
.demo-stage {
  display: grid;
}
.demo-load-error {
  color: var(--muted);
  padding: 0.45rem 0.8rem;
}
.live-demo {
  border: 0;
  grid-area: 1 / 1;
  width: 100%;
  display: block;
  background: #f4f7f5;
  border-radius: 0 0 0.8rem 0.8rem;
  height: clamp(39rem, 70vw, 50rem);
}
.demo-staging {
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .demo-controls button {
    transition:
      background-color 140ms ease-out,
      transform 140ms ease-out;
  }
  .demo-controls button:active {
    transform: scale(0.97);
  }
}
@media (max-width: 33rem) {
  .demo-controls {
    gap: 0.3rem;
    padding: 0.43rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .demo-controls button {
    padding-inline: 0.45rem;
  }
  .demo-slide-info strong {
    font-size: 0.85rem;
  }
  .demo-direction {
    gap: 0.2rem;
  }
  .live-demo {
    height: min(43rem, max(31rem, 80svh));
  }
}
