:root {
  color-scheme: light;
  --ink: #1f2a2e;
  --muted: #617074;
  --paper: #f2fbf6;
  --panel: #ffffff;
  --line: #d3e5dc;
  --green: #1d8a72;
  --green-dark: #126b5b;
  --green-soft: #e4f7f0;
  --gold: #f2b94b;
  --water: #9bd8e9;
  --shadow: 0 12px 28px #126b5b18;
  --food: #f28c52;
  --sight: #2f8fd3;
  --info: #6f7fd9;
  --gift: #d978b8;
  --stay: #8f6ad8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #e8faf5 0%, var(--paper) 260px, #fffaf1 100%);
  color: var(--ink);
}

.hero,
main {
  max-width: 1120px;
  margin: auto;
  padding: 24px;
}

.hero {
  padding-top: 32px;
}

.topbar,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  color: var(--green);
  font-weight: 800;
  margin: 0 0 8px;
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 6vw, 4.8rem);
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-size: 1.45rem;
}

.hero > p {
  max-width: 720px;
  margin: 0;
  color: #344449;
  font-size: 1.12rem;
  line-height: 1.75;
}

.language-toggle,
.buttons,
.links,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button,
.links a,
.social-links a {
  min-height: 40px;
  border: 1px solid #8f988f;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button {
  padding: 8px 14px;
}

button:hover,
.links a:hover,
.social-links a:hover,
button:focus-visible,
.links a:focus-visible,
.social-links a:focus-visible {
  box-shadow: 0 0 0 4px #1d8a7226;
  transform: translateY(-1px);
  outline: none;
}

button.active,
.language-toggle button.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.language-toggle {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4fffb;
}

.language-toggle button {
  min-height: 34px;
  padding: 6px 12px;
  border-color: transparent;
}

.controls,
.category-filter,
.map-section,
.empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.controls {
  margin-bottom: 12px;
}

.controls label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 44px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #9dbdb3;
  border-radius: 8px;
  background: white;
}

input:focus {
  outline: 4px solid #1d8a7226;
  border-color: var(--green);
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.category-filter h2 {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
}

.buttons {
  margin-top: 0;
}

.map-section {
  margin-bottom: 20px;
}

.cards-section {
  margin: 22px 0 14px;
}

.map-count {
  color: var(--muted);
  font-weight: 750;
  margin: 0;
}

.map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 16px;
  margin-top: 14px;
}

.map {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid #b9d9d0;
  border-radius: 8px;
  background: #dff4ec;
}

.leaflet-container {
  font: inherit;
}

.leaflet-control-zoom a {
  color: var(--ink);
}

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

.map-pin {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 34px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: white;
  text-align: left;
  cursor: pointer;
  transform: none;
  transition: none;
}

.map-pin::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border: 3px solid white;
  border-radius: 50% 50% 50% 0;
  background: var(--green-dark);
  box-shadow: 0 6px 14px #126b5b45;
  transform: rotate(-45deg);
}

.map-pin::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 17px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff7d7;
  box-shadow: inset 0 0 0 2px #ffffff99;
  transform: translate(-50%, -50%);
}

.map-pin .pin-label {
  display: none;
  position: absolute;
  left: 32px;
  top: 1px;
  max-width: 132px;
  padding: 5px 8px;
  border: 2px solid white;
  border-radius: 999px;
  background: #1f2a2e;
  box-shadow: 0 5px 14px #126b5b33;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.68rem;
  line-height: 1.2;
}

.map.show-labels .map-pin .pin-label {
  display: block;
}

.map-pin.food::before { background: var(--food); }
.map-pin.sight::before { background: var(--sight); }
.map-pin.info::before { background: var(--info); }
.map-pin.gift::before { background: var(--gift); }
.map-pin.stay::before { background: var(--stay); }

.map-pin.active {
  z-index: 4;
}

.map-pin.active::before {
  box-shadow: 0 0 0 5px #f2b94b80, 0 9px 20px #126b5b55;
}

.leaflet-marker-icon {
  background: transparent;
  border: 0;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: 8px;
}

.map-detail {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px;
}

.map-detail h3 {
  margin: 6px 0 8px;
  font-size: 1.25rem;
}

.map-detail p {
  color: var(--muted);
  line-height: 1.6;
}

.map-detail .category {
  margin: 0;
}

#count {
  margin: 0;
  font-weight: 750;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  overflow: hidden;
  background: white;
  border: 1px solid #e8e0d3;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #ddd;
}

.card-body {
  padding: 16px;
}

.category {
  color: var(--green);
  font-weight: 850;
}

.card h2 {
  margin: 8px 0;
  font-size: 1.25rem;
  line-height: 1.35;
}

.card p {
  line-height: 1.65;
}

.links,
.social-links {
  margin-top: 12px;
}

.links a,
.social-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--green-soft);
  border-color: transparent;
  color: var(--green-dark);
}

.social {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee4d6;
}

.social-title {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.social-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .hero,
  main {
    padding: 20px;
  }

  .topbar,
  .section-heading,
  .category-filter {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-wrap {
    grid-template-columns: 1fr;
  }

  .map {
    min-height: 720px;
  }

  .map-pin {
    max-width: 112px;
  }
}
