/* 1분 안내: 어둡게 덮고 대상만 비춘 뒤, 아래 카드에서 설명한다. */
.tour[hidden] { display: none; }

.tour { position: fixed; inset: 0; z-index: 100; }

.tour-shade { position: absolute; inset: 0; }

/* 큰 그림자로 주변을 어둡게 하고 대상 영역만 뚫는다. */
.tour-spot {
  position: fixed;
  border-radius: 14px;
  box-shadow: 0 0 0 4px rgba(0, 117, 222, 0.85), 0 0 0 200vmax rgba(15, 18, 40, 0.62);
  pointer-events: none;
  transition: top 0.28s ease, left 0.28s ease, width 0.28s ease, height 0.28s ease;
}
.tour-spot.is-empty { top: 50% !important; left: 50% !important; width: 0 !important; height: 0 !important; box-shadow: 0 0 0 200vmax rgba(15, 18, 40, 0.62); }

.tour-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 560px;
  padding: 18px 18px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface, #fff);
  color: var(--ink, #0f0f0f);
  border-radius: 20px 20px 0 0;
  border-top: 3px solid var(--primary, #0075de);
  box-shadow: 0 -10px 30px rgba(15, 18, 40, 0.22);
  outline: none;
  animation: tour-rise 0.24s ease-out;
}

.tour-count { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--primary-ink, #005bab); }
.tour-title { margin: 0 0 6px; font-size: 19px; line-height: 1.35; font-weight: 800; letter-spacing: -0.2px; color: var(--secondary, #213183); }
.tour-body { margin: 0 0 14px; font-size: 15.5px; line-height: 1.6; color: var(--ink-secondary, #31302e); word-break: keep-all; }

.tour-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.tour-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--hairline, #e6e6e6); }
.tour-dot.is-on { width: 20px; background: var(--primary, #0075de); }

.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-gap { flex: 1; }

.tr-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--hairline, #e6e6e6);
  background: var(--surface, #fff);
  color: var(--primary-ink, #005bab);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.tr-btn.primary { background: var(--primary, #0075de); border-color: var(--primary, #0075de); color: var(--on-primary, #fff); }
.tr-btn.ghost:first-child { border-color: transparent; color: var(--ink-muted, #615d59); padding: 0 8px; }
.tr-btn:disabled { opacity: 0.35; cursor: default; }
.tr-btn:focus-visible, .tour-start:focus-visible { outline: 3px solid rgba(0, 117, 222, 0.45); outline-offset: 2px; }
.tr-btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; }

/* index.html 에 시작 버튼이 없을 때 안내가 직접 넣는 버튼. */
.tour-start {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--primary, #0075de);
  background: var(--surface, #fff);
  color: var(--primary-ink, #005bab);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

/* 첫 방문 제안: 화면을 막지 않는 작은 띠. */
.tour-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  max-width: 536px;
  padding: 12px 14px;
  background: var(--secondary, #213183);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 18, 40, 0.28);
  animation: tour-rise 0.24s ease-out;
}
.tour-banner-text { flex: 1 1 100%; margin: 0; font-size: 14.5px; line-height: 1.5; }
.tour-banner .tr-btn.ghost { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.tour-banner .tr-btn.primary { background: #fff; border-color: #fff; color: var(--secondary, #213183); }

html.tour-open { overscroll-behavior: none; }

@keyframes tour-rise {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (min-width: 720px) {
  .tour-sheet { bottom: 24px; border-radius: 20px; border-top-width: 3px; }
  .tour-banner { left: auto; right: 24px; bottom: 24px; max-width: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-sheet, .tour-banner { transition: none; animation: none; }
}

/* 가로 화면처럼 낮은 화면에서는 안내 카드를 줄여 대상이 보이게 한다 */
@media (max-height: 480px) {
  .tour-sheet { max-height: 45vh; overflow-y: auto; padding-top: 10px; padding-bottom: 10px; }
  .tour-title { font-size: 16px; }
  .tour-body { font-size: 14px; margin-bottom: 8px; }
  .tour-dots { margin-bottom: 8px; }
}
