.dhf-search {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dhf-setting,
.dhf-coast-field,
.dhf-country {
  grid-column: span 2;
}

.dhf-search > .dhf-field:not(.dhf-setting):not(.dhf-coast-field):not(.dhf-country):not(.dhf-mountain-feature):not(.dhf-compatibility):not(.dhf-sort) {
  grid-column: span 1;
}

.dhf-search-tools {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1580px;
  margin-bottom: 72px;
  color: var(--dhf-muted);
  font-size: 12px;
}

.dhf-search-tools > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.dhf-search-tools > p {
  margin: 0;
}

.dhf-tool-button {
  padding: 9px 13px;
  border: 1px solid #cbd6d8;
  border-radius: 999px;
  background: #ffffffa8;
  color: var(--dhf-deep);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dhf-tool-button:hover,
.dhf-tool-button[aria-pressed="true"],
.dhf-tool-button[aria-expanded="true"] {
  border-color: var(--dhf-teal);
  background: #e5f1f2;
}

.dhf-tool-button span {
  display: inline-grid;
  min-width: 19px;
  min-height: 19px;
  margin-left: 5px;
  place-items: center;
  border-radius: 999px;
  background: #dce8e9;
  font-size: 10px;
}

.dhf-saved-panel {
  position: absolute;
  z-index: 10;
  top: 46px;
  left: 0;
  width: min(390px, 100%);
  padding: 17px;
  border: 1px solid var(--dhf-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px #102f3d24;
}

.dhf-saved-panel-head,
.dhf-saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.dhf-saved-panel-head {
  margin-bottom: 9px;
  color: var(--dhf-ink);
  font: 19px Georgia, serif;
}

.dhf-saved-panel-head button,
.dhf-saved-row button {
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: var(--dhf-muted);
  cursor: pointer;
}

.dhf-saved-row {
  padding: 11px 0;
  border-top: 1px solid #e6ebec;
}

.dhf-saved-row a {
  overflow: hidden;
  color: var(--dhf-deep);
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dhf-saved-empty {
  margin: 12px 0 2px;
}

.dhf-toast {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--dhf-deep);
  color: #fff;
  box-shadow: 0 12px 40px #102f3d38;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

.dhf-toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.dhf-card-top > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dhf-favorite {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d1dadd;
  border-radius: 50%;
  background: #fff;
  color: var(--dhf-teal);
  cursor: pointer;
}

.dhf-favorite span {
  font-size: 20px;
  line-height: 1;
}

.dhf-favorite:hover,
.dhf-favorite[aria-pressed="true"] {
  border-color: var(--dhf-teal);
  background: #e5f1f2;
}

.dreamhousefind-property[hidden] {
  display: none !important;
}

.dhf-close {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 14px 22px;
  border-top: 1px solid #e1e5e6;
  border-right: 1px solid #e1e5e6;
  background: #fbfcfa;
  color: #52666f;
  font-size: 13px;
  cursor: pointer;
}

.dhf-sea-view,
.dhf-renovation,
.dhf-mountain-feature,
.dhf-compatibility,
.dhf-sort {
  grid-column: span 2;
  border-top: 1px solid #e1e5e6;
}

.dhf-include-close,
.dhf-search > button[type="submit"] {
  grid-column: span 2;
}

.dhf-search > button[type="submit"] {
  min-height: 72px;
}

.dhf-coast-field input {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #e1e5e6;
}

.dhf-radius-field input {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #e1e5e6;
}

.dhf-local-distance {
  margin: -8px 0 0;
  color: var(--dhf-teal);
  font-size: 12px;
  font-weight: 800;
}

.dhf-location-confidence {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  vertical-align: middle;
}

.dhf-location-confidence-confirmed {
  background: #e3f3e8;
  color: #286443;
}

.dhf-location-confidence-approximate {
  background: #fff3cf;
  color: #7a5b14;
}

.dhf-location-confidence-unknown {
  background: #edf0f1;
  color: #617078;
}

.dhf-location-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 2px 4px;
  color: var(--dhf-teal);
  font-size: 13px;
}

.dhf-location-divider::after {
  height: 1px;
  flex: 1;
  background: #b9cacc;
  content: "";
}

.dhf-location-empty {
  color: #7c6060;
}

.dhf-coast-distance {
  margin: -8px 0 14px;
  color: var(--dhf-teal);
  font-size: 12px;
  font-weight: 700;
}

.dhf-natural-search {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(190px, .55fr) minmax(480px, 1.45fr);
  gap: 16px 28px;
  padding: 20px 22px;
  border-bottom: 1px solid #dce4e6;
  background: linear-gradient(100deg, #f4f8f5, #edf5f6);
}

.dhf-natural-search > div:first-child > span {
  color: var(--dhf-ink);
  font: 700 18px Georgia, serif;
}

.dhf-natural-search p {
  margin: 5px 0 0;
  color: var(--dhf-muted);
  font-size: 12px;
}

.dhf-natural-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid #cbd8da;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px #193c4610;
}

.dhf-natural-controls label {
  display: flex;
  align-items: center;
}

.dhf-natural-controls input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--dhf-ink);
  font-size: 14px;
}

.dhf-search .dhf-natural-controls button {
  grid-column: auto;
  min-width: 0;
  min-height: 50px;
  padding: 0 17px;
  border-left: 1px solid #dbe3e5;
}

.dhf-search .dhf-natural-apply {
  background: #fff;
  color: var(--dhf-deep);
}

.dhf-search .dhf-voice-button {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--dhf-deep);
}

.dhf-search .dhf-voice-button span {
  margin: 0;
  font-size: 18px;
}

.dhf-search .dhf-voice-button[aria-pressed="true"] {
  background: #b94e4e;
  animation: dhf-listening 1.1s ease-in-out infinite alternate;
}

.dhf-sea-view-badge {
  align-self: flex-start;
  display: inline-flex;
  margin: 0 24px 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff1c7;
  color: #75520b;
  font-size: 12px;
  font-weight: 800;
}

.dhf-natural-status {
  grid-column: 2;
  min-height: 16px;
  margin: -8px 0 0 !important;
  color: var(--dhf-teal) !important;
  font-weight: 700;
}

@keyframes dhf-listening {
  to { box-shadow: 0 0 0 5px #b94e4e22; }
}

.dhf-close input {
  width: 18px;
  height: 18px;
  accent-color: var(--dhf-teal);
}

.dhf-match {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.dhf-match-exact {
  color: #245b3b;
  background: #dff2e6;
}

.dhf-match-close {
  color: #795c15;
  background: #fff1c7;
}

.dhf-explanations {
  margin: -8px 0 0;
  padding-left: 19px;
  color: #687b83;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1300px) {
  .dhf-search {
    grid-template-columns: repeat(3, 1fr);
  }

  .dhf-search > .dhf-field {
    grid-column: span 1;
  }

  .dhf-close {
    grid-column: span 1;
    min-height: 68px;
    border-top: 0;
    border-bottom: 1px solid #e1e5e6;
  }

  .dhf-sea-view,
  .dhf-compatibility,
  .dhf-sort {
    grid-column: span 1;
  }

  .dhf-search > button[type="submit"] {
    grid-column: span 1;
  }

  .dhf-include-close {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .dhf-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dhf-search-tools {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 58px;
  }

  .dhf-search-tools > p {
    padding-left: 2px;
  }

  .dhf-tool-button {
    min-height: 42px;
  }

  .dhf-saved-panel {
    top: 100px;
  }

  .dhf-nav {
    gap: 12px;
  }

  .dhf-brand {
    min-width: 0;
    gap: 10px;
  }

  .dhf-brand img {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
  }

  .dhf-brand strong {
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dhf-nav-actions > span {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  .dhf-field input,
  .dhf-field select {
    min-height: 28px;
    font-size: 16px;
  }

  .dhf-close {
    grid-column: span 1;
    min-height: 64px;
    border-right: 0;
    border-bottom: 0;
  }

  .dhf-include-close {
    grid-column: span 1;
  }

  .dhf-search > button[type="submit"] {
    grid-column: 1 / -1;
  }

  .dhf-natural-search {
    grid-template-columns: 1fr;
    padding: 17px;
  }

  .dhf-natural-controls {
    grid-template-columns: 1fr auto;
  }

  .dhf-natural-controls label {
    grid-column: 1 / -1;
    border-bottom: 1px solid #dbe3e5;
  }

  .dhf-search .dhf-natural-controls button {
    grid-column: auto;
  }

  .dhf-natural-status {
    grid-column: 1;
  }

  .dhf-card-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 430px) {
  .dhf-nav-actions > span {
    display: none;
  }

  .dhf-brand strong {
    display: none;
  }

  .dhf-nav-actions > button {
    max-width: 125px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dhf-add-listing-link { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; overflow: hidden; font-size: 0; }
  .dhf-add-listing-link::first-letter { font-size: 22px; }

  .dhf-natural-controls {
    grid-template-columns: 1fr;
  }

  .dhf-search .dhf-natural-controls button {
    grid-column: 1;
    border-left: 0;
    border-top: 1px solid #dbe3e5;
  }
}

@media (max-width: 340px) {
  .dhf-search {
    grid-template-columns: 1fr;
  }

  .dhf-close,
  .dhf-search > button[type="submit"] {
    grid-column: 1;
  }
}
