:root { color-scheme: light dark; --bg:light-dark(#fff,#111821); --fg:light-dark(#182634,#e9f0f8); --muted:light-dark(#5d6d7d,#a6b5c6); --line:light-dark(#e0e7ee,#2a3543); --danger:light-dark(#a51f32,#ffabb8); --danger-bg:light-dark(#fff0f2,#351b24); --warning:light-dark(#845000,#f5ce89); --warning-bg:light-dark(#fff5df,#302617); --good:light-dark(#11654c,#8de0bf); --good-bg:light-dark(#e9f7ef,#183028); --neutral-bg:light-dark(#edf1f5,#232d39); --flow-main:light-dark(#386f87,#76b8d0); --flow-backup:light-dark(#c07a20,#e8b965); }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; overflow-wrap:anywhere; }
button,input { font:inherit; }
button,a,input,summary { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
button,summary { cursor:pointer; }
button:disabled { cursor:default; opacity:.65; }
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible { outline:3px solid var(--flow-main); outline-offset:3px; }
[hidden] { display:none !important; }
.dashboard-shell { width:100%; max-width:460px; margin:0 auto; padding:calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); }
.page-header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:20px; }
.brand { display:block; color:var(--muted); font-size:11px; font-weight:500; letter-spacing:.12em; }
h2 { margin:0; font-size:19px; font-weight:500; }
.refresh-button { min-height:44px; padding:7px 11px; color:var(--muted); background:transparent; border:1px solid var(--line); border-radius:10px; font-size:13px; }
.hero { padding:18px 16px; border-radius:16px; background:var(--neutral-bg); }
.hero[data-tone="danger"] { background:var(--danger-bg); color:var(--danger); }
.hero[data-tone="warning"] { background:var(--warning-bg); color:var(--warning); }
.hero[data-tone="good"] { background:var(--good-bg); color:var(--good); }
.state-label { display:flex; align-items:center; gap:7px; font-size:13px; font-weight:500; }
.state-dot { flex:0 0 8px; height:8px; border-radius:50%; background:currentColor; }
h1 { margin:8px 0 7px; font-size:30px; line-height:1.2; font-weight:500; letter-spacing:-.03em; }
.hero p { margin:0; font-size:14px; }
.hero .episode-time { margin-top:8px; font-size:12px; }
.connection-error { margin:10px 0 0; color:var(--danger); font-size:13px; }
.error-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; border-bottom:1px solid var(--line); }
.metric-label { font-weight:500; }
.muted { margin:3px 0 0; font-size:12px; color:var(--muted); }
#error-count { font-size:34px; font-weight:500; font-variant-numeric:tabular-nums; line-height:1; }
#error-count.has-errors { color:var(--danger); }
.metric-unit { font-size:13px; color:var(--muted); }
.traffic { padding:16px 0; }
.section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:10px; }
h3 { margin:0; font-size:15px; font-weight:500; }
.section-heading>span { font-size:12px; color:var(--muted); }
.flow-bar { display:flex; height:9px; overflow:hidden; border-radius:8px; background:var(--neutral-bg); }
#primary-bar { background:var(--flow-main); width:0; }
#backup-bar { background:var(--flow-backup); width:0; }
.flow-labels { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; margin-top:10px; font-size:12px; color:var(--muted); }
.flow-labels strong { display:block; margin-top:3px; color:var(--fg); font-size:17px; font-weight:500; font-variant-numeric:tabular-nums; }
.flow-dot { display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:5px; }
.flow-main { background:var(--flow-main); }
.flow-backup { background:var(--flow-backup); }
#backup-names { margin-top:9px; }
.unseen-box { border-radius:14px; padding:14px; background:var(--warning-bg); color:var(--warning); }
.unseen-box.all-seen { background:var(--neutral-bg); color:var(--fg); }
.unseen-box>strong { font-size:15px; font-weight:500; }
.unseen-box p { margin:5px 0 0; font-size:12px; }
#mark-seen { display:block; width:100%; min-height:44px; margin-top:12px; border:1px solid currentColor; border-radius:9px; background:transparent; color:inherit; font-size:14px; }
.action-note { margin:8px 0 0; color:var(--muted); font-size:11px; text-align:center; }
.history { margin-top:8px; }
.history>summary { display:flex; align-items:center; gap:6px; min-height:48px; list-style:none; font-size:14px; font-weight:500; }
.history>summary::-webkit-details-marker { display:none; }
#history-count { font-size:12px; color:var(--muted); }
.chevron { margin-left:auto; color:var(--muted); }
.history[open] .chevron { transform:rotate(180deg); }
.history-caption { margin-bottom:14px; }
#timeline { padding:0; margin:0 0 16px; list-style:none; display:grid; gap:16px; }
#timeline>li { border-left:2px solid var(--line); padding-left:11px; }
.event-heading { display:flex; justify-content:space-between; align-items:baseline; gap:8px; font-size:14px; }
.event-heading strong { font-weight:500; }
.event-heading span { font-size:12px; color:var(--muted); }
.event-heading .event-active { color:var(--danger); }
.event-time { margin:3px 0; font-size:12px; color:var(--muted); }
.event-detail summary { min-height:36px; font-size:12px; color:var(--muted); }
.event-detail p { white-space:pre-wrap; margin:3px 0; font-size:12px; }
.unread-label { margin-left:6px; color:var(--warning); font-size:11px; }
.primary-button { display:flex; justify-content:center; align-items:center; width:100%; min-height:48px; border:0; padding:10px 12px; border-radius:10px; background:var(--fg); color:var(--bg); text-decoration:none; font-size:15px; font-weight:500; }
footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 10px; margin-top:16px; padding-top:11px; border-top:1px solid var(--line); font-size:11px; color:var(--muted); }
.about { margin-top:16px; color:var(--muted); font-size:12px; }
.about summary { min-height:44px; }
.about p { margin:6px 0 12px; }
.logout-button { min-height:44px; background:transparent; color:var(--muted); border:1px solid var(--line); border-radius:8px; padding:8px 14px; }
.login-page { display:grid; min-height:100svh; align-items:center; }
.login-box { width:100%; max-width:390px; margin:0 auto; padding:28px 24px; }
.login-box h1 { margin-top:8px; }
.login-description { color:var(--muted); margin:12px 0 24px; font-size:14px; }
.login-box label { display:block; font-size:14px; margin-bottom:8px; }
.login-box input[type="password"] { width:100%; min-height:48px; border:1px solid var(--line); background:var(--bg); color:var(--fg); border-radius:9px; padding:10px 12px; }
.login-box .primary-button { margin-top:18px; }
.login-box>.muted { margin-top:18px; }
.login-error { color:var(--danger); font-size:13px; margin:10px 0 0; }
@media (max-width:350px) { .dashboard-shell { padding-left:15px; padding-right:15px; } h1 { font-size:28px; } }
