/* ============================================================
   首登功能引导 coach-mark（浮层蓝卡，风格参考 ref.png）。
   逻辑见 /js/cend/18-tour.js，markup 在 index.html 末尾。
   自包含、类名 od-tour 前缀，不与既有样式耦合；卡片用品牌蓝，
   明暗两色下都清晰，故暗色只需微调聚光压暗层。
   ============================================================ */

.od-tour-root {
  position: fixed;
  inset: 0;
  z-index: 300;
}

/* 点击捕获层：吞掉底层点击，避免误触/误跳走（尤其 Agent 模式是 <a>）。
   点空白不关闭——引导靠 × / 下一步 驱动，减少误关。 */
.od-tour-catch {
  position: fixed;
  inset: 0;
  z-index: 300;
  cursor: default;
}

/* 聚光高亮：一圈亮描边 + 四周超大 box-shadow 压暗其余区域（挖洞效果）。
   pointer-events:none → 点击穿透到 catch 层。 */
.od-tour-spot {
  position: fixed;
  z-index: 301;
  border-radius: 12px;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 0 9999px rgba(6, 12, 24, 0.55);
  pointer-events: none;
  transition: top .28s cubic-bezier(.4, 0, .2, 1),
              left .28s cubic-bezier(.4, 0, .2, 1),
              width .28s cubic-bezier(.4, 0, .2, 1),
              height .28s cubic-bezier(.4, 0, .2, 1);
}

.od-tour-card {
  position: fixed;
  z-index: 302;
  width: 340px;
  max-width: calc(100vw - 32px);
  padding: 18px 18px 14px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(180deg, #0a87f7 0%, #0876dc 100%);
  box-shadow:
    0 18px 48px -12px rgba(8, 60, 120, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.18);
  animation: odTourIn .26s cubic-bezier(.34, 1.2, .4, 1) both;
  transition: top .24s cubic-bezier(.4, 0, .2, 1),
              left .24s cubic-bezier(.4, 0, .2, 1);
}

@keyframes odTourIn {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* 指向目标的小箭头（45° 旋转方块，颜色贴合卡片对应边的渐变端色）。 */
.od-tour-beak {
  position: absolute;
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
  border-radius: 2px;
}
.od-tour-card.is-beak-top .od-tour-beak {
  top: -6px;
  background: #0a87f7; /* 卡在目标下方，箭头贴卡片顶边（渐变起点色） */
}
.od-tour-card.is-beak-bottom .od-tour-beak {
  bottom: -6px;
  background: #0876dc; /* 卡在目标上方，箭头贴卡片底边（渐变终点色） */
}

.od-tour-x {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.od-tour-x:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.od-tour-title {
  padding-right: 28px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.od-tour-body {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.92);
}

.od-tour-foot {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.od-tour-prog {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.74);
  font-variant-numeric: tabular-nums;
}
.od-tour-next {
  border: 0;
  border-radius: 10px;
  padding: 9px 20px;
  background: #0b1220;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.od-tour-next:hover {
  background: #000;
  transform: translateY(-1px);
}
.od-tour-next:active {
  transform: translateY(0);
}

/* 暗色：卡片本身已是品牌蓝无需改，仅把压暗层调深一点更贴夜间背景。 */
html.dark .od-tour-spot {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.85),
    0 0 0 9999px rgba(2, 6, 16, 0.68);
}

/* 窄屏：卡片留边、字号略收。 */
@media (max-width: 520px) {
  .od-tour-card { padding: 16px 16px 12px; }
  .od-tour-title { font-size: 17px; }
  .od-tour-body { font-size: 14px; }
}

/* 尊重减弱动效偏好。 */
@media (prefers-reduced-motion: reduce) {
  .od-tour-card { animation: none; }
  .od-tour-spot,
  .od-tour-card { transition: none; }
}
