/* 掃描頁：在櫃台用手機單手操作，字要大、按鈕要好按。不載入外部字型。 */
:root {
  --ink: #1F2937; --sub: #6B7280; --line: #DCE0E6; --surface: #FFFFFF; --canvas: #E9ECF0;
  --accent: #2E7D4F; --accent-deep: #1F5A38; --warning: #A86E14; --danger: #B4473A; --secondary: #EEF0F3;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--canvas); color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 17px; line-height: 1.5; -webkit-text-size-adjust: 100%;
}
main { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
header h1 { margin: 4px 0 0; font-size: 22px; }
.sub { margin: 2px 0 12px; color: var(--sub); font-size: 14px; }
section { background: var(--surface); border-radius: 14px; padding: 16px; }
h2 { margin: 0 0 8px; font-size: 19px; }
.viewer { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #000; border-radius: 10px; overflow: hidden; }
.viewer video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 只解框裡這一條（scan-core.js 的 GUIDE 是同一組數字，guideRect 換算成影像裡的位置）。改這裡要一起改 GUIDE */
.guide { position: absolute; left: 5%; right: 5%; top: 30%; height: 40%; border: 3px solid #FFFFFF; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35); }
.status { margin: 10px 0 0; font-weight: 600; min-height: 1.5em; }
.tips { margin: 8px 0 0; padding-left: 20px; color: var(--sub); font-size: 14px; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
button, .button {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 0; border-radius: 10px;
  font: inherit; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
}
.primary { background: var(--accent); color: #FFFFFF; }
.primary:active { background: var(--accent-deep); }
.secondary { background: var(--secondary); color: var(--ink); }
.field-label { display: block; font-weight: 600; margin-bottom: 8px; }
#manual-input {
  width: 100%; font-size: 30px; letter-spacing: 0.12em; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.error { color: var(--danger); font-weight: 600; margin: 8px 0 0; }
.check { margin: 0 0 8px; }
.carrier-big {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 44px; font-weight: 700;
  letter-spacing: 0.08em; text-align: center; word-break: break-all; margin: 6px 0;
}
.carrier-chars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; padding: 0; margin: 8px 0; }
.carrier-chars li { border: 1px solid var(--line); border-radius: 8px; text-align: center; padding: 4px 0; }
.carrier-chars .c { display: block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 30px; font-weight: 700; }
.carrier-chars .h { display: block; font-size: 12px; color: var(--sub); }
.warn { color: var(--warning); font-weight: 600; font-size: 14px; }
.target { font-weight: 600; font-size: 15px; margin: 8px 0 0; word-break: break-all; }
.note { color: var(--sub); font-size: 13px; margin-bottom: 0; }
.copy-text { width: 100%; margin-top: 8px; font-size: 18px; padding: 8px; }
[hidden] { display: none !important; }
