.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  background: #050506;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.mode-switch button {
  height: 31px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
}
.mode-switch button.is-active {
  color: #fff;
  background: linear-gradient(135deg, #332448, #1b1722);
  box-shadow: inset 0 0 0 1px #55406f;
}
.engine-contract {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #30253d;
  border-radius: 7px;
  background: #120e18;
  font-size: 8px;
}
.engine-contract strong { color: #c4b5fd; letter-spacing: .12em; }
.engine-contract span { color: var(--muted); text-align: right; }
.inspector-form input:not([type="checkbox"]) {
  width: 100%;
  height: 34px;
  margin-top: 5px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080809;
  outline: 0;
  font-size: 10px;
}
.advanced-controls { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.advanced-controls[hidden], .voice-card[hidden] { display: none; }
.controls-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.voice-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #30283a; border-radius: 8px; background: #0c0a0f; }
.voice-card > strong { font-size: 8px; letter-spacing: .14em; color: #bda4f6; }
.video-direction-card { padding: 9px; border: 1px solid #3c2d50; border-radius: 9px; background: #100c15; }
.video-direction-card summary { cursor: pointer; color: #d8ccfa; font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.video-direction-card > p { margin: 7px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.video-direction-card textarea { margin-top: 5px; }
.video-direction-card input[type="range"] { height: 18px; padding: 0; }
.video-toggles { display: grid; gap: 6px; margin-top: 7px; }
.video-toggles label { display: flex; align-items: flex-start; gap: 6px; line-height: 1.35; }
.video-toggles input { flex: 0 0 auto; }
.scene-review { display: grid; gap: 5px; margin-top: 9px; max-height: 250px; overflow: auto; }
.scene-review details { padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: #09090a; }
.scene-review summary { cursor: pointer; font-size: 9px; color: #ddd4f4; }
.scene-review p, .scene-review small { display: block; margin: 6px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.storyboard-frame { margin: 7px 0; border: 1px solid #302842; border-radius: 6px; overflow: hidden; background: #050506; }
.storyboard-frame img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #050506; }
.storyboard-frame figcaption, .storyboard-pending { padding: 6px; color: #a995d7; font-size: 8px; line-height: 1.35; }
.identity-view-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.identity-view-grid .storyboard-frame { margin: 5px 0 0; }
.identity-view-grid .storyboard-frame img { aspect-ratio: 3 / 4; object-fit: contain; }
.storyboard-pending { margin-top: 6px; border: 1px dashed #3a3248; border-radius: 5px; }
@media (max-width: 390px) { .controls-three { grid-template-columns: 1fr; } }
.storyboard-scene-index { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0; padding: 0; }
.storyboard-scene-index a { display: block; border: 1px solid #3a3248; border-radius: 5px; padding: 5px 8px; color: inherit; text-decoration: none; }
.storyboard-scene-index a:focus-visible { outline: 2px solid #dfb7ff; outline-offset: 2px; }
