/* 暖愈星球 · 暖色极简主题 */
:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --ink: #3c3530;
    --muted: #8b7f75;
    --brand: #ff7700;
    --brand-dark: #d95f00;
    --brand-soft: #fff0e3;
    --brand-rgb: 255, 119, 0;
    --bg-rgb: 255, 255, 255;
    --sage: #8aa88f;
    --line: #ececec;
    --shadow: 0 12px 32px rgba(45, 38, 32, .06);
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.wrap {
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
}

/* 顶部导航 */
.site-header {
    position: relative;
    z-index: 10;
    background: #fff;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 88px;
}

.header-nav {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* 顶部搜索 */
.head-search {
    display: flex;
    align-items: center;
    flex: 0 1 420px;
    height: 42px;
    margin-left: auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.head-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    background: transparent;
    border: 0;
    outline: 0;
}

.head-search input::placeholder {
    color: #b3a79c;
}

.head-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 50px;
    height: 100%;
    padding: 0;
    color: #fff;
    background: var(--brand);
    border: 0;
    cursor: pointer;
    transition: background .2s;
}

.head-search button:hover {
    background: var(--brand-dark);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-mark {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #ffc48a, var(--brand) 62%, #c85a00);
    box-shadow: 0 6px 16px rgba(var(--brand-rgb), .35);
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(var(--brand-rgb), .24);
    border-radius: 50%;
}

.brand-name {
    display: block;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.3;
}

.brand-slogan {
    display: block;
    color: var(--muted);
    font-size: 11.5px;
    letter-spacing: .06em;
    line-height: 1.4;
}

.site-nav {
    min-width: 0;
}

.site-nav ul {
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}

.site-nav li + li {
    border-left: 1px solid var(--line);
}

.site-nav a {
    display: block;
    padding: 14px 6px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
    white-space: nowrap;
    transition: color .2s, background .2s;
}

.site-nav a:hover {
    color: var(--brand-dark);
    background: #fcfcfc;
}

.site-nav a.is-active {
    color: var(--brand-dark);
    font-weight: 600;
}

/* 心理问答：子分类下拉 */
.site-nav li {
    position: relative;
}

.nav-qa > .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: .55;
    transition: transform .2s;
}

.nav-qa:hover .nav-caret,
.nav-qa:focus-within .nav-caret {
    transform: rotate(180deg);
}

.site-nav .nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 6px 0;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 0;
    box-shadow: 0 16px 30px rgba(45, 38, 32, .08);
}

.nav-qa:hover .nav-sub,
.nav-qa:focus-within .nav-sub {
    display: flex;
}

/* 移动端导航：所有分类简约文字，自动换行 */
.nav-mobile {
    display: none;
}

.site-nav .nav-sub li {
    flex: none;
    width: 100%;
    text-align: left;
}

.nav-sub li + li {
    border-left: 0;
}

.nav-sub a {
    padding: 9px 14px;
    color: var(--ink);
    font-size: 14px;
    text-align: left;
}

.nav-sub a:hover {
    background: #fcfcfc;
}

.nav-sub a.is-active {
    color: var(--brand-dark);
    font-weight: 600;
}

/* 首页头部 */
.hero-kicker {
    margin: 0 0 16px;
    color: var(--brand);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .22em;
}


.hero-lead {
    max-width: 32em;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.hero-search {
    display: flex;
    max-width: 540px;
    margin-top: 32px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    outline: none;
}

.hero-search input::placeholder {
    color: #b9aca0;
}

.hero-search button {
    padding: 11px 28px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.hero-search button:hover {
    background: var(--brand-dark);
}

/* 列表页标题 */
.page-head {
    padding: 56px 0 4px;
}

.page-head h1 {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.4;
}

/* 内容区 */
.section {
    padding: 40px 0 64px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: .02em;
}

.section-note {
    color: var(--muted);
    font-size: 13px;
}

.post-list {
    display: grid;
    gap: 18px;
}

.post-card {
    padding: 26px 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.post-card:hover {
    border-color: #dedede;
    box-shadow: none;
}

.post-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 600;
}

.pill-top {
    background: #f2f5f2;
    color: #67836c;
}

.post-date {
    color: var(--muted);
    font-size: 12.5px;
}

.post-card h3 {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.5;
}

.post-card h3 a {
    transition: color .2s;
}

.post-card h3 a:hover {
    color: var(--brand);
}

.post-intro {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.85;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: #a2958a;
    font-size: 12.5px;
}

.dot {
    color: #c9bdb2;
}

.empty {
    padding: 68px 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}

/* 404 */
.error-404 {
    max-width: 720px;
    padding: 92px 0 80px;
    text-align: center;
}

.error-kicker {
    margin: 0 0 14px;
    color: var(--brand);
    font-size: 13px;
    letter-spacing: .14em;
}

.error-404 h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.25;
}

.error-lead {
    max-width: 520px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.8;
}

.error-search {
    display: flex;
    max-width: 480px;
    margin: 30px auto 0;
    padding: 5px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.error-search input {
    flex: 1;
    min-width: 0;
    padding: 0 18px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14.5px;
    outline: none;
}

.error-search input::placeholder {
    color: #b9aca0;
}

.error-search button {
    padding: 10px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.error-search button:hover {
    background: var(--brand-dark);
}

.error-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.error-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    font-size: 14px;
    transition: color .2s, border-color .2s, background .2s;
}

.error-link:hover {
    border-color: var(--brand);
    color: var(--brand-dark);
}

.error-link--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.error-link--primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.error-recent {
    margin-top: 56px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.error-recent h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.error-recent ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.error-recent li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.error-recent li:last-child {
    border-bottom: 0;
}

.error-recent a {
    color: var(--ink);
    transition: color .2s;
}

.error-recent a:hover {
    color: var(--brand);
}

.error-recent time {
    flex: none;
    color: #a2958a;
    font-size: 12.5px;
}

@media (max-width: 560px) {
    .error-404 {
        padding: 64px 0 56px;
    }

    .error-search input {
        padding: 0 14px;
        font-size: 14px;
    }

    .error-search button {
        padding: 10px 18px;
        font-size: 14px;
    }

    .error-recent {
        margin-top: 44px;
    }
}

/* 分页 */
.pagebar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 42px;
}

.pagebar a,
.pagebar .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 14px;
}

.pagebar a:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.pagebar .current {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}

/* 文章页 */
.single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 44px;
    align-items: start;
}

.single-main {
    max-width: 780px;
    margin: 0 auto;
    min-width: 0;
}

.single-layout .single-main {
    max-width: none;
    margin: 0;
}

.single-layout .related-section {
    width: auto;
    margin: 0;
}

.article {
    max-width: 780px;
    padding: 62px 0 24px;
}

/* 侧栏热门文章 */
.side-col {
    position: sticky;
    top: 24px;
    padding-top: 62px;
}

.side-card {
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.side-card + .side-card {
    margin-top: 18px;
}

.side-card-title {
    margin: 0 0 4px;
    font-size: 16px;
    letter-spacing: .02em;
}

.side-hot-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.side-hot-list li + li {
    border-top: 1px solid var(--line);
}

.side-hot-list a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
}

.side-hot-list a:hover strong {
    color: var(--brand);
}

.side-hot-rank {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    border-radius: 6px;
    background: rgba(var(--brand-rgb), .1);
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.side-hot-list li:nth-child(-n+3) .side-hot-rank {
    background: var(--brand);
    color: #fff;
}

.side-hot-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.side-hot-body strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color .2s;
}

.side-hot-meta {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1000px) {
    .single-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .side-col {
        position: static;
        max-width: 780px;
        margin: 0 auto;
        padding-top: 8px;
    }
}

.article-head h1 {
    margin: 14px 0 18px;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.4;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13.5px;
}

.article-body {
    margin-top: 38px;
    color: #453d36;
    font-size: 17px;
    line-height: 1.95;
    word-wrap: break-word;
}

.article-body > *:first-child {
    margin-top: 0;
}

.article-body p {
    margin: 1.15em 0;
}

.article-body h2 {
    margin: 1.8em 0 .7em;
    font-size: 24px;
    line-height: 1.5;
}

.article-body h3 {
    margin: 1.6em 0 .6em;
    font-size: 20px;
    line-height: 1.5;
}

.article-body a {
    color: var(--brand-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body blockquote {
    margin: 1.6em 0;
    padding: 18px 22px;
    border-left: 3px solid var(--brand);
    border-radius: 0 14px 14px 0;
    background: #fafafa;
    color: #6f6157;
}

.article-body img {
    border-radius: 16px;
}

.article-body code {
    padding: .15em .4em;
    border-radius: 6px;
    background: #f4f4f4;
    font-size: .9em;
}

.article-body pre {
    overflow: auto;
    padding: 18px 20px;
    border-radius: 12px;
    background: #3c3530;
    color: #f9f3ed;
}

.article-body pre code {
    padding: 0;
    background: transparent;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
}

.article-body th,
.article-body td {
    padding: 10px 12px;
    border: 1px solid var(--line);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.article-tags a {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
}

.article-tags a:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.article-nav {
    display: grid;
    max-width: 780px;
    gap: 12px;
    padding: 8px 0 0;
}

.article-nav a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
}

.article-nav a:hover {
    border-color: var(--brand);
}

.article-nav strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
}

/* 评论 */
.comments-wrap {
    max-width: 780px;
    padding-top: 8px;
    padding-bottom: 80px;
}

.msg {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.msghead {
    margin-bottom: 18px;
    border: 0;
}

.msghead .tbname {
    list-style: none;
    font-weight: 600;
}

.msgname {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    color: var(--muted);
    font-size: 13px;
}

.msgname .avatar {
    border-radius: 50%;
}

.msgname small {
    color: var(--muted);
}

.commentname a {
    color: var(--ink);
    font-weight: 600;
}

.msgarticle {
    margin-top: 8px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    list-style: none;
}

.msgarticle .msg {
    margin: 14px 0 0;
}

.post#divCommentPost {
    margin-top: 30px;
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

#divCommentPost .posttop a {
    font-weight: 600;
}

#divCommentPost p {
    margin: 10px 0;
}

#divCommentPost label {
    color: var(--muted);
    font-size: 13px;
}

#divCommentPost input.text,
#divCommentPost textarea.text {
    width: 100%;
    max-width: 360px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    box-sizing: border-box;
}

#divCommentPost textarea.text {
    max-width: 100%;
    min-height: 120px;
    resize: vertical;
}

#divCommentPost .button {
    padding: 10px 26px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

#divCommentPost .button:hover {
    background: var(--brand-dark);
}

/* 底部 */
.site-footer {
    margin-top: 24px;
    padding: 38px 0;
    border-top: 1px solid var(--line);
    background: var(--bg);
    color: var(--muted);
    font-size: 13px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
}

.footer-inner p {
    margin: 0;
}

.footer-brand {
    color: var(--ink);
    font-weight: 600;
    letter-spacing: .04em;
}

.footer-note {
    width: 100%;
    font-size: 12px;
}

/* 响应式 */
@media (max-width: 980px) {
    .header-main {
        min-height: 76px;
        gap: 18px;
    }

    .site-nav {
        display: none;
    }

    .nav-mobile {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px 18px;
        padding: 10px 0;
    }

    .nav-mobile a {
        color: var(--muted);
        font-size: 14px;
        line-height: 1.9;
        white-space: nowrap;
    }

    .nav-mobile a:hover {
        color: var(--brand-dark);
    }

    .nav-mobile a.is-active {
        color: var(--brand-dark);
        font-weight: 600;
    }
}

@media (max-width: 820px) {

    .hero-lead {
        font-size: 15px;
    }

    .post-card {
        padding: 22px;
    }

    .article {
        padding-top: 44px;
    }
}

@media (max-width: 560px) {
    .wrap {
        width: calc(100% - 32px);
    }

    .header-main {
        gap: 12px;
        min-height: 68px;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
    }

    .brand-name {
        font-size: 17px;
    }

    .brand-slogan {
        font-size: 10px;
    }

    .hero-search {
        border-radius: 999px;
    }

    .hero-search input {
        padding: 0 14px;
        font-size: 14px;
    }

    .hero-search button {
        padding: 10px 18px;
        font-size: 14px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .article-body {
        font-size: 16px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========== 分类页 ========== */
.cat-hero {
    position: relative;
    overflow: hidden;
    padding: 44px 0 30px;
}

.cat-hero-inner {
    position: relative;
}

.cat-hero-inner.has-img {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: 32px;
}

.cat-hero-visual {
    position: relative;
}

.cat-hero-visual img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(45, 38, 32, .07);
}

.cat-hero .hero-kicker {
    text-transform: uppercase;
}

.cat-hero h1 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.35;
}

.cat-hero .hero-lead {
    margin-top: 14px;
}

.cat-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.cat-meta .pill {
    font-weight: 600;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.post-grid .post-card {
    height: 100%;
}

/* 分类页文章卡片：小图 + 边框，两列 */
.cate-post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cate-post-grid .post-card {
    height: 100%;
    padding: 18px 20px;
}

.cate-post-grid .post-card.has-thumb {
    gap: 18px;
}

.cate-post-grid .post-thumb {
    flex: 0 0 142px;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
}

.cate-post-grid .post-card-top {
    gap: 8px;
    margin-bottom: 8px;
}

.cate-post-grid .post-card-top a.pill {
    display: none;
}

.cate-post-grid .post-card h3 {
    margin-bottom: 6px;
    font-size: 16.5px;
    line-height: 1.5;
}

.cate-post-grid .post-intro {
    font-size: 13.5px;
    line-height: 1.7;
}

.cate-post-grid .post-meta {
    margin-top: 12px;
    font-size: 12px;
}

@media (max-width: 900px) {
    .cate-post-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .cate-post-grid .post-card {
        padding: 16px;
    }

    .cate-post-grid .post-thumb {
        flex-basis: 110px;
    }
}

/* ========== 分类页问答模块 ========== */
.cate-qa {
    padding: 0 0 56px;
}

.cate-qa-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cate-qa-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color .2s, box-shadow .2s;
}

.cate-qa-item:hover {
    border-color: rgba(var(--brand-rgb), .45);
    box-shadow: 0 8px 20px rgba(45, 38, 32, .05);
}

.cate-qa-tag {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 6px;
    background: rgba(var(--brand-rgb), .1);
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.cate-qa-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.cate-qa-body strong {
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.6;
}

.cate-qa-excerpt {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cate-qa-arrow {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--brand);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .2s, transform .2s;
}

.cate-qa-item:hover .cate-qa-arrow {
    opacity: 1;
    transform: none;
}

.cate-qa-more {
    color: var(--brand);
    font-weight: 500;
}

.cate-qa-more:hover {
    color: var(--brand-dark);
}

@media (max-width: 900px) {
    .cate-qa-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .cate-qa {
        padding-bottom: 40px;
    }

    .cate-qa-item {
        padding: 12px 14px;
    }
}

/* ========== 首页分类模块 ========== */
.cate-show-section {
    padding-top: 8px;
}

.cate-show-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.cate-show-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px 18px 6px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color .2s, box-shadow .2s;
}

.cate-show-card:hover {
    border-color: rgba(var(--brand-rgb), .3);
    box-shadow: none;
}

.cate-show-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 8px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.cate-show-cover {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    overflow: hidden;
    background: var(--brand-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.cate-show-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cate-show-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.cate-show-title h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.4;
}

.cate-show-title h3 a {
    color: var(--ink);
}

.cate-show-title h3 a:hover {
    color: var(--brand);
}

.cate-show-more {
    margin-left: auto;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: .8;
    transition: opacity .2s;
}

.cate-show-more:hover {
    opacity: 1;
}

.cate-show-card .compact-list {
    grid-template-columns: 1fr;
}

.cate-show-card .compact-item {
    padding: 7px 0;
}

.cate-show-card .compact-item-title {
    font-size: 14.5px;
}

.cate-show-card .compact-item-meta {
    font-size: 11.5px;
}

.cate-show-card .compact-item:last-child {
    border-bottom: none;
}

/* ========== 首页问答模块 ========== */
.qa-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.qa-home-card {
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color .2s;
}

.qa-home-card:hover {
    border-color: #dedede;
}

.qa-home-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--line);
}

.qa-home-head h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.qa-home-head h3 a:hover {
    color: var(--brand);
}

.qa-home-more {
    flex: none;
    color: var(--brand);
    font-size: 12.5px;
    white-space: nowrap;
}

.qa-home-more:hover {
    color: var(--brand-dark);
}

.qa-home-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.qa-home-list li + li {
    border-top: 1px dashed var(--line);
}

.qa-home-list a {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 0;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
}

.qa-home-list a:hover {
    color: var(--brand);
}

.qa-home-tag {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 5px;
    background: rgba(var(--brand-rgb), .1);
    color: var(--brand);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.qa-home-empty {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.qa-home-all {
    color: var(--brand);
    font-weight: 500;
}

.qa-home-all:hover {
    color: var(--brand-dark);
}

@media (max-width: 900px) {
    .qa-home-grid {
        grid-template-columns: 1fr;
    }
}

/* 紧凑文章列表（首页分类模块、分类页共用） */
.compact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.compact-item {
    min-width: 0;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
}

.compact-item-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.compact-item-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .2s;
}

.compact-item-title:hover {
    color: var(--brand);
}

.compact-item-meta {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .compact-list {
        grid-template-columns: 1fr;
    }
}

/* ========== 心理问答列表 ========== */
.qa-hero {
    position: relative;
    overflow: hidden;
    padding: 36px 0 24px;
}

.qa-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 32px;
}

.qa-hero .hero-kicker {
    margin-bottom: 10px;
}

.qa-hero h1 {
    margin: 0;
    font-size: clamp(26px, 3.6vw, 36px);
    font-weight: 700;
    line-height: 1.35;
}

.qa-hero .hero-lead {
    margin-top: 14px;
}

.qa-hero .hero-search {
    margin-top: 22px;
}

.qa-hero-visual {
    position: relative;
    height: 280px;
}

.qa-hero-visual.has-img {
    height: auto;
}

.qa-hero-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(45, 38, 32, .07);
}

.qa-orb {
    display: none;
}

.qa-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.qa-hero-visual .qa-bubble {
    position: absolute;
}

.qa-bubble-q {
    top: 48px;
    left: 42px;
    width: 116px;
    height: 116px;
    border-radius: 30px 30px 30px 8px;
    background: radial-gradient(circle at 32% 28%, #ffc48a, var(--brand) 62%, #c85a00);
    color: #fff;
    font-size: 44px;
    box-shadow: 0 22px 44px rgba(200, 90, 0, .28);
    transform: rotate(-6deg);
}

.qa-hero-visual .qa-bubble-a {
    bottom: 34px;
    right: 26px;
    width: 100px;
    height: 100px;
    border-radius: 26px 26px 8px 26px;
    background: linear-gradient(150deg, #a7c1ab, var(--sage) 60%, #6f8f75);
    color: #fff;
    font-size: 38px;
    box-shadow: 0 18px 38px rgba(103, 131, 108, .26);
    transform: rotate(6deg);
}

.kicker-sep {
    margin: 0 6px;
    color: #cfc3b7;
}

.qa-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 4px;
}

.qa-topic {
    padding: 7px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.2;
    transition: color .2s, border-color .2s, background .2s;
}

.qa-topic:hover {
    color: var(--brand-dark);
    border-color: #e6d9cb;
}

.qa-topic.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

.qa-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.qa-card {
    display: flex;
    flex-direction: column;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .2s;
}

.qa-card:hover {
    border-color: #dedede;
}

.qa-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12.5px;
}

.qa-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.qa-topic-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    line-height: 1.6;
    transition: background .2s;
}

.qa-topic-tag:hover {
    background: #ffe3cc;
}

.qa-date {
    margin-left: auto;
}

.qa-question {
    display: -webkit-box;
    margin: 10px 0 0;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.qa-question a {
    transition: color .2s;
}

.qa-question a:hover {
    color: var(--brand);
}

.qa-answer-preview {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}

.qa-a {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #f2f5f2;
    color: #67836c;
    font-size: 11.5px;
    font-weight: 700;
}

.qa-answer-preview p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.qa-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    color: #a2958a;
    font-size: 12px;
}

.qa-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.qa-more {
    color: var(--brand-dark);
    font-weight: 600;
}

.qa-more:hover {
    color: var(--brand);
}

@media (max-width: 900px) {
    .qa-list {
        grid-template-columns: 1fr;
    }
}

/* ========== 心理问答详情 ========== */
.qa-single {
    max-width: none;
    padding: 48px 0 24px;
}

.qa-side-col {
    padding-top: 48px;
}

@media (max-width: 1000px) {
    .qa-side-col {
        padding-top: 8px;
    }
}

.qa-single-head {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.qa-head-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12.5px;
}

.qa-type {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.qa-topic-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12.5px;
    line-height: 1.6;
    transition: background .2s;
}

.qa-topic-chip:hover {
    background: #ffe3cc;
}

.qa-head-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: #a2958a;
}

.qa-single-head h1 {
    margin: 12px 0 0;
    font-size: clamp(24px, 3.2vw, 32px);
    line-height: 1.45;
    letter-spacing: -.01em;
}

.qa-question-desc {
    margin: 14px 0 0;
    padding: 2px 0 2px 14px;
    border-left: 3px solid var(--brand-soft);
    color: #4a4a4a;
    font-size: 15.5px;
    line-height: 1.9;
}

.qa-question-desc p {
    margin: 0 0 8px;
}

.qa-question-desc p:last-child {
    margin-bottom: 0;
}

.qa-asker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.qa-asker-avatar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.qa-asker-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qa-asker-name a {
    color: inherit;
    text-decoration: none;
}

.qa-asker-name a:hover {
    color: var(--brand-dark);
}

.qa-asker-body {
    min-width: 0;
}

.qa-asker-name {
    display: block;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.5;
}

.qa-asker-name em {
    margin-right: 6px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
}

.qa-asker-bio {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.qa-answers {
    margin-top: 26px;
}

.qa-answers-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}

.qa-answers-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.qa-answers-head span {
    color: var(--muted);
    font-size: 12.5px;
}

.qa-answers-list .qa-answer {
    margin-top: 0;
}

.qa-answers-list .qa-answer + .qa-answer {
    margin-top: 14px;
}

.qa-empty {
    margin: 0;
    padding: 18px 20px;
    color: var(--muted);
    font-size: 14px;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.qa-answer {
    margin-top: 24px;
    padding: 20px 24px 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.qa-answer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.qa-answer-avatar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 10px;
    background: #eef3ef;
    color: #5f7c66;
    font-size: 15px;
    font-weight: 700;
}

.qa-answer-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qa-answer-by {
    min-width: 0;
}

.qa-answer-by strong {
    display: block;
    color: var(--ink);
    font-size: 14.5px;
    line-height: 1.5;
}

.qa-answer-by a,
a.qa-answer-avatar {
    color: inherit;
    text-decoration: none;
}

.qa-answer-by a:hover {
    color: var(--brand-dark);
}

a.qa-answer-avatar:hover {
    opacity: .88;
}

.qa-answer-by small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qa-answer-meta {
    flex-shrink: 0;
    margin-left: auto;
    color: #a2958a;
    font-size: 12px;
}

.qa-answer .article-body {
    margin-top: 18px;
    font-size: 16.5px;
    line-height: 1.9;
}

.qa-disclaimer {
    margin: 14px 0 0;
    padding: 10px 14px;
    background: #faf9f7;
    border-left: 2px solid #e6ddd2;
    border-radius: 0 6px 6px 0;
    color: #9b8f83;
    font-size: 12.5px;
    line-height: 1.7;
}

/* 作者页 */
.author-hero {
    padding: 44px 0 6px;
}

.author-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 26px 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.author-avatar {
    flex: 0 0 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    overflow: hidden;
    border-radius: 50%;
    background: #eef3ef;
    color: #5f7c66;
    font-size: 30px;
    font-weight: 700;
}

.author-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-body {
    min-width: 0;
}

.author-body .hero-kicker {
    margin: 0 0 4px;
}

.author-body h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.25;
}

.author-intro {
    max-width: 720px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.author-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #8a7565;
    font-size: 13px;
}

.author-stats strong {
    color: var(--ink);
    font-weight: 700;
}

.author-answer-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.author-answer {
    margin: 0;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.author-answer-q {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.6;
}

.author-answer-q a {
    color: var(--ink);
}

.author-answer-q a:hover {
    color: var(--brand-dark);
}

.author-answer-text {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.8;
}

.author-answer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #a2958a;
    font-size: 12px;
}

.author-answer-meta a {
    color: var(--brand-dark);
    font-weight: 600;
}

.author-articles {
    margin-top: 6px;
}

@media (max-width: 640px) {
    .author-hero {
        padding-top: 32px;
    }

    .author-card {
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .author-avatar {
        flex-basis: 60px;
        width: 60px;
        height: 60px;
        font-size: 22px;
    }

    .author-body h1 {
        font-size: 22px;
    }

    .author-answer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

.qa-single .article-tags {
    margin-top: 22px;
    padding-top: 16px;
}

.qa-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 26px;
    padding: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.qa-nav a {
    display: block;
    padding: 14px 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    transition: background .2s;
}

.qa-nav a + a {
    border-left: 1px solid var(--line);
}

.qa-nav a:hover {
    background: #fafafa;
}

.qa-nav a:only-child {
    grid-column: 1 / -1;
}

.qa-nav span {
    display: block;
    margin-bottom: 4px;
    color: #a2958a;
    font-size: 12px;
}

.qa-nav strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 820px) {
    .cat-hero {
        padding: 48px 0 32px;
    }

    .cat-hero-inner.has-img {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .cat-hero-visual {
        min-width: 0;
        max-width: 560px;
        margin: 0 auto;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .qa-hero {
        padding: 30px 0 22px;
    }

    .qa-hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .qa-hero-visual {
        display: none;
    }

    .qa-hero-visual.has-img {
        display: block;
        min-width: 0;
        max-width: 560px;
        margin: 0 auto;
    }

    .qa-single {
        padding-top: 34px;
    }

    .qa-answer {
        padding: 18px 20px 20px;
    }
}

@media (max-width: 560px) {
    .qa-card {
        padding: 20px;
    }

    .qa-question {
        font-size: 16.5px;
    }

    .qa-date {
        margin-left: 0;
    }

    .qa-answer {
        padding: 16px;
    }

    .qa-answer-meta {
        display: none;
    }

    .qa-answer .article-body {
        font-size: 16px;
    }

    .qa-nav {
        grid-template-columns: 1fr;
    }

    .qa-nav a + a {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .cat-meta {
        gap: 10px;
    }
}

/* ========== 主题设置扩展（logo / 搜索 / 缩略图 / 相关文章 / 折叠 / 返回顶部） ========== */
.brand-logo {
    display: block;
    width: auto;
    height: 52px;
    max-width: 230px;
    border-radius: 12px;
    object-fit: contain;
}

.nav-tools {
    position: relative;
    display: none;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.nav-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}

.nav-search-toggle:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.nav-search-toggle[aria-expanded="true"] {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
}

.nav-search-form {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 30;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.nav-tools.is-open .nav-search-form {
    display: flex;
}

.nav-search-form input {
    width: 210px;
    padding: 7px 10px;
    font: inherit;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
}

.nav-search-form input:focus {
    border-color: var(--brand);
}

.nav-search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

/* 列表缩略图 */
.post-card.has-thumb {
    display: flex;
    align-items: center;
    gap: 26px;
}

.post-card-main {
    flex: 1 1 auto;
    min-width: 0;
}

.post-thumb {
    flex: 0 0 200px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--brand-soft);
    border-radius: 14px;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.post-card:hover .post-thumb img {
    transform: scale(1.04);
}

.post-grid .post-card.has-thumb {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.post-grid .post-thumb {
    flex-basis: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    order: -1;
    margin: -6px 0 0;
}

.post-more {
    margin-left: auto;
    color: var(--brand-dark);
    font-weight: 600;
    white-space: nowrap;
}

.post-more:hover {
    color: var(--brand);
}

/* 面包屑 */
.breadcrumb {
    margin: 0 0 18px;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 12.5px;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.breadcrumb li + li::before {
    content: "/";
    color: #cbbfb3;
}

.breadcrumb a {
    color: var(--muted);
    transition: color .2s;
}

.breadcrumb a:hover {
    color: var(--brand);
}

.breadcrumb span {
    color: #7a6c61;
}

.qa-single .breadcrumb {
    margin-bottom: 22px;
}

/* 相关文章 */
.related-section {
    max-width: 780px;
    padding: 34px 0 10px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.related-card {
    display: block;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand);
    box-shadow: var(--shadow);
}

.related-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    margin: 0 0 12px;
    overflow: hidden;
    background: var(--brand-soft);
    border-radius: 12px;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-copy strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.related-copy small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

/* 版权声明 */
.article-copyright {
    margin: 34px 0 0;
    padding: 14px 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    background: #fafafa;
    border: 1px dashed var(--line);
    border-radius: 12px;
}

/* 长文折叠 */
.fold-wrap .fold-content {
    overflow: hidden;
}

.fold-wrap.is-folded .fold-content {
    max-height: var(--fold-h);
}

.fold-mask {
    display: none;
}

.fold-wrap.is-folded .fold-mask {
    display: block;
    height: 130px;
    margin-top: -130px;
    background: linear-gradient(rgba(var(--bg-rgb), 0), var(--bg));
    pointer-events: none;
}

.fold-btn {
    display: none;
    margin: 12px auto 0;
    padding: 9px 26px;
    color: var(--brand-dark);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    background: var(--brand-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.fold-wrap.is-folded .fold-btn,
.fold-wrap.is-open .fold-btn {
    display: flex;
}

.fold-wrap.is-open .fold-content {
    max-height: none;
}

.fold-btn:hover {
    color: #fff;
    background: var(--brand);
}

/* 返回顶部 */
.back-top {
    position: fixed;
    right: 24px;
    bottom: 28px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--brand-dark);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .2s, transform .2s, color .2s, border-color .2s;
}

.back-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.back-top:hover {
    color: var(--brand);
    border-color: var(--brand);
}

/* 哀悼模式 */
html.is-grey {
    filter: grayscale(1);
}

.footer-icp {
    width: 100%;
    font-size: 12px;
}

.footer-icp a:hover {
    color: var(--brand);
}

@media (max-width: 820px) {
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cate-show-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 560px) {
    .brand-logo {
        height: 36px;
        max-width: 170px;
        border-radius: 8px;
    }

    .post-card.has-thumb {
        gap: 16px;
    }

    .post-thumb {
        flex-basis: 120px;
    }

    .post-grid .post-thumb {
        flex-basis: auto;
    }

    .nav-search-form input {
        width: 168px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .cate-show-card {
        padding: 18px 18px 8px;
        border-radius: 16px;
    }

    .cate-show-cover {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .cate-show-title h3 {
        font-size: 17px;
    }

    .back-top {
        right: 16px;
        bottom: 18px;
    }
}

/* ========== 首页门户版式（内容优先） ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.portal-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
    gap: 24px;
    padding: 28px 0 26px;
}

.feature-lead {
    position: relative;
    display: block;
    height: 340px;
    overflow: hidden;
    background: var(--brand-soft);
    border-radius: 8px;
}

.feature-lead img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    transition: transform .4s ease;
}

.feature-lead:hover img {
    transform: scale(1.02);
}

.feature-lead-body {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(180deg, rgba(24, 18, 14, 0), rgba(24, 18, 14, .74));
}

.feature-lead-cate {
    padding: 2px 10px;
    font-size: 12px;
    line-height: 1.7;
    background: rgba(255, 255, 255, .18);
    border-radius: 4px;
}

.feature-lead-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
}

.feature-lead-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    opacity: .85;
}

.feature-lead--text {
    height: 340px;
    background: #fafafa;
    border: 1px solid var(--line);
}

.feature-lead--text .feature-lead-body {
    position: static;
    height: 100%;
    justify-content: flex-end;
    color: var(--ink);
    background: none;
}

.feature-lead--text .feature-lead-cate {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.feature-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    height: 340px;
    overflow: hidden;
    border-radius: 8px;
}

.feature-side-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
}

.feature-side-head h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
}

.feature-side-head span {
    color: var(--muted);
    font-size: 12px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li + li {
    border-top: 1px solid var(--line);
}

.feature-list li {
    flex: 1 1 0;
    min-height: 0;
}

.feature-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 9px 14px;
}

.feature-item-thumb {
    flex: 0 0 68px;
    width: 68px;
    height: 50px;
    object-fit: cover;
    background: var(--brand-soft);
    border-radius: 4px;
}

.feature-item-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.feature-item-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color .2s;
}

.feature-list a:hover .feature-item-title {
    color: var(--brand);
}

.feature-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11.5px;
}

/* 首页最新文章：双列紧凑列表 */
.post-list-dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 34px;
}

.post-list-dense .post-card {
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.post-list-dense .post-card:hover {
    transform: none;
    border-color: var(--line);
    box-shadow: none;
}

.post-list-dense .post-card-main {
    flex: 1 1 auto;
}

.post-list-dense .post-card-top {
    margin-bottom: 6px;
}

.post-list-dense .pill {
    padding: 1px 8px;
    font-size: 11.5px;
}

.post-list-dense .post-date {
    font-size: 11.5px;
}

.post-list-dense .post-card h3 {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.55;
}

.post-list-dense .post-intro,
.post-list-dense .post-meta {
    display: none;
}

.post-list-dense .post-thumb {
    flex: 0 0 100px;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
}

@media (max-width: 820px) {
    .head-search {
        display: none;
    }

    .nav-tools {
        display: flex;
    }

    .portal-feature {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 0 18px;
    }

    .feature-lead {
        height: 240px;
        min-height: 0;
    }

    .feature-lead-title {
        font-size: 19px;
    }

    .feature-side-head span {
        display: none;
    }
}

@media (max-width: 640px) {
    .post-list-dense {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .post-list-dense .post-thumb {
        flex-basis: 96px;
    }
}

/* ========== 首页 App 模块 ========== */
.xapp-section {
    padding: 0 0 64px;
}

.xapp-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: center;
    padding: 46px 48px;
    overflow: hidden;
    background: linear-gradient(115deg, #fff6ec 0%, #fffdfb 52%, #ffefe0 100%);
    border: 1px solid #f4e5d6;
    border-radius: 20px;
}

.xapp-card:before {
    content: "";
    position: absolute;
    top: -110px;
    right: -90px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-rgb), .16), rgba(var(--brand-rgb), 0) 70%);
    pointer-events: none;
}

.xapp-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 560px;
}

.xapp-kicker {
    margin: 0;
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
}

.xapp-copy h2 {
    margin: 10px 0 12px;
    color: #3c2f26;
    font-size: 30px;
    line-height: 1.4;
}

.xapp-lead {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.85;
}

.xapp-points {
    display: grid;
    gap: 10px;
    margin: 22px 0 26px;
    padding: 0;
    color: #5d4c3f;
    font-size: 14.5px;
    list-style: none;
}

.xapp-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.xapp-dot {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    background: rgba(var(--brand-rgb), .12);
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.xapp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.xapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 30px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(var(--brand-rgb), .26);
    transition: background .15s, transform .15s;
}

.xapp-btn:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.xapp-soon {
    padding: 8px 14px;
    border: 1px dashed #e7d5c3;
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: var(--muted);
    font-size: 12.5px;
}

.xapp-shots {
    position: relative;
    z-index: 1;
    height: 430px;
}

.xapp-shot {
    position: absolute;
    width: 180px;
    border: 1px solid rgba(60, 47, 38, .08);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 22px 40px rgba(70, 45, 20, .16);
}

.xapp-shot--back {
    top: 30px;
    left: 8px;
    transform: rotate(-7deg);
}

.xapp-shot--front {
    top: 0;
    right: 6px;
    transform: rotate(5deg);
}

@media (max-width: 900px) {
    .xapp-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 32px 26px;
    }

    .xapp-copy h2 {
        font-size: 24px;
    }

    .xapp-shots {
        width: 100%;
        max-width: 360px;
        height: 360px;
        margin: 0 auto;
    }

    .xapp-shot {
        width: 150px;
    }

    .xapp-shot--back {
        top: 20px;
        left: 26px;
    }

    .xapp-shot--front {
        top: 0;
        right: 26px;
    }
}

@media (max-width: 560px) {
    .xapp-section {
        padding-bottom: 46px;
    }

    .xapp-card {
        padding: 26px 20px;
        border-radius: 16px;
    }

    .xapp-shots {
        height: 310px;
        max-width: 300px;
    }

    .xapp-shot {
        width: 126px;
        border-radius: 16px;
    }

    .xapp-shot--back {
        left: 18px;
        top: 16px;
    }

    .xapp-shot--front {
        right: 18px;
    }

    .xapp-btn {
        height: 42px;
        padding: 0 24px;
    }
}

/* ========== App 下载单页 ========== */
.xdown-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 36px;
    align-items: center;
    padding: 34px 36px;
    background: linear-gradient(120deg, #fff7f0 0%, #fffdfb 60%, #fff1e4 100%);
    border: 1px solid #f4e5d6;
    border-radius: 18px;
}

.xdown-kicker {
    margin: 0 0 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
}

.xdown-hero h2 {
    margin: 0 0 12px;
    color: #3c2f26;
    font-size: 28px;
    line-height: 1.45;
}

.xdown-lead {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
}

.xdown-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
}

.xdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    background: #fff;
    border: 1px solid #eadfd3;
    border-radius: 8px;
    color: #7a685a;
    font-size: 12.5px;
}

.xdown-badge:before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.xdown-hero-shots {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 340px;
}

.xdown-shot {
    width: 176px;
    border: 1px solid rgba(60, 47, 38, .08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 36px rgba(70, 45, 20, .16);
}

.xdown-shot--one {
    transform: rotate(-5deg) translateY(10px);
}

.xdown-shot--two {
    position: relative;
    z-index: 1;
    margin-left: -26px;
    transform: rotate(5deg) translateY(-6px);
}

.xdown-features {
    margin-top: 38px;
}

.xdown-features h2,
.xdown-how h2 {
    margin: 0;
    color: #3c2f26;
    font-size: 21px;
    line-height: 1.5;
}

.xdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.xdown-item {
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.xdown-item h3 {
    margin: 0 0 6px;
    color: #3c2f26;
    font-size: 16px;
    line-height: 1.5;
}

.xdown-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.8;
}

.xdown-how {
    margin-top: 34px;
}

.xdown-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: xdown-step;
}

.xdown-steps li {
    padding: 18px 20px;
    background: #fffaf4;
    border: 1px solid #f3e6d9;
    border-radius: 12px;
    color: #6d5b4c;
    font-size: 13.5px;
    line-height: 1.8;
    counter-increment: xdown-step;
}

.xdown-steps li:before {
    content: counter(xdown-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    vertical-align: 2px;
}

.xdown-cta {
    margin-top: 36px;
    padding: 28px 30px;
    background: linear-gradient(120deg, #fff3e8 0%, #ffe9d5 100%);
    border: 1px solid #f6ddc4;
    border-radius: 16px;
    text-align: center;
}

.xdown-cta h2 {
    margin: 0 0 8px;
    color: #3c2f26;
    font-size: 20px;
}

.xdown-cta p {
    margin: 0 auto 18px;
    max-width: 560px;
    color: #7a685a;
    font-size: 14px;
    line-height: 1.85;
}

.xdown-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s;
}

.xdown-cta-btn:hover {
    background: var(--brand-dark);
}

@media (max-width: 900px) {
    .xdown-hero {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 28px 24px;
    }

    .xdown-hero-shots {
        height: 300px;
    }

    .xdown-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .xdown-grid {
        grid-template-columns: 1fr;
    }

    .xdown-hero h2 {
        font-size: 23px;
    }

    .xdown-hero-shots {
        height: 270px;
    }

    .xdown-shot {
        width: 148px;
    }
}

/* ========== 内页视觉统一（分类 / 文章 / 问答 / 作者 / 列表） ========== */
.section {
    padding: 46px 0 72px;
}

.section-head {
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.section-head h2 {
    position: relative;
    padding-left: 15px;
    font-size: 21px;
    letter-spacing: .01em;
}

.section-head h2::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 4px;
    height: 17px;
    margin-top: -8px;
    border-radius: 2px;
    background: linear-gradient(180deg, #ffa347, var(--brand));
}

/* 搜索 / 标签 / 归档页标题 */
.page-head {
    margin-top: 34px;
    padding: 34px 38px 32px;
    background:
        radial-gradient(120% 150% at 100% 0%, rgba(var(--brand-rgb), .10), rgba(var(--brand-rgb), 0) 62%),
        linear-gradient(180deg, #fffaf5, #fff);
    border: 1px solid #f4e6d8;
    border-radius: 18px;
}

.page-head h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 3.6vw, 40px);
    line-height: 1.35;
}

.page-head-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13.5px;
}

.page-head-note strong {
    color: var(--brand-dark);
    font-weight: 700;
}

/* 文章卡片悬停 */
.post-card {
    border-radius: 14px;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--brand-rgb), .38);
    box-shadow: var(--shadow);
}

/* 分类页首屏 */
.cat-hero {
    padding: 0;
    background:
        radial-gradient(90% 130% at 88% 6%, rgba(var(--brand-rgb), .12), rgba(var(--brand-rgb), 0) 62%),
        linear-gradient(180deg, #fff8f1 0%, #fffdfb 68%, #fff 100%);
    border-bottom: 1px solid #f6ece2;
}

.cat-hero-inner {
    padding: 52px 0 42px;
}

.cat-hero h1 {
    margin-top: 12px;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -.01em;
    line-height: 1.28;
}

.cat-hero .hero-lead {
    max-width: 30em;
    margin-top: 16px;
    font-size: 15.5px;
    line-height: 1.85;
}

.cat-hero-visual,
.qa-hero-visual.has-img {
    position: relative;
}

.cat-hero-visual::before,
.qa-hero-visual.has-img::before {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 66%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-rgb), .16), rgba(var(--brand-rgb), 0) 68%);
    pointer-events: none;
}

.cat-hero-visual::after {
    content: "";
    position: absolute;
    top: 16px;
    right: -16px;
    bottom: -16px;
    left: 16px;
    border: 1px solid rgba(var(--brand-rgb), .26);
    border-radius: 20px;
    pointer-events: none;
}

.cat-hero-visual img,
.qa-hero-img {
    position: relative;
    z-index: 1;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 52px rgba(120, 70, 30, .16);
}

/* 同级分类快捷入口 */
.cat-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
}

.cat-quick-label {
    margin-right: 2px;
    color: var(--muted);
    font-size: 12.5px;
}

.cat-quick a {
    padding: 6px 13px;
    background: rgba(255, 255, 255, .84);
    border: 1px solid #f0e2d4;
    border-radius: 999px;
    color: #8a7565;
    font-size: 13px;
    line-height: 1.4;
    transition: color .2s, border-color .2s, background .2s;
}

.cat-quick a:hover {
    background: #fff;
    border-color: var(--brand);
    color: var(--brand-dark);
}

/* 文章详情 */
.article {
    padding: 46px 0 20px;
}

.article-head {
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.article-head h1 {
    margin: 14px 0 0;
    font-size: clamp(30px, 4.2vw, 44px);
    line-height: 1.38;
    letter-spacing: -.012em;
}

.article-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 9px 16px;
    background: #fbf8f4;
    border: 1px solid #f3e9de;
    border-radius: 999px;
    color: #8a7565;
    font-size: 12.5px;
}

.article-meta a {
    color: var(--brand-dark);
}

.article-meta a:hover {
    color: var(--brand);
}

.article-body {
    margin-top: 32px;
    font-size: 17.5px;
    line-height: 2;
}

.article-body > h2 {
    position: relative;
    margin: 2em 0 .8em;
    padding-left: 15px;
    font-size: 22px;
    line-height: 1.5;
}

.article-body > h2::before {
    content: "";
    position: absolute;
    top: .28em;
    bottom: .24em;
    left: 0;
    width: 4px;
    border-radius: 2px;
    background: var(--brand);
}

.article-body > h3 {
    color: #3c3530;
    font-size: 18.5px;
}

.article-body > blockquote {
    background: linear-gradient(180deg, #fffaf5, #fff);
    border-left-color: var(--brand);
    border-radius: 0 12px 12px 0;
}

.article-body > img,
.article-body > p > img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.6em auto;
    border-radius: 14px;
}

/* 生成封面作为正文插图时不占满整栏 */
.article-body > p > img[src*="/theme/a-img/"] {
    max-width: min(100%, 660px);
}

/* App 单页小标题 */
.xdown-features h2,
.xdown-how h2 {
    position: relative;
    padding-left: 14px;
}

.xdown-features h2::before,
.xdown-how h2::before {
    content: "";
    position: absolute;
    top: .3em;
    bottom: .26em;
    left: 0;
    width: 4px;
    border-radius: 2px;
    background: var(--brand);
}

/* 阅读进度条 */
.read-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 60;
    height: 3px;
    background: rgba(var(--brand-rgb), .10);
    pointer-events: none;
}

.read-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #ffb066, var(--brand));
    border-radius: 0 2px 2px 0;
}

/* 侧栏 */
.side-card {
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(80, 50, 25, .04);
}

.side-card-title {
    position: relative;
    padding-left: 12px;
}

.side-card-title::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 14px;
    margin-top: -7px;
    border-radius: 2px;
    background: var(--brand);
}

/* 问答列表首屏 */
.qa-hero {
    padding: 44px 0 0;
    background:
        radial-gradient(80% 130% at 84% 0%, rgba(var(--brand-rgb), .13), rgba(var(--brand-rgb), 0) 60%),
        linear-gradient(180deg, #fff8f1, #fffdfb 76%, #fff);
    border-bottom: 1px solid #f6ece2;
}

.qa-hero-inner {
    padding-bottom: 46px;
}

.qa-hero h1 {
    font-size: clamp(28px, 3.8vw, 42px);
    line-height: 1.3;
}

.qa-hero-visual {
    height: 300px;
}

/* 问答主题导航：浮在首屏下沿 */
.qa-topics {
    position: relative;
    z-index: 2;
    margin-top: -27px;
    padding: 10px;
    background: #fff;
    border: 1px solid #f1e3d5;
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(90, 50, 20, .07);
}

.qa-topic {
    padding: 8px 16px;
    background: #faf7f3;
    border-color: transparent;
}

.qa-topic:hover {
    background: #fff3e7;
    border-color: transparent;
    color: var(--brand-dark);
}

.qa-topic.is-active {
    box-shadow: 0 6px 14px rgba(var(--brand-rgb), .24);
}

/* 问答卡片 */
.qa-card {
    padding: 22px 24px;
    border-radius: 15px;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

.qa-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--brand-rgb), .38);
    box-shadow: var(--shadow);
}

.qa-card .qa-tag {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.qa-question {
    margin-top: 12px;
    font-size: 17.5px;
}

.qa-answer-preview {
    margin-top: 14px;
    padding: 12px 14px;
    background: #fbf9f6;
    border-top: 0;
    border-radius: 10px;
}

.qa-card-foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.qa-card-meta span:first-child {
    color: var(--brand-dark);
    font-weight: 600;
}

/* 问答详情 */
.qa-single {
    padding: 40px 0 20px;
}

.qa-single-head {
    padding: 28px 32px 26px;
    background: linear-gradient(180deg, #fff9f3, #fff);
    border: 1px solid #f4e6d8;
    border-radius: 18px;
}

.qa-single-head h1 {
    margin-top: 14px;
    font-size: clamp(26px, 3.4vw, 36px);
    line-height: 1.42;
}

.qa-question-desc {
    border-left-color: rgba(var(--brand-rgb), .38);
    color: #554a41;
}

.qa-asker {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.qa-asker-avatar {
    width: 34px;
    height: 34px;
}

.qa-answers {
    margin-top: 30px;
}

.qa-answers-head {
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.qa-answers-head h2 {
    position: relative;
    padding-left: 12px;
    font-size: 19px;
}

.qa-answers-head h2::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 14px;
    margin-top: -7px;
    border-radius: 2px;
    background: var(--brand);
}

.qa-answer {
    padding: 22px 26px 26px;
    border-radius: 16px;
}

.qa-answer-head {
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--line);
}

.qa-answer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.qa-answer .article-body {
    margin-top: 18px;
    font-size: 17px;
}

/* 作者页 */
.author-hero {
    padding: 40px 0 4px;
}

.author-card {
    align-items: center;
    gap: 26px;
    padding: 32px 34px;
    background:
        radial-gradient(90% 150% at 100% 0%, rgba(var(--brand-rgb), .12), rgba(var(--brand-rgb), 0) 62%),
        linear-gradient(180deg, #fffaf4, #fff);
    border: 1px solid #f2e4d5;
    border-radius: 20px;
    box-shadow: 0 18px 42px rgba(90, 50, 20, .05);
}

.author-avatar {
    flex-basis: 96px;
    width: 96px;
    height: 96px;
    background: #fff3e7;
    color: var(--brand-dark);
    box-shadow: 0 0 0 6px #fff, 0 14px 30px rgba(90, 50, 20, .12);
}

.author-body {
    flex: 1 1 auto;
}

.author-body h1 {
    margin-bottom: 10px;
    font-size: 32px;
}

.author-intro {
    font-size: 14.5px;
}

.author-stats {
    flex: 0 0 auto;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 0 auto;
    padding-left: 24px;
}

.author-stats span {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid #f1e3d5;
    border-radius: 10px;
    color: #8a7565;
    font-size: 12.5px;
}

.author-stats strong {
    color: var(--brand-dark);
    font-size: 16px;
}

.author-stats .dot {
    display: none;
}

.author-answer {
    border-radius: 14px;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

.author-answer:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--brand-rgb), .35);
    box-shadow: var(--shadow);
}

.author-answer-q {
    font-size: 16.5px;
}

@media (max-width: 820px) {
    .page-head {
        margin-top: 24px;
        padding: 26px 22px;
        border-radius: 14px;
    }

    .cat-hero {
        padding: 0;
    }

    .cat-hero-inner {
        padding: 36px 0 32px;
    }

    .cat-hero-visual::after {
        top: 12px;
        right: -12px;
        bottom: -12px;
        left: 12px;
    }

    .cat-hero-visual::before,
    .qa-hero-visual.has-img::before {
        right: -16px;
        bottom: -20px;
    }

    .qa-hero {
        padding: 32px 0 0;
    }

    .qa-hero-inner {
        padding-bottom: 38px;
    }

    .qa-topics {
        margin-top: -22px;
    }

    .qa-single-head {
        padding: 24px 22px;
    }

    .article {
        padding-top: 34px;
    }

    .author-hero {
        padding-top: 30px;
    }

    .author-card {
        padding: 26px 22px;
        gap: 20px;
    }
}

@media (max-width: 560px) {
    .cat-hero-visual::after {
        display: none;
    }

    .cat-quick {
        margin-top: 20px;
    }

    .qa-single-head {
        padding: 20px 18px;
    }

    .qa-answer {
        padding: 18px 18px 20px;
    }

    .article-meta {
        padding: 8px 13px;
    }

    .author-card {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 16px;
        padding: 22px 18px;
    }

    .author-avatar {
        flex-basis: 64px;
        width: 64px;
        height: 64px;
        font-size: 24px;
        box-shadow: 0 0 0 4px #fff, 0 10px 22px rgba(90, 50, 20, .12);
    }

    .author-body h1 {
        font-size: 23px;
    }

    .author-stats {
        flex: 1 0 100%;
        flex-direction: row;
        flex-wrap: wrap;
        margin: 2px 0 0;
        padding-left: 0;
    }

    .author-stats span {
        padding: 6px 10px;
    }
}

/* ========== 各页首屏统一 ========== */
/* 同一套暖色渐变背景：分类 / 问答 / 搜索列表 / 问答详情 / 作者 / App 下载页 */
.cat-hero,
.qa-hero,
.page-head,
.qa-single-head,
.author-card,
.xdown-hero {
    background:
        radial-gradient(90% 130% at 88% 6%, rgba(var(--brand-rgb), .12), rgba(var(--brand-rgb), 0) 62%),
        linear-gradient(180deg, #fff8f1 0%, #fffdfb 68%, #fff 100%);
    border-color: #f6ece2;
}

/* 首屏插图统一高度 */
.cat-hero-visual img,
.qa-hero-img {
    height: 300px;
    aspect-ratio: auto;
    object-fit: cover;
}

@media (max-width: 820px) {
    .cat-hero-visual img,
    .qa-hero-img {
        height: auto;
        aspect-ratio: 16 / 10;
    }
}

/* 分类 / 问答首屏同高：统一内边距，插图同为 300px */
.qa-hero {
    padding: 0;
}

.cat-hero-inner,
.qa-hero-inner {
    padding: 48px 0 40px;
}

/* 首页首屏背景：与内页 hero 同一套暖色渐变 */
.home-hero {
    background:
        radial-gradient(90% 130% at 88% 6%, rgba(var(--brand-rgb), .12), rgba(var(--brand-rgb), 0) 62%),
        linear-gradient(180deg, #fff8f1 0%, #fffdfb 68%, #fff 100%);
    border-bottom: 1px solid #f6ece2;
}

/* ========== 分类页 / 详情页 精修 v3 ========== */

/* 分类页「全部文章」：改为纵向行式列表，弱化装饰 */
.cate-post-list {
    border-top: 1px solid var(--line);
}

.cate-post-list .post-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 26px 2px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.cate-post-list .post-card:hover {
    transform: none;
    border-color: var(--line);
    box-shadow: none;
}

.cate-post-list .post-card:hover h3 a {
    color: var(--brand);
}

.cate-post-list .post-card-main {
    flex: 1 1 auto;
}

.cate-post-list .post-card-top {
    gap: 10px;
    margin-bottom: 9px;
}

.cate-post-list .pill {
    padding: 0;
    background: none;
    color: var(--brand-dark);
    font-size: 12.5px;
}

.cate-post-list .pill-top {
    color: #67836c;
}

.cate-post-list .post-date {
    font-size: 12.5px;
}

.cate-post-list .post-card h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.55;
}

.cate-post-list .post-intro {
    font-size: 14.5px;
    line-height: 1.8;
}

.cate-post-list .post-meta {
    margin-top: 12px;
    color: #a99c90;
    font-size: 12.5px;
}

.cate-post-list .post-more {
    display: none;
}

.cate-post-list .post-thumb {
    flex: 0 0 176px;
    aspect-ratio: 3 / 2;
    border-radius: 10px;
}

/* 分类页问题区块：轻一点 */
.cate-qa-item {
    padding: 16px 18px;
    border-radius: 10px;
}

.cate-qa-arrow {
    display: none;
}

/* 文章详情：标题区扁平化 */
.article {
    padding: 30px 0 20px;
}

.article-head {
    padding-bottom: 20px;
}

.article-head h1 {
    margin: 8px 0 16px;
    font-size: clamp(23px, 2.6vw, 30px);
    line-height: 1.45;
    letter-spacing: 0;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    color: var(--muted);
    font-size: 13px;
}

.article-meta a {
    color: var(--brand-dark);
    font-weight: 500;
}

.article-body {
    margin-top: 30px;
    font-size: 16.5px;
    line-height: 1.9;
}

.article-body > p > img[src*="/theme/a-img/"] {
    max-width: min(100%, 560px);
}

.article-tags {
    margin-top: 30px;
    padding-top: 20px;
}

/* 随机内容：正文末尾的轻量链接 */
.article-random {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.article-random-label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12.5px;
}

.article-random-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-random-links a {
    padding: 6px 12px;
    background: #faf7f3;
    border-radius: 999px;
    color: #8a7565;
    font-size: 12.5px;
    line-height: 1.5;
    transition: background .2s, color .2s;
}

.article-random-links a:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

/* 相关阅读：文字行式，去掉封面卡 */
.related-section {
    margin-top: 34px;
    padding: 26px 0 0;
    border-top: 1px solid var(--line);
}

.related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 40px;
    margin-top: 0;
}

.related-card {
    padding: 14px 0;
    background: none;
    border: 0;
    border-bottom: 1px solid #f1ece6;
    border-radius: 0;
    transition: none;
}

.related-card:hover {
    transform: none;
    border-color: #f1ece6;
    box-shadow: none;
}

.related-card:hover strong {
    color: var(--brand);
}

.related-copy strong {
    font-size: 14.5px;
    font-weight: 500;
}

.related-copy small {
    margin-top: 4px;
    font-size: 11.5px;
}

/* 上一篇 / 下一篇：扁平双栏 */
.article-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 36px;
    margin-top: 30px;
    padding: 0;
    border-top: 1px solid var(--line);
}

.article-nav a {
    display: block;
    padding: 16px 0 0;
    background: none;
    border: 0;
    border-radius: 0;
    font-size: 12.5px;
}

.article-nav a:hover strong {
    color: var(--brand);
}

.article-nav strong {
    display: block;
    margin-top: 6px;
    font-size: 14.5px;
    line-height: 1.6;
}

.article-nav a:only-child {
    grid-column: 1 / -1;
}

/* 侧栏：去掉卡片盒子，只留标题 + 细线列表 */
.side-col {
    padding-top: 66px;
}

.side-card {
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.side-card + .side-card {
    margin-top: 30px;
}

.side-card-title {
    margin: 0 0 6px;
    padding-left: 12px;
    font-size: 15.5px;
    letter-spacing: 0;
}

.side-card-title::before {
    width: 3px;
    height: 13px;
    margin-top: -7px;
}

.side-hot-list li + li {
    border-top: 1px solid #f1ece6;
}

.side-hot-list a {
    gap: 10px;
    padding: 12px 0;
}

.side-hot-rank,
.side-hot-list li:nth-child(-n+3) .side-hot-rank {
    width: 14px;
    height: auto;
    margin-top: 2px;
    background: none;
    color: #c9bdb2;
    font-size: 12px;
}

.side-hot-list li:nth-child(-n+3) .side-hot-rank {
    color: var(--brand);
}

.side-hot-body strong {
    color: #3f3833;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.62;
}

.side-hot-meta {
    font-size: 11.5px;
}

/* 问答详情：去掉卡片堆叠，改为编辑式版式 */
.qa-single {
    padding: 30px 0 20px;
}

.qa-single-head {
    padding: 0 0 24px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.qa-single-head h1 {
    margin: 10px 0 14px;
    font-size: clamp(21px, 2.4vw, 28px);
    line-height: 1.5;
    letter-spacing: 0;
}

.qa-question-desc {
    margin-top: 4px;
    padding: 10px 16px;
    background: #fbf8f4;
    border-left: 3px solid rgba(var(--brand-rgb), .55);
    border-radius: 0 8px 8px 0;
    font-size: 15.5px;
    line-height: 1.85;
}

.qa-asker {
    margin-top: 18px;
    padding-top: 0;
    border-top: 0;
}

.qa-asker-avatar {
    width: 32px;
    height: 32px;
}

.qa-answers {
    margin-top: 28px;
}

.qa-answers-head {
    padding-bottom: 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--line);
}

.qa-answers-list .qa-answer,
.qa-answers-list .qa-answer + .qa-answer {
    margin-top: 0;
}

.qa-answer {
    padding: 22px 0 24px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.qa-answer-head {
    padding-bottom: 0;
    border-bottom: 0;
}

.qa-answer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.qa-answer .article-body {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.9;
}

.qa-disclaimer {
    margin-top: 20px;
    background: none;
    border-left-width: 3px;
}

@media (max-width: 1000px) {
    .side-col {
        padding-top: 30px;
    }
}

@media (max-width: 820px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .article-nav {
        gap: 0 20px;
    }
}

@media (max-width: 640px) {
    .cate-post-list .post-card {
        gap: 16px;
        padding: 20px 0;
    }

    .cate-post-list .post-thumb {
        flex: 0 0 104px;
        aspect-ratio: 1 / 1;
        border-radius: 8px;
    }

    .cate-post-list .post-card h3 {
        font-size: 16.5px;
    }

    .cate-post-list .post-intro {
        display: none;
    }

    .cate-post-list .post-meta {
        margin-top: 8px;
    }
}

/* v3 收尾微调 */
.cate-post-list .post-card-top .pill:not(.pill-top) {
    display: none;
}

.related-grid {
    grid-template-columns: 1fr;
    gap: 0;
}

.article-body > p > img[src*="/theme/a-img/"] {
    max-width: min(100%, 480px);
}

.qa-answer .article-body p {
    margin: .55em 0;
}

/* 移动端区块标题保持左对齐（.section-head 在窄屏为纵向排列） */
@media (max-width: 560px) {
    .section-head {
        align-items: flex-start;
    }
}

/* 窄屏侧栏随主栏满宽（避免 grid 下 auto margin 收缩） */
@media (max-width: 1000px) {
    .single-layout .side-col {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

/* 自动生成的封面图只用于列表缩略图，不在正文重复出现 */
.article-body > p > img[src*="/theme/a-img/"] {
    display: none;
}

@media (max-width: 560px) {
    .article-random-links a:nth-child(n+7) {
        display: none;
    }
}

/* 相关阅读：标题与日期同行 */
.related-card {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
}

.related-copy small {
    flex: 0 0 auto;
    margin-top: 0;
}

/* ========== 问答分类页 精修 v4 ========== */

/* 首屏收紧：图片不再抢占视线 */
.qa-hero-inner {
    padding: 38px 0 26px;
    gap: 44px;
    align-items: center;
}

.qa-hero-img {
    height: 240px;
    border-radius: 14px;
    box-shadow: none;
}

.qa-hero h1 {
    font-size: clamp(25px, 3.1vw, 36px);
}

.qa-hero .hero-lead {
    max-width: 560px;
}

.qa-hero .hero-search {
    max-width: 460px;
    margin-top: 20px;
}

/* 主题导航：普通细线标签栏，取消浮起卡片 */
.qa-topics {
    position: static;
    margin: 0 auto 6px;
    padding: 0 0 16px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    gap: 6px;
}

.qa-topic {
    padding: 7px 14px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.qa-topic:hover {
    background: #fff7ef;
    border-color: rgba(var(--brand-rgb), .3);
    color: var(--brand-dark);
}

.qa-topic.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: none;
}

/* 列表：单列细线行，不再堆叠卡片 */
.qa-list {
    display: block;
    border-top: 1px solid var(--line);
}

.qa-card {
    display: block;
    padding: 24px 2px;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    transition: none;
}

.qa-card:hover {
    transform: none;
    border-color: var(--line);
    box-shadow: none;
}

.qa-card .qa-tag {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    font-size: 11px;
}

.qa-card-top {
    gap: 8px;
    font-size: 12px;
}

.qa-card-top .qa-date {
    margin-left: 0;
}

.qa-question {
    margin-top: 9px;
    font-size: 19px;
    line-height: 1.6;
}

.qa-card:hover .qa-question a {
    color: var(--brand);
}

.qa-answer-preview {
    align-items: flex-start;
    gap: 8px;
    margin-top: 9px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}

.qa-answer-preview .qa-a {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 5px;
    font-size: 11px;
}

.qa-answer-preview p {
    color: #8a7f76;
    font-size: 14px;
    line-height: 1.75;
}

.qa-card-foot {
    margin-top: 10px;
    padding-top: 0;
    border-top: 0;
    font-size: 12px;
}

.qa-more {
    font-size: 12.5px;
}

@media (max-width: 900px) {
    .qa-hero-inner {
        padding: 30px 0 22px;
        gap: 22px;
    }

    .qa-hero-img {
        height: auto;
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 560px) {
    .qa-card {
        padding: 20px 0;
    }

    .qa-question {
        font-size: 17px;
    }
}

/* ========== 分类 / 问答分类页 精修 v5 ========== */
/* 页头只保留面包屑与分类名：去掉大图、别名小标和自动标语 */
.cat-head,
.qa-head {
    padding: 26px 0 0;
}

.cat-head .breadcrumb,
.qa-head .breadcrumb {
    margin: 0 0 8px;
}

.cat-head h1,
.qa-head h1 {
    margin: 0;
    font-size: clamp(24px, 3.2vw, 32px);
    line-height: 1.35;
    letter-spacing: .01em;
}

.cat-desc {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

/* 分类页文章：两列紧凑卡片，无边框、无分隔线，hover 只做浅色底 */
.cat-body {
    padding: 6px 0 56px;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 18px;
    margin: 0 -14px;
}

.cat-grid .post-card {
    padding: 14px;
    background: none;
    border: 0;
    border-radius: 12px;
    transition: background .2s;
}

.cat-grid .post-card:hover {
    background: #fffaf4;
    border: 0;
    box-shadow: none;
    transform: none;
}

.cat-grid .post-card.has-thumb {
    gap: 16px;
}

.cat-grid .post-card-top {
    gap: 8px;
    margin-bottom: 6px;
}

.cat-grid .post-card-top .pill:not(.pill-top) {
    display: none;
}

.cat-grid .post-date {
    color: #a99c90;
    font-size: 12px;
}

.cat-grid .post-card h3 {
    margin: 0 0 5px;
    font-size: 16.5px;
    line-height: 1.5;
}

.cat-grid .post-intro {
    -webkit-line-clamp: 2;
    font-size: 13.5px;
    line-height: 1.7;
}

.cat-grid .post-meta {
    margin-top: 7px;
    font-size: 12px;
}

.cat-grid .post-more {
    display: none;
}

.cat-grid .post-thumb {
    flex: 0 0 118px;
    aspect-ratio: 4 / 3;
    border-radius: 9px;
}

/* 分类页相关问答：两列单行问题，去掉摘要、箭头和边框 */
.cat-qa {
    padding: 6px 0 56px;
}

.cat-qa-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 2px;
}

.cat-qa-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.cat-qa-head a {
    color: var(--brand-dark);
    font-size: 12.5px;
    white-space: nowrap;
}

.cat-qa-head a:hover {
    color: var(--brand);
}

.cat-qa-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    margin: 0 -12px;
}

.cat-qa-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 8px;
    transition: background .2s;
}

.cat-qa-item:hover {
    background: #fffaf4;
}

.cat-qa-q {
    flex: 0 0 auto;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
}

.cat-qa-title {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cat-qa-item:hover .cat-qa-title {
    color: var(--brand-dark);
}

/* 问答分类页：主题导航改为无边框文字胶囊 */
.qa-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 16px auto 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.qa-topic {
    padding: 5px 12px;
    background: none;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.qa-topic:hover {
    background: #fff4e9;
    border: 0;
    color: var(--brand-dark);
}

.qa-topic.is-active {
    background: var(--brand-soft);
    border: 0;
    color: var(--brand-dark);
    box-shadow: none;
    font-weight: 600;
}

/* 问答列表：紧贴内容的单列行，无分隔线，整行可点 */
.qa-body {
    padding: 4px 0 56px;
}

.qa-list {
    display: block;
    margin: 4px -16px 0;
    border: 0;
}

.qa-card {
    position: relative;
    display: block;
    margin: 0;
    padding: 14px 16px;
    background: none;
    border: 0;
    border-radius: 12px;
    transition: background .2s;
}

.qa-card:hover {
    background: #fffaf4;
    border: 0;
    box-shadow: none;
    transform: none;
}

.qa-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.qa-card .qa-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.qa-card .qa-topic-tag {
    position: relative;
    z-index: 1;
    padding: 0;
    background: none;
    border-radius: 0;
    color: var(--brand-dark);
    font-size: 12px;
    line-height: 1.6;
}

.qa-card .qa-topic-tag:hover {
    background: none;
    color: var(--brand);
}

.qa-card-top .qa-date {
    margin-left: auto;
    color: #a99c90;
    font-size: 12px;
}

.qa-question {
    margin: 5px 0 0;
    font-size: 17px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
}

.qa-question a {
    transition: color .2s;
}

.qa-question a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.qa-card:hover .qa-question a {
    color: var(--brand);
}

.qa-answer-preview {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 4px 0 0;
    padding: 0;
    background: none;
    border: 0;
}

.qa-answer-preview .qa-a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: #f2f5f2;
    color: #67836c;
    font-size: 10.5px;
    font-weight: 700;
    transform: translateY(1px);
}

.qa-answer-text {
    overflow: hidden;
    color: #8a7f76;
    font-size: 13.5px;
    line-height: 1.7;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qa-card-foot {
    margin: 5px 0 0;
    padding: 0;
    border: 0;
    color: #a2958a;
    font-size: 12px;
    line-height: 1.6;
}

.qa-more {
    display: none;
}

@media (max-width: 900px) {
    .cat-grid {
        grid-template-columns: 1fr;
        margin: 0 -12px;
    }

    .cat-grid .post-thumb {
        flex-basis: 132px;
    }

    .cat-qa-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .cat-head,
    .qa-head {
        padding-top: 18px;
    }

    .cat-grid {
        margin: 0 -10px;
    }

    .cat-grid .post-card {
        padding: 12px 10px;
    }

    .cat-grid .post-card.has-thumb {
        gap: 12px;
    }

    .cat-grid .post-thumb {
        flex-basis: 96px;
    }

    .cat-grid .post-card h3 {
        font-size: 16px;
    }

    .qa-topics {
        margin-top: 12px;
    }

    .qa-list {
        margin: 4px -10px 0;
    }

    .qa-card {
        padding: 12px 10px;
    }

    .qa-question {
        font-size: 16px;
    }

    .qa-answer-text {
        font-size: 13px;
    }

    .cat-qa-grid {
        margin: 0 -10px;
    }

    .cat-qa-item {
        padding: 8px 10px;
    }
}

/* ========== 分类 / 问答分类页 温馨首屏 v6 ========== */
/* 首屏回归大图，但压成一枚暖色卡片：左标题、右图片，让视觉先落在分类上，再自然过渡到下方列表 */
.cat-hero,
.qa-hero {
    padding-top: 18px;
    background: none;
    border-bottom: 0;
}

.cat-hero-crumbs,
.qa-hero-crumbs {
    margin: 0 0 10px;
}

.cat-hero-crumbs .breadcrumb,
.qa-hero-crumbs .breadcrumb {
    margin: 0;
}

.cat-hero-inner,
.qa-hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 236px;
    overflow: hidden;
    padding: clamp(26px, 3vw, 42px) clamp(24px, 3.4vw, 44px);
    border-radius: 20px;
    background-color: #fff8f1;
    background-image: linear-gradient(115deg, rgba(var(--brand-rgb), .05) 0%, rgba(var(--brand-rgb), .12) 100%);
}

/* 分类大图作为首屏背景，左侧用暖色渐隐压出标题区，右侧保留插画主体 */
.cat-hero-bg,
.qa-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 72% 42%;
    filter: saturate(.95) contrast(.98);
}

.cat-hero-inner::after,
.qa-hero-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, #fff8f1 0%, rgba(255, 248, 241, .97) 24%, rgba(255, 248, 241, .72) 46%, rgba(255, 248, 241, .22) 72%, rgba(255, 248, 241, .02) 92%, rgba(255, 248, 241, 0) 100%),
        linear-gradient(180deg, rgba(255, 248, 241, .16) 0%, rgba(255, 248, 241, 0) 45%, rgba(255, 248, 241, .18) 100%);
}

.cat-hero-copy,
.qa-hero-copy {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 62%;
}

.cat-hero h1,
.qa-hero h1 {
    margin: 0;
    color: #2f2115;
    font-size: clamp(25px, 3.2vw, 36px);
    line-height: 1.25;
    letter-spacing: .005em;
}

.cat-hero .cat-desc,
.qa-hero .cat-desc {
    max-width: 52ch;
    margin: 10px 0 0;
    color: #7c6755;
    font-size: 14.5px;
    line-height: 1.75;
}

/* 首屏之后稍作留白，让视线落到内容本身 */
.cat-hero + .cat-body,
.qa-hero + .qa-topics,
.qa-hero + .qa-body {
    margin-top: 14px;
}

@media (max-width: 780px) {
    .cat-hero-inner,
    .qa-hero-inner {
        min-height: 176px;
        padding: 22px 20px;
        border-radius: 16px;
    }

    .cat-hero-bg,
    .qa-hero-bg {
        object-position: 78% 44%;
    }

    .cat-hero-copy,
    .qa-hero-copy {
        max-width: 74%;
    }

    .cat-hero h1,
    .qa-hero h1 {
        font-size: 23px;
    }

    .cat-hero .cat-desc,
    .qa-hero .cat-desc {
        display: -webkit-box;
        overflow: hidden;
        font-size: 13.5px;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .cat-hero-inner,
    .qa-hero-inner {
        min-height: 156px;
        padding: 18px 16px;
    }

    .cat-hero-copy,
    .qa-hero-copy {
        max-width: 82%;
    }

    .cat-hero h1,
    .qa-hero h1 {
        font-size: 21px;
    }
}
