/* 男票网 · love.7373.com.cn —— 视觉实现严格对齐 DESIGN.md（深夜会客厅） */

:root {
  --foyer: #141010;
  --sitting: #1C1716;
  --sitting-2: #221B19;
  --paper: #F2EAE0;
  --ivory: #F6F1EA;
  --ivory-dim: rgba(246, 241, 234, 0.66);
  --ivory-whisper: rgba(246, 241, 234, 0.38);
  --hairline: rgba(246, 241, 234, 0.10);
  --hairline-strong: rgba(246, 241, 234, 0.24);
  --gold: #D9A15B;
  --gold-soft: rgba(217, 161, 91, 0.14);
  --rose: #C97B6E;
  --trust: #7FA6A0;
  --alert: #C96A5F;
  --ink: #2A211D;
  --ink-soft: #6B5D54;

  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --r-card: 16px;
  --r-btn: 10px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--foyer);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 78% -8%, rgba(217, 161, 91, 0.09), transparent 62%),
    radial-gradient(900px 520px at 6% 4%, rgba(201, 123, 110, 0.05), transparent 60%);
  background-attachment: fixed;
}

a { color: var(--ivory); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0 0 12px; line-height: 1.35; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0 0 14px; color: var(--ivory-dim); }

.display {
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--ivory);
}
.lede { font-size: 16px; line-height: 1.8; color: var(--ivory-dim); max-width: 34em; }

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-whisper);
}
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; }
.muted { color: var(--ivory-dim); }
.whisper { color: var(--ivory-whisper); }
.hairline { height: 1px; background: var(--hairline); border: 0; margin: 24px 0; }

/* ------------------------------------------------------------- 导航 ---- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(20, 16, 16, 0.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--hairline); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 48px; height: 68px; display: flex; align-items: center; gap: 32px; }
.wordmark { display: flex; align-items: baseline; gap: 10px; }
.wordmark-cn { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: 0.06em; }
.wordmark-mono { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--ivory-whisper); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--ivory-dim); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--ivory); }
.nav-links a.is-active { color: var(--ivory); border-bottom-color: var(--gold); }
.nav-account { display: flex; align-items: center; gap: 12px; }
.nav-user { font-size: 12px; color: var(--ivory-whisper); }
.inline { display: inline; margin: 0; }

/* ------------------------------------------------------------- 布局 ---- */
.shell { max-width: var(--max); margin: 0 auto; padding: 48px; }
.shell-narrow { max-width: 820px; margin: 0 auto; padding: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 32px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }

.panel { background: var(--sitting); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 28px; }
.panel-flat { background: transparent; border: 0; padding: 0; }
.panel-paper { background: var(--paper); color: var(--ink); border-radius: var(--r-card); padding: 32px; }
.panel-paper h1, .panel-paper h2, .panel-paper h3 { color: var(--ink); }
.panel-paper p, .panel-paper li { color: var(--ink-soft); }
.panel-paper .label { color: #9A8A80; }

.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.section { margin-top: 64px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--hairline); padding-bottom: 12px; margin-bottom: 24px; }

/* ------------------------------------------------------------- 按钮 ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: var(--r-btn); font-size: 14px; font-weight: 600; font-family: var(--sans); border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--gold); color: #1C1716; }
.btn-primary:hover { background: #E4AF6A; color: #1C1716; }
.btn-ghost { background: transparent; border-color: var(--hairline-strong); color: var(--ivory); }
.btn-ghost:hover { border-color: rgba(246, 241, 234, 0.34); color: var(--ivory); }
.btn-quiet { background: transparent; border: 0; color: var(--ivory-dim); padding: 0 8px; height: 40px; font-weight: 500; }
.btn-quiet:hover { color: var(--gold); }
.btn-rose { background: transparent; border-color: rgba(201, 123, 110, 0.5); color: var(--rose); }
.btn-rose:hover { border-color: var(--rose); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* --------------------------------------------------------------- 胶囊 ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--hairline); font-size: 11.5px; color: var(--ivory-whisper); letter-spacing: .04em; }
.chip-demo { border-style: dashed; color: var(--ivory-whisper); }
.chip-verified { color: var(--trust); border-color: rgba(127, 166, 160, 0.35); }
.chip-pending { color: var(--gold); border-color: rgba(217, 161, 91, 0.35); }
.chip-withheld { color: var(--ivory-whisper); border-style: dashed; }
.chip-rose { color: var(--rose); border-color: rgba(201, 123, 110, 0.4); }

/* --------------------------------------------------------------- 档案卡 ---- */
.cand { display: block; background: var(--sitting); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 22px 24px; transition: border-color .16s, transform .16s; }
.cand:hover { border-color: rgba(217, 161, 91, 0.35); transform: translateY(-1px); }
.cand-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sitting-2); border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 17px; color: var(--ivory-dim); flex: none; }
.cand-name { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.cand-meta { font-size: 12px; color: var(--ivory-whisper); }
.cand-summary { font-size: 13.5px; color: var(--ivory-dim); margin: 0 0 14px; line-height: 1.7; }
.cand-verdict { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--hairline); padding-top: 12px; gap: 10px; }
.score { font-family: var(--mono); font-size: 20px; color: var(--gold); line-height: 1; }
.score-max { font-family: var(--mono); font-size: 11px; color: var(--ivory-whisper); }

/* --------------------------------------------------------------- 对话 ---- */
.chat-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.chat-log { display: flex; flex-direction: column; gap: 18px; max-height: 62vh; overflow-y: auto; padding-right: 8px; margin-bottom: 24px; }
.msg { max-width: 84%; font-size: 14.5px; line-height: 1.72; }
.msg-a { border-left: 1px solid rgba(217, 161, 91, 0.55); padding-left: 16px; color: var(--ivory); }
.msg-a .who { display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; font-weight: 600; }
.msg-u { align-self: flex-end; background: var(--sitting); border: 1px solid var(--hairline); border-radius: 16px 16px 4px 16px; padding: 12px 16px; color: var(--ivory); }
.msg-note { font-size: 12px; color: var(--ivory-whisper); }

.chat-input { display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--hairline); padding-top: 18px; }
.chat-input textarea, .chat-input input, input[type="text"], input[type="number"], textarea {
  flex: 1; width: 100%; background: transparent; border: 1px solid var(--hairline-strong); border-radius: 12px;
  color: var(--ivory); font-family: var(--sans); font-size: 15px; line-height: 1.6; padding: 12px 14px; resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--ivory-whisper); }
input:focus, textarea:focus { outline: none; border-color: rgba(217, 161, 91, 0.5); }

.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hairline-strong); background: transparent; color: var(--ivory-dim); font-size: 13px; cursor: pointer; }
.opt:hover { border-color: var(--gold); color: var(--ivory); }
.opt.is-picked { background: var(--gold-soft); border-color: var(--gold); color: var(--ivory); }

.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.progress-track { flex: 1; height: 2px; background: var(--hairline); position: relative; }
.progress-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold); width: 0; transition: width .3s; }

/* --------------------------------------------------------------- 字段表 ---- */
.field-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.field-row:last-child { border-bottom: 0; }
.field-row.is-private { opacity: .5; border-left: 1px dashed var(--hairline-strong); padding-left: 14px; }
.field-label { font-size: 12px; letter-spacing: .06em; color: var(--ivory-whisper); }
.field-value { font-family: var(--mono); font-size: 13.5px; color: var(--ivory); word-break: break-word; }
.vis-group { display: flex; gap: 6px; }
.vis-btn { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--hairline); background: transparent; color: var(--ivory-whisper); cursor: pointer; }
.vis-btn.is-on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }

/* --------------------------------------------------------------- 维度条 ---- */
.dim { padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.dim:last-child { border-bottom: 0; }
.dim-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.dim-name { font-size: 13px; color: var(--ivory); }
.dim-score { font-family: var(--mono); font-size: 13px; color: var(--gold); }
.dim-track { height: 1px; background: rgba(246, 241, 234, 0.14); position: relative; margin: 10px 0; }
.dim-fill { position: absolute; left: 0; top: -1px; height: 3px; background: var(--gold); }
.dim-basis { font-size: 12.5px; color: var(--ivory-dim); margin: 6px 0 0; }
.dim-unknown { font-size: 12px; color: var(--ivory-whisper); }
.dim-ask { font-size: 12px; color: var(--trust); }

/* --------------------------------------------------------------- 表格 ---- */
table.tools { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tools th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ivory-whisper); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
table.tools td { padding: 12px; border-bottom: 1px solid var(--hairline); color: var(--ivory-dim); vertical-align: top; }
table.tools td.tool-name { font-family: var(--mono); color: var(--ivory); white-space: nowrap; }

pre.code { background: rgba(0, 0, 0, 0.28); border: 1px solid var(--hairline); border-radius: 12px; padding: 16px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ivory-dim); }

/* --------------------------------------------------------------- 页脚 ---- */
.foot { border-top: 1px solid var(--hairline); margin-top: 80px; padding: 32px 48px 48px; }
.foot-inner { max-width: var(--max); margin: 0 auto; display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--ivory-whisper); }
.foot-inner a { color: var(--ivory-dim); }
.foot-sep { opacity: .4; }
.foot-note { max-width: var(--max); margin: 12px auto 0; font-size: 11.5px; line-height: 1.8; color: rgba(246, 241, 234, 0.28); }

/* --------------------------------------------------------------- 杂项 ---- */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(12px); background: var(--sitting-2); border: 1px solid var(--hairline-strong); color: var(--ivory); font-size: 13px; padding: 12px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 40; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty { border: 1px dashed var(--hairline-strong); border-radius: var(--r-card); padding: 32px; text-align: center; color: var(--ivory-dim); font-size: 13.5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--ivory-whisper); font-size: 12px; }
.kv dd { margin: 0; font-family: var(--mono); color: var(--ivory-dim); }
.principle { display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.principle-num { font-family: var(--mono); font-size: 12px; color: var(--gold); padding-top: 3px; }

/* --------------------------------------------------------------- 响应式 ---- */
@media (max-width: 1024px) {
  .nav-inner { padding: 0 20px; height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 10px; gap: 10px; }
  .nav-links { order: 3; width: 100%; gap: 18px; overflow-x: auto; margin-left: 0; flex-wrap: nowrap; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; font-size: 13.5px; }
  .nav-account { margin-left: auto; }
  .nav-account .btn-sm { height: 40px; }
  .shell, .shell-narrow { padding: 28px 20px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 24px 0 8px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 22px; }
  .hero-actions .btn { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; gap: 24px; }
  .grid-3 { grid-template-columns: 1fr; }
  .chat-wrap { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 8px; }
  .foot { padding: 24px 20px 40px; }
}
