/* Tour overlay (top of stack)
   構造は `ui/tier-quick/quick-assign.css` の 3 段 flex を借りる
   (header 固定 / body だけ scroll / footer 固定) — tour 専用の新機構を作らない。
   色・書体・角丸・当たりは `--t-*` のみ。font-size は token 化されていないので
   この面の段を 5 種に絞って literal で書く (新 token は作らない)。 */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  display: none;
}
.tour-overlay.active { display: block; }

/* スポットライト: 対象要素の上に重ねて box-shadow で周囲を暗くする。
   ⚠ 対象が viewport の外にある時は **出さない** (TourOverlay の可視判定) —
   画面外を光らせても「どこを見ればいいか」が伝わらないため。 */
.tour-spotlight {
  position: fixed;
  border-radius: var(--t-r-lg);
  /* ⚠ 幕の色は repo 全体で token 化されていない — `modal-base.css` は 0.6、
     `badge-detail.css` は 0.78 をそれぞれ直書きしている。ここだけ新 token を作ると
     3 つ目の流儀になるので **既存の 0.78 に合わせる**。幕の token 化は別 unit。 */
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.78),
    0 0 0 3px var(--t-accent);
  pointer-events: none;
  transition: top 0.35s cubic-bezier(0.45, 0, 0.25, 1),
              left 0.35s cubic-bezier(0.45, 0, 0.25, 1),
              width 0.35s cubic-bezier(0.45, 0, 0.25, 1),
              height 0.35s cubic-bezier(0.45, 0, 0.25, 1);
}

/* バックドロップ単体 (center step 用) */
.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}
.tour-backdrop.is-dismissable { pointer-events: auto; cursor: pointer; }
/* spotlight step 用 — 減光は spotlight の box-shadow が担うので幕は透明にし、
   **当たり判定だけ残す** (影は当たりを持たないため、これが無いと暗い所のタップが
   背後へ抜けて閉じられない)。 */
.tour-backdrop.is-veilless { background: transparent; backdrop-filter: none; }

/* ツールチップ — 3 段 flex。header と footer は縮まず、body だけ scroll する。
   ⚠ これで **操作列が常時可視**になる (scroll しないと押せない形にしない)。 */
.tour-tip {
  position: fixed;
  display: flex;
  flex-direction: column;
  background: var(--t-surface);
  border: 1px solid var(--t-border-strong);
  border-radius: var(--t-r-lg);
  color: var(--t-fg);
  font-family: var(--t-font-sans);
  width: min(380px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  pointer-events: auto;
  z-index: 1;
  transition: top 0.35s cubic-bezier(0.45, 0, 0.25, 1),
              left 0.35s cubic-bezier(0.45, 0, 0.25, 1);
}
.tour-tip-head {
  flex: 0 0 auto;
  padding: 1rem 1.1rem 0.5rem;
}
.tour-tip-body-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 1.1rem;
}
.tour-tip-foot {
  flex: 0 0 auto;
  padding: 0.6rem 1.1rem 0.75rem;
  border-top: 1px solid var(--t-border);
  background: var(--t-surface);
  border-radius: 0 0 var(--t-r-lg) var(--t-r-lg);
}

.tour-tip-step {
  font-size: 12px;
  color: var(--t-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}
.tour-tip-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.tour-tip-body {
  font-size: 14px;
  line-height: 1.7;
  margin: 0.5rem 0 0.75rem;
}
.tour-tip-body p { margin: 0 0 0.6rem; }
.tour-tip-body p:last-child { margin-bottom: 0; }
.tour-tip-link {
  color: var(--t-fg);
  font-size: 14px;
  text-underline-offset: 3px;
}

/* 軸名チップ — `ui/shared/AxisPills.tsx` の見た目を借りる (border / 999px / 12px) */
.tour-axis-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0.2rem 0 0.75rem;
}
.tour-axis-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--t-rule);
  border-radius: 999px;
  font-size: 12px;
  line-height: 16px;
  color: var(--t-muted);
  white-space: nowrap;
}

/* ステップインジケータ */
.tour-tip-dots {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}
.tour-tip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--t-border-strong);
  transition: width var(--t-trans-fast), background var(--t-trans-fast);
}
.tour-tip-dot.on {
  background: var(--t-accent);
  width: 18px;
  border-radius: 4px;
}

/* ボタン群 — 「次へ」= 一次動作 44 / 「スキップ」= 二次 32 (当たりで満たす) */
.tour-tip-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.tour-tip-skip {
  min-height: var(--t-tap-sub);
  padding: 0.35rem 0.7rem;
  background: transparent;
  border: 1px solid var(--t-border-strong);
  border-radius: var(--t-r-md);
  color: var(--t-muted);
  font-family: var(--t-font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: color var(--t-trans-fast), border-color var(--t-trans-fast);
}
.tour-tip-skip:hover { color: var(--t-fg); border-color: var(--t-fg); }
.tour-tip-nav {
  display: flex;
  gap: 0.4rem;
}
.tour-tip-btn {
  min-height: var(--t-tap-min);
  padding: 0.5rem 1rem;
  background: var(--t-bg-elev);
  border: 1px solid var(--t-border-strong);
  border-radius: var(--t-r-md);
  color: var(--t-fg);
  font-family: var(--t-font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--t-trans-fast), color var(--t-trans-fast);
}
.tour-tip-btn:hover { border-color: var(--t-accent); }
.tour-tip-btn.primary {
  background: var(--t-accent);
  color: var(--t-on-accent);
  border-color: var(--t-accent);
}
.tour-tip-btn.primary:hover { opacity: 0.9; }

/* center step (welcome / done) — 幅だけ広げ、構造は共通 */
.tour-tip.tour-tip-center {
  width: min(460px, calc(100vw - 2rem));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.tour-tip.tour-tip-center .tour-tip-title { font-size: 20px; }

/* ⚠ 位置の transition は動きを減らす設定で止める (`shared/css/pages/reveal.css` と同型) */
@media (prefers-reduced-motion: reduce) {
  .tour-tip,
  .tour-spotlight,
  .tour-tip-dot {
    transition: none !important;
  }
}
