:root {
    --bg: #F9F6F0;
    --nav-bg: #9CAF88;
    --text: #4A4A4A;
    --focus-bg: #F4D9D0;
    --btn: #D98A5B;
    --btn-hover: #C46B3E;
    --card: #FFFDF9;
    --line: #D8D2C7;
    --shadow: 0 6px 18px rgba(90, 80, 60, 0.08);
    --shadow-hover: 0 8px 20px rgba(90, 60, 40, 0.15);
    --site-header-height: 88px;
}

@media (max-width: 900px) {
    :root {
        --site-header-height: 72px;
    }
}

html {
    scroll-padding-top: var(--site-header-height);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: var(--site-header-height);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-width: 320px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--btn-hover);
}

.container {
    width: min(1080px, calc(100% - 32px));
    margin-inline: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--btn);
    color: #fff;
}

.btn-primary:hover {
    background: var(--btn-hover);
    box-shadow: var(--shadow-hover);
}

#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--nav-bg);
    width: 100%;
}

.header-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.4vw, 20px);
    position: relative;
    width: min(1100px, calc(100% - 32px));
    margin-inline: auto;
    padding-inline: 0;
    min-width: 0;
}

.logo {
    position: static;
    flex-shrink: 0;
    font-size: 1.7rem;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, #fef9f4 35%, #f5ebe0 70%, #e8dccf 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    filter: drop-shadow(0 1px 2px rgba(60, 80, 50, 0.12));
}

.main-nav {
    font-weight: 600;
    font-size: clamp(0.68rem, 0.48rem + 0.45vw, 0.95rem);
    flex: 1 1 auto;
    min-width: min-content;
    overflow: visible;
}

.main-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: clamp(8px, 0.8vw + 6px, 24px);
}

.main-nav .menu-item {
    flex: 0 0 auto;
}

.main-nav a {
    position: relative;
    display: inline-block;
    padding: 0.3rem 0;
    letter-spacing: 0.03em;
    color: #fff;
    white-space: nowrap;
    vertical-align: middle;
}

.main-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    background: #fff;
}

.main-nav a:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
}

.nav-close {
    display: none;
}

/* 手机端抽屉顶栏：文字 logo + 关闭（桌面不显示） */
.main-nav__top {
    display: none;
}

.header-actions {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 14px);
    min-width: 0;
}

.header-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search__input {
    width: clamp(72px, 11vw, 132px);
    min-width: 0;
    max-width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 0.88rem;
    transition: width 0.22s ease;
}

.header-search__input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.header-search__btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    line-height: 1;
    box-shadow: none;
    font-size: 1rem;
}

.header-search__btn .icon {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
    margin: 0 auto;
}

.header-search:hover,
.header-search:focus-within {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.header-search:hover .header-search__input,
.header-search:focus-within .header-search__input {
    width: clamp(96px, 16vw, 188px);
}

.header-search:hover .header-search__btn,
.header-search:focus-within .header-search__btn {
    box-shadow: var(--shadow-hover);
}

.link-login {
    font-size: 0.93rem;
    color: #fff;
    transition: opacity 0.2s ease;
}

.link-login:hover {
    opacity: 0.8;
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    border-radius: 10px;
    padding: 0.35rem 0.65rem;
    font-size: 1rem;
    color: #fff;
}

.list-item,
.post-card,
.widget,
.side-card,
.article-main {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list-item:hover,
.post-card:hover,
.widget:hover,
.side-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(90, 80, 60, 0.12);
}

.reveal-init {
    opacity: 0;
    transform: translateY(8px);
}

.reveal-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.05rem;
    box-shadow: var(--shadow);
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    background: var(--card);
}

.footer-inner {
    min-height: 180px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 24px;
    padding: 34px 0;
}

.footer-inner h3,
.footer-inner h4 {
    margin: 0 0 10px;
}

.footer-inner p,
.footer-inner a {
    margin: 0 0 6px;
    display: block;
    font-size: 0.95rem;
}
.mobilelogo {
    display: none;
}

@media (max-width: 900px) {
    /* 顶栏左侧：仅手机显示 */
    .header-inner > .mobilelogo--bar {
        display: inline-block;
        flex-shrink: 0;
        margin-right: auto;
        font-size: 1.25rem;
        line-height: 1.2;
        color: #fff;
        font-family: Georgia, "Times New Roman", serif;
        font-weight: 700;
        letter-spacing: 0.02em;
        white-space: nowrap;
        text-decoration: none;
        text-shadow: 0 1px 2px rgba(60, 80, 50, 0.15);
    }

    .main-nav__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        margin: 0 0 12px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--line);
    }

    .main-nav .mobilelogo {
        display: block;
        font-size: 1.35rem;
        color: var(--text);
        font-family: Georgia, "Times New Roman", serif;
        font-weight: 700;
        letter-spacing: 0.02em;
        white-space: nowrap;
        text-decoration: none;
        line-height: 1.2;
    }

    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 72px;
        padding-inline: 14px;
    }

    .logo {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
    }

    .main-nav {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(82vw, 340px);
        padding: 22px 18px 18px;
        background: var(--card);
        border-left: 1px solid var(--line);
        border-radius: 0;
        flex-direction: column;
        z-index: 1002;
        box-shadow: -16px 0 30px rgba(0, 0, 0, 0.12);
        transform: translateX(100%);
        transition: transform 0.24s ease;
        overflow-x: visible;
        flex: none;
        min-width: 0;
        font-size: 0.92rem;
    }

    .nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 34px;
        height: 34px;
        border: 1px solid var(--line);
        background: var(--bg);
        border-radius: 8px;
        color: var(--text);
        font-size: 1rem;
        cursor: pointer;
    }

    .main-nav__list {
        margin-top: 0;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 14px;
    }

    .main-nav .menu-item {
        flex: none;
    }

    .main-nav a {
        white-space: normal;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .main-nav a.is-active::after {
        bottom: -2px;
        background: var(--nav-bg);
    }

    .main-nav a {
        color: var(--text);
    }

    .main-nav a:hover::after {
        background: var(--nav-bg);
        opacity: 0.5;
    }

    .main-nav a:hover::after {
        bottom: -2px;
    }

    .header-actions {
        gap: 10px;
    }

    .header-search__input {
        width: 130px;
    }

    .header-search:hover .header-search__input,
    .header-search:focus-within .header-search__input {
        width: 170px;
    }

    .header-actions .link-login {
        display: none;
    }

    .header-actions .btn {
        padding: 0.42rem 0.68rem;
        font-size: 0.82rem;
    }

    body.nav-open {
        overflow: hidden;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ==================== Cookie Consent Banner ==================== */
.cookie-consent-root {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

html.cookie-consent-dismissed .cookie-consent-root {
    display: none;
}

.cookie-consent-backdrop {
    display: none;
}

.cookie-consent-panel {
    position: relative;
    background: var(--card);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 24px rgba(90, 80, 60, 0.12);
    padding: clamp(1rem, 2.5vw, 1.5rem) 0;
    pointer-events: auto;
}

.cookie-consent-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: clamp(1rem, 2.5vw, 2rem);
    align-items: center;
}

@media (max-width: 768px) {
    .cookie-consent-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.cookie-consent-copy {
    min-width: 0;
}

.cookie-consent-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
}

.cookie-consent-desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #5a5a5a;
}

.cookie-consent-link {
    color: var(--btn);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent-link:hover {
    color: var(--btn-hover);
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .cookie-consent-actions {
        justify-content: center;
    }
}

.cookie-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-consent-btn-primary {
    background: var(--btn);
    color: #fff;
    border-color: var(--btn);
}

.cookie-consent-btn-primary:hover {
    background: var(--btn-hover);
    border-color: var(--btn-hover);
    box-shadow: var(--shadow-hover);
}

.cookie-consent-btn-secondary {
    background: transparent;
    color: var(--btn);
    border-color: var(--btn);
}

.cookie-consent-btn-secondary:hover {
    background: var(--btn);
    color: #fff;
}

/* ==================== Cookie Settings Modal ==================== */
.cookie-settings-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-settings-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(60, 55, 50, 0.45);
    backdrop-filter: blur(3px);
}

.cookie-settings-content {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(90, 80, 60, 0.18);
    width: min(560px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cookie-settings-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.cookie-settings-close:hover {
    background: var(--focus-bg);
    border-color: var(--btn);
    color: var(--btn);
}

.cookie-settings-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-settings-body h2 {
    margin: 0 0 1.25rem;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
}

.cookie-category {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line);
}

.cookie-category:first-of-type {
    padding-top: 0;
}

.cookie-category:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cookie-category-info h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.cookie-status {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--nav-bg);
    background: rgba(156, 175, 136, 0.12);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.cookie-category-desc {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #5a5a5a;
}

/* Toggle Switch */
.cookie-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.toggle-status {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    min-width: 1.5rem;
    text-align: right;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--line);
    border-radius: 24px;
    transition: background 0.25s ease;
}

.cookie-toggle-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: var(--nav-bg);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}

.cookie-toggle input:focus-visible + .cookie-toggle-slider {
    outline: 2px solid var(--btn);
    outline-offset: 2px;
}

/* Modal Footer */
.cookie-settings-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--line);
    background: var(--bg);
    display: flex;
    justify-content: flex-end;
}

.cookie-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-settings-btn-primary {
    background: var(--btn);
    color: #fff;
}

.cookie-settings-btn-primary:hover {
    background: var(--btn-hover);
    box-shadow: var(--shadow-hover);
}


.footer-copyright {
    color: #99a3ad;
}

