:root {
  --bg: #0e0f13;
  --bg-elev: #161821;
  --bg-elev-2: #1d2029;
  --border: #2a2e3a;
  --border-hover: #3a3f4d;
  --text: #e6e8ed;
  --text-muted: #8b90a0;
  --text-dim: #5f6473;
  --accent: #6c8cff;
  --accent-soft: rgba(108, 140, 255, 0.14);
  --accent-dim: rgba(108, 140, 255, 0.08);
  --green: #4ade80;
  --red: #f87171;
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 28px;
  padding: 0 32px; height: 60px;
  border-bottom: 1px solid var(--border); background: var(--bg-elev);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), #9b6cff); flex-shrink: 0; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: 0.02em; }
.brand-sub { font-size: 13px; color: var(--text-muted); border-left: 1px solid var(--border); padding-left: 10px; margin-left: 2px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.breadcrumb .crumb { cursor: pointer; transition: color 0.15s; }
.breadcrumb .crumb:hover { color: var(--text); }
.breadcrumb .sep { color: var(--text-dim); user-select: none; }
.breadcrumb .crumb-current { color: var(--text); font-weight: 500; }
.stage { flex: 1; position: relative; overflow: hidden; }
.view {
  display: none; padding: 48px 32px 64px;
  max-width: 1100px; margin: 0 auto; width: 100%;
  animation: fadeUp 0.32s ease;
}
.view.is-active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.view-head { margin-bottom: 32px; }
.view-head--inline { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.view-title { font-size: 24px; font-weight: 700; letter-spacing: 0.01em; }
.view-desc { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.choice-grid--two { grid-template-columns: repeat(2, 1fr); max-width: 620px; }
.choice-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 28px; cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.14s;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  text-align: left; color: var(--text); font-family: inherit;
}
.choice-card:hover { border-color: var(--border-hover); background: var(--bg-elev-2); transform: translateY(-2px); }
.choice-card:active { transform: translateY(0); }
.choice-card--compact { padding: 28px 24px; gap: 10px; }
.choice-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); flex-shrink: 0;
}
.choice-card--compact .choice-icon { width: 44px; height: 44px; border-radius: 10px; }
.choice-label { font-size: 19px; font-weight: 700; }
.choice-card--compact .choice-label { font-size: 17px; }
.choice-hint { font-size: 13px; color: var(--text-muted); }
.config-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.config-main { min-width: 0; }
.badge {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.field { margin-bottom: 22px; }
.field-row { display: flex; gap: 24px; margin-bottom: 22px; }
.field-row > .field { flex: 1; margin-bottom: 22px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.field-value { color: var(--accent); font-weight: 600; margin-left: 4px; }
.field-note { display: block; font-size: 11px; color: var(--text-dim); margin-top: 6px; }
.textarea {
  width: 100%; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; color: var(--text);
  font-size: 14px; font-family: inherit; resize: vertical;
  transition: border-color 0.15s; line-height: 1.6;
}
.textarea:focus { outline: none; border-color: var(--accent); background: var(--bg-elev-2); }
.textarea::placeholder { color: var(--text-dim); }
.dropzone {
  border: 1.5px dashed var(--border-hover); border-radius: var(--radius);
  padding: 24px; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-height: 120px; display: flex; align-items: center; justify-content: center;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--accent); background: var(--accent-dim); }
.dropzone-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.dropzone-empty svg { color: var(--text-dim); }
.dropzone-hint { font-size: 11px; color: var(--text-dim); }
.dropzone-previews { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.dropzone-previews:not(:empty) ~ .dropzone-empty { display: none; }
.preview-item { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff; border: none;
  cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; line-height: 1;
}
.segmented {
  display: inline-flex; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px; gap: 2px;
}
.seg {
  background: transparent; border: none; color: var(--text-muted);
  padding: 7px 18px; border-radius: 5px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.seg:hover:not(.is-active):not(:disabled) { color: var(--text); background: var(--bg-elev-2); }
.seg.is-active { background: var(--accent); color: #fff; }
.seg:disabled { opacity: 0.6; cursor: not-allowed; }
.slider {
  width: 100%; -webkit-appearance: none; appearance: none; height: 5px;
  border-radius: 5px; background: var(--border-hover); outline: none; margin-top: 4px;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 3px solid var(--bg-elev-2);
}
.slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 3px solid var(--bg-elev-2);
}
.slider-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); margin-top: 5px; }
.actions { display: flex; gap: 12px; margin-top: 8px; }
.btn {
  padding: 11px 26px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; font-family: inherit; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn--ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn--ghost:hover { color: var(--text); border-color: var(--border-hover); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #5b7af0; }
.btn--primary:disabled { opacity: 0.55; cursor: not-allowed; }
.config-aside {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; min-height: 340px; position: sticky; top: 84px;
}
.aside-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-dim); font-size: 13px; min-height: 300px;
}
.aside-empty p { text-align: center; }
.result-media { width: 100%; border-radius: var(--radius); margin-bottom: 12px; display: block; }
.result-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent);
  text-decoration: none; font-weight: 600;
}
.result-link:hover { text-decoration: underline; }
.progress-ring {
  display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--text-muted); font-size: 14px;
}
.spinner {
  width: 38px; height: 38px; border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg { color: var(--red); font-size: 13px; text-align: center; }
@media (max-width: 768px) {
  .topbar { padding: 0 16px; height: 54px; }
  .brand-sub { display: none; }
  .view { padding: 28px 16px 48px; }
  .choice-grid, .choice-grid--two { grid-template-columns: 1fr; }
  .config-layout { grid-template-columns: 1fr; }
  .config-aside { position: static; min-height: 200px; }
  .field-row { flex-direction: column; gap: 0; }
  .field-row > .field { margin-bottom: 22px; }
}
