:root {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

body {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  color: #333;
}

.support-warning {
  display: none;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

@supports not (scroll-axis-lock: none) {
  .support-warning {
    display: block;
  }
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
}

.toggles {
  display: flex;
  gap: 1.5rem;
}

.toggles label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;

	&:has(input[disabled]) {
		cursor: not-allowed;
	}
}

.status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #ccc;
}

.status-indicator {
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.status-indicator.idle {
  background: #e9ecef;
  color: #495057;
  border: 1px solid #e9ecef;
}
.status-indicator.locked {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.status-indicator.free {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.status-indicator.normal {
  background: #cce5ff;
  color: #004085;
  border: 1px solid #b8daff;
}

.debug-stats {
  font-family: monospace;
  font-size: 0.9rem;
  color: #666;
}

.legend {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.swatch-input {
  width: 20px;
  height: 3px;
  border-top: 3px dashed #dc3545;
}
.swatch-scroll {
  width: 20px;
  height: 4px;
  background: #0d6efd;
}

.scroller {
  width: 100%;
  height: 500px;
  overflow: auto;
  border: 3px solid #222;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  scroll-axis-lock: auto;
  touch-action: pan-x pan-y;
}

.map-content {
  position: relative;
  width: 3000px;
  height: 3000px;
  background-color: #e5e5f7;
  background-image:
    linear-gradient(#444cf7 2px, transparent 2px),
    linear-gradient(90deg, #444cf7 2px, transparent 2px),
    linear-gradient(#444cf733 1px, transparent 1px),
    linear-gradient(90deg, #444cf733 1px, transparent 1px);
  background-size:
    100px 100px,
    100px 100px,
    20px 20px,
    20px 20px;
  background-position:
    -2px -2px,
    -2px -2px,
    -1px -1px,
    -1px -1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-center {
  background: #fff;
  padding: 1rem 2rem;
  border: 2px solid #444cf7;
  border-radius: 100px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #444cf7;
  box-shadow: 0 4px 12px rgba(68, 76, 247, 0.2);
  z-index: 5;
}

#traceSvg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

footer {
	text-align: center;
	margin-top: 1rem;
	font-size: 0.8em;
	font-style: italic;
}