/* ==========================================================================
   乾坤堂 · 斗首日课专业推演系统 视觉设计规范 (doushou_style.css)
   风格：故宫朱红 / 沉香墨黑 / 宣纸象牙微黄 / 泥金点缀 (宋代典仪美学)
   适配：刘海屏、灵动岛、手机与平板全端响应式 (SEC-13 满分达标)
   ========================================================================== */

:root {
  --primary-red: #A31B1B;         /* 故宫典仪红 */
  --dark-red: #6B1010;            /* 宫廷暗朱 */
  --accent-gold: #D4AF37;         /* 宫廷泥金线条 */
  --gold-light: #F7E7B4;          /* 泥金流光淡金 */
  --gold-glow: rgba(212, 175, 55, 0.35);
  --bg-dark: #0F0E11;             /* 沉香墨黑底 */
  --bg-card: #19181D;             /* 沉香木案台色 */
  --bg-card-sub: #232128;         /* 宣纸研墨次台 */
  --text-main: #F4EEDF;           /* 宣纸暖白 */
  --text-sub: #C8BFAD;            /* 古籍宋纸沙褐 */
  --border-line: #3E352B;         /* 故宫铜铸暗金线 */
  --border-gold: rgba(212, 175, 55, 0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
  word-break: break-word;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(163, 27, 27, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, rgba(25, 24, 29, 0.9) 0%, #0F0E11 100%);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Songti SC", serif;
  overflow-x: hidden;
  min-height: 100vh;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--safe-bottom) + 60px);
}

/* 顶部导航栏 (故宫典仪铜钉与泥金横额) */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(32, 18, 18, 0.98) 0%, rgba(15, 14, 17, 0.98) 100%);
  border-bottom: 1px solid var(--accent-gold);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 30px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(212, 175, 55, 0.45));
}

.brand-title {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--accent-gold);
  letter-spacing: 1px;
}

/* 授权状态药丸徽章 (SEC-12 核心节点) */
#qktLicenseBadge {
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s;
  background: rgba(163, 27, 27, 0.25);
  border: 1px solid var(--accent-gold);
  color: var(--gold-light);
}

#qktLicenseBadge.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(163, 27, 27, 0.3) 100%);
  border: 1px solid var(--accent-gold);
  color: var(--gold-light);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* 底部标签导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(18, 17, 22, 0.97);
  border-top: 1px solid var(--border-gold);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.7);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-sub);
  cursor: pointer;
  height: 100%;
  transition: all 0.2s;
}

.nav-item.active {
  color: var(--accent-gold);
  font-weight: bold;
}

.nav-icon {
  font-size: 18px;
  margin-bottom: 2px;
}

/* 主内容容器 (PC 端 1100px 案台安全箱约束 - 军规 4 / SEC-13) */
.main-container {
  padding: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* 通用卡片容器 (沉香木案台感 SEC-17) */
.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(212, 175, 55, 0.1);
  position: relative;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: bold;
  color: var(--gold-light);
  margin-bottom: 10px;
  border-left: 3px solid var(--primary-red);
  padding-left: 8px;
}

/* 1. 顶层黄金动线：极简坐向标定与换山胶囊条 (堂主核心规划：首页清爽) */
.mountain-quick-capsule-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(38, 36, 43, 0.95) 0%, rgba(25, 24, 29, 0.98) 100%);
  border: 1px solid var(--accent-gold);
  border-radius: 24px;
  padding: 6px 10px 6px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(212, 175, 55, 0.2);
}
.mountain-quick-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}
.mountain-icon {
  font-size: 22px;
  color: var(--accent-gold);
  flex-shrink: 0;
}
.mountain-pill-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mountain-pill-main {
  font-size: 15px;
  font-weight: bold;
  color: var(--gold-light);
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mountain-pill-hint {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 1px;
}
.mountain-change-btn {
  background: linear-gradient(135deg, var(--primary-red) 0%, #7A1212 100%);
  border: 1px solid var(--accent-gold);
  color: #FFF;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(163, 27, 27, 0.4);
}
.mountain-change-btn:active {
  transform: scale(0.95);
  background: var(--accent-gold);
  color: #121214;
}

/* 《家藏秘本》品格定局专验卡片样式 */
.pinge-deju-card {
  background: linear-gradient(180deg, rgba(38, 28, 28, 0.95) 0%, rgba(24, 21, 26, 0.95) 100%);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}
.pinge-deju-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.pinge-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pinge-badge-icon {
  font-size: 16px;
}
.pinge-title-text {
  font-size: 13px;
  font-weight: bold;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}
.pinge-grade-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--accent-gold);
  color: var(--gold-light);
  font-weight: bold;
}
.pinge-main-name {
  font-size: 18px;
  font-weight: bold;
  color: #FFA39E;
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.pinge-poem-box {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-gold);
  margin-bottom: 6px;
  font-family: "Songti SC", "SimSun", serif;
}
.pinge-desc-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--gold-light);
}

/* 八宫坐向罗盘案台 (重铸 24 山选择) */
.bagua-compass-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.bagua-palace-group {
  background: rgba(35, 33, 40, 0.65);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  padding: 6px;
}
.bagua-palace-head {
  font-size: 12px;
  font-weight: bold;
  color: var(--accent-gold);
  text-align: center;
  margin-bottom: 4px;
  padding-bottom: 2px;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.2);
}
.bagua-mountains-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.mountain-compass-btn {
  background: rgba(45, 42, 50, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.18);
  color: var(--text-main);
  padding: 6px 2px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s;
  line-height: 1.25;
}
.mountain-compass-btn:hover {
  border-color: var(--accent-gold);
  background: rgba(163, 27, 27, 0.3);
}
.mountain-compass-btn.active {
  background: linear-gradient(135deg, var(--primary-red) 0%, #7A1212 100%);
  border-color: var(--accent-gold);
  color: #FFF;
  font-weight: bold;
  box-shadow: 0 0 10px var(--gold-glow);
}
.mountain-wx-tag {
  font-size: 11px;
  display: block;
  opacity: 0.85;
}

/* 独立流式定位药丸条 (SEC-15 黄金标准) */
.location-capsule-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  padding: 4px 6px 4px 12px;
  margin-bottom: 10px;
  min-height: 40px;
  gap: 8px;
}
.location-info-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.location-btn-sm {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--accent-gold);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}
.location-btn-sm:active {
  background: var(--accent-gold);
  color: #121214;
}

/* 按钮样式 */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-red) 0%, #871616 100%);
  border: 1px solid var(--accent-gold);
  color: #FFF;
  font-weight: bold;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  width: 100%;
  box-shadow: 0 4px 12px rgba(163, 27, 27, 0.4);
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-secondary {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-line);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
}

/* 视图切换：名师专业 vs 福主通俗 */
.view-mode-toggle {
  display: flex;
  background: var(--bg-card-sub);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border-gold);
  margin-bottom: 16px;
}
.toggle-option {
  flex: 1;
  text-align: center;
  padding: 7px 12px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-sub);
  transition: all 0.2s;
}
.toggle-option.active {
  background: linear-gradient(135deg, var(--primary-red) 0%, #871616 100%);
  color: #FFF;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(163, 27, 27, 0.5);
}

/* 《三台通书》天地元古法神案卡片 (强制 4 列并排 SEC-13 核心防折断) */
.pillars-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px;
  margin-bottom: 14px;
}

.pillar-card {
  background: linear-gradient(180deg, rgba(46, 38, 46, 0.96) 0%, rgba(20, 18, 24, 0.98) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 6px 3px 8px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(212, 175, 55, 0.3);
}

/* 堂主最高指示：把【门户室家】和【天元曜】放在一块，融合为一体化红金印章胶囊 */
.tianyuan-seal-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 94%;
  padding: 3px 2px;
  border-radius: 6px;
  margin-bottom: 7px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.2s;
}
.tianyuan-seal-badge.吉 {
  background: linear-gradient(135deg, #9E1A1A 0%, #680E0E 100%);
  border: 1px solid var(--accent-gold);
}
.tianyuan-seal-badge.凶 {
  background: linear-gradient(135deg, #2B2630 0%, #15131A 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
}
.seal-role-pill {
  font-size: 11px;
  font-weight: 500;
  color: #FADB14;
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}
.seal-star-text {
  font-size: 12.5px;
  font-weight: bold;
  letter-spacing: 0.5px;
  font-family: "Songti SC", "SimSun", serif;
  color: #FFF2C5;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  white-space: nowrap;
}
.tianyuan-seal-badge.凶 .seal-star-text {
  color: #D1D5DB;
}

/* 堂主规划：品格定局与综合评分合并为一体化方框案台 */
.zaoming-integrated-box {
  background: linear-gradient(135deg, rgba(46, 28, 28, 0.95) 0%, rgba(26, 23, 29, 0.98) 100%);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(212, 175, 55, 0.25);
}
.zaoming-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.25);
  margin-bottom: 10px;
}
.zaoming-score-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.zaoming-score-num {
  font-size: 30px;
  font-weight: bold;
  color: var(--accent-gold);
  font-family: "Songti SC", "SimSun", serif;
  line-height: 1;
}
.zaoming-rating-text {
  font-size: 15px;
  font-weight: bold;
  color: #FFF;
  letter-spacing: 0.5px;
}
.zaoming-stars {
  font-size: 14px;
  color: #FFD700;
  letter-spacing: 1px;
}
.zaoming-geju-title {
  font-size: 14px;
  font-weight: bold;
  color: #FF7875;
  letter-spacing: 0.5px;
}
.zaoming-poem-quote {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-gold);
  margin-bottom: 6px;
  font-family: "Songti SC", "SimSun", serif;
}
.zaoming-guide-text {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--gold-light);
}
.pillar-ganzhi {
  font-size: 26px;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--text-main);
  margin-bottom: 8px;
  font-family: "Songti SC", "SimSun", serif;
  text-shadow: 0 2px 8px rgba(0,0,0,0.85);
  line-height: 1.1;
}
.pillar-gan {
  color: #FF7875;
}
.pillar-zhi {
  color: #FADB14;
}
.pillar-meta-row {
  font-size: 11.5px;
  width: 100%;
  padding: 3.5px 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed rgba(212, 175, 55, 0.15);
}
.meta-label {
  font-size: 11px;
  color: var(--text-sub);
}
.meta-val {
  font-size: 11.5px;
  font-weight: bold;
}
.star-tag {
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}
.star-tag.吉 {
  background: rgba(163, 27, 27, 0.35);
  border: 1px solid rgba(255, 163, 158, 0.4);
  color: #FFA39E;
}
.star-tag.凶 {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #D1D5DB;
}

/* 动态番化生克流转图案 (武化贪狼、贪化破军、破化廉贞、廉化武曲) */
.fanhua-stream-card {
  background: linear-gradient(180deg, rgba(32, 28, 36, 0.95) 0%, rgba(20, 19, 24, 0.95) 100%);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.fanhua-chain-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin: 8px 0;
  overflow-x: auto;
  padding: 4px 0;
}
.fanhua-node {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
  min-width: 62px;
  flex-shrink: 0;
}
.fanhua-node.active-mountain {
  border-color: #FFA39E;
  background: rgba(163, 27, 27, 0.3);
  box-shadow: 0 0 8px rgba(163, 27, 27, 0.5);
}
.fanhua-node-title {
  font-size: 12px;
  font-weight: bold;
  color: var(--gold-light);
}
.fanhua-node-arrow {
  font-size: 13px;
  color: var(--accent-gold);
  font-weight: bold;
  flex-shrink: 0;
}

/* 《斗首藏本》二十四山特诀名案卡片 */
.classic-case-box {
  background: rgba(30, 28, 35, 0.9);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.classic-case-poem {
  font-size: 13px;
  line-height: 1.8;
  color: var(--gold-light);
  font-family: "Songti SC", "SimSun", serif;
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid var(--accent-gold);
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
  margin: 6px 0 10px 0;
}
.classic-case-detail {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 6px;
}
.classic-case-story {
  font-size: 12px;
  line-height: 1.6;
  color: #FFA39E;
  background: rgba(163, 27, 27, 0.15);
  padding: 6px 8px;
  border-radius: 4px;
}

/* 斗首六体象意展示栏 */
.liuti-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.liuti-item {
  background: var(--bg-card-sub);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 12px;
}

.liuti-title {
  color: var(--accent-gold);
  font-weight: bold;
  margin-bottom: 2px;
}

/* 关挟、格局与神煞标签 */
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.alert-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.alert-badge.大凶 {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid #DC2626;
  color: #F87171;
}
.alert-badge.大吉 {
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
}
.alert-badge.次吉 {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3B82F6;
  color: #93C5FD;
}

/* 评分展示块 */
.score-badge-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(158,26,26,0.3) 0%, rgba(38,36,43,0.8) 100%);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.score-num {
  font-size: 32px;
  font-weight: bold;
  color: var(--accent-gold);
}

.score-stars {
  font-size: 16px;
  color: #FFD700;
  letter-spacing: 2px;
}

/* 宣纸红帖弹窗与模态框 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 16px;
  backdrop-filter: blur(5px);
}
.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 20px;
  cursor: pointer;
}

/* 候选日课列表 */
.candidate-item {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.candidate-item:active {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.1);
}

/* ==========================================================================
   SEC-13 响应式断言规范 (平板与手机端完整覆盖)
   ========================================================================== */
/* 平板端媒体查询 (768px ~ 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .main-container {
    padding: 24px;
  }
  .compass-mountain-bar {
    grid-template-columns: repeat(12, 1fr);
  }
  .bagua-compass-board {
    grid-template-columns: repeat(4, 1fr);
  }
  .pillars-container {
    gap: 16px;
  }
  .pillar-ganzhi {
    font-size: 32px;
  }
  .pillar-meta-row {
    font-size: 13px;
    padding: 6px 4px;
  }
}

/* 手机端媒体查询 (360px ~ 640px) */
@media screen and (max-width: 640px) {
  .header-bar {
    padding: 10px 12px;
  }
  .brand-title {
    font-size: 16px;
  }
  .compass-mountain-bar {
    grid-template-columns: repeat(6, 1fr);
  }
  .bagua-compass-board {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillars-container {
    gap: 6px;
  }
  .pillar-ganzhi {
    font-size: 20px;
  }
  .pillar-meta-row {
    font-size: 12px;
    padding: 2px 1px;
  }
}

/* ==========================================================================
   宗门正统三秘与双层定位胶囊扩展样式 (宋代典仪美学)
   ========================================================================== */

/* 顶部宗门三秘速查快捷入口按钮 */
.sanmi-top-btn {
  background: linear-gradient(135deg, rgba(212,175,55,0.2) 0%, rgba(158,26,26,0.3) 100%);
  border: 1px solid var(--accent-gold);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}
.sanmi-top-btn:active {
  background: var(--accent-gold);
  color: #121214;
}

/* 双层流式定位胶囊条 */
.location-dual-capsule-card {
  padding: 10px 12px !important;
  margin-bottom: 12px;
}
.time-capsule-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(38, 36, 43, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 20px;
  padding: 6px 12px;
  gap: 8px;
  flex-wrap: wrap;
}
.time-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.time-label {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
}
.time-field {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.time-field:focus {
  border-color: var(--accent-gold);
}
.solar-time-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.solar-term-text {
  color: var(--text-sub);
  font-size: 12px;
}
.solar-divider {
  color: var(--border-line);
  font-size: 12px;
}
.true-solar-text {
  color: var(--accent-gold);
  font-weight: bold;
  font-size: 12px;
}

/* 时空调频飞梭条 (锦上添花：年/月/日/时步进微调药丸) */
.time-shuttle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(24, 23, 27, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 18px;
  padding: 4px 8px;
  margin-top: 8px;
  overflow-x: auto;
}
.shuttle-group {
  display: flex;
  align-items: center;
  background: rgba(45, 42, 50, 0.8);
  border: 1px solid var(--border-line);
  border-radius: 12px;
  padding: 2px 4px;
  gap: 2px;
  flex-shrink: 0;
}
.shuttle-title {
  font-size: 12px;
  font-weight: bold;
  color: var(--gold-light);
  padding: 0 4px;
}
.shuttle-btn {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--text-main);
  font-size: 12px;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}
.shuttle-btn:active {
  background: var(--primary-red);
  color: #FFF;
  border-color: var(--accent-gold);
  transform: scale(0.92);
}
.shuttle-btn-now {
  background: linear-gradient(135deg, rgba(158, 26, 26, 0.4) 0%, rgba(212, 175, 55, 0.3) 100%);
  border: 1px solid var(--accent-gold);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.shuttle-btn-now:active {
  background: var(--accent-gold);
  color: #121214;
}

/* 前后交节时刻精排卡片 */
.solar-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.solar-detail-card {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.solar-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 4px;
}
.solar-detail-title {
  color: var(--accent-gold);
  font-weight: bold;
  font-size: 12px;
}
.solar-detail-time {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.solar-detail-dist {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* 日柱旬空与四忌三煞专验小箱 */
.taboo-fast-box {
  background: rgba(38, 36, 43, 0.6);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.taboo-fast-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: bold;
  color: var(--accent-gold);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}
.taboo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.taboo-item {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}
.taboo-item-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 2px;
}
.taboo-item-val {
  font-size: 12px;
  font-weight: bold;
  color: var(--text-main);
}

/* 典仪手风琴折叠卡片 (Accordion - 军规 2) */
.accordion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: border-color 0.2s;
}
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(90deg, rgba(38,36,43,0.6) 0%, rgba(28,27,31,0.6) 100%);
  border-left: 3px solid var(--primary-red);
}
.accordion-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: bold;
  color: var(--accent-gold);
}
.accordion-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(212,175,55,0.15);
  color: var(--gold-light);
  font-weight: normal;
}
.accordion-icon {
  font-size: 14px;
  color: var(--accent-gold);
  transition: transform 0.25s ease;
}
.accordion-card.open .accordion-icon {
  transform: rotate(180deg);
}
.accordion-body {
  display: none;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.accordion-card.open .accordion-body {
  display: block;
}

/* 宗门三秘深研卡片内部样式 */
.sanmi-panel-block {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
}
.sanmi-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: bold;
  color: var(--accent-gold);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(212,175,55,0.2);
}
.geju-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.geju-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  background: linear-gradient(135deg, rgba(158,26,26,0.3) 0%, rgba(212,175,55,0.25) 100%);
  border: 1px solid var(--accent-gold);
  color: var(--gold-light);
}
.subguan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.subguan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.subguan-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}
.subguan-desc {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
}

/* 侧滑与下沉通用抽屉 (Drawer) */
.drawer-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  backdrop-filter: blur(5px);
  justify-content: flex-end;
}
.drawer-overlay.show {
  display: flex;
}
.drawer-container {
  background: var(--bg-card);
  border-left: 1px solid var(--accent-gold);
  width: 100%;
  max-width: 520px;
  height: 100%;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: slideDrawerRight 0.25s ease-out;
  box-shadow: -8px 0 25px rgba(0,0,0,0.8);
}
@keyframes slideDrawerRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(38,36,43,0.95) 0%, rgba(28,27,31,0.95) 100%);
  border-bottom: 1px solid var(--border-line);
  flex-shrink: 0;
}
.drawer-title {
  font-size: 17px;
  font-weight: bold;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-close-btn {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
}
.drawer-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.drawer-tabs {
  display: flex;
  background: var(--bg-card-sub);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 14px;
}
.drawer-tab {
  flex: 1;
  text-align: center;
  padding: 6px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}
.drawer-tab.active {
  background: var(--primary-red);
  color: #FFF;
  font-weight: bold;
}

/* ==========================================================================
   古籍《斗首五行二十四山图说》古图圆盘案台专属样式 (宋代木刻版画典仪风)
   ========================================================================== */
.ancient-chart-woodblock {
  background: #181513;
  background-image: 
    radial-gradient(ellipse at 50% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 80%),
    linear-gradient(180deg, #221C18 0%, #151312 100%);
  border: 2px solid #5C4A33;
  box-shadow: inset 0 0 0 3px #181513, inset 0 0 0 4.5px #D4AF37, 0 6px 24px rgba(0,0,0,0.7);
  border-radius: 4px;
  padding: 12px 10px 14px 10px;
  position: relative;
  margin-bottom: 16px;
}

/* 顶头额书：斗首五行二十四山圖說 */
.ancient-chart-head-banner {
  border-bottom: 2px solid #5C4A33;
  box-shadow: 0 1px 0 rgba(212,175,55,0.4);
  padding: 6px 0 10px 0;
  text-align: center;
  margin-bottom: 14px;
}
.ancient-banner-title {
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 5px;
  color: #F5E8C7;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 1px #D4AF37;
}

/* 四角古雅铭印 (立·成·定·局) */
.ancient-seal-mark {
  position: absolute;
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 26px;
  font-weight: 900;
  color: #D4AF37;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  pointer-events: none;
  line-height: 1;
}
.seal-top-left { top: 62px; left: 16px; }
.seal-top-right { top: 62px; right: 16px; }
.seal-bottom-left { bottom: 130px; left: 16px; }
.seal-bottom-right { bottom: 130px; right: 16px; }

/* 核心古罗盘 SVG 容器 */
.ancient-dial-svg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 10px 0;
}
.ancient-dial-svg {
  width: 100%;
  max-width: 330px;
  height: auto;
  user-select: none;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

/* 圆盘外内环矢量样式 */
.ancient-dial-base {
  fill: #1D1814;
  stroke: #D4AF37;
  stroke-width: 2.5;
}
.ancient-sector-outer {
  fill: #27211C;
  stroke: #5C4A33;
  stroke-width: 1.2;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ancient-sector-outer:hover {
  fill: rgba(163, 27, 27, 0.6);
  stroke: #D4AF37;
}
.ancient-sector-outer.active-mountain {
  fill: #871616;
  stroke: #FFE58F;
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(212,175,55,0.7));
}

.ancient-sector-inner {
  fill: #1F1A16;
  stroke: #5C4A33;
  stroke-width: 1.2;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ancient-sector-inner:hover {
  fill: rgba(163, 27, 27, 0.45);
  stroke: #D4AF37;
}
.ancient-sector-inner.active-mountain {
  fill: #611010;
  stroke: #FFE58F;
  stroke-width: 1.6;
}

.ancient-dial-text-mountain {
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 13.5px;
  font-weight: bold;
  fill: #F5E8C7;
  cursor: pointer;
  pointer-events: none;
}
.ancient-dial-text-mountain.active {
  fill: #FFF;
  font-weight: 900;
  text-shadow: 0 0 4px #FFD700;
}

.ancient-dial-text-wx {
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 12px;
  font-weight: bold;
  fill: #D4AF37;
  cursor: pointer;
  pointer-events: none;
}
.ancient-dial-text-wx.active {
  fill: #FFF;
  font-weight: 900;
}

/* 天心中心圆盘 */
.ancient-dial-center {
  fill: #16120F;
  stroke: #D4AF37;
  stroke-width: 2;
}
.ancient-center-title {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 11px;
  fill: #C8BFAD;
  pointer-events: none;
}
.ancient-center-val {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 16px;
  font-weight: 900;
  fill: #FFA39E;
  pointer-events: none;
}

.ancient-dial-hint {
  text-align: center;
  font-size: 12px;
  color: #D4AF37;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

/* 下方古籍歌诀木刻表格 (起例诗日) */
.ancient-poem-table-wrap {
  border: 1.5px solid #5C4A33;
  box-shadow: inset 0 0 0 1px #181513, inset 0 0 0 2px rgba(212,175,55,0.4);
  background: rgba(22, 18, 15, 0.9);
  padding: 6px;
}
.ancient-poem-table-title {
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #F5E8C7;
  text-align: center;
  padding: 4px 0 6px 0;
  border-bottom: 1.5px solid #5C4A33;
  margin-bottom: 6px;
}
.ancient-poem-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.ancient-poem-col {
  border: 1px solid rgba(92, 74, 51, 0.7);
  background: rgba(35, 28, 23, 0.7);
  padding: 4px 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ancient-col-head {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 12px;
  font-weight: bold;
  color: #D4AF37;
  border-bottom: 1px dashed rgba(212,175,55,0.3);
  padding-bottom: 3px;
  margin-bottom: 3px;
  width: 100%;
}
.ancient-col-body {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 12px;
  line-height: 1.4;
  color: #F4EEDF;
  writing-mode: vertical-rl;
  letter-spacing: 1px;
  margin: 2px auto;
}

.ancient-sub-palaces-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 10px;
}

/* ==========================================================================
   《家藏秘本》五曜番化生克回环图样式 (太极回环星轨)
   ========================================================================== */
.fanhua-diagram-box {
  background: #171513;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  margin-bottom: 12px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
}
.fanhua-svg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 10px 0;
}
.fanhua-svg {
  width: 100%;
  max-width: 310px;
  height: auto;
  user-select: none;
}
.fanhua-bg-circle {
  fill: #1C1916;
  stroke: rgba(212, 175, 55, 0.2);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}
.fanhua-track-line {
  stroke: rgba(212, 175, 55, 0.45);
  stroke-width: 2;
  stroke-dasharray: 5 3;
}
.fanhua-track-dot {
  fill: #FFE58F;
  filter: drop-shadow(0 0 3px #D4AF37);
}
.fanhua-center-base {
  fill: #27211C;
  stroke: #D4AF37;
  stroke-width: 2;
  box-shadow: 0 0 12px rgba(212,175,55,0.4);
}
.fanhua-center-title {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 11px;
  fill: #C8BFAD;
  font-weight: bold;
}
.fanhua-center-subtitle {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 13.5px;
  font-weight: 900;
  fill: #FFA39E;
}
.fanhua-node-circle {
  fill: #221D18;
  stroke: #5C4A33;
  stroke-width: 1.5;
  transition: all 0.2s;
}
.fanhua-node-circle.active {
  fill: #7A1212;
  stroke: #FFE58F;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 6px rgba(212,175,55,0.7));
}
.fanhua-node-text {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 13px;
  font-weight: bold;
  fill: #C8BFAD;
}
.fanhua-node-text.active {
  fill: #FFF;
  font-weight: 900;
  text-shadow: 0 0 4px #D4AF37;
}
.fanhua-node-sub {
  font-size: 11px;
  fill: #D4AF37;
}
.fanhua-nodes-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.fanhua-summary-chip {
  background: rgba(35, 30, 26, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-sm);
  padding: 6px 2px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fanhua-summary-chip.active {
  border-color: var(--accent-gold);
  background: rgba(163, 27, 27, 0.35);
  box-shadow: 0 0 6px rgba(212,175,55,0.25);
}
.fanhua-chip-name {
  font-size: 12px;
  font-weight: bold;
  color: var(--gold-light);
}
.fanhua-chip-desc {
  font-size: 11px;
  color: var(--text-sub);
  margin: 1px 0;
}
.fanhua-chip-cnt {
  font-size: 11px;
  color: #FFA39E;
  font-weight: bold;
}

/* ==========================================================================
   宗门三秘【定生宫排山掌诀】与【游年八卦起主魂盘】样式
   ========================================================================== */
.sanmi-palm-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 10px 0 12px 0;
}
.palm-chart-card {
  background: #181513;
  border: 1.5px solid #5C4A33;
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(212,175,55,0.2);
}
.palm-chart-title {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 13px;
  font-weight: 900;
  color: #F5E8C7;
  text-align: center;
  margin-bottom: 2px;
}
.palm-chart-desc {
  font-size: 11.5px;
  color: var(--accent-gold);
  text-align: center;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.palm-grid-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.palm-cell {
  background: rgba(35, 28, 23, 0.85);
  border: 1px solid rgba(92, 74, 51, 0.7);
  border-radius: 3px;
  padding: 6px 2px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  transition: all 0.2s;
}
.palm-cell.birth-highlight {
  border-color: #3B82F6;
  background: rgba(30, 58, 138, 0.4);
}
.palm-cell.dingsheng-highlight {
  border-color: #FFD700;
  background: rgba(163, 27, 27, 0.5);
  box-shadow: 0 0 8px rgba(212,175,55,0.6);
}
.palm-cell.xingnian-highlight {
  border-color: #10B981;
  background: rgba(6, 78, 59, 0.4);
}
.palm-cell.zhuhun-highlight {
  border-color: #FFD700;
  background: linear-gradient(135deg, rgba(163,27,27,0.6) 0%, rgba(212,175,55,0.4) 100%);
  box-shadow: 0 0 8px rgba(212,175,55,0.7);
}
.palm-cell-name {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 12px;
  font-weight: bold;
  color: #F5E8C7;
}
.palm-cell-desc {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 1px;
}
.palm-tag-badge {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 2px;
  background: #A31B1B;
  color: #FFF;
  font-weight: normal;
  display: inline-block;
  margin-left: 2px;
}





/* ==========================================================================
   宗门深研四大宝阁 · 抽屉式集成枢纽 (堂主最高指示：坚决杜绝平铺，采用抽屉式收纳)
   ========================================================================== */
.zenith-drawer-deck {
  margin: 12px 0 16px;
  background: linear-gradient(180deg, rgba(32, 28, 36, 0.95) 0%, rgba(22, 20, 26, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.zenith-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.25);
}
.zenith-deck-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.zenith-deck-icon {
  font-size: 16px;
}
.zenith-deck-title {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 15px;
  font-weight: bold;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}
.zenith-deck-badge {
  font-size: 11px;
  color: #EDE6D8;
  background: rgba(158, 26, 26, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.5);
  padding: 2px 8px;
  border-radius: 12px;
}
.zenith-deck-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.zenith-drawer-card {
  background: rgba(42, 38, 48, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 10px 10px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.zenith-drawer-card:hover, .zenith-drawer-card:active {
  background: rgba(58, 52, 66, 0.95);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}
.zdc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.zdc-icon {
  font-size: 18px;
}
.zdc-badge {
  font-size: 11px;
  color: #F5E8C7;
  background: rgba(212, 175, 55, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.zdc-title {
  font-size: 13.5px;
  font-weight: bold;
  color: #FFF;
  margin-bottom: 2px;
  font-family: "Songti SC", "SimSun", serif;
}
.zdc-desc {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.4;
  margin-bottom: 6px;
  flex: 1;
}
.zdc-action {
  font-size: 11px;
  color: var(--accent-gold);
  font-weight: 500;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

/* 移动端与全端抽屉自适应 (Bottom Sheet on Mobile) */
@media screen and (max-width: 768px) {
  .drawer-overlay {
    align-items: flex-end !important;
    justify-content: center !important;
  }
  .drawer-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 88vh !important;
    max-height: 88vh !important;
    border-left: none !important;
    border-top: 2px solid var(--accent-gold) !important;
    border-radius: 18px 18px 0 0 !important;
    animation: slideDrawerUp 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 -10px 35px rgba(0,0,0,0.9) !important;
  }
  .drawer-header {
    border-radius: 18px 18px 0 0;
    padding: 12px 16px;
  }
}
@keyframes slideDrawerUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
