:root {
  --ink: #1a2420;
  --muted: #5c675f;
  --paper: #f3efe7;
  --panel: #fffdf8;
  --line: #ddd4c6;
  --green: #0f6b4c;
  --green-dark: #14241c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.4 "Avenir Next", "Segoe UI", sans-serif;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 18px 22px 14px;
  background: var(--green-dark);
  color: #f6f1e8;
}

h1 {
  margin: 0;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.top p { margin: 4px 0 0; color: #d5ddd6; }

.updated { margin: 0; font-size: 0.85rem; color: #b7c4bb; white-space: nowrap; }

.controls { padding: 12px 22px 0; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  font: inherit;
}

.chip img { width: 22px; height: 22px; object-fit: contain; }

.chip.is-on {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.filters {
  display: flex;
  gap: 8px;
  margin: 10px 0 12px;
}

.filters input, .filters select {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.filters input { flex: 1; min-width: 0; }

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 12px;
  padding: 0 22px 12px;
  min-height: 0;
}

.map-wrap, .list-wrap {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-height: 420px;
}

#map { height: 100%; min-height: 420px; }

.map-note {
  position: absolute;
  z-index: 500;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  background: var(--green-dark);
  color: white;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.list-wrap {
  display: flex;
  flex-direction: column;
}

.list-count {
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

#list { overflow: auto; }

.row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
}

.row:hover { background: #f7f3eb; }

.row img { width: 36px; height: 36px; object-fit: contain; }

.row strong { display: block; }

.row span { color: var(--muted); font-size: 0.9rem; }

.type {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #efe4cf;
  color: #6a4b16;
  font-size: 0.75rem;
}

footer {
  padding: 8px 22px 16px;
  color: var(--muted);
  font-size: 0.8rem;
}

footer a { color: var(--green); }

@media (max-width: 800px) {
  .stage { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: start; }
  .updated { white-space: normal; }
}
