/* =====================================================================
 * 星盘仪 OS v3 · 紫微斗数 5 步标准看盘路径
 * 01 命宫底色 → 02 三方格局 → 03 生年化禄 → 04 生年化忌 → 05 大限流年点燃
 * ===================================================================== */

.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: radial-gradient(circle at 50% 14%, #171e35 0%, #090c16 55%, #05060b 100%);
  color: #f4ede0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: contain;
  animation: gdOverlayIn 0.24s ease-out;
}

@keyframes gdOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gd-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(231, 200, 136, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 82% 26%, rgba(102, 178, 255, 0.06) 0%, transparent 42%);
  z-index: 0;
}

/* ---------- 顶部进度条与轻导航 ---------- */

.gd-head {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 16px 8px;
}

.gd-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.gd-prog-seg {
  flex: 1;
  height: 3.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease;
}

.gd-prog-seg.done { background: rgba(231, 200, 136, 0.55); }
.gd-prog-seg.on { background: #efd08d; }

.gd-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gd-pill {
  border: 1px solid rgba(231, 200, 136, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: #dfd3bd;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.gd-pill:active { transform: scale(0.97); }

.gd-head-center {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 11px;
  color: #d6b676;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gd-notice {
  position: absolute;
  left: 50%;
  bottom: calc(68px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(6px);
  z-index: 20;
  background: rgba(231, 200, 136, 0.96);
  color: #161108;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gd-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 幕内容主滚动区 ---------- */

.gd-stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 2px 16px 16px;
}

.gd-shell-inner {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.gd-title-block {
  text-align: center;
  padding: 0 4px;
}

.gd-hero-h {
  font-family: "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.32;
  color: #fdf6e8;
  letter-spacing: 0.03em;
  margin: 0;
}

.gd-hero-h em { font-style: normal; color: #f3d48f; }
.gd-hero-h em.is-lu { color: #52d992; }
.gd-hero-h em.is-ji { color: #ff8080; }

.gd-hero-sub {
  font-size: 12px;
  color: #9ba4b8;
  margin-top: 4px;
  line-height: 1.45;
}

/* =====================================================================
 * 跨幕持久旋转星盘舞台（Scene 01 → 04 连续物理旋转不闪烁）
 * ===================================================================== */

.astro-wrap {
  position: relative;
  width: min(100%, 296px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

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

.astro-wheel {
  transform-box: view-box;
  transform-origin: 160px 160px;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.astro-counter {
  transform-origin: 0px 0px;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.astro-node { cursor: pointer; }

.astro-node circle {
  transition: r 0.34s ease, fill 0.3s ease, stroke 0.3s ease, stroke-width 0.3s ease, opacity 0.3s ease;
}

.astro-node text {
  transition: fill 0.28s ease, opacity 0.28s ease;
}

/* 准星层平滑淡入淡出 */
.reticle-group {
  transition: opacity 0.32s ease;
}

.astro-center-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 118px;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.acb-tag { font-size: 9.5px; color: #d6b676; letter-spacing: 0.08em; }

.acb-main {
  font-family: "Noto Serif CJK SC", serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff8ea;
  line-height: 1.2;
}

.acb-sub { font-size: 9.5px; color: #9ba4b8; line-height: 1.3; }

/* 星盘底部极简交互提示（点过一次圆盘后自动变淡） */
.astro-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: -6px auto 2px;
  font-size: 11px;
  color: rgba(231, 200, 136, 0.82);
  letter-spacing: 0.02em;
  transition: opacity 0.3s ease;
}

.astro-hint::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #efd08d;
  box-shadow: 0 0 8px rgba(239, 208, 141, 0.8);
}

.astro-hint.is-learned {
  opacity: 0.45;
}

.astro-hint.is-learned::before {
  box-shadow: none;
}

/* =====================================================================
 * 玻璃解读卡与结构化组件
 * ===================================================================== */

.glass-box {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.068) 0%, rgba(255, 255, 255, 0.022) 100%);
  border: 1px solid rgba(231, 200, 136, 0.2);
  border-radius: 18px;
  padding: 13px 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 通用分段胶囊切换 */
.seg-pills {
  display: grid;
  gap: 6px;
}

.seg-pills.cols-2 { grid-template-columns: repeat(2, 1fr); }
.seg-pills.cols-3 { grid-template-columns: repeat(3, 1fr); }
.seg-pills.cols-4 { grid-template-columns: repeat(4, 1fr); }

.sp-btn {
  border: 1px solid rgba(231, 200, 136, 0.24);
  background: rgba(255, 255, 255, 0.048);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  padding: 7px 5px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}

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

.sp-nudge {
  position: absolute;
  top: 4px;
  right: 5px;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  color: #efd08d;
  opacity: 0.9;
  letter-spacing: 0.02em;
}

.sp-btn.is-lu .sp-nudge { color: #6ee7b7; }
.sp-btn.is-ji .sp-nudge { color: #ff9c9c; }

.sp-body-tag {
  position: absolute;
  top: 3px;
  right: 3px;
  font-style: normal;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 3.5px;
  border-radius: 4px;
  background: rgba(231, 200, 136, 0.24);
  border: 1px solid rgba(231, 200, 136, 0.5);
  color: #fce8b8;
}

.sp-btn b {
  display: block;
  font-size: 12px;
  color: #dfd5c4;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-btn span {
  display: block;
  font-size: 9.5px;
  color: #8892a6;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-btn.on {
  background: rgba(231, 200, 136, 0.16);
  border-color: #efd08d;
}
.sp-btn.on b { color: #fff4da; }
.sp-btn.on span { color: #dfc084; }

.sp-btn.is-lu.on {
  background: rgba(57, 208, 132, 0.15);
  border-color: #39d084;
}
.sp-btn.is-lu.on b { color: #7af5b6; }
.sp-btn.is-lu.on span { color: #a7f3d0; }

.sp-btn.is-ji.on {
  background: rgba(255, 107, 107, 0.15);
  border-color: #ff6b6b;
}
.sp-btn.is-ji.on b { color: #ff9c9c; }
.sp-btn.is-ji.on span { color: #fecaca; }

.sp-btn.is-opp.on {
  background: rgba(102, 178, 255, 0.16);
  border-color: #7fb3ff;
}
.sp-btn.is-opp.on b { color: #d6e9ff; }
.sp-btn.is-opp.on span { color: #9bc5ff; }

/* 精炼单一解读卡（去冗余分块 + 行内星曜/四化微卡片 + 结论高亮） */
.read-card {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(6, 9, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 2.5px solid #e4c17a;
}

.read-card.is-lu { border-left-color: #39d084; }
.read-card.is-ji { border-left-color: #ff6b6b; }

/* Step 02 经典星系格局头标 */
.pat-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  margin-bottom: 9px;
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(231, 200, 136, 0.15) 0%, rgba(102, 178, 255, 0.07) 100%);
  border: 1px solid rgba(231, 200, 136, 0.3);
}

.pat-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.pat-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffeec4;
  white-space: nowrap;
}

.pat-tag {
  font-size: 10.5px;
  color: #b7c0d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pat-grade {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(231, 200, 136, 0.18);
  color: #f3d48f;
  white-space: nowrap;
}

.read-body {
  font-size: 13.5px;
  line-height: 1.92;
  color: #dfd8cb;
}

.ic-tip-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(231, 200, 136, 0.78);
  letter-spacing: 0.02em;
}

/* =====================================================================
 * 行内微卡片：4 类不同形态（形状/边框/符号区分种类，同种类内按含义分色）
 * 全部支持点击弹出极简词卡释义
 * ===================================================================== */
.ic {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.28;
  margin: 0 2.5px;
  vertical-align: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.16s ease;
}

.ic:hover { filter: brightness(1.12); }
.ic:active { transform: scale(0.95); }
.ic.is-active { box-shadow: 0 0 0 2px rgba(255, 244, 214, 0.55); }

/* ① 宫位卡：坐标铭牌风（微方角 + 左侧 3px 实心竖色条） */
.ic-pal {
  padding: 1.5px 6.5px 1.5px 5.5px;
  border-radius: 3px;
  border: 1px solid rgba(140, 194, 255, 0.28);
  border-left: 3px solid #7ab8ff;
  background: rgba(140, 194, 255, 0.11);
  color: #c2e0ff;
}
/* 宫位内部分色：自我心境(蓝) / 财官实业(金) / 人际关系(紫) / 身心续航(青) */
.ic-pal.pal-self {
  border-color: rgba(122, 184, 255, 0.3);
  border-left-color: #74b4ff;
  background: rgba(122, 184, 255, 0.11);
  color: #c4e1ff;
}
.ic-pal.pal-wealth {
  border-color: rgba(242, 207, 132, 0.32);
  border-left-color: #ebc570;
  background: rgba(242, 207, 132, 0.11);
  color: #fbe6b6;
}
.ic-pal.pal-rel {
  border-color: rgba(202, 166, 255, 0.32);
  border-left-color: #bd90ff;
  background: rgba(202, 166, 255, 0.12);
  color: #e4d1ff;
}
.ic-pal.pal-body {
  border-color: rgba(102, 220, 208, 0.32);
  border-left-color: #53d1c4;
  background: rgba(102, 220, 208, 0.11);
  color: #b4f5ee;
}

/* ② 主星卡：圆润星芒胶囊风（全圆药丸 + ✦星芒 + 亮度内角标） */
.ic-star {
  padding: 1.5px 7px 1.5px 6px;
  border-radius: 999px;
  border: 1px solid rgba(231, 200, 136, 0.4);
  background: linear-gradient(135deg, rgba(231, 200, 136, 0.18), rgba(231, 200, 136, 0.06));
  color: #fce9be;
}
.ic-star::before {
  content: '✦';
  font-size: 9px;
  line-height: 1;
  opacity: 0.85;
}
.ic-star .ic-br {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  line-height: 1.35;
}
/* 主星内部分色：庙旺高能(耀金) / 得利平稳(星银) / 不陷磨砺(古铜) */
.ic-star.br-high {
  border-color: rgba(246, 211, 129, 0.56);
  background: linear-gradient(135deg, rgba(246, 211, 129, 0.24), rgba(214, 164, 72, 0.09));
  color: #ffefc6;
}
.ic-star.br-high .ic-br { color: #ffd97d; }
.ic-star.br-mid {
  border-color: rgba(203, 215, 238, 0.38);
  background: linear-gradient(135deg, rgba(203, 215, 238, 0.16), rgba(160, 178, 212, 0.06));
  color: #e6eefc;
}
.ic-star.br-mid .ic-br { color: #b9c9e8; }
.ic-star.br-low {
  border-color: rgba(224, 168, 132, 0.42);
  background: linear-gradient(135deg, rgba(224, 168, 132, 0.18), rgba(168, 110, 82, 0.08));
  color: #f4cdb4;
}
.ic-star.br-low .ic-br { color: #eba378; }

/* ③ 四化卡：双段印章风（左侧实心色块方印「禄/权/科/忌」+ 右侧星名） */
.ic-mut {
  padding: 0 6.5px 0 0;
  gap: 4px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(57, 208, 132, 0.45);
  background: rgba(16, 24, 38, 0.85);
}
.ic-mut .ic-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.25;
  color: #0b1019;
}
/* 四化内部分色：化禄(翠绿) / 化权(琥珀橙) / 化科(天蓝) / 化忌(绯红) */
.ic-mut.is-lu {
  border-color: rgba(57, 208, 132, 0.52);
  color: #84f7bc;
  box-shadow: 0 0 8px rgba(57, 208, 132, 0.16);
}
.ic-mut.is-lu .ic-seal { background: #39d084; }

.ic-mut.is-quan {
  border-color: rgba(242, 168, 76, 0.52);
  color: #ffd396;
  box-shadow: 0 0 8px rgba(242, 168, 76, 0.16);
}
.ic-mut.is-quan .ic-seal { background: #f2a84c; }

.ic-mut.is-ke {
  border-color: rgba(96, 180, 255, 0.52);
  color: #aad6ff;
  box-shadow: 0 0 8px rgba(96, 180, 255, 0.16);
}
.ic-mut.is-ke .ic-seal { background: #60b4ff; }

.ic-mut.is-ji {
  border-color: rgba(255, 107, 107, 0.55);
  color: #ffaaaa;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.18);
}
.ic-mut.is-ji .ic-seal { background: #ff6b6b; color: #1d090b; }

/* ④ 辅星卡：虚线几何轻标风（虚线边框 + ◆吉 / ▲煞 几何前标） */
.ic-aux {
  padding: 1px 6px 1px 5px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  background: transparent;
  font-weight: 600;
}
.ic-aux.is-good {
  border-color: rgba(108, 230, 171, 0.5);
  background: rgba(57, 208, 132, 0.07);
  color: #8bf2be;
}
.ic-aux.is-good::before {
  content: '◆';
  font-size: 8px;
  color: #4ad991;
}
.ic-aux.is-sha {
  border-color: rgba(255, 138, 152, 0.52);
  background: rgba(255, 107, 107, 0.07);
  color: #ffadb6;
}
.ic-aux.is-sha::before {
  content: '▲';
  font-size: 8px;
  color: #ff7a88;
}

/* 点击微卡片弹出的精简词卡浮层 */
.ic-pop {
  position: fixed;
  z-index: 90;
  width: min(304px, calc(100vw - 28px));
  padding: 11px 13px 12px;
  border-radius: 14px;
  background: rgba(14, 19, 34, 0.96);
  border: 1px solid rgba(231, 200, 136, 0.36);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ebe4d7;
  animation: icPopIn 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.ic-pop[hidden] { display: none; }

@keyframes icPopIn {
  from { opacity: 0; transform: translateY(4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ic-pop-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.ic-pop-cat {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1.5px 7px;
  border-radius: 999px;
  background: rgba(231, 200, 136, 0.14);
  color: #ebd094;
}

.ic-pop-cat.is-pal { background: rgba(122, 184, 255, 0.15); color: #9ecbff; }
.ic-pop-cat.is-lu, .ic-pop-cat.is-good { background: rgba(57, 208, 132, 0.16); color: #7cf2b4; }
.ic-pop-cat.is-ji, .ic-pop-cat.is-sha { background: rgba(255, 107, 107, 0.16); color: #ff9c9c; }
.ic-pop-cat.is-quan { background: rgba(242, 168, 76, 0.16); color: #ffd18e; }
.ic-pop-cat.is-ke { background: rgba(96, 180, 255, 0.16); color: #9ed0ff; }

.ic-pop-close {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #a4adc0;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ic-pop-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff8eb;
  margin-bottom: 4px;
}

.ic-pop-desc {
  font-size: 12px;
  line-height: 1.62;
  color: #ccc6ba;
}

.ic-pop-meta {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #9ba5ba;
  line-height: 1.48;
}

.ic-pop-arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(14, 19, 34, 0.96);
  border-right: 1px solid rgba(231, 200, 136, 0.36);
  border-bottom: 1px solid rgba(231, 200, 136, 0.36);
  transform: rotate(45deg);
}

.ic-pop.is-above .ic-pop-arrow {
  bottom: -6px;
}

.ic-pop.is-below .ic-pop-arrow {
  top: -6px;
  transform: rotate(225deg);
}

/* 结论性语句高亮（一眼捕捉核心！） */
.hl {
  background: linear-gradient(180deg, transparent 54%, rgba(231, 200, 136, 0.28) 54%);
  color: #fff6e0;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 3px;
}

.hl.is-lu {
  background: linear-gradient(180deg, transparent 54%, rgba(57, 208, 132, 0.28) 54%);
  color: #c8ffe1;
}

.hl.is-ji {
  background: linear-gradient(180deg, transparent 54%, rgba(255, 107, 107, 0.28) 54%);
  color: #ffd6d6;
}

/* 底部醒目结论条 */
.takeaway-bar {
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(231, 200, 136, 0.1);
  border: 1px solid rgba(231, 200, 136, 0.24);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
  color: #fdf2d6;
}

.read-card.is-lu .takeaway-bar {
  background: rgba(57, 208, 132, 0.1);
  border-color: rgba(57, 208, 132, 0.28);
  color: #c9ffe2;
}

.read-card.is-ji .takeaway-bar {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.28);
  color: #ffd8d8;
}

.takeaway-bar b {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  opacity: 0.82;
  margin-right: 6px;
}

/* Scene 01：星曜属性徽章条 */
.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-badge {
  font-size: 11px;
  color: #dcd3c4;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(231, 200, 136, 0.18);
  padding: 3.5px 9px;
  border-radius: 999px;
}

.meta-badge b { color: #f5d896; font-weight: 600; }
.meta-badge.is-good { border-color: rgba(57, 208, 132, 0.32); color: #b7f5d4; }
.meta-badge.is-good b { color: #5ce19e; }
.meta-badge.is-warn { border-color: rgba(255, 107, 107, 0.32); color: #ffd0d0; }
.meta-badge.is-warn b { color: #ff8f8f; }

/* Scene 02：格局强弱仪表条（庙旺分布 + 六吉六煞实算） */
.strength-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.str-box {
  border-radius: 12px;
  background: rgba(6, 9, 18, 0.48);
  border: 1px solid rgba(231, 200, 136, 0.16);
  padding: 8px 10px;
}

.str-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10.5px;
  color: #9ba4b8;
  margin-bottom: 4px;
}

.str-top b { font-size: 13px; color: #fce8bc; }

.str-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 10px;
  color: #c7cedd;
}

.str-pill {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.3;
}

.str-pill.is-tap {
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.14s ease, border-color 0.14s ease;
}

.str-pill.is-tap:hover { filter: brightness(1.15); border-color: rgba(231, 200, 136, 0.35); }
.str-pill.is-tap:active { transform: scale(0.95); }

.str-pill.is-ji-star { background: rgba(57, 208, 132, 0.14); border-color: rgba(57, 208, 132, 0.28); color: #7af5b6; }
.str-pill.is-sha-star { background: rgba(255, 107, 107, 0.14); border-color: rgba(255, 107, 107, 0.28); color: #ff9c9c; }

/* Scene 03 / 04：公式条 */
.formula-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11.5px;
  color: #b8c0d0;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(231, 200, 136, 0.14);
}

.formula-bar b { color: #f6dca6; }
.formula-sep { color: #687186; }

/* =====================================================================
 * Scene 05：双尺度人生曲线（一生大限 80 年 ↔ 本限 10 年逐年流年）
 * ===================================================================== */

.scale-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scale-seg {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(231, 200, 136, 0.22);
  border-radius: 999px;
  padding: 2.5px;
  gap: 2px;
}

.scale-btn {
  border: none;
  background: transparent;
  color: #9ba4b8;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s;
}

.scale-btn.on {
  background: linear-gradient(135deg, #efd08d, #c19244);
  color: #161108;
}

.now-btn {
  border: 1px solid rgba(231, 200, 136, 0.28);
  background: rgba(231, 200, 136, 0.1);
  color: #f6dca6;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.now-btn:active { transform: scale(0.96); }

/* 大限横滑切换带（右侧渐隐 + 微箭头提示可横滑） */
.dec-ribbon-wrap {
  position: relative;
}

.dec-ribbon {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 24px 2px 0;
  scrollbar-width: none;
}
.dec-ribbon::-webkit-scrollbar { display: none; }

.dec-ribbon-fade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 2px;
  width: 34px;
  border: none;
  padding: 0 4px 0 12px;
  background: linear-gradient(90deg, rgba(10, 14, 26, 0) 0%, rgba(10, 14, 26, 0.94) 68%);
  color: #efd08d;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.dec-ribbon-fade.is-end {
  opacity: 0;
  pointer-events: none;
}

/* 首次零打扰轻引导气泡（用过一次即永久消失） */
.coach-tip {
  position: fixed;
  z-index: 88;
  padding: 6px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3d48f 0%, #d3a652 100%);
  color: #161006;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 248, 224, 0.45) inset;
  cursor: pointer;
  animation: coachFloat 1.8s ease-in-out infinite;
}

.coach-tip[hidden] { display: none; }

.coach-tip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: var(--ct-arrow, 50%);
  width: 8px;
  height: 8px;
  background: #dfb462;
  transform: translateX(-50%) rotate(45deg);
}

.coach-tip.is-below::after {
  bottom: auto;
  top: -4px;
  background: #eed08b;
}

@keyframes coachFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.dr-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 10px;
  padding: 5px 9px;
  text-align: center;
  color: #9ba4b8;
  cursor: pointer;
  position: relative;
  transition: all 0.16s;
}

.dr-chip b { display: block; font-size: 11px; font-weight: 700; color: #dcd4c5; }
.dr-chip span { display: block; font-size: 9px; margin-top: 1px; }

.dr-chip.on {
  background: rgba(231, 200, 136, 0.18);
  border-color: #efd08d;
  color: #fff4da;
}
.dr-chip.on b { color: #fff6e0; }

.decadal-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(240, 161, 75, 0.1);
  border: 1px solid rgba(240, 161, 75, 0.28);
  font-size: 11.5px;
}

.db-left { min-width: 0; }
.db-left b { display: block; color: #f7c786; font-size: 12.5px; }
.db-left span { display: block; color: #c7bfb2; font-size: 10.5px; margin-top: 2px; }

.db-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(240, 161, 75, 0.2);
  color: #ffd59e;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.wave-card {
  background: linear-gradient(165deg, rgba(20, 26, 46, 0.86) 0%, rgba(11, 15, 28, 0.92) 100%);
  border: 1px solid rgba(231, 200, 136, 0.2);
  border-radius: 18px;
  padding: 12px 13px 10px;
}

.wave-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.wave-head b { font-size: 12.5px; color: #fdf5e6; white-space: nowrap; }

.wave-hint {
  font-size: 10px;
  color: #d6b676;
  background: rgba(231, 200, 136, 0.1);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.wave-interactive {
  position: relative;
  touch-action: none;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}

.wave-svg { width: 100%; height: auto; display: block; }

/* 10 年流年支持 5×2 紧凑矩阵，8 步大限支持 4×2 紧凑矩阵，一眼全览且好点！ */
.wave-years {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 7px;
}

.wave-years.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.wy-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 6px 2px;
  text-align: center;
  color: #9ba4b8;
  cursor: pointer;
  position: relative;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.wy-btn b { display: block; font-size: 12px; font-weight: 700; }
.wy-btn span { display: block; font-size: 9px; margin-top: 1px; opacity: 0.85; }

.wy-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.wy-dot.is-lu { background: #39d084; }
.wy-dot.is-ji { background: #ff6b6b; }
.wy-dot.is-both { background: #f3d48f; }

.wy-btn.on {
  background: rgba(231, 200, 136, 0.18);
  border-color: #efd08d;
  color: #fff4da;
}

/* 点燃事件卡片 */
.ignite-box {
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(6, 9, 18, 0.5);
  border: 1px solid rgba(231, 200, 136, 0.18);
  border-left: 2.5px solid #e4c17a;
  font-size: 12px;
  line-height: 1.55;
  color: #e4ddd0;
}

.ignite-box.is-lu { border-left-color: #39d084; background: rgba(16, 185, 129, 0.08); }
.ignite-box.is-ji { border-left-color: #ff6b6b; background: rgba(239, 68, 68, 0.08); }

.ignite-head {
  font-size: 11px;
  font-weight: 700;
  color: #f3d48f;
  margin-bottom: 3px;
}

.ignite-box.is-lu .ignite-head { color: #5ce19e; }
.ignite-box.is-ji .ignite-head { color: #ff8f8f; }

.wr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wr-card {
  border-radius: 14px;
  padding: 10px 11px;
  border: 1px solid transparent;
}

.wr-card.is-wind {
  background: rgba(16, 185, 129, 0.11);
  border-color: rgba(57, 208, 132, 0.3);
}

.wr-card.is-risk {
  background: rgba(239, 68, 68, 0.11);
  border-color: rgba(255, 107, 107, 0.3);
}

.wr-top {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.wr-card.is-wind .wr-top { color: #5ce19e; }
.wr-card.is-risk .wr-top { color: #ff8f8f; }
.wr-val { font-size: 13.5px; font-weight: 800; color: #fff; margin-bottom: 3px; }
.wr-sub { font-size: 11px; color: #cbd5e1; line-height: 1.4; }

.yishen-card {
  background: rgba(15, 20, 35, 0.78);
  border: 1px solid rgba(231, 200, 136, 0.16);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ys-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: #ebe4d7;
  line-height: 1.48;
}

.ys-tag {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.ys-tag.yi { background: #10b981; color: #052e16; }
.ys-tag.shen { background: #ef4444; color: #fff; }

.poster-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pa-btn {
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(231, 200, 136, 0.28);
  background: rgba(255, 255, 255, 0.045);
  color: #f3e6cc;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.pa-btn.pri {
  border: none;
  background: rgba(231, 200, 136, 0.18);
  border: 1px solid rgba(231, 200, 136, 0.45);
  color: #fceac4;
}

/* ---------- 底部导航条 ---------- */

.gd-foot {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(7, 9, 17, 0) 0%, rgba(7, 9, 17, 0.95) 26%);
}

.gd-prev {
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(231, 200, 136, 0.24);
  background: rgba(255, 255, 255, 0.045);
  color: #d0c5b1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.gd-prev:disabled { opacity: 0.3; cursor: default; }

.gd-next {
  flex: 1;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #f0d08c 0%, #c19244 100%);
  color: #161108;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(212, 169, 92, 0.28);
  transition: transform 0.12s;
}

.gd-next:active { transform: scale(0.98); }

/* ---------- 专业方盘页顶部返回星盘仪横幅 ---------- */

.guide-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(231, 200, 136, 0.15) 0%, rgba(102, 178, 255, 0.09) 100%);
  border: 1px solid rgba(231, 200, 136, 0.32);
  border-radius: 14px;
  padding: 11px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.guide-cta-left b { display: block; font-size: 14px; color: #fceac4; font-weight: 700; }
.guide-cta-left span { display: block; font-size: 11.5px; color: #aeb6c7; margin-top: 2px; }

.guide-cta-pill {
  flex-shrink: 0;
  background: linear-gradient(135deg, #f0d08c, #c19244);
  color: #161108;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 13px;
  border-radius: 999px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .gd-head, .gd-foot { max-width: 520px; width: 100%; margin: 0 auto; }
  .gd-shell-inner { max-width: 480px; padding-top: 4px; }
  .astro-wrap { width: 320px; }
  .gd-hero-h { font-size: 24px; }
}

@media (max-height: 700px) and (max-width: 767px) {
  .gd-head { padding-top: 6px; padding-bottom: 4px; }
  .gd-progress { margin-bottom: 6px; }
  .gd-hero-h { font-size: 19px; }
  .astro-wrap { width: 242px; }
  .gd-shell-inner { gap: 8px; }
}
