* { box-sizing: border-box; margin: 0; padding: 0; }

.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,.78); color: #fff; padding: 12px 28px; border-radius: 8px; font-size: 14px; z-index: 99999; display: none; pointer-events: none; }

/* 广告栏 */
.ad-banner {
    display: none; height: 50px; margin: 8px 0 12px 10px;
    border-radius: 6px;
    overflow: hidden;
}
.ad-banner.is-visible { display: block; }
.ad-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 768px) {
    .ad-banner { max-width: 550px; width: calc(100% - 20px); margin: 8px auto 12px; }
}


.nav-item { display: flex; flex-direction: row; align-items: center; gap: 4px; cursor: pointer; height: 100%; transition: all 0.3s; position: relative; text-decoration: none; }


/* 页面标题 */
.page-hero { text-align: center; padding: 32px 0 20px; }
.page-hero h1 { font-size: 26px; font-weight: 700; color: var(--color-dark); margin-bottom: 6px; font-family:"ZhankuWenyi",sans-serif; }
.page-hero p  { font-size: 14px; color: var(--color-text-muted); font-family:"MiSans",sans-serif; font-weight:300; }

/* ===== 左右分栏布局 ===== */
.main-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; margin-left: 10px; }
/* 窄屏兜底：预防 mode-mobile JS 加载延迟时闪出双栏 */
@media (max-width: 520px) {
    .main-layout { grid-template-columns: 1fr; margin-left: 0; }
}

/* 左栏 */
.left-panel { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }

/* 用户卡片 — 紧凑 */
.user-card { background: #fff; border-radius: 10px; padding: 12px 16px; box-shadow: 0 1px 6px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 12px; }
.user-card .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--color-border-light); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.user-card .info { flex: 1; min-width: 0; }
.user-card .info .name { font-size: 14px; font-weight: 700; color: var(--color-dark); }
.user-card .info .level { font-size: 11px; color: var(--color-gold); margin-top: 1px; }
.user-card .status-tags { flex-shrink: 0; }
.tag { padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.tag-free { background: var(--color-subtle); color: var(--color-star-sub); }
.tag-vip  { background: var(--color-parchment); color: var(--color-gold); }
.tag-pro  { background: var(--color-subtle); color: #2D8A2D; }

/* 排盘树 */
.paipan-panel { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,0.05); flex: 1; overflow-y: auto; min-height: 0; }
.paipan-panel h3 { font-size: 15px; font-weight: 700; color: var(--color-dark); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border-light); }

/* 右栏 */
.right-panel { flex: 1; min-width: 0; }

/* 标签栏 */
.tab-bar { display: flex; gap: 0; margin-bottom: 12px; background: #fff; border-radius: 10px; padding: 4px; box-shadow: 0 1px 6px rgba(0,0,0,0.05); }
.tab-item { flex: 1; text-align: center; padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 8px; color: var(--color-star-sub); transition: all 0.2s; }
.tab-item.active { background: var(--color-dark); color: #fff; }
.tab-item:hover:not(.active) { color: var(--color-text); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 名人库 */
.celebrity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.celebrity-tag { padding: 10px 12px; border-radius: 8px; background: var(--color-subtle); font-size: 13px; cursor: pointer; text-align: center; transition: background 0.15s; }
.celebrity-tag:hover { background: #e8e8e8; }
.celebrity-tag .cat-name { font-weight: 600; color: var(--color-text); }
.celebrity-tag .cat-count { font-size: 11px; color: var(--color-text-faint); display: block; }
.celebrity-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.celebrity-card { padding: 10px 14px; border-radius: 8px; background: var(--color-subtle); font-size: 13px; cursor: pointer; transition: background 0.15s; }
.celebrity-card:hover { background: #e8e8e8; }
.celebrity-card .cel-title { font-size: 11px; color: var(--color-gold); margin-bottom: 2px; line-height: 1.3; }
.celebrity-card .cel-name { font-size: 13px; font-weight: 700; color: var(--color-dark); }
.celebrity-card .cel-info { font-size: 11px; color: var(--color-star-sub); margin-top: 2px; }
.celebrity-card .cel-pillars { font-size: 12px; color: var(--color-text-sec); margin-top: 3px; font-family: 'STKaiti','KaiTi',serif; letter-spacing: 2px; }
.celebrity-card .cel-brief { font-size: 10px; color: var(--color-text-faint); margin-top: 3px; line-height: 1.3; }

/* 排盘选择弹窗 */
.paipan-popup { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 10010; align-items: center; justify-content: center; }
.paipan-popup.show { display: flex; }
.paipan-popup-box { background: #fff; border-radius: 12px; padding: 28px 24px 20px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.25); min-width: 280px; max-width: 480px; }
.paipan-popup-box .pp-info small { display: block; text-align: left; margin-top: 8px; line-height: 1.5; max-height: 300px; overflow-y: auto; }
.paipan-popup-box .pp-name { font-size: 16px; font-weight: 700; color: var(--color-dark); margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.paipan-popup-box .pp-name span { flex: 0 1 auto; }
.paipan-popup-box .pp-edit-icon { font-size: 14px; cursor: pointer; color: var(--color-text-muted); transition: color .15s; flex-shrink: 0; }
.paipan-popup-box .pp-edit-icon:hover { color: var(--color-brand); }
.paipan-popup-box .pp-info { font-size: 12px; color: var(--color-star-sub); margin-bottom: 12px; }
.paipan-popup-box .pp-note { font-size: 13px; color: var(--color-text); background: var(--color-subtle); border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; text-align: left; line-height: 1.6; word-break: break-word; }
.paipan-popup-box .pp-btns { display: flex; gap: 12px; justify-content: center; }
/* 手机报告查看弹窗 */
.report-popup { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10020; align-items: center; justify-content: center; }
.report-popup.show { display: flex; }
.report-popup-box { background: #fff; border-radius: 12px; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 90vw; max-width: 700px; max-height: 85vh; display: flex; flex-direction: column; }
.report-popup-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--color-border-light); flex-shrink: 0; }
.report-popup-head h3 { font-size: 16px; font-weight: 700; color: var(--color-dark); margin: 0; }
.report-popup-close { background: none; border: none; font-size: 20px; color: var(--color-text-muted); cursor: pointer; padding: 4px 8px; }
.report-popup-body { padding: 20px 24px; overflow-y: auto; flex: 1; font-size: 14px; line-height: 1.9; color: var(--color-text); }
.report-popup-body h2,.report-popup-body h3,.report-popup-body h4 { color: var(--color-dark); margin: 16px 0 8px; }
.report-popup-body h2 { font-size: 18px; text-align: center; border-bottom: 1px solid var(--color-border-light); padding-bottom: 8px; }
.report-popup-body h3 { font-size: 15px; }
.report-popup-body h4 { font-size: 14px; color: #8B4513; }
.report-popup-body li { margin-left: 16px; }
.report-popup-body blockquote { color: var(--color-star-sub); border-left: 3px solid var(--color-gold); padding-left: 12px; margin: 8px 0; }
.report-popup-foot { display: flex; gap: 10px; justify-content: center; padding: 12px 20px; border-top: 1px solid var(--color-border-light); flex-shrink: 0; }
.report-popup-foot button { padding: 6px 20px; border-radius: 6px; font-size: 13px; cursor: pointer; border: 1px solid var(--color-border); background: #fff; }
.report-popup-foot .btn-reanalyze { background: var(--color-dark); color: #fff; border-color: var(--color-dark); }
/* 报告内容排版（与 shouji.css 保持一致） */
.report-body { text-align: left; line-height: 1.9; font-size: 14px; color: var(--color-text); }
.report-body h3 { font-size: 18px; font-weight: 700; color: #1A3D63; margin: 24px 0 12px; padding-bottom: 6px; border-bottom: 2px solid #5b8db8; }
.report-body h4 { font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 14px; margin: 16px 0 10px; display: inline-block; }
.report-body h4.c1 { color: var(--color-danger); background: var(--color-parchment); border: 1px solid #f5c6c2; }
.report-body h4.c2 { color: #7d3c98; background: #f5f0fa; border: 1px solid #d7c4e8; }
.report-body h4.c3 { color: #1A3D63; background: var(--color-subtle); border: 1px solid #c5d9ed; }
.report-body h4.c4 { color: #2D8A2D; background: var(--color-subtle); border: 1px solid #b8dcc8; }
.report-body h4.c5 { color: #B8860B; background: var(--color-parchment); border: 1px solid #f0d4a0; }
.report-body h4.c6 { color: #8e44ad; background: #f9f0fc; border: 1px solid #e0c8f0; }
.report-body h5 { font-size: 13px; font-weight: 700; color: var(--color-text-sec); margin: 12px 0 6px; border-left: 3px solid #5b8db8; padding-left: 8px; }
.report-body li { margin-left: 16px; line-height: 1.8; }
.report-body table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13px; }
.report-body td, .report-body th { padding: 8px 12px; border: 1px solid var(--color-border-warm); text-align: left; }
.report-body th { background: #f5efe5; font-weight: 700; color: #8B4513; }
.report-body blockquote { color: var(--color-star-sub); border-left: 3px solid var(--color-gold); padding: 8px 16px; margin: 12px 0; background: var(--color-parchment); border-radius: 0 6px 6px 0; }
.report-body hr { border: none; border-top: 1px solid var(--color-border-light); margin: 20px 0; }
.report-body strong { color: #8B4513; }
.pp-btn { padding: 10px 28px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; color: #fff; }
.pp-btn-ziwei { background: #6c5ce7; }
.pp-btn-bazi   { background: var(--color-gold); }
.pp-btn-liuyao   { background: #2D8A2D; }
.pp-btn-meihua   { background: #ad1457; }
.pp-btn-qimen    { background: #e67e22; }
.pp-btn-xuankong { background: #2ecc71; color: var(--color-text); }
.pp-btn-bazhai   { background: #4a90d9; }
.pp-btn-daliuren { background: #8e44ad; }
.pp-btn-xiaoliuren { background: #16a085; }
.pp-btn-jinkoujue { background: var(--color-danger); }
.pp-btn-taluo    { background: #f39c12; color: var(--color-text); }
.pp-btn-xingzuo  { background: #5b4d8b; }
.pp-btn-qiming   { background: #1A3D63; }
.pp-btn-hehun    { background: #e91e63; }
.pp-btn-lijichi  { background: #1a5276; }
.pp-btn:hover { opacity: 0.85; }
.pp-close { float: right; background: none; border: none; font-size: 18px; color: var(--color-text-faint); cursor: pointer; margin-top: -8px; margin-right: -4px; }

/* 树状结构 */
.tree-node { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; cursor: pointer; user-select: none; position: relative; }
.tree-node:hover { color: #4a6cf7; }
.tree-node.leaf { cursor: default; }

/* ===== 我的排盘树形导航 ===== */
.tree-container { padding: 8px 0; user-select: none; overflow-x: hidden; }
.tree-node-root { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 15px; font-weight: 700; }
.tree-node { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; cursor: pointer; position: relative; min-width: 0; }
.tree-node:hover { background: var(--color-subtle); border-radius: 4px; }
.tree-node.leaf { cursor: default; }
.tree-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border: 1px solid var(--color-border); border-radius: 3px;
    font-size: 12px; color: var(--color-text-sec); cursor: pointer; flex-shrink: 0;
    background: #fff; line-height: 1;
}
.tree-toggle:hover { background: #e8e8e8; }
.tree-toggle.empty { border-style: dashed; color: var(--color-text-faint); cursor: default; }
.tree-toggle.empty:hover { background: #fff; }
.tree-folder { flex-shrink: 0; font-size: 16px; }
.tree-folder.root-folder { font-size: 20px; }
.tree-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-label.leaf-item { color: var(--color-text-sec); font-weight: 400; }
.tree-children-root { position: relative; }
.tree-children::before {
    content: ''; position: absolute; left: 8px; top: 0; bottom: 8px;
    border-left: 1px dotted var(--color-border); width: 0;
}

/* 右键菜单 */
.tree-context-menu {
    position: fixed; background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10002; min-width: 140px; overflow: hidden;
}
.tree-context-menu div {
    padding: 8px 16px; font-size: 13px; cursor: pointer;
}
.tree-context-menu div:hover { background: var(--color-subtle); }

/* 工具栏 */
.tb-btn {
    padding: 2px 8px; font-size: 11px; border: 1px solid var(--color-border);
    border-radius: 4px; background: #fff; cursor: pointer; color: var(--color-text-sec);
}
.tb-btn:hover { background: var(--color-subtle); }
.tb-btn.tb-del { color: #e53e3e; border-color: #fcc; }
.tb-btn.tb-del:hover { background: #fff5f5; }
.tb-chk-label { font-size: 11px; }

/* 复选框 */
.tree-chk, .tree-chk-folder {
    width: 14px; height: 14px; margin-right: 4px; cursor: pointer;
    vertical-align: middle; accent-color: #4a6cf7;
}
.tb-chk-label {
    font-size: 12px; color: var(--color-text-sec); cursor: pointer; display: inline-flex; align-items: center; gap: 2px;
}
.tree-arrow { display: inline-block; width: 16px; font-size: 11px; color: var(--color-star-sub); transition: transform 0.2s; }
.tree-children { border-left: 2px solid var(--color-border-light); margin-left: 8px; margin-top: 2px; margin-bottom: 8px; position: relative; }
.tree-children .celebrity-cards { grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* ── 树节点辅助类（替代内联 style）── */
.tree-node-wrap { margin-left: var(--tree-indent, 0px); position: relative; }
.tree-connector { position: absolute; left: -16px; top: 0; bottom: 50%; width: 16px; border-bottom: 1px dotted var(--color-border); }
.tree-self-badge { color: #4a6cf7; font-size: 14px; margin-right: 2px; flex-shrink: 0; }
.tree-count-badge { font-size: 11px; color: var(--color-text-sec); margin-left: 4px; white-space: nowrap; }
.tree-folder-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.tree-folder-actions-label { font-size: 10px; color: var(--color-text-sec); cursor: pointer; }
.tree-folder-del-btn { font-size: 10px; padding: 1px 6px; }
.tree-gender-male { color: #0074E5; }
.tree-gender-female { color: #e91e63; }
.tree-children-hidden { display: none; padding-left: 18px; }

/* ── 排序/移动弹窗 ── */
.tree-sort-item { display: flex; align-items: center; padding: 6px 8px; border-bottom: 1px solid #F5F5F5; }
.tree-sort-item--locked { color: var(--color-text-faint); }
.tree-sort-label { flex: 1; font-size: 13px; }
.tree-sort-btn { border: 1px solid var(--color-border); background: #fff; border-radius: 3px; cursor: pointer; padding: 2px 8px; margin: 0 2px; }
.tree-sort-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.move-menu { position: fixed; background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); z-index: 10004; min-width: 140px; overflow: hidden; }
.move-menu-item { padding: 6px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #F5F5F5; }
.move-menu-item:hover { background: var(--color-subtle); }
.move-menu-item--muted { color: var(--color-text-faint); }

/* ── 搜索结果 ── */
.search-loading { text-align: center; padding: 20px; color: var(--color-text-muted); }
.search-empty { text-align: center; color: var(--color-text-muted); padding: 20px; }
.search-error { color: var(--color-fire); padding: 10px; }
.search-count { font-size: 12px; color: var(--color-star-sub); margin-bottom: 8px; }

/* ── 名人卡片性别图标 ── */
.cel-gender-m { color: #0074E5; }
.cel-gender-f { color: #e91e63; }

/* ── 名人分类树 ── */
.celeb-era-name { font-weight: 600; color: var(--color-dark); }
.celeb-era-sub  { font-weight: 600; color: var(--color-text); }
.celeb-era-count { font-size: 11px; color: var(--color-text-faint); }

/* 命例查找弹窗 */
.search-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 10003; align-items: center; justify-content: center; }
.search-overlay.show { display: flex; }
.search-dialog { background: #fff; border-radius: 12px; padding: 20px 24px; width: 680px; max-width: 95vw; height: 620px; max-height: 85vh; box-shadow: 0 20px 60px rgba(0,0,0,0.25); position: relative; display: flex; flex-direction: column; }
.search-dialog .search-body { flex: 1; overflow-y: auto; min-height: 0; }
.search-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--color-text-muted); }
.search-close:hover { color: var(--color-text); }
.search-tabs { display: flex; gap: 0; margin-bottom: 4px; border-bottom: 2px solid var(--color-border-light); }
.search-tab { padding: 8px 20px; font-size: 13px; cursor: pointer; color: var(--color-star-sub); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.search-tab.active { color: var(--color-dark); font-weight: 700; border-bottom-color: #4a6cf7; }
.search-tab:hover:not(.active) { color: var(--color-text-sec); }
.search-panel { display: none; }
.search-panel.active { display: block; }
.search-field-group { margin-bottom: 10px; }
.search-field-label { font-size: 12px; font-weight: 700; color: var(--color-text-sec); margin-bottom: 4px; }
.search-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.search-tag { padding: 3px 10px; font-size: 12px; border: 1px solid var(--color-border); border-radius: 14px; cursor: pointer; background: #fff; color: var(--color-text-sec); transition: all 0.15s; user-select: none; }
.search-tag:hover { border-color: #4a6cf7; color: #4a6cf7; }
.search-tag.selected { background: #4a6cf7; color: #fff; border-color: #4a6cf7; }
.search-submit { display: block; width: 100%; margin-top: 8px; padding: 10px; background: var(--color-dark); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.search-submit:hover { opacity: 0.9; }
/* 对话框 */
.tree-dialog {
    position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 10003;
    display: flex; align-items: center; justify-content: center;
}
.tree-dialog-box {
    background: #fff; border-radius: 12px; padding: 24px; width: 320px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

/* 云存储 */
.storage-bar { background: var(--color-subtle); border-radius: 8px; height: 20px; margin: 12px 0; overflow: hidden; }
.storage-bar .used { height: 100%; background: linear-gradient(90deg, #4a6cf7, #48bb78); border-radius: 8px; transition: width 0.3s; }
.storage-info { font-size: 12px; color: var(--color-star-sub); }

/* 登录弹窗 */
#auth-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 10000; align-items: center; justify-content: center; }
#auth-modal.show { display: flex; }
.auth-box { background: #fff; border-radius: 12px; width: 400px; max-width: calc(100vw - 32px); padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.auth-close { float: right; background: none; border: none; font-size: 20px; color: var(--color-text-faint); cursor: pointer; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid var(--color-border-light); }
.auth-tab { flex: 1; text-align: center; padding: 10px 0; font-size: 14px; cursor: pointer; color: var(--color-star-sub); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.auth-tab.active { color: var(--color-dark); font-weight: 700; border-bottom-color: #4a6cf7; }
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-form-group { margin-bottom: 12px; }
.auth-form-group input { width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 14px; outline: none; }
.auth-form-group input:focus { border-color: #4a6cf7; }
.auth-code-row { display: flex; gap: 8px; }
.auth-code-row input { flex: 1; }
.auth-btn-code { white-space: nowrap; padding: 8px 12px; border: 1px solid #4a6cf7; border-radius: 6px; background: #fff; color: #4a6cf7; font-size: 12px; cursor: pointer; }
.auth-btn-submit { width: 100%; padding: 10px; border: none; border-radius: 6px; background: #4a6cf7; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.auth-divider { text-align: center; color: var(--color-text-faint); margin: 12px 0; font-size: 12px; }
.auth-btn-wechat { width: 100%; padding: 10px; border: 1px solid var(--color-border-light); border-radius: 6px; background: var(--color-subtle); font-size: 12px; color: var(--color-star-sub); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth-sub-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.auth-sub-tab { padding: 4px 12px; border: 1px solid var(--color-border); border-radius: 4px; background: #fff; font-size: 12px; color: var(--color-star-sub); cursor: pointer; }
.auth-sub-tab.active { background: #4a6cf7; color: #fff; border-color: #4a6cf7; }

/* 日历模块（四柱反查） */
.calendar-module {
    background: #fff; border-radius: 8px; padding: 20px;
    display: flex; flex-direction: column; gap: 12px;
    min-width: 280px; max-width: 480px; margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.calendar-header {
    display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
    padding: 0 4px;
}
.calendar-header input {
    width: 46px; padding: 7px 4px; text-align: center;
    border: 1px solid var(--color-border); border-radius: 6px; font-size: 15px;
}
.calendar-header .btn-turn {
    padding: 7px 14px; background: var(--color-gold); color: #fff;
    border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.calendar-header .btn-turn:hover { background: #c9a029; }

.calendar-nav {
    display: flex; justify-content: center; align-items: center; gap: 3px; margin-bottom: 4px;
}
.calendar-nav button {
    padding: 2px 6px; font-size: 11px; border: 1px solid var(--color-border);
    border-radius: 3px; background: #fff; cursor: pointer; color: var(--color-text-sec);
    font-family: "MiSans", sans-serif; transition: all .15s;
}
.calendar-nav button:hover { background: #e8e0d0; border-color: var(--color-gold); }
.calendar-nav .btn-today {
    width: 20px; height: 20px;
    border: 1.5px solid var(--color-fire); border-radius: 50%;
    background: transparent; color: var(--color-fire);
    font-size: 10px; padding: 0; line-height: 1;
}
.calendar-nav .btn-today:hover { background: var(--color-fire); color: #fff; }

.calendar-week {
    display: grid; grid-template-columns: repeat(7, 1fr);
    text-align: center; font-weight: 600; color: var(--color-text); font-size: 11px;
    padding-bottom: 6px; border-bottom: 1px solid var(--color-border-light);
}
.calendar-week span.today { color: var(--color-gold); }

.calendar-days {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 4px; text-align: center;
}
.calendar-days .day-item {
    padding: 4px 2px; border-radius: 4px; font-size: 11px;
    cursor: pointer; transition: all 0.2s ease;
}
.calendar-days .day-item:hover { background: #f0e8d0; }
.calendar-days .day-item .lunar { font-size: 8px; color: var(--color-text-muted); display: block; margin-top: 1px; }
.calendar-days .day-item .cal-ganzhi { font-size: 7px; color: #0074E5; display: block; margin-top: 0; }
.calendar-days .day-item.active { background: var(--color-gold); color: #fff; }
.calendar-days .day-item.active .lunar,
.calendar-days .day-item.active .cal-ganzhi { color: rgba(255,255,255,0.8); }
.calendar-days .day-item .lunar.jieqi { color: var(--color-fire); font-weight: 600; }

.calendar-date-info {
    text-align: center; padding: 6px 0;
    border-top: 1px solid var(--color-border-light); border-bottom: 1px solid var(--color-border-light);
}
.calendar-date-info .solar-date { font-size: 13px; font-weight: 400; color: var(--color-text); margin-bottom: 2px; }
.calendar-date-info .lunar-date { font-size: 11px; font-weight: 300; color: var(--color-text-sec); }

.calendar-bazi-info { font-size: 11px; font-weight: 300; color: var(--color-text); text-align: center; }
.calendar-jieqi-info { font-size: 11px; color: var(--color-fire); text-align: center; margin-top: 4px; line-height: 1.7; }

.calendar-reverse {
    display: flex; align-items: center; gap: 6px; margin-top: 6px;
    flex-wrap: wrap; justify-content: center;
}
.calendar-reverse input {
    width: 48px; padding: 6px 4px; text-align: center;
    border: 1px solid var(--color-border); border-radius: 4px; font-size: 14px;
}
.calendar-reverse .btn-reverse {
    padding: 7px 16px; background: var(--color-dark); color: #fff;
    border: none; border-radius: 4px; cursor: pointer;
    font-size: 14px; font-weight: 600; white-space: nowrap;
}
.calendar-reverse .btn-reverse:hover { opacity: 0.85; }
.calendar-reverse .btn-reverse:disabled { opacity: 0.5; cursor: not-allowed; }

/* 四柱反查布局 */
.reverse-layout { display: flex; gap: 16px; flex-wrap: wrap; }
.reverse-calendar { flex: 2; min-width: 300px; }
.reverse-instructions { flex: 1; min-width: 200px; background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); font-size: 13px; color: var(--color-text-sec); line-height: 1.9; }
.reverse-instructions h4 { margin: 0 0 10px; color: var(--color-dark); font-size: 15px; }
.reverse-instructions ol { padding-left: 18px; margin: 0; }
.rev-note { margin: 8px 0 0; font-size: 11px; color: var(--color-text-faint); line-height: 1.8; }
.text-gold { color: var(--color-gold); }
.text-dark { color: var(--color-dark); }

/* 名人命例 */
.celeb-notice { font-size: 11px; color: var(--color-text-muted); margin: 0 0 8px; line-height: 1.6; }
.btn-back-cats { width: auto; padding: 6px 16px; font-size: 12px; display: none; }

/* 云存储 */
.storage-card { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 1px 6px rgba(0,0,0,0.05); }
.storage-card h3 { font-size: 16px; font-weight: 700; color: var(--color-dark); margin-bottom: 12px; }
.storage-desc { font-size: 13px; color: var(--color-star-sub); margin-bottom: 16px; }
.storage-limit { float: right; }
.storage-info-vip { margin-top: 8px; }
.link-vip { color: #4a6cf7; cursor: pointer; }

/* 工具栏辅助 */
.cursor-pointer { cursor: pointer; }
#paipanHint { font-size: 12px; color: var(--color-text-faint); margin-bottom: 4px; }
#treeToolbar { display: none; padding: 3px 0 5px; border-bottom: 1px solid var(--color-border-light); margin-bottom: 4px; }
.tb-row { display: flex; gap: 4px; margin-bottom: 3px; }
.tb-row-last { margin-top: 3px; }
.tb-flex-1 { flex: 1; }
.tb-mark-self { color: #4a6cf7; border-color: #c8d6f8; }
#importFile { display: none; }
#reverseMsg { font-size: 11px; color: #c53030; padding: 3px 2px 0; display: none; line-height: 1.4; }

/* 按钮颜色变体 */
.btn-reverse-ziwei { background: #6b4c9a; }
.btn-reverse-bazi { background: #1b5594; }

/* 弹窗辅助 */
.report-loading { text-align: center; padding: 40px; color: var(--color-text-muted); }
.sort-dialog { max-width: 420px; }
.sort-title { margin: 0 0 12px; font-size: 16px; }
.sort-save-btn { margin-top: 12px; }
#sortList { max-height: 400px; overflow-y: auto; }
.search-title { margin: 0 0 16px; font-size: 18px; color: var(--color-dark); }
.search-field-row { margin: 12px 0; }
.search-input { width: 100%; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 6px; font-size: 14px; }
.search-bazi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.search-bazi-label { font-size: 12px; color: var(--color-star-sub); }
.search-bazi-input { width: 100%; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 4px; font-size: 13px; }
.search-ziwei-panel { margin: 12px 0; max-height: 460px; overflow-y: auto; }
#searchResults { margin-top: 12px; }

/* ══════════════════════════════════════════════════
   暗色模式覆盖
   ══════════════════════════════════════════════════ */

/* 面板/卡片背景 */
html[data-theme="dark"] .user-card,
html[data-theme="dark"] .paipan-panel,
html[data-theme="dark"] .tab-bar,
html[data-theme="dark"] .paipan-popup-box,
html[data-theme="dark"] .report-popup-box,
html[data-theme="dark"] .tree-context-menu,
html[data-theme="dark"] .move-menu,
html[data-theme="dark"] .search-dialog,
html[data-theme="dark"] .tree-dialog-box,
html[data-theme="dark"] .auth-box,
html[data-theme="dark"] .storage-card,
html[data-theme="dark"] .reverse-instructions,
html[data-theme="dark"] .calendar-module { background: var(--color-panel); }

/* 树形切换按钮 / 工具栏按钮 / 排序按钮 */
html[data-theme="dark"] .tree-toggle,
html[data-theme="dark"] .tree-toggle.empty:hover,
html[data-theme="dark"] .tb-btn,
html[data-theme="dark"] .tree-sort-btn,
html[data-theme="dark"] .search-tag,
html[data-theme="dark"] .auth-sub-tab,
html[data-theme="dark"] .calendar-nav button,
html[data-theme="dark"] .report-popup-foot button { background: var(--color-subtle); color: var(--color-text-sec); border-color: var(--color-border); }

html[data-theme="dark"] .tree-toggle:hover { background: var(--color-border-light); }

/* 输入框 */
html[data-theme="dark"] .auth-form-group input,
html[data-theme="dark"] .calendar-header input,
html[data-theme="dark"] .calendar-reverse input,
html[data-theme="dark"] .calendar-reverse .btn-reverse { background: #6e6290; }
html[data-theme="dark"] .btn-reverse-ziwei { background: #8b6fc0; }
html[data-theme="dark"] .btn-reverse-bazi  { background: #4a7ab5; }
html[data-theme="dark"] .search-input,
html[data-theme="dark"] .search-bazi-input { background: var(--color-input-bg); color: var(--color-text); border-color: var(--color-input-border); }

html[data-theme="dark"] .auth-form-group input:focus { border-color: var(--color-brand); }
html[data-theme="dark"] ::placeholder { color: #fff; opacity: 1; }

/* 发送验证码按钮 */
html[data-theme="dark"] .auth-btn-code { background: var(--color-subtle); color: var(--color-brand); border-color: var(--color-brand); }

/* 品牌蓝色 → 品牌色变量 */
html[data-theme="dark"] .search-tab.active { border-bottom-color: var(--color-brand); }
html[data-theme="dark"] .auth-tab.active { border-bottom-color: var(--color-brand); }
html[data-theme="dark"] .auth-btn-submit { background: var(--color-brand); }
html[data-theme="dark"] .auth-sub-tab.active { background: var(--color-brand); color: #fff; border-color: var(--color-brand); }
html[data-theme="dark"] .search-tag:hover { border-color: var(--color-brand); color: var(--color-brand); }
html[data-theme="dark"] .search-tag.selected { background: var(--color-brand); border-color: var(--color-brand); }
html[data-theme="dark"] .storage-bar .used { background: linear-gradient(90deg, var(--color-brand), #48bb78); }
html[data-theme="dark"] .link-vip { color: var(--color-brand); }
html[data-theme="dark"] .tree-self-badge { color: var(--color-brand); }
html[data-theme="dark"] .tb-mark-self { color: var(--color-brand); border-color: var(--color-border-light); }
html[data-theme="dark"] .tree-chk,
html[data-theme="dark"] .tree-chk-folder { accent-color: var(--color-brand); }

/* report-body 内容区 */
html[data-theme="dark"] .report-body h3 { color: var(--color-text); border-bottom-color: var(--color-border); }
html[data-theme="dark"] .report-body h5 { border-left-color: var(--color-border); }
html[data-theme="dark"] .report-body th { background: var(--color-subtle); color: var(--color-text-sec); }
html[data-theme="dark"] .report-body h4.c2,
html[data-theme="dark"] .report-body h4.c3,
html[data-theme="dark"] .report-body h4.c4,
html[data-theme="dark"] .report-body h4.c6 { background: var(--color-subtle); border-color: var(--color-border); }
html[data-theme="dark"] .report-body h4.c1,
html[data-theme="dark"] .report-body h4.c5 { background: var(--color-subtle); border-color: var(--color-border); }

/* 分隔线 */
html[data-theme="dark"] .tree-sort-item { border-bottom-color: var(--color-border-light); }
html[data-theme="dark"] .move-menu-item { border-bottom-color: var(--color-border-light); }

/* ── 塔罗牌历史卡牌列表 ── */
.taluo-card-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.taluo-card-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--color-subtle); border-radius: 6px; font-size: 13px; }
.taluo-pos { width: 20px; height: 20px; border-radius: 50%; background: var(--color-brand); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.taluo-name { flex: 1; color: var(--color-text); }
.taluo-upright { font-size: 11px; color: var(--color-star); }
.taluo-rev { font-size: 11px; color: var(--color-fire); }
