:root {
  --ink: #17211f;
  --muted: #5d6b67;
  --brand: #1f6f68;
  --brand-dark: #15514d;
  --mint: #dff6ef;
  --yellow: #fff3bf;
  --rose: #ffe3e3;
  --line: #d9e2de;
  --paper: #ffffff;
  --bg: #f7faf8;
  --shadow: 0 10px 28px rgba(24, 52, 48, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

.topbar {
  background: linear-gradient(135deg, #e2f4ee 0%, #fff8d8 52%, #ffe6e0 100%);
  border-bottom: 1px solid var(--line);
  padding: 28px 18px 20px;
}

.topbar > div,
.app-shell {
  width: min(980px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.18;
}

.hero-copy {
  margin: 14px 0 6px;
  font-size: 1rem;
}

.privacy,
.data-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.data-note {
  margin-top: 6px;
  color: #6b4b00;
  font-weight: 700;
}

.app-shell {
  padding: 14px;
}

.controls,
.park-card,
.empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.controls {
  padding: 14px;
}

.primary-actions,
.filter-row,
.sort-row,
.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.locate-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.button,
.chip,
.seg {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: #fff;
  padding: 10px 14px;
  font-weight: 700;
}

.button.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.button.secondary {
  background: var(--mint);
  color: var(--brand-dark);
}

.button.compact {
  min-height: 40px;
}

.chip.active,
.seg.active {
  background: var(--brand-dark);
  color: #fff;
  border-color: var(--brand-dark);
}

.filter-row,
.sort-row {
  margin-top: 12px;
}

.manual-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-top: 12px;
  align-items: end;
}

.manual-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.manual-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
}

.hidden {
  display: none !important;
}

.status-line {
  margin: 14px 0;
  color: var(--brand-dark);
  font-weight: 700;
}

.map-wrap {
  margin-bottom: 14px;
}

.map {
  width: 100%;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #e9f1ed;
}

.park-marker-shell,
.user-marker-shell {
  background: transparent;
  border: 0;
}

.park-marker {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: #fffdf2;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 18px rgba(23, 33, 31, 0.28);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.park-marker:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 22px rgba(23, 33, 31, 0.34);
}

.park-marker-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.marker-badge {
  position: absolute;
  right: -7px;
  top: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d8f5df;
  border: 1px solid #ffffff;
  font-size: 0.78rem;
  box-shadow: 0 3px 8px rgba(23, 33, 31, 0.2);
}

.marker-badge.splash {
  left: -7px;
  right: auto;
  background: #dbeafe;
}

.user-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2f80ed;
  color: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.18), 0 8px 22px rgba(23, 33, 31, 0.28);
  font-weight: 800;
}

.map-popup {
  min-width: 180px;
}

.map-popup p {
  margin: 6px 0;
}

.popup-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
}

.popup-nav-hint {
  display: block;
  margin-top: 5px;
  color: #8a5a00;
  font-size: 0.78rem;
  font-weight: 700;
}

.map-fallback {
  margin: 8px 0 0;
  color: var(--muted);
}

.park-list {
  display: grid;
  gap: 12px;
}

.park-card,
.empty {
  padding: 14px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.rank,
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

h2 {
  margin: 2px 0 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.washroom {
  min-width: 54px;
  min-height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  font-size: 1.25rem;
}

.washroom.yes {
  background: #d8f5df;
  color: #155d2b;
  border: 1px solid #91d5a5;
}

.washroom.unknown {
  background: #eef2f0;
  color: #50615c;
  border: 1px solid #d5dfdc;
}

.washroom.no {
  background: #f3f0eb;
  color: #76685d;
  border: 1px solid #ded4c8;
}

.washroom.closed {
  background: #ffe0d6;
  color: #9a3412;
  border: 1px solid #f7ad91;
}

.address,
.features,
.highlight,
.caution {
  margin: 10px 0 0;
}

.address {
  color: var(--ink);
}

.features {
  font-size: 1.22rem;
  letter-spacing: 0;
}

.highlight {
  font-weight: 800;
}

.caution {
  background: var(--rose);
  border-radius: 8px;
  padding: 8px 10px;
  color: #8f2525;
  font-size: 0.9rem;
}

.trust-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.trust-tag {
  border-radius: 999px;
  background: var(--rose);
  color: #8f2525;
  padding: 6px 10px;
  font-size: 0.86rem;
  font-weight: 700;
}

.card-actions {
  margin-top: 12px;
}

.card-actions .button {
  flex: 1 1 138px;
}

.nav-action {
  flex: 1 1 138px;
  display: grid;
  gap: 4px;
}

.nav-action .button {
  width: 100%;
}

.nav-review {
  color: #8a5a00;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.nav {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.rate {
  background: #fff3bf;
  color: #573f00;
  border-color: #f1d36a;
}

.button.disabled {
  cursor: default;
  opacity: 0.72;
}

@media (max-width: 620px) {
  .topbar {
    padding-top: 22px;
  }

  h1 {
    font-size: 1.42rem;
  }

  .primary-actions,
  .filter-row,
  .sort-row,
  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .manual-form {
    grid-template-columns: 1fr;
  }

  .map {
    height: 220px;
  }
}
