
:root {
  --bg: #0b1220;
  --panel: rgba(15, 23, 42, 0.7);
  --panel-border: rgba(56, 189, 248, 0.12);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-bg: rgba(56, 189, 248, 0.12);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --warn: #fbbf24;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;  /* QA R6: CJK must come right after Inter — system-ui/-apple-system ahead of it short-circuits Chromium's per-char fallback (same root cause as the styles.css health-page tofu, W0) */
  background: var(--bg);
  color: var(--text);
  padding: 24px;
  line-height: 1.5;
}
html.is-iframe body { padding: 0 12px; }

h2 { font-size: 1.4rem; margin-bottom: 8px; }
h3 { font-size: 1.1rem; margin-bottom: 6px; }

.stepper {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 0 4px;
}
.stepper-step {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-bottom: 3px solid rgba(148,163,184,0.2);
  transition: all 0.2s;
}
.stepper-step.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.stepper-step.done {
  color: var(--success);
  border-bottom-color: var(--success);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.panel-header h3 { margin: 0; }
.panel-toggle { color: var(--text-muted); font-size: 1.2rem; }
.panel-body { margin-top: 12px; }
.panel-body.collapsed { display: none; }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-top: 12px;
}
label:first-child { margin-top: 0; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
}
textarea { min-height: 100px; resize: vertical; }
textarea.prompt-area { min-height: 200px; font-family: 'Fira Code', monospace, monospace; font-size: 0.82rem; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(56,189,248,0.15);
}
input[type="range"] { width: 100%; accent-color: var(--primary); }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: inherit;  /* QA R7: buttons don't inherit body font by default (UA stylesheet uses
    a system form-control font, e.g. Arial) — without this the button labels (下一步, 创建向导,
    etc.) render as tofu since Arial has no CJK glyphs. Same pattern as the font-family:inherit
    already applied to input/select/textarea above. */
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #0b1220; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-secondary { background: var(--primary-bg); color: var(--primary); border: 1px solid var(--panel-border); }
.btn-secondary:hover:not(:disabled) { background: rgba(56,189,248,0.2); }
.btn-success { background: var(--success); color: #0b1220; }
.btn-success:hover:not(:disabled) { filter: brightness(1.1); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248,113,113,0.2); }

.btn-row { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: var(--primary-bg);
  border-radius: 8px;
  margin: 12px 0;
  color: var(--primary);
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.tag-blue { background: var(--primary-bg); color: var(--primary); }
.tag-green { background: var(--success-bg); color: var(--success); }

.summary-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 12px;
  font-size: 0.9rem;
}
.summary-grid dt { color: var(--text-muted); }
.summary-grid dd { color: var(--text); }

.alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 0.9rem;
}
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(52,211,153,0.2); }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248,113,113,0.2); }

.hidden { display: none !important; }

/* Paywall notice for the Plus+-gated AI generation (replaces the bare alert) */
.creator-upsell-notice {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  margin: 0 0 16px;
  border: 1px solid color-mix(in srgb, var(--accent-purple, #9479ff) 40%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-purple, #9479ff) 12%, transparent);
  font-size: 14px;
}
.creator-upsell-notice a {
  color: var(--accent-purple, #9479ff);
  font-weight: 600;
  text-decoration: underline;
}

/* Mobile — bump form input font-size to 16px to stop iOS auto-zoom on focus.
   QA R7: mirrors the EN block (Rule #16 gap — this was missing from the CN copy). */
@media (max-width: 480px) {
  input[type="text"], input[type="number"], input[type="email"], select, textarea {
    font-size: 16px;
  }
  textarea.prompt-area { font-size: 13px; }
  .row { flex-direction: column; }
}
