.p-property-table{width:100%;border-collapse:collapse;margin-bottom:40px}.p-property-table th,.p-property-table td{padding:12px;border:1px solid #ddd;text-align:left;line-height:1.8}.p-property-table th{width:25%;background:#eee}.p-property-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.p-property-gallery img{width:100%;height:auto;display:block}.p-property-body{line-height:1.8}.p-property-body img{max-width:100%;height:auto}@media(max-width:767px){.p-property-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}

.property-gallery-thumbs{
  --cols: 6;     /* PCの1行の枚数 */
  --gap: 8px;    /* いまの見た目に合わせる */
  align-items: stretch;

  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--gap);
}

/* サムネ1枚（正方形） */
.property-gallery-thumbs .property-thumb{
  display: block;   /* ★これが重要 */
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;

  /* ボタン由来の余計な見た目を殺す（inline styleをCSS側に寄せる） */
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* 既存の inline style を潰して100%で埋める */
.property-gallery-thumbs .property-thumb img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(0,0,0,.25); /* ★追加 */
  box-sizing: border-box;
}

/* ===== Lightbox（中央モーダル型：PCは余白あり / スマホは全画面） ===== */
.property-lightbox{
  position: fixed;
  z-index: 9999;
  display: none;

  /* PC：全画面にしない（周囲に余白） */
  top: 6vh;
  left: 6vw;
  right: 6vw;
  bottom: 6vh;

  background: rgba(0,0,0,.65);
  border-radius: 14px;
}

.property-lightbox.is-open{ display: block; }

/* 画像を載せる“箱”は中央。%＋px上限（Q1=C） */
.property-lightbox .lb-stage{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);

  width: 86vw;        /* 可変（%的な役割） */
  max-width: 980px;   /* 上限（px） */
  height: 78vh;
  max-height: 78vh;

  display: grid;
  place-items: center;
}

/* 画像：基本はcontain。サイズ上限はJSで「小さい時だけ1.5倍」制御する（Q2=B） */
.property-lightbox img{
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #111;
  border: 2px solid rgba(255,255,255,.6); /* ★追加：薄い白枠 */
  box-sizing: border-box;
}

/* ボタン共通 */
.property-lightbox .lb-close,
.property-lightbox .lb-prev,
.property-lightbox .lb-next{
  position: absolute;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

/* 閉じる：探しやすく右上固定＋少し大きめ */
.property-lightbox .lb-close{
  top: 14px;
  right: 16px;
  font-size: 42px;
}

/* 矢印：大きく、中央寄せ（③） */
.property-lightbox .lb-prev,
.property-lightbox .lb-next{
  top: 50%;
  transform: translateY(-50%);
  font-size: 56px;
  padding: 8px 14px;
}

/* 端すぎないように“少し中央寄せ” */
.property-lightbox .lb-prev{ left: 18px; }
.property-lightbox .lb-next{ right: 18px; }

.property-lightbox .lb-stage{
  line-height: 0;
}

.property-lightbox img{
  display: block;
}

/* 画面幅で列数だけ変える（サイズは自動計算） */
@media (max-width: 1024px){
  .property-gallery-thumbs{ --cols: 4; }
}


/* Single-property layout and headings follow the legacy detail page. */
.p-property-single{position:relative;margin-bottom:50px;color:#000}.p-property-single__header{position:relative}.p-property-single__badges{position:absolute;top:5px;right:10px;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;max-width:100%;line-height:18px}.p-property-single__badges .p-property-brand,.p-property-single__status{display:inline-block;font-size:10px;font-weight:400;line-height:12px;padding:2px 8px;border-radius:50px;text-decoration:none}.p-property-single__status{background:#500088;color:#fff;border:1px solid transparent}.p-property-single__status--sold{background:#e6e6fa;color:#500088;border-color:#500088}.p-property-single .p-property-title{font-size:22px;font-weight:700;line-height:1.5;padding-top:30px;margin:0 0 10px;color:#500088;border-bottom:1px dotted #999;overflow-wrap:anywhere}.p-property-single__header:has(.p-contract-badge) .p-property-title{padding-top:50px}.p-property-single__content{padding:5px 0 30px}.p-property-single .p-property-heading{font-size:20px;font-weight:700;line-height:40px;color:#000;margin:0 0 20px;border-left:5px solid #6a0dad;padding:10px 15px;background:#f9f9f9}.p-property-single .p-property-heading--overview{margin-top:40px}.p-property-single .p-property-table{width:100%;border-collapse:collapse;margin:0 0 40px;font-size:17.1px;line-height:32.4px}.p-property-single .p-property-table th,.p-property-single .p-property-table td{padding:12px;border:1px solid #ddd;text-align:left;line-height:32.4px;overflow-wrap:anywhere}.p-property-single .p-property-table th{width:30%;background:#eee;font-weight:700}.p-property-single .property-gallery-thumbs{margin-bottom:40px}.p-property-single .p-property-body{font-size:18px;line-height:1.8}.p-property-single .p-property-body p{margin-bottom:20px}@media(max-width:767px){.p-property-single .p-property-title{font-size:18px}.p-property-single__badges{right:0}}
