/* ==========================================================
   操作ガイド (Tour) スタイル
   - 初回訪問時に自動起動 / ❓ボタンで手動起動
   - ヘルプモード (Help) とは別ウィジェット
   ========================================================== */

/* 起動ボタン */
.tour-guide-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--accent, #ff6b3d);
  color: var(--accent, #ff6b3d);
  font-size: 0.85rem;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  font-family: inherit;
}
.tour-guide-btn:hover {
  background: var(--accent, #ff6b3d);
  color: #fff;
  transform: translateY(-1px);
}

/* バックドロップ (背景暗転) */
.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.tour-backdrop.active {
  opacity: 1;
}

/* スポットライト (対象要素を浮かび上がらせる枠) */
.tour-spotlight {
  position: fixed;
  border: 3px solid var(--accent, #ff6b3d);
  border-radius: 8px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(255, 107, 61, 0.4);
  z-index: 10001;
  pointer-events: none;
  transition: top 0.3s, left 0.3s, width 0.3s, height 0.3s;
}

/* コールアウト */
.tour-callout {
  position: fixed;
  z-index: 10002;
  background: var(--bg-sidebar, #fff);
  border: 2px solid var(--accent, #ff6b3d);
  border-radius: 12px;
  padding: 16px;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text, #2d2420);
}

.tour-callout-text {
  margin-bottom: 14px;
}
.tour-callout-text strong {
  color: var(--accent, #ff6b3d);
}

.tour-callout-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tour-callout-progress {
  font-size: 0.74rem;
  color: var(--text-dim, #7a6e64);
}

.tour-callout-buttons {
  display: flex;
  gap: 6px;
}

.tour-callout-btn {
  background: var(--accent, #ff6b3d);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: bold;
  font-family: inherit;
  transition: background 0.2s;
}
.tour-callout-btn:hover {
  background: var(--accent-end, #ff9a5c);
}
.tour-callout-btn.skip {
  background: transparent;
  color: var(--text-dim, #7a6e64);
  border: 1px solid var(--border, #e0d5ca);
}
.tour-callout-btn.skip:hover {
  background: var(--bg-input, #f5f0eb);
  color: var(--text-sub, #5a4e44);
}

/* 矢印 */
.tour-arrow {
  position: absolute;
  width: 0;
  height: 0;
}
.tour-arrow.up {
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 10px solid var(--accent, #ff6b3d);
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}
.tour-arrow.down {
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid var(--accent, #ff6b3d);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}
.tour-arrow.left {
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid var(--accent, #ff6b3d);
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
}
.tour-arrow.right {
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 10px solid var(--accent, #ff6b3d);
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
}

/* モバイル */
@media (max-width: 768px) {
  .tour-callout {
    max-width: calc(100vw - 32px);
  }
  .tour-guide-btn {
    top: 12px;
    right: 12px;
    font-size: 0.78rem;
    padding: 6px 12px;
  }
}
