/* 森空心理：暖白、森林绿与少量鼠尾草绿 */
:root {
  color-scheme: light;
  --forest-950: #17382e;
  --forest-900: #214b3b;
  --forest-800: #2c5b47;
  --forest-700: #3b6d56;
  --forest-100: #e7efe8;
  --forest-50: #f0f5ef;
  --sage-300: #b9c9b8;
  --sage-200: #d4dfd1;
  --sage-100: #e8ede3;
  --warm-white: #fbfaf6;
  --paper: #fffefa;
  --ink: #20372e;
  --muted: #63736a;
  --soft-muted: #6b7a71;
  --line: #dfe5dc;
  --line-strong: #ccd8ce;
  --gold: #a3793f;
  --gold-soft: #f3ecdf;
  --danger: #8d382f;
  --danger-dark: #6f2923;
  --danger-soft: #fff2ed;
  --danger-line: #e7bcb1;
  --shadow: 0 12px 36px rgba(32, 55, 46, .055);
  --shadow-lift: 0 16px 40px rgba(32, 55, 46, .09);
  --header-bg: rgba(251, 250, 246, .94);
  --header-shadow: 0 6px 24px rgba(32, 55, 46, .055);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --section-space: clamp(58px, 7vw, 88px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --focus-ring: 0 0 0 3px rgba(59, 109, 86, .18);
  --font-sans: "Noto Sans CJK SC", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --font-serif: var(--font-display);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-width: 320px;
  background: var(--warm-white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--forest-800); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--forest-950); }
p, h1, h2, h3, h4, ul, ol, dl, dd { margin-top: 0; }
h1, h2, h3, h4 { color: var(--forest-950); line-height: 1.35; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.1rem; }
p { text-wrap: pretty; }
.score-value, .metric-value, .stat-card strong, .dimension-value, .trust-row strong,
.result-count, .pagination, .data-table, .chart-legend strong, .campaign-item-progress { font-variant-numeric: tabular-nums; }
::selection { color: var(--forest-950); background: var(--sage-200); }
:focus-visible { outline: 2px solid var(--forest-700); outline-offset: 3px; }
input:focus-visible, select:focus-visible { outline-offset: 1px; }
.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 12px; padding: 10px 18px; background: var(--paper); border: 2px solid var(--forest-800); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.network-banner { padding: 9px 20px; background: var(--gold-soft); color: #684b25; border-bottom: 1px solid #e2d2b8; text-align: center; font-size: .9rem; }

/* 导航与页脚 */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--header-bg); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid rgba(204, 216, 206, .8); box-shadow: var(--header-shadow); transition: box-shadow .22s ease, background-color .22s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(32, 55, 46, .09); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; color: var(--forest-900); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-type { display: flex; flex-direction: column; line-height: 1.1; }
.brand-type strong { font-size: 1.16rem; letter-spacing: .12em; }
.brand-type small { margin-top: 6px; color: var(--muted); font-size: .56rem; letter-spacing: .19em; }
.nav-toggle { display: none; width: 44px; height: 44px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--forest-900); }
.nav-toggle:hover { border-color: var(--sage-300); background: var(--forest-50); }
.nav-toggle-icon { width: 24px; height: 24px; }
.nav-toggle-icon path { transform-box: fill-box; transform-origin: center; transition: transform .2s var(--ease-out), opacity .2s ease; }
.header-inner.is-nav-open .nav-toggle-icon path:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.header-inner.is-nav-open .nav-toggle-icon path:nth-child(2) { opacity: 0; }
.header-inner.is-nav-open .nav-toggle-icon path:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { position: relative; min-height: 44px; display: inline-flex; align-items: center; padding: 8px 17px; color: var(--muted); border-radius: 10px; text-decoration: none; font-size: .94rem; }
.main-nav a[aria-current="page"], .main-nav a:hover { color: var(--forest-900); background: var(--forest-50); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 16px; height: 2px; margin-left: -8px; border-radius: 2px; background: var(--forest-700); }
.site-footer { margin-top: 80px; padding: 42px 0; color: #cbd8cf; background: var(--forest-950); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr auto; gap: 40px; align-items: start; }
.footer-brand { min-height: 44px; display: inline-flex; align-items: center; color: #fffdf7; font-size: 1.12rem; font-weight: 700; letter-spacing: .12em; text-decoration: none; }
.site-footer p { margin: 8px 0 0; font-size: .88rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-footer nav a { min-height: 44px; display: inline-flex; align-items: center; color: #dbe4dc; font-size: .9rem; }
.footer-meta { text-align: right; line-height: 1.9; }
.simple-footer { margin-top: 48px; }
.simple-footer .footer-grid { grid-template-columns: 1fr auto; }

/* 通用组件 */
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 21px; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-weight: 650; font-size: .94rem; line-height: 1.35; transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.button svg { width: 19px; height: 19px; flex: 0 0 auto; }
.button-primary { color: #fff; background: var(--forest-900); border-color: var(--forest-900); box-shadow: 0 5px 15px rgba(33, 75, 59, .12); }
.button-primary:hover { color: #fff; background: var(--forest-950); border-color: var(--forest-950); }
.button-secondary { color: var(--forest-900); background: var(--paper); border-color: var(--line-strong); }
.button-secondary:hover { color: var(--forest-950); background: var(--forest-50); border-color: var(--sage-300); }
.button-quiet { color: var(--forest-800); background: transparent; border-color: transparent; }
.button-quiet:hover { background: var(--forest-50); }
.button-full { width: 100%; }
.text-link { min-height: 44px; display: inline-flex; align-items: center; font-weight: 650; }
.text-button { min-height: 44px; padding: 5px 0; border: 0; background: transparent; color: var(--forest-800); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--forest-700); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow-line { width: 30px; height: 1px; background: var(--forest-700); }
.section-heading { margin-bottom: 28px; }
.section-heading h2 { margin-bottom: 10px; }
.section-heading:not(.small-heading)::after { content: ""; display: block; width: 52px; height: 1px; margin-top: 18px; background: var(--sage-300); }
.section-heading.heading-with-aside:not(.small-heading)::after { display: none; }
.centered-heading:not(.small-heading)::after { margin-inline: auto; }
.section-heading > p:last-child { max-width: 700px; margin-bottom: 0; color: var(--muted); }
.heading-with-aside { display: flex; justify-content: space-between; align-items: end; gap: 50px; }
.heading-with-aside > p { max-width: 430px; padding-bottom: 5px; font-size: .93rem; }
.centered-heading { text-align: center; }
.centered-heading .eyebrow { justify-content: center; }
.centered-heading > p:last-child { margin-inline: auto; }
.small-heading { margin-bottom: 22px; }
.small-heading h2 { font-size: 1.45rem; }
.small-heading .eyebrow { margin-bottom: 8px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { min-height: 28px; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; color: var(--muted); background: var(--sage-100); border: 1px solid transparent; font-size: .75rem; font-weight: 650; line-height: 1.4; }
.tag-available { color: #275a40; background: #e7f2e8; border-color: #cee2d1; }
.tag-professional { color: #72552e; background: #f5eee2; border-color: #e5d8bf; }
.tag-review { color: #667169; background: #f0f1ed; border-color: #e0e3dc; }
.state-panel { margin: 40px 0; padding: 48px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); text-align: center; }
.state-panel h1, .state-panel h3 { margin-bottom: 10px; }
.state-panel p { max-width: 570px; margin: 0 auto 18px; color: var(--muted); }
.state-panel .button { margin: 4px; }
.compact-state { padding: 30px; }
.error-state { border-color: #e4c8bd; background: #fffaf6; }
.error-state h1, .error-state h3 { color: var(--danger-dark); }
.state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.loading-mark { width: 30px; height: 30px; display: block; margin: 0 auto 18px; border: 2px solid var(--sage-200); border-top-color: var(--forest-700); border-radius: 50%; animation: turn 1.2s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes fs-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-rail, .reflection-card, .trust-row > * {
    animation: fs-rise .7s var(--ease-out) both;
  }
  .hero-copy > :nth-child(2) { animation-delay: .05s; }
  .hero-copy > :nth-child(3) { animation-delay: .1s; }
  .hero-copy > :nth-child(4) { animation-delay: .14s; }
  .hero-copy > :nth-child(5) { animation-delay: .18s; }
  .hero-copy > :nth-child(6) { animation-delay: .22s; }
  .reflection-card { animation-delay: .16s; }
  .hero-rail { animation-delay: .28s; }
  .trust-row > :nth-child(2) { animation-delay: .05s; }
  .trust-row > :nth-child(3) { animation-delay: .1s; }
  .trust-row > :nth-child(4) { animation-delay: .15s; }
}
.form-status { min-height: 25px; margin: 12px 0 0; color: var(--muted); font-size: .86rem; }
.form-status.is-error, .answer-error { color: var(--danger); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 28px 0; color: var(--soft-muted); font-size: .85rem; }
.breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; }
.breadcrumb span[aria-hidden] { color: var(--sage-300); }
.source-list { list-style: none; padding: 0; margin: 0; }
.source-list li + li { border-top: 1px solid var(--line); }
.source-list a { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 3px; text-decoration: none; }
.source-list a::after { content: "↗"; flex: 0 0 auto; color: var(--forest-700); font-size: 1rem; }
.source-list a:hover { text-decoration: underline; }
.source-list .source-missing { color: var(--muted); }

/* 首页主视觉 */
.hero { position: relative; overflow: hidden; padding: 70px 0 0; background: radial-gradient(circle at 84% 15%, rgba(212, 223, 209, .52), transparent 30%), linear-gradient(180deg, #f8f8f1 0%, var(--warm-white) 100%); }
.hero::before { content: ""; position: absolute; width: 360px; height: 360px; left: -230px; top: 70px; border: 1px solid var(--sage-200); border-radius: 50%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .32; background-image: linear-gradient(rgba(59, 109, 86, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(59, 109, 86, .07) 1px, transparent 1px); background-size: 52px 52px; mask-image: radial-gradient(circle at 75% 25%, #000 0, transparent 58%); }
.hero > .container { position: relative; z-index: 1; }
.hero-rail { position: absolute; z-index: 2; top: 148px; right: max(6px, calc((100vw - 1180px) / 2 - 40px)); display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--forest-700); }
.rail-code { color: var(--forest-800); font-family: var(--font-display); font-size: .82rem; letter-spacing: .08em; writing-mode: vertical-rl; }
.rail-title { color: var(--forest-700); font-size: .62rem; font-weight: 700; letter-spacing: .22em; writing-mode: vertical-rl; }
.rail-line { width: 1px; height: 64px; background: var(--sage-300); }
.rail-scroll { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-size: .68rem; letter-spacing: .16em; text-decoration: none; writing-mode: vertical-rl; }
.rail-scroll:hover { color: var(--forest-900); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .8fr); gap: 72px; align-items: center; }
.hero-copy { padding: 30px 0 46px; }
.hero-copy h1 { max-width: 680px; margin-bottom: 25px; font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 4.35rem); font-weight: 600; line-height: 1.22; letter-spacing: -.045em; }
.hero-lead { max-width: 560px; margin-bottom: 30px; color: var(--muted); font-size: 1.07rem; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.hero-actions .button { min-height: 50px; padding-inline: 24px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; color: var(--muted); font-size: .82rem; }
.hero-note svg { width: 18px; height: 18px; color: var(--forest-700); }
.hero-visual { position: relative; min-height: 485px; display: flex; align-items: center; justify-content: center; }
.reflection-card { position: relative; z-index: 2; width: 100%; padding: 40px; border: 1px solid rgba(185, 201, 184, .85); border-top: 2px solid var(--forest-700); border-radius: 32px 32px 70px 32px; background: rgba(255, 254, 250, .91); box-shadow: var(--shadow-lift); }
.card-kicker { margin-bottom: 10px; color: var(--forest-700); font-size: .78rem; letter-spacing: .1em; }
.reflection-card h2 { margin-bottom: 30px; font-family: var(--font-display); font-size: 2rem; font-weight: 600; }
.reflection-steps { list-style: none; padding: 0; margin: 0; }
.reflection-steps li { display: flex; gap: 16px; padding: 17px 0; border-top: 1px solid var(--line); }
.reflection-steps li > span { color: var(--gold); font-family: var(--font-display); font-size: 1rem; }
.reflection-steps strong { font-size: .95rem; }
.reflection-steps p { margin: 2px 0 0; color: var(--muted); font-size: .83rem; }
.botanical-shape { position: absolute; display: block; border: 1px solid var(--sage-300); }
.shape-one { width: 200px; height: 200px; top: 8px; right: -40px; border-radius: 70% 30% 65% 35%; transform: rotate(18deg); }
.shape-two { width: 150px; height: 230px; left: -40px; bottom: 10px; border-radius: 100% 0 100% 0; background: rgba(232, 237, 227, .4); transform: rotate(-24deg); }
.trust-row { position: relative; display: grid; grid-template-columns: repeat(3, 1fr) 1.6fr; gap: 0; padding: 27px 0; border-top: 1px solid var(--line); }
.trust-row > div { display: flex; flex-direction: column; padding-left: 26px; border-left: 1px solid var(--line); }
.trust-row > div:first-child { padding-left: 0; border-left: 0; }
.trust-row strong { color: var(--forest-900); font-size: 1.35rem; font-weight: 650; }
.trust-row span { color: var(--muted); font-size: .78rem; }
.trust-row > p { margin: 0; padding-left: 30px; border-left: 1px solid var(--line); color: var(--forest-800); font-size: .9rem; text-align: right; }
.trust-row > p span { font-size: .76rem; }

/* 目录 */
.catalog-section { padding: var(--section-space) 0 20px; }
.filter-panel { position: sticky; top: 94px; z-index: 18; display: grid; grid-template-columns: minmax(250px, 1.8fr) minmax(160px, 1fr) minmax(150px, .9fr) minmax(150px, .85fr) auto; gap: 14px; align-items: end; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255, 254, 250, .94); box-shadow: var(--shadow); backdrop-filter: saturate(140%) blur(12px); }
.filter-panel label { display: block; margin-bottom: 6px; color: var(--forest-800); font-size: .78rem; font-weight: 650; }
input, select { min-height: 46px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
input { padding: 10px 13px; }
select { min-width: 100%; padding: 9px 36px 9px 12px; }
input::placeholder { color: #879189; }
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; left: 13px; top: 50%; width: 19px; height: 19px; color: var(--soft-muted); transform: translateY(-50%); pointer-events: none; }
.input-with-icon input { width: 100%; padding-left: 41px; }
.filter-reset { margin-bottom: 0; }
.catalog-toolbar { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 2px 8px; }
.result-count { margin: 0; color: var(--forest-800); font-size: .9rem; font-weight: 650; }
.catalog-order { color: var(--soft-muted); font-size: .78rem; }
.scale-grid { counter-reset: scale-card; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.scale-card { --card-accent: var(--sage-300); position: relative; counter-increment: scale-card; min-width: 0; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-top: 2px solid var(--card-accent); border-radius: var(--radius-md); background: var(--paper); box-shadow: 0 3px 12px rgba(32, 55, 46, .025); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.scale-card[data-category*="焦虑"], .scale-card[data-category*="压力"], .scale-card[data-category*="社交"] { --card-accent: #c3a06c; }
.scale-card[data-category*="抑郁"], .scale-card[data-category*="情绪"], .scale-card[data-category*="创伤"] { --card-accent: #c39a94; }
.scale-card[data-category*="睡眠"], .scale-card[data-category*="综合健康"] { --card-accent: #7fa89a; }
.scale-card[data-category*="幸福"], .scale-card[data-category*="人格"] { --card-accent: #7d9d7d; }
.scale-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.scale-card-code { color: var(--forest-700); font-size: .75rem; font-weight: 700; letter-spacing: .08em; overflow-wrap: anywhere; }
.scale-card-code::before { content: counter(scale-card, decimal-leading-zero) " · "; color: var(--gold); font-family: var(--font-display); letter-spacing: .02em; }
.scale-card h3 { margin-bottom: 10px; font-size: 1.13rem; }
.scale-card-description { display: -webkit-box; overflow: hidden; margin-bottom: 20px; color: var(--muted); font-size: .86rem; line-height: 1.8; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.scale-card-facts { display: flex; flex-wrap: wrap; gap: 8px 17px; padding: 13px 0; margin: auto 0 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.scale-card-facts span { display: inline-flex; align-items: center; gap: 5px; }
.scale-card-link { min-height: 44px; display: flex; align-items: center; justify-content: space-between; margin: 0 -6px -6px; padding: 6px; color: var(--forest-800); font-size: .88rem; font-weight: 650; text-decoration: none; }
.scale-card-link::after { content: "→"; font-size: 1.1rem; transition: transform .18s var(--ease-out); }
.scale-card:hover .scale-card-link::after { transform: translateX(4px); }
.load-more-wrap { display: flex; justify-content: center; padding-top: 28px; }
.load-more-wrap .button { min-width: 200px; }
.guide-section { padding: var(--section-space) 0 10px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guide-grid article { position: relative; padding: 28px; border-top: 2px solid var(--sage-300); background: linear-gradient(180deg, rgba(232, 237, 227, .45), transparent); }
.guide-number { display: block; margin-bottom: 20px; color: var(--gold); font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .06em; }
.guide-grid h3 { margin-bottom: 10px; }
.guide-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.boundary-note { display: flex; gap: 20px; margin-top: 34px; padding: 26px 30px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--paper); }
.boundary-note > svg { width: 27px; height: 27px; flex: 0 0 auto; margin-top: 3px; color: var(--forest-700); }
.boundary-note h3 { margin-bottom: 7px; }
.boundary-note p { margin-bottom: 5px; color: var(--muted); font-size: .9rem; }
/* ---------- 分享本站 ---------- */
.share-site-section { padding: 10px 0 var(--section-space); }
.share-site-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 34px 38px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(120deg, var(--paper) 55%, var(--forest-50)); }
.share-site-card h2 { margin-bottom: 10px; }
.share-site-card > div > p:not(.eyebrow):not(.form-status) { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.share-site-link { display: flex; gap: 8px; max-width: 520px; margin-top: 16px; }
.share-site-link input { flex: 1 1 auto; min-width: 0; min-height: 46px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); font-size: .86rem; }
.share-site-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.share-site-qr { display: grid; justify-items: center; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.share-site-qr img { width: 150px; height: 150px; }
.share-site-qr span { color: var(--soft-muted); font-size: .74rem; }
/* ---------- 结果备注 ---------- */
.note-form { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--warm-white); }
.note-form textarea { width: 100%; min-height: 108px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); line-height: 1.7; resize: vertical; }
.note-form textarea:focus { border-color: var(--forest-700); box-shadow: 0 0 0 3px rgba(59, 109, 86, .12); outline: none; }
.note-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.note-count { color: var(--soft-muted); font-size: .76rem; }
/* ---------- 可滚动数据区域 ---------- */
.scroll-region { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.account-section .scroll-region { padding-right: 6px; }
.account-section .scroll-toggle { margin-top: 12px; }
.scroll-region.is-expanded { max-height: none; }
.scroll-toggle { margin-top: 12px; }
.trend-table.scroll-region { max-height: 340px; padding-right: 6px; }
.trend-table.scroll-region table { margin-top: 0; }
/* ---------- 表单必填标记与时间范围 ---------- */
.field:has(input[required]) > span::after,
.field:has(textarea[required]) > span::after,
.field:has(select[required]) > span::after { content: " *"; color: #b4553f; font-weight: 700; }
.required-mark { font-style: normal; color: #b4553f; font-weight: 700; }
.record-filters .custom-range { display: inline-flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.record-filters .custom-range label { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.record-filters .custom-range input { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); font: inherit; font-size: .82rem; }
.custom-range[hidden] { display: none; }
.record-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.record-entry .record-card { min-width: 0; }
.record-delete { align-self: center; }
.trend-export { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: .8rem; }
.trend-export .button { min-height: 38px; padding: 6px 12px; font-size: .8rem; }
@media (max-width: 640px) {
  .record-entry { grid-template-columns: 1fr; }
  .record-delete { justify-self: start; }
}

/* 量表详情 */
.detail-main { min-height: 70vh; }
.scale-detail-header { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; overflow: hidden; padding: 40px 44px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(125deg, var(--paper) 40%, var(--forest-50)); }
.scale-short-name { margin: 22px 0 5px; color: var(--forest-700); font-size: .82rem; font-weight: 700; letter-spacing: .12em; }
.scale-detail-header h1 { margin-bottom: 15px; font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; }
.detail-description { max-width: 770px; margin: 0; color: var(--muted); }
.detail-monogram { max-width: 150px; color: var(--sage-300); font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 700; letter-spacing: -.06em; overflow-wrap: anywhere; opacity: .65; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px, .8fr); gap: 25px; align-items: start; margin-top: 25px; }
.detail-primary { display: grid; gap: 25px; }
.content-card, .start-card { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.section-intro { color: var(--muted); font-size: .9rem; }
.scale-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0; }
.scale-facts > div { min-height: 95px; padding: 18px; border-top: 1px solid var(--line); }
.scale-facts > div:nth-child(3n + 1) { padding-left: 0; }
.scale-facts dt { color: var(--muted); font-size: .76rem; }
.scale-facts dd { margin: 4px 0 0; color: var(--forest-900); font-weight: 650; }
.disclaimer-card { padding: 26px 30px; border-left: 3px solid var(--sage-300); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--forest-50); }
.disclaimer-card h2 { font-size: 1.15rem; }
.disclaimer-card p { margin-bottom: 7px; color: var(--muted); font-size: .9rem; }
.start-column { position: sticky; top: 20px; display: grid; gap: 17px; }
.start-card h2 { font-size: 1.45rem; }
.start-card > p:not(.eyebrow):not(.form-status) { color: var(--muted); font-size: .9rem; }
.consent-box { margin: 22px 0 16px; padding: 15px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--warm-white); }
.consent-box label { display: flex; align-items: flex-start; gap: 11px; min-height: 52px; cursor: pointer; font-size: .86rem; line-height: 1.7; }
.consent-box input { flex: 0 0 auto; width: 21px; min-height: 21px; height: 21px; margin: 4px 0 0; padding: 0; accent-color: var(--forest-800); }
.consent-box strong { display: block; color: var(--forest-900); }
.consent-box a { min-height: 44px; display: inline-flex; align-items: center; margin-left: 32px; font-size: .78rem; }
.quiet-assurance { display: flex; gap: 12px; padding: 8px 12px; color: var(--muted); }
.quiet-assurance svg { width: 23px; height: 23px; flex: 0 0 auto; margin-top: 4px; color: var(--forest-700); }
.quiet-assurance p { margin: 0; font-size: .8rem; }
.quiet-assurance strong { color: var(--forest-800); }
.unavailable-card { background: var(--forest-50); }

/* 作答 */
.take-main { min-height: 75vh; padding-bottom: 10px; background: linear-gradient(180deg, #f5f6ef 0, var(--warm-white) 390px); }
.take-container { max-width: 920px; }
.take-shell { padding-top: 1px; }
.take-header { display: flex; justify-content: space-between; gap: 25px; align-items: end; }
.take-header .breadcrumb { margin-bottom: 25px; }
.take-header h1 { margin-bottom: 8px; font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; }
.take-timeframe { margin-bottom: 0; color: var(--muted); }
.resume-copy { flex: 0 0 auto; margin-bottom: 2px; }
.copy-feedback { min-height: 24px; margin: 5px 0; color: var(--forest-700); font-size: .82rem; text-align: right; }
.resume-notice { display: flex; gap: 14px; align-items: baseline; margin: 17px 0; padding: 12px 17px; border-radius: 10px; color: var(--muted); background: var(--sage-100); font-size: .78rem; }
.resume-notice strong { flex: 0 0 auto; color: var(--forest-800); }
.progress-card { margin: 17px 0; padding: 17px 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.progress-copy { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.progress-copy p { margin: 0; color: var(--muted); font-size: .86rem; }
.progress-copy strong { color: var(--forest-900); font-size: 1.15rem; }
.progress-copy > span { color: var(--muted); font-size: .82rem; }
progress { width: 100%; height: 9px; display: block; overflow: hidden; margin: 10px 0; border: 0; border-radius: 999px; background: var(--sage-100); accent-color: var(--forest-700); }
progress::-webkit-progress-bar { background: var(--sage-100); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--forest-700); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--forest-700); border-radius: 999px; }
.progress-actions { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.progress-actions > span { color: var(--soft-muted); font-size: .75rem; }
.progress-actions .text-button { font-size: .78rem; }
.question-card { padding: 36px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.question-fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.question-number { display: block; margin-bottom: 12px; color: var(--gold); font-size: .77rem; font-weight: 700; letter-spacing: .12em; }
.question-text { display: block; width: 100%; margin-bottom: 11px; color: var(--forest-950); font-size: clamp(1.25rem, 2.5vw, 1.65rem); font-weight: 650; line-height: 1.55; letter-spacing: -.015em; }
.question-text:focus { outline-offset: 8px; }
.question-figure { margin: 4px 0 20px; text-align: center; }
.question-figure img { width: min(100%, 420px); height: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.question-instruction { margin-bottom: 26px; color: var(--muted); font-size: .86rem; }
.choice-list { display: grid; gap: 11px; }
.choice-list.is-image-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
.choice-list.is-image-grid .choice-option { flex-direction: column; gap: 7px; min-height: 0; padding: 9px; text-align: center; }
.choice-list.is-image-grid .choice-option input { position: absolute; top: 8px; left: 8px; }
.choice-list.is-image-grid .choice-image { display: block; width: 100%; }
.choice-list.is-image-grid .choice-image img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.choice-list.is-image-grid .choice-text { color: var(--muted); font-size: .78rem; }
.choice-option { position: relative; min-height: 58px; display: flex; align-items: center; gap: 13px; padding: 13px 17px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.choice-option input { width: 21px; height: 21px; min-height: 21px; flex: 0 0 auto; margin: 0; padding: 0; accent-color: var(--forest-800); }
.choice-option span { line-height: 1.55; }
.choice-option.is-selected { color: var(--forest-950); border-color: var(--forest-700); background: var(--forest-50); box-shadow: inset 3px 0 0 var(--forest-700), inset 0 0 0 1px var(--forest-700); }
.choice-option.is-saving { background: var(--forest-50); }
.native-answer { max-width: 420px; margin: 8px 0 25px; }
.native-answer label { display: block; margin-bottom: 8px; color: var(--forest-800); font-size: .85rem; font-weight: 650; }
.native-answer input { width: 100%; min-height: 56px; padding: 12px 15px; font-size: 1.1rem; background: #fff; }
.native-answer small { display: block; margin-top: 8px; color: var(--muted); line-height: 1.7; }
.answer-status { display: flex; align-items: center; gap: 9px; min-height: 36px; margin-top: 20px; color: var(--muted); font-size: .83rem; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--sage-300); }
.answer-status.is-saving .status-dot { background: var(--gold); }
.answer-status.is-saved { color: var(--forest-700); }
.answer-status.is-saved .status-dot { background: var(--forest-700); }
.answer-status.is-error .status-dot { background: var(--danger); }
.answer-error { margin: 8px 0; padding: 10px 13px; border-radius: 8px; background: var(--danger-soft); font-size: .84rem; }
.save-row { min-height: 48px; display: flex; align-items: center; gap: 8px; }
.save-row > span { color: var(--muted); font-size: .8rem; }
.question-navigation { display: flex; justify-content: space-between; gap: 15px; padding-top: 20px; margin-top: 10px; border-top: 1px solid var(--line); }
.completion-card { display: grid; grid-template-columns: 1fr auto; gap: 15px 25px; align-items: center; margin-top: 18px; padding: 27px 30px; border: 1px solid var(--sage-300); border-radius: var(--radius-md); background: var(--forest-50); }
.completion-card h2 { margin-bottom: 7px; font-size: 1.35rem; }
.completion-card p { margin-bottom: 0; }
.completion-card > div > p:last-child { color: var(--muted); font-size: .87rem; }
.completion-card .form-status { grid-column: 1 / -1; margin-top: 0; }
.take-privacy { max-width: 720px; margin: 20px auto; color: var(--muted); font-size: .79rem; text-align: center; }
.clipboard-helper { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }

/* 结果与分享 */
.result-main { min-height: 75vh; padding-top: 1px; background: linear-gradient(180deg, #f4f6ef 0, var(--warm-white) 360px); }
.result-container { max-width: 1020px; }
.result-heading { display: flex; justify-content: space-between; align-items: start; gap: 30px; margin: 34px 0 25px; }
.result-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.result-heading h1 { margin-bottom: 9px; font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; }
.result-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: .86rem; }
.owner-badge { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 6px 12px; border: 1px solid var(--sage-300); border-radius: 999px; color: var(--forest-800); background: var(--paper); font-size: .78rem; font-weight: 650; }
.owner-badge svg { width: 18px; height: 18px; }
.shared-badge { background: var(--sage-100); }
.score-summary { position: relative; overflow: hidden; margin-bottom: 20px; border: 1px solid var(--line-strong); border-top: 3px solid var(--forest-800); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.score-summary[class*="severity-"] { border-top-color: var(--forest-800); }
.primary-score-card { position: relative; display: grid; grid-template-columns: minmax(180px, .7fr) 1.5fr; gap: 40px; align-items: center; padding: 38px 42px; }
.primary-score-card::after { content: ""; position: absolute; right: -75px; top: -105px; width: 250px; height: 250px; border: 1px solid var(--sage-200); border-radius: 50%; pointer-events: none; }
.primary-score-main { position: relative; z-index: 1; padding-right: 30px; border-right: 1px solid var(--line); }
.primary-score-label { display: block; color: var(--muted); font-size: .82rem; }
.score-value { display: block; margin: 3px 0; color: var(--forest-900); font-family: var(--font-display); font-size: clamp(3.6rem, 8vw, 5.6rem); font-weight: 600; line-height: 1.08; letter-spacing: -.05em; }
.result-next-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0 4px; }
.result-next-steps a { min-height: 86px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-content: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); text-decoration: none; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.result-next-steps a > span { grid-row: 1 / 3; align-self: center; color: var(--gold); font-family: var(--font-display); font-size: .86rem; }
.result-next-steps strong { color: var(--forest-900); font-size: .9rem; }
.result-next-steps small { color: var(--muted); font-size: .74rem; }
.result-next-steps a:hover { border-color: var(--sage-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.score-range { color: var(--muted); font-size: .8rem; }
.primary-score-interpretation { position: relative; z-index: 1; }
.primary-score-interpretation h2 { margin: 12px 0 10px; font-size: 1.65rem; }
.primary-score-interpretation p { margin: 0; color: var(--muted); }
.score-band { display: inline-flex; padding: 4px 10px; border-radius: 999px; color: var(--forest-800); background: var(--forest-100); font-size: .76rem; font-weight: 650; }
.multi-result-card { padding: 32px 38px; }
.multi-result-card h2 { margin-bottom: 8px; font-size: 1.55rem; }
.multi-result-card p { margin: 0; color: var(--muted); }
.multi-result-card .severity-badge { margin-top: 12px; }
.risk-alert { margin: 20px 0; padding: 27px 30px; border: 2px solid var(--danger); border-radius: var(--radius-md); background: var(--danger-soft); }
.risk-alert h2 { margin-bottom: 12px; color: var(--danger-dark); font-size: 1.4rem; }
.risk-alert p { color: #69352e; }
.risk-alert p:last-child { margin-bottom: 0; }
.risk-alert strong { color: var(--danger-dark); }
.risk-message { font-size: 1rem; font-weight: 650; }
.risk-independent { padding-top: 12px; border-top: 1px solid var(--danger-line); }
.risk-emergency { margin-top: 13px; padding: 13px 16px; border-radius: 9px; background: #fffaf7; }
.result-section { margin-top: 20px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric-card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--warm-white); }
.metric-card.is-primary { border-color: var(--sage-300); background: var(--forest-50); }
.metric-card h3 { margin-bottom: 7px; color: var(--muted); font-size: .8rem; font-weight: 600; overflow-wrap: anywhere; }
.metric-value { display: block; color: var(--forest-900); font-family: var(--font-serif); font-size: 2rem; line-height: 1.25; overflow-wrap: anywhere; }
.metric-range { display: block; margin-top: 5px; color: var(--soft-muted); font-size: .75rem; }
.metric-primary-label { display: inline-block; margin-top: 9px; color: var(--forest-700); font-size: .7rem; font-weight: 650; }
.band-list { display: grid; gap: 12px; }
.band-card { padding: 20px 22px; border-left: 3px solid var(--sage-300); border-radius: 0 11px 11px 0; background: var(--forest-50); }
.band-card h3 { margin-bottom: 7px; font-size: 1rem; }
.band-card h3 span { color: var(--forest-700); }
.band-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.band-value { display: block; margin-bottom: 4px; color: var(--soft-muted); font-size: .74rem; }
.dimension-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 25px; }
.dimension-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 15px 0; border-top: 1px solid var(--line); }
.dimension-row h3 { margin: 0; font-size: .9rem; font-weight: 600; }
.dimension-value { flex: 0 0 auto; color: var(--forest-900); font-family: var(--font-serif); font-size: 1.35rem; }
.dimension-range { display: block; color: var(--soft-muted); font-family: var(--font-sans); font-size: .68rem; text-align: right; }
.download-section { background: var(--forest-50); }
.download-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.download-button { min-height: 82px; padding: 14px 17px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--paper); text-align: left; transition: border-color .15s ease, background-color .15s ease; }
.download-button strong, .download-button span { display: block; }
.download-button strong { color: var(--forest-900); font-size: .96rem; }
.download-button span { margin-top: 2px; color: var(--muted); font-size: .73rem; }
.download-button:hover { border-color: var(--forest-700); background: #fff; }
.share-create { display: grid; grid-template-columns: auto 150px auto; gap: 12px; align-items: center; }
.share-create label { font-size: .88rem; font-weight: 650; }
.new-share { margin-top: 20px; padding: 20px; border: 1px solid var(--sage-300); border-radius: 12px; background: var(--forest-50); }
.new-share h3 { margin-bottom: 6px; }
.new-share p { color: var(--muted); font-size: .83rem; }
.copy-row { display: flex; gap: 9px; }
.copy-row input { min-width: 0; flex: 1; font-size: .82rem; }
.copy-row .button { flex: 0 0 auto; }
.share-history { margin-top: 25px; }
.share-history > h3 { font-size: 1rem; }
.share-empty { margin: 0; color: var(--muted); font-size: .86rem; }
.share-record { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-top: 1px solid var(--line); }
.share-record-info { min-width: 0; }
.share-record-info strong { display: block; font-size: .88rem; }
.share-record-info p { margin: 2px 0 0; color: var(--muted); font-size: .77rem; }
.share-record-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.share-record-actions .button { min-height: 44px; padding: 8px 13px; font-size: .8rem; }
.answer-details { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.answer-details summary { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 25px; color: var(--forest-900); font-weight: 650; cursor: pointer; }
.answer-details summary span { color: var(--muted); font-size: .75rem; font-weight: 400; }
.details-body { padding: 0 25px 25px; }
.details-body > p { color: var(--muted); font-size: .85rem; }
.response-list { list-style: none; padding: 0; margin: 20px 0 0; counter-reset: responses; }
.response-item { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(100px, .6fr) minmax(72px, .3fr) minmax(72px, .3fr) minmax(72px, .3fr); gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); counter-increment: responses; }
.response-question { display: grid; grid-template-columns: 30px 1fr; gap: 8px; }
.response-question::before { content: counter(responses, decimal-leading-zero); color: var(--gold); font-size: .72rem; }
.response-question strong { font-size: .87rem; font-weight: 600; }
.response-cell { min-width: 0; }
.response-cell small { display: block; color: var(--soft-muted); font-size: .68rem; }
.response-cell span { display: block; color: var(--forest-900); font-size: .85rem; overflow-wrap: anywhere; }
.response-updated { grid-column: 2 / -1; margin-top: -10px; color: var(--soft-muted); font-size: .7rem; }
.result-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 25px; margin-bottom: 25px; }
.result-metadata > div { min-width: 0; }
.result-metadata dt { color: var(--soft-muted); font-size: .72rem; }
.result-metadata dd { margin: 3px 0 0; font-size: .86rem; overflow-wrap: anywhere; }
.result-metadata code { font-size: .72rem; word-break: break-all; }
.disclaimer-text { padding: 15px 18px; border-radius: 10px; color: var(--muted); background: var(--warm-white); font-size: .85rem; }
.crisis-card { display: flex; gap: 19px; margin-top: 22px; padding: 25px 28px; border: 1px solid #dfb6a9; border-radius: var(--radius-md); background: var(--danger-soft); }
.crisis-card > svg { width: 27px; height: 27px; flex: 0 0 auto; margin-top: 4px; color: var(--danger); }
.crisis-card h2 { color: var(--danger-dark); font-size: 1.15rem; }
.crisis-card p { margin-bottom: 8px; color: #693e36; font-size: .86rem; }
.crisis-card p:last-child { margin-bottom: 0; }
.share-expiry { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; padding: 17px 22px; border: 1px solid var(--sage-300); border-radius: var(--radius-md); background: var(--sage-100); }
.share-expiry strong { color: var(--forest-900); }
.share-expiry p { margin: 1px 0 0; color: var(--muted); font-size: .8rem; }
.share-expiry > span { flex: 0 0 auto; color: var(--forest-700); font-size: .76rem; }
.share-return { padding: 30px 0 5px; text-align: center; }
.share-return p { margin-top: 10px; color: var(--muted); font-size: .8rem; }

/* 隐私 */
.privacy-container { max-width: 990px; }
.privacy-hero { padding: 38px 0 35px; }
.privacy-hero h1 { margin-bottom: 18px; font-family: var(--font-serif); font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 600; }
.privacy-hero > p:not(.eyebrow) { max-width: 750px; color: var(--muted); font-size: 1.03rem; }
.privacy-key { display: flex; flex-direction: column; margin-top: 25px; padding: 20px 24px; border-left: 3px solid var(--forest-700); border-radius: 0 12px 12px 0; background: var(--forest-50); }
.privacy-key strong { color: var(--forest-900); }
.privacy-key span { color: var(--muted); }
.privacy-toc { position: sticky; z-index: 10; top: 0; display: flex; gap: 6px; overflow-x: auto; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 254, 250, .97); box-shadow: var(--shadow); }
.privacy-toc a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: 1 0 auto; padding: 7px 14px; border-radius: 8px; text-decoration: none; font-size: .84rem; }
.privacy-toc a:hover { background: var(--forest-50); }
.privacy-section { display: grid; grid-template-columns: 45px 1fr; gap: 24px; padding: 55px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.privacy-section-number { padding-top: 38px; color: var(--gold); font-family: var(--font-serif); font-size: .85rem; }
.privacy-section h2 { margin-bottom: 18px; font-size: 1.75rem; }
.privacy-section p { color: var(--muted); }
.privacy-section li { margin-bottom: 8px; color: var(--muted); }
.privacy-section li::marker { color: var(--sage-300); }
.privacy-card-grid, .comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 24px 0; }
.privacy-card-grid article, .comparison-grid article { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.privacy-card-grid h3, .comparison-grid h3 { font-size: 1rem; }
.privacy-card-grid ul, .comparison-grid ul { padding-left: 20px; margin-bottom: 0; }
.privacy-card-grid li, .comparison-grid li { font-size: .87rem; }
.privacy-note { padding: 20px 23px; border-radius: 12px; background: var(--sage-100); }
.privacy-note strong { color: var(--forest-900); }
.privacy-note p { margin: 5px 0 0; font-size: .87rem; }
.token-example { display: flex; flex-wrap: wrap; gap: 0; margin: 23px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; overflow-wrap: anywhere; }
.token-example strong { color: var(--danger); }
.check-list { padding-left: 21px; }
.check-list strong { color: var(--forest-800); }
.privacy-section code { padding: 1px 5px; border-radius: 4px; color: var(--forest-900); background: var(--sage-100); }
.comparison-included { border-top: 3px solid var(--forest-700) !important; }
.comparison-excluded { border-top: 3px solid #c9b69b !important; }
.section-footnote { font-size: .87rem; }
.crisis-privacy { border-bottom: 0; }
.emergency-numbers { display: grid; grid-template-columns: .6fr .6fr 1fr; gap: 12px; margin: 25px 0; }
.emergency-numbers div { display: flex; flex-direction: column; justify-content: center; min-height: 105px; padding: 19px; border: 1px solid var(--danger-line); border-radius: 12px; background: var(--danger-soft); }
.emergency-numbers strong { color: var(--danger-dark); font-family: var(--font-serif); font-size: 1.55rem; }
.emergency-numbers span { color: #765047; font-size: .77rem; }
.privacy-bottom { padding: 25px 0 5px 69px; }
.privacy-bottom p { margin-top: 10px; color: var(--muted); font-size: .8rem; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .scale-card:hover { border-color: var(--sage-300); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
  .button:hover { transform: translateY(-1px); }
  .choice-option:hover { border-color: var(--sage-300); }
}

@media (max-width: 1240px) {
  .hero-rail { display: none; }
}
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr 380px; gap: 38px; }
  .reflection-card { padding: 32px; }
  .scale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-panel { position: static; grid-template-columns: 1.6fr 1fr 1fr; }
  .filter-reset { grid-column: 1 / -1; justify-self: end; }
  .detail-layout { grid-template-columns: minmax(0, 1.5fr) 300px; }
  .content-card, .start-card { padding: 26px; }
  .scale-facts { grid-template-columns: repeat(2, 1fr); }
  .scale-facts > div:nth-child(3n + 1) { padding-left: 18px; }
  .scale-facts > div:nth-child(odd) { padding-left: 0; }
  .response-item { grid-template-columns: minmax(0, 1.4fr) minmax(90px, .7fr) 64px 64px 68px; gap: 9px; }
}

@media (max-width: 800px) {
  .container { width: min(100% - 36px, 1180px); }
  .header-inner { gap: 15px; }
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-visual { min-height: auto; padding: 15px 0 45px; }
  .reflection-card { max-width: 590px; }
  .trust-row { grid-template-columns: repeat(3, 1fr); }
  .trust-row > p { grid-column: 1 / -1; margin-top: 20px; padding: 18px 0 0; border-top: 1px solid var(--line); border-left: 0; text-align: left; }
  .heading-with-aside { display: block; }
  .heading-with-aside > p { margin-top: 15px; }
  .guide-grid { grid-template-columns: 1fr; gap: 12px; }
  .detail-layout { grid-template-columns: 1fr; }
  .start-column { position: static; grid-row: 1; }
  .start-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .start-card .eyebrow, .start-card h2 { grid-column: 1 / -1; }
  .start-card .consent-box { grid-row: 3 / 6; grid-column: 2; margin-top: 0; }
  .start-card .button-full { align-self: end; }
  .start-card .form-status { grid-column: 1 / -1; }
  .unavailable-card { display: block; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-actions { grid-template-columns: repeat(2, 1fr); }
  .response-item { grid-template-columns: 1fr 1fr 1fr; }
  .response-question { grid-column: 1 / -1; }
  .response-updated { grid-column: 1 / -1; margin-top: 0; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { width: min(100% - 28px, 1180px); }
  .brand { margin-right: auto; }
  .brand-mark { width: 34px; height: 34px; }
  .hero-copy h1 { font-size: clamp(2.25rem, 11vw, 3.2rem); }
  .hero-copy h1 br { display: none; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-note { align-items: flex-start; }
  .reflection-card { padding: 27px 24px; border-radius: 24px 24px 48px 24px; }
  .reflection-card h2 { font-size: 1.7rem; }
  .trust-row { gap: 14px 0; }
  .trust-row > div { padding-left: 13px; }
  .trust-row strong { font-size: 1.1rem; }
  .trust-row span { font-size: .7rem; }
  .catalog-section { padding-top: 60px; }
  .filter-panel { grid-template-columns: 1fr; padding: 17px; }
  .filter-reset { grid-column: auto; justify-self: stretch; }
  .catalog-order { display: none; }
  .scale-grid { grid-template-columns: 1fr; }
  .scale-card-description { -webkit-line-clamp: 4; }
  .guide-section { padding-top: 65px; }
  .boundary-note { padding: 22px; }
  .share-site-card { grid-template-columns: 1fr; padding: 24px 20px; }
  .share-site-qr { justify-self: start; }
  .share-site-link { flex-direction: column; }
  .footer-grid, .simple-footer .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-meta { text-align: left; }
  .site-footer { margin-top: 55px; }
  .scale-detail-header { grid-template-columns: 1fr; padding: 27px 23px; }
  .detail-monogram { display: none; }
  .content-card, .start-card { padding: 23px 20px; }
  .start-card { display: block; }
  .start-card .consent-box { margin-top: 20px; }
  .scale-facts > div { padding: 15px 10px; }
  .scale-facts > div:nth-child(3n + 1) { padding-left: 10px; }
  .scale-facts > div:nth-child(odd) { padding-left: 0; }
  .take-header { display: block; }
  .take-header-actions { justify-content: flex-start; margin-top: 14px; }
  .resume-copy { width: auto; margin-top: 0; }
  .copy-feedback { text-align: left; }
  .question-navigation { gap: 10px; }
  .question-navigation .button { flex: 1 1 0; min-width: 0; padding-inline: 10px; }
  .resume-notice { display: block; }
  .resume-notice strong { display: block; }
  .progress-card { padding: 15px; }
  .progress-actions { align-items: flex-start; }
  .progress-actions > span { max-width: 50%; }
  .question-card { padding: 25px 19px; border-radius: var(--radius-md); }
  .question-text { font-size: 1.27rem; }
  .choice-option { padding: 13px; }
  .save-row { flex-wrap: wrap; }
  .save-row .button { flex: 1; }
  .question-navigation .button { padding-inline: 15px; }
  .completion-card { grid-template-columns: 1fr; padding: 24px 20px; }
  .completion-card .form-status { grid-column: auto; }
  .result-heading { display: block; }
  .owner-badge { margin-top: 15px; }
  .primary-score-card { grid-template-columns: 1fr; gap: 22px; padding: 28px 24px; }
  .primary-score-main { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .score-value { font-size: 4.2rem; }
  .multi-result-card { padding: 27px 24px; }
  .result-section { padding: 25px 20px; }
  .risk-alert { padding: 23px 20px; }
  .metric-grid, .dimension-list { grid-template-columns: 1fr; }
  .metric-card { display: grid; grid-template-columns: 1fr auto; gap: 0 15px; align-items: center; }
  .metric-card h3 { grid-column: 1; margin: 0; }
  .metric-value { grid-column: 2; grid-row: 1 / 3; }
  .metric-range { grid-column: 1; }
  .metric-primary-label { grid-column: 1 / -1; }
  .download-actions { gap: 8px; }
  .download-button { padding: 12px; }
  .share-create { grid-template-columns: 1fr; }
  .copy-row { flex-direction: column; }
  .share-record { align-items: flex-start; flex-direction: column; }
  .share-record-actions { width: 100%; justify-content: space-between; }
  .answer-details summary, .details-body { padding-inline: 19px; }
  .response-item { grid-template-columns: 1fr 1fr; }
  .response-question, .response-updated { grid-column: 1 / -1; }
  .response-cell:first-of-type { grid-column: 1 / -1; }
  .result-metadata { grid-template-columns: 1fr; }
  .crisis-card { padding: 22px 19px; }
  .crisis-card > svg { display: none; }
  .share-expiry { display: block; }
  .share-expiry > span { display: block; margin-top: 9px; }
  .privacy-hero { padding-top: 20px; }
  .privacy-section { grid-template-columns: 1fr; gap: 0; padding: 40px 0; }
  .privacy-section-number { padding-top: 0; margin-bottom: 8px; }
  .privacy-card-grid, .comparison-grid { grid-template-columns: 1fr; }
  .emergency-numbers { grid-template-columns: 1fr 1fr; }
  .emergency-numbers div:last-child { grid-column: 1 / -1; }
  .privacy-bottom { padding-left: 0; }
}

@media (max-width: 380px) {
  .brand-type small { display: none; }
  .metric-grid, .download-actions { grid-template-columns: 1fr; }
  .question-navigation { gap: 6px; }
  .question-navigation .button { padding-inline: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .loading-mark { animation: none; border-top-color: var(--sage-300); }
}

@media print {
  .site-header, .site-footer, .network-banner, .share-management, .download-section, .share-return, .breadcrumb, .answer-actions, .answer-dialog, .result-next-steps { display: none !important; }
  body, .result-main { background: #fff; }
  .container { width: 100%; }
  .result-section, .score-summary { break-inside: avoid; box-shadow: none; }
}

button, [type="button"], [type="submit"], a, label, select, input, summary { touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }
.metric-description { margin: 8px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.dimension-row { flex-wrap: wrap; }
.dimension-description { flex-basis: 100%; margin: 5px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.guide-block + .guide-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.guide-block h3 { margin-bottom: 8px; font-size: .95rem; }
.guide-block p { margin: 0; color: var(--muted); font-size: .9rem; }
.norm-list { display: grid; gap: 9px; margin: 0; }
.norm-list > div { display: grid; grid-template-columns: minmax(92px, 140px) 1fr; gap: 14px; align-items: baseline; }
.norm-list dt { color: var(--forest-900); font-size: .84rem; font-weight: 650; }
.norm-list dd { margin: 0; color: var(--muted); font-size: .86rem; }
.suggestion-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.suggestion-list li + li { margin-top: 5px; }
.tag-soft { background: var(--forest-50); color: var(--forest-700); }
@media (max-width: 560px) {
  .norm-list > div { grid-template-columns: 1fr; gap: 2px; }
}

/* 参考资料页 */
.references-main { background: linear-gradient(180deg, #f8f8f1 0%, var(--warm-white) 100%); }
.references-container { padding-bottom: 70px; }
.references-hero { padding: 30px 0 18px; }
.references-hero h1 { margin-bottom: 16px; font-family: var(--font-serif); font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 600; letter-spacing: -.04em; }
.references-hero > p { max-width: 680px; color: var(--muted); font-size: 1.02rem; line-height: 1.85; }
.references-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 24px; }
.references-stats strong { display: block; font-family: var(--font-serif); font-size: 2rem; font-weight: 600; color: var(--forest-900); }
.references-stats span { color: var(--muted); font-size: .85rem; }
.ref-group { margin: 34px 0 10px; }
.ref-group-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ref-group-title h2 { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; }
.ref-group-title span { color: var(--muted); font-size: .82rem; }
.ref-list { display: grid; gap: 16px; }
.ref-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-lift); }
.ref-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.ref-card-code { font-size: .72rem; letter-spacing: .08em; color: var(--forest-700); background: var(--forest-50); padding: 3px 9px; border-radius: 999px; }
.ref-card-name { font-size: 1.08rem; font-weight: 650; color: var(--forest-900); text-decoration: none; }
.ref-card-name:hover { text-decoration: underline; }
.ref-card-meta { color: var(--soft-muted); font-size: .78rem; margin-left: auto; }
.ref-card-desc { margin: 4px 0 14px; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.ref-card .source-summary { margin: 4px 0 0; padding: 2px 3px 12px; color: var(--muted); font-size: .84rem; line-height: 1.7; }
.ref-card .source-list li + li { border-top: 1px dashed var(--line); }
.ref-note { margin-top: 44px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--forest-50); color: var(--muted); font-size: .88rem; line-height: 1.8; }
.ref-note strong { color: var(--forest-900); }
@media (max-width: 560px) {
  .ref-card { padding: 18px; }
  .ref-card-meta { margin-left: 0; flex-basis: 100%; }
}

/* ---------- 做题页：整体居中 ---------- */
.focus-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
  min-height: calc(100vh - 240px);
  padding: 14px 0 30px;
}
.focus-stack .progress-card { margin: 0; }
.focus-stack .question-card { margin: 0; }
@media (max-width: 720px) {
  .focus-stack { justify-content: flex-start; min-height: 0; padding-top: 4px; }
}

/* ---------- 自定义下拉 ---------- */
.native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  min-width: 0 !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}
.custom-select { position: relative; width: 100%; min-width: 0; }
.custom-select-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  font-size: .95rem;
}
.custom-select-button:hover { border-color: var(--sage-300); }
.custom-select-button[aria-expanded="true"] { border-color: var(--forest-700); box-shadow: 0 0 0 3px rgba(59, 109, 86, .12); }
.custom-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-chevron { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); transition: transform .15s ease; }
.custom-select-button[aria-expanded="true"] .custom-select-chevron { transform: rotate(180deg); }
.custom-select-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
}
.custom-select-option { padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: .94rem; }
.custom-select-option:hover, .custom-select-option.is-active { background: var(--forest-50); }
.custom-select-option[aria-selected="true"] { color: var(--forest-900); font-weight: 700; background: var(--sage-100); }
.share-create { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.share-create > label { flex: 0 0 100%; margin-bottom: -6px; color: var(--muted); font-size: .84rem; font-weight: 650; }
.share-create .custom-select { flex: 0 0 200px; width: 200px; max-width: 200px; }
.share-create .button { flex: 0 0 auto; }
@media (max-width: 560px) {
  .share-create .custom-select { flex: 1 1 100%; width: 100%; max-width: none; }
}
.share-login-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--forest-50);
  color: var(--muted);
  font-size: .9rem;
}

/* ---------- 分级与危险数值 ---------- */
.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.severity-neutral { color: var(--muted); background: var(--sage-100); border-color: var(--sage-200); }
.severity-low { color: #2f6a4c; background: #edf6ee; border-color: #d7e8db; }
.severity-mild { color: #245c40; background: #e7f2e8; border-color: #cee2d1; }
.severity-moderate { color: #7a5a1f; background: #fdf6dd; border-color: #e9d69a; }
.severity-high { color: #8d382f; background: #fdeae4; border-color: #e7bcb1; }
.severity-crisis { color: #fff; background: var(--danger); border-color: var(--danger-dark); }
.metric-card.is-danger { border-color: var(--danger-line); background: var(--danger-soft); }
.metric-card.is-danger .metric-value { color: var(--danger); }
.metric-card.is-danger h3 { color: var(--danger-dark); }
.band-card.is-danger { border-color: var(--danger-line); background: var(--danger-soft); }
.score-summary.is-danger .primary-score-card { border-color: var(--danger-line); background: var(--danger-soft); }
.score-summary.is-danger .score-value { color: var(--danger); }
.severity-alert {
  margin: 14px 0 0;
  padding: 15px 18px;
  border: 1px solid var(--danger-line);
  border-radius: 14px;
  background: var(--danger-soft);
  color: var(--danger-dark);
  font-size: .92rem;
  line-height: 1.7;
}
.primary-score-interpretation .severity-badge { margin-top: 6px; }
.band-card .severity-badge { margin-top: 8px; }
.factor-alert { margin: 14px 0 0; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--paper); }
.factor-alert h2 { margin: 0 0 4px; font-size: 1.05rem; }
.factor-alert-note { margin: 0 0 12px; color: var(--muted); font-size: .84rem; line-height: 1.7; }
.factor-alert-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.factor-alert-item { padding: 10px 12px; border: 1px solid; border-radius: 10px; }
.factor-alert-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.factor-alert-head strong { font-size: .9rem; }
.factor-alert-value { font-size: .9rem; font-weight: 700; }
.factor-alert-band { font-size: .8rem; opacity: .85; }
.factor-alert-head .severity-badge { margin-left: auto; }
.factor-alert-item p { margin: 6px 0 0; font-size: .82rem; line-height: 1.7; opacity: .9; }

/* ---------- 心理求助热线 ---------- */
.hotline-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.hotline-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: .9rem; }
.hotline-phone { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hotline-desc { color: var(--muted); }
.hotline-emergency { padding-top: 8px; border-top: 1px dashed var(--line-strong); }
.hotline-note { margin: 10px 0 0; color: var(--soft-muted); font-size: .8rem; line-height: 1.6; }
.compact-crisis { margin-top: 22px; }

/* ---------- 登录 / 注册 ---------- */
.auth-main { position: relative; overflow: hidden; padding: 46px 0 20px; background: radial-gradient(circle at 82% 18%, rgba(212, 223, 209, .5), transparent 32%), linear-gradient(180deg, #f7f8f1 0, var(--warm-white) 360px); }
.auth-main::before { content: ""; position: absolute; right: -120px; top: 80px; width: 330px; height: 330px; border: 1px solid var(--sage-200); border-radius: 50%; pointer-events: none; }
.auth-main > .container { position: relative; z-index: 1; }
.auth-container { display: flex; justify-content: center; }
.auth-card {
  width: min(520px, 100%);
  padding: 38px clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-top: 3px solid var(--forest-800);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.auth-heading h1 { margin: 4px 0 12px; font-family: var(--font-serif); font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-weight: 600; letter-spacing: -.03em; }
.auth-heading > p:last-child { color: var(--muted); font-size: .94rem; }
.auth-tabs { display: flex; gap: 6px; margin: 22px 0 20px; padding: 5px; border-radius: 12px; background: var(--forest-50); }
.auth-tab {
  flex: 1;
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
}
.auth-tab.is-active { color: var(--forest-900); background: var(--paper); box-shadow: 0 3px 10px rgba(32, 55, 46, .08); }
.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: .86rem; font-weight: 650; }
.field > span { color: var(--forest-900); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 400;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--forest-700); box-shadow: 0 0 0 3px rgba(59, 109, 86, .12); outline: none; }
.field small { color: var(--soft-muted); font-size: .76rem; font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.narrow-form { max-width: 460px; }
.auth-footnote { margin: 22px 0 0; color: var(--soft-muted); font-size: .8rem; line-height: 1.7; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- 我的账号 ---------- */
.account-main { padding: 34px 0 10px; }
.account-container { padding-bottom: 30px; }
.account-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.account-hero h1 { margin: 2px 0 6px; font-family: var(--font-serif); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -.03em; }
.account-hero p { margin: 0; color: var(--muted); font-size: .9rem; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-section { margin: 34px 0; }
.record-list { display: grid; gap: 12px; }
.record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .16s ease, transform .16s ease;
}
.record-card:hover { border-color: var(--sage-300); transform: translateY(-1px); }
.record-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.record-head strong { color: var(--forest-900); font-size: 1rem; }
.record-date { color: var(--soft-muted); font-size: .78rem; }
.record-body { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; }
.record-open { grid-column: 2; grid-row: 1 / span 2; color: var(--forest-700); font-size: .86rem; font-weight: 650; white-space: nowrap; }
.record-loading { color: var(--muted); font-size: .9rem; }
@media (max-width: 560px) {
  .record-card { grid-template-columns: 1fr; }
  .record-open { grid-column: 1; grid-row: auto; }
}

/* ---------- 管理后台 ---------- */
.admin-main { padding: 34px 0 10px; }
.admin-container { padding-bottom: 30px; }
.admin-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-hero h1 { margin: 2px 0 6px; font-family: var(--font-serif); font-size: clamp(1.8rem, 3.8vw, 2.4rem); font-weight: 600; letter-spacing: -.03em; }
.admin-hero p { margin: 0; color: var(--muted); font-size: .9rem; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 26px; }
.stat-card { position: relative; display: grid; gap: 3px; padding: 18px 20px; border: 1px solid var(--line); border-top: 2px solid var(--sage-300); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow); }
.stat-card:nth-child(3n + 1) { border-top-color: var(--forest-700); }
.stat-card:nth-child(3n + 2) { border-top-color: var(--gold); }
.stat-card strong { color: var(--forest-900); font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1.15; }
.stat-card span { color: var(--muted); font-size: .86rem; }
.stat-card small { color: var(--soft-muted); font-size: .74rem; }
.admin-tabs { position: sticky; top: 94px; z-index: 18; display: flex; gap: 6px; overflow-x: auto; margin: 8px 0 24px; padding: 5px; border-radius: 12px; background: rgba(240, 245, 239, .94); backdrop-filter: saturate(140%) blur(12px); scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs .auth-tab { flex: 0 0 auto; min-width: max-content; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-card { padding: 26px clamp(18px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.admin-card + .admin-card { margin-top: 0; }
.admin-detail { margin-top: 24px; }
.admin-detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.admin-detail-head h2 { margin: 2px 0 6px; font-size: 1.5rem; }
.admin-detail-head p { margin: 0; color: var(--muted); font-size: .86rem; }
.admin-note { margin: 8px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.7; }
.detail-block { margin: 26px 0; }
.detail-block h3 { margin-bottom: 12px; font-size: 1.05rem; }
.campaign-list { display: grid; gap: 12px; }
.campaign-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--warm-white); }
.campaign-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.campaign-card-head strong { color: var(--forest-900); }
.campaign-card-org { margin: 4px 0 8px; color: var(--muted); font-size: .84rem; }
.campaign-card-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; color: var(--soft-muted); font-size: .78rem; }
.status-pill { padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.status-active { color: #275a40; background: #e7f2e8; }
.status-closed { color: var(--muted); background: var(--sage-100); }
.severity-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.severity-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid transparent; border-radius: 999px; font-size: .8rem; }
.severity-chip strong { font-size: 1rem; }
.severity-chip.severity-neutral { background: var(--sage-100); color: var(--muted); }
.severity-chip.severity-low { background: #edf6ee; color: #2f6a4c; }
.severity-chip.severity-mild { background: #e7f2e8; color: #245c40; }
.severity-chip.severity-moderate { background: #fdf6dd; color: #7a5a1f; }
.severity-chip.severity-high { background: #fdeae4; color: #8d382f; }
.severity-chip.severity-crisis { background: var(--danger); color: #fff; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--forest-900); background: var(--forest-50); font-size: .78rem; font-weight: 700; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--warm-white); }
.code-panel { margin-top: 20px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--forest-50); }
.code-panel h3 { margin-bottom: 6px; font-size: 1rem; }
.code-panel p { margin: 0 0 12px; color: var(--muted); font-size: .84rem; }
.code-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 12px; }
.code-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: .82rem; }
.code-label { color: var(--muted); }
.code-item code { color: var(--forest-900); font-weight: 700; letter-spacing: .12em; }
.code-item .text-button { min-height: 28px; padding: 0; font-size: .78rem; }
.user-list { display: grid; gap: 10px; }
.user-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--warm-white); }
.user-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.user-card-head strong { color: var(--forest-900); }
.user-card-meta { margin: 4px 0 0; color: var(--soft-muted); font-size: .8rem; }
.user-card-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.role-pill { padding: 2px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.role-superadmin { color: #fff; background: var(--forest-800); }
.role-admin { color: #72552e; background: var(--gold-soft); }
.role-user { color: var(--muted); background: var(--sage-100); }
.inline-number { display: inline-flex; align-items: center; }
.inline-number input { width: 72px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }

/* ---------- 参与筛查 ---------- */
.campaign-main { padding: 40px 0 20px; }
.campaign-container { max-width: 780px; padding-bottom: 30px; }
.code-entry { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 26px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.code-entry .field { flex: 1 1 260px; }
.code-entry .form-status { flex-basis: 100%; margin: 0; }
.campaign-card { padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.campaign-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.campaign-head h1 { margin: 4px 0 8px; font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 600; letter-spacing: -.03em; }
.campaign-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.campaign-instructions { margin: 0 0 18px; color: var(--ink); font-size: .95rem; line-height: 1.8; }
.campaign-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.campaign-facts span { padding: 4px 11px; border-radius: 999px; background: var(--forest-50); color: var(--forest-700); font-size: .78rem; }
.campaign-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.campaign-actions .form-status { margin: 0; }
.campaign-notice { margin-top: 24px; padding: 18px 20px; border-radius: 14px; background: var(--gold-soft); color: #6b512c; font-size: .86rem; line-height: 1.75; }
.campaign-notice strong { display: block; margin-bottom: 4px; }
.campaign-notice p { margin: 0; }

/* 小屏导航由 860px 折叠菜单统一处理 */

/* ---------- 通用补充 ---------- */
.narrow-container { width: 100%; max-width: 780px; margin: 0 auto; }
.field-note { margin: 0 0 12px; color: var(--soft-muted); font-size: .82rem; line-height: 1.7; }
.guest-note { margin: 0; color: var(--soft-muted); font-size: .8rem; line-height: 1.6; }
.plain-list { margin: 0; padding-left: 20px; color: var(--muted); font-size: .9rem; line-height: 1.85; }
.plain-list li::marker { color: var(--sage-300); }
.empty-note { margin: 10px 0; color: var(--soft-muted); font-size: .88rem; }
.link-button { justify-self: start; min-height: 32px; padding: 0; border: 0; background: transparent; color: var(--forest-800); font: inherit; font-size: .86rem; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.link-button:hover { color: var(--forest-950); }
.form-status.is-success { color: #275a40; }

/* ---------- 登录 / 注册补充 ---------- */
.auth-container { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 320px); gap: 28px; justify-content: center; align-items: start; }
.auth-head h1 { margin: 4px 0 12px; font-family: var(--font-serif); font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-weight: 600; letter-spacing: -.03em; }
.auth-head > p:last-child { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.75; }
.auth-aside { padding: 26px 24px; border: 1px solid var(--line); border-top: 2px solid var(--sage-300); border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--forest-50), var(--paper)); }
.auth-aside h2 { margin: 0 0 12px; font-size: 1.1rem; }
.auth-aside .plain-list { padding-left: 18px; font-size: .86rem; }
.auth-note { margin: 16px 0 0; color: var(--soft-muted); font-size: .82rem; line-height: 1.7; }
.auth-note a { font-weight: 650; }
.auth-aside .plain-list { padding-left: 0; list-style: none; counter-reset: auth-benefit; }
.auth-aside .plain-list li { position: relative; padding-left: 38px; margin-bottom: 10px; }
.auth-aside .plain-list li::before { counter-increment: auth-benefit; content: counter(auth-benefit, decimal-leading-zero); position: absolute; left: 0; top: 2px; color: var(--gold); font-family: var(--font-display); font-size: .8rem; }
.code-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.code-send { min-height: 46px; white-space: nowrap; }
@media (max-width: 860px) {
  .auth-container { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .auth-aside { width: min(520px, 100%); }
}
@media (max-width: 480px) {
  .code-input-row { grid-template-columns: 1fr; }
  .code-send { width: 100%; }
}

/* ---------- 首页参与码入口 ---------- */
.join-code-panel { display: grid; gap: 8px; max-width: 470px; margin-top: 22px; padding: 16px 18px; border: 1px solid var(--sage-300); border-radius: 14px; background: var(--warm-white); }
.join-code-panel > label { color: var(--forest-900); font-size: .84rem; font-weight: 650; }
.join-code-row { display: flex; flex-wrap: wrap; gap: 10px; }
.join-code-row input { flex: 1 1 190px; min-height: 44px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); font: inherit; letter-spacing: .06em; }
.join-code-row input:focus { border-color: var(--forest-700); box-shadow: 0 0 0 3px rgba(59, 109, 86, .12); outline: none; }
.join-code-panel .field-note { margin: 0; }

/* ---------- 参与筛查补充 ---------- */
.campaign-hero { margin-bottom: 26px; }
.campaign-hero h1 { margin: 4px 0 10px; font-family: var(--font-serif); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -.03em; }
.campaign-hero > p:not(.eyebrow) { max-width: 650px; margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.8; }
.code-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 6px; }
.campaign-info-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.campaign-info-head h2 { margin: 2px 0 6px; font-family: var(--font-serif); font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 600; }
.campaign-meta { margin: 0; color: var(--muted); font-size: .86rem; }
.participant-state { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--gold-soft); color: #6b512c; font-size: .88rem; line-height: 1.7; }
.join-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 6px; }
.campaign-help h2 { margin-top: 0; font-size: 1.2rem; }
@media (max-width: 520px) { .code-form { grid-template-columns: 1fr; } }

/* 活动状态 */
.state-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; color: var(--muted); background: var(--sage-100); }
.state-pill.state-scheduled { color: #72552e; background: var(--gold-soft); }
.state-pill.state-open { color: #275a40; background: #e7f2e8; }
.state-pill.state-paused { color: #8a4a1c; background: #fcebdd; }
.state-pill.state-closed { color: var(--muted); background: var(--sage-100); }

/* ---------- 后台图表 ---------- */
.admin-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 20px 0; }
.chart-card { padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow); }
.chart-head h2 { margin: 0 0 4px; font-size: 1rem; }
.chart-head p { margin: 0 0 14px; color: var(--soft-muted); font-size: .78rem; }
.chart-body { min-height: 120px; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-donut { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.chart-donut .chart-svg { max-width: 190px; flex: 0 0 auto; }
.donut-value { fill: var(--forest-900); font-family: var(--font-serif); font-size: 26px; font-weight: 600; }
.donut-label { fill: var(--soft-muted); font-size: 11px; }
.chart-legend { display: grid; gap: 6px; flex: 1 1 150px; margin: 0; padding: 0; list-style: none; }
.chart-legend li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; }
.chart-legend strong { margin-left: auto; color: var(--forest-900); font-variant-numeric: tabular-nums; }
.legend-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; }
.legend-label { min-width: 0; }
.chart-empty { margin: 0; padding: 26px 0; color: var(--soft-muted); font-size: .85rem; text-align: center; }
.chart-grid-line { stroke: #e6ece7; stroke-width: 1; }
.chart-bar { transition: opacity .15s ease; }
.chart-bar:hover { opacity: .82; }
.chart-value { fill: var(--forest-800); font-size: 11px; font-weight: 650; }
.chart-label { fill: var(--soft-muted); font-size: 11px; }
.chart-tick { fill: var(--soft-muted); font-size: 10px; }
.chart-area { fill: rgba(79, 143, 116, .13); }
.chart-line { fill: none; stroke: #4f8f74; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: #4f8f74; }
.chart-progress-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.chart-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: .82rem; }
.chart-progress-name { color: var(--forest-900); font-weight: 650; }
.chart-progress-meta { color: var(--soft-muted); font-size: .76rem; }
.chart-progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: var(--sage-100); }
.chart-progress-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6ba58b, #3b6d56); transition: width .4s ease; }
.chart-fill-crisis { background: #8d382f; }
.chart-fill-high { background: #b5543f; }
.chart-fill-moderate { background: #c98a3c; }
.chart-fill-mild { background: #b6a24a; }
.chart-fill-low { background: #4f8f74; }

/* ---------- 后台活动列表与详情 ---------- */
.campaign-item { position: relative; display: grid; gap: 6px; width: 100%; padding: 14px 40px 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--warm-white); font: inherit; text-align: left; cursor: pointer; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.campaign-item::after { content: "→"; position: absolute; right: 16px; top: 50%; color: var(--sage-300); font-size: 1rem; transform: translateY(-50%); transition: color .16s ease, transform .16s var(--ease-out); }
.campaign-item:hover { border-color: var(--sage-300); box-shadow: var(--shadow); transform: translateY(-1px); }
.campaign-item:hover::after { color: var(--forest-700); transform: translate(3px, -50%); }
.campaign-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 4px; }
.campaign-item-head strong { color: var(--forest-900); }
.campaign-item-meta { margin: 0; color: var(--muted); font-size: .8rem; }
.campaign-item-progress { display: flex; justify-content: space-between; gap: 10px; color: var(--soft-muted); font-size: .76rem; }
.campaign-progress { height: 4px; overflow: hidden; margin-top: 3px; border-radius: 999px; background: var(--sage-100); }
.campaign-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7aa98f, var(--forest-700)); transition: width .35s var(--ease-out); }
.detail-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.join-code-panel { display: grid; gap: 8px; margin: 20px 0; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--forest-50); }
.join-code-label { color: var(--muted); font-size: .78rem; }
.join-code-panel .join-code { color: var(--forest-900); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .18em; }
.join-code-hint, .join-code-link { color: var(--soft-muted); font-size: .78rem; word-break: break-all; }
.code-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.schedule-panel { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--warm-white); }
.panel-head { margin-bottom: 12px; }
.panel-head h3 { margin: 0 0 4px; font-size: 1.02rem; }
.panel-head p { margin: 0; color: var(--soft-muted); font-size: .8rem; line-height: 1.6; }
.schedule-form { gap: 12px; }
.flag-list { display: grid; gap: 10px; }
.flag-item { padding: 12px 15px; border-left: 3px solid var(--danger); border-radius: 0 10px 10px 0; background: #fdf1ee; }
.flag-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flag-head strong { color: var(--forest-900); }
.flag-meta { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.inline-number-input, .inline-text-input { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); font: inherit; }
.inline-number-input { width: 110px; }
.file-input { min-height: 44px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--paper); font-size: .82rem; }
.roster-output { display: grid; gap: 8px; margin-top: 10px; }
.result-title { margin: 0; color: var(--forest-900); font-size: .9rem; font-weight: 650; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filter-row label { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.filter-row select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); font: inherit; font-size: .82rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap .empty-note { margin: 0; padding: 18px; }
.data-table .code-cell { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.data-table tr.is-danger-row td { background: #fdf3f0; }
.user-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--warm-white); }
.user-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.user-item-head strong { color: var(--forest-900); }
.user-item-meta { margin: 4px 0 0; color: var(--soft-muted); font-size: .8rem; }
.user-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.user-note { color: var(--soft-muted); font-size: .76rem; }
.user-reset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }

/* ---------- 账号资料 ---------- */
.email-panel { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.email-current { margin: 0 0 14px; color: var(--muted); font-size: .88rem; }
.email-current strong { color: var(--forest-900); }

/* ========== 主题、全局组件与新功能样式 ========== */

/* ---------- 主题切换按钮 ---------- */
.theme-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}
.theme-toggle:hover { color: var(--forest-900); background: var(--forest-50); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .theme-icon { display: none; }
.theme-toggle[data-mode="auto"] .theme-icon-auto,
.theme-toggle[data-mode="light"] .theme-icon-light,
.theme-toggle[data-mode="dark"] .theme-icon-dark { display: block; }

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: var(--forest-800);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top svg { width: 21px; height: 21px; }

/* ---------- 轻提示 ---------- */
.toast-region {
  position: fixed;
  z-index: 140;
  left: 50%;
  bottom: 26px;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: #214b3b;
  color: #f3f8f4;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  font-size: .88rem;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: auto;
  cursor: pointer;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast-success { background: #2f6049; }
.toast-error { background: #8d382f; }

/* ---------- 作答页：键盘提示、专注模式、题目导航 ---------- */
.take-header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.keyboard-hint { color: var(--soft-muted); font-size: .75rem; }
.focus-toggle { white-space: nowrap; }
.question-map { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.question-map > summary {
  min-height: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--forest-800);
  font-size: .85rem;
  font-weight: 650;
  cursor: pointer;
  list-style-position: inside;
}
.question-map > summary span { color: var(--soft-muted); font-size: .76rem; font-weight: 400; }
.question-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
  padding: 8px 0 2px;
}
.question-map-button {
  min-height: 40px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.question-map-button:hover { border-color: var(--sage-300); color: var(--forest-900); }
.question-map-button.is-answered { color: var(--forest-800); background: var(--forest-50); border-color: var(--sage-300); }
.question-map-button.is-current { color: #fff; background: #214b3b; border-color: #214b3b; font-weight: 700; }
.question-map-button.is-failed { color: var(--danger); border-color: var(--danger); }
.remaining-time { color: var(--soft-muted); font-size: .75rem; }

body.is-focus-mode .site-header,
body.is-focus-mode .site-footer,
body.is-focus-mode .breadcrumb,
body.is-focus-mode .resume-notice,
body.is-focus-mode .copy-feedback,
body.is-focus-mode .take-privacy,
body.is-focus-mode .compact-crisis { display: none !important; }
body.is-focus-mode .take-container { max-width: 760px; }
body.is-focus-mode .take-shell { padding-top: 26px; }
body.is-focus-mode .focus-stack { min-height: calc(100vh - 150px); justify-content: center; }
body.is-focus-mode .question-card { padding: 46px; box-shadow: var(--shadow-lift); }
body.is-focus-mode .question-text { font-size: clamp(1.45rem, 3.2vw, 1.95rem); }
body.is-focus-mode .take-header-actions .resume-copy { display: none; }

/* ---------- 结果页目录 ---------- */
.result-toc {
  position: sticky;
  z-index: 15;
  top: 96px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 0 0 20px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.result-toc a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 6px 13px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: .82rem;
  white-space: nowrap;
}
.result-toc a:hover { color: var(--forest-900); background: var(--forest-50); }
.result-toc a.is-active { color: var(--forest-900); background: var(--forest-50); box-shadow: inset 3px 0 0 var(--forest-700); font-weight: 650; }
.result-section, .score-summary, .answer-details { scroll-margin-top: 112px; }

/* ---------- 趋势与复测提醒 ---------- */
.trend-section .section-heading { margin-bottom: 14px; }
.trend-delta { font-weight: 650; color: var(--forest-800); }
.trend-delta.is-up { color: var(--danger); }
.trend-note { color: var(--soft-muted); font-size: .8rem; line-height: 1.7; }
.trend-chart-wrap { margin: 10px 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--warm-white); }
.trend-table .code-cell { letter-spacing: 0; }
.mini-trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.mini-trend-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.mini-trend-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mini-trend-head strong { color: var(--forest-900); font-size: .95rem; }
.mini-trend-head span { color: var(--soft-muted); font-size: .78rem; }
.reminder-panel { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--warm-white); }
.reminder-current { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.reminder-current strong { color: var(--forest-900); }
.reminder-status { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--sage-100); color: var(--muted); }
.reminder-status.is-due { color: #7a3a2f; background: #fdeae4; }
.reminder-status.is-soon { color: #7a5a1f; background: #f7f0df; }
.reminder-status.is-done { color: #275a40; background: #e7f2e8; }
.reminder-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.reminder-form label { display: grid; gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.reminder-interval { display: inline-flex; gap: 6px; }
.reminder-interval select { min-width: 86px; }
.reminder-form select { min-height: 44px; padding: 8px 34px 8px 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); }
.reminder-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: .84rem; }
.reminder-check input { width: 19px; height: 19px; min-height: 19px; margin: 0; accent-color: var(--forest-800); }
.reminder-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.reminder-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.reminder-item strong { color: var(--forest-900); }
.reminder-item p { margin: 2px 0 0; color: var(--soft-muted); font-size: .78rem; }
.reminder-item-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.reminder-item-actions .button { min-height: 40px; padding: 7px 12px; font-size: .8rem; }
.reminder-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--danger-line); border-radius: 11px; background: var(--danger-soft); color: var(--danger-dark); font-size: .86rem; }

/* ---------- 账号页筛选 ---------- */
.record-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.record-filters label { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.record-filters select { min-height: 40px; padding: 6px 30px 6px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); font: inherit; font-size: .82rem; }
.record-count { margin: 0 0 10px; color: var(--soft-muted); font-size: .8rem; }

/* ---------- 分页 ---------- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--muted); font-size: .82rem; }
.pagination-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination-actions .button { min-height: 40px; padding: 7px 14px; font-size: .82rem; }

/* ---------- 二维码与海报 ---------- */
.qr-box { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--warm-white); }
.qr-box img { width: 136px; height: 136px; padding: 6px; border-radius: 10px; background: #fff; }
.qr-copy { min-width: 180px; flex: 1 1 200px; }
.qr-copy strong { display: block; color: var(--forest-900); font-size: .9rem; }
.qr-copy p { margin: 3px 0 10px; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-actions .button { min-height: 40px; padding: 7px 13px; font-size: .8rem; }
.poster-note { color: var(--soft-muted); font-size: .76rem; }

/* ---------- 操作日志 ---------- */
.event-table .event-type { font-weight: 650; color: var(--forest-800); }
.event-table .event-payload { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.event-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.event-filter label { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.event-filter select { min-height: 40px; padding: 6px 30px 6px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); font: inherit; font-size: .82rem; }
.chart-range { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; }
.chart-range span { color: var(--soft-muted); font-size: .78rem; }
.range-button { min-height: 38px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: .8rem; font-weight: 650; }
.range-button.is-active { color: #fff; background: #214b3b; border-color: #214b3b; }
.detail-qr { margin-top: 14px; }

/* ---------- 打印补充 ---------- */
@media print {
  .theme-toggle, #back-to-top, .toast-region, .result-toc, .reminder-panel,
  .trend-section, .owner-badge, .share-management, .new-share, .qr-box,
  .no-print { display: none !important; }
  body { background: #fff; color: #111; }
  .result-section, .score-summary, .answer-details { border-color: #d8d8d8; }
  a { color: #111; text-decoration: none; }
}

/* ========== 深色主题 ========== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --header-bg: rgba(22, 29, 25, .94);
  --header-shadow: 0 8px 26px rgba(0, 0, 0, .32);
  --forest-950: #f0f7f2;
  --forest-900: #e2efe6;
  --forest-800: #c7dccd;
  --forest-700: #a9c9b7;
  --forest-100: #2a3a31;
  --forest-50: #1c2621;
  --sage-300: #4a5f55;
  --sage-200: #35443c;
  --sage-100: #223029;
  --warm-white: #1b241f;
  --paper: #161d19;
  --ink: #e6ece8;
  --muted: #a9b8b0;
  --soft-muted: #83948c;
  --line: #2b3731;
  --line-strong: #3b4a43;
  --gold: #c9a46f;
  --gold-soft: #2e2a1f;
  --danger: #e38b7f;
  --danger-dark: #f0a99d;
  --danger-soft: #2f211e;
  --danger-line: #5a3a34;
  --shadow: 0 12px 36px rgba(0, 0, 0, .38);
  --shadow-lift: 0 16px 40px rgba(0, 0, 0, .5);
}
:root[data-theme="dark"] .site-header { background: rgba(22, 29, 25, .97); border-bottom-color: rgba(59, 74, 67, .85); }
:root[data-theme="dark"] .site-header.is-scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .42); }
:root[data-theme="dark"] .hero::after { opacity: .2; background-image: linear-gradient(rgba(143, 195, 168, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 195, 168, .08) 1px, transparent 1px); }
:root[data-theme="dark"] .filter-panel { background: rgba(22, 29, 25, .94); }
:root[data-theme="dark"] .auth-main { background: radial-gradient(circle at 82% 18%, rgba(59, 84, 70, .36), transparent 32%), linear-gradient(180deg, #1e2822 0, var(--warm-white) 360px); }
:root[data-theme="dark"] .campaign-progress > span { background: linear-gradient(90deg, #4f8f74, #8fc3a8); }
:root[data-theme="dark"] .site-footer { background: #101713; color: #c3d2c8; }
:root[data-theme="dark"] .footer-brand { color: #f2f7f3; }
:root[data-theme="dark"] .site-footer nav a { color: #d4e0d7; }
:root[data-theme="dark"] .button-primary { color: #0e1712; background: #8fc3a8; border-color: #8fc3a8; box-shadow: none; }
:root[data-theme="dark"] .button-primary:hover { color: #0e1712; background: #a7d3bb; border-color: #a7d3bb; }
:root[data-theme="dark"] .button-secondary { background: var(--paper); }
:root[data-theme="dark"] .hero { background: radial-gradient(circle at 84% 15%, rgba(59, 84, 70, .38), transparent 30%), linear-gradient(180deg, #1e2822 0%, var(--warm-white) 100%); }
:root[data-theme="dark"] .reflection-card { background: rgba(24, 32, 27, .92); border-color: var(--line-strong); }
:root[data-theme="dark"] .shape-two { background: rgba(34, 48, 41, .5); }
:root[data-theme="dark"] .take-main { background: linear-gradient(180deg, #1e2822 0, var(--warm-white) 390px); }
:root[data-theme="dark"] .result-main,
:root[data-theme="dark"] .references-main { background: linear-gradient(180deg, #1e2822 0, var(--warm-white) 380px); }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .choice-option,
:root[data-theme="dark"] .native-answer input,
:root[data-theme="dark"] .question-figure img,
:root[data-theme="dark"] .choice-list.is-image-grid .choice-image img { background: #1e2822; }
:root[data-theme="dark"] input::placeholder { color: #7c8b83; }
:root[data-theme="dark"] .choice-option.is-selected { background: var(--forest-50); }
:root[data-theme="dark"] .download-button:hover { background: var(--warm-white); }
:root[data-theme="dark"] .error-state { background: #261d1a; border-color: var(--danger-line); }
:root[data-theme="dark"] .risk-alert { background: var(--danger-soft); }
:root[data-theme="dark"] .risk-alert p,
:root[data-theme="dark"] .crisis-card p { color: #e9c4bc; }
:root[data-theme="dark"] .risk-emergency { background: #2a1e1b; }
:root[data-theme="dark"] .crisis-card { border-color: var(--danger-line); }
:root[data-theme="dark"] .privacy-toc { background: rgba(22, 29, 25, .97); }
:root[data-theme="dark"] .privacy-section code { background: var(--sage-100); }
:root[data-theme="dark"] .network-banner { color: #e2c58c; background: #2e2a1f; border-bottom-color: #4a4127; }
:root[data-theme="dark"] .tag-available,
:root[data-theme="dark"] .status-active,
:root[data-theme="dark"] .state-pill.state-open,
:root[data-theme="dark"] .severity-low { color: #a8d8b8; background: #1f3329; border-color: #31543f; }
:root[data-theme="dark"] .tag-professional,
:root[data-theme="dark"] .state-pill.state-scheduled,
:root[data-theme="dark"] .severity-mild { color: #b7e4c4; background: #24402f; border-color: #3a5c46; }
:root[data-theme="dark"] .tag-review { color: var(--muted); background: var(--sage-100); border-color: var(--line); }
:root[data-theme="dark"] .severity-moderate,
:root[data-theme="dark"] .state-pill.state-paused { color: #e6c97a; background: #332c17; border-color: #574a20; }
:root[data-theme="dark"] .severity-high { color: #f3b3a7; background: #35211d; border-color: #5a352e; }
:root[data-theme="dark"] .severity-crisis { color: #fff; background: var(--danger); border-color: var(--danger); }
:root[data-theme="dark"] .severity-chip.severity-neutral { background: var(--sage-100); color: var(--muted); }
:root[data-theme="dark"] .severity-chip.severity-low { background: #1f3329; color: #a8d8b8; }
:root[data-theme="dark"] .severity-chip.severity-mild { background: #24402f; color: #b7e4c4; }
:root[data-theme="dark"] .severity-chip.severity-moderate { background: #332c17; color: #e6c97a; }
:root[data-theme="dark"] .severity-chip.severity-high { background: #35211d; color: #f3b3a7; }
:root[data-theme="dark"] .severity-chip.severity-crisis { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .metric-card.is-danger,
:root[data-theme="dark"] .band-card.is-danger,
:root[data-theme="dark"] .score-summary.is-danger .primary-score-card,
:root[data-theme="dark"] .severity-alert { background: var(--danger-soft); }
:root[data-theme="dark"] .campaign-notice,
:root[data-theme="dark"] .participant-state { color: #e2c58c; background: #2e2a1f; }
:root[data-theme="dark"] .chart-grid-line { stroke: #2e3a33; }
:root[data-theme="dark"] .chart-progress-track { background: var(--sage-100); }
:root[data-theme="dark"] .chart-line { stroke: #7fb79b; }
:root[data-theme="dark"] .chart-dot { fill: #7fb79b; }
:root[data-theme="dark"] .auth-tabs,
:root[data-theme="dark"] .admin-tabs { background: var(--forest-50); }
:root[data-theme="dark"] .auth-tab.is-active { color: var(--forest-900); background: #26332c; box-shadow: none; }
:root[data-theme="dark"] .data-table th { background: var(--forest-50); }
:root[data-theme="dark"] .data-table tbody tr:hover { background: #1e2822; }
:root[data-theme="dark"] .data-table tr.is-danger-row td { background: #2a1e1b; }
:root[data-theme="dark"] .flag-item { background: #2a1e1b; border-left-color: var(--danger); }
:root[data-theme="dark"] .role-superadmin { color: #fff; background: #2c5b47; }
:root[data-theme="dark"] .role-admin { color: #e2c58c; background: #2e2a1f; }
:root[data-theme="dark"] .range-button.is-active { color: #0e1712; background: #8fc3a8; border-color: #8fc3a8; }
:root[data-theme="dark"] .question-map-button.is-current { color: #0e1712; background: #8fc3a8; border-color: #8fc3a8; }
:root[data-theme="dark"] .reminder-status.is-due { color: #f3b3a7; background: #35211d; }
:root[data-theme="dark"] .reminder-status.is-soon { color: #e2c58c; background: #2e2a1f; }
:root[data-theme="dark"] .reminder-status.is-done { color: #9fd4b3; background: #21392e; }

/* ---------- 细节补充 ---------- */
.filter-row input[type="search"] { min-width: 220px; flex: 1 1 180px; }
.new-share .qr-box { margin-top: 14px; }
.result-heading-actions .button { min-height: 38px; padding: 5px 12px; font-size: .82rem; }
.qr-actions .button svg { width: 17px; height: 17px; }
@media (max-width: 560px) {
  .filter-row input[type="search"] { min-width: 100%; }
  .qr-box img { width: 112px; height: 112px; }
  .result-heading-actions { justify-content: flex-start; margin-top: 12px; }
}

/* ---------- 后台导出小按钮与深色危机徽标 ---------- */
.chip-button { min-height: 36px; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: var(--forest-800); font-size: .8rem; font-weight: 650; }
.chip-button:hover { border-color: var(--sage-300); background: var(--forest-50); }
.export-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; }
.state-actions-inline { display: flex; flex-wrap: wrap; gap: 6px; }
:root[data-theme="dark"] .severity-crisis,
:root[data-theme="dark"] .severity-chip.severity-crisis { color: #fff; background: #8d382f; border-color: #a95045; }

/* ---------- 登录 / 注册切换与品牌字样 ---------- */
.brand-type small { letter-spacing: .14em; }
.auth-switch {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
  text-align: center;
}
.auth-switch a { font-weight: 650; }
.auth-switch-button { min-height: 36px; font-size: .88rem; }
.take-privacy a { color: var(--forest-800); }

/* ---------- 二级页面、弹窗与授权 ---------- */
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--warm-white); }
}
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 10px 0 2px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.back-link svg { width: 18px; height: 18px; }
.back-link:hover { color: var(--forest-900); }
.campaign-detail-hero { align-items: flex-start; }
.detail-status { margin: 0 0 16px; }
.button-danger { border: 1px solid #8d382f; background: #8d382f; color: #fff; }
.button-danger:hover { border-color: #6f2923; background: #6f2923; color: #fff; }
.button-danger.is-armed { border-color: #6f2923; background: #6f2923; }
.edit-dialog { width: min(580px, calc(100% - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lift); }
.edit-dialog::backdrop { background: rgba(14, 23, 18, .55); backdrop-filter: blur(2px); }
.edit-dialog form { padding: 22px 24px 24px; overflow-y: auto; max-height: calc(100vh - 64px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-head h2 { margin: 0 0 4px; }
.icon-button { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--muted); font-size: 1.25rem; line-height: 1; }
.icon-button:hover { border-color: var(--sage-300); color: var(--forest-900); }
.grant-result { margin-top: 16px; }
.grant-card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--warm-white); }
.grant-card .code-actions { margin-top: 4px; }
.grant-create { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.grant-create h3 { margin: 0 0 4px; }
.grant-create > p { margin: 0 0 12px; color: var(--muted); font-size: .86rem; }
.roster-create { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--forest-50); }
.roster-create .field-note { margin: 0; }
.sample-table { font-size: .82rem; color: var(--muted); }
.sample-table summary { min-height: 36px; display: flex; align-items: center; color: var(--forest-800); font-weight: 650; cursor: pointer; }
.sample-table p { margin: 8px 0 0; }
.list-filter { margin: 0 0 12px; }
.list-filter .inline-text-input { flex: 1 1 200px; }
.event-filter label { min-width: 220px; }
@media (max-width: 720px) {
  .result-toc { position: static; }
  .result-section, .score-summary, .answer-details { scroll-margin-top: 24px; }
  .campaign-detail-hero .detail-controls { width: 100%; }
  .detail-controls .state-actions-inline { flex-wrap: wrap; }
}

/* ---------- 逐题记录弹窗 ---------- */
.answer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 22px 0; color: var(--soft-muted); font-size: .8rem; }
.answer-actions .button svg { width: 18px; height: 18px; }
.answer-dialog { width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 64px); padding: 22px 24px; border: 1px solid var(--line); border-top: 3px solid var(--forest-800); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lift); }
.answer-dialog::backdrop { background: rgba(14, 23, 18, .55); backdrop-filter: blur(2px); }
.answer-dialog .dialog-head { margin-bottom: 12px; }
.dialog-scroll { max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 4px; }
.answer-dialog .response-list { margin: 0; }
@media (max-width: 640px) {
  .answer-dialog { padding: 18px 16px; }
  .dialog-scroll { max-height: calc(100vh - 170px); }
}
.record-filters input[type="search"] { min-height: 40px; min-width: 150px; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); font: inherit; font-size: .82rem; }

/* ---------- 移动端折叠导航 ---------- */
@media (max-width: 860px) {
  html { scroll-padding-top: 88px; }
  .header-inner { position: relative; min-height: 72px; flex-wrap: nowrap; justify-content: flex-start; gap: 10px; padding: 10px 0; }
  .brand { margin-right: auto; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 40;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    width: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow-lift);
    backdrop-filter: saturate(140%) blur(12px);
  }
  .header-inner.is-nav-open .main-nav { display: flex; }
  .main-nav a { width: 100%; min-height: 48px; justify-content: flex-start; padding: 10px 14px; border-radius: 9px; font-size: .95rem; }
  .main-nav a[aria-current="page"]::after { display: none; }
  .main-nav .theme-toggle { width: 100%; height: 44px; justify-content: flex-start; gap: 10px; padding: 10px 14px; border-radius: 9px; }
  .main-nav .theme-toggle::after { content: "切换主题"; color: var(--muted); font-size: .9rem; }
  .main-nav .theme-toggle .theme-icon { width: 20px; height: 20px; }
}
@media (max-width: 420px) {
  .brand-type small { display: none; }
  .brand-type strong { font-size: 1.08rem; }
}

/* ---------- 后台详情与数据表精修 ---------- */
.chart-head h2 { font-family: var(--font-sans); font-size: .98rem; letter-spacing: 0; }
.campaign-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.campaign-detail-hero .detail-controls { display: grid; justify-items: end; gap: 10px; }
.campaign-detail-hero .state-actions-inline { justify-content: flex-end; }
#campaign-delete { margin-left: 6px; }
.data-table thead th { position: sticky; top: 0; z-index: 2; }
.participant-block .table-wrap { max-height: 620px; overflow: auto; }
@media (max-width: 860px) {
  .admin-tabs { top: 82px; }
}
@media (max-width: 800px) {
  .result-next-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .admin-stats, .detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campaign-detail-hero { grid-template-columns: 1fr; }
  .campaign-detail-hero .detail-controls { justify-items: stretch; }
  .campaign-detail-hero .state-actions-inline, .campaign-detail-hero .export-actions { justify-content: flex-start; }
  #campaign-delete { margin-left: 0; }
  .result-next-steps { grid-template-columns: 1fr; }
}

/* ---------- 备案、浮动目录与表单精修 ---------- */
.footer-icp { color: #dbe4dc; text-decoration: none; }
.footer-icp:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.privacy-toc { top: 94px; z-index: 18; background: rgba(240, 245, 239, .94); backdrop-filter: saturate(140%) blur(12px); }
.privacy-toc a.is-active { color: var(--forest-900); background: var(--paper); font-weight: 700; box-shadow: var(--shadow); }
.privacy-section { scroll-margin-top: 76px; }
:root[data-theme="dark"] .privacy-toc a.is-active { background: var(--forest-50); }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.campaign-meta, .campaign-item-meta, .user-item-meta, .user-card-meta, .record-head, .record-body, .detail-head p { overflow-wrap: anywhere; }
html.is-dialog-open, body.is-dialog-open { overflow: hidden; }
@supports (scrollbar-gutter: stable) { html { scrollbar-gutter: stable; } }
.nav-home-link { display: none !important; }

/* ---------- 自定义日期时间选择 ---------- */
.custom-datetime { position: relative; width: 100%; min-width: 0; }
.custom-datetime-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  font-size: .95rem;
}
.custom-datetime-button:hover { border-color: var(--sage-300); }
.custom-datetime-button[aria-expanded="true"] { border-color: var(--forest-700); box-shadow: 0 0 0 3px rgba(59, 109, 86, .12); }
.custom-datetime-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-datetime-value.is-empty { color: var(--soft-muted); }
.custom-datetime-icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.custom-datetime-popover {
  position: absolute;
  z-index: 70;
  top: calc(100% + 6px);
  left: 0;
  width: min(320px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-lift);
}
.datetime-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.datetime-month { color: var(--forest-900); font-size: .95rem; }
.datetime-nav { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--forest-800); font-size: 1.2rem; line-height: 1; }
.datetime-nav:hover { background: var(--forest-50); }
.datetime-weekdays, .datetime-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.datetime-weekdays span { padding: 4px 0; color: var(--soft-muted); font-size: .72rem; text-align: center; }
.datetime-day { min-height: 36px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font-size: .86rem; }
.datetime-day:hover { background: var(--forest-50); }
.datetime-day.is-blank { pointer-events: none; }
.datetime-day.is-today { border-color: var(--sage-200); color: var(--forest-800); font-weight: 700; }
.datetime-day.is-selected { background: var(--forest-900); border-color: var(--forest-900); color: #fff; font-weight: 700; }
.datetime-time { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.datetime-time-label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8rem; font-weight: 650; }
.datetime-time-input { width: 46px; min-height: 38px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink); text-align: center; font-size: .88rem; font-variant-numeric: tabular-nums; }
.datetime-colon { color: var(--muted); }
.datetime-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.datetime-actions .button { min-height: 40px; padding: 8px 16px; }

/* ---------- 删除确认与分享管理 ---------- */
.button-quiet.detail-delete { min-height: 38px; padding: 6px 10px; color: var(--danger); font-size: .84rem; font-weight: 600; }
.button-quiet.detail-delete:hover { background: var(--danger-soft); color: var(--danger-dark); }
.confirm-dialog { width: min(430px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-top: 3px solid var(--danger); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lift); }
.confirm-dialog::backdrop { background: rgba(14, 23, 18, .55); backdrop-filter: blur(2px); }
.confirm-dialog h2 { margin: 0 0 8px; font-size: 1.3rem; }
.confirm-dialog p { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.confirm-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.share-manage { display: grid; gap: 10px; }
.share-manage-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--warm-white); }
.share-manage-info { min-width: 0; display: grid; gap: 3px; }
.share-manage-info strong { color: var(--forest-900); overflow-wrap: anywhere; }
.share-manage-info span { color: var(--soft-muted); font-size: .8rem; overflow-wrap: anywhere; }
.share-manage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.share-manage-search { margin-bottom: 10px; }

/* ---------- 移动端细节 ---------- */
@media (max-width: 860px) {
  .privacy-toc { top: 84px; }
  .privacy-section { scroll-margin-top: 138px; }
  .main-nav a.nav-home-link { display: inline-flex !important; }
}
@media (max-width: 560px) {
  .edit-dialog, .answer-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .edit-dialog form { padding: 18px 16px 20px; overflow-x: hidden; }
  .custom-datetime-popover { width: min(300px, calc(100vw - 32px)); }
}
.reminder-form input[type="number"] { width: 96px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); }
.field { min-width: 0; }
.field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.field input, .field select, .field textarea { max-width: 100%; }
html, body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: pan-x pan-y; }
.file-input-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden; opacity: 0; pointer-events: none; }
.file-name { min-width: 0; color: var(--soft-muted); font-size: .8rem; overflow-wrap: anywhere; }
.edit-dialog, .edit-dialog form { max-height: calc(100dvh - 32px); }
.answer-dialog { max-height: calc(100dvh - 32px); }
.dialog-scroll { max-height: calc(100dvh - 190px); }
@media (max-width: 640px) {
  .dialog-scroll { max-height: calc(100dvh - 160px); }
}
.mode-note { margin: -6px 0 2px; }
.identity-builder { display: grid; gap: 12px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--forest-50); }
.identity-builder-head strong { color: var(--forest-900); font-size: .9rem; }
.identity-builder-head p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.identity-list { display: grid; gap: 8px; }
.identity-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.identity-row .inline-text-input { width: 100%; min-height: 42px; }
.identity-required { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.identity-row .button { min-height: 38px; padding: 5px 8px; font-size: .8rem; }
@media (max-width: 480px) {
  .identity-row { grid-template-columns: 1fr auto; }
  .identity-row .identity-required { grid-column: 1; }
}
.campaign-info-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.identity-fields-list { display: grid; gap: 14px; }
.campaign-continuation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 22px 0 8px; padding: 20px 22px; border: 1px solid var(--line-strong); border-left: 4px solid var(--gold); border-radius: var(--radius-md); background: var(--gold-soft); }
.campaign-continuation h2 { margin: 0 0 4px; font-size: 1.15rem; }
.campaign-continuation p { margin: 0; color: var(--muted); font-size: .88rem; }
.campaign-continuation .button { flex: 0 0 auto; }
@media (max-width: 600px) { .campaign-continuation { flex-direction: column; align-items: flex-start; } .campaign-continuation .button { width: 100%; } }
.scale-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.scale-picker .button { min-height: 44px; white-space: nowrap; }
.scale-pick-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.scale-pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); }
.scale-pick-index { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 999px; background: var(--forest-50); color: var(--forest-900); font-size: .78rem; font-weight: 700; }
.scale-pick-name { flex: 1 1 auto; min-width: 0; color: var(--ink); font-size: .84rem; line-height: 1.5; overflow-wrap: anywhere; }
.scale-pick-item .button { flex: 0 0 auto; min-height: 34px; padding: 4px 10px; font-size: .78rem; }
.scale-pick-empty { margin: 0; padding: 2px; color: var(--muted); font-size: .8rem; line-height: 1.7; }
@media (max-width: 480px) {
  .scale-picker { grid-template-columns: 1fr; }
  .scale-picker .button { width: 100%; }
}
