:root {
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #fff;
  --bg: #f5f7fb;
  --accent: #1677ff;
  --warn: #9a3412;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
.app { max-width: 1280px; margin: 0 auto; padding: 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 24px; }
h1, h2 { margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 18px; }
p { margin: 8px 0 0; color: var(--muted); }
.badge { border: 1px solid var(--line); padding: 6px 10px; font-weight: 700; background: white; }
.workspace { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(560px, 1.1fr); gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.upload-box { display: flex; align-items: center; justify-content: center; height: 46px; margin: 16px 0 10px; border: 1px dashed #8aa4c6; background: #f8fbff; cursor: pointer; font-weight: 700; }
.upload-box input { display: none; }
.muted, .notice { color: var(--muted); font-size: 13px; }
.notice { margin-top: 10px; color: var(--warn); line-height: 1.6; }
.preview { display: flex; align-items: center; justify-content: center; min-height: 310px; margin: 14px 0; border: 1px solid var(--line); background: #fbfcff; overflow: hidden; }
.preview img { max-width: 100%; max-height: 430px; display: block; }
.empty { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
label { display: grid; gap: 6px; font-size: 13px; color: #344054; }
input, select { width: 100%; height: 38px; border: 1px solid #cbd5e1; padding: 8px 10px; font-size: 14px; background: white; }
button { height: 40px; border: 0; padding: 0 16px; background: var(--accent); color: white; font-weight: 700; cursor: pointer; }
button:disabled { background: #b8c4d6; cursor: not-allowed; }
button.secondary { border: 1px solid #b8c4d6; color: #1f2937; background: white; }
.result-panel { margin-top: 16px; }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result { margin-top: 14px; line-height: 1.7; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.metric { border: 1px solid var(--line); padding: 12px; background: #fbfcff; }
.metric strong { display: block; font-size: 18px; margin-top: 4px; }
.list { margin: 16px 0 0; padding: 0; list-style: none; }
.list li { padding: 8px 0; border-bottom: 1px solid #edf0f5; }
.tag { display: inline-block; padding: 4px 8px; background: #eaf3ff; color: #0958d9; font-weight: 700; }
.danger { background: #fff7ed; border: 1px solid #fdba74; padding: 10px 12px; color: #9a3412; margin: 12px 0; }
@media (max-width: 900px) {
  .workspace, .grid, .result-grid { grid-template-columns: 1fr; }
}
