:root {
  color-scheme: light dark;
  --background: #f4f6fb;
  --panel: #ffffff;
  --text: #17223b;
  --muted: #4c5a73;
  --line: #dbe1eb;
  --primary: #244fbd;
  --accent-soft: #e7efff;
  --alert: #9b3616;
  --alert-soft: #ffefe5;
  --critical: #cf303d;
  --warning: #ad5108;
  --info: #285ccc;
  --log: #646d80;
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  background: var(--background);
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #10182a;
    --panel: #19243c;
    --text: #eef2fd;
    --muted: #bbc6df;
    --line: #364461;
    --primary: #a9c2ff;
    --accent-soft: #273b69;
    --alert: #ffd0aa;
    --alert-soft: #492b24;
    --critical: #ff8189;
    --warning: #ffab5f;
    --info: #9eb9ff;
    --log: #b0bace;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-bottom: max(30px, env(safe-area-inset-bottom)); }
.container {
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: .9rem; font-weight: 700; text-decoration: none; }
.brand img { border-radius: 8px; }
.connection, .badge { border-radius: 100px; padding: 2px 9px; font-size: .72rem; font-weight: 700; }
.connection { background: var(--alert-soft); color: var(--alert); white-space: nowrap; }
#main { padding-top: 26px; }
h1 { font-size: clamp(1.35rem, 5vw, 1.9rem); line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
a { color: var(--primary); }
button, input, select { font: inherit; }
button, .action-link {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--primary);
  font-weight: 650;
}
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
.primary { background: #244fbd; color: #fff; border-color: #244fbd; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 3px; }
.heading, .actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.heading { margin-bottom: 16px; }
.actions { justify-content: flex-start; }
.back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: .87rem; margin-top: -10px; margin-bottom: 8px; }
.panel, .list { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
.panel { padding: 20px; }
.list { padding: 0; margin: 0; list-style: none; }
.list li + li { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  padding: 13px 14px;
  color: inherit;
  text-decoration: none;
}
.row-copy { min-width: 0; }
.row-copy > * { display: block; overflow-wrap: anywhere; }
.row-side { display: flex; align-items: flex-end; gap: 4px; flex-direction: column; }
.row-title { font-weight: 700; }
.history .row-title { font-weight: 480; }
.history .unread .row-title { font-weight: 750; }
.row-detail, time, .note, .empty { color: var(--muted); font-size: .82rem; }
.dot { width: 9px; height: 9px; border-radius: 100%; }
.dot[data-level="critical"] { background: var(--critical); }
.dot[data-level="warning"] { background: var(--warning); }
.dot[data-level="info"] { background: var(--info); }
.dot[data-level="log"] { background: var(--log); }
.badge { color: var(--primary); background: var(--accent-soft); font-variant-numeric: tabular-nums; }
form { display: grid; gap: 9px; }
form label { font-size: .88rem; font-weight: 650; }
form input, form select {
  width: 100%;
  border-radius: 9px;
  padding: 10px;
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--line);
  min-height: 46px;
  margin-bottom: 9px;
}
form button { justify-self: start; }
.login { max-width: 28rem; margin: 12px auto; }
.login h1 { margin-bottom: 18px; }
.install { margin-top: 16px; }
.detail-heading { margin-bottom: 10px; }
.detail-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 18px 0; }
.related { overflow-wrap: anywhere; }
.feedback { margin-top: 16px; color: var(--alert); font-size: .86rem; }
