/**
 * ░ DZG-SOFTWARE-HEADER ░
 * ============================================================
 *  软件名称  : 道真阁八字排盘应用程序（基础版） V1.0
 *  著作权人  : 三陽
 *  开发完成  : 2026 年
 *  权利声明  : Copyright © 2026 三陽.  All rights reserved.
 *  许可说明  : 本程序及全部源代码之著作权归三陽所有。未经著作权人书面
 *             许可，任何人不得复制、传播、修改本程序或将其用于商业用途；
 *             反向工程与剥离再分发亦在禁止之列。
 *  文件说明  : css/base.css
 * ============================================================
 */



* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper-bg);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- 应用容器（已去除手机外壳，全屏显示） ---------- */
.device {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: var(--paper-bg);
  border-radius: 0;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  flex: none;
}

.screen {
  position: absolute;
  inset: 0;
  background: var(--paper-bg);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding-top: max(20px, env(safe-area-inset-top));
}
.screen::-webkit-scrollbar { width: 0; }

/* ---------- 状态栏（已隐藏，上线版不显示模拟手机状态栏） ---------- */
.statusbar {
  display: none;
}

/* ---------- 全局品牌栏（浅色招牌 · 太极印 + 名称 + 返回/分享 + 淡山水早阳影子） ---------- */
.brandbar {
  height: 44px; flex: none;
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-bottom: 1px solid var(--line-gold);
  background:
    url('../assets/brand-mountains.png') center bottom / cover no-repeat,
    var(--paper-bg);
}
.brandbar .bb-left { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: center; }
.brandbar .bb-left::after { content: ''; width: 26px; flex: none; margin-left: 7px; }   /* 隐形占位：等宽平衡太极，使标题文字(不计太极)真正居中 */
.brandbar .bb-taiji { width: 26px; height: 26px; flex: none; margin-right: 7px; }
.brandbar .bb-taiji path { fill: var(--ink); }   /* 浅底上深半，阴阳鱼才清晰 */
.brandbar .bb-name {
  font-family: var(--font-serif); font-weight: 700; font-size: 20px; color: var(--ink); letter-spacing: 2.5px;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.brandbar .bb-actions { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 16px; }
.brandbar .nav-back { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 2; font-size: 22px; color: var(--ink); width: 26px; cursor: pointer; text-decoration: none; line-height: 1; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.brandbar .topbar-action { font-size: 13px; color: var(--cinnabar); font-weight: 500; cursor: pointer; white-space: nowrap; text-shadow: 0 1px 0 rgba(255,255,255,.5); }

/* ---------- 顶部栏（浅色 · 返回 / 页标题 / 动作；结果页已并入品牌栏） ---------- */
.topbar {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: relative;
  background: #5C4A3A;
  border-bottom: 1px solid #6B5744;
}
.topbar .nav-back { font-size: 22px; color: #E8D5B0; width: 30px; cursor: pointer; text-decoration: none; }
.topbar .topbar-title {
  position: absolute; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 600; font-size: 17px; color: #E8D5B0;
  pointer-events: none;
}
.topbar .topbar-action { font-size: 13px; color: #E8D5B0; font-weight: 500; cursor: pointer; }

/* ---------- 页内标签栏（深底门头） ---------- */
.intabs {
  display: flex; margin: 0; flex: none;
  background: var(--ink); border: none;
  border-bottom: 1px solid rgba(184,153,90,.22);
  overflow: hidden;
}
.intab {
  flex: 1; text-align: center; padding: 11px 2px;
  font-size: 12.5px; color: rgba(243,238,227,.72); cursor: pointer;
  border-right: 1px solid rgba(184,153,90,.18);
  background: none; border-top: none; border-bottom: none; border-left: none;
  text-decoration: none; font-family: var(--font-sans);
}
.intab:last-child { border-right: none; }
.intab.active { background: var(--cinnabar); color: #fff; font-weight: 600; }

/* ---------- 底部标签栏 ---------- */
.tabbar {
  height: 64px;
  flex: none;
  display: flex;
  border-top: 1px solid var(--line-gold-strong);
  background: var(--paper-bg);
}
.tabbar .tab {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
}
.tabbar .tab.active { color: var(--cinnabar); }
.tabbar .tab .ico { font-size: 20px; line-height: 1; }

/* ---------- 内容区 ---------- */
.content { flex: 1; padding: 16px; overflow-y: auto; }
.content::-webkit-scrollbar { width: 0; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card-surface);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--font-serif);
  font-weight: 600; font-size: 15px; color: var(--ink);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.card-note { font-size: 12px; color: var(--text-secondary); line-height: 1.7; }

/* ---------- 按钮 ---------- */
.btn-primary {
  display: block; width: 100%; text-align: center;
  background: var(--cinnabar); color: #fff;
  border: none; border-radius: var(--radius-btn);
  padding: 14px; font-size: 15px; font-weight: 500; font-family: var(--font-sans);
  cursor: pointer;
}
.btn-outline {
  display: block; width: 100%; text-align: center;
  background: transparent; color: var(--cinnabar);
  border: 1.5px solid var(--cinnabar); border-radius: var(--radius-btn);
  padding: 13px; font-size: 15px; font-weight: 500; cursor: pointer;
}

/* ---------- 分段标签栏（门头深底 · 05–10 页导航） ---------- */
.seg-tabs {
  display: flex;
  background: var(--ink);
  border-radius: 0;
  margin: 0;
  overflow: hidden;
  border: none;
  border-bottom: 1px solid rgba(184,153,90,.22);
}
.seg-tab {
  flex: 1; text-align: center; padding: 13px 0;
  font-size: 13px; color: rgba(243,238,227,.7); cursor: pointer; position: relative;
}
.seg-tab.active { color: var(--paper-bg); font-weight: 600; font-size: 14px; }
.seg-tab.active::after {
  content: ""; position: absolute; left: 25%; right: 25%; bottom: 0;
  height: 2px; background: var(--cinnabar);
}

/* ---------- 标签 / 徽章 ---------- */
.tag-vip   { display:inline-block; background: var(--cinnabar); color:#fff; font-size:11px; padding:2px 8px; border-radius:6px; font-weight:500; }
.tag-free  { display:inline-block; background: var(--free-green); color:#fff; font-size:11px; padding:2px 8px; border-radius:6px; font-weight:500; }
.tag-muted { display:inline-block; background: transparent; color: var(--text-muted); font-size:11px; padding:2px 8px; border:1px solid rgba(146,127,97,.45); border-radius:6px; }

/* ---------- 胶囊（公历/农历 等） ---------- */
.pill {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line-gold-strong); font-size: 12px; color: var(--text-secondary); cursor: pointer;
}
.pill.active { background: var(--cinnabar); color: #fff; border-color: var(--cinnabar); }

/* ---------- 五行 chip ---------- */
.wu-chip { display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:8px; font-size:12px; font-weight:500; }
.wu-chip .dot { width:10px; height:10px; border-radius:50%; }
.wu-wood  { background: rgba(124,184,124,.22);  color: var(--wu-wood-fg); }
.wu-fire  { background: rgba(230,124,124,.22);  color: var(--wu-fire-fg); }
.wu-earth { background: rgba(230,200,122,.22);  color: var(--wu-earth-fg); }
.wu-metal { background: rgba(200,212,184,.22);  color: var(--wu-metal-fg); }
.wu-water { background: rgba(107,155,212,.22);  color: var(--wu-water-fg); }

/* ---------- 通用分隔线 ---------- */
.hairline { height:1px; background: var(--line-gold); margin: 12px 0; border:none; }

/* ---------- 朱砂方印（古籍落款用） ---------- */
.seal {
  display:inline-flex; align-items:center; justify-content:center;
  background: var(--cinnabar); color:#fff;
  font-family: var(--font-serif); font-weight:700;
  border-radius:4px;
}

/* ---------- 公告/入口行（命域十问入口等） ---------- */
.entry-row {
  display:flex; align-items:center; justify-content:space-between;
  background: var(--card-surface);
  border:1px solid var(--line-gold);
  border-radius: 10px;
  padding: 12px 14px; margin: 0 16px 14px; cursor:pointer;
}
.entry-row .er-left { display:flex; align-items:center; gap:10px; }
.entry-row .er-text { font-size:13px; color: var(--text-secondary); }
.entry-row .er-arrow { color: var(--cinnabar); font-size:18px; }

/* ---------- 金色浮动键：回顶 + 本页目录（复刻专业版，跨页共用） ---------- */
.float-btn-wrap {
  position: absolute;
  left: 50%;
  margin-left: -26px;
  bottom: 22px;
  z-index: 50;
  pointer-events: none;
}
.float-btn {
  position: relative;
  width: 52px; height: 52px;
  border: none; outline: none; border-radius: 50%;
  /* 透视感：半透明金 + 背后模糊，可见底下页面字迹微透 */
  background: linear-gradient(135deg, rgba(243,228,184,.74) 0%, rgba(230,200,122,.62) 45%, rgba(201,168,92,.64) 100%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  /* 圆边外散微光（多层柔光晕） */
  box-shadow:
    0 0 0 1.5px rgba(184,153,90,.92),
    0 0 16px 3px rgba(230,200,122,.55),
    0 0 34px 11px rgba(184,153,90,.30),
    inset 0 1px 2px rgba(255,255,255,.65);
  color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(.92);
  transition: opacity .35s ease, transform .35s ease, visibility .35s, box-shadow .25s ease;
}
.float-btn.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.float-btn:active {
  transform: scale(.92);
  box-shadow: 0 0 12px 2px rgba(230,200,122,.6), 0 0 26px 9px rgba(184,153,90,.35);
}
/* 圆边外散微光（呼吸式光晕，缓慢外扩） */
.float-btn::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 132%; height: 132%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 14px 4px rgba(230,200,122,.50);
  animation: fbGlow 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes fbGlow {
  0%, 100% { opacity: .45; box-shadow: 0 0 12px 3px rgba(230,200,122,.42); }
  50%      { opacity: 1;   box-shadow: 0 0 24px 9px rgba(230,200,122,.62); }
}
.float-btn .fb-arrow {
  font-family: var(--font-sans); font-size: 17px; line-height: 1; font-weight: 700;
  margin-bottom: 1px; transform: translateY(1px);
}
.float-btn .fb-text { font-size: 8.5px; line-height: 1; letter-spacing: .5px; }

/* 目录弹窗（半透磨砂，与页面主题一致） */
.float-menu {
  position: absolute;
  left: 50%;
  margin-left: -95px;
  bottom: 70px;
  width: 190px;
  background: rgba(243,238,227,.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--gold);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(42,37,30,.22);
  overflow: hidden;
  opacity: 0; visibility: hidden;
  transform: translateY(12px) scale(.96);
  transform-origin: center bottom;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  pointer-events: none;
}
.float-menu.open {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.float-menu .fm-title {
  font-family: var(--font-serif); font-weight: 600; font-size: 13px; color: var(--ink);
  padding: 11px 14px 8px; border-bottom: 1px solid var(--line-gold);
  text-align: center; letter-spacing: 1px;
}
.float-menu .fm-list { list-style: none; margin: 0; padding: 4px 0; }
.float-menu .fm-list li {
  padding: 9px 14px; font-size: 12.5px; color: var(--text-secondary);
  border-bottom: 1px solid var(--line-gold);
  cursor: pointer; transition: background .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.float-menu .fm-list li:last-child { border-bottom: none; }
.float-menu .fm-list li:active,
.float-menu .fm-list li.active {
  background: rgba(184,153,90,.18); color: var(--ink);
}

/* ============================================================
 * CI 人机脑 · 页面入口键（系统级可复用组件）
 * 用途：标记「由共智能·人机大脑（CI）计算/生成」的内容入口。
 *       所有 CI 驱动的页面入口键统一使用本组件，保持全站一致。
 * 结构：<a class="ci-brain-key"><span class="cb-mark">SVG</span>
 *         <span class="cb-body"><span class="cb-main">…</span><span class="cb-sub">…</span></span>
 *         <span class="cb-tag">CI 人机脑</span><span class="cb-arrow">›</span></a>
 * 注：cb-mark 内 SVG 为占位神经节点标记，正式「人机大脑」品牌图可从这里替换。
 * ============================================================ */
.ci-brain-key {
  display: flex; align-items: center; gap: 12px;
  margin: 0 8px 12px; padding: 11px 14px;
  background: linear-gradient(135deg, rgba(158,59,46,.10) 0%, rgba(184,153,90,.18) 100%);
  border: 1px solid var(--line-gold-strong);
  border-radius: 12px; text-decoration: none; cursor: pointer;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, box-shadow .2s ease;
}
.ci-brain-key:active { transform: scale(.985); }
.ci-brain-key::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--cinnabar), var(--gold));
}
/* 神经节点徽记（占位，待换正式人机大脑品牌图） */
.ci-brain-key .cb-mark {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(230,200,122,.34), rgba(184,153,90,.14));
  border: 1px solid var(--line-gold-strong);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 10px rgba(184,153,90,.35), 0 0 10px rgba(230,200,122,.30);
}
.ci-brain-key .cb-mark svg { width: 22px; height: 22px; display: block; }
.ci-brain-key .cb-mark .cb-ln { stroke: var(--gold); stroke-width: 1; fill: none; }
.ci-brain-key .cb-mark .cb-nd { fill: var(--cinnabar); }
.ci-brain-key .cb-body { flex: 1; min-width: 0; }
.ci-brain-key .cb-main {
  font-family: var(--font-serif); font-weight: 700; font-size: 14.5px; color: var(--ink);
  line-height: 1.35;
}
.ci-brain-key .cb-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.ci-brain-key .cb-tag {
  flex: none; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .5px;
  color: var(--cinnabar);
  background: rgba(158,59,46,.12);
  border: 1px solid rgba(158,59,46,.45);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.ci-brain-key .cb-arrow { flex: none; color: var(--cinnabar); font-size: 18px; align-self: center; }
