:root {
  color-scheme: dark;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --surface: #101318;
  --surface-soft: #151922;
  --line: #29303a;
  --line-strong: #76808d;
  --text: #d9dee7;
  --muted: #7d8794;
  --accent: #f0c15d;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #0b0d10;
  color: var(--text);
  user-select: none;
  touch-action: none;
}

main {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

canvas {
  display: block;
  width: 100vw !important;
  height: 100vh !important;
}

.toolbar {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 10;
  display: flex;
  width: 188px;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(16, 19, 24, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  cursor: move;
  touch-action: none;
}

.brand-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  color: var(--muted);
  font-size: 11px;
}

.toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.section-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  border-color: var(--line-strong);
}

button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.wide {
  width: 100%;
}

.button-grid .wide {
  grid-column: 1 / -1;
}

label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.stat {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

@media (max-width: 620px) {
  .toolbar {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: 45vh;
    overflow: auto;
  }
}
