:root {
  --orange: #c65b2e;
  --orange-deep: #8d351b;
  --orange-soft: #f6dfcf;
  --ink: #27241f;
  --muted: #6f6a60;
  --paper: #f6f0e5;
  --card: #fffaf2;
  --river: #4b7f84;
  --river-soft: #d8e8e5;
  --green: #63775b;
  --line: rgba(39, 36, 31, .13);
  --shadow: 0 12px 30px rgba(79, 52, 32, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { background: #e9e0d1; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(198,91,46,.11), transparent 30rem),
    linear-gradient(180deg, #f8f2e8 0%, #eee5d7 100%);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }

#app {
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 50px rgba(61,45,29,.14);
  position: relative;
  overflow-x: hidden;
}

.page { min-height: 100dvh; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.page.no-nav { padding-bottom: 28px; }
.pad { padding: 20px; }
.topbar {
  height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(246,240,229,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(39,36,31,.06);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .03em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--orange); color: #fff; border-radius: 50% 50% 48% 42%; transform: rotate(-7deg); }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.75); display:grid; place-items:center; cursor:pointer; }

.hero { padding: 28px 20px 24px; position: relative; overflow: hidden; }
.hero::after { content:""; position:absolute; width:200px; height:200px; border:1px solid rgba(198,91,46,.2); border-radius:50%; right:-88px; top:-55px; box-shadow: 0 0 0 22px rgba(198,91,46,.04), 0 0 0 50px rgba(198,91,46,.03); }
.eyebrow { color: var(--orange-deep); text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 800; }
h1 { margin: 10px 0 10px; font-family: STKaiti, KaiTi, serif; font-size: clamp(36px, 10vw, 50px); line-height: 1.06; letter-spacing: .03em; }
h2 { margin: 0; font-size: 25px; line-height: 1.3; }
h3 { margin: 0; font-size: 18px; }
p { line-height: 1.7; }
.lead { margin:0; max-width: 390px; color: var(--muted); font-size: 15px; }
.stamp { display:inline-flex; align-items:center; gap:7px; margin-top:18px; padding:8px 12px; border:1px solid rgba(141,53,27,.25); border-radius:999px; color:var(--orange-deep); font-size:12px; font-weight:700; background:rgba(255,250,242,.6); }

.route-line { margin: 2px 20px 22px; padding: 18px 16px; border-radius: var(--radius); color:#fff; background: linear-gradient(135deg, #3f777d, #5d908d); position:relative; overflow:hidden; }
.route-line::after { content:""; position:absolute; width:160px; height:70px; border:2px solid rgba(255,255,255,.2); border-radius:50%; right:-22px; bottom:-42px; }
.route-top { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.route-title { font-size:13px; opacity:.78; }
.route-progress { font-weight:800; }
.dots { display:flex; align-items:center; margin-top:15px; }
.dot { width:12px; height:12px; border-radius:50%; background:#fff; border:3px solid rgba(255,255,255,.35); background-clip:padding-box; }
.dot.done { background:#f5be74; }
.rail { height:2px; flex:1; background:rgba(255,255,255,.35); }

.section { padding: 0 20px 24px; }
.section-head { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:14px; }
.section-kicker { display:block; color:var(--orange); font-size:12px; font-weight:800; letter-spacing:.1em; margin-bottom:5px; }
.text-link { border:0; background:none; color:var(--river); padding:8px 0; font-weight:700; cursor:pointer; }

.site-card { display:block; width:100%; border:0; padding:0; margin:0 0 14px; text-align:left; background:var(--card); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); cursor:pointer; position:relative; }
.site-image { width:100%; height:178px; object-fit:cover; display:block; filter:saturate(.82) contrast(.95); }
.site-overlay { position:absolute; left:0; right:0; top:0; height:178px; background:linear-gradient(180deg, transparent 35%, rgba(35,27,21,.76)); }
.site-num { position:absolute; top:14px; left:14px; color:#fff; background:rgba(39,36,31,.66); backdrop-filter:blur(8px); padding:6px 9px; border-radius:999px; font-size:12px; font-weight:800; }
.site-time { position:absolute; top:14px; right:14px; color:#fff; background:rgba(198,91,46,.9); padding:6px 9px; border-radius:999px; font-size:12px; font-weight:800; }
.site-copy { padding:16px; }
.site-copy p { color:var(--muted); margin:6px 0 0; font-size:14px; }
.site-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:14px; font-size:12px; }
.tag { display:inline-flex; align-items:center; min-height:28px; padding:5px 9px; border-radius:999px; background:var(--orange-soft); color:var(--orange-deep); font-weight:700; font-size:12px; }
.tag.blue { background:var(--river-soft); color:#315f63; }
.tag.green { background:#e0e6dc; color:#465940; }
.card-arrow { color:var(--orange); font-size:22px; }

.cta { width:100%; min-height:50px; border:0; border-radius:16px; background:var(--orange); color:#fff; font-weight:800; letter-spacing:.03em; box-shadow:0 9px 18px rgba(198,91,46,.22); cursor:pointer; padding:13px 18px; }
.cta.secondary { background:var(--ink); }
.cta.ghost { background:transparent; border:1px solid var(--line); box-shadow:none; color:var(--ink); }
.cta:disabled { opacity:.45; cursor:not-allowed; box-shadow:none; }

.bottom-nav { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:min(100%, 480px); height:calc(72px + env(safe-area-inset-bottom)); padding:8px 10px env(safe-area-inset-bottom); background:rgba(255,250,242,.94); backdrop-filter:blur(18px); border-top:1px solid var(--line); display:grid; grid-template-columns:repeat(4,1fr); z-index:20; }
.nav-item { border:0; background:none; min-height:56px; border-radius:14px; color:#8a847a; font-size:11px; font-weight:700; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; cursor:pointer; }
.nav-item .nav-icon { font-size:20px; line-height:1; }
.nav-item.active { color:var(--orange-deep); background:rgba(198,91,46,.08); }

.detail-hero { position:relative; height:310px; color:#fff; overflow:hidden; }
.detail-hero img { width:100%; height:100%; object-fit:cover; filter:saturate(.78) contrast(.95); }
.detail-hero::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(20,18,15,.15), rgba(20,18,15,.85)); }
.detail-back { position:absolute; z-index:3; top:calc(12px + env(safe-area-inset-top)); left:14px; color:#fff; background:rgba(25,22,19,.46); }
.detail-copy { position:absolute; z-index:2; left:20px; right:20px; bottom:22px; }
.detail-copy h1 { font-size:34px; margin:6px 0; }
.detail-sub { margin:0; opacity:.82; font-size:14px; }
.checkpoint { display:inline-flex; padding:6px 10px; border:1px solid rgba(255,255,255,.5); border-radius:999px; font-size:12px; font-weight:800; }

.fact-card, .task-card, .form-card, .response-card, .metric-card { background:var(--card); border:1px solid rgba(39,36,31,.07); border-radius:var(--radius); padding:18px; box-shadow:0 7px 20px rgba(69,49,31,.06); }
.fact-card { margin-bottom:14px; }
.fact-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; }
.fact-card p { margin:0; color:#4f4a42; font-size:15px; }
.evidence { font-size:11px; font-weight:800; color:#3d665b; background:#dbe9df; padding:5px 8px; border-radius:999px; white-space:nowrap; }
.evidence.warn { color:#81521b; background:#f4e0b9; }
.source-note { font-size:12px; color:var(--muted); padding:0 2px; }

.task-card { margin-top:8px; background:linear-gradient(155deg, #fff8ed, #f5e6d5); border-color:rgba(198,91,46,.16); }
.task-number { color:var(--orange); font-size:12px; font-weight:900; letter-spacing:.12em; }
.task-title { margin:7px 0 5px; font-size:22px; }
.task-help { color:var(--muted); margin:0 0 16px; font-size:14px; }
.choice-grid { display:grid; gap:10px; }
.choice-grid.two { grid-template-columns:repeat(2, 1fr); }
.choice { border:1px solid var(--line); background:rgba(255,255,255,.72); border-radius:15px; min-height:48px; padding:11px 12px; text-align:left; cursor:pointer; font-weight:700; }
.choice.selected { border-color:var(--orange); background:#fff1e6; color:var(--orange-deep); box-shadow:inset 0 0 0 1px var(--orange); }
.feedback { margin-top:14px; padding:13px; border-radius:14px; background:var(--river-soft); color:#31565b; font-size:14px; line-height:1.6; }

.stepper { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:18px 20px; }
.step { height:5px; border-radius:999px; background:#ddd2c2; }
.step.active { background:var(--orange); }
.step.complete { background:var(--green); }

.form-card { margin-bottom:14px; }
label { display:block; font-size:14px; font-weight:800; margin:0 0 8px; }
.field { margin-bottom:18px; }
textarea, input[type="text"], select { width:100%; border:1px solid var(--line); border-radius:14px; background:#fffdf8; min-height:48px; padding:12px 13px; color:var(--ink); outline:none; }
textarea { min-height:118px; resize:vertical; line-height:1.6; }
textarea:focus, input:focus, select:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(198,91,46,.12); }
.counter { text-align:right; color:var(--muted); font-size:11px; margin-top:5px; }
.segmented { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.toggle-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-top:1px solid var(--line); }
.toggle-row span { font-size:13px; color:var(--muted); line-height:1.5; }
.switch { width:48px; height:28px; border:0; border-radius:999px; background:#cfc6b9; padding:3px; cursor:pointer; flex:none; }
.switch::after { content:""; display:block; width:22px; height:22px; border-radius:50%; background:#fff; transition:.2s; }
.switch.on { background:var(--orange); }
.switch.on::after { transform:translateX(20px); }
.upload { display:block; border:1px dashed rgba(141,53,27,.35); border-radius:16px; text-align:center; padding:18px 12px; background:#fff8ef; color:var(--orange-deep); cursor:pointer; }
.upload input { display:none; }
.preview { width:100%; max-height:220px; object-fit:cover; border-radius:14px; margin-top:10px; }

.tabs { display:flex; gap:8px; overflow:auto; padding:0 20px 12px; scrollbar-width:none; }
.tab { white-space:nowrap; border:1px solid var(--line); background:rgba(255,255,255,.55); min-height:40px; padding:8px 13px; border-radius:999px; cursor:pointer; font-weight:700; font-size:13px; }
.tab.active { background:var(--ink); color:#fff; border-color:var(--ink); }
.record { padding:16px 0; border-bottom:1px solid var(--line); }
.record:last-child { border-bottom:0; }
.record-top { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.record p { margin:8px 0 0; }
.record-meta { font-size:11px; color:var(--muted); }
.status { font-size:11px; font-weight:800; padding:5px 8px; border-radius:999px; background:#f1dfba; color:#78521a; white-space:nowrap; }
.status.ok { background:#dce9df; color:#456348; }
.status.memory { background:#e3e2ed; color:#54506f; }
.empty { text-align:center; padding:44px 24px; color:var(--muted); }
.empty-icon { font-size:44px; opacity:.5; }

.success-wrap { min-height:100dvh; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:28px; background:linear-gradient(180deg,#f8eee2,#e5eee9); }
.success-mark { width:88px; height:88px; border-radius:50%; display:grid; place-items:center; background:var(--orange); color:#fff; font-size:40px; box-shadow:0 18px 40px rgba(198,91,46,.25); }
.ticket { width:100%; margin:24px 0; background:var(--card); border-radius:20px; padding:20px; box-shadow:var(--shadow); position:relative; }
.ticket::before, .ticket::after { content:""; position:absolute; width:24px; height:24px; border-radius:50%; background:#e9eee7; top:50%; transform:translateY(-50%); }
.ticket::before { left:-12px; }.ticket::after { right:-12px; }
.ticket-id { font-size:25px; font-weight:900; color:var(--orange-deep); letter-spacing:.08em; }

.notice { margin:0 20px 18px; padding:14px; background:#efe7d9; border-left:3px solid var(--orange); border-radius:0 13px 13px 0; color:#5e574d; font-size:13px; line-height:1.6; }
.response-card { background:linear-gradient(145deg,#3f7375,#567f77); color:#fff; margin-bottom:18px; }
.response-card p { opacity:.88; margin-bottom:0; }
.response-card .tag { background:rgba(255,255,255,.16); color:#fff; }

.metrics { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.metric-card strong { display:block; font-size:28px; color:var(--orange-deep); }
.metric-card span { color:var(--muted); font-size:12px; }
.research-note { padding:14px; background:var(--river-soft); border-radius:16px; font-size:13px; line-height:1.65; color:#365e61; }
.timeline { margin:4px 0 0; padding:0; list-style:none; }
.timeline li { padding:0 0 17px 24px; position:relative; color:#504b43; font-size:14px; line-height:1.55; }
.timeline li::before { content:""; position:absolute; left:3px; top:7px; width:9px; height:9px; border-radius:50%; background:var(--orange); }
.timeline li::after { content:""; position:absolute; left:7px; top:19px; bottom:2px; width:1px; background:#d9c8b8; }
.timeline li:last-child::after { display:none; }

.modal-backdrop { position:fixed; z-index:100; inset:0; background:rgba(31,25,20,.58); display:flex; align-items:flex-end; justify-content:center; }
.modal { width:min(100%,480px); max-height:90dvh; overflow:auto; background:var(--card); border-radius:26px 26px 0 0; padding:24px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow:0 -20px 50px rgba(20,15,10,.18); }
.modal h2 { font-family:STKaiti,KaiTi,serif; font-size:30px; }
.modal p { color:var(--muted); font-size:14px; }
.consent-list { display:grid; gap:10px; margin:18px 0 22px; }
.consent-item { display:flex; gap:10px; align-items:flex-start; font-size:13px; line-height:1.6; }
.consent-dot { width:22px; height:22px; border-radius:50%; display:grid; place-items:center; flex:none; background:var(--river-soft); color:var(--river); font-weight:900; }
.small { font-size:12px; color:var(--muted); }
.danger-link { color:#9b3e2d; border:0; background:none; padding:10px 0; cursor:pointer; }

@media (min-width: 481px) {
  body { padding:22px 0; }
  #app { min-height:calc(100dvh - 44px); border-radius:30px; }
  .page { min-height:calc(100dvh - 44px); }
  .bottom-nav { bottom:22px; border-radius:0 0 30px 30px; }
  .modal-backdrop { align-items:center; }
  .modal { border-radius:26px; max-height:82dvh; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior:auto !important; transition:none !important; } }
