body {
  margin: 0;
  background-color: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Yu Gothic UI', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overscroll-behavior: none;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* iframe用スクロールバー対策（最小限の追加） */
  overflow-x: hidden; /* 横スクロールバーのみ非表示 */
}

a {
  color: #a00070;
  text-decoration: none;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.015em;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

#container {
  position: absolute;
}

#info {
  position: absolute;
  top: 0px;
  width: 100%;
  text-align: center;
  /* 中央よりもう少し右にずらす（4文字分程度） */
  transform: translateX(4em);
}

#info1 {
  padding: 16px 20px;
  font-weight: 400;
  letter-spacing: 0.025em;
}

#info1 a {
  color: #bcbcf3;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.015em;
  transition: all 0.2s ease;
}

#info1 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

#info1 h3 {
  margin: 18px 0 12px 0;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #ffffff;
}

#info1 h3 a {
  font-size: 20px;
  font-weight: 500;
  margin: 0 6px;
}

#info1 h5 {
  margin: 18px 0 12px 0;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #ffffff;
}

#info1 h5 a {
  font-size: 20px;
  font-weight: 500;
  margin: 0 6px;
}


#info2 {
  padding: 12px 20px;
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.4;
  color: #cccccc;
  font-variant-numeric: tabular-nums;
}

#info2 span {
  color: #ffffff;
  font-weight: 500;
}

#message {
  display: none; /* 元のメッセージを非表示 */
}

/* 日本語文字の最適化 */
:lang(ja) {
  font-feature-settings: "palt" 1, "kern" 1;
  text-spacing: ideograph-alpha ideograph-numeric;
}

/* 統合されたコントロールパネル - 地図の幅に合わせてレスポンシブ対応 */
.unified-control-panel {
  position: absolute;
  top: calc(60vh + 28px + 8px); /* 地図の高さ(60%) + 地図のtop(28px) + 余白(8px) */
  bottom: auto;
  left: 2px; /* 地図と同じ左位置 */
  /* 地図と同じ幅に調整 */
  width: calc(25% - 4px); /* 地図の幅（25%）から左右余白を引く */
  min-width: 300px; /* 最小幅を確保してボタンが崩れないように */
  
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  /*z-index: 1000;*/
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
}

/* 時間表示 */
.time-display {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  gap: 8px;
  min-height: 20px;
}

/* プログレスバー */
.progress-container {
  margin-bottom: 12px;
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 3px;
  transition: width 0.1s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #007bff;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ボタンレイアウト - デスクトップ */
.button-groups {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: nowrap;
}

.button-group {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.button-group:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 24px;
  background: rgba(0, 0, 0, 0.15);
}

.control-btn {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 8px;
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
  white-space: nowrap;
}

/* 基本ボタンのホバー効果を青系に変更 */
.control-btn:hover {
  background: linear-gradient(145deg, #e9ecef, #dee2e6);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
  transform: translateY(-1px);
  border-color: rgba(0, 123, 255, 0.3);
}

/* シークボタンのホバー効果 */
.seek-btn:hover {
  background: linear-gradient(145deg, #e9ecef, #dee2e6);
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.4);
}

/* 再生/一時停止ボタンのホバー効果はそのまま */
.play-pause-btn:hover {
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: white;
}

.play-pause-btn.playing:hover {
  background: linear-gradient(145deg, #e0a800, #d39e00);
}

/* 速度ボタンのホバー効果 */
.speed-btn:hover {
  background: linear-gradient(145deg, #e9ecef, #dee2e6);
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
  border-color: rgba(108, 117, 125, 0.4);
}

/* 操作説明ボタンのスタイル */
.help-btn {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #333;
  font-weight: bold;
  font-size: 16px;
  min-width: 32px;
}

.help-btn:hover {
  background: linear-gradient(145deg, #e9ecef, #dee2e6);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
  border-color: rgba(0, 123, 255, 0.3);
}

.speed-dropdown {
  position: absolute;
  top: -200px;
  left: 0;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 6px 0;
  min-width: 70px;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  max-height: 180px;
  overflow-y: auto;
}

.speed-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.speed-option {
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-weight: 500;
  font-size: 13px;
}

.speed-option:hover {
  background: #f8f9fa;
}

.speed-option.selected {
  background: #007bff;
  color: white;
}

.tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  margin-bottom: 6px;
  pointer-events: none;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 3px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
}

.control-btn:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* 操作説明パネル - 地図の右側に配置 */
#op_buttons {
  position: absolute;
  /* 地図のすぐ右側に配置 */
  left: calc(25% + 8px); /* マップ幅（25%）+ 余白（8px） */
  /* コントロールパネルのすぐ上に配置 */
  bottom: calc(41vh - 28px - 8px); /* 画面下端から41vh（地図下端の逆算）- 地図のtop（28px）- 余白（8px） */
  
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  
  width: calc(75% - 25% - 16px); /* 画面幅 - マップ幅 - 余白 */
  max-width: 500px;
  min-width: 300px;
  
  font-size: 14px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  line-height: 1.6;
  color: #333;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-sizing: border-box;
}

#op_buttons::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

#op_buttons::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

#op_buttons::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

.op-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 16px;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.op-section {
  margin-bottom: 20px;
}

.op-section:last-child {
  margin-bottom: 0;
}

.op-section-title {
  font-weight: bold;
  color: #222;
  margin-bottom: 8px;
  font-size: 15px;
}

.op-section-content {
  color: #555;
  margin-bottom: 4px;
}

.op-operation-list {
  margin-top: 12px;
}

.op-operation-item {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  padding-left: 12px;
  position: relative;
}

/* 番号の代わりに小さな丸印を追加 */
.op-operation-item::before {
  content: '●';
  color: #6c757d;
  font-size: 8px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
}

.op-operation-text {
  flex: 1;
}

/* 操作名（360°視点移動など）のスタイルを調整 */
.op-operation-text strong {
  font-weight: 600;
  color: #444;
  font-size: 14px;
}

.op-button-highlight {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  margin: 0 2px;
}

/* プログレスバーのホバー効果 */
.progress-bar:hover .progress-fill::after {
  width: 12px;
  height: 12px;
}

/* 現在時間の色 */
.current-time {
  color: #007bff;
}

/* 総時間の色 */
.total-time {
  color: #6c757d;
}

/* 既存の要素のスタイル調整 */
#button1 {
  position: absolute;
  bottom: 5%;
  left: 50%;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

img {
  pointer-events: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

/*
#map_image {
  position: absolute;
  top: 28px;
  left: 0px;
  width: 25%;
  height: 60%;
}*/

#map_image {
  position: absolute;
  top: 5px;
  left: 10px;
  width: 27%;
  height: 62%;
}

#marker {
  position: absolute;
  left: 0px;
  top: 0px;
}

#marker2 {
  position: absolute;
  left: 0px;
  top: 0px;
}

#video {
  position: absolute;
  top: 75%;
  left: 0px;
  width: 25%;
}

#myText {
  position: absolute;
  left: 0px;
  top: 0px;
  font-size: 16px;
  font-weight: bold;
}

#movie {
  position: absolute;
  top: 75%;
  left: 0px;
  width: 25%;
}

#audio {
  position: absolute;
  left: 0px;
  bottom: 0%;
}

.btn1 {
  cursor: pointer;
  background: transparent;
  color: #ffffff;
  border: 1px solid #fff;
  text-transform: uppercase;
  min-width: 20px;
  max-width: 40px;
  min-height: 15px;
  max-height: 30px;
  width: 5vw;
  height: 5vh;
}

.btn1:hover {
  text-decoration: underline;
}

#panel_controls {
  position: absolute;
  bottom: 3%;
  left: 65%;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

/* 既存のボタンスタイルを非表示に */
.btn {
  cursor: pointer;
  text-transform: uppercase;
  min-width: 30px;
  max-width: 80px;
  min-height: 15px;
  max-height: 40px;
  width: 5vw;
  height: 5vh;
}

#buttons {
  position: absolute;
  bottom: 5%;
  left: 40%;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

#go_button {
  position: absolute;
  left: 0px;
  bottom: 0px;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

#go_button input {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #333;
  cursor: pointer;
  padding: 12px 20px;
  min-width: 120px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  white-space: nowrap;
}

#go_button input:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}

#go_button input:active {
  transform: translateY(0px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ダークテーマ版 */
#go_button input.dark {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#go_button input.dark:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Windows環境での日本語フォント最適化 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  body {
    font-family: 'Yu Gothic UI', 'Meiryo UI', 'Segoe UI', sans-serif;
  }
}

/* macOS環境での日本語フォント最適化 */
@supports (-webkit-appearance: none) {
  body {
    font-family: -apple-system, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
  }
}

/* =============== レスポンシブ対応：コントロールパネルのみ =============== */

/* スマホサイズ (768px以下) - コントロールパネルのボタン配置を縦に変更 */
@media (max-width: 768px) {
  /* タイトル位置を中央に戻す */
  #info {
    transform: translateX(0) !important;
  }

  /* コントロールパネルのボタンレイアウトを縦に変更 */
  .unified-control-panel {
    min-width: 200px; /* スマホではもう少し小さく */
    padding: 12px 8px;
  }

  .button-groups {
    flex-direction: column; /* ボタンを縦に並べる */
    gap: 8px;
    align-items: stretch; /* ボタンを横幅いっぱいに */
  }

  .button-group {
    width: 100%;
    justify-content: center;
    gap: 4px;
  }

  .button-group::after {
    display: none; /* 縦並びでは区切り線を非表示 */
  }

  /* 再生ボタンは単独で配置 */
  .button-group:first-child {
    margin-bottom: 4px;
  }

  .control-btn {
    font-size: 12px;
    padding: 8px 6px;
    min-width: 40px;
    height: 32px;
    flex: 1; /* ボタンを均等配置 */
    max-width: none;
  }

  .play-pause-btn {
    min-width: 60px;
    font-size: 14px;
  }

  .seek-btn {
    font-size: 10px;
  }

  .help-btn {
    font-size: 14px;
  }

  .time-display {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .progress-bar {
    height: 8px;
    margin-bottom: 10px;
  }

  .progress-fill::after {
    width: 12px;
    height: 12px;
  }

  .tooltip {
    font-size: 10px;
    padding: 3px 6px;
  }

  .speed-dropdown {
    top: -140px;
    min-width: 60px;
  }

  .speed-option {
    padding: 5px 8px;
    font-size: 12px;
  }

  /* 操作説明パネルも少し調整 */
  #op_buttons {
    font-size: 13px;
    padding: 12px;
  }
}

/* 非常に小さい画面 (480px以下) */
@media (max-width: 480px) {
  .unified-control-panel {
    min-width: 180px;
    padding: 8px 6px;
  }

  .control-btn {
    font-size: 11px;
    padding: 6px 4px;
    min-width: 35px;
    height: 28px;
  }

  .play-pause-btn {
    min-width: 50px;
    font-size: 13px;
  }

  .seek-btn span {
    font-size: 9px;
  }

  .time-display {
    font-size: 11px;
  }

  #op_buttons {
    font-size: 12px;
    padding: 10px;
  }

  .op-title {
    font-size: 14px;
  }

  .op-section-title {
    font-size: 13px;
  }
}

/* 高解像度ディスプレイ対応 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    font-weight: 300;
  }
  
  #info1 h3 {
    font-weight: 500;
  }
  
  #info1 a {
    font-weight: 400;
  }
}

/* 時間情報を左側にまとめる */
.time-info {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* 時間情報を非表示にするクラス */
.time-info.hidden {
  display: none;
}

/* メッセージエリア - 時間表示の代わりに表示 */
.control-message {
  color: #555;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  display: none; /* デフォルトで非表示 */
  overflow: visible;
}

/* メッセージ表示時 */
.control-message.show {
  display: block;
}

/* スマホでのメッセージフォントサイズ調整 */
@media (max-width: 768px) {
  .control-message {
    font-size: 12px;
    white-space: normal; /* スマホでは改行を許可 */
  }
}