/* ============================================================
   朱批 · 作文智能批改台 — 视觉系统
   基调:宣纸暖白 × 墨蓝 × 朱砂红。克制、留白、衬线大字。
   ============================================================ */
:root {
  --paper: #f7f4ee;          /* 页面底:宣纸暖白 */
  --surface: #ffffff;
  --surface-warm: #fbf9f5;
  --ink: #1d2733;            /* 正文墨色 */
  --ink-2: #51606e;          /* 次级文字 */
  --ink-3: #8894a0;          /* 弱化文字 */
  --hairline: #e7e0d4;       /* 暖色发丝线 */
  --hairline-2: #efeae0;
  --cinnabar: #b23a2b;       /* 朱砂红:品牌与强调 */
  --cinnabar-deep: #96291c;
  --cinnabar-soft: #f8ece9;
  --azure: #2f5a7c;          /* 墨蓝:图表主色 */
  --azure-2: #6d92ad;
  --azure-3: #b7cddd;
  --azure-4: #e2ecf3;
  --good: #2e7d5b;
  --good-soft: #e8f3ee;
  --warn: #9a6b13;
  --warn-soft: #faf3e0;
  --bad: #a83226;
  --bad-soft: #f9ebe9;
  --serif: "Noto Serif SC", "STZhongsong", "SimSun", serif;
  --sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --shadow-1: 0 1px 2px rgba(29,39,51,.05), 0 2px 8px rgba(29,39,51,.05);
  --shadow-2: 0 4px 12px rgba(29,39,51,.08), 0 12px 32px rgba(29,39,51,.10);
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.65;
}
::selection { background: var(--azure-3); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--ink); }

#app { display: flex; min-height: 100vh; }

/* ---------------- 侧栏 ---------------- */
#sidebar {
  width: 232px; flex: none;
  background: linear-gradient(175deg, #22303e 0%, #1b2632 100%);
  color: #e8e3d8;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 26px 18px 18px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 24px; }
.seal {
  width: 46px; height: 46px; flex: none;
  background: var(--cinnabar);
  color: #fff7ef;
  font-family: var(--serif); font-weight: 900; font-size: 17px;
  line-height: 1.15; text-align: center;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px rgba(255,247,239,.35), inset 0 0 0 4px var(--cinnabar);
  letter-spacing: 2px;
  writing-mode: vertical-rl;
}
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: 6px; color: #f4efe4; }
.brand-sub { font-size: 10px; color: #9daab6; letter-spacing: .5px; margin-top: 2px; white-space: nowrap; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: #b9c3cd; font-size: 14px; letter-spacing: 1px;
  transition: background .15s, color .15s;
}
#nav a:hover { background: rgba(255,255,255,.06); color: #eef; }
#nav a.active { background: rgba(178,58,43,.22); color: #f4efe4; }
#nav a.active .nav-ico { color: #e58a7c; }
.nav-ico { font-size: 15px; width: 18px; text-align: center; color: #7d8b98; }
#cta-new {
  margin: 18px 4px 0;
  background: var(--cinnabar); color: #fff7ef;
  text-align: center; padding: 11px; border-radius: 9px;
  font-size: 15px; letter-spacing: 3px; font-weight: 600;
  box-shadow: 0 3px 10px rgba(178,58,43,.35);
  transition: background .15s, transform .1s;
}
#cta-new:hover { background: var(--cinnabar-deep); }
#cta-new:active { transform: translateY(1px); }
.side-foot { margin-top: auto; padding: 0 6px; }
.side-cost { font-size: 11px; color: #8b98a5; margin-bottom: 10px; }
.side-note { font-size: 11px; color: #67757f; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; line-height: 1.8; letter-spacing: .5px; }

/* ---------------- 主区 ---------------- */
#main { flex: 1; min-width: 0; padding: 34px 44px 80px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: 2px; line-height: 1.3; }
.page-title .accent-bar { display: inline-block; width: 5px; height: 24px; background: var(--cinnabar); border-radius: 2px; margin-right: 14px; vertical-align: -2px; }
.page-sub { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 按钮体系 */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--hairline); background: var(--surface);
  color: var(--ink-2); border-radius: 8px; padding: 8px 16px;
  font-size: 13px; letter-spacing: 1px;
  transition: all .15s;
}
.btn:hover { border-color: var(--azure-2); color: var(--azure); }
.btn.primary { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff7ef; font-weight: 600; }
.btn.primary:hover { background: var(--cinnabar-deep); border-color: var(--cinnabar-deep); color: #fff; }
.btn.big { padding: 12px 34px; font-size: 16px; letter-spacing: 4px; border-radius: 10px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-warm); }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 卡片 */
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.card-pad { padding: 22px 26px; }
.section-title { font-family: var(--serif); font-size: 18px; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.section-title .n {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 12px; font-family: var(--sans);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
}

/* 统计牌 */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-tile { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px 22px 14px; box-shadow: var(--shadow-1); }
.stat-num { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-num small { font-size: 15px; color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.stat-label { color: var(--ink-3); font-size: 12px; letter-spacing: 1.5px; margin-top: 6px; }
.stat-tile.warn .stat-num { color: var(--warn); }
.stat-tile.accent .stat-num { color: var(--cinnabar); }

/* 表格 */
table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.list th {
  text-align: left; color: var(--ink-3); font-weight: 500; font-size: 12px;
  letter-spacing: 1px; padding: 10px 12px; border-bottom: 1px solid var(--hairline);
  white-space: nowrap; user-select: none;
}
table.list th.sortable { cursor: pointer; }
table.list th.sortable:hover { color: var(--azure); }
table.list td { padding: 11px 12px; border-bottom: 1px solid var(--hairline-2); vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
table.list tbody tr { transition: background .12s; }
table.list tbody tr.rowlink { cursor: pointer; }
table.list tbody tr.rowlink:hover { background: var(--surface-warm); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.total-cell { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.total-cell.overridden { color: var(--azure); }

/* 徽章 */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 2px 9px; border-radius: 20px;
  border: 1px solid transparent; white-space: nowrap; letter-spacing: .5px;
}
.chip.band-1 { background: var(--good-soft); color: var(--good); }
.chip.band-2 { background: var(--azure-4); color: var(--azure); }
.chip.band-3 { background: var(--warn-soft); color: var(--warn); }
.chip.band-4 { background: var(--bad-soft); color: var(--bad); }
.chip.flag { background: var(--warn-soft); color: var(--warn); }
.chip.flag.hard { background: var(--bad-soft); color: var(--bad); }
.chip.tag { background: var(--surface-warm); color: var(--ink-2); border-color: var(--hairline); }
.chip.demo { background: var(--azure-4); color: var(--azure); }
.chip.status-grading { background: var(--azure-4); color: var(--azure); }
.chip.status-draft { background: var(--surface-warm); color: var(--ink-3); border-color: var(--hairline); }
.chip.status-done { background: var(--good-soft); color: var(--good); }

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); letter-spacing: 1px; margin-bottom: 6px; }
.field label .req { color: var(--cinnabar); margin-left: 2px; }
.field input[type=text], .field input[type=number], .field select, .field textarea {
  width: 100%; border: 1px solid var(--hairline); border-radius: 8px;
  padding: 9px 12px; background: var(--surface);
  transition: border .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--azure-2); box-shadow: 0 0 0 3px var(--azure-4);
}
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }

/* 上传区 */
.dropzone {
  border: 1.5px dashed #cfc6b5; border-radius: var(--radius);
  background: var(--surface-warm);
  padding: 38px 20px; text-align: center; color: var(--ink-2);
  transition: all .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--azure-2); background: var(--azure-4); }
.dropzone .dz-big { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 2px; margin-bottom: 6px; }
.dropzone .dz-sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.9; }
.upload-list { margin-top: 14px; }
.upload-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--hairline-2); border-radius: 8px; margin-bottom: 8px; background: var(--surface); }
.upload-item .thumb { width: 40px; height: 52px; object-fit: cover; border-radius: 4px; border: 1px solid var(--hairline); background: var(--surface-warm); flex: none; }
.upload-item .txt-thumb { width: 40px; height: 52px; border-radius: 4px; border: 1px solid var(--hairline); background: var(--surface-warm); flex: none; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-3); }
.upload-item .u-name input { border: none; border-bottom: 1px dashed var(--hairline); background: transparent; font-size: 14px; width: 110px; padding: 2px 0; }
.upload-item .u-name input:focus { outline: none; border-bottom-color: var(--azure-2); }
.upload-item .u-meta { color: var(--ink-3); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .u-ops { display: flex; gap: 6px; }
.mini-btn { border: 1px solid var(--hairline); background: var(--surface); border-radius: 6px; padding: 3px 10px; font-size: 12px; color: var(--ink-2); }
.mini-btn:hover { border-color: var(--azure-2); color: var(--azure); }
.mini-btn.danger:hover { border-color: var(--bad); color: var(--bad); }

/* 进度 */
.progress-hero { text-align: center; padding: 40px 20px 30px; }
.progress-title { font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: 3px; margin-bottom: 8px; }
.progress-sub { color: var(--ink-3); font-size: 13px; margin-bottom: 24px; }
.progress-track { height: 10px; background: var(--hairline-2); border-radius: 6px; overflow: hidden; max-width: 560px; margin: 0 auto 10px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--azure), var(--azure-2)); border-radius: 6px; transition: width .8s ease; }
.progress-nums { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; }
.essay-status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 26px; text-align: left; }
.es-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--hairline-2); background: var(--surface); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; }
.es-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.es-dot.pending { background: #cfc6b5; }
.es-dot.transcribing { background: var(--azure-2); animation: pulse 1.2s infinite; }
.es-dot.grading { background: var(--cinnabar); animation: pulse 1.2s infinite; }
.es-dot.done { background: var(--good); }
.es-dot.error { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
.es-item .es-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-item .es-state { color: var(--ink-3); font-size: 11.5px; }

/* 批次卡 */
.batch-card { display: flex; align-items: center; gap: 18px; padding: 18px 24px; transition: box-shadow .15s, transform .1s; cursor: pointer; }
.batch-card:hover { box-shadow: var(--shadow-2); }
.batch-card .b-main { flex: 1; min-width: 0; }
.batch-card .b-title { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.batch-card .b-meta { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.batch-card .b-avg { text-align: right; }
.batch-card .b-avg .n { font-family: var(--serif); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.batch-card .b-avg .l { font-size: 11px; color: var(--ink-3); letter-spacing: 1px; }
.band-mini { display: flex; height: 8px; width: 130px; border-radius: 4px; overflow: hidden; background: var(--hairline-2); }
.band-mini i { display: block; height: 100%; }
.band-mini .s1 { background: var(--azure); }
.band-mini .s2 { background: var(--azure-2); }
.band-mini .s3 { background: var(--azure-3); }
.band-mini .s4 { background: #e3d3cf; }

/* Tab */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); margin: 20px 0 22px; }
.tabs button {
  border: none; background: none; padding: 10px 20px; font-size: 14.5px;
  color: var(--ink-3); letter-spacing: 2px; position: relative;
  font-family: var(--serif); font-weight: 600;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--cinnabar); }
.tabs button.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px;
  height: 2.5px; background: var(--cinnabar); border-radius: 2px;
}

/* 图表区 */
.chart-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.chart-card { padding: 16px 20px 12px; }
.chart-title { font-size: 12.5px; color: var(--ink-2); letter-spacing: 1.5px; margin-bottom: 10px; font-weight: 600; }
.chart-note { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
svg text { font-family: var(--sans); }

/* 评卷台 */
.review-layout { display: grid; grid-template-columns: minmax(340px, 46%) 1fr; gap: 20px; align-items: start; }
.pane-original { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; }
.pane-original img { width: 100%; border-radius: 6px; border: 1px solid var(--hairline); margin-bottom: 10px; cursor: zoom-in; }
.pane-original img.zoomed { cursor: zoom-out; width: 175%; max-width: none; }
.original-text { white-space: pre-wrap; line-height: 2.1; font-size: 14.5px; padding: 4px 6px; }
.score-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.score-big { font-family: var(--serif); font-size: 56px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.score-big small { font-size: 18px; color: var(--ink-3); font-weight: 500; }
.score-sub { font-size: 12px; color: var(--ink-3); letter-spacing: 1px; margin-top: 4px; }
.teacher-score { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.teacher-score input { width: 74px; border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 10px; font-size: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.dim-bars { margin: 18px 0 4px; }
.dim-bar { display: grid; grid-template-columns: 88px 1fr 74px; align-items: center; gap: 12px; margin-bottom: 9px; font-size: 13px; }
.dim-bar .db-track { height: 9px; background: var(--hairline-2); border-radius: 5px; overflow: hidden; }
.dim-bar .db-fill { height: 100%; background: var(--azure); border-radius: 5px; }
.dim-bar .db-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.dim-comment { font-size: 12.5px; color: var(--ink-3); margin: -4px 0 8px 100px; }

/* 批注文本 */
.annotated { line-height: 2.3; font-size: 15px; white-space: pre-wrap; }
.ann { border-radius: 3px; padding: 1px 2px; cursor: help; position: relative; }
.ann.亮点 { background: var(--good-soft); box-shadow: inset 0 -2px 0 var(--good); }
.ann.问题 { background: var(--warn-soft); box-shadow: inset 0 -2px 0 var(--warn); }
.ann.病句 { background: var(--warn-soft); box-shadow: inset 0 -2px 0 var(--warn); text-decoration: underline wavy var(--warn) 1px; }
.ann.错别字 { background: var(--bad-soft); box-shadow: inset 0 -2px 0 var(--bad); }
.ann:hover::after {
  content: attr(data-note);
  position: absolute; left: 0; bottom: calc(100% + 6px);
  background: var(--ink); color: #fff; font-size: 12px; line-height: 1.5;
  padding: 6px 10px; border-radius: 6px; white-space: nowrap; z-index: 30;
  box-shadow: var(--shadow-2);
}
.ann-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-3); margin-bottom: 10px; }
.ann-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

/* 提醒横幅 */
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 8px; padding: 11px 14px; font-size: 13px; margin-bottom: 12px; }
.banner.warn { background: var(--warn-soft); color: #6d4c0d; border: 1px solid #ecd9a8; }
.banner.bad { background: var(--bad-soft); color: #7c261c; border: 1px solid #e9c4bf; }
.banner.info { background: var(--azure-4); color: #23425c; border: 1px solid var(--azure-3); }
.banner.good { background: var(--good-soft); color: #1d5c41; border: 1px solid #bcded0; }
.banner .b-ico { flex: none; font-size: 15px; }

/* 问题卡 */
.issue-card { border: 1px solid var(--hairline); border-left: 3px solid var(--azure); border-radius: 8px; padding: 13px 16px; margin-bottom: 10px; background: var(--surface); }
.issue-card .i-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.issue-card .i-row { font-size: 13px; margin-top: 5px; color: var(--ink-2); }
.issue-card .i-row b { color: var(--ink); font-weight: 600; }
.training-card { background: linear-gradient(135deg, #fbf7ef, #f7f0e2); border: 1px solid #e8dcc2; border-radius: var(--radius); padding: 16px 20px; }
.training-card .t-head { font-family: var(--serif); font-weight: 700; font-size: 15px; letter-spacing: 1px; margin-bottom: 8px; }

/* 弹窗 */
#modal-root:empty { display: none; }
.modal-mask { position: fixed; inset: 0; background: rgba(24,32,40,.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 30px; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-2); width: 640px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 0; }
.modal-title { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 2px; }
.modal-body { padding: 16px 24px; overflow: auto; }
.modal-foot { padding: 0 24px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.modal-x { border: none; background: none; font-size: 20px; color: var(--ink-3); }
.modal-x:hover { color: var(--ink); }

/* toast */
#toast-root { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #f2efe8; border-radius: 8px; padding: 10px 20px; font-size: 13.5px; box-shadow: var(--shadow-2); animation: toast-in .25s ease; letter-spacing: 1px; }
.toast.err { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty .e-seal { width: 64px; height: 64px; margin: 0 auto 18px; border: 2px solid var(--hairline); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 24px; color: #cfc6b5; }
.empty .e-title { font-family: var(--serif); font-size: 18px; color: var(--ink-2); letter-spacing: 2px; margin-bottom: 8px; }
.empty .e-sub { font-size: 13px; line-height: 2; }

/* 报告打印版式(屏幕预览 + 打印共用) */
.report-sheet {
  background: #fff; width: 794px; margin: 0 auto 24px;
  padding: 44px 52px; border: 1px solid var(--hairline);
  box-shadow: var(--shadow-1); border-radius: 4px;
  font-size: 13px; line-height: 1.75; color: #222;
  position: relative;
}
.rs-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2.5px solid var(--cinnabar); padding-bottom: 14px; margin-bottom: 18px; }
.rs-brand { display: flex; align-items: center; gap: 12px; }
.rs-seal { width: 40px; height: 40px; background: var(--cinnabar); color: #fff; font-family: var(--serif); font-weight: 900; writing-mode: vertical-rl; letter-spacing: 2px; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 14px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.3), inset 0 0 0 3px var(--cinnabar); }
.rs-title { font-family: var(--serif); font-size: 21px; font-weight: 900; letter-spacing: 3px; }
.rs-title small { display: block; font-size: 11px; color: #888; font-weight: 400; letter-spacing: 2px; margin-top: 2px; }
.rs-meta { text-align: right; font-size: 12px; color: #555; line-height: 1.9; }
.rs-score-band { display: flex; align-items: center; gap: 26px; background: #faf7f1; border: 1px solid #ece5d6; border-radius: 10px; padding: 16px 24px; margin-bottom: 16px; }
.rs-total { font-family: var(--serif); font-size: 52px; font-weight: 900; line-height: 1; color: var(--cinnabar); font-variant-numeric: tabular-nums; }
.rs-total small { font-size: 16px; color: #999; font-weight: 400; }
.rs-dims { flex: 1; }
.rs-dim { display: grid; grid-template-columns: 74px 1fr 64px; gap: 10px; align-items: center; font-size: 12px; margin: 4px 0; }
.rs-dim .track { height: 7px; background: #eee5d4; border-radius: 4px; overflow: hidden; }
.rs-dim .fill { height: 100%; background: var(--azure); }
.rs-sec { margin: 14px 0; }
.rs-sec-title { font-family: var(--serif); font-weight: 700; font-size: 14.5px; letter-spacing: 2px; color: var(--ink); border-left: 3.5px solid var(--cinnabar); padding-left: 10px; margin-bottom: 8px; }
.rs-comment { background: #fbfaf7; border: 1px solid #eee7d9; border-radius: 8px; padding: 12px 16px; }
.rs-ann-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rs-ann-table td, .rs-ann-table th { border: 1px solid #e8e0d0; padding: 6px 9px; text-align: left; vertical-align: top; }
.rs-ann-table th { background: #f7f3ea; font-weight: 600; color: #555; white-space: nowrap; }
.rs-issue { margin-bottom: 9px; padding-bottom: 9px; border-bottom: 1px dashed #e8e0d0; }
.rs-issue:last-child { border-bottom: none; }
.rs-foot { margin-top: 20px; border-top: 1px solid #e2d9c8; padding-top: 10px; display: flex; justify-content: space-between; align-items: flex-end; font-size: 11px; color: #999; }
.rs-sign { font-size: 12.5px; color: #444; }
.rs-sign .line { display: inline-block; width: 110px; border-bottom: 1px solid #999; margin: 0 6px; }
.rs-tag-inline { display: inline-block; background: #f1ece1; border-radius: 4px; padding: 0 7px; font-size: 11.5px; color: #6b5d3f; margin-right: 6px; }

/* 打印 */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 11mm 12mm; }
  body { background: #fff; }
  #app, #toast-root, #modal-root { display: none !important; }
  #print-root { display: block; }
  #print-root .report-sheet {
    width: auto; margin: 0; padding: 0 2mm; border: none; box-shadow: none; border-radius: 0;
    page-break-after: always;
  }
  #print-root .report-sheet:last-child { page-break-after: auto; }
  .rs-sec { page-break-inside: avoid; }
}

/* ---------------- 登录 ---------------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 20px; }
.login-card { width: 400px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; box-shadow: var(--shadow-2); padding: 40px 44px 32px; }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.login-brand .seal { width: 54px; height: 54px; font-size: 20px; }
.login-title { font-family: var(--serif); font-size: 26px; font-weight: 900; letter-spacing: 6px; }
.login-sub { font-size: 12px; color: var(--ink-3); letter-spacing: 1px; margin-bottom: 24px; }
.login-hint { margin-top: 18px; padding: 10px 14px; background: var(--surface-warm); border: 1px dashed var(--hairline); border-radius: 8px; font-size: 12px; color: var(--ink-2); line-height: 1.8; }
.login-toggle { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.login-toggle a { color: var(--azure); cursor: pointer; }
.side-user { display: flex; align-items: center; gap: 8px; padding: 8px 6px; font-size: 12.5px; color: #b9c3cd; }
.side-user .u-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--azure-2); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.side-user button { margin-left: auto; background: none; border: none; color: #7d8b98; font-size: 11.5px; }
.side-user button:hover { color: #e58a7c; }

/* ---------------- 评分录入 ---------------- */
.score-input { width: 66px; border: 1px solid var(--hairline); border-radius: 7px; padding: 5px 8px; text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; background: var(--surface); }
.score-input:focus { outline: none; border-color: var(--azure-2); box-shadow: 0 0 0 3px var(--azure-4); }
.score-input.has-val { border-color: var(--azure-2); font-weight: 600; color: var(--azure); }
.unscored-chip { font-size: 11px; color: var(--ink-3); background: var(--surface-warm); border: 1px dashed var(--hairline); border-radius: 12px; padding: 1px 8px; }
.score-cta { background: linear-gradient(135deg, #fdf9f0, #f8f1e0); border: 1px solid #ecdfc0; border-radius: var(--radius); padding: 16px 20px; }

/* ---------------- 星级 ---------------- */
.stars { display: inline-flex; gap: 3px; }
.stars button { border: none; background: none; font-size: 21px; color: #d8cfc0; padding: 0 1px; line-height: 1; transition: transform .1s; }
.stars button:hover { transform: scale(1.15); }
.stars button.on { color: #e0a428; }
.stars.small button { font-size: 15px; cursor: default; }
.fb-panel { border-top: 1px dashed var(--hairline); margin-top: 16px; padding-top: 14px; }
.fb-history { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.8; }

/* ---------------- 风格工坊 ---------------- */
.style-intro { display: flex; gap: 16px; align-items: flex-start; background: linear-gradient(135deg, #f7f4ec, #f2ede2); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.chip-btn { border: 1px solid var(--hairline); border-radius: 16px; background: var(--surface); padding: 4px 13px; font-size: 12.5px; color: var(--ink-2); }
.chip-btn:hover { border-color: var(--azure-2); color: var(--azure); }
.version-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.version-list .v-item { border: 1px solid var(--hairline); border-radius: 10px; padding: 12px 15px; margin-bottom: 10px; cursor: pointer; background: var(--surface); transition: all .12s; }
.version-list .v-item:hover { box-shadow: var(--shadow-1); }
.version-list .v-item.sel { border-color: var(--azure); box-shadow: 0 0 0 3px var(--azure-4); }
.v-item .v-name { font-family: var(--serif); font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.v-item .v-sum { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.6; }
.chip.default-mark { background: var(--cinnabar-soft); color: var(--cinnabar); font-size: 10.5px; }
.sample-pane { max-height: 76vh; overflow: auto; border-radius: 10px; }
.sample-pane .report-sheet { width: auto; margin: 0; box-shadow: none; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-grid .sample-pane { max-height: 66vh; }
.compare-head { font-size: 13px; font-weight: 600; padding: 8px 4px; display: flex; align-items: center; gap: 8px; }

/* ---------------- 历史/趋势 ---------------- */
.hist-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 2px; }
.hist-pill { background: var(--surface-warm); border: 1px solid var(--hairline); border-radius: 8px; padding: 6px 12px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.hist-pill:hover { border-color: var(--azure-2); }
.hist-pill b { font-size: 14px; }
.trend-note { font-size: 12.5px; }
.trend-up { color: var(--good); }
.trend-down { color: var(--bad); }

/* 响应式 */
@media (max-width: 1080px) {
  .chart-row { grid-template-columns: 1fr; }
  .review-layout { grid-template-columns: 1fr; }
  .pane-original { position: static; max-height: 460px; }
  #main { padding: 24px 20px 60px; }
}
@media (max-width: 800px) {
  #sidebar { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}
