/* 黎仙心理测评 - 温和、清晰的疗愈系视觉系统 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand: #356e63;
  --brand-deep: #173d38;
  --brand-ink: #102f2b;
  --brand-soft: #e7f1ec;
  --brand-mist: #f1f6f3;
  --accent: #e9986a;
  --accent-soft: #fff0e5;
  --sun: #f2c96d;
  --lavender: #9c91c7;
  --danger: #c95f55;
  --danger-soft: #fff0ed;
  --warning: #a97426;
  --warning-soft: #fff7e6;
  --success: #2f8569;
  --success-soft: #e9f7f0;
  --ink: #1c302d;
  --muted: #687a76;
  --faint: #91a09c;
  --canvas: #f4f1e9;
  --surface: #fffdf9;
  --white: #fff;
  --line: rgba(28, 63, 56, .12);
  --line-strong: rgba(28, 63, 56, .2);
  --shadow-sm: 0 10px 28px rgba(30, 61, 54, .06);
  --shadow-md: 0 20px 55px rgba(28, 61, 53, .1);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --display: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: "Avenir Next", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(242, 201, 109, .18), transparent 24rem),
    radial-gradient(circle at 96% 30%, rgba(156, 145, 199, .11), transparent 22rem),
    var(--canvas);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  animation: pageIn .45s ease-out both;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  z-index: -1;
  background-image: radial-gradient(rgba(16, 47, 43, .25) .55px, transparent .55px);
  background-size: 7px 7px;
  mask-image: linear-gradient(to bottom, #000, transparent 65%);
}

a { color: var(--brand); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--brand-deep); background: #f6dcc9; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #bcc9c4;
  border: 3px solid var(--canvas);
  border-radius: 99px;
}

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.container.narrow { width: min(880px, calc(100% - 40px)); }

/* 通用头部与品牌 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 12px 0;
  background: rgba(250, 248, 242, .84);
  border-bottom: 1px solid rgba(28, 63, 56, .08);
  backdrop-filter: blur(18px);
}
.header-inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--brand-ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--surface);
  background: var(--brand-deep);
  border-radius: 13px 13px 13px 5px;
  box-shadow: 0 7px 18px rgba(23, 61, 56, .18);
}
.logo-mark svg { width: 24px; height: 24px; display: block; }
.logo-copy { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .08em; }
.logo-copy small { margin-top: 5px; color: var(--muted); font-family: var(--sans); font-size: 9px; font-weight: 500; letter-spacing: .22em; }
.nav { display: flex; align-items: center; gap: 5px; }
.nav-link {
  padding: 8px 14px;
  color: var(--muted);
  border-radius: 99px;
  font-size: 14px;
  text-decoration: none;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--brand-deep); background: rgba(255, 255, 255, .7); }
.nav-link.active { color: var(--brand-deep); background: var(--white); box-shadow: 0 5px 18px rgba(28, 63, 56, .07); font-weight: 600; }
.auth-area { display: flex; align-items: center; gap: 9px; }
.auth-greeting { color: var(--muted); font-size: 13px; }
.auth-greeting strong { color: var(--ink); }

/* 按钮 */
.btn {
  min-height: 42px;
  padding: 9px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  background: var(--brand);
  border: 1px solid transparent;
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(53, 110, 99, .16);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
}
.btn:hover { background: #2e6459; box-shadow: 0 11px 26px rgba(53, 110, 99, .22); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible, .nav-link:focus-visible, .q-option:focus-visible { outline: 3px solid rgba(233, 152, 106, .4); outline-offset: 3px; }
.btn:disabled { opacity: .46; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn-secondary { color: var(--brand-deep); background: var(--white); border-color: var(--line); box-shadow: none; }
.btn-secondary:hover { background: var(--brand-mist); box-shadow: var(--shadow-sm); }
.btn-success { background: var(--brand-deep); }
.btn-danger { background: var(--danger); }
.btn-sm { min-height: 34px; padding: 5px 12px; border-radius: 10px; font-size: 12px; }
.btn-outline { color: var(--brand); background: transparent; border-color: rgba(53, 110, 99, .3); box-shadow: none; }
.btn-outline:hover { color: var(--brand-deep); background: rgba(255, 255, 255, .7); }
.btn-ghost { color: var(--brand); background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--brand-soft); box-shadow: none; }

/* 首页主视觉 */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 480px;
  margin: 28px 0 22px;
  padding: 58px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  align-items: center;
  gap: 42px;
  overflow: hidden;
  color: #f9f7ef;
  background:
    linear-gradient(120deg, rgba(18, 56, 50, .97), rgba(29, 76, 67, .93) 54%, rgba(48, 93, 81, .92)),
    var(--brand-deep);
  border-radius: 38px 38px 38px 10px;
  box-shadow: 0 28px 70px rgba(22, 58, 51, .19);
}
.hero::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -70px;
  bottom: -170px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255, 255, 255, .035), 0 0 0 110px rgba(255, 255, 255, .022);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .12;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .3) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, .3) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.hero-copy { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #d8e9e2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero-eyebrow::before { content: ""; width: 28px; height: 1px; background: #d6ae7a; }
.hero h1 {
  max-width: 620px;
  font-family: var(--display);
  font-size: clamp(36px, 4.2vw, 57px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.025em;
}
.hero h1 em { position: relative; color: #f4c9a9; font-style: normal; }
.hero h1 em::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 8px;
  left: 0;
  bottom: 4px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(236, 168, 116, .2);
}
.hero-sub { max-width: 610px; margin-top: 19px; color: rgba(244, 249, 246, .75); font-size: 15px; line-height: 1.85; }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-primary { color: var(--brand-deep); background: #f5d4b6; box-shadow: 0 12px 30px rgba(0, 0, 0, .13); }
.hero-primary:hover { color: var(--brand-deep); background: #ffdec0; }
.hero-quiet { color: rgba(255, 255, 255, .78); background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .17); box-shadow: none; }
.hero-quiet:hover { color: #fff; background: rgba(255, 255, 255, .12); box-shadow: none; }
.hero-trust { display: flex; align-items: center; gap: 14px; margin-top: 26px; color: rgba(255, 255, 255, .62); font-size: 12px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 5px; }
.hero-trust span + span::before { content: ""; width: 3px; height: 3px; margin-right: 9px; border-radius: 50%; background: rgba(255, 255, 255, .4); }

.hero-art { position: relative; z-index: 1; min-height: 330px; display: grid; place-items: center; }
.mind-orbit { width: min(100%, 390px); height: auto; overflow: visible; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .14)); animation: heroFloat 7s ease-in-out infinite; }
.orbit-ring { transform-origin: 200px 170px; animation: orbitDrift 18s linear infinite; }
.orbit-dot { animation: softPulse 4s ease-in-out infinite; }
.hero-note {
  position: absolute;
  right: 5px;
  bottom: 12px;
  max-width: 180px;
  padding: 12px 15px;
  color: var(--brand-ink);
  background: rgba(255, 253, 249, .94);
  border-radius: 15px 15px 4px 15px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .14);
  font-family: var(--display);
  font-size: 12px;
  line-height: 1.55;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 54px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.quick-stat { padding: 17px 22px; background: rgba(255, 253, 249, .78); }
.quick-stat strong { display: block; color: var(--brand-deep); font-family: var(--display); font-size: 19px; }
.quick-stat span { color: var(--muted); font-size: 12px; }

/* 量表库 */
.library { padding-bottom: 48px; }
.library-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-kicker { margin-bottom: 5px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.section-head h2, .library-head h2 { font-family: var(--display); font-size: clamp(24px, 3vw, 32px); line-height: 1.25; }
.section-sub { color: var(--muted); font-size: 13px; }
.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255, 253, 249, .78);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}
.filter-chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  padding: 7px 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 99px;
  cursor: pointer;
  font-size: 13px;
  transition: .2s ease;
}
.filter-chip:hover { color: var(--brand-deep); background: var(--brand-mist); }
.filter-chip.active { color: var(--white); background: var(--brand); }
.search-box { position: relative; flex: 0 1 240px; }
.search-box svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; color: var(--faint); transform: translateY(-50%); pointer-events: none; }
.search-box input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px 8px 35px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  font-size: 13px;
  transition: border .2s, box-shadow .2s;
}
.search-box input:focus { border-color: rgba(53, 110, 99, .55); box-shadow: 0 0 0 4px rgba(53, 110, 99, .08); }
.test-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; perspective: 1200px; }
.test-card {
  --tone: var(--brand);
  --tint: var(--brand-soft);
  position: relative;
  min-height: 230px;
  padding: 21px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px 20px 20px 6px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.test-card::before {
  content: "";
  position: absolute;
  width: 105px;
  height: 105px;
  top: -54px;
  right: -42px;
  border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 17px color-mix(in srgb, var(--tone) 5%, transparent);
  transition: transform .35s ease;
}
.test-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tone), transparent 80%);
  transform: scaleX(.25);
  transform-origin: left;
  transition: transform .3s ease;
}
.test-card:hover { border-color: color-mix(in srgb, var(--tone) 35%, var(--line)); box-shadow: 0 22px 45px rgba(28, 61, 53, .12); transform: translateY(-6px); }
.test-card:hover::before { transform: scale(1.18) rotate(12deg); }
.test-card:hover::after { transform: scaleX(1); }
.test-card[data-theme="sleep"] { --tone: #708bb5; --tint: #edf3fb; }
.test-card[data-theme="growth"] { --tone: #7e73ad; --tint: #f1eefb; }
.test-card[data-theme="relation"] { --tone: #c9786d; --tint: #fff0ed; }
.test-card[data-theme="work"] { --tone: #b28a3e; --tint: #faf2df; }
.test-card[data-theme="life"] { --tone: #578a70; --tint: #eaf5ed; }
.test-card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--tone);
  background: var(--tint);
  border-radius: 15px 15px 15px 5px;
  font-size: 24px;
  transition: transform .3s ease;
}
.test-card:hover .test-card-icon { transform: rotate(-5deg) scale(1.08); }
.test-card-name { font-family: var(--display); font-size: 17px; font-weight: 700; line-height: 1.4; }
.test-card-cat { width: fit-content; padding: 2px 8px; color: var(--tone); background: var(--tint); border-radius: 99px; font-size: 11px; }
.test-card-desc { display: -webkit-box; flex: 1; overflow: hidden; color: var(--muted); font-size: 12.5px; line-height: 1.7; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.test-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 11px; border-top: 1px dashed var(--line); color: var(--faint); font-size: 11px; }
.test-card-cta { color: var(--tone); font-weight: 700; transition: gap .2s; }
.test-card:hover .test-card-cta { letter-spacing: .03em; }

.loading { padding: 42px; color: var(--muted); text-align: center; }
.library-empty { grid-column: 1 / -1; padding: 56px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.library-empty strong { display: block; margin-bottom: 4px; font-family: var(--display); font-size: 18px; }
.library-empty span { color: var(--muted); font-size: 13px; }

/* 说明与支持 */
.notice {
  margin: 28px 0;
  padding: 18px 21px;
  color: #725d2e;
  background: rgba(255, 249, 230, .8);
  border: 1px solid rgba(201, 164, 81, .2);
  border-radius: 16px;
  font-size: 12.5px;
}
.notice h3 { margin-bottom: 5px; color: #625025; font-family: var(--display); font-size: 15px; }
.support-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 16px 0;
  padding: 21px 23px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.support-icon { width: 43px; height: 43px; display: grid; flex: 0 0 auto; place-items: center; background: var(--accent-soft); border-radius: 14px; font-size: 22px; }
.support-text { font-size: 13.5px; }
.support-text strong { font-family: var(--display); font-size: 16px; }
.support-contact { margin-top: 3px; color: var(--brand); font-size: 18px; font-weight: 800; letter-spacing: .04em; }
.support-high { background: #fff8f5; border-color: rgba(201, 95, 85, .25); }
.support-high .support-icon { background: #ffe7e1; }
.support-high .support-contact { color: var(--danger); }

/* 答题页 */
.quiz-shell { padding: 30px 0 12px; }
.quiz-meta { margin-bottom: 19px; }
.quiz-headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.quiz-meta h1 { font-family: var(--display); font-size: clamp(25px, 3.5vw, 34px); line-height: 1.3; }
.quiz-desc { max-width: 690px; margin-top: 7px; color: var(--muted); font-size: 13.5px; }
.quiz-info { display: flex; align-items: center; gap: 9px; margin-top: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.quiz-info span { padding: 4px 9px; background: rgba(255, 255, 255, .65); border: 1px solid var(--line); border-radius: 99px; }
.quiz-progress-head { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0 8px; color: var(--muted); font-size: 12px; }
.quiz-progress-head strong { color: var(--brand-deep); font-size: 14px; }
.quiz-progress-bar { height: 8px; overflow: hidden; background: rgba(53, 110, 99, .1); border-radius: 99px; }
.quiz-progress-bar span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--brand), #73a18d, #e6ad7b); border-radius: inherit; transition: width .45s cubic-bezier(.2, .75, .25, 1); }
.quiz-card {
  position: relative;
  min-height: 390px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 253, 249, .94);
  border: 1px solid var(--line);
  border-radius: 28px 28px 28px 8px;
  box-shadow: var(--shadow-md);
}
.quiz-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -82px;
  top: -92px;
  border: 1px solid rgba(53, 110, 99, .09);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(53, 110, 99, .022);
  pointer-events: none;
}
.quiz-question { margin-bottom: 24px; }
.q-number { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 13px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.q-number::before { content: ""; width: 17px; height: 2px; background: var(--accent); border-radius: 9px; }
.q-text { max-width: 700px; font-family: var(--display); font-size: clamp(20px, 2.4vw, 25px); font-weight: 700; line-height: 1.6; }
.q-hint { margin-top: 7px; color: var(--faint); font-size: 11px; }
.q-options { display: grid; gap: 10px; margin-bottom: 30px; }
.q-option {
  position: relative;
  min-height: 55px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 15px;
  cursor: pointer;
  font-size: 14px;
  transition: border .18s, background .18s, transform .18s, box-shadow .18s;
}
.q-option:hover { border-color: rgba(53, 110, 99, .42); background: var(--brand-mist); transform: translateX(3px); }
.q-option.selected { color: var(--brand-deep); background: var(--brand-soft); border-color: rgba(53, 110, 99, .58); box-shadow: inset 3px 0 var(--brand); }
.q-option .radio {
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  background: #f7f7f3;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  transition: .2s ease;
}
.q-option.selected .radio { color: var(--white); background: var(--brand); border-color: var(--brand); }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; }
.quiz-nav .btn { min-width: 116px; }
.quiz-nav-right { display: flex; gap: 10px; margin-left: auto; }
.quiz-tip { color: var(--faint); font-size: 11px; }
.q-enter-next { animation: questionInNext .36s cubic-bezier(.2, .8, .2, 1) both; }
.q-enter-prev { animation: questionInPrev .36s cubic-bezier(.2, .8, .2, 1) both; }

/* 结果页 */
.result-shell { padding: 28px 0 20px; }
.result-card {
  position: relative;
  padding: 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(242, 201, 109, .13), transparent 19rem),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 30px 30px 30px 9px;
  box-shadow: var(--shadow-md);
}
.result-card::before {
  content: "RESULT";
  position: absolute;
  right: 27px;
  top: 18px;
  color: rgba(53, 110, 99, .06);
  font-family: var(--display);
  font-size: 58px;
  font-weight: 700;
  letter-spacing: .08em;
  pointer-events: none;
}
.result-layout { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 34px; }
.result-eyebrow { margin-bottom: 8px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.result-name { color: var(--muted); font-size: 13px; }
.result-level { display: inline-flex; align-items: center; gap: 7px; margin: 12px 0; padding: 6px 13px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.result-level::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.level-good { color: var(--success); background: var(--success-soft); }
.level-mild { color: var(--warning); background: var(--warning-soft); }
.level-moderate { color: var(--danger); background: var(--danger-soft); }
.level-severe { color: #fff; background: var(--danger); }
.result-desc { max-width: 620px; color: var(--ink); font-size: 14.5px; }
.result-advice { max-width: 650px; margin-top: 18px; padding: 15px 17px; color: var(--brand-deep); background: var(--brand-mist); border-left: 3px solid var(--brand); border-radius: 4px 13px 13px 4px; font-size: 13px; }
.score-ring {
  --score-progress: 0deg;
  position: relative;
  width: 154px;
  height: 154px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  background: conic-gradient(var(--brand) var(--score-progress), rgba(53, 110, 99, .1) 0);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(53, 110, 99, .05), 0 17px 40px rgba(53, 110, 99, .1);
}
.score-ring::before { content: ""; position: absolute; inset: 12px; background: var(--surface); border-radius: 50%; }
.score-ring-inner { position: relative; z-index: 1; text-align: center; }
.result-score { color: var(--brand-deep); font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; }
.result-score span { color: var(--faint); font-family: var(--sans); font-size: 12px; font-weight: 500; }
.result-score-sub { margin-top: 7px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.result-type-mark { width: 86px; height: 86px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 50%; font-size: 38px; }
.result-actions { display: flex; gap: 10px; margin-top: 25px; flex-wrap: wrap; }

.ai-panel {
  position: relative;
  margin-top: 20px;
  padding: 25px;
  overflow: hidden;
  background: #f8faf7;
  border: 1px solid rgba(53, 110, 99, .16);
  border-radius: 22px 22px 22px 7px;
}
.ai-panel::after { content: ""; position: absolute; width: 190px; height: 190px; right: -105px; bottom: -115px; border: 1px solid rgba(53, 110, 99, .09); border-radius: 50%; box-shadow: 0 0 0 30px rgba(53, 110, 99, .025); }
.ai-heading { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ai-title { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 19px; font-weight: 700; }
.ai-mark { width: 31px; height: 31px; display: grid; place-items: center; color: var(--white); background: linear-gradient(135deg, var(--brand), #75a38f); border-radius: 10px; font-size: 14px; box-shadow: 0 7px 14px rgba(53, 110, 99, .17); }
.ai-badge { padding: 3px 9px; color: var(--brand); background: var(--brand-soft); border-radius: 99px; font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.ai-intro { position: relative; z-index: 1; max-width: 720px; margin-top: 9px; color: var(--muted); font-size: 12.5px; }
.ai-action { position: relative; z-index: 1; margin-top: 17px; }
.ai-privacy { margin-top: 10px; color: var(--faint); font-size: 10.5px; }
.ai-loading { position: relative; z-index: 1; display: none; margin-top: 20px; padding: 20px; background: rgba(255,255,255,.7); border-radius: 14px; }
.ai-loading.active { display: block; }
.ai-loading-line { height: 9px; margin-bottom: 10px; background: linear-gradient(90deg, #e6ede9 25%, #f5f8f5 50%, #e6ede9 75%); background-size: 200% 100%; border-radius: 99px; animation: shimmer 1.5s infinite; }
.ai-loading-line:nth-child(2) { width: 86%; }
.ai-loading-line:nth-child(3) { width: 62%; }
.ai-loading-text { margin-top: 12px; color: var(--muted); font-size: 11px; }
.ai-loading-text::after { content: "···"; display: inline-block; width: 18px; overflow: hidden; vertical-align: bottom; animation: ellipsis 1.5s steps(4, end) infinite; }
.analysis-copy { position: relative; z-index: 1; margin-top: 20px; color: #334743; font-size: 13.5px; line-height: 1.9; }
.analysis-copy h4 { margin: 21px 0 7px; color: var(--brand-deep); font-family: var(--display); font-size: 16px; }
.analysis-copy h4:first-child { margin-top: 0; }
.analysis-copy p { margin: 7px 0; }
.analysis-copy ul { margin: 7px 0 7px 21px; }
.analysis-copy li { margin-bottom: 5px; }
.analysis-meta { margin-top: 18px; padding-top: 12px; color: var(--faint); border-top: 1px dashed var(--line); font-size: 10px; }

/* 记录页 */
.records-shell { padding: 31px 0 20px; }
.records-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 28px 30px;
  color: var(--brand-deep);
  background: linear-gradient(135deg, rgba(231, 241, 236, .95), rgba(255, 250, 241, .85));
  border: 1px solid var(--line);
  border-radius: 24px 24px 24px 7px;
}
.records-hero h1 { font-family: var(--display); font-size: clamp(26px, 3.5vw, 36px); line-height: 1.3; }
.records-hero p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.records-list { display: flex; flex-direction: column; gap: 13px; }
.record-item {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 19px 19px 19px 6px;
  box-shadow: var(--shadow-sm);
  transition: border .2s, box-shadow .2s;
}
.record-item:hover { border-color: rgba(53, 110, 99, .26); box-shadow: 0 16px 35px rgba(28, 61, 53, .08); }
.record-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.record-name { font-family: var(--display); font-size: 17px; font-weight: 700; }
.record-meta { margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.record-side { display: flex; align-items: center; gap: 14px; text-align: right; }
.record-score { color: var(--muted); font-size: 11px; }
.record-score strong { margin-left: 3px; color: var(--ink); font-family: var(--display); font-size: 22px; }
.ai-mini-badge { display: inline-flex; margin-left: 6px; padding: 2px 7px; color: var(--brand); background: var(--brand-soft); border-radius: 99px; font-size: 9px; vertical-align: middle; }
.record-detail { display: none; margin-top: 17px; padding-top: 17px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.record-detail.open { display: block; animation: detailIn .3s ease; }
.record-answer-list { max-height: 330px; overflow: auto; padding-right: 7px; }
.record-detail-item { display: flex; gap: 8px; margin-bottom: 7px; }
.record-detail-item .di-score { flex: 0 0 auto; color: var(--brand); font-weight: 700; }
.record-ai { margin-top: 17px; padding: 17px; background: #f7faf7; border: 1px solid var(--line); border-radius: 14px; }
.record-ai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--brand-deep); font-weight: 700; }

.empty-state {
  padding: 56px 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 253, 249, .75);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-state .big-icon { width: 60px; height: 60px; display: grid; margin: 0 auto 13px; place-items: center; background: var(--brand-soft); border-radius: 20px 20px 20px 7px; font-size: 28px; }
.empty-state p + p { margin-top: 9px; }

/* 登录页 */
.auth-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(400px, .94fr);
  overflow: hidden;
  background: var(--canvas);
}
.auth-story {
  position: relative;
  min-height: 100vh;
  padding: clamp(44px, 7vw, 92px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #f7f5ed;
  background: var(--brand-deep);
}
.auth-story::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  left: -200px;
  bottom: -280px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .025), 0 0 0 140px rgba(255, 255, 255, .018);
}
.auth-story::after {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  right: -150px;
  top: 18%;
  border-radius: 45% 55% 59% 41%;
  background: linear-gradient(150deg, rgba(233, 152, 106, .22), rgba(242, 201, 109, .1));
  filter: blur(2px);
  animation: organicFloat 10s ease-in-out infinite alternate;
}
.auth-story-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-story-top .logo { color: #fff; }
.auth-story-top .logo-copy small { color: rgba(255, 255, 255, .55); }
.auth-story-top .logo-mark { color: var(--brand-deep); background: #f4d1b5; }
.auth-copy { position: relative; z-index: 1; max-width: 600px; margin: auto 0; padding: 58px 0; }
.auth-copy .section-kicker { color: #e9b38d; }
.auth-copy h1 { font-family: var(--display); font-size: clamp(41px, 5.6vw, 70px); font-weight: 700; line-height: 1.22; letter-spacing: -.03em; }
.auth-copy h1 em { color: #f0c5a5; font-style: normal; }
.auth-copy > p { max-width: 470px; margin-top: 20px; color: rgba(255, 255, 255, .61); font-size: 14px; line-height: 1.9; }
.auth-quote { position: relative; z-index: 1; width: fit-content; max-width: 390px; color: rgba(255, 255, 255, .58); font-family: var(--display); font-size: 12px; }
.auth-quote::before { content: "“"; display: block; height: 25px; color: #e7b590; font-size: 48px; line-height: .8; opacity: .7; }
.auth-form-side {
  min-height: 100vh;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: min(410px, 100%);
  padding: 38px 36px 32px;
  background: rgba(255, 253, 249, .92);
  border: 1px solid rgba(28, 63, 56, .1);
  border-radius: 28px 28px 28px 8px;
  box-shadow: 0 28px 70px rgba(25, 58, 51, .12);
  backdrop-filter: blur(10px);
}
.auth-card-head { margin-bottom: 24px; }
.auth-card-head h2 { font-family: var(--display); font-size: 28px; line-height: 1.35; }
.auth-card-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.auth-tip { margin-bottom: 21px; padding: 10px 12px; color: var(--muted); background: var(--brand-mist); border-radius: 10px; font-size: 11.5px; }
.auth-switch-line { margin-top: 17px; color: var(--muted); text-align: center; font-size: 12.5px; }
.auth-switch-line a { color: var(--brand); cursor: pointer; font-weight: 700; text-decoration: none; }
.back-home { margin-top: 17px; }
.back-home a { color: var(--muted); font-size: 12px; text-decoration: none; }
.back-home a:hover { color: var(--brand); }

/* 表单与弹窗 */
.form-group { position: relative; margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.form-group input {
  width: 100%;
  min-height: 45px;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  font-size: 14px;
  transition: border .2s, box-shadow .2s;
}
.form-group input:focus { border-color: rgba(53, 110, 99, .58); box-shadow: 0 0 0 4px rgba(53, 110, 99, .08); }
.form-group.has-toggle input { padding-right: 58px; }
.password-toggle { position: absolute; right: 10px; bottom: 8px; padding: 3px 6px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 11px; }
.turnstile-zone { min-height: 65px; margin: 2px 0 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.turnstile-zone p { color: var(--danger); font-size: 11px; text-align: center; }
.form-error { min-height: 18px; margin-bottom: 7px; color: var(--danger); font-size: 11.5px; }
.form-switch { margin-top: 13px; color: var(--muted); text-align: center; font-size: 12px; }
.form-switch a { color: var(--brand); cursor: pointer; font-weight: 700; }

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 40, 35, .5);
  backdrop-filter: blur(7px);
}
.modal-mask.open { display: flex; animation: fadeIn .2s ease; }
.modal {
  position: relative;
  width: min(400px, 100%);
  padding: 29px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 23px 23px 23px 7px;
  box-shadow: 0 30px 80px rgba(12, 38, 32, .28);
  animation: modalIn .28s cubic-bezier(.2, .8, .2, 1);
}
.modal h3 { margin-bottom: 17px; font-family: var(--display); font-size: 21px; }
.modal-close { position: absolute; top: 13px; right: 13px; width: 30px; height: 30px; color: var(--muted); background: var(--brand-mist); border: 0; border-radius: 50%; cursor: pointer; font-size: 13px; }
.confirm-summary { margin: 4px 0 18px; padding: 14px; color: var(--muted); background: var(--brand-mist); border-radius: 12px; font-size: 12px; }
.confirm-summary strong { color: var(--brand-deep); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 19px; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  min-width: 220px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 15px;
  color: var(--white);
  background: var(--brand-deep);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(12, 35, 30, .2);
  font-size: 12.5px;
  animation: toastIn .25s ease both;
}
.toast.error { background: #803f38; }

/* 管理后台 */
.admin-shell { padding: 30px 0 20px; }
.admin-layout { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 2fr); gap: 18px; margin: 23px 0; align-items: start; }
.panel { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel h3 { margin-bottom: 14px; font-family: var(--display); font-size: 17px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat-box { padding: 13px 8px; text-align: center; background: var(--brand-mist); border-radius: 12px; }
.stat-box .num { color: var(--brand); font-family: var(--display); font-size: 25px; font-weight: 700; }
.stat-box .lbl { color: var(--muted); font-size: 10px; }
.user-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: .18s; }
.user-item:hover, .user-item.active { background: var(--brand-mist); border-color: rgba(53, 110, 99, .33); }
.user-name { font-size: 13px; font-weight: 700; }
.user-meta { color: var(--muted); font-size: 10px; }
.badge-admin { margin-left: 5px; padding: 1px 6px; color: var(--warning); background: var(--warning-soft); border-radius: 99px; font-size: 9px; }
.rec-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.rec-table th, .rec-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.rec-table th { color: var(--muted); font-weight: 600; }
.detail-box { margin-top: 12px; padding: 13px; background: var(--brand-mist); border-radius: 11px; font-size: 11.5px; }
.detail-box .sc { color: var(--brand); font-weight: 700; }
.empty-tip { padding: 28px 10px; color: var(--muted); text-align: center; font-size: 12px; }
.level-pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 10px; }

/* 心理支持 AI 对话 */
.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; }
.support-shell { padding: 28px 0 20px; }
.support-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr);
  align-items: center;
  gap: 30px;
  margin-bottom: 20px;
  padding: 29px 31px;
  overflow: hidden;
  color: var(--brand-deep);
  background:
    radial-gradient(circle at 92% 12%, rgba(233, 152, 106, .16), transparent 15rem),
    linear-gradient(135deg, rgba(231, 241, 236, .98), rgba(255, 250, 241, .88));
  border: 1px solid var(--line);
  border-radius: 27px 27px 27px 8px;
}
.support-intro h1 { font-family: var(--display); font-size: clamp(32px, 4.2vw, 48px); line-height: 1.22; }
.support-intro > div > p { max-width: 650px; margin-top: 7px; color: var(--muted); font-size: 13.5px; }
.support-privacy {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 16px;
  color: var(--muted);
  background: rgba(255, 253, 249, .72);
  border: 1px solid rgba(53, 110, 99, .12);
  border-radius: 15px;
  font-size: 11px;
  line-height: 1.75;
}
.support-privacy strong { color: var(--brand-deep); font-size: 12px; }
.support-privacy b { color: var(--brand-deep); }
.privacy-icon { width: 25px; height: 25px; display: grid; flex: 0 0 auto; place-items: center; color: var(--white); background: var(--brand); border-radius: 8px; font-size: 10px; }
.support-layout { min-width: 0; display: grid; grid-template-columns: minmax(220px, .68fr) minmax(0, 2.35fr); align-items: start; gap: 17px; }
.support-layout > * { min-width: 0; max-width: 100%; }
.support-history {
  position: sticky;
  top: 82px;
  padding: 17px;
  background: rgba(255, 253, 249, .8);
  border: 1px solid var(--line);
  border-radius: 19px 19px 19px 6px;
  box-shadow: var(--shadow-sm);
}
.support-history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-family: var(--display); font-size: 16px; font-weight: 700; }
.conversation-history { max-height: 360px; overflow-y: auto; }
.conversation-item {
  width: 100%;
  padding: 10px 11px;
  display: block;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  transition: .18s ease;
}
.conversation-item:hover { background: var(--brand-mist); }
.conversation-item.active { background: var(--brand-soft); border-color: rgba(53, 110, 99, .15); }
.conversation-item strong { display: block; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item span { display: block; margin-top: 4px; color: var(--faint); font-size: 9.5px; }
.conversation-item .risk-dot { color: var(--danger); }
.support-safety-mini { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.support-safety-mini strong { display: block; margin-bottom: 5px; color: var(--ink); font-family: var(--display); font-size: 13px; }
.support-emergency { margin-top: 8px; color: #82443d; }
.support-emergency strong { display: inline; color: var(--danger); font-family: var(--sans); }
.chat-card {
  min-width: 0;
  height: min(720px, calc(100vh - 200px));
  min-height: 570px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px 24px 24px 7px;
  box-shadow: var(--shadow-md);
}
.chat-header {
  min-height: 73px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 253, 249, .92);
  border-bottom: 1px solid var(--line);
}
.chat-identity { display: flex; align-items: center; gap: 11px; }
.chat-avatar { width: 39px; height: 39px; display: grid; flex: 0 0 auto; place-items: center; color: var(--white); background: linear-gradient(145deg, var(--brand), #699989); border-radius: 13px 13px 13px 4px; box-shadow: 0 7px 16px rgba(53, 110, 99, .18); }
.chat-avatar svg { width: 24px; height: 24px; }
.chat-identity strong { display: block; font-family: var(--display); font-size: 16px; }
.chat-identity span { display: flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.chat-identity span i { width: 6px; height: 6px; display: inline-block; background: #5cab83; border-radius: 50%; box-shadow: 0 0 0 3px rgba(92, 171, 131, .12); }
.provider-badge { display: inline-block; margin-left: 5px; padding: 1px 6px; color: #305f91; background: #eaf3ff; border: 1px solid rgba(48, 95, 145, .12); border-radius: 99px; font-family: var(--sans); font-size: 8px; font-style: normal; letter-spacing: .04em; vertical-align: 2px; }
.chat-delete { padding: 5px 0; color: var(--faint); background: transparent; border: 0; cursor: pointer; font-size: 10px; }
.chat-delete:hover { color: var(--danger); }
.chat-delete:disabled { opacity: .4; cursor: default; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 26px 22px 16px; scroll-behavior: smooth; background: radial-gradient(circle at 100% 0, rgba(242, 201, 109, .08), transparent 16rem); }
.chat-welcome { max-width: 500px; margin: 26px auto; text-align: center; }
.chat-welcome-orbit { position: relative; width: 68px; height: 68px; margin: 0 auto 17px; border: 1px solid rgba(53, 110, 99, .22); border-radius: 50%; box-shadow: 0 0 0 11px rgba(53, 110, 99, .04), 0 0 0 22px rgba(53, 110, 99, .02); }
.chat-welcome-orbit::before { content: ""; position: absolute; width: 19px; height: 19px; left: 50%; top: 50%; background: var(--accent); border-radius: 50% 50% 50% 15%; transform: translate(-50%, -50%) rotate(45deg); }
.chat-welcome-orbit span, .chat-welcome-orbit i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.chat-welcome-orbit span { top: 5px; right: 10px; }
.chat-welcome-orbit i { bottom: 9px; left: 5px; background: var(--sun); }
.chat-welcome h2 { font-family: var(--display); font-size: 21px; }
.chat-welcome p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.chat-suggestions { display: flex; justify-content: center; gap: 7px; margin-top: 17px; flex-wrap: wrap; }
.chat-suggestions button { padding: 7px 10px; color: var(--brand); background: var(--white); border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-size: 10.5px; transition: .18s; }
.chat-suggestions button:hover { background: var(--brand-soft); border-color: rgba(53, 110, 99, .25); }
.chat-message { max-width: 84%; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 9px; animation: messageIn .26s ease both; }
.chat-message.user { margin-left: auto; flex-direction: row-reverse; }
.message-avatar { width: 26px; height: 26px; display: grid; flex: 0 0 auto; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 9px 9px 9px 3px; font-size: 11px; font-weight: 800; }
.chat-message.user .message-avatar { color: var(--white); background: var(--brand); border-radius: 9px 9px 3px 9px; }
.message-body { min-width: 0; }
.message-content { padding: 11px 14px; color: #334743; background: #f4f7f4; border: 1px solid rgba(53, 110, 99, .08); border-radius: 4px 15px 15px 15px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.user .message-content { color: var(--white); background: var(--brand); border-color: var(--brand); border-radius: 15px 4px 15px 15px; }
.message-time { margin-top: 4px; color: var(--faint); font-size: 9px; }
.chat-message.user .message-time { text-align: right; }
.chat-message.risk .message-content { background: #fff4ef; border-color: rgba(201, 95, 85, .2); }
.chat-typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 15px; color: var(--muted); background: #f4f7f4; border-radius: 4px 15px 15px 15px; font-size: 11px; }
.chat-typing i { width: 4px; height: 4px; background: var(--brand); border-radius: 50%; animation: typingDot 1.2s ease-in-out infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
.chat-risk-card { margin: 0 20px 11px; padding: 12px 14px; color: #7e3f38; background: #fff0ec; border: 1px solid rgba(201, 95, 85, .22); border-radius: 12px; font-size: 11px; line-height: 1.7; }
.chat-risk-card[hidden] { display: none; }
.chat-risk-card strong { display: block; font-family: var(--display); font-size: 14px; }
.chat-composer { margin: 0 14px 14px; padding: 9px 11px 8px; background: var(--white); border: 1px solid var(--line-strong); border-radius: 16px; transition: border .2s, box-shadow .2s; }
.chat-composer:focus-within { border-color: rgba(53, 110, 99, .52); box-shadow: 0 0 0 4px rgba(53, 110, 99, .07); }
.chat-input-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-composer textarea { width: 100%; max-height: 120px; min-height: 34px; padding: 6px 3px; resize: none; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 13px; line-height: 1.65; }
.chat-attach { width: 37px; height: 37px; display: grid; flex: 0 0 auto; place-items: center; color: var(--brand); background: var(--brand-mist); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: .18s; }
.chat-attach svg { width: 17px; height: 17px; }
.chat-attach span { display: none; }
.chat-attach:hover { background: var(--brand-soft); border-color: rgba(53, 110, 99, .3); }
.chat-attach.processing { opacity: .55; pointer-events: none; }
.chat-attachment-preview { display: flex; align-items: center; gap: 10px; margin: 2px 0 9px; padding: 8px; background: var(--brand-mist); border-radius: 11px; }
.chat-attachment-preview[hidden] { display: none; }
.chat-attachment-preview img { width: 52px; height: 52px; flex: 0 0 auto; object-fit: cover; border-radius: 9px; }
.chat-attachment-preview div { min-width: 0; flex: 1; }
.chat-attachment-preview strong { display: block; overflow: hidden; color: var(--brand-deep); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.chat-attachment-preview span { display: block; margin-top: 2px; color: var(--faint); font-size: 8.5px; line-height: 1.4; }
.chat-attachment-preview button { width: 25px; height: 25px; color: var(--muted); background: var(--white); border: 0; border-radius: 50%; cursor: pointer; }
.chat-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; color: var(--faint); font-size: 9px; }
.chat-composer-foot .btn { min-height: 33px; padding: 5px 17px; border-radius: 10px; font-size: 12px; }
.admin-support-panel { margin-top: 18px; }
.admin-support-note { margin: -5px 0 14px; color: var(--muted); font-size: 10.5px; }
.admin-support-layout { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.8fr); gap: 14px; }
.admin-support-list { max-height: 520px; overflow-y: auto; }
.admin-support-conversation { width: 100%; padding: 10px 11px; margin-bottom: 7px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-align: left; }
.admin-support-conversation:hover, .admin-support-conversation.active { background: var(--brand-mist); border-color: rgba(53, 110, 99, .27); }
.admin-support-conversation strong { display: block; overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.admin-support-conversation span { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.admin-chat-detail { min-height: 290px; max-height: 520px; overflow-y: auto; padding: 14px; background: #f7faf7; border: 1px solid var(--line); border-radius: 13px; }
.admin-chat-message { margin-bottom: 12px; padding: 10px 12px; background: var(--white); border: 1px solid rgba(53, 110, 99, .08); border-radius: 4px 12px 12px 12px; }
.admin-chat-message.user { margin-left: 10%; background: var(--brand-soft); }
.admin-chat-message.risk { border-color: rgba(201, 95, 85, .25); }
.admin-chat-message strong { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--brand-deep); font-size: 10px; }
.admin-chat-message span { color: var(--faint); font-weight: 400; }
.admin-chat-message p { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.75; white-space: pre-wrap; }
.chat-image-wrap { display: block; width: fit-content; max-width: 100%; margin-top: 3px; overflow: hidden; border-radius: 12px; background: #edf2ef; }
.chat-image { display: block; width: auto; max-width: min(290px, 100%); max-height: 300px; object-fit: contain; cursor: zoom-in; }
.message-content.image-only { padding: 4px; background: transparent; border: 0; }
.admin-chat-image { display: block; width: auto; max-width: min(420px, 100%); max-height: 360px; margin-top: 8px; object-fit: contain; border-radius: 9px; cursor: zoom-in; }

/* 整站 Turnstile 入口验证 */
.verify-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(235, 172, 123, .18), transparent 25rem),
    radial-gradient(circle at 82% 88%, rgba(113, 157, 138, .17), transparent 27rem),
    #132f2c;
}
.verify-page::before { opacity: .08; mask-image: none; }
.verify-shell { width: min(460px, calc(100% - 28px)); min-height: 100vh; margin: 0 auto; padding: 32px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.verify-card { position: relative; width: 100%; padding: 30px 34px 27px; overflow: hidden; text-align: center; background: rgba(255, 253, 249, .97); border: 1px solid rgba(255, 255, 255, .4); border-radius: 30px 30px 30px 9px; box-shadow: 0 34px 80px rgba(0, 0, 0, .25); backdrop-filter: blur(16px); }
.verify-card::before { content: ""; position: absolute; width: 210px; height: 210px; right: -124px; top: -130px; border: 1px solid rgba(53, 110, 99, .11); border-radius: 50%; box-shadow: 0 0 0 28px rgba(53, 110, 99, .025); }
.verify-logo { position: relative; z-index: 1; margin-bottom: 24px; justify-content: center; }
.verify-art { position: relative; width: 96px; height: 96px; margin: 0 auto 17px; display: grid; place-items: center; }
.verify-shield { position: relative; z-index: 2; width: 58px; height: 58px; display: grid; place-items: center; color: var(--brand-deep); background: linear-gradient(145deg, #dcece5, #f8e5d6); border-radius: 20px 20px 20px 6px; box-shadow: 0 12px 28px rgba(38, 79, 69, .14); animation: verifyFloat 4s ease-in-out infinite; }
.verify-shield svg { width: 31px; height: 31px; }
.verify-orbit { position: absolute; inset: 0; border: 1px dashed rgba(53, 110, 99, .22); border-radius: 50%; }
.verify-orbit::after { content: ""; position: absolute; width: 7px; height: 7px; top: 7px; right: 16px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 5px rgba(233, 152, 106, .1); }
.orbit-one { animation: orbitDrift 20s linear infinite; }
.orbit-two { inset: 13px; border-style: solid; border-color: rgba(53, 110, 99, .08); animation: orbitDrift 14s linear reverse infinite; }
.verify-card .section-kicker { font-size: 9px; }
.verify-card h1 { margin-top: 5px; font-family: var(--display); font-size: 28px; line-height: 1.35; }
.verify-sub { max-width: 350px; margin: 9px auto 20px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.verify-status { min-height: 24px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 11px; }
.verify-spinner { display: none; width: 13px; height: 13px; border: 2px solid rgba(53, 110, 99, .18); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.verify-status.is-loading .verify-spinner { display: inline-block; }
.verify-turnstile { min-height: 65px; margin: 10px 0 3px; display: flex; align-items: center; justify-content: center; }
.verify-provider { color: var(--faint); font-size: 9.5px; }
.verify-provider strong { color: #4b6685; font-weight: 600; }
.verify-retry { margin-top: 12px; }
.verify-retry[hidden] { display: none; }
.verify-card .form-error { margin: 9px 0 0; }
.verify-footer { margin-top: 18px; color: rgba(255, 255, 255, .42); font-size: 10px; letter-spacing: .05em; }
@keyframes verifyFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }

/* 版本与更新说明 */
.version-chip { width: fit-content; align-self: center; padding: 2px 7px; color: var(--brand); background: var(--brand-soft); border: 1px solid rgba(53,110,99,.12); border-radius: 99px; cursor: pointer; font-size: 9px; }
.version-chip:hover { background: var(--brand); color: var(--white); }
.version-corner { margin-top: 15px; color: var(--faint); font-size: 10px; }
.update-kicker { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.update-modal h3 { margin-top: 4px; }
.update-list { display: grid; gap: 10px; margin: 18px 0; }
.update-item { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; background: var(--brand-mist); border-radius: 12px; }
.update-item > span { width: 27px; height: 27px; display: grid; flex: 0 0 auto; place-items: center; color: var(--white); background: var(--brand); border-radius: 9px 9px 9px 3px; font-size: 10px; font-weight: 700; }
.update-item strong { display: block; color: var(--brand-deep); font-family: var(--display); font-size: 14px; }
.update-item p { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.65; }

/* 页脚 */
.site-footer { margin-top: auto; padding: 25px 0; color: var(--faint); border-top: 1px solid rgba(28, 63, 56, .08); font-size: 11px; text-align: center; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; }

/* 动效 */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js .test-card { opacity: 0; transform: translateY(14px); animation: cardIn .45s ease forwards; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes heroFloat { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes orbitDrift { to { transform: rotate(360deg); } }
@keyframes softPulse { 0%, 100% { opacity: .65; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes organicFloat { from { transform: translate(0, -8px) rotate(0); } to { transform: translate(-22px, 18px) rotate(9deg); } }
@keyframes questionInNext { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes questionInPrev { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes ellipsis { from { width: 0; } to { width: 18px; } }
@keyframes detailIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes messageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes typingDot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after { content: ""; position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; top: 50%; left: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

/* 响应式 */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 46px 42px 30px; }
  .hero-art { min-height: 240px; margin-top: -8px; }
  .mind-orbit { width: 300px; }
  .test-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-page { grid-template-columns: 1fr; }
  .auth-story { min-height: auto; padding: 32px 34px 38px; }
  .auth-copy { padding: 42px 0 4px; }
  .auth-copy h1 { font-size: clamp(38px, 9vw, 58px); }
  .auth-quote { display: none; }
  .auth-form-side { min-height: auto; padding: 30px 20px 50px; }
  .support-intro { grid-template-columns: 1fr; gap: 17px; }
  .support-layout { grid-template-columns: 1fr; }
  .support-history { position: static; }
  .conversation-history { display: flex; gap: 7px; max-height: none; overflow-x: auto; }
  .conversation-item { min-width: 180px; }
  .support-safety-mini { display: none; }
  .admin-support-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .container, .container.narrow { width: min(100% - 28px, 1180px); }
  .site-header { padding: 9px 0; }
  .header-inner { min-height: 43px; gap: 8px; }
  .logo-copy { font-size: 15px; }
  .logo-copy small { display: none; }
  .logo-mark { width: 34px; height: 34px; border-radius: 11px 11px 11px 4px; }
  .logo-mark svg { width: 21px; height: 21px; }
  .nav { order: 3; width: 100%; justify-content: center; }
  .nav-link { padding: 5px 11px; font-size: 12px; }
  .header-inner { flex-wrap: wrap; }
  .auth-greeting { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { margin-top: 16px; padding: 35px 23px 22px; border-radius: 27px 27px 27px 8px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 13.5px; line-height: 1.8; }
  .hero-actions .btn { flex: 1 1 140px; }
  .hero-trust { flex-wrap: wrap; gap: 8px; font-size: 10.5px; }
  .hero-trust span + span::before { margin-right: 3px; }
  .hero-art { min-height: 205px; }
  .mind-orbit { width: 250px; }
  .hero-note { right: 0; bottom: 4px; padding: 8px 11px; font-size: 10px; }
  .quick-stats { margin-bottom: 39px; }
  .quick-stat { padding: 12px 10px; text-align: center; }
  .quick-stat strong { font-size: 15px; }
  .quick-stat span { font-size: 10px; }
  .library-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .library-toolbar { align-items: stretch; flex-direction: column-reverse; padding: 10px; }
  .search-box { flex-basis: auto; }
  .test-grid { grid-template-columns: 1fr; gap: 11px; }
  .test-card { min-height: 211px; }
  .quiz-shell { padding-top: 20px; }
  .quiz-headline { display: block; }
  .quiz-meta h1 { font-size: 25px; }
  .quiz-card { min-height: 430px; padding: 23px 18px; border-radius: 22px 22px 22px 7px; }
  .q-text { font-size: 20px; }
  .q-option { min-height: 53px; padding: 11px 12px; font-size: 13px; }
  .quiz-nav { flex-wrap: wrap; }
  .quiz-tip { display: none; }
  .quiz-nav-right { width: 100%; }
  .quiz-nav-right .btn { flex: 1; }
  .result-shell { padding-top: 17px; }
  .result-card { padding: 27px 20px; border-radius: 24px 24px 24px 7px; }
  .result-layout { grid-template-columns: 1fr; }
  .score-ring { width: 134px; height: 134px; justify-self: start; }
  .result-score { font-size: 38px; }
  .result-actions .btn { flex: 1 1 135px; }
  .ai-panel { padding: 19px; }
  .ai-heading { display: block; }
  .ai-badge { display: inline-block; margin-top: 7px; }
  .records-hero { align-items: flex-start; flex-direction: column; padding: 23px 20px; }
  .record-main { align-items: flex-start; flex-direction: column; }
  .record-side { width: 100%; justify-content: space-between; text-align: left; }
  .admin-layout { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .rec-table { min-width: 630px; }
  .panel:last-child { overflow-x: auto; }
  .footer-inner { flex-direction: column; }
  .auth-story { padding: 26px 24px 30px; }
  .auth-copy { padding: 35px 0 1px; }
  .auth-copy h1 { font-size: 38px; }
  .auth-copy > p { font-size: 12.5px; }
  .auth-card { padding: 28px 22px 24px; }
  .modal { padding: 25px 21px; }
  .support-shell { padding-top: 17px; }
  .support-intro { padding: 23px 20px; border-radius: 22px 22px 22px 7px; }
  .support-intro h1 { font-size: 34px; }
  .support-privacy { font-size: 10.5px; }
  .support-history { padding: 13px; }
  .chat-card { height: calc(100vh - 162px); min-height: 560px; border-radius: 20px 20px 20px 6px; }
  .chat-header { padding: 12px 14px; }
  .chat-messages { padding: 19px 14px 12px; }
  .chat-message { max-width: 91%; }
  .message-content { font-size: 12.5px; }
  .chat-welcome { margin-top: 18px; }
  .chat-suggestions { justify-content: flex-start; }
  .chat-composer { margin: 0 9px 9px; }
  .chat-composer-foot > span { max-width: 170px; line-height: 1.4; }
  .admin-chat-detail { max-height: 420px; }
  .verify-shell { width: min(100% - 24px, 460px); padding: 18px 0; }
  .verify-card { padding: 25px 20px 23px; border-radius: 24px 24px 24px 7px; }
  .verify-card h1 { font-size: 25px; }
  .verify-art { width: 82px; height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal, .js .test-card { opacity: 1; transform: none; }
}
