:root {
  --bg: #f4f5f2;
  --card: #ffffff;
  --ink: #1d2320;
  --muted: #5d6762;
  --line: #dde1dc;
  --brand: #0f6b4f;
  --brand-ink: #ffffff;
  --brand-soft: #e3f1eb;
  --warn: #9a5b00;
  --warn-soft: #fff4de;
  --err: #b3261e;
  --err-soft: #fde8e6;
  --ok: #0f6b4f;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* 讓 hidden 屬性一定生效（.btn 的 display 會蓋掉它） */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.top { background: var(--brand); color: var(--brand-ink); padding: 18px 16px 20px; }
.top-inner { max-width: 640px; margin: 0 auto; }
.eyebrow { font-size: 13px; opacity: .85; letter-spacing: .04em; }
h1 { margin: 2px 0 0; font-size: 22px; line-height: 1.3; }
h2 { margin: 0 0 12px; font-size: 18px; display: flex; align-items: center; gap: 10px; }

.wrap { max-width: 640px; margin: 0 auto; padding: 14px 16px 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.step {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-size: 15px; font-weight: 700; flex: none;
}

.note { background: var(--warn-soft); color: #5a3a00; border-radius: 10px; padding: 10px 12px; margin: 0; font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.center { text-align: center; }
.alert { border-radius: 10px; padding: 12px 14px; margin: 14px 0; font-weight: 600; }
.alert-error { background: var(--err-soft); color: var(--err); }

.kv { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0; font-size: 15px; }
.kv span { color: var(--muted); }
.kv b { text-align: right; font-weight: 600; }

label { display: block; font-size: 14px; color: var(--muted); }
input:not([type=file]) {
  display: block; width: 100%; margin-top: 4px; padding: 12px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:disabled { background: #f0f1ee; color: var(--muted); }
.grid2 { display: grid; gap: 12px; }
@media (min-width: 520px) { .grid2 { grid-template-columns: 1fr 1.4fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-secondary { background: var(--brand-soft); color: var(--brand); border-color: #c7e2d6; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-small { min-height: 38px; padding: 6px 12px; font-size: 15px; }
.btn-block { width: 100%; margin-top: 12px; min-height: 56px; font-size: 19px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.btn-row .file-btn { flex: 1 1 140px; }
.file-btn { color: inherit; }
.btn-primary.file-btn { color: var(--brand-ink); }
.btn-secondary.file-btn { color: var(--brand); }

.photos { display: grid; gap: 12px; margin-top: 14px; }
.photo { display: grid; grid-template-columns: 112px 1fr; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.photo img { width: 112px; height: 112px; object-fit: cover; border-radius: 8px; background: #e9ebe7; }
.photo-body { min-width: 0; }
.meta p { margin: 0 0 2px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.meta p.warn { color: var(--warn); font-weight: 700; }
.bar { height: 8px; border-radius: 4px; background: #e9ebe7; margin: 8px 0 6px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.status { margin: 0; font-size: 15px; font-weight: 600; }
.status.ok, .ok { color: var(--ok); }
.status.err, .err { color: var(--err); }

.mini-list { margin: 10px 0 0; padding-left: 20px; font-size: 14px; }
.mini-list p { margin: 6px 0; font-weight: 600; }
div.mini-list { padding-left: 0; }

.report { width: 100%; margin-top: 10px; font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.ts { margin-bottom: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
