:root {
  --bg: #10161d;
  --panel: #16202a;
  --line: #2b3848;
  --text: #e8eef6;
  --muted: #8ea0b3;
  --accent: #3d9cf0;
  --ok: #3ecf8e;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #14202c, var(--bg) 45%, #0d1218);
  color: var(--text);
  font-family: var(--sans);
}

.viewer {
  min-height: 0;
  padding: 0.85rem;
}

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.join {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #3d9cf0, #2f6fed);
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.tree {
  background: rgba(12, 17, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  min-height: 12rem;
  font-size: 0.9rem;
}

.ch { margin: 0.2rem 0; }
.ch-name { font-weight: 560; }
.ch-spacer { color: var(--muted); font-weight: 400; }
.client {
  margin-left: 0.85rem;
  color: var(--ok);
  font-size: 0.88rem;
}
.client.away, .client.muted { color: var(--muted); }

.footer {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.err { color: #ef6a6a; }
