:root {
  color-scheme: dark;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: #f0eee6;
  background: transparent;
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}
button {
  font: inherit;
}
button:focus-visible {
  outline: 2px solid #a9c6f0;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.demo {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 16px 12px 8px;
}
.stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
}
.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  margin: 0;
  animation: reveal 0.22s ease;
}
.scene > img {
  position: absolute;
  inset: 0;
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px #0003);
}
.scene.widget > img {
  inset: 7.5% 12%;
  width: 76%;
  height: 85%;
}
.demo-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.demo-tabs button {
  border: 0;
  background: transparent;
  color: #a5a49b;
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 13px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.demo-tabs button[aria-selected="true"] {
  background: #ffffff10;
  color: #f0eee6;
}
.demo-tabs button:hover {
  color: #fff;
}
.caption {
  margin: 0;
  min-height: 36px;
  text-align: center;
  color: #a5a49b;
  font-size: 12px;
  line-height: 1.5;
  text-wrap: balance;
}
@keyframes reveal {
  from {
    opacity: 0.5;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 400px) {
  .demo {
    padding: 12px 4px 4px;
    gap: 10px;
  }
  .demo-tabs button {
    min-height: 44px;
    padding: 8px 10px;
  }
  .caption {
    font-size: 12px;
    min-height: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene {
    animation: none;
  }
}

.demo.demo--no-caption {
  grid-template-rows: minmax(0, 1fr) auto;
}
.demo.demo--no-caption .caption {
  display: none;
}
