@layer property {
  .map-page {
    display: grid;
    grid-template-columns: max-content 1fr;
    grid-template-rows: 1fr 0;
    transition: grid-template-columns 0.3s ease-in-out;
    height: 100dvh;
    overflow: hidden;
    position: relative;
  }

  .map-page.open {
    grid-template-rows: 1fr 180px;
  }

  .map-page-form {
    height: 100%;
    overflow-y: auto;
  }

  .map-container {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
  }

  .map {
    height: 100%;
    width: 100%;
  }

  .map-property-list-container {
    grid-column: span 2;
    background-color: #fff;
    border-top: 1px solid #ccc;
    overflow-x: auto;
    max-width: 100%;
  }

  .map-property-list {
    display: flex;
    width: fit-content;
    gap: 1rem;
    padding: 1rem;
  }

  .map-property-list-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 0.5rem;
    border-radius: 0.5rem;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 400px;
    height: 140px;
  }

  /* ペグマンが消えたので */
  .gm-svpc img {
    max-height: initial;
  }

  .map-property-list-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0.77;
  }

  .map-property-list-item > div:first-child img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .map-property-list-item > div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* テキストの省略表示を正しく動作させる */
    overflow: hidden;
  }

  .map-property-list-item-div-name {
    display: inline-flex;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1;
    border: 1px solid #d3d3d3;
    border-radius: 0.25rem;
  }

  /* 物件名 */
  .map-property-list-item-building-name {
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.2;
    margin: 0;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    word-break: break-all;
  }

  /* 価格エリア */

  /* 価格 */
  .map-property-list-item-price {
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--main-color, #eb6100);
  }

  .map-property-list-item .price-unit {
    font-weight: bold;
    font-size: 0.875em;
    line-height: 1.4;
    color: var(--main-color, #eb6100);
  }

  /* 管理費 */
  .map-property-list-item .price-management-fee {
    font-weight: bold;
    font-size: 0.75em;
    line-height: 1.4;
    color: var(--main-color, #eb6100);
  }

  /* 物件詳細情報 */
  .map-property-list-item-property-info {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  @media (max-width: 768px) {
    .map-page {
      grid-template-columns: 1fr;
    }
  }

  .map-page-controls {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 99999;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    padding: 0.5rem;
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    line-height: 40px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .map-page-form-close {
    position: absolute;
    top: 0.5rem;
    right: 0.25rem;
  }

  @media (min-width: 768px) {
    .map-page-controls {
      display: none !important;
    }

    .map-page-form-close {
      display: none !important;
    }
  }

  @media (max-width: 768px) {
    .map-page-form {
      position: fixed;
      top: 100dvh;
      transition: top 0.3s ease-in-out;
      left: 0;
      right: 0;
      background-color: #fff;
      z-index: 100000;
      height: 100dvh;
      overflow-y: auto;
    }
    .map-page-form.active {
      top: 0;
    }
  }
}
