/* ========== 文生图创作页 ========== */
.create {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 8px;
  align-items: start;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---------- 选项组 ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: .82rem; font-weight: 600; color: var(--text); }
.field-hint {
  margin-left: 6px;
  font-size: .7rem;
  font-weight: 400;
  color: var(--text-dim);
}

.option-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.option {
  flex: none;
  width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px;
  font: inherit;
  color: var(--text-dim);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, color .15s;
}
.option img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 7px;
}
.option.is-person img { border-radius: 50%; }
.option span {
  max-width: 100%;
  font-size: .7rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.option:hover { border-color: var(--accent); }
.option.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-weak);
}
.option.active span { color: var(--accent); font-weight: 600; }

/* 多选（配饰）：选中时右上角打勾 */
.option.is-multi { position: relative; }
.option.is-multi.active::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- 参考图上传 ---------- */
.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  padding: 12px;
  font-size: .82rem;
  color: var(--text-dim);
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.upload:hover { color: var(--accent); border-color: var(--accent); }
.upload img {
  display: block;
  max-height: 96px;
  max-width: 100%;
  border-radius: 8px;
}

/* ---------- 提示词 ---------- */
#prompt {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: .9rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
}
#prompt:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }

/* ---------- 当前选择摘要 ---------- */
.selection {
  font-size: .75rem;
  line-height: 1.5;
  color: var(--text-dim);
}

/* ---------- 生成按钮 ---------- */
.generate-btn {
  width: 100%;
  padding: 12px;
  font: inherit;
  font-size: .95rem;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .2s, opacity .2s;
}
.generate-btn:hover { background: var(--accent-hover); }
.generate-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 结果区 ---------- */
.stage { min-width: 0; }
.preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
  font-size: .85rem;
  color: var(--text-dim);
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage-note { margin-top: 10px; font-size: .72rem; color: var(--text-dim); text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .create { grid-template-columns: 1fr; }
  .preview { aspect-ratio: 4 / 3; }
}
