/* ===== 歇后语模块 · 说书茶馆·夜谈褐金 ===== */

body.xhy-page {
    --xh-bg-deep: #150d05;
    --xh-bg: #1f1408;
    --xh-bg-2: #2e1e0c;
    --xh-paper: #f2e7cd;
    --xh-paper-2: #e3d4ae;
    --xh-ink: #2a1a09;
    --xh-ink-soft: #6d5734;
    --xh-gold: #e8b552;
    --xh-gold-light: #f7dc9c;
    --xh-red: #c0442c;
    --xh-text: #ecdfc4;
    --xh-text-dim: rgba(236, 223, 196, 0.62);

    background:
        radial-gradient(1100px 560px at 50% -8%, rgba(232, 181, 82, 0.14), transparent 62%),
        radial-gradient(900px 500px at 12% 105%, rgba(192, 68, 44, 0.08), transparent 60%),
        linear-gradient(180deg, var(--xh-bg-deep) 0%, var(--xh-bg) 42%, var(--xh-bg-2) 100%);
    background-attachment: fixed;
    color: var(--xh-text);
}

/* ===== 页面容器 ===== */
body.xhy-page .article-wrapper {
    max-width: 1000px;
}

/* ===== 与全站共用框架的配色统一 ===== */
body.xhy-page .top-bar {
    background: rgba(21, 13, 5, 0.95);
    border-bottom-color: rgba(232, 181, 82, 0.22);
}

body.xhy-page .footer {
    background: rgba(12, 8, 3, 0.88);
    border-top-color: rgba(232, 181, 82, 0.22);
}

body.xhy-page .place {
    color: var(--xh-text-dim);
}

body.xhy-page .place strong {
    color: var(--xh-text);
}

body.xhy-page .place a {
    color: var(--xh-gold);
}

/* ===== 题头：茶馆灯笼 ===== */
.xh-masthead {
    padding: 46px 20px 10px;
    text-align: center;
}

.xh-masthead-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    max-width: 1000px;
    margin: 0 auto;
}

.xh-lantern {
    width: 34px;
    height: 40px;
    flex: 0 0 34px;
    border-radius: 46% 46% 42% 42% / 38% 38% 58% 58%;
    background: radial-gradient(circle at 36% 28%, var(--xh-gold-light), var(--xh-gold) 52%, #a8761f 100%);
    box-shadow: 0 0 22px rgba(232, 181, 82, 0.45);
    position: relative;
}

.xh-lantern::before,
.xh-lantern::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 13px;
    height: 3px;
    background: var(--xh-gold);
    border-radius: 2px;
}

.xh-lantern::before { top: -5px; }
.xh-lantern::after { bottom: -5px; }

.xh-masthead-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 8px;
    background: linear-gradient(135deg, var(--xh-gold-light), var(--xh-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.xh-masthead-byline {
    margin-top: 10px;
    font-size: 14px;
    color: var(--xh-text-dim);
    letter-spacing: 2px;
}

.xh-rule {
    height: 2px;
    max-width: 1000px;
    margin: 26px auto 0;
    background: linear-gradient(90deg, transparent, var(--xh-gold), transparent);
    opacity: 0.65;
}

.xh-rule-sub {
    height: 1px;
    max-width: 1000px;
    margin: 6px auto 0;
    background: linear-gradient(90deg, transparent, rgba(232, 181, 82, 0.35), transparent);
}

.xh-masthead-tail {
    height: 34px;
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== 引子卡（前半句） ===== */
.xh-setup {
    background:
        radial-gradient(600px 200px at 80% -20%, rgba(232, 181, 82, 0.16), transparent 65%),
        linear-gradient(160deg, var(--xh-paper) 0%, var(--xh-paper-2) 100%);
    border-radius: 14px;
    padding: 34px 40px 30px;
    position: relative;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(232, 181, 82, 0.45);
    overflow: hidden;
}

.xh-setup::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--xh-gold), #a8761f);
}

.xh-setup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-left: 10px;
}

.xh-setup-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #8a6a1e;
    background: rgba(232, 181, 82, 0.2);
    border: 1px solid rgba(232, 181, 82, 0.42);
    border-radius: 999px;
    padding: 4px 14px;
}

.xh-setup-no {
    font-size: 13px;
    color: var(--xh-ink-soft);
    letter-spacing: 1px;
}

.xh-setup-text {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.65;
    color: var(--xh-ink);
    padding-left: 10px;
    word-break: break-word;
}

.xh-setup-cat {
    margin-top: 20px;
    padding-left: 10px;
    font-size: 13px;
    color: var(--xh-ink-soft);
}

.xh-setup-cat i {
    margin-right: 5px;
    color: #a8761f;
}

/* ===== 醒木衔接 ===== */
.xh-clack {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0 20px;
}

.xh-clack-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 181, 82, 0.5), transparent);
}

.xh-clack-mark {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--xh-gold);
    white-space: nowrap;
}

.xh-clack-mark i {
    opacity: 0.85;
}

/* ===== 答案卡（后半句） ===== */
.xh-answer {
    position: relative;
    background:
        radial-gradient(700px 240px at 15% 0%, rgba(232, 181, 82, 0.16), transparent 65%),
        linear-gradient(150deg, rgba(31, 20, 8, 0.95), rgba(46, 30, 12, 0.95));
    border: 1px solid rgba(232, 181, 82, 0.38);
    border-radius: 14px;
    padding: 30px 36px 28px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
    overflow: hidden;
}

.xh-answer::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(232, 181, 82, 0.16);
    border-radius: 9px;
    pointer-events: none;
}

.xh-answer-seal {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 54px;
    height: 54px;
    border: 2px solid var(--xh-red);
    border-radius: 8px;
    color: var(--xh-red);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-12deg);
    opacity: 0.92;
    background: rgba(192, 68, 44, 0.07);
    z-index: 2;
}

.xh-answer-body {
    position: relative;
    z-index: 1;
}

.xh-answer-label {
    font-size: 12px;
    letter-spacing: 4px;
    color: rgba(232, 181, 82, 0.75);
    margin-bottom: 10px;
}

.xh-answer-main {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--xh-gold-light);
    text-shadow: 0 2px 12px rgba(232, 181, 82, 0.25);
    padding-right: 74px;
    word-break: break-word;
}

.xh-answer-more {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed rgba(232, 181, 82, 0.28);
}

.xh-more-label {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--xh-red);
    border: 1px solid rgba(192, 68, 44, 0.5);
    border-radius: 999px;
    padding: 3px 12px;
    margin-bottom: 10px;
}

.xh-more-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.xh-more-list li {
    position: relative;
    padding-left: 18px;
    font-size: 17px;
    line-height: 1.9;
    color: var(--xh-text);
}

.xh-more-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--xh-gold);
    opacity: 0.8;
}

/* ===== 卷尾信息 ===== */
.xh-meta {
    margin-top: 24px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--xh-text-dim);
}

.xh-meta i {
    margin-right: 5px;
    opacity: 0.7;
}

.xh-disclaimer {
    margin-top: 18px;
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--xh-text-dim);
    background: rgba(0, 0, 0, 0.22);
    border-left: 3px solid rgba(232, 181, 82, 0.45);
    border-radius: 0 8px 8px 0;
}

.xh-disclaimer i {
    margin-right: 6px;
    color: var(--xh-gold);
}

/* ===== 上下篇导航 ===== */
.xh-nav {
    margin-top: 30px;
    display: flex;
    gap: 18px;
}

.xh-nav-item {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(232, 181, 82, 0.2);
    border-radius: 10px;
    padding: 14px 18px;
    transition: all 0.25s;
}

.xh-nav-item:hover {
    background: rgba(232, 181, 82, 0.1);
    border-color: rgba(232, 181, 82, 0.45);
}

.xh-nav-label {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--xh-gold);
    margin-bottom: 6px;
}

.xh-nav-item a {
    display: block;
    font-size: 15px;
    color: var(--xh-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xh-nav-item a:hover {
    color: var(--xh-gold-light);
}

.xh-nav-item:nth-child(2) {
    text-align: right;
}

/* ===== 操作条 ===== */
.xh-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.xh-act {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s;
    border: 1px solid transparent;
}

.xh-act-primary {
    background: linear-gradient(135deg, var(--xh-gold), #b3801f);
    color: #241705;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(232, 181, 82, 0.28);
}

.xh-act-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(232, 181, 82, 0.4);
}

.xh-act-ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(232, 181, 82, 0.3);
    color: var(--xh-text);
}

.xh-act-ghost:hover {
    background: rgba(232, 181, 82, 0.12);
    color: var(--xh-gold-light);
}

/* ===== 搜索表单 ===== */
.xh-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.xh-search-input {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
    border-radius: 8px;
    border: 1px solid rgba(232, 181, 82, 0.28);
    background: rgba(0, 0, 0, 0.3);
    color: var(--xh-text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.25s;
}

.xh-search-input::placeholder {
    color: rgba(236, 223, 196, 0.38);
}

.xh-search-input:focus {
    border-color: rgba(232, 181, 82, 0.65);
}

.xh-search-btn {
    padding: 11px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--xh-gold), #b3801f);
    color: #241705;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.xh-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 181, 82, 0.3);
}

.xh-result-count {
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--xh-text-dim);
}

.xh-result-count strong {
    color: var(--xh-gold-light);
}

/* ===== 列表页 ===== */
.xh-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.xh-card {
    display: flex;
    background:
        radial-gradient(420px 140px at 85% -30%, rgba(232, 181, 82, 0.16), transparent 65%),
        linear-gradient(160deg, rgba(242, 231, 205, 0.97), rgba(227, 212, 174, 0.97));
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(232, 181, 82, 0.4);
    transition: transform 0.25s, box-shadow 0.25s;
}

.xh-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

.xh-card-main {
    flex: 1;
    min-width: 0;
    padding: 16px 20px 14px;
}

.xh-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.xh-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 3px 11px;
    border-radius: 999px;
    background: rgba(42, 26, 9, 0.07);
    border: 1px solid rgba(42, 26, 9, 0.14);
    color: var(--xh-ink-soft);
}

.xh-cat i {
    font-size: 11px;
}

.xh-cat-animal   { color: #7a5a1c; border-color: rgba(160, 120, 40, 0.4); background: rgba(196, 150, 60, 0.16); }
.xh-cat-person   { color: #7c3d2a; border-color: rgba(192, 68, 44, 0.35); background: rgba(192, 68, 44, 0.12); }
.xh-cat-life     { color: #6a5320; border-color: rgba(160, 130, 50, 0.35); background: rgba(190, 160, 70, 0.14); }
.xh-cat-nature   { color: #2f5a4a; border-color: rgba(60, 130, 100, 0.35); background: rgba(70, 140, 110, 0.14); }
.xh-cat-study    { color: #35507a; border-color: rgba(70, 110, 170, 0.35); background: rgba(80, 120, 180, 0.14); }
.xh-cat-work     { color: #5c4a72; border-color: rgba(120, 100, 160, 0.35); background: rgba(130, 110, 170, 0.14); }
.xh-cat-family   { color: #7a4a2c; border-color: rgba(170, 105, 55, 0.35); background: rgba(180, 120, 70, 0.14); }
.xh-cat-food     { color: #8a5a20; border-color: rgba(190, 125, 40, 0.35); background: rgba(200, 140, 55, 0.14); }
.xh-cat-festival { color: #a33a2c; border-color: rgba(192, 68, 44, 0.4); background: rgba(192, 68, 44, 0.16); }
.xh-cat-folk     { color: var(--xh-ink-soft); }

.xh-card-no {
    font-size: 12px;
    color: rgba(109, 87, 52, 0.65);
    letter-spacing: 1px;
}

.xh-card-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--xh-ink);
    text-decoration: none;
    word-break: break-word;
}

.xh-card-title:hover {
    color: #8a6a1e;
}

.xh-card-answer {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 16px;
    line-height: 1.7;
    color: #8a5f14;
}

.xh-dash {
    flex: 0 0 auto;
    color: rgba(138, 95, 20, 0.6);
}

.xh-card-answer-text {
    word-break: break-word;
}

.xh-card-alt {
    margin-left: 8px;
    font-size: 12px;
    color: rgba(109, 87, 52, 0.7);
    white-space: nowrap;
}

.xh-card-foot {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(109, 87, 52, 0.7);
}

.xh-card-foot i {
    margin-right: 4px;
    opacity: 0.6;
}

.xh-card-go {
    color: #8a6a1e;
    font-weight: 600;
}

.xh-highlight {
    background: rgba(232, 181, 82, 0.42);
    color: #7a5f16;
    border-radius: 3px;
    padding: 0 2px;
}

.xh-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--xh-text-dim);
}

.xh-empty i {
    font-size: 40px;
    color: rgba(232, 181, 82, 0.45);
    margin-bottom: 16px;
    display: block;
}

.xh-empty strong {
    color: var(--xh-gold-light);
}

.xh-empty-sub {
    margin-top: 10px;
    font-size: 13px;
}

/* ===== 分页 ===== */
body.xhy-page .pagination-wrapper {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

body.xhy-page .page-info {
    font-size: 13px;
    color: var(--xh-text-dim);
}

body.xhy-page .page-info strong {
    color: var(--xh-gold-light);
}

body.xhy-page .page-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

body.xhy-page .page-btn,
body.xhy-page .page-num {
    display: inline-block;
    min-width: 34px;
    padding: 7px 13px;
    text-align: center;
    border-radius: 7px;
    border: 1px solid rgba(232, 181, 82, 0.25);
    background: rgba(255, 255, 255, 0.04);
    color: var(--xh-text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

body.xhy-page .page-btn:hover,
body.xhy-page .page-num:hover {
    background: rgba(232, 181, 82, 0.14);
    border-color: rgba(232, 181, 82, 0.5);
    color: var(--xh-gold-light);
}

body.xhy-page .page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

body.xhy-page .page-num.active {
    background: linear-gradient(135deg, var(--xh-gold), #b3801f);
    border-color: var(--xh-gold);
    color: #241705;
    font-weight: 700;
}

body.xhy-page .page-dots {
    padding: 0 4px;
    color: var(--xh-text-dim);
}

/* ===== 返回顶部 ===== */
.xhy-page .back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--xh-gold), #b98f34);
    color: #241705;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
    transition: all 0.25s;
    z-index: 999;
}

.xhy-page .back-to-top:hover {
    background: var(--xh-gold-light);
    transform: translateY(-3px);
}

.xhy-page .back-to-top.show {
    display: flex;
}

/* ===== 404 ===== */
.xh-404-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 60px 24px;
    text-align: center;
}

.xh-404-code {
    font-size: 108px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--xh-gold-light), var(--xh-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.xh-404-seal {
    display: inline-block;
    margin-top: 20px;
    padding: 7px 18px;
    border: 2px solid var(--xh-red);
    border-radius: 8px;
    color: var(--xh-red);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    transform: rotate(-4deg);
    background: rgba(192, 68, 44, 0.07);
}

.xh-404-title {
    margin-top: 14px;
    font-size: 25px;
    font-weight: 700;
    color: var(--xh-gold-light);
    letter-spacing: 2px;
}

.xh-404-desc {
    margin-top: 18px;
    font-size: 15px;
    line-height: 2;
    color: var(--xh-text-dim);
}

.xh-404-desc p {
    margin-bottom: 8px;
}

.xh-404-q {
    color: var(--xh-text);
    font-size: 17px;
    font-weight: 700;
}

.xh-404-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.xh-404-search {
    margin-top: 26px;
    display: flex;
    gap: 10px;
}

.xh-404-links {
    margin-top: 34px;
    text-align: left;
}

.xh-404-links h3 {
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--xh-gold);
    margin-bottom: 12px;
    text-align: center;
}

.xh-404-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.xh-404-grid a {
    display: block;
    padding: 9px 12px;
    border-radius: 7px;
    background: rgba(232, 181, 82, 0.07);
    border: 1px solid rgba(232, 181, 82, 0.16);
    color: var(--xh-text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.xh-404-grid a:hover {
    background: rgba(232, 181, 82, 0.15);
    border-color: rgba(232, 181, 82, 0.4);
    color: var(--xh-gold-light);
}

.xh-404-foot {
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid rgba(232, 181, 82, 0.18);
    font-size: 13px;
    color: rgba(236, 223, 196, 0.45);
}

.xh-404-foot a {
    color: var(--xh-gold);
    text-decoration: none;
}

.xh-404-foot a:hover {
    color: var(--xh-gold-light);
}

/* ===== 响应式 ===== */
@media (max-width: 860px) {
    .xh-list {
        grid-template-columns: 1fr;
    }

    .xh-masthead-title {
        font-size: 30px;
        letter-spacing: 5px;
    }

    .xh-setup {
        padding: 26px 22px 22px;
    }

    .xh-setup-text {
        font-size: 22px;
    }

    .xh-answer {
        padding: 24px 20px;
    }

    .xh-answer-main {
        font-size: 22px;
        padding-right: 0;
    }

    .xh-answer-seal {
        position: static;
        transform: rotate(-8deg);
        margin-bottom: 12px;
        width: 44px;
        height: 44px;
        font-size: 19px;
    }

    .xh-nav {
        flex-direction: column;
    }

    .xh-nav-item:nth-child(2) {
        text-align: left;
    }

    .xh-404-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .xh-404-code {
        font-size: 78px;
    }

    .xh-404-title {
        font-size: 21px;
    }

    .xh-search-form,
    .xh-404-search {
        flex-wrap: wrap;
    }

    .xh-search-input {
        flex: 1 1 100%;
    }
}
