:root{--bg:#f4f6f9;--surface:#fff;--border:#dfe3ea;--text:#1f2937;--muted:#6b7280;--primary:#2563eb;--primary-weak:#dbeafe;--active:#16a34a;--active-weak:#dcfce7;--idle:#f59e0b;--idle-weak:#fef3c7;--danger:#dc2626;--danger-weak:#fee2e2;--radius:10px;--shadow:0 1px 2px #1018280f, 0 1px 3px #1018281a}*{box-sizing:border-box}html,body{background:var(--bg);color:var(--text);margin:0;padding:0;font-family:Segoe UI,Yu Gothic UI,Meiryo,system-ui,-apple-system,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.5}h1,h2,h3{margin:0;font-weight:600}h1{font-size:18px}h2{font-size:16px}h3{color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin:24px 0 8px;font-size:14px}p{margin:0}code,.mono{font-family:Consolas,Cascadia Mono,Courier New,monospace}.muted{color:var(--muted)}.small{font-size:12px}.nowrap{white-space:nowrap}.ellipsis{text-overflow:ellipsis;white-space:nowrap;max-width:520px;overflow:hidden}.app{flex-direction:column;min-height:100vh;display:flex}.app-header{background:var(--surface);border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:14px 24px;display:flex}.brand{align-items:center;gap:12px;display:flex}.brand-mark{background:linear-gradient(135deg, var(--primary), #60a5fa);border-radius:8px;width:32px;height:32px;position:relative}.brand-mark:before,.brand-mark:after{content:"";background:#fff;border-radius:2px;height:3px;position:absolute;left:8px}.brand-mark:before{width:16px;top:11px}.brand-mark:after{width:10px;top:18px}.brand-sub{color:var(--muted);font-size:12px}.header-actions{align-items:center;gap:12px;display:flex}.header-info{position:relative}.info-btn{border:1px solid var(--border);background:var(--surface);width:28px;height:28px;color:var(--muted);font:inherit;cursor:pointer;border-radius:50%;padding:0;font-size:14px;font-style:italic;font-weight:600;line-height:1}.info-btn:hover{border-color:var(--primary);color:var(--primary)}.close-btn{border:1px solid var(--border);background:var(--surface);width:32px;height:32px;color:var(--muted);cursor:pointer;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:inline-flex}.close-btn:hover{border-color:var(--primary);color:var(--primary)}.info-popover{z-index:10;border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow);color:var(--text);white-space:nowrap;border-radius:8px;padding:8px 12px;font-size:12px;position:absolute;top:calc(100% + 6px);right:0}.app-main{flex-direction:column;flex:1;gap:20px;width:100%;max-width:1200px;margin:0 auto;padding:24px;display:flex}.app-footer{text-align:center;color:var(--muted);padding:16px 24px;font-size:12px}.app-footer p+p{margin-top:8px}.app-footer a{color:var(--primary);text-decoration:none}.app-footer a:hover{text-decoration:underline}.support-link .muted{margin-left:.25em}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.card-header{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px;display:flex}.dropzone{border:2px dashed var(--border);border-radius:var(--radius);background:var(--surface);text-align:center;cursor:pointer;padding:48px 24px;transition:border-color .15s,background-color .15s}.dropzone:hover,.dropzone:focus-visible{border-color:var(--primary);outline:none}.dropzone-active{border-color:var(--primary);background:var(--primary-weak)}.dropzone-compact{color:var(--muted);padding:12px 16px}.dropzone-icon{background:var(--primary-weak);width:56px;height:56px;color:var(--primary);border-radius:50%;margin:0 auto 12px;font-size:32px;line-height:56px}.dropzone h2{margin-bottom:6px}.dropzone p+p{margin-top:8px}.dropzone a{color:var(--primary);text-decoration:none}.dropzone a:hover{text-decoration:underline}.alert{border-radius:var(--radius);border:1px solid;padding:12px 16px}.alert ul{margin:6px 0 0;padding-left:20px}.alert-error{background:var(--danger-weak);color:#7f1d1d;border-color:#fca5a5}.badge{background:var(--primary-weak);color:var(--primary);vertical-align:middle;border-radius:999px;margin-left:8px;padding:1px 8px;font-size:11px;display:inline-block}.badge-ok{background:var(--active-weak);color:var(--active)}.badge-warn{background:var(--idle-weak);color:#92400e}.badge-inline{margin-left:8px}.badge-type{text-align:center;justify-content:center;align-items:center;min-width:3.2em;margin-left:0;display:inline-flex}.table td>.badge{margin-left:0}.table td>.badge-inline{margin-left:8px}.btn{font:inherit;border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;border-radius:8px;padding:6px 14px}.btn:hover{border-color:var(--primary);color:var(--primary)}.btn-ghost{background:0 0}.table-wrap{overflow-x:auto}.table{border-collapse:collapse;width:100%}.table th,.table td{border-bottom:1px solid var(--border);text-align:left;vertical-align:middle;padding:8px 10px}.table th{color:var(--muted);white-space:nowrap;font-size:12px;font-weight:600}.table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.table-clickable tbody tr{cursor:pointer}.table-clickable tbody tr:hover{background:#f8fafc}.table-clickable tbody tr.selected{background:var(--primary-weak)}.timeline-cell{width:40%;min-width:320px}.table-daily thead th{vertical-align:bottom}.timeline-scale{color:#9ca3af;font-variant-numeric:tabular-nums;justify-content:space-between;margin-top:4px;font-size:10px;font-weight:400;line-height:1;display:flex}.timeline-scale span{justify-content:center;width:0;display:flex}.timeline{background:#eef1f5;border-radius:4px;width:100%;height:14px;position:relative;overflow:hidden}.timeline-grid{background:#6b728040;width:1px;position:absolute;top:0;bottom:0}.timeline-seg{min-width:2px;height:100%;position:absolute;top:0}.timeline-uptime{background:#cbd5e1}.timeline-active{background:var(--active)}.timeline-idle{background:var(--idle)}.legend{flex-wrap:wrap;gap:16px;margin-top:8px;display:flex}.legend-item{align-items:center;gap:6px;display:inline-flex}.legend-swatch{border-radius:3px;width:12px;height:12px;display:inline-block}.legend-active{background:var(--active)}.legend-idle{background:var(--idle)}.legend-off{border:1px solid var(--border);background:#eef1f5}.legend-note{color:#9ca3af;margin-left:auto}.tooltip{z-index:100;color:#fff;overflow-wrap:anywhere;pointer-events:none;max-width:min(360px,100vw - 16px);box-shadow:var(--shadow);background:#1f2937;border-radius:6px;padding:6px 10px;font-size:12px;line-height:1.4;position:fixed}.tooltip-above{transform:translate(-50%,-100%)}.tooltip-below{transform:translate(-50%)}.kpi-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:8px;display:grid}.kpi{border:1px solid var(--border);border-radius:var(--radius);background:#fafbfc;padding:14px 16px}.kpi-label{color:var(--text);font-size:13px;font-weight:600}.kpi-hint{color:#9ca3af;min-height:2.8em;margin-top:4px;font-size:11px;font-weight:400;line-height:1.45}.kpi-value{font-variant-numeric:tabular-nums;margin-top:4px;font-size:26px;font-weight:600;line-height:1.2}.kpi-active .kpi-value{color:var(--active)}.kpi-idle .kpi-value{color:var(--idle)}.bar{background:#eef1f5;border-radius:5px;width:100%;height:10px;display:flex;overflow:hidden}.bar-fill{height:100%}.bar-active{background:var(--active)}.bar-idle{background:var(--idle)}.bar-app{background:var(--primary);border-radius:5px}.app-list{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.app-row{justify-content:space-between;gap:12px;margin-bottom:4px;display:flex}.app-name{text-overflow:ellipsis;white-space:nowrap;font-weight:500;overflow:hidden}.app-time{white-space:nowrap;font-variant-numeric:tabular-nums}.load-more-section{flex-direction:column;gap:12px;display:flex}.load-more-section>.btn{align-self:flex-start}@media (width<=640px){.app-main{padding:12px}.card{padding:14px}.ellipsis{max-width:200px}}.timeline-locked,.legend-locked{background:#9a69c7}.timeline-disconnected,.legend-disconnected{background:#b77342}.timeline-unknown,.legend-unknown{background:repeating-linear-gradient(135deg,#97a4b5 0 3px,#dce2eb 3px 6px)}.timeline-sleep,.legend-sleep{background:#526984}.timeline-gap,.legend-gap{background:repeating-linear-gradient(135deg,#e5e9ef 0 3px,#f8fafc 3px 6px)}.observation-summary{border:1px solid var(--border);border-radius:10px;margin:16px 0;padding:14px 18px}.observation-summary p{margin:6px 0}.observation-summary summary{cursor:pointer;font-weight:600}.state-totals{flex-wrap:wrap;gap:14px 28px;margin:14px 0;display:flex}.state-totals div{min-width:110px}.state-totals dt{color:var(--muted);font-size:12px}.state-totals dd{margin:5px 0 0;font-weight:600}
