/* =========================
        全局基础
    ========================= */
    * { box-sizing: border-box; }

    body {
        font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
        font-size: 16px;
        color: #000; /* 加深文字颜色 */
        line-height: 1.6;
        background: #f0f2f5;
        margin: 0;
        padding: 0;
    }

    .box {
        width: 100%;
        max-width: 1000px;
        margin: 0 auto;
        background: #fff;
        padding: 15px;
        min-height: 100vh;
    }

    h2 { text-align: center; color: #111; margin-bottom: 20px; font-weight: bold; }

    /* =========================
        表单区域
    ========================= */
    .form-group { margin-bottom: 15px; }

    .form-option-row label {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fafafa;
        font-size: 15px;
        font-weight: bold;
    }

    .form-option-row input[type="checkbox"] {
        width: auto;
        margin: 0;
    }

    .form-help {
        margin-top: 6px;
        color: #666;
        font-size: 13px;
        line-height: 1.5;
    }

    input, select {
        width: 100%;
        padding: 12px;
        border: 1px solid #bbb;
        border-radius: 8px;
        font-size: 16px;
        font-weight: bold;
    }

    .datetime-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-bottom: 10px;
    }

    button {
        width: 100%;
        padding: 15px;
        background: #111;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 18px;
        font-weight: bold;
        cursor: pointer;
    }

    /* =========================
        结果展示区优化
    ========================= */
    .result {
        margin-top: 25px;
        border-top: 2px solid #ddd;
        padding-top: 15px;
    }

    .info {
        background: #f9f9f9;
        padding: 12px;
        border-radius: 8px;
        font-size: 15px;
        line-height: 1.8;
        font-weight: bold; /* 信息区字体加粗 */
        border: 1px solid #eee;
    }

    /* 关键：表格容器适配 */
    .table-container {
        width: 100%;
        overflow-x: hidden; /* 强制不滚动，完美贴合屏幕 */
        margin-top: 15px;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed; /* 强制等分，不超屏幕 */
        background: #fff;
    }

    td {
        border: 1px solid #ccc;
        padding: 8px 2px;
        text-align: center;
        font-size: 15px;
        font-weight: bold; /* 所有字体加粗 */
        vertical-align: middle;
        word-break: break-all;
    }

    /* 标题列优化：尽量缩窄 */
    .title {
        background: #f2f2f2;
        color: #444;
        width: 15%; /* 标题占15%，四柱占85% */
        font-size: 14px;
        padding: 5px;
    }

    /* 天干地支核心大字 */
    .gz-main {
        font-size: 32px; /* 移动端大字 */
        font-weight: 900; /* 极致粗体 */
        display: block;
        line-height: 1.1;
        margin-bottom: 2px;
    }

    .wx-small {
        font-size: 12px;
        display: block;
        font-weight: bold;
    }

    /* =========================
        标签类
    ========================= */
    .shishen-item {
        display: inline-block;
        padding: 3px 4px;
        border-radius: 4px;
        color: #fff;
        font-size: 13px;
        font-weight: bold;
        white-space: nowrap;
    }

    .tag {
        display: inline-block;
        padding: 4px 10px;
        background: #eee;
        border-radius: 4px;
        margin: 4px 4px 0 0;
        font-size: 14px;
        font-weight: bold;
        border: 1px solid #ddd;
    }
    
    .analysis-card{
    margin-top:20px;
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
    overflow:hidden;
}

.analysis-card h3{
    margin:0;
    padding:10px 15px;
    background:#f2f2f2;
    font-size:18px;
}

.analysis-body{
    padding:15px;
}

.tag-row{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-bottom:12px;
}

.strength-result{
    margin-bottom:12px;
    font-size:16px;
}

.strength-result b{
    font-size:26px;
    color:red;
}

.fortune-grid{
    display:flex;
    gap:10px;
    margin-bottom:12px;
}

.fortune-item{
    flex:1;
    background:#fafafa;
    border:1px solid #eee;
    border-radius:6px;
    padding:10px;
}

.fortune-item span{
    display:block;
    font-size:13px;
    color:#666;
}

.fortune-item b{
    font-size:16px;
}

.fortune-result,
.fortune-advice{
    background:#fafafa;
    border-left:4px solid #d4a017;
    padding:10px;
    margin-top:10px;
    line-height:1.7;
}

@media(max-width:768px){
    .fortune-grid{
        flex-direction:column;
    }
}

    /* =========================
        手机端微调
    ========================= */
    @media (max-width: 768px) {
        .box { padding: 10px; }
        .gz-main { font-size: 34px; } /* 手机上进一步强化核心字 */
        td { font-size: 16px; padding: 10px 1px; }
        .title { font-size: 13px; }
        .shishen-item { font-size: 14px; padding: 4px 2px; width: 95%; }
        .datetime-row { grid-template-columns: 1fr 1fr; }
    }

    /* 弹窗及遮罩样式保持不变... */
    .popup-mask{
    position:fixed;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.6);
    z-index:9998;
    display:none;
}

.shishen-popup{
    position:fixed;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    background:#fff;
    width:90%;
    max-width:560px;
    max-height:80vh;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    padding:20px;
    border-radius:12px;
    box-shadow:0 0 20px rgba(0,0,0,.3);
    z-index:9999;
    display:none;
    line-height:1.8;
    font-size:15px;
    word-break:break-word;
}

#popup-content{
    max-height:65vh;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    padding-right:6px;
}

#popup-content b{
    display:block;
    font-size:18px;
    color:#c0392b;
    margin-bottom:10px;
}

.popup-static-link{
    margin:14px 0 0;
    padding-top:10px;
    border-top:1px solid #eee;
}

.popup-static-link a{
    display:inline-block;
    color:#8a4b21;
    font-weight:bold;
    text-decoration:none;
}

@media(max-width:768px){
    .shishen-popup{
        width:94%;
        max-width:94%;
        max-height:82vh;
        padding:15px;
        font-size:14px;
    }

    #popup-content{
        max-height:68vh;
    }
}

/* =========================
   左侧悬浮目录 / 手机目录
========================= */
.float-toc{
    position:fixed;
    left:12px;
    top:86px;
    width:188px;
    max-height:calc(100vh - 110px);
    overflow-y:auto;
    z-index:8888;
    background:rgba(255,255,255,.96);
    border:1px solid #e0e0e0;
    border-radius:12px;
    box-shadow:0 6px 20px rgba(0,0,0,.12);
    padding:10px;
    font-family:"Microsoft YaHei", Arial, sans-serif;
}
.float-toc-title{
    font-weight:900;
    font-size:15px;
    color:#d35400;
    padding:4px 6px 8px;
    border-bottom:1px solid #eee;
    margin-bottom:6px;
}
.float-toc a{
    display:block;
    padding:7px 8px;
    margin:3px 0;
    color:#333;
    text-decoration:none;
    font-size:13px;
    line-height:1.35;
    border-radius:8px;
    border:1px solid transparent;
}
.float-toc a:hover,
.float-toc a.active{
    background:#fff3e0;
    color:#d35400;
    border-color:#ffcc80;
    font-weight:bold;
}
.float-toc-actions{
    display:flex;
    gap:6px;
    padding:8px 0 2px;
}
.float-toc-actions button{
    width:50%;
    padding:6px 4px;
    font-size:12px;
    border-radius:8px;
    background:#f5f5f5;
    color:#333;
    border:1px solid #ddd;
}
.mobile-toc-btn{
    display:none;
    position:fixed;
    right:14px;
    bottom:18px;
    z-index:9000;
    width:auto;
    padding:10px 14px;
    border-radius:999px;
    background:#e67e22;
    color:#fff;
    border:none;
    box-shadow:0 6px 18px rgba(0,0,0,.25);
    font-size:14px;
    font-weight:bold;
}
.mobile-toc-mask{
    display:none;
    position:fixed;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.45);
    z-index:8998;
}
@media(min-width:1240px){
    .box{
        margin-left:220px;
        margin-right:auto;
    }
}
@media(max-width:1239px){
    .float-toc{
        display:none;
        left:12px;
        right:12px;
        top:auto;
        bottom:70px;
        width:auto;
        max-height:62vh;
        z-index:8999;
        padding:12px;
    }
    .float-toc.show{
        display:block;
    }
    .mobile-toc-btn{
        display:block;
    }
    .mobile-toc-mask.show{
        display:block;
    }
}
html{ scroll-behavior:smooth; }
.toc-anchor{ scroll-margin-top:18px; }
.back-top-btn{
    position:fixed;
    right:14px;
    bottom:68px;
    z-index:8800;
    width:auto;
    padding:8px 12px;
    border-radius:999px;
    background:#333;
    color:#fff;
    border:none;
    font-size:13px;
    box-shadow:0 4px 12px rgba(0,0,0,.22);
}
@media(max-width:1239px){
    .back-top-btn{ bottom:68px; right:14px; z-index:9000; }
}

    .top-user-nav{
        display:flex;
        flex-wrap:wrap;
        gap:8px;
        align-items:center;
        justify-content:center;
        background:#fff8e1;
        border:1px solid #f0d48a;
        border-radius:10px;
        padding:10px;
        margin:10px 0 18px;
        font-size:14px;
    }
    .top-user-nav a{
        display:inline-block;
        background:#111;
        color:#fff;
        text-decoration:none;
        border-radius:999px;
        padding:6px 12px;
        font-weight:bold;
    }
    .top-logout-form{
        display:inline-block;
        margin:0;
    }
    .top-logout-form button{
        width:auto;
        display:inline-block;
        background:#111;
        color:#fff;
        border:none;
        border-radius:999px;
        padding:6px 12px;
        font-size:14px;
        font-weight:bold;
        cursor:pointer;
    }
    .member-save-msg{
        background:#e8f5e9;
        color:#2e7d32;
        border:1px solid #a5d6a7;
        border-radius:8px;
        padding:10px;
        margin:10px 0;
        text-align:center;
        font-weight:bold;
    }
    @media(max-width:768px){
        .top-user-nav{justify-content:flex-start;}
        .top-user-nav a,
        .top-logout-form{flex:1 1 auto;text-align:center;}
        .top-logout-form button{width:100%;}
    }
    .footer-links{
    margin:15px 0 8px;
    text-align:center;
    line-height:1.8;
}

.footer-links a{
    display:inline-block;
    color:#666;
    text-decoration:none;
    padding:6px 12px;
    margin:3px;
    border-radius:8px;
    transition:all .2s ease;
}

.footer-links a:hover{
    background:#f5f5f5;
    color:#d4a017;
}

@media(max-width:760px){

    .footer-links{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
        max-width:420px;
        margin:15px auto 8px;
    }

    .footer-links a{
        margin:0;
        padding:10px;
        background:#fafafa;
        border:1px solid #eee;
    }

}
    .footer-copyright{
    margin-top:40px;
    padding:20px 15px;
    text-align:center;
    color:#888;
    font-size:13px;
    line-height:1.8;
    border-top:1px solid #eee;
    background:#fafafa;
}

.explain-link-cloud{
    max-width:1100px;
    margin:18px auto 8px;
    padding:14px;
    background:#fffaf3;
    border:1px solid #ead8bf;
    border-radius:8px;
    text-align:left;
}

.explain-link-cloud h3{
    margin:0 0 6px;
    color:#5a351f;
    font-size:18px;
}

.explain-link-cloud p{
    margin:0 0 10px;
    color:#6f6258;
    font-size:13px;
}

.explain-link-list{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
}

.explain-link-list a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:30px;
    padding:4px 9px;
    border:1px solid #ead8bf;
    border-radius:7px;
    background:#fff;
    color:#70411f;
    font-size:13px;
    line-height:1.35;
    text-decoration:none;
}

.explain-link-list a:hover{
    background:#fff3df;
    color:#a6541d;
}

@media(max-width:760px){
    .explain-link-cloud{
        margin:16px 8px 8px;
        padding:12px;
    }

    .explain-link-list a{
        flex:1 1 88px;
    }
}


/* =========================
   Extracted module styles
========================= */
/* =========================
   八柱区域
========================= */
.bazhu-wrap{
    width:100%;
    overflow:hidden;
    background:#ddd;
    border:1px solid #ccc;
    margin-top:10px;
    padding:0;
}

/* =========================
   表格
========================= */
.bazhu-table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;
    background:#eee;
}

.bazhu-table td{
    border:1px solid #c0c0c0;
    text-align:center;
    vertical-align:middle;
    padding:2px 0;
    font-weight:bold;
    overflow:hidden;
}

/* 表头 */
.bazhu-table .head td{
    background:#cfcfcf;
    font-size:10px;
    padding:5px 0;
}

/* 左边标题列 */
.bazhu-table .label{
    width:30px;
    font-size:10px;
    background:#d0d0d0;
    font-weight:bold;
}

/* =========================
   干支区域
========================= */
.gz-cell{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:1px;
    width:100%;
}

/* 十神区域 */
.gz-ss-side{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:0;
    width:8px;
    flex-shrink:0;
}

/* 十神字 */
.ss-click{
    font-size:10px;
    line-height:11px;
    color:#111;
    cursor:pointer;
    display:block;
    transform:scale(0.9);
}

/* 干支大字 */
.bazhu-big{
    font-size:18px;
    line-height:1;
    font-weight:900;
}

/* 空亡 */
.kw-text{
    font-size:9px;
}

/* =========================
   时间轴
========================= */
.timeline-row{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    gap:3px;
    padding:4px;
    background:#eee;
    border-bottom:1px solid #ccc;
    -webkit-overflow-scrolling:touch;
}

.timeline-item{
    flex:0 0 auto;
    min-width:42px;
    padding:3px 2px;
    border:1px solid #aaa;
    background:#fff;
    cursor:pointer;
    text-align:center;
    border-radius:3px;
}

.timeline-item.active{
    background:#2196f3;
    color:#fff;
}

.timeline-top{
    font-size:8px;
    line-height:1.1;
}

.timeline-bottom{
    font-size:11px;
    font-weight:bold;
    line-height:1.2;
}

.bazhu-notice-box{
    background:#fff;
    border-top:1px solid #ccc;
    padding:8px;
    font-size:12px;
    line-height:1.7;
    text-align:left;
}

.bazhu-notice-box b{
    color:#333;
}

.bazhu-notice-box span{
    color:#c0392b;
}
.notice-pill{
    display:inline-block;
    padding:2px 6px;
    margin:2px;
    border-radius:5px;
    font-size:12px;
    font-weight:bold;
    line-height:1.4;
}

.notice-relation{
    display:inline-block;
    padding:2px 6px;
    margin:2px;
    border-radius:5px;
    font-size:12px;
    line-height:1.5;
    background:#fff;
    border:1px solid #ddd;
}

.notice-from{
    font-weight:bold;
    color:#111;
}

.notice-type{
    font-weight:bold;
}

.notice-good{
    background:#e8f5e9;
    color:#2e7d32;
    border:1px solid #a5d6a7;
}

.notice-bad{
    background:#ffebee;
    color:#c62828;
    border:1px solid #ef9a9a;
}

.notice-mid{
    background:#fff8e1;
    color:#ef6c00;
    border:1px solid #ffcc80;
}

.notice-normal{
    background:#e3f2fd;
    color:#1565c0;
    border:1px solid #90caf9;
}

.notice-special{
    background:#f3e5f5;
    color:#6a1b9a;
    border:1px solid #ce93d8;
}

.bazhu-notice-box{
    font-size:12px;
    line-height:1.8;
}

.bazhu-notice-box b{
    color:#111;
}
/* =========================
   手机进一步压缩
========================= */
@media(max-width:480px){

    .bazhu-big{
        font-size:16px;
    }

    .timeline-item{
        min-width:38px;
    }

    .timeline-bottom{
        font-size:10px;
    }

    .timeline-top{
        font-size:7px;
    }
}

.jiugong-container { width: 310px; margin: 20px auto; }
    .jiugong-table { border-collapse: collapse; width: 100%; table-layout: fixed; }

    .jiugong-table td {
        border: 2px solid #5d4037;
        height: 100px;
        width: 100px;
        text-align: center;
        vertical-align: middle;
        background: #fffaf0;
    }

    .pos-name {
        font-size: 12px;
        color: #8d6e63;
        display: block;
        margin-bottom: 5px;
    }

    .god-item {
        font-size: 15px;
        font-weight: bold;
        color: #d84315;
        line-height: 1.3;
    }

    .center-title {
        background-color: #efebe9 !important;
        font-weight: bold;
        color: #3e2723;
    }

.fortune-section{margin:18px 0;padding:12px;background:#fff;border-radius:12px;}
.fortune-title{font-size:22px;font-weight:bold;color:#d4a017;margin:10px 0;}
.loss-title{color:#c0392b;}
.fortune-desc{color:#666;line-height:1.8;margin-bottom:12px;}
.fortune-card{background:#fff;border:1px solid #e8d39f;border-radius:12px;padding:15px;margin:15px 0;box-shadow:0 2px 10px rgba(0,0,0,.05);}
.loss-card{border-color:#e6a3a3;background:#fffafa;}
.fortune-year{font-size:22px;font-weight:bold;color:#d4a017;margin-bottom:12px;line-height:1.8;}
.loss-card .fortune-year{color:#c0392b;}
.fortune-row{margin:8px 0;line-height:1.8;}
.fortune-label{color:#666;display:inline-block;width:95px;vertical-align:top;}
.fortune-value{color:#333;font-weight:bold;}
.fortune-divider{margin:12px 0;border-top:1px dashed #e0c98c;}
.fortune-tag{display:inline-block;background:#fff4d6;color:#9b6a00;border:1px solid #e0c98c;border-radius:999px;padding:2px 8px;margin:2px;font-size:13px;font-weight:bold;}
.fortune-red-tag{display:inline-block;background:#e74c3c;color:#fff;border-radius:999px;padding:3px 9px;margin-left:6px;font-size:13px;font-weight:bold;}
.loss-tag{background:#ffecec;color:#c0392b;border-color:#e6a3a3;}
.fortune-key{background:#fff8e1;border-left:4px solid #d4a017;padding:8px 10px;margin:8px 0;font-weight:bold;color:#8a5a00;}
.loss-key{background:#fff0f0;border-left:4px solid #c0392b;padding:8px 10px;margin:8px 0;font-weight:bold;color:#c0392b;}
.fortune-month{display:inline-block;background:#faf2d2;border:1px solid #e4cb79;border-radius:6px;padding:3px 8px;margin:3px;font-size:13px;}
.fortune-empty{color:#999;padding:12px;background:#fafafa;border-radius:8px;}
.loss-reason-item{margin:8px 0;padding:8px 10px;background:#fff;border:1px solid #f0c0c0;border-radius:8px;}
.loss-type{color:#c0392b;font-weight:bold;}
/* 财富等级等详情模块 */

.fortune-detail-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:12px;
    margin-top:12px;
}

.fortune-detail-box{
    background:#fff;
    border:1px solid #eee;
    border-radius:10px;
    padding:12px;
    box-shadow:0 2px 6px rgba(0,0,0,.04);
}

.fortune-detail-box h4{
    margin:0 0 8px;
    font-size:15px;
    color:#d4a017;
}

.fortune-check-ok{
    color:#27ae60;
    font-weight:bold;
    line-height:1.8;
}

.fortune-check-bad{
    color:#c0392b;
    font-weight:bold;
    line-height:1.8;
}

.fortune-list-line{
    padding:8px 10px;
    margin:6px 0;
    background:#fafafa;
    border-radius:8px;
    line-height:1.8;
}

.fortune-list-line:hover{
    background:#fff8e1;
}

.fortune-card .fortune-detail-grid{
    margin-top:15px;
}
@media(max-width:760px){

    .fortune-detail-grid{
        grid-template-columns:1fr;
    }

    .fortune-detail-box{
        padding:10px;
    }

}

.phone-box{
    margin:25px 0;
    background:#f7fbff;
    border:1px solid #9cc9ff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 4px 15px rgba(0,0,0,.08);
    font-family:"Microsoft YaHei",Arial,sans-serif;
}
.phone-title{
    background:linear-gradient(135deg,#1976d2,#64b5f6);
    color:#fff;
    padding:14px 18px;
    font-size:20px;
    font-weight:bold;
}
.phone-content{
    padding:16px;
}
.phone-row{
    margin:10px 0;
    line-height:1.8;
}
.phone-label{
    color:#555;
    font-weight:bold;
}
.phone-tag{
    display:inline-block;
    padding:5px 10px;
    margin:4px;
    border-radius:999px;
    font-size:14px;
    font-weight:bold;
}
.phone-tag-blue{
    background:#e3f2fd;
    color:#1565c0;
}
.phone-tag-red{
    background:#ffe2df;
    color:#d93025;
}
.phone-tag-green{
    background:#e8f5e9;
    color:#2e7d32;
}
.phone-digit{
    display:inline-block;
    min-width:46px;
    text-align:center;
    background:#fff;
    border:1px solid #90caf9;
    border-radius:10px;
    padding:8px 10px;
    margin:5px;
    color:#0d47a1;
    font-size:20px;
    font-weight:bold;
}
.phone-small{
    display:block;
    font-size:12px;
    color:#666;
    margin-top:3px;
}
