/* スクロールヒント（軽量版）CSS */

/* 対象要素の基本スタイル（横スクロールのみ許可） */
.xscroll-hint {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
}

/* 中央に表示するヒントボックス（アイコン上／文言下） */
.xscroll-hint-tip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -40%);
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* 表示状態 */
.xscroll-hint.show-tip .xscroll-hint-tip {
  opacity: .9;
}

/* アイコン（上部）：最初は手アイコンを横移動→その後静止の矢印に切替 */
.xscroll-hint-tip::before {
  content: "";
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 22px;
  height: 22px;
  opacity: 0;
  border: none;
}

/* フェーズ1：手アイコン（アニメーション） */
.xscroll-hint-tip.phase-anim::before {
  opacity: 1;
  background-image: url('../img/icon_scroll_hint_white_hand.svg');
  animation: xhint-move 1.2s ease-in-out infinite;
}

/* フェーズ2：矢印アイコン（静止） */
.xscroll-hint-tip.phase-static::before {
  opacity: 1;
  background-image: url('../img/icon_scroll_hint_white_arrow.svg');
  animation: none;
}

@keyframes xhint-move {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(8px); }
  100% { transform: translateX(0); }
}

/* ユーザー操作後はヒントを強制的に非表示 */
.xscroll-hint.dismissed .xscroll-hint-tip {
  opacity: 0 !important;
}

