:root {
  color-scheme: light;
  --ink: #102b2c;
  --muted: #526b68;
  --line: #d6e2dc;
  --paper: #fff;
  --ground: #eff5f0;
  --green: #185c49;
  --selection: #ecf7ef;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
.masthead { color: #eaf9ef; background: #0b2021; }
.masthead-inner { max-width: 840px; margin: auto; min-height: 62px; display: flex; align-items: center; gap: 11px; padding: 0 24px; font-size: 1rem; font-weight: 650; }
.brand-mark { position: relative; width: 16px; height: 19px; border: 1.5px solid #9ce0b6; border-radius: 3px; display: inline-block; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; left: 3px; width: 7px; height: 1px; background: #9ce0b6; }
.brand-mark::before { top: 6px; } .brand-mark::after { top: 10px; }
.powered { margin-left: auto; color: #a9cbc0; font-size: .875rem; font-weight: 500; }
main { width: min(100% - 48px, 752px); margin: 0 auto; padding: 60px 0 62px; }
.intro { margin: 0 0 30px; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.13; letter-spacing: -.055em; margin: 0 0 13px; }
.intro p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.mobile-break { display: none; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 12px 48px #103d2608; }
.field h2, legend { margin: 0 0 12px; font-size: 1rem; font-weight: 720; }
.dropzone { min-height: 155px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1.5px dashed #8daea1; border-radius: 12px; background: #f6faf7; padding: 20px; text-align: center; cursor: pointer; }
.dropzone:hover, .dropzone.dragging { background: #e9f7ec; border-color: #377658; }
.upload-mark { width: 23px; height: 20px; position: relative; border: 1.5px solid #377658; border-top: 0; border-radius: 3px; margin: 5px 0 3px; }
.upload-mark::before { content: ""; position: absolute; left: 9px; top: -6px; width: 1.5px; height: 16px; background: #377658; }
.upload-mark::after { content: ""; position: absolute; top: -6px; left: 6px; width: 7px; height: 7px; border-left: 1.5px solid #377658; border-top: 1.5px solid #377658; transform: rotate(45deg); }
.drop-label { font-weight: 700; overflow-wrap: anywhere; }
.desktop-copy { margin-left: .3em; }
.muted { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
fieldset { border: 0; margin: 26px 0 0; padding: 0; }
legend { padding: 0; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card { display: flex; gap: 10px; align-items: flex-start; min-height: 78px; border: 1px solid var(--line); border-radius: 11px; padding: 14px 12px; cursor: pointer; }
.mode-card:has(input:checked) { background: var(--selection); border-color: #5a9477; }
.mode-card:has(input:disabled) { background: #f5f7f5; cursor: default; }
.mode-card strong, .ocr strong { display: block; font-size: .9375rem; }
.mode-card small, .ocr small { display: block; color: var(--muted); margin-top: 4px; font-size: .875rem; line-height: 1.4; }
input[type=radio], input[type=checkbox] { width: 17px; height: 17px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--green); }
.ocr { display: flex; gap: 10px; margin: 22px 0 24px; align-items: flex-start; cursor: pointer; }
button, .download { width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 9px; background: var(--green); color: white; font: inherit; font-weight: 720; cursor: pointer; }
button:hover, .download:hover { background: #124b3b; }
button:disabled { background: #587c71; cursor: wait; }
:focus-visible { outline: 3px solid #418769; outline-offset: 3px; }
.disclosure { margin: 12px 0 0; color: var(--muted); text-align: center; font-size: .875rem; line-height: 1.5; }
.status-panel { margin-top: 16px; }
.status-label { font-size: 1rem; font-weight: 740; }
.status-panel[data-state=failed] .status-label { color: #983b2b; }
.status-panel p { margin: 5px 0 0; overflow-wrap: anywhere; }
.result-links { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 15px; }
.download { width: auto; display: inline-flex; align-items: center; text-decoration: none; }
.view { color: var(--green); font-size: .9375rem; font-weight: 650; }
@media (max-width: 560px) {
  .masthead-inner { padding: 0 16px; }
  main { width: calc(100% - 32px); padding: 37px 0; }
  .intro { margin-bottom: 22px; }
  .mobile-break { display: initial; }
  .panel { padding: 19px 16px; border-radius: 14px; }
  .desktop-copy { display: none; }
  .dropzone { min-height: 126px; }
  .modes { gap: 8px; }
  .mode-card { gap: 7px; padding: 11px 9px; }
}
@media (max-width: 340px) { .modes { grid-template-columns: 1fr; } }

