/* ============================================================
   易海观爻 · 驻留感应香案（与网站浅色书卷风一致）
   主色：#1a1a1a 墨色 / #b85c38 朱砂 / #f4f4f5 纸灰 / #fafafa 宣白
   ============================================================ */

/* ---------- 右上角驻留计时徽章（轻量胶囊） ---------- */
.xiang-timer {
  position: fixed;
  top: 24px;
  right: 24px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  color: var(--front-soft-ink, #6b7280);
  box-shadow: var(--front-shadow, 0 1px 3px rgba(0,0,0,.06));
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 999;
  font-weight: 500;
  letter-spacing: .3px;
  transition: all .2s ease;
}
.xiang-timer strong {
  color: var(--front-ink, #1a1a1a);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.xiang-timer .xiang-pill-sep {
  opacity: .3;
}
.xiang-timer.xiang-has-stock {
  border-color: rgba(184, 92, 56, .35);
}
.xiang-timer.xiang-has-stock::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #b85c38;
  box-shadow: 0 0 8px rgba(184, 92, 56, .5);
}

/* ---------- Modal 通用叠加层（与网站 front 一致） ---------- */
.xiang-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  padding: 16px;
}
.xiang-mask.xiang-active {
  opacity: 1;
  pointer-events: auto;
}

/* 卡片容器 — 继承 front card */
.xiang-card {
  background: #fff;
  border: 1px solid var(--front-border, rgba(0,0,0,.08));
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  text-align: center;
  position: relative;
  transform: translateY(12px) scale(.98);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  max-height: 90vh;
  overflow-y: auto;
}
.xiang-mask.xiang-active .xiang-card {
  transform: translateY(0) scale(1);
}

/* 卡片关闭按钮 */
.xiang-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--front-soft-ink, #6b7280);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .18s ease;
}
.xiang-close:hover {
  background: #f4f4f5;
  color: var(--front-ink, #1a1a1a);
}

/* ---------- 通用眉标/标题/文案 ---------- */
.xiang-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--front-soft-ink, #6b7280);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.xiang-eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: rgba(0,0,0,.2);
  border-radius: 1px;
}
.xiang-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--front-ink, #1a1a1a);
  line-height: 1.4;
  margin: 0 0 16px 0;
}
.xiang-title-accent {
  color: #b85c38;
}
.xiang-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--front-soft-ink, #6b7280);
  margin: 0 0 20px 0;
}
.xiang-desc strong {
  color: var(--front-ink, #1a1a1a);
  font-weight: 600;
}

/* ---------- 通用按钮 ---------- */
.xiang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s ease;
  text-decoration: none;
  line-height: 1.3;
}
.xiang-btn-primary {
  background: #1a1a1a;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.xiang-btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.xiang-btn-primary:disabled {
  background: #aaa !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.xiang-btn-outline {
  background: #fff;
  color: var(--front-ink, #1a1a1a);
  border-color: rgba(0,0,0,.15);
}
.xiang-btn-outline:hover {
  background: #f4f4f5;
  border-color: rgba(0,0,0,.3);
}
.xiang-btn + .xiang-btn {
  margin-top: 10px;
}

/* 心香库存徽章（在按钮上方） */
.xiang-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: #fef6f3;
  color: #b85c38;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 16px;
  border: 1px solid rgba(184, 92, 56, .18);
}
.xiang-stock-num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* ---------- 心香图标 ---------- */
.xiang-incense-icon {
  width: 84px;
  height: 84px;
  margin: 10px auto 20px auto;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff4eb 0%, #fbe0cc 60%, #f5d1b4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 6px 20px rgba(184, 92, 56, .15);
  position: relative;
}
.xiang-incense-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 18px;
  background: linear-gradient(to top, #8c4126, transparent);
  border-radius: 2px;
  opacity: .7;
}

/* ---------- 香案区域 ---------- */
.xiang-altar {
  height: 160px;
  margin: 20px 0 24px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background: linear-gradient(to bottom, transparent 60%, #fafaf5 100%);
  border-radius: 12px;
}

/* 烟雾 */
.xiang-smoke {
  position: absolute;
  top: 20px;
  width: 100%;
  height: 70px;
  pointer-events: none;
  display: none;
}
.xiang-smoke-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 8px;
  height: 60px;
  background: linear-gradient(to top, rgba(120, 100, 80, .45), transparent);
  border-radius: 50%;
  filter: blur(4px);
  transform: translateX(-50%);
  animation: xiangFloatSmoke 2.5s infinite ease-out;
}
@keyframes xiangFloatSmoke {
  0%   { opacity: 0; transform: translateX(-50%) translateY(0) scaleX(1); }
  50%  { opacity: .7; transform: translateX(-30%) translateY(-22px) scaleX(2); }
  100% { opacity: 0; transform: translateX(-65%) translateY(-50px) scaleX(3.2); }
}

/* 香柱 */
.xiang-stick {
  width: 4px;
  height: 80px;
  background: linear-gradient(to bottom, #a0522d 0%, #8c4126 100%);
  border-radius: 2px 2px 0 0;
  position: relative;
  display: none;
}
.xiang-stick .xiang-ember {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 5px;
  background: #ff5a00;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff5a00, 0 0 18px rgba(255,100,0,.6);
  animation: xiangEmber 1.2s infinite alternate ease-in-out;
}
@keyframes xiangEmber {
  from { box-shadow: 0 0 8px #ff5a00, 0 0 14px rgba(255,100,0,.5); }
  to   { box-shadow: 0 0 12px #ff6e1a, 0 0 22px rgba(255,100,0,.75); }
}

/* 青铜香炉 */
.xiang-burner {
  width: 120px;
  height: 42px;
  background: linear-gradient(180deg, #8a6a4a 0%, #3d2e20 100%);
  border-radius: 0 0 24px 24px;
  border-top: 4px solid #c29e77;
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
  position: relative;
  z-index: 1;
}
.xiang-burner::after {
  content: "观 爻";
  font-size: 11px;
  color: rgba(255, 235, 200, .55);
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  letter-spacing: 3px;
}

/* ---------- 六十四卦卷轴（浅色书卷风 · 与网站统一） ---------- */
.xiang-scroll-card {
  background: #fff;
  border: 1px solid var(--front-border, rgba(0,0,0,.08));
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
  padding: 32px 28px 24px 28px;
  max-width: 440px;
  color: var(--front-ink, #1a1a1a);
  position: relative;
}
/* 顶部/底部极细朱砂线条 —— 卷轴留白装饰（替代厚重木轴） */
.xiang-scroll-card::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: rgba(184, 92, 56, .4);
  border-radius: 1px;
}
.xiang-scroll-card::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: rgba(184, 92, 56, .25);
  border-radius: 1px;
}

.xiang-scroll-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--front-soft-ink, #6b7280);
  text-transform: uppercase;
  margin: 4px auto 8px auto;
  position: relative;
  z-index: 1;
}
.xiang-scroll-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: rgba(0,0,0,.2);
  border-radius: 1px;
}
.xiang-scroll-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--front-ink, #1a1a1a);
  margin: 2px 0 4px 0;
  letter-spacing: .02em;
  position: relative;
  z-index: 1;
}
.xiang-scroll-trigram {
  font-size: 12px;
  color: var(--front-soft-ink, #6b7280);
  margin-bottom: 14px;
  letter-spacing: .5px;
  position: relative;
  z-index: 1;
}

/* 卦象吉祥信息条 */
.xiang-scroll-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.xiang-scroll-chip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
}
.xiang-chip-idiom {
  background: var(--front-wash, #f4f4f5);
  color: var(--front-ink, #1a1a1a);
  border: 1px solid rgba(0,0,0,.08);
}
.xiang-chip-luck {
  border: 1px solid transparent;
}
.xiang-luck-ji   { background: #eef8ef; color: #1b6b2a; border-color: rgba(27, 107, 42, .15); }
.xiang-luck-da   { background: #fff1e0; color: #9a5b17; border-color: rgba(154, 91, 23, .15); }
.xiang-luck-ping { background: var(--front-wash, #f4f4f5); color: var(--front-soft-ink, #6b7280); border-color: rgba(0,0,0,.08); }
.xiang-luck-xiong { background: #fdecec; color: #a02a2a; border-color: rgba(160, 42, 42, .15); }

/* 卦象画板 — 浅灰底，与网站背景统一 */
.xiang-gua-board {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  width: 128px;
  margin: 16px auto;
  background: var(--front-wash, #f4f4f5);
  padding: 14px 18px;
  border: 1px solid var(--front-border, rgba(0,0,0,.08));
  border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.03);
  position: relative;
  z-index: 1;
}
.xiang-gua-row {
  height: 9px;
  width: 100%;
}
.xiang-gua-yang {
  width: 100%;
  height: 100%;
  background: #b85c38;
  border-radius: 999px;
}
.xiang-gua-yin {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
}
.xiang-gua-yin::before,
.xiang-gua-yin::after {
  content: "";
  width: 43%;
  height: 100%;
  background: var(--front-ink, #1a1a1a);
  border-radius: 999px;
}

/* 卦辞正文 — 白底卡片 */
.xiang-scroll-body {
  text-align: left;
  background: #fff;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid var(--front-border, rgba(0,0,0,.08));
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--front-ink, #1a1a1a);
  position: relative;
  z-index: 1;
}
.xiang-scroll-body p { margin: 0 0 8px 0; }
.xiang-scroll-body p:last-child { margin-bottom: 0; }
.xiang-scroll-body strong {
  color: var(--front-soft-ink, #6b7280);
  font-weight: 700;
  letter-spacing: .3px;
  margin-right: 4px;
}
.xiang-scroll-divider {
  height: 1px;
  background: rgba(0, 0, 0, .08);
  margin: 10px 0;
  border: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 575.98px) {
  .xiang-timer {
    top: 14px;
    right: 12px;
    padding: 5px 12px;
    font-size: 11px;
  }
  .xiang-card,
  .xiang-scroll-card {
    padding: 28px 20px;
    border-radius: 14px;
  }
  .xiang-title { font-size: 19px; }
  .xiang-scroll-name { font-size: 20px; letter-spacing: .02em; }
  .xiang-scroll-body { font-size: 13px; padding: 14px; }
}
