.site-map-search {
  position: relative;
  height: calc(100dvh - 86px);
  min-height: 570px;
  overflow: hidden;
  background: #ece9e2;
}
.site-property-map { position: absolute; inset: 0; z-index: 1; }
.site-property-map:not(:has(> div)) { display: grid; place-items: center; color: #555; }
.site-map-filter-open,
.site-map-legend,
.site-map-filter,
.site-map-results,
.site-map-bottom { position: absolute; z-index: 500; box-sizing: border-box; }
.site-map-filter-open {
  top: 20px;
  left: 20px;
  padding: 11px 28px;
  border: 0;
  border-radius: 4px;
  background: #212121;
  box-shadow: 0 2px 12px #0003;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.site-map-filter {
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  width: 370px;
  background: #f4f4f4;
  box-shadow: 3px 0 16px #0003;
}
.site-map-filter[hidden] { display: none; }
.site-map-filter-box {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f4f4f4;
}
.site-map-panel-heading {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: #f1f1f1;
  border-bottom: 1px solid #dedede;
}
.site-map-panel-heading h2 { margin: 0; font-size: 18px; }
.site-map-panel-heading button {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid #999;
  border-radius: 2px;
  background: #fff;
  color: #777;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.site-map-filter .site-map-panel-heading {
  position: relative;
  z-index: 2;
  background: #212121;
  border-bottom: 0;
  color: #fff;
}
.site-map-filter .site-map-panel-heading button {
  border-color: #777;
  background: #333;
  color: #fff;
}
.site-map-location {
  position: absolute;
  z-index: 2;
  top: 52px;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  padding: 14px 20px 13px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}
.site-map-location label {
  display: block;
  margin-bottom: 7px;
  color: #333;
  font-size: 12px;
  font-weight: 700;
}
.site-map-location div { display: flex; }
.site-map-location input {
  min-width: 0;
  flex: 1;
  height: 38px;
  padding: 8px 11px;
  border: 1px solid #aaa;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  background: #fff;
}
.site-map-location button,
.site-map-apply {
  border: 0;
  background: #e96900;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.site-map-location button { padding: 8px 17px; border-radius: 0 3px 3px 0; }
#site-map-filter-form {
  box-sizing: border-box;
  height: calc(100% - 52px);
  --filter-pad-x: 20px;
  --filter-pad-bottom: 20px;
  margin: 0;
  padding: 104px var(--filter-pad-x) var(--filter-pad-bottom);
  overflow-y: auto;
  scrollbar-color: #aaa #ddd;
  scrollbar-width: thin;
}
#site-map-filter-form::-webkit-scrollbar { width: 5px; }
#site-map-filter-form::-webkit-scrollbar-thumb { background: #aaa; border-radius: 5px; }
#site-map-filter-form::-webkit-scrollbar-track { background: #ddd; }
/* 条件1行：左に見出し、右に入力。 */
.site-map-field {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 56px;
  align-items: stretch;
  column-gap: 12px;
  margin: 0 0 10px;
  padding-right: 12px;
  border: 1px solid #dedede;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 2px #0000000d;
}
.site-map-field-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: #292929;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}
.site-map-field > select,
.site-map-field > .site-map-range { align-self: center; margin: 10px 0; }
#site-map-filter-form select {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #aaa;
  border-radius: 2px;
  background: #fff;
  color: #222;
  font-size: 13px;
}
.site-map-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: #333;
  font-size: 13px;
}
.site-map-filter-actions {
  /* フォームの余白と同じ量だけ広げて端まで敷く（値がずれると横スクロールになる）。 */
  position: sticky;
  bottom: calc(-1 * var(--filter-pad-bottom));
  margin: 18px calc(-1 * var(--filter-pad-x)) calc(-1 * var(--filter-pad-bottom));
  padding: 14px var(--filter-pad-x) 18px;
  border-top: 1px solid #ddd;
  background: #fff;
  box-shadow: 0 -4px 10px #00000012;
}
.site-map-filter-count {
  margin: 0 0 10px;
  color: #333;
  text-align: center;
  font-size: 14px;
}
.site-map-filter-count b,
.site-map-bottom b { color: #e96900; font-size: 1.45em; }
.site-map-apply {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
}

.site-map-results {
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 800;
  width: 380px;
  overflow: auto;
  background: #fff;
  box-shadow: -3px 0 16px #0003;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.site-map-results.is-open { transform: translateX(0); }
.site-map-results > .site-map-panel-heading { position: sticky; top: 0; z-index: 2; }
#site-map-status { margin: 0; padding: 10px 16px; font-size: 13px; }
#site-map-items { margin: 0; padding: 0; list-style: none; }
#site-map-items > li { margin: 10px; border: 1px solid #c6c6c6; background: #fff; }
.site-map-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  color: #333;
  text-decoration: none;
}
.site-map-card:hover { background: #fff7f2; }
.site-map-card-title {
  grid-column: 1 / -1;
  display: block;
  min-height: 22px;
  padding: 13px 12px 4px;
  color: #222;
  font-size: 15px;
  line-height: 1.45;
}
/* 物件種別。色は地図マーカーと対応させる。 */
.site-map-card-type,
.site-map-legend span::before { --type-color: #f03b04; }
.site-map-card-type.is-shop,
.site-map-legend .is-shop::before { --type-color: #0453f1; }
.site-map-card-type {
  display: block;
  width: fit-content;
  margin-bottom: 5px;
  padding: 1px 6px;
  border: 1px solid var(--type-color);
  border-radius: 2px;
  color: var(--type-color);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
.site-map-legend {
  top: 72px;
  left: 20px;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 4px;
  background: #fffe;
  box-shadow: 0 1px 6px #0003;
  color: #333;
  font-size: 12px;
  list-style: none;
}
.site-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.site-map-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--type-color); }
.site-map-card > img {
  box-sizing: border-box;
  width: 100px;
  height: 110px;
  margin: 10px 0 10px 10px;
  border: 1px solid #dadada;
  background: #eee;
  object-fit: contain;
}
.site-map-card-body {
  min-width: 0;
  padding: 10px 10px 10px 12px;
  font-size: 12px;
  line-height: 1.65;
}
.site-map-card-address { display: block; margin-bottom: 4px; color: #555; }
.site-map-card-layout { display: block; }
.site-map-card-rent {
  display: block;
  margin-top: 3px;
  color: #e96900;
  font-size: 16px;
  font-weight: 700;
}
.site-map-card-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.site-map-card-tags em {
  padding: 2px 5px;
  border: 0;
  border-radius: 2px;
  background: #006d57;
  color: #fff;
  font-style: normal;
  font-size: 10px;
}
.site-map-room-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 8px 10px;
  background: #eee;
  color: #333;
  font-size: 12px;
}
.site-map-room-heading b { color: #e96900; font-size: 15px; }
.site-map-room-list { margin: 0; padding: 0; list-style: none; }
.site-map-room-list li { border-top: 1px solid #ddd; }
.site-map-room-list a {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 82px;
  padding: 9px 32px 9px 10px;
  color: #333;
  text-decoration: none;
  font-size: 12px;
}
.site-map-room-list a:hover { background: #fff7f2; }
.site-map-room-list a::after {
  content: "›";
  position: absolute;
  right: 12px;
  color: #888;
  font-size: 24px;
}
.site-map-room-list b { color: #e96900; font-size: 13px; white-space: nowrap; }
.site-map-room-image {
  width: 70px;
  height: 70px;
  border: 1px solid #ddd;
  background: #f4f4f4;
  object-fit: contain;
}
.site-map-room-body,
.site-map-room-detail { display: block; min-width: 0; }
.site-map-room-body > b { display: block; margin-top: 3px; color: #e96900; font-size: 14px; }
.site-map-room-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.site-map-room-tags em {
  padding: 2px 5px;
  border-radius: 2px;
  background: #006d57;
  color: #fff;
  font-size: 10px;
  font-style: normal;
}
.site-map-bottom,
.site-map-loading[hidden] { display: none; }

@media (max-width: 767px) {
  .site-map-search { height: calc(100dvh - 125px); min-height: 420px; }
  .site-map-location { padding: 12px 16px; }
  .site-map-filter-open { display: none; }
  .site-map-legend { top: 12px; left: 12px; }
  .site-map-filter { width: 100%; max-width: 370px; }
  #site-map-filter-form { --filter-pad-x: 14px; --filter-pad-bottom: 16px; padding-top: 100px; }
  .site-map-field { grid-template-columns: 80px minmax(0, 1fr); }
  .site-map-field-label { background: #212121; }
  /* 物件詳細と下部バーはどちらも画面下基準。詳細の下端をバーの上端に合わせる。 */
  .site-map-search { --map-bottom-h: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .site-map-results {
    position: fixed;
    top: auto;
    bottom: var(--map-bottom-h);
    left: 0;
    width: 100%;
    height: min(62vh, 500px);
    transform: translateY(calc(100% + var(--map-bottom-h)));
    transition: transform .25s ease, opacity .3s ease;
  }
  .site-map-results.is-open { transform: translateY(0); }
  .site-map-results.is-fading { opacity: 0; }
  .site-map-loading {
    position: fixed;
    bottom: calc(var(--map-bottom-h) + 12px);
    left: 50%;
    z-index: 850;
    margin: 0;
    padding: 8px 18px;
    border-radius: 20px;
    background: #212121e6;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transform: translateX(-50%);
    transition: opacity .3s ease;
  }
  .site-map-loading.is-hiding { opacity: 0; }
  .site-map-bottom {
    display: flex;
    align-items: center;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    height: var(--map-bottom-h);
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px));
    background: #fffc;
    text-align: center;
    font-weight: 700;
  }
  .site-map-bottom div { display: flex; gap: 8px; margin-top: 4px; }
  .site-map-bottom button {
    flex: 1;
    height: 100%;
    padding: 0 8px;
    border: 0;
    background: #e96900;
    color: #fff;
    font-weight: 700;
  }
}
