*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #eef5ee;
  color: #1c2b22;
  overflow-x: hidden;
}

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

.hero {
  background: linear-gradient(135deg, #e3f0e2, #cfe6cd);
  border-radius: 20px;
  margin-top: 16px;
}

.hero h1 {
  color: #1f4d3a;
  margin: 6px 0;
}

.hero > p:last-child {
  color: #355c46;
}

.eyebrow {
  display: inline-block;
  color: #2f6f4e;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 4px 14px rgba(31, 77, 58, 0.12);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 10px 22px rgba(31, 77, 58, 0.18);
  transform: translateY(-2px);
}

.category {
  display: inline-block;
  background: #e3efe1;
  color: #1f4d3a;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 0 0 6px;
}

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

.card a {
  color: #1f4d3a;
  font-weight: bold;
}

.map-section,
.controls {
  background: #f4f9f3;
  border: 1px solid #dce9d8;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.controls label {
  display: grid;
  gap: 8px;
  font-weight: bold;
  color: #1f4d3a;
}

input {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bcd6bb;
  border-radius: 10px;
  background: white;
}

input:focus {
  outline: 2px solid #6fae84;
  outline-offset: 1px;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.location {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

#locate {
  background: #1f4d3a;
  color: white;
  border-color: #1f4d3a;
}

#locate-status {
  color: #3c6b53;
  font-size: 0.9em;
}

button {
  font: inherit;
  padding: 8px 14px;
  border: 1px solid #cfe3cd;
  border-radius: 999px;
  background: #f3f8f1;
  color: #1f4d3a;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

button:hover {
  background: #e3efe1;
}

button.active {
  background: #1f4d3a;
  color: white;
  border-color: #1f4d3a;
}

.card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #ddd;
  border-radius: 16px 16px 0 0;
  display: block;
}

.card-body {
  padding: 12px 16px 16px;
}

.card-body h2 {
  margin: 2px 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #1c2b22;
}

.description {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #344b3c;
}

.empty {
  background: white;
  border: 1px solid #dce9d8;
  border-radius: 16px;
  padding: 20px;
  grid-column: 1 / -1;
}

.distance {
  display: inline-block;
  color: #a85a1f;
  background: #fbeee0;
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: bold;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.address,
.tel,
.detail-row {
  color: #50644f;
  font-size: 0.88em;
  margin: 4px 0;
}

.details-toggle {
  margin: 10px 0 0;
  color: #2f6f4e;
  font-weight: 700;
  font-size: 0.82rem;
}

.details-toggle::after {
  content: "詳細を見る（住所・電話・地図） ▼";
}

.card.expanded .details-toggle::after {
  content: "閉じる ▲";
}

.card-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.card.expanded .card-details {
  max-height: 800px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed #d9e8d3;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.links a,
.links button {
  display: inline-block;
  color: #1f4d3a;
  background: #e3efe1;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: bold;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.links a:hover,
.links button:hover {
  background: #d3e7cf;
}

.map-embed {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
}

.map-embed iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}

#overview-map {
  height: 360px;
  border-radius: 12px;
  margin-top: 8px;
}

.map-hint {
  color: #50644f;
  font-size: 0.85em;
  margin: 10px 0 0;
}

.jump-to-spot {
  font: inherit;
  margin-top: 6px;
  padding: 6px 10px;
  border: 1px solid #1f4d3a;
  border-radius: 999px;
  background: white;
  color: #1f4d3a;
  cursor: pointer;
}

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

  .hero {
    margin-top: 8px;
    border-radius: 14px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .map-section,
  .controls {
    padding: 12px;
  }

  #overview-map {
    height: 260px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .location {
    flex-direction: column;
    align-items: stretch;
  }

  #locate {
    width: 100%;
    padding: 12px 14px;
  }

  button {
    padding: 10px 14px;
  }

  .links {
    flex-direction: column;
    align-items: stretch;
  }

  .links a,
  .links button {
    text-align: center;
  }
}
