:root { color-scheme: light; }
body { font-family: system-ui, "Noto Sans TC", sans-serif; margin: 0 auto; padding: 16px; max-width: 640px; }
h1 { font-size: 1.25rem; }
fieldset { border: 1px solid #ccc; border-radius: 6px; margin: 12px 0; }
legend { font-weight: 600; }
label { display: block; margin: 8px 0; }
fieldset > label { display: inline-block; margin-right: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; margin: 0;
        padding: 10px 14px; border: 1px solid #bbb; border-radius: 16px; }
.chip:has(input:checked) { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.contractor-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.contractor-row input { width: 5rem; }
input[type=number], input[type=date], textarea, input[type=password] {
  font-size: 1rem; padding: 6px; }
#stats { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #ddd;
         padding: 10px 0; font-size: 0.95rem; }
#submit { width: 100%; padding: 14px; font-size: 1.05rem; background: #1d4ed8;
          color: #fff; border: 0; border-radius: 6px; }
#submit:disabled { background: #94a3b8; }
#message { min-height: 1.5em; }
#page-message { color: #b91c1c; }
legend button { margin-left: 6px; padding: 4px 10px; font-size: 0.8rem; }
