/* 交际人格卡牌 · 基础层（墨绿 × 流光金） */
:root {
  --bg: #0D1812;
  --surface: #16241C;
  --surface-2: #1D3128;
  --brand: #2E9B7A;
  --brand-2: #3FA98C;
  --brand-soft: rgba(46, 155, 122, .14);
  --accent: #E0A03C;
  --accent-soft: rgba(224, 160, 60, .14);
  --ink: #E8F3EC;
  --ink-2: #B9D4C6;
  --ink-3: #8FAF9F;
  --ink-4: #7E9A8A;
  --line: rgba(46, 155, 122, .20);
  --ok: #6FBF9E;
  --warn: #E0A03C;
  --err: #E0603C;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(4, 12, 8, .45);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.7;
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent); }
.num, .mono { font-variant-numeric: tabular-nums; font-family: "SF Mono", "JetBrains Mono", Consolas, monospace; }
.muted { color: var(--ink-3); }
.t-sm { font-size: 13px; }
.hr { height: 1px; background: var(--line); margin: 22px 0; border: 0; }

/* ---- 顶栏 ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px;
  background: rgba(13, 24, 18, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.tb-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.tb-logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff; font-size: 15px; font-style: normal;
}
.mode-tag { font-style: normal; font-size: 11px; color: var(--ink-4); border: 1px solid var(--line); padding: 1px 8px; border-radius: 20px; margin-left: 4px; }
.page { max-width: 860px; margin: 0 auto; padding: 26px 20px 60px; }

/* ---- 按钮 / 输入 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .18s ease; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 4px 18px rgba(46, 155, 122, .35); }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-dark { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--brand); }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.input {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; color: var(--ink); font-size: 15px;
  outline: none; transition: border-color .18s; font-family: inherit;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input-mono { font-family: "SF Mono", Consolas, monospace; letter-spacing: .03em; }
.input-group { display: flex; gap: 10px; align-items: stretch; }
.input-group .input { flex: 1; }
.field { margin-bottom: 16px; }
.label { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 7px; font-weight: 600; }

/* ---- 卡片 / 通用 ---- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.rise { animation: rise .5s cubic-bezier(.2, .8, .3, 1) both; }
.rise-1 { animation-delay: .06s; } .rise-2 { animation-delay: .12s; } .rise-3 { animation-delay: .18s; } .rise-4 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.eyebrow { font-size: 11px; letter-spacing: .18em; color: var(--brand); font-weight: 700; }

/* ---- Toast / Modal ---- */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 18px; font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-8px); transition: all .26s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast.ok { border-color: rgba(79, 168, 216, .5); }
.toast.err { border-color: rgba(224, 96, 60, .55); }
.modal-root { position: fixed; inset: 0; z-index: 998; display: none; }
.modal-root.show { display: block; }
.modal-mask { position: absolute; inset: 0; background: rgba(4, 12, 8, .66); backdrop-filter: blur(3px); }
.modal-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 40px)); max-height: 76vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700;
}
.modal-head button { background: none; border: none; color: var(--ink-3); font-size: 20px; cursor: pointer; }
.modal-body { padding: 20px; }

/* ---- 进度条 / 段指示 ---- */
.progress { height: 6px; background: var(--brand-soft); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 4px; transition: width .3s ease; }
.segbar { display: flex; gap: 4px; margin-top: 10px; }
.segbar i { flex: 1; height: 4px; border-radius: 3px; background: var(--brand-soft); }
.segbar i.done { background: var(--brand); }
.segbar i.cur { background: var(--accent); }

/* ---- 极向点 / 芯片 ---- */
.pole-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.pole-dot.low { background: var(--brand); }
.pole-dot.high { background: var(--accent); }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--brand-soft); color: var(--ink-2);
  border-radius: 20px; padding: 3px 12px; font-size: 12.5px; font-weight: 600;
}
.chip-brand { background: linear-gradient(135deg, rgba(46, 155, 122, .25), rgba(224, 160, 60, .18)); color: var(--ink); }
.chip-lg { font-size: 14px; padding: 6px 16px; background: var(--surface-2); border: 1px solid var(--line); }

/* ---- 打印（白底深字） ---- */
@media print {
  body { background: #fff; color: #142019; }
  .no-print, .topbar { display: none !important; }
  .page { max-width: 100%; padding: 0; }
  .card, .rep-cover, .rep-sec, .role-card, .idx-card, .train-day, .scene-card {
    background: #fff !important; border-color: #D5E8DC !important; box-shadow: none !important; color: #142019 !important;
  }
  .rc-title, .th-name, .ix-v, .db-v, .hc-v, .num, .sec-title, .intro-title, .hero-title { color: #142019 !important; }
  .muted, .rc-sub, .sec-sub, .hc-t, .ix-d, .rc-desc { color: #6E8A7A !important; }
  .rep-sec { break-inside: avoid; }
}
