:root {
  color-scheme: light;
  --bg: #e8ecef;
  --ink: #1c2328;
  --muted: #5c6770;
  --panel: #f4f6f8;
  --line: #cfd6de;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
}

.bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.bar h1 {
  margin: 0;
  font-size: 1.05rem;
  white-space: nowrap;
}

.bar > div:first-child {
  flex: 1 1 14rem;
  min-width: 12rem;
}

.bar p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

.ref img {
  height: 52px;
  width: auto;
  border-radius: 6px;
  display: block;
  border: 1px solid var(--line);
}

main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(100% - 78px);
}

.pane {
  position: relative;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.pane:last-child {
  border-right: none;
}

.pane h2 {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  left: 0.9rem;
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

main.solo {
  display: block;
  height: calc(100% - 78px);
}

main.solo .pane {
  height: 100%;
  border-right: none;
}

.bar a.nav {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.bar a.nav:hover {
  color: var(--ink);
}

@media (max-width: 800px) {
  main {
    grid-template-columns: 1fr;
    height: auto;
  }
  .pane {
    height: 55vh;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}
