.hm-search,
.hm-results {
  --hm-main: #9e493f;
  --hm-main-dark: #7f362f;
  --hm-green: #526554;
  --hm-gold: #c6a15b;
  --hm-bg: #fbf8f2;
  --hm-line: #e5ded2;
  --hm-text: #292622;
  color: var(--hm-text);
}

.hm-search {
  margin: 2.5rem auto;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid var(--hm-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 35px rgba(61, 48, 40, 0.08);
}

.hm-search__heading {
  margin-bottom: 2rem;
  text-align: center;
}

.hm-search__heading h2,
.hm-results__header h2 {
  margin: 0.25rem 0 0.6rem;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.35;
}

.hm-search__heading p:last-child,
.hm-results__header p,
.hm-search__note {
  color: #665f58;
}

.hm-search__eyebrow {
  margin: 0;
  color: var(--hm-main);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hm-search__group {
  margin: 0;
  padding: 1.5rem 0;
  border: 0;
  border-top: 1px solid var(--hm-line);
}

.hm-search__group legend {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0;
  font-weight: 700;
}

.hm-search__group legend span {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 50%;
  background: var(--hm-main);
  color: #fff;
  font-size: 0.85rem;
}

.hm-search__choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.hm-search__choices--purpose {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.hm-search__choices--wedding {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.hm-choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.hm-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hm-choice span {
  display: grid;
  min-height: 3.25rem;
  padding: 0.75rem 0.8rem;
  place-items: center;
  border: 1px solid var(--hm-line);
  border-radius: 10px;
  background: var(--hm-bg);
  color: var(--hm-text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  transition: 0.2s ease;
}

.hm-choice input:checked + span {
  border-color: var(--hm-main);
  background: #f4e8e5;
  color: var(--hm-main-dark);
  box-shadow: inset 0 0 0 1px var(--hm-main);
}

.hm-choice input:focus-visible + span {
  outline: 3px solid rgba(158, 73, 63, 0.25);
  outline-offset: 2px;
}

.hm-choice span:hover {
  border-color: var(--hm-main);
}

.hm-search__location {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.5fr);
  gap: 1rem;
}

.hm-search__location label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.hm-search__location select,
.hm-search__location input {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #cfc7bb;
  border-radius: 9px;
  background: #fff;
  font: inherit;
}

.hm-search__note {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
}

.hm-search__details {
  margin-top: 1rem;
}

.hm-search__details summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  cursor: pointer;
  color: var(--hm-green);
  font-weight: 700;
}

.hm-search__details[open] summary {
  margin-bottom: 0.8rem;
}

.hm-search__actions {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  padding-top: 1rem;
}

.hm-search__actions button {
  width: min(100%, 440px);
  min-height: 3.5rem;
  padding: 0.9rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--hm-main);
  box-shadow: 0 6px 16px rgba(158, 73, 63, 0.22);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.hm-search__actions button:hover {
  background: var(--hm-main-dark);
}

.hm-search__actions a,
.hm-results__empty a {
  color: var(--hm-green);
  font-size: 0.9rem;
  font-weight: 700;
}

.hm-search__count:not(:empty)::before {
  content: "（";
}

.hm-search__count:not(:empty)::after {
  content: "）";
}

.hm-results {
  margin: 3rem 0;
}

.hm-results__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hm-results__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.hm-card {
  overflow: hidden;
  border: 1px solid var(--hm-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(61, 48, 40, 0.07);
}

.hm-card__image {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  background: #eee8df;
  color: #746d65;
  font-size: 0.85rem;
}

.hm-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-card__body {
  padding: 1rem;
}

.hm-card__body h3 {
  margin: 0.2rem 0 0.6rem;
  font-size: 1.15rem;
}

.hm-card__body h3 a,
.hm-card__link {
  color: var(--hm-text);
}

.hm-card__area,
.hm-card__verified {
  margin: 0;
  color: #756e66;
  font-size: 0.76rem;
}

.hm-card__address {
  margin: 0.7rem 0;
  font-size: 0.88rem;
}

.hm-card__purposes,
.hm-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hm-card__purposes span,
.hm-card__badges span {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #f4e8e5;
  color: var(--hm-main-dark);
  font-size: 0.72rem;
}

.hm-card__badges span {
  background: #edf1eb;
  color: var(--hm-green);
}

.hm-card__facts {
  margin: 0.8rem 0;
  border-top: 1px solid var(--hm-line);
}

.hm-card__facts div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--hm-line);
  font-size: 0.82rem;
}

.hm-card__facts dt {
  font-weight: 700;
}

.hm-card__facts dd {
  margin: 0;
}

.hm-card__link {
  display: block;
  margin-top: 0.8rem;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
}

.hm-results__empty {
  padding: 2.5rem 1.25rem;
  border-radius: 14px;
  background: var(--hm-bg);
  text-align: center;
}

.hm-results__empty h3 {
  margin-top: 0;
}

.hm-results__pagination ul {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.hm-results__pagination a,
.hm-results__pagination span {
  display: grid;
  min-width: 2.5rem;
  min-height: 2.5rem;
  place-items: center;
  border: 1px solid var(--hm-line);
  border-radius: 8px;
}

.hm-results__pagination .current {
  border-color: var(--hm-main);
  background: var(--hm-main);
  color: #fff;
}

@media (max-width: 780px) {
  .hm-search {
    margin: 1.5rem 0;
    border-radius: 14px;
  }

  .hm-search__choices,
  .hm-search__choices--purpose {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hm-search__location,
  .hm-results__grid {
    grid-template-columns: 1fr;
  }

  .hm-results__header {
    display: block;
  }
}

@media (max-width: 390px) {
  .hm-search__choices,
  .hm-search__choices--purpose {
    grid-template-columns: 1fr;
  }
}
