/* SPDX-License-Identifier: GPL-2.0-only */
:root { color-scheme: light; --ink:#172b45; --muted:#65758a; --blue:#2563eb; --line:#e0e7ef; --surface:#fff; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { min-width:320px; background:#f6f8fc; }
body { margin:0; color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; font-size:14px; line-height:1.6; background:radial-gradient(ellipse at 50% -15%,#e7f0ff,transparent 55%); }
a { color:var(--blue); text-decoration:none; }
a:hover { text-decoration:underline; }
button,input,select { font:inherit; }
button,a,input,select,summary { -webkit-tap-highlight-color:transparent; }
button,select,summary { cursor:pointer; }
button:disabled,input:disabled,select:disabled { cursor:default; opacity:.5; }
:focus-visible { outline:3px solid #88b0ff; outline-offset:3px; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.tool-header { max-width:1160px; margin:auto; padding:22px 24px; display:flex; align-items:center; justify-content:space-between; gap:18px; }
.tool-header img { display:block; width:150px; height:auto; }
.back-link { font-size:13px; color:var(--muted); }
.back-link span { margin-left:5px; }
.tool-shell { max-width:1160px; margin:0 auto; padding:22px 24px 55px; }
.tool-heading { text-align:center; margin-bottom:30px; }
.eyebrow { color:var(--blue); font-size:12px; letter-spacing:.12em; margin:0 0 10px; }
h1 { margin:0; font-size:clamp(26px,4.4vw,38px); letter-spacing:-.04em; line-height:1.3; }
.intro { margin:12px 0 16px; color:var(--muted); font-size:16px; }
.privacy-badge { display:inline-flex; align-items:center; gap:7px; color:#287662; background:#e9f5ef; border:1px solid #d9ece4; border-radius:30px; padding:5px 12px; font-size:12px; }
.privacy-badge span { font-size:9px; }
.drop-zone { max-width:780px; margin:auto; padding:38px 24px 26px; text-align:center; border:1.5px dashed #b3c9e9; background:rgba(255,255,255,.8); border-radius:18px; transition:background .15s,border-color .15s; }
.drop-zone.is-dragover { background:#e8f1ff; border-color:var(--blue); }
.document-icon { width:46px; height:54px; stroke:#6191db; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.drop-zone h2 { margin:14px 0 5px; font-size:21px; font-weight:650; }
.drop-zone p { color:var(--muted); margin:0 0 20px; }
.drop-zone .upload-hint { margin:14px 0 0; font-size:12px; color:#8190a4; }
.button { display:inline-flex; min-height:42px; align-items:center; justify-content:center; padding:9px 22px; border:1px solid transparent; border-radius:9px; font-weight:600; line-height:1.5; }
.button:hover { text-decoration:none; }
.primary { color:#fff; background:var(--blue); box-shadow:0 2px 4px #2563eb15; }
.primary:hover:not(:disabled) { background:#1b51c8; }
.secondary { border-color:var(--line); color:var(--ink); background:#fff; min-height:36px; padding:6px 12px; font-weight:500; font-size:13px; }
.text-button { padding:6px 2px; border:0; background:none; color:var(--muted); font-size:13px; }
.text-button:hover { color:var(--blue); }
.status { min-height:24px; margin:14px auto 22px; text-align:center; color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.status.is-error { color:#b33232; }
.notice { padding:16px; border:1px solid var(--line); border-radius:10px; }
.file-bar { display:flex; gap:16px; align-items:center; margin:0 0 16px; padding:15px 18px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.file-summary { flex:1; min-width:0; }
.file-summary strong { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-weight:600; }
.file-summary span { font-size:12px; color:var(--muted); }
.work-grid { display:grid; grid-template-columns:minmax(0,1fr) 288px; gap:20px; align-items:start; }
.reader { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; }
.reader-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:10px 12px; border-bottom:1px solid var(--line); }
.page-controls { display:flex; align-items:center; gap:10px; white-space:nowrap; font-size:13px; }
.page-controls input { width:56px; padding:4px; border:1px solid var(--line); border-radius:5px; text-align:center; color:var(--ink); appearance:textfield; }
.page-controls input::-webkit-inner-spin-button { appearance:none; }
.icon-button { display:grid; place-items:center; min-width:34px; height:34px; border:1px solid var(--line); border-radius:6px; background:white; color:var(--ink); font-size:25px; line-height:1; }
.zoom-control select { max-width:115px; border:0; background:#f3f6fa; padding:7px; border-radius:6px; color:var(--muted); font-size:12px; }
.canvas-wrap { min-height:280px; height:65vh; max-height:850px; overflow:auto; padding:18px; background:#e9edf3; position:relative; }
.canvas-wrap[aria-busy="true"] { opacity:.6; }
.reader-message { padding:24px 12px; color:var(--muted); font-size:13px; line-height:1.9; text-align:center; }
#page-canvas { display:block; max-width:none; margin:0 auto; background:white; box-shadow:0 2px 10px #172b4512; }
.reader-caption { text-align:center; color:#8190a4; font-size:11px; margin:9px; }
.export-panel { background:#fff; border:1px solid var(--line); border-radius:12px; padding:22px; }
.export-panel h2 { margin:0; font-size:19px; }
.panel-intro { color:var(--muted); font-size:13px; margin:8px 0 24px; }
#export-form label { display:block; font-size:13px; font-weight:600; margin-bottom:7px; }
#export-form input,#export-form select { width:100%; min-height:41px; border:1px solid #d6dfeb; border-radius:7px; color:var(--ink); padding:8px 10px; background:#fff; }
.field-help { font-size:11px; color:var(--muted); margin:7px 0 20px; line-height:1.7; }
.export-button { width:100%; }
.export-note { border-top:1px solid #edf0f5; padding-top:15px; margin:20px 0 0; font-size:11px; color:#8190a4; }
.export-progress { margin-top:16px; }
progress { width:100%; height:7px; accent-color:var(--blue); }
#progress-text { margin:5px 0; font-size:12px; color:var(--muted); }
.download-button { width:100%; background:#e8f5ee; color:#22694f; margin-top:14px; border-color:#cae4d7; }
.help-section { margin:48px auto 0; max-width:900px; }
.help-section h2 { font-size:16px; margin:0 0 16px; font-weight:600; }
.help-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 30px; }
details { padding:14px 0; border-top:1px solid var(--line); }
summary { font-size:13px; color:#475b74; }
details p { font-size:12px; color:var(--muted); margin:10px 0 0; line-height:1.9; }
.tool-footer { border-top:1px solid var(--line); padding:23px; display:flex; flex-wrap:wrap; justify-content:center; gap:8px 20px; color:#8b99aa; font-size:11px; }
.tool-footer a { color:#7b8ba1; }
@media(max-width:760px) { .tool-header { padding:16px; } .tool-header img { width:126px; } .tool-shell { padding:18px 16px 35px; } .tool-heading { margin-bottom:24px; } .intro { font-size:14px; } .privacy-badge { font-size:11px; } .drop-zone { padding:30px 16px 22px; } .work-grid { grid-template-columns:1fr; gap:16px; } .export-panel { padding:20px; } .canvas-wrap { height:55vh; padding:12px; } .help-section { margin-top:32px; } .help-grid { grid-template-columns:1fr; } .file-bar { gap:10px; padding:12px; } .file-summary strong { font-size:13px; } }
@media(prefers-reduced-motion:reduce) { * { transition:none !important; } }
