:root {
  color-scheme: light;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #fff7ed;
  --accent: #f97316;
  --accent-dark: #c2410c;
  --shadow: 0 12px 34px rgba(31, 41, 55, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #fffaf5;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

.app-shell { width: min(100% - 32px, 620px); margin: 0 auto; padding: 28px 0 36px; }
.app-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.eyebrow, .question-kicker, .section-label { margin: 0 0 6px; color: var(--accent-dark); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(30px, 8vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
h2 { margin-bottom: 10px; font-size: 24px; line-height: 1.25; }
.subtitle { margin-bottom: 0; color: var(--muted); font-size: 15px; }
.ghost-button, .secondary-button, .primary-button, .type-option { border: 0; border-radius: 12px; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.ghost-button { padding: 10px 12px; color: var(--muted); background: transparent; }
.ghost-button:hover, .secondary-button:hover, .primary-button:hover, .type-option:hover:not(:disabled) { transform: translateY(-1px); }

.type-panel, .wizard-card, .preview-card { border: 1px solid rgba(229, 231, 235, .9); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.type-panel { padding: 16px; margin-bottom: 14px; }
.type-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-option { min-height: 54px; padding: 8px; color: var(--muted); background: #f9fafb; }
.type-option.active { color: #fff; background: var(--accent); box-shadow: 0 8px 18px rgba(249, 115, 22, .24); }
.type-option:disabled { opacity: .6; }
.type-option span { display: block; margin-top: 3px; font-size: 10px; font-weight: 500; }

.wizard-card, .preview-card { padding: 22px; }
.progress-row { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #f3f4f6; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.question-block { padding: 32px 0 24px; }
.question-help { min-height: 21px; margin-bottom: 22px; color: var(--muted); line-height: 1.6; font-size: 14px; }
.question-fields { display: grid; gap: 16px; }
.input-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.field-hint { margin: -3px 0 0; color: var(--muted); font-size: 12px; }
input, textarea, select { width: 100%; border: 1px solid #d1d5db; border-radius: 14px; outline: none; padding: 14px 15px; color: var(--ink); background: #fff; font-size: 17px; transition: border .18s ease, box-shadow .18s ease; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(249, 115, 22, .14); }
textarea { resize: vertical; line-height: 1.55; }
textarea::placeholder { color: #9ca3af; opacity: 1; }
button:disabled { opacity: .55; }
.custom-input { margin-top: 8px; }
.wizard-actions, .preview-actions { display: flex; gap: 10px; }
.wizard-actions > button, .preview-actions > button { flex: 1; min-height: 48px; padding: 12px 14px; }
.secondary-button { color: var(--ink); background: #f3f4f6; }
.primary-button { color: white; background: var(--accent); box-shadow: 0 8px 18px rgba(249, 115, 22, .22); }
.preview-card { margin-top: 14px; }
.preview-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.status-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; color: #166534; background: #dcfce7; font-size: 12px; font-weight: 700; white-space: nowrap; }
.preview-content { margin: 20px 0; border-top: 1px solid var(--line); }
.preview-row { display: grid; grid-template-columns: 118px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.preview-row strong { color: var(--muted); font-size: 13px; }
.preview-row span { white-space: pre-wrap; word-break: break-word; }
.share-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.app-footer { margin-top: 18px; color: #9ca3af; font-size: 12px; text-align: center; }

@media (max-width: 420px) {
  .app-shell { width: min(100% - 22px, 620px); padding-top: 18px; }
  .app-header { margin-bottom: 16px; }
  .wizard-card, .preview-card { padding: 18px; border-radius: 18px; }
  .wizard-actions, .preview-actions { flex-wrap: wrap; }
  .wizard-actions > button, .preview-actions > button { flex: 1 1 calc(50% - 5px); }
  .preview-actions .primary-button { flex-basis: 100%; }
}
