@charset "UTF-8";
/* --- 全体・基本設定 --- */
body {
  margin: 0;
  /* ★元の全画面スクロールの仕組みに戻します */
  height: 1150vh;
  background-color: #FFF;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
/* ヘッダー */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  border-bottom: 1px solid #000;
  padding: 12px 20px;
  box-sizing: border-box;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header h1 {
  margin: 0;
  font-size: 1.1em;
  font-weight: bold;
  letter-spacing: 0.05em;
}
.header nav a {
  color: #000;
  text-decoration: none;
  margin: 5px 4px;
  padding: 6px 10px;
  border: 1px solid #000;
  border-radius: 3px;
  transition: background 0.2s;
  font-size: 0.75em;
  font-weight: bold;
}
.header nav a:hover {
  background: rgba(0, 0, 0, 0.1);
}
/* ハンバーガーボタン */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  position: relative;
  cursor: pointer;
  z-index: 210;
  padding: 0;
}
.hamburger-btn span {
  display: block;
  position: absolute;
  left: 3px;
  width: 24px;
  height: 2px;
  background-color: #000;
  transition: transform 0.3s, opacity 0.3s, top 0.3s;
}
.hamburger-btn span:nth-child(1) { top: 7px; }
.hamburger-btn span:nth-child(2) { top: 14px; }
.hamburger-btn span:nth-child(3) { top: 21px; }
.hamburger-btn.is-active span:nth-child(1) {
  top: 14px;
  transform: rotate(45deg);
}
.hamburger-btn.is-active span:nth-child(2) { opacity: 0; }
.hamburger-btn.is-active span:nth-child(3) {
  top: 14px;
  transform: rotate(-45deg);
}
/* フッター */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  border-top: 1px solid #000;
  padding: 12px 20px;
  box-sizing: border-box;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer small {
  font-size: 0.75em;
  letter-spacing: 0.05em;
  font-weight: 500;
}
/* 視点コンテナ */
.viewport-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  perspective: 700px;
  perspective-origin: 50% 50%;
  overflow: hidden;
}
/* 3D空間コンテナ */
.scene {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
/* ポスターコンテナ */
#poster-container {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: -15;
}
/* 個々のポスター */
.wall-poster {
  position: absolute;
  background-color: rgba(0, 0, 0, 0);
  color: #000;
  font-size: 1.3em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
  padding: 20px;
  transition: transform 0.05s linear;
}
.wall-poster p {
  margin: 0;
  font-size: 0.6em;
  line-height: 1.4;
  font-weight: bold;
  opacity: 0.8;
  word-break: break-all;
}
/* メインコンテンツ要素 */
.layer {
  position: absolute;
  width: 320px;
  height: auto;
  max-height: 520px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(0px);
  background: #000;
  border: 3px solid #000;
  color: #FFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 25px;
  box-sizing: border-box;
  font-size: 1.5em;
  transition: transform 0.05s linear, opacity 0.2s;
  z-index: 50;

  /* ★超重要：初期状態では非表示＆タッチイベントをブラウザレベルで完全に無効化 */
  visibility: hidden; 
  pointer-events: none;
}
.layer h2.layer-title-area {
  margin: 0;
  font-size: 1.1em;
  text-align: center;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 15px;
}
.layer h2.layer-title-area img.logo-img {
  max-width: 100%;
  height: auto;
  max-height: 105px;
  object-fit: contain;
}
.layer p.subtitle {
  margin: 5px 0 15px 0;
  font-size: 0.5em;
  text-align: center;
  opacity: 0.7;
}

/* ★一番最初と同じシンプルな使い慣れたスタイル。余計なプロパティは全削除 */
.layer .scrollable-content {
  width: 90%;
  height: auto;
  max-height: 280px;
  overflow-y: auto; /* 標準のスクロールバー */
  margin: 0 auto 15px auto;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.45em;
  line-height: 1.6;
  text-align: left;
  -webkit-overflow-scrolling: touch; /* iOSの滑らかな慣性スクロール */
}

/* ★超重要：現在正面に見えているアクティブなレイヤーだけを物理的に有効化するクラス */
.layer.is-visible, .background-info.is-visible {
  visibility: visible !important;
  pointer-events: auto !important;
}

.layer .scrollable-content h4 {
  margin: 18px 0 6px 0;
  font-size: 1.15em;
  border-left: 2px solid #FFF;
  padding-left: 6px;
  letter-spacing: 0.05em;
}
.layer .scrollable-content h4:first-child { margin-top: 0; }
.layer .scrollable-content p { margin: 0 0 10px 0; }
.layer .scrollable-content p strong {
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 1px;
}
.layer .scrollable-content ul { margin: 5px 0 12px 0; padding-left: 15px; }
.layer .scrollable-content li { margin-bottom: 6px; }

/* お知らせリスト */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-item {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background 0.2s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: rgba(255, 255, 255, 0.08); }
.news-date { font-size: 0.85em; color: #aaa; display: block; margin-bottom: 2px; }
.news-title { font-weight: bold; font-size: 0.95em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ポップアップ（モーダル） */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.is-active { opacity: 1; pointer-events: auto; }
.modal-window {
  background: #FFF;
  color: #000;
  width: 90%;
  max-width: 440px;
  padding: 25px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 2px solid #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal-overlay.is-active .modal-window { transform: scale(1); }
.modal-header { border-bottom: 1px solid #000; padding-bottom: 10px; margin-bottom: 15px; }
.modal-date { font-size: 0.8em; color: #666; font-weight: bold; }
.modal-title { margin: 5px 0 0 0; font-size: 1.1em; font-weight: bold; line-height: 1.4; }
.modal-body { font-size: 0.85em; line-height: 1.6; max-height: 260px; overflow-y: auto; white-space: pre-wrap; }
.modal-close-btn {
  display: block;
  margin: 20px 0 0 auto;
  padding: 8px 20px;
  background: #000;
  color: #FFF;
  border: 1px solid #000;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  font-weight: bold;
  transition: background 0.2s, color 0.2s;
}
.modal-close-btn:hover { background: #FFF; color: #000; }

/* CTAエリア */
.cta-area {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  text-align: center;
  border-top: 2px solid #000;
  margin-top: auto;
}
.cta-area p { margin: 0 0 8px 0; font-size: 0.5em; font-weight: bold; }
.cta-area button {
  padding: 8px 24px;
  background-color: #000;
  color: #FFF;
  border: 1px solid #000;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.45em;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s;
}
.cta-area button:hover { background-color: #FFF; color: #000; }

/* 線の描画用コンテナ */
.line-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -20; }
.connection-line { position: absolute; background-color: rgba(0, 0, 0, 0.15); height: 1px; transform-origin: 0 0; width: 0; top: 0; left: 0; }

/* 最奥の白ベタレイヤー（COMPANY） */
.background-info {
  position: absolute;
  width: 640px;
  height: auto;
  max-height: 840px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(-12500px);
  background-color: #FFF;
  color: #000;
  border: 2px dashed #000;
  padding: 25px;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.05s linear, opacity 0.2s;
  z-index: -10;
  transform-style: preserve-3d;

  /* ★layerと同様に非表示＆タッチ無効化 */
  visibility: hidden; 
  pointer-events: none;
}
.background-info h3 { margin: 0 0 15px 0; font-size: 1.3em; letter-spacing: 0.05em; }

.background-info .scrollable-info {
  flex-grow: 1;
  overflow-y: auto;
  padding: 15px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
  font-size: 0.75em;
  line-height: 1.7;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}
.background-info .scrollable-info h4 { margin: 24px 0 8px 0; font-size: 1.1em; border-bottom: 1px solid #000; padding-bottom: 4px; }
.background-info .scrollable-info h4:first-child { margin-top: 0; }
.background-info .scrollable-info table { width: 100%; border-collapse: collapse; margin: 10px 0 20px 0; }
.background-info .scrollable-info th, .background-info .scrollable-info td { padding: 10px 8px; border-bottom: 1px solid #ddd; font-size: 0.95em; vertical-align: top; }
.background-info .scrollable-info th { width: 25%; text-align: left; font-weight: bold; background: rgba(0, 0, 0, 0.04); }
.scrollable-content a { color: #FFF; }

/* モバイル対応 */
@media (max-width: 600px) {
  .header { padding: 15px 20px; }
  .hamburger-btn { display: block; }
  .header nav {
    position: absolute; top: 100%; left: 0; width: 100%; background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid #000;
    display: flex; flex-direction: column; padding: 15px 0; box-sizing: border-box;
    transform: translateY(-120%); opacity: 0; pointer-events: none; transition: transform 0.3s ease, opacity 0.3s ease; z-index: 199;
  }
  .header nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .header nav a { margin: 4px 20px; padding: 10px; text-align: center; font-size: 0.8em; border: 1px solid #000; background: #FFF; }
  .footer { padding: 8px 10px; }
  .footer small { font-size: 0.65em; }
  .layer { width: 290px; max-height: 460px; }
  .background-info { width: 90%; max-height: 75vh; }
}