/*
Theme Name: 宠物派
Theme URI: https://www.chongwupet.com
Author: 宠物派
Description: 专注宠物健康科普与好物推荐的纯净自定义主题，零冗余钩子，极致加载体验。
Version: 1.0.0
Text Domain: chongwupet
*/

/* ========================================================================== 
   1. Design Tokens / Variables
========================================================================== */
:root {
    --theme-color: #4c3b71;
    --brand-red: #f99;
    --brand-pink: #fe6d84;

    --bg-page: #f6f5f9;
    --bg-card: #fff;
    --bg-overlay: rgba(45, 40, 56, 0.4);
    --bg-placeholder: #e9e7ef;

    --text-black: #1a1525;
    --text-main: #2d2838;
    --text-dark: #453e54;
    --text-normal: #6a6378;
    --text-muted: #928b9f;
    --text-light: #c2bdce;
    --text-white: #fff;

    --link-color: var(--theme-color);
    --link-color-pink: var(--brand-pink);
    --border-color: #e6e3ed;
    --bg-color: #fff;

    --element-bg-light: #f2f0f7;
    --element-bg-hover: #e8e5f0;

    --alpha-white-90: rgba(255, 255, 255, 0.9);
    --alpha-white-95: rgba(255, 255, 255, 0.95);
    
    --alpha-black-04: rgba(45, 40, 56, 0.04);
    --alpha-black-05: rgba(45, 40, 56, 0.05);
    --alpha-black-06: rgba(45, 40, 56, 0.06);
    --alpha-black-08: rgba(45, 40, 56, 0.08);
    --alpha-black-10: rgba(45, 40, 56, 0.1);

    --shadow-sm: 0 2px 12px rgba(45, 40, 56, 0.04);
    --shadow-md: 0 10px 30px rgba(45, 40, 56, 0.08);
    --shadow-chip: 0 2px 8px rgba(45, 40, 56, 0.06);
    --shadow-btn: 0 4px 12px rgba(45, 40, 56, 0.08);
    --shadow-btn-hover: 0 6px 16px rgba(45, 40, 56, 0.1);
    --shadow-modal: 0 20px 40px rgba(45, 40, 56, 0.15);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --max: 1440px;
    --floating-gap: 20px;
}

/* ========================================================================== 
   2. Reset / Base
========================================================================== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    scroll-padding-top: 80px;
    background: var(--theme-color);
}

body {
    height: 100%;
    margin: 0;
    background: var(--theme-color);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

body.modal-open {
    overflow: hidden;
    touch-action: none;
}

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

button,
input {
    margin: 0;
    font: inherit;
}

.full-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 0;
    background: var(--bg-page);
}

.wrap {
    flex: 1;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 16px 40px;
}
@media (min-width: 768px) {
    .full-page {
        padding-top: 0;
    }

    .wrap {
        padding: 0 30px 50px;
    }
}

@media (min-width: 1024px) {
    .full-page {
        padding-top: 0;
    }

    .wrap {
        padding: 0 30px 50px;
    }
}

/* ========================================================================== 
   3. Accessibility
========================================================================== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.pf-geo-summary {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 24px;
    z-index: 80;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    color: var(--theme-color);
    font-size: 15px;
    font-weight: 700;
    opacity: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    transition: all .4s cubic-bezier(.34, 1.56, .64, 1);
}

.skip-link:focus {
    top: 14px;
    opacity: 1;
    outline: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2), 0 0 0 3px var(--brand-red);
}

/* ========================================================================== 
   4. Header / Topbar / Search
========================================================================== */
.topbar {
    position: static;
    z-index: 60;
    width: 100%;
    background: var(--theme-color);
}

.topbar-inner {
    display: grid;
    width: 100%;
    height: 60px;
    padding: 10px 16px;
}
@media (min-width: 768px) {
    .topbar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 70px;
        padding: 10px 24px;
    }
}

.site-header {
    display: flex;
    align-items: center;
}

.site-header-left {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-width: 0;
}

.site-header-center {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

.site-header-right {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.brand {
    display: flex;
    align-items: center;
}

.brand img {
    height: clamp(40px, 3vw, 50px);
}

.menu-trigger,
.mobile-search-trigger,
.search-submit,
.mobile-search-clear {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.menu-trigger,
.mobile-search-trigger {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: var(--radius-pill);
    color: var(--text-white);
}

.menu-trigger {
    margin-left: auto;
}

.menu-trigger:active,
.mobile-search-trigger:active {
    transform: scale(.94);
}

.search-submit {
    position: absolute;
    top: 50%;
    right: 5px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, .04);
    color: var(--theme-color);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.search-submit:hover {
    background: rgba(76, 59, 113, .08);
    color: var(--theme-color);
}

.search-submit:active {
    transform: translateY(-50%) scale(.92);
}

.search-cancel {
    display: none;
    margin-left: 14px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-white);
    font-size: 15px;
    white-space: nowrap;
    cursor: pointer;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    display: none !important;
    -webkit-appearance: none !important;
}

input[type="search"]::-ms-clear {
    display: none !important;
}

.mobile-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    padding: 6px;
    color: var(--text-muted);
}

.mobile-search-clear:active {
    color: var(--text-main);
}

.site-search {
    position: relative;
    display: none;
    flex: 1;
    align-items: center;
    width: 100%;
    height: 40px;
    padding: 0 12px 0 16px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-pill);
    background: var(--alpha-white-90);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
@media (min-width: 768px) {
    .site-header {
        width: 100%;
    }
    .site-search {
        display: flex !important;
        flex: 1;
        max-width: 400px;
        margin: 0 20px;
    }
    .mobile-search-trigger {
        display: none;
    }
}

.site-search:hover {
    border-color: rgba(255, 255, 255, .32);
}

.site-search:focus-within {
    border-color: rgba(255, 255, 255, .42);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .12),
        0 6px 16px rgba(0, 0, 0, .12);
}

.site-search input {
    flex: 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding-right: 72px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
    font-size: 16px;
    line-height: 1;
    transition: color .2s ease, opacity .2s ease;
}

.site-search input::placeholder {
    color: var(--text-normal);
    transition: color .22s ease, opacity .22s ease, transform .22s ease;
}

.site-search:hover input::placeholder {
    opacity: .88;
}

.site-search:focus-within input {
    color: var(--text-black, var(--text-main));
}

.site-search:focus-within input::placeholder {
    opacity: .66;
    transform: translateX(2px);
}

.site-search input:focus {
    outline: none;
}

.site-search input:-webkit-autofill,
.site-search input:-webkit-autofill:hover,
.site-search input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-main);
    transition: background-color 9999s ease-out 0s;
}

#searchClear {
    display: none;
    position: static;
    padding: 6px;
    transform: none;
}

.search-clear {
    position: absolute;
    top: 50%;
    right: 40px;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    margin-right: 30px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, .04);
    color: var(--text-muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.search-clear:hover {
    background: rgba(0, 0, 0, .08);
    color: var(--text-main);
}

.search-clear:active {
    transform: translateY(-50%) scale(.92);
}

.site-header.search-active .site-header-left,
.site-header.search-active .site-header-right .mobile-search-trigger,
.site-header.search-active .site-header-right .menu-trigger {
    display: none;
}

.site-header.search-active .site-search {
    display: flex;
    animation: fadeIn .5s ease;
}

.site-header.search-active .search-cancel {
    display: inline-flex;
}

.search-result-box {
    position: absolute;
    top: calc(100%);
    left: 0;
    z-index: 999;
    width: 100%;
    max-width: 100%;
    max-height: 360px;
    overflow: hidden;
    overflow-y: auto;
    border-radius: 0 0 16px 16px;
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, .12),
        0 2px 8px rgba(0, 0, 0, .08),
        inset 0 1px 0 rgba(255, 255, 255, .6);
}

.search-result-item {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    color: #222;
    font-size: 15px;
    line-height: 1.5;
    cursor: pointer;
    transition: background .18s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, .45);
}

@media (min-width: 1024px) {
    .topbar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: var(--max);
        margin: 0 auto;
        height: 80px;
        padding: 0 30px;
    }

    .site-header {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 80px;
    }

    .site-header-left,
    .site-header-right {
        z-index: 10;
    }

    .site-header-center {
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 5;
        display: flex !important;
        justify-content: center;
        width: 100%;
        max-width: 600px;
        transform: translate(-50%, -50%);
    }

    .menu-trigger {
        display: flex !important;
    }

    .site-search {
        display: flex !important;
        flex: unset;
        width: 100%;
        max-width: unset;
        margin: 0;
        height: 42px;
        background: var(--alpha-white-95);
    }

    .site-search:focus-within input::placeholder {
        transform: translateX(3px);
    }

    .mobile-search-trigger,
    .search-cancel {
        display: none !important;
    }

    .search-result-box {
        top: calc(100% + 6px);
        width: 100%;
        margin: 0;
        border-radius: 16px;
    }
}

/* ========================================================================== 
   5. Sub Navigation / Chips / Encyclopedia Drawer
========================================================================== */
.sub-nav-container {
    position: relative;
    z-index: 30;
    padding: 10px 0 16px;
}

.chips {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 0 16px;
    gap: 5px;
    overflow-x: auto;
    overflow-y: visible;
    list-style: none;
    white-space: nowrap;
    background: var(--bg-page);
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
@media (min-width: 768px) {
    .chips {
        padding: 0 24px;
        justify-content: center;
    }
}

.chips::-webkit-scrollbar {
    display: none;
}

.chips > li {
    flex: 0 0 auto;
}

.chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    overflow: visible;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-normal);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.chip[data-active="true"] {
    background: var(--bg-card);
    color: var(--link-color);
    font-weight: 500;
    box-shadow: var(--shadow-chip);
}

.chip-dropdown {
    position: relative;
    width: auto;
}

.chip-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chip-dropdown.is-active .chip-dropdown-trigger {
    background: var(--bg-card);
    color: var(--link-color);
    font-weight: 500;
    box-shadow: var(--shadow-chip);
}

.chip-dropdown-arrow {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.chip-dropdown.is-open .chip-dropdown-arrow,
.chip-dropdown.is-active .chip-dropdown-arrow {
    transform: rotate(225deg) translateY(-1px);
}

.chip-dropdown-menu {
    display: none;
}

.encyclopedia-drawer {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
}

.encyclopedia-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 32, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.encyclopedia-drawer__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
    transition: transform 0.34s cubic-bezier(.32, .72, 0, 1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.58) 100%);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow:
        0 24px 60px rgba(20, 16, 32, 0.18),
        0 8px 24px rgba(20, 16, 32, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    will-change: transform;
    touch-action: none;
}

.encyclopedia-drawer__panel::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 50%;
    width: 80px;
    height: 5px;
    border-radius: 999px;
    background: rgba(76, 59, 113, 0.16);
    transform: translateX(-50%);
    pointer-events: none;
}

body.has-encyclopedia-drawer {
    overflow: hidden;
}

body.has-encyclopedia-drawer .encyclopedia-drawer {
    pointer-events: auto;
}

body.has-encyclopedia-drawer .encyclopedia-drawer__overlay {
    opacity: 1;
}

body.has-encyclopedia-drawer .encyclopedia-drawer__panel {
    transform: translateY(0);
}

body.has-encyclopedia-drawer .chips > li > .chip[data-active="true"] {
    background: transparent;
    color: var(--text-normal);
    font-weight: 400;
    box-shadow: none;
}

body.has-encyclopedia-drawer .chip-dropdown .chip-dropdown-trigger {
    background: rgba(255, 255, 255, 0.72);
    color: var(--link-color);
    font-weight: 500;
    box-shadow:
        0 6px 18px rgba(20, 16, 32, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.encyclopedia-drawer__title {
    height: 30px;
}

.encyclopedia-drawer__body {
    padding: 10px 16px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.encyclopedia-section__title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 16px;
    color: var(--text-main);
    font-weight: 500;
}

.encyclopedia-section__title span {
    flex: 0 0 auto;
    color: rgba(29, 29, 31, 0.62);
}

.encyclopedia-section__title::before,
.encyclopedia-section__title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.04));
}

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

.encyclopedia-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 999px;
    color: var(--theme-color);
    text-decoration: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.48) 100%);
    backdrop-filter: blur(16px) saturate(165%);
    -webkit-backdrop-filter: blur(16px) saturate(165%);
    box-shadow:
        0 8px 20px rgba(20, 16, 32, 0.08),
        0 2px 8px rgba(20, 16, 32, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transition:
        background .18s ease,
        transform .15s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.encyclopedia-card:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.58) 100%);
    border-color: rgba(255, 255, 255, 0.58);
    box-shadow:
        0 12px 24px rgba(20, 16, 32, 0.10),
        0 4px 10px rgba(20, 16, 32, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.encyclopedia-card:active {
    transform: scale(.97);
}

.encyclopedia-card__text {
    line-height: 1;
}

@media (min-width: 1024px) {
    .sub-nav-container {
        width: 100%;
        max-width: var(--max);
        margin: 0 auto;
        padding: 20px 0;
    }

    .chips {
        width: auto;
        padding: 0;
        flex-wrap: wrap;
        gap: 40px;
        overflow: visible;
        white-space: normal;
        justify-content: center;
    }

    .chip {
        height: 36px;
        padding: 0 20px;
    }

    .chip:not([data-active="true"]):hover {
        background: var(--alpha-black-05);
    }

    .chip-dropdown::after {
        content: "";
        position: absolute;
        top: 100%;
        left: -12px;
        width: calc(100% + 24px);
        height: 16px;
        pointer-events: auto;
    }

    .chip-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        display: grid;
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        width: max-content;
        min-width: 240px;
        padding: 22px 24px 24px;
        column-gap: 18px;
        row-gap: 2px;
        border-radius: 24px;
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) scale(0.96) translateY(4px);
        transform-origin: top center;
        transition:
            opacity 0.34s cubic-bezier(.32, .72, 0, 1),
            transform 0.34s cubic-bezier(.32, .72, 0, 1);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.58) 100%);
        backdrop-filter: blur(28px) saturate(180%);
        -webkit-backdrop-filter: blur(28px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.45);
        box-shadow:
            0 24px 60px rgba(20, 16, 32, 0.18),
            0 8px 24px rgba(20, 16, 32, 0.10),
            inset 0 1px 0 rgba(255, 255, 255, 0.75);
    }

    .chip-dropdown-menu::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        background:
            radial-gradient(
                circle at 50% -20px,
                rgba(255,255,255,0.7),
                rgba(255,255,255,0.15) 40%,
                transparent 70%
            );
        opacity: .6;
    }

    .chip-dropdown-col {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .chip-dropdown-title {
        margin-bottom: 8px;
        padding-left: 28px;
        color: rgba(29, 29, 31, 0.62);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.04em;
    }

    .chip-dropdown-link {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 18px;
        border-radius: 999px;
        color: var(--theme-color);
        text-decoration: none;
        white-space: nowrap;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.48) 100%);
        backdrop-filter: blur(16px) saturate(165%);
        -webkit-backdrop-filter: blur(16px) saturate(165%);
        border: 1px solid rgba(255, 255, 255, 0.44);
        box-shadow:
            0 8px 20px rgba(20, 16, 32, 0.08),
            0 2px 8px rgba(20, 16, 32, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.72);
        transition:
            background .18s ease,
            transform .15s ease,
            box-shadow .2s ease,
            border-color .2s ease,
            color .18s ease;
    }

    .chip-dropdown-link:hover {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.58) 100%);
        border-color: rgba(255, 255, 255, 0.58);
        transform: translateY(-1px);
        box-shadow:
            0 12px 24px rgba(20, 16, 32, 0.10),
            0 4px 10px rgba(20, 16, 32, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.84);
        color: var(--theme-color);
    }

    .chip-dropdown-link:active {
        transform: scale(.97);
    }

    .chip-dropdown-link[data-active="true"] {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.64) 100%);
        border-color: rgba(255, 255, 255, 0.62);
        color: var(--theme-color);
        font-weight: 500;
        box-shadow:
            0 10px 22px rgba(20, 16, 32, 0.10),
            0 4px 10px rgba(20, 16, 32, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.86);
    }

    .chip-dropdown:hover .chip-dropdown-menu,
    .chip-dropdown:focus-within .chip-dropdown-menu,
    .chip-dropdown.is-open .chip-dropdown-menu {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) scale(1) translateY(0);
    }

    .chip-dropdown:hover .chip-dropdown-arrow,
    .chip-dropdown:focus-within .chip-dropdown-arrow,
    .chip-dropdown.is-open .chip-dropdown-arrow {
        transform: rotate(225deg) translateY(-1px);
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   分类导航：图标 chip
────────────────────────────────────────────────────────────────────────── */

/* chips 容器：图标模式下顶部对齐 */

.chip--iconic {
    flex-direction: column;
    justify-content: center;
    height: auto;
    padding: 0 12px 10px;
    min-width: 60px;
    font-size: 13px;
    color: var(--link-color);
    border-radius: var(--radius-md);
}
@media (min-width: 768px) {
    .chip--iconic {
        padding: 0 14px 10px;
        min-width: 72px;
        font-size: 14px;
    }
}
@media (min-width: 1200px) {
    .chip--iconic {
        padding: 5px 18px 15px;
        min-width: 88px;
        font-size: 16px;
    }
}

.chip--iconic[data-active="true"],
.chip-dropdown.is-active .chip--iconic {
    background: var(--bg-card);
    color: var(--link-color);
    font-weight: 500;
    box-shadow: var(--shadow-chip);
}

.chip-icon {
    display: block;
    margin-top: -5px;
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    background: var(--bg-placeholder);
    border-radius: 12px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (min-width: 768px) {
    .chip-icon {
        width: 60px;
        height: 60px;
    }
}
.chip-icon[src]:not([src=""]) {
    background: transparent;
}
.chip--iconic:hover .chip-icon {
    transform: translateY(-4px);
}
@media (min-width: 1200px) {
    .chip-icon {
        width: 64px;
        height: 64px;
    }
}

.chip--iconic > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ========================================================================== 
   6. Cards / Grid / Archive Layout
========================================================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
    gap: 16px;
    width: 100%;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

.card {
    width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: auto;
}

.card:active {
    transform: translateZ(0) scale(0.96);
    transition: transform 0.1s ease;
}

.card.card-entrance {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) translateZ(0);
}

.card.card-reveal {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) translateZ(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s, opacity 0.6s ease 0.05s;
    will-change: transform, opacity;
}

.is-loading .card {
    opacity: 0;
    transform: translateY(40px) translateZ(0);
}

.grid .card:nth-child(1) {
    transition-delay: 0.05s;
}

.grid .card:nth-child(2) {
    transition-delay: 0.1s;
}

.grid .card:nth-child(3) {
    transition-delay: 0.15s;
}

.grid .card:nth-child(4) {
    transition-delay: 0.2s;
}

.cover {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--bg-placeholder);
}

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

.card-body {
    padding: 10px;
}

.title {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: inherit;
}

.desc {
    display: -webkit-box;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.stats {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.stat,
.stat-like {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-like::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    opacity: .75;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pagination-container {
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none;
}

@media (min-width: 1200px) {
    .pagination-container {
        height: auto !important;
        margin: 32px 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        opacity: 1 !important;
        pointer-events: auto;
    }

    .load-more-indicator {
        display: none !important;
    }
}

.pagination-container:empty {
    display: none !important;
}

.pagination-container .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-container .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--alpha-black-06);
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    color: var(--text-normal);
    font-size: 14px;
    font-weight: 500;
    transition: all .2s ease;
}

.pagination-container .page-numbers:hover {
    background: var(--alpha-black-04);
    color: var(--text-main);
    transform: translateY(-1px);
}

.pagination-container .page-numbers.current {
    border-color: var(--theme-color);
    background: var(--theme-color);
    color: var(--text-white);
    pointer-events: none;
    box-shadow: var(--shadow-chip);
}

.pagination-container .screen-reader-text {
    display: none;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 30px 0 12px;
    color: var(--text-muted);
    font-size: 13px;
}

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

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

.breadcrumb .sep {
    opacity: .3;
}

.hero-container {
    width: 100%;
    margin: 0 auto 40px;
    padding: 0;
    background: #fff;
}

.cat-hero {
    padding: 0 16px;
}
@media (min-width: 768px) {
    .cat-hero {
        padding: 0 24px;
        max-width: var(--max);
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .cat-hero {
        display: flex;
        width: 100%;
        max-width: var(--max);
        margin: 0 auto;
        padding: 0 30px;
        align-items: center;
        gap: 20px;
    }
}

.cat-hero h1 {
    font-size: clamp(36px, 6vw, 50px);
    color: var(--theme-color);
    margin-bottom: 0;
}

.cat-hero p {
    font-size: clamp(14px, 4vw, 16px);
    color: var(--text-muted);
}

@media (min-width: 1024px) {
    .hero-container {
        background-position: 75% 25px;
    }

    .cat-hero h1 {
        margin-bottom: 30px;
    }

    .cat-hero p {
        margin-top: 50px;
    }
}

@media (min-width: 1200px) {

    .related-section .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .card {
        transition: transform .3s ease, box-shadow .3s ease;
    }

    .card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-4px) translateZ(0);
    }

    .card-body {
        padding: 12px 14px;
    }

    .card.card-reveal:hover {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .single .breadcrumb {
        margin: 0 0 20px;
    }
}

/* ========================================================================== 
   7. Footer / Floating Actions
========================================================================== */
.site-footer {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid transparent;
    background: var(--theme-color);
    text-align: center;
}

.footer-inner {
    max-width: 720px; /* 遵循你设定的宽度 */
    margin: 0 auto;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.8;
}

/* 强制分行逻辑 */
.footer-row {
    margin-bottom: 4px;
}

/* 核心：确保项目作为一个整体换行，不从中间断开 */
.footer-item {
    display: inline-block;
    white-space: nowrap; /* 强制内部不折行 */
    vertical-align: middle;
}

.footer-inner a {
    margin: 0 2px;
    color: var(--text-light);
    text-decoration: none;
}

.footer-inner a:hover {
    color: #fff;
}

/* 分隔符修改为 | */
.footer-sep {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 4px;
    font-weight: 300;
}

/* 公安链接图标对齐 */
.gongan-link {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
}

.gongan-link img {
    display: block;
    width: 18px;
    height: 18px;
    margin-top: -1px;
}

.floating-actions {
    position: fixed;
    bottom: 20px;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: -22px;
    transition: transform 180ms ease;
    will-change: transform;
}

.floating-actions.footer-bump {
    transform: translateY(-60px);
    transition: transform .3s ease;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--alpha-black-06);
    border-radius: var(--radius-pill);
    background: var(--alpha-white-95);
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all .3s cubic-bezier(.2, .8, .2, 1);
}

.action-btn:active {
    transform: scale(.92);
}

.btn-totop {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.btn-totop.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btn-refresh {
    display: none !important;
}

/* 移动端默认：建议反馈可渐隐 */
.btn-feedback {
    opacity: 1;
    height: 44px;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition:
        opacity .28s ease,
        transform .28s ease,
        visibility .28s ease;
}

.btn-feedback.is-fading-out {
    opacity: 0;
    transform: translateY(8px) scale(.92);
    pointer-events: none;

    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* 桌面端固定显示 */

@media (min-width: 1024px) {
    .floating-actions {
        position: fixed;
        left: 50%;
        bottom: 80px;
        z-index: 99;
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-left: calc(var(--max) / 2 + var(--floating-gap));
        transform: none !important;
    }

    .floating-actions.footer-bump {
        transform: none !important;
    }

    .btn-refresh {
        display: flex !important;
    }

    .action-btn:hover {
        background: var(--bg-card);
        box-shadow: var(--shadow-btn-hover);
        transform: translateY(-2px);
    }

    .btn-totop.show:hover {
        transform: translateY(-2px);
    }

    .btn-feedback,
    .btn-feedback.is-fading-out {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* ========================================================================== 
   8. Modal / Hamburger Panel
========================================================================== */
.about-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    background: var(--bg-overlay, rgba(0, 0, 0, 0.36));
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity .3s ease;
}

.about-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.about-modal-content {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: min(84vh, 760px);
    padding: 0 30px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.96);
    text-align: center;
    backface-visibility: hidden;
    transform: scale(.95) translateY(10px);
    -webkit-overflow-scrolling: touch;
    transition: transform .4s ease, height .5s cubic-bezier(.4, 0, .2, 1);
    will-change: transform, height;
    touch-action: none;
}

.about-modal-content::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 50%;
    width: 80px;
    height: 5px;
    border-radius: 999px;
    background: rgba(76, 59, 113, 0.16);
    transform: translateX(-50%);
    pointer-events: none;
}

.modal-drag-handle {
    height: 40px;
    margin: 0 auto;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    flex: 0 0 auto;
}

.modal-drag-handle:active {
    cursor: grabbing;
}

.about-modal-overlay.active .about-modal-content {
    transform: scale(1) translateY(0);
}

.modal-view-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    contain: content;
}

.modal-view {
    display: none;
    opacity: 0;
    transition: opacity .4s cubic-bezier(.4, 0, .2, 1);
}

.modal-view.active {
    display: block;
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--alpha-black-05);
    color: var(--text-normal);
    cursor: pointer;
    transition: all .2s ease;
}

.close-modal::after {
    content: "";
    position: absolute;
    inset: -10px;
}

.close-modal:active {
    background: var(--alpha-black-10);
    transform: scale(.9);
}

.back-to-intro {
    all: unset;
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
}

.modal-view-header {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.view-title {
    width: 100%;
    margin-top: 10px;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 500;
}

.modal-logo {
    margin-top: 20px;
}

.modal-logo img {
    height: 50px;
}

.modal-intro {
    margin: 20px 0 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-intro p {
    margin: 10px 0;
    color: var(--text-normal);
    font-size: 14px;
    line-height: 2.2;
    letter-spacing: .03em;
}

.modal-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-links a {
    display: contents;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 12px;
    transition: background .2s;
}

.link-item {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    margin: 0 30px;
    border-radius: var(--radius-pill);
    background: var(--theme-color);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.link-item:active {
    transform: scale(.97);
}

.legal-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.legal-row .sep {
    opacity: .2;
}

.legal-row a:hover {
    color: var(--theme-color);
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#modalFeedbackView {
    padding-bottom: 10px;
}

.feedback-form textarea,
.feedback-form input {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-xs);
    background: #edeff3;
    text-align: left;
    transition: background .2s;
}

.feedback-form textarea {
    display: block;
    min-height: 130px;
    line-height: 1.6;
}

.feedback-form textarea:focus,
.feedback-form input:focus {
    background: #e5e7eb;
}

.feedback-form textarea::placeholder,
.feedback-form input::placeholder {
    color: var(--text-light);
    opacity: 1;
}

.submit-btn {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    margin-top: 8px;
    border-radius: var(--radius-pill);
    background: var(--theme-color);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.modal-copyright {
    color: var(--text-muted);
    font-size: 12px;
}

@media (min-width: 1024px) {
    .view-title {
        margin-top: 0;
    }

    .about-modal-overlay {
        align-items: center;
        padding: 24px;
    }

    .about-modal-content {
        width: 420px;
        max-width: calc(100vw - 56px);
        max-height: min(82vh, 760px);
        transform: translateY(32px) translateZ(0);
    }

    .about-modal-overlay.active .about-modal-content {
        transform: translateY(0) translateZ(0);
    }
}

/* ========================================================================== 
   9. Article / Author
========================================================================== */

.author-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    padding: 30px 0;
    background: #fff;
}

.author-container {
    padding: 0 16px;
}

@media (min-width: 1024px) {
    .author-container {
        display: flex;
        width: 100%;
        max-width: var(--max);
        margin: 0 auto;
        padding: 0 30px;
        align-items: center;
        gap: 20px;
    }
}

.author-hero-avatar {
    flex: 0 0 72px;
    width: 72px;
}

.author-hero-avatar img,
.author-hero-avatar .avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.author-hero-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.author-hero-name {
    margin: 0 0 4px;
    color: var(--text-main);
    font-size: clamp(22px, 5vw, 24px);
    font-weight: 700;
    line-height: 1.2;
}

.author-hero-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}

@media (min-width: 1024px) {

    .author-hero {
        gap: 16px;
        margin: 0 0 40px;
    }

    .author-hero-name {
        margin-bottom: 6px;
        font-size: clamp(24px, 5vw, 32px);
    }

    .author-hero-desc {
        font-size: 14px;
    }
}

/* ========================================================================== 
   10. Toast
========================================================================== */
.toast-message {
    transition:
        opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-message.toast-center {
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
}

.toast-message.toast-center.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ========================================================================== 
   11. Icon Mask System
========================================================================== */
.icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    background-color: var(--theme-color);
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.icon-menu,
.icon-search {
    background-color: #fff;
}

.icon-totop {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='19' x2='12' y2='5'%3E%3C/line%3E%3Cpolyline points='5 12 12 5 19 12'%3E%3C/polyline%3E%3C/svg%3E");
}

.icon-refresh {
    transform: scaleX(-1);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
}

.icon-edit {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
}

.icon-volume_up,
.icon-print { width: 14px; height: 14px; }

.icon-volume_up {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 17.5' fill='black'%3E%3Cpath d='M11,17.5v-2.05c1.5-.43,2.71-1.27,3.63-2.5s1.38-2.63,1.38-4.2-.46-2.97-1.38-4.2-2.13-2.07-3.63-2.5V0c2.07.47,3.75,1.51,5.05,3.14s1.95,3.5,1.95,5.61-.65,3.99-1.95,5.61-2.98,2.67-5.05,3.14ZM0,11.78v-6h4L9,.78v16l-5-5H0ZM11,12.78V4.73c.78.37,1.4.92,1.84,1.65s.66,1.53.66,2.4-.22,1.64-.66,2.36-1.05,1.27-1.84,1.64ZM7,5.63l-2.15,2.15h-2.85v2h2.85l2.15,2.15v-6.3Z'/%3E%3C/svg%3E");
}

.icon-print {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18' fill='black'%3E%3Cpath d='M14,5v-3H6v3h-2V0h12v5h-2ZM2,7h16H2ZM16,9.5c.28,0,.52-.1.71-.29s.29-.43.29-.71-.1-.52-.29-.71-.43-.29-.71-.29-.52.1-.71.29-.29.43-.29.71.1.52.29.71.43.29.71.29ZM14,16v-4H6v4h8ZM16,18H4v-4H0v-6c0-.85.29-1.56.88-2.14.58-.58,1.29-.86,2.13-.86h14c.85,0,1.56.29,2.14.86s.86,1.29.86,2.14v6h-4v4ZM18,12v-4c0-.28-.1-.52-.29-.71s-.43-.29-.71-.29H3c-.28,0-.52.1-.71.29s-.29.43-.29.71v4h2v-2h12v2h2Z'/%3E%3C/svg%3E");
}

.icon-text_increase,
.icon-text_decrease,
.icon-search-clear { width: 16px; height: 16px; }

.icon-text_increase {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14' fill='black'%3E%3Cpath d='M0,14L5.25,0h2.5l5.25,14h-2.4l-1.28-3.58H3.68l-1.28,3.58H0ZM4.4,8.4h4.2l-2.05-5.8h-.1l-2.05,5.8ZM17,11v-3h-3v-2h3v-3h2v3h3v2h-3v3h-2Z'/%3E%3C/svg%3E");
}

.icon-text_decrease {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14' fill='black'%3E%3Cpath d='M0,14L5.25,0h2.5l5.25,14h-2.4l-1.28-3.58H3.68l-1.28,3.58H0ZM4.4,8.4h4.2l-2.05-5.8h-.1l-2.05,5.8ZM14,8v-2h8v2h-8Z'/%3E%3C/svg%3E");
}

.icon-close {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
}

.icon-back,
.icon-search-submit { width: 18px; height: 18px; }

.icon-back {
    transform: translateX(1px);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4L6 10l6 6'/%3E%3C/svg%3E");
}

.icon-search-clear {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

.icon-search {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

.icon-menu {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='6' x2='20' y2='6'/%3E%3Cline x1='4' y1='12' x2='20' y2='12'/%3E%3Cline x1='4' y1='18' x2='20' y2='18'/%3E%3C/svg%3E");
}

.icon-search-submit {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

.icon-feedback {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

/* ========================================================================== 
   12. Animations / Effects
========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes dotFlashing {
    0% {
        opacity: .22;
        transform: translateZ(0) scale(.92);
    }

    50% {
        opacity: .55;
        transform: translateZ(0) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateZ(0) scale(1.08);
    }
}

.star-particle {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 12px;
    height: 12px;
    opacity: 0;
    pointer-events: none;
    background-color: var(--p-color, var(--brand-red));
    transform: translate(var(--sx), var(--sy)) scale(0);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2L9.19 8.63L2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
}

@keyframes starBurst {
    0% {
        opacity: 0;
        transform: translate(var(--sx), var(--sy)) scale(0);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(var(--s)) rotate(var(--r));
    }
}

.star-particle.animate {
    animation: starBurst 0.8s cubic-bezier(0.15, 0.85, 0.35, 1) forwards;
}


/* ==========================================================================
   13. Global Card Components
========================================================================== */

.card-main-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.card.card-landscape {
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(45, 40, 56, 0.05);
    box-shadow: none !important;
    transform: none !important;
    transition: background 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.card.card-landscape:hover {
    background: #fff;
    border-color: rgba(45, 40, 56, 0.12);
}

.cover.cover-landscape {
    aspect-ratio: 3 / 4; 
    overflow: hidden;
    background: var(--bg-placeholder, #f5f5f7);
}

.cover.cover-landscape img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.25, 1);
    will-change: transform;
}

@media (hover: hover) {
    .card-main-link:hover .cover.cover-landscape img {
        transform: scale(1.05);
    }
}

.card.card-landscape .card-body {
    padding: 12px 13px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hub-subcat-hero .card.card-landscape .card-body {
    padding:0;
    border-bottom: none !important;
}

/* Restore bottom border for the last article in the mobile list */
.hub-subcat-list article.hub-list-item:last-of-type {
    border-bottom: 1px solid rgba(45, 40, 56, 0.06) !important;
    padding-bottom: 28px !important;
    margin-bottom: 24px !important; 
}

/* Base styles for card titles */
.card.card-landscape .title {
    margin-bottom: 7px;
    line-height: 1.35;
    font-size: 16px;
    font-weight: 700;
    color: var(--link-color);
    transition: color .2s ease;
}

.card.card-landscape .title:hover  {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Card description: clamp to 2 lines */
.card.card-landscape .desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* --- Card Meta & Tags --- */
.card-cat-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 11px;
    border: 1px solid rgba(45, 40, 56, 0.08);
    background: rgba(255, 255, 255, 0.55);
}

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
}

.card-meta-row .stat-like {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
}

.card-meta-left {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
}

.card-time-ago {
    font-size: 11px;
    color: var(--text-light);
    flex-shrink: 0;
}

.card-meta-left .card-cat-label + .card-time-ago::before {
    content: '·';
    margin-right: 3px;
    color: var(--text-light);
}

/* ==========================================================================
   14. Common UI Components
========================================================================== */

/* --- Section Label --- */
.section-label {
    margin: 0 0 20px;
    padding: 0 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    text-transform: uppercase;
    opacity: 0.9;
}

/* --- Load More Button --- */
#cwp-load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 0 40px;
}
#cwp-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 32px;
    border: none;
    border-radius: var(--radius-pill);
    background: rgba(45, 40, 56, 0.06);
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
}
#cwp-load-more-btn:hover {
    background: rgba(45, 40, 56, 0.1);
    transform: scale(1.02);
}
#cwp-load-more-btn::before {
    content: '↻';
    font-size: 15px;
}
#cwp-load-more-spinner {
    padding: 12px 0;
}



/* ==========================================================================
   Footer refresh
========================================================================== */

.site-footer {
    margin-top: auto;
    padding: 24px 0 20px;
    border-top: 1px solid transparent;
    background: var(--theme-color);
    text-align: center;
}

.footer-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.8;
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-brand {
    display: flex;
    justify-content: center;
}

.footer-brand-text {
    white-space: nowrap;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 8px;
    max-width: 100%;
}

.footer-link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.footer-link-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}

.footer-beian {
    display: flex;
    justify-content: center;
}

.footer-item {
    display: inline-block;
    white-space: nowrap;
    vertical-align: middle;
}

.footer-inner a {
    margin: 0;
    color: var(--text-light);
    text-decoration: none;
}

.footer-inner a:hover {
    color: #fff;
}

.gongan-link {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
}

.gongan-link img {
    display: block;
    width: 18px;
    height: 18px;
    margin-top: -1px;
}

@media (max-width: 374px) {
    .footer-inner {
        padding: 0 12px;
    }

    .footer-links {
        gap: 8px 6px;
    }

    .footer-link-pill {
        min-height: 30px;
        padding: 0 10px;
        font-size: 11px;
    }
}

@media (min-width: 768px) {
    .site-footer {
        padding: 26px 0 22px;
    }

    .footer-inner {
        padding: 0 24px;
    }

    .footer-top {
        gap: 16px;
    }

    .footer-links {
        gap: 10px;
    }

    .footer-link-pill {
        min-height: 34px;
        padding: 0 14px;
        font-size: 12px;
    }

    .footer-bottom {
        margin-top: 16px;
        gap: 8px;
    }
}