:root {
  --canvas: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #f8fbfb;
  --ink: #172b2b;
  --muted: #607070;
  --line: #d6e0df;
  --line-strong: #b9cbca;
  --teal: #087e6c;
  --teal-dark: #056254;
  --teal-soft: #e7f5f1;
  --blue-soft: #eef4ff;
  --amber: #9a5d00;
  --amber-soft: #fff5df;
  --coral: #b94436;
  --coral-soft: #fff0ed;
  --shadow: 0 14px 35px rgba(23, 43, 43, 0.08);
  --font: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); letter-spacing: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.tool-page { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 44px; }
.tool-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; }
.brand-sub { color: var(--muted); }
.header-links { display: flex; flex-wrap: wrap; gap: 14px; color: var(--teal); font-size: 13px; }
.language-select { height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); padding: 0 8px; font-size: 12px; }
.tool-hero { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 18px; }
.eyebrow { color: var(--teal); font-size: 13px; font-weight: 750; }
h1 { margin: 5px 0 8px; font-size: 32px; line-height: 42px; }
.tool-hero p { margin: 0; max-width: 760px; color: var(--muted); line-height: 25px; }
.trust { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.pill { display: inline-flex; align-items: center; min-height: 26px; border: 1px solid #b8d8d0; border-radius: 999px; background: var(--teal-soft); color: #17695d; padding: 3px 9px; font-size: 12px; white-space: nowrap; }
.tool-workspace { display: grid; grid-template-columns: minmax(330px, 0.92fr) minmax(430px, 1.08fr); gap: 16px; align-items: stretch; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 17px; line-height: 24px; }
.panel-body { padding: 16px; }
.hint { color: var(--muted); font-size: 12px; line-height: 19px; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); outline: none; }
.input, .select { height: 38px; padding: 0 10px; }
.textarea { min-height: 360px; padding: 12px; line-height: 23px; resize: vertical; }
.textarea:focus, .input:focus, .select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 126, 108, 0.12); }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.button { min-height: 36px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); padding: 6px 12px; font-size: 13px; }
.button:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.button.primary { border-color: var(--teal); background: var(--teal); color: #fff; font-weight: 700; }
.button.primary:hover { background: var(--teal-dark); }
.button[disabled] { cursor: wait; opacity: .55; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 12px; }
.check-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; color: var(--muted); font-size: 13px; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; }
.output { min-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #102323; color: #e7f5f1; padding: 14px; white-space: pre-wrap; word-break: break-word; font: 13px/22px Consolas, "Courier New", monospace; }
.output.empty { display: grid; place-items: center; min-height: 360px; color: #9cb0b0; text-align: center; font-family: var(--font); }
.output-card { display: grid; gap: 12px; }
.result-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.status { border-radius: 6px; padding: 10px 12px; line-height: 20px; font-size: 13px; }
.status.ok { border: 1px solid #b8d8d0; background: var(--teal-soft); color: #17695d; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: 9px 8px; text-align: left; vertical-align: top; line-height: 20px; }
.data-table th { color: var(--muted); font-weight: 650; }
.code-input { min-height: 280px; font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.image-drop { display: grid; place-items: center; min-height: 180px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-soft); padding: 20px; text-align: center; }
.image-preview { display: block; max-width: 100%; max-height: 360px; margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; }
.findings { display: grid; gap: 8px; }
.finding { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--line); padding: 9px 0; line-height: 21px; font-size: 13px; }
.finding:last-child { border-bottom: 0; }
.severity { font-size: 12px; font-weight: 700; }
.severity.ok { color: var(--teal); }
.severity.warn { color: var(--amber); }
.severity.error { color: var(--coral); }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 10; max-width: min(380px, calc(100% - 40px)); border-radius: 6px; background: var(--ink); color: #fff; padding: 10px 13px; box-shadow: var(--shadow); font-size: 13px; }
@media (max-width: 900px) { .tool-workspace { grid-template-columns: 1fr; } .tool-hero { align-items: flex-start; flex-direction: column; } .trust { justify-content: flex-start; } }
@media (max-width: 620px) { .tool-page { width: min(100% - 22px, 1240px); padding-top: 12px; } .tool-header, .page-footer { align-items: flex-start; flex-direction: column; } h1 { font-size: 27px; line-height: 36px; } .field-row { grid-template-columns: 1fr; } .textarea, .output, .output.empty { min-height: 280px; } }
