:root {
  color-scheme: light;
  --bg: #fff8f1;
  --surface: #ffffff;
  --ink: #2b2a33;
  --muted: #6b6877;
  --line: #eadfd3;
  --accent: #d9482f;
  --accent-ink: #ffffff;
  --accent-soft: #fde8e2;
  --error: #b3261e;
  --radius: 14px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}

/* ---- 頂部 ---- */
.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

h1 .num {
  display: inline-block;
  margin: 0 0.08em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.lead { margin: 12px 0 0; font-size: 1.0625rem; }

.offer {
  display: inline-block;
  margin: 16px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ---- 流程 ---- */
.steps {
  display: grid;
  gap: 8px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps li::before {
  content: counter(step);
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}

/* ---- 表單 ---- */
form { display: grid; gap: 22px; }

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 700;
}

legend small, .hint {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.hint { margin: 6px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip { position: relative; }

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: block;
  padding: 8px 16px;
  min-height: 44px;
  line-height: 28px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

input[type="text"]:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 1px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.consent input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.turnstile { min-height: 0; }

.notice {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-weight: 600;
}

.notice a { color: var(--accent); }

.error {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: #fdecea;
  color: var(--error);
  font-weight: 600;
}

/* ---- 按鈕與卡片 ---- */
.btn {
  display: inline-block;
  min-height: 48px;
  padding: 10px 22px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn:disabled { opacity: 0.55; cursor: progress; }

.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.card {
  margin-top: 28px;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card h2 { margin: 0 0 8px; font-size: 1.375rem; }
.card p { margin: 0 0 12px; }

.actions { display: grid; gap: 10px; margin-top: 8px; }

.bind {
  margin: 16px 0;
  padding: 14px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
}

.bind h3 { margin: 0 0 6px; font-size: 1.0625rem; }
.bind p { margin: 0 0 10px; }

.foot {
  margin-top: 48px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* ---- 本機預覽列 ---- */
.devbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 6px 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8125rem;
  text-align: center;
}

.devbar a { color: #ffd2c7; margin-left: 8px; }

@media (min-width: 480px) {
  .actions { grid-template-columns: 1fr 1fr; }
}
