/* Scoped native controls and projected labels for scene.js. */
.interactive-scene {
  --scene-min-height: 420px;
  min-height: var(--scene-min-height);
  position: relative;
  isolation: isolate;
}
.scene-shell {
  position: absolute;
  inset: 0;
  color: var(--scene-text, var(--scene-default-text, #15161c));
  font: inherit;
  line-height: 1.3;
  overflow: hidden;
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
}
.scene-shell *, .scene-shell *::before, .scene-shell *::after { box-sizing: border-box; }
.scene-shell .scene-stage { position: absolute; inset: 0 0 74px; opacity: 0; pointer-events: none; transition: opacity .5s; }
.scene-shell .scene-canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y pinch-zoom; user-select: none; }
.scene-shell.is-rendered .scene-stage { opacity: 1; pointer-events: auto; }
.scene-shell.is-rendered { background: var(--scene-background); }
/* Parent-authored fallback content stays visible until an actual frame succeeds. */
.interactive-scene.is-ready [data-scene-fallback] { display: none; }
.scene-shell .scene-labels { position: absolute; inset: 0; pointer-events: none; }
.scene-shell .scene-label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, 0);
  max-width: min(180px, 30vw);
  padding: 7px 10px;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: 7px;
  color: var(--scene-text, var(--scene-default-text));
  background: color-mix(in srgb, var(--scene-background) 88%, transparent);
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 12px #00000014;
  transition: background .2s, opacity .2s, box-shadow .2s;
  font: inherit;
  white-space: normal;
}
.scene-shell .scene-label strong { display: block; font-size: 12px; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
.scene-shell .scene-label span { display: none; margin-top: 3px; font-size: 10px; line-height: 1.35; color: var(--scene-muted, var(--scene-default-muted)); }
.scene-shell .scene-label.is-selected { background: color-mix(in srgb, var(--scene-background) 88%, var(--scene-accent)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--scene-accent) 70%, transparent), 0 5px 20px #0002; }
.scene-shell .scene-label.is-selected span { display: block; }
.scene-shell .scene-label.is-rear { opacity: .38; transform: translate(-50%, 0) scale(.86); }
.scene-shell .scene-label.is-rear:not(:focus-visible):not(.is-hovered) strong { font-size: 12px; }
.scene-shell .scene-label.is-offstage { opacity: 0; pointer-events: none; }
.scene-shell .scene-label.is-offstage:focus-visible { opacity: 1; top: 62% !important; left: 50% !important; z-index: 100000 !important; }
.scene-shell .scene-label:focus-visible { opacity: 1; z-index: 100000 !important; }
.scene-shell .scene-label:hover, .scene-shell .scene-label.is-hovered { opacity: 1; background: color-mix(in srgb, var(--scene-background) 80%, var(--scene-accent)); }
.scene-shell .scene-label:focus-visible, .scene-shell .scene-control:focus-visible, .scene-shell .scene-fallback-item:focus-visible { outline: 3px solid var(--scene-accent); outline-offset: 4px; }
.scene-shell.scene-shell--workflow .scene-label { min-width: 74px; padding: 7px 14px; }
.scene-shell.scene-shell--workflow .scene-label strong { font-size: 12px; }
.scene-shell.scene-shell--workflow .scene-label span { display: none; }
.scene-shell .scene-controls {
  position: absolute;
  inset: auto 16px 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  opacity: 0;
  pointer-events: none;
}
.scene-shell.is-rendered .scene-controls { opacity: 1; pointer-events: auto; }
.scene-shell .scene-hint { font-size: 10px; letter-spacing: .025em; color: var(--scene-muted, var(--scene-default-muted)); }
.scene-shell .scene-hint::before { content: '↔'; margin-right: 7px; color: var(--scene-accent); font-size: 15px; vertical-align: -1px; }
.scene-shell .scene-navigation { display: flex; align-items: center; gap: 5px; }
.scene-shell .scene-control {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--scene-default-muted) 25%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--scene-text, var(--scene-default-text));
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.scene-shell .scene-control--text { font-size: 12px; padding-inline: 10px; }
.scene-shell .scene-control:hover { background: color-mix(in srgb, var(--scene-accent) 15%, transparent); border-color: var(--scene-accent); }
.scene-shell .scene-control:disabled { opacity: .3; cursor: default; }
.scene-shell .scene-fallback {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
  height: 100%;
  overflow: auto;
  pointer-events: auto;
}
.scene-shell .scene-fallback[hidden], .scene-shell.is-rendered .scene-fallback { display: none; }
.scene-shell .scene-fallback-item {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  margin: 0;
  background: color-mix(in srgb, var(--scene-background) 92%, var(--scene-accent));
  border: 1px solid color-mix(in srgb, var(--scene-accent) 30%, transparent);
  border-radius: 9px;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.scene-shell .scene-fallback-item[hidden] { display: none; }
.scene-shell .scene-fallback-item img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
.scene-shell .scene-fallback-item strong { font-size: 12px; }
.scene-shell .scene-fallback-item[aria-pressed="true"] { border-color: var(--scene-accent); }
.scene-shell .scene-fallback-art { display: block; aspect-ratio: 16/9; border-radius: 4px; background: repeating-linear-gradient(65deg, transparent 0 9%, #a78aff 10% 13%, transparent 14% 22%), #dfd7f4; }
.scene-shell .scene-fallback-art--1 { background: repeating-linear-gradient(90deg, #7355d8 0 6%, transparent 6% 12%), #b9d0c7; }
.scene-shell .scene-fallback-art--2 { background: linear-gradient(130deg, transparent 25%, #15161c 26% 46%, transparent 47% 58%, #a78aff 59% 76%, transparent 77%), #dfd7f4; }
.scene-shell .scene-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 680px) {
.interactive-scene { --scene-min-height: 340px; }
.scene-shell .scene-stage { bottom: 86px; }
.scene-shell .scene-controls { inset-inline: 12px; bottom: 11px; gap: 5px; }
.scene-shell .scene-hint { flex: 1 0 100%; font-size: 9px; }
.scene-shell .scene-navigation { gap: 5px; }
.scene-shell .scene-control { min-height: 44px; min-width: 44px; }
.scene-shell .scene-control--text { font-size: 12px; }
.scene-shell .scene-label { padding: 5px 7px; max-width: 126px; }
.scene-shell .scene-label strong { font-size: 12px; }
.scene-shell .scene-label span { font-size: 11px; }
.scene-shell .scene-label.is-rear { opacity: .25; }
.scene-shell.scene-shell--workflow .scene-label { min-width: 59px; padding-inline: 9px; }
.scene-shell.scene-shell--workflow .scene-label strong { font-size: 12px; }
.scene-shell .scene-fallback { gap: 8px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
.scene-shell .scene-stage, .scene-shell .scene-label, .scene-shell .scene-control { transition: none; }
}

.scene-shell--projects .scene-label.is-rear:not(.is-hovered):not(:focus-visible):not(.is-selected){opacity:0;pointer-events:none}.scene-shell .scene-label.is-hovered{z-index:200!important}.scene-shell .scene-control>svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
