:root {
  --bg: var(--tg-theme-secondary-bg-color, #f2f2f7);
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --text: var(--tg-theme-text-color, #111111);
  --muted: var(--tg-theme-hint-color, #8e8e93);
  --accent: var(--tg-theme-button-color, #2481cc);
  --line: color-mix(in srgb, var(--muted) 25%, transparent);
  --up: #34c759; --warn: #ff9f0a; --down: #ff3b30;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
h1 { font-size: 22px; margin: 0 0 2px; }
.muted { color: var(--muted); margin: 0; font-size: 13px; }
#refresh { border: 0; background: var(--card); color: var(--accent); font-size: 20px;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
#refresh.spin { animation: spin .7s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { background: var(--card); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.notice.bad { color: var(--down); }
main { background: var(--card); border-radius: 14px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.row + .row { border-top: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.up { background: var(--up); }
.dot.warn { background: var(--warn); }
.dot.down { background: var(--down); }
.who { flex: 1; min-width: 0; }
.name { font-weight: 600; }
.role { color: var(--muted); font-size: 13px; }
.meta { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.meta .state.down { color: var(--down); font-weight: 600; }
.meta .state.warn { color: var(--warn); font-weight: 600; }
footer { text-align: center; margin-top: 14px; }
