/* Keep the model picker beside the manual creation question. */
body.studio-manual-mode #studioView #personForm.manual-create-panel {
  padding-top: 0 !important;
}

#studioView .prompt-block .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

#studioView .prompt-block .section-title h3 {
  flex: 1 1 auto;
  min-width: 0;
}

#studioView .prompt-title-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

#studioView .prompt-title-actions .studio-model-trigger {
  width: auto !important;
  max-width: 168px;
  min-height: 34px !important;
  padding: 5px 7px !important;
  gap: 4px;
  border: 1px solid rgba(37, 99, 235, 0.16) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #2563eb !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.06) !important;
}

#studioView .prompt-title-actions .studio-model-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #2563eb !important;
  font-size: 10px !important;
  letter-spacing: -0.15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#studioView .prompt-title-actions .status-dot {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  background: #2563eb !important;
}

#studioView .prompt-title-actions .studio-model-icon {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  fill: rgba(37, 99, 235, 0.08);
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#studioView .prompt-title-actions .status-divider { display: none; }

#studioView .prompt-title-actions .duration-badge {
  flex: 0 0 auto;
  min-height: 22px !important;
  padding: 3px 4px !important;
  border: 0 !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  font-size: 10px !important;
}

#studioView .prompt-title-actions .studio-upload-work {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 11px;
}

#studioView .prompt-title-actions .studio-upload-work svg {
  width: 18px;
  height: 18px;
}

#studioView .prompt-block .section-title .studio-model-panel {
  top: calc(100% + 7px);
  right: 0;
  left: auto;
  width: min(300px, calc(100vw - 34px));
  max-height: min(420px, 62vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 62;
}

#studioView .prompt-block.model-panel-open {
  overflow: visible !important;
  z-index: 60;
}

#studioView .prompt-block.model-panel-open .section-title {
  z-index: 61;
}

html.theme-dark #studioView .prompt-title-actions .studio-model-trigger {
  border-color: rgba(217, 169, 87, 0.38) !important;
  background: rgba(45, 35, 18, 0.76) !important;
  color: #e6c47c !important;
  box-shadow: none !important;
}

html.theme-dark #studioView .prompt-title-actions .studio-model-name,
html.theme-dark #studioView .prompt-title-actions .duration-badge { color: #e6c47c !important; }
html.theme-dark #studioView .prompt-title-actions .duration-badge { background: rgba(217, 169, 87, 0.13) !important; }
html.theme-dark #studioView .prompt-title-actions .status-dot { background: #e6c47c !important; }
html.theme-dark #studioView .prompt-title-actions .studio-model-icon { fill: rgba(230, 196, 124, 0.10); }

@media (max-width: 390px) {
  #studioView .prompt-title-actions .studio-model-trigger { max-width: 160px; }
  #studioView .prompt-title-actions .studio-upload-work { flex-basis: 32px; width: 32px; height: 32px; min-height: 32px; }
  #studioView .prompt-block .section-title h3 { font-size: 16px !important; }
}
