.auto-city .city-drawer-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 0 11px;
  border: 1px solid #a8c8b9;
  border-radius: 12px;
  background: #f4fbf7;
  color: #16342b;
  font-weight: 700;
  text-align: left;
}
.city-drawer-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-drawer .city-pin, .city-drawer-trigger .city-pin {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 13px;
  height: 13px;
  border: 1.7px solid currentColor;
  border-radius: 52% 52% 52% 2px;
  transform: rotate(-45deg) translateY(-1px);
  color: #137357;
}
.city-pin::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.city-chevron {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-left: 1px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
html.city-drawer-open { overflow: hidden; }

.city-drawer {
  --drawer-ink: #132f28;
  --drawer-muted: #49665c;
  --drawer-accent: #07694d;
  --drawer-line: #d4e4dc;
  --drawer-wash: #e6f5ed;
  width: min(580px, calc(100% - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #c9ddd3;
  border-radius: 26px;
  background: #fff;
  color: var(--drawer-ink);
  font: inherit;
  box-shadow: 0 24px 88px #0a332843, 0 4px 18px #082b1e21;
}
.city-drawer[open] { animation: city-drawer-rise 260ms cubic-bezier(.16, 1, .3, 1) both; }
.city-drawer::backdrop { background: #0d2d26a8; }
@keyframes city-drawer-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.city-drawer-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(660px, calc(100dvh - 44px));
}
.city-drawer-head {
  padding: 22px 24px 15px;
  border-bottom: 1px solid var(--drawer-line);
  background: #f4fbf7;
}
.city-drawer-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.city-drawer-title h2 {
  margin: 0;
  color: var(--drawer-ink);
  font-size: clamp(24px, 4.2vw, 34px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 760;
}
.city-drawer-title h2:focus { outline: none; }
.city-drawer-close {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid #bed5ca;
  border-radius: 50%;
  background: #fff;
  color: var(--drawer-ink);
  cursor: pointer;
}
.city-drawer-close::before, .city-drawer-close::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 20px;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}
.city-drawer-close::after { transform: rotate(-45deg); }
.city-drawer-search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #a6c6b7;
  border-radius: 13px;
  background: #fff;
}
.city-drawer-search:focus-within { border-color: var(--drawer-accent); box-shadow: 0 0 0 2px #14826325; }
.city-search-icon { position: relative; flex: 0 0 14px; height: 14px; border: 1.8px solid #49665c; border-radius: 50%; }
.city-search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  right: -5px;
  bottom: -2px;
  border-radius: 1px;
  background: #49665c;
  transform: rotate(45deg);
}
.city-drawer-search input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--drawer-ink);
  font: inherit;
  font-size: 16px;
}
.city-drawer-places { overflow: auto; overscroll-behavior: contain; padding: 14px 24px 10px; scrollbar-width: thin; }
.city-drawer-current {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--drawer-wash);
  color: var(--drawer-muted);
  font-size: 13px;
  line-height: 1.3;
}
.city-drawer-current strong { display: block; margin-top: 2px; color: var(--drawer-accent); font-size: 16px; }
.city-drawer-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 0; padding: 0; list-style: none; }
.city-drawer-list li { border-bottom: 1px solid var(--drawer-line); }
.city-drawer-list a, .city-drawer-other {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--drawer-ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
}
.city-drawer-list a[aria-current] { color: var(--drawer-accent); }
.city-arrow {
  flex: 0 0 7px;
  height: 7px;
  margin-right: 3px;
  border-right: 1.7px solid currentColor;
  border-top: 1.7px solid currentColor;
  transform: rotate(45deg);
  color: var(--drawer-accent);
}
.city-drawer-footer {
  padding: 6px 24px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--drawer-line);
  background: #fff;
}
.city-drawer-other {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}
.city-drawer-other[aria-expanded=true] .city-arrow { transform: rotate(135deg); }
.city-drawer-manual { margin: 0; padding: 0 6px 9px; }
.city-drawer-manual label { display: block; margin: 2px 0 7px; font-size: 14px; color: var(--drawer-muted); }
.city-drawer-manual > div { display: flex; gap: 8px; }
.city-drawer-manual input, .city-drawer-manual button {
  min-height: 44px;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid #a6c6b7;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}
.city-drawer-manual input { flex: 1; color: var(--drawer-ink); background: #fff; }
.city-drawer-manual button { flex: 0 0 auto; border-color: var(--drawer-accent); background: var(--drawer-accent); color: #fff; cursor: pointer; }
.city-drawer-empty { margin: 14px 0 20px; color: var(--drawer-muted); }
#city-drawer-error { margin: 4px 0 0; color: #9c2424; font-size: 13px; }
.city-drawer [hidden] { display: none !important; }
.city-drawer-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.city-drawer :is(a, button, .city-drawer-manual input):focus-visible,
.auto-city .city-drawer-trigger:focus-visible { outline: 2px solid #07694d; outline-offset: 2px; }
@media (hover: hover) {
  .city-drawer-list a:hover, .city-drawer-other:hover, .city-drawer-close:hover,
  .auto-city .city-drawer-trigger:hover { background: #e6f5ed; }
}
@media (max-width: 639px) {
  .city-drawer {
    inset: auto 8px max(8px, env(safe-area-inset-bottom)) 8px;
    margin: 0;
    width: auto;
    border-radius: 23px;
  }
  .city-drawer-frame { max-height: min(660px, calc(100dvh - 28px)); }
  .city-drawer-head { padding: 15px 16px 12px; }
  .city-drawer-places { padding: 12px 16px 8px; }
  .city-drawer-footer { padding-inline: 12px; }
  .city-drawer-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .city-drawer[open] { animation: none; }
}
