:root {
  color-scheme: light;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #172724;
  background: #f3f5f1;
  --ink: #172724;
  --muted: #52645d;
  --quiet: #52645d;
  --line: #dfe6df;
  --green: #094c3f;
  --mint: #e5f3e9;
  --white: #fff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, input, select, a, .viewport, .dropzone { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #378e78; outline-offset: 3px; }
.shell { max-width: 1376px; padding: 0 44px; margin-inline: auto; }
.topbar { background: #fcfdfa; border-bottom: 1px solid var(--line); }
.top-inner { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { color: var(--ink); font-size: 23px; font-weight: 750; letter-spacing: -.8px; text-decoration: none; display: flex; gap: 11px; align-items: center; }
.logo { position: relative; display: inline-grid; place-content: center; width: 34px; height: 34px; background: #123c34; border-radius: 9px; }
.logo i { display: block; position: absolute; width: 11px; height: 11px; border: 1.5px solid #cdf9dd; transform: rotate(45deg) skew(-8deg,-8deg); border-radius: 1px; left: 11.5px; top: 7px; }
.logo i:nth-child(2) { top: 11px; clip-path: polygon(0 20%,100% 100%,0 100%); }
.logo i:nth-child(3) { top: 15px; clip-path: polygon(0 20%,100% 100%,0 100%); }
.brand-divider { width: 1px; height: 20px; background: var(--line); margin-left: 4px; }
.brand small { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .05em; }
.connection { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #d9e7dc; background: #fff; border-radius: 99px; padding: 6px 11px; color: #315a4c; white-space: nowrap; font-size: 13px; font-weight: 600; }
.connection span, .view-label span { border-radius: 50%; width: 7px; height: 7px; background: #6aba90; }
.page-title { margin: 30px 0 23px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
h1 { margin: 0 0 7px; font-size: clamp(1.72rem, 4vw, 2.2rem); line-height: 1.2; letter-spacing: -.045em; font-weight: 750; }
p { margin: 0; }
.page-title p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.page-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.button { min-height: 42px; padding: 9px 15px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.button span { font-size: 18px; line-height: .8; }
.secondary { border: 1px solid #d6e0d8; background: #fcfdfa; color: #254b40; }
.secondary:hover { background: #eaf3eb; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 352px); align-items: start; gap: 20px; padding-bottom: 36px; }
.main-column, .side-column { display: grid; min-width: 0; gap: 16px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 2px #21382c06; min-width: 0; }
.preview-card { overflow: hidden; }
.panel-head { padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h2 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 750; letter-spacing: -.015em; }
.panel-head p { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.preview-card .panel-head > div:first-child { min-width: 0; }
.filename { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.segmented { display: flex; flex: 0 0 auto; background: #eef2ee; border: 1px solid #e7ece7; padding: 3px; border-radius: 9px; gap: 2px; }
.segmented button { background: transparent; color: #52645e; border: none; padding: 6px 11px; font-size: 13px; border-radius: 6px; white-space: nowrap; font-weight: 650; }
.segmented button[aria-pressed="true"] { background: white; color: #17483b; box-shadow: 0 1px 3px #19372a20; }
.segmented button:disabled { opacity: .5; }
.viewport { height: clamp(320px, 36vw, 465px); position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, #27464b, #13262a 69%, #101d20); isolation: isolate; }
.viewport canvas { position: absolute; width: 100%; height: 100%; display: block; inset: 0; cursor: grab; touch-action: none; z-index: -1; }
.viewport canvas:active { cursor: grabbing; }
.view-label { position: absolute; left: 15px; top: 15px; pointer-events: none; border: 1px solid #c3eee236; background: #183337bb; color: #d4ebe6; border-radius: 6px; padding: 6px 9px; font-size: 12px; display: flex; align-items: center; gap: 7px; }
.view-controls { display: flex; gap: 6px; position: absolute; top: 15px; right: 15px; }
.view-controls button { color: #e6f5f2; background: #183337bb; border: 1px solid #c3eee236; border-radius: 7px; padding: 5px 9px; min-height: 32px; font-size: 12px; }
.view-controls button:hover, .view-controls button[aria-pressed="true"] { background: #416963; }
.view-controls button span[aria-hidden] { font-size: 16px; }
.axis { position: absolute; bottom: 18px; left: 19px; width: 37px; height: 38px; color: #9dccc4; pointer-events: none; font: 11px ui-monospace, monospace; }
.axis b { position: absolute; left: 7px; top: 0; color: #a1e2b5; }
.axis i { position: absolute; left: 10px; bottom: 6px; width: 20px; height: 18px; border-left: 1px solid #83caa1; border-bottom: 1px solid #d1a586; }
.axis small { position: absolute; right: 0; bottom: 0; color: #e6bb9d; }
.view-hint { position: absolute; bottom: 13px; left: 50%; transform: translateX(-50%); color: #b9d2ce; background: #142b30b0; border-radius: 6px; padding: 5px 10px; font-size: 12px; white-space: nowrap; pointer-events: none; }
.view-hint span { padding-inline: 4px; }
.view-empty { position: absolute; inset: 0; place-content: center; display: grid; text-align: center; color: #d4ebe6; padding: 24px; pointer-events: none; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 13px 0; }
.metrics div { padding-inline: 17px; min-width: 0; border-right: 1px solid var(--line); }
.metrics div:last-child { border: 0; }
.metrics span, .metrics strong { display: block; }
.metrics span { color: var(--muted); font-size: 12px; margin-bottom: 3px; white-space: nowrap; }
.metrics strong { font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.015em; white-space: nowrap; }
.settings .panel-head { border-bottom: 1px solid #edf0eb; }
.step-icon { color: #268667; font-size: 20px; width: 33px; height: 33px; display: grid; place-content: center; background: #eaf6ed; border-radius: 9px; }
.form-main { padding: 15px 17px 16px; }
.form-main label, .field-title { display: block; font-size: 14px; font-weight: 650; }
.dropzone { position: relative; text-align: center; background: #f7faf7; border: 1.5px dashed #afc9bc; border-radius: 10px; padding: 13px 10px 11px; margin: 7px 0 14px; cursor: pointer; min-width: 0; }
.dropzone:hover, .dropzone.drag, .dropzone:focus-within { background: #eaf6ed; border-color: #378e78; }
.dropzone input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.dropzone strong, .dropzone > span { display: block; }
.dropzone strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 5px 0 3px; color: #173c32; }
.dropzone #upload-hint { color: var(--muted); font-weight: 500; font-size: 12px; }
.upload-icon { background: #e4f1e8; margin: auto; color: #216952; font-size: 21px; line-height: 30px; width: 32px; height: 30px; border-radius: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row label { min-width: 0; }
.field-row input, select { width: 100%; min-height: 41px; padding: 7px 10px; border: 1px solid #d9e2da; border-radius: 8px; color: #263933; background-color: #fff; font-size: 14px; font-weight: 500; }
.input-unit { display: block; position: relative; margin-top: 6px; }
.input-unit input { padding-right: 37px; appearance: textfield; }
.input-unit input::-webkit-inner-spin-button { appearance: none; }
.input-unit span { position: absolute; right: 11px; top: 12px; color: var(--muted); font-size: 12px; pointer-events: none; }
select { margin-top: 6px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #52645e 50%), linear-gradient(135deg, #52645e 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 23px; }
.preset-field { margin-top: 14px; }
.field-help { color: var(--quiet); font-size: 12px; line-height: 1.45; margin-top: 6px; overflow-wrap: anywhere; }
.field-help.error { color: #a53430; }
.form-foot { border-top: 1px solid #edf0eb; margin-top: 13px; padding-top: 13px; }
.primary { width: 100%; background: #125346; border: 1px solid #125346; color: #fff; }
.primary:hover { background: #0a4035; }
.primary:disabled { opacity: .55; }
.task-card, .export-card { padding: 14px 17px; }
.small-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.small-head strong { color: #1c6651; font-size: 14px; font-variant-numeric: tabular-nums; }
progress { display: block; appearance: none; width: 100%; height: 6px; margin: 10px 0 7px; border: 0; border-radius: 20px; background: #e3eee7; overflow: hidden; }
progress::-webkit-progress-bar { background: #e3eee7; }
progress::-webkit-progress-value { background: #54a888; border-radius: 20px; }
progress::-moz-progress-bar { background: #54a888; }
.task-card p, .export-card > p { font-size: 13px; color: var(--muted); }
.export-card > p { margin-top: 5px; }
.file-tag { background: #f0f4f0; border: 1px solid #e2eae3; border-radius: 5px; font: 700 11px ui-monospace, monospace; color: #4b665a; padding: 4px 6px; }
.export-button { width: 100%; color: #185443; background: #e8f4ec; border: 1px solid #dcece1; margin-top: 10px; min-height: 37px; }
.export-button:hover:not(:disabled) { background: #d9eee1; }
.export-button:disabled { color: #53655d; background: #f1f4f1; border-color: #e7ece7; }
.export-footer { display: flex; align-items: start; justify-content: space-between; gap: 6px; }
.export-footer .text-button { margin-top: 5px; flex-shrink: 0; }
.badge { flex: 0 0 auto; font-size: 12px; line-height: 1.4; font-weight: 750; color: #4b5e54; background: #eef2ee; padding: 4px 8px; border-radius: 5px; }
.badge.pass { color: #186044; background: #e5f4e9; }
.badge.warn { color: #795216; background: #fbefd6; }
.badge.fail { color: #942e29; background: #fce9e4; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #edf0eb; }
.check-item { display: flex; justify-content: space-between; gap: 6px; align-items: center; padding: 10px 18px; border-bottom: 1px solid #edf0eb; min-width: 0; }
.check-item:nth-child(odd) { border-right: 1px solid #edf0eb; }
.check-item span:first-child { font-size: 13px; color: #394d45; }
.empty-report { color: var(--muted); padding: 15px 18px; grid-column: 1 / -1; font-size: 14px; }
.report-actions { padding: 11px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.text-button { border: 0; padding: 2px 0; background: transparent; color: #1c6954; font-weight: 700; font-size: 13px; }
.text-button:disabled { color: #65756d; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.danger { color: #9b3831; }
.report-details { border-top: 1px solid #edf0eb; padding: 11px 18px 15px; }
.report-details p { font-size: 13px; line-height: 1.55; color: var(--muted); padding-block: 5px; }
.report-details h3 { margin: 8px 0 4px; font-size: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1000px) {
  .shell { padding-inline: 24px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 306px; gap: 14px; }
  .metrics div { padding-inline: 10px; }
}
@media (max-width: 750px) {
  .shell { padding-inline: 16px; }
  .workspace { grid-template-columns: 1fr; }
  .main-column, .side-column { display: contents; }
  .preview-card { order: 0; }
  .settings { order: 1; }
  .task-card { order: 2; }
  .report-card { order: 3; }
  .export-card { order: 4; }
  .viewport { height: clamp(300px, 68vw, 420px); }
  .page-title { margin-top: 24px; align-items: start; }
  .page-actions { flex-shrink: 0; }
  .page-title .button { min-height: 36px; padding: 6px 10px; }
  .brand small, .brand-divider { display: none; }
}
@media (max-width: 420px) {
  .top-inner { height: 56px; }
  .page-title { flex-wrap: wrap; gap: 9px; }
  .panel-head { padding: 14px 13px; }
  .metrics strong { font-size: 15px; }
  .metrics span { font-size: 11px; }
  .check-item { padding-inline: 10px; }
  .view-controls, .view-label { top: 10px; }
}
