*{box-sizing:border-box}
body{margin:0;font:16px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:#f1f3f5;color:#212529}
header{display:flex;flex-wrap:wrap;gap:8px 20px;align-items:center;padding:12px 16px;background:#1f2933;color:#fff}
header h1{margin:0;font-size:20px}
header span{flex:1;font-size:14px;opacity:.9}
header a{color:#fff;font-size:14px}
main{max-width:1100px;margin:0 auto;padding:16px}
.banner{margin:0;padding:10px 16px;background:#fff3bf;color:#5c3c00;font-weight:600}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin-bottom:16px}
.card{background:#fff;border-radius:12px;padding:16px;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.room h2{margin:0 0 4px;font-size:17px}
.room .temp b{font-size:44px;font-weight:600}
.room .temp small{font-size:18px;margin-left:4px}
.room .hum{margin:2px 0 12px}
.room.high{outline:3px solid #e03131}
.alarm{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:10px;background:#e03131;color:#fff;font-size:12px;font-weight:700}
.set{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #e9ecef;padding-top:12px}
.set div{text-align:center}
.set div small{display:block;font-size:12px;color:#495057}
.set div b{font-size:28px}
.set div b+small{display:inline;margin-left:3px}
.set button{width:52px;height:52px;border-radius:50%;border:0;background:#1971c2;color:#fff;font-size:28px;line-height:1;cursor:pointer}
.set button:disabled{background:#ced4da;cursor:default}
.note{min-height:20px;margin:8px 0 0;font-size:13px;color:#b35c00}
.tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.tabs .sp{flex:1}
.tabs button{border:1px solid #ced4da;background:#fff;border-radius:8px;padding:8px 12px;font:inherit;cursor:pointer}
.tabs button.on{background:#1f2933;color:#fff;border-color:#1f2933}
.chartbox{height:340px}
body.login{display:grid;place-items:center;min-height:100vh}
.login form{width:min(92vw,340px);display:grid;gap:12px}
.login h1{margin:0;font-size:22px}
.login label{display:grid;gap:4px;font-size:14px}
.login input{font:inherit;padding:10px;border:1px solid #ced4da;border-radius:8px}
.login button{font:inherit;padding:11px;border:0;border-radius:8px;background:#1971c2;color:#fff;cursor:pointer}
.err{margin:0;color:#c92a2a;font-size:14px}
