:root {
  --blue: #0f766e;
  --blue-dark: #115e59;
  --ink: #111827;
  --muted: #6b7280;
  --line: #d1d5db;
  --bg: #f8fafc;
  --ok: #15803d;
  --err: #b91c1c;
  --warn: #b45309;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Yu Gothic UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
header {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px 6px; max-width: 820px; margin: 0 auto;
}
header img { border-radius: 10px; }
h1 { font-size: 1.45rem; margin: 0; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.header-actions { margin-left: auto; display: flex; gap: 8px; }
main { max-width: 820px; margin: 0 auto; padding: 10px 22px 30px; }
.offline-badge {
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
  border-radius: 8px; padding: 9px 12px; font-size: .92rem;
}
#dropzone {
  border: 2px dashed var(--line); border-radius: 12px; background: #fff;
  text-align: center; padding: 34px 16px; cursor: pointer; outline-offset: 3px;
}
#dropzone.dragover { border-color: var(--blue); background: #f0fdfa; }
.dz-title { font-size: 1.08rem; font-weight: 600; margin: 0 0 4px; }
.dz-sub { color: var(--muted); margin: 4px 0 12px; }
button {
  font: inherit; cursor: pointer; border-radius: 8px;
  border: 1px solid var(--blue); background: var(--blue); color: #fff;
  padding: 9px 18px;
}
button:hover:not(:disabled) { background: var(--blue-dark); }
button:disabled { opacity: .45; cursor: default; }
button.ghost, #zipBtn, #clearBtn, #cancelBtn { background: #fff; color: var(--blue); }
button.ghost:hover:not(:disabled), #zipBtn:hover:not(:disabled), #clearBtn:hover:not(:disabled), #cancelBtn:hover:not(:disabled) { background: #f0fdfa; }
.controls { display: flex; gap: 26px; flex-wrap: wrap; margin: 20px 0 6px; align-items: end; }
.control-label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.radio { display: block; font-size: .95rem; margin: 4px 0; cursor: pointer; }
.hint { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.summary { color: var(--muted); min-height: 1.2em; font-size: .92rem; }
.file-list { list-style: none; margin: 8px 0 0; padding: 0; }
.file-list li {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
}
.file-list .thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; flex: none; }
.file-list .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.file-list .meta { color: var(--muted); font-size: .85rem; }
.file-list .meta.has-gps { color: var(--warn); font-weight: 600; }
.file-list .note { color: var(--muted); font-size: .82rem; }
.file-list .size { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.status { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.status.queued { color: var(--muted); }
.status.working { color: var(--blue); }
.status.done { color: var(--ok); }
.status.error { color: var(--err); }
.status.skipped { color: var(--warn); }
.file-list .dl { padding: 5px 12px; font-size: .88rem; }
footer { max-width: 820px; margin: 0 auto; padding: 0 22px 26px; color: var(--muted); font-size: .88rem; }
.error { color: var(--err); }
.howto {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .45);
  display: flex; align-items: center; justify-content: center; z-index: 10;
}
.howto[hidden] { display: none; }
.howto-card {
  background: #fff; border-radius: 12px; padding: 22px 26px; max-width: 440px; width: calc(100% - 40px);
}
.howto-card h2 { margin: 0 0 10px; font-size: 1.2rem; }
.howto-step { color: var(--blue); font-weight: 700; margin: 0 0 6px; }
.howto-nav { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }
