.htz-field {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 8px;
  text-align: left;
}

.htz-label {
  color: #6b5b4b;
  font: 600 0.86rem/1.25 var(--font-ui);
}

.htz-combo {
  position: relative;
  min-width: 0;
  width: 100%;
}

.htz-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 1.5px solid #e4d9c6;
  border-radius: 12px;
  color: #2f2f2b;
  background: #fffdfa;
  box-shadow: none;
  cursor: pointer;
  font: 600 0.94rem/1.25 var(--font-ui);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.htz-toggle:focus-visible,
.htz-field.is-open .htz-toggle {
  outline: none;
  border-color: #c7a977;
  box-shadow: 0 0 0 4px rgba(199, 169, 119, 0.18);
}

.htz-toggle:active {
  transform: scale(0.985);
}

.htz-flag {
  flex: 0 0 auto;
  font-size: 1.22rem;
  line-height: 1;
}

.htz-current {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.htz-chevron {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: #9b8573;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.htz-field.is-open .htz-chevron {
  transform: rotate(180deg);
}

.htz-panel {
  position: absolute;
  z-index: 120;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  min-width: min(100%, 340px);
  padding: 10px;
  border: 1.5px solid #e4d9c6;
  border-radius: 14px;
  background: #fcfbf8;
  box-shadow: 0 18px 44px rgba(47, 47, 43, 0.18);
  transform-origin: top center;
}

.htz-panel[hidden],
.htz-option[hidden],
.htz-empty[hidden] {
  display: none !important;
}

.htz-search-wrap {
  position: relative;
  margin-bottom: 8px;
}

html body .htz-search-wrap > .htz-search {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 9px 12px !important;
  border: 1.5px solid #e4d9c6;
  border-radius: 10px;
  color: #2f2f2b;
  background: #fff;
  font: 500 0.9rem/1.25 var(--font-ui);
}

.htz-search:focus {
  outline: none;
  border-color: #c7a977;
  box-shadow: 0 0 0 3px rgba(199, 169, 119, 0.14);
}

.htz-list {
  display: flex;
  max-height: min(320px, 48vh);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex-direction: column;
  list-style: none;
  overscroll-behavior: contain;
}

.htz-option {
  margin: 0;
  padding: 0;
}

.htz-option > button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  color: #2f2f2b;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
}

.htz-option[aria-selected="true"] > button {
  background: #efe7dc;
}

@media (hover: hover) and (pointer: fine) {
  .htz-option > button:hover {
    background: #f4efe7;
  }
}

.htz-option-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
}

.htz-option-copy strong {
  overflow: hidden;
  color: #2f2f2b;
  font: 650 0.9rem/1.2 var(--font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.htz-option-copy small {
  overflow: hidden;
  color: #9b8573;
  font: 500 0.72rem/1.2 var(--font-ui);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.htz-no-market {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a44a39;
  box-shadow: 0 0 0 3px rgba(164, 74, 57, 0.12);
}

.htz-help,
.htz-empty {
  margin: 0;
  color: #9b8573;
  font: 500 0.76rem/1.4 var(--font-ui);
}

.htz-empty {
  padding: 18px 10px;
  text-align: center;
}

.auth-form .htz-field {
  gap: 8px;
}

.auth-form .htz-label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
}

.auth-form .htz-toggle,
.auth-form .htz-search,
.activity-create-box .htz-toggle,
.activity-create-box .htz-search {
  font-family: inherit;
}

@media (max-width: 640px) {
  .htz-panel {
    position: fixed;
    z-index: 1000;
    top: auto;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 14px;
    max-height: min(72vh, 560px);
    transform-origin: bottom center;
  }

  .htz-list {
    max-height: min(52vh, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .htz-toggle,
  .htz-chevron {
    transition-duration: 0ms;
  }
}
