/* Independent editor viewport, no dimmed workbench or floating dialog frame. */
.standalone-theme-surface:not(.hidden):not([hidden]) {
  position: fixed !important; inset: 0 !important; width: 100% !important;
  height: 100dvh !important; max-height: none !important; padding: 0 !important;
  margin: 0 !important; border-radius: 0 !important; backdrop-filter: none !important;
  background-color: #fff9ee !important;
}
.standalone-theme-surface > :first-child:not(#themePageNavigation) {
  max-height: none; border-radius: 0; box-shadow: none;
}
#aiProcessModal.standalone-theme-surface { display: block; overflow: auto; }
#aiProcessModal.standalone-theme-surface:not(.is-comic-home):not(.is-imperial-home):not(.is-forest-elf-home):not(.is-ancient-home):not(.is-future-self) > .ai-process-card {
  width: 100%; max-width: 1180px; min-height: 100%; margin: 0 auto;
  max-height: none; border: 0; border-radius: 0; box-shadow: none;
}
#themePageNavigation { display: none; }
#aiProcessModal.standalone-theme-surface #themePageNavigation {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 36px 20px 0;
}
#themePageNavigation a { color: #513923; font-weight: 700; text-decoration: none; }
#themePageNavigation button { padding: 10px 16px; border: 1px solid #b8996d; border-radius: 8px; background: #fff6e5; color: #513923; cursor: pointer; }
/* Dedicated designs already provide their own navigation and upload controls. */
#aiProcessModal:is(.is-comic-home,.is-imperial-home,.is-forest-elf-home,.is-ancient-home,.is-future-self) #themePageNavigation { display: none !important; }
.theme-page-loading::after {
  content: '正在打开主题…'; position: fixed; inset: 0; z-index: 10040;
  display: grid; place-items: center; background: #fff9ee; color: #513923;
}
@media (max-width: 650px) {
  #aiProcessModal.standalone-theme-surface:not(.is-comic-home):not(.is-imperial-home):not(.is-forest-elf-home):not(.is-ancient-home):not(.is-future-self) > .ai-process-card { padding: 20px 16px; }
  #themePageNavigation { flex-wrap: wrap; }
}
