/* 银河星空冥想 · 共享视觉规范
   PRD §6.5：暗角 + 压暗 + 调色遮罩；呼吸星核青白；收束暖金；克制高级
   PRD §4.4：无广告、无弹窗、无诱导分享；极简控制 */

:root {
  --bg-deep: #050810;
  --bg-mid: #0a1020;
  --star-cyan: rgba(180, 220, 255, 0.9);
  --star-blue: rgba(120, 180, 255, 0.5);
  --warm-gold: rgba(255, 210, 140, 0.9);
  --warm-amber: rgba(245, 195, 120, 0.85);
  --text-soft: rgba(220, 230, 245, 0.85);
  --text-dim: rgba(180, 190, 210, 0.55);
  --text-faint: rgba(150, 160, 180, 0.4);
  --line: rgba(255, 255, 255, 0.1);
  --ctrl-bg: rgba(8, 14, 28, 0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg-deep);
  color: var(--text-soft);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ===== 星空背景层 ===== */
.space-bg {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, var(--bg-mid) 0%, var(--bg-deep) 70%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  /* 背景图加载后平滑过渡（支持的浏览器生效，不支持的直接切换） */
  transition: background-image 0.8s ease;
}
.space-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.7) 100%);
  /* 暗角 + 压暗 */
}
/* 背景轮换备用层（双层交叉淡入淡出，20261014 自动轮换需求） */
.space-bg.alt {
  z-index: 1;
  opacity: 0;
  transition: opacity 2.5s ease;
}

/* ===== 呼吸 Canvas（铺满视口 → 球心 = 页面正中心，20261014 需求）===== */
.breath-canvas {
  position: fixed; inset: 0; z-index: 2;
  display: block; width: 100vw; height: 100vh;
}

/* ===== 文案 ===== */
.slogan {
  position: relative; z-index: 3;
  text-align: center; color: var(--text-soft);
  letter-spacing: 0.12em;
}
.sub {
  position: relative; z-index: 3;
  text-align: center; color: var(--text-dim);
  letter-spacing: 0.06em;
}
.countdown {
  font-variant-numeric: tabular-nums;
  color: var(--star-cyan);
  text-align: center;
  letter-spacing: 0.08em;
}
/* ===== 下次冥想倒计时（等待页顶部居中小文字）===== */
.session-countdown {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  z-index: 5;
  pointer-events: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

/* ===== 阶段提示（30 分钟四段）===== */
.phase-label {
  color: var(--warm-amber);
  letter-spacing: 0.2em;
  text-align: center;
}
.phase-hint {
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.08em;
}

/* ===== 呼吸口令文字（吸气/屏息/呼气）===== */
.breath-cue {
  position: relative; z-index: 3;
  color: var(--star-cyan);
  text-align: center;
  letter-spacing: 0.3em;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.breath-cue.show { opacity: 0.92; }

/* ===== 完成统计（结束页）===== */
.complete-stat {
  color: var(--warm-gold);
  text-align: center;
  letter-spacing: 0.06em;
}
.complete-stat .num {
  font-variant-numeric: tabular-nums;
  font-size: 1.6em;
  color: var(--warm-gold);
}
.complete-stat.incomplete .num { color: var(--text-soft); }

/* ===== 按钮 / 控件 ===== */
.btn-ghost {
  background: var(--ctrl-bg);
  border: 1px solid var(--line);
  color: var(--text-soft);
  padding: 10px 24px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s, border-color 0.3s;
  font-size: 14px;
  letter-spacing: 0.08em;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-ghost:active { transform: scale(0.97); }
.btn-ghost.icon { padding: 10px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.btn-ghost[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ===== 控件栏 ===== */
.controls {
  position: fixed; z-index: 5;
  display: flex; align-items: center; gap: 14px;
  background: var(--ctrl-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 音量条（仅 PC）*/
.vol-wrap { display: flex; align-items: center; gap: 6px; color: var(--text-soft); }
.vol-slider {
  -webkit-appearance: none; appearance: none;
  width: 100px; height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px; outline: none;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--star-cyan); cursor: pointer;
}
.vol-slider::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--star-cyan); cursor: pointer; border: 0;
}

/* ===== 顶部右角辅助控件（提示开关、低动效、全屏）===== */
.aux-controls {
  position: fixed; top: 16px; right: 16px; z-index: 6;
  display: flex; gap: 8px;
}
.aux-controls .btn-ghost { padding: 6px 12px; font-size: 12px; }

/* ===== 状态指示徽章（沉浸/兜底/弱网）===== */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.badge.fallback { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.4); color: var(--warm-amber); }
.badge.live { background: rgba(80, 200, 120, 0.15); border-color: rgba(80, 200, 120, 0.35); color: rgba(140, 220, 160, 0.95); }

/* ===== 兜底提示（音频失败）===== */
.fallback-tip {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  z-index: 6;
  padding: 10px 20px;
  background: rgba(20, 12, 4, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  color: var(--warm-amber);
  font-size: 13px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  max-width: 80vw;
}

/* ===== 竖屏锁定提示（H5 横屏时）===== */
.rotate-tip {
  position: fixed; inset: 0; z-index: 99;
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-deep);
  color: var(--text-soft);
  text-align: center;
  padding: 40px;
}
.rotate-tip .icon { font-size: 64px; margin-bottom: 20px; opacity: 0.6; }
.rotate-tip.show { display: flex; }

/* ===== 微信内播放引导（首次交互）===== */
.wechat-play-mask {
  position: fixed; inset: 0; z-index: 50;
  display: none;
  background: rgba(5, 8, 16, 0.85);
  align-items: center; justify-content: center;
  color: var(--text-soft);
  cursor: pointer;
}
.wechat-play-mask.show { display: flex; }
.wechat-play-mask .inner {
  text-align: center;
  padding: 30px;
}
.wechat-play-mask .icon {
  font-size: 48px; color: var(--star-cyan); margin-bottom: 16px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.1); }
}

/* ===== 全屏沉浸 ===== */
.immersive-fullscreen .controls { opacity: 0.25; transition: opacity 0.4s; }
.immersive-fullscreen .controls:hover { opacity: 1; }
.immersive-fullscreen .aux-controls { opacity: 0.2; transition: opacity 0.4s; }
.immersive-fullscreen .aux-controls:hover { opacity: 1; }

/* ===== 工具类 ===== */
.hidden { display: none !important; }
/* 文案沉底布局：呼吸球居中，文字信息排在页面底部（20261014 需求） */
.screen {
  width: 100%; height: 100%; position: relative;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end;
  padding-bottom: 9vh;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ===== 定制冥想空间 V2（PC/H5 共享，20261017a 整页应用，骨架样式见文件末尾 .cs-app 体系）===== */
.cs-sec + .cs-sec { margin-top: 6px; }
.cs-text {
  width: 100%; min-height: 72px; resize: vertical;
  background: rgba(0, 0, 0, 0.35); color: var(--text-soft);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; line-height: 1.6;
  font-family: inherit; outline: none;
}
.cs-text:focus { border-color: rgba(168, 128, 245, 0.5); }
.cs-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cs-label { font-size: 12px; color: var(--text-dim); margin-right: 2px; }
.cs-chip {
  background: rgba(0, 0, 0, 0.3); color: var(--text-soft);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 5px 14px; font-size: 13px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.cs-chip.on { border-color: rgba(168, 128, 245, 0.7); color: #cdb6ff; }
.cs-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.cs-btn {
  border-radius: 10px; padding: 10px 16px; font-size: 14px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--text-soft);
}
.cs-btn:disabled { opacity: 0.45; cursor: default; }
.cs-btn-main {
  background: linear-gradient(135deg, rgba(120, 86, 220, 0.85), rgba(88, 60, 190, 0.85));
  border-color: rgba(168, 128, 245, 0.6); color: #fff;
}
.cs-btn-sub { font-size: 13px; padding: 8px 14px; color: var(--text-dim); }
.cs-btn-sub:hover { color: var(--text-soft); }
.cs-msg { font-size: 13px; color: var(--warm-amber); min-height: 18px; margin-top: 8px; }
.cs-stage {
  margin-top: 8px; padding: 10px 12px; font-size: 13px;
  background: rgba(0, 0, 0, 0.3); border-radius: 10px;
  color: var(--text-soft); line-height: 1.6; word-break: break-all;
}
.cs-stage.hidden { display: none; }
.cs-login-row { display: flex; gap: 8px; margin-bottom: 10px; }
.cs-input {
  flex: 1; background: rgba(0, 0, 0, 0.35); color: var(--text-soft);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; outline: none; min-width: 0;
}
.cs-input:focus { border-color: rgba(168, 128, 245, 0.5); }
.cs-back {
  background: none; border: none; color: var(--text-dim);
  font-size: 13px; cursor: pointer; padding: 4px 0; margin-top: 4px;
}
.cs-back:hover { color: var(--text-soft); }
.cs-mine-list { display: flex; flex-direction: column; gap: 8px; }
.cs-mine-item {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(0, 0, 0, 0.25); font-size: 13px;
}
.cs-mine-item.ok { cursor: pointer; border-color: rgba(168, 128, 245, 0.4); }
.cs-mine-item.ok:hover { background: rgba(120, 86, 220, 0.15); }
.cs-mine-txt { color: var(--text-soft); line-height: 1.5; }
.cs-mine-st { color: var(--text-dim); font-size: 12px; margin-top: 4px; }
.cs-mine-empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 18px 0; }

/* ===== 定制面板 Tab 栏（20261015）===== */
.cs-tabs {
  display: flex; gap: 4px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cs-tab {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 13px; letter-spacing: 0.06em;
  padding: 8px 14px; border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.cs-tab:hover { color: var(--text-soft); }
.cs-tab.on {
  color: var(--star-cyan);
  border-bottom-color: rgba(180, 220, 255, 0.7);
}

/* ===== 公共冥想库列表（20261015）===== */
.cs-lib-tip {
  font-size: 12px; color: var(--text-faint);
  letter-spacing: 0.06em; margin-bottom: 10px;
}
.cs-lib-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 56vh; overflow-y: auto; padding-right: 2px;
}
.cs-lib-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(0, 0, 0, 0.25); font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}
.cs-lib-item.ok { cursor: pointer; border-color: rgba(168, 128, 245, 0.35); }
.cs-lib-item.ok:hover { background: rgba(120, 86, 220, 0.15); border-color: rgba(168, 128, 245, 0.6); }
.cs-lib-item.loading { opacity: 0.55; pointer-events: none; }
.cs-lib-info { flex: 1; min-width: 0; }
.cs-lib-title {
  color: var(--text-soft); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cs-lib-dur { color: var(--text-faint); font-size: 12px; margin-top: 2px; }
.cs-lib-play {
  color: var(--star-cyan); font-size: 16px; padding-left: 10px;
  flex-shrink: 0;
}
.cs-lib-empty {
  color: var(--text-dim); font-size: 13px; text-align: center; padding: 18px 0;
}

/* ===== 公共冥想课程两级浏览（20261015）===== */
.cs-course {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(0, 0, 0, 0.25); cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.cs-course:hover { border-color: rgba(168, 128, 245, 0.6); background: rgba(120, 86, 220, 0.12); }
.cs-course-info { flex: 1; min-width: 0; }
.cs-course-name {
  color: var(--text-soft); font-size: 14px; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cs-course-meta { color: var(--text-faint); font-size: 12px; margin-top: 2px; }
.cs-course-arrow { color: var(--text-faint); font-size: 18px; padding-left: 10px; flex-shrink: 0; }
.cs-lib-back {
  color: var(--star-cyan); font-size: 13px; cursor: pointer;
  padding: 2px 0 6px; user-select: none;
}
.cs-lib-back:hover { text-decoration: underline; }
.cs-lib-head { padding: 4px 2px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cs-lib-head-name { color: var(--text); font-size: 15px; font-weight: 600; }

/* ===== F9 权益余额条 + F10 加购页 + F8 作品管理（20261016）===== */
.cs-quota {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 10px; padding: 9px 12px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px;
}
.cs-quota.hidden { display: none; }
.cs-quota-label { color: var(--text-faint); letter-spacing: 0.04em; }
.cs-quota-item { color: var(--text-soft); }
.cs-quota-item b { color: var(--star-cyan); font-weight: 600; }
.cs-quota-buy {
  margin-left: auto; background: none; cursor: pointer;
  border: 1px solid rgba(168, 128, 245, 0.5); border-radius: 12px;
  color: #cdb6ff; font-size: 12px; padding: 3px 10px;
  transition: background 0.2s;
}
.cs-quota-buy:hover { background: rgba(120, 86, 220, 0.2); }

.cs-pack-tip {
  font-size: 12px; color: var(--text-faint);
  letter-spacing: 0.06em; margin-bottom: 10px;
}
.cs-pack-rows { display: flex; flex-direction: column; gap: 8px; }
.cs-pack-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(0, 0, 0, 0.25); font-size: 13px;
}
.cs-pack-name { color: var(--text-soft); }
.cs-pack-price { color: var(--text-faint); font-size: 12px; margin-left: 8px; }
.cs-pack-stepper { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cs-pack-btn {
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--text-soft);
  font-size: 15px; line-height: 1;
}
.cs-pack-btn:hover { border-color: rgba(168, 128, 245, 0.6); }
.cs-pack-n {
  min-width: 22px; text-align: center; color: var(--text);
  font-size: 15px; font-weight: 600;
}
.cs-pack-total {
  margin-top: 12px; text-align: right; color: var(--text);
  font-size: 15px; font-weight: 600;
}
.cs-pack-qr-tip { color: var(--text-soft); font-size: 13px; margin-bottom: 8px; }
.cs-pack-qr-tip2 { color: var(--text-faint); font-size: 12px; margin-top: 8px; }
.cs-pack-qr {
  display: block; width: 200px; height: 200px;
  margin: 0 auto; border-radius: 10px; background: #fff; padding: 6px;
}

.cs-mine-item { display: flex; align-items: flex-start; gap: 8px; }
.cs-mine-item .cs-mine-txt { flex: 1; min-width: 0; }
.cs-mine-acts { display: flex; gap: 4px; flex-shrink: 0; }
.cs-mine-act {
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); font-size: 14px; line-height: 1;
  padding: 4px 6px; border-radius: 6px;
}
.cs-mine-act:hover { color: var(--star-cyan); background: rgba(0, 0, 0, 0.3); }
.cs-mine-act.del:hover { color: #ff9d9d; }

/* ===== 定制冥想空间 V2：整页 Web 应用骨架（20261017b，对齐 08 文档 §3）=====
   space.html 应用主体：顶栏导航 + 全宽主内容区（max-width 1200px）；
   工作台四区 = 左栏（诉求+灵感）+ 右栏（配置+权益+提交）+ 全宽进度卡（七步 stepper） */
.cs-app { position: relative; z-index: 5; min-height: 100vh; display: flex; flex-direction: column; }
.cs-appbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 10, 22, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: calc(10px + env(safe-area-inset-top)) 20px 10px;
}
.cs-appbar-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 20px; }
.cs-brand { font-size: 16px; letter-spacing: 0.1em; color: var(--star-cyan); white-space: nowrap; }
.cs-nav { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; }
.cs-nav-btn {
  background: none; border: none; color: var(--text-dim);
  font-size: 14px; letter-spacing: 0.06em; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}
.cs-nav-btn:hover { color: var(--text-soft); background: rgba(255, 255, 255, 0.06); }
.cs-nav-btn.on { color: var(--star-cyan); background: rgba(120, 180, 255, 0.12); }
.cs-appbar-r { display: flex; gap: 8px; align-items: center; }
.cs-appbar-act {
  background: var(--ctrl-bg); border: 1px solid var(--line); color: var(--text-dim);
  font-size: 12px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.cs-appbar-act:hover { color: var(--text-soft); border-color: rgba(255, 255, 255, 0.22); }
.cs-main {
  flex: 1; width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 28px 20px 64px; box-sizing: border-box;
}
.cs-view { display: block; }

/* 工作台四区（08 §3.2）：左主右辅双栏，H5 塌缩单栏 */
.cs-work-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 16px; align-items: start; }
.cs-col-main, .cs-col-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cs-card {
  background: rgba(10, 16, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; padding: 18px 20px;
}
.cs-card-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; letter-spacing: 0.14em; color: var(--text-dim);
  margin-bottom: 12px;
}
.cs-count { font-variant-numeric: tabular-nums; color: var(--text-faint); letter-spacing: 0.05em; }
.cs-app .cs-text { min-height: 150px; font-size: 15px; }

/* 七步进度可视化（08 §4.1/§4.4）：步骤圆点 + 连接线 + 当前步呼吸高亮 */
.cs-progress-card { margin-top: 16px; }
.cs-steps { display: flex; align-items: flex-start; margin: 6px 0 4px; }
.cs-step { display: flex; flex-direction: column; align-items: center; position: relative; flex: 1; min-width: 0; }
.cs-step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.06); color: var(--text-faint);
  border: 1px solid var(--line);
  transition: all 0.3s;
}
.cs-step-name { margin-top: 8px; font-size: 12px; letter-spacing: 0.06em; color: var(--text-faint); white-space: nowrap; }
.cs-step-line {
  position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px);
  height: 2px; background: rgba(255, 255, 255, 0.1);
}
.cs-step-line.done { background: rgba(120, 180, 255, 0.6); }
.cs-step.done .cs-step-dot { background: rgba(80, 160, 255, 0.16); border-color: rgba(120, 180, 255, 0.5); color: var(--star-cyan); }
.cs-step.done .cs-step-name { color: var(--text-soft); }
.cs-step.cur .cs-step-dot {
  background: rgba(120, 180, 255, 0.18); border-color: var(--star-cyan); color: var(--star-cyan);
  animation: csStepPulse 1.8s ease-in-out infinite;
}
.cs-step.cur .cs-step-name { color: var(--star-cyan); }
.cs-step.fail .cs-step-dot { background: rgba(255, 120, 120, 0.14); border-color: rgba(255, 140, 140, 0.5); color: #ff9d9d; }
.cs-step.fail .cs-step-name { color: #ff9d9d; }
@keyframes csStepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(120, 180, 255, 0.35); }
  50%      { box-shadow: 0 0 0 8px rgba(120, 180, 255, 0); }
}
.cs-stage-text {
  margin-top: 14px; text-align: center;
  color: var(--star-cyan); font-size: 14px; letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.cs-progress-card audio { margin-top: 12px; width: 100%; }

/* 登录浮层（流程中，不前置）*/
.cs-login-modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 6, 14, 0.72);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.cs-login-modal.hidden { display: none; }
.cs-login-panel {
  width: min(420px, 92vw);
  background: rgba(10, 16, 32, 0.95);
  border: 1px solid rgba(168, 128, 245, 0.25);
  border-radius: 16px; padding: 20px 22px;
}
.cs-login-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; letter-spacing: 0.12em; color: var(--star-cyan); font-size: 15px;
}
.cs-login-x { background: none; border: none; color: var(--text-dim); font-size: 22px; line-height: 1; cursor: pointer; }
.cs-login-x:hover { color: var(--text-soft); }

/* H5 单栏断点（<900px）：双栏塌缩单栏，顶栏两行（品牌+操作 / 导航独占第二行）*/
@media (max-width: 900px) {
  .cs-appbar { padding-left: 12px; padding-right: 12px; }
  .cs-appbar-in { flex-wrap: wrap; gap: 10px 8px; }
  .cs-brand { font-size: 14px; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .cs-appbar-r { margin-left: auto; flex-shrink: 0; }
  /* flex-basis:100% 强制导航换行独占整行，横向滚动而非被裁切 */
  .cs-nav { order: 3; flex: 0 0 100%; width: 100%; padding-bottom: 2px; }
  .cs-main { padding: 14px 12px calc(48px + env(safe-area-inset-bottom)); }
  .cs-work-grid { grid-template-columns: 1fr; }
  .cs-card { padding: 14px; border-radius: 12px; }
  .cs-steps { overflow-x: auto; }
  .cs-step-name { font-size: 10px; }
  .cs-step-dot { width: 24px; height: 24px; font-size: 11px; }
  .cs-step-line { top: 12px; left: calc(50% + 14px); right: calc(-50% + 14px); }
}

/* ===== 全景冥想空间（2026-10-18）===== */
.pano-app {
  position: fixed; inset: 0; z-index: 1000;
  background: #000; overflow: hidden;
}
.pano-container {
  position: absolute; inset: 0;
}
.pano-container .pnlm-container {
  background: #000 !important;
}
/* 全景呼吸球（20261026）：同普通页 .breath-canvas，但置于全景层内、
   球心=屏幕中心；pointer-events:none 保证鼠标拖拽 360 时不被拦截 */
.pano-app .pano-breath { pointer-events: none; }
.pano-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
  z-index: 100; pointer-events: none;
}
.pano-topbar > * { pointer-events: auto; }
.pano-title {
  font-size: 16px; letter-spacing: 0.14em; color: var(--star-cyan);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.pano-scene-switch {
  display: flex; align-items: center; gap: 8px;
}
.pano-scene-prev, .pano-scene-next {
  width: 30px; height: 30px; font-size: 18px;
}
.pano-btn {
  background: rgba(10, 16, 32, 0.5);
  border: 1px solid rgba(168, 128, 245, 0.3);
  color: var(--text-soft);
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  transition: all 0.2s;
}
.pano-btn:hover { background: rgba(168, 128, 245, 0.25); border-color: rgba(168, 128, 245, 0.5); }
.pano-back { font-size: 22px; }
.pano-gyro { font-size: 18px; }
.pano-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
  z-index: 100;
}
.pano-play {
  width: 48px; height: 48px; font-size: 18px;
  background: rgba(168, 128, 245, 0.3);
  border-color: rgba(168, 128, 245, 0.6);
}
.pano-vol-wrap {
  flex: 1; max-width: 280px;
  display: flex; align-items: center;
}
.pano-vol {
  width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.2);
  outline: none;
}
.pano-vol::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--star-cyan); cursor: pointer;
}
.pano-list { font-size: 20px; }
.pano-track-drawer {
  position: absolute; bottom: 0; left: 0; right: 0;
  max-height: 60vh;
  background: rgba(8, 12, 24, 0.95);
  border-top: 1px solid rgba(168, 128, 245, 0.2);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 20;
  display: flex; flex-direction: column;
}
.pano-track-drawer.open { transform: translateY(0); }
.pano-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(168, 128, 245, 0.15);
  font-size: 15px; color: var(--star-cyan); letter-spacing: 0.08em;
}
.pano-drawer-close { background: none; border: none; color: var(--text-dim); font-size: 22px; cursor: pointer; }
.pano-drawer-list {
  overflow-y: auto; padding: 8px 0;
  max-height: calc(60vh - 52px);
}
.pano-track-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.pano-track-item:hover { background: rgba(168, 128, 245, 0.12); }
.pano-track-item.playing { background: rgba(168, 128, 245, 0.2); }
.pano-track-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pano-track-idx { color: var(--text-dim); font-size: 13px; width: 20px; text-align: center; flex-shrink: 0; }
.pano-track-title { color: var(--text-soft); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pano-track-play { color: var(--star-cyan); font-size: 12px; flex-shrink: 0; }
.pano-empty { padding: 24px; text-align: center; color: var(--text-dim); font-size: 13px; }
.pano-tip {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(8, 12, 24, 0.9);
  border: 1px solid rgba(168, 128, 245, 0.3);
  border-radius: 10px;
  padding: 10px 18px;
  color: var(--text-soft); font-size: 13px;
  z-index: 30; pointer-events: none;
  white-space: nowrap;
}
/* 全景模式右下角"普通"切换按钮 */
.pano-mode-switch {
  position: absolute;
  right: 16px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 100;
  background: rgba(10, 16, 32, 0.6);
  border: 1px solid rgba(168, 128, 245, 0.4);
  color: var(--star-cyan);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s;
}
.pano-mode-switch:hover {
  background: rgba(168, 128, 245, 0.3);
  border-color: rgba(168, 128, 245, 0.7);
}
/* 首页右下角"全景"按钮（如未复用 #btnCustom） */
.pano-entry-btn {
  position: fixed;
  right: 24px;
  bottom: 32px;
  z-index: 100;
}
