.v6-header-right { flex-wrap: wrap; justify-content: flex-end; }

.cinema-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  max-width: 100%;
  border: 1px solid rgba(185, 199, 204, .38);
  border-radius: 999px;
  background: rgba(15, 20, 24, .84);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  backdrop-filter: blur(16px);
  overflow: hidden;
}
.cinema-switch-fixed,
.cinema-switch-variants { display: flex; align-items: center; gap: 3px; }
.cinema-switch-fixed { flex: 0 0 auto; }
.cinema-switch-variants {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.cinema-switch-variants::-webkit-scrollbar { display: none; }

.cinema-switch button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 8px;
  background: transparent;
  color: #d5dfe2;
  font: 700 .66rem/1 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.cinema-switch button:hover,
.cinema-switch button:focus-visible { color: #fff; background: rgba(255, 255, 255, .15); }
.cinema-switch button[aria-pressed="true"] { background: #e7eceb; color: #13191c; }
.cinema-switch button:disabled { opacity: .38; cursor: default; }
.cinema-switch button[data-cinema-story] { border: 1px solid rgba(215, 229, 231, .3); }
.cinema-switch .cinema-scroll { padding-inline: 5px; font-size: 1.05rem; }
.cinema-switch [hidden], .cinema-demo-panel[hidden] { display: none !important; }
.cinema-switch button[data-cinema-demo] { border: 1px solid rgba(215, 229, 231, .3); }
.cinema-demo-panel {
  position: fixed;
  z-index: 20;
  top: 52px;
  right: 24px;
  width: min(310px, calc(100vw - 36px));
  padding: 15px;
  border: 1px solid #c0c8c8;
  border-radius: 12px;
  background: #e9ecebf2;
  box-shadow: 0 20px 50px #0005;
  color: #1a2427;
  font: 12px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
  backdrop-filter: blur(18px);
}
.cinema-demo-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-weight: 700; }
.cinema-demo-heading button { border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.cinema-demo-panel p { margin: 12px 0; }
.cinema-demo-actions { display: grid; gap: 7px; }
.cinema-demo-actions button { border: 1px solid #8d9a9d; border-radius: 6px; padding: 8px; background: #fff9; color: #1a2427; cursor: pointer; }
.cinema-demo-actions button:disabled { opacity: .45; cursor: default; }
.cinema-demo-panel small { display: block; margin-top: 11px; color: #56666a; }

.cinema-host { display: none; }
.v6[data-cinema]:not([data-cinema="original"]) .cinema-host {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  overflow: hidden;
}
.v6[data-cinema]:not([data-cinema="original"]) :is(.v6-map, .v6-current, .v6-footer, .v6-ambient, .v6-stage-switch, .v6-path-picker, .v6-style-switch) { display: none; }
.v6[data-cinema]:not([data-cinema="original"]) .v6-header { padding: 0; pointer-events: none; }
.v6[data-cinema]:not([data-cinema="original"]) .v6-header-left .v6-project,
.v6[data-cinema]:not([data-cinema="original"]) .v6-brand { display: none; }
.v6[data-cinema]:not([data-cinema="original"]) .v6-back {
  position: fixed;
  top: 8px;
  left: 3%;
  padding: 3px 0;
  font-size: .58rem;
  pointer-events: auto;
}
.v6[data-cinema="irobot"] .v6-back { color: #15333d; }
.v6[data-cinema="irobot"][data-cinema-flow="evolution"] .v6-back { color: #dce9e8; }
.v6[data-cinema="bourne"][data-cinema-flow="overview"] .v6-back { color: #283c35; }
.v6[data-cinema="mission7"]:not([data-cinema="original"]) .cinema-host { overflow-y: auto; overflow-x: hidden; }
.v6[data-cinema="dune"]:not([data-cinema="original"]) .cinema-host { overflow-y: auto; overflow-x: hidden; }
.v6[data-cinema-flow="evolution"] .cinema-host { overflow-y: auto; overflow-x: hidden; }
.v6[data-cinema-flow="key-point"] .cinema-host { overflow-y: auto; overflow-x: hidden; }
.cinema-switch button[data-cinema-key-point] { border: 1px solid #bdd8d75c; }
.v6[data-cinema="minority-report"][data-cinema-flow="key-point"] .v6-back { color: #21434d; }
@media (min-width: 921px) {
  .v6[data-cinema="inception"][data-cinema-flow="story"] .ins-header { padding-top: 58px; }
  .v6[data-cinema="minority-report"][data-cinema-flow="story"] .mr-story-header { padding-top: 58px; }
  .v6[data-cinema="wayne"][data-cinema-flow="story"] .wayne-story { grid-template-rows: 124px minmax(470px, 1fr) auto 70px; }
  .v6[data-cinema="topgun"] .tg-header { padding-top: 48px; }
  .v6[data-cinema="oblivion"] .ob-header { padding-top: 56px; }
  .v6[data-cinema="elysium"] :is(.el-header, .el-story-header) { padding-top: 58px; }
  .v6[data-cinema="dune"][data-cinema-flow="evolution"] .de-header { padding-top: 30px; }
  .v6[data-cinema="unleashed"][data-cinema-flow="evolution"] .ue-header { padding-top: 58px; }
  .v6[data-cinema="pacific-rim"][data-cinema-flow="evolution"] .pre-header { padding-top: 58px; }
}
.v6[data-cinema]:not([data-cinema="original"]) .v6-header-right {
  position: fixed;
  top: 8px;
  left: 50%;
  right: auto;
  max-width: calc(100vw - 360px);
  transform: translateX(-50%);
  pointer-events: auto;
}
.v6[data-cinema]:not([data-cinema="original"]) .cinema-host > section { min-height: 100dvh; }
.v6[data-cinema="matrix"] .mx-shell { min-height: 100dvh; }
.v6[data-cinema]:not([data-cinema="original"])[data-depth="detail"] .cinema-host { filter: blur(7px); opacity: .34; pointer-events: none; }
.cinema-error {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 420px;
  transform: translate(-50%, -50%);
  padding: 22px;
  border: 1px solid #59656d;
  border-radius: 12px;
  background: #151b1f;
  color: #fff;
  text-align: center;
}
.cinema-error button { margin-top: 12px; color: #fff; background: transparent; border: 1px solid currentColor; border-radius: 8px; padding: 8px 12px; cursor: pointer; }

@media (min-width: 921px) and (max-width: 1200px) {
  .v6[data-cinema]:not([data-cinema="original"]) .v6-header-right { top: 0; }
  .v6[data-cinema]:not([data-cinema="original"]) .cinema-switch {
    width: min(600px, calc(100vw - 360px));
  }
}

@media (max-width: 920px) {
  .v6-header { pointer-events: none; }
  .v6-header :is(a, button, select) { pointer-events: auto; }
  .v6-header-right { align-items: flex-end; }
  .cinema-switch { order: 1; }
  .v6[data-cinema]:not([data-cinema="original"]) .v6-header-right {
    top: auto;
    bottom: 8px;
    left: 50%;
    max-width: calc(100vw - 24px);
  }
  .v6[data-cinema]:not([data-cinema="original"]) .cinema-switch {
    width: calc(100vw - 24px);
  }
  .v6[data-cinema]:not([data-cinema="original"]) .cinema-switch button {
    flex: 0 0 auto;
    padding: 8px 7px;
    font-size: .56rem;
  }
  .v6[data-cinema]:not([data-cinema="original"]) .cinema-host { overflow-y: auto; padding-bottom: 64px; }
  .cinema-switch { flex-wrap: wrap; }
  .cinema-switch-fixed { width: 100%; justify-content: center; }
  .cinema-switch-variants { flex: 1 1 0; }
  .cinema-demo-panel { top: auto; bottom: 84px; right: 12px; }
}

@media (max-width: 500px) {
  .v6[data-cinema]:not([data-cinema="original"]) .cinema-switch {
    display: flex;
    overflow: hidden;
    border-radius: 999px;
  }
  .v6[data-cinema]:not([data-cinema="original"]) .cinema-switch button {
    padding: 8px 4px;
    text-align: center;
    white-space: nowrap;
  }
  .v6[data-cinema]:not([data-cinema="original"]) .cinema-host { padding-bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-switch, .cinema-switch button { transition: none !important; }
}
