/* ===== ヘッダー ===== */

.site-header{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  border-bottom: 1px solid #ddd;
  background: white;
}

/* 左ロゴ */
.logo-left{
  position: absolute;
  left: 15px;
}

.logo-left img{
  height: 40px;
}

/* 中央タイトル */
.site-title{
  font-size: 20px;
  font-weight: bold;
}

/* 右ロゴ */
.logo-right{
  position: absolute;
  right: 60px;
}

.logo-right img{
  height: 40px;
}

/* infoボタン */
.info-btn{
  position: absolute;
  right: 15px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* 右上ロゴ */

.top-logo{
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 2500;
}

.top-logo img{
  height: 20px;
  width: auto;
}

/* 白背景フォント */
html, body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: white;
}

.viewer-container {
  touch-action: none;
}

* {
  -webkit-user-select: none;
  user-select: none;
}

button {
  -webkit-tap-highlight-color: transparent;
}

h1 {
  text-align: center;
  margin: 10px 0;
}

/* 左上ボタン */
.top-buttons {
  position: fixed;
  top: 15px;
  left: 15px;
  display: flex;
  gap: 10px;
  z-index: 2000;
}

.top-buttons button {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  transition: 0.2s;
}

.top-buttons button:hover {
  background: #f0f0f0;
}

/* モーダル */
.modal-overlay {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.2);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.modal {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 60%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  text-align: center;
}

/* model-viewer */
.viewer-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 140px);
}

model-viewer {
  width: 100%;
  height: calc(60vh - 20px);
  display: block;
}

/* 線レイヤー */
#lineLayer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* ホットスポット */
.Hotspot {
  width: 18px;
  height: 18px;
  background: crimson;
  border-radius: 50%;
  border: 2px solid white;
  position: relative;
  z-index: 10;
  transition: opacity 0.2s;
  cursor: pointer;
  opacity: 1;
}

.HotspotAnnotation {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  white-space: nowrap;
}

.popup-image {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  display: none;
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/*下部ボタン*/
.bottom-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ddd;
  background: white;
  z-index: 1500;
}

.job-item {
  cursor: pointer;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  transition: all 0.2s ease;
}

.job-item:hover {
  background: #eee;
}

.job-item.active {
  background: crimson;
  color: white;
  border-color: crimson;
  font-weight: bold;
}

.dim {
  opacity: 0.2;
}

/* index専用 */
.menu {
  margin-top: 20px;
}

.menu button {
  display: block;
  margin: 10px auto;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  cursor: pointer;
  transition: 0.2s;
}

/* 目立たせたいメインボタン */
.menu button:hover {
  background: #eee;
}

.menu button.main-feature{
  background: linear-gradient(135deg,#ff4d6d,#ff9a3c);
  color:white;
  border:none;
  font-weight:bold;
}

.main-feature:hover{
  background: linear-gradient(135deg,#ff002b,#ff7b1f);
  transform:translateY(-2px);
}

/* スマホ最適化 */
@media (max-width: 768px) {

  h1 {
    font-size: 18px;
    margin-top: 60px;
  }

  .viewer-container {
    height: auto;
  }

  model-viewer {
    height: 55vh;
  }

  .bottom-panel {
    height: auto;
    padding: 10px 0;
    flex-wrap: wrap;
  }

  .job-item {
    font-size: 12px;
    padding: 8px 10px;
    margin: 4px;
  }

  .modal {
    width: 90%;
  }

    /* ロゴ小さくする */
  .logo-left img,
  .logo-right img{
    height: 20px;
  }

  /* タイトルも少し縮める */
  .site-title{
    font-size: 16px;
  }

  /* ヘッダー高さ調整 */
  .site-header{
    height: 50px;
  }

}
/* ===== searchsort ===== */

.searchsort {
  position: relative;
  width: 250px;
}

#searchInput {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.search-dropdown {
  position: absolute;
  top: 40px;
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
  display: none;
  z-index: 5000;
}

.search-option {
  padding: 8px;
  cursor: pointer;
}

.search-option:hover {
  background: crimson;
  color: white;
}

/* ===== modelviewer専用スコープ ===== */

.viewer-container {
  position: relative;
}

/* 検索UIを3Dの少し下に配置 */

.viewer-container{
  position: relative;
}

.mv-search{
  position: absolute;
  bottom: 500px;  /* ← ここで「少し下」調整 */
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  z-index: 5000;
}

#searchInput{
  width: 100%;
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  text-align: center;
  font-size: 14px;
}

.mv-dropdown{
  margin-top: 6px;
  background: white;
  border-radius: 14px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.viewer-container .search-option {
  padding: 10px;
  cursor: pointer;
}

.viewer-container .search-option:hover {
  background: crimson;
  color: white;
}

/* ===== ホットスポット透明制御 ===== */

/* 通常は100% */
.viewer-container .Hotspot {
  opacity: 1;
  transition: 0.3s;
}

/* 押されたやつ */
.viewer-container .Hotspot.active {
  opacity: 1;
}

/* 押された以外 */
.viewer-container .Hotspot.dim {
  opacity: 0.2;
}

/* -----===== フッター ===== */

.site-footer{
  margin-top:40px;
  padding:30px 10px;
  background: #ea6000;
  color:white;
  text-align:center;
}

/* リンク */

.footer-links{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:20px;
  margin-bottom:15px;
}

.footer-links a{
  color:white;
  text-decoration:none;
  font-size:14px;
}

.footer-links a:hover{
  text-decoration:underline;
}

/* コピーライト */

.footer-copy{
  font-size:13px;
  opacity:0.9;
}