:root {
  --ink: #17221d;
  --muted: #647269;
  --paper: #f4f1e9;
  --card: #fffdf8;
  --line: #d9ddd5;
  --green: #215c42;
  --lime: #c9ff62;
  --red: #ef5b4c;
  --shadow: 0 18px 50px rgba(32, 59, 44, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 max(5vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 233, .88);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: var(--lime);
}
.status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}
.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43bc75;
  box-shadow: 0 0 0 4px rgba(67, 188, 117, .12);
}
.status.db-read-error i {
  background: #df4f5f;
  box-shadow: 0 0 0 4px rgba(223, 79, 95, .14);
}
.status-divider { opacity: .45; }
.status a { color: inherit; font: 11px "Cascadia Code", Consolas, monospace; text-decoration: none; }
.status a[href]:hover { color: var(--blue); text-decoration: underline; }

main { width: min(1180px, 90vw); margin: auto; }
.hero {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  align-items: center;
  min-height: 430px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}
.hero h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: clamp(54px, 7vw, 94px);
  line-height: .92;
  letter-spacing: -.055em;
}
.hero h1 em { color: var(--green); font-weight: 400; }
.lede {
  max-width: 540px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}
.orb {
  position: relative;
  justify-self: end;
  width: min(28vw, 290px);
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  box-shadow: var(--shadow);
}
.orb::before {
  content: "";
  position: absolute;
  left: 15%;
  top: 15%;
  width: 70%;
  height: 70%;
  border: 1px solid rgba(201, 255, 98, .5);
  border-radius: 50%;
}
.orb::after {
  content: "LIVE";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--lime);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .35em;
}
.orb span {
  position: absolute;
  left: 20%;
  top: 20%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 145px 135px 0 var(--lime);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 34px 0 96px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.metrics article { padding: 26px 28px; border-right: 1px solid var(--line); }
.metrics article:last-child { border: 0; }
.metrics small,
.metrics span { display: block; color: var(--muted); font-size: 12px; }
.metrics strong {
  display: block;
  margin: 8px 0 5px;
  font-family: Georgia, serif;
  font-size: 42px;
  letter-spacing: -.04em;
}

.section { margin: 0 0 96px; }
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: 34px;
  letter-spacing: -.03em;
}
.empty {
  grid-column: 1 / -1;
  padding: 60px;
  border: 1px dashed #bdc6bf;
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
}

.filters { display: flex; gap: 8px; }
.filters input,
.filters select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
  font: 13px inherit;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}
table { width: 100%; min-width: 800px; border-collapse: collapse; }
th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-align: left;
}
th {
  background: #f9f7f1;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
tbody tr:last-child td { border: 0; }
tbody tr:hover { background: #fafbf7; }
.channel { font-weight: 700; }
.group { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.title-cell { max-width: 420px; }
.title-cell a { color: inherit; text-decoration: none; }
.badge { padding: 5px 8px; border-radius: 12px; background: #eee; font-size: 10px; }
.badge.youtube { background: #fff0ed; color: #b83227; }
.badge.twitch { background: #f2edff; color: #6441a5; }
.number { text-align: right; font-variant-numeric: tabular-nums; }

footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, 90vw);
  margin: auto;
  padding: 30px 0 45px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; min-height: 500px; }
  .orb { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics article:nth-child(2) { border-right: 0; }
  .metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-title { align-items: start; flex-direction: column; gap: 20px; }
  .filters { width: 100%; }
  .filters input { flex: 1; }
}

@media (max-width: 480px) {
  .topbar { padding: 0 18px; }
  .status { display: grid; grid-template-columns: 1fr; gap: 1px; justify-items: end; }
  .status i, .status .status-divider, .status #build-version { display: none; }
  .status .status-time { display: block; font-size: 9px; white-space: nowrap; }
  main { width: 92vw; }
  .hero h1 { font-size: 48px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article {
    border-right: 0;
    border-bottom: 1px solid var(--line) !important;
  }
  .metrics article:last-child { border: 0 !important; }
  .filters { flex-direction: column; }
  footer { flex-direction: column; gap: 8px; }
}
