:root {
  --empty: #f1f2f6;
  --empty-border: #d5d8e0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #ffffff;
  color: #2f3542;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid #eef0f4;
}

.page-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.page-header nav a {
  margin-left: 1rem;
  color: #57606f;
  text-decoration: none;
  font-weight: 500;
}

.page-header nav a:hover {
  color: #2f3542;
  text-decoration: underline;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  min-height: 0;
}

/* The bow is an SVG spanning most of the available screen.
   Aspect ratio of the viewBox is 1200x620, so cap by both axes. */
.rainbow {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bow {
  width: min(96vw, 172vh);
  max-height: 100%;
  height: auto;
  display: block;
}

.bow .tile {
  fill: var(--empty);
  stroke: var(--empty-border);
  stroke-width: 2;
  transition: fill 0.25s ease, stroke 0.25s ease;
}

.bow .tile.filled {
  stroke: none;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 2rem;
  border-top: 1px solid #eef0f4;
  font-size: 0.85rem;
  color: #747d8c;
}

.status::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.4rem;
  background: #b0b8c4;
  vertical-align: middle;
}

.status.connected::before { background: #2ed573; }
.status.connecting::before,
.status.reconnecting::before { background: #ffa502; }
.status.offline::before { background: #ff4757; }
