#studioView .video-template-panel {
  gap: 10px;
}

#personForm.template-mode .prompt-block > .section-title h3 {
  font-size: 0 !important;
}

#personForm.template-mode .prompt-block > .section-title h3::before {
  content: "模板创作" !important;
  font-size: 18px !important;
}

#studioView .video-template-status {
  min-height: 18px;
  color: #8b93a6;
  font-size: 11px;
}

#studioView .video-template-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

#studioView .video-template-card {
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e3e6ee;
  border-radius: 8px;
  background: #fff;
}

#studioView .video-template-card.active {
  border-color: #765cff;
  box-shadow: 0 0 0 2px rgba(118, 92, 255, 0.16);
}

#studioView .video-template-media {
  width: 100%;
  aspect-ratio: 9 / 12;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #eef0f6;
}

#studioView .video-template-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

#studioView .video-template-media i {
  font-style: normal;
  color: #765cff;
}

#studioView .video-template-copy {
  width: 100%;
  min-width: 0;
  padding: 7px;
  display: grid;
  gap: 2px;
}

#studioView .video-template-copy strong,
#studioView .video-template-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#studioView .video-template-copy strong {
  color: #202536;
  font-size: 12px;
  font-weight: 500;
}

#studioView .video-template-copy small {
  color: #9299aa;
  font-size: 10px;
}

#studioView .video-template-detail {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(118, 92, 255, 0.2);
  border-radius: 8px;
  background: #f8f7ff;
}

#studioView .video-template-detail.hidden {
  display: none;
}

#studioView .video-template-detail video {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 250px;
  border-radius: 6px;
  background: #111;
  object-fit: contain;
}

#studioView .video-template-detail-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#studioView .video-template-detail-copy > strong {
  color: #202536;
  font-size: 14px;
  font-weight: 600;
}

#studioView .video-template-detail-copy > small,
#studioView .video-template-detail-copy label {
  color: #7b8395;
  font-size: 10px;
}

#studioView #manualTemplateDescription {
  width: 100%;
  min-height: 76px;
  padding: 8px;
  resize: vertical;
  border: 1px solid #dfe3ed;
  border-radius: 6px;
  background: #fff;
  color: #202536;
  font-size: 12px;
  line-height: 1.45;
}

#studioView .video-template-use {
  width: 100%;
  min-height: 36px;
  margin-top: auto;
  border-radius: 6px;
  background: #765cff;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

html.theme-dark #studioView .video-template-card,
html.theme-dark #studioView .video-template-detail,
html.theme-dark #studioView #manualTemplateDescription {
  border-color: #343744;
  background: #1a1c22;
}

html.theme-dark #studioView .video-template-copy strong,
html.theme-dark #studioView .video-template-detail-copy > strong,
html.theme-dark #studioView #manualTemplateDescription {
  color: #f0f1f5;
}

@media (max-width: 380px) {
  #studioView .video-template-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #studioView .video-template-detail { grid-template-columns: 38% minmax(0, 1fr); }
}
