/* ========== Design tokens · Aurora Light ========== */
:root {
  --bg: #faf6f0;
  --card: rgba(255, 255, 255, .86);
  --card-solid: #ffffff;
  --ink: #2b1a0f;
  --ink-2: #4e3a2c;
  --muted: #8b7566;
  --line: rgba(78, 58, 44, .09);
  --line-strong: rgba(78, 58, 44, .16);
  --accent: #b5531f;
  --accent-2: #9a4318;
  --accent-3: #9a4318;
  --accent-soft: #f6e9df;
  --accent-ink: #ffffff;
  --grad: linear-gradient(var(--accent), var(--accent)); /* 纯色，不用渐变 */
  --brown: linear-gradient(120deg, #3d1d0c 0%, #6b3215 55%, #8f4a22 100%);
  --warn: #c2410c;
  --warn-soft: #fde8dc;
  --blob-1: #f3c4a2; --blob-2: #f7e1b5; --blob-3: #f2cdb4;
  --shadow-sm: 0 1px 2px rgba(78, 58, 44, .05);
  --shadow: 0 1px 2px rgba(78, 58, 44, .04), 0 12px 32px -14px rgba(120, 60, 20, .16);
  --shadow-lg: 0 24px 50px -20px rgba(107, 50, 21, .45);
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: Inter, "PingFang TC", "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110c; --card: rgba(36, 26, 19, .82); --card-solid: #241a13; --ink: #f6ece2; --ink-2: #e0cfc0; --muted: #a8917f;
    --line: rgba(255, 236, 220, .08); --line-strong: rgba(255, 236, 220, .15);
    --accent: #e2783c; --accent-2: #f0965f; --accent-3: #f0965f; --accent-soft: rgba(226, 120, 60, .14); --accent-ink: #1d0f06;
    --warn: #fb923c; --warn-soft: rgba(251, 146, 60, .14);
    --blob-1: #5a2a12; --blob-2: #4a3510; --blob-3: #3d1d0c;
    --shadow-sm: none; --shadow: 0 0 0 1px var(--line), 0 20px 40px -20px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 50px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
/* 极光背景 */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none; filter: blur(70px); opacity: .6;
  background:
    radial-gradient(28vmax 28vmax at 15% 10%, var(--blob-1), transparent 70%),
    radial-gradient(26vmax 26vmax at 90% 15%, var(--blob-2), transparent 70%),
    radial-gradient(30vmax 30vmax at 60% 90%, var(--blob-3), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px 150px; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
.hidden { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent-2) 25%, transparent); }
.grad { color: var(--accent); }

/* ========== Hero ========== */
.hero { padding: 64px 4px 28px; animation: rise .7s var(--ease) both; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px);
  font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { margin-top: 22px; font-size: clamp(38px, 10vw, 58px); font-weight: 700; letter-spacing: -.025em; line-height: 1.12; }
.tagline { margin: 16px 0 0; font-size: clamp(16px, 4.2vw, 18px); color: var(--ink-2); font-weight: 400; letter-spacing: .12em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-meta span {
  padding: 6px 12px; border-radius: 99px; font-size: 13px; color: var(--ink-2); font-weight: 500;
  background: color-mix(in srgb, var(--accent-soft) 80%, transparent);
}
.notice {
  margin-top: 26px; padding: 18px 20px; border-radius: 20px; font-size: 14.5px; line-height: 1.7; color: rgba(255, 240, 228, .88);
  background: var(--brown); box-shadow: var(--shadow-lg);
}
.notice strong { font-weight: 700; color: #ffd2ad; }

/* 顶部进度条 */
.progress { position: fixed; inset: 0 0 auto; z-index: 20; height: 4px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 0 4px 4px 0; transition: width .5s var(--ease); }

/* ========== Section & Card ========== */
.section { margin-top: 48px; }
.section-head { padding: 0 4px 16px; }
.step { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.step { color: var(--accent); }
.step em { font-style: normal; font-weight: 500; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.step em::before { content: "·"; margin-right: 10px; }
.section-head h2 { margin-top: 6px; font-size: 26px; font-weight: 700; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  margin-bottom: 14px; box-shadow: var(--shadow); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  transition: box-shadow .3s, border-color .3s, transform .3s var(--ease);
}
.q { animation: rise .5s var(--ease) both; }
.q.error { border-color: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.q-title { display: flex; gap: 12px; margin-bottom: 18px; font-size: 16.5px; font-weight: 600; line-height: 1.55; }
.q-title .no {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; margin-top: -1px;
  font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); font-variant-numeric: tabular-nums;
  transition: .3s var(--ease);
}
.q.answered .q-title .no { color: #fff; background: var(--accent); font-size: 0; }
.q.answered .q-title .no::after { content: "✓"; font-size: 14px; }
.q-title .opt { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.q-err { color: var(--warn); font-size: 13px; font-weight: 600; margin-top: 12px; }

/* ========== Rating（表情 + 分数） ========== */
.rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rating button {
  display: grid; justify-items: center; gap: 2px; padding: 12px 0 10px; border-radius: 16px; cursor: pointer;
  border: 1.5px solid var(--line-strong); background: var(--card-solid);
  transition: transform .25s var(--ease), border-color .2s, background .2s, box-shadow .25s; -webkit-tap-highlight-color: transparent;
}
.rating i { font-style: normal; font-size: 26px; line-height: 1.1; filter: grayscale(1); opacity: .55; transition: .25s var(--ease); }
.rating b { font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rating button:hover { border-color: var(--accent); transform: translateY(-3px); }
.rating button:hover i { filter: none; opacity: 1; }
.rating button:active { transform: scale(.94); }
.rating button[aria-pressed="true"] {
  border-color: transparent; background: var(--grad); transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.rating button[aria-pressed="true"] i { filter: none; opacity: 1; transform: scale(1.18); animation: pop .4s var(--ease); }
.rating button[aria-pressed="true"] b { color: #fff; }
.rating:has([aria-pressed="true"]) button:not([aria-pressed="true"]) { opacity: .7; }
.scale { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.scale span:last-child { text-align: right; }

/* ========== Choices ========== */
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 14px 16px; cursor: pointer;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: var(--card-solid);
  transition: border-color .2s, background .2s, transform .15s var(--ease), box-shadow .2s; -webkit-tap-highlight-color: transparent;
}
.choice:hover { border-color: var(--accent); }
.choice:active { transform: scale(.985); }
.choice:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.choice span { color: var(--ink-2); font-weight: 500; }
.choice:has(input:checked) span { color: var(--ink); font-weight: 600; }
.choice input[type=radio], .choice input[type=checkbox] {
  appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--card-solid); display: grid; place-items: center; transition: .2s;
}
.choice input[type=checkbox] { border-radius: 7px; }
.choice input:checked { border-color: transparent; background: var(--grad); }
.choice input[type=radio]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.choice input[type=checkbox]:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.other-input { flex: 1; min-width: 0; padding: 4px 0; border: 0; border-bottom: 1.5px dashed var(--line-strong); background: transparent; outline: none; font-size: 16px; }
.other-input:focus { border-bottom: 1.5px solid var(--accent); }
textarea {
  width: 100%; min-height: 140px; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line-strong);
  background: var(--card-solid); resize: vertical; outline: none; font-size: 16px; line-height: 1.7; transition: .2s;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ========== Buttons ========== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px;
  border: 0; border-radius: 14px; cursor: pointer; font-weight: 600; letter-spacing: .02em; color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 85%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .2s var(--ease), box-shadow .25s, background .2s, opacity .2s; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); background: var(--accent-2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.ghost { background: var(--card-solid); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.btn.ghost:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.btn.small { padding: 8px 16px; font-size: 13px; border-radius: 11px; }
.btn.soft { background: var(--accent-soft); color: var(--accent-2); box-shadow: none; }
.btn.danger { background: transparent; color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.form-err { color: var(--warn); font-size: 13px; font-weight: 600; }

/* ========== 底部提交栏 ========== */
.dock { position: fixed; inset: auto 0 0; z-index: 10; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); pointer-events: none; }
.dock-inner {
  pointer-events: auto; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 20px; border-radius: 20px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card-solid) 75%, transparent); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 20px 50px -18px rgba(107, 50, 21, .35);
}
.dock-info { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); line-height: 1.3; }
.dock-info b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dock-info b { color: var(--accent); }
.dock .btn { flex: none; }

/* ========== 入口 / 状态 ========== */
.state { text-align: center; padding: 44px 24px 40px; animation: rise .7s .1s var(--ease) both; }
.state h2 { margin-top: 20px; font-size: 22px; font-weight: 800; }
.state p { margin: 8px 0 0; color: var(--muted); }
.state-icon { display: inline-grid; place-items: center; width: 88px; height: 88px; border-radius: 28px; background: var(--brown); box-shadow: var(--shadow-lg); animation: pop .5s var(--ease) both; }
.state-icon svg { width: 52px; height: 52px; fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.state-icon circle { display: none; }
.state-icon.ok path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .35s var(--ease) forwards; }

/* ========== Motion ========== */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drift { to { transform: translate3d(-4vmax, 3vmax, 0) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .state-icon.ok path { stroke-dashoffset: 0; } }

/* ========== Mobile ========== */
@media (max-width: 520px) {
  .wrap { padding: 0 14px 140px; }
  .hero { padding-top: calc(44px + env(safe-area-inset-top)); }
  .card { padding: 20px 16px; border-radius: 20px; }
  .section { margin-top: 40px; }
  .section-head h2 { font-size: 23px; }
  .rating { gap: 6px; }
  .rating button { padding: 10px 0 8px; border-radius: 14px; }
  .rating i { font-size: 23px; }
  .scale { font-size: 11px; }
  .dock { padding-inline: 12px; }
}
