:root {
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  color: #192e27;
  background: #f2f6f4;
  line-height: 1.65;
}

body {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
}

h1 + p {
  margin: 6px 0 22px;
  color: #4b6259;
}

h2 {
  margin: 28px 0 12px;
  font-size: 1.25rem;
}

#map {
  height: clamp(280px, 48vh, 460px);
  overflow: hidden;
  border: 1px solid #ceded6;
  border-radius: 18px;
  background: #e2ece7;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: #075d45;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid #1b7f64;
  outline-offset: 3px;
}

#sort-nearby {
  min-height: 48px;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  background: #075d45;
  color: white;
  font-weight: 700;
}

#sort-nearby:hover:not(:disabled) {
  background: #064a38;
}

#sort-nearby:disabled {
  opacity: 0.55;
  cursor: default;
}

#location-status {
  color: #4b6259;
}

#location-status:empty {
  display: none;
}

.map-search-panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #d5e2dc;
  border-radius: 16px;
  background: #fff;
}

.map-search-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
}

.map-search-controls label {
  flex: 1 1 220px;
  font-weight: 700;
}

#location-search {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid #9ab4a8;
  border-radius: 10px;
  background: #f8fcf9;
  font-weight: 400;
}

.map-search-panel h2 {
  margin: 14px 0 4px;
  font-size: 1.15rem;
}

.map-search-panel > p {
  margin: 4px 0;
}

#location-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
  max-height: min(240px, 30vh);
  overflow-y: auto;
  margin: 10px 0 0;
  padding: 2px;
  list-style: none;
}

#location-list:empty {
  display: none;
}

#location-list li {
  padding: 16px;
  border: 1px solid #d5e2dc;
  border-radius: 14px;
  background: white;
}

#location-list button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: #e7f2ec;
  color: #193c30;
  text-align: left;
  font-weight: 700;
}

#location-list button:hover {
  background: #d5ebe0;
}

#location-list a,
.location-distance {
  display: inline-block;
  margin: 8px 8px 0 0;
  font-size: 0.9rem;
}

#location-list p {
  margin: 8px 0 0;
  color: #4b6259;
  font-size: 0.9rem;
}
.map-popup {
  width: min(260px, 62vw);
  color: #192e27;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.map-popup h3 {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.35;
}

.map-popup dl {
  margin: 0;
}

.map-popup dt {
  margin-top: 8px;
  color: #4b6259;
  font-size: 12px;
  font-weight: 700;
}

.map-popup dd {
  margin: 2px 0 0;
}

.map-popup .map-popup-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 12px;
  border-radius: 8px;
  background: #e7f2ec;
  color: #075d45;
  font-weight: 700;
}

.report-card {
  margin-top: 44px;
  overflow: hidden;
  border: 1px solid #e0d3f9;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(53, 31, 105, 0.08);
  color: #2d2044;
}

.report-card__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(16px, 4vw, 28px);
  border-bottom: 1px solid #e0d3f9;
  background: #efe5ff;
}

.report-card__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #ffdf79;
  color: #3f256b;
  font-size: 26px;
  line-height: 1;
}

.report-card__header h2 {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  line-height: 1.35;
}

.report-card__header p {
  margin: 5px 0 0;
  color: #524368;
  font-size: 0.9rem;
}

.report-card__form {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
  padding: clamp(16px, 4vw, 28px);
}

.report-card__field {
  display: grid;
  align-content: start;
  gap: 6px;
  font-weight: 700;
}

.report-card__field :is(input, select, textarea) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aa98c5;
  border-radius: 12px;
  background: #fbf8ff;
  color: inherit;
  font-size: 1rem;
  font-weight: 400;
}

.report-card__details {
  grid-column: 1 / -1;
}

.report-card__details textarea {
  resize: vertical;
}

.report-card__hint {
  justify-self: end;
  color: #59496f;
  font-size: 0.85rem;
  font-weight: 400;
}

.report-card__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  justify-self: start;
  min-height: 48px;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  background: #6234b1;
  color: #fff;
  font-weight: 700;
}

.report-card__submit:hover {
  background: #50278f;
}

.report-card :focus-visible {
  outline-color: #6234b1;
}

@media (max-width: 560px) {
  .report-card__form {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-card__submit {
    justify-self: stretch;
  }
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.app-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid #c6dcd1;
  border-radius: 99px;
  background: #fff;
  color: #125541;
  font-weight: 700;
  text-decoration: none;
}

.app-nav a:hover {
  background: #e3f1e9;
}

.app-nav a[aria-current="page"] {
  border-color: #075d45;
  background: #075d45;
  color: #fff;
}

.nearby-map-pin {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  height: 40px;
  margin-bottom: 6px;
  border: 2px solid #254c40;
  border-radius: 15px;
  background: #fff2ca;
  box-shadow: 0 3px 8px #193c3047;
  font-size: 23px;
  line-height: 1;
}

.nearby-map-pin::after {
  position: absolute;
  bottom: -5px;
  left: calc(50% - 5px);
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  border-right: 2px solid #254c40;
  border-bottom: 2px solid #254c40;
  background: #fff2ca;
  content: "";
}
