/* 天枢 · 全局样式 */

:root {
    --ts-red: #7a1f1f;
    --ts-gold: #c9a45c;
    --ts-ink: #2b2622;
}

body {
    color: var(--ts-ink);
    background:
        radial-gradient(1200px 500px at 50% -10%, #f7efdd 0%, transparent 60%),
        #f6f2e8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.navbar-tianshu {
    background: linear-gradient(90deg, #5e1717, #7a1f1f 55%, #5e1717);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.navbar-tianshu .navbar-brand,
.navbar-tianshu .nav-link {
    color: #f3e6c6 !important;
}

.navbar-tianshu .nav-link:hover {
    color: #fff !important;
}

.navbar-tianshu .navbar-brand {
    font-weight: 700;
    letter-spacing: .25em;
}

.brand-seal {
    display: inline-block;
    color: var(--ts-gold);
}

.card {
    border: 1px solid #e6d9bd;
    box-shadow: 0 6px 20px rgba(90, 60, 20, .07);
}

.card-title {
    color: var(--ts-red);
}

.btn-tianshu {
    background: var(--ts-red);
    border-color: var(--ts-red);
    color: #f7ecd2;
}

.btn-tianshu:hover {
    background: #8e2626;
    border-color: #8e2626;
    color: #fff;
}

.btn-outline-gold {
    color: var(--ts-red);
    border-color: var(--ts-gold);
}

.btn-outline-gold:hover {
    background: var(--ts-gold);
    border-color: var(--ts-gold);
    color: #fff;
}

/* 首页板块入口 */
.section-tile {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 1rem;
    padding: 2.5rem 1.5rem;
    background: #fffdf6;
    border: 1px solid #e9dcbf;
    transition: transform .15s ease, box-shadow .15s ease;
    height: 100%;
    text-align: center;
}

.section-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(122, 31, 31, .15);
}

.section-tile .tile-icon {
    font-size: 3.2rem;
    line-height: 1;
}

.section-tile h2 {
    margin-top: .8rem;
    color: var(--ts-red);
    letter-spacing: .3em;
}

/* 神佛卡片 */
.deity-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff7e4, #f0dfb4);
    border: 2px solid var(--ts-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto;
}

/* 供品单选卡片 */
.offering-card {
    cursor: pointer;
    border: 1px solid #e3d5b8;
    border-radius: .75rem;
    padding: .75rem .5rem;
    text-align: center;
    background: #fffdf7;
    height: 100%;
    transition: all .12s ease;
}

.offering-card .off-icon {
    font-size: 1.8rem;
}

.offering-card .off-name {
    font-weight: 600;
    margin: .25rem 0 0;
}

.offering-card .off-meaning {
    font-size: .78rem;
    color: #8a7a5c;
    margin: 0;
}

.offering-card:hover {
    border-color: var(--ts-gold);
}

.offering-input:checked + .offering-card {
    border-color: var(--ts-red);
    background: #fbf0df;
    box-shadow: 0 0 0 2px rgba(122, 31, 31, .25);
}

.offering-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* 八字 / 大运表格 */
.pillar-box {
    text-align: center;
    background: #fffdf6;
    border: 1px solid #e6d9bd;
    border-radius: .75rem;
    padding: 1rem .5rem;
}

.pillar-box .gz {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ts-red);
}

.table-dayun th {
    background: #f3e8d0;
    color: var(--ts-red);
    white-space: nowrap;
}

tr.is-current {
    background: #fbeed5 !important;
    font-weight: 600;
}

.badge-tradition {
    background: var(--ts-gold);
    color: #4a2c10;
}

/* 结果页锚点导航 */
html {
    scroll-behavior: smooth;
}

.anchor-sec {
    scroll-margin-top: 96px;
}

.anchor-nav {
    position: sticky;
    top: 56px;
    z-index: 1010;
    display: flex;
    flex-wrap: nowrap;
    gap: .35rem;
    margin: 0 -.75rem .9rem;
    padding: .45rem .75rem;
    overflow-x: auto;
    background: rgba(246, 242, 232, .94);
    border-top: 1px solid #e2d5b8;
    border-bottom: 1px solid #e2d5b8;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    scrollbar-width: none;
}

.anchor-nav::-webkit-scrollbar {
    display: none;
}

.anchor-nav a {
    flex: 0 0 auto;
    font-size: .82rem;
    color: var(--ts-red);
    text-decoration: none;
    padding: .22em .7em;
    border: 1px solid var(--ts-gold);
    border-radius: 999px;
    background: #fffdf6;
    transition: all .12s ease;
}

.anchor-nav a:hover,
.anchor-nav a:focus-visible {
    background: var(--ts-red);
    border-color: var(--ts-red);
    color: #f5e9c8;
}

.anchor-nav a.anchor-top {
    margin-left: auto;
    background: var(--ts-red);
    border-color: var(--ts-red);
    color: #f5e9c8;
}

/* 健康福寿 */
.health-warn {
    background: #fffdf6;
}

/* 六亲缘分 */
.kin-card {
    background: #fffdf6;
}

.kin-rel {
    font-size: .72rem;
    padding: .1em .5em;
    border-radius: .4rem;
    font-weight: 500;
    vertical-align: middle;
}

.kin-rel-xi {
    background: #dff0e3;
    color: #2f6b45;
}

.kin-rel-ji {
    background: #f5dcd7;
    color: #8e2f2f;
}

.kin-rel-ping {
    background: #ece7dc;
    color: #7a7160;
}

/* 学业文昌 */
.study-wc {
    background: #fffdf6;
}

.study-wc-name {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--ts-red);
    line-height: 1.2;
}

.study-yk {
    background: #fffdf6;
}

.study-yk div {
    line-height: 1.9;
}

/* 事业财运 */
.career-yk {
    background: #fffdf6;
}

.career-yk div {
    line-height: 1.9;
}

/* 流年详批 */
.badge-rating-大吉 {
    background: #7a1f1f;
    color: #f5e9c8;
}

.badge-rating-吉 {
    background: #2f7a4d;
}

.badge-rating-平 {
    background: #8a8275;
}

.badge-rating-需谨慎 {
    background: #c0832e;
}

.badge-rating-凶 {
    background: #a83232;
}

.rel-tag {
    display: inline-block;
    font-size: .72rem;
    padding: .12em .5em;
    border-radius: .4rem;
    border: 1px solid;
    margin-right: .15rem;
    white-space: nowrap;
}

.rel-chong {
    background: #f5dcd7;
    color: #8e2f2f;
    border-color: #d99a8f;
}

.rel-xing {
    background: #ece2f0;
    color: #6b3a7a;
    border-color: #c3a6d4;
}

.rel-hai {
    background: #f6e9d0;
    color: #8a6a2f;
    border-color: #d9bf8f;
}

.rel-he {
    background: #dff0e3;
    color: #2f6b45;
    border-color: #9ac9a8;
}

.ln-card,
.ly-card {
    background: #fffdf6;
}

.ln-aspect {
    display: block;
    font-weight: 600;
    color: var(--ts-red);
}

/* 终身命局 */
.life-geju {
    background: #fffdf6;
}

.life-geju-name {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--ts-red);
    letter-spacing: .15em;
}

/* 五行喜用神 */
.wx-chip {
    display: inline-block;
    min-width: 1.9em;
    text-align: center;
    padding: .08em .5em;
    border: 1px solid;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .92em;
    line-height: 1.5;
}

.wx-table th {
    width: 3.5em;
    color: #8a7a5c;
    font-weight: 500;
    white-space: nowrap;
}

.wx-table th,
.wx-table td {
    vertical-align: middle;
}

.footer-tianshu {
    background: #3d1414;
    color: #cbb98e;
    font-size: .85rem;
}

/* 公历/农历切换：未选中白底（与其他控件一致），选中深红主色高亮 */
.cal-toggle .btn-cal {
    color: var(--ts-red);
    background: #fff;
    border: 1px solid var(--ts-gold);
}

.cal-toggle .btn-cal:hover {
    color: var(--ts-red);
    background: #fbf3e2;
}

.btn-check:checked + .btn-cal,
.btn-check:checked + .btn-cal:hover {
    background: var(--ts-red);
    border-color: var(--ts-red);
    color: #f5e9c8;
}

.btn-check:focus-visible + .btn-cal {
    box-shadow: 0 0 0 .2rem rgba(122, 31, 31, .25);
}
