/* ===== 排盘首页样式 ===== */

/* 顶部日期栏 */
.top-bar {
  background: #fff;
  padding: 12px 16px 8px;
}
.date-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.date-left {
  display: flex;
  flex-direction: column;
}
.date-label {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 2px;
}
.date-main {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.date-day {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
}
.date-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 2px;
}
.date-ym {
  font-size: 0.8125rem;
  color: var(--text-sub);
  font-weight: 500;
}
.date-lunar {
  font-size: 0.75rem;
  color: var(--text-sub);
}
.date-week {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* 天干地支 */
.date-right {
  flex-shrink: 0;
}
.ganzhi-grid {
  display: flex;
  gap: 6px;
}
.gz-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28px;
}
.gz-t {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e8533f;
}
.gz-b {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}
.gz-l {
  font-size: 0.6875rem;
  color: var(--text-light);
  margin-top: 1px;
}

/* 活动横幅 */
.activity-banner {
  margin: 10px 12px;
  background: linear-gradient(90deg, #e8533f 0%, #ff6b57 100%);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(232,83,63,0.2);
}
.banner-text {
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.banner-btn {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.25);
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

/* 功能网格 */
.tools-grid {
  padding: 6px 8px 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.tool-item {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 14px 4px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tool-item:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.tool-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 8px;
}
.tool-icon svg {
  width: 32px;
  height: 32px;
}
.tool-name {
  font-size: 0.75rem;
  color: var(--text-sub);
  text-align: center;
  line-height: 1.2;
}
/* 红点 */
.tool-item .badge-dot {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: #ff4444;
  border-radius: 50%;
}

/* ===== 我的页面 ===== */
.mine-usercard {
  display: flex;
  align-items: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, #fff 0%, #fff8f6 100%);
}
.mine-usercard .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-right: 14px;
}
.mine-usercard .user-info {
  flex: 1;
}
.mine-usercard .nickname {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-main);
}
.mine-usercard .user-desc {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-top: 4px;
}
.mine-menu {
  margin-top: 10px;
  background: #fff;
}
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.9375rem;
}
.menu-item:last-child {
  border-bottom: none;
}
.menu-item .arrow {
  color: var(--text-light);
  font-size: 1.125rem;
}

/* ===== 排盘详情页通用 ===== */
.divination-page {
  padding-bottom: 20px;
}
.divination-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.back-btn {
  font-size: 1.375rem;
  color: var(--text-main);
  cursor: pointer;
  margin-right: 12px;
  line-height: 1;
}
.divination-title {
  font-size: 1rem;
  font-weight: 600;
}

/* 表单区域 */
.form-section {
  background: #fff;
  margin: 10px;
  border-radius: 10px;
  padding: 16px;
}
.form-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}
.form-row:last-child {
  border-bottom: none;
}
.form-label {
  width: 80px;
  font-size: 0.875rem;
  color: var(--text-sub);
  flex-shrink: 0;
}
.form-control {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-main);
  border: none;
  outline: none;
  background: transparent;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 20px;
}
.form-radio-group {
  display: flex;
  gap: 16px;
}
.form-radio {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  cursor: pointer;
}
.form-radio input {
  accent-color: var(--primary);
}

/* 主按钮 */
.btn-primary {
  display: block;
  width: calc(100% - 20px);
  margin: 16px 10px;
  padding: 13px;
  background: linear-gradient(90deg, #e8533f, #ff6b57);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
.btn-primary:active {
  opacity: 0.85;
}

/* ===== 工具页（青绿主题） ===== */
.tool-page {
  min-height: 100vh;
  background: #f5f6f8;
  padding-bottom: 24px;
}
/* 青绿标题栏 */
.tool-header {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: #17a2b8;
  position: sticky;
  top: 0;
  z-index: 20;
}
.tool-header .tool-back {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.375rem;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.tool-header .tool-title {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 26px 0 0;
}
.tool-header .tool-placeholder {
  width: 26px;
  flex-shrink: 0;
}

/* 白色卡片 */
.tool-card {
  background: #fff;
  margin: 10px;
  border-radius: 8px;
  overflow: hidden;
}
.tool-row {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  min-height: 24px;
}
.tool-row:last-child {
  border-bottom: none;
}
.tool-row.no-divider {
  border-bottom: none;
}
.tool-label {
  width: 92px;
  font-size: 0.875rem;
  color: #333;
  flex-shrink: 0;
}
.tool-control {
  flex: 1;
  font-size: 0.875rem;
  color: #333;
  border: none;
  outline: none;
  background: transparent;
  text-align: right;
  min-width: 0;
}
textarea.tool-control {
  text-align: left;
  resize: none;
}
select.tool-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c0c4cc' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 18px;
  text-align: right;
  text-align-last: right;
  direction: rtl;
}
select.tool-control option {
  direction: ltr;
}

/* 单选组（右对齐） */
.tool-radio-group {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.tool-radio {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
}
.tool-radio input {
  accent-color: #17a2b8;
  width: 16px;
  height: 16px;
  margin: 0;
}

/* 时间显示行 */
.tool-time-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.875rem;
  color: #333;
}
.tool-time-row .info-ico {
  color: #17a2b8;
  font-size: 0.8125rem;
  cursor: pointer;
}

/* 底部切换栏（真太阳时等） */
.tool-bottom-bar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  margin: 10px;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: #666;
  flex-wrap: wrap;
  gap: 10px;
}
.tool-bottom-bar .toggle-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.tool-bottom-bar .toggle-item {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.tool-bottom-bar .toggle-item input {
  accent-color: #17a2b8;
}
.tool-bottom-bar .right-btn {
  margin-left: auto;
  color: #17a2b8;
  cursor: pointer;
  font-size: 0.8125rem;
}

/* 提示文字 */
.tool-tip {
  font-size: 0.75rem;
  color: #999;
  line-height: 1.6;
  padding: 8px 14px;
}

/* 底部双按钮 */
.tool-btn-row {
  display: flex;
  gap: 10px;
  padding: 0 10px;
  margin-top: 16px;
}
.tool-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  background: #17a2b8;
  color: #fff;
  transition: opacity 0.15s;
}
.tool-btn:active {
  opacity: 0.85;
}
.tool-btn.secondary {
  background: #17a2b8;
  opacity: 0.92;
}

/* 免责声明 */
.tool-disclaimer {
  font-size: 0.6875rem;
  color: #bbb;
  text-align: center;
  padding: 10px 16px;
  line-height: 1.6;
}

/* 工具页内结果标题改青绿 */
.tool-page .result-title {
  color: #17a2b8;
}
.tool-page .result-content .tag {
  background: #e0f2f4;
  color: #17a2b8;
}

/* ===== 八字排盘结果页 ===== */
/* Tab 切换 */
.pb-tabs {
  display: flex;
  background: #fff;
  margin: 10px;
  border-radius: 8px;
  overflow: hidden;
  border-bottom: 1px solid #eee;
}
.pb-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 0.9375rem;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.pb-tab.active {
  color: #17a2b8;
  border-bottom-color: #17a2b8;
  font-weight: 600;
}

.pb-panel {
  padding: 0 10px 16px;
}

/* 头部基本信息条 */
.pb-header-bar {
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.pb-header-info {
  display: flex;
  gap: 14px;
  font-size: 0.875rem;
  color: #333;
}
.pb-header-info .pb-zodiac {
  color: #17a2b8;
}
.pb-header-edit {
  color: #999;
  cursor: pointer;
  font-size: 1rem;
}

/* 元信息表（日期/真太阳时/节气） */
.pb-meta-table {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin-bottom: 8px;
}
.pb-meta-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f5f5f5;
  color: #333;
}
.pb-meta-table td:first-child {
  color: #999;
  width: 72px;
}
.pb-label-mini {
  color: #999;
}

/* 主四柱表 */
.pb-main-table {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  border-collapse: collapse;
  font-size: 0.8125rem;
  overflow: hidden;
}
.pb-main-table thead tr {
  background: #fafafa;
}
.pb-main-table th, .pb-main-table td {
  border: 1px solid #f0f0f0;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.8125rem;
}
.pb-main-table th {
  font-weight: 600;
  color: #333;
  font-size: 0.8125rem;
}
.pb-main-table .pb-label,
.pb-main-table td.pb-label {
  text-align: left;
  background: #fafafa;
  color: #666;
  font-size: 0.75rem;
  padding: 6px 10px;
  white-space: nowrap;
}
.pb-main-table .pb-corner {
  background: #fafafa;
  width: 60px;
}

/* 乾造/坤造行 */
.pb-row-ganzhi td {
  padding: 10px 4px;
  font-size: 0.8125rem;
}
.pb-gan-big {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}
.pb-zhi-big {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

/* 旺相休囚死 */
.pb-wangxiu-row {
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}
.pb-wangxiu-label {
  color: #666;
}
.pb-wangxiu-seq {
  color: #17a2b8;
  font-weight: 600;
  letter-spacing: 2px;
}

/* 五行柱状图 */
.pb-wuxing {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  margin-top: 8px;
}

/* 起运说明 */
.pb-qiyun {
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 0.8125rem;
  color: #666;
  line-height: 1.6;
}

/* 大运/流年 */
.pb-diyun {
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
}
.pb-diyun-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}
.pb-diyun-scroll {
  overflow-x: auto;
}
.pb-diyun-scroll::-webkit-scrollbar {
  height: 4px;
}
.pb-diyun-scroll::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}
.pb-diyun-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
}
.pb-diyun-table td {
  min-width: 54px;
}

.pb-tip {
  text-align: center;
  font-size: 0.6875rem;
  color: #bbb;
  padding: 12px 0;
}

/* 分析模式 */
.pb-fenxi {
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  margin-top: 8px;
}
.pb-fx-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #17a2b8;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}
.pb-fx-content p {
  font-size: 0.875rem;
  color: #333;
  line-height: 1.7;
  margin: 0;
}

/* 结果区容器 */
.tool-page #resultArea {
  margin-top: 10px;
}
.tool-page #resultArea .result-section {
  background: #fff;
  border-radius: 8px;
  margin: 8px 10px;
  padding: 14px;
}
.tool-page #resultArea .result-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #17a2b8;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}
.tool-page #resultArea .result-content p {
  font-size: 0.875rem;
  color: #333;
  line-height: 1.7;
  margin: 0;
}
.tool-page #resultArea .tag {
  display: inline-block;
  padding: 2px 10px;
  background: #e0f2f4;
  color: #17a2b8;
  border-radius: 12px;
  font-size: 0.8125rem;
  margin: 2px;
}

/* ===== 紫微斗数 12宫表 ===== */
.pb-ziwei-table {
  width: calc(100% - 20px);
  margin: 8px 10px;
  border-collapse: separate;
  border-spacing: 4px;
}
.pb-ziwei-table td.zw-cell {
  background: #fff;
  border: 1px solid #eef2f5;
  border-radius: 6px;
  padding: 10px 6px;
  text-align: center;
}
.pb-ziwei-table td.zw-cell.is-ming {
  background: linear-gradient(135deg, #e0f2f4, #fff);
  border-color: #17a2b8;
  box-shadow: 0 0 0 1px rgba(23,162,184,0.2);
}
.zw-zhi {
  font-size: 0.75rem;
  color: #999;
}
.zw-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #333;
  margin: 4px 0;
}
.zw-name.is-ming {
  color: #17a2b8;
}
.zw-stars {
  font-size: 0.6875rem;
  color: #bbb;
  min-height: 12px;
}

/* ===== 奇门遁甲 九宫格 ===== */
.pb-qimen-table {
  width: calc(100% - 20px);
  margin: 8px 10px;
  border-collapse: separate;
  border-spacing: 3px;
  background: #17a2b8;
  border-radius: 8px;
  padding: 3px;
}
.pb-qimen-table td.qm-cell {
  background: #fff;
  border-radius: 4px;
  padding: 8px 4px;
  text-align: center;
  min-height: 84px;
  vertical-align: top;
  position: relative;
}
.qm-dir {
  font-size: 0.6875rem;
  color: #17a2b8;
  font-weight: 600;
  position: absolute;
  top: 3px;
  right: 4px;
}
.qm-god {
  font-size: 0.6875rem;
  color: #999;
  margin-top: 4px;
}
.qm-star {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #333;
  margin: 2px 0;
}
.qm-gate {
  font-size: 0.8125rem;
  color: #e67e22;
  font-weight: 500;
}

/* ===== 梅花易数 ===== */
.pb-meihua-table {
  width: calc(100% - 20px);
  margin: 8px 10px;
  background: #fff;
  border-radius: 8px;
  border-collapse: collapse;
}
.pb-meihua-table td.pb-ml-label {
  width: 60px;
  padding: 10px 12px;
  color: #999;
  font-size: 0.8125rem;
  border-bottom: 1px solid #f5f5f5;
}
.pb-meihua-table td.pb-ml-cell {
  padding: 10px 12px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.8125rem;
  color: #333;
}
.pb-meihua-table td.pb-ml-cell.pb-gua-big {
  font-size: 2rem;
  color: #17a2b8;
  line-height: 1.4;
  padding: 12px;
  text-align: center;
}
.pb-yao-dong {
  display: inline-block;
  padding: 2px 10px;
  background: #fff3e0;
  color: #e67e22;
  border-radius: 10px;
  font-weight: 500;
}

/* ===== 六爻排盘 ===== */
.pb-liuyao-card {
  background: #fff;
  border-radius: 8px;
  margin: 8px 10px;
  padding: 12px 14px;
}
.ly-yao {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}
.ly-yao:last-child { border-bottom: none; }
.ly-yao.is-dong .ly-symbol {
  color: #e67e22;
}
.ly-pos {
  width: 40px;
  font-size: 0.75rem;
  color: #999;
  text-align: right;
  flex-shrink: 0;
}
.ly-symbol {
  font-size: 1.5rem;
  font-family: serif;
  color: #333;
  flex-shrink: 0;
  min-width: 40px;
  text-align: center;
}
.ly-symbol.yin { letter-spacing: 6px; }
.ly-name {
  flex: 1;
  font-size: 0.8125rem;
  color: #666;
}
.ly-change {
  font-size: 0.6875rem;
  color: #e67e22;
  min-width: 60px;
  text-align: right;
}

/* ===== 小六壬 ===== */
.pb-xl-card {
  background: #fff;
  border-radius: 8px;
  margin: 8px 10px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.xl-item {
  background: #fafafa;
  border: 2px solid #eee;
  border-radius: 6px;
  padding: 12px 6px;
  text-align: center;
  position: relative;
  transition: all 0.15s;
}
.xl-item.is-active {
  background: linear-gradient(135deg, #fff, #f4fbfc);
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.xl-name {
  font-size: 0.875rem;
  font-weight: 600;
}
.xl-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: absolute;
  top: 6px;
  right: 6px;
}

/* ===== 合盘 ===== */
.pb-hepan-score {
  background: #fff;
  border-radius: 8px;
  margin: 8px 10px;
  padding: 16px;
  text-align: center;
}
.hp-score-num {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
}
.hp-score-label {
  font-size: 0.75rem;
  color: #999;
  margin-top: 6px;
}
.hp-person {
  margin-top: 10px;
}
.hp-person-title {
  font-size: 0.8125rem;
  color: #17a2b8;
  font-weight: 600;
  padding: 6px 14px 0;
}

/* ===== 起名卡片 ===== */
.qm-name-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  border: 1px solid #f0f0f0;
  transition: all 0.15s;
}
.qm-name-card:active {
  background: #f4fbfc;
  border-color: #17a2b8;
}
.qm-name-text {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #333;
}
.qm-name-hint {
  font-size: 0.6875rem;
  color: #bbb;
  margin-top: 4px;
}

/* ===== 奇门遁甲专业九宫格 ===== */
.pb-qm-topbar {
  background: #fff;
  border-radius: 8px;
  margin: 8px 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
}
.pb-qm-topbar-title { color: #999; flex-shrink: 0; width: 48px; }
.pb-qm-topbar-content { flex: 1; color: #333; }
.pb-qm-edit { color: #bbb; cursor: pointer; margin-left: 8px; }

.pb-qm-xun {
  background: #fff;
  border-radius: 8px;
  margin: 0 10px 8px;
  padding: 10px 12px;
}
.pb-qm-xun-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  font-size: 0.75rem;
}
.pb-qm-cell-label { color: #999; }
.pb-qm-cell { color: #333; font-weight: 500; }
.pb-qm-cell b { color: #17a2b8; }
.pb-qm-cell.qm-ma { color: #e67e22; font-weight: 600; }

.pb-qm-pillars {
  width: calc(100% - 20px);
  margin: 0 10px 8px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  font-size: 0.8125rem;
  overflow: hidden;
}
.pb-qm-pillars th, .pb-qm-pillars td {
  border: 1px solid #f0f0f0;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.8125rem;
}
.pb-qm-pillars th { background: #fafafa; font-weight: 600; color: #333; font-size: 0.75rem; }
.pb-qm-pillars td.pb-label { background: #fafafa; color: #999; text-align: left; padding-left: 10px; font-size: 0.75rem; }
.pb-qm-pillars td.pb-kw-on { background: #fff8f0; color: #e67e22; font-weight: 600; }

.pb-qimen-pro-table {
  width: calc(100% - 20px);
  margin: 0 10px 8px;
  border-collapse: separate;
  border-spacing: 3px;
  background: #e0f2f4;
  border-radius: 8px;
  padding: 3px;
}
.pb-qimen-pro-table .qm-palace {
  background: #fff;
  border-radius: 6px;
  padding: 8px 4px 6px;
  vertical-align: middle;
  min-height: 100px;
}
.qm-palace.qm-fu { background: #fff3e0; }
.qm-palace.qm-ji { background: #fef2f2; }

.qm-god { font-size: 0.6875rem; color: #999; text-align: center; margin-bottom: 4px; }
.qm-god.qm-god-fu { color: #e67e22; font-weight: 600; }
.qm-body { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; text-align: center; gap: 2px; }
.qm-left { font-size: 0.75rem; color: #e67e22; font-weight: 500; }
.qm-center { display: flex; flex-direction: column; gap: 2px; }
.qm-star { font-size: 0.8125rem; font-weight: 600; color: #333; }
.qm-gan { font-size: 0.8125rem; font-weight: 500; }
.qm-right { font-size: 0.6875rem; color: #17a2b8; }

.pb-qm-color-legend { text-align: center; font-size: 0.6875rem; color: #999; padding: 6px 14px; }
.pb-qm-color-legend .qml-fu { color: #e67e22; }
.pb-qm-color-legend .qml-tomb { color: #8e6f3f; }
.pb-qm-color-legend .qml-xing { color: #e74c3c; }
.pb-qm-color-legend .qml-xi { color: #3498db; }
.pb-qm-color-legend .qml-both { color: #9b59b6; }

.pb-qm-btns { display: flex; gap: 6px; padding: 0 10px; flex-wrap: wrap; }
.pb-qm-btn { flex: 1; min-width: 72px; padding: 8px 6px; background: #fff; border: 1px solid #17a2b8; border-radius: 6px; color: #17a2b8; font-size: 0.75rem; cursor: pointer; }
.pb-qm-btn:active { background: #e0f2f4; }

/* ===== 紫微斗数专业星盘 ===== */
.pb-ziwei-pro-table {
  width: calc(100% - 20px);
  margin: 0 10px 8px;
  border-collapse: separate;
  border-spacing: 3px;
}
.pb-ziwei-pro-table .zw-cell-pro {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 6px 4px;
  text-align: center;
  vertical-align: top;
}
.pb-ziwei-pro-table .zw-cell-pro.is-ming {
  background: linear-gradient(135deg, #fff8f0, #fff);
  border-color: #e67e22;
}
.zw-palace-zhi { font-size: 0.6875rem; color: #17a2b8; }
.zw-palace-name { font-size: 0.6875rem; color: #666; margin: 2px 0; }
.zw-main-star { font-size: 0.8125rem; font-weight: 600; color: #333; line-height: 1.3; }
.zw-fu-star { font-size: 0.625rem; color: #999; margin-top: 2px; }
.zw-sha-star { font-size: 0.625rem; color: #e74c3c; margin-top: 1px; }
.zw-hua { font-size: 0.625rem; color: #e67e22; margin-left: 2px; }

.pb-ziwei-legend {
  text-align: center;
  font-size: 0.6875rem;
  color: #999;
  padding: 6px 14px;
}

/* 大运流年滚动表 */
.dy-num { font-size: 0.6875rem; color: #999; }
.dy-gz { font-size: 0.8125rem; font-weight: 600; color: #333; margin: 2px 0; }
.dy-age { font-size: 0.625rem; color: #e67e22; }

/* ===== 梅花易数五卦 Tab ===== */
.pb-meihua-tabs {
  display: flex;
  gap: 4px;
  padding: 0 10px;
  background: #fff;
  margin: 8px 10px;
  border-radius: 8px;
}
.pb-meihua-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 0.8125rem;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.pb-meihua-tab.active {
  color: #17a2b8;
  border-bottom-color: #17a2b8;
  font-weight: 600;
}

/* 排盘结果 */
.result-section {
  background: #fff;
  margin: 10px;
  border-radius: 10px;
  padding: 16px;
}
.result-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary);
}
.result-content {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text-sub);
}
.result-content .tag {
  display: inline-block;
  padding: 2px 8px;
  background: #fff0ed;
  color: var(--primary);
  border-radius: 4px;
  font-size: 0.75rem;
  margin: 2px;
}

/* 八字命盘表格 */
.bazi-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.bazi-table th, .bazi-table td {
  border: 1px solid #eee;
  padding: 8px;
  text-align: center;
  font-size: 0.8125rem;
}
.bazi-table th {
  background: #fafafa;
  color: var(--text-sub);
  font-weight: 500;
}
.bazi-table .pillar {
  font-size: 1.125rem;
  font-weight: 600;
}

/* ===== 课堂页 ===== */
.class-top {
  background: #fff;
  padding: 14px 12px 12px;
}
.class-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.class-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
}
.class-more {
  font-size: 0.75rem;
  color: var(--text-light);
  cursor: pointer;
}
.class-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5f6f8;
  border-radius: 16px;
  padding: 8px 14px;
  cursor: pointer;
}
.class-search .search-ico { font-size: 0.875rem; }
.class-search .search-ph { font-size: 0.8125rem; color: #b0b4bb; }

/* 分类标签 */
.class-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.class-cats::-webkit-scrollbar { display: none; }
.cat-item {
  flex-shrink: 0;
  padding: 6px 15px;
  border-radius: 15px;
  background: #f5f6f8;
  color: var(--text-sub);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
}
.cat-item.active {
  background: #fff0ed;
  color: var(--primary);
  font-weight: 600;
}

/* 课堂横幅 */
.class-banner {
  margin: 10px 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(100deg, #fff1e6 0%, #ffe0cf 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.class-banner .banner-t1 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #b3441f;
}
.class-banner .banner-t2 {
  font-size: 0.6875rem;
  color: #c07a58;
  margin-top: 4px;
}
.class-banner .banner-go {
  font-size: 0.75rem;
  color: #fff;
  background: var(--primary);
  padding: 5px 12px;
  border-radius: 12px;
  white-space: nowrap;
}

/* 区块标题 */
.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px 10px;
}
.section-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-main);
}
.section-name::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 13px;
  background: var(--primary);
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
}
.section-more {
  font-size: 0.75rem;
  color: var(--text-light);
  cursor: pointer;
}

/* 名师横滑 */
.teacher-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 12px 8px;
  -webkit-overflow-scrolling: touch;
}
.teacher-scroll::-webkit-scrollbar { display: none; }
.teacher-card {
  flex-shrink: 0;
  width: 92px;
  background: #fff;
  border-radius: 10px;
  padding: 14px 6px 10px;
  text-align: center;
  cursor: pointer;
}
.teacher-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
}
.teacher-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-main);
}
.teacher-title {
  font-size: 0.6875rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* 课程列表 */
.course-list { padding: 0 12px; }
.course-item {
  display: flex;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.15s;
}
.course-item:active { transform: scale(0.985); }
.course-cover-sm {
  position: relative;
  width: 96px;
  height: 74px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.course-cover-sm .cover-icon {
  font-size: 1.625rem;
  color: rgba(255,255,255,0.95);
  font-weight: 600;
}
.course-cover-sm .cover-tag {
  position: absolute;
  left: 0;
  top: 0;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 0.6875rem;
  padding: 2px 6px;
  border-bottom-right-radius: 6px;
}
.course-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.course-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-sub {
  font-size: 0.6875rem;
  color: var(--text-light);
  margin-top: 4px;
}
.course-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.course-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary);
}
.course-price .price-orig {
  font-size: 0.6875rem;
  color: #bbb;
  font-style: normal;
  font-weight: 400;
  text-decoration: line-through;
  margin-left: 4px;
}
.course-btn {
  font-size: 0.6875rem;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 11px;
  padding: 3px 10px;
}
.class-bottom-tip {
  text-align: center;
  font-size: 0.6875rem;
  color: #c0c4cc;
  padding: 12px 0 24px;
}

/* ===== 课程详情 ===== */
.course-hero {
  padding: 26px 20px 30px;
  text-align: center;
  color: #fff;
}
.course-hero .hero-char {
  font-size: 2.125rem;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 10px;
}
.course-hero .hero-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}
.course-hero .hero-sub {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 8px;
}
.course-buycard {
  margin-top: -14px;
  position: relative;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.buy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.buy-price .now {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
}
.buy-price .old {
  font-size: 0.75rem;
  color: #bbb;
  text-decoration: line-through;
  margin-left: 6px;
}
.buy-badge {
  font-size: 0.6875rem;
  color: #b8860b;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 4px;
  padding: 3px 8px;
}
.buy-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.btn-ghost {
  flex: 0 0 100px;
  padding: 11px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 22px;
  font-size: 0.875rem;
  color: #666;
  cursor: pointer;
}
.btn-solid {
  flex: 1;
  padding: 11px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(90deg, #e8533f, #ff6b57);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}
.btn-solid:active { opacity: 0.85; }

.chapter-list { margin-top: 6px; }
.chapter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
}
.chapter-item:last-child { border-bottom: none; }
.chapter-no {
  font-size: 0.75rem;
  color: #c0c4cc;
  width: 20px;
  flex-shrink: 0;
}
.chapter-name {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chapter-state { font-size: 0.8125rem; color: var(--primary); }

/* 支付方式列表 */
.pay-list { border-top: 1px solid #f2f2f2; }
.pay-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.875rem;
  color: var(--text-main);
  cursor: pointer;
}
.pay-item:active { background: #fafafa; }

/* ===== 课堂页（精品课程版） ===== */
.cls-page {
  background: #fff;
  min-height: 100vh;
  padding-bottom: 8px;
}

/* 上方通栏课程 */
.cls-wide-list {
  padding: 0 14px;
}
.cls-wide-item {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.cls-wide-item:active { opacity: 0.85; }
.cls-wide-title {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: #1f1f1f;
  line-height: 1.3;
}
.cls-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-right: 6px;
  border-radius: 3px;
  background: #f04a24;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 400;
  flex-shrink: 0;
}
.cls-wide-desc {
  font-size: 0.7813rem;
  color: #6f6f6f;
  line-height: 1.8;
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cls-wide-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 11px;
}
.cls-price {
  color: #f4511e;
  font-size: 1.0625rem;
  font-weight: 600;
}
.cls-subs {
  font-size: 0.75rem;
  color: #c6c6c6;
}

/* 精品课程标题栏 */
.cls-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 14px 12px;
  border-top: 10px solid #f5f6f8;
}
.cls-head-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
}
.cls-head-more {
  font-size: 0.7813rem;
  color: #999;
  cursor: pointer;
}

/* 双列课程网格 */
.cls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 10px;
  padding: 0 14px 20px;
}
.cls-card {
  cursor: pointer;
}
.cls-card:active { opacity: 0.88; }
.cls-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  overflow: hidden;
  background: #f6f2ea;
}
.cls-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cls-name {
  font-size: 0.7813rem;
  color: #444;
  line-height: 1.45;
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cls-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 7px;
}
.cls-foot .cls-price { font-size: 0.9375rem; }
.cls-foot .cls-subs { font-size: 0.7188rem; }

/* 课程详情 */
.cls-detail-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f6f2ea;
  overflow: hidden;
}
.cls-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
}
.detail-sub {
  font-size: 0.75rem;
  color: #999;
  margin-top: 8px;
}

/* ===== 书籍页 ===== */
.bk-page {
  background: #f5f6f8;
  min-height: 100vh;
}

/* 顶部分类栏 */
.bk-cats {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 42px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #eee;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.bk-cats::-webkit-scrollbar { display: none; }
.bk-cat {
  position: relative;
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: #333;
  line-height: 42px;
  cursor: pointer;
}
.bk-cat.active {
  color: var(--primary);
  font-weight: 600;
}
.bk-cat.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

/* 书籍列表 */
.bk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 20px;
}
.bk-item {
  display: flex;
  padding: 12px 10px 12px 12px;
  background: #fff;
  cursor: pointer;
}
.bk-item:active { opacity: 0.92; }

/* 竖排仿古书封面 */
.bk-cover {
  position: relative;
  width: 68px;
  height: 94px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border: 1px solid #d8cbb0;
  border-radius: 2px;
  background: linear-gradient(160deg, #f3ecdc 0%, #ece1ca 55%, #e4d7bc 100%);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.5), 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}
.bk-cover-text {
  writing-mode: vertical-rl;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 0.9375rem;
  letter-spacing: 3px;
  line-height: 1;
  color: #3c3024;
  max-height: 100%;
  overflow: hidden;
}
.bk-seal {
  position: absolute;
  right: 5px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: #bf3a2b;
  color: #fff;
  font-size: 0.4375rem;
  opacity: 0.8;
}

.bk-info {
  flex: 1;
  min-width: 0;
  padding-left: 12px;
}
.bk-title {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}
.bk-desc {
  margin-top: 6px;
  font-size: 0.7813rem;
  line-height: 1.8;
  color: #7a7a7a;
  text-align: justify;
  word-break: break-all;
}

/* 书籍详情 */
.bk-dhead {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #fff;
}
.bk-dcover {
  position: relative;
  width: 96px;
  height: 132px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border: 1px solid #d8cbb0;
  border-radius: 2px;
  background: linear-gradient(160deg, #f3ecdc 0%, #ece1ca 55%, #e4d7bc 100%);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.5), 0 2px 6px rgba(0,0,0,0.08);
}
.bk-cover-text.big {
  font-size: 1.25rem;
  letter-spacing: 5px;
}
.bk-dmeta {
  flex: 1;
  min-width: 0;
  padding-left: 16px;
}
.bk-dtitle {
  font-size: 1.1875rem;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
}
.bk-dtag {
  margin-top: 10px;
  font-size: 0.75rem;
  color: #999;
}
.bk-dtext {
  font-size: 0.8125rem;
  line-height: 1.9;
  color: #666;
  text-align: justify;
}
.bk-reader p {
  font-size: 0.8125rem;
  line-height: 1.9;
  color: #555;
  text-align: justify;
}

/* ===== 我的页 ===== */
.mn-page {
  min-height: 100vh;
  padding: 12px 12px 24px;
  background: #f5f5f5;
}

/* 顶部用户信息 */
.mn-user {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
}
.mn-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #c9b39d, #8e7663);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}
.mn-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mn-userinfo {
  flex: 1;
  min-width: 0;
  padding-left: 12px;
  cursor: pointer;
}
.mn-nick {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1f1f1f;
  line-height: 1.2;
}
.mn-type {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #999;
}
.mn-head-acts {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.mn-head-acts span {
  display: flex;
  cursor: pointer;
}
.mn-ico {
  width: 22px;
  height: 22px;
  color: #3a3a3a;
}

/* 会员卡片 */
.mn-vip {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
}
.mn-vip-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  padding: 0 14px;
  background: linear-gradient(90deg, #ef4a1d 0%, #ff7c40 100%);
  overflow: hidden;
}
.mn-vip-top::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -34px;
  width: 150px;
  height: 120px;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,0.18) 0 8px, transparent 8px 24px);
  transform: rotate(-6deg);
  pointer-events: none;
}
.mn-vip-title {
  position: relative;
  z-index: 2;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
}
.mn-vip-btn {
  position: relative;
  z-index: 2;
  padding: 5px 14px;
  border: none;
  border-radius: 15px;
  background: #fff;
  color: #ef4a1d;
  font-size: 0.8125rem;
  cursor: pointer;
}
.mn-vip-btn:active { opacity: 0.85; }
.mn-vip-bot {
  padding: 6px 14px;
  background: #f8d8ba;
  font-size: 0.75rem;
  color: #8a4a1e;
  cursor: pointer;
}

/* 数据统计 */
.mn-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
  padding: 15px 0;
  background: #fff;
  border-radius: 8px;
}
.mn-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.mn-stat-num {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1f1f1f;
  line-height: 1.2;
}
.mn-stat-label {
  margin-top: 7px;
  font-size: 0.75rem;
  color: #999;
}

/* 订单卡片 */
.mn-card {
  margin-top: 12px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.mn-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 12px;
  border-bottom: 1px solid #f2f2f2;
}
.mn-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f1f1f;
}
.mn-card-more {
  font-size: 0.75rem;
  color: #999;
  cursor: pointer;
}
.mn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 16px 0 18px;
}
.mn-grid-orders {
  padding: 18px 0 20px;
  row-gap: 18px;
}
.mn-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.mn-cell:active { opacity: 0.75; }
.mn-cell span {
  font-size: 0.75rem;
  color: #666;
}
.mn-cell .mn-ico {
  width: 24px;
  height: 24px;
  color: #333;
}

/* 弹窗内容 */
.mn-mtext {
  font-size: 0.8125rem;
  line-height: 1.9;
  color: #666;
}
.mn-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.8125rem;
  color: #999;
}
.mn-form-row:last-child { border-bottom: none; }
.mn-form-row b {
  font-weight: 500;
  color: #333;
}
.mn-service {
  text-align: center;
  padding: 8px 0;
}
.mn-service-ico {
  display: flex;
  justify-content: center;
  color: #ef4a1d;
}
.mn-service-ico .mn-ico {
  width: 44px;
  height: 44px;
}
.mn-service-t {
  margin-top: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #333;
}
.mn-service-d {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #999;
}
.mn-set-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 2px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.875rem;
  color: #333;
  cursor: pointer;
}
.mn-set-item:last-child { border-bottom: none; }
.mn-set-v {
  font-size: 0.75rem;
  color: #999;
}
.mn-plans {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.mn-plan {
  flex: 1;
  padding: 12px 4px;
  text-align: center;
  border: 1px solid #eee;
  border-radius: 8px;
  cursor: pointer;
}
.mn-plan b {
  display: block;
  font-size: 1.0625rem;
  color: #ef4a1d;
}
.mn-plan span {
  display: block;
  margin-top: 6px;
  font-size: 0.6875rem;
  color: #999;
}
.mn-plan.hot {
  border-color: #f4511e;
  background: #fff6f2;
}
.mn-right-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.8125rem;
  color: #333;
}
.mn-right-row:last-child { border-bottom: none; }
.mn-right-row b {
  font-weight: 400;
  font-size: 0.75rem;
  color: #999;
}
.mn-empty {
  padding: 22px 0;
  text-align: center;
}
.mn-empty-ico { font-size: 2.625rem; }
.mn-empty-t {
  margin-top: 10px;
  font-size: 0.875rem;
  color: #666;
}
.mn-empty-d {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #aaa;
}

/* ===== 商城页 ===== */
.sp-page {
  min-height: 100vh;
  padding-bottom: 20px;
  background: #fff;
}

/* 顶部海报 */
.sp-banner {
  position: relative;
  height: 190px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 62% 45%, #2b7d74 0%, #175b55 45%, #0d3c39 100%);
}
.sp-banner::after {
  content: '';
  position: absolute;
  left: 40%;
  top: -20%;
  width: 360px;
  height: 260px;
  background: radial-gradient(closest-side, rgba(255,205,140,0.22), transparent);
  pointer-events: none;
  z-index: 2;
}
.sp-banner-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sp-banner-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(5,38,36,0.16) 0%, rgba(5,38,36,0.44) 100%);
  pointer-events: none;
}
.sp-screen {
  position: absolute;
  z-index: 0;
  left: 14px;
  top: -14px;
  width: 62px;
  height: 220px;
  border: 3px solid #c8a86b;
  border-radius: 2px;
  transform: rotate(-3deg);
  background:
    repeating-linear-gradient(90deg, rgba(200,168,107,0.26) 0 5px, transparent 5px 16px),
    repeating-linear-gradient(0deg, rgba(200,168,107,0.2) 0 5px, transparent 5px 18px);
  opacity: 0.9;
}
.sp-ring {
  position: absolute;
  right: -60px;
  top: -20px;
  width: 210px;
  height: 210px;
  border: 8px solid rgba(96,190,175,0.28);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(96,190,175,0.08);
}
.sp-banner-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sp-banner-title {
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 6px;
  color: #e6c98d;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.sp-banner-sub {
  margin-top: 16px;
  padding: 5px 16px;
  border: 1px solid rgba(198,168,107,0.75);
  border-radius: 2px;
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #d9bf85;
}

/* 区块标题 */
.sp-sec {
  display: flex;
  align-items: center;
  padding: 14px 22px;
}
.sp-sec span {
  padding: 0 12px;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: #999;
}
.sp-sec i {
  position: relative;
  flex: 1;
  height: 1px;
  background: #e4e4e4;
}
.sp-sec i::after {
  content: '';
  position: absolute;
  top: -2px;
  width: 4px;
  height: 4px;
  border: 1px solid #ddd;
  background: #fff;
}
.sp-sec i:first-child::after { left: -1px; }
.sp-sec i:last-child::after { right: -1px; }

/* 商品网格 */
.sp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 8px;
  padding: 0 12px;
}
.sp-card {
  background: #fff;
  cursor: pointer;
}
.sp-card:active { opacity: 0.9; }
.sp-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3efe9;
}
.sp-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sp-name {
  padding: 10px 10px 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #333;
}
.sp-price {
  padding: 8px 10px 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f4511e;
}

/* 右侧悬浮按钮 */
.sp-fabs {
  position: fixed;
  /* 随应用容器宽度自适应，窄屏贴边、宽屏与容器右侧对齐 */
  right: max(12px, calc(50% - var(--app-half) + 12px));
  bottom: calc(72px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 60;
}
.sp-fab {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  cursor: pointer;
}
.sp-fab:active { transform: scale(0.94); }
.sp-fab svg { width: 20px; height: 20px; }

/* 商品详情 */
.sp-dcover {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.sp-dcover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sp-dtitle {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #222;
}
.sp-dprice {
  margin-top: 8px;
  font-size: 1.375rem;
  font-weight: 700;
  color: #f4511e;
}
.sp-dsales {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #999;
}
.sp-guar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.sp-guar span {
  padding: 5px 10px;
  border-radius: 4px;
  background: #f7f7f7;
  font-size: 0.75rem;
  color: #666;
}
.sp-buyrow {
  display: flex;
  gap: 10px;
  padding: 4px 12px 20px;
}

/* 购物车弹窗 */
.sp-cart-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}
.sp-cart-img {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #f3efe9;
}
.sp-cart-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sp-cart-name {
  font-size: 0.8125rem;
  color: #333;
}
.sp-cart-price {
  margin-top: 6px;
  font-size: 0.875rem;
  color: #f4511e;
}
.sp-cart-total {
  padding-top: 12px;
  text-align: right;
  font-size: 0.8125rem;
  color: #666;
}
.sp-cart-total b {
  font-size: 1.125rem;
  color: #f4511e;
}

/* ===== 小屏适配（≤360px） ===== */
@media (max-width: 360px) {
  .tools-grid {
    gap: 4px;
    padding: 6px 6px 14px;
  }
  .tool-item { padding: 12px 2px 8px; }
  .tool-name { font-size: 0.6875rem; }

  .cls-wide-list { padding: 0 10px; }
  .cls-head { padding: 14px 10px 10px; }
  .cls-grid { gap: 16px 8px; padding: 0 10px 18px; }
  .cls-name { font-size: 0.75rem; }

  .bk-cats { gap: 11px; padding: 0 10px; }
  .bk-item { padding: 10px 8px; }
  .bk-cover { width: 60px; height: 82px; }
  .bk-desc { font-size: 0.75rem; }

  .sp-grid { gap: 10px 6px; padding: 0 10px; }
  .sp-name { font-size: 0.75rem; padding: 9px 8px 0; }
  .sp-price { font-size: 0.875rem; padding: 7px 8px 5px; }
  .sp-banner-title { font-size: 2.125rem; }

  .mn-stats { padding: 13px 0; }
  .mn-page { padding: 10px 10px 20px; }

  /* ===== 工具页 & 排盘结果页小屏适配 ===== */
  .tool-header { padding: 10px 12px; }
  .tool-header .tool-title { font-size: 0.9375rem; }
  .tool-card,
  .pb-tabs,
  .pb-diyun,
  .pb-header-bar,
  .pb-meta-table,
  .pb-hepan-score,
  .pb-liuyao-card,
  .pb-xl-card,
  .qm-name-card,
  .pb-ziwei-table,
  .pb-meihua-table,
  .pb-qimen-table {
    margin-left: 6px;
    margin-right: 6px;
  }
  .tool-row { padding: 10px 12px; }
  .tool-label { width: 76px; font-size: 0.8125rem; }
  .tool-control { font-size: 0.8125rem; }
  .tool-btn { font-size: 0.875rem; padding: 10px; }

  /* 排盘结果 */
  .pb-tab { font-size: 0.875rem; padding: 10px 0; }
  .pb-gan-big { font-size: 1rem; }
  .pb-zhi-big { font-size: 0.9375rem; }
  .pb-main-table th,
  .pb-main-table td { font-size: 0.75rem; padding: 5px 3px; }
  .pb-main-table .pb-label { font-size: 0.6875rem; padding: 5px 6px; }
  .pb-main-table .pb-corner { width: 40px; }
  .pb-diyun-title { font-size: 0.75rem; }
  .pb-diyun,
  .pb-fenxi,
  .pb-wangxiu-row,
  .pb-qiyun { padding: 8px 10px; margin-top: 6px; }
  .pb-diyun > div:not(.pb-diyun-title),
  .pb-fenxi > div:not(.pb-fx-title) { font-size: 0.8125rem; padding: 8px 10px; }
  .pb-diyun .pb-diyun-scroll td { min-width: 44px; font-size: 0.75rem; padding: 4px 4px; }

  /* 紫微12宫 */
  .pb-ziwei-table td.zw-cell { padding: 8px 2px; }
  .zw-zhi { font-size: 0.6875rem; }
  .zw-name { font-size: 0.75rem; margin: 2px 0; }

  /* 奇门九宫 */
  .pb-qimen-table td.qm-cell { min-height: 72px; padding: 6px 2px; }
  .qm-dir { font-size: 0.6875rem; }
  .qm-star { font-size: 0.75rem; }
  .qm-gate { font-size: 0.75rem; }

  /* 梅花易数 */
  .pb-meihua-table td.pb-ml-label { width: 52px; font-size: 0.75rem; padding: 8px 8px; }
  .pb-meihua-table td.pb-ml-cell { font-size: 0.75rem; padding: 8px; }
  .pb-meihua-table td.pb-gua-big { font-size: 1.75rem; padding: 10px 8px; }

  /* 六爻 */
  .pb-liuyao-card { padding: 10px; }
  .ly-yao { padding: 6px 0; gap: 8px; }
  .ly-symbol { font-size: 1.25rem; min-width: 32px; }
  .ly-name { font-size: 0.75rem; }

  /* 小六壬 */
  .pb-xl-card { padding: 8px; gap: 6px; }
  .xl-name { font-size: 0.8125rem; }

  /* 合盘 */
  .pb-hepan-score { padding: 12px; }
  .hp-score-num { font-size: 2.75rem; }
  .hp-score-label { font-size: 0.6875rem; }

  /* 起名 */
  .qm-name-card { padding: 10px 6px; }
  .qm-name-text { font-size: 0.9375rem; }
  .qm-name-hint { font-size: 0.6875rem; }
}

/* ===== 平板 / 电脑（≥768px）内容区微调 ===== */
@media (min-width: 768px) {
  .page-content { min-height: calc(100vh - 56px); }
}

/* ===== 电脑端（≥900px）：容器 600px，网格扩展 ===== */
@media (min-width: 900px) {
  .top-bar { padding: 14px 20px 10px; }
  .tools-grid {
    padding: 8px 16px 20px;
    gap: 8px;
  }
  .tool-item { padding: 16px 4px 12px; }

  .cls-wide-list { padding: 8px 16px 0; }
  .cls-head { padding: 16px 16px 12px; }
  .cls-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 12px;
    padding: 0 16px 24px;
  }

  .bk-cats { padding: 0 16px; gap: 18px; }
  .bk-list { gap: 10px; padding: 10px 16px 24px; }

  .sp-banner { height: 220px; }
  .sp-banner-title { font-size: 2.875rem; letter-spacing: 8px; }
  .sp-sec { padding: 18px 30px; }
  .sp-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 10px;
    padding: 0 16px;
  }
  .sp-dcover,
  .cls-detail-cover { max-height: 420px; }

  .mn-page { padding: 16px 16px 28px; }
}

/* ===== 大屏电脑（≥1280px）：容器 720px ===== */
@media (min-width: 1280px) {
  .sp-grid { grid-template-columns: repeat(4, 1fr); }
  .sp-banner { height: 250px; }
  .sp-banner-title { font-size: 3.25rem; letter-spacing: 10px; }
  .tools-grid { grid-template-columns: repeat(7, 1fr); }
  .sp-fab { width: 44px; height: 44px; }
}

/* ===== 页面高度：兼容移动端动态工具栏 ===== */
.mn-page,
.sp-page,
.cls-page,
.bk-page {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ===== 横屏手机 ===== */
@media (orientation: landscape) and (max-height: 480px) {
  .sp-banner { height: 150px; }
  .cls-detail-cover,
  .sp-dcover { max-height: 200px; }
  .sp-fabs { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ===== 鼠标设备交互反馈 ===== */
@media (hover: hover) and (pointer: fine) {
  .tool-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  }
  .cls-card:hover img,
  .sp-card:hover img { opacity: 0.92; }
  .mn-cell:hover,
  .mn-stat:hover,
  .mn-head-acts span:hover { opacity: 0.7; }
  .sp-fab:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.22); }
}
