:root {
  --bg: #ede8de;
  --paper: #fbf7ee;
  --paper-soft: #fff8eb;
  --ink: #2a2622;
  --ink-soft: #4a4034;
  --primary: #6d4a1f;
  --primary-dark: #5a3d1a;
  --primary-soft: #8a6f4d;
  --accent: #d4943a;
  --accent-soft: #ffe8a8;
  --good: #4d7a3a;
  --good-bg: #dfe8d6;
  --bad: #b04a3a;
  --bad-bg: #f8e2dc;
  --line: #d6c8b0;
  --line-soft: #e6d9c2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== Header ==================== */
.site-header {
  background: var(--paper);
  border-bottom: 3px double var(--primary);
  padding: 18px 0 16px;
  margin-bottom: 24px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand h1 {
  color: var(--primary);
  font-size: 22px;
  letter-spacing: 0.02em;
}
.brand .subtitle {
  color: var(--primary-soft);
  font-size: 13px;
  margin-top: 4px;
}
.poster-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--paper);
  padding: 9px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s;
}
.poster-link:hover { background: var(--primary-dark); }

/* ==================== Progress ==================== */
.progress {
  margin-bottom: 18px;
}
.progress-bar {
  background: var(--line-soft);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}
.progress-fill {
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
  height: 100%;
  width: 0;
  transition: width 0.4s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--primary-soft);
  margin-top: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ==================== Wizard ==================== */
.wizard-main { padding-bottom: 60px; }
.wizard {
  display: block;
}

/* Step card */
.step-card {
  background: var(--paper);
  border-radius: 10px;
  padding: 32px 36px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid var(--line-soft);
}
@media (max-width: 600px) {
  .step-card { padding: 22px 18px; }
}

.step-eyebrow {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.step-title {
  font-size: 22px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.step-lead {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 22px;
}
.step-lead strong { color: var(--primary); }
.step-lead mark { background: var(--accent-soft); padding: 0 4px; color: var(--primary); }

/* Welcome hero */
.welcome-hero {
  text-align: center;
  padding: 16px 0 28px;
}
.welcome-hero .icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}
.welcome-hero h2 {
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 16px;
}
.welcome-hero p {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  line-height: 1.8;
}
.welcome-hero mark { background: var(--accent-soft); padding: 1px 6px; color: var(--primary); font-weight: 700; }
.welcome-hero strong { color: var(--primary); }

/* askMore hero */
.askmore-hero {
  text-align: center;
  padding: 12px 0 24px;
}
.askmore-hero .ico {
  font-size: 44px;
  display: block;
  margin-bottom: 10px;
}
.askmore-hero h2 {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 10px;
}
.askmore-hero p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.askmore-hero .meta {
  color: var(--primary-soft);
  font-size: 13px;
}

/* Help / Help-card */
.help-card {
  background: var(--paper-soft);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.help-card h3 {
  font-size: 13.5px;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.help-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 8px;
}
.help-card p:last-child { margin-bottom: 0; }
.help-card strong { color: var(--primary); }

.metaphor {
  background: #fff;
  border: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* Examples */
.examples {
  display: grid;
  gap: 6px;
}
.example {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.65;
  padding: 8px 12px;
  border-radius: 4px;
}
.example .mark {
  font-weight: 700;
  flex-shrink: 0;
  width: 18px;
}
.example.good {
  background: var(--good-bg);
  color: #355820;
}
.example.good .mark { color: var(--good); }
.example.bad {
  background: var(--bad-bg);
  color: #8a3325;
}
.example.bad .mark { color: var(--bad); }

/* Features grid (in criteria step) */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.feature {
  background: var(--paper-soft);
  border-top: 3px solid var(--accent);
  padding: 14px 16px;
  border-radius: 0 0 4px 4px;
}
.feature .ico {
  font-size: 22px;
  display: block;
  margin-bottom: 4px;
}
.feature strong {
  display: block;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 700;
}
.feature em {
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}
@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
}

/* Skip box */
.skip-box {
  background: #fff5e8;
  border: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 12px 18px;
  margin-bottom: 18px;
}
.skip-box h4 {
  font-size: 13px;
  color: #8a4f0a;
  margin-bottom: 6px;
  font-weight: 700;
}
.skip-box ul { list-style: none; }
.skip-box li {
  font-size: 13px;
  color: var(--primary);
  padding-left: 18px;
  position: relative;
  line-height: 1.7;
}
.skip-box li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--bad);
  font-weight: 700;
}

/* ==================== Form fields ==================== */
.field-group {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
.field { display: block; }
.field .label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 6px;
}
.field .label .required {
  color: var(--bad);
  margin-left: 2px;
}
.field .hint {
  display: block;
  font-size: 12px;
  color: var(--primary-soft);
  margin-bottom: 8px;
  line-height: 1.55;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.65;
  transition: border 0.15s, box-shadow 0.15s;
}
.field textarea {
  resize: vertical;
  min-height: 88px;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 148, 58, 0.18);
}

/* Composite (frequency / duration) */
.composite {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.composite .composite-prefix,
.composite .composite-suffix {
  font-size: 14px;
  color: var(--ink-soft);
}
.composite select {
  width: auto;
  min-width: 80px;
}
.composite input[type=number] {
  width: 84px;
}

/* ==================== Buttons ==================== */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.actions.between {
  justify-content: space-between;
  align-items: center;
}
.actions.center {
  justify-content: center;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.05s, opacity 0.15s, background 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: wait; }

.btn-primary {
  background: var(--primary);
  color: var(--paper);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-secondary {
  background: var(--paper);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--accent-soft);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover:not(:disabled) { background: #b87a26; }

.btn-ghost {
  background: transparent;
  color: var(--primary-soft);
  border: none;
  padding: 8px 14px;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--primary);
  background: rgba(109, 74, 31, 0.06);
  border-radius: 4px;
}

.btn-large {
  font-size: 15.5px;
  padding: 14px 28px;
}

/* ==================== Status ==================== */
.status {
  margin-top: 14px;
  font-size: 13px;
  min-height: 1.4em;
  text-align: center;
}
.status.error { color: var(--bad); }
.status.ok { color: var(--good); }
.status.info { color: var(--primary-soft); }

/* ==================== Edit banner ==================== */
.edit-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--primary);
}
.edit-banner .ico { margin-right: 4px; }

/* ==================== Preview ==================== */
.preview-intro {
  background: var(--paper-soft);
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 22px;
  border-radius: 4px;
  line-height: 1.7;
}
.preview-intro strong { color: var(--primary); }

.preview-block {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  margin-bottom: 16px;
  overflow: hidden;
}
.preview-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line-soft);
}
.preview-block-head h3 {
  font-size: 14.5px;
  color: var(--primary);
  font-weight: 700;
  flex: 1;
}
.preview-block-body {
  padding: 6px 0;
}

.preview-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.preview-row:last-child { border-bottom: none; }
.preview-row .key {
  color: var(--primary-soft);
  font-weight: 600;
}
.preview-row .val {
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}
.preview-row .val.empty {
  color: var(--bad);
  font-style: italic;
}

.edit-btn {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.edit-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

@media (max-width: 540px) {
  .preview-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .preview-row .key { font-size: 12px; }
  .edit-btn { justify-self: flex-end; margin-top: 4px; }
}

/* ==================== Success ==================== */
.success-card {
  text-align: center;
  padding: 20px 0 30px;
}
.success-card .ico {
  font-size: 56px;
  display: block;
  margin-bottom: 16px;
}
.success-card h2 {
  color: var(--good);
  font-size: 22px;
  margin-bottom: 12px;
}
.success-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  line-height: 1.7;
}
.drive-link {
  display: inline-block;
  background: var(--primary);
  color: var(--paper);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.drive-link:hover { background: var(--primary-dark); }

/* ==================== Footer ==================== */
.site-footer {
  margin-top: 40px;
  padding: 16px 0 24px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.site-footer p {
  text-align: center;
  font-size: 12.5px;
  color: var(--primary-soft);
}
