/* 3Dタワー セクション専用スタイル（コーポレートサイトに埋め込み・他CSSと衝突しないクラスのみ） */
:root { --shu-br: #d4574a; }

.tower-section {
  height: 680vh;            /* スクロール距離（オープニング + 11階降下） */
  position: relative;
  background: #14110e;
}
.tower-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #14110e;
  background-image: radial-gradient(120% 80% at 30% 30%, #1d1813 0%, #14110e 60%, #0f0c09 100%);
}
#gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* HUD */
.hud { position: absolute; z-index: 3; color: #f7f3ec; pointer-events: none; }
.hud--brand {
  top: 26px; left: 30px;
  display: flex; align-items: center; gap: 10px;
  font-family: "Shippori Mincho", serif;
  letter-spacing: 0.26em; font-size: 13px; opacity: 0.92;
}
.hud--floor { left: 30px; bottom: 92px; }
.hud--floor .floorno {
  font-family: "Shippori Mincho", serif;
  font-size: 58px; line-height: 1;
  color: var(--shu-br);
  text-shadow: 0 0 18px rgba(214, 67, 59, 0.45);
  display: flex; align-items: baseline; gap: 8px;
}
.hud--floor .floorno__total { font-size: 18px; color: #6e665c; }
.hud--floor .floorlabel {
  margin-top: 6px; font-size: 11px; letter-spacing: 0.3em;
  color: var(--shu-br); text-transform: uppercase;
}

/* 右パネル（物件カード） */
.panel {
  position: absolute; z-index: 4;
  top: 50%; right: 40px; transform: translateY(-50%);
  width: min(34vw, 380px);
  height: clamp(430px, 72vh, 520px);
  pointer-events: none;
}
.pcard {
  position: absolute; inset: 0;
  background: #f7f3ec; border: 1px solid #ded7cb; border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden; opacity: 0; visibility: hidden; pointer-events: auto;
  color: inherit; text-decoration: none; cursor: pointer;
}
.pcard__media { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #2a241e; overflow: hidden; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard__ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: #ded7cb; font-size: 13px; letter-spacing: 0.12em;
  background: repeating-linear-gradient(45deg, #2a241e, #2a241e 10px, #322b24 10px, #322b24 20px);
}
.pcard__chips { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.pcard__chip { font-size: 11px; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 2px; background: rgba(28, 26, 23, 0.78); color: #f7f3ec; }
.pcard__chip.is-vac { background: #b7352a; }
.pcard__index { position: absolute; top: 12px; right: 14px; font-family: "Shippori Mincho", serif; font-size: 13px; letter-spacing: 0.1em; color: #f7f3ec; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.pcard__body { padding: 18px 20px 20px; }
.pcard__name { margin: 0 0 4px; font-family: "Shippori Mincho", serif; font-weight: 600; font-size: 21px; letter-spacing: 0.02em; color: #1c1a17; }
.pcard__access { margin: 0 0 14px; font-size: 13px; color: #b7352a; letter-spacing: 0.02em; }
.pcard__spec { margin: 0; border-top: 1px solid #ded7cb; padding-top: 12px; display: grid; grid-template-columns: 5em 1fr; row-gap: 7px; font-size: 13px; line-height: 1.5; }
.pcard__spec dt { color: #6e665c; } .pcard__spec dd { margin: 0; color: #1c1a17; }
.pcard__note { margin: 12px 0 0; font-size: 12.5px; color: #48312e; line-height: 1.6; }
.pcard__cta { display: inline-block; margin-top: 14px; font-size: 12px; letter-spacing: 0.08em; color: #b7352a; }

/* 進捗 + スクロールキュー */
.tower-progress { position: absolute; z-index: 3; left: 30px; right: 30px; bottom: 38px; height: 2px; background: rgba(247, 243, 236, 0.14); }
.tower-progress span { display: block; height: 100%; width: 0%; background: var(--shu-br); }
.tower-cue { position: absolute; z-index: 3; left: 50%; bottom: 52px; transform: translateX(-50%); font-size: 11px; letter-spacing: 0.28em; color: rgba(247, 243, 236, 0.6); pointer-events: none; transition: opacity .5s; }
.tower-loader {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  border-radius: 2px;
  background: rgba(20, 17, 14, 0.72);
  color: rgba(247, 243, 236, 0.86);
  font-size: 12px;
  letter-spacing: 0.16em;
  pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.tower-ready .tower-loader {
  opacity: 0;
  transform: translate(-50%, -44%);
}

/* モバイル: パネルを下部シート化 */
@media (max-width: 880px) {
  .tower-section { height: 520vh; }
  .tower-stage { height: 100svh; touch-action: pan-y; }
}

@media (max-width: 720px) {
  .panel { top: auto; bottom: 96px; right: 18px; left: 18px; width: auto; transform: none; height: 108px; }
  .pcard { display: flex; }
  .pcard__media { width: 34%; aspect-ratio: auto; flex: none; }
  .pcard__body { padding: 10px 12px; overflow: hidden; }
  .pcard__name { font-size: 15px; line-height: 1.35; margin-bottom: 2px; }
  .pcard__spec { display: none; }
  .pcard__access { margin-bottom: 4px; font-size: 11px; line-height: 1.45; }
  .pcard__note { margin-top: 0; font-size: 11px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pcard__cta { margin-top: 4px; font-size: 10px; }
  .pcard__chips { top: 9px; left: 9px; }
  .pcard__chip { font-size: 10px; padding: 2px 7px; }
  .pcard__index { display: none; }
  .hud--floor { top: 132px; left: 16px; bottom: auto; opacity: .82; }
  .hud--floor .floorno { font-size: 30px; gap: 5px; }
  .hud--floor .floorno__total { font-size: 14px; }
  .hud--floor .floorlabel { margin-top: 2px; font-size: 10px; letter-spacing: .16em; max-width: 15em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hud--brand { left: 16px; top: 18px; }
  .tower-progress { left: 16px; right: 16px; bottom: 22px; }
  .tower-cue {
    display: block;
    left: 16px;
    right: 16px;
    bottom: 50px;
    transform: none;
    text-align: center;
    writing-mode: horizontal-tb;
    letter-spacing: 0.12em;
    color: rgba(247, 243, 236, 0.78);
  }
  .tower-loader {
    top: 42%;
    font-size: 11px;
  }
}
