:root { font-family: system-ui, "Noto Sans CJK SC", sans-serif; color: #18243b; background: #f3f6fb; line-height: 1.5; --blue: #174ab4; --border: #dce4ef; --muted: #52617a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { max-width: 68rem; margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.masthead { background: white; border-bottom: 1px solid var(--border); }
.bar, .section-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.bar { min-height: 4.25rem; }
.bar strong { font-size: 1.3rem; letter-spacing: -.03em; }
main { padding-block: 1.75rem 3rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 5vw, 2.4rem); line-height: 1.15; margin-block: .25rem .65rem; }
h2 { font-size: 1.125rem; }
p, .muted, .hint { color: var(--muted); }
.card { background: white; border: 1px solid var(--border); border-radius: 1rem; padding: 1.2rem; min-width: 0; }
.narrow { max-width: 28rem; margin: 2rem auto; }
button, input { font: inherit; min-height: 2.65rem; padding: .45rem .75rem; border-radius: .55rem; border: 1px solid var(--border); background: white; color: inherit; }
button { cursor: pointer; font-weight: 600; }
button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
button:disabled { opacity: .54; cursor: default; }
.primary, button.primary:hover:not(:disabled) { color: white; background: var(--blue); border-color: var(--blue); }
:focus-visible { outline: 3px solid #497ce5; outline-offset: 2px; }
form, label { display: grid; gap: .35rem; }
form { gap: .9rem; margin-top: .85rem; }
input { width: 100%; min-width: 0; }
.remember { display: flex; gap: .55rem; align-items: center; cursor: pointer; }
.remember input { width: 1rem; height: 1rem; min-height: 0; accent-color: var(--blue); }
#notice { padding: .7rem 1rem; margin-bottom: .75rem; border: 1px solid #bad0f6; color: #153e97; background: #edf4ff; border-radius: .65rem; white-space: pre-line; }
#notice[data-error="true"] { color: #8b221d; border-color: #efc9c2; background: #fff1ed; }
.device { border-radius: 1rem; background: #142a53; color: white; padding: clamp(1.2rem, 4vw, 2rem); display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap; }
.device p { color: #d6e2f6; }
.device-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.device-actions button:not(.primary) { color: #142a53; }
.eyebrow { display: flex; gap: .6rem; align-items: center; }
.status { color: #a4f3cb; font-weight: 700; }
.status[data-online="false"] { color: #f5ca8f; }
.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-top: .9rem; }
.summary strong { display: block; font-size: 1.15rem; margin-block: .4rem .25rem; }
.items { list-style: none; padding: 0; margin: .6rem 0; }
.items li { padding: .65rem 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.items li:first-child { border-top: 0; }
.row { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.row > span:first-child { flex: 1 1 auto; }
small { display: block; font-size: .875rem; color: var(--muted); }
.hint { margin-top: .9rem; }
.calendar { margin-top: .9rem; }
.month-actions { display: flex; gap: .5rem; margin-block: .65rem; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; max-width: 31rem; margin-top: .7rem; text-align: center; }
.days button { min-width: 0; padding-inline: 0; }
.days [aria-pressed="true"] { background: #e2eeff; border-color: #b5cdf6; color: #173b88; }
.days button:disabled { opacity: .78; }
.days button span { display: block; font-size: .8rem; font-weight: 400; }
details p { white-space: pre-line; margin-top: .45rem; }
summary { cursor: pointer; }
dialog { color: inherit; border: 1px solid var(--border); border-radius: 1rem; width: min(26rem, calc(100% - 2rem)); padding: 1.35rem; }
dialog::backdrop { background: #15223a80; }
#edit-fields { display: grid; gap: .75rem; }
@media (max-width: 42rem) { .summary { grid-template-columns: 1fr; } }
