/*
Theme Name: 国学门户
Theme URI: https://www.cnzyfsw.com
Author: cnzyfsw
Author URI: https://www.cnzyfsw.com
Description: 经典中文门户风格主题，适用于术数、国学类资讯站点。红头导航、工具入口聚合、分类区块首页、文章列表加侧栏推荐的传统两栏布局。
Version: 1.2.1
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: guoxue-portal
*/

/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: #f4f4f4;
    color: #333;
    font: 15px/1.75 "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}
a { color: #333; text-decoration: none; transition: color .15s; }
a:hover { color: #c8161e; }
ul { list-style: none; }
img { max-width: 100%; height: auto; border: 0; }
.wrap { width: 1200px; max-width: 96%; margin: 0 auto; }

/* ============ 顶部欢迎条 ============ */
.topbar {
    background: #f7f7f7;
    border-bottom: 1px solid #e5e5e5;
    font-size: 12px;
    color: #888;
}
.topbar .wrap { display: flex; justify-content: space-between; height: 32px; align-items: center; }
.topbar a { color: #888; margin: 0 4px; }
.topbar a:hover { color: #c8161e; }

/* ============ 头部 ============ */
.site-header { background: #fff; box-shadow: 0 1px 0 #eee; }
.masthead { display: flex; align-items: center; justify-content: space-between; padding: 22px 0 18px; }
.site-logo { display: flex; align-items: center; gap: 14px; }
.site-logo .logo-badge {
    width: 56px; height: 56px; border-radius: 10px;
    background: linear-gradient(135deg, #d8261c, #a30f0f);
    color: #ffe9c8; font-size: 30px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    font-family: "KaiTi", "STKaiti", serif;
    box-shadow: inset 0 0 0 2px rgba(255, 233, 200, .35), 0 3px 10px rgba(168, 15, 15, .28);
}
.site-title { font-size: 32px; font-weight: 700; color: #c8161e; letter-spacing: 3px; font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif; text-shadow: 0 1px 0 rgba(255, 255, 255, .8); }
.site-title a { color: inherit; }
.site-desc { font-size: 13px; color: #b0937e; letter-spacing: 2px; margin-top: 2px; }

.header-search { display: flex; }
.header-search input[type="text"] {
    width: 240px; height: 38px; border: 2px solid #c8161e; border-right: 0;
    padding: 0 12px; font-size: 13px; outline: none; color: #555;
}
.header-search input[type="submit"] {
    width: 78px; height: 38px; border: 0; cursor: pointer;
    background: #c8161e; color: #fff; font-size: 14px;
}
.header-search input[type="submit"]:hover { background: #a30f0f; }

/* ============ 主导航 ============ */
.main-nav { background: linear-gradient(180deg, #d8261c, #b51212); box-shadow: 0 2px 6px rgba(120, 8, 8, .25); }
.main-nav ul { display: flex; }
.main-nav li { flex: 1; text-align: center; position: relative; }
.main-nav a {
    display: block; color: #fff; font-size: 16px; font-weight: 600;
    padding: 13px 0; letter-spacing: 1px;
    border-right: 1px solid rgba(255, 255, 255, .12);
    transition: background .2s, letter-spacing .2s;
}
.main-nav li:first-child a { border-left: 1px solid rgba(255, 255, 255, .12); }
.main-nav a:hover { background: #8f0c0c; }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a {
    background: #8f0c0c;
}
.main-nav .current-menu-item > a::after, .main-nav .current_page_item > a::after {
    content: ""; position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%);
    width: 22px; height: 3px; border-radius: 2px; background: #ffd9a0;
}

/* ============ 工具入口区 ============ */
.tool-entry { background: #fff; margin-top: 15px; padding: 22px 10px 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); border-radius: 6px; }
.tool-entry ul { display: flex; flex-wrap: wrap; }
.tool-entry li { width: 12.5%; text-align: center; margin-bottom: 14px; }
.tool-entry a { display: block; }
.tool-entry .t-ico {
    width: 60px; height: 60px; margin: 0 auto 8px; border-radius: 16px;
    background: linear-gradient(145deg, #fdf3f2, #fbe4e1);
    color: #b51212; font-size: 28px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #f3d6d2;
    font-family: "KaiTi", "STKaiti", serif;
    transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.tool-entry a:hover .t-ico {
    background: linear-gradient(145deg, #d8261c, #a30f0f); color: #ffe9c8;
    border-color: #a30f0f; transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(168, 15, 15, .3);
}
.tool-entry .t-name { font-size: 14px; font-weight: 600; }
.tool-entry .t-sub { font-size: 12px; color: #aaa; }

/* ============ 今日黄历条 ============ */
.today-hl {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border-radius: 6px; margin-top: 12px; padding: 11px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04); font-size: 13px;
    border-left: 4px solid #c8161e;
}
.today-hl .th-label {
    flex-shrink: 0; color: #fff; background: linear-gradient(145deg, #d8261c, #b51212);
    border-radius: 4px; padding: 2px 10px; font-weight: 600; letter-spacing: 2px;
}
.today-hl .th-text { color: #666; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-hl .th-more { flex-shrink: 0; color: #c8161e; }
.today-hl .th-more:hover { text-decoration: underline; }

/* ============ 主体两栏 ============ */
.main-area { display: flex; gap: 15px; margin: 15px 0 20px; align-items: flex-start; }
.content-col { flex: 1; min-width: 0; }
.sidebar-col { width: 300px; flex-shrink: 0; position: sticky; top: 12px; }

/* ============ 栏目区块 ============ */
.sec-box { background: #fff; margin-bottom: 15px; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); border-radius: 6px; overflow: hidden; }
.sec-head {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 2px solid #c8161e; padding: 0 15px;
    background: linear-gradient(180deg, #fffdfc, #fff);
}
.sec-head h2 {
    font-size: 18px; color: #222; padding: 10px 0 8px; font-weight: 700;
    position: relative; padding-left: 14px; letter-spacing: 1px;
    font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
}
.sec-head h2::before {
    content: ""; position: absolute; left: 0; top: 13px; bottom: 9px; width: 4px;
    background: linear-gradient(180deg, #d8261c, #a30f0f); border-radius: 2px;
}
.sec-head .more { font-size: 12px; color: #999; transition: color .15s; }
.sec-head .more:hover { color: #c8161e; }
.sec-body { padding: 8px 15px 12px; }

/* 首页文章列表：宽屏两列 */
.post-list li {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px dashed #eee; padding: 9px 2px;
}
.post-list li:last-child { border-bottom: 0; }
.post-list .p-title {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding-left: 14px; position: relative; font-size: 15px;
}
.post-list .p-title::before {
    content: ""; position: absolute; left: 2px; top: 50%; margin-top: -3px;
    width: 5px; height: 5px; border-radius: 50%; background: #d8261c;
}
.post-list .p-date { color: #aaa; font-size: 12px; margin-left: 15px; flex-shrink: 0; }
.sec-empty { color: #bbb; text-align: center; padding: 18px 0; font-size: 13px; }
.home-cols .post-list { column-count: 2; column-gap: 26px; }
.home-cols .post-list li { break-inside: avoid; }
.home-cols .post-list .p-title { font-size: 14px; }

/* ============ 侧栏 ============ */
.side-box { background: #fff; margin-bottom: 15px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.side-head {
    background: linear-gradient(180deg, #fdf3f2, #fff);
    border-bottom: 2px solid #c8161e; padding: 9px 15px 7px;
    font-size: 16px; font-weight: 700; color: #b51212;
}
.side-body { padding: 6px 15px 12px; }
.side-list li {
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px dashed #f0f0f0; padding: 8px 0;
}
.side-list li:last-child { border-bottom: 0; }
.side-list .num {
    width: 20px; height: 20px; border-radius: 3px; flex-shrink: 0;
    background: #eee; color: #999; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
}
.side-list li:nth-child(-n+3) .num { background: #c8161e; color: #fff; }
.side-list .s-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.side-nav a {
    display: block; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; font-size: 14px;
}
.side-nav a:last-child { border-bottom: 0; }
.side-nav a::before { content: "·"; color: #c8161e; font-weight: 700; margin-right: 8px; }

/* ============ 通用文章页 ============ */
.page-crumb {
    background: #fff; margin: 15px 0 0; padding: 10px 15px; font-size: 13px; color: #999;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04); border-radius: 6px 6px 0 0;
}
.page-crumb a { color: #666; margin: 0 2px; }
.page-crumb a:hover { color: #c8161e; }
.article-box { background: #fff; padding: 32px 40px 35px; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); border-radius: 0 0 6px 6px; }
.article-title {
    font-size: 28px; line-height: 1.6; color: #222; text-align: center; font-weight: 700;
    font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif; letter-spacing: 1px;
}
.article-meta {
    text-align: center; color: #aaa; font-size: 12px;
    margin: 16px 0 24px; padding-bottom: 16px; border-bottom: 1px dashed #ececec;
}
.article-meta span { margin: 0 12px; padding-left: 12px; border-left: 1px solid #eee; }
.article-meta span:first-child { border-left: 0; }
.article-meta a { color: #aaa; }
.article-meta a:hover { color: #c8161e; }
.entry-content { font-size: 16px; line-height: 2.1; color: #444; }
.entry-content p { margin: 0 0 1.2em; text-indent: 2em; }
.entry-content h2, .entry-content h3 { margin: 1.4em 0 .8em; text-indent: 0; color: #b51212; }
.entry-content h2 { font-size: 20px; border-left: 4px solid #c8161e; padding-left: 10px; }
.entry-content h3 { font-size: 18px; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em 2em; text-indent: 0; }
.entry-content li { margin-bottom: .4em; list-style: disc; }
.entry-content blockquote {
    border-left: 4px solid #c8161e; background: #fdf7f6;
    padding: 12px 18px; margin: 0 0 1.2em; color: #777; text-indent: 0; border-radius: 0 4px 4px 0;
}
.entry-content a { color: #c8161e; }
.entry-content img { display: block; margin: 10px auto; border-radius: 4px; }
.article-adj {
    display: flex; justify-content: space-between; gap: 15px;
    margin-top: 25px; padding-top: 18px; border-top: 1px dashed #ececec; font-size: 14px;
}
.article-adj a { color: #666; }
.article-adj a:hover { color: #c8161e; }
.article-adj span { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 列表页 ============ */
.archive-info { color: #888; font-size: 13px; padding: 5px 0 0; }
.list-item {
    display: flex; gap: 16px; padding: 18px 0;
    border-bottom: 1px dashed #eee;
}
.list-item:last-child { border-bottom: 0; }
.list-item .li-text { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 17px; font-weight: 600; }
.list-item .li-title a:hover { color: #c8161e; }
.list-item .li-excerpt {
    color: #888; font-size: 14px; line-height: 1.8; margin: 6px 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.list-item .li-meta { color: #bbb; font-size: 12px; }

/* ============ 分页 ============ */
.pagination { padding: 22px 0 8px; text-align: center; font-size: 14px; }
.pagination .page-numbers {
    display: inline-block; min-width: 34px; height: 34px; line-height: 32px;
    margin: 0 3px; padding: 0 10px; border: 1px solid #e0e0e0; background: #fff; color: #666;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover {
    background: #c8161e; border-color: #c8161e; color: #fff;
}

/* ============ 页脚 ============ */
.site-footer { background: #2b2b2b; color: #999; margin-top: 10px; border-top: 3px solid #c8161e; }
.footer-nav { border-bottom: 1px solid #3d3d3d; padding: 18px 0; text-align: center; }
.footer-nav a { color: #bbb; margin: 0 14px; font-size: 14px; }
.footer-nav a:hover { color: #f0c674; }
.footer-info { padding: 20px 0 30px; text-align: center; font-size: 12px; line-height: 2.1; }
.footer-info a { color: #777; }
.footer-info a:hover { color: #f0c674; }
.footer-links { margin-bottom: 8px; }
.footer-links a { margin: 0 12px; font-size: 13px; color: #bbb; }
.footer-links a:hover { color: #f0c674; }
.footer-icp { color: #555; }
.footer-icp a { color: #777; }

/* ============ 返回顶部 ============ */
.back-top {
    position: fixed; right: 22px; bottom: 60px; width: 42px; height: 42px;
    background: #fff; border: 1px solid #e8d9d6; border-radius: 8px;
    color: #b51212; font-size: 18px; cursor: pointer; z-index: 99;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1); transition: background .2s, color .2s;
}
.back-top:hover { background: #c8161e; color: #fff; border-color: #c8161e; }

/* ============ 工具页快捷导航 ============ */
.tool-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 14px; }
.tool-nav a {
    font-size: 13px; color: #b51212; background: #fdf3f2;
    border: 1px solid #f0dedb; border-radius: 20px; padding: 5px 16px;
    transition: all .2s;
}
.tool-nav a:hover, .tool-nav a.on { background: #c8161e; color: #fff; border-color: #c8161e; }

/* ============ 其它 ============ */
.search-form { display: flex; }
.search-form input[type="text"] { flex: 1; height: 36px; border: 2px solid #ddd; border-right: 0; padding: 0 10px; font-size: 13px; outline: none; }
.search-form input[type="text"]:focus { border-color: #c8161e; }
.search-form input[type="submit"] { width: 66px; height: 36px; border: 0; background: #c8161e; color: #fff; cursor: pointer; }

/* ============ 表单与评论（防止固定宽度撑破移动端） ============ */
textarea, input[type="text"], input[type="email"], input[type="url"], input[type="tel"], select { max-width: 100%; }
.comment-respond textarea, .comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"] {
    width: 100%; border: 1px solid #ddd; border-radius: 3px; padding: 8px 10px; font: inherit; font-size: 14px; outline: none;
}
.comment-respond textarea:focus, .comment-respond input:focus { border-color: #c8161e; }
.comment-respond p { margin: 0 0 12px; }
.comment-form .submit {
    background: #c8161e; color: #fff; border: 0; border-radius: 3px;
    padding: 9px 28px; font-size: 14px; cursor: pointer;
}
.comment-form .submit:hover { background: #a30f0f; }
.comment-reply-title, .comments-title { font-size: 17px; color: #222; margin-bottom: 12px; font-weight: 700; }
ol.comment-list { margin: 0; }
ol.comment-list li {
    list-style: none; border-bottom: 1px dashed #eee; padding: 14px 0;
}
ol.comment-list li:last-child { border-bottom: 0; }
ol.comment-list .comment-meta { font-size: 12px; color: #aaa; margin-bottom: 6px; }
ol.comment-list .comment-content { font-size: 14px; color: #555; line-height: 1.9; }
ol.comment-list .comment-content p { margin: 0 0 .6em; }
ol.children { margin-left: 18px; border-left: 2px solid #f3d6d2; padding-left: 14px; }
.comment-reply-link { color: #c8161e; font-size: 12px; }
.logged-in-as, .comment-notes { font-size: 13px; color: #999; }
.error-404 { text-align: center; padding: 70px 20px; }
.error-404 .num { font-size: 90px; color: #c8161e; font-weight: 700; font-family: Arial, sans-serif; }
.error-404 p { color: #999; margin: 10px 0 22px; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); position: absolute !important; overflow: hidden; width: 1px; height: 1px; }

/* ============ 小工具（区块类型） ============ */
.side-box.widget_block { padding: 0; }
.widget_block .wp-block-group,
.widget_block > * { margin: 0; }
.widget_block h2,
.side-wg-title {
    background: linear-gradient(180deg, #fdf3f2, #fff);
    border-bottom: 2px solid #c8161e;
    padding: 9px 15px 7px !important;
    font-size: 16px !important;
    font-weight: 700;
    color: #b51212;
    margin: 0 !important;
    line-height: 1.5;
}
.widget_block ul {
    list-style: none;
    margin: 0 !important;
    padding: 6px 15px 12px !important;
}
.widget_block ul li {
    padding: 8px 2px;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.widget_block ul li:last-child { border-bottom: 0; }
.widget_block ul li a { color: #444; }
.widget_block ul li a:hover { color: #c8161e; }
.widget_block ul li .post-count,
.widget_block ul li .count { color: #aaa; font-size: 12px; }
.widget_block ul.wp-block-latest-posts li { white-space: normal; line-height: 1.7; }
.widget_block ul.wp-block-latest-posts li a { font-size: 14px; }
.widget_block ul.wp-block-latest-posts__post-date { color: #bbb; font-size: 12px; }
.widget_block ul.wp-block-latest-comments li {
    white-space: normal;
    line-height: 1.7;
}
.widget_block .wp-block-latest-comments__comment-author,
.widget_block .wp-block-latest-comments__comment-link { font-size: 14px; }

/* 搜索区块小工具 */
.side-box .wp-block-search { display: flex; padding: 10px 15px; }
.side-box .wp-block-search__input {
    flex: 1; min-width: 0; height: 36px; border: 2px solid #ddd; border-right: 0;
    padding: 0 10px; font-size: 13px; outline: none; margin: 0;
}
.side-box .wp-block-search__input:focus { border-color: #c8161e; }
.side-box .wp-block-search__button {
    width: 66px; height: 36px; border: 0; background: #c8161e; color: #fff;
    cursor: pointer; font-size: 14px; padding: 0; margin: 0;
}
.side-box .wp-block-search__button:hover { background: #a30f0f; }
.side-box .wp-block-search__label { display: none; }

/* ============ 测算工具页 ============ */
.tool-head { text-align: center; padding: 10px 0 4px; }
.tool-head h1 { font-size: 28px; color: #b51212; font-family: "KaiTi", "STKaiti", serif; letter-spacing: 2px; }
.tool-head p { color: #999; font-size: 14px; margin-top: 8px; }
.tool-form { background: #fbf7f6; border: 1px solid #f0dedb; border-radius: 8px; padding: 22px 20px; margin: 18px 0; }
.tf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; justify-content: center; }
.tf-row label { font-size: 14px; color: #666; white-space: nowrap; }
.tf-row select, .tf-row input[type="text"], .tf-row input[type="date"] {
    height: 40px; border: 1px solid #ddd; border-radius: 5px; padding: 0 10px;
    font-size: 14px; color: #444; background: #fff; outline: none; min-width: 110px;
}
.tf-row select:focus, .tf-row input:focus { border-color: #c8161e; }
.tf-tip { text-align: center; color: #888; font-size: 14px; }
.tool-btn {
    display: block; margin: 18px auto 0; padding: 12px 46px;
    background: linear-gradient(180deg, #d8261c, #b51212); color: #fff;
    border: 0; border-radius: 24px; font-size: 16px; font-weight: 600;
    letter-spacing: 4px; cursor: pointer; box-shadow: 0 3px 8px rgba(200, 22, 30, .3);
}
.tool-btn:hover { background: linear-gradient(180deg, #c0130c, #96090b); }
.tool-btn:disabled { opacity: .6; cursor: wait; }
.tool-output { margin-top: 8px; }
.tool-loading, .tool-error { text-align: center; color: #999; padding: 30px 0; font-size: 14px; }
.tool-error { color: #c8161e; }
.tool-result { border: 1px solid #f0dedb; border-radius: 8px; padding: 20px; margin-top: 6px; animation: fadein .35s; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tool-result h3 { text-align: center; font-size: 20px; color: #b51212; margin-bottom: 6px; }
.tool-result h4 { font-size: 15px; color: #555; margin: 12px 0 6px; }
.tr-sub { text-align: center; color: #888; font-size: 13px; margin-bottom: 14px; }

/* 八字表格 */
.bazi-table, .grid-table, .hl-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.bazi-table th, .bazi-table td, .grid-table th, .grid-table td, .hl-table th, .hl-table td {
    border: 1px solid #eee; padding: 9px 6px; text-align: center; color: #555;
}
.bazi-table th, .grid-table th { background: #fbf7f6; color: #b51212; font-weight: 600; }
.bazi-table td.tz { color: #b51212; font-weight: 700; font-size: 16px; }
.bazi-table tr td:first-child, .grid-table tr td:first-child { color: #999; }
.gt-brief { font-size: 12px; color: #999; text-align: left; padding-left: 10px; }
.lk-j { color: #2e7d32; font-weight: 700; }
.lk-x { color: #c8161e; font-weight: 700; }
.lk-b { color: #e65100; font-weight: 700; }

/* 评分环 */
.score-ring {
    width: 108px; height: 108px; border-radius: 50%; margin: 14px auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 6px solid; background: #fff;
}
.score-ring span { font-size: 34px; font-weight: 700; line-height: 1.1; }
.score-ring em { font-style: normal; font-size: 13px; color: #999; }
.ring-a { border-color: #2e7d32; color: #2e7d32; }
.ring-b { border-color: #2e7d32aa; color: #2e7d32; }
.ring-c { border-color: #e65100; color: #e65100; }
.ring-d { border-color: #c8161e; color: #c8161e; }

/* 五行条 */
.wx-bars { margin: 8px 0 4px; }
.wx-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wx-name { width: 22px; color: #666; font-weight: 600; }
.wx-track { flex: 1; height: 12px; border-radius: 6px; background: #f0f0f0; overflow: hidden; }
.wx-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #d8261c, #b51212); }
.wx-木 { background: linear-gradient(90deg, #43a047, #2e7d32); }
.wx-火 { background: linear-gradient(90deg, #f4511e, #d84315); }
.wx-土 { background: linear-gradient(90deg, #8d6e63, #6d4c41); }
.wx-金 { background: linear-gradient(90deg, #f9a825, #f57f17); }
.wx-水 { background: linear-gradient(90deg, #1e88e5, #1565c0); }
.wx-num { width: 18px; text-align: center; color: #888; font-size: 13px; }
.wx-none .wx-fill { background: repeating-linear-gradient(45deg, #eee, #eee 4px, #f8f8f8 4px, #f8f8f8 8px); }

/* 起名卡片 */
.name-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.name-card { border: 1px solid #f0dedb; border-radius: 8px; padding: 14px; background: #fffaf9; }
.nc-name { font-size: 22px; font-weight: 700; color: #333; font-family: "KaiTi", serif; letter-spacing: 2px; }
.nc-score { display: inline-block; margin: 6px 0 4px; font-size: 13px; font-weight: 700; color: #2e7d32; }
.nc-score.ring-c { color: #e65100; }
.nc-wx { font-size: 12px; color: #aaa; margin-bottom: 4px; }
.nc-mean { font-size: 13px; color: #777; }

/* 卦象 */
.gua-box { display: flex; justify-content: center; margin: 14px 0; }
.gua-col h4 { text-align: center; color: #b51212; }
.yao-row { display: flex; align-items: center; gap: 12px; padding: 3px 0; }
.yao-pos { width: 72px; text-align: right; font-size: 12px; color: #aaa; }
.yao-line { display: flex; gap: 8px; }
.y { width: 110px; height: 9px; background: #333; border-radius: 2px; }
.y.yin { width: 51px; }
.yao-mark { width: 20px; color: #c8161e; font-weight: 700; }
.gua-info p { margin: 6px 0; font-size: 14px; color: #555; }
.gua-info strong { color: #b51212; }

/* 签文 */
.qian-grade { text-align: center; font-size: 18px; font-weight: 700; margin: 4px 0; }
.qg-hao { color: #c8161e; }
.qg-zhong { color: #e65100; }
.qg-huai { color: #555; }
.qian-title { text-align: center; font-size: 15px; color: #999; }
.qian-poem {
    text-align: center; font-family: "KaiTi", serif; font-size: 19px; line-height: 2.1;
    color: #333; margin: 14px auto; max-width: 420px; letter-spacing: 1px;
}

/* 黄历 */
.hl-table tr td:first-child { width: 110px; background: #fbf7f6; }
.hl-yi { color: #2e7d32 !important; }
.hl-ji { color: #c8161e !important; }

/* 星座 */
.xz-match { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 14px 0; }
.xz-score { font-size: 52px; font-weight: 700; color: #d8261c; line-height: 1; }
.xz-score small { font-size: 20px; }
.xz-label { font-size: 18px; color: #555; font-weight: 600; }
.xz-pair-info p { font-size: 14px; color: #666; margin: 6px 0; }
.xz-fortune { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.xz-f-item { border: 1px solid #f0dedb; border-radius: 8px; padding: 12px; }
.xz-f-name { font-weight: 700; color: #b51212; margin-bottom: 8px; }
.xz-f-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; color: #777; }
.xz-f-row span { width: 34px; }
.xz-f-row b { width: 26px; text-align: right; color: #555; }

/* 解梦 */
.dream-item { border-bottom: 1px dashed #eee; padding: 10px 0; }
.dream-item:last-of-type { border-bottom: 0; }
.dream-item h4 { color: #b51212; margin: 4px 0; }
.dream-item p { font-size: 14px; color: #666; }

.tool-note {
    background: #fbf7f6; border-left: 3px solid #d8261c; border-radius: 4px;
    padding: 10px 14px; margin-top: 14px; font-size: 13px; color: #888; line-height: 1.9;
}
.tool-note strong { color: #b51212; }

/* ============ 作者卡（E-E-A-T） ============ */
.author-card {
    display: flex; gap: 14px; align-items: flex-start;
    background: #fff; border-radius: 6px; padding: 16px 18px; margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05); border-left: 4px solid #c8161e;
}
.author-card .ac-avatar {
    width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #d8261c, #a30f0f); color: #ffe9c8;
    font-size: 24px; font-weight: 700; font-family: "KaiTi", serif;
    display: flex; align-items: center; justify-content: center;
}
.author-card .ac-name { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 4px; }
.author-card .ac-name span {
    font-size: 11px; font-weight: 400; color: #b51212; background: #fdf3f2;
    border: 1px solid #f0dedb; border-radius: 3px; padding: 1px 8px; margin-left: 8px; vertical-align: 2px;
}
.author-card p { font-size: 13px; color: #888; line-height: 1.8; }

/* ============ 响应式 ============ */
@media (max-width: 980px) {
    .main-area { flex-direction: column; align-items: stretch; }
    .content-col { width: 100%; min-width: 0; }
    .sidebar-col { width: 100%; position: static; }
    .home-cols .post-list { column-count: 1; }
    .today-hl { flex-wrap: wrap; }
    .tool-entry li { width: 25%; }
    .main-nav ul { flex-wrap: wrap; }
    .main-nav li { flex: 1 1 25%; }
    .header-search { display: none; }
    .article-box { padding: 20px 18px 25px; }
    .entry-content { font-size: 15px; }
    .name-grid { grid-template-columns: 1fr; }
    .xz-fortune { grid-template-columns: 1fr; }
    .y { width: 90px; }
    .y.yin { width: 41px; }
    .tf-row select, .tf-row input[type="text"], .tf-row input[type="date"] { min-width: 0; flex: 1; }
}
