/* A small floating selector lets the animation own the frame. */
.theatre-shell {
  position: relative;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.theatre-shell > .theatre {
  border: 0;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 14px 50px -28px #352f361f;
}
.demo-header {
  position: absolute;
  z-index: 12;
  top: 14px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: center;
  padding: 0;
  background: none;
  border: 0;
  pointer-events: none;
}
.theatre-shell .demo-header .scenario-tabs {
  position: relative;
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid #ffffffb8;
  border-radius: 100px;
  background: #ffffff94;
  box-shadow:
    inset 0 1px 0 #ffffffb3,
    0 3px 16px color-mix(in srgb, var(--shadow-ink) 3.53%, transparent);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  scrollbar-width: none;
  scroll-padding-inline: 5px;
  pointer-events: auto;
}
.demo-header .scenario-tabs::-webkit-scrollbar {
  display: none;
}
.theatre-shell .demo-header .scenario-tabs button {
  flex-shrink: 0;
  min-height: 40px;
  padding: 9px 17px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.15px;
  box-shadow: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.theatre-shell .demo-header .scenario-tabs button[aria-selected="true"] {
  background: #fff;
  color: #292727;
  font-weight: 600;
  box-shadow:
    0 1px 5px color-mix(in srgb, var(--shadow-ink) 7.06%, transparent),
    0 1px 2px color-mix(in srgb, var(--shadow-ink) 3.14%, transparent);
}
.theatre-shell .demo-header .scenario-tabs button:hover:not([aria-selected="true"]) {
  background: #ffffff70;
  color: #292727;
}
.theatre-shell .demo-header .scenario-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.theatre-shell:has(.theatre[data-story="gaming"]) .scenario-tabs {
  background: #ffffff15;
  border-color: #ffffff26;
  box-shadow:
    inset 0 1px 0 #ffffff12,
    0 3px 16px #08051014;
}
.theatre-shell:has(.theatre[data-story="gaming"]) .scenario-tabs button {
  color: #d6cbe2;
}
.theatre-shell:has(.theatre[data-story="gaming"]) .scenario-tabs button[aria-selected="true"] {
  background: #f8f5fc;
  color: #30253d;
}
.theatre-shell:has(.theatre[data-story="gaming"])
  .scenario-tabs
  button:hover:not([aria-selected="true"]) {
  background: #ffffff16;
  color: #fff;
}
/* Keep both sides of every scene transition at exactly the same dimensions. */
.theatre-shell .theatre > .film.story-stage {
  height: 716px;
}
.theatre-shell .story-stage[data-story] > .story-canvas {
  top: 78px;
  bottom: 68px;
}
@media (max-width: 720px) {
  .theatre-shell > .theatre {
    border-radius: 24px;
  }
  .demo-header {
    top: 12px;
    left: 14px;
    right: 14px;
  }
  .theatre-shell .demo-header .scenario-tabs {
    padding: 4px;
    scroll-padding-inline: 4px;
  }
  .theatre-shell .demo-header .scenario-tabs button {
    padding-inline: 14px;
    font-size: 13px;
    min-height: 40px;
  }
  .theatre-shell .theatre > .film.story-stage {
    height: 726px;
  }
  .theatre-shell .story-stage[data-story] > .story-canvas {
    top: 78px;
    bottom: 64px;
  }
}
@media (max-width: 370px) {
  .demo-header {
    left: 10px;
    right: 10px;
  }
  .theatre-shell .theatre > .film.story-stage {
    height: 756px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .theatre-shell .demo-header .scenario-tabs button {
    transition: none;
  }
}
