:root {color-scheme:dark;--ink:#f9f2df;--muted:#c6d8ca;--line:#d8e9cb4a;--paper:#0d292d;--well:#112e32;--accent:#9ce4dc}
* {box-sizing:border-box}
body {
  margin:0;color:var(--ink);font:16px/1.55 system-ui,"Microsoft YaHei",sans-serif;
  background:radial-gradient(ellipse 70% 37rem at 88% 0%,#436858a1,transparent 65%),
    linear-gradient(135deg,#122e2f,#0c2524 58%,#132e28);
}
body,button,input,textarea,select {font-family:system-ui,"Microsoft YaHei",sans-serif}
h1,h2,h3,p {margin:0}
h2 {font-size:clamp(1.3rem,3.4vw,1.65rem);margin-bottom:8px}
h3 {font-size:1.08rem}
a {color:inherit}
button,.button {
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 15px;
  border:1px solid #e6c58b;border-radius:0;
  clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px);
  background:linear-gradient(151deg,#fff0ca,#ebd4a0 55%,#c59151);
  color:#172a27;font-size:.91rem;font-weight:650;cursor:pointer;
  box-shadow:inset 0 1px #fff9de,inset 0 -2px #49371b35;
  transition:filter .28s,translate .28s;
}
button:not(:disabled):hover,.button:hover {filter:brightness(1.13)}
button:not(:disabled):active,.button:active {translate:0 2px}
button:disabled {opacity:.48;cursor:wait}
.secondary {border-color:#cfbc88;background:linear-gradient(145deg,#476b6c,#193a40 76%);color:var(--ink)}
button[aria-busy="true"] {opacity:1}
button[aria-busy="true"]::before {
  content:"";width:12px;height:12px;margin-inline-end:8px;border:1px solid #c8f2e9;border-right-color:transparent;border-radius:50%;
  animation:xb-ocr-spin .8s linear infinite;
}
@keyframes xb-ocr-spin {to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce) {button[aria-busy="true"]::before{animation:none}button,.button{transition:none}}
[hidden] {display:none!important}
.file-input {position:absolute;width:1px;height:1px;opacity:0}
.button:has(+.file-input:focus-visible),:where(button,a,input,textarea,select):focus-visible {outline:2px solid #f0d79c;outline-offset:3px}
.button:has(+.file-input:focus-visible),button:focus-visible {box-shadow:inset 0 0 0 2px #ffe3a3,inset 0 0 0 4px #35726a}
.top {display:flex;justify-content:space-between;align-items:center;gap:9px;padding:11px max(19px,calc((100vw - 1050px)/2));border-bottom:1px solid var(--line);background:#112c2ce8;backdrop-filter:blur(15px)}
.top>div,.actions,.section-head {display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.top a {font-size:.86rem}
main {max-width:1088px;margin:auto;padding:0 19px 40px}
.embedded main {padding-bottom:8px}
.intro {padding:clamp(24px,5vw,55px) 0 clamp(20px,3.4vw,35px)}
.intro h1 {font-family:"Songti SC","SimSun",Georgia,serif;font-weight:500;font-size:clamp(2rem,5.4vw,3.9rem);line-height:1.02;letter-spacing:-.025em;color:#eff5e6;margin-bottom:13px}
.intro p {max-width:62ch}
.intro p,.hint {color:var(--muted)}
.offline,.status {margin-top:7px;font-size:.85rem}
.offline:empty,.status:empty {display:none}
.panel {
  border:1px solid var(--line);border-radius:14px;padding:clamp(15px,2.8vw,30px);
  background:radial-gradient(ellipse at 10% 0%,#70917c23,transparent 67%),linear-gradient(145deg,#315349e8,#142f2d);
  box-shadow:inset 0 1px #effde238,0 19px 40px -26px #030b0cce;margin-bottom:13px;
}
.panel[aria-labelledby="import-title"] {
  border-color:#c3e5c86e;
  background:radial-gradient(ellipse at top right,#7cab824a,transparent 71%),linear-gradient(135deg,#32594c,#17342f);
}
.panel[aria-labelledby="export-title"] {border-color:#aec3aa7a}
.actions {margin:10px 0}
.hint {font-size:.88rem}
.narrative,.source-body,.fields {display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.section-head {justify-content:space-between}
label:not(.button) {display:block;font-weight:620;font-size:.9rem;margin-bottom:4px}
textarea,input:not([type=file],[type=checkbox]),select {width:100%;padding:10px;color:var(--ink);background:var(--well);border:1px solid var(--line);border-radius:7px;font-size:16px;box-shadow:inset 0 1px 4px #031a175e}
textarea::placeholder,input::placeholder {color:#a9c2b3}
textarea {resize:vertical}
.source {border:1px solid var(--line);border-radius:10px;margin-top:10px;background:var(--paper)}
.source summary {padding:12px;cursor:pointer;overflow-wrap:anywhere}
.source[open] summary {border-bottom:1px solid var(--line);margin-bottom:12px}
.source summary::marker {color:var(--accent)}
.source-body {padding:0 12px 12px}
.source-body figure {margin:0;min-width:0}
.source-body img {display:block;width:100%;max-height:570px;object-fit:contain;object-position:top;background:#192d28;border-radius:6px}
.source-body a {overflow-wrap:anywhere}
.source-controls {display:grid;gap:8px;align-content:start}
.source-controls .hint {white-space:pre-wrap;overflow-wrap:anywhere;max-height:14rem;overflow:auto}
.checkbox-row {display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.checkbox-row label {margin:0!important}
.scan-tools select {width:auto;max-width:100%}
.report {color-scheme:light;background:#fff;color:#172520;overflow-wrap:anywhere}
.report :is(h1,h2,h3) {color:#153e34}
.report h2 {margin-top:16px}
.report ul {padding-inline-start:1.45rem}
.report li {margin-bottom:6px}
.report p,.report dd,.report li {white-space:pre-wrap}
.report figure {margin:17px 0;padding-top:9px;border-top:1px solid #adb9b3}
.report figure img {display:block;max-width:100%;max-height:225mm;object-fit:contain;margin-top:5px}
.report :is(a,figcaption) {color:#195241}
.report [id] {scroll-margin-top:15px}
@media(max-width:660px) {.narrative,.source-body {grid-template-columns:minmax(0,1fr)}}
@media print {
  @page {margin:14mm}
  body,main,.report {background:#fff;color:#111;max-width:none;margin:0;padding:0}
  .ui {display:none!important}
  .report {border:0;box-shadow:none}
  .report h2 {break-after:avoid}
  .report figure {break-before:page;break-inside:avoid}
}
