/* Tailwind preflight sets img { max-width: 100% }, which clips Leaflet tiles. */
.leaflet-container img {
  max-width: none !important;
  max-height: none !important;
}

:root {
  color-scheme: dark;
  --ink: #141311;
  --panel: #1c1b19;
  --raised: #242320;
  --line: #34322e;
  --paper: #eceae4;
  --muted: #9a958c;
  --brass: #c4a574;
  --clay: #e7a598;
}

html,
body {
  background: var(--ink);
  color: var(--paper);
}

body {
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.font-title {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 700;
}

::selection {
  background: var(--brass);
  color: var(--ink);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

input,
textarea,
select {
  color: var(--paper);
  background-color: var(--ink);
  border-color: var(--line);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: none;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--brass);
}

.leaflet-container {
  background: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

/* Darken only the basemap. Index and composite tiles stay in the default pane. */
.leaflet-basemap-pane {
  filter: invert(1) hue-rotate(180deg) saturate(0.2) brightness(0.88) contrast(0.95);
}

.leaflet-bar {
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
}

.leaflet-bar a,
.leaflet-bar a:hover,
.leaflet-bar a:focus {
  background-color: var(--panel);
  color: var(--paper);
  border-bottom-color: var(--line);
  width: 28px;
  height: 28px;
  line-height: 28px;
}

.leaflet-bar a:hover,
.leaflet-bar a:focus {
  background-color: var(--raised);
  color: var(--brass);
}

.leaflet-control-attribution {
  background: rgba(20, 19, 17, 0.88) !important;
  color: var(--muted) !important;
}

.leaflet-control-attribution a {
  color: var(--brass) !important;
}

.leaflet-popup-content-wrapper {
  background: var(--panel);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
}

.leaflet-popup-tip {
  background: var(--panel);
  box-shadow: none;
}

.leaflet-popup-content {
  margin: 10px 14px;
  line-height: 1.4;
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--muted);
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: var(--paper);
}
