:root {
    color-scheme: light;
    font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
    background: #f4f7fb;
    color: #172033;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.page-shell { width: min(100% - 32px, 840px); margin: 48px auto; }
.calculator { background: #fff; border: 1px solid #e1e8f3; border-radius: 20px; box-shadow: 0 18px 48px rgb(30 55 90 / 9%); overflow: hidden; }
.hero { padding: 40px 44px 30px; color: #fff; background: linear-gradient(135deg, #125cb9, #217ee0); }
.eyebrow { margin: 0 0 7px; font-size: .9rem; font-weight: 700; letter-spacing: .08em; opacity: .8; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.04em; }
.hero > p:last-child { margin: 11px 0 0; font-size: 1.05rem; }
form { padding: 34px 44px 10px; }
.date-grid { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: end; gap: 12px; }
label, .option-group > span { display: block; font-weight: 700; font-size: .95rem; }
input[type="date"], textarea { display: block; width: 100%; margin-top: 8px; border: 1px solid #bfcce0; border-radius: 9px; color: inherit; background: #fff; font: inherit; padding: 11px 12px; }
input[type="date"]:focus, textarea:focus { outline: 3px solid rgb(33 126 224 / 23%); border-color: #217ee0; }
.today-button { border: 0; border-radius: 8px; padding: 10px 13px; background: #eaf2fc; color: #1458aa; font: inherit; font-weight: 700; cursor: pointer; }
fieldset { margin: 28px 0 0; padding: 22px; border: 1px solid #d9e2ef; border-radius: 12px; }
legend { padding: 0 8px; font-weight: 800; }
.check-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: #1672d4; }
.option-group { margin-top: 20px; }
.weekday-options { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 11px; }
.weekday { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.holiday-label { margin-top: 22px; }
textarea { resize: vertical; line-height: 1.5; font-weight: 400; }
small { display: block; margin-top: 7px; color: #5b6779; font-weight: 400; line-height: 1.5; }
.submit-button { display: block; width: 100%; margin: 26px 0; padding: 14px; border: 0; border-radius: 10px; background: #1266c3; color: #fff; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.submit-button:hover, .submit-button:focus { background: #0d55a6; }
.form-error { margin: 18px 0 -8px; padding: 12px; border-radius: 9px; color: #9d1d1d; background: #fff0f0; }
.result { margin: 8px 44px 44px; padding: 26px; border: 1px solid #b8d6f5; border-radius: 13px; text-align: center; background: #f2f8ff; }
.result-kicker { margin: 0; color: #43546c; font-size: .93rem; }
.result-number { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 7px 0 20px; color: #0b579f; }
.result-number strong { font-size: clamp(3.2rem, 11vw, 5rem); line-height: 1; letter-spacing: -.06em; }
.result-number span { font-size: 1.2rem; font-weight: 800; }
dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 0; }
dl div { padding: 12px 7px; border-radius: 9px; background: #fff; }
dt { color: #647287; font-size: .82rem; } dd { margin: 4px 0 0; font-weight: 800; }
@media (max-width: 640px) { .page-shell { width: min(100% - 20px, 840px); margin: 18px auto; } .hero, form { padding-left: 20px; padding-right: 20px; } .date-grid { grid-template-columns: minmax(0, 1fr) auto; } .date-grid label { grid-column: auto; } .today-button { grid-column: auto; grid-row: auto; margin: 0; } .result { margin: 8px 20px 20px; } dl { grid-template-columns: 1fr; text-align: left; } dl div { display: flex; justify-content: space-between; align-items: center; } dd { margin: 0; } }
