/* 數值照 design/spec_lock.md */
:root {
  --bg: #f4ede0; --card: #fffaf1; --fg: #1f2a37; --muted: #5b5348; --primary: #1f3a5f;
  --focus: #b8372a; --on-focus: #ffffff; --line: #ddd2bf; --warn-bg: #fbe7d9; --warn: #8a2c12;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1915; --card: #27231d; --fg: #f3ede2; --muted: #c4baa9; --primary: #9fc0e8;
    --focus: #e0604f; --on-focus: #1c1915; --line: #3a342b; --warn-bg: #3b2418; --warn: #ffb59a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  font-size: 22px; line-height: 1.55; font-variant-numeric: tabular-nums;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 28px 20px 40px; padding-top: max(28px, env(safe-area-inset-top)); }
h1 { font-size: 30px; margin: 0 0 6px; color: var(--primary); }
h2 { font-size: 28px; margin: 10px 0 16px; line-height: 1.35; }
.lead { color: var(--muted); margin: 0 0 28px; }
.fine { font-size: 17px; color: var(--muted); }
.center { text-align: center; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.shoot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 300px; border-radius: 28px; background: var(--focus); color: var(--on-focus); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shoot-small { height: 120px; margin-top: 12px; }
.shoot-main { font-size: 34px; font-weight: 700; }
.shoot-sub { font-size: 20px; }
.shoot:active { transform: scale(.98); }
.alt {
  display: block; width: 100%; margin-top: 18px; padding: 12px; text-align: center; cursor: pointer;
  color: var(--primary); font: inherit; text-decoration: underline; background: none; border: 0;
}
.shoot:focus-visible, .alt:focus-visible, button:focus-visible, input:focus-visible + .alt { outline: 3px solid var(--primary); outline-offset: 3px; }

#preview { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 18px; background: var(--card); }
.busy-text { font-size: 26px; font-weight: 700; text-align: center; margin-top: 24px; }

.result { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.tag { display: inline-block; font-size: 18px; padding: 2px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-bottom: 14px; }
.card p { margin: 0; }
.card ul { list-style: none; margin: 0; padding: 0; }
.lab { font-size: 18px; color: var(--muted); margin-bottom: 6px; }
.todo li { padding: 8px 0; border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; }
.todo b { color: var(--primary); }
.warn { background: var(--warn-bg); color: var(--warn); border: 0; }
.warn li + li { margin-top: 8px; }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 12px;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line);
}
.bar button { flex: 1; min-height: 64px; border-radius: 16px; font: 700 24px/1.2 inherit; font-family: inherit; cursor: pointer; }
.speak { background: var(--focus); color: var(--on-focus); border: 0; }
.again { background: var(--card); color: var(--primary); border: 2px solid var(--primary); }

@media (prefers-reduced-motion: reduce) { .shoot:active { transform: none; } }
