/* 寻道 Web 0.1.0 public styles */
:root {
  --bg: #f4f5f0;
  --surface: #ffffff;
  --surface-soft: #f8f9f5;
  --ink: #17211d;
  --muted: #69736e;
  --line: #dfe4dd;
  --brand: #0f6b50;
  --brand-dark: #094936;
  --brand-soft: #e4f2eb;
  --gold: #a96e21;
  --danger: #a63d3d;
  --shadow: 0 18px 60px rgba(31, 48, 39, .09);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(123, 171, 143, .16), transparent 32rem),
    var(--bg);
  font: 16px/1.65 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  min-height: 78px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  gap: 34px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(249, 250, 246, .9);
  border-bottom: 1px solid rgba(205, 215, 207, .75);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 14px; color: #fff; background: var(--brand);
  font-family: Georgia, serif; font-size: 21px; box-shadow: 0 8px 22px rgba(15, 107, 80, .2);
}
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand strong { font-size: 20px; letter-spacing: .1em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.topbar nav { display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 9px 15px; color: #59645e; border-radius: 12px; font-weight: 650; }
.nav-link:hover, .nav-link.active { color: var(--brand-dark); background: var(--brand-soft); }
.user-cluster { display: flex; align-items: center; gap: 14px; }
.wallet-pill { min-width: 76px; padding: 6px 13px; display: flex; align-items: baseline; gap: 5px; border: 1px solid #cfdcd3; border-radius: 13px; background: white; }
.wallet-pill b { color: var(--brand); font-size: 18px; }
.wallet-pill span { color: var(--muted); font-size: 11px; }
.user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }

.page-shell { width: min(1180px, calc(100% - 40px)); min-height: calc(100vh - 150px); margin: 0 auto; padding: 44px 0 70px; }
.footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 35px; display: flex; justify-content: space-between; gap: 20px; color: #87908b; border-top: 1px solid var(--line); font-size: 13px; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font: 650 clamp(34px, 4.3vw, 58px)/1.18 Georgia, "Microsoft YaHei", serif; letter-spacing: -.04em; }
h2 { margin-bottom: 12px; font-size: 27px; line-height: 1.3; }
h3 { margin-bottom: 8px; font-size: 19px; }
p { color: #59645e; }
.eyebrow { display: block; margin-bottom: 10px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); }

.button {
  min-height: 44px; padding: 10px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink); background: white; border: 1px solid #cfd7d1; border-radius: 13px; cursor: pointer; font-weight: 750;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); border-color: #9eb3a5; }
.button:disabled { opacity: .62; cursor: wait; transform: none; }
.button-primary { color: white; background: var(--brand); border-color: var(--brand); }
.button-primary:hover { background: var(--brand-dark); }
.button-dark { color: white; background: #202b26; border-color: #202b26; }
.button-danger { color: var(--danger); border-color: #e0baba; }
.button-small { min-height: 38px; padding: 7px 15px; }
.button-loading { display: none; }
.loading .button-ready { display: none; }
.loading .button-loading { display: inline; }

.flash { margin-bottom: 20px; padding: 13px 17px; border: 1px solid; border-radius: 14px; }
.flash-success { color: #155a43; background: #e4f4eb; border-color: #bedecb; }
.flash-error { color: #8b2929; background: #fff0f0; border-color: #ebc2c2; }
.flash-info { color: #385663; background: #edf5f7; border-color: #cadde2; }

.auth-grid { min-height: 660px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 8vw; }
.auth-story { padding: 40px 0; }
.auth-story p { max-width: 630px; font-size: 19px; }
.promise-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.promise-list span { padding: 8px 12px; background: rgba(255,255,255,.64); border: 1px solid var(--line); border-radius: 999px; color: #506057; font-size: 13px; }
.auth-card { padding: clamp(28px, 4vw, 46px); background: var(--surface); border: 1px solid rgba(206, 216, 208, .88); border-radius: 28px; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 32px; }
.form-stack { display: grid; gap: 17px; margin-top: 28px; }
.form-stack label:not(.checkbox), .note-form { display: grid; gap: 7px; color: #344039; font-weight: 700; }
input, textarea, select { width: 100%; padding: 12px 14px; color: var(--ink); background: #fbfcfa; border: 1px solid #cdd6cf; border-radius: 12px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 107, 80, .1); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; }
.checkbox input { width: 17px; margin-top: 4px; }
.form-foot { margin: 22px 0 0; text-align: center; }
.form-foot a { color: var(--brand); font-weight: 750; }

.hero { padding: 46px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; color: white; background: linear-gradient(125deg, #0e6048, #14372d); border-radius: 28px; box-shadow: var(--shadow); }
.hero h1 { margin-bottom: 10px; font-size: clamp(34px, 5vw, 54px); }
.hero p { max-width: 660px; margin-bottom: 0; color: #d8e9e1; }
.hero .eyebrow { color: #9ed8bf; }
.hero-stats { min-width: 280px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-stats div { padding: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 17px; }
.hero-stats strong, .hero-stats span { display: block; }
.hero-stats strong { font-size: 30px; }
.hero-stats span { color: #bcd4c9; font-size: 12px; }
.section-head, .page-title, .detail-head, .feed-top, .card-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-head { margin: 48px 0 20px; }
.section-head h2, .page-title h1 { margin-bottom: 0; }
.page-title { margin-bottom: 30px; }
.page-title p { max-width: 700px; margin-bottom: 0; }

.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.module-card { min-height: 165px; padding: 28px; display: grid; grid-template-columns: 58px 1fr; gap: 20px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.module-card:hover:not(.module-disabled) { border-color: #aac5b4; box-shadow: 0 10px 34px rgba(24, 61, 44, .07); }
.module-disabled { opacity: .58; cursor: default; }
.module-icon, .foundation-icon { width: 58px; height: 58px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 18px; font-family: Georgia, serif; font-size: 23px; }
.module-title-row { display: flex; align-items: center; gap: 10px; }
.module-title-row h3 { margin: 0; }
.module-card p { margin: 9px 0 0; }

.foundation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.foundation-card { min-height: 260px; padding: 34px; display: grid; grid-template-columns: 68px 1fr; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 25px; transition: transform .18s ease, box-shadow .18s ease; }
.foundation-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.foundation-card h2 { margin: 8px 0 10px; font-size: 33px; }
.foundation-card p { min-height: 52px; }
.foundation-card .count { color: var(--muted); font-size: 13px; font-weight: 700; }
.enter-link { color: var(--brand); font-weight: 800; }
.accent-blue .foundation-icon, .swipe-visual.accent-blue { color: #1a597f; background: #e2f1fa; }
.accent-amber .foundation-icon, .swipe-visual.accent-amber { color: #8b5a16; background: #f9eed8; }
.accent-violet .foundation-icon, .swipe-visual.accent-violet { color: #60438b; background: #eee7fa; }
.accent-coral .foundation-icon, .swipe-visual.accent-coral { color: #904b41; background: #fae9e5; }
.truth-note { margin-top: 24px; padding: 18px 22px; display: flex; gap: 16px; color: #516059; background: #eef1ec; border-radius: 15px; }
.truth-note strong { flex: 0 0 auto; color: var(--ink); }

.feed-top { align-items: center; margin-bottom: 24px; }
.feed-top h1 { margin: 0; font-size: 30px; }
.back-link { color: var(--brand); font-weight: 750; }
.feed-counter { color: var(--muted); font-size: 13px; }
.swipe-card { min-height: 610px; display: grid; grid-template-columns: .82fr 1.18fr; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
.swipe-visual { min-height: 610px; padding: 42px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.swipe-visual.has-cover { padding: 0; background: #f6f7f4; }
.swipe-cover { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: #f6f7f4; }
.swipe-cover-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.swipe-visual.cover-failed .swipe-cover { display: none; }
.swipe-visual.cover-failed .swipe-cover-fallback { display: flex; }
.swipe-visual.has-cover .visual-label { position: absolute; left: 28px; bottom: 28px; z-index: 2; backdrop-filter: blur(8px); background: rgba(255,255,255,.88); }
.external-image-label { position: absolute; top: 24px; left: 24px; z-index: 2; padding: 7px 10px; color: #405047; background: rgba(255,255,255,.9); border: 1px solid rgba(23,49,38,.1); border-radius: 999px; font-size: 11px; font-weight: 800; }
.visual-mark { align-self: center; margin: auto; font: 700 clamp(90px, 12vw, 160px)/1 Georgia, serif; opacity: .78; }
.visual-label { align-self: flex-start; padding: 8px 12px; background: rgba(255,255,255,.55); border-radius: 999px; font-size: 13px; font-weight: 800; }
.swipe-body { padding: clamp(34px, 5vw, 62px); display: flex; flex-direction: column; justify-content: center; }
.badge-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.badge { padding: 5px 9px; display: inline-flex; align-items: center; border-radius: 999px; color: #59635d; background: #edf0ec; font-size: 11px; font-weight: 800; }
.badge-brand { color: #0f6048; background: #e0f2e9; }
.badge-good { color: #176047; background: #e4f3ea; }
.badge-warn { color: #805418; background: #f8edd8; }
.swipe-body h2 { margin-bottom: 5px; font-size: clamp(31px, 4vw, 48px); }
.original-title { margin-bottom: 24px; color: #89918d; font: italic 16px/1.5 Georgia, serif; }
.original-title.large { font-size: 20px; }
.lead { font-size: 18px; }
.evidence-grid { margin: 24px 0 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.evidence-grid div { padding: 14px; background: var(--surface-soft); border-radius: 13px; }
.evidence-grid span, .evidence-grid strong { display: block; }
.evidence-grid span { color: var(--muted); font-size: 11px; }
.evidence-grid strong { margin-top: 3px; font-size: 14px; }
.swipe-actions { display: flex; gap: 12px; }
.swipe-actions .button { flex: 1; }
.swipe-hint { margin: 14px 0 0; color: #929a96; font-size: 12px; }
.feed-wait { min-height: 520px; padding: 46px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.feed-wait > p { max-width: 720px; }
.wait-badges { margin: 10px 0 22px; justify-content: center; }

.detail-head { align-items: flex-start; margin-bottom: 30px; }
.detail-head h1 { margin: 10px 0 4px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.detail-main { display: grid; gap: 20px; }
.content-card, .side-card, .profile-card { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.detail-summary { color: var(--ink); font-size: 19px; }
.facts { margin: 28px 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { padding-right: 20px; }
.facts div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.source-link { color: var(--brand); font-weight: 800; }
.resource-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gallery-item { margin: 0; overflow: hidden; background: #f5f6f3; border: 1px solid var(--line); border-radius: 16px; }
.gallery-item img { width: 100%; height: 300px; display: block; object-fit: contain; background: #f7f8f5; }
.gallery-item figcaption { padding: 10px 13px; color: var(--muted); font-size: 12px; }
.compact-note { margin: 14px 0 0; font-size: 12px; }
.profile-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.profile-columns > section { min-width: 0; padding: 20px; background: #f7f8f5; border: 1px solid var(--line); border-radius: 18px; }
.profile-columns h3 { margin-top: 0; }
.profile-columns h3 small { color: var(--muted); font-size: 11px; font-weight: 700; }
.profile-block { display: grid; gap: 18px; }
.profile-block section h4 { margin: 0 0 9px; font-size: 14px; }
.profile-list { margin: 0; padding-left: 20px; display: grid; gap: 7px; color: #4f5d56; font-size: 14px; }
.profile-list li::marker { color: var(--brand); }
.profile-ai { background: #f2eef9; }
.evidence-boundary { padding: 13px 14px; display: grid; gap: 4px; background: #fff8e8; border-radius: 12px; color: #705627; font-size: 12px; }
.detail-side { display: grid; gap: 18px; position: sticky; top: 102px; }
.side-card p { margin-bottom: 0; }
.boundary-list { padding: 0; margin: 20px 0 0; list-style: none; display: grid; gap: 10px; }
.boundary-list li::before { width: 21px; display: inline-block; font-weight: 900; }
.boundary-list .yes::before { content: "✓"; color: var(--brand); }
.boundary-list .no::before { content: "—"; color: #9a6a2a; }
.action-row { display: flex; gap: 8px; }
.interpretation-tabs { margin-top: 24px; display: grid; gap: 14px; }
.interpretation-tabs > section { padding: 20px; background: var(--surface-soft); border-radius: 15px; }
.interpretation-tabs h3 small { margin-left: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
.interpretation-content { color: #435048; }
.historical-analysis { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.historical-analysis summary { cursor: pointer; font-weight: 700; }
.historical-analysis[open] summary { margin-bottom: 12px; }
.empty-inline { color: #89918d; }
.note-form textarea { min-height: 170px; resize: vertical; }
.note-form .button { justify-self: end; }
.simple-detail { width: 100%; }
.compact-facts .facts { margin-bottom: 0; }
.source-reader { padding: clamp(24px, 4vw, 48px); }
.reader-toolbar { margin-bottom: 28px; padding-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.reader-toolbar h2 { margin: 5px 0 6px; font-size: clamp(28px, 4vw, 40px); }
.reader-toolbar p { margin: 0; color: var(--muted); }
.reader-toolbar .action-row { flex-wrap: wrap; justify-content: flex-end; }
.source-reader-body { width: min(100%, 900px); margin: 0 auto; color: #26332d; font-size: 17px; line-height: 1.82; overflow-wrap: anywhere; }
.source-reader-body h1, .source-reader-body h2, .source-reader-body h3, .source-reader-body h4, .source-reader-body h5, .source-reader-body h6 { margin: 1.6em 0 .65em; color: var(--ink); line-height: 1.3; }
.source-reader-body h1 { font-size: 34px; }
.source-reader-body h2 { padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 28px; }
.source-reader-body h3 { font-size: 23px; }
.source-reader-body p { margin: 0 0 1.25em; }
.source-reader-body ul, .source-reader-body ol { margin: 0 0 1.35em; padding-left: 1.6em; }
.source-reader-body li { margin: .35em 0; }
.source-reader-body blockquote { margin: 1.4em 0; padding: 14px 20px; color: #4c5b53; background: var(--surface-soft); border-left: 4px solid var(--brand); border-radius: 0 12px 12px 0; }
.source-reader-body pre { margin: 1.4em 0; padding: 18px; overflow-x: auto; color: #e9f1ec; background: #17231d; border-radius: 14px; font: 14px/1.65 Consolas, "Cascadia Code", monospace; white-space: pre; }
.source-reader-body table { margin: 1.4em 0; display: block; overflow-x: auto; font-size: 14px; }
.source-reader-body hr { margin: 32px 0; border: 0; border-top: 1px solid var(--line); }
.reader-image { margin: 26px auto; overflow: hidden; background: #f6f7f4; border: 1px solid var(--line); border-radius: 18px; }
.reader-image img { width: 100%; max-height: 720px; display: block; object-fit: contain; background: #f6f7f4; }
.reader-image figcaption { padding: 10px 14px; color: var(--muted); font-size: 12px; }
.reader-links { margin: -12px 0 22px; display: flex; flex-wrap: wrap; gap: 7px; }
.reader-links a { padding: 5px 9px; color: var(--brand); background: var(--brand-soft); border-radius: 9px; font-size: 12px; font-weight: 750; }
.reader-pending { width: min(100%, 900px); margin: 0 auto 24px; padding: 20px 22px; color: #705627; background: #fff8e8; border: 1px solid #f0dfb8; border-radius: 15px; }
.reader-pending p { margin: 6px 0 0; }
.reader-source-note { margin: 32px 0 0; padding-top: 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.analysis-card .card-title-row { align-items: flex-start; }
.analysis-card .card-title-row p { max-width: 640px; margin-bottom: 0; }

.wallet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.wallet-card { min-height: 210px; padding: 32px; color: white; border-radius: 24px; }
.wallet-card.dao { background: linear-gradient(135deg, #0f684e, #174135); }
.wallet-card.points { background: linear-gradient(135deg, #aa7021, #684513); }
.wallet-card span, .wallet-card strong { display: block; }
.wallet-card span { color: rgba(255,255,255,.7); font-weight: 700; }
.wallet-card strong { margin: 6px 0; font-size: 62px; line-height: 1.15; }
.wallet-card p { margin: 0; color: rgba(255,255,255,.72); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; }
.positive { color: var(--brand); font-weight: 800; }
.empty-cell { padding: 35px; color: var(--muted); text-align: center; }
.profile-card { margin-bottom: 20px; display: flex; align-items: center; gap: 20px; }
.avatar { width: 66px; height: 66px; display: grid; place-items: center; color: white; background: var(--brand); border-radius: 20px; font-size: 28px; font-weight: 800; }
.profile-card h2, .profile-card p { margin-bottom: 2px; }
.profile-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compact-form { margin-top: 20px; }
.settings-list { margin: 24px 0; border-top: 1px solid var(--line); }
.settings-list div { padding: 15px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }

.admin-tabs { margin: -16px 0 34px; padding: 7px; display: flex; gap: 5px; overflow-x: auto; background: #e9ede8; border-radius: 15px; }
.admin-tabs a { flex: 0 0 auto; padding: 9px 14px; color: #5e6963; border-radius: 10px; font-size: 13px; font-weight: 750; }
.admin-tabs a.active { color: var(--brand-dark); background: white; box-shadow: 0 3px 12px rgba(27, 53, 40, .07); }
.admin-title { margin-bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.admin-title h1 { margin-bottom: 6px; font-size: 44px; }
.admin-title p { margin-bottom: 0; }
.admin-stat-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.admin-stat-grid > div { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 17px; }
.admin-stat-grid span, .admin-stat-grid strong { display: block; }
.admin-stat-grid span { color: var(--muted); font-size: 12px; }
.admin-stat-grid strong { margin-top: 5px; font-size: 29px; }
.admin-filter { margin-bottom: 16px; display: grid; grid-template-columns: 1fr 220px auto; gap: 10px; }
.admin-table-card { padding: 10px 20px 20px; }
.table-subtitle { margin-top: 2px; display: block; color: var(--muted); font-weight: 400; }
.table-actions { display: flex; align-items: center; gap: 7px; }
.table-actions form { margin: 0; }
.admin-form { display: grid; gap: 22px; }
.admin-form label { display: grid; gap: 7px; color: #344039; font-weight: 700; }
.admin-form textarea { min-height: 125px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-actions { display: flex; justify-content: flex-end; }
.admin-system-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-system-grid > :first-child { grid-row: span 2; }
.settings-list small { max-width: 340px; margin-top: 3px; display: block; color: var(--muted); font-weight: 400; }
.collection-settings-form { gap: 28px; }
.collection-control-list { display: grid; gap: 0; }
.collection-control-list label.checkbox { display: flex; align-items: flex-start; gap: 10px; padding: 14px 0; }
.collection-control-list label.checkbox > span { display: grid; gap: 3px; }
.collection-rule-list { display: grid; gap: 14px; }
.collection-rule-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcfa; }
.collection-rule-card .card-title-row { margin-bottom: 15px; }
.collection-rule-card textarea { min-height: 58px; }
.collection-rule-card small { color: var(--muted); font-weight: 400; }

.empty-state { min-height: 540px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-mark { width: 72px; height: 72px; margin-bottom: 18px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 24px; font-size: 24px; font-weight: 800; }
.empty-state h1 { font-size: 38px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 40; max-width: min(520px, calc(100% - 30px)); padding: 12px 18px; color: white; background: #18231e; border-radius: 13px; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 18px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8e3030; }

@media (max-width: 900px) {
  .topbar { min-height: 0; padding: 12px 20px; flex-wrap: wrap; gap: 10px; }
  .topbar nav { width: 100%; order: 3; padding: 6px; justify-content: flex-start; overflow-x: auto; background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 14px; scrollbar-width: none; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar .nav-link { flex: 0 0 auto; white-space: nowrap; }
  .public-topbar { min-height: 68px; flex-wrap: nowrap; }
  .public-topbar nav { width: auto; order: initial; padding: 0; overflow: visible; background: none; border: 0; }
  .user-name { display: none; }
  .page-shell { padding-top: 28px; padding-bottom: 100px; }
  .footer { margin-bottom: 0; }
  .auth-grid, .swipe-card, .detail-layout { grid-template-columns: 1fr; }
  .auth-grid { gap: 10px; }
  .auth-story { padding: 20px 0; }
  .hero { align-items: stretch; flex-direction: column; padding: 30px; }
  .hero-stats { min-width: 0; }
  .detail-side { position: static; }
  .reader-toolbar { flex-direction: column; }
  .reader-toolbar .action-row { justify-content: flex-start; }
  .swipe-visual { min-height: 300px; }
  .profile-columns { grid-template-columns: 1fr; }
  .foundation-grid, .module-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .admin-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-system-grid { grid-template-columns: 1fr; }
  .admin-system-grid > :first-child { grid-row: auto; }
}

@media (max-width: 620px) {
  .page-shell, .footer { width: min(100% - 24px, 1180px); }
  .topbar { padding: 10px 12px; }
  .public-topbar { min-height: 64px; }
  .brand small { display: none; }
  .wallet-pill { min-width: auto; padding: 6px 10px; }
  .wallet-pill span { display: none; }
  h1 { font-size: 34px; }
  .page-title, .detail-head, .feed-top, .section-head, .card-title-row { align-items: stretch; flex-direction: column; }
  .foundation-card { min-height: 0; padding: 24px; grid-template-columns: 50px 1fr; }
  .foundation-icon { width: 50px; height: 50px; }
  .foundation-card h2 { font-size: 27px; }
  .foundation-card p { min-height: 0; }
  .truth-note { flex-direction: column; }
  .swipe-body { padding: 28px 22px; }
  .swipe-actions, .action-row { flex-direction: column; }
  .evidence-grid, .wallet-grid, .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd), .facts div:nth-child(even) { padding: 14px 0; border-left: 0; }
  .detail-main .content-card, .side-card { padding: 22px; }
  .source-reader-body { font-size: 16px; }
  .reader-image img { max-height: 520px; }
  .resource-gallery { grid-template-columns: 1fr; }
  .gallery-item img { height: 240px; }
  .footer { flex-direction: column; }
  .admin-title { align-items: stretch; flex-direction: column; }
  .admin-stat-grid, .form-grid { grid-template-columns: 1fr 1fr; }
  .admin-filter { grid-template-columns: 1fr; }
}
/* Rudao is a private mobile inbox, distinct from the discovery feed. */
.rudao-compose,.rudao-library,.rudao-detail{max-width:900px;margin:2rem auto;min-width:0}
.rudao-compose{max-width:760px}.rudao-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.5rem}.rudao-heading h1{margin:0;font-size:2rem}.rudao-heading a{white-space:nowrap}
#rudao-form{background:#fff;border:1px solid #dbe4df;border-radius:20px;padding:1.5rem}#rudao-form label{display:block;font-size:1.15rem;margin-bottom:1rem;font-weight:600}
#rudao-input{display:block;box-sizing:border-box;width:100%;min-height:290px;resize:vertical;font:inherit;font-size:1rem;line-height:1.8;border:1px solid #cddad4;border-radius:12px;padding:1rem;background:#fbfcfb}
.rudao-compose-foot{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-top:1rem}.rudao-compose-foot span{font-size:.875rem;color:#5e6a64}.rudao-compose-foot button{min-width:112px;min-height:48px}
.rudao-item-card,.rudao-candidate{display:flex;justify-content:space-between;gap:1rem;background:#fff;border:1px solid #dbe4df;border-radius:16px;padding:1.25rem;margin-bottom:1rem;overflow-wrap:anywhere;color:inherit;text-decoration:none}.rudao-item-card>div{min-width:0}.rudao-item-card h2{font-size:1.2rem;margin:0 0 .5rem}.rudao-item-card p{margin:.5rem 0}.rudao-item-card>.badge{align-self:flex-start;white-space:nowrap}
.rudao-actions,.rudao-pagination{display:flex;gap:.75rem;flex-wrap:wrap;margin:1rem 0}.rudao-receipt{padding:1rem;border-radius:12px;background:#e7f3ec}.rudao-original{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}.rudao-detail>h1{overflow-wrap:anywhere;font-size:2rem}.rudao-detail>.content-card{margin:1.5rem 0}.rudao-detail details summary{cursor:pointer;font-weight:600;min-height:32px}.rudao-detail .reader-image img{max-width:100%}
@media(max-width:600px){.rudao-compose,.rudao-library,.rudao-detail{margin:1rem auto}.rudao-heading{align-items:flex-start}.rudao-heading h1{font-size:1.65rem}#rudao-form{padding:1rem}#rudao-input{min-height:260px}.rudao-item-card{flex-direction:column}.rudao-compose-foot{gap:.5rem}.rudao-candidate{flex-direction:column}.rudao-heading a{white-space:normal}.topbar nav{overflow-x:auto;max-width:100%}}
/* Progressive reading preserves the original document and only patches changed blocks. */
.reader-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.reader-toolbar h2 { margin:0; }
.reader-toolbar button[aria-pressed="true"] { background:#e1f1e9; border-color:#16745b; }
.reading-part { min-width:0; overflow-wrap:anywhere; }
.reading-part-status { color:#717c77; font-size:13px; display:flex; gap:12px; align-items:center; margin-top:12px; }
.reading-part .source-reader-body { padding:0; }
.progressive-reader [hidden] { display:none !important; }
.rudao-simple{max-width:860px;background:#fff;border-radius:18px;padding:clamp(20px,4vw,48px)}
.rudao-back{color:var(--muted);font-size:14px}.rudao-simple>h1{margin:24px 0 16px;line-height:1.4;font-size:clamp(26px,4vw,34px)}
.reading-caption{font-size:13px;color:var(--muted);line-height:1.7;margin-bottom:28px}
#reading-worker-status:empty{display:none}.reader-language{margin-top:24px}
.reader-text-action{font:inherit;font-size:14px;background:none;border:0;padding:4px 0;color:var(--brand);cursor:pointer;text-decoration:underline;text-underline-offset:4px}
.rudao-download{margin-top:32px;padding-top:24px;border-top:1px solid var(--line);display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.rudao-download .button{background:var(--brand);color:#fff;padding:12px 30px}.rudao-download small{font-size:12px;color:var(--muted)}
/* 道生候选库：信息先行，保持与入道资料页相互独立。 */
.daosheng-title h1{font-size:24px;line-height:1.5;margin:0 0 20px;font-family:inherit}.daosheng-reader{max-width:920px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:14px;padding:28px;overflow-wrap:anywhere}.daosheng-reader h1{font-family:inherit;font-size:24px;line-height:1.5;margin:18px 0 24px;letter-spacing:0}.daosheng-reader .source-reader-body{font-size:16px;line-height:1.85}.daosheng-reader .source-reader-body h2{font-size:21px}.daosheng-reader .source-reader-body h3{font-size:19px}.daosheng-reader .source-reader-body h4,.daosheng-reader .source-reader-body h5{font-size:17px}.daosheng-reader img{max-width:100%;height:auto}.daosheng-download{display:flex;gap:20px;align-items:center;margin-top:30px;padding-top:22px;border-top:1px solid var(--line)}@media(max-width:760px){.daosheng-reader{padding:18px}.daosheng-reader h1{font-size:22px}}
.daosheng-search{display:flex;gap:10px;margin:0 auto 22px;max-width:1180px}.daosheng-search input{flex:1;min-width:0;border:1px solid var(--line);border-radius:12px;padding:13px 16px;font:inherit;background:#fff}.daosheng-search .button{white-space:nowrap}.daosheng-card-link{color:inherit;text-decoration:none}.daosheng-actions{display:flex;gap:10px;margin:12px 0 0}.daosheng-download{flex-wrap:wrap}.daosheng-download .daosheng-actions{margin:0}.daosheng-views{display:flex;gap:22px;margin-bottom:22px}.daosheng-views a{color:var(--muted);text-decoration:none}.daosheng-views a[aria-current]{color:var(--brand);font-weight:600}
.daosheng-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.daosheng-card{display:block;min-width:0;color:inherit;text-decoration:none;background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px;transition:border-color .15s,transform .15s}.daosheng-card:hover{border-color:var(--brand);transform:translateY(-1px)}.daosheng-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.daosheng-card h2{font-size:20px;line-height:1.4;margin:0;overflow-wrap:anywhere}.daosheng-card p{margin:12px 0;line-height:1.7;color:var(--muted);overflow-wrap:anywhere}.daosheng-card small{display:block;color:var(--muted);line-height:1.6}.daosheng-pagination{display:flex;justify-content:center;gap:10px;margin:24px 0}.daosheng-detail-head{align-items:flex-end}.daosheng-detail-head h1{overflow-wrap:anywhere}.daosheng-detail-card{max-width:980px;margin:0 auto}.daosheng-evidence-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:22px}.daosheng-evidence-grid h3{font-size:16px;margin:0 0 10px}.daosheng-detail-card .facts{margin-top:22px}
@media(max-width:760px){.daosheng-grid,.daosheng-evidence-grid{grid-template-columns:1fr}.daosheng-search{flex-direction:column}.daosheng-count{align-items:flex-start}.daosheng-detail-head{align-items:stretch}}
/* 道生列表 V1：单列固定尺寸，信息与操作保持同一行。 */
.daosheng-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;max-width:820px;margin:0 auto 18px}.daosheng-title h1{font-size:32px;line-height:1.2;margin:0 0 4px;font-family:inherit;letter-spacing:-.02em}.daosheng-title p{margin:0;color:var(--muted)}.daosheng-density{display:flex;align-items:center;gap:8px;margin-bottom:2px;color:var(--muted);font-size:13px;white-space:nowrap}.daosheng-density .button.is-active{color:var(--brand);background:var(--brand-soft);border-color:#a9d2bd}.daosheng-search{max-width:820px}.daosheng-list{display:flex;flex-direction:column;gap:12px;max-width:820px;margin:0 auto}.daosheng-list .daosheng-card{height:140px;min-height:140px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:1fr auto;align-items:center;padding:20px 22px;border-radius:14px}.daosheng-list .daosheng-card-compact{height:108px;min-height:108px;padding-top:14px;padding-bottom:14px}.daosheng-card-main{grid-column:1;grid-row:1 / span 2;min-width:0;padding-right:18px}.daosheng-card-link{display:block;min-width:0}.daosheng-list .daosheng-card h2{margin:0 0 5px;font-size:18px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daosheng-list .daosheng-card p{margin:0 0 10px;line-height:1.55;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.daosheng-list .daosheng-card small{display:block;color:var(--muted);line-height:1.4;font-size:12px}.daosheng-card-actions{grid-column:2;grid-row:1 / span 2;align-self:end;display:flex;align-items:center;gap:8px;white-space:nowrap}.daosheng-card-actions .daosheng-actions{display:flex;gap:8px;margin:0}.daosheng-card-actions .button{min-height:36px;padding:7px 14px}.daosheng-card-actions .button-danger{color:var(--danger);border-color:#e0baba}.daosheng-pagination{max-width:820px;margin:20px auto;justify-content:center}
@media(max-width:760px){.daosheng-title{align-items:flex-start;flex-direction:column;gap:10px}.daosheng-density{margin-bottom:0}.daosheng-list .daosheng-card,.daosheng-list .daosheng-card-compact{height:auto;min-height:140px;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:12px;padding:16px}.daosheng-card-main{grid-column:1;grid-row:1;padding-right:0}.daosheng-card-actions{grid-column:1;grid-row:2;justify-content:flex-end}.daosheng-list .daosheng-card p{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.daosheng-search{flex-direction:column}}
.daosheng-views{max-width:820px;margin-left:auto;margin-right:auto}
.page-shell-daosheng{width:min(1340px,calc(100% - 40px))}.page-shell-daosheng .daosheng-title,.page-shell-daosheng .daosheng-views,.page-shell-daosheng .daosheng-search,.page-shell-daosheng .daosheng-list,.page-shell-daosheng .daosheng-pagination{max-width:1340px}
