:root {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: #173a31;
  background: #f5f1e7;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #f9f6ef 0%, #efe8d8 100%); }
button, input, select, textarea { font: inherit; }
.shell { width: min(100%, 560px); margin: 0 auto; padding: 30px 18px max(34px, env(safe-area-inset-bottom)); }
.brand { padding: 14px 6px 22px; }
.eyebrow { color: #b57928; letter-spacing: .18em; font-size: .72rem; font-weight: 700; }
.form-eyebrow { font-size: .63rem; }
h1 { margin: 7px 0 3px; font-family: Georgia, "Noto Serif TC", serif; color: #0d493c; font-size: 2rem; font-weight: 600; }
.brand p { margin: 0; color: #66766f; }
.card { background: rgba(255,255,255,.94); border: 1px solid #dfd5c3; border-radius: 18px; padding: 23px; box-shadow: 0 14px 35px rgba(57,44,27,.08); }
.card + .card, #allowed .card + .card { margin-top: 14px; }
.hidden { display: none !important; }
.state-card { text-align: center; padding-top: 34px; padding-bottom: 34px; }
.spinner { width: 34px; height: 34px; margin: 0 auto 18px; border: 3px solid #dce6e2; border-top-color: #0f6a58; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
h2 { margin: 10px 0 9px; font-size: 1.35rem; color: #123f35; }
p { line-height: 1.7; color: #66766f; }
.status { display: inline-block; padding: 7px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.status.ok { background: #e3f3ea; color: #17603f; }
.status.blocked { background: #fff1d8; color: #8b5a0b; }
.status.error { background: #fde8e5; color: #9a3429; }
.employee-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #e5ded1; border: 1px solid #e5ded1; border-radius: 12px; overflow: hidden; margin: 19px 0 0; }
.employee-grid div { background: #fff; padding: 14px; }
.compact-grid { margin-top: 16px; }
dt { color: #829088; font-size: .76rem; margin-bottom: 4px; }
dd { margin: 0; color: #153e34; font-weight: 700; word-break: break-word; }
.notice { padding: 14px 15px; border-radius: 12px; background: #eef4f1; color: #4c675e; font-size: .9rem; line-height: 1.65; }
.small-notice { margin-top: 18px; font-size: .78rem; }
.code { margin-top: 16px; padding: 9px 11px; border-radius: 9px; background: #f5f3ee; color: #7a7469; font: .76rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.button { width: 100%; margin-top: 16px; border: 0; border-radius: 12px; background: #0e5b4c; color: white; font: inherit; font-weight: 700; padding: 14px 16px; cursor: pointer; }
.button:disabled { opacity: .58; cursor: wait; }
.button.secondary { background: #edf4f1; color: #174b3f; border: 1px solid #cdded7; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.section-heading h2 { margin-bottom: 0; }
.required-note { color: #9a7252; font-size: .72rem; padding-top: 4px; white-space: nowrap; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend, .field > span { display: block; color: #23483e; font-size: .86rem; font-weight: 700; margin-bottom: 8px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: 12px 10px; border: 1px solid #d8d0c1; border-radius: 11px; background: #fff; color: #5a6d66; font-weight: 700; }
.segmented input:checked + span { border-color: #0e6a57; background: #eaf4ef; color: #0d5748; box-shadow: inset 0 0 0 1px #0e6a57; }
.field { display: block; margin-top: 17px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d8d0c1; border-radius: 11px; background: #fff; color: #173a31; padding: 12px 13px; outline: none; }
.field textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #0e6a57; box-shadow: 0 0 0 3px rgba(14,106,87,.1); }
.inline-error { margin-top: 16px; padding: 12px 13px; border-radius: 10px; background: #fde8e5; color: #8f3027; font-size: .86rem; line-height: 1.55; }
.success-card { text-align: center; }
.ticket-label { margin-bottom: 4px; font-size: .8rem; color: #8a8f88; }
.ticket-no { color: #0d493c; font-size: 1.45rem; font-weight: 800; letter-spacing: .03em; word-break: break-word; }
.receipt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 20px 0; background: #e5ded1; border: 1px solid #e5ded1; border-radius: 12px; overflow: hidden; text-align: left; }
.receipt-grid div { background: #fff; padding: 13px; }
.success-note { font-size: .86rem; margin: 0; }
footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding: 0 4px; color: #8a8f88; font-size: .7rem; }
@media (max-width: 390px) {
  .employee-grid, .receipt-grid { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: 1fr; }
}
