/* ===========================================
   五行小宝 · v2 升级层 CSS（2026-05-26）
   - 无 emoji 极简体系
   - 五行色点 / 徽章 / 小宝形象统一接口
   - LOGO 图形版统一应用（Hero / 弹窗 / fallback）
   - 登录弹窗 Modal
   ============================================= */

/* ---- LOGO 适配 ---- */
.logo-icon { width: 32px; height: 32px; filter: none; }
/* footer 下原本用 CSS filter 反白，现在直接换图，删除 filter */
.footer .logo-icon { filter: none; }

/* footer 品牌区 LOGO（黑底缟素版，自带文字） */
.footer-logo {
  display: inline-block;
}
.footer-logo img {
  width: 140px;
  height: auto;
  display: block;
}
/* 隐藏旧 footer-brand h3（如有） */
.footer-brand h3 { display: none; }

/* 内测横幅去 emoji */
.demo-banner-icon {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--earth);
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ============ 五行色点 ============ */
.wx-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}
.wx-dot--wood  { background: var(--wood); }
.wx-dot--fire  { background: var(--fire); }
.wx-dot--earth { background: var(--earth); }
.wx-dot--metal { background: #D4A017; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }   /* 金 → 亮金 */
.wx-dot--water { background: var(--water); }
.tag .wx-dot { width: 8px; height: 8px; margin-right: 5px; }

/* ============ 五行徽章 ============ */
.wx-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0;
}
.wx-badge--wood  { background: var(--wood); }
.wx-badge--fire  { background: var(--fire); }
.wx-badge--earth { background: var(--earth); }
.wx-badge--metal { background: #D4A017; }   /* 金 → 亮金 */
.wx-badge--water { background: var(--water); }
.wx-badge--xl { width: 96px; height: 96px; font-size: 36px; }
.wx-badge--lg { width: 72px; height: 72px; font-size: 28px; }
.wx-badge--sm { width: 32px; height: 32px; font-size: 14px; }

/* ============ 小宝形象统一接口（占位 → 真图无缝替换） ============
   - 默认显示 LOGO 图形版（半透明）作为占位
   - mascots.js 会在加载到真图后用 inline style 覆盖 background-image
   - 真图加载后会用 cover 充满，自然替代 LOGO 占位
============================================ */
.xb-mascot {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: var(--gaosu);
  background-image: url('assets/logo-mark-light.png');
  background-size: 56% auto;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  font-size: 0;
}
/* mascots.js 真图加载后会把 .xb-mascot 加上类 .xb-mascot-loaded
   并用 inline style 设置 background-image，inline 优先级最高
   所以这里仅需保证：加载后 size 改为 cover */
.xb-mascot.xb-mascot-loaded {
  background-size: cover !important;
}
/* 非圆形小宝场景（首页五行小宝展示 / 杂志构图）：
   屏蔽默认太极 LOGO 占位，避免真图加载前闪一下 */
.xb-mascot.xb-no-crop {
  background-image: none !important;
  background-color: transparent !important;
  border-radius: 0 !important;
}
.xb-mascot.xb-no-crop.xb-mascot-loaded {
  background-size: contain !important;
}
.xb-mascot[data-wx="wood"]  { background-color: rgba(120,146,98,0.10); }
.xb-mascot[data-wx="fire"]  { background-color: rgba(255,70,31,0.08); }
.xb-mascot[data-wx="earth"] { background-color: rgba(200,155,64,0.10); }
.xb-mascot[data-wx="metal"] { background-color: rgba(184,176,160,0.18); }
.xb-mascot[data-wx="water"] { background-color: rgba(22,97,171,0.10); }
/* 在子站 wxti/ 下，路径需要 ../ 前缀（mascots.js 内会处理，CSS 这里写主路径） */
/* 子站页面会自行覆盖；如需在子站使用 .xb-mascot，建议直接 inline style */

/* ============ Hero 主形象 v2 → 纯透明底 LOGO 图形版 ============ */
.hero-mascot-v2 {
  width: 220px; height: 220px;
  margin: 0 auto 36px;
  /* 纯透明背景，LOGO 直接贴在 Hero 区域底色上 */
  background: transparent;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroGentleFloat 5s ease-in-out infinite;
}
.hero-mascot-v2::before {
  /* 删除黄色光晕，保持纯净 */
  content: none;
}
.hero-mascot-v2::after {
  /* LOGO 图形（黑白线稿无字版）
     注：原 logo-mark-light.png 底部被裁了 1px（last_row=483/545），
     改用 1024x1024 完整版 logo-transparent.png，底部圆弧完整 */
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('assets/logo-transparent.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-mascot-v2 .hero-mascot-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  z-index: 1;
}
@keyframes heroGentleFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ============ 模块卡 v2 ============ */
.module-card-v2 .module-icon {
  margin: 0 auto 24px;
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Serif SC', serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}
.module-card-v2[data-tone="primary"] .module-icon { background: var(--water); }
.module-card-v2[data-tone="accent"]  .module-icon { background: var(--earth); }
.module-card-v2[data-tone="ink"]     .module-icon { background: var(--xuan); }

/* ============ 家族卡 v2 ============ */
.family-card .family-mark {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 22px;
}

/* ============ 评价头像配色 ============ */
.review-avatar[data-wx="wood"]  { background-color: var(--wood); }
.review-avatar[data-wx="fire"]  { background-color: var(--fire); }
.review-avatar[data-wx="earth"] { background-color: var(--earth); }
.review-avatar[data-wx="metal"] { background-color: #B8B0A0; }
.review-avatar[data-wx="water"] { background-color: var(--water); }

/* 评价头像用 LOGO 缟素白图形作占位 */
.review-avatar-logo {
  background-image: url('assets/logo-mark-dark.png');
  background-size: 64% auto;
  background-position: center;
  background-repeat: no-repeat;
  font-size: 0; /* 隐藏所有占位文字 */
}

/* ============ 个人中心头像 v2（也用 LOGO 占位） ============ */
.me-avatar-v2 {
  width: 96px; height: 96px;
  border-radius: 50%;
  background-color: rgba(22,97,171,0.08);
  background-image: url('assets/logo-mark-light.png');
  background-size: 60% auto;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(22, 97, 171, 0.10);
}
.me-avatar-v2 .me-avatar-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  z-index: 1;
}

/* ============ 登录弹窗 Modal ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.25s ease;
}
.modal-overlay.active { display: flex; }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 48px 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0,0,0,.20);
  position: relative;
  animation: modalSlideIn 0.35s ease;
}

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--yinshu);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  line-height: 1;
}
.modal-close:hover { background: var(--gaosu); color: var(--mo); }

.modal-logo { text-align: center; margin-bottom: 12px; }
.modal-logo img { width: 64px; height: 64px; object-fit: contain; }

.modal-title {
  text-align: center;
  font-family: 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--xuan);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.modal-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--yinshu);
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.login-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.login-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 14px;
  color: var(--yinshu);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  font-weight: 400;
  background: transparent;
  font-family: inherit;
}
.login-tab.active {
  color: var(--water);
  border-bottom-color: var(--water);
  font-weight: 500;
}

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

.phone-row { display: flex; gap: 8px; }
.phone-row .form-input { flex: 1; }
.btn-code {
  white-space: nowrap;
  padding: 0 16px;
  background: var(--gaosu);
  color: var(--water);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.btn-code:hover { border-color: var(--water); }

.qr-wrap { text-align: center; padding: 4px 0 0; }
.qr-box {
  width: 200px; height: 200px;
  margin: 0 auto 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.qr-box::before {
  /* 占位"假二维码"图案 */
  content: "";
  position: absolute;
  inset: 16px;
  background-image:
    linear-gradient(45deg, var(--xuan) 25%, transparent 25%),
    linear-gradient(-45deg, var(--xuan) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--xuan) 75%),
    linear-gradient(-45deg, transparent 75%, var(--xuan) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0px;
  opacity: 0.82;
}
.qr-box::after {
  content: "";
  position: absolute;
  width: 48px; height: 48px;
  background: #fff;
  border-radius: 50%;
  background-image: url('assets/logo-mark-light.png');
  background-size: 36px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 4px #fff;
}
.qr-tip {
  font-size: 13px;
  color: var(--yinshu);
  letter-spacing: 0.5px;
}
.qr-tip strong { color: var(--mo); font-weight: 500; }

.modal-agreement {
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
  color: var(--yinshu);
  line-height: 1.7;
}
.modal-agreement a { color: var(--water); }

.modal-demo-tip {
  margin-top: 16px;
  background: rgba(200, 155, 64, 0.08);
  border: 1px dashed rgba(200, 155, 64, 0.40);
  color: #8B6E2C;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* ============ 通用 utility ============ */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--water);
  margin-right: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.icon-circle--earth { background: var(--earth); }
.icon-circle--wood  { background: var(--wood); }
.icon-circle--ink   { background: var(--xuan); }

/* ============ 每日水滴模块去 emoji 大水印 ============ */
.daily-drop::before {
  content: none !important;       /* 去掉右上角 💧 大水印 */
}

/* ============ 首页"我的日历"模块 · 右侧预览 ============ */
.cal-preview {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(60,70,90,0.06);
}
.cal-pv-head {
  font-size: 14px; font-weight: 700;
  color: #2A2A2A; letter-spacing: 2px;
  text-align: center; padding-bottom: 10px;
  border-bottom: 1px solid #ECEDE8;
  margin-bottom: 10px;
}
.cal-pv-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-pv-w {
  text-align: center; font-size: 11px;
  color: #999; letter-spacing: 1px;
  padding-bottom: 4px;
}
.cal-pv-grid > i {
  position: relative;
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 8px; font-style: normal;
  background: rgba(0,0,0,0.02);
}
.cal-pv-grid > i b {
  font-size: 12px; color: #2A2A2A; font-weight: 600;
}
.cal-pv-grid > i em {
  font-size: 9px; font-style: normal; font-weight: 700;
  margin-top: 1px;
}
.cal-pv-grid > i::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  display: none;
}
.cal-pv-grid .lvl-r em { color: #C8473A; }       /* 大吉 */
.cal-pv-grid .lvl-g em { color: #789262; }       /* 吉 */
.cal-pv-grid .lvl-n em { color: #C89B40; }       /* 平 */
.cal-pv-grid .lvl-c em { color: #9CA3AF; }       /* 小心 */
.cal-pv-grid .is-today { background: rgba(200,71,58,0.10); }
.cal-pv-grid .is-today b { color: #C8473A; font-weight: 800; }

@media (max-width: 720px) {
  #calendar .daily-drop { grid-template-columns: 1fr !important; }
}

/* ============ 首页"今日卡片"（专属日历模块右侧）============ */
.cal-today-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 2px 12px rgba(60,70,90,0.06);
  min-height: 280px;
  display: flex; flex-direction: column;
}
/* loading 占位 */
.cal-today-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; padding: 30px 0; color: #aaa;
}
.cal-today-pulse {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(22, 97, 171, 0.08);
  margin-bottom: 12px;
  animation: calPulse 1.4s ease-in-out infinite;
}
@keyframes calPulse { 0%,100%{opacity:.4;transform:scale(.95);} 50%{opacity:1;transform:scale(1.05);} }

/* 空状态 */
.cal-today-empty {
  text-align: center; padding: 30px 10px; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.cal-today-empty-icon {
  width: 56px; height: 56px;
  background: url('assets/logo-mark-light.png') center/contain no-repeat;
  opacity: 0.4; margin-bottom: 14px;
}
.cal-today-empty h4 { font-size: 17px; color: #2A2A2A; margin-bottom: 6px; }
.cal-today-empty p  {
  font-size: 13px; color: #888; line-height: 1.7; margin-bottom: 18px;
  max-width: 260px;
}

/* 头部：日期 + 分数 */
.cal-today-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-bottom: 14px;
  border-bottom: 1px solid #ECEDE8; margin-bottom: 14px;
}
.cal-today-date small {
  font-size: 12px; color: #888; letter-spacing: 1px; display: block; margin-bottom: 4px;
}
.cal-today-prof-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  background: #222;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.5px;
  vertical-align: 1px;
}
.cal-today-pillar {
  font-size: 22px; font-weight: 700; color: #2A2A2A;
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.cal-today-jq {
  font-size: 11px; color: #1661AB;
  background: rgba(22,97,171,.08);
  padding: 3px 8px; border-radius: 999px;
  font-weight: 500; letter-spacing: 1px;
}
.cal-today-score { text-align: center; min-width: 70px; }
.cal-today-score-num {
  font-size: 36px; font-weight: 800;
  color: var(--lvl, #2A2A2A);
  line-height: 1;
}
.cal-today-score-lvl {
  font-size: 12px; color: var(--lvl, #888);
  letter-spacing: 2px; margin-top: 4px; font-weight: 600;
  white-space: nowrap;
}

/* 寄语 */
.cal-today-greet {
  font-size: 13px; line-height: 1.75; color: #444;
  background: rgba(22,97,171,0.04);
  border-left: 3px solid #1661AB;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
}

/* 宜忌 */
.cal-today-yiji {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 14px;
}
.cal-today-y {
  background: rgba(0,0,0,0.02);
  padding: 10px 12px;
  border-radius: 8px;
}
.cal-today-y-h {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; margin-bottom: 6px;
  letter-spacing: 2px;
}
.cal-today-y-h .dot {
  width: 14px; height: 14px; border-radius: 50%;
  display: inline-block;
}
.cal-today-y-h .dot.yi { background: #789262; }
.cal-today-y-h .dot.ji { background: #C8473A; }
.cal-today-y ul { list-style: none; padding: 0; margin: 0; }
.cal-today-y li {
  font-size: 12px; color: #333; line-height: 1.55;
  padding: 3px 0 3px 8px; position: relative;
}
.cal-today-y li::before {
  content: '·'; position: absolute; left: 0; color: #aaa;
}
.cal-today-y li.muted { color: #aaa; font-style: italic; }

.cal-today-more {
  display: inline-block; align-self: flex-end;
  font-size: 12px; color: #1661AB; text-decoration: none;
  font-weight: 600; letter-spacing: 1px;
  margin-top: auto;
  padding-top: 6px;
}
.cal-today-more:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .cal-today-yiji { grid-template-columns: 1fr; }
}
