
/* ==========================================================================
   Base: variables, reset, common elements, container
   ========================================================================== */
:root {
    --theme-color: #ff5f33;
    --theme-color-dark: #db4a24;
    --text-color: #23282d;
    --text-muted: #6b7280;
    --text-light: #9aa2ab;
    --bg-body: #eef0f2;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --border-color: #e5e7eb;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .1);
    --container: 1200px;
    --header-h: 70px;
    --transition: .22s ease;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Mobantu-style: never allow horizontal page scroll. One over-wide element
   (long title, ad banner, mis-sized embed) must not open a sideways gutter -
   clip it instead. clip (not hidden) keeps position:sticky working */
html, body { overflow-x: clip; }
body {
    margin: 0;
    background: var(--bg-body);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);

    min-height: 100vh; display: flex; flex-direction: column;
}
html:not(.night) body {
    background-color: var(--fs-bg, var(--bg-body));
    color: var(--fs-text, var(--text-color));
}
a { color: var(--fs-link, inherit); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--theme-color); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
.skip-link:focus {
    position: fixed; top: 8px; left: 8px; z-index: 9999;
    width: auto; height: auto; clip: auto;
    background: var(--theme-color); color: #fff;
    padding: 8px 16px; border-radius: var(--radius-sm);
}
@media (max-width: 768px) {
    body { font-size: 14px; padding-bottom: 64px; }
    /* iOS Safari auto-zooms the page on focus when an input's font-size is
       under 16px - keep every form control at 16px on mobile to stop that */
    input[type="text"], input[type="search"], input[type="email"],
    input[type="url"], input[type="tel"], input[type="number"],
    input[type="password"], textarea, select {
        font-size: 16px !important;
    }
    /* mobile: 10px side padding (desktop uses 16px) - content sits close to the screen edge */
    .container { padding: 0 10px; }
    body { padding-bottom: 58px; }
}
a.term-banner:hover img { transform: scale(1.05); }

/* ==========================================================================
   Layout: page frame, content + sidebar
   ========================================================================== */
.site-main { flex: 1 0 auto; }
.posts { display: grid; gap: 18px; }
/* minmax(0, 1fr) everywhere (never a bare 1fr): a bare fr track is sized to
   its content's min-content width, so one wide tag string / long title on a
   phone blows the column - and the whole page - past the viewport */
.posts.grids {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.posts.lists { grid-template-columns: minmax(0, 1fr); }
.posts.lists.cols-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.posts .card { min-width: 0; }
.posts.lists.cols-three { grid-template-columns: repeat(3, 1fr); }
.posts.lists.cols-title { gap: 0; }
.posts.lists.cols-title .card-list-title {
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color, #eaeaea);
    background: transparent;
    padding: 12px 4px;
}
.posts.lists.cols-title .card-list-title:last-child { border-bottom: 0; }
.posts.lists.cols-title .card-title {
    font-size: 16px; font-weight: 500; margin: 0 0 6px;
    -webkit-line-clamp: 1; line-clamp: 1;
}
.posts.lists.cols-title .card-meta { font-size: 12px; gap: 14px; }
.posts.lists.cols-title .rec-tag {
    display: inline-block; margin-left: 6px; padding: 1px 5px;
    border-radius: 3px; color: #fff; font-size: 11px; vertical-align: middle;
}
@media (max-width: 768px) {
    .posts.lists.cols-two,
        .posts.lists.cols-three { grid-template-columns: minmax(0, 1fr); }
}
.content-with-sidebar {
    display: grid; grid-template-columns: 1fr 300px; gap: 26px;
    align-items: start;
}
.single-page .content-with-sidebar { margin-top: 20px; }
.topic-page .content-with-sidebar { margin-top: 20px; }
.single-page .breadcrumbs { margin-top: 20px; margin-bottom: 0; }
.content-area { min-width: 0; }
.content-with-sidebar > .content-area:only-child { grid-column: 1 / -1; }
.sidebar { position: sticky; top: calc(var(--header-h) + 18px); }
@media (max-width: 1024px) {
    .content-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; margin-top: 26px; }
}
@media (max-width: 768px) {
    .posts.grids { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    /* Sidebar widgets never render on phones (Mobantu does the same: .sidebar display:none).
       On tablets (769-1024) they stay visible, stacked below the content. */
    .sidebar { display: none; }
    .single-page .breadcrumbs,
        .single-page .content-with-sidebar { margin-top: 12px; }
    .single-page .single-article,
        .single-page .article-nav { padding: 0; border-radius: 0; border: none; }
    /* Keep border-bottom:none - with zero card padding a full-width rule hits both screen edges */
    .single-page .entry-meta { border-bottom: none; padding-bottom: 0; margin-bottom: 14px; }
    .single-page .article-nav .article-nav-prev,
        .single-page .article-nav .article-nav-next { padding-left: 10px; padding-right: 10px; }
    .night .single-page .single-article,
        .night .single-page .article-nav,
        .night .sidebar .widget { background: transparent; }
    /* related-post cards keep their own card colour (like the reference
       theme's #1f1f1f grids), otherwise they melt into the #232323 base */
    .night .single-page .related-posts .card { background: var(--bg-card); }
    /* mobile single/page night base color follows the reference theme (#232323,
       not the global #121212) */
    body.single.night,
    body.page.night { background: #232323; }
    /* mobile article page day base color also follows the reference theme:
       pure white, not the global grey (#eef0f2). The html:not(.night) prefix
       out-ranks the global html:not(.night) body rule further up */
    html:not(.night) body.single { background: #fff; }
    /* tags row hugged the prev/next card below (46px above vs 20px below):
       balance the spacing so the row sits centred between them */
    .single-page .entry-tags { margin-top: 14px; padding-top: 18px; }
    .single-page .article-nav { margin-top: 32px; }
    /* page base is pure white: related cards use the same surface tone as the
       "本文链接" copyright box (rgba(0,0,0,.04)) for a consistent card language */
    html:not(.night) .single-page .related-posts .card {
        background: rgba(0, 0, 0, .04);
        box-shadow: 0 0 18px rgba(0, 0, 0, .1);
    }
}
@media (max-width: 480px) {
    .posts.grids { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.single-wide .content-with-sidebar { display: block; }
.single-wide .content-area { max-width: 960px; margin: 0 auto; width: 100%; }
/* full-width page template (like the reference theme's .banner-page +
   sidebar-less content filling the standard container) */
.page-banner {
    color: #fff; text-align: center; padding: 40px 20px;
    background-color: #333; background-position: center;
    background-size: cover; background-repeat: no-repeat;
    position: relative;
}
.page-banner.has-bg::before {
    content: ''; position: absolute; left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, .35);
}
.page-banner-title { position: relative; margin: 0; font-size: 28px; line-height: 1.3; }
html.night .page-banner { background-color: #151515; }
@media (max-width: 768px) {
    .page-banner { padding: 20px 15px; }
    .page-banner-title { font-size: 20px; }
}
@media print {
    .content-with-sidebar { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Header: branding, logo, navigation, menus
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    /* alpha comes from --header-alpha (theme setting "导航栏透明度"), 1 = opaque */
    background: color-mix(in srgb, var(--bg-header) calc(var(--header-alpha, 1) * 100%), transparent);
    border-bottom: none;
    transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-h);
    gap: 16px;
}
.site-branding { display: flex; align-items: center; flex-shrink: 0; }
.site-title {
    font-size: 19px; font-weight: 700; color: var(--text-color);
    letter-spacing: .5px;
}
.site-title:hover { color: var(--theme-color); }
.site-branding { height: 100%; }
.site-logo { display: flex; align-items: center; height: 100%; }
.site-logo a { display: flex; align-items: center; height: 100%; line-height: 0; }
/* Use max-width (and width:auto); a fixed width deforms the logo */
.site-logo img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.main-nav { flex: 1; height: 100%; display: flex; align-items: center; margin-left: 30px; }
.nav-menu { display: flex; align-items: center; gap: 4px; height: 100%; }
.nav-menu .menu-item { position: relative; }
.nav-menu .menu-item > a {
    display: block; padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 16px; font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.nav-menu .menu-item > a:hover { background: var(--bg-body); color: var(--theme-color); }
.nav-menu > .menu-item { height: 100%; }
.nav-menu > .menu-item > a {
    display: flex; align-items: center; height: 100%;
    padding: 0 12px; border-radius: 0;
}
.nav-menu > .menu-item > a:hover { background: transparent; color: var(--theme-color); }
.nav-menu > .menu-item > a { position: relative; }
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a,
.nav-menu > li.current_page_item > a,
.nav-menu > li.current-post-ancestor > a,
.nav-menu > li.current-menu-ancestor > a,
.nav-menu > li.current-category-ancestor > a { color: var(--theme-color); }
.nav-menu > li.current-menu-item > a::before,
.nav-menu > li.current-menu-parent > a::before,
.nav-menu > li.current_page_item > a::before,
.nav-menu > li.current-post-ancestor > a::before,
.nav-menu > li.current-menu-ancestor > a::before,
.nav-menu > li.current-category-ancestor > a::before {
    content: ''; position: absolute; bottom: 0; left: 13px; right: 13px;
    height: 2px; border-radius: 2px; background: var(--theme-color);
}
.nav-menu .sub-menu {
    display: block; position: absolute; top: 100%; left: 0;
    min-width: 180px; padding: 6px 0; margin: 20px 0 0;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .15);
    font-size: 14px;
    opacity: 0; visibility: hidden;
    transition: all .2s ease-in-out;
    z-index: 1001;
}
.nav-menu > .menu-item > .sub-menu::before {
    content: ''; position: absolute; left: 20px; top: -5px;
    width: 11px; height: 11px;
    background: var(--bg-card);
    transform: rotate(45deg);
    border-radius: 2px;
}
.nav-menu li:hover > .sub-menu {
    opacity: 1; visibility: visible; margin-top: 0;
}
.nav-menu .sub-menu .menu-item > a {
    display: flex; align-items: center;
    padding: 9px 16px; font-size: 14px;
    border-radius: 0;
    font-weight: normal;
}
.nav-menu .sub-menu .menu-item > a:hover,
.nav-menu .sub-menu .current-menu-item > a,
.nav-menu .sub-menu .current-menu-parent > a,
.nav-menu .sub-menu .current-menu-ancestor > a {
    background: none; color: var(--theme-color);
}
.nav-menu .menu-item-has-children > a { display: flex; align-items: center; }
.nav-menu .menu-item-has-children > a::after {
    content: ''; flex: none;
    width: 8px; height: 8px; margin-left: 5px;
    border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    opacity: .75;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-menu .menu-item-has-children:hover > a::after {
    transform: rotate(225deg) translateY(-1px);
    opacity: 1;
}
.nav-menu .sub-menu li.menu-item-has-children { position: relative; }
.nav-menu .sub-menu li.menu-item-has-children > a { padding-right: 34px; }
.nav-menu .sub-menu li.menu-item-has-children > a::after {
    content: ''; position: absolute; right: 15px; top: 50%;
    width: 7px; height: 7px; margin-top: -5px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    opacity: .55;
}
.nav-menu .sub-menu li.menu-item-has-children > a:hover::after { opacity: 1; color: var(--theme-color); }
.nav-menu .sub-menu .sub-menu {
    top: -6px; left: 100%; margin: 0 0 0 8px;
    min-width: 170px;
}
.nav-menu .sub-menu .sub-menu::before { display: none; }
.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0;
    background: transparent; border: 0; cursor: pointer;
    border-radius: 50%; color: var(--text-color);
    transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--bg-body); color: var(--theme-color); }
.icon-btn .dashicons { font-size: 19px; width: 19px; height: 19px; }
.mode-ico {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; line-height: 1; font-style: normal;
}
.mode-ico .mode-sun { display: none; }
.night .mode-ico .mode-moon { display: none; }
.night .mode-ico .mode-sun { display: inline-block; }
.menu-toggle { display: none; }
.topbar {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 13px;
    line-height: 34px;
}
.topbar .topbar-nav { max-height: 34px; overflow: hidden; white-space: nowrap; }
.topbar .topbar-nav a {
    margin-right: 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition);
}
.topbar .topbar-nav a:hover { color: var(--theme-color); }
@media (max-width: 768px) {
    /* Mobile drawer. Behaviour mirrors Mobantu's own nav-mobile-show:
       full-height left panel, mask sits BELOW the header (z 999 < 1000) so the
       toggle button stays clickable and closes the drawer. */
    .menu-toggle { display: flex; }
    .main-nav {
        position: fixed; top: 0; bottom: 0; left: 0;
        width: 300px; max-width: 80vw; margin: 0;
        padding: 14px 0 90px; /* bottom keeps the last items clear of the mobile tab bar */
        display: block; /* MUST override the desktop display:flex + align-items:center,
                           otherwise the whole menu gets vertically centred in the drawer */
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        background: var(--bg-card);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .26s ease, visibility .26s;
        z-index: 1200;
    }
    .main-nav.open { transform: translateX(0); visibility: visible; }
    .nav-mask {
        position: fixed; top: 0; right: 0; left: 0; bottom: 0;
        background-color: rgba(45, 50, 55, .4);
        z-index: 999;
        display: none;
    }
    .nav-mask.show { display: block; }
    body.nav-lock, html.nav-lock { height: 100%; overflow: hidden; }

    .nav-menu { display: block; flex-direction: column; gap: 0; height: auto; padding: 0; }
    /* each row is a light rounded block */
    .nav-menu > .menu-item {
        float: none; height: auto;
        margin: 0 15px 10px; padding: 0 15px;
        background: var(--bg-body);
        border-radius: 5px;
        font-size: 15px;
    }
    .nav-menu .menu-item > a { padding: 12px 0; color: var(--text-color); }
    .nav-menu > .menu-item > a { display: flex; align-items: center; height: auto; }
    .nav-menu > .menu-item > a:hover { background: none; color: var(--theme-color); }
    /* one icon per row, cycling through 8 built-in dashicons (codepoints from wp-includes) */
    .nav-menu > .menu-item > a::before {
        font-family: dashicons; font-size: 19px; line-height: 1;
        margin-right: 11px; color: var(--text-light);
    }
    .nav-menu > .menu-item:nth-child(8n+1) > a::before { content: "\f102"; }
    .nav-menu > .menu-item:nth-child(8n+2) > a::before { content: "\f318"; }
    .nav-menu > .menu-item:nth-child(8n+3) > a::before { content: "\f155"; }
    .nav-menu > .menu-item:nth-child(8n+4) > a::before { content: "\f203"; }
    .nav-menu > .menu-item:nth-child(8n+5) > a::before { content: "\f14c"; }
    .nav-menu > .menu-item:nth-child(8n+6) > a::before { content: "\f103"; }
    .nav-menu > .menu-item:nth-child(8n+7) > a::before { content: "\f487"; }
    .nav-menu > .menu-item:nth-child(8n+8) > a::before { content: "\f513"; }
    .nav-menu .sub-menu {
        position: static; display: none; opacity: 1; visibility: visible;
        box-shadow: none; border: 0; border-radius: 0; background: transparent;
        padding-left: 15px; margin: 0;
    }
    .nav-menu > .menu-item > .sub-menu::before,
        .nav-menu .sub-menu .sub-menu::before { display: none; }
    .nav-menu .sub-menu .sub-menu { top: auto; left: auto; margin: 0; }
    /* Submenus open ONLY from the arrow button (Mobantu behaviour).
       Opening on :hover is deliberately avoided: touch screens keep the hover
       state after a tap, which leaves submenus stuck open or unclickable. */
    .nav-menu .sub-menu.show { display: block; }
    .nav-menu .sub-menu a { padding: 0; margin-bottom: 5px; }
    /* expand arrow appended by JS to every item that has children */
    /* the desktop CSS arrow (::after) must go: the drawer uses its own arrow */
    .nav-menu .menu-item-has-children > a::after { display: none; }
    .nav-menu .explose {
        display: inline-block; flex: none;
        margin-left: auto; padding: 10px 2px 10px 14px;
        line-height: 1; cursor: pointer;
    }
    .nav-menu .explose::before {
        font-family: dashicons; content: "\f347"; /* arrow-down-alt2 */
        font-size: 16px; line-height: 1; color: var(--text-light);
    }
    .nav-menu .explose.open::before { content: "\f343"; } /* arrow-up-alt2 */
    /* current page: icon colours too, same as the label */
    .nav-menu > li.current-menu-item > a::before,
        .nav-menu > li.current_page_item > a::before { color: var(--theme-color); }
    /* logo shown at the top of the panel (cloned in by JS when first opened) */
    .main-nav .drawer-logo { display: flex; justify-content: center; padding: 4px 20px 18px; }
    .main-nav .drawer-logo img { height: 42px; width: auto; max-width: 100%; }
    /* current page: theme-coloured text (no background, matching Mobantu) */
    .nav-menu > li.current-menu-item > a,
        .nav-menu > li.current-menu-parent > a,
        .nav-menu > li.current_page_item > a,
        .nav-menu > li.current-post-ancestor > a,
        .nav-menu > li.current-menu-ancestor > a,
        .nav-menu > li.current-category-ancestor > a {
        color: var(--theme-color) !important;
    }
    /* the desktop underline pseudo-element must stay put: in the drawer
       a::before carries the row icon and has to remain in normal flow */
    .nav-menu > li.current-menu-item > a::before,
        .nav-menu > li.current-menu-parent > a::before,
        .nav-menu > li.current_page_item > a::before,
        .nav-menu > li.current-post-ancestor > a::before,
        .nav-menu > li.current-menu-ancestor > a::before,
        .nav-menu > li.current-category-ancestor > a::before {
        position: static; left: auto; right: auto; bottom: auto;
        height: auto; background: none;
    }
    /* night: panel/rows follow Mobantu's darker palette */
    body.night .main-nav,
    html.night .main-nav { background: #232323; }
    body.night .nav-menu > .menu-item,
    html.night .nav-menu > .menu-item { background: #282828; }
    body.night .nav-menu .menu-item > a,
    html.night .nav-menu .menu-item > a { color: #999 !important; }
    body.night .nav-menu > li.current-menu-item > a,
    body.night .nav-menu > li.current_page_item > a,
    body.night .nav-menu > li.current-menu-ancestor > a,
    body.night .nav-menu > li.current-category-ancestor > a { color: var(--theme-color) !important; }
}
@media print {
    .site-header, .site-footer, .rollbar, .mobile-bottom-nav,
        .sidebar, .search-layer, .comments-area { display: none !important; }
}

/* ==========================================================================
   Search layer
   ========================================================================== */
.search-layer {
    position: absolute; top: 100%; left: 0; right: 0;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
    z-index: 999;
}
.search-layer.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.search-wrap-container {
    padding: 22px 0;
    background: var(--bg-card);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .075);
}
.night .search-wrap-container {
    background: #232323;
    border-bottom: 1px solid #2f2f2f;
}
.night .search-field { border-color: #3d3d3d; }
.night .search-field:focus { border-color: var(--theme-color); }
.search-form {
    position: relative;
    display: flex; align-items: center;
    width: 86%; margin: 0 7%;
}
.search-cat {
    position: relative;
    height: 50px; padding: 0 22px 0 0; flex-shrink: 0;
    display: flex; align-items: center;
    background: transparent; color: var(--text-color);
    border: 0; border-radius: 0; cursor: pointer; outline: none;
    font-size: 15px;
}
.search-cat::after {
    content: ''; position: absolute; right: 4px; top: 22px;
    width: 0; height: 0;
    border-style: solid; border-width: 4px 3px 0 3px;
    border-color: currentColor transparent transparent transparent;
}
.search-field, .hero-search-field {
    flex: 1; min-width: 0; height: 50px; padding: 0 16px;
    border: 1px solid var(--border-color);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: transparent; color: var(--text-color); font-size: 15px;
    outline: none;
}
.search-field:focus { border-color: var(--theme-color); }
.search-submit, .hero-search-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 120px; height: 50px; padding: 0; flex-shrink: 0;
    background: var(--theme-color); color: #fff;
    border: 0; border-radius: 0 10px 10px 0; cursor: pointer;
    font-size: 15px;
    line-height: 1;
    transition: background var(--transition);
}
.search-submit .dashicons { font-size: 18px; width: 18px; height: 18px; }
.search-submit:hover, .hero-search-btn:hover { background: var(--theme-color-dark); color: #fff; }
.search-close {
    width: 40px; height: 50px; flex-shrink: 0;
    background: transparent; color: var(--text-color);
    border: 0; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 22px; line-height: 1;
    transition: background var(--transition), color var(--transition);
}
.search-close:hover { background: var(--bg-body); color: var(--theme-color); }
.search-cats {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 168px; padding: 8px 0;
    background: var(--bg-card); border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .16);
    z-index: 1000;
}
.search-cats.show { display: block; }
.search-cats::before {
    content: ''; position: absolute; top: -5px; left: 20px;
    width: 10px; height: 10px;
    background: var(--bg-card);
    transform: rotate(45deg); border-radius: 2px;
}
.search-cats ul { list-style: none; margin: 0; padding: 0; }
.search-cats li {
    padding: 9px 20px; font-size: 14px; color: var(--text-color);
    cursor: pointer; white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.search-cats li:hover { background: var(--bg-body); color: var(--theme-color); }
.search-cats li.is-active { color: var(--theme-color); font-weight: 600; }
.search-count { color: var(--text-muted); font-size: 14px; }
.notfound-search .search-field {
    width: 100%; height: 46px; padding: 0 16px;
    border: 1px solid var(--border-color); border-radius: var(--radius);
    background: var(--bg-card); color: var(--text-color);
}
@media (max-width: 768px) {
    .search-wrap-container { padding: 14px 0; }
    .search-form { width: 92%; margin: 0 4%; }
    .search-cat { padding: 0 20px 0 0; font-size: 14px; }
    .search-field, .hero-search-field { padding: 0 12px; font-size: 14px; }
    .search-submit, .hero-search-btn { width: 84px; }
}

/* ==========================================================================
   Notice bar
   ========================================================================== */
/* -32px = the container's 16px padding on both sides; keep in sync if padding changes */
.notice-bar {
    width: 100%;
    max-width: calc(var(--container) - 32px);
    margin: 0 auto 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}
.notice-bar .container {
    display: flex; align-items: stretch;
    padding: 0;
}
.notice-tag {
    display: flex; align-items: center; justify-content: center;
    height: 38px; padding: 0 16px; box-sizing: border-box;
    font-size: 17px; font-weight: 600;
    border-right: 2px solid var(--border-color);
    flex-shrink: 0;
}
.notice-list { flex: 1; min-width: 0; height: 38px; overflow: hidden; position: relative; }
.notice-list ul { margin: 0; padding: 0; list-style: none; }
.notice-list li {

    display: flex; align-items: center; justify-content: flex-start;
    height: 38px; padding: 0 16px; box-sizing: border-box;
    font-size: 15px; font-weight: 600; line-height: 20px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notice-list li > * {
    min-width: 0; max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notice-bar a,
.notice-bar .notice-list span { color: inherit; }
.notice-bar a { text-decoration: underline; text-underline-offset: 2px; }
.notice-list.multi ul { animation: notice-slide var(--notice-dur, 6s) linear infinite; }
.notice-list.multi:hover ul { animation-play-state: paused; }
.notice-ad {
    width: 100%;
    max-width: calc(var(--container) - 32px);
    margin: 0 auto 20px;
    text-align: center;
    line-height: 0;
}
.notice-ad .container {

    max-width: none; margin: 0; padding: 0;
}
.notice-ad img { max-width: 100%; height: auto; display: inline-block; }
.notice-tools {
    width: 100%;
    max-width: calc(var(--container) - 32px);
    margin: 0 auto 20px;
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
    line-height: 0;
}
.notice-tool { display: block; flex: 1 1 0; min-width: 0; text-decoration: none; border-radius: 6px; overflow: hidden; }
.notice-tool img {

    display: block; width: 100%; height: auto;
    aspect-ratio: 350 / 100; object-fit: cover; border-radius: 6px;
}
@media (max-width: 768px) {
    .notice-bar,
        .notice-ad {
            max-width: calc(100% - 20px);
            margin-bottom: 14px;
        }
    .notice-tag {
            font-size: 14px;
            padding: 0 10px;
            height: 34px;
        }
    .notice-list { height: 34px; }
    .notice-list li {
            font-size: 14px;
            padding: 0 12px;
            height: 34px;
        }
    .notice-ad img {
            width: 100%;
            height: auto;
        }
    .notice-tools {
            max-width: calc(100% - 20px);
            gap: 8px;
        }
    .notice-tool { flex: 1 1 calc(50% - 8px); }
    .notice-tool img { width: 100%; height: auto; }
}

/* ==========================================================================
   Home hero banner
   ========================================================================== */
.hero {
    position: relative;
    padding: 56px 0 44px;
    text-align: center;
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-color-dark) 100%);
    color: #fff;
    margin-bottom: 26px;

    min-height: var(--hero-height, 400px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 768px) {
    .hero { min-height: var(--hero-height-m, 300px); }
}
.hero[style*="--hero-bg"],
.hero[style*="--hero-bg-m"] {
    background-size: cover;
    background-position: center;
}
.hero[style*="--hero-bg"] { background-image: var(--hero-bg); }
@media (max-width: 768px) {
    .hero[style*="--hero-bg-m"] { background-image: var(--hero-bg-m); }
}
.hero-gray::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
}
@media (max-width: 768px) {
    .hero-gray[style*="--hero-bg-m"]::before { background-image: var(--hero-bg-m); }
}
.hero-gray .container { position: relative; z-index: 2; }
.hero-gray .hero-video { filter: grayscale(100%); }
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (min-width: 769px) {
    .hero-has-video { background-image: none !important; }
    .hero-gray.hero-has-video::before { display: none; }
}
.hero-has-video::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .3);
    pointer-events: none;
    z-index: 1;
}
.hero-has-video .container { position: relative; z-index: 2; }
.hero-title {
    margin: 0 0 10px;
    font-size: var(--hero-title-size, 34px);
    font-family: var(--hero-title-font, inherit);
    color: var(--hero-title-color, #fff);
    font-weight: 800;
    letter-spacing: 1px;
}
.hero-subtitle {
    margin: 0 0 26px;
    font-size: var(--hero-sub-size, 16px);
    color: var(--hero-sub-color, #fff);
    opacity: .92;
}
.hero-search {
    display: flex; align-items: center; gap: 0; max-width: 640px; margin: 0 auto;
    background: #fff; color: #23282d;
    padding: 0 4px 0 18px; border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}
.hero-search-cats-wrap { position: relative; flex-shrink: 0; }
.hero-search-cat {
    height: 52px; padding: 0 22px 0 0;
    display: flex; align-items: center;
    border: 0; border-radius: 0;
    background: transparent; color: #23282d;
    font-size: 15px; font-weight: 500; cursor: pointer; outline: none;
}
.hero-search-cat::after {
    content: '';
    position: absolute; right: 6px; top: 50%;
    width: 7px; height: 7px; margin-top: -5px;
    border-right: 1.5px solid #555; border-bottom: 1.5px solid #555;
    transform: rotate(45deg);
    transition: transform var(--transition);
    pointer-events: none;
}
.hero-search-cats-wrap.open .hero-search-cat::after { transform: rotate(225deg); margin-top: -2px; }
.hero-search-cats {
    position: absolute; top: calc(100% + 12px); left: -10px;
    min-width: 168px;
    background: #fff; border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .16);
    padding: 8px 0;
    display: none; z-index: 99;
}
.hero-search-cats::before {
    content: '';
    position: absolute; top: -5px; left: 26px;
    width: 10px; height: 10px;
    background: #fff;
    transform: rotate(45deg);
    border-radius: 2px;
}
.hero-search-cats.open { display: block; }
.hero-search-cats ul { list-style: none; margin: 0; padding: 0; }
.hero-search-cats li {
    padding: 10px 22px; font-size: 15px; color: #23282d;
    cursor: pointer; white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.hero-search-cats li:hover { background: #f5f6f7; color: var(--theme-color); }
.hero-search-cats li.is-active { color: var(--theme-color); font-weight: 600; }
.hero-search-field {
    flex: 1; min-width: 0; height: 52px; padding: 0 12px;
    border: 0; border-radius: 0;
    background: transparent; color: #23282d; font-size: 15px;
}
.hero-search-field::placeholder { color: #9aa0a6; }
.hero-search-field:focus { outline: none; }
.hero-search-btn {
    width: 46px; height: 46px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 0; gap: 0;
    background: none; color: #23282d;
    border: 0; border-radius: 8px; cursor: pointer;
    font-size: 0;
}
.hero-search-btn .dashicons { font-size: 22px; width: 22px; height: 22px; }
.hero-search-btn:hover { background: #f2f3f5; color: var(--theme-color); }
@media (max-width: 768px) {
    .hero { padding: 38px 0 30px; }
    .hero-title { font-size: var(--hero-title-size-m, 25px); }
    .hero-subtitle { font-size: 14px; margin-bottom: 18px; }
    .hero-search { flex-wrap: nowrap; padding: 0 4px 0 14px; }
    .hero-search-cats-wrap { min-width: 0; flex-shrink: 1; overflow: visible; }
    .hero-search-cat { max-width: 96px; padding: 0 18px 0 0; }
    .hero-search-cat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hero-search-cats { left: 0; }
    .hero-search-cats::before { left: 18px; }
    .hero-search-field { flex: 1; min-width: 0; padding: 0 8px; }
    .hero-search-btn { width: 44px; height: 44px; flex-shrink: 0; }
}
@media (max-width: 480px) {
    .hero-title { font-size: var(--hero-title-size-m, 22px); }
}
.hero { position: relative; }
.hero-btns {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.hero-btn {
    display: inline-block;
    padding: 5px 16px;
    background: #fff;
    color: var(--theme-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
}
.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
    color: var(--theme-color);
}
.hero-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    pointer-events: none;
    z-index: 1;
}
.hero-dark .container { position: relative; z-index: 2; }

/* ==========================================================================
   Home blocks (post sections)
   ========================================================================== */
.block { margin-bottom: 36px; }
.block-head { margin-bottom: 24px; text-align: center; }
.block-title {
    display: inline-block; position: relative;
    margin: 0; font-size: 22px; font-weight: 600;
}
.block-title::after {
    content: ''; width: 20px; height: 3px; border-radius: 1.5px;
    background: var(--theme-color);
    position: absolute; left: calc(50% - 10px); bottom: -10px;
}
.block-title-inner { position: relative; display: inline-block; }
.block-title .dashicons { font-size: 22px; height: auto; margin-right: 4px; color: var(--theme-color); vertical-align: -2px; }
.block-desc { margin: 14px 0 0; color: var(--text-muted); font-size: 14px; text-align: center; }
.block-tabs {
    list-style: none; text-align: center;
    margin: 14px 0 0; padding: 0;
}
.block-tabs li { display: inline-block; margin: 0 6px; }
.block-tabs li a {
    display: inline-block; padding: 5px 10px;
    font-size: 14px; color: var(--text-muted);
    position: relative; transition: color var(--transition);
}
.block-tabs li a:hover { color: var(--text-color); }
.block-tabs li.active a { color: var(--theme-color); }
.block-tabs li.active a::after {
    content: ''; position: absolute; bottom: -4px; left: calc(50% - 2px);
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--theme-color);
}
.block-more { margin-top: 20px; text-align: center; }
@media (max-width: 768px) {
    .block-title { font-size: 18px; }
}

/* ==========================================================================
   Post cards, badges, card meta
   ========================================================================== */
.card {
    background: var(--bg-card);
    border: none; /* reference theme has no card borders: adjacent borders read as lines */
    border-radius: 6px;
    /* no overflow:hidden here: the rec badge floats 4px above the card top
       (reference theme style) and would be clipped; the thumb clips itself */
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-thumb {
    position: relative; display: block; overflow: hidden;
    border-radius: 6px 6px 0 0; /* clips the thumb corners that .card used to clip */
    background: var(--bg-body);
    aspect-ratio: 19 / 12;
}
.card-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s ease;
}
.card:hover .card-thumb img { transform: scale(1.06); }
.cat-badge {
    position: absolute; top: 8px; left: 8px;
    padding: 2px 9px; border-radius: var(--radius-sm);
    color: #fff; font-size: 12px; font-weight: 500;
    backdrop-filter: blur(4px);
}
.sticky-badge {
    position: absolute; top: 8px; right: 8px;
    padding: 2px 9px; border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px;
}
.card-body { padding: 12px 14px 14px; }
.card-title {
    margin: 0 0 8px; font-size: 15px; font-weight: 600;
    line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title a { color: var(--text-color); }
.card-title a:hover { color: var(--theme-color); }
.card-excerpt {
    margin: 0 0 10px; color: var(--text-muted);
    font-size: 13px; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
    color: var(--text-light); font-size: 12px;
}
.card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.card-meta .dashicons { font-size: 13px; width: 13px; height: 13px; }
.card-more { margin-left: auto; color: var(--theme-color); }
.card-list {
    display: grid; grid-template-columns: 220px 1fr; gap: 0;
    align-items: stretch;
}
.card-list .card-thumb {
    aspect-ratio: auto; height: 100%; min-height: 150px; min-width: 220px;
}
.card-list .card-thumb img { height: 100%; object-fit: cover; }
.card-list .card-body { padding: 14px 18px; align-self: center; }
.card-list .card-title { font-size: 17px; -webkit-line-clamp: 1; }
.card-list .card-excerpt { -webkit-line-clamp: 2; }
.card-list .cat-badge { position: static; display: inline-block; margin-bottom: 8px; }
.entry-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.entry-meta .meta-cats a {
    margin-right: 6px; padding: 2px 8px; border-radius: var(--radius-sm);
    background: var(--bg-body); color: var(--text-muted);
}
/* topic chip: theme-color badge so the topic stands out in the meta row.
   Text uses the night-mode body background colour (#121212) so it stays
   readable in both day and night mode. */
/* fixed "社团:" prefix, only rendered when the post has topics;
   negative margin pulls it close to the topic link (flex gap is 16px) */
.entry-meta .meta-topics-label { color: var(--text-light); margin-right: -10px; }
/* topic link: plain theme-coloured text, no badge box */
.entry-meta .meta-topics a { color: var(--theme-color); }
.entry-meta .meta-topics a:hover { color: var(--theme-color); opacity: .8; }
.entry-meta .meta-cats a:hover { background: var(--theme-color); color: #fff; }
@media (max-width: 768px) {
    .card-list { grid-template-columns: 1fr; }
    .card-list .card-thumb { width: 100%; min-width: 0; min-height: 0; aspect-ratio: 19/12; }
}
@media (max-width: 480px) {
    .card-body { padding: 10px; }
    .card-title { font-size: 13px; }
    .card-excerpt { display: none; }
}
.cat-wall { padding: 20px 0 4px; }
.cat-wall-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}
.cat-wall-item {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 14px 8px 11px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #eaeaea);
    border-top: 3px solid var(--cat-color, var(--theme-color));
    background: var(--bg-card, #fff);
    transition: transform var(--transition), box-shadow var(--transition);
}
.cat-wall-item:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .08); }
.cat-wall-icon { color: var(--cat-color, var(--theme-color)); font-size: 22px; width: 22px; height: 22px; }
.cat-wall-name { font-size: 14px; font-weight: 600; color: var(--text-color); }
.cat-wall-count { font-size: 12px; color: var(--text-muted, #8a8f99); }
body.night .cat-wall-item,
html.night .cat-wall-item,
body.night .home-stats-inner,
html.night .home-stats-inner {
    background: #1f1f1f;
    border-color: #2f2f2f;
}
@media (max-width: 768px) {
    .cat-wall-inner { grid-template-columns: repeat(2, 1fr); }
}
.card-grid .card-cats,
.card-grid .card-tags {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted, #8a8f99);
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 4px;
}
/* content-box is required: border-box collapses the dot into a solid square */
.card-grid .card-cats .dot {
    flex: none;
    box-sizing: content-box;
    width: 4px;
    height: 4px;
    border: 2px solid var(--theme-color);
    border-radius: 50%;
    background: none !important;
}
.card-grid .card-cats a,
.card-grid .card-tags a {
    color: var(--text-muted, #8a8f99);
    text-decoration: none;
    transition: color var(--transition);
}
.card-grid .card-cats a:hover,
.card-grid .card-tags a:hover { color: var(--theme-color); }
.card-grid .card-cats .sep { opacity: .45; }
.card-grid .card-tags { display: block; }
.card-grid .card-tags a {
    display: inline-block;
    position: relative;
    padding-left: 10px;
    margin-right: 10px;
}
.card-grid .card-tags a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
}
.card-grid .card-tags a:nth-child(1)::before { background: #ff5e5c; }
.card-grid .card-tags a:nth-child(2)::before { background: #ffbb50; }
.card-grid .card-tags a:nth-child(3)::before { background: #1ac756; }
.card-grid .card-tags a:nth-child(4)::before { background: #19b5fe; }
.card-grid .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 2px 0 8px;
}
.card-thumb { position: relative; }
.card-flag {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--theme-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    vertical-align: 2px;
}
.single-article .entry-title .card-flag {
    padding: 3px 9px;
    font-size: 13px;
    vertical-align: middle;
}
.card { position: relative; }
/* rec badge: same construction as the reference theme's .recommend-tag
   (base.css 522-523) - floats 4px above the card top, square-ish corners with
   a sharp top-left, and a little same-colour triangle peeking out on the left.
   The colour comes from the inline --badge-c variable so the triangle matches
   whatever colour is configured in the theme settings. */
.rec-badge {
    position: absolute;
    top: -4px;
    right: 10px;
    z-index: 3;
    height: 20px;
    line-height: 20px;
    padding: 0 4px;
    border-radius: 2px;
    border-top-left-radius: 0;
    background: var(--badge-c, #e54b3c);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
}
.rec-badge::before {
    content: "";
    display: inline-block;
    position: absolute;
    left: -4px;
    top: 0;
    vertical-align: top;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 5px 5px;
    border-color: transparent transparent var(--badge-c, #e54b3c) transparent;
}

/* ==========================================================================
   Filter bar and sorting
   ========================================================================== */
.filters {
    margin: 14px 0 20px;
    padding: 15px 20px;
    background: var(--bg-card, #fff);
    border-radius: var(--radius, 6px);
}
.term-header + .filters { margin-top: 0; }
.term-header + .sort-bar { margin-top: 0; }
.filters:empty { display: none; }
.filter-item {
    position: relative;
    margin-bottom: 7px;
    padding: 0 0 7px 70px;
}
.filter-item:last-child { margin-bottom: 0; padding-bottom: 0; }
.filter-item > span {
    position: absolute; left: 0; top: 4px;
    font-weight: 600; color: #666; font-size: 14px;
}
.filter { display: inline-block; font-size: 14px; }
.filter a {
    display: inline-block;
    margin: 3px;
    padding: 6px 10px 7px;
    color: #666;
    line-height: 1;
    text-decoration: none;
}
.filter a:hover { color: var(--theme-color); }
.filter a.active {
    background: var(--theme-color);
    color: #fff;
    border-radius: 4px;
}
.filter-item.filter-item-order {
    border-top: 1px solid #f9f9f9;
    margin-top: -7px;
    padding-top: 7px;
}
body.night .filter-item,
html.night .filter-item { border-color: #252525; }
.filter-item.filter-item-order > span { top: 11px; }
.filter-item:first-child.filter-item-order {
    border-top: 0; margin-top: 0; padding-top: 0;
}
.filter-item:first-child.filter-item-order > span { top: 4px; }
.filter-item-order .filter a { background: transparent; color: #666; }
.filter-item-order .filter a:hover,
.filter-item-order .filter a.active {
    background: transparent;
    color: var(--theme-color);
}
.filter-item-order .filter .dashicons { font-size: 14px; width: 14px; height: 14px; opacity: .8; }
@media (max-width: 768px) {
    .filters { margin-bottom: 15px; padding: 10px; }
    .filter-item { padding-left: 50px; }
    .filter-item > span { top: 1px; font-size: 13px; width: 42px; }
    .filter-item.filter-item-order > span { top: 7px; }
    .filter-item:first-child.filter-item-order > span { top: 1px; }
    .filter { font-size: 13px; }
    .filter a { margin: 1px 2px; font-size: 12px; padding: 3px 6px 4px; }
}
.filter-bar {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
.filter-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-color);
}
.filter-row:last-child { border-bottom: 0; }
.filter-label {
    flex: none;
    width: 44px;
    padding-top: 3px;
    color: #888;
    font-size: 13px;
}
.filter-items { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-bar .filter-item {
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-color);
    text-decoration: none;
    background: rgba(128, 128, 128, .09);
}
.filter-bar .filter-item:hover { background: rgba(128, 128, 128, .18); }
.filter-bar .filter-item.is-active { background: var(--theme-color); color: #fff; }
.sort-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #eaeaea);
}
.sort-label { font-size: 13px; color: var(--text-muted, #8a8f99); }
.sort-item {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-color, #333);
    text-decoration: none;
    transition: all var(--transition);
}
.sort-item:hover { background: rgba(0, 0, 0, .05); color: var(--theme-color); }
.sort-item.is-active { background: var(--theme-color); color: #fff; }
body.night .sort-item:hover,
html.night .sort-item:hover { background: rgba(255, 255, 255, .08); }

/* ==========================================================================
   Archive / taxonomy headers
   ========================================================================== */
.archive-header { margin-bottom: 22px; }
.archive-title { margin: 0 0 8px; font-size: 25px; font-weight: 700; }
.archive-desc { color: var(--text-muted); font-size: 14px; }
.archive-subcats {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.archive-subcats .subcat {
    padding: 5px 15px; border-radius: 999px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 13px;
    transition: all var(--transition);
}
.archive-subcats .subcat:hover,
.archive-subcats .subcat.is-active {
    background: var(--theme-color); color: #fff; border-color: transparent;
}
.term-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 16px;
    margin-top: 14px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: var(--bg-card, #fff);
}
.term-header.has-banners { align-items: center; }
.term-header.has-banners .term-header-body { flex: none; max-width: 46%; }
.term-header-banners {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding-left: 18px;
    border-left: 1px solid var(--border-color, #eaeaea);
}
.term-banner {
    display: block;
    height: 62px;
    border-radius: 6px;
    overflow: hidden;
}
.term-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}
@media (max-width: 768px) {
    .term-header.has-banners { flex-wrap: wrap; align-items: flex-start; }
    .term-header.has-banners .term-header-body { max-width: 100%; }
    .term-header-banners {
            flex-basis: 100%;
            grid-template-columns: repeat(2, 1fr);
            padding-left: 0;
            border-left: 0;
            padding-top: 12px;
            border-top: 1px solid var(--border-color, #eaeaea);
        }
    .term-banner { height: 52px; }
}
.term-header-body { flex: 1; min-width: 0; }
.term-title { margin: 4px 0 6px; font-size: 22px; }
.term-desc { margin-bottom: 6px; font-size: 14px; line-height: 1.7; color: var(--text-muted, #8a8f99); }
.term-stats { font-size: 13px; color: var(--term-color, var(--theme-color)); }
.term-header .breadcrumbs { margin-bottom: 0; margin-top: 2px; font-size: 13px; }
.term-header .breadcrumbs .current { color: var(--term-color, var(--theme-color)); }
.archive-subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.subcat {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color, #eaeaea);
    background: var(--bg-card, #fff);
    color: var(--text-color, #333);
    font-size: 13px;
    text-decoration: none;
    transition: all var(--transition);
}
.subcat:hover { border-color: var(--theme-color); color: var(--theme-color); }
.subcat.is-active { background: var(--theme-color); border-color: var(--theme-color); color: #fff; }
body.night .term-header,
html.night .term-header,
body.night .subcat,
html.night .subcat { background: #191919; border-color: #2f2f2f; }

/* ==========================================================================
   Single post: content, meta, prev/next, breadcrumbs
   ========================================================================== */
.breadcrumbs .crumb-prefix { color: var(--text-muted); }
.single-wide .breadcrumbs { max-width: 960px; margin-left: auto; margin-right: auto; }
.breadcrumbs {
    margin-bottom: 16px; color: var(--text-muted); font-size: 13px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--theme-color); }
.breadcrumbs .sep { margin: 0 7px; color: var(--text-light); }
.breadcrumbs .current { color: var(--text-color); }
.single-article {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px 26px;
}
.entry-title { margin: 0 0 14px; font-size: 27px; font-weight: 700; line-height: 1.4; }
.entry-meta {
    display: flex; flex-wrap: wrap; gap: 16px;
    align-items: center;           /* vertical centring: badge, icons, text on one line */
    justify-content: flex-start;   /* keep the whole row left-aligned */
    padding-bottom: 16px; margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light); font-size: 13px;
}
.entry-meta .dashicons { font-size: 14px; width: 14px; height: 14px; }
.entry-thumb { margin: 0 0 20px; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { width: 100%; }
.entry-content {
    font-size: 16px; line-height: 1.85; color: var(--text-color);
}
.entry-content a { color: var(--theme-color); text-decoration: underline; text-underline-offset: 2px; }
.entry-content img { border-radius: var(--radius-sm); margin: 8px 0; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
    margin: 26px 0 12px; font-weight: 700;
    border-left: 6px solid var(--theme-color);
    padding: 9px 15px; background: #fafafa;
    line-height: 1.55; /* fixed px line-heights sit CJK text too high in the block */
}
.entry-content h1 { font-size: 24px; border-left-width: 8px; }
.entry-content h2 { font-size: 21px; border-left-width: 6px; }
.entry-content h3 { font-size: 18px; border-left-width: 4px; }
.entry-content h4 { font-size: 16px; border-left-width: 2px; }
html.night .entry-content h1, html.night .entry-content h2,
html.night .entry-content h3, html.night .entry-content h4 {
    background: #1f1f1f;
}
.entry-content p { margin: 0 0 16px; }
.entry-content ul, .entry-content ol { margin: 0 0 16px; padding-left: 24px; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 6px; }
/* quote blocks render like plain paragraphs - the theme-color bar is
   reserved for headings (h1-h4) only */
.entry-content blockquote {
    margin: 0 0 16px; padding: 0;
    border-left: 0;
    background: transparent;
    color: var(--text-muted);
}
.entry-content blockquote p { margin: 0 0 16px; }
.entry-content pre {
    margin: 0 0 16px; padding: 16px; overflow-x: auto;
    background: var(--bg-body); border-radius: var(--radius-sm);
    font-size: 13px; line-height: 1.6;
}
.entry-content table {
    width: 100%; margin-bottom: 16px; border-collapse: collapse; font-size: 14px;
}
.entry-content th, .entry-content td {
    padding: 9px 12px; border: 1px solid var(--border-color);
}
.entry-content th { background: var(--bg-body); font-weight: 600; }
.entry-tags {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: 26px; padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
}
.entry-tags .dashicons { font-size: 15px; width: 15px; height: 15px; color: var(--text-light); }
.entry-tags a {
    padding: 3px 12px; border-radius: 999px;
    background: var(--bg-body); color: var(--text-muted);
    transition: all var(--transition);
}
.entry-tags a:hover { background: var(--theme-color); color: #fff; }
.article-nav {
    clear: both; overflow: hidden;
    color: var(--text-muted, #8a8f99); font-size: 12px;
    background: var(--bg-card, #fff);
    border-radius: var(--radius, 6px);
    margin: 20px 0; padding: 20px;
}
.article-nav a { font-size: 14px; color: var(--text-color, #333); text-decoration: none; }
.article-nav a:hover { color: var(--theme-color); }
.article-nav .article-nav-prev { float: left; width: 50%; border-right: 1px dashed var(--border-color, #eaeaea); }
.article-nav .article-nav-next { float: right; width: 50%; text-align: right; }
body.night .article-nav,
html.night .article-nav { background: #191919; color: #777; }
/* Order matters: these night link colors must stay BEFORE the :hover rule below,
   otherwise they override the hover color (same specificity, later rule wins). */
body.night .article-nav a,
html.night .article-nav a { color: #bbb; }
body.night .article-nav a:hover,
html.night .article-nav a:hover,
body.night .article-nav a:focus,
html.night .article-nav a:focus { color: var(--theme-color); }
.related-posts { margin-top: 30px; }
@media (max-width: 768px) {
    .single-article { padding: 18px 16px; }
    .entry-title { font-size: 22px; }
    .entry-content { font-size: 15px; }
    .entry-title { font-size: 22px; }
    .entry-content { font-size: 15px; }
}
.entry-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 18px 0 8px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(243, 156, 18, .12);
    border: 1px solid rgba(243, 156, 18, .45);
    font-size: 14px;
    line-height: 1.7;
}
.entry-notice .dashicons { flex: none; margin-top: 3px; color: #f39c12; }
body.night .entry-notice,
html.night .entry-notice { background: rgba(243, 156, 18, .1); }
.entry-meta .post-edit-link {
    color: var(--text-muted, #8a8f99);
    text-decoration: none;
    transition: color var(--transition);
}
.entry-meta .post-edit-link:hover { color: var(--theme-color); }
.entry-copyright {
    display: flex;
    gap: 10px;
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 10px;
    border-left: 3px solid var(--theme-color);
    background: rgba(0, 0, 0, .04);
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-muted, #8a8f99);
}
.entry-copyright .dashicons { flex: none; color: var(--theme-color); }
.entry-copyright p { margin: 0; word-break: break-all; }
body.night .entry-copyright,
html.night .entry-copyright { background: rgba(255, 255, 255, .06); }

/* ==========================================================================
   Comments
   ========================================================================== */
.comment-form input:focus,
.comment-form textarea:focus,
.search-form input:focus,
.entry-content input:focus,
.widget input[type="search"]:focus {
    border-color: var(--theme-color);
    outline-color: var(--theme-color);
}
.comments-area {
    margin-top: 30px; padding: 24px 26px;
    background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: var(--radius);
}
.comments-title { margin: 0 0 18px; font-size: 18px; font-weight: 700; }
.comment-list li.comment {
    padding: 14px 0; border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}
.comment-meta { margin-bottom: 6px; color: var(--text-light); font-size: 13px; }
.comment-author { font-weight: 600; color: var(--text-color); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%; padding: 9px 12px; margin-bottom: 12px;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: var(--bg-body); color: var(--text-color);
    font-size: 14px; font-family: inherit;
}
.comment-form .submit {
    padding: 9px 26px;
    background: var(--theme-color); color: #fff;
    border: 0; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 14px; font-weight: 600;
}
.comment-form .submit:hover { background: var(--theme-color-dark); }

/* ==========================================================================
   Sidebar widgets
   ========================================================================== */
.widget {
    margin-bottom: 18px; padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
.widget-title {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 12px; font-size: 15px; font-weight: 700;
}
.widget-title::before {
    content: ''; width: 3px; height: 15px;
    background: var(--theme-color); border-radius: 2px;
}
.widget { margin-bottom: 20px; }
.widget-title { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget a { color: inherit; text-decoration: none; }
.widget a:hover { color: var(--theme-color); }

/* Custom sidebar widgets (post list / tag cloud) - structure ported from the
   reference theme's widgets, colours driven by this theme's variables. */
.widget-postlist li { padding: 8px 0; position: relative; }
.widget-postlist li:last-child { padding-bottom: 0 !important; }
.widget-postlist li h4 { font-size: 14px; font-weight: normal; margin: 0 0 2px; }
.widget-postlist li .meta { font-size: 12px; color: var(--text-light); margin: 0; }
.widget-postlist li .meta span { margin-right: 10px; }
.widget-postlist li .meta .dashicons { font-size: 13px; width: 13px; height: 13px; vertical-align: -1.5px; }
/* thumb mode: 100px image on the left, title clamped to 2 lines */
.widget-postlist .hasimg { margin-top: -8px; }
.widget-postlist .hasimg li { padding: 8px 0 8px 110px; height: 79px; }
.widget-postlist .hasimg li:last-child { height: 71px; }
.widget-postlist .hasimg li .img { position: absolute; left: 0; top: 8px; width: 100px; overflow: hidden; }
.widget-postlist .hasimg li .img img { width: 100%; height: 63px; border-radius: 5px; object-fit: cover; }
.widget-postlist .hasimg li h4 {
    height: 38px; overflow: hidden; margin: 0;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    text-overflow: ellipsis; line-height: 1.4; font-size: 14px; font-weight: normal;
}
.widget-postlist .hasimg li .meta { position: absolute; bottom: 8px; line-height: 14px; }
.widget-postlist .hasimg li:last-child .meta { bottom: 2px; }
.widget-postlist .hasimg li .meta .time { display: none; }
/* pure-image mode: two thumbnails per row */
.widget-postlist .hasimg2 li {
    padding: 8px 0 0 !important; height: auto !important;
    width: calc(50% - 5px); float: left; margin-right: 10px;
}
.widget-postlist .hasimg2 li:nth-child(2n) { margin-right: 0; }
.widget-postlist .hasimg2 li .img { position: static; width: 100% !important; }
.widget-postlist .hasimg2 li .img img { width: 100% !important; height: auto !important; border-radius: 5px; }

.widget-tags .items a {
    padding: 5px 8px; margin: 0 8px 8px 0; display: inline-block;
    background: var(--bg-body); color: var(--text-color);
    font-size: 12px; border-radius: 5px;
}
.widget-tags .items a:hover { background: var(--theme-color); color: #fff; }

/* image ad widget: the banner always fits the sidebar width */
.widget-ads .ads-img { display: block; }
.widget-ads img { display: block; width: 100%; height: auto; border-radius: 5px; }

/* tag archive page (template/tags.php) - card grid, same layout as the
   reference theme: 标签徽章 + ×文章数, latest post title on the second line */
.tagslist ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
/* banner title (same as the full-width page template) sits above the grid */
.tags-page .page-banner { margin-bottom: 20px; }
.tags-page .tagslist { margin-top: 20px; }
.tagslist li {
    width: 23%; margin: 0 2% 2% 0; padding: 12px 15px;
    background: var(--bg-card); border-radius: 3px;
    box-shadow: 0 0 15px rgba(0,0,0,.075);
}
.tagslist li .name {
    display: inline-block; padding: 5px 10px 4px; border-radius: 2px;
    background: var(--bg-body); color: var(--text-color); font-size: 12px;
}
.tagslist li:hover .name { background: var(--theme-color); color: #fff; }
.tagslist li small { margin-left: 10px; color: var(--text-light); }
.tagslist li p { margin: 10px 0 0; font-size: 12px; line-height: 1.5; height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tagslist li .tit { color: var(--text-light); }
.tagslist li .tit:hover { color: var(--theme-color); }
html.night .tagslist li { background: #232323; }
html.night .tagslist li .name { background: #313852; color: #dcdcdc; }
@media (max-width: 1024px) {
    .tagslist li { width: 31.3%; margin: 0 3% 3% 0; }
    .tagslist li:nth-child(3n) { margin-right: 0; }
    .tagslist li:nth-child(4n) { margin-right: 3%; }
}
@media (max-width: 768px) {
    .tagslist li { width: 48.5%; margin: 0 3% 3% 0; }
    /* reset the tablet rules that still apply at phone width */
    .tagslist li:nth-child(3n) { margin-right: 3%; }
    .tagslist li:nth-child(4n) { margin-right: 3%; }
    .tagslist li:nth-child(2n) { margin-right: 0; }
}

/* 专题 (topic taxonomy): list page cards + archive hero */
.topic-list { display: flex; flex-wrap: wrap; margin: 0 -1% ; }
.topic-item {
    width: 23%; margin: 0 1% 2%;
    background: var(--bg-card); border-radius: 3px; overflow: hidden;
    box-shadow: 0 0 15px rgba(0,0,0,.075);
}
.topic-item .thumb { display: block; aspect-ratio: 16 / 9; background: var(--bg-body); }
.topic-item .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-item .no-thumb {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; color: var(--text-light);
}
.topic-item .no-thumb .dashicons { font-size: 28px; width: 28px; height: 28px; }
.topic-item .info { padding: 10px 12px 12px; }
.topic-item .info h3 { margin: 0 0 6px; font-size: 15px; font-weight: bold; }
.topic-item .info h3 a { color: var(--text-color); }
.topic-item .info h3 a:hover { color: var(--theme-color); }
.topic-item .info p {
    margin: 0 0 8px; font-size: 12px; color: var(--text-light);
    min-height: 34px; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.topic-item .count { font-size: 12px; color: var(--text-light); }
.topics-empty { padding: 30px 0; color: var(--text-light); }
html.night .topic-item { background: #232323; }

.topic-hero {
    display: flex; gap: 18px; align-items: center;
    padding: 18px; margin-bottom: 18px;
    background: var(--bg-card); border-radius: 3px;
    box-shadow: 0 0 15px rgba(0,0,0,.075);
}
.topic-hero-img { flex: none; width: 220px; }
.topic-hero-img img { width: 100%; height: auto; border-radius: 3px; display: block; }
.topic-crumb { margin: 0 0 6px; font-size: 12px; color: var(--text-light); }
.topic-crumb a { color: var(--text-light); }
.topic-crumb .sep { margin: 0 5px; }
.topic-title { margin: 0 0 6px; font-size: 20px; }
.topic-desc { margin: 0 0 8px; font-size: 13px; color: var(--text-light); line-height: 1.6; }
.topic-count { font-size: 12px; color: var(--text-light); }
html.night .topic-hero { background: #232323; }
@media (max-width: 1024px) {
    .topic-item { width: 31.3%; margin: 0 1% 2%; }
}
@media (max-width: 768px) {
    .topic-item { width: 48%; margin: 0 1% 3%; }
    .topic-hero { flex-direction: column; align-items: stretch; }
    .topic-hero-img { width: 100%; }
}

/* home block filter bar (Mobantu style): 分类 / 标签 / 排序 rows */
.block-filter {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 2px 16px; margin: 0 0 18px;
}
.bf-row { display: flex; align-items: center; flex-wrap: wrap; padding: 9px 0; }
.bf-row + .bf-row { border-top: 1px solid var(--border-color); }
.bf-label { flex: none; width: 46px; font-size: 13px; color: var(--text-light); }
.bf-items { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.bf-item {
    font-size: 13px; padding: 3px 10px; border-radius: 4px;
    color: var(--text-color); cursor: pointer;
}
.bf-item:hover { color: var(--theme-color); }
.bf-item.active { background: var(--theme-color); color: #fff; }
html.night .block-filter { background: #232323; }
html.night .bf-row + .bf-row { border-top-color: #333; }
.widget-postlist .widget-postlist-items { margin: 0; padding: 0; list-style: none; }
.widget-postlist .widget-postlist-items > li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}
.widget-postlist .widget-postlist-items > li:first-child { padding-top: 0; }
.widget-postlist .widget-postlist-items > li:last-child { padding-bottom: 0; border-bottom: 0; }
.widget-postlist .pl-img {
    flex: none;
    width: 84px;
    display: block;
    border-radius: var(--radius-sm, 4px);
    overflow: hidden;
}
.widget-postlist .pl-img img {
    width: 84px;
    height: 56px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}
.widget-postlist .pl-img:hover img { transform: scale(1.05); }
.widget-postlist .pl-title {
    flex: 1; min-width: 0;
    margin: 0 0 4px;
    font-size: 14px; font-weight: 400; line-height: 1.5;

    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.widget-postlist .pl-meta {
    margin: 0; font-size: 12px; color: var(--text-muted);
    display: flex; gap: 10px; flex-wrap: wrap;
}
.widget-postlist .widget-postlist-items.hasimg2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.widget-postlist .widget-postlist-items.hasimg2 > li { display: block; padding: 0; border: 0; }
.widget-postlist .widget-postlist-items.hasimg2 .pl-img { width: 100%; }
.widget-postlist .widget-postlist-items.hasimg2 .pl-img img { width: 100%; height: 70px; }

/* ==========================================================================
   Pagination and load-more
   ========================================================================== */
.pagination ul.page-numbers {
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    border: 0; margin: 0;
}
.pagination .page-numbers li {
    display: inline-block; border: 0; margin: 0; padding: 0;
}
.pagination .page-numbers a,
.pagination .page-numbers span {
    display: inline-block; min-width: 36px; padding: 6px 12px;
    text-align: center;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 14px; line-height: 1.5;
    transition: all var(--transition);
}
.pagination .page-numbers .current,
.pagination .page-numbers a:hover {
    background: var(--theme-color); color: #fff; border-color: transparent;
}
/* page-number jump box (appended to both pagination styles) */
.fs-jump-item {
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: 8px; vertical-align: middle;
}
.fs-jump-input {
    width: 58px; padding: 5px 8px;
    background: var(--bg-card); color: var(--text-color);
    border: 1px solid var(--border-color); border-radius: 6px;
    font-size: 13px; line-height: 1.5; text-align: center;
    -moz-appearance: textfield;
}
.fs-jump-input::-webkit-outer-spin-button,
.fs-jump-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fs-jump-input:focus { outline: none; border-color: var(--theme-color); }
.fs-jump-btn {
    padding: 5px 12px; min-width: 36px; cursor: pointer;
    background: var(--bg-card); color: var(--text-color);
    border: 1px solid var(--border-color); border-radius: 6px;
    font-size: 13px; line-height: 1.5;
    transition: all var(--transition);
}
.fs-jump-btn:hover { background: var(--theme-color); color: #fff; border-color: transparent; }
html.night .fs-jump-input,
html.night .fs-jump-btn { background: #1f1f1f; border-color: #2f2f2f; color: var(--text-color); }

.fs-pagination { margin: 26px 0; text-align: center; }
.fs-pagination .page-numbers {
    display: inline-block;
    margin: 0 3px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #eaeaea);
    background: var(--bg-card, #fff);
    color: var(--text-color, #333);
    font-size: 13px;
    text-decoration: none;
    transition: all var(--transition);
}
.fs-pagination .page-numbers:hover { border-color: var(--theme-color); color: var(--theme-color); }
.fs-pagination .page-numbers.current {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
}
body.night .fs-pagination .page-numbers,
html.night .fs-pagination .page-numbers { background: #1f1f1f; border-color: #2f2f2f; }

/* ==========================================================================
   Friend links page (template/links.php)
   ========================================================================== */
/* hero search banner (zibll-style) */
.fs-nav-hero {
    position: relative; margin: 18px 0 26px;
    padding: 56px 24px 44px; text-align: center;
    background: linear-gradient(135deg, var(--theme-color) 0%, #1d2430 90%) center/cover no-repeat;
    border-radius: var(--radius, 10px); overflow: hidden;
}
.fs-nav-hero-title {
    margin: 0 0 22px; font-size: 28px; font-weight: 800;
    color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
.fs-nav-search {
    position: relative; max-width: 560px; margin: 0 auto;
}
.fs-nav-search input {
    width: 100%; height: 46px; padding: 0 48px 0 16px;
    border: none; border-radius: 8px;
    background: #fff; color: #333; font-size: 14px; outline: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}
.fs-nav-search input:focus { box-shadow: 0 6px 20px rgba(0, 0, 0, .18), 0 0 0 3px rgba(255, 255, 255, .35); }
.fs-nav-search-ic {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    color: #9aa0a6; pointer-events: none;
}
.fs-search-tip {
    margin: 12px 0 0; font-size: 12px;
    color: rgba(255, 255, 255, .85); text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
    min-height: 1em;
}
/* two-column layout: sticky category sidebar + link sections */
.fs-links-layout {
    display: grid; grid-template-columns: 190px minmax(0, 1fr);
    gap: 28px; align-items: start;
}
.fs-links-side {
    position: sticky; top: 90px;
    padding: 14px 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}
.fs-side-list {
    display: flex; flex-direction: column; gap: 6px;
}
/* editable note pinned above the category list */
.fs-side-note {
    margin: 0 0 8px; padding: 0 14px 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px; line-height: 1.7; color: var(--text-color);
    text-align: center;
}
.fs-side-note p { margin: 0 0 4px; }
.fs-side-note > :last-child { margin-bottom: 0; }
.fs-side-note a { color: var(--theme-color); text-decoration: none; }
.fs-side-item {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 14px; border-radius: 6px;
    font-size: 15px; color: var(--text-color); text-decoration: none;
    transition: all var(--transition);
}
.fs-side-item:hover { color: var(--theme-color); }
.fs-side-item.is-active {
    color: var(--theme-color); font-weight: 600;
    background: color-mix(in srgb, var(--theme-color) 14%, transparent);
}
/* editable notice bar right under the hero */
.fs-links-notice {
    margin: 0 0 20px; padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px; line-height: 1.7;
    color: var(--text-color);
    text-align: center;
}
.fs-links-notice p { margin: 0 0 4px; }
.fs-links-notice > :last-child { margin-bottom: 0; }
.fs-links-notice a { color: var(--theme-color); text-decoration: none; }
.fs-links-main { min-width: 0; }
.fs-links-box { margin: 0 0 32px; scroll-margin-top: 90px; }
.fs-links-title {
    margin: 0 0 14px; font-size: 19px; font-weight: 700;
}
.fs-links-title::before {
    content: ''; display: inline-block; width: 4px; height: 18px;
    background: var(--theme-color); border-radius: 2px;
    margin-right: 8px; vertical-align: -3px;
}
/* section title lights up in theme color while its category is selected */
.fs-links-box.is-current .fs-links-title { color: var(--theme-color); }
.fs-links-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}
/* hot picks: slightly bigger cards */
.fs-links-grid--hot { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.fs-links-grid--hot .fs-link-card { padding: 13px 14px; }
.fs-links-grid--hot .fs-link-icon { width: 52px; height: 52px; font-size: 21px; border-radius: 10px; }
.fs-links-empty {
    display: none; padding: 34px 0; text-align: center;
    color: var(--text-light); font-size: 14px;
}
.fs-links-empty.is-show { display: block; }
@media (max-width: 860px) {
    .fs-nav-hero { padding: 40px 16px 34px; }
    .fs-nav-hero-title { font-size: 22px; }
    .fs-links-layout { grid-template-columns: 1fr; gap: 16px; }
    .fs-links-side {
        position: static; padding: 0;
        background: transparent; border-radius: 0;
    }
    /* title on its own line, pills scroll below it */
    .fs-side-note { border-bottom: none; padding: 0 0 8px; text-align: center; }
    /* stack category pills downward, wrapping as needed (no horizontal scroll) */
    .fs-side-list {
        flex-direction: row; flex-wrap: wrap;
        justify-content: center;
        overflow: visible; padding-bottom: 0;
        gap: 8px;
    }
    .fs-side-item { flex: none; border: 1px solid var(--border-color); padding: 6px 12px; }
    .fs-side-item.is-active { border-color: var(--theme-color); }
    .fs-side-item::before { display: none; }
    /* two link cards per row on mobile */
    .fs-links-grid,
    .fs-links-grid--hot { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .fs-link-card { padding: 10px; gap: 8px; }
    .fs-link-card .fs-link-icon { width: 38px; height: 38px; font-size: 17px; }
}
.fs-link-card {
    display: flex; align-items: center; gap: 10px;
    padding: 12px; text-decoration: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.fs-link-card:hover {
    border-color: var(--theme-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}
/* Mobantu-style: the icon slot itself is transparent (round icons stay
   round, transparent PNGs show the card background), only the fallback
   initial letter carries the theme-color block */
.fs-link-icon {
    flex: none; position: relative; width: 44px; height: 44px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: transparent; color: #fff;
    border-radius: 6px; font-size: 19px; font-weight: 700;
}
.fs-link-icon-letter {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    background: var(--theme-color); border-radius: 6px;
}
.fs-link-icon img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
    background: transparent;
}
.fs-link-info { min-width: 0; }
.fs-link-info strong {
    display: block; font-size: 14px; color: var(--text-color); line-height: 1.4;
}
.fs-link-card:hover .fs-link-info strong { color: var(--theme-color); }
.fs-link-info em {
    display: block; font-style: normal; font-size: 12px; color: var(--text-light);
    line-height: 1.5; margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html.night .fs-link-card { background: #191919; border-color: #2f2f2f; }
html.night .fs-links-side { background: #191919; }
html.night .fs-links-notice { background: #191919; border-color: #2f2f2f; }
@media (max-width: 860px) {
    /* must come after the night rule above: mobile keeps no panel at all */
    html.night .fs-links-side { background: transparent; border-radius: 0; }
}

/* ==========================================================================
   Shortcode components
   ========================================================================== */
.fs-icon {
    display: inline-block; width: 1em; height: 1em;
    vertical-align: -.125em; overflow: visible;
    fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.fs-icon-brand { stroke: none; }
.fs-popup { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.fs-popup[hidden] { display: none; }
.fs-popup-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.fs-popup-box {
    position: relative; z-index: 1;
    width: min(520px, calc(100% - 32px));
    max-height: calc(100% - 48px); overflow-y: auto;
    padding: 20px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius, 8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
    text-align: center;
}
.fs-popup-title { margin: 0 0 10px; font-size: 26px; font-weight: 700; color: var(--text-color); }
.fs-popup-sub { margin: 6px 0 14px; font-size: 13px; color: var(--text-muted, #8a8f99); }
.fs-popup-ads { display: block; }
.fs-popup-ad { display: none; }
.fs-popup-ad.is-cur { display: block; }
.fs-popup-ad-link { position: relative; display: block; text-decoration: none; border-radius: 6px; overflow: hidden; }
.fs-popup-ad img { display: block; width: 100%; height: auto; }
.fs-popup-ad-ok {
    position: absolute; top: 6px; right: 8px;
    width: 22px; height: 22px; line-height: 22px; border-radius: 50%;
    background: #16a34a; color: #fff; font-size: 13px;
    opacity: 0; transition: opacity .15s;
}
.fs-popup-ad.is-done img { opacity: .55; }
.fs-popup-ad.is-done .fs-popup-ad-ok { opacity: 1; }
.fs-popup-tip { margin: 14px 0 0; font-size: 13px; color: var(--text-muted, #8a8f99); }
.fs-popup-tip b { color: var(--theme-color, #dfb701); }
.fs-popup-count { margin: 14px 0 0; font-size: 14px; font-weight: 600; color: var(--text-color); }
.fs-popup-count[hidden] { display: none; }
.fs-popup-note { margin: 8px 0 0; font-size: 12px; color: var(--text-muted, #8a8f99); }
.rollbar .fs-icon { width: 20px; height: 20px; font-size: 20px; vertical-align: middle; flex: none; }
.rollbar .fs-icon-qq { width: 24px; height: 24px; }
.rollbar .fs-min { display: none; }
.rollbar a.fullscreen.active .fs-max { display: none; }
.rollbar a.fullscreen.active .fs-min { display: inline-block; }
.fs-slider {
    position: relative;
    max-width: var(--container);
    margin: 18px auto 0;
    border-radius: 12px;
    overflow: hidden;
}
.fs-slider-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.fs-slider-track::-webkit-scrollbar { display: none; }
.fs-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    position: relative;
    display: block;
    height: var(--slide-h, 280px);
    background-size: cover;
    background-position: center;
    background-color: #2c2c33;
}
.fs-slide-title {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 46px 18px 16px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
}
.fs-slide-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; padding: 0;
    border: 0; border-radius: 50%;
    background: rgba(0, 0, 0, .42); color: #fff;
    font-size: 20px; line-height: 1; cursor: pointer;
    opacity: 0; transition: opacity var(--transition);
}
.fs-slider:hover .fs-slide-nav { opacity: 1; }
.fs-slide-nav.prev { left: 12px; }
.fs-slide-nav.next { right: 12px; }
.fs-slide-dots {
    position: absolute; left: 0; right: 0; bottom: 10px;
    display: flex; justify-content: center; gap: 6px;
}
.fs-slide-dots button {
    width: 8px; height: 8px; padding: 0;
    border: 0; border-radius: 4px;
    background: rgba(255, 255, 255, .5);
    cursor: pointer; transition: all var(--transition);
}
.fs-slide-dots button.active { width: 20px; background: #fff; }
@media (max-width: 768px) {
    .fs-slide { height: var(--slide-h, 190px); }
    .fs-slide-title { font-size: 15px; padding: 32px 14px 12px; }
}
.fs-lazy { background-repeat: no-repeat; background-position: center; background-size: cover; }
.fs-loadmore { margin: 26px 0; text-align: center; }
.fs-nomore {
    margin: 26px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted, #8a8f99);
}

/* ==========================================================================
   Footer and floating bar
   ========================================================================== */
.site-footer {
    margin-top: 46px; padding: 18px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 13px; }
.footer-bottom p { margin: 0 0 6px; }
.footer-text { color: var(--text-muted); font-size: 13px; }
.rollbar {
    position: fixed; right: 10px; bottom: 30px; z-index: 999;
}
.rollbar ul { margin: 0; padding: 0; list-style: none; width: 40px; }
.rollbar li {
    position: relative; text-align: center; margin-bottom: 5px;
    border-radius: var(--radius-sm); background: #e9eaea;
}
.rollbar .totop-li { display: none; }
.rollbar a {
    position: relative; z-index: 2;

    display: flex; align-items: center; justify-content: center;
    height: 40px; line-height: 1; color: #888;
    transition: color var(--transition);
}
.rollbar a:hover { color: var(--theme-color); }
.rollbar .dashicons { font-size: 20px; width: 40px; height: 40px; line-height: 40px; }
.rollbar li:hover { opacity: .95; }
.rollbar-center { bottom: auto; top: 50%; transform: translateY(-50%); }
.night .rollbar li { background: #232323; }
@media (max-width: 768px) {
    .rollbar { display: none; }
    .rollbar.rollbar-mobile { display: block; bottom: 74px; }
    .rollbar.rollbar-mobile.rollbar-center { bottom: auto; }
}

/* ==========================================================================
   Night mode (global)
   ========================================================================== */
.night {
    --text-color: #bbb;
    --text-muted: #999;
    --text-light: #777;
    --bg-body: #121212;
    --bg-card: #191919;
    --bg-header: #1b1b1b;
    --border-color: #2f2f2f;
    --shadow: 0 1px 3px rgba(0, 0, 0, .5);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .6);
}

/* ==========================================================================
   Misc
   ========================================================================== */
@supports (color: color-mix(in srgb, red 50%, blue)) {
    :root {
        --theme-color-dark: color-mix(in srgb, var(--theme-color) 82%, #000);
    }
}
.hot-tags {
    max-width: 640px; margin: 8px auto 0;
    display: flex; flex-wrap: wrap; gap: 8px;
    align-items: center; justify-content: center;
    font-size: 13px;
}
.hot-label { opacity: .85; }
.hot-tag {
    padding: 3px 12px; border-radius: 6px;
    background: rgba(255, 255, 255, .18); color: #fff;
    font-size: 13px; transition: background var(--transition);
}
.hot-tag:hover { background: rgba(255, 255, 255, .34); color: #fff; }
.badge-new {
    position: absolute; right: -42px; top: -12px;
    background: var(--theme-color); color: #fff;
    padding: 1px 6px; border-radius: 20px 20px 20px 0;
    font-size: 10px; font-weight: 400; font-style: normal; letter-spacing: .5px;
    line-height: 1.5;
}
.btn-more {
    display: inline-block; padding: 9px 30px;
    border: 1px solid var(--border-color); border-radius: 999px;
    background: var(--bg-card); color: var(--text-muted);
    font-size: 14px; transition: all var(--transition);
}
.btn-more:hover {
    background: var(--theme-color); color: #fff; border-color: transparent;
}
.page-links { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.page-links a, .page-links > span {
    display: inline-block; padding: 4px 11px; margin-right: 5px;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    font-size: 13px;
}
.section-title {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 16px; font-size: 19px; font-weight: 700;
}
.section-title::before {
    content: ''; width: 4px; height: 18px;
    background: var(--theme-color); border-radius: 2px;
}
/* related posts ("猜你喜欢") title: star instead of the theme-colour bar */
.related-posts .section-title::before {
    content: '⭐';
    width: auto; height: auto;
    background: none; border-radius: 0;
    font-size: 17px;
}
.pagination { margin-top: 26px; }
/* ========== 404 ========== */
.notfound { padding: 80px 0; text-align: center; }
.notfound .dashicons { font-size: 56px; width: 56px; height: 56px; color: var(--text-light); }
.notfound h1 { margin: 10px 0; font-size: 56px; font-weight: 800; }
.notfound p { color: var(--text-muted); margin-bottom: 22px; }
.notfound-search { max-width: 420px; margin: 0 auto 22px; }
.btn-back-home {
    display: inline-block; padding: 10px 28px;
    background: var(--theme-color); color: #fff;
    border-radius: 999px; font-weight: 600;
    transition: background var(--transition);
}
.btn-back-home:hover { background: var(--theme-color-dark); color: #fff; }
.no-content { padding: 60px 0; text-align: center; color: var(--text-muted); }
.no-content .dashicons { font-size: 40px; width: 40px; height: 40px; color: var(--text-light); }
.search-empty { padding: 48px 20px; text-align: center; color: var(--text-muted); }
.search-empty .dashicons { font-size: 48px; width: 48px; height: 48px; color: var(--text-light); }
.search-empty-title { margin: 14px 0 6px; font-size: 17px; font-weight: 600; color: var(--text-main); }
.search-empty-tips { margin: 0 0 20px; font-size: 13px; }
.search-empty .search-form { max-width: 420px; margin: 0 auto; }
.mobile-bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    display: none; align-items: center; justify-content: space-around;
    height: 58px; padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -1px 4px rgba(0, 0, 0, .06);
}
.mb-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 6px 0;
    background: none; border: 0; cursor: pointer;
    color: var(--text-muted); font-size: 10px;
}
.mb-item .dashicons { font-size: 19px; width: 19px; height: 19px; }
.mb-item .fa-solid, .mb-item .fa-regular, .mb-item .fa-brands {
    font-size: 19px; width: 19px; height: 19px; line-height: 19px; text-align: center;
}
.mb-item.is-active { color: var(--theme-color); }
@media (max-width: 768px) {
    .hot-tags { font-size: 12px; }
    .mobile-bottom-nav { display: flex; }
}
.home-stats { padding: 22px 0; }
.home-stats-inner {
    display: flex; justify-content: space-around; gap: 10px;
    padding: 18px 12px;
    border: 1px solid var(--border-color, #eaeaea);
    border-radius: 12px;
    background: var(--bg-card, #fff);
}
.home-stat { text-align: center; }
.home-stat-num { display: block; font-size: 23px; line-height: 1.4; color: var(--theme-color); }
.home-stat-label { font-size: 13px; color: var(--text-muted, #8a8f99); }
@media (max-width: 768px) {
    .home-stat-num { font-size: 19px; }
}
.all-posts-page .page-heading {
    margin: 20px 0 18px;
    font-size: 24px;
    text-align: center;
}
.all-posts-page .page-heading::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: var(--term-color, var(--theme-color));
}
/* Mobantu-style tag archive: nothing but a centered heading above the grid */
.tag-page .archive-heading {
    margin: 26px 0 20px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}
.article-faqs {
    background: #fafafa;
    font-size: 13px;
    padding: 15px 20px 17px;
    border-radius: 5px;
    margin: 20px 0;
}
.article-faqs .article-faq-title { font-size: 18px; margin-bottom: 15px; font-weight: 600; }
.article-faqs .items .item {
    margin-bottom: 10px;
    border-bottom: 1px dashed #eaeaea;
    padding-bottom: 10px;
}
.article-faqs .items .item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.article-faqs .items .item .que {
    font-size: 16px;
    cursor: pointer;
    position: relative;
    padding-right: 25px;
}
.article-faqs .items .item .que .dashicons-editor-help { font-size: 18px; width: 18px; height: 18px; color: var(--theme-color); }
.article-faqs .items .item .que .ic { color: #999; font-size: 14px; width: 14px; height: 14px; position: absolute; top: 5px; right: 0; transition: transform var(--transition); }
.article-faqs .items .item.active .que .ic { transform: rotate(180deg); }
.article-faqs .items .item .ans { color: #999; display: none; padding-left: 24px; margin-top: 6px; line-height: 1.7; }
.article-faqs .items .item.active .ans { display: block; }
body.night .article-faqs,
html.night .article-faqs { color: #777; background: rgba(24, 24, 24, .98); }
body.night .article-faqs .items .item,
html.night .article-faqs .items .item { border-color: #414243; }
.btn-loadmore {
    padding: 10px 34px;
    border: 1px solid var(--border-color, #eaeaea);
    border-radius: 999px;
    background: var(--bg-card, #fff);
    color: var(--text-color, #333);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-loadmore:hover {
    border-color: var(--theme-color);
    background: var(--theme-color);
    color: #fff;
}
.btn-loadmore.is-loading { opacity: .6; cursor: wait; }
.site-ad { margin: 16px 0; text-align: center; }
.site-ad img { max-width: 100%; border-radius: 8px; }
.site-ad iframe, .site-ad video { max-width: 100%; border: 0; }
/* single top banner: sits right under the header, breadcrumbs follow below */
.ad-single_top { margin: 14px 0 6px; }
