* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -ms-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -ms-content-zooming: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

html, body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  background-color: #000;
  color: #fff;
}

a, a:hover, a:active, a:visited {
  text-decoration: none;
  color: inherit;
}

h1{
font-size: 30px;
}

#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* シーン切替時の「前方移動」エフェクト（暗いオーバーレイやズームを置換し、
   #pano を縦方向に引き伸ばすことで前進感を演出する） */

/* transform の遷移を滑らかにする指定 */
#pano {
  will-change: transform;
  transition: transform 420ms cubic-bezier(.2,.8,.2,1);
  transform-origin: 50% 50%;
}

/* 縦方向に引き伸ばして前進感を与える（横は僅かに縮める） */
.pano-stretch {
  /* scaleX を少し抑え縦を強調、translateY で視点を前に移動させる */
  transform: scaleX(0.995) scaleY(1.12) translateY(-2%);
  filter: none;
}

/* 以前の強い暗色オーバーレイを廃止し、ほのかなハイライト層のみ残す */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 12500;
  background: radial-gradient(circle at 50% 45%,
                              rgba(255,255,255,0.02) 0%,
                              rgba(255,255,255,0.00) 60%);
  opacity: 0;
  transition: opacity 220ms ease-in-out;
}
.transition-overlay.visible { opacity: 1; }

#titleBar {
  position: absolute;
  top: 0;
  left: 0;
  right: 40px;
  height: 56px; /* タイトル領域を拡大して大きなフォントに対応 */
  text-align: center;
}

.title{
  padding-bottom: 10px;
}

.mobile #titleBar {
  height: 66px; /* モバイルでも余裕を確保 */
  right: 50px;
}

/* フルスクリーンボタンがある場合、タイトルバーに余白を確保する */
body.fullscreen-enabled #titleBar {
  right: 80px;
}

body.fullscreen-enabled.mobile #titleBar {
  right: 100px;
}

/* シーンが複数ある場合は、シーンリスト用のスペースを確保する */
body.multiple-scenes #titleBar {
  left: 60px;
}

body.multiple-scenes.mobile #titleBar {
  left: 70px;
}

#titleBar .sceneName {
  display: inline-block;
  max-width: calc(100% - 160px); /* コントロール領域を少し広めに確保 */
  height: auto;
  line-height: 1.1;
  padding: 10px 20px;             /* パディングを増やして見やすく */
  margin: 10px auto 0 auto;
  background-color: rgba(20,24,30,0.48); /* 深めの半透明 */
  color: #fff;
  font-size: 20px;                /* フォントを大きくする（デスクトップ） */
  font-weight: 700;               /* より明瞭に */
  letter-spacing: 0.2px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* モバイル時は少し大きめに見せる */
.mobile #titleBar .sceneName {
  font-size: 18px;  /* モバイルでも読みやすいサイズに */
  padding: 12px 16px;          /* 横の余白を少し縮めて表示領域を確保 */
  margin: 8px 10px;           /* 上下のスペースを調整 */
  max-width: calc(100% - 90px);/* 左右コントロールを考慮して幅を拡張 */
  width: calc(100% - 90px);
  display: block;
  line-height: 1.2;
  white-space: normal;        /* 改行を許可して長い名前を表示 */
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;     /* 単語が長い場合は折り返す */
}

/* Language toggle button */
.language-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  gap: 4px;
  background: rgba(67, 67, 67, 0.9);
  border-radius: 4px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-btn {
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.2s ease;
  font-family: inherit;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
  background: rgba(245, 183, 0, 0.8);
  color: #000;
  font-weight: 600;
}

@media (max-width: 768px) {
  .language-toggle {
    top: 10px;
    right: 10px;
  }
  
  .lang-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}