/* 创作页 /create — 对齐设计稿 */

@media (max-width: 720px) {
  body.page-create.mobile-create-page .site-header {
    display: none !important;
  }
}

body.page-create.mobile-create-page .app-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.page-create.mobile-create-page {
  background: #f3f6fb;
}

.mobile-create-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: max(6px, env(safe-area-inset-top, 0px)) 14px 12px;
  box-sizing: border-box;
}

/* 与首页共用顶栏，创作页略收紧下边距 */
.mobile-create-shell .mobile-home-header {
  margin-bottom: 12px;
}

.create-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 20px;
  padding: 14px 14px 16px;
  border: 1px solid #e8eef5;
  box-shadow: 0 8px 28px rgba(30, 128, 255, 0.08);
}

/* 分段切换 */
.create-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #f0f4f8;
}

.create-segment__item {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.create-segment__item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.create-segment__item span {
  display: block;
  text-align: center;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #667085;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.create-segment__item.is-active span,
.create-segment__item:has(input:checked) span {
  background: #1e80ff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 128, 255, 0.28);
}

/* 标题区 */
.create-hero-head {
  margin-bottom: 14px;
}

.create-hero-head__title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: #1e80ff;
}

.create-hero-head__sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #98a2b3;
}

.create-workspace-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.create-block__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #101828;
}

.create-block__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.create-block__label-row .create-block__label {
  margin-bottom: 0;
}

.create-optimize-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  color: #1e80ff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(30, 128, 255, 0.12);
}

.create-optimize-btn__icon {
  flex-shrink: 0;
  color: #1e80ff;
  filter: drop-shadow(0 1px 2px rgba(30, 128, 255, 0.28));
}

.create-optimize-btn__text {
  line-height: 1.2;
  white-space: nowrap;
}

.create-optimize-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 图生图上传 */
.create-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 148px;
  padding: 18px 16px;
  border: 1.5px dashed #93c5fd;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  position: relative;
}

.create-upload-box__plus {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e80ff;
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  line-height: 36px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(30, 128, 255, 0.35);
}

.create-upload-box__illus {
  opacity: 0.85;
  margin-bottom: 20px;
}

.create-upload-box__title {
  font-size: 14px;
  font-weight: 800;
  color: #1e40af;
}

.create-upload-box__hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
  max-width: 260px;
}

.edit-upload-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.create-block--upload:has(.edit-upload-preview:not(.hidden)) .create-upload-box {
  display: none;
}

.create-upload-add-more {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1.5px dashed #93c5fd;
  border-radius: 12px;
  background: #f8fbff;
  color: #1e80ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.create-upload-add-more.hidden {
  display: none;
}

/* 描述输入 */
.create-prompt-wrap {
  position: relative;
}

.create-prompt {
  width: 100%;
  min-height: 120px;
  padding: 12px 12px 28px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #f9fafb;
  color: #101828;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
  box-sizing: border-box;
}

.create-prompt::placeholder {
  color: #98a2b3;
}

.create-prompt:focus {
  outline: none;
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 128, 255, 0.12);
}

.create-prompt__count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 11px;
  color: #98a2b3;
}

/* 风格 — 纯文字标签（单行） */
.create-style-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.create-style-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 4px;
  border: 1px solid #e8eef5;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  min-width: 0;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.create-style-chip.is-active {
  border-color: #1e80ff;
  background: rgba(30, 128, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(30, 128, 255, 0.1);
}

.create-style-chip__label {
  font-size: 12px;
  font-weight: 600;
  color: #475467;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.create-style-chip.is-active .create-style-chip__label {
  color: #1e80ff;
  font-weight: 700;
}

/* 参数 */
.create-params {
  display: grid;
  gap: 12px;
}

.create-field--full {
  display: block;
}

.create-params__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.create-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #667085;
}

.create-select {
  position: relative;
  display: block;
}

.create-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #98a2b3;
  border-bottom: 2px solid #98a2b3;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.mobile-create-shell .create-select__native,
body.page-create.mobile-create-page .create-select__native {
  /* 覆盖全局 select height:32px，避免文字被裁切 */
  width: 100%;
  height: auto;
  min-height: 46px;
  padding: 12px 40px 12px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background-color: #f8fafc;
  background-image: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: #1d2939;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.mobile-create-shell .create-select__native:focus,
body.page-create.mobile-create-page .create-select__native:focus {
  outline: none;
  border-color: #1e80ff;
  background-color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 3px rgba(30, 128, 255, 0.14);
}

.mobile-create-shell .create-field--full .create-select__native {
  font-size: 13px;
}

.create-cost-hint {
  margin: 0;
  font-size: 11px;
  color: #98a2b3;
  text-align: center;
}

.create-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e80ff 0%, #4096ff 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(30, 128, 255, 0.32);
}

.create-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.create-notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.55;
  color: #64748b;
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 380px) {
  .create-style-grid {
    gap: 4px;
  }

  .create-style-chip {
    min-height: 28px;
    padding: 5px 2px;
  }

  .create-style-chip__label {
    font-size: 11px;
  }
}

.mobile-create-shell .mobile-home-header--no-search {
  margin-bottom: 12px;
}

.mobile-create-recent {
  margin-top: 16px;
}

.mobile-create-recent .mobile-home-section-head {
  margin-bottom: 10px;
}

.mobile-create-recent .mobile-home-recent__list.hidden {
  display: none;
}
