:root{--accent: #0ea5e9;--tabbar-h: 64px;--safe: env(safe-area-inset-bottom, 0px);--inactive: #8e8e93;--border: #ddd;--muted: #666}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body,#root{height:100%}body{margin:0;font-family:system-ui,-apple-system,sans-serif;background:#f6f7f9;color:#111}.app{max-width:560px;margin:0 auto;min-height:100%;display:flex;flex-direction:column;background:#fff;min-height:100dvh}.app-top{padding:14px 16px 6px}.app-top h1{font-size:20px;margin:0}.screen{flex:1;padding:8px 16px calc(var(--tabbar-h) + var(--safe) + 14px)}.app-head{display:flex;justify-content:space-between;align-items:center;margin:4px 0 12px}.app-head h2{font-size:22px;margin:0}.icon-btn{border:1px solid var(--border);background:#fff;border-radius:8px;padding:6px 10px;font-size:12px;cursor:pointer}.kpi-list{display:flex;flex-direction:column;gap:10px}.kpi{border:1px solid var(--border);border-radius:12px;padding:14px;background:#fff;cursor:pointer;display:flex;flex-direction:row;align-items:center;gap:12px;text-align:left}.kpi:active{opacity:.85}.icon-box{width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;flex:none}.kpi .lbl{font-size:14px;font-weight:700;color:#111}.kpi .val{font-size:24px;font-weight:700}.kpi .unit{font-size:12px;color:var(--muted);font-weight:400}.card{border:1px solid var(--border);border-radius:12px;padding:14px;background:#fff;margin-bottom:10px}.card h3{margin:0 0 10px;font-size:16px}label{font-size:12px;color:var(--muted);display:block;margin-bottom:3px}input[type=number],input[type=text],input[type=password]{width:100%;padding:8px 10px;border:1px solid #ccc;border-radius:8px;font-size:15px}.field{margin-bottom:12px}button.primary{width:100%;background:var(--accent);border:none;color:#fff;font-weight:600;font-size:15px;padding:11px;border-radius:10px;margin-top:4px;cursor:pointer}button.primary:disabled{opacity:.5}button.ghost{width:100%;background:#fff;border:1px solid var(--border);color:#111;font-size:13px;padding:9px;border-radius:10px;cursor:pointer;margin-top:8px}.warn{background:#fff3cd;border:1px solid #e0a800;border-radius:8px;padding:9px 12px;margin-top:12px;line-height:1.55}.muted{color:var(--muted)}.sm{font-size:11px}.zone-chips{display:flex;gap:6px;margin-top:8px}.chip{flex:1;border-radius:8px;padding:6px 2px;text-align:center;font-size:10.5px}.seg{display:flex;background:#e9e9eb;border-radius:9px;padding:2px;margin-bottom:10px}.seg button{flex:1;border:none;background:transparent;padding:6px 0;font-size:12px;border-radius:7px;color:#111;cursor:pointer}.seg button.active{background:#fff;box-shadow:0 1px 3px #0000002e;font-weight:600}.zone-row{margin-bottom:12px}.zone-lbl{font-size:11px;color:var(--muted);display:flex;justify-content:space-between;margin-bottom:4px}.zone-track{position:relative;height:10px;background:#f1f5f9;border-radius:5px}.zone-fill{height:10px;border-radius:5px}.zone-tick{position:absolute;top:-3px;bottom:-3px;width:2px;background:#111;border-radius:1px}.detail{position:fixed;top:0;right:0;bottom:0;left:0;background:#fff;z-index:20;display:none;flex-direction:column}.detail.open{display:flex}.detail-head{display:flex;align-items:center;gap:10px;padding:calc(14px + var(--safe)) 16px 8px;border-bottom:.5px solid #e5e5ea;flex:none}.detail-head .back{border:none;background:none;color:var(--accent);font-size:16px;cursor:pointer;padding:4px 6px}.detail-head h2{margin:0;font-size:17px;flex:1;text-align:center;display:flex;align-items:center;justify-content:center;gap:7px}.detail-head .spacer{width:52px}.detail-body{flex:1;overflow-y:auto;padding:12px 16px 24px}.range-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}.range-row .arrow{border:1px solid var(--border);background:#fff;border-radius:8px;width:34px;height:30px;font-size:15px;cursor:pointer}.range-row .arrow:disabled{opacity:.35}.range-lbl{flex:1;text-align:center;font-size:12.5px;color:var(--muted)}.chart-card{border:1px solid var(--border);border-radius:12px;padding:10px 8px 4px;background:#fff}.stats{display:flex;gap:8px;margin-top:10px}.stat{flex:1;border:1px solid var(--border);border-radius:10px;padding:8px;text-align:center}.stat .v{font-weight:700;font-size:15px}.stat .l{font-size:10.5px;color:var(--muted)}.tabbar{position:fixed;bottom:0;left:50%;transform:translate(-50%);width:100%;max-width:560px;height:calc(var(--tabbar-h) + var(--safe));padding-bottom:var(--safe);background:#ffffffe0;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:.5px solid #c7c7cc;display:flex;z-index:10}.tab{flex:1;border:none;background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--inactive);cursor:pointer;padding:6px 0 2px}.tab span{font-size:10px}.tab.active{color:var(--accent)}table.acts{width:100%;border-collapse:collapse;font-size:13px}table.acts th{text-align:left;color:var(--muted);font-weight:600;padding:4px 6px}table.acts td{border-top:1px solid #eee;padding:5px 6px}.banner{margin:0 16px 10px;padding:10px 14px;background:#fff3cd;border:1px solid #e0a800;border-radius:6px;font-size:13px}
