:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: #202735;
  background: #f4f5f7;
  font-synthesis: none;
  line-height: 1.6;
  --red: #b51d32;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; border-top: 5px solid var(--red); }
main { max-width: 480px; margin: 40px auto; padding: 0 24px max(24px, env(safe-area-inset-bottom)); }
header { margin-bottom: 28px; }
.eyebrow { margin: 0 0 5px; font-size: 0.875rem; color: var(--red); font-weight: 700; letter-spacing: .04em; }
h1 { margin: 0; font-size: 1.75rem; font-weight: 750; line-height: 1.4; letter-spacing: -.03em; }
.intro { margin: 9px 0 0; color: #5b6575; font-size: 1rem; }
label { display: block; font-weight: 650; margin-bottom: 8px; font-size: 1rem; }
.input-row { display: flex; gap: 10px; }
input, textarea, button, .button { font: inherit; }
input { min-width: 0; width: 100%; background: white; border: 1px solid #b5bbc5; border-radius: 10px; height: 56px; padding: 12px 16px; font-size: 1.125rem; color: #202735; }
input::placeholder { color: #7d8591; font-size: 1rem; }
input[aria-invalid="true"] { border-color: var(--red); }
button, .button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid transparent; border-radius: 10px; padding: 12px 16px; min-height: 52px; font-weight: 650; cursor: pointer; touch-action: manipulation; line-height: 1.5; text-align: center; }
button:disabled { opacity: .6; cursor: wait; }
button:active, .button:active { transform: translateY(1px); }
:focus-visible { outline: 3px solid #2c63b8; outline-offset: 3px; }
.primary { background: var(--red); color: white; white-space: nowrap; padding-inline: 23px; }
.secondary { background: white; border-color: #bdc4cf; color: #293548; }
.line { background: #087e35; color: white; }
.error { font-size: .875rem; color: #a91529; margin: 8px 0 0; }
#result { margin-top: 28px; border-top: 1px solid #d8dce3; padding-top: 24px; }
.result-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h2 { margin: 0; font-size: 1.125rem; }
.employee-tag { font-size: .875rem; color: #5b6575; overflow-wrap: anywhere; }
.employee-tag strong { color: #202735; font-variant-numeric: tabular-nums; }
.result-note { font-size: .875rem; color: #5b6575; margin: 8px 0 14px; }
textarea { display: block; width: 100%; border: 1px solid #d8dce3; border-radius: 10px; background: white; color: #354257; font-size: .875rem; line-height: 1.6; padding: 12px; resize: none; overflow-wrap: anywhere; word-break: break-all; }
.link-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; margin-top: 12px; }
.qr-section { margin-top: 24px; text-align: center; }
#qr-image { display: block; width: min(100%, 280px); height: auto; margin: 0 auto 16px; border: 1px solid #e2e5ea; border-radius: 12px; background: white; }
.wide { width: 100%; }
.image-hint { font-size: .875rem; color: #657080; margin: 8px 0 0; }
.status { font-size: .875rem; font-weight: 550; color: #354257; margin: 16px 0 0; }
.status:empty { display: none; }
footer { color: #687282; font-size: .875rem; margin-top: 28px; line-height: 1.7; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 360px) {
  main { margin-top: 28px; padding-inline: 18px; }
  .primary { padding-inline: 17px; }
  .link-actions { grid-template-columns: 1fr; }
}
@media (min-width: 700px) {
  main { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  button:active, .button:active { transform: none; }
}
