/* 초보자 가이드(투어) — 스포트라이트·툴팁·가상 포인터·연습 모드·환영 모달 */

/* 투어 레이어는 앱의 모달층(최대 99999)보다 위 — 실제 모달이 열려 있어도 클릭 차단막이 덮는다.
   내부 순서: highlight < catcher < mock < tip < pointer < modal 유지. */

/* 클릭 전면 가로채기 레이어 (연습 모드의 안전장치) */
#tourCatcher {
  position: fixed; inset: 0; z-index: 109002;
  background: transparent;
}

/* 스포트라이트 — 대상 주변만 밝고 나머지는 어둡게 */
#tourHighlight {
  position: fixed; z-index: 109001;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(4, 6, 10, 0.74), 0 0 0 3px var(--accent);
  transition: all 0.35s ease;
  pointer-events: none;
}
#tourHighlight.tour-pulse::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: inherit;
  border: 3px solid var(--accent);
  animation: tourPulse 1.6s ease-out infinite;
}
@keyframes tourPulse {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}

/* 가상 손가락 포인터 */
#tourPointer {
  position: fixed; z-index: 109007;
  font-size: 34px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  animation: tourTap 1.4s ease-in-out infinite;
}
@keyframes tourTap {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  50% { transform: translateY(-14px) rotate(-12deg); }
}

/* 안내 툴팁 카드 — 50~60대 가독성: 큰 글씨, 짧은 문장 */
#tourTip {
  position: fixed; z-index: 109006;
  width: 340px; max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6);
  color: var(--text);
}
#tourTip .tour-progress {
  font-size: 12px; font-weight: 800; letter-spacing: 0.05em;
  color: var(--accent); margin-bottom: 8px;
}
#tourTip .tour-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; line-height: 1.35; }
#tourTip .tour-desc { font-size: 15px; color: var(--text-dim); line-height: 1.6; }
#tourTip .tour-btns { display: flex; gap: 8px; margin-top: 16px; }
#tourTip button {
  font-family: inherit; cursor: pointer; border-radius: 10px;
  font-size: 14px; font-weight: 700; padding: 11px 16px;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
}
#tourTip .tour-next { flex: 1; background: var(--accent); color: #0a0b0f; border: none; }
#tourTip .tour-next:hover { filter: brightness(1.08); }
#tourTip .tour-quit { color: var(--text-subtle); font-size: 12px; padding: 11px 10px; }

/* 연습 모드 패널 (가짜 진행·가짜 결과) */
#tourMock {
  position: fixed; z-index: 109005;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 560px; max-width: calc(100vw - 32px);
  max-height: 80vh; overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.65);
}
.tour-mock-badge {
  display: inline-block; margin-bottom: 12px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(94, 179, 255, 0.14); color: var(--blue);
  border: 1px dashed var(--blue);
}
.tour-mock-title { font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.tour-mock-body { font-size: 14.5px; color: var(--text-dim); line-height: 1.7; }
.tour-mock-bar {
  height: 8px; border-radius: 4px; background: var(--bg-elev);
  overflow: hidden; margin: 16px 0 8px;
}
.tour-mock-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 0.3s;
}
.tour-mock-imgs { display: flex; gap: 8px; margin: 12px 0; }
.tour-mock-img {
  flex: 1; aspect-ratio: 1; border-radius: 10px;
  background: var(--bg-elev); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.tour-mock-cta {
  width: 100%; margin-top: 14px; padding: 14px;
  border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #03c75a, #00a042);
  color: #fff; font-size: 15px; font-weight: 800; font-family: inherit;
}
.tour-mock-cta:hover { filter: brightness(1.08); }

/* 환영/완료 모달 */
#tourModal {
  position: fixed; inset: 0; z-index: 109010;
  background: rgba(4, 6, 10, 0.8);
  display: flex; align-items: center; justify-content: center;
}
#tourModal .tour-modal-card {
  width: 420px; max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 34px 30px;
  text-align: center;
  box-shadow: 0 0 80px var(--accent-glow);
}
#tourModal .tour-modal-emoji { font-size: 44px; margin-bottom: 10px; }
#tourModal .tour-modal-title { font-size: 21px; font-weight: 800; margin-bottom: 10px; }
#tourModal .tour-modal-desc { font-size: 15px; color: var(--text-dim); line-height: 1.7; margin-bottom: 22px; }
#tourModal .tour-modal-desc b { color: var(--accent); }
#tourModal button {
  font-family: inherit; cursor: pointer; border-radius: 12px; font-weight: 800;
  width: 100%; padding: 14px; font-size: 15px; border: none;
  background: var(--accent); color: #0a0b0f; margin-bottom: 8px;
}
#tourModal button:hover { filter: brightness(1.08); }
#tourModal button.tour-modal-later {
  background: var(--bg-elev); color: var(--text-subtle);
  border: 1px solid var(--border); font-weight: 600; font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  #tourPointer, #tourHighlight.tour-pulse::after { animation: none; }
}
