/* 远山 UI 系统：山墨#18302F 岚青#2F766D 云白#F5F2EA 晨光#D98A54 山灰#76817E 线灰#E3E0D8 */
:root {
  --ink: #18302F;
  --teal: #2F766D;
  --teal-soft: #e6efed;
  --cloud: #F5F2EA;
  --dawn: #D98A54;
  --dawn-soft: #f7ece1;
  --stone: #76817E;
  --line: #E3E0D8;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(24, 48, 47, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* hidden 属性需覆盖 .modal/.loading 的 display:flex，否则默认就显示出来 */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cloud);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--cloud);
}

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px; object-fit: cover;
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 4px 12px rgba(0,0,0,.18);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.org { font-size: 12px; opacity: 0.8; }
.product { font-size: 17px; font-weight: 700; }
.link-btn { background: none; border: none; color: #cfe0dd; font-size: 14px; }

.global-code-bar {
  position: sticky;
  top: 66px;
  z-index: 19;
  padding: 10px 14px;
  background: rgba(245,242,234,.98);
  border-bottom: 1px solid var(--line);
}
.global-code-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  max-width: 528px;
  margin: 0 auto;
}
.global-code-title { font-size: 13px; color: var(--stone); line-height: 1.35; }
.global-code-title b { color: var(--ink); font-size: 15px; }
.global-code-actions { display: flex; gap: 6px; align-items: center; }
.global-code-actions input {
  width: min(180px, 44vw);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
}
.global-code-actions .btn-secondary { padding: 9px 12px; font-size: 13px; white-space: nowrap; }
.global-ref-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
}
@media (max-width: 420px) {
  .global-code-inner { grid-template-columns: 1fr; }
  .global-code-actions { width: 100%; }
  .global-code-actions input { flex: 1; width: auto; }
}

/* 主区 */
.screen { flex: 1; padding: 18px 16px 28px; }

/* 底栏 */
.bottombar {
  position: sticky; bottom: 0;
  background: rgba(245, 242, 234, 0.96);
  border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px;
}
.support-link {
  background: var(--dawn-soft); color: var(--dawn); border: 1px solid #efd9c4;
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; flex-shrink: 0;
}
#aiBtn { background: var(--teal-soft); color: var(--teal); border-color: #cfe0dd; order: 2; }
.support-primary {
  order: 1; width: 100%; min-height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--dawn), #b96f3b);
  color: #fff; border: none; box-shadow: 0 8px 18px rgba(217,138,84,.26);
  font-size: 16px; font-weight: 800;
}
.footer-note { grid-column: 1 / -1; font-size: 11px; color: var(--stone); text-align: center; margin-top: 2px; }

/* 卡片 */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card h1 { font-size: 24px; margin: 0 0 6px; }
.card h2 { font-size: 20px; margin: 0 0 4px; }
.card .sub { color: var(--stone); font-size: 14px; margin: 0 0 16px; }

.auth-brand {
  display: flex; justify-content: center; margin: -4px 0 12px;
}
.auth-brand img {
  width: 74px; height: 74px; object-fit: cover; border-radius: 18px;
  box-shadow: 0 8px 22px rgba(24,48,47,.12);
}
.card h1.auth-title {
  font-size: 34px;
  line-height: 1.12;
  text-align: center;
  letter-spacing: 0;
  margin: 0 0 8px;
}
.card .auth-slogan {
  color: var(--teal);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 18px;
}
.auth-service-card {
  margin-top: 16px; display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 14px; background: var(--cloud); border: 1px solid var(--line);
  cursor: pointer;
}
.auth-service-card img {
  width: 86px; height: 86px; border-radius: 10px; object-fit: contain; background: #fff;
  border: 1px solid var(--line); flex-shrink: 0;
}
.auth-service-card b { display: block; font-size: 15px; margin-bottom: 4px; }
.auth-service-card p { margin: 0; font-size: 12px; color: var(--stone); line-height: 1.5; }

/* 步骤指示 */
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps .dot { flex: 1; height: 5px; border-radius: 999px; background: var(--line); }
.steps .dot.on { background: var(--teal); }

/* 表单 */
.field { margin-bottom: 14px; }
.field > span.label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; font-family: inherit; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 14px; padding: 14px 22px;
  font-size: 18px; font-weight: 700; cursor: pointer;
  transition: transform .1s ease, opacity .2s ease;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: linear-gradient(135deg, var(--teal), var(--ink)); color: #fff; }
.btn.primary:disabled { background: #b9c6c3; color: #eef3f2; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.dawn { background: var(--dawn); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { padding: 9px 16px; font-size: 15px; border-radius: 10px; }
.btn-secondary {
  background: var(--teal-soft); color: var(--teal); border: none;
  border-radius: 10px; padding: 10px 14px; font-size: 15px; font-weight: 600;
}
.actions { display: flex; gap: 10px; margin-top: 8px; }
.actions .btn { flex: 1; }

/* 提示条 */
.notice { background: var(--dawn-soft); color: #9a5a2a; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; }
.dev-code { background: var(--teal-soft); color: var(--teal); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-bottom: 12px; }

/* 选项卡片（人生目标/方向） */
.tab-row { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { flex: 1; text-align: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 15px; }
.tab.on { background: var(--teal); color: #fff; border-color: var(--teal); }

.option-list { display: grid; gap: 10px; }
.option {
  text-align: left; border: 2px solid var(--line); background: #fff;
  border-radius: 14px; padding: 14px; cursor: pointer;
}
.option.on { border-color: var(--teal); background: var(--teal-soft); }
.option .t { font-size: 16px; font-weight: 700; }
.option .d { font-size: 13px; color: var(--stone); margin-top: 2px; }

/* 测评引导 · 人生目标 Hero */
.quiz-hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 168px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.quiz-hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transform: scale(1.02);
}
.quiz-hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(24,48,47,.82) 0%, rgba(47,118,109,.55) 100%);
}
.quiz-hero-content {
  position: relative; z-index: 1; padding: 28px 22px 24px; color: #fff;
}
.quiz-hero-content h1 {
  margin: 0 0 8px; font-size: 24px; font-weight: 800; line-height: 1.35;
  letter-spacing: 0.02em;
}
.quiz-hero-sub { margin: 0; font-size: 14px; opacity: 0.92; line-height: 1.5; }
.quiz-intro-card { margin-top: 0; }
.quiz-section-title {
  margin: 0 0 12px; font-size: 17px; font-weight: 700; color: var(--ink);
}

.option-list.life-visual { gap: 12px; }
.option.option-visual {
  display: flex; gap: 0; padding: 0; overflow: hidden; align-items: stretch;
  min-height: 88px; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.option.option-visual:active { transform: scale(0.985); }
.option.option-visual.on {
  border-color: var(--teal); box-shadow: 0 8px 22px rgba(47,118,109,.18);
}
.option.option-visual .option-img {
  width: 96px; flex-shrink: 0; background-size: cover; background-position: center;
}
.option.option-visual .option-body { padding: 12px 14px 12px 12px; flex: 1; min-width: 0; }
.option.option-visual.on .option-body { background: linear-gradient(90deg, var(--teal-soft), #fff); }
.option.option-visual .t { font-size: 15px; }
.option.option-visual .life-rank {
  display: inline-flex; margin-left: 8px; padding: 2px 7px; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal); font-size: 11px; font-weight: 700;
  vertical-align: middle;
}
.option.option-visual .life-rank:empty { display: none; }
.option.option-visual .d { font-size: 12px; line-height: 1.45; margin-top: 4px; }
.life-confirm-main,
.life-confirm-sub {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--cloud);
}
.life-confirm-main {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.life-confirm-main span,
.life-confirm-sub span {
  display: block;
  color: var(--stone);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.life-confirm-main b {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}
.life-confirm-sub b {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.quiz-q-card { padding-top: 18px; }
.q-tag-prep {
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: var(--dawn-soft); color: var(--dawn); font-weight: 600;
}
.q-life-picked {
  font-size: 13px; color: var(--teal); background: var(--teal-soft);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 10px;
}
.q-hint { margin: -4px 0 12px; font-size: 13px; }
.cat-chips { margin-bottom: 8px; }
.cat-chips .chip { font-size: 14px; padding: 10px 16px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 14px; cursor: pointer;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 分数段卡 */
.band-card { text-align: center; }
.band-badge {
  display: inline-block; background: var(--dawn-soft); color: var(--dawn);
  font-size: 20px; font-weight: 800; padding: 8px 22px; border-radius: 999px; margin: 8px 0;
}
.band-card .note { color: var(--stone); font-size: 14px; }

/* 功能选择 */
.entry-grid { display: grid; gap: 14px; }
.core-entry-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
.entry {
  border-radius: var(--radius); padding: 22px; color: #fff; cursor: pointer; border: none; text-align: left;
}
.core-entry-grid .entry {
  aspect-ratio: 1 / 1;
  min-height: 166px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(24,48,47,.16);
  position: relative;
  overflow: hidden;
}
.entry.know { background: linear-gradient(135deg, var(--teal), var(--ink)); }
.entry.test { background: linear-gradient(135deg, var(--dawn), #b96f3b); }
.entry-kicker { font-size: 12px; opacity: .86; font-weight: 700; }
.entry .et { font-size: 20px; font-weight: 800; line-height: 1.2; }
.core-entry-grid .entry .et { font-size: 24px; }
.entry .ed { font-size: 14px; opacity: .92; margin-top: 4px; line-height: 1.45; }
.core-entry-grid .entry .ed { font-size: 13px; margin-top: 8px; }
.entry-go { font-size: 14px; font-weight: 800; opacity: .95; margin-top: 12px; }

/* 报告库 */
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.cat-scroll .chip { white-space: nowrap; flex-shrink: 0; }
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row input { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; }
.quota-bar { font-size: 13px; color: var(--stone); margin-bottom: 12px; }
.quota-bar b { color: var(--dawn); }
.category-panel { margin-top: 12px; }
.section-title { font-size: 15px; font-weight: 800; margin-bottom: 10px; color: var(--ink); }
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.category-card {
  min-height: 76px; padding: 14px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; text-align: left; color: var(--ink); cursor: pointer;
}
.category-card.on { border-color: var(--teal); background: var(--teal-soft); }
.category-name { display: block; font-size: 16px; font-weight: 800; line-height: 1.25; }
.category-count { display: block; margin-top: 8px; font-size: 12px; color: var(--stone); }
.list-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 14px 2px 10px;
}
.list-heading strong { display: block; font-size: 18px; color: var(--ink); }
.list-heading span { display: block; margin-top: 2px; font-size: 12px; color: var(--stone); }
.guide-empty { margin-top: 12px; }
#list { padding-bottom: 96px; scroll-margin-top: 128px; }
.list-heading { scroll-margin-top: 128px; }

.active-filter-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--teal-soft); border: 1px solid #cfe0dd;
}
.active-filter-panel span { display: block; font-size: 12px; color: var(--stone); }
.active-filter-panel b { display: block; font-size: 17px; color: var(--ink); margin-top: 2px; }
.active-filter-panel .back-link { flex-shrink: 0; }
.list-heading.compact { margin-top: 4px; }

.report-item {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin-bottom: 10px; cursor: pointer;
}
.report-item .ri-top { display: flex; align-items: center; gap: 8px; }
.report-item .ri-name { font-size: 16px; font-weight: 700; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); }
.tag.full { background: var(--dawn-soft); color: var(--dawn); }
.report-item .ri-meta { font-size: 12px; color: var(--stone); margin-top: 4px; }
.list-more { text-align: center; color: var(--teal); font-size: 14px; padding: 10px; }

/* 报告详情 */

.eligibility-alert {
  margin: 12px 0 14px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.eligibility-alert b { display: block; font-size: 17px; margin-bottom: 6px; }
.eligibility-alert p { margin: 0; font-size: 14px; line-height: 1.65; }
.eligibility-alert.block { background: #fff4ea; border-color: #e7b58b; }
.eligibility-alert.block b { color: #a64f19; }
.eligibility-alert.ok { background: var(--teal-soft); border-color: #cfe0dd; }
.eligibility-alert.ok b { color: var(--teal); }
.report-body { font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.report-body { max-height: 60vh; overflow-y: auto; background: var(--cloud); border-radius: 12px; padding: 14px; }
.personal-report {
  max-height: none;
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
}
.report-hero-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--teal), var(--ink));
  color: #fff;
  box-shadow: 0 10px 24px rgba(24,48,47,.16);
}
.report-hero-card span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-size: 12px;
  font-weight: 800;
}
.report-hero-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}
.report-hero-card p {
  margin: 10px 0 0;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  line-height: 1.65;
}
.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.report-meta-chip {
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: var(--cloud);
  border: 1px solid var(--line);
}
.report-meta-chip span {
  display: block;
  color: var(--stone);
  font-size: 11px;
  font-weight: 700;
}
.report-meta-chip b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}
.report-section-card {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(24,48,47,.06);
}
.report-section-card.reason {
  background: #f4fbf9;
  border-color: #cfe4df;
}
.report-section-card.risk {
  background: #fff8f1;
  border-color: #efd9c4;
}
.report-section-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  color: var(--ink);
}
.report-section-card h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--teal);
  vertical-align: 2px;
}
.report-section-card.risk h3::before {
  background: var(--dawn);
}
.report-section-card p {
  margin: 8px 0 0;
  color: #43534f;
  font-size: 14px;
  line-height: 1.7;
}
.report-point-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.report-point-list li {
  position: relative;
  padding: 10px 10px 10px 30px;
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
.report-point-list li::before {
  content: "✓";
  position: absolute;
  left: 10px;
  top: 10px;
  color: var(--teal);
  font-weight: 900;
}
.report-section-card.risk .report-point-list li::before {
  content: "!";
  color: var(--dawn);
}
.report-summary-panel {
  display: grid;
  gap: 10px;
}
.report-summary-panel > div {
  padding: 12px;
  border-radius: 14px;
  background: var(--cloud);
  border: 1px solid var(--line);
}
.report-summary-panel span {
  display: inline-flex;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}
.report-summary-panel p {
  margin: 0;
  color: #334744;
}
.report-more {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed var(--line);
}
.report-more summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: 800;
  font-size: 14px;
}
.report-more p {
  margin-top: 10px;
  color: var(--stone);
}

/* 测评 */
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 6px 0 14px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--dawn)); }
.q-count { font-size: 13px; color: var(--stone); display: flex; justify-content: space-between; }
.q-text { font-size: 19px; font-weight: 700; margin: 10px 0 16px; line-height: 1.5; }
.q-multi-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--dawn-soft);
  color: var(--dawn);
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}
.q-module { font-size: 12px; color: var(--teal); font-weight: 600; }
.opt-btn {
  display: block; width: 100%; text-align: left; padding: 14px; margin-bottom: 10px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; cursor: pointer;
}
.opt-btn.on { border-color: var(--teal); background: var(--teal-soft); }
.save-hint { font-size: 12px; color: var(--stone); text-align: center; margin-top: 4px; }
.answer-review-list {
  display: grid;
  gap: 10px;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 2px;
  margin: 12px 0 14px;
}
.answer-review-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.answer-review-item.missing {
  border-color: #efc8a6;
  background: var(--dawn-soft);
}
.answer-review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.answer-review-top b { font-size: 13px; color: var(--teal); }
.answer-review-top .back-link { margin-bottom: 0; font-size: 13px; }
.answer-review-q {
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}
.answer-review-a {
  margin: 0;
  color: var(--stone);
  font-size: 13px;
  line-height: 1.5;
}

/* 推荐结果 */
.overall-report { padding-top: 18px; }
.overall-kicker {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--dawn-soft);
  color: var(--dawn);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}
.overall-section { margin-top: 16px; }
.overall-section h2 { font-size: 17px; margin-bottom: 6px; }
.overall-section p { margin: 0; color: var(--stone); font-size: 14px; line-height: 1.7; }
.overall-major-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.overall-major-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.overall-major-link {
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.overall-major-link:active {
  transform: scale(.99);
}
.overall-major-link:hover {
  border-color: #bdd5d1;
  background: #fbfdfc;
}
.overall-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.overall-major-list b { display: block; font-size: 15px; color: var(--ink); }
.overall-major-list p { margin-top: 2px; font-size: 12px; }
.overall-major-list em {
  display: inline-flex;
  margin-top: 6px;
  color: var(--teal);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.ref-schools {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #d8e8e3;
  border-radius: 12px;
  background: #f7fbf9;
}
.ref-schools.compact {
  padding: 9px;
  background: #fbfdfc;
}
.ref-schools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ref-schools-head b {
  color: var(--ink);
  font-size: 13px;
}
.ref-schools-head span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.ref-schools-note,
.ref-schools-warning,
.ref-schools-source {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.55;
}
.ref-schools-note { color: var(--stone); }
.ref-schools-warning { color: #a4602e; }
.ref-schools-source {
  color: #4f6862;
  font-weight: 700;
}
.ref-school-groups {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.ref-school-group {
  display: grid;
  gap: 6px;
}
.ref-school-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.ref-school-badge.match { background: var(--teal); }
.ref-school-badge.safe { background: #6f7d78; }
.ref-school-badge.challenge { background: var(--dawn); }
.ref-school-badge.highRisk { background: #9d4b34; }
.ref-school-item {
  padding: 8px 9px;
  border: 1px solid rgba(227,224,216,.8);
  border-radius: 10px;
  background: #fff;
}
.ref-school-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.ref-school-title b {
  min-width: 0;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.35;
}
.ref-school-title span {
  color: var(--stone);
  font-size: 11px;
  line-height: 1.35;
}
.ref-school-item p {
  margin: 3px 0 0;
  color: var(--stone);
  font-size: 11px;
  line-height: 1.5;
}
.overall-actions {
  margin-top: 12px;
}
.overall-save-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf7;
}
.overall-save-panel h2 {
  margin-bottom: 6px;
  font-size: 17px;
}
.overall-save-panel p {
  margin: 0;
  color: var(--stone);
  font-size: 13px;
  line-height: 1.65;
}
.overall-save-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.overall-inline-preview {
  margin-top: 14px;
  padding: 12px;
  max-height: 420px;
  overflow: auto;
  border-radius: 12px;
  background: #f8f6ef;
  border: 1px solid rgba(227,224,216,.8);
}
.overall-inline-preview .overall-actions,
.overall-inline-preview #overallReportBox {
  display: none;
}
.overall-reason-list { margin: 8px 0 0; padding-left: 18px; color: var(--stone); font-size: 14px; }
.also-major-groups { display: grid; gap: 10px; margin-top: 12px; }
.also-major-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.also-major-group h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  background: var(--cloud);
  font-size: 14px;
}
.also-major-group h3 span {
  color: var(--stone);
  font-size: 12px;
  font-weight: 700;
}
.also-major-group ul {
  list-style: none;
  margin: 0;
  padding: 4px 10px 8px;
}
.also-major-group li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(227,224,216,.65);
  font-size: 13px;
}
.also-major-group li:last-child { border-bottom: none; }
.also-major-main {
  min-width: 0;
  flex: 1;
}
.also-major-main b {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
}
.also-major-main p {
  margin: 3px 0 0;
  color: var(--stone);
  font-size: 12px;
  line-height: 1.5;
}
.also-major-toggle,
.also-major-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: var(--cloud);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.also-major-toggle.open {
  background: var(--ink);
  color: #fff;
}
.also-major-tag.selected { background: var(--teal-soft); color: var(--teal); }
.also-major-toggle.selected { background: var(--teal-soft); color: var(--teal); }
.also-major-tag.steady,
.also-major-tag.path,
.also-major-tag.fit,
.also-major-tag.feasible,
.also-major-toggle.steady,
.also-major-toggle.path,
.also-major-toggle.fit,
.also-major-toggle.feasible { background: #f4efe4; color: var(--dawn); }
.also-major-tag.caution { background: var(--dawn-soft); color: #a4602e; }
.also-major-toggle.caution { background: var(--dawn-soft); color: #a4602e; }
.also-major-detail {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f6ef;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.7;
}
.also-major-detail p {
  margin: 0;
}
.delivery-section-title {
  margin: 18px 2px 10px;
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}
.delivery-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.delivery-summary > div {
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}
.delivery-summary b { display: block; font-size: 18px; color: var(--ink); line-height: 1.2; }
.delivery-summary span { display: block; margin-top: 2px; font-size: 11px; color: var(--stone); line-height: 1.25; }
.report-delivery-list { margin-top: 14px; }
.delivery-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.delivery-card:active { transform: scale(.995); }
.delivery-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.delivery-rank {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.delivery-score { color: var(--dawn); font-size: 18px; font-weight: 900; white-space: nowrap; }
.delivery-score small { margin-left: 1px; font-size: 11px; }
.delivery-title { margin: 10px 0 4px; font-size: 22px; line-height: 1.25; }
.delivery-meta { font-size: 12px; color: var(--stone); line-height: 1.5; }
.delivery-reasons {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--teal-soft);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ink);
}
.delivery-reasons.risk { background: var(--dawn-soft); }
.delivery-reasons b { display: block; margin-bottom: 4px; }
.delivery-reasons ul { margin: 0; padding-left: 18px; }
.delivery-report-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--stone);
  line-height: 1.5;
}
.delivery-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.delivery-actions .btn,
.delivery-actions .btn-secondary {
  width: 100%;
  justify-content: center;
}
.delivery-actions [data-act="report"] { grid-column: 1 / -1; }
.delivery-footer-note { font-size: 13px; color: var(--stone); }
.email-delivery-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fffdf8;
}
.email-delivery-panel.compact { margin: 14px 0 4px; }
.email-delivery-panel label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.email-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 15px;
  background: #fff;
}
.email-row .btn-secondary { white-space: nowrap; }
.profile-axes { display: grid; gap: 8px; margin-top: 10px; }
.axis-row { display: flex; align-items: center; gap: 10px; }
.axis-row .al { width: 110px; font-size: 13px; color: var(--stone); flex-shrink: 0; }
.axis-track { flex: 1; height: 9px; background: var(--cloud); border-radius: 999px; overflow: hidden; }
.axis-track > i { display: block; height: 100%; background: var(--teal); }

.rec-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.rec-head { display: flex; align-items: baseline; gap: 8px; }
.rec-rank { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rec-name { font-size: 18px; font-weight: 800; }
.rec-match { margin-left: auto; color: var(--dawn); font-weight: 800; font-size: 16px; }
.rec-cat { font-size: 12px; color: var(--stone); margin: 4px 0 8px; }
.rec-block { font-size: 13px; margin-top: 8px; }
.rec-block .bt { font-weight: 700; color: var(--ink); }
.rec-block ul { margin: 4px 0 0; padding-left: 18px; }
.rec-block.fit li { color: #2c6e5f; }
.rec-block.risk li { color: #9a5a2a; }
.rec-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

@media (max-width: 380px) {
  .delivery-summary { grid-template-columns: 1fr; }
  .delivery-actions { grid-template-columns: 1fr; }
  .delivery-actions [data-act="report"] { grid-column: auto; }
  .email-row { grid-template-columns: 1fr; }
  .overall-save-actions { grid-template-columns: 1fr; }
  .also-major-group li {
    display: grid;
    gap: 6px;
  }
  .also-major-tag {
    justify-self: flex-start;
  }
}

/* 在线报告水印 */
.report-watermarked { position: relative; overflow: hidden; border-radius: 12px; }
.report-watermarked .wm-layer {
  position: absolute; inset: -40% -20%; pointer-events: none; z-index: 1;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 48px 64px;
  transform: rotate(-24deg); opacity: 0.12;
}
.report-watermarked .wm-tile {
  font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap;
  user-select: none;
}
.report-watermarked .wm-content { position: relative; z-index: 2; }

.ref-code-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--cloud); border-radius: 12px; padding: 12px 14px;
}
.ref-code-row code {
  font-size: 16px; font-weight: 800; letter-spacing: 0.04em; color: var(--ink);
}
.price-old { text-decoration: line-through; color: var(--stone); margin-right: 4px; }
.price-now { color: var(--dawn); }
.credit-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 10px 0; }

/* 我的权益 */
.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:last-child { border-bottom: none; }
.kv b { color: var(--dawn); }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(24,48,47,.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-card { background: #fff; border-radius: 18px; padding: 22px; width: 100%; max-width: 360px; position: relative; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 26px; color: var(--stone); }
.modal-card h3 { margin: 0 0 16px; font-size: 18px; }
.qr-row { display: flex; gap: 14px; justify-content: center; }
.qr-box { text-align: center; font-size: 12px; color: var(--stone); }
.qr-box-main { width: 100%; }
.qr-img {
  display: block; width: min(260px, 72vw); height: min(260px, 72vw);
  object-fit: contain; margin: 0 auto 8px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); padding: 8px;
}
.qr-ph { width: 120px; height: 120px; border: 1px dashed var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--stone); margin-bottom: 6px; background: var(--cloud); }
.service-tip { font-size: 13px; color: var(--stone); margin-top: 14px; text-align: center; }
.contact-box { background: var(--cloud); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.contact-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.contact-label { color: var(--stone); min-width: 64px; }
.btn.mini { padding: 6px 12px; font-size: 13px; margin-left: auto; }
.upgrade-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.upgrade-item:last-child { border-bottom: none; }

.ai-card { max-height: 85vh; display: flex; flex-direction: column; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ai-chips .chip { font-size: 12px; padding: 6px 10px; }
.ai-log { flex: 1; overflow-y: auto; max-height: 42vh; background: var(--cloud); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.ai-msg { margin-bottom: 10px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.ai-msg.user { text-align: right; color: var(--teal); }
.ai-msg.bot { color: var(--ink); }
.ai-input-row { display: flex; gap: 8px; }
.ai-input-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }

/* toast / loading */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 60; max-width: 80%; text-align: center; }
.loading { position: fixed; inset: 0; background: rgba(245,242,234,.6); display: flex; align-items: center; justify-content: center; z-index: 70; }
.spinner { width: 38px; height: 38px; border: 4px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; color: var(--stone); padding: 30px 10px; }
.back-link { background: none; border: none; color: var(--teal); font-size: 15px; padding: 0; margin-bottom: 12px; }
