/* ガイドツアーの見た目（tour.js とセットで読み込む） */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour-shade { position: fixed; background: rgba(12, 24, 32, .6); pointer-events: auto; }
.tour-ring {
  position: fixed; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(194, 106, 23, .55);
}
.tour-ring.pulse { animation: tour-pulse 1.6s ease-in-out infinite; }
@keyframes tour-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(194, 106, 23, .55); }
  50% { box-shadow: 0 0 0 2px #fff, 0 0 0 11px rgba(194, 106, 23, .28); }
}
.tour.moving .tour-shade, .tour.moving .tour-ring { transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease; }

.tour-pop {
  position: fixed; width: 344px; max-width: calc(100vw - 24px); pointer-events: auto;
  background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-l);
  padding: 16px 20px 16px; outline: none;
}
.tour-pop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tour-pop.nudge { animation: tour-nudge .35s ease; }
@keyframes tour-nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.tour-arrow { position: absolute; width: 14px; height: 14px; background: var(--surface); transform: rotate(45deg); display: none; }
.tour-arrow.on-bottom { display: block; top: -7px; margin-left: -7px; }
.tour-arrow.on-top { display: block; bottom: -7px; margin-left: -7px; }
.tour-arrow.on-right { display: block; left: -7px; margin-top: -7px; }
.tour-arrow.on-left { display: block; right: -7px; margin-top: -7px; }

.tour-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tour-count { font-size: 12.5px; font-weight: 700; color: var(--accent-deep); letter-spacing: .03em; }
.tour-dots { display: flex; gap: 4px; flex: 1; }
.tour-dots i { width: 14px; height: 4px; border-radius: 2px; background: var(--line); }
.tour-dots i.past { background: var(--brand-2); opacity: .45; }
.tour-dots i.now { background: var(--accent); width: 22px; }
.tour-x { width: 32px; height: 32px; margin: -6px -10px -6px 0; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); }
.tour-x:hover { background: var(--sunken); color: var(--ink); }
.tour-x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.tour-title { font-size: 17px; font-weight: 700; line-height: 1.45; letter-spacing: .01em; }
.tour-body { margin-top: 6px; font-size: 14.5px; line-height: 1.75; color: var(--ink-2); white-space: pre-line; }
.tour-hint {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep);
  font-size: 13px; font-weight: 600; line-height: 1.55;
}
.tour-pop.done .tour-hint { background: var(--ok-soft); color: var(--ok); }
.tour-btns { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; margin-top: 14px; }   /* 「戻る」は左・「次へ」は右に、全手順で同じ場所・同じ大きさ */
.tour-btns button { min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.tour-back:disabled { visibility: hidden; }
.tour-back { color: var(--ink-2); border: 1.5px solid var(--line-2); background: var(--surface); }
.tour-back:hover { background: var(--sunken); }
.tour-next { background: var(--brand); color: #fff; border: 1.5px solid var(--brand); }
.tour-next:hover { background: var(--brand-2); }
.tour-next.quiet { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); font-weight: 600; }
.tour-next.quiet:hover { background: var(--sunken); }
.tour-wait { display: none; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.tour-wait::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); vertical-align: -1px; animation: tour-spin .9s linear infinite; }
.tour-pop.waiting .tour-wait { display: block; }
.tour-pop.waiting .tour-hint, .tour-pop.waiting .tour-arrow { display: none; }
@keyframes tour-spin { to { transform: rotate(360deg); } }

/* スマホ幅：画面の下（または上）に固定 */
.tour-pop.docked {
  left: 10px !important; right: 10px !important; top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; max-width: none;
  max-height: 52vh; overflow-y: auto; padding: 14px 16px 14px;
}
.tour-pop.docked.at-top { bottom: auto; }
.tour-pop.docked .tour-arrow { display: none; }
.tour-pop.docked .tour-title { font-size: 16px; }
.tour-pop.docked .tour-body { font-size: 14px; line-height: 1.7; }
.tour-pop.docked .tour-btns { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { .tour-ring.pulse { animation: none; } }

/* 案内の途中の知らせは、吹き出しと重ならないよう上に出す */
.tour-open .toast { top: calc(var(--head-h) + 10px); bottom: auto; }
@media (max-width: 640px) { .tour-open .toast { top: calc(env(safe-area-inset-top, 0px) + 6px); } }   /* スマホはヘッダーの上に重ねる（タブにかぶらない） */
