
/* ═════════════════════════════════════
   V2 设计系统 — 私行墨色 × 香槟金
   ═══════════════════════════════════ */
:root {
  --bg: #0d0f14;
  --panel: #14171f;
  --panel-2: #181c26;
  --hairline: rgba(236,233,226,0.09);
  --hairline-strong: rgba(236,233,226,0.16);
  --ink: #ece9e2;
  --ink-2: #a3a099;
  --ink-3: #9a978f; /* 提亮：原 #6f6c64 在 #0d0f14 上仅 3.66:1，不满足小字；#9a978f 在 bg/panel/panel-2 上分别为 6.57/6.14/5.84:1，≥4.5:1 */
  --gold: #c8a25e;
  --gold-hi: #dcbc7f;
  --gold-dim: rgba(200,162,94,0.12);
  --terra: #c4756a;
  --sage: #7ba05b;
  --paper: #f4f1e8;
  --paper-ink: #2a2822;
  --font-serif: "Playfair Display","Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC",serif;
  --font-sans: "Inter",-apple-system,"SF Pro Text","Helvetica Neue","PingFang SC","Microsoft YaHei",Arial,sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: var(--font-sans);
  background:
    radial-gradient(1200px 560px at 50% -8%, rgba(200,162,94,0.07), transparent 62%),
    var(--bg);
  color: var(--ink); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(200,162,94,0.35); }
.tip-hidden { display: none; }
#tooltip {
  position: fixed; background: #1c2029; color: var(--ink);
  border: 1px solid rgba(200,162,94,0.35); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; pointer-events: none;
  display: none; z-index: 999; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

/* ── 导航 ── */
.nav-bar {
  position: sticky; top: 0; z-index: 900;
  background: rgba(13,15,20,0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 14px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-brand { display: flex; align-items: baseline; gap: 12px; }
.nav-title {
  font-family: var(--font-serif); font-size: 20px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--ink);
}
.nav-title em { color: var(--gold); font-style: normal; }
.nav-sub {
  font-size: 10px; letter-spacing: 0.28em; color: var(--ink-3);
  text-transform: uppercase; font-weight: 500;
}
.nav-right { display: flex; align-items: center; gap: 12px; }
.btn-ghost {
  background: transparent; border: 1px solid var(--hairline-strong); border-radius: 8px;
  padding: 7px 16px; font-size: 13px; cursor: pointer; color: var(--ink);
  font-family: inherit; transition: all 0.18s;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.user-badge { font-size: 12px; color: var(--ink-2); padding: 6px 2px; letter-spacing: 0.02em; }
.user-badge.logged-in { color: var(--gold-hi); font-weight: 500; }

/* ── 主容器 ── */
main { max-width: 1160px; margin: 0 auto; padding: 0 24px 20px; }

/* ── Hero ── */
.hero { padding: 64px 0 40px; border-bottom: 1px solid var(--hairline); margin-bottom: 36px; }
.hero-eyebrow {
  font-size: 11px; letter-spacing: 0.34em; color: var(--gold);
  text-transform: uppercase; font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-serif); font-size: 42px; font-weight: 600;
  line-height: 1.25; letter-spacing: 0.01em; max-width: 720px;
}
.hero h1 em { color: var(--gold-hi); font-style: italic; }
.hero-meta {
  margin-top: 20px; font-size: 12px; color: var(--ink-3);
  letter-spacing: 0.12em; display: flex; gap: 10px; flex-wrap: wrap;
}
.hero-meta span + span::before { content: "·"; margin-right: 10px; color: var(--gold); }

/* ── 卡片 ── */
.card {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 26px 28px; margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.card h2 { font-family: var(--font-serif); font-size: 19px; font-weight: 600; margin-bottom: 16px; letter-spacing: 0.02em; }
.sec-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline);
}
.sec-header h2 { margin-bottom: 0; }
.sec-num { font-family: var(--font-serif); color: var(--gold); font-style: italic; margin-right: 10px; font-size: 15px; }
.sec-hint { color: var(--ink-3); font-size: 12px; letter-spacing: 0.04em; }

/* ── 输入表格 ── */
.input-table-wrap { overflow-x: auto; }
.input-table { width: 100%; border-collapse: collapse; }
.input-table th {
  background: transparent; color: var(--ink-3); padding: 8px 12px 12px;
  font-weight: 500; font-size: 11px; text-align: left; white-space: nowrap;
  letter-spacing: 0.18em; text-transform: uppercase;
  border-bottom: 1px solid var(--hairline-strong);
}
.input-table td { padding: 8px 8px; border-bottom: 1px solid var(--hairline); }
/* 输入行对齐守卫：ticker 格内含 input + .row-validation 两段内容，shares 格只有 input，
   默认 td { vertical-align: middle } 会把两格内容各自居中，导致同一行内 ticker 与
   shares 输入框纵向错位（空验证态约 2px，验证文字出现后约 20px+）。统一 top 对齐，
   让两输入框顶部对齐，验证文字自然落在 ticker 框下方。 */
.input-table td { vertical-align: top; }
.input-table tr:last-child td { border-bottom: none; }
.input-table tr:hover td { background: rgba(236,233,226,0.025); }
.row-num { color: var(--ink-3); font-size: 12px; text-align: center; font-family: var(--font-serif); font-style: italic; }
.inp-ticker, .inp-value, .inp-shares {
  width: 100%; padding: 9px 12px; border: 1px solid var(--hairline-strong); border-radius: 8px;
  font-size: 14px; font-family: inherit; outline: none; transition: all 0.18s;
  background: var(--panel-2); color: var(--ink);
}
.inp-ticker { letter-spacing: 0.06em; font-weight: 500; }
.inp-ticker:focus, .inp-value:focus, .inp-shares:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,162,94,0.14); }
.inp-ticker::placeholder, .inp-value::placeholder, .inp-shares::placeholder { color: var(--ink-3); }
.btn-del {
  background: none; border: none; color: var(--ink-3); font-size: 18px;
  cursor: pointer; padding: 4px 8px; border-radius: 6px; line-height: 1; transition: all 0.15s;
}
.btn-del:hover { color: var(--terra); background: rgba(196,117,106,0.1); }

/* 证券代表关系（阶段 2）：代表下拉与提示，最小样式，不引入新布局体系 */
.input-table .rep-cell { white-space: nowrap; }
.input-table .rep-select {
  width: 100%; min-width: 96px; padding: 8px 10px; border: 1px solid var(--hairline-strong);
  border-radius: 8px; font-size: 13px; font-family: inherit; outline: none; background: var(--panel-2);
  color: var(--ink); transition: border-color 0.18s;
}
.input-table .rep-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,162,94,0.14); }
.input-table .rep-hint { min-height: 14px; margin-top: 3px; font-size: 11px; color: var(--terra); }

/* 代表关系一次性确认弹窗 */
.rep-confirm-modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5); z-index: 50; padding: 16px;
}
.rep-confirm-modal[hidden] { display: none; }
.rep-confirm-box {
  background: var(--panel, #1c1b18); color: var(--ink); border: 1px solid var(--hairline-strong);
  border-radius: 14px; padding: 24px; max-width: 420px; width: 100%; box-shadow: 0 18px 50px rgba(0,0,0,0.4);
}
.rep-confirm-title { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.rep-confirm-body {
  margin: 0 0 18px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; font-family: inherit;
  color: var(--ink-2);
}
.rep-confirm-actions { display: flex; gap: 12px; justify-content: flex-end; }
/* K1D：确认/取消按钮命中区 ≥42×42px（移动端可靠点按），视觉文字不放大；flex 对齐下拉；
   focus-visible 清晰；禁用态视觉可辨。宽 390px 下 box width:100% + 不换行两钮不产生横向滚动。 */
.rep-confirm-actions button {
  min-width: 42px; min-height: 42px;
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 16px;
  line-height: 1;
}
.rep-confirm-actions button:focus-visible {
  outline: 2px solid var(--terra, #c4756a);
  outline-offset: 2px;
}
.rep-confirm-actions button:disabled {
  opacity: 0.45; cursor: not-allowed;
}

.input-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.btn-add {
  background: transparent; border: 1px dashed var(--hairline-strong); border-radius: 10px;
  padding: 11px 20px; font-size: 13px; cursor: pointer; color: var(--ink-2);
  flex: 1; transition: all 0.18s; font-family: inherit; letter-spacing: 0.04em;
}
.btn-add:hover { border-color: var(--gold); color: var(--gold-hi); background: var(--gold-dim); }
.btn-add:disabled { opacity: 0.45; cursor: not-allowed; border-style: solid; }
.btn-add:disabled:hover { border-color: var(--hairline-strong); color: var(--ink-2); background: transparent; }
.btn-calc {
  background: var(--gold); color: #15130e; border: none; border-radius: 10px;
  padding: 11px 30px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.18s; white-space: nowrap; font-family: inherit; letter-spacing: 0.06em;
  min-height: 42px; /* 移动端 tap 命中高度 ≥ 42px（J4A） */
}
.btn-calc:hover { background: var(--gold-hi); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(200,162,94,0.28); }
.btn-calc:disabled { cursor: wait; }

/* 阶段 C：仅计算组合市值（次要入口，主次分明：描边次级样式，主按钮保持金色实心） */
.btn-calc-value {
  background: transparent; color: var(--gold); border: 1px solid var(--gold);
  border-radius: 10px; padding: 11px 22px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; white-space: nowrap; font-family: inherit;
  letter-spacing: 0.04em; min-height: 42px; /* 移动端 tap 命中高度 ≥ 42px（K1D） */
}
.btn-calc-value:hover { background: rgba(200, 162, 94, 0.12); transform: translateY(-1px); }
.btn-calc-value:disabled { cursor: wait; opacity: 0.6; }

/* ── 阶段 J1/L2.3：组合信息折叠标题复用全局 .mv-collapse-head（见「统一折叠组件」）。
   原 .portfolio-info-* 大圆角按钮样式已移除，不再独立卡片。 ── */








/* 计算底稿内容区保留少量横向留白（其 HTML 表格较多），不破坏统一标题风格 */
.report-body { padding-left: 2px; padding-right: 2px; }








/* ── Treemap ── */
.tm-wrap { width: 100%; min-height: 300px; }
.tm-wrap svg { display: block; margin: 0 auto; }

/* ── 优化器图 ── */
.frontier-box { width: 100%; }
.frontier-box svg { display: block; margin: 0 auto; }
.ft-note { text-align: center; font-size: 11px; color: var(--ink-3); margin: 10px 0 18px; letter-spacing: 0.03em; }
@media (max-width: 640px) {
  .ft-note { margin: 10px 0 16px; }
}

/* ── L1F：经典 MV 优化路径语义说明（图表标题下，不遮挡、不横向滚动）── */
.frontier-semantics-note {
  display: flex; gap: 6px; align-items: flex-start;
  max-width: 100%; margin: 6px 0 2px;
  font-size: 11px; line-height: 1.5; color: var(--ink-3);
  word-break: break-word; overflow-wrap: anywhere;
}
.frontier-semantics-note .fs-info { flex: 0 0 auto; font-weight: 700; }
.frontier-semantics-note .fs-short { display: none; }
@media (max-width: 600px) {
  .frontier-semantics-note .fs-full { display: none; }
  .frontier-semantics-note .fs-short { display: inline; }
}




/* ── 计算底稿面板 ── */
.report-bar {
  margin-top: 20px; padding: 16px 20px;
  background: rgba(200,162,94,0.05); border: 1px solid rgba(200,162,94,0.22);
  border-radius: 12px;
}
.report-bar-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.report-hint { color: var(--ink-2); font-size: 13px; line-height: 1.5; }
/* 结果区顶部工具栏：查看计算底稿入口（游客/未持久化结果时由 JS 隐藏） */
.result-toolbar {
  display: none; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px;
}
.result-toolbar .btn-ghost {
  background: transparent; color: var(--ink-2); border: 1px solid rgba(200,162,94,0.35);
  border-radius: 10px; padding: 9px 16px; font-size: 13px; cursor: pointer; font-family: inherit;
  transition: all 0.18s;
}
.result-toolbar .btn-ghost:hover { color: var(--gold-hi); border-color: rgba(200,162,94,0.6); }

/* ── 登录用户组合总市值曲线（Commit D）── */
.navchart-sub { color: var(--ink-2); font-size: 13px; margin: 4px 0 14px; line-height: 1.5; }
/* 汇率披露：长句在窄屏必须换行，绝不撑出横向滚动条（max-width:100% + 允许在任意处断行）。
   as_of 是不含空格的 ISO 时间串，只靠 word-wrap 断不开，故一并给 overflow-wrap:anywhere。 */
.nav-fx-note { max-width: 100%; margin: -8px 0 14px; overflow-wrap: anywhere; word-break: break-word; }
.nav-chart-wrap { position: relative; width: 100%; }
#navChart { width: 100%; min-height: 220px; }
#navChart svg { width: 100%; height: auto; display: block; overflow: visible; }
.nav-empty { color: var(--ink-2); font-size: 13px; padding: 40px 0; text-align: center; }
.nav-single { text-align: center; padding: 34px 0; }
.nav-single .v { font-size: 22px; font-weight: 700; color: var(--gold-hi); }
.nav-single .d { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.nav-tip {
  position: absolute; pointer-events: none; background: #15130e; color: #ece9e2;
  border: 1px solid rgba(200,162,94,0.4); border-radius: 8px; padding: 8px 10px;
  font-size: 12px; line-height: 1.55; white-space: nowrap; opacity: 0; transition: opacity .12s;
  z-index: 5;
}
.nav-tip div { white-space: nowrap; }
/* 选中数据点后的轻量删除入口（仅登录用户；游客永不渲染） */
.nav-delete-bar {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.nav-delete-target { font-size: 12px; color: var(--ink-2); }
.nav-delete-btn { padding: 6px 14px; font-size: 12px; }
.nav-delete-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
/* 被选中的数据点：加大并描边，键盘/鼠标都能看清当前选中的是哪天 */
circle.nav-pt { cursor: pointer; }
circle.nav-pt.is-selected { stroke: var(--gold-hi); stroke-width: 3; }
/* 仅一条记录时没有折线，单点卡片本身可选中 */
.nav-single[data-nav-date] { cursor: pointer; border-radius: 10px; }
.nav-single.is-selected { box-shadow: inset 0 0 0 1px var(--gold-hi); }
.btn-snapshot {
  background: transparent; color: var(--gold-hi); border: 1px solid rgba(200,162,94,0.5);
  border-radius: 10px; padding: 9px 18px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit; letter-spacing: 0.04em;
}
.btn-snapshot:hover { background: var(--gold); color: #15130e; border-color: var(--gold); }
.report-body {
  max-height: 70vh; overflow: auto; background: var(--paper); color: var(--paper-ink);
  border-radius: 10px; padding: 22px 26px; border: 1px solid rgba(200,162,94,0.25);
}
.report-body h1 { font-family: var(--font-serif); font-size: 20px; margin: 4px 0 12px; }
.report-body h2 { font-size: 15px; margin: 18px 0 8px; border-bottom: 1px solid rgba(42,40,34,0.18); padding-bottom: 5px; }
.report-body h3 { font-size: 13px; margin: 14px 0 6px; }
.report-body p { font-size: 13px; line-height: 1.65; margin: 6px 0; }
.report-body ul { margin: 6px 0 6px 20px; font-size: 13px; line-height: 1.65; }
.report-body blockquote {
  border-left: 3px solid var(--gold); margin: 10px 0; padding: 5px 12px;
  color: #6b6455; font-size: 12px; background: rgba(200,162,94,0.08);
}

/* ── AI Explanation（P6：量化结果的文字补充，绝不覆盖原结果）── */
.ai-explain {
  margin-top: 22px; padding: 20px 22px;
  background: var(--panel-2); border: 1px solid rgba(111,151,196,0.32);
  border-radius: 14px;
}
.ai-explain h3 {
  font-family: var(--font-serif); font-size: 16px; font-weight: 600;
  margin: 0 0 14px; color: var(--ink); letter-spacing: 0.02em;
}
.ai-explain .ai-hint { color: var(--ink-3); font-size: 13px; line-height: 1.6; }
.ai-explain .ai-loading { color: var(--ink-2); font-size: 13px; font-style: italic; }
.btn-explain {
  background: transparent; color: #8fb4e0; border: 1px solid rgba(111,151,196,0.55);
  border-radius: 10px; padding: 10px 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit; letter-spacing: 0.04em;
}
.btn-explain:hover:not(:disabled) { background: rgba(111,151,196,0.18); }
.btn-explain:disabled { cursor: wait; opacity: 0.6; }
.ai-fields { margin-top: 4px; }
.ai-field { margin: 14px 0; }
.ai-field .ai-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); display: block; margin-bottom: 5px;
}
.ai-field .ai-value { font-size: 13px; line-height: 1.62; color: var(--ink-2); white-space: pre-wrap; }
.ai-disclaimer {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hairline);
  font-size: 11px; color: var(--ink-3); font-style: italic; line-height: 1.5;
}
.ai-error { color: var(--terra); font-size: 13px; line-height: 1.6; }
.ai-question-row { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.ai-question-input {
  flex: 1 1 auto; min-width: 0; padding: 10px 12px; font-size: 13px; font-family: inherit;
  color: var(--ink); background: rgba(255,255,255,0.04);
  border: 1px solid rgba(111,151,196,0.45); border-radius: 10px; outline: none;
}
.ai-question-input:focus { border-color: rgba(111,151,196,0.85); }
.ai-explain-result { margin-top: 12px; }
.ai-question-echo {
  font-size: 13px; line-height: 1.6; color: var(--ink-2); font-style: italic;
  margin-bottom: 8px; padding-left: 10px; border-left: 2px solid rgba(111,151,196,0.5);
}
.report-body .wp-table { border-collapse: collapse; width: 100%; font-size: 12px; margin: 8px 0; }
.report-body .wp-table th { background: var(--paper-ink); color: var(--paper); padding: 6px 10px; text-align: left; font-weight: 600; }
.report-body .wp-table td { padding: 4px 10px; border-bottom: 1px solid rgba(42,40,34,0.12); }
.report-body .wp-code {
  background: #ece8db; border: 1px solid rgba(42,40,34,0.14); border-radius: 8px;
  padding: 12px; overflow-x: auto; font-size: 11px; line-height: 1.45;
  font-family: "SF Mono", Menlo, monospace; white-space: pre; max-height: 340px;
}

/* ── 仓位表 ── */
.detail-table-wrap { overflow-x: auto; }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th {
  background: transparent; color: var(--ink-3); padding: 8px 12px 12px;
  font-weight: 500; font-size: 11px; text-align: left; white-space: nowrap;
  letter-spacing: 0.18em; text-transform: uppercase;
  border-bottom: 1px solid var(--hairline-strong);
}
.detail-table td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); font-size: 13px; color: var(--ink-2); }
.detail-table td strong { color: var(--ink); letter-spacing: 0.04em; }
.detail-table tr:last-child td { border-bottom: none; }
.detail-table tr:hover td { background: rgba(236,233,226,0.025); }
/* 阶段 G：详细持仓分组（代理归组）标题行与组内明细行 */
.detail-table tr.group-row td { font-weight: 600; color: var(--ink); background: rgba(200,162,94,0.07); border-bottom: 1px solid var(--hairline); }
.detail-table tr.group-row:hover td { background: rgba(200,162,94,0.10); }
.detail-table tr.group-row td strong { color: var(--ink); }
.detail-table tr.member-row td:first-child { padding-left: 26px; }
.detail-table tr.member-row td:first-child strong::before { content: "·"; color: var(--ink-3); margin-right: 8px; }

/* ── 页脚 ── */
.footer {
  margin-top: 40px; padding: 22px 0 26px; color: var(--ink-3); font-size: 11px;
  text-align: center; letter-spacing: 0.14em; border-top: 1px solid var(--hairline);
}

/* ── 页面级模态框（登录 / 受限提示 / 游客额度 / NAV 删除确认共用） ──
   overlay 固定铺满视口并 flex 居中；padding 16px 保证手机四周安全间距，
   配合 .modal-box 的 max-width:100% 使对话框在窄屏不溢出、无横向滚动。 */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(5,6,9,0.65);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box; overflow-y: auto;
}
/* 认证弹窗层级高于游客额度提示：额度提示绝不覆盖既有登录流程 */
#loginModal, #loginHintModal { z-index: 1050; }
.modal-box {
  background: var(--panel-2); border: 1px solid var(--hairline-strong);
  border-radius: 14px; padding: 30px; width: 400px; max-width: 100%;
  box-sizing: border-box; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-box:focus { outline: none; }
.modal-box h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin-bottom: 22px; }
.modal-box-sm { width: 340px; padding: 26px 28px; }
.login-hint-text { font-size: 14px; line-height: 1.6; color: var(--ink); }
.modal-note { margin-top: 12px; font-size: 12px; line-height: 1.65; color: var(--ink-3); }
.modal-box-sm .btn-row { margin-top: 20px; }
.form-grp { margin-bottom: 16px; }
.form-grp label {
  display: block; font-size: 11px; font-weight: 500; margin-bottom: 7px;
  color: var(--ink-3); letter-spacing: 0.16em; text-transform: uppercase;
}
.form-grp input {
  width: 100%; padding: 10px 13px; border: 1px solid var(--hairline-strong); border-radius: 8px;
  font-size: 14px; font-family: inherit; outline: none; background: var(--panel); color: var(--ink);
  transition: all 0.18s;
}
.form-grp input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,162,94,0.14); }
.btn-row { display: flex; gap: 10px; margin-top: 22px; }
.btn-p {
  background: var(--gold); color: #15130e; border: none; border-radius: 8px;
  padding: 10px 24px; font-size: 14px; font-weight: 600; cursor: pointer; flex: 1;
  font-family: inherit; transition: all 0.18s;
}
.btn-p:hover { background: var(--gold-hi); }
.btn-s {
  background: transparent; color: var(--ink-2); border: 1px solid var(--hairline-strong);
  border-radius: 8px; padding: 10px 20px; font-size: 14px; cursor: pointer;
  font-family: inherit; transition: all 0.18s;
}
.btn-s:hover { border-color: var(--gold); color: var(--gold-hi); }
/* Draft 预览「复制」按钮：沿用 .btn-p 的金色主按钮外观，但按内容宽度显示，
   不撑满整行（覆盖 .btn-p 的 flex:1；不修改全站通用按钮规则，避免其他页面回归）。 */
.draft-copy-btn { flex: 0 0 auto; }
.login-msg { margin-top: 14px; padding: 9px 12px; border-radius: 8px; font-size: 12px; text-align: center; }
.login-msg.error { background: rgba(196,117,106,0.12); color: #dfa096; border: 1px solid rgba(196,117,106,0.3); }
.login-msg.success { background: rgba(123,160,91,0.12); color: #a9c48e; border: 1px solid rgba(123,160,91,0.3); }

/* ── L5 邮箱账户流程：login/register/forgot/verify 四态，无顶部 Tab ── */
.auth-hint { font-size: 12px; line-height: 1.5; color: var(--ink-3); margin: 4px 0 0; }
.auth-divider { display: flex; align-items: center; margin: 16px 0 10px; color: var(--ink-3); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--hairline-strong); }
.auth-divider span { padding: 0 12px; }
.social-row { display: flex; justify-content: center; gap: 12px; }
.social-btn {
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ffffff; border: 1px solid var(--hairline-strong);
  cursor: pointer; transition: box-shadow 0.18s, transform 0.08s, background 0.18s;
}
.social-btn svg { width: 20px; height: 20px; display: block; }
.social-btn:hover { background: #f6f7f9; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.social-btn:focus-visible { outline: 2px solid #4285F4; outline-offset: 2px; }
.social-btn:active { transform: scale(0.96); }
.social-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }
.auth-switch { text-align: center; font-size: 12px; margin-top: 16px; color: var(--ink-3); }
.auth-switch a { color: var(--gold-hi); text-decoration: none; cursor: pointer; }
.auth-switch a:hover { text-decoration: underline; }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12px; }
.auth-links a { color: var(--ink-3); text-decoration: none; cursor: pointer; transition: color 0.18s; }
.auth-links a:hover { color: var(--gold-hi); }
.verify-text { font-size: 13px; line-height: 1.7; color: var(--ink-2); margin: 0; }
.verify-text strong { color: var(--gold-hi); font-weight: 600; word-break: break-all; }
.verify-hint { font-size: 12px; line-height: 1.6; color: var(--ink-3); margin: 10px 0 0; }
.user-badge.unverified { color: #e0b15a; font-weight: 500; }

/* ── 阶段 J3：偏好保存状态紧凑显示 + 长错误说明可换行（不撑满、不横向溢出）──
   .mv-status 本体在 optimizer.css（.opt-settings 内），此处补充紧凑约束。 */
.opt-settings .mv-status { max-width: 100%; white-space: normal; line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; }

/* ── K1B：代理关系保存「重试保存 / 仍然退出」按钮 ──
   动态插入的 <button>，必须有可见样式与移动端 ≥42px 命中高度（键盘可操作）。 */
.mv-save-retry {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 8px 14px; margin-top: 8px;
  font: inherit; letter-spacing: 0.03em; cursor: pointer;
  border-radius: 8px; border: 1px solid rgba(200,162,94,0.4);
  background: rgba(200,162,94,0.10); color: var(--ink, #f4f1ea);
}
.mv-save-retry:focus-visible { outline: 2px solid var(--gold-hi, #e0c089); outline-offset: 2px; }
.mv-still-exit {
  border-color: rgba(196,117,106,0.5);
  background: rgba(196,117,106,0.10); color: var(--terra, #dfa096);
}

/* ── 响应式 ── */
@media (max-width: 768px) {
  main { padding: 0 14px 16px; }
  .hero { padding: 44px 0 30px; }
  .hero h1 { font-size: 30px; }
  .card { padding: 18px; }
  .sec-header { flex-direction: column; gap: 4px; }
  .input-actions { flex-direction: column; }
  .btn-add { text-align: center; }
  .nav-sub { display: none; }
}
