* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f0f2f5;
  font-family: "Segoe UI", sans-serif;
}

header {
  background: #1a1a2e;
  color: white;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
}

#controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

#controls button {
  padding: 7px 16px;
  background: #1a1a2e;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

#controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

#page-info {
  font-size: 13px;
  color: #555;
}

#app-body {
  display: flex;
  align-items: flex-start;
}

#canvas-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  padding: 24px;
}

#field-list-panel {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  background: white;
  border-left: 1px solid #e5e7eb;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
  padding: 14px;
}

#field-search {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 8px;
}

#field-list-hint {
  font-size: 11px;
  color: #888;
  margin-bottom: 10px;
  line-height: 1.4;
}

#field-list {
  list-style: none;
}

.field-group-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
  padding: 10px 4px 4px;
}

.field-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.field-item:hover {
  background: #f3f4f6;
}

.field-item.selected {
  background: #dbeafe;
  outline: 1px solid #2563eb;
}

.field-key {
  font-family: monospace;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-coords {
  font-family: monospace;
  font-size: 11px;
  color: #6b7280;
  flex-shrink: 0;
}

#canvas-container {
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

canvas {
  display: block;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

#locator-canvas {
  position: absolute;
  top: 0;
  left: 0;
  cursor: crosshair;
}

#locator-canvas.inactive {
  pointer-events: none;
  cursor: default;
}

#locator-canvas:not(.inactive) {
  pointer-events: auto;
}

#coord-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a2e;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-family: monospace;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: none;
  z-index: 999;
}

#coord-badge span {
  color: #7dd3fc;
  font-weight: bold;
}
