/* --- ベース設定 --- */
body {
  background: #E5E5E5;

  /* ▼ 修正: 完全スクロール禁止セット */
  overflow: hidden;
  /* はみ出し禁止 */
  width: 100%;
  height: 100dvh;
  /* スマホのアドレスバー考慮の高さ */
  overscroll-behavior: none;
  /* スマホの「ビヨーン」禁止 */
  touch-action: none;
  /* 不要なタッチ操作を無効化（3D操作はcanvas側で受け取るためOK） */

  margin: 0;
  font-family: 'Cabinet Grotesk', "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 400;
  font-feature-settings: "palt";
  color: #171717;
}

.main_wrap {
  padding: 0;
  width: 100%;
  height: 100dvh;
  /* ここもdvhにする */
  position: relative;
  overflow: hidden;
  /* 二重で禁止 */
}

canvas {
  width: 100vw;
  height: 100vh;
}


/* --- オープニング文字（日本語メイン） --- */
.intro-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  z-index: 20;
  pointer-events: none;
  animation: textFadeSequence 4s ease-in-out forwards;
}

/*
.intro-text p {
  font-weight: 100;
  font-size: clamp(16px, 0.78vw + 13.07px, 24px);
  letter-spacing: 0.3em;
  color: #1B0735;
  margin: 0;
  white-space: nowrap;
}
*/

/* ▼ 代わりに画像用のスタイルを追加 */
.intro-text img {
  /* PCでの基本サイズ（お好みで調整してください） */
  width: 330px;

  /* 画面からはみ出さないようにする設定 */
  max-width: 80%;
  height: auto;
}

/* ▼ スマホ表示時のサイズ調整 */
@media screen and (max-width: 768px) {
  .intro-text img {
    /* スマホでは少し小さくする（例：画面幅の80%） */
    width: 80%;
  }
}

/* --- Spline Viewer (ロゴを外にはみ出させて消す版) --- */

/* 1. 外側の「窓」の設定（ここで操作範囲が決まります） */
.spline-mask-window {
  /* 画面のど真ん中に固定配置 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;

  /* 球体サイズに合わせる（ここが操作できる範囲） */
  width: 206px;
  height: 206px;
  border-radius: 50%;
  /* 円形にする */

  /* ▼ これが最重要！はみ出したロゴを隠します */
  overflow: hidden;

  /* 重なり順とカーソル */
  z-index: 10;
  cursor: grab;

  /* アニメーション設定（窓ごとアニメーションさせる） */
  opacity: 0;
  filter: blur(10px);
  animation: splineFadeIn 2.0s ease-out 2.5s forwards;
}

.spline-mask-window:active {
  cursor: grabbing;
}


/* 2. 中身のSplineの設定（窓より大きくする） */
spline-viewer.my-spline {
  display: block;
  position: absolute;
  /* 親の窓に対して絶対配置 */

  /* ▼ 窓(206px)よりひと回り大きくします */
  width: 350px;
  /* 例: 1.5倍くらい */
  height: 350px;
  /* 例: 1.5倍くらい */

  /* 大きくした分、中心がずれるので真ん中に戻します */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;

  /* ※以前のアニメーション設定は削除してください（親の.spline-mask-windowに移したため） */
}



/* --- UIレイヤー（TOP画面） --- */
/* --- UIレイヤー（TOP画面） --- */
.top-ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  animation: uiFadeIn 1.0s ease-out 3.5s forwards;
}

.top-ui-layer a {
  pointer-events: auto;
  text-decoration: none;
  color: #171717;
  transition: opacity 0.3s;
}


/* --- 名言エリア（日本語メイン） --- */
/* --- ニュースティッカー（名言カルーセル） --- */
.ticker-wrap {
  position: absolute;
  top: 45px;
  left: 0;
  width: 100%;
  height: 40px;
  overflow: hidden;
}

.ticker-move {
  display: inline-block;
  white-space: nowrap;

  /* 【修正】300s → 1000s に変更（超ゆっくりにする） */
  animation: ticker-slide 2000s linear infinite;
}

/* ひとつひとつの名言スタイル */
.quote-item {
  display: inline-block;
  margin-right: 500px;
  font-size: clamp(10.7px, 0.52vw + 8.72px, 24px);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 100;
  color: #1B0735;
  letter-spacing: 0.1em;
}

.quote-author-inline {
  color: #1B0735;
  margin-left: 12px;
}


/* --- 無限ループアニメーションの定義 --- */
@keyframes ticker-slide {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    /* 2セット連結しているので、-50%地点で見た目が「最初」と一致する */
    transform: translate3d(-50%, 0, 0);
  }
}

/* --- （以下、以前のフッター設定などはそのまま維持してください） --- */


/* --- フッターエリア（英語メイン） --- */
/* ここは body の font-weight: 400 (Cabinet Grotesk Regular) が適用されます */

/* --- フッターエリア（左下メニュー） --- */
.footer-left {
  position: absolute;
  bottom: 40px;
  left: 40px;
  display: flex;
  gap: 20px;
  /* フォントサイズ設定（基準20pxの1.5倍ルール） */
  font-size: clamp(13.3px, 0.65vw + 10.9px, 30px);
  letter-spacing: 0.05em;
}

/* リンク自体の設定 */
.footer-left a {
  position: relative;
  /* 下線を絶対配置するための基準 */
  text-decoration: none;
  color: #171717;
  padding-bottom: 2px;
  /* 下線との隙間を少し確保 */
  display: inline-block;
}

/* ▼ ニュルっと出る下線の設定（擬似要素） */
.footer-left a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  /* 線の細さ（お好みで2pxにしてもOK） */
  background: #171717;
  /* 文字色と同じ黒 */
  /* アニメーションの肝 */
  transform: scaleX(0);
  /* 最初は横幅0で隠しておく */
  transform-origin: center;
  /* 「中心」を起点にする */
  transition: transform 0.3s ease;
  /* 0.3秒かけてニュルっと出す */

}

.footer-left a:hover {
  opacity: 1;
}

/* ホバー時の動き */
.footer-left a:hover::after {
  transform: scaleX(1);
  /* 横幅100%まで伸ばす */
}

/* ※以前の opacity: 0.5 の設定は削除しました */

/* --- フッターエリア（右下エリア） --- */
.footer-right {
  position: absolute;
  bottom: 40px;
  right: 40px;
  text-align: right;

  /* --- フォントサイズ設定（基準14pxの1.5倍ルール） --- */
  /* 最小 9.3px (スマホ) */
  /* 基準 14px (1400px時) */
  /* 最大 21px (巨大画面時) */
  font-size: clamp(9.3px, 0.46vw + 7.62px, 21px);

  color: #171717;
  line-height: 1.5;
  /* 行間を少し詰めてまとまりを出す */

  /* 英語フォント適用 */
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* 各行のレイアウト調整 */
.footer-right p {
  margin: 0;
}

/* 上段：場所と時間 */
.location-time {
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.copyright-sub {
  padding-bottom: 2px;
}

/* 下段：メインコピーライト */
.copyright-main {
  color: #171717;
}


/* --- アニメーション定義 --- */
/* --- オープニング画像のアニメーション（その場でフェード） --- */
@keyframes textFadeSequence {
  0% {
    opacity: 0;
    /* 位置をずっと-50%（ど真ん中）に固定します */
    transform: translate(-50%, -50%);
  }

  30% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  60% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%);
  }
}

@keyframes splineFadeIn {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
  }
}

@keyframes uiFadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}


/* ------------------------------------------------------- */
/* ▼ スマホ用レイアウト (幅768px以下) ▼ */
/* ------------------------------------------------------- */
@media screen and (max-width: 768px) {

  /* 1. コンテナを「画面サイズちょうどの箱」にする */
  .top-ui-layer {
    height: 100dvh;
    /* 画面の高さに強制一致 */
    display: flex;
    flex-direction: column;
    /* 縦並び */
    justify-content: flex-end;
    /* 下に寄せる */
    align-items: center;
    /* 左右中央 */
    padding-bottom: 30px;
    /* 下の余白 */
    box-sizing: border-box;
    /* paddingを含めて計算 */
  }

  /* ニュースティッカーは絶対配置で上に逃がす（干渉させない） */
  .ticker-wrap {
    position: absolute;
    top: 30px;
    left: 0;
  }

  .ticker-move {
    animation: ticker-slide 1500s linear infinite;
  }

  /* 2. 左メニュー (About / Contact) */
  .footer-left {
    position: static;
    /* 絶対配置解除 */
    transform: none;

    /* 下の要素との距離 */
    margin-bottom: 30px;

    width: auto;
    font-size: clamp(16px, 4.1vw, 24px);
    justify-content: center;
    z-index: 200;
  }

  /* 3. 右テキスト (Location / Copyright) */
  .footer-right {
    position: static;
    /* 絶対配置解除 */
    transform: none;

    width: auto;
    text-align: center;
    align-items: center;
    font-size: clamp(12px, 3.1vw, 18px);
    gap: 4px;
  }

  /* 名言のサイズ調整 */
  .quote-item {
    font-size: clamp(14px, 3.6vw, 21px);
    margin-right: 120px;
  }

  .location-time {
    margin-bottom: 12px;
  }
}


/* ------------------------------------------------------- */
/* ▼ モーダルウィンドウ (新規追加) ▼ */
/* ------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  /* 最前面 */

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  /* 閉じてる時は触れない */
  transition: opacity 0.4s ease;
}

/* 表示時のクラス */
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* 半透明の背景 */
.modal-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  /* 少し暗く */
  backdrop-filter: blur(2px);
  /* お好みで背景ボカシ */
}

/* 白い箱 */
.modal-box {
  position: relative;
  background: #F2F2F2;
  /* 画像に合わせた薄いグレー */
  width: 780px;
  max-width: 90%;
  /* スマホでは幅90% */
  padding: 60px 80px;
  box-sizing: border-box;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-height: 90vh;
  overflow-y: scroll;
}

/* 閉じるボタン (×印) */
.modal-close-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.modal-close-btn:hover {
  opacity: 1;
}

.modal-close-btn::before,
.modal-close-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  /* 線の細さ */
  background: #171717;
  transform: rotate(45deg);
}

.modal-close-btn::after {
  transform: rotate(-45deg);
}

.about_table {
  border-collapse: collapse;
  width: 100%;
  margin: 30px 0 60px 0;
}

.about_table th {
  font-weight: normal;
  border-bottom: 1px solid #CACACA;
  width: 20%;
  text-align: left;
  padding: 13px 10px 3px 0;
}

.about_table td {
  border-bottom: 1px solid #CACACA;
  width: 80%;
  padding: 13px 10px 3px 0;
}

@media screen and (max-width: 768px) {
  .about_table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0 40px 0;
  }

  .about_table th {
    font-weight: normal;
    border-bottom: transparent;
    width: 100%;
    text-align: left;
    padding: 17px 0 0 0;
    display: block;
    line-height: 1;
  }

  .about_table td {
    border-bottom: 1px solid #CACACA;
    width: 100%;
    padding: 0 0 3px 0;
    display: block;
  }
}

.modal-box_about p {
  margin: 0 0 40px 0;
}

h3.about_h3 {
  margin-bottom: 0;
}

h4.about_h4 {
  margin-bottom: 3px;
  border-bottom: 1px solid #131726;
}

.modal-box_about ul {
  margin: 0 0 30px 0 !important;
  padding: 0 0 0 13px !important;
}

@media screen and (max-width: 768px) {
  .modal-box_about p {
    margin: 0 0 30px 0;
  }

  .modal-box_about ul {
    margin: 0 0 20px 0 !important;
    padding: 0 0 0 13px !important;
  }
}



.no-margin-bottom {
  margin-bottom: 0 !important;
}

.modal-box_about ul.no-margin-bottom {
  margin-bottom: 0 !important;
}

/* --- 文字スタイル (PC/SP共通サイズ) --- */

/* 1. 見出し (About / Contact) */
.modal-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 0.65vw + 10.9px, 30px);
  /* PC・SP共通 */
  margin: 0 0 40px 0;
  color: #171717;
  transform: translateX(-50px);
}

/* 2. 本文テキスト */
.modal-content-text {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 400;
  /* 細字 */
  font-size: clamp(14px, 0.46vw + 7.62px, 21px);
  /* PC・SP共通 */
  line-height: 2.2;
  color: #171717;
}

.en-text {
  margin-top: 20px;
  font-family: 'Cabinet Grotesk', sans-serif;
  /* 英語部分は欧文フォント */
  line-height: 1.8;
}

/* Contact用の中央揃え */
.contact-center {
  text-align: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.contact-msg {
  margin: 0 0 20px 0;
}

/* 3. メールアドレス */
.contact-email {
  display: inline-block;
  position: relative;
  /* 下線アニメーションの基準 */
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: clamp(24px, 0.78vw + 13.08px, 36px);
  /* PC・SP共通 */
  color: #171717;
  text-decoration: none;
  padding-bottom: 0;
  /* 文字と線の隙間を少し確保 */
}

/* ▼ 中央からニュルっと出る下線の設定 */
.contact-email::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  /* 線の細さ */
  background: #171717;

  /* アニメーションの肝 */
  transform: scaleX(0);
  /* 最初は隠す */
  transform-origin: center;
  /* 中心から広げる */
  transition: transform 0.3s ease;
}

/* ホバー時の動き */
.contact-email:hover::after {
  transform: scaleX(1);
  /* 横幅いっぱいに伸ばす */
}

/* --- スマホ時のレイアウト調整 --- */
@media screen and (max-width: 768px) {
  .modal-title {
    transform: translateX(0px);
  }

  .modal-box {
    padding: 40px 20px;
    /* 余白を少し詰める */
  }

  .modal-close-btn {
    top: 20px;
    right: 20px;
  }
}


/* --- 中央上部（地名・日付・時間） --- */
.top-center-info {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);

  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 400;
  /* サイズは画面に合わせて可変（スマホ最小10px 〜 PC最大18px） */
  font-size: clamp(10px, 0.7vw + 6px, 18px);
  color: #131726;
  letter-spacing: 0.08em;
  white-space: nowrap;
  z-index: 200;

  /* パイプ（|）の前後に少し余白を持たせるための設定 */
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: center;
  line-height: 1.8;
}

/* 縦線の色を少し薄くして上品に */
.top-center-info .divider {
  opacity: 0.4;
  font-size: 0.9em;
}

/* スマホ表示時の調整 */
@media screen and (max-width: 768px) {
  .top-center-info {
    top: 25px;
    gap: 6px;
    font-size: 14px;
  }
}


/* ------------------------------------------------------- */
/* ▼ カーソル追従 (Canvas トレイル版) ▼ */
/* ------------------------------------------------------- */
#trail-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  /* UIのクリックを邪魔しない */
  z-index: 50;
  /* Spline(10)より上で、文字レイヤー(100)より下 */

  /* ▼ 追加：オープニング中は隠して、4秒後にフワッと出す */
  opacity: 0;
  animation: uiFadeIn 1.0s ease-out 4.0s forwards;
}

/* スマホでは邪魔になりやすいので消す */
@media screen and (max-width: 768px) {
  #trail-canvas {
    display: none;
  }
}
