/* ==========================================================================
   主题：宋式美学（Song Style）· 移动端
   色板：朱红 · 黛绿 · 墨黑 · 泥金 · 缃白（宣纸）
   --------------------------------------------------------------------------
   本文件只负责「皮肤」：颜色 tokens、字体、线条、纹理与公共组件外观。
   布局骨架在 assets/css/base.css；登录/后台/资料等页面结构也在 assets/css。
   切换主题时由 ThemeManager 换 body class 与本文件，不复制布局代码。
   ========================================================================== */

:root {
    /* ---------- 五正色 ---------- */
    --red: #8c2321;             /* 朱砂 */
    --red-deep: #6b1a18;        /* 朱深 */
    --red-light: #a8433f;       /* 朱浅 */
    --red-strong: #9c2b28;      /* 按钮渐变亮端 */
    --red-darker: #741c1a;      /* 按钮渐变暗端 */
    --red-earth: #a0392c;       /* 砖红（资料/表单） */
    --red-wine: #7a1e19;        /* 酒红（深色边线） */
    --red-pale: #f0b8b2;        /* 浅朱（弱提示） */
    --green: #3d5234;           /* 黛绿 */
    --green-deep: #2b3a25;      /* 黛深 */
    --green-deep-2: #2a5a25;    /* 深叶绿 */
    --green-bright: #3a7a35;    /* 亮叶绿 */
    /* ---------- 五行（四柱干支用色） ---------- */
    --element-wood: #3f7d4a;    /* 木 */
    --element-fire: #b43b30;    /* 火 */
    --element-earth: #a5762e;   /* 土 */
    --element-metal: #7c756a;   /* 金 */
    --element-water: #2f5f9a;   /* 水 */
    /* ---------- 性别 / 本尊标签 ---------- */
    --gender-male-text: #3f5f7a;    /* 男：黛青 */
    --gender-male-bg: #edf3f7;
    --gender-male-border: #c3d3df;
    --gender-female-text: #a8433f;  /* 女：朱浅 */
    --gender-female-bg: #f9ece9;
    --gender-female-border: #e4c2bb;
    --zun-badge-text: #fff8e8;      /* 本尊：金 */
    --zun-badge-bg: #b08d4f;
    --zun-row-tint: rgba(176,141,79,0.055);
    --pillar-male-bg: rgba(63,95,122,0.08);
    --pillar-male-border: rgba(63,95,122,0.16);
    --pillar-female-bg: rgba(168,67,63,0.08);
    --pillar-female-border: rgba(168,67,63,0.16);
    /* ---------- 记录库：软删除 / 分组 ---------- */
    --record-deleted-text: #8f8172;
    --record-deleted-bg: rgba(120,105,86,0.06);
    --record-deleted-border: rgba(120,105,86,0.26);
    --record-deleted-badge-bg: #8f8172;
    --record-deleted-badge-text: #fff9ef;
    --record-group-bg: rgba(176,141,79,0.045);
    --record-group-line: rgba(176,141,79,0.18);
    --ink: #1a1915;             /* 墨 */
    --ink-2: #2e2c26;
    --ink-3: #4a463c;
    --gold: #b08d4f;            /* 泥金 */
    --gold-light: #d4b878;
    --gold-pale: #ede0c4;
    --gold-soft: #f5e3b4;
    --gold-sand: #e8d9a8;
    --gold-deep: #8b6820;
    --paper: #f3ede0;           /* 缃白（宣纸） */
    --paper-2: #ebe3d2;
    --paper-3: #e0d6c0;
    --paper-warm: #f8f2e4;
    --paper-warm-2: #f6ecd8;
    --paper-page: #fbf7ec;
    --paper-deep: #e8e0d0;
    --paper-bright: #fffdf8;
    --line-warm: #e0d4bc;

    /* ---------- 文字 ---------- */
    --text: #221f19;
    --text-2: #5b5445;
    --text-3: #8b8270;
    --text-brown: #4a3a2a;
    --text-deep: #3a2e1e;
    --text-muted: #7d7462;
    --text-soft: #7d7462;
    --text-khaki: #6b5d48;
    --ink-warm: #2c241b;
    --green-ink: #5a7a5a;
    --text-invert: #f3ede0;

    /* ---------- 辅助文字 / 状态 ---------- */
    --text-ink-soft: #666;
    --text-warm: #5a4a3a;
    --text-warm-2: #8a7d68;
    --text-olive: #6b6455;
    --text-brown-2: #5a4d3a;
    --text-brown-3: #4a3f30;
    --gray-8a: #8a8070;
    --red-alert: #b03a3a;
    --red-grad-strong: #a3241f;
    --red-grad-darker: #7d1a16;
    --red-soft: #f8d0cb;
    --gold-strong: #a05a10;
    --green-soft: #b6d0a8;
    --green-pale: #f0f5e8;
    --green-deep-3: #2b4a28;
    --green-strong: #2d6a28;
    --green-deep-4: #1f3d1a;
    --green-mid: #4f6b4a;
    --green-light: #7a9a76;
    --green-ink-2: #6c8b68;
    --green-dark: #24421f;
    --red-wash: #f7e9e7;
    --red-deep-2: #a83a32;
    --red-mid: #b0453d;
    --red-earth-2: #8e4038;
    --red-brown: #a8764a;
    --gold-deep-2: #a8873a;
    --gold-2: #b8a04c;
    --gold-4: #c2a349;
    --ink-blue: #43556b;
    --ink-gray: #3a352c;
    --ink-4: #14120e;
    --metal: #8b949b;
    --purple: #b08a9e;
    --paper-warm-3: #f9f6ec;
    --paper-2b: #e9e4da;
    --paper-3b: #fffbf2;
    --paper-grad-1: #fdfaf2;
    --paper-grad-2: #f7f1e4;
    --paper-grad-3: #f2ebdc;
    --ink-deep: #2a2620;
    --text-2b: #2a2721;
    --gray-2: #8a7c5c;
    --gray-3: #7d9a8c;
    --text-khaki-2: #6b5f44;
    --text-gray-2: #7a7160;
    --paper-warm-4: #f2ede1;
    --paper-warm-5: #f7f2e0;
    --paper-warm-6: #f5ece2;
    --paper-cool: #e8efec;
    --paper-cool-2: #e7ebef;
    --paper-cool-3: #eef1f3;
    --paper-bright-2: #faf8f2;
    --paper-bright-3: #fdfbf5;
    --gold-ink: #4a3a12;
    --gold-5: #c2ac6a;
    --gold-pale-2: #ebe0c4;
    --gold-deep-3: #6d4f14;
    --gold-sand-2: #e8d7a8;
    --red-wine-2: #7d1f19;
    --red-7: #a82c24;
    --red-earth-3: #8e3029;
    --green-pale-2: #e4eee0;
    --green-pale-3: #eaf0e8;
    --green-gray: #4f6b5e;
    --ink-blue-2: #5a6a80;
    --purple-pale: #f5ebef;

    /* ---------- 字体 ---------- */
    /* 自托管思源宋体（font.php 内嵌 base64），放在最前面优先使用 */
    --font-serif: "NotoSerifSC", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", "宋体", serif;
    --font-kai: "LXGWBright", "Kaiti SC", "STKaiti", "KaiTi", "楷体", "NotoSerifSC", "Songti SC", serif;

    /* ---------- 线条 / 阴影 ---------- */
    --hairline: rgba(34, 31, 25, 0.12);
    --hairline-strong: rgba(34, 31, 25, 0.24);
    --radius: 3px;
    --radius-sm: 2px;
    --shadow-sm: 0 1px 2px rgba(26, 25, 21, 0.05);
    --shadow: 0 1px 3px rgba(26, 25, 21, 0.06), 0 6px 14px rgba(26, 25, 21, 0.05);
    --mask: rgba(26, 25, 21, 0.52);

    /* ---------- 宣纸纹理（手机像素密度高，纹理更淡） ---------- */
    --paper-texture:
        repeating-linear-gradient(90deg, rgba(176, 141, 79, 0.032) 0 1px, transparent 1px 6px),
        repeating-linear-gradient(0deg, rgba(140, 35, 33, 0.018) 0 1px, transparent 1px 8px);

    /* ---------- 五行配色（干支吊牌/五行字用） ---------- */
    --wx-mu: #3a9a43;        /* 木·参考色 */
    --wx-huo: #c20e0d;       /* 火·参考色 */
    --wx-tu: #886c0f;        /* 土·参考色 */
    --wx-jin: #e89210;       /* 金·参考色 */
    --wx-shui: #3582ea;      /* 水·参考色 */
    /* 吊牌背景（浅色调） */
    --wx-mu-bg: #eef4ea;  --wx-mu-bg2: #dbe9d6;
    --wx-huo-bg: #fbeeee; --wx-huo-bg2: #f4dada;
    --wx-tu-bg: #f7f1e4;  --wx-tu-bg2: #ece0c6;
    --wx-jin-bg: #fafbfc; --wx-jin-bg2: #eceef0;
    --wx-shui-bg: #e3edf6; --wx-shui-bg2: #c8dcee;
}

/* ==========================================================================
   1. 页面底色
   ========================================================================== */
body.theme-song {
    background-color: var(--paper);
    background-image: var(--paper-texture);
    color: var(--text);
    font-family: var(--font-serif);
}

/* ==========================================================================
   2. 顶栏：墨底 + 一线泥金 + 底部朱霞
   ========================================================================== */
.topbar {
    background: linear-gradient(180deg, #221f19 0%, #1a1915 100%);
    color: var(--text-invert);
    border-bottom: 1px solid var(--gold);
    box-shadow: 0 1px 0 rgba(176, 141, 79, 0.28), 0 6px 16px rgba(26, 25, 21, 0.20);
}

.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(140, 35, 33, 0.5) 98%,
        rgba(140, 35, 33, 0.5) 98%,
        transparent 100%);
    pointer-events: none;
}

.brand-name {
    color: var(--gold-pale);
    font-family: var(--font-kai);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.brand-sub {
    color: rgba(243, 237, 224, 0.5);
}

.brand-seal {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.icon-btn {
    color: var(--gold-pale);
    border: 0;
    background: transparent;
    font-family: var(--font-serif);
}

.icon-btn:active {
    background: transparent;
    opacity: 0.55;
}

.gold-rule {
    background: linear-gradient(90deg, transparent, var(--gold) 10%, var(--gold) 90%, transparent);
    opacity: 0.5;
}

/* ==========================================================================
   3. 顶栏内用户信息 + 修为条
   ========================================================================== */
.mini-user {
    color: var(--gold-pale);
    border: 0;
    background: transparent;
}

.mini-user:active {
    background: transparent;
    opacity: 0.55;
}

.mini-seal {
    background: transparent;
    color: var(--gold-pale);
    font-family: var(--font-serif);
    box-shadow: none;
}

.mini-name {
    color: var(--gold-pale);
    font-family: var(--font-serif);
}

.topbar-meta {
    color: rgba(243, 237, 224, 0.5);
    font-family: var(--font-kai);
}

.meta-label {
    color: rgba(243, 237, 224, 0.4);
}

.topbar-meta .progress-track {
    background: rgba(243, 237, 224, 0.14);
}

.topbar-meta .progress-fill {
    background: linear-gradient(90deg, var(--gold), var(--red-light));
}

.progress-value {
    color: var(--gold-light);
    font-family: var(--font-kai);
}

.ganzhi-mini {
    color: rgba(212, 184, 120, 0.85);
}

/* 抽屉内进度条（备用） */
.progress-track {
    background: var(--paper-3);
}

.progress-fill {
    background: linear-gradient(90deg, var(--red-deep), var(--red) 50%, var(--red-light));
}

/* ==========================================================================
   3.5 今日黄历大栏：一方朱底金字的日历
   ========================================================================== */
.almanac {
    background:
        linear-gradient(160deg, rgba(140, 35, 33, 0.06), rgba(140, 35, 33, 0) 46%),
        rgba(255, 252, 245, 0.86);
    border: 1px solid var(--hairline-strong);
    border-top: 2px solid var(--red);
    box-shadow: var(--shadow-sm);
}

/* 原右上角装饰圆圈已移除：与时钟重叠，且用户不需要 */

.al-day {
    color: var(--red);
    font-family: var(--font-serif);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.al-month {
    color: var(--ink-3);
    font-family: var(--font-kai);
}

.al-lunar {
    color: var(--text-2);
    font-family: var(--font-kai);
}

.demo-tag.is-live {
    color: var(--green);
    border-color: rgba(61, 82, 52, 0.45);
}

.demo-tag {
    color: var(--gold);
    border: 1px solid rgba(176, 141, 79, 0.45);
    font-family: var(--font-kai);
}

.gz-item {
    color: var(--ink);
    background: rgba(140, 35, 33, 0.05);
    border: 1px solid rgba(140, 35, 33, 0.16);
    font-family: var(--font-serif);
}

.gz-label {
    color: var(--red);
}

.gz-zodiac {
    color: var(--green);
    background: rgba(61, 82, 52, 0.07);
    border: 1px solid rgba(61, 82, 52, 0.22);
    font-family: var(--font-kai);
}

.yj-mark {
    color: var(--gold-pale);
    font-family: var(--font-serif);
}

.yj-mark.yi {
    background: var(--green);
}

.yj-mark.ji {
    background: var(--red);
}

.yj-text {
    color: var(--text-2);
    font-family: var(--font-kai);
    letter-spacing: 0.03em;
}

.god-grid {
    background: rgba(140, 35, 33, 0.22);
    border: 1px solid rgba(140, 35, 33, 0.18);
}

.god-item {
    background: rgba(255, 252, 245, 0.94);
    color: var(--text);
    font-family: var(--font-kai);
}

.god-name {
    color: var(--red);
}

.god-val {
    color: var(--ink);
    font-weight: 500;
}

.compass {
    color: var(--gold);
    border-color: rgba(176, 141, 79, 0.55);
    background: rgba(176, 141, 79, 0.07);
}

.needle {
    border-bottom-color: var(--red);
}

/* ==========================================================================
   4. 功能模块：三列书笺
   ========================================================================== */
.block-title {
    color: var(--ink);
    font-family: var(--font-serif);
}

.block-title::before {
    content: "";
    display: inline-block;
    width: 2px;
    height: 0.95em;
    margin-right: 6px;
    vertical-align: -0.1em;
    background: var(--red);
}

.block-sub {
    color: var(--text-3);
    font-family: var(--font-kai);
}

.module-card {
    background: rgba(255, 252, 245, 0.78);
    border: 1px solid var(--hairline-strong);
    box-shadow: var(--shadow-sm);
}

/* 顶部书口一线朱 */
.module-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: linear-gradient(90deg, var(--red) 0%, rgba(140, 35, 33, 0.15) 70%, transparent 100%);
    opacity: 0.75;
}

/* 右下泥金折角 */
.module-card::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 9px;
    height: 9px;
    border-right: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    opacity: 0.55;
    pointer-events: none;
}

.module-icon {
    color: var(--red);
    border: 1px solid rgba(140, 35, 33, 0.28);
    font-family: var(--font-serif);
    background: rgba(140, 35, 33, 0.03);
}

.module-name {
    color: var(--ink);
    font-family: var(--font-serif);
}

/* 浅色术语衬底 */
.module-terms {
    color: rgba(74, 70, 60, 0.34);
    font-family: var(--font-kai);
    letter-spacing: 0.02em;
}

.module-card.is-on .module-terms span:nth-child(odd) {
    color: rgba(140, 35, 33, 0.30);
}

.module-card.is-on .module-terms span:nth-child(3n) {
    color: rgba(61, 82, 52, 0.30);
}

/* 未开放：虚线边框 */
.module-card.is-off {
    border-style: dashed;
}

.module-card.is-off::before {
    background: linear-gradient(90deg, var(--text-3) 0%, transparent 70%);
    opacity: 0.35;
}

/* ==========================================================================
   6. 按钮
   ========================================================================== */
.btn {
    font-family: var(--font-serif);
    letter-spacing: 0.08em;
}

.btn-ink {
    background: var(--ink-2);
    border-color: var(--ink);
    color: var(--gold-pale);
}

.btn-cinnabar {
    background: var(--red);
    border-color: var(--red-deep);
    color: var(--gold-pale);
    box-shadow: inset 0 0 0 1px rgba(243, 237, 224, 0.16);
}

.btn-cinnabar:active {
    background: var(--red-deep);
}

.btn-jade {
    background: transparent;
    border-color: rgba(61, 82, 52, 0.45);
    color: var(--green);
}

.btn-ghost {
    background: transparent;
    border-color: var(--hairline-strong);
    color: var(--text-2);
}

/* ==========================================================================
   8. 底部抽屉
   ========================================================================== */
.sheet {
    background: var(--paper);
    background-image: var(--paper-texture);
    border-top: 2px solid var(--red);
    box-shadow: 0 -6px 24px rgba(26, 25, 21, 0.22);
}

.sheet-handle {
    background: var(--gold);
    opacity: 0.55;
}

.sheet-header {
    border-bottom: 1px solid var(--hairline);
}

.sheet-title {
    color: var(--ink);
    font-family: var(--font-serif);
}

.sheet-close {
    color: var(--text-3);
}

.sheet-footer {
    border-top: 1px solid var(--hairline);
}

/* ==========================================================================
   9. 表单
   ========================================================================== */
.form-label {
    color: var(--text-2);
    font-family: var(--font-kai);
}

.form-control {
    background: rgba(255, 253, 247, 0.9);
    border: 1px solid var(--hairline-strong);
    color: var(--text);
    font-family: var(--font-serif);
}

.form-control:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(140, 35, 33, 0.09);
}

.form-hint {
    color: var(--text-3);
    font-family: var(--font-kai);
}

.form-error {
    color: var(--red);
    font-family: var(--font-kai);
}

/* ==========================================================================
   10. 风格选择
   ========================================================================== */
.style-option {
    border-color: var(--hairline);
    background: rgba(255, 252, 245, 0.6);
}

.style-option.is-active {
    border-color: var(--red);
    background: rgba(140, 35, 33, 0.045);
    box-shadow: inset 0 0 0 1px rgba(140, 35, 33, 0.65);
}

.style-name {
    color: var(--ink);
    font-family: var(--font-serif);
    letter-spacing: 0.08em;
}

.style-option.is-active .style-name {
    color: var(--red);
}

.style-desc {
    color: var(--text-3);
    font-family: var(--font-kai);
}

.style-status {
    color: var(--gold);
    font-family: var(--font-kai);
}

.style-option.is-active .style-status {
    color: var(--red);
}

/* ==========================================================================
   11. 提示条
   ========================================================================== */
.toast-success { background: var(--green); color: var(--gold-pale); }
.toast-error { background: var(--red); color: var(--gold-pale); }
.toast-info { background: var(--ink-2); color: var(--gold-pale); }

/* ==========================================================================
   12. 页脚
   ========================================================================== */
.site-footer {
    background: transparent;
    color: var(--text-3);
    font-family: var(--font-kai);
    border-top: 1px solid var(--hairline);
}

.site-footer .footer-gold {
    color: var(--gold);
}

/* 农历大小月标记 */
.lunar-size {
    display: inline-block;
    font-size: 11px;
    line-height: 1.4;
    padding: 0 3px;
    margin-right: 4px;
    border-radius: 2px;
    vertical-align: 1px;
    letter-spacing: 0;
    font-family: var(--font-kai);
}

.lunar-size.is-da {
    color: var(--red);
    border: 1px solid rgba(140, 35, 33, 0.4);
    background: rgba(140, 35, 33, 0.05);
}

.lunar-size.is-xiao {
    color: var(--green);
    border: 1px solid rgba(61, 82, 52, 0.4);
    background: rgba(61, 82, 52, 0.05);
}
/* ==========================================================================
   节气对称表：本节 / 下节
   ========================================================================== */
/* 节气三列 */
.jieqi-row {
    background: transparent;
    border: 1px solid rgba(140, 35, 33, .3);
    border-radius: 3px;
}

.jieqi-col {
    background: transparent;
    font-family: var(--font-kai);
    border-left: 1px solid rgba(140, 35, 33, .2);
}

.jieqi-col:first-child {
    border-left: none;
}

.jieqi-col__tag {
    background: rgba(74, 70, 60, 0.10);
    color: var(--text-3);
    border: 1px solid rgba(74, 70, 60, 0.20);
}

.jieqi-col.is-now {
    background: transparent;
}

.jieqi-col.is-now .jieqi-col__tag {
    background: var(--red);
    color: var(--gold-pale);
    border-color: var(--red);
}

.jieqi-col.is-next .jieqi-col__tag {
    background: rgba(61, 82, 52, 0.12);
    color: var(--green);
    border-color: rgba(61, 82, 52, 0.30);
}

.jieqi-col__name {
    color: var(--text-3);
    font-family: var(--font-serif);
}

.jieqi-col.is-now .jieqi-col__name {
    color: var(--red);
    font-size: 14px;
}

.jieqi-col.is-next .jieqi-col__name {
    color: var(--green);
}

.jieqi-col__time {
    color: var(--text-2);
}

.jieqi-col__days {
    color: var(--text-3);
}
.gz-tag__nayin {
    color: var(--text-2);
}

.gz-tag__pillarlb {
    color: var(--text-3);
}

.xiu-name,
.xiu-lucky {
    color: var(--text-3);
}

.jieqi-tag.is-prev {
    background: rgba(74, 70, 60, 0.08);
    color: var(--text-3);
    border: 1px solid rgba(74, 70, 60, 0.22);
}

.jieqi-line:first-child .jieqi-name {
    color: var(--text-3);
    font-weight: 400;
}

/* 年度进度三列 */
.year-info {
    background: rgba(140, 35, 33, 0.14);
    border: 1px solid rgba(140, 35, 33, 0.12);
}

.year-info__item {
    background: rgba(255, 252, 245, 0.95);
    font-family: var(--font-kai);
}

.year-info__label {
    color: var(--text-3);
}

.year-info__value {
    color: var(--red);
}

.year-info__sub {
    color: var(--text-3);
}

/* 年度信息三格 */
.year-cells {
    background: rgba(140, 35, 33, 0.14);
    border: 1px solid rgba(140, 35, 33, 0.12);
}

.year-cell {
    background: rgba(255, 252, 245, 0.95);
    font-family: var(--font-kai);
    border-left-color: rgba(140, 35, 33, 0.14);
}

.year-cell__label {
    color: var(--text-3);
}

.year-cell__value {
    color: var(--red);
}

.year-cell__sub {
    color: var(--text-3);
}
/* ==========================================================================
   择日模块（zeri/）
   ========================================================================== */

/* 日期条 */
.cal-header {
    background: rgba(255, 252, 245, 0.95);
    border: 1px solid var(--hairline-strong);
    border-top: 2px solid var(--red);
}

.cal-nav {
    color: var(--red);
    border: 1px solid rgba(140, 35, 33, 0.25);
}

.cal-title__main {
    color: var(--ink);
}

.cal-title__sub {
    color: var(--text-3);
}

.cal-actions__hint {
    color: var(--text-3);
}

/* 月历 */
.cal-grid {
    background: rgba(140, 35, 33, 0.14);
    border: 1px solid rgba(140, 35, 33, 0.12);
}

.cal-weekday {
    background: rgba(255, 252, 245, 0.96);
    color: var(--text-2);
}

.cal-weekday.is-weekend {
    color: var(--red);
}

.cal-cell {
    background: rgba(255, 252, 245, 0.96);
    color: var(--text);
}

.cal-cell.is-empty {
    background: rgba(250, 246, 238, 0.6);
}

.cal-cell__day {
    color: var(--ink);
}

.cal-cell.is-weekend .cal-cell__day {
    color: var(--red);
}

.cal-cell__lunar {
    color: var(--text-2);
}

.cal-cell__gz {
    color: var(--text-3);
}

.cal-cell__term {
    background: var(--red);
    color: var(--gold-pale);
}

.cal-cell__fest {
    background: rgba(61, 82, 52, 0.14);
    color: var(--green);
}

.cal-cell.is-today {
    background: rgba(253, 247, 242, 0.99);
}

.cal-cell.is-selected {
    background: rgba(140, 35, 33, 0.12);
}

/* 当日详情 */
.cal-day-lunar {
    color: var(--red);
}

.cal-day-solar {
    color: var(--text-2);
}

.cal-day-meta {
    color: var(--text-3);
}

.topbar-info {
    color: rgba(243, 237, 224, 0.55);
}

.day-pillar {
    background: rgba(255, 252, 245, 0.95);
    border: 1px solid rgba(140, 35, 33, 0.22);
    border-top: 2px solid var(--red);
}

.day-pillar__label {
    color: var(--text-3);
}

.day-pillar__char {
    color: var(--ink);
}

/* 区块 */
.day-block {
    background: rgba(255, 252, 245, 0.92);
    border: 1px solid var(--hairline);
}

.day-block__title {
    color: var(--ink);
}

.day-block__title::before {
    content: "";
    display: inline-block;
    width: 2px;
    height: 0.9em;
    margin-right: 6px;
    vertical-align: -0.05em;
    background: var(--red);
}

.day-block__sub {
    color: var(--text-3);
}

.day-block__note {
    color: var(--text-3);
}

/* 月相（内联） */
.moon-inline__icon {
    color: var(--gold);
}

.moon-inline__name {
    color: var(--ink);
}

.moon-inline__desc {
    color: var(--text-3);
}

.moon-inline__bar {
    background: rgba(34, 31, 25, 0.10);
}

.moon-inline__bar i {
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
/* 信息网格 */
.info-grid,
.shichen,
.jiugong {
    background: rgba(140, 35, 33, 0.12);
    border: 1px solid rgba(140, 35, 33, 0.10);
}

.info-item,
.shichen__item,
.jiugong__cell {
    background: rgba(255, 252, 245, 0.96);
}

.info-item__label,
.shichen__hour,
.jiugong__dir {
    color: var(--text-3);
}

.info-item__value {
    color: var(--text);
}

.shichen__zhi {
    color: var(--ink);
}

.jiugong__val {
    color: var(--text-3);
}

/* 择日事项 */
.event-group__title {
    color: var(--text-3);
}

.event-chip {
    background: rgba(140, 35, 33, 0.06);
    border: 1px solid rgba(140, 35, 33, 0.18);
    color: var(--text-2);
}

.event-chip:active {
    background: rgba(140, 35, 33, 0.14);
    color: var(--red);
}

/* 提示条 */
.zeri-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateX(-50%) translateY(10px);
    z-index: 300;
    padding: 8px 16px;
    border-radius: 999px;
    font-family: var(--font-kai);
    font-size: 12.5px;
    background: var(--ink-2, #2e2c26);
    color: var(--gold-pale);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    white-space: nowrap;
    max-width: 88vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zeri-toast.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
/* 顶栏版块切换 */
.topbar-tabs {
    background: rgba(243, 237, 224, 0.08);
    border: 1px solid rgba(176, 141, 79, 0.28);
}

.topbar-tab {
    color: rgba(243, 237, 224, 0.62);
}

.topbar-tab.is-active {
    background: var(--red);
    color: var(--gold-pale);
}

/* 农历大小月标记 */
.cal-day-lunar em {
    color: var(--green);
    background: rgba(61, 82, 52, 0.10);
    border: 1px solid rgba(61, 82, 52, 0.25);
    font-family: var(--font-kai);
}

/* 九宫补充 */
.jiugong__note {
    color: var(--text-3);
}
/* 距除夕倒计时 */
.eve-count {
    background: rgba(140, 35, 33, 0.06);
    border: 1px solid rgba(140, 35, 33, 0.18);
    font-family: var(--font-kai);
}

.eve-count__label,
.eve-count__date {
    color: var(--text-3);
}

.eve-count__days {
    color: var(--red);
}
/* =============================================================================
 * 登录入口 · 用户菜单
 * ============================================================================= */

/* 未登录：入局按钮 */
.login-entry {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--red);
    background: var(--red);
    color: var(--paper);
    font-family: var(--font-serif);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .16s ease, border-color .16s ease;
}

.login-entry:hover {
    background: var(--red-deep);
    border-color: var(--red-deep);
}

/* 用户菜单 */
.user-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 12px;
    z-index: 60;
    min-width: 152px;
    padding: 6px;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--hairline-strong);
    box-shadow: var(--shadow), 0 10px 30px rgba(26, 25, 21, .16);
    animation: um-in .16s ease;
}

.user-menu[hidden] {
    display: none;
}

@keyframes um-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .user-menu { animation: none; }
}

.user-menu__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px 7px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 4px;
}

.user-menu__name {
    font-family: var(--font-serif);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu__role {
    flex: 0 0 auto;
    font-size: 10px;
    color: var(--text-3);
    letter-spacing: .06em;
}

.user-menu__item {
    display: block;
    padding: 7px 8px;
    border-radius: 2px;
    font-family: var(--font-serif);
    font-size: 12px;
    color: var(--text-2);
    text-decoration: none;
    letter-spacing: .04em;
    transition: background .14s ease, color .14s ease;
}

.user-menu__item:hover {
    background: var(--paper-2);
    color: var(--ink);
}

.user-menu__item--out {
    color: var(--red);
    border-top: 1px solid var(--hairline);
    margin-top: 3px;
    padding-top: 8px;
}

.user-menu__item--out:hover {
    background: rgba(140, 35, 33, .08);
    color: var(--red-deep);
}

/* 顶栏相对定位，供菜单定位 */
.topbar {
    position: relative;
}
/* =============================================================================
 * 顶栏文字按钮（管理员 / 风格 / 道号）
 * ============================================================================= */
.tb-btn {
    color: rgba(243, 237, 224, 0.68);
    font-family: var(--font-serif);
}

.tb-btn:hover {
    color: var(--gold-pale);
}

/* 当前用户：泥金细框 + 朱色微光 */
.tb-user {
    color: var(--gold-pale);
    border-color: rgba(176, 141, 79, 0.55);
    background: rgba(243, 237, 224, 0.05);
    font-family: var(--font-serif);
    box-shadow: 0 0 0 1px rgba(176, 141, 79, 0.12) inset;
}

.tb-user:hover {
    background: rgba(176, 141, 79, 0.14);
    border-color: rgba(212, 184, 120, 0.75);
}

/* 风格标签：与道号同款边框与配色 */
.tb-chip {
    color: var(--gold-pale);
    border-color: rgba(176, 141, 79, 0.55);
    background: rgba(243, 237, 224, 0.05);
    font-family: var(--font-serif);
}

.tb-chip:hover {
    background: rgba(176, 141, 79, 0.14);
    border-color: rgba(212, 184, 120, 0.75);
}
/* 模式摘要：阳历 / 阴历 */
.cal-note--solar {
    background: rgba(61, 82, 52, 0.06);
    border: 1px solid rgba(61, 82, 52, 0.2);
    color: var(--green-deep);
}

.cal-note--solar .cal-note__k {
    background: var(--green);
    color: var(--paper);
}

.cal-note--lunar {
    background: rgba(140, 35, 33, 0.06);
    border: 1px solid rgba(140, 35, 33, 0.22);
    color: var(--red-deep);
}

.cal-note--lunar .cal-note__k {
    background: var(--red);
    color: var(--paper);
}
/* 顶栏体验期标签：泥金细框 + 状态色 */
.tb-trial {
    color: var(--gold-pale);
    border-color: rgba(176, 141, 79, 0.55);
    background: rgba(243, 237, 224, 0.05);
    font-family: var(--font-serif);
}

.tb-trial:hover {
    background: rgba(176, 141, 79, 0.14);
}

/* 剩余 ≤3 天：橙色警示 */
.tb-trial.is-warn {
    color: #e8b060;
    border-color: rgba(232, 176, 96, 0.7);
    background: rgba(232, 176, 96, 0.12);
}

/* 已到期：朱红 */
.tb-trial.is-exp {
    color: #f0908c;
    border-color: rgba(240, 144, 140, 0.7);
    background: rgba(140, 35, 33, 0.2);
    font-weight: 700;
}

/* 未开始：灰 */
.tb-trial.is-wait {
    color: rgba(243, 237, 224, 0.55);
    border-color: rgba(243, 237, 224, 0.3);
    background: transparent;
}

/* =============================================================================
 * 八字模块（bazi/）
 * ============================================================================= */
.bazi-picker {
    background: var(--paper);
    background-image: var(--paper-texture);
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.gz-title {
    color: var(--red);
    font-family: var(--font-serif);
    font-weight: 700;
}

.gz-col-title {
    color: var(--text-2);
    font-family: var(--font-kai);
}

.gz-list-item {
    font-family: var(--font-serif);
    color: var(--text);
    cursor: pointer;
    transition: background .15s ease;
}

.gz-list-item:hover {
    background: var(--paper-2);
}

.gz-list-item.is-active {
    background: var(--red);
    color: var(--gold-pale);
}

#gzPicker {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 20px);
    overflow: hidden;
}

#gzPicker.has-results {
    height: calc(100vh - 20px);
}

#gzPicker > div:not(#gzExtraArea) {
    flex-shrink: 0;
}

#gzExtraArea {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#gzExtraArea::-webkit-scrollbar {
    display: none;
}

.gz-match-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
}

.gz-date-item {
    padding: 1px 0;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    color: var(--text);
    transition: background .15s ease;
}

.gz-date-solar {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.gz-date-label {
    font-size: 10px;
    font-weight: normal;
    opacity: 0.8;
    margin-right: 0;
}

.gz-date-lunar {
    font-size: 10.5px;
    opacity: 0.9;
    color: inherit;
    margin-top: 1px;
    white-space: nowrap;
}

.gz-date-time {
    display: block;
    font-size: 10.5px;
    opacity: 0.8;
    margin-left: 0;
    margin-top: 1px;
    white-space: nowrap;
}

.gz-date-item:hover {
    background: var(--gold-pale);
}

.gz-date-item--selected {
    background: var(--red);
    color: var(--gold-pale);
    border: 1px solid var(--red);
}

.gz-date-item--selected:hover {
    background: var(--red-deep);
}

.gz-confirm-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: var(--red);
    color: var(--gold-pale);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font-serif);
    letter-spacing: .08em;
}

.gz-confirm-btn--inline {
    width: auto;
    margin-top: 0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    letter-spacing: 0;
    white-space: nowrap;
}

.gz-confirm-btn:hover {
    background: var(--red-deep);
}

.gz-current-date {
    color: var(--text-3);
    font-family: var(--font-kai);
    font-size: 12px;
}

@media (max-width: 600px) {
    .gz-date-solar {
        font-size: 11.5px;
    }
}
/* =============================================================================
 * 八字玄机页 · 时间微调控件
 * ============================================================================= */
.time-stepper-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    background: rgba(255,252,245,0.6);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    padding: 10px 8px;
    overflow-x: auto;
}
.time-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 36px;
}
.time-col-label {
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 4px;
    letter-spacing: 2px;
}
.time-step-btn {
    cursor: pointer;
    color: var(--bamboo, #6b8e7a);
    font-size: 12px;
    user-select: none;
    padding: 1px 0;
    transition: color 0.2s;
    background: transparent;
    border: none;
    line-height: 1.3;
}
.time-step-btn:hover { color: var(--red); }
.time-step-val {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
    min-width: 36px;
    text-align: center;
    font-family: var(--font-serif);
}
.time-divider {
    width: 1px;
    height: 48px;
    background: var(--hairline);
}
.song-primary-btn {
    padding: 5px 10px;
    background: var(--red);
    color: var(--paper);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
}
.song-primary-btn:hover {
    background: color-mix(in srgb, var(--red) 90%, black);
}






/* =============================================================================
 * 八字基础信息列表
 * ============================================================================= */
.info-cell {
    padding: 8px 10px;
    font-size: 12.5px;
    color: var(--ink);
    font-family: var(--font-serif);
    background: var(--paper);
    line-height: 1.4;
}
.info-label {
    color: var(--text-2);
    flex-shrink: 0;
}
.info-value {
    color: var(--ink);
}

