/* One joined capsule for the two creation modes. Interaction remains unchanged. */
body:not(.studio-manual-mode) #appPanel #studioView .studio-mode-switch {
  gap: 0 !important;
  width: min(60vw, 258px) !important;
  padding: 2px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #765cff 0%, #9b54ff 100%) !important;
  box-shadow: 0 8px 22px rgba(118, 92, 255, 0.2) !important;
}

body:not(.studio-manual-mode) #appPanel #studioView .studio-mode-switch #switchAgentCreateBtn,
body:not(.studio-manual-mode) #appPanel #studioView .studio-mode-switch #switchManualCreateBtn {
  flex: 1 1 50% !important;
  width: auto !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  padding-right: 4px !important;
  padding-left: 4px !important;
  font-size: 13.5px !important;
  line-height: 40px !important;
}

#appPanel #studioView .studio-mode-switch #switchAgentCreateBtn,
#appPanel #studioView .studio-mode-switch #switchManualCreateBtn,
html.theme-dark #appPanel #studioView .studio-mode-switch #switchAgentCreateBtn,
html.theme-dark #appPanel #studioView .studio-mode-switch #switchManualCreateBtn,
html body.studio-manual-mode #appPanel #studioView .studio-mode-switch #switchAgentCreateBtn,
html body.studio-manual-mode #appPanel #studioView .studio-mode-switch #switchManualCreateBtn {
  margin: 0 !important;
  border: 0 !important;
  background: linear-gradient(135deg, #765cff 0%, #9b54ff 100%) !important;
  color: #d8ccff !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
}

#appPanel #studioView .studio-mode-switch #switchAgentCreateBtn:first-child,
html body.studio-manual-mode #appPanel #studioView .studio-mode-switch #switchAgentCreateBtn:first-child {
  border-radius: 999px 0 0 999px !important;
}

#appPanel #studioView .studio-mode-switch #switchManualCreateBtn:last-child,
html body.studio-manual-mode #appPanel #studioView .studio-mode-switch #switchManualCreateBtn:last-child {
  border-left: 0 !important;
  border-radius: 0 999px 999px 0 !important;
}

#appPanel #studioView .studio-mode-switch #switchAgentCreateBtn.active,
#appPanel #studioView .studio-mode-switch #switchManualCreateBtn.active,
html.theme-dark #appPanel #studioView .studio-mode-switch #switchAgentCreateBtn.active,
html.theme-dark #appPanel #studioView .studio-mode-switch #switchManualCreateBtn.active,
html body.studio-manual-mode #appPanel #studioView .studio-mode-switch #switchAgentCreateBtn.active,
html body.studio-manual-mode #appPanel #studioView .studio-mode-switch #switchManualCreateBtn.active {
  background: linear-gradient(135deg, #765cff 0%, #9b54ff 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(55, 28, 126, 0.14) !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch {
  gap: 0 !important;
  justify-content: center !important;
}

html body.studio-manual-mode #appPanel #studioView .studio-mode-switch #switchAgentCreateBtn,
html body.studio-manual-mode #appPanel #studioView .studio-mode-switch #switchManualCreateBtn {
  flex: 0 0 33.333% !important;
  width: 33.333% !important;
  max-width: 33.333% !important;
}

/* Manual page: both halves share one purple surface; text indicates selection. */
html body.studio-manual-mode #appPanel section#studioView nav.studio-mode-switch #switchAgentCreateBtn:not(.active),
html body.studio-manual-mode #appPanel section#studioView nav.studio-mode-switch #switchManualCreateBtn:not(.active) {
  background: linear-gradient(135deg, #765cff 0%, #9b54ff 100%) !important;
  color: #d8ccff !important;
  -webkit-text-fill-color: #d8ccff !important;
  box-shadow: none !important;
}
