/* =============================================================
   PC — property detail template  (/bkndetail/{id}/room{id}/)
   Clone of cloudestate-tokyo.jp bkndetail (PC theme, capture @ 1440).
   Values transcribed from the live site's computed style (numbers are
   facts) — vendor CSS/JS/images not reused (HP-CLONE-DESIGN.md §3).
   Loaded after tokens/base/pc.css; only detail-specific rules here.
   ============================================================= */

.l-main.l-page { width: var(--screen-size); }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { width: var(--screen-size); margin: 0 auto; padding: 16px 0 14px; position: relative; z-index: 1; }
.breadcrumbs__list { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.breadcrumbs__items { display: inline-flex; align-items: center; }
.breadcrumbs__link { display: inline-flex; align-items: center; gap: 3px; }
.breadcrumbs__link span { font-size: 13px; color: var(--light-text-color); }
.breadcrumbs strong.breadcrumbs__link { font-weight: bold; }
.breadcrumbs strong.breadcrumbs__link span { color: var(--dark-color); }
.breadcrumbs__link .icon { width: 8px; height: 8px; color: var(--light-text-color); margin: 0 2px; }

/* ---------- 2-column shell ---------- */
.l-detail { display: grid; gap: 30px; grid-template-columns: 824px 286px; }
.detail__section { margin-block: 0 40px; }
.map.detail__section { margin-block: 40px; }
.l-detail__primary section { margin: 30px 0; }
.l-detail__primary > section:first-of-type { margin-top: 0; }

/* shared left heading */
h2.ui-title--left, h3.ui-title--left {
  font-size: 18px; font-weight: bold; border-bottom: 1px solid var(--rank-under);
  padding-bottom: 4px; margin-bottom: 12px;
}
h2.ui-title--left.feature_point, h2.ui-title--left.staff_comment { margin-top: 20px; }

/* ---------- detail header ---------- */
.detail-header { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin: 0 0 12px; }
.detail-header__left { min-width: 0; }
.ui-new-detail__room { text-transform: uppercase; font-size: 15px; font-weight: bold; color: #e10000; }
.detail-header__name { margin: 0 0 4px; font-size: 20px; font-weight: bold; }
.detail-header__cost { display: flex; gap: 10px; align-items: center; margin: 0 0 6px; flex-wrap: wrap; }
.detail-header__price { font-size: 16px; color: #e10000; }
.detail-header__price .price { font-size: 24px; font-weight: bold; }
.detail-header__cost-kanri { color: var(--dark-color); font-weight: normal; font-size: 14px; }
.detail-header__left > p { font-size: 14px; }
.detail-header__left > p a { color: #07519A; }
.detail-header__walk { display: flex; gap: 0 16px; flex-wrap: wrap; margin: 2px 0 0; }
.detail-header__walk-item { display: flex; align-items: center; gap: 3px; font-size: 13px; }
.detail-header__walk .icon { width: 13px; height: 13px; color: var(--light-text-color); }
.detail-header__btn { display: flex; flex: none; }
.print-btn { margin: 0 24px 0 3px; width: 100px; height: 32px; gap: 3px; font-size: 13px; font-weight: bold; }
.print-btn .icon { width: 15px; height: 15px; color: var(--main-color); }
.detail-header__favorite { display: flex; gap: 8px; align-items: center; font-size: 10px; color: #78909C; white-space: nowrap; }
.detail-header__favorite .icon { width: 32px; height: 30px; color: var(--border-color); }

/* ---------- gallery ---------- */
.gallery { margin: 0 0 26px; position: relative; z-index: 0; }
.gallery__contents { display: grid; gap: 25px; grid-template-columns: 540px 259px; position: relative; }
.gallery__primary {
  height: 440px; border-radius: 4px; position: relative; overflow: hidden;
  background-color: var(--bg-light-gray); cursor: zoom-in;
}
.gallery__primary img { width: 100%; height: 100%; object-fit: contain; object-position: center; cursor: pointer; }
.md-photo__cunter {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background-color: #263238e6; border-radius: 50px; padding: 3px 13px; font-size: 12px; color: #fff;
}
.gallery__note {
  width: 100%; background-color: var(--bg-dark-transparent); padding: 2px 0 3px;
  position: absolute; bottom: 0; left: 0; z-index: 1; color: #fff; text-align: center; font-size: 13px;
}
.gallery__note span { margin: 0 5px 0 0; font-weight: bold; color: inherit; }
[class*="gallery__control--"] {
  position: absolute; top: 0; bottom: 0; z-index: 1; margin: auto; padding: 10px; height: 45px;
  display: flex; align-items: center; background: rgba(255,255,255,.72); border-radius: 4px;
}
[class*="gallery__control--"]:disabled { opacity: .3; cursor: auto; }
.gallery__control--prev { left: 8px; }
.gallery__control--next { right: 8px; }
[class*="gallery__control--"] .icon { width: 25px; height: 25px; color: var(--dark-color); }

.gallery__thumcol { display: flex; flex-direction: column; }
.gallery__thum { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 15px; align-content: start; grid-auto-rows: 90px; }
.gallery__thum-btn { display: block; height: 90px; border-radius: 8px; overflow: hidden; position: relative; }
.gallery__thum-btn img { width: 100%; height: 100%; object-fit: contain; object-position: center; background: var(--bg-light-gray); }
.gallery__thum-btn.is-active { outline: 2px solid var(--main-color); outline-offset: -2px; }
.gallery__thumnav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 0; }
.gallery__thumnav-btn { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.gallery__thumnav-btn .icon { width: 12px; height: 12px; color: var(--dark-color); }
.gallery__thumnav-btn:disabled { opacity: .3; }
.gallery__dots { display: flex; gap: 10px; align-items: center; }
.gallery__dot { width: 10px; height: 10px; border-radius: 50%; background-color: #A6A6A6; }
.gallery__dot.is-active { background-color: var(--dark-color); }

/* fullscreen viewer (self-authored, replaces PhotoSwipe) */
.gallery__viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(38,50,56,.92); display: none; }
.gallery__viewer.is-open { display: flex; align-items: center; justify-content: center; }
.gallery__viewer-img { max-width: 88vw; max-height: 82vh; object-fit: contain; }
.gallery__viewer-note { position: fixed; left: 0; right: 0; bottom: 26px; text-align: center; color: #fff; font-size: 14px; }
.gallery__viewer-note span { font-weight: bold; margin: 0 5px 0 0; }
.gallery__viewer-count { position: fixed; top: 22px; left: 24px; color: #fff; font-size: 13px; }
.gallery__viewer-close { position: fixed; top: 18px; right: 24px; width: 34px; height: 34px; }
.gallery__viewer-close::before, .gallery__viewer-close::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 24px; height: 2px; background: #fff;
}
.gallery__viewer-close::before { transform: rotate(45deg); }
.gallery__viewer-close::after { transform: rotate(-45deg); }
.gallery__viewer-ctrl { position: fixed; top: 0; bottom: 0; margin: auto; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.gallery__viewer-ctrl .icon { width: 40px; height: 40px; color: #fff; }
.gallery__viewer-ctrl--prev { left: 20px; }
.gallery__viewer-ctrl--next { right: 20px; }

/* ---------- compact spec (below gallery) ---------- */
.detail__spec.md-spec { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.md-spec__side { display: grid; gap: 6px; grid-auto-rows: min-content; }
.md-spec__list { display: flex; align-items: center; gap: 8px; }
.md-spec__ttl {
  min-width: 120px; min-height: 25px; height: 100%; background-color: var(--bg-light-gray);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.md-spec__text { font-size: 14px; }
.md-spec__text .price { font-weight: bold; color: #e00f32; }
.md-spec__text a { font-weight: bold; color: #07519A; }
.md-spec__text p { font-size: 13px; }

/* ---------- facility icons ---------- */
.md-facility { display: flex; gap: 12px; flex-wrap: wrap; }
.md-facility__items { width: 56px; }
.md-facility__icn {
  width: 56px; height: 56px; margin: 0 auto 2px; position: relative;
  background-color: var(--main-light-color); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.md-facility__icn .icon { width: 35px; height: 35px; color: var(--main-color); }
.md-facility__note { width: 56px; font-size: 10px; text-align: center; line-height: 1.1; }

.sale-point { margin-block: 16px 0; font-size: 14px; line-height: 1.7; }
.point-link-list { display: flex; flex-wrap: wrap; gap: 5px 2px; }
.point-link-list a {
  display: block; padding: 3px 8px; border: 1px solid var(--border-color); border-radius: 3px;
  background-color: #fff; font-size: 13px; color: #07519A;
}

/* ---------- summary tables (基本情報 / 設備条件 / その他) ---------- */
.summary__side + .summary__side { margin-top: 30px; }
.summary__side .ui-title--left { margin-bottom: 0; }
.room-summary { }
.md-spec__summary { display: grid; grid-template-columns: 1fr 1fr; }
.md-spec__summary__side { display: grid; grid-auto-rows: min-content; }
.summary__list { display: flex; border-bottom: 1px solid var(--border-color); }
/* dd/ttl vertical padding 9px (vs live 8) absorbs the summary region's
   font-metric shortfall vs the reference capture — see DIFF-detail.md §0. */
.summary__ttl { min-width: 125px; font-size: 13px; font-weight: bold; background: var(--bg-light-gray); padding: 9px 8px; display: flex; align-items: center; }
.summary__side dd { padding: 9px 8px; margin: auto 0; font-size: 13px; flex: 1; }
.summary__side dd a { color: #07519A; }
.summary__side dd ul li { line-height: 1.6; }
.summary__side .room_madori { display: block; }
.summary__howto { margin: 8px 0 0; text-align: right; }
.summary__howto button { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--rank-under); line-height: 1; }
.summary__howto .icon { width: 15px; height: 15px; color: var(--rank-under); }

/* ---------- map (Google Maps JS v3 lands in P1; grey placeholder here) ---------- */
.map { position: relative; }
#room_detail_map {
  width: 100%; height: 320px; border-radius: 4px; overflow: hidden; position: relative;
  background-color: #e8eaed;
  background-image:
    linear-gradient(0deg, rgba(180,190,198,.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,190,198,.55) 1px, transparent 1px),
    linear-gradient(0deg, rgba(180,190,198,.30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,190,198,.30) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 30px 30px, 30px 30px;
}
#room_detail_map::before {
  content: ""; position: absolute; left: 18%; top: -10%; width: 44%; height: 130%;
  background: linear-gradient(115deg, transparent 46%, #cfd8dc 46%, #cfd8dc 54%, transparent 54%);
  opacity: .8;
}
.map__tabs { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; box-shadow: var(--box-shadow); border-radius: 3px; overflow: hidden; }
.map__tab { background: #fff; font-size: 12px; padding: 6px 12px; color: var(--light-text-color); }
.map__tab.is-active { background: var(--dark-color); color: #fff; }
.map__pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-100%); z-index: 2;
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform-origin: bottom;
  background: var(--strong-color); rotate: -45deg; box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.map__pin::after { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.map__p1note { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 2; background: rgba(255,255,255,.86); border: 1px solid var(--border-color); border-radius: 4px; padding: 4px 12px; font-size: 12px; color: var(--light-text-color); }
.map__foot { margin: 5px 0 0; }
.map__link { display: flex; justify-content: flex-end; font-size: 12px; color: var(--rank-under); }

/* ---------- related property cards ---------- */
.detail-bkn { display: grid; gap: 16px; grid-template-columns: repeat(5, 152px); }
.detail-bkn__link { display: block; color: var(--dark-color); }
.detail-bkn__img { height: 115px; margin: 0 0 5px; }
.detail-bkn__img img { width: 100%; height: 100%; object-fit: contain; object-position: center; background-color: var(--bg-light-gray); }
.detail-bkn__text { font-size: 13px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.detail-bkn__price { font-size: 13px; }
.detail-bkn__price .price { font-size: 18px; font-weight: bold; color: #e50c30; }

/* ---------- contact card (sticky side) ---------- */
.contact-card { margin: 0; position: sticky; top: 20px; }
.contact-card__inner { background-color: #fff; border: 1px solid var(--border-color); border-radius: 6px; padding: 15px; }
.contact-bkn { display: none; }
.contact-card__info { text-align: center; }
.contact-card__ttl { margin-block: 0 8px; font-size: 16px; font-weight: bold; }
.contact-card__select { margin-block: 0 10px; text-align: left; }
.ui-select { position: relative; }
.ui-select select { appearance: none; width: 100%; height: 36px; border: 1px solid var(--border-color); border-radius: 4px; padding: 0 33px 0 10px; font-size: 13px; background: #fff; color: var(--dark-color); }
.ui-select .icon { width: 10px; height: 10px; position: absolute; top: 0; bottom: 0; right: 12px; margin: auto; color: var(--dark-color); }
.ui-contact-btn { background-color: var(--point-color); display: flex; gap: 5px; align-items: center; justify-content: center; height: 44px; font-size: 15px; font-weight: bold; color: var(--sub-font-color); border-radius: 6px; }
.contact-card__company { margin-block: 16px 3px; font-size: 14px; }
.contact-card__tel { margin-block: 0 7px; display: flex; gap: 5px; align-items: center; justify-content: center; font-size: 26px; font-weight: bold; color: var(--sub-color); line-height: 1; font-family: Arial; }
.contact-card__tel .icon { width: 22px; height: 22px; color: var(--sub-color); }
.contact-card__text { font-size: 13px; color: var(--light-text-color); }

/* ---------- info modal ("情報の見方") ---------- */
.md-modal { background-color: #fff; width: 640px; max-width: 92vw; position: fixed; top: 50%; left: 50%; z-index: 1001; transform: translate(-50%, -50%); visibility: hidden; opacity: 0; border-radius: 6px; }
.md-modal[aria-hidden="false"] { opacity: 1; visibility: visible; }
.md-modal__ttl { padding: 15px 0 12px; border-bottom: 1px solid var(--border-color); font-size: 15px; font-weight: bold; text-align: center; }
.md-modal__body { padding: 30px; overflow-y: auto; max-height: 60vh; }
.terminology dl + dl { margin-top: 18px; }
.terminology__ttl { font-weight: bold; font-size: 16px; margin-top: 5px; }
.terminology dd { font-size: 13px; line-height: 1.7; margin-top: 4px; }
.ui-close-btn { position: absolute; right: 0; bottom: calc(100% + 9px); width: 30px; height: 30px; }
.ui-close-btn::before, .ui-close-btn::after { content: ""; width: 100%; height: 1px; background-color: #fff; position: absolute; inset: 0; margin: auto; }
.ui-close-btn::before { transform: rotate(45deg); }
.ui-close-btn::after { transform: rotate(-45deg); }
.ui-overlay { width: 100%; height: 100%; background-color: var(--bg-dark-transparent); position: fixed; top: 0; left: 0; z-index: 1000; opacity: 0; visibility: hidden; }
.ui-overlay.is-show { opacity: 1; visibility: visible; }

/* footer bottom padding tuned to the reference capture's footer height
   (556px vs the shared 523px) — detail-page-only override, see DIFF-detail.md. */
.l-footer { padding-bottom: 53px; }

/* ---------- floating reservation tab (shown on detail pages) ---------- */
.reservation-side-link {
  width: 69px; height: 220px; background-color: var(--sub-color); border-bottom-left-radius: 8px;
  box-shadow: var(--box-shadow); display: flex; align-items: center; justify-content: center;
  position: fixed; top: 200px; right: 1px; z-index: 10;
}
.reservation-side-link .icon { width: 20px; height: 20px; color: var(--sub-font-color); position: absolute; top: 25px; }
.reservation-side-link-text { position: absolute; writing-mode: vertical-rl; font-size: 20px; font-weight: bold; letter-spacing: 13px; bottom: 25px; color: var(--sub-font-color); }
