/* ============================================================================
   产品介绍与使用教程（/tour）
   ----------------------------------------------------------------------------
   这是一个**独立的全屏演示页**：整页只有它自己的舞台，不复用后台外壳
   （页面 meta 里 layout: 'auth' + bare: true 会让外壳进入 is-bare 状态）。

   设计基调：与系统内其它页面**同一套设计语言**（颜色、圆角、阴影、动效全部取 tokens），
   但允许更「舞台化」：更深的背景、更大的标题、更明显的强调色。

   分节（实现时按此顺序追加，不要重排既有分节编号）：
     1. 舞台与背景               .tour / .tour__bg / .tour__glow
     2. 顶部标题栏与品牌         .tour-top / .tour-brand
     3. 播放器控件               .tour-controls / .tour-progress / .tour-speed
     4. 章节轨道与角色切换       .tour-chapters / .tour-role
     5. 假窗口（浏览器/应用框）   .tour-window / .tour-window__bar / .tour-window__body
     6. 复刻的后台界面           .tour-app / .tour-app__nav / .tour-app__main
     7. 复刻的学生端界面         .tour-stu-*
     8. 复刻的大屏界面           .tour-kiosk-*（毛玻璃卡片）
     9. 光标 / 高亮 / 波纹 / 字幕 .tour-cursor / .tour-spot / .tour-ripple / .tour-caption
    10. 结尾页与页脚             .tour-end / .tour-foot
    11. 响应式与减动效           @media / prefers-reduced-motion

   约定：
     · 假窗口**内部**刻意复用真实页面的类名（card / stat-card / badge / btn / tabs /
       table / timeline / toast / alert / empty-state / chip / avatar / score-pill /
       activity-item / rank-chip / field / input / switch…），这样复刻出来的界面
       和真系统长得一模一样；
     · 假窗口**外**（舞台、播放器、光标、字幕）一律用 .tour-* / .tour__* 前缀，
       不污染真实页面；
     · 3D 感全部用 CSS 3D（perspective / preserve-3d / rotateX），背景星点用 Canvas 2D，
       不引入任何外部资源。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 舞台与背景
   -------------------------------------------------------------------------- */
.tour {
  /* 舞台永远是深色的：与系统主题无关，保证「像一段视频」的观感统一 */
  --tour-bg: #04070f;
  --tour-bg-2: #0a1020;
  --tour-ink: #eef2fa;
  --tour-ink-soft: #9fb0cf;
  --tour-ink-dim: #6b7a99;
  --tour-line: rgba(148, 163, 184, 0.16);
  --tour-line-strong: rgba(148, 163, 184, 0.3);
  --tour-panel: rgba(15, 23, 42, 0.62);
  --tour-panel-strong: rgba(11, 18, 32, 0.86);
  --tour-accent: #818cf8;
  --tour-accent-2: #8b5cf6;
  --tour-gap: clamp(10px, 1.4vh, 18px);
  --tour-radius: clamp(12px, 1vw, 18px);
  /* 底部悬浮层（字幕 + 播放器）占用的高度：舞台与章节抽屉都要让开这么多 */
  --tour-float-space: 132px;

  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--tour-gap);
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(12px, 1.6vh, 20px) clamp(14px, 2vw, 32px) clamp(14px, 1.8vh, 24px);
  overflow: hidden;
  color: var(--tour-ink);
  /* ⚠️ 关键：`position: fixed` 的祖先只要带 **任何 transform**（含动画 fill: both 留下的最终帧），
     它就会变成该 fixed 元素的**包含块**，于是「固定在底部」的 dock 会跟着页面滚动一起跑。
     路由会给页面根节点加 `.page-enter`（rise-in，fill: both，最终帧是 translateY(0) scale(1)），
     正好踩中这个坑——所以这里对演示页明确关掉该动画并清零 transform，
     保证 .tour-dock 真正相对**视口**固定。 */
  animation: none;
  transform: none;
  background:
    radial-gradient(1100px 620px at 8% -14%, rgba(99, 102, 241, 0.28), transparent 62%),
    radial-gradient(900px 520px at 98% 4%, rgba(139, 92, 246, 0.22), transparent 58%),
    radial-gradient(760px 520px at 50% 116%, rgba(34, 211, 238, 0.14), transparent 60%),
    linear-gradient(180deg, var(--tour-bg-2), var(--tour-bg));
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tour__bg,
.tour__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tour__bg {
  overflow: hidden;
  /* 细腻的网格：只有 1px 的线，营造「技术感」而不抢视线 */
  background-image: linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(1200px 720px at 50% 40%, #000 35%, transparent 88%);
  -webkit-mask-image: radial-gradient(1200px 720px at 50% 40%, #000 35%, transparent 88%);
}

.tour__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

.tour__glow {
  background: radial-gradient(520px 320px at 22% 8%, rgba(129, 140, 248, 0.18), transparent 70%),
    radial-gradient(460px 300px at 82% 92%, rgba(139, 92, 246, 0.16), transparent 70%);
  animation: tour-drift 18s var(--ease-in-out) infinite alternate;
}

@keyframes tour-drift {
  from {
    transform: translate3d(-1.4%, -1%, 0) scale(1.02);
  }
  to {
    transform: translate3d(1.6%, 1.2%, 0) scale(1.06);
  }
}

/* --------------------------------------------------------------------------
   2. 顶部标题栏与品牌
   -------------------------------------------------------------------------- */
.tour-top {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.tour-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.tour-brand__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--tour-accent);
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tour-brand__text {
  min-width: 0;
}

.tour-brand__name {
  font-size: clamp(15px, 1.15vw, 19px);
  font-weight: 660;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-brand__sub {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--tour-ink-soft);
  letter-spacing: 0.06em;
}

.tour-top__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   3. 播放器控件（悬浮层：固定在视口底部，常驻显示、不随滚动移动）
   --------------------------------------------------------------------------
   字幕与播放器装在 `.tour-dock` 里：整块 `position: fixed` 贴在**视口底部**常驻显示
   （毛玻璃质感，与系统其它悬浮层一致），因此**不再挤压假窗口，也不会随页面滚动而移动**；
   早期版本做成"静止 3 秒淡出"，已按需求改为**常驻不隐藏**（`.is-visible` 一直保留）。
   dock 相对视口定位的前提是祖先不带 transform——见本文件顶部 `.tour` 的说明。
   假窗口的底部安全间距在 `.tour-stage` 的 padding-bottom 上预留（--tour-float-space）。
   -------------------------------------------------------------------------- */
.tour-dock {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(1180px, calc(100vw - 2 * clamp(14px, 2vw, 32px)));
  transform: translateX(-50%);
  /* 容器本身不吃点击（只有字幕条与播放器本身可点），否则会挡住后面的假窗口 */
  pointer-events: none;
}

.tour-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  border: 1px solid var(--tour-line);
  border-radius: var(--radius-lg);
  background: var(--tour-panel-strong);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.5);
  pointer-events: auto;
}

/* 悬浮层显隐：淡出后不拦截点击 */
.tour-float {
  transition: opacity var(--dur-normal) var(--ease-out), transform var(--dur-normal) var(--ease-out);
}

.tour-float.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.tour-ctl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 0 var(--space-3);
  border: 1px solid var(--tour-line);
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.08);
  color: var(--tour-ink);
  font-size: var(--text-sm);
  font-weight: 560;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-spring), color var(--dur-fast) var(--ease-out);
}

.tour-ctl:hover {
  background: rgba(148, 163, 184, 0.16);
  border-color: var(--tour-line-strong);
}

.tour-ctl:active {
  transform: scale(0.96);
}

.tour-ctl--icon {
  width: 38px;
  padding: 0;
}

.tour-ctl--ghost {
  background: transparent;
}

.tour-ctl--primary {
  color: #fff;
  border-color: transparent;
  background: var(--tour-accent);
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4);
}

.tour-ctl--primary:hover {
  filter: brightness(1.06);
  background: var(--tour-accent);
}

.tour-ctl--primary.is-playing {
  background: #10b981;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.34);
}

/* 进度条：按章节分段的刻度，可点击跳章 */
.tour-progress {
  flex: 1 1 auto;
  min-width: 120px;
}

.tour-progress__track {
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: 14px;
  padding: 2px;
  border-radius: var(--radius-full);
  background: rgba(148, 163, 184, 0.14);
  box-shadow: inset 0 1px 2px rgba(2, 6, 23, 0.5);
}

.tour-progress__seg {
  position: relative;
  flex: 1 1 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: rgba(148, 163, 184, 0.16);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.tour-progress__seg:hover {
  background: rgba(148, 163, 184, 0.3);
}

.tour-progress__seg.is-active {
  box-shadow: 0 0 0 1.5px rgba(129, 140, 248, 0.6);
}

.tour-progress__seg-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--tour-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 90ms linear;
}

.tour-controls__time {
  min-width: 96px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--tour-ink-soft);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.tour-speed {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--tour-line);
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.08);
}

.tour-speed__btn {
  min-width: 40px;
  padding: 4px 6px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--tour-ink-soft);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.tour-speed__btn:hover {
  color: var(--tour-ink);
  background: rgba(148, 163, 184, 0.14);
}

.tour-speed__btn.is-active {
  color: #fff;
  background: var(--tour-accent);
}

/* --------------------------------------------------------------------------
   4. 章节轨道与角色切换
   -------------------------------------------------------------------------- */
.tour-role {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--tour-line);
  border-radius: var(--radius-full);
  background: var(--tour-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.tour-role__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px var(--space-4);
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--tour-ink-soft);
  font-size: var(--text-sm);
  font-weight: 580;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.tour-role__btn:hover {
  color: var(--tour-ink);
}

.tour-role__btn.is-active {
  color: #fff;
  background: var(--tour-accent);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.36);
}

/* 章节列表：底部面板（窄屏变成底部抽屉）
   它在文档流里（保持原有形态），但底部要让开悬浮的字幕 + 播放器，且层级高于它们。 */
.tour-chapters {
  position: relative;
  z-index: 8;
  max-height: min(38vh, 320px);
  margin-bottom: var(--tour-float-space);
  overflow: hidden auto;
  border: 1px solid var(--tour-line);
  border-radius: var(--radius-lg);
  background: var(--tour-panel-strong);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.56);
  animation: tour-panel-in var(--dur-normal) var(--ease-out) both;
}

.tour-chapters[hidden] {
  display: none;
}

@keyframes tour-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tour-chapters__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--tour-line);
  background: var(--tour-panel-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.tour-chapters__title {
  font-size: var(--text-sm);
  font-weight: 620;
  letter-spacing: 0.04em;
  color: var(--tour-ink);
}

.tour-chapters__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 4px;
  margin: 0;
  padding: var(--space-3);
  list-style: none;
}

.tour-chapters__btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 9px var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--tour-ink-soft);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.tour-chapters__btn:hover {
  color: var(--tour-ink);
  background: rgba(148, 163, 184, 0.1);
}

.tour-chapters__btn.is-active {
  color: #fff;
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(129, 140, 248, 0.18);
}

.tour-chapters__no {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.16);
  font-size: var(--text-xs);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.tour-chapters__btn.is-active .tour-chapters__no {
  color: #fff;
  background: var(--tour-accent);
}

.tour-chapters__btn.is-done .tour-chapters__no {
  color: #06210f;
  background: var(--success);
}

.tour-chapters__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.tour-chapters__name {
  font-size: var(--text-sm);
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-chapters__meta {
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--tour-ink-dim);
}

.tour-chapters__check {
  flex-shrink: 0;
  opacity: 0;
  color: var(--success);
  transition: opacity var(--dur-fast) var(--ease-out);
}

.tour-chapters__btn.is-done .tour-chapters__check {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   5. 假窗口（浏览器 / 应用框）
   -------------------------------------------------------------------------- */
.tour-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 0;
  /* 底部安全间距：悬浮的字幕条 + 播放器不会盖住假窗口的内容与关键按钮 */
  padding-bottom: var(--tour-float-space);
  /* CSS 3D：让假窗口有轻微的纵深，像被摆在桌面上 */
  perspective: 1800px;
}

.tour-window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  height: min(660px, 100%);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--tour-radius);
  background: var(--bg-app, #0b1220);
  color: var(--text-primary);
  box-shadow: 0 42px 96px rgba(2, 6, 23, 0.72), 0 12px 30px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform-style: preserve-3d;
  transform: rotateX(1.1deg);
  animation: tour-window-in var(--dur-slower) var(--ease-out) both;
}

@keyframes tour-window-in {
  from {
    opacity: 0;
    transform: rotateX(5deg) translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: rotateX(1.1deg) translateY(0) scale(1);
  }
}

.tour-window__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  padding: 9px var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tour-window__dots {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

.tour-window__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.18);
}

.tour-window__dots i:nth-child(2) {
  background: #febc2e;
}

.tour-window__dots i:nth-child(3) {
  background: #28c840;
}

.tour-window__url {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 5px var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  overflow: hidden;
  white-space: nowrap;
}

.tour-window__scheme {
  opacity: 0.7;
}

.tour-window__url [data-t='url-path'] {
  color: var(--text-primary);
  font-weight: 560;
}

.tour-window__tools {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.tour-window__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background-color: var(--bg-app);
  background-image: var(--bg-app-gradient);
}

/* 章节切换：旧内容淡出 → 重绘 → 新内容淡入（不出现白屏闪烁） */
.tour-window__body.is-switching > * {
  animation: tour-swap-out 150ms var(--ease-out) both;
}

.tour-window__body > * {
  animation: tour-swap-in 260ms var(--ease-out) both;
}

@keyframes tour-swap-out {
  from {
    opacity: 0.72;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.995);
  }
}

@keyframes tour-swap-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.997);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 假窗口内的 Toast 容器：和真系统一样贴在右上角 */
.tour-window__toasts {
  position: absolute;
  z-index: 6;
  top: 54px;
  right: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: min(320px, 46%);
  pointer-events: none;
}

.tour-window__toasts .toast {
  pointer-events: auto;
  box-shadow: var(--shadow-md);
}

/* 暂停提示 */
.tour-paused {
  position: absolute;
  z-index: 5;
  top: 54px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: var(--bg-glass-strong);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transform: translateX(-50%);
  animation: tour-panel-in var(--dur-normal) var(--ease-out) both;
}

.tour-paused[hidden] {
  display: none;
}

/* 减动效时的「开始播放」大按钮 */
.tour-start {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-6);
  background: linear-gradient(180deg, rgba(4, 7, 15, 0.72), rgba(4, 7, 15, 0.9));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tour-start[hidden] {
  display: none;
}

.tour-start__card {
  max-width: 480px;
  text-align: center;
}

.tour-start__title {
  font-size: var(--text-xl);
  font-weight: 680;
  color: #fff;
}

.tour-start__hint {
  margin: var(--space-3) 0 var(--space-5);
  font-size: var(--text-sm);
  color: #b9c6dd;
  line-height: 1.7;
}

.tour-start__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 16px 40px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--tour-accent);
  color: #fff;
  font-size: var(--text-lg);
  font-weight: 640;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(99, 102, 241, 0.5);
  transition: transform var(--dur-fast) var(--ease-spring), filter var(--dur-fast) var(--ease-out);
}

.tour-start__btn:hover {
  filter: brightness(1.06);
}

.tour-start__btn:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   6. 复刻的后台界面（管理端）
   -------------------------------------------------------------------------- */
.tour-view-host {
  min-height: 100%;
}

.tour-app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100%;
  min-height: 0;
}

.tour-app__aside {
  min-height: 0;
}

.tour-app__nav {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border-right: 1px solid var(--sidebar-border);
  background: var(--sidebar-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.tour-app__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.tour-app__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--fill-brand);
}

.tour-app__name {
  font-size: var(--text-sm);
  font-weight: 640;
  line-height: 1.3;
}

.tour-app__ver {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.tour-app__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden auto;
  padding: var(--space-3) var(--space-2);
  scrollbar-width: thin;
}

.tour-app__group + .tour-app__group {
  margin-top: var(--space-4);
}

.tour-app__group-name {
  padding: 0 var(--space-3) 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.tour-app__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: default;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.tour-app__link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tour-app__link.is-active {
  color: var(--brand-500);
  background: var(--bg-active);
  font-weight: 600;
}

.tour-app__link-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.tour-app__link-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-app__user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.tour-app__user-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.tour-app__user-name {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-app__user-role {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.tour-app__user-icon {
  color: var(--text-tertiary);
}

.tour-app__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.tour-app__top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
  padding: 10px var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.tour-app__crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  white-space: nowrap;
}

.tour-app__crumb-sep {
  opacity: 0.5;
}

.tour-app__top-title {
  flex: 1 1 auto;
  font-size: var(--text-md);
  font-weight: 620;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-app__top-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.tour-app__search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.tour-app__icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  background: var(--bg-muted);
}

.tour-app__view-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden auto;
  scrollbar-width: thin;
}

.tour-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
}

/* 布局小工具 */
.tour-gap {
  height: var(--space-3);
}

.tour-meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.6;
}

.tour-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: var(--space-4);
}

.tour-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.tour-stat-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tour-flush {
  padding: 0 !important;
}

.tour-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-3);
}

.tour-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 7px 0;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: var(--text-sm);
}

.tour-kv:last-child {
  border-bottom: 0;
}

.tour-kv span {
  color: var(--text-tertiary);
}

.tour-kv b {
  font-weight: 600;
}

.tour-code {
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-inverse);
  color: #cfe0ff;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tour-code--log {
  border: 0;
  border-radius: 0;
  line-height: 1.9;
}

.tour-log-time {
  color: #7b89a6;
}

.tour-log-info {
  color: #818cf8;
}

.tour-log-warn {
  color: #f59e0b;
}

.tour-log-err {
  color: #ef4444;
}

.tour-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.tour-toolbar .tabs {
  margin-right: auto;
}

.tour-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  min-width: 180px;
}

.tour-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.tour-input--secret {
  letter-spacing: 0.32em;
}

.tour-mini-select {
  min-height: 32px;
  padding: 4px 26px 4px 8px;
  width: auto;
}

/* 图表 */
.tour-chart {
  height: 130px;
}

.tour-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tour-chart__line {
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: tour-draw 1400ms var(--ease-out) both;
}

@keyframes tour-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.tour-chart__axis {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
}

.tour-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 6px 0;
}

.tour-bar-row__label {
  width: 76px;
  flex-shrink: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.tour-bar-row__track {
  flex: 1 1 auto;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  overflow: hidden;
}

.tour-bar-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--fill-brand);
  animation: tour-grow 900ms var(--ease-out) both;
}

@keyframes tour-grow {
  from {
    transform: scaleX(0);
    transform-origin: left center;
  }
}

.tour-bar-row__value {
  width: 62px;
  flex-shrink: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* 行规分数字强调 */
.bhv-score {
  font-weight: 660;
  font-variant-numeric: tabular-nums;
}

.tour-row--archived td {
  opacity: 0.5;
}

/* 假界面里的「被隐藏」「已勾选」状态 */
.tour-hidden {
  display: none !important;
}

.tour-granted span {
  color: var(--brand-500);
  font-weight: 600;
}

/* 授权分组 */
.tour-grant-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
}

.tour-grant-group + .tour-grant-group {
  margin-top: var(--space-3);
}

.tour-grant-group--locked {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--warning) 34%, transparent);
  background: var(--warning-soft);
}

.tour-grant-group__name {
  font-size: var(--text-sm);
  font-weight: 620;
  color: var(--text-secondary);
}

/* 卡片内模态：只在假窗口里浮层，不影响真实页面 */
.tour-modal {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background: rgba(2, 6, 23, 0.46);
  animation: fade-in var(--dur-fast) var(--ease-out) both;
}

.tour-modal[hidden] {
  display: none;
}

.tour-modal__panel {
  width: min(560px, 100%);
  max-height: 100%;
  overflow: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-raised);
  box-shadow: var(--shadow-xl);
  animation: modal-in var(--dur-normal) var(--ease-spring) both;
}

.tour-modal__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.tour-modal__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--brand-500);
  background: var(--bg-active);
}

.tour-modal__title {
  flex: 1 1 auto;
  font-size: var(--text-md);
  font-weight: 640;
}

.tour-modal__close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  color: var(--text-tertiary);
  cursor: pointer;
}

.tour-modal__close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tour-modal__body {
  padding: var(--space-5);
}

.tour-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-muted);
}

/* 时间线子列表 */
.tour-tl-sub {
  margin-top: var(--space-2);
  padding-left: var(--space-3);
  border-left: 2px solid var(--border-subtle);
}

.tour-tl-sub .timeline__item {
  padding-bottom: var(--space-3);
}

.tour-daily-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

/* 排行榜领奖台 */
.tour-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.tour-podium__card {
  padding: var(--space-4);
  text-align: center;
  background: var(--bg-active);
}

.tour-podium__crown {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto var(--space-2);
  border-radius: 50%;
  color: var(--warning);
  background: var(--warning-soft);
}

.tour-podium__name {
  margin-top: 6px;
  font-size: var(--text-md);
  font-weight: 640;
}

.tour-podium__score {
  font-size: var(--text-2xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--success);
}

.tour-podium__meta {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* 智能体 */
.tour-agent-input {
  font-family: var(--font-mono);
  font-size: var(--text-base);
}

.tour-agent-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tour-agent-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
}

/* 五阶段链路诊断 */
.tour-stages {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tour-stage-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  transition: border-color var(--dur-normal) var(--ease-out), background var(--dur-normal) var(--ease-out);
}

.tour-stage-row__dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}

.tour-stage-row__body {
  flex: 1 1 auto;
  min-width: 0;
}

.tour-stage-row__title {
  font-size: var(--text-sm);
  font-weight: 600;
}

.tour-stage-row__detail {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.6;
}

.tour-stage-row__ms {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.tour-stage-row[data-state='ok'] {
  border-color: color-mix(in srgb, var(--success) 34%, transparent);
  background: var(--success-soft);
}

.tour-stage-row[data-state='ok'] .tour-stage-row__dot {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
  animation: pop-in var(--dur-slow) var(--ease-spring) both;
}

/* 更新步骤 */
.tour-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tour-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.tour-step__dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--border-strong);
}

.tour-step.is-done {
  color: var(--success);
}

.tour-step.is-done .tour-step__dot {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
  animation: pop-in var(--dur-slow) var(--ease-spring) both;
}

/* 拖拽上传区 */
.tour-dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: var(--space-8) var(--space-5);
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-muted);
  text-align: center;
}

.tour-dropzone__icon {
  color: var(--brand-500);
}

.tour-dropzone__title {
  font-size: var(--text-base);
  font-weight: 600;
}

/* 维护开关行 */
.tour-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.tour-switch-row__title {
  font-size: var(--text-md);
  font-weight: 620;
}

/* 登录页复刻 */
.tour-login {
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.tour-login__card {
  width: min(420px, 100%);
  padding: var(--space-6);
}

.tour-login__head {
  text-align: center;
  margin-bottom: var(--space-5);
}

.tour-login__title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 680;
}

.tour-login__sub {
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.tour-login__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tour-login__foot {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.tour-login__dot {
  opacity: 0.5;
}

.tour-login__card .btn.is-loading {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   7. 复刻的学生端界面（沿用后台的卡片/表格类，这里只补学生端特有的大卡）
   -------------------------------------------------------------------------- */
.tour-hero {
  background: var(--tint-brand);
}

.tour-hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.tour-hero__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.tour-hero__value {
  margin-top: 2px;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 720;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--success);
}

.tour-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}

.tour-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tour-hero__stat-value {
  font-size: var(--text-xl);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  color: var(--success);
}

.tour-hero__stat-value--down {
  color: var(--danger);
}

.tour-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.tour-price__value {
  font-size: var(--text-2xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--warning);
}

.tour-price__unit {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   8. 复刻的大屏界面（毛玻璃卡片）
   -------------------------------------------------------------------------- */
.tour-kiosk {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  --tour-glass: color-mix(in srgb, var(--bg-surface) 62%, transparent);
  background:
    radial-gradient(640px 380px at 14% -6%, rgba(99, 102, 241, 0.34), transparent 62%),
    radial-gradient(560px 340px at 92% 108%, rgba(139, 92, 246, 0.3), transparent 60%),
    linear-gradient(180deg, #061020, #03060d);
}

.tour-kiosk__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  padding: 8px var(--space-4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: #dce6f7;
  font-size: var(--text-sm);
  font-weight: 560;
}

.tour-kiosk__bar-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  color: #fff;
  background: var(--tour-accent);
}

.tour-kiosk__bar-user {
  margin-left: auto;
  font-size: var(--text-xs);
  color: #93a4c2;
}

.tour-kiosk__stage {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  padding: clamp(10px, 1.8vh, 22px);
}

/* 大屏登录 */
.tour-kiosk__login {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vh, 24px);
  color: #eef2fa;
}

.tour-kiosk__brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-align: left;
}

.tour-kiosk__mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--tour-accent);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.48);
}

.tour-kiosk__title {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 700;
}

.tour-kiosk__sub {
  margin-top: 4px;
  font-size: var(--text-sm);
  color: #a9b8d4;
}

.tour-kiosk__fields {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  width: min(720px, 100%);
}

.tour-kiosk__field {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tour-kiosk__field-label {
  font-size: var(--text-sm);
  color: #a9b8d4;
}

.tour-kiosk__input {
  height: 62px;
  padding: 0 var(--space-5);
  border: 1.5px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-md);
  background: rgba(11, 18, 32, 0.72);
  color: #fff;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 640;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.tour-kiosk__input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.24);
}

.tour-kiosk__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-width: min(420px, 100%);
  min-height: 64px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--tour-accent);
  color: #fff;
  font-size: var(--text-lg);
  font-weight: 660;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(99, 102, 241, 0.46);
  transition: transform var(--dur-fast) var(--ease-spring), filter var(--dur-fast) var(--ease-out);
}

.tour-kiosk__submit:active {
  transform: scale(0.98);
}

/* 大屏结果：毛玻璃卡片 */
.tour-kiosk__result {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  justify-content: center;
  min-height: 0;
  padding: 0;
  color: #eef2fa;
}

.tour-kiosk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 900px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: clamp(14px, 1.4vw, 24px);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 34px 80px rgba(2, 6, 23, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.tour-kiosk-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-shrink: 0;
  padding: clamp(12px, 1.8vh, 20px) clamp(16px, 2vw, 28px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.tour-kiosk-card__who {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.tour-kiosk-card__avatar {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--tour-accent);
  font-size: var(--text-md);
  font-weight: 680;
}

.tour-kiosk-card__name {
  font-size: clamp(18px, 1.9vw, 24px);
  font-weight: 700;
}

.tour-kiosk-card__meta {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: #a9b8d4;
}

.tour-kiosk-card__timer {
  padding: 5px var(--space-3);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: #c3d1ea;
}

.tour-kiosk-card__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden auto;
  padding: clamp(12px, 1.8vh, 22px) clamp(16px, 2vw, 28px);
  scrollbar-width: thin;
}

.tour-kiosk-card__nav {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
  padding: clamp(10px, 1.4vh, 16px) clamp(16px, 2vw, 28px);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(6, 12, 24, 0.36);
}

.tour-kiosk-tab {
  flex: 1 1 0;
  min-height: clamp(44px, 5vh, 60px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  color: #dce6f7;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 640;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.tour-kiosk-tab:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tour-kiosk-tab.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--tour-accent);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.42);
}

/* 行规分为主 */
.tour-kiosk-hero {
  padding: clamp(12px, 2vh, 22px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-lg);
  background: radial-gradient(420px 200px at 12% 0%, rgba(16, 185, 129, 0.22), transparent 70%),
    rgba(255, 255, 255, 0.05);
  text-align: center;
}

.tour-kiosk-hero__label {
  font-size: var(--text-sm);
  color: #b8c6de;
  letter-spacing: 0.12em;
}

.tour-kiosk-hero__value {
  margin-top: 2px;
  font-size: clamp(46px, 7vw, 92px);
  font-weight: 760;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #34d399;
  text-shadow: 0 12px 40px rgba(16, 185, 129, 0.36);
}

.tour-kiosk-hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: #c3d1ea;
}

/* 平时分为次 */
.tour-kiosk-sub {
  margin-top: clamp(10px, 1.4vh, 16px);
  padding: clamp(10px, 1.4vh, 16px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-md);
  background: rgba(6, 12, 24, 0.3);
}

.tour-kiosk-sub__label {
  font-size: var(--text-xs);
  color: #93a4c2;
  letter-spacing: 0.1em;
}

.tour-kiosk-sub__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: 6px;
}

.tour-kiosk-sub__item {
  font-size: var(--text-sm);
  color: #dce6f7;
}

.tour-kiosk-records {
  display: flex;
  flex-direction: column;
  margin-top: clamp(10px, 1.4vh, 16px);
}

.tour-kiosk-record {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 9px 2px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  font-size: var(--text-sm);
}

.tour-kiosk-record:last-child {
  border-bottom: 0;
}

.tour-kiosk-record__reason {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-kiosk-record__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: #93a4c2;
}

.tour-kiosk-record__score {
  min-width: 54px;
  text-align: right;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.tour-kiosk-record__score.is-add {
  color: #34d399;
}

.tour-kiosk-record__score.is-deduct {
  color: #fb7185;
}

.tour-kiosk-dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #93a4c2;
}

.tour-kiosk-dot.is-add {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.tour-kiosk-dot.is-deduct {
  background: #fb7185;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.22);
}

/* 大屏兑换券 */
.tour-kiosk-balance {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-2);
  padding: clamp(10px, 1.6vh, 18px);
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.14);
}

.tour-kiosk-balance__label {
  font-size: var(--text-sm);
  color: #f3d9a4;
}

.tour-kiosk-balance__value {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 740;
  font-variant-numeric: tabular-nums;
  color: #fbbf24;
}

.tour-kiosk-balance__unit {
  font-size: var(--text-sm);
  color: #f3d9a4;
}

.tour-kiosk-store {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: clamp(10px, 1.4vh, 16px);
}

.tour-kiosk-coupon {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: clamp(10px, 1.4vh, 16px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
}

.tour-kiosk-coupon__body {
  flex: 1 1 auto;
  min-width: 0;
}

.tour-kiosk-coupon__name {
  font-size: var(--text-md);
  font-weight: 640;
}

.tour-kiosk-coupon__note {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: #a9b8d4;
}

.tour-kiosk-coupon__price {
  flex-shrink: 0;
  font-weight: 680;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}

.tour-kiosk-buy {
  flex-shrink: 0;
  min-height: 46px;
  padding: 0 clamp(14px, 1.6vw, 24px);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--tour-accent);
  color: #fff;
  font-size: var(--text-base);
  font-weight: 640;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring), filter var(--dur-fast) var(--ease-out);
}

.tour-kiosk-buy--ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.tour-kiosk-buy:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   9. 光标 / 高亮 / 波纹 / 字幕
   -------------------------------------------------------------------------- */
.tour-cursor {
  position: absolute;
  z-index: 9;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  color: #ffffff;
  filter: drop-shadow(0 3px 6px rgba(2, 6, 23, 0.6));
  pointer-events: none;
  will-change: transform;
  transition: transform 60ms linear;
}

.tour-cursor__arrow {
  display: block;
}

.tour-ripple {
  position: absolute;
  z-index: 8;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid rgba(129, 140, 248, 0.9);
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.22);
  pointer-events: none;
  animation: tour-ripple 620ms var(--ease-out) both;
}

@keyframes tour-ripple {
  from {
    opacity: 0.9;
    transform: scale(0.4);
  }
  to {
    opacity: 0;
    transform: scale(3.4);
  }
}

/* 高亮讲解圈 */
.tour-spot {
  position: relative;
  z-index: 4;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.72), 0 0 0 8px rgba(129, 140, 248, 0.16) !important;
  transition: box-shadow var(--dur-normal) var(--ease-out);
}

.tour-bubble {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 10px);
  z-index: 12;
  width: max-content;
  max-width: min(320px, 62vw);
  padding: 7px var(--space-3);
  border: 1px solid rgba(129, 140, 248, 0.42);
  border-radius: var(--radius-sm);
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  font-size: var(--text-xs);
  line-height: 1.6;
  white-space: normal;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  animation: tour-bubble-in var(--dur-normal) var(--ease-spring) both;
}

.tour-bubble::after {
  content: '';
  position: absolute;
  left: 16px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(129, 140, 248, 0.42);
  border-bottom: 1px solid rgba(129, 140, 248, 0.42);
  background: var(--bg-glass-strong);
  transform: rotate(45deg);
}

@keyframes tour-bubble-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 点击按下态 / 闪烁 / 打勾 */
.tour-press {
  transform: scale(0.965) !important;
  filter: brightness(0.94);
}

.tour-flash {
  animation: tour-flash 900ms var(--ease-out) both;
}

@keyframes tour-flash {
  0%,
  100% {
    background-color: transparent;
  }
  30% {
    background-color: color-mix(in srgb, var(--warning) 32%, transparent);
  }
}

.tour-done {
  position: relative;
}

.tour-done::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 11;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.44);
  animation: pop-in var(--dur-slow) var(--ease-spring) both;
}

/* 打字光标闪烁 */
.is-typing {
  caret-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

/* 字幕条：悬浮在播放器**上方**（同一个 .tour-dock 里，自动排布），浮在假窗口之上 */
.tour-caption {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 46px;
  padding: 10px var(--space-5);
  border: 1px solid var(--tour-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, rgba(11, 18, 32, 0.86), rgba(11, 18, 32, 0.66));
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.46);
  pointer-events: auto;
}

/* 淡出：整体下沉一点点，像视频播放器的控件那样 */
.tour-caption.is-hidden {
  transform: translateY(8px);
}

.tour-controls.is-hidden {
  transform: translateY(10px);
}

.tour-caption__chapter {
  flex-shrink: 0;
  padding: 5px var(--space-3);
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--tour-accent) 30%, transparent);
  color: #dbe7ff;
  font-size: var(--text-xs);
  font-weight: 640;
  white-space: nowrap;
}

.tour-caption__text {
  font-size: clamp(13px, 1.05vw, 16px);
  line-height: 1.6;
  color: var(--tour-ink);
}

.tour-caption__text.is-pulse {
  animation: tour-caption-in 420ms var(--ease-out) both;
}

@keyframes tour-caption-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   10. 结尾页与页脚
   -------------------------------------------------------------------------- */
.tour-end {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-6);
}

.tour-end__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.tour-end__mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--fill-brand);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.4);
}

.tour-end__title {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 700;
}

.tour-end__sub {
  margin: 4px 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.tour-end__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.tour-end__grid .card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tour-end__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.tour-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 42px;
  padding: 0 var(--space-5);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: 580;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast) var(--ease-out);
}

.tour-btn:hover {
  background: var(--bg-hover);
}

.tour-btn:active {
  transform: scale(0.97);
}

.tour-btn--primary {
  border-color: transparent;
  background: var(--fill-brand);
  color: #fff;
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.34);
}

.tour-btn--primary:hover {
  filter: brightness(1.06);
  background: var(--fill-brand);
}

/* 结尾页页脚：说明这一页是纯本地演示 */
.tour-foot {
  margin: 0;
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border-subtle);
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--text-tertiary);
}

/* --------------------------------------------------------------------------
   11. 响应式与减动效
   -------------------------------------------------------------------------- */
/* 1080p 及以下：窗口高度收一点，侧边栏窄一点 */
@media (max-width: 1440px) {
  .tour-app {
    grid-template-columns: 210px 1fr;
  }
}

@media (max-height: 860px) {
  .tour-window {
    height: min(600px, 100%);
  }

  .tour-brand__mark {
    width: 40px;
    height: 40px;
  }
}

@media (max-height: 720px) {
  .tour-brand__sub {
    display: none;
  }

  .tour-caption {
    min-height: 40px;
    padding: 8px var(--space-4);
  }
}

/* 窄屏（≤900px）：窗口改为纵向铺满，工具栏换行 */
@media (max-width: 900px) {
  .tour {
    gap: var(--space-3);
    padding: 10px;
    /* 窄屏下字幕会折成两行、播放器会换行，悬浮层更高，底部留白相应加大 */
    --tour-float-space: 196px;
  }

  .tour-window {
    width: 100%;
    height: min(520px, 100%);
    transform: none;
    animation: none;
  }

  .tour-app {
    grid-template-columns: 1fr;
  }

  .tour-app__aside {
    display: none;
  }

  .tour-stat-grid,
  .tour-stat-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tour-split,
  .tour-end__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tour-podium {
    grid-template-columns: minmax(0, 1fr);
  }

  .tour-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .tour-progress {
    order: 9;
    flex: 1 1 100%;
    min-width: 100%;
  }

  .tour-controls__time {
    min-width: auto;
  }

  .tour-chapters {
    max-height: 46vh;
  }

  .tour-chapters__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .tour-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .tour-caption__chapter {
    white-space: normal;
  }

  .tour-brand__name {
    font-size: var(--text-base);
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .tour-role__btn span {
    display: none;
  }

  .tour-role__btn {
    padding: 7px 10px;
  }

  .tour-ctl--ghost span {
    display: none;
  }

  .tour-form-grid,
  .tour-stat-grid,
  .tour-stat-grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 尊重系统的「减少动态效果」：不做位移与循环动画，只保留必要的状态反馈 */
@media (prefers-reduced-motion: reduce) {
  .tour *,
  .tour *::before,
  .tour *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .tour__glow,
  .tour-cursor {
    animation: none !important;
  }

  .tour-window {
    transform: none;
  }

  .tour-window__body > *,
  .tour-window__body.is-switching > * {
    opacity: 1;
    transform: none;
  }

  .tour-chart__line {
    stroke-dashoffset: 0;
  }

  /* 悬浮的字幕与播放器：不做淡入淡出动画，直接显隐 */
  .tour-float,
  .tour-caption.is-hidden,
  .tour-controls.is-hidden {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   附：登录页左下角的 /tour 入口
   ----------------------------------------------------------------------------
   登录页原本就有一个左下角的「大屏查分模式」入口（.auth-kiosk-entry，样式在 pages.css）。
   这里在它上面并排再加一个「产品介绍与使用教程」入口。
   为了不改动 pages.css，这条附带的规则放在本文件末尾；类名同样带 auth- 前缀，
   不会影响任何真实页面的现有样式。
   -------------------------------------------------------------------------- */
.auth-tour-entry {
  position: fixed;
  left: max(var(--space-5), env(safe-area-inset-left, 0px));
  bottom: max(var(--space-5), env(safe-area-inset-bottom, 0px));
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
  animation: rise-in 520ms var(--ease-out) 340ms both;
}

/* 大屏入口也在时，往上让开它的高度，避免两个入口叠在一起 */
.auth-tour-entry--stacked {
  bottom: calc(max(var(--space-5), env(safe-area-inset-bottom, 0px)) + 72px);
}

.auth-tour-entry:hover {
  transform: translateY(-2px);
  border-color: var(--brand-400);
  box-shadow: var(--shadow-lg);
}

.auth-tour-entry:active {
  transform: translateY(0) scale(0.985);
}

.auth-tour-entry:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
}

.auth-tour-entry__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--fill-brand);
  color: #fff;
}

.auth-tour-entry__body {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.auth-tour-entry__title {
  font-size: var(--text-sm);
  font-weight: 600;
}

.auth-tour-entry__desc {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.auth-tour-entry__arrow {
  color: var(--text-tertiary);
  transition: transform 220ms var(--ease-out);
}

.auth-tour-entry:hover .auth-tour-entry__arrow {
  transform: translateX(3px);
}

@media (max-width: 960px) {
  .auth-tour-entry {
    min-height: 48px;
    padding: var(--space-2) var(--space-3);
  }

  .auth-tour-entry--stacked {
    bottom: calc(max(var(--space-5), env(safe-area-inset-bottom, 0px)) + 62px);
  }

  .auth-tour-entry__desc {
    display: none;
  }

  .auth-tour-entry__icon {
    width: 30px;
    height: 30px;
  }
}
