:root{
  --bg: #f5f9f3; --panel: #ffffff; --panel-2: #ecf3e7; --line: #d6e5cd;
  --accent: #519d25; --accent-soft: #d8e9ce; --accent-dim: #f3f6f1;
  --text: #203018; --muted: #607c50; --muted-2: #9fb195; --bad: #b3402f;
}

.dropzone{ border: 2px dashed var(--line); border-radius: 10px; padding: 34px 20px; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.dropzone:hover, .dropzone.dragover{ border-color: var(--accent); background: var(--accent-dim); }
.dropzone .icon{ font-size: 30px; margin-bottom: 8px; }
.dropzone .main{ font-size: 14px; font-weight: 600; }
.dropzone .sub{ font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=file]{ display: none; }

.preview-wrap{ display: none; margin-top: 18px; text-align: center; position: relative; }
.preview-wrap.show{ display: block; }
#previewCanvas{ max-width: 100%; max-height: 340px; border-radius: 8px; border: 1px solid var(--line); }
.scan-box{ position: absolute; border: 3px solid var(--accent); border-radius: 4px; box-shadow: 0 0 0 2000px rgba(0,0,0,0.15); pointer-events: none; display: none; }

.result-box{ margin-top: 18px; display: none; }
.result-box.show{ display: block; }
.result-head{ display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.result-head .title{ font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.result-head .badge{ font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 2px 8px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); }
.result-text{ background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px; font-family: 'JetBrains Mono', monospace; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.result-text a{ color: var(--accent); }
.not-found{ color: var(--bad); font-weight: 600; text-align: center; padding: 14px; }

.btns{ display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.app{ padding: 11px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13.5px; font-family: 'Inter', sans-serif; color: #fff; background: var(--accent); transition: filter .15s ease; }
.app:hover{ filter: brightness(1.08); }
.gray{ background: var(--line); color: var(--text); }

.note{ margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.6; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
