:root { font-family: "Microsoft YaHei", system-ui, sans-serif; color: #263238; background: #f5f6f7; line-height: 1.6; }
* { box-sizing: border-box; }
body { margin: 0; }
header { background: white; border-bottom: 1px solid #e0e4e7; padding: 16px 5vw; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 600; color: #263238; text-decoration: none; }
main { max-width: 1080px; margin: auto; padding: 28px 20px; }
h2 { font-size: 19px; margin: 0 0 20px; }
h3 { font-size: 16px; }
nav { display: flex; gap: 6px; }
button { font: inherit; font-size: 14px; border: 1px solid #ccd4d8; background: white; color: #344750; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
button:hover { background: #eff4f5; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #268c99; outline-offset: 3px; }
nav button { border: 0; }
nav .active { background: #e9f2f3; color: #146771; }
.primary { background: #146771; color: white; margin-top: 8px; min-width: 130px; }
.primary:hover { background: #10555d; }
.panel { background: white; border: 1px solid #e0e4e7; border-radius: 10px; padding: 24px; margin-bottom: 20px; }
.upload { display: flex; flex-direction: column; gap: 12px; }
.upload span, .muted { font-size: 13px; color: #63747c; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
input, select { font: inherit; max-width: 100%; }
input[type=number], select { padding: 9px; border: 1px solid #ccd4d8; border-radius: 6px; background: white; color: inherit; }
input[type=file] { font-size: 14px; }
input[type=checkbox] { accent-color: #146771; margin-right: 6px; }
fieldset { border: 1px solid #e0e4e7; border-radius: 6px; padding: 16px; margin: 16px 0; }
legend { padding: 0 8px; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 10px; margin-top: 16px; font-size: 13px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-title h2 { margin: 0; }
.result + .result { border-top: 1px solid #e0e4e7; padding-top: 20px; margin-top: 20px; }
.images { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.images figure { margin: 0; min-width: 0; }
.images img { width: 100%; max-height: 440px; object-fit: contain; background: #f5f6f7; border-radius: 6px; }
.images figcaption { font-size: 14px; margin-bottom: 8px; }
.links { display: flex; gap: 20px; margin-top: 16px; }
a { color: #146771; }
.error { color: #a33227 !important; }
#status:empty { display: none; }
[hidden] { display: none !important; }
@media(max-width: 600px) { header { padding: 16px; } main { padding: 16px; } .panel { padding: 16px; } nav button { padding: 8px 12px; } .section-title { align-items: flex-start; flex-direction: column; } }

#preview { margin: 20px 0; }
#preview-image { max-width: 100%; max-height: 280px; border-radius: 6px; }
#file-info { color: #63747c; font-size: 13px; overflow-wrap: anywhere; }
#selection-error:empty { display: none; }
.mode-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mode-options label, .checks label { border: 1px solid #dce4e6; border-radius: 6px; padding: 12px; cursor: pointer; }
.mode-options label:has(:checked), .checks label:has(:checked) { background: #edf7f6; border-color: #478d91; }
.mode-options small { display: block; color: #63747c; padding-left: 24px; }
details { margin-top: 18px; }
summary { cursor: pointer; color: #346770; }
#reference-options input { display: block; margin: 10px 0; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.result-grid .result { margin: 0; padding: 16px; border: 1px solid #e0e4e7; border-radius: 8px; min-width: 0; }
.result-grid h3 { margin: 0 0 12px; }
.result-grid .images { display: block; }
#shared-input { margin: 20px 0; padding: 16px; background: #f5f7f8; border-radius: 8px; }
#shared-input img { max-height: 220px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
caption { text-align: left; font-weight: 600; margin-bottom: 8px; }
th, td { padding: 10px; border-bottom: 1px solid #e0e4e7; }
th { background: #edf4f4; white-space: nowrap; }
input[type=radio] { accent-color: #146771; }
