/* 新手引导：欢迎卷 + 随局教练条 + 手势提示 */

/* ===== 欢迎卷 ===== */
.welcome-modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(12, 9, 14, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.welcome-scroll {
  width: 100%;
  max-width: 360px;
  max-height: 96%;
  overflow-y: auto;
  border-radius: 20px;
  padding: 16px 16px 12px;
  background: linear-gradient(170deg, #fffcf6 0%, #f4ebd8 100%);
  border: 2px solid #d4a54a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 3px rgba(255, 255, 255, 0.5);
  text-align: center;
  color: var(--ink-primary);
  animation: onbPop 0.4s var(--ease-overshoot);
}

.welcome-kicker {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--crimson-dark);
  font-weight: 700;
}

.welcome-title {
  margin: 4px 0 2px;
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 0.08em;
}

.welcome-goal {
  margin: 6px 0 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(185, 58, 44, 0.1);
  border: 1px dashed rgba(185, 58, 44, 0.45);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--crimson-dark);
  line-height: 1.45;
}

.welcome-steps {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.welcome-steps li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border-light);
}

.welcome-steps .ws-no {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--crimson);
  color: #fff8ee;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}

.welcome-steps .ws-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.welcome-steps .ws-desc {
  display: block;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-secondary);
  margin-top: 1px;
}

.welcome-tip {
  font-size: 11px;
  color: var(--ink-secondary);
  margin: 0 0 9px;
  line-height: 1.4;
}

.onb-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  color: #fff8ea;
  background: linear-gradient(180deg, #d4503f 0%, #a52d20 100%);
  box-shadow: 0 8px 18px rgba(142, 36, 24, 0.35), inset 0 0 0 1.5px rgba(255, 224, 160, 0.6);
}

.onb-btn:active { transform: scale(0.98); }

.onb-link {
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px 10px;
}

/* ===== 教练条（压在舞台之上，不挡操作） ===== */
.guide-coach {
  position: absolute;
  left: 12px;
  right: 12px;
  z-index: 52;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.guide-coach[data-dock="stage"] { top: 54px; }
.guide-coach[data-dock="home"] { bottom: 66px; }

.guide-coach.hidden { display: none; }

.coach-card {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 10px;
  border-radius: 12px;
  background: rgba(20, 15, 22, 0.93);
  border: 1.5px solid rgba(245, 200, 92, 0.75);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: #fff8ea;
  font-size: 12px;
  line-height: 1.38;
  animation: onbPop 0.28s var(--ease-overshoot);
}

.coach-badge {
  flex: none;
  min-width: 34px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f5c85c, #d99a2b);
  color: #3b2506;
  font-weight: 900;
  font-size: 11px;
}

.coach-text { flex: 1; }

.coach-skip {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 248, 234, 0.8);
  border-radius: 999px;
  font-size: 10.5px;
  padding: 3px 9px;
  cursor: pointer;
}

/* 教练条占位：鉴真页顶部让出一行，避免盖住扫描条 */
#app-shell.coach-inspect-pad #phase-inspect { padding-top: 54px; }
#app-shell.coach-inspect-pad #phase-inspect .inspect-card-stage { padding: 2px 0; }

/* ===== 高亮脉冲（仅 box-shadow，不改布局/变换） ===== */
.coach-pulse {
  animation: coachPulse 1.15s ease-in-out infinite !important;
  outline: 2px solid rgba(255, 224, 140, 0.95);
  outline-offset: 2px;
}

@keyframes coachPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 110, 0.75), 0 0 14px rgba(255, 214, 110, 0.5); }
  50% { box-shadow: 0 0 0 9px rgba(255, 214, 110, 0), 0 0 26px rgba(0, 229, 184, 0.7); }
}

/* ===== 手势提示 ===== */
.tear-swipe-cue {
  position: absolute;
  left: 50px;
  top: 50%;
  margin-top: -9px;
  width: 120px;
  height: 18px;
  pointer-events: none;
  z-index: 3;
  color: #fff7e2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px rgba(255, 220, 140, 0.9), 0 1px 2px rgba(0, 0, 0, 0.55);
  animation: swipeGlide 1.5s ease-in-out infinite;
}

@keyframes swipeGlide {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(70px); opacity: 0; }
}

.inspect-drag-cue {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 150px;
  height: 90px;
  margin-left: -75px;
  pointer-events: none;
  z-index: 9;
}

.drag-cue-orb {
  position: absolute;
  left: 8px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 244, 205, 0.95);
  background: radial-gradient(circle, rgba(255, 240, 180, 0.65), rgba(255, 240, 180, 0.08) 70%);
  box-shadow: 0 0 18px rgba(255, 224, 140, 0.9);
  animation: dragOrb 2.2s ease-in-out infinite;
}

.drag-cue-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff7e2;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  padding: 2px 6px;
}

@keyframes dragOrb {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 1; }
  50% { transform: translate(100px, 20px); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(100px, 20px); opacity: 0; }
}

#btn-help {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 15px;
  color: var(--crimson-dark);
}

@keyframes onbPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
