:root {
  --bg: #f3f5f7; --surface: #fff; --ink: #16263a; --muted: #5a6b7d; --line: #d8dee5;
  --accent: #c2410c; --accent-ink: #fff; --ok: #15803d; --err: #b91c1c; --soft: #fff7ed;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161c; --surface: #1a222b; --ink: #e8edf2; --muted: #9aa8b6; --line: #2c3743;
    --accent: #fb923c; --accent-ink: #1a1007; --ok: #4ade80; --err: #f87171; --soft: #2a1d12;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 -apple-system, "PingFang TC", "Noto Sans TC", sans-serif; }
.wrap { max-width: 720px; margin: 0 auto; padding: 28px 16px 64px; }
h1 { font-size: 28px; line-height: 1.3; margin: 4px 0 8px; }
h2 { font-size: 21px; margin: 0 0 8px; }
h3 { font-size: 17px; margin: 20px 0 2px; }
.eyebrow { color: var(--accent); font-weight: 700; margin: 0; }
.lead { color: var(--muted); margin: 0 0 20px; }
.small { color: var(--muted); font-size: 15px; margin: 2px 0 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 16px; margin: 0 0 16px; }
label { display: block; font-weight: 600; margin: 0 0 16px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
input { display: block; width: 100%; margin-top: 6px; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.url-row { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.url-row input { margin-top: 0; }
.url-pre { color: var(--muted); font-size: 14px; white-space: nowrap; font-weight: 400; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.err { color: var(--err); font-weight: 600; }
.warn { background: var(--soft); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.link-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-box code { flex: 1 1 260px; min-width: 0; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
#line-keep { margin-top: 20px; }
/* 訂單頁 */
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.stats { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; color: var(--muted); }
.stat b { display: block; color: var(--ink); font-size: 20px; font-variant-numeric: tabular-nums; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tools input { flex: 1 1 200px; margin: 0; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.order header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.order .who { font-weight: 700; font-size: 18px; }
.order .meta { color: var(--muted); font-size: 14px; }
.tag { display: inline-block; font-size: 13px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); margin-left: 6px; }
.tag.new { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.detail { white-space: pre-wrap; margin: 8px 0; font-size: 15px; }
.money { font-variant-numeric: tabular-nums; font-size: 15px; }
.money .due { color: var(--err); font-weight: 700; }
details { margin-top: 6px; font-size: 15px; }
summary { cursor: pointer; color: var(--accent); }
.more { margin-top: 12px; }
