#search_form #area-picker-button {
  width: 100%;
  height: 40px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #999;
  border-radius: 5px;
  background: #fff;
  color: #343434;
  font: 14px var(--gothic-font);
  margin: 0;
  cursor: pointer;
}

body.luxe #search_form #area-picker-button {
  border-color: transparent;
  background: transparent;
  color: #fff;
}

#search_form #area-picker-button:disabled {
  border-color: #b8b8b8;
  background: #ececec;
  color: #626262;
  cursor: not-allowed;
}

#area-picker-button:disabled span {
  white-space: normal;
}

#area-picker-button:disabled i {
  display: none;
}

#search_form #area-picker-button:focus-visible {
  outline: 2px solid var(--search-focus-color, #4475cb);
  outline-offset: -2px;
}

#area-picker-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#search_form #area-picker-button.has-city-selection {
  position: relative;
  justify-content: space-between;
  padding-top: 12px;
  text-align: left;
}
#area-picker-button .area-picker-caption {
  position: absolute;
  top: 2px;
  inset-inline-start: 10px;
  color: #696969;
  font-size: 11px;
  line-height: 1.2;
}
body.luxe #area-picker-button .area-picker-caption {
  color: #aaa;
}
@media screen and (max-width: 768px) {
  body.luxe #headerMenuDialog #area-picker-button .area-picker-caption {
    color: #626262;
  }
}

#area-picker:not([open]) {
  display: none;
}

#area-picker {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  overflow: auto;
  width: min(1100px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  box-sizing: border-box;
  border: 0;
  border-radius: 16px;
  padding: clamp(16px, 3vw, 28px);
  background: #fff;
  color: #121b31;
  box-shadow: 0 16px 44px #13203a40;
}

#area-picker::backdrop {
  background: #101a3260;
}

#area-picker [hidden] {
  display: none !important;
}

#area-picker button {
  font: inherit;
  cursor: pointer;
}

.area-picker-header,
.area-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.area-picker-header {
  margin-bottom: 16px;
}

.area-picker-header h2 {
  margin: 0;
  font-size: 1.875rem;
}

#area-picker-title:focus {
  outline: none;
}

#area-picker [data-area-close] {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 28px;
  line-height: 1;
  padding: 4px 8px;
}

.area-picker-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(215px, 1fr);
  gap: 20px;
  align-items: start;
}

.area-picker-major-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

#area-picker [data-area-show-cities] {
  display: flex;
  align-items: center;
  gap: 12px;
}

.area-picker-map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.area-picker-map [role="button"] {
  cursor: pointer;
}

.area-picker-map polygon {
  fill: var(--area-fill, transparent);
}

.area-picker-map [role="button"]:hover polygon {
  fill: var(--area-fill, rgb(255 255 255 / 12%));
  filter: brightness(1.05);
}

.area-picker-map [role="button"]:focus-visible polygon {
  fill: var(--area-fill, rgb(110 78 44 / 18%));
  filter: brightness(0.9);
}

.area-picker-map text {
  fill: #172845;
  font: 600 29px sans-serif;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.area-picker-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.area-picker-sidebar li {
  border-bottom: 1px solid #e5ebf2;
}

.area-picker-sidebar li button,
#area-picker .area-picker-city-link {
  border: 0;
  color: #1649a7;
  background: transparent;
  font-weight: 600;
  padding: 8px 10px;
  text-align: left;
}

.area-picker-sidebar li button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.area-picker-selection-mark::before {
  content: "›";
}

.area-picker-sidebar [aria-pressed="true"] .area-picker-selection-mark::before {
  content: "✓";
}

#area-picker .area-picker-all-row {
  padding-bottom: 10px;
  margin-bottom: 4px;
}

#area-picker .area-picker-all-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid #a9c2ea;
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
}

#area-picker .area-picker-all-button:hover {
  background: #edf4ff;
}

body.luxe #area-picker .area-picker-all-button {
  border-color: var(--area-luxe-line);
}

body.luxe #area-picker .area-picker-all-button:hover {
  background: var(--area-luxe-surface);
}

.area-picker-all-button[aria-pressed="false"] .area-picker-selection-mark {
  display: none;
}

#area-picker .area-picker-sidebar button[aria-pressed="false"] {
  font-weight: 400;
}

#area-picker .area-picker-sidebar button[aria-pressed="true"] {
  background: #e0ecff;
  font-weight: 600;
}

#area-picker .area-picker-sidebar button[aria-pressed="true"]:not(.area-picker-all-button) {
  border-radius: 6px;
}

#area-picker .area-picker-sidebar button[aria-pressed="true"] .area-picker-selection-mark {
  display: inline-grid;
  place-items: center;
  align-self: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1649a7;
  color: #fff;
  font: 700 12px/1 sans-serif;
}

body.luxe #area-picker .area-picker-sidebar button[aria-pressed="true"] {
  background: var(--area-luxe-gold-fill);
}

body.luxe #area-picker .area-picker-sidebar button[aria-pressed="true"] .area-picker-selection-mark {
  background: var(--area-luxe-gold);
  color: #fff;
}

#area-picker .area-picker-city-link,
.area-picker-sidebar li button:hover {
  background: #edf4ff;
  border-radius: 6px;
}

#area-picker [data-area-city-search] {
  display: block;
  width: 100%;
  margin: 12px 0 16px;
  padding: 9px 12px;
  border: 1px solid #a6b2c4;
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}

.area-picker-city-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 12px;
}

.area-picker-city-grid label {
  position: static;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #e5ebf2;
  border-radius: 6px;
  line-height: 1.35;
  cursor: pointer;
}

.area-picker-city-grid label:hover {
  background: #f5f8fc;
}

.area-picker-city-grid input[type="checkbox"] {
  margin: 0;
}

.area-picker-city-name {
  overflow-wrap: anywhere;
}

.area-picker-city-count {
  color: #5b6575;
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.area-picker-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 22px;
}

.area-picker-city-tools {
  margin-top: 0;
}

.area-picker-actions button {
  padding: 8px 18px;
  border: 1px solid #a6b2c4;
  border-radius: 7px;
  background: #fff;
  color: inherit;
}

#area-picker [data-area-apply] {
  margin-inline-start: auto;
  border-color: #1649a7;
  background: #1649a7;
  color: #fff;
}

body.luxe #area-picker {
  --area-luxe-gold: #76562e;
  --area-luxe-gold-fill: #ead7b5;
  --area-luxe-line: #d8c9b3;
  --area-luxe-surface: #f8f3eb;
  color-scheme: light;
  border: 1px solid var(--area-luxe-line);
  border-radius: 8px;
  background: #fff;
  color: #2b2621;
  box-shadow: 0 16px 44px rgb(0 0 0 / 24%);
}
body.luxe #area-picker::backdrop {
  background: rgb(0 0 0 / 50%);
}
body.luxe .area-picker-header h2 {
  color: var(--area-luxe-gold);
  font-family: "ivyjournal", "Noto Serif JP", serif;
  font-weight: 500;
  line-height: 1.3;
}
body.luxe #area-picker .area-picker-map {
  border-radius: 5px;
}
body.luxe #area-picker .area-picker-sidebar li,
body.luxe #area-picker .area-picker-city-grid label {
  border-color: var(--area-luxe-line);
}
body.luxe #area-picker .area-picker-sidebar li button {
  color: #2b2621;
}
body.luxe #area-picker .area-picker-sidebar li button span[aria-hidden="true"] {
  color: var(--area-luxe-gold);
}
body.luxe #area-picker .area-picker-sidebar li button:hover,
body.luxe #area-picker .area-picker-city-grid label:hover,
body.luxe #area-picker .area-picker-city-grid label:has(input:checked) {
  background: var(--area-luxe-surface);
}
body.luxe #area-picker .area-picker-city-link,
body.luxe #area-picker .area-picker-actions button {
  border: 1px solid var(--area-luxe-line);
  border-radius: 5px;
  background: var(--area-luxe-surface);
  color: var(--area-luxe-gold);
}
body.luxe #area-picker .area-picker-city-count {
  color: #6e6254;
}
body.luxe #area-picker input[type="checkbox"] {
  accent-color: var(--area-luxe-gold);
}
body.luxe #area-picker [data-area-city-search] {
  border-color: var(--area-luxe-line);
  background: var(--area-luxe-surface);
  color: inherit;
}
body.luxe #area-picker [data-area-city-search]::placeholder {
  color: #6e6254;
}
body.luxe #area-picker [data-area-apply] {
  border-color: var(--area-luxe-gold);
  background: var(--area-luxe-gold-fill);
  color: #251a10;
}
body.luxe #area-picker :is(button, input):focus-visible {
  box-shadow: inset 0 0 0 2px var(--area-luxe-gold);
}

@media (max-width: 768px), (max-width: 950px) and (max-height: 500px) {
  #area-picker[open] {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
  }

  #area-picker [data-area-view="major"] {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .area-picker-header,
  .area-picker-major-footer {
    flex-shrink: 0;
  }

  .area-picker-layout {
    flex: 1;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }

  .area-picker-map {
    height: 100%;
    min-height: 0;
  }

  .area-picker-sidebar,
  #area-picker [data-area-view="cities"] {
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
}

@media (max-width: 960px) {
  .area-picker-city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .area-picker-city-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .area-picker-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .area-picker-map {
    flex: none;
    height: auto;
    max-height: 60%;
  }

  .area-picker-sidebar {
    flex: 1;
    min-height: 0;
  }
}
