:root { --fg: #1a1a1a; --muted: #555; --bg: #f6f6f4; --card: #fff; --accent: #0b5cad; --accent-fg: #fff; --err: #a30000; --warn-bg: #fff4d6; --border: #c9c9c9; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: var(--bg); }
.top, main, .foot { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.top h1 { margin: 16px 0 4px; }
.lead { margin: 0; }
.privacy { margin: 4px 0 12px; color: #1d5e20; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
h2 { font-size: 1.15rem; margin: 4px 0 10px; }
.drop { border: 2px dashed #7a7a7a; border-radius: 8px; padding: 18px; text-align: center; cursor: pointer; }
.drop.over { background: #e8f0fb; border-color: var(--accent); }
.hint { color: var(--muted); font-size: .9rem; margin: 4px 0; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 6px; padding: 8px 14px; font: inherit; cursor: pointer; }
.btn.secondary { background: #4a4a4a; }
.btn:disabled { background: #9a9a9a; color: #fff; cursor: not-allowed; }
:focus-visible { outline: 3px solid #e07b00; outline-offset: 2px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 16px; margin-bottom: 10px; }
label, .field { display: flex; flex-direction: column; gap: 4px; font-size: .95rem; }
select, input { font: inherit; padding: 6px 8px; border: 1px solid #767676; border-radius: 4px; background: #fff; color: var(--fg); }
input[aria-invalid="true"] { border-color: var(--err); }
.field-err, .msg.err { color: var(--err); font-size: .9rem; min-height: 1.2em; }
.progress-row, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
progress { width: 260px; height: 16px; }
.table-wrap { max-height: 360px; overflow: auto; border: 1px solid var(--border); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
caption { text-align: left; color: var(--muted); padding: 4px 8px; font-size: .85rem; }
th, td { padding: 4px 8px; border-bottom: 1px solid #e3e3e3; text-align: left; }
th { position: sticky; top: 0; background: #ededea; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f0f5fc; }
tbody tr[aria-selected="true"] { background: #dce8f8; }
.st-error { color: var(--err); }
.st-ok { color: #1d5e20; }
.warn { background: var(--warn-bg); border: 1px solid #d9b44a; border-radius: 6px; padding: 6px 10px; margin-bottom: 8px; }
.preview { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
figure { margin: 0; }
#pv-canvas { max-width: 100%; height: auto; image-rendering: pixelated; touch-action: none; cursor: crosshair; display: block; }
.visual img { max-width: 360px; width: 100%; height: auto; display: block; }
.legend { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .9rem; font-variant-numeric: tabular-nums; }
#lg-bar { width: 200px; height: 12px; border: 1px solid #888; }
.stats { display: grid; grid-template-columns: auto auto; gap: 2px 12px; margin: 0; font-size: .92rem; min-width: 260px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.foot { padding-bottom: 24px; color: var(--muted); font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field > label { display: block; }
#settings-changed { margin: 8px 0 0; }
[hidden] { display: none !important; }
.license-form { display: block; }
.license-form > label { display: block; margin-bottom: 4px; }
.license-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.license-row input { flex: 1 1 280px; max-width: 460px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.license-state { margin: 4px 0 8px; }
#license a, #license-msg a { color: var(--accent); text-decoration: underline; }
.btn[aria-busy="true"] { cursor: progress; }
fieldset.report { border: 1px solid var(--border); border-radius: 6px; margin: 4px 0 12px; padding: 8px 12px; }
fieldset.report legend { font-weight: 600; padding: 0 4px; }
textarea { font: inherit; padding: 6px 8px; border: 1px solid #767676; border-radius: 4px; background: #fff; color: var(--fg); resize: vertical; width: 100%; }
input[type="file"] { padding: 4px; }
.btn.small { padding: 4px 10px; font-size: .9rem; align-self: flex-start; }
