* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font: 13px sans-serif;
  display: flex;
  flex-direction: column;
}

#container {
  flex: 1;
  min-height: 0;
}

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

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: #fff;
  flex-shrink: 0;
  min-height: 44px;
  flex-wrap: wrap;
}

.toggles {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

label.toggle {
  padding: 4px 10px;
  min-height: 32px;
  font-size: 12px;
  background: #f0f0f0;
  gap: 6px;
}

label.toggle input {
  display: inline-block;
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: #3b82f6;
}

label.toggle:has(input:checked) {
  background: #d6ecff;
  border-color: #3b82f6;
}

label {
  background: #f0f0f0;
  border: 1px solid #999;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  min-height: 44px;
  font-size: 15px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

label input {
  display: none;
}

.info {
  font-size: 12px;
  color: #555;
  text-align: right;
}

.info a {
  color: #555;
}
