:root {
  color-scheme: dark;
  --bg: #121818;
  --panel: #1a2121;
  --edge: #34403f;
  --ink: #f0f1e8;
  --muted: #a6b4ad;
  --mint: #a6ddca;
  --gold: #e8bc7e;
  --top: 62px;
  --side: 308px;
  font:
    15px/1.45 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--edge);
  background: #273130;
  border-radius: 7px;
  padding: 0.55rem 0.85rem;
}
button:hover,
button:focus-visible {
  background: #35423f;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--mint);
}
input:not([type="checkbox"]),
textarea,
select {
  background: #101717;
  border: 1px solid var(--edge);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  max-width: 100%;
  width: 100%;
}
input[type="checkbox"] {
  accent-color: var(--mint);
  width: 16px;
  height: 16px;
  flex: none;
}
label {
  display: block;
}
textarea {
  resize: vertical;
  min-height: 75px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.14;
  letter-spacing: -0.035em;
}
h1 {
  font-size: 30px;
}
h2 {
  font-size: 23px;
}
h3 {
  font-size: 17px;
}
small,
.muted {
  color: var(--muted);
}
.eyebrow {
  font:
    650 10px/1.4 ui-monospace,
    monospace;
  letter-spacing: 0.15em;
  color: var(--mint);
  margin: 0 0 6px;
}
.primary,
.good {
  background: var(--mint);
  border-color: var(--mint);
  color: #112923;
  font-weight: 700;
}
.primary:hover,
.good:hover {
  background: #c2ebdc;
}
.ghost {
  background: transparent;
}
.icon {
  display: grid;
  place-items: center;
  padding: 0.45rem;
  background: transparent;
  border-color: transparent;
  min-width: 36px;
  min-height: 36px;
}
.glyph {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.top {
  height: var(--top);
  background: #151b1b;
  border-bottom: 1px solid var(--edge);
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.brand strong {
  font-size: 19px;
  letter-spacing: -0.055em;
}
.brand em {
  color: var(--mint);
  font-weight: 500;
  font-style: normal;
}
.top nav {
  display: flex;
  height: 100%;
  align-items: stretch;
}
.top nav button {
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
  margin: 0 7px;
  padding: 0 8px;
  border-bottom: 2px solid transparent;
}
.top nav button[aria-current="page"] {
  color: var(--mint);
  border-color: var(--mint);
}
.account {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  border-color: var(--edge);
  max-width: 220px;
}
.account span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-head,
.sheet-bar,
.row,
.split,
.side-mode,
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.split,
.side-head,
.sheet-bar {
  justify-content: space-between;
}
.actions {
  flex-wrap: wrap;
}
.side-head {
  padding: 23px 18px 17px;
}
.side-head h1 {
  font-size: 27px;
}
#mapPage {
  display: flex;
  height: calc(100dvh - var(--top));
  overflow: hidden;
}
#sidebar {
  width: var(--side);
  flex: none;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--edge);
  min-height: 0;
  z-index: 650;
}
body.closed #sidebar {
  display: none;
}
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 16px;
  color: var(--muted);
  background: #101717;
  border: 1px solid var(--edge);
  border-radius: 7px;
  padding-left: 10px;
}
.search input:not([type="checkbox"]) {
  border: 0;
  background: none;
  min-width: 0;
}
.segments {
  display: flex;
  gap: 3px;
  background: #121919;
  padding: 3px;
  margin: 13px 16px 18px;
  border-radius: 7px;
}
.segments button {
  flex: 1;
  padding: 6px 3px;
  border: 0;
  background: none;
  font-size: 13px;
  color: var(--muted);
}
.segments .active,
.segments button[aria-pressed="true"] {
  background: #384643;
  color: var(--ink);
}
.side-scroll {
  overflow: auto;
  padding: 0 16px 20px;
  scrollbar-width: thin;
}
.side-mode {
  border-bottom: 1px solid var(--edge);
  margin: 0 0 8px;
}
.side-mode button {
  border: 0;
  background: none;
  border-radius: 0;
  padding: 9px 1px;
  margin-right: 13px;
  color: var(--muted);
  font-weight: 600;
}
.side-mode .active {
  color: var(--ink);
  border-bottom: 2px solid var(--mint);
}
details {
  border-bottom: 1px solid var(--edge);
  padding: 7px 0;
}
summary {
  cursor: pointer;
  padding: 7px 0;
  font-weight: 650;
}
summary small {
  float: right;
  font-weight: 400;
}
.checkline,
.catline {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 34px;
}
.catline {
  font-size: 13px;
}
.catline small {
  margin-left: auto;
}
.checkline label {
  flex: 1;
}
.textbtn {
  background: none;
  color: var(--mint);
  border: 0;
  padding: 0.35rem 0.15rem;
  font-size: 13px;
}
.tinybuttons {
  display: flex;
  justify-content: space-between;
}
.result {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--edge);
  background: none;
  border-radius: 0;
  padding: 11px 3px;
  overflow-wrap: anywhere;
}
.result small {
  display: block;
}
#mapPane {
  position: relative;
  flex: 1;
  min-width: 0;
}
#map {
  width: 100%;
  height: 100%;
  background-color: #15272d;
  background-image:
    linear-gradient(#aecfc109 1px, transparent 1px), linear-gradient(90deg, #aecfc109 1px, transparent 1px);
  background-size: 40px 40px;
}
.map-controls,
.map-button,
.map-foot {
  position: absolute;
  z-index: 500;
  background: #172121ed;
  border: 1px solid #51625e;
  border-radius: 8px;
  color: var(--ink);
  box-shadow: 0 3px 12px #0003;
}
.map-controls {
  right: 16px;
  top: 18px;
  display: grid;
}
.map-controls button {
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 20px;
  min-height: 38px;
  min-width: 39px;
  padding: 3px;
}
.map-controls button + button {
  border-top: 1px solid var(--edge);
}
.map-button {
  left: 14px;
  top: 18px;
  display: none;
  align-items: center;
  gap: 8px;
}
body.closed .map-button {
  display: flex;
}
.map-foot {
  left: 14px;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  font-size: 12px;
  pointer-events: none;
}
.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
}
.leaflet-container {
  font: inherit;
}
.leaflet-container .leaflet-control-attribution {
  background: #142020df;
  color: #aabbaf;
  font-size: 9px;
}
.leaflet-control-attribution a {
  color: var(--mint);
}
.region {
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  font: 600 11px/1 system-ui;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e9eee2;
  text-shadow:
    0 1px 3px #0b1414,
    1px 0 2px #0b1414;
}
.pin,
.cluster {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent, #b6ddc9);
  color: #132525;
  border: 2px solid #1c302f;
  box-shadow: 0 1px 4px #06151599;
}
.pin .glyph {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}
.pin.found {
  opacity: 0.55;
  background: #94a49e;
}
.cluster {
  border: 2px solid #a9d5c1;
  background: #263f39;
  color: #eaf3e9;
  font:
    bold 12px ui-monospace,
    monospace;
  box-shadow: 0 0 0 4px #9fcebb1a;
}
.cluster.broad {
  background: #364b40;
  border-color: #d6c59e;
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #1b2524;
  color: var(--ink);
}
.leaflet-popup-content {
  margin: 15px 18px;
  min-width: 190px;
  max-width: 250px;
}
.leaflet-popup-content p {
  margin: 6px 0;
}
.leaflet-popup-content button {
  min-height: 35px;
  font-size: 13px;
}
.leaflet-container a.leaflet-popup-close-button {
  color: var(--muted);
}
.leaflet-container .leaflet-control-scale-line {
  background: #182322;
  color: var(--ink);
}
dialog {
  position: fixed;
  inset: 0 0 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  width: min(470px, 100%);
  max-width: 100%;
  margin: 0;
  background: var(--panel);
  border: 0;
  border-left: 1px solid var(--edge);
  color: var(--ink);
  padding: 0;
  box-shadow: -16px 0 60px #0004;
}
dialog::backdrop {
  background: #070e0e66;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
.sheet-bar {
  padding: 13px 20px;
  border-bottom: 1px solid var(--edge);
  flex: none;
}
.sheet-bar .eyebrow {
  margin: 0;
}
#sheetBody {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px;
  min-height: 0;
  overflow-wrap: anywhere;
}
#sheetBody > * + *,
.stack > * + * {
  margin-top: 14px;
}
.block {
  padding-top: 15px;
  border-top: 1px solid var(--edge);
}
.block h3 {
  margin: 0 0 7px;
}
.block p,
.note {
  white-space: pre-line;
}
.warning,
.notice {
  padding: 11px 13px;
  border-left: 3px solid var(--gold);
  background: #302d24;
  border-radius: 4px;
}
.notice {
  border-color: var(--mint);
  background: #263531;
}
.tag {
  display: inline-block;
  color: var(--mint);
  font-size: 12px;
  font-weight: 600;
}
.fields {
  display: grid;
  gap: 12px;
}
.fields label {
  font-size: 13px;
  color: var(--muted);
}
.fields :is(input, textarea, select) {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}
pre {
  white-space: pre-wrap;
  font:
    12px/1.5 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(ellipse at 40% 25%, #223433, transparent 63%), #131a1b;
}
.loginbox {
  width: min(370px, 100%);
  padding: 30px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  box-shadow: 0 20px 60px #0003;
}
.loginbox img {
  margin-bottom: 20px;
}
.loginbox label,
.loginbox .primary {
  display: block;
  margin-top: 18px;
}
.loginbox input,
.loginbox .muted {
  margin-top: 7px;
}
.loginbox .primary {
  width: 100%;
}
#loginError {
  margin-top: 10px;
  color: #e5a99a;
}
#collection {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px);
  padding-bottom: 90px;
}
#collection > * + * {
  margin-top: 18px;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filters > * {
  flex: 1 1 130px;
}
.collection-list {
  border-top: 1px solid var(--edge);
}
.collection-list .result {
  display: flex;
  align-items: center;
  gap: 12px;
}
.collection-list .result .end {
  margin-left: auto;
  font-size: 13px;
  white-space: nowrap;
  color: var(--mint);
}
.meter {
  height: 5px;
  background: #35433c;
  overflow: hidden;
  border-radius: 3px;
}
.meter i {
  height: 100%;
  display: block;
  background: var(--mint);
}
#toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: #283b33;
  border: 1px solid var(--mint);
  border-radius: 8px;
  padding: 10px 18px;
  pointer-events: none;
  max-width: 95vw;
}
#toast:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
.compare {
  font-size: 13px;
  padding: 8px;
  border-left: 2px solid var(--edge);
}
code {
  word-break: break-all;
}
button {
  touch-action: manipulation;
}
@media (max-width: 760px) {
  :root {
    --top: 56px;
  }
  .top {
    padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
    gap: 8px;
  }
  .brand strong {
    display: none;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .top nav {
    gap: 1px;
  }
  .top nav button {
    font-size: 13px;
    margin: 0;
    padding: 0 7px;
  }
  .account {
    padding: 8px;
    min-height: 38px;
  }
  .account span {
    display: none;
  }
  #sidebar {
    position: absolute;
    top: var(--top);
    bottom: 0;
    left: 0;
    width: min(91vw, 350px);
    z-index: 700;
    box-shadow: 8px 0 30px #0005;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .map-foot {
    bottom: calc(25px + env(safe-area-inset-bottom));
    font-size: 11px;
  }
  .map-controls button,
  .icon,
  .catline,
  .checkline {
    min-height: 44px;
  }
  .map-controls button {
    min-width: 44px;
  }
  .map-controls {
    right: max(10px, env(safe-area-inset-right));
    top: 12px;
  }
  .map-button {
    top: 12px;
    min-height: 44px;
  }
  dialog {
    inset: auto 0 0;
    width: 100%;
    height: auto;
    max-height: 88dvh;
    min-height: 33dvh;
    border-left: 0;
    border-top: 1px solid var(--edge);
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #sheetBody {
    padding: 16px 18px 24px;
  }
  .sheet-bar {
    padding: 6px 12px 6px 18px;
  }
  .leaflet-popup-content button {
    min-height: 40px;
  }
  .collection-list .result .end {
    font-size: 11px;
  }
  .search input,
  input:not([type="checkbox"]),
  textarea,
  select {
    font-size: 16px;
  }
  .map-controls,
  .account,
  .sheet-bar button {
    touch-action: manipulation;
  }
  .actions button {
    min-height: 42px;
  }
}
