:root {
  --bg: #f4f7fb;
  --text: #1f2937;
  --panel: #ffffff;
  --border: #d1d5db;
  --accent: #0b6bcb;
  --danger: #c62828;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #e7eef7 0%, #f8fbff 60%, #eef7f0 100%);
}

.app {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px 24px;
}

.header h1 {
  margin: 0;
}

.header p {
  margin-top: 6px;
  color: #4b5563;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

button {
  border: 1px solid #1f3d66;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button.danger {
  background: var(--danger);
  border-color: #8f1d1d;
}

.hint {
  color: #4b5563;
  font-size: 14px;
  margin-top: 8px;
}

.avatar-wrap {
  margin-bottom: 10px;
}

.avatar-ring {
  width: 96px;
  height: 96px;
  border: 5px solid #888;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
}

.avatar-img {
  width: 82px;
  height: 82px;
  border-radius: 9999px;
  object-fit: cover;
  display: none;
}

.messages {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 760px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.quota-display {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.quota-display span {
  padding: 4px 10px;
  background: #e8f5e9;
  border-radius: 6px;
  color: #2e7d32;
}

.map-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  border: 2px solid #90a4ae;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}

.map-container canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}

.map-container .leaflet-container {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.map-container .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.86);
  font-size: 11px;
}

.map-feedback {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  background: #e3f2fd;
  color: #0d47a1;
}

.map-feedback.is-success {
  background: #e8f5e9;
  color: #2e7d32;
}

.map-feedback.is-error {
  background: #ffebee;
  color: #b71c1c;
}

.map-feedback.is-info {
  background: #e3f2fd;
  color: #0d47a1;
}

.color-feedback {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  background: #f5f5f5;
  color: #37474f;
}

.color-feedback.is-success {
  background: #e8f5e9;
  color: #2e7d32;
}

.color-feedback.is-error {
  background: #ffebee;
  color: #b71c1c;
}

.color-feedback.is-info {
  background: #e3f2fd;
  color: #0d47a1;
}

.claim-marker {
  background: transparent;
  border: 0;
}

.claim-marker-dot {
  width: 14px;
  height: 14px;
  display: block;
  border: 2px solid rgba(15, 23, 42, 0.8);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.my-claims {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.claim-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: 16px;
  font-size: 12px;
}

.claim-chip-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
