/* ===================================================================
   森林绿主题 - style.css
   御清弦 · 2026
   翡翠绿主色调 / 现代极简 / 响应式 / 暗色模式
   -------------------------------------------------------------------
   日间：暖白底 + 深森林绿（hue 143°，去青味，更自然）
   夜间：墨绿底 + 鲜森林绿（保留绿身份，不滑向薄荷/青）
   变量采用 RGB 通道格式（如 "31 110 59"），配合 Tailwind 的
   <alpha-value> 占位符，使 bg-primary/10 等透明度修饰符在日/夜
   模式下均可用。
   =================================================================== */

:root {
    --forest-font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --forest-font-family-serif: Georgia, 'PingFang SC', 'Microsoft YaHei', serif;
    /* 主色 - 森林绿 */
    --primary: 31 110 59;
    --primary-bright: 46 157 94;
    --primary-container: 76 181 120;
    --on-primary: 255 255 255;
    --on-primary-container: 246 255 246;
    /* 强调 - 暖橙红（与冷绿形成温度对比） */
    --secondary: 194 65 12;
    --secondary-bright: 234 88 12;
    --on-secondary: 255 255 255;
    --secondary-container: 255 155 122;
    /* 表面层 - 暖白米调，五层灰阶 */
    --surface: 247 246 241;
    --surface-dim: 230 229 223;
    --surface-bright: 252 251 247;
    --surface-container-lowest: 255 255 255;
    --surface-container-low: 241 240 234;
    --surface-container: 235 234 228;
    --surface-container-high: 226 225 219;
    --surface-container-highest: 216 215 209;
    /* 文字 */
    --on-surface: 26 32 24;
    --on-surface-variant: 74 85 76;
    /* 描边 */
    --outline: 122 138 126;
    --outline-variant: 196 208 198;
    /* 背景 */
    --background: 247 246 241;
    /* 阴影 - 极淡绿调 */
    --shadow-soft: 0 4px 20px rgba(31, 110, 59, 0.06);
    --shadow-lift: 0 10px 32px rgba(31, 110, 59, 0.14);
    /* 渐变 */
    --gradient-hero: linear-gradient(135deg, rgb(247 246 241) 0%, rgb(234 244 237) 100%);
    /* 卡片透明度 / 毛玻璃 / 背景遮罩（由 header.php 注入） */
    --card-opacity: 1;
    --card-glass: 0;
    /* 遮罩颜色：日间白色，夜间黑色；透明度由 --bg-mask-opacity 控制 */
    --bg-mask-color: 255, 255, 255;
    --bg-mask-opacity: 0;
    --forest-article-mask-color: 255 255 255;
}

/* 暗色模式覆盖 - 森林夜色 */
html.forest-font-remote-loaded {
    --forest-font-family: 'ForestRemoteFont', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --forest-font-family-serif: 'ForestRemoteFont', Georgia, 'PingFang SC', 'Microsoft YaHei', serif;
}

html.dark, html[data-theme="dark"] {
    /* 主色 - 鲜森林绿（hue 143°，保留绿身份，不滑向薄荷） */
    --primary: 127 217 154;
    --primary-bright: 165 232 184;
    --primary-container: 46 107 72;
    --on-primary: 0 33 18;
    --on-primary-container: 232 248 236;
    /* 强调 - 暖珊瑚 */
    --secondary: 255 155 122;
    --secondary-bright: 255 181 156;
    --on-secondary: 90 26 0;
    --secondary-container: 194 65 12;
    /* 表面层 - 墨绿夜色，五层灰阶带绿调 */
    --surface: 28 36 32;
    --surface-dim: 22 28 25;
    --surface-bright: 35 43 39;
    --surface-container-lowest: 22 28 25;
    --surface-container-low: 31 40 35;
    --surface-container: 37 46 41;
    --surface-container-high: 45 54 49;
    --surface-container-highest: 54 64 58;
    /* 文字 - 柔和绿白 */
    --on-surface: 232 240 234;
    --on-surface-variant: 176 196 182;
    /* 描边 */
    --outline: 122 138 126;
    --outline-variant: 61 74 65;
    /* 背景 */
    --background: 19 24 22;
    /* 阴影 */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 10px 32px rgba(0, 0, 0, 0.5);
    /* 渐变 */
    --gradient-hero: linear-gradient(135deg, rgb(28 36 32) 0%, rgb(26 42 34) 100%);
    /* 遮罩颜色：夜间自动切换为黑色，透明度沿用 --bg-mask-opacity */
    --bg-mask-color: 0, 0, 0;
    --forest-article-mask-color: 0 0 0;
}

html.dark body {
    background-color: rgb(var(--background));
    color: rgb(var(--on-surface));
}

/* ============== 全屏背景层 ============== */
.forest-bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.forest-bg-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.forest-bg-video {
    background: rgb(var(--background));
}
.forest-bg-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--bg-mask-color), var(--bg-mask-opacity));
}

/* 有背景时，body 透明以透出背景 */
body:has(.forest-bg-layer) {
    background-color: transparent;
}

/* ============== 卡片透明度 / 毛玻璃 ==============
   通过 --card-opacity 与 --card-glass 控制
   文字颜色不改变，仅卡片背景透明化 */
.forest-header,
.forest-mobile-nav,
.bg-surface-container-lowest,
article.bg-surface-container-lowest,
aside .bg-surface-container-lowest,
.auth-modal-card {
    background-color: rgb(var(--surface-container-lowest) / var(--card-opacity)) !important;
}
/* 次级表面容器（侧边栏/卡片内部分块） */
.bg-surface-container,
.bg-surface-container-low,
.bg-surface-container-high {
    background-color: rgb(var(--surface-container) / var(--card-opacity)) !important;
}

/* 毛玻璃效果：body.forest-glass 时叠加 backdrop-filter，并略微降低不透明度增强透视 */
.forest-glass .forest-header,
.forest-glass .forest-mobile-nav,
.forest-glass .bg-surface-container-lowest,
.forest-glass .auth-modal-card {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    background-color: rgb(var(--surface-container-lowest) / calc(var(--card-opacity) * 0.85)) !important;
}
.forest-glass .bg-surface-container,
.forest-glass .bg-surface-container-low,
.forest-glass .bg-surface-container-high {
    backdrop-filter: blur(8px) saturate(130%);
    -webkit-backdrop-filter: blur(8px) saturate(130%);
    background-color: rgb(var(--surface-container) / calc(var(--card-opacity) * 0.85)) !important;
}

/* 首页搜索卡片独立样式：启用后覆盖全局卡片透明度与毛玻璃设置 */
.forest-home-hero-card {
    position: relative;
    isolation: isolate;
}
.forest-home-hero-card > .forest-home-hero-card-content,
.forest-home-hero-card > form {
    position: relative;
    z-index: 1;
}
.forest-home-hero-card.forest-home-hero-card-custom {
    background-color: rgb(var(--surface-container-lowest) / var(--home-hero-card-opacity)) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.forest-home-hero-card.forest-home-hero-card-custom.forest-home-hero-card-glass {
    background-color: rgb(var(--surface-container-lowest) / var(--home-hero-card-opacity)) !important;
    backdrop-filter: blur(12px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
}
.forest-home-hero-card.forest-home-hero-card-borderless {
    border-width: 0 !important;
}
.forest-home-hero-card.forest-home-hero-card-shadowless {
    box-shadow: none !important;
}

/* ============== 天气模块 ============== */
.forest-weather-card {
    width: 100%;
    min-width: 0;
    padding: 18px;
    overflow: hidden;
}
.forest-weather-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: rgb(var(--primary));
}
.forest-weather-card-head .ti {
    font-size: 20px;
}
.forest-weather-card-head h4 {
    margin: 0;
    font-family: var(--forest-font-family);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0;
}
.forest-weather-widget,
.forest-weather-widget > div {
    width: 100%;
    min-width: 0;
}
.forest-weather-widget iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    border: 0;
}
.forest-weather-card-widget {
    min-height: 116px;
    overflow: hidden;
}
.forest-weather-card .ww_icon {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}
html.dark .forest-weather-card-widget iframe,
html[data-theme="dark"] .forest-weather-card-widget iframe {
    filter: invert(0.9) hue-rotate(180deg);
}

.forest-article-toc-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}
.forest-article-toc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.forest-article-toc-head .ti {
    font-size: 20px;
}
.forest-article-toc-head h4 {
    margin: 0;
    letter-spacing: 0;
}
.forest-article-toc-card nav {
    max-height: min(52vh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--surface-container-highest)) transparent;
}
.forest-article-toc-list {
    margin: 0;
    padding: 0 4px 0 10px;
    border-left: 1px solid rgb(var(--surface-container-highest));
    list-style: none;
}
.forest-article-toc-item {
    position: relative;
    margin: 2px 0;
}
.forest-article-toc-item::before {
    position: absolute;
    top: 17px;
    left: -10px;
    width: 8px;
    height: 1px;
    background: rgb(var(--surface-container-highest));
    content: '';
}
.forest-article-toc-item a {
    display: block;
    min-width: 0;
    padding: 7px 8px;
    overflow: hidden;
    color: rgb(var(--on-surface-variant));
    border-radius: 4px;
    font-family: var(--forest-font-family);
    font-size: 13px;
    line-height: 18px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.16s ease, background-color 0.16s ease;
}
.forest-article-toc-item a:hover,
.forest-article-toc-item a.is-active {
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.1);
}
.forest-article-toc-item a.is-active {
    font-weight: 600;
}
.forest-article-toc-item.toc-level-2 { margin-left: 10px; }
.forest-article-toc-item.toc-level-3 { margin-left: 20px; }
.forest-article-toc-item.toc-level-4 { margin-left: 30px; }
.forest-article-toc-item.toc-level-5 { margin-left: 40px; }
.forest-article-toc-item.toc-level-6 { margin-left: 50px; }
.markdown.article-body .forest-toc-heading {
    scroll-margin-top: 96px;
}

/* Tabler 图标默认样式 */
.ti {
    font-weight: 400;
    line-height: 1;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

/* ============== 翻页 ============== */
.forest-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.forest-pagination a,
.forest-pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 9999px;
    border: 1px solid rgb(var(--surface-container-highest));
    background: rgb(var(--surface-container-lowest));
    color: rgb(var(--on-surface-variant));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.2s;
}
.forest-pagination a:hover {
    background: rgb(var(--surface-container-highest));
    color: rgb(var(--primary));
}
.forest-pagination .current,
.forest-pagination span.current {
    background: rgb(var(--primary));
    color: rgb(var(--on-primary));
    border-color: rgb(var(--primary));
}
.forest-pagination .title {
    border: none;
    background: transparent;
    color: rgb(var(--on-surface-variant));
    font-weight: 400;
}

.forest-post-list {
    transition: opacity 0.2s ease;
}
.forest-post-list.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

/* 文章卡片封面与无图占位 */
.forest-card-cover {
    position: relative;
    display: block;
    background: rgb(var(--surface-container-high));
}
.forest-card-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--outline));
    background: rgb(var(--surface-container-high));
}
.forest-card-cover-placeholder .ti {
    font-size: 30px;
}
.forest-card-cover-image {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* 紧凑文章卡片：双列使用方形封面，单列使用 4:3 封面 */
.forest-card-compact,
.forest-card-single {
    height: 120px;
    min-height: 120px;
}
.forest-card-cover-compact {
    flex: 0 0 120px;
    width: 120px;
    min-width: 120px;
    height: 120px;
}
.forest-card-cover-single {
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
    height: 120px;
}
.forest-card-cover-compact,
.forest-card-cover-single {
    border-right: 1px solid rgb(var(--surface-container-highest));
}
.forest-card-body-compact,
.forest-card-body-single {
    height: 100%;
    padding: 8px 12px !important;
    overflow: hidden;
}
.forest-card-body-compact > h3,
.forest-card-body-single > h3 {
    min-height: 0;
    max-height: 24px;
    -webkit-line-clamp: 1;
}
.forest-card-description {
    display: -webkit-box;
    min-height: 20px;
    max-height: 20px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}
.forest-card-meta {
    min-height: 20px;
    max-height: 20px;
    overflow: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (max-width: 400px) {
    .forest-card-compact,
    .forest-card-single {
        height: 112px;
        min-height: 112px;
    }
    .forest-card-cover-compact,
    .forest-card-cover-single {
        flex-basis: 112px;
        width: 112px;
        min-width: 112px;
        height: 112px;
    }
    .forest-card-body-compact,
    .forest-card-body-single {
        padding: 6px 10px !important;
    }
}

/* 文章卡片标签：位于浏览量和评论数下方 */
.forest-card-article-tags {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    overflow: hidden;
    height: 18px;
    min-height: 18px;
    max-height: 18px;
}
.forest-card-article-tags.is-empty {
    visibility: hidden;
}
.forest-card-article-tags > a,
.forest-card-article-tags > span {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 120px;
    padding: 1px 6px !important;
    font-size: 11px !important;
    line-height: 16px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 侧边栏标签云 */
.forest-tag-widget-title::after {
    height: 1px;
    flex: 1;
    margin-left: 4px;
    background: linear-gradient(90deg, rgb(var(--primary) / 0.42), transparent);
    content: '';
}
.forest-tag-chip {
    --forest-tag-accent: var(--primary);
    max-width: 100%;
    color: rgb(var(--forest-tag-accent));
    border-color: rgb(var(--forest-tag-accent) / 0.22);
    background: rgb(var(--forest-tag-accent) / 0.09);
    box-shadow: inset 0 0 0 1px rgb(var(--surface-container-lowest) / 0.3);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.forest-tag-chip:nth-child(5n + 2) { --forest-tag-accent: var(--secondary); }
.forest-tag-chip:nth-child(5n + 3) { --forest-tag-accent: 37 99 235; }
.forest-tag-chip:nth-child(5n + 4) { --forest-tag-accent: 190 24 93; }
.forest-tag-chip:nth-child(5n) { --forest-tag-accent: 8 145 178; }
.forest-tag-chip::before {
    flex-shrink: 0;
    content: '#';
    font-weight: 700;
    opacity: 0.62;
}
.forest-tag-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forest-tag-count {
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 4px;
    color: inherit;
    background: rgb(var(--forest-tag-accent) / 0.14);
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    transition: background-color 0.2s ease;
}
.forest-tag-chip:hover,
.forest-tag-chip:focus-visible {
    color: rgb(var(--on-primary));
    border-color: rgb(var(--forest-tag-accent));
    background: rgb(var(--forest-tag-accent));
    box-shadow: 0 6px 16px rgb(var(--forest-tag-accent) / 0.2);
    outline: none;
    transform: translateY(-2px);
}
.forest-tag-chip:hover .forest-tag-count,
.forest-tag-chip:focus-visible .forest-tag-count {
    background: rgb(var(--on-primary) / 0.16);
}
html.dark .forest-tag-chip:nth-child(5n + 3),
html[data-theme="dark"] .forest-tag-chip:nth-child(5n + 3) { --forest-tag-accent: 96 165 250; }
html.dark .forest-tag-chip:nth-child(5n + 4),
html[data-theme="dark"] .forest-tag-chip:nth-child(5n + 4) { --forest-tag-accent: 251 113 133; }
html.dark .forest-tag-chip:nth-child(5n),
html[data-theme="dark"] .forest-tag-chip:nth-child(5n) { --forest-tag-accent: 34 211 238; }
@media (prefers-reduced-motion: reduce) {
    .forest-tag-chip { transition-duration: 0.01ms; }
}

/* 文章打赏 */
.forest-reaction-tip img,
.forest-tip-heading img,
.forest-tip-rank-title img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
html.dark .forest-reaction-tip img,
html.dark .forest-tip-heading img,
html.dark .forest-tip-rank-title img,
html[data-theme="dark"] .forest-reaction-tip img,
html[data-theme="dark"] .forest-tip-heading img,
html[data-theme="dark"] .forest-tip-rank-title img { filter: invert(1); }
.forest-reaction-tip:hover,
.forest-reaction-tip:focus-visible {
    color: rgb(var(--primary));
    border-color: rgb(var(--primary) / .5);
}
.forest-tip-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.forest-tip-modal.open { display: flex; }
body.forest-tip-modal-open { overflow: hidden; }
.forest-tip-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / .5);
}
.forest-tip-dialog {
    position: relative;
    width: min(100%, 440px);
    max-height: min(720px, calc(100vh - 32px));
    overflow-y: auto;
    padding: 28px;
    border: 1px solid rgb(var(--outline-variant));
    border-radius: 12px;
    background: rgb(var(--surface-container-lowest));
    color: rgb(var(--on-surface));
    box-shadow: var(--shadow-lift);
}
.forest-tip-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgb(var(--on-surface-variant));
    cursor: pointer;
}
.forest-tip-close:hover,
.forest-tip-close:focus-visible { background: rgb(var(--surface-container)); color: rgb(var(--on-surface)); }
.forest-tip-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.forest-tip-heading img { width: 36px; height: 36px; }
.forest-tip-heading h2 { margin: 0; font-size: 1.25rem; }
.forest-tip-heading p { margin: 4px 0 0; color: rgb(var(--on-surface-variant)); font-size: .875rem; }
.forest-tip-field { display: block; margin-top: 16px; color: rgb(var(--on-surface-variant)); font-size: .875rem; }
.forest-tip-field > span:first-child { display: block; margin-bottom: 7px; }
.forest-tip-field input,
.forest-tip-amount-input { box-sizing: border-box; width: 100%; }
.forest-tip-field > input,
.forest-tip-amount-input { border: 1px solid rgb(var(--outline-variant)); border-radius: 8px; background: rgb(var(--surface)); color: rgb(var(--on-surface)); }
.forest-tip-field > input { padding: 11px 12px; }
.forest-tip-amount-input { display: flex; align-items: center; padding: 0 12px; }
.forest-tip-amount-input b { color: rgb(var(--primary)); font-size: 1.2rem; }
.forest-tip-amount-input input { padding: 11px 8px; border: 0; outline: 0; background: transparent; color: inherit; font-size: 1.25rem; }
.forest-tip-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 9px; }
.forest-tip-presets button,
.forest-tip-methods label { min-height: 38px; border: 1px solid rgb(var(--outline-variant)); border-radius: 7px; background: rgb(var(--surface)); color: rgb(var(--on-surface-variant)); cursor: pointer; }
.forest-tip-presets button:hover,
.forest-tip-presets button:focus-visible { border-color: rgb(var(--primary)); color: rgb(var(--primary)); }
.forest-tip-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; border: 0; padding: 0; margin: 18px 0 0; }
.forest-tip-methods legend { margin-bottom: 8px; color: rgb(var(--on-surface-variant)); font-size: .875rem; }
.forest-tip-methods label { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.forest-tip-methods img { flex: 0 0 auto; width: 22px; height: 22px; object-fit: contain; }
.forest-tip-methods input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}
.forest-tip-methods label:focus-within { outline: 2px solid rgb(var(--primary)); outline-offset: 2px; }
.forest-tip-methods label:has(input:checked) { border-color: rgb(var(--primary)); color: rgb(var(--primary)); background: rgb(var(--primary) / .08); }
.forest-tip-message { min-height: 22px; margin: 14px 0 0; color: rgb(var(--primary)); font-size: .875rem; }
.forest-tip-message.is-error { color: rgb(var(--secondary)); }
.forest-tip-submit { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 44px; margin-top: 4px; border: 0; border-radius: 8px; background: rgb(var(--primary)); color: rgb(var(--on-primary)); cursor: pointer; font-weight: 700; }
.forest-tip-submit:hover,
.forest-tip-submit:focus-visible { background: rgb(var(--primary-bright)); }
.forest-tip-submit:disabled { cursor: wait; opacity: .65; }
.forest-tip-rank-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.forest-tip-rank-empty { margin: 0; color: rgb(var(--on-surface-variant)); font-size: .875rem; }
.forest-tip-rank-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.forest-tip-rank-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; font-size: .9rem; }
.forest-tip-rank-number { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: rgb(var(--primary) / .1); color: rgb(var(--primary)); font-size: .75rem; }
.forest-tip-rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(var(--on-surface)); }
.forest-tip-rank-list strong { color: rgb(var(--secondary)); font-variant-numeric: tabular-nums; }
.forest-tip-rank-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; color: rgb(var(--on-surface-variant)); font-size: .8rem; }
.forest-tip-rank-pagination a,
.forest-tip-rank-pagination .is-disabled { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: rgb(var(--on-surface-variant)); }
.forest-tip-rank-pagination a:hover,
.forest-tip-rank-pagination a:focus-visible { background: rgb(var(--primary) / .1); color: rgb(var(--primary)); }
.forest-tip-rank-pagination .is-disabled { opacity: .35; }
.forest-tip-rank-pagination-current { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
    .forest-tip-dialog { padding: 24px 18px; }
}

/* 首页搜索与搜索引擎选择 */
.forest-home-hero-has-engines {
    min-height: 280px;
}
.forest-home-hero-full {
    position: relative;
    cursor: pointer;
}
.forest-home-hero-full .forest-home-hero-card {
    cursor: default;
}
.forest-home-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: rgb(var(--primary));
    transform: translateX(-50%);
    pointer-events: none;
}
.forest-home-scroll-cue .ti {
    display: block;
    height: 42px;
    font-size: 42px;
    line-height: 42px;
    will-change: opacity, transform;
}
.forest-home-scroll-cue-icon {
    animation: forest-scroll-cue 1.6s ease-in-out infinite;
}
@keyframes forest-scroll-cue {
    0%, 100% {
        opacity: 0.25;
        transform: translateY(-3px);
    }
    50% {
        opacity: 1;
        transform: translateY(4px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .forest-home-scroll-cue-icon {
        animation: none;
        opacity: 0.65;
        transform: none;
    }
}
.forest-search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.forest-search-row {
    display: flex;
    width: 100%;
    gap: 12px;
}
.forest-search-input-shell > .ti {
    z-index: 2;
}
.forest-search-typing {
    position: absolute;
    top: 50%;
    left: 48px;
    right: 16px;
    z-index: 2;
    min-width: 0;
    display: flex;
    align-items: center;
    color: rgb(var(--on-surface-variant));
    font-family: var(--forest-font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%);
}
.forest-search-input-shell.is-typing-ready.is-search-empty:not(:focus-within) .forest-search-typing {
    opacity: 1;
    visibility: visible;
}
.forest-search-typing-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.forest-search-typing-caret {
    width: 2px;
    height: 17px;
    margin-left: 2px;
    flex: 0 0 2px;
    border-radius: 1px;
    background: rgb(var(--primary));
    animation: forest-search-caret-blink 0.78s steps(1, end) infinite;
}
@keyframes forest-search-caret-blink {
    0%, 46% { opacity: 1; }
    47%, 100% { opacity: 0; }
}
.forest-search-input-transparent,
.forest-search-input-glass {
    background-color: rgb(var(--background) / var(--forest-search-input-opacity)) !important;
}
.forest-search-input-transparent {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.forest-search-input-glass {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}
@media (prefers-reduced-motion: reduce) {
    .forest-search-typing-caret {
        display: none;
        animation: none;
    }
}
.forest-search-engines {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    padding: 1px 2px 3px;
    scrollbar-width: none;
}
.forest-search-engines::-webkit-scrollbar {
    display: none;
}
.forest-search-engine {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 76px;
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    background: rgb(var(--surface-container-lowest) / 0.72);
    color: rgb(var(--on-surface-variant));
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.forest-search-engine:hover {
    border-color: rgb(var(--primary) / 0.55);
    color: rgb(var(--primary));
    background: rgb(var(--surface-container-lowest));
}
.forest-search-engine.is-selected {
    border-color: rgb(var(--primary));
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.1);
    box-shadow: inset 0 0 0 1px rgb(var(--primary) / 0.12);
}
.forest-search-engine:focus-visible {
    outline: 2px solid rgb(var(--primary) / 0.38);
    outline-offset: 2px;
}
.forest-search-engine-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
}
.forest-search-engine-icon svg {
    display: block;
    width: 18px !important;
    height: 18px !important;
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 520px) {
    .forest-home-hero-has-engines {
        min-height: 300px;
    }
    .forest-search-form {
        gap: 10px;
    }
    .forest-search-row {
        gap: 8px;
    }
    .forest-search-row > button[type="submit"] {
        padding-left: 18px;
        padding-right: 18px;
    }
    .forest-search-engines {
        justify-content: flex-start;
    }
    .forest-search-engine {
        min-width: 70px;
        padding-left: 11px;
        padding-right: 11px;
    }
}

/* 搜索结果摘要 */
.forest-search-summary {
    display: grid;
    grid-template-columns: minmax(40px, 1fr) auto minmax(40px, 1fr);
    align-items: center;
    min-height: 58px;
    padding: 8px 12px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 12px;
    background: rgb(var(--surface-container-lowest) / var(--card-opacity));
    box-shadow: var(--shadow-soft);
}
.forest-search-home {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 7px 11px;
    border-radius: 8px;
    color: rgb(var(--primary));
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.forest-search-home .ti {
    font-size: 19px;
}
.forest-search-home:hover {
    color: rgb(var(--primary-bright));
    background: rgb(var(--surface-container));
}
.forest-search-home:focus-visible {
    outline: 2px solid rgb(var(--primary) / 0.35);
    outline-offset: 2px;
}
.forest-search-count {
    margin: 0;
    color: rgb(var(--on-surface-variant));
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    text-align: center;
    white-space: nowrap;
}
.forest-search-count strong {
    margin: 0 3px;
    color: rgb(var(--primary));
    font-size: 16px;
}
.forest-search-emoticon {
    margin-left: 5px;
    color: rgb(var(--primary-bright));
}
.forest-search-summary-spacer {
    min-width: 0;
}
.forest-search-results-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 2px 0;
}
.forest-search-results-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}
.forest-search-results-input-shell .ti {
    position: absolute;
    left: 12px;
    color: rgb(var(--primary));
    font-size: 20px;
    pointer-events: none;
}
.forest-search-results-input-shell input {
    width: 100%;
    min-height: 42px;
    padding: 9px 14px 9px 40px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 999px;
    background: rgb(var(--surface-container-lowest));
    color: rgb(var(--on-surface));
    font: inherit;
}
.forest-search-results-input-shell input:focus {
    outline: none;
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 1px rgb(var(--primary));
}
.forest-search-results-form button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 9px 20px;
    border: 0;
    border-radius: 999px;
    background: rgb(var(--primary));
    color: rgb(var(--on-primary));
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.forest-search-results-form button:hover {
    background: rgb(var(--primary-container));
}
.forest-search-results-form button:focus-visible {
    outline: 2px solid rgb(var(--primary-bright));
    outline-offset: 2px;
}
.forest-glass .forest-search-summary {
    background: rgb(var(--surface-container-lowest) / calc(var(--card-opacity) * 0.85));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 520px) {
    .forest-search-summary {
        min-height: 54px;
        padding: 7px 8px;
    }
    .forest-search-home {
        width: 38px;
        padding: 7px;
        justify-content: center;
    }
    .forest-search-home-label {
        display: none;
    }
    .forest-search-count {
        font-size: 13px;
    }
    .forest-search-count strong {
        font-size: 15px;
    }
    .forest-search-results-form {
        gap: 6px;
    }
    .forest-search-results-form button {
        padding-inline: 16px;
    }
}

/* Emlog 默认翻页兼容 */
#pagenavi a,
#pagenavi span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 9999px;
    border: 1px solid rgb(var(--surface-container-highest));
    color: rgb(var(--on-surface-variant));
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}
#pagenavi a:hover {
    background: rgb(var(--surface-container-highest));
    color: rgb(var(--primary));
}

/* ============== 文章详情页 ============== */
.forest-article-shell {
    min-width: 0;
}

.forest-article-hero {
    position: relative;
    aspect-ratio: 2.618 / 1;
    min-height: 220px;
    max-height: 360px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    background: rgb(var(--surface-container-lowest) / var(--card-opacity));
}

.forest-article-hero.no-cover {
    aspect-ratio: auto;
    min-height: auto;
    padding: 18px;
}

.forest-article-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.01);
}

.forest-article-hero-mask {
    position: absolute;
    inset: 0;
    background: rgb(var(--forest-article-mask-color) / var(--forest-article-mask-opacity, 0.55));
}

.forest-article-hero-glass .forest-article-hero-mask {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.forest-article-hero-content {
    position: relative;
    z-index: 1;
    width: calc(100% - 32px);
    margin: 16px;
    padding: 20px;
    border: 0;
    border-radius: 8px;
    background: transparent !important;
    box-shadow: var(--shadow-soft);
}

.forest-article-hero.no-cover .forest-article-hero-content {
    width: 100%;
    margin: 0;
    box-shadow: none;
}

.forest-article-content-card {
    position: relative;
    min-height: clamp(420px, 58vh, 760px);
    padding: 22px;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: var(--shadow-soft), 0 18px 48px rgba(31, 110, 59, 0.08);
}

.forest-article-content-card .article-body {
    max-width: 780px;
    min-height: 260px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 8px;
    background: transparent !important;
}

.forest-article-content-frame {
    --forest-article-fold-height: 560px;
    position: relative;
}

.forest-article-content-frame.is-collapsed .forest-article-body {
    position: relative;
    max-height: var(--forest-article-fold-height);
    overflow: hidden;
}

.forest-article-content-frame.is-collapsed .forest-article-body::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 88px;
    background: linear-gradient(180deg, rgb(var(--surface-container-lowest) / 0) 0%, rgb(var(--surface-container-lowest) / 0.96) 100%);
    content: '';
    pointer-events: none;
}

.forest-article-content-frame.is-expanded .forest-article-body {
    max-height: none;
    overflow: visible;
}

.forest-article-fold-actions {
    display: flex;
    justify-content: center;
    margin: 4px 0 2px;
}

.forest-article-fold-toggle {
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid rgb(var(--primary) / 0.25);
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgb(var(--primary));
    background: rgb(var(--surface-container-lowest) / 0.94);
    box-shadow: 0 5px 16px rgb(var(--primary) / 0.1);
    font-family: var(--forest-font-family);
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.forest-article-fold-toggle:hover,
.forest-article-fold-toggle:focus-visible {
    color: rgb(var(--on-primary-container));
    border-color: rgb(var(--primary-container));
    background: rgb(var(--primary-container));
    box-shadow: 0 8px 22px rgb(var(--primary) / 0.18);
    outline: none;
    transform: translateY(-1px);
}

.forest-article-fold-toggle .ti {
    font-size: 20px;
}

.forest-article-tags-panel {
    color: rgb(var(--on-surface-variant));
}

.forest-article-info-card {
    position: relative;
    padding: 14px 52px 14px 16px;
    background: rgb(var(--surface-container-lowest) / var(--card-opacity));
}

.forest-article-info-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    padding: 7px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--primary));
    background: rgb(var(--surface-container-lowest) / 0.88);
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.forest-article-info-copy img {
    display: block;
    width: 18px;
    height: 18px;
}

.forest-article-info-copy:hover,
.forest-article-info-copy:focus-visible {
    border-color: rgb(var(--primary) / 0.5);
    background: rgb(var(--primary) / 0.08);
    box-shadow: 0 6px 16px rgb(var(--primary) / 0.12);
    outline: none;
    transform: translateY(-1px);
}

.forest-article-info-copy.is-copied {
    border-color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.12);
}

.forest-article-info-copy.is-error {
    border-color: rgb(var(--error, 186 26 26) / 0.45);
    opacity: 0.78;
}

.forest-article-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.forest-article-info-item {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 0;
}

.forest-article-info-item:first-child {
    padding-top: 0;
}

.forest-article-info-item:last-child {
    padding-bottom: 0;
}

.forest-article-info-label {
    width: 92px;
    flex: 0 0 92px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgb(var(--on-surface));
    font-family: var(--forest-font-family);
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
}

.forest-article-info-label .ti {
    color: rgb(var(--primary));
    font-size: 17px;
}

.forest-article-info-value {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    color: rgb(var(--on-surface-variant));
    font-family: var(--forest-font-family);
    font-size: 13px;
    line-height: 18px;
    overflow-wrap: anywhere;
}

.forest-article-info-value a {
    color: rgb(var(--primary));
    text-decoration: none;
}

.forest-article-info-value a:hover,
.forest-article-info-value a:focus-visible {
    color: rgb(var(--primary-bright));
    text-decoration: underline;
    text-underline-offset: 3px;
    outline: none;
}

.forest-article-info-html > :first-child { margin-top: 0; }
.forest-article-info-html > :last-child { margin-bottom: 0; }

/* 文章底部点赞与收藏 */
.forest-reaction-button {
    position: relative;
    min-height: 48px;
    overflow: visible;
    isolation: isolate;
    box-shadow: 0 3px 12px rgb(var(--on-surface) / 0.05);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.forest-reaction-button:hover:not(:disabled) {
    color: rgb(var(--primary));
    border-color: rgb(var(--primary) / 0.5);
    background: rgb(var(--primary) / 0.07);
    box-shadow: 0 6px 18px rgb(var(--primary) / 0.1);
    transform: translateY(-2px);
}
.forest-reaction-button:focus-visible {
    outline: 2px solid rgb(var(--primary-bright));
    outline-offset: 3px;
}
.forest-reaction-button:disabled {
    cursor: wait;
}
.forest-reaction-icon {
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    background-color: currentColor;
    -webkit-mask: var(--forest-reaction-icon) center / contain no-repeat;
    mask: var(--forest-reaction-icon) center / contain no-repeat;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.forest-reaction-icon-like {
    --forest-reaction-icon: url('../images/dz.svg');
}
.forest-reaction-icon-collect {
    --forest-reaction-icon: url('../images/sc.svg');
}
.forest-reaction-like.is-active {
    color: rgb(var(--secondary));
    border-color: rgb(var(--secondary));
    background: rgb(var(--secondary) / 0.12);
    box-shadow: 0 8px 22px rgb(var(--secondary) / 0.16);
}
.forest-reaction-collect.is-active {
    color: rgb(var(--primary));
    border-color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.12);
    box-shadow: 0 8px 22px rgb(var(--primary) / 0.16);
}
.forest-reaction-button.is-pending {
    opacity: 0.68;
}
.forest-reaction-button.is-pending .forest-reaction-icon {
    animation: forestReactionPending 0.8s ease-in-out infinite alternate;
}
.forest-reaction-button.is-animating {
    animation: forestReactionPop 0.46s cubic-bezier(0.2, 0.85, 0.3, 1.3);
}
.forest-reaction-button.is-animating .forest-reaction-icon {
    animation: forestReactionIconKick 0.46s ease;
}
.forest-reaction-button.is-animating::after {
    position: absolute;
    inset: -5px;
    z-index: -1;
    border: 2px solid currentColor;
    border-radius: 12px;
    content: '';
    pointer-events: none;
    animation: forestReactionRing 0.55s ease-out forwards;
}
.forest-reaction-status {
    transition: color 0.2s ease;
}
.forest-reaction-status.is-success { color: rgb(var(--primary)); }
.forest-reaction-status.is-error { color: rgb(var(--error, 186 26 26)); }

@keyframes forestReactionPop {
    0% { transform: scale(1); }
    42% { transform: scale(0.92); }
    72% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
@keyframes forestReactionIconKick {
    0%, 100% { transform: rotate(0deg) scale(1); }
    45% { transform: rotate(-14deg) scale(1.24); }
}
@keyframes forestReactionRing {
    0% { opacity: 0.6; transform: scale(0.92); }
    100% { opacity: 0; transform: scale(1.12); }
}
@keyframes forestReactionPending {
    from { transform: scale(0.92); opacity: 0.55; }
    to { transform: scale(1.08); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .forest-reaction-button,
    .forest-reaction-icon,
    .forest-reaction-button::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

.forest-glass .forest-article-hero {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    background: rgb(var(--surface-container-lowest) / calc(var(--card-opacity) * 0.85));
}

.forest-glass .forest-article-info-card,
.forest-glass .forest-article-fold-toggle {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.forest-glass .forest-article-info-card {
    background: rgb(var(--surface-container-lowest) / calc(var(--card-opacity) * 0.85));
}

.forest-glass .forest-article-fold-toggle {
    background: rgb(var(--surface-container-lowest) / calc(var(--card-opacity) * 0.9));
}

.forest-glass .forest-article-fold-toggle:hover,
.forest-glass .forest-article-fold-toggle:focus-visible {
    color: rgb(var(--on-primary-container));
    border-color: rgb(var(--primary-container));
    background: rgb(var(--primary-container));
}

@media (min-width: 768px) {
    .forest-article-hero-content {
        width: min(760px, calc(100% - 48px));
        margin: 24px;
        padding: 28px;
    }

    .forest-article-content-card {
        padding: 32px;
    }

    .forest-article-content-card .article-body {
        padding: 26px;
    }
}

@media (max-width: 640px) {
    .forest-article-hero {
        aspect-ratio: 1.618 / 1;
        min-height: 220px;
        max-height: 320px;
    }

    .forest-article-hero.no-cover {
        aspect-ratio: auto;
        min-height: auto;
        padding: 12px;
    }

    .forest-article-hero-content {
        width: calc(100% - 24px);
        margin: 12px;
        padding: 16px;
    }

    .forest-article-content-card {
        min-height: 360px;
        padding: 14px;
    }

    .forest-article-content-card .article-body {
        min-height: 220px;
        padding: 14px;
    }

    .forest-article-info-item {
        gap: 8px;
    }

    .forest-article-info-card {
        padding-right: 46px;
    }

    .forest-article-info-label {
        width: 80px;
        flex-basis: 80px;
    }

    .forest-article-kicker .ml-auto,
    .forest-article-meta .ml-auto {
        width: 100%;
        margin-left: 0;
    }
}

/* ============== Markdown 文章正文 ============== */
.markdown.article-body {
    color: rgb(var(--on-surface));
    font-family: var(--forest-font-family);
    font-size: 16px;
    line-height: 1.8;
}
.markdown.article-body p {
    margin: 0 0 1.25em;
}
.markdown.article-body h1,
.markdown.article-body h2,
.markdown.article-body h3,
.markdown.article-body h4,
.markdown.article-body h5,
.markdown.article-body h6 {
    color: rgb(var(--primary));
    font-family: var(--forest-font-family);
    font-weight: 600;
    margin: 1.5em 0 0.6em;
    line-height: 1.3;
}
.markdown.article-body h1 { font-size: 32px; }
.markdown.article-body h2 {
    font-size: 26px;
    padding-bottom: 0.3em;
    border-bottom: 2px solid rgb(var(--surface-container-highest));
}
.markdown.article-body h3 { font-size: 22px; }
.markdown.article-body h4 { font-size: 18px; }
.markdown.article-body a {
    color: rgb(var(--primary-bright));
    text-decoration: none;
    border-bottom: 1px solid rgb(var(--primary-bright));
    transition: color 0.2s;
}
.markdown.article-body a:hover {
    color: rgb(var(--primary));
    border-bottom-color: rgb(var(--primary));
}
.markdown.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1em 0;
    box-shadow: var(--shadow-soft);
}
/* ============== 音频播放器 ==============
   保留浏览器原生控制能力，同时让播放器融入森林绿卡片与深色模式。 */
audio {
    display: block;
    box-sizing: border-box;
    width: min(100%, 620px);
    min-height: 48px;
    margin: 1.25em 0;
    padding: 7px;
    border: 1px solid rgb(var(--outline-variant));
    border-radius: 999px;
    background: linear-gradient(135deg,
        rgb(var(--surface-container-lowest)),
        rgb(var(--surface-container-low)));
    box-shadow: var(--shadow-soft);
    accent-color: rgb(var(--primary));
    color-scheme: light;
}
audio:hover,
audio:focus-visible {
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 3px rgb(var(--primary) / 0.14), var(--shadow-soft);
    outline: none;
}
audio::-webkit-media-controls-enclosure {
    border-radius: 999px;
    background: transparent;
}
audio::-webkit-media-controls-panel {
    background-color: transparent;
}
audio::-webkit-media-controls-play-button {
    border-radius: 50%;
    background-color: rgb(var(--primary));
}
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: rgb(var(--on-surface-variant));
}
html.dark audio {
    color-scheme: dark;
}
.markdown.article-body audio {
    width: 100%;
    max-width: 620px;
    margin: 1.5em auto;
}
.forest-notice-content audio {
    width: 100%;
    max-width: 100%;
    margin: 16px 0;
}
.markdown.article-body .forest-article-previewable-image {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.markdown.article-body .forest-article-previewable-image:hover,
.markdown.article-body .forest-article-previewable-image:focus-visible {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgb(var(--primary) / 0.35), var(--shadow-soft);
    outline: none;
}
.forest-image-preview-open {
    overflow: hidden;
}
.forest-image-preview {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}
.forest-image-preview[hidden] {
    display: none;
}
.forest-image-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.88);
}
.forest-image-preview-stage {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: min(100%, 1280px);
    height: min(100%, 900px);
}
.forest-image-preview-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgb(0 0 0 / 0.45);
}
.forest-image-preview-close,
.forest-image-preview-nav {
    position: absolute;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 999px;
    color: #fff;
    background: rgb(0 0 0 / 0.45);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.forest-image-preview-close:hover,
.forest-image-preview-close:focus-visible,
.forest-image-preview-nav:hover:not(:disabled),
.forest-image-preview-nav:focus-visible {
    color: #fff;
    background: rgb(var(--primary) / 0.92);
    transform: scale(1.06);
    outline: none;
}
.forest-image-preview-close {
    top: 12px;
    right: 12px;
}
.forest-image-preview-prev {
    left: 12px;
}
.forest-image-preview-next {
    right: 12px;
}
.forest-image-preview-nav:disabled {
    cursor: default;
    opacity: 0.4;
}
.forest-image-preview-count {
    position: absolute;
    right: 50%;
    bottom: 12px;
    margin: 0;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgb(0 0 0 / 0.55);
    font-size: 14px;
    line-height: 1.25;
    transform: translateX(50%);
}
@media (max-width: 640px) {
    .forest-image-preview {
        padding: 12px;
    }
    .forest-image-preview-close,
    .forest-image-preview-nav {
        width: 40px;
        height: 40px;
    }
    .forest-image-preview-prev {
        left: 4px;
    }
    .forest-image-preview-next {
        right: 4px;
    }
}
.markdown.article-body :is(div, figure, section, article)[style*="display: flex" i],
.markdown.article-body :is(div, figure, section, article)[style*="display:flex" i] {
    display: flex;
    width: 100%;
    margin: 1.25em 0;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}
.markdown.article-body :is(div, figure, section, article)[style*="display: flex" i] > img,
.markdown.article-body :is(div, figure, section, article)[style*="display:flex" i] > img {
    display: block;
    width: 100%;
    min-width: 0;
    flex: 1 1 220px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}
.markdown.article-body :is(div, figure, section, article):has(> img + img) {
    display: flex;
    width: 100%;
    margin: 1.25em 0;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}
.markdown.article-body :is(div, figure, section, article):has(> img + img) > img {
    display: block;
    width: 100%;
    min-width: 0;
    flex: 1 1 220px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}
.markdown.article-body iframe[src*="player.bilibili.com"] {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 240px;
    margin: 1.5em 0;
    border: 0;
    border-radius: 12px;
    background: #000;
    box-shadow: var(--shadow-soft);
}
@media (max-width: 640px) {
    .markdown.article-body iframe[src*="player.bilibili.com"] {
        min-height: 200px;
        margin: 1.25em 0;
        border-radius: 8px;
    }
}
.markdown.article-body blockquote {
    margin: 1.5em 0;
    padding: 12px 20px;
    border-left: 4px solid rgb(var(--primary));
    background: rgb(var(--primary) / 0.08);
    border-radius: 0 8px 8px 0;
    color: rgb(var(--on-surface-variant));
    font-style: italic;
}
.markdown.article-body code {
    font-family: 'Geist', 'JetBrains Mono', Consolas, monospace;
    background: rgb(var(--surface-container));
    color: rgb(var(--secondary));
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.markdown.article-body pre {
    background: rgb(var(--surface-container));
    padding: 16px 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.2em 0;
    border: 1px solid rgb(var(--surface-container-highest));
}
.markdown.article-body pre code {
    background: transparent;
    color: rgb(var(--on-surface));
    padding: 0;
}
.markdown.article-body ul,
.markdown.article-body ol {
    margin: 1em 0;
    padding-left: 1.5em;
}
.markdown.article-body li {
    margin: 0.4em 0;
}
.markdown.article-body ul li {
    list-style: disc;
}
.markdown.article-body ol li {
    list-style: decimal;
}
.markdown.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.markdown.article-body table th,
.markdown.article-body table td {
    padding: 10px 16px;
    border: 1px solid rgb(var(--surface-container-highest));
    text-align: left;
}
.markdown.article-body table th {
    background: rgb(var(--surface-container));
    color: rgb(var(--primary));
    font-weight: 600;
}
.markdown.article-body table tr:nth-child(even) td {
    background: rgb(var(--surface-container-low));
}
.markdown.article-body hr {
    border: none;
    border-top: 1px solid rgb(var(--surface-container-highest));
    margin: 2em 0;
}

/* ============== 评论 ============== */
.comment-content { word-break: break-word; }
.com-reply { background: none; border: none; cursor: pointer; padding: 0; }

/* ============== 登录弹窗 ============== */
.auth-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
}
.auth-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
    padding: 16px;
}
.auth-modal-card {
    background: rgb(var(--surface-container-lowest));
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 16px;
    box-shadow: var(--shadow-lift);
    width: 100%;
    max-width: 420px;
    padding: 32px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: rgb(var(--on-surface-variant));
    cursor: pointer;
    line-height: 1;
}
.auth-modal-head h3 {
    font-family: var(--forest-font-family);
    font-size: 24px;
    font-weight: 600;
    color: rgb(var(--primary));
    margin: 0 0 24px;
}
.auth-modal-alert {
    margin-bottom: 12px;
    color: rgb(var(--secondary));
    font-size: 13px;
    min-height: 18px;
}
.auth-form-row {
    margin-bottom: 12px;
}
.auth-form-row input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    background: rgb(var(--background));
    color: rgb(var(--on-surface));
    font-size: 14px;
    transition: border-color 0.2s;
}
.auth-form-row input:focus {
    outline: none;
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 1px rgb(var(--primary));
}
.auth-captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.auth-captcha-row input { flex: 1; }
.auth-captcha-row img {
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
}
.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgb(var(--on-surface-variant));
    margin: 8px 0 16px;
    cursor: pointer;
}
.auth-submit {
    width: 100%;
    padding: 12px;
    background: rgb(var(--primary));
    color: rgb(var(--on-primary));
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s;
}
.auth-submit:hover { background: rgb(var(--primary-bright)); }
.auth-modal-switch {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 13px;
}
.auth-modal-switch a {
    color: rgb(var(--primary));
    text-decoration: none;
    cursor: pointer;
}
.auth-modal-switch a:hover { color: rgb(var(--primary-bright)); }
.auth-login-ext { margin-top: 12px; }

/* ============== 聚合登录按钮 ============== */
.forest-slogin-box { margin-top: 8px; }
.forest-slogin-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0 12px;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
}
.forest-slogin-divider::before,
.forest-slogin-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgb(var(--surface-container-highest));
}
.forest-slogin-divider span { padding: 0 12px; }
.forest-slogin-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.forest-slogin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgb(var(--surface-container-highest));
    background: rgb(var(--background));
    color: rgb(var(--on-surface-variant));
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    position: relative;
}
.forest-slogin-icon {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 24px;
}
.forest-slogin-btn span { display: none; }
.forest-slogin-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: rgb(var(--primary));
}

/* ============== 表单元素 ============== */
.form-control:focus {
    border-color: rgb(var(--primary)) !important;
    box-shadow: 0 0 0 1px rgb(var(--primary));
}

/* ============== 工具栏 ============== */
.side-toolbar .side-btn {
    transition: all 0.2s;
}
.side-toolbar .side-btn:hover {
    transform: translateY(-2px);
}

/* ============== 行截断 ============== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============== 自定义组件内容 ============== */
.custom-widget-content a {
    color: rgb(var(--primary));
    text-decoration: none;
}
.custom-widget-content a:hover { color: rgb(var(--primary-bright)); }
.custom-widget-content ul,
.custom-widget-content ol {
    padding-left: 1.2em;
    margin: 0.5em 0;
}
.custom-widget-content li { margin: 0.3em 0; }

/* ============== 滚动条美化 ============== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: rgb(var(--background));
}
::-webkit-scrollbar-thumb {
    background: rgb(var(--surface-container-highest));
    border-radius: 9999px;
    border: 2px solid rgb(var(--background));
}
::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--primary));
}

/* ============== 选中文字 ============== */
::selection {
    background: rgb(var(--primary));
    color: rgb(var(--on-primary));
}

/* ============== 首页文章排序切换 ============== */
.forest-sort-row {
    width: 100%;
    min-width: 0;
}
.forest-sort-row-icon {
    flex: 0 0 auto;
    color: rgb(var(--primary));
    font-size: 20px;
}
.forest-sort-row-label {
    flex: 0 0 auto;
    color: rgb(var(--on-surface-variant));
    font-family: var(--forest-font-family);
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0;
}
.forest-sort-switch {
    position: relative;
    min-width: 0;
    max-width: 100%;
    padding: 3px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    isolation: isolate;
}
.forest-sort-switch::-webkit-scrollbar { display: none; }
.forest-sort-indicator {
    position: absolute;
    top: 3px;
    left: 0;
    bottom: 3px;
    width: 0;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(15, 45, 29, 0.1);
    pointer-events: none;
    transition-property: transform, width;
    transition-duration: 240ms;
    transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 0;
}
.forest-sort-option {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 11px;
    border: 0;
    border-radius: 6px;
    color: rgb(var(--on-surface-variant));
    background: transparent;
    font-family: var(--forest-font-family);
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}
.forest-sort-option:hover { color: rgb(var(--primary)); }
.forest-sort-option.active {
    color: rgb(var(--primary));
    font-weight: 600;
}
.forest-sort-option:active { transform: scale(0.97); }
.forest-sort-option:focus-visible {
    outline: 2px solid rgb(var(--primary) / 0.35);
    outline-offset: -2px;
}

/* ============== 响应式微调 ============== */
@media (max-width: 768px) {
    .markdown.article-body { font-size: 15px; }
    .markdown.article-body h1 { font-size: 26px; }
    .markdown.article-body h2 { font-size: 22px; }
    .markdown.article-body h3 { font-size: 19px; }
}

/* ============== 图片缩放（zoom.js 兼容） ============== */
img[data-action="zoom"] {
    cursor: zoom-in;
    transition: transform 0.3s;
}
img[data-action="zoom"]:hover {
    transform: scale(1.02);
}

/* ============== 个人信息卡片：自定义 SVG 社交图标 ============== */
.widget_blogger a svg,
.forest-blogger-card .forest-social-button svg,
aside a[href] svg {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}
.forest-social-button {
    flex: 0 0 40px;
    border: 0;
    cursor: pointer;
}
.forest-social-button:focus-visible {
    outline: 3px solid rgb(var(--primary) / 0.28);
    outline-offset: 2px;
}

/* ============== 头部登录与用户菜单 ============== */
.forest-header-login-button,
.forest-header-avatar-button {
    width: 40px;
    height: 40px;
    padding: 0;
    flex: 0 0 40px;
    border: 1px solid transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(var(--surface-container));
    color: rgb(var(--primary));
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.forest-header-login-button:hover,
.forest-header-avatar-button:hover,
.forest-header-user.open .forest-header-avatar-button {
    color: rgb(var(--on-primary));
    background: rgb(var(--primary));
    border-color: rgb(var(--primary));
}
.forest-header-login-button:focus-visible,
.forest-header-avatar-button:focus-visible {
    outline: 3px solid rgb(var(--primary) / 0.28);
    outline-offset: 2px;
}
.forest-header-login-icon {
    width: 24px;
    height: 24px;
    display: block;
}
.forest-header-user {
    position: relative;
    flex: 0 0 auto;
}
.forest-header-avatar-button {
    position: relative;
    overflow: hidden;
    background: rgb(var(--surface-container-lowest));
    border-color: rgb(var(--surface-container-highest));
}
.forest-header-avatar-button img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}
.forest-header-unread-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border: 2px solid rgb(var(--surface-container-lowest));
    border-radius: 50%;
    background: #d92d20;
    box-shadow: 0 1px 4px rgba(78, 20, 16, 0.32);
}
.forest-header-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 196px;
    padding-top: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-5px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    z-index: 80;
}
.forest-header-user:hover .forest-header-user-dropdown,
.forest-header-user:focus-within .forest-header-user-dropdown,
.forest-header-user.open .forest-header-user-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.forest-header-user-menu {
    padding: 6px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    background: rgb(var(--surface-container-lowest));
    box-shadow: 0 12px 32px rgba(11, 38, 24, 0.16);
}
.forest-header-user-name {
    padding: 7px 10px 9px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgb(var(--surface-container-highest));
    color: rgb(var(--on-surface));
    font-family: var(--forest-font-family);
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forest-header-user-item {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgb(var(--on-surface-variant));
    background: transparent;
    font-family: var(--forest-font-family);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}
.forest-header-comment-item {
    gap: 9px;
}
.forest-header-comment-badge {
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 9999px;
    color: #fff;
    background: #d92d20;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}
.forest-header-user-item .ti {
    flex: 0 0 auto;
    font-size: 19px;
}
.forest-header-user-item:hover,
.forest-header-user-item:focus-visible {
    color: rgb(var(--primary));
    background: rgb(var(--surface-container));
    outline: none;
}
.forest-header-user-logout:hover,
.forest-header-user-logout:focus-visible {
    color: #b42318;
    background: rgba(180, 35, 24, 0.08);
}

/* ============== 前台评论管理 ============== */
.forest-user-page {
    width: 100%;
}
.forest-comment-notice {
    margin-bottom: 12px;
    padding: 9px 12px;
    border: 1px solid rgb(var(--primary) / 0.3);
    border-radius: 8px;
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.08);
    font-size: 14px;
    line-height: 20px;
}
.forest-comment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.forest-comment-item {
    padding: 11px 13px 9px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    background: rgb(var(--surface-container-lowest) / var(--card-opacity));
    box-shadow: var(--shadow-soft);
}
.forest-glass .forest-comment-item {
    backdrop-filter: blur(10px) saturate(135%);
    -webkit-backdrop-filter: blur(10px) saturate(135%);
}
.forest-comment-item.is-unread {
    border-color: rgb(217 45 32 / 0.36);
    box-shadow: 0 3px 12px rgb(217 45 32 / 0.07);
}
.forest-comment-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.forest-comment-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 50%;
    object-fit: cover;
}
.forest-comment-author {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.forest-comment-author strong {
    overflow: hidden;
    color: rgb(var(--on-surface));
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forest-comment-author time {
    color: rgb(var(--on-surface-variant));
    font-size: 11px;
    line-height: 16px;
}
.forest-comment-status {
    margin-left: auto;
    padding: 2px 7px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 9999px;
    color: rgb(var(--on-surface-variant));
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    white-space: nowrap;
}
.forest-comment-status.is-unread {
    border-color: rgb(217 45 32 / 0.3);
    color: #b42318;
    background: rgb(217 45 32 / 0.08);
}
.forest-comment-status.is-no-reply {
    border-color: rgb(117 117 117 / 0.3);
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--surface-container));
}
.forest-comment-content {
    max-height: 88px;
    margin: 7px 0 5px 38px;
    overflow: auto;
    color: rgb(var(--on-surface));
    font-size: 13px;
    line-height: 21px;
    overflow-wrap: anywhere;
}
.forest-comment-content p { margin: 0 0 5px; }
.forest-comment-content p:last-child { margin-bottom: 0; }
.forest-comment-source {
    min-width: 0;
    margin-left: 38px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgb(var(--on-surface-variant));
    font-size: 11px;
    line-height: 16px;
}
.forest-comment-source .ti { font-size: 16px; }
.forest-comment-source a {
    min-width: 0;
    overflow: hidden;
    color: rgb(var(--primary));
    text-overflow: ellipsis;
    text-decoration: none;
    white-space: nowrap;
}
.forest-comment-source a:hover { text-decoration: underline; text-underline-offset: 3px; }
.forest-comment-audit-state {
    padding: 2px 6px;
    border-radius: 4px;
    color: #b54708;
    background: rgb(245 158 11 / 0.12);
    white-space: nowrap;
}
.forest-comment-actions {
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid rgb(var(--surface-container-highest));
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.forest-comment-actions form { display: inline-flex; }
.forest-comment-action-button {
    min-height: 27px;
    padding: 3px 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgb(var(--on-surface-variant));
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.forest-comment-action-button:hover,
.forest-comment-action-button:focus-visible {
    border-color: rgb(var(--primary) / 0.35);
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.08);
    outline: none;
}
.forest-comment-action-button.is-active {
    border-color: rgb(var(--primary) / 0.25);
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.1);
}
.forest-comment-action-button .ti { font-size: 16px; }
.forest-comment-reply-button { margin-left: auto; }
.forest-comment-delete-button:hover,
.forest-comment-delete-button:focus-visible {
    border-color: rgb(217 45 32 / 0.32);
    color: #b42318;
    background: rgb(217 45 32 / 0.08);
}
.forest-comment-empty {
    padding: 42px 20px;
    border: 1px dashed rgb(var(--surface-container-highest));
    border-radius: 8px;
    color: rgb(var(--on-surface-variant));
    text-align: center;
}
.forest-comment-empty .ti {
    color: rgb(var(--primary));
    font-size: 36px;
}
.forest-comment-empty h2 {
    margin: 10px 0 4px;
    color: rgb(var(--on-surface));
    font-size: 18px;
    line-height: 26px;
}
.forest-comment-empty p { margin: 0; font-size: 14px; line-height: 22px; }
.forest-comment-pagination {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.forest-comment-pagination p {
    margin: 0;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 18px;
}
.forest-comment-pagination nav { display: flex; align-items: center; gap: 4px; }
.forest-comment-pagination nav > a,
.forest-comment-pagination nav > span {
    min-width: 30px;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 6px;
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--surface-container-lowest) / var(--card-opacity));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    text-decoration: none;
}
.forest-comment-pagination a:hover,
.forest-comment-pagination .current {
    border-color: rgb(var(--primary));
    color: rgb(var(--on-primary));
    background: rgb(var(--primary));
}
.forest-comment-pagination .is-disabled {
    color: rgb(var(--on-surface-variant) / 0.42);
    background: rgb(var(--surface-container));
}
.forest-comment-pagination .ti { font-size: 17px; }
.forest-comment-modal {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgb(8 22 14 / 0.48);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
body.forest-comment-modal-open { overflow: hidden; }
.forest-comment-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.forest-comment-modal-dialog {
    position: relative;
    width: min(100%, 480px);
    max-height: min(86vh, 680px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    color: rgb(var(--on-surface));
    background: rgb(var(--surface-container-lowest));
    box-shadow: 0 20px 60px rgb(5 26 15 / 0.24);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.2s ease;
    outline: none;
}
.forest-comment-modal.open .forest-comment-modal-dialog { transform: translateY(0) scale(1); }
.forest-comment-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--surface-container));
    cursor: pointer;
}
.forest-comment-modal-close:hover,
.forest-comment-modal-close:focus-visible {
    color: rgb(var(--on-surface));
    background: rgb(var(--surface-container-high));
    outline: none;
}
.forest-comment-modal-dialog h2 {
    margin: 0 42px 14px 0;
    color: rgb(var(--on-surface));
    font-family: var(--forest-font-family);
    font-size: 20px;
    line-height: 28px;
}
.forest-comment-modal-quote {
    max-height: 100px;
    margin: 0 0 16px;
    padding: 10px 12px;
    border-left: 3px solid rgb(var(--primary));
    overflow: auto;
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--surface-container));
    font-size: 13px;
    line-height: 21px;
    white-space: pre-wrap;
}
.forest-comment-modal-dialog textarea {
    width: 100%;
    min-height: 128px;
    padding: 11px 12px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    resize: vertical;
    color: rgb(var(--on-surface));
    background: rgb(var(--background));
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
}
.forest-comment-modal-dialog textarea:focus {
    border-color: rgb(var(--primary));
    outline: 2px solid rgb(var(--primary) / 0.18);
}
.forest-comment-modal-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.forest-comment-modal-actions button {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    cursor: pointer;
}
.forest-comment-modal-secondary {
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--surface-container));
}
.forest-comment-modal-secondary:hover,
.forest-comment-modal-secondary:focus-visible {
    background: rgb(var(--surface-container-high));
    outline: none;
}
.forest-comment-modal-primary {
    color: rgb(var(--on-primary));
    background: rgb(var(--primary));
}
.forest-comment-modal-primary:hover,
.forest-comment-modal-primary:focus-visible {
    background: rgb(var(--primary-bright));
    outline: none;
}
.forest-comment-modal-danger {
    color: #fff;
    background: #b42318;
}
.forest-comment-modal-danger:hover,
.forest-comment-modal-danger:focus-visible {
    background: #912018;
    outline: none;
}
.forest-comment-delete-dialog { max-width: 380px; text-align: center; }
.forest-comment-delete-dialog h2 { margin: 12px 38px 8px; }
.forest-comment-delete-dialog p {
    margin: 0;
    color: rgb(var(--on-surface-variant));
    font-size: 14px;
    line-height: 22px;
}
.forest-comment-delete-dialog .forest-comment-modal-actions { justify-content: center; }
.forest-comment-delete-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b42318;
    background: rgb(217 45 32 / 0.1);
}
.forest-comment-delete-icon .ti { font-size: 28px; }
@media (max-width: 640px) {
    .forest-comment-item { padding: 10px; }
    .forest-comment-content,
    .forest-comment-source { margin-left: 0; }
    .forest-comment-status { font-size: 11px; }
    .forest-comment-actions { gap: 4px; }
    .forest-comment-reply-button { margin-left: 0; }
    .forest-comment-action-button { padding-left: 7px; padding-right: 7px; }
    .forest-comment-pagination { align-items: flex-start; flex-direction: column; }
    .forest-comment-modal { padding: 14px; }
    .forest-comment-modal-dialog { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .forest-comment-modal,
    .forest-comment-modal-dialog,
    .forest-comment-action-button { transition: none; }
}

/* ============== 个人信息页 ============== */
.forest-profile-page {
    width: 100%;
}
.forest-profile-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}
.forest-profile-eyebrow {
    margin: 0 0 4px;
    color: rgb(var(--primary));
    font-family: var(--forest-font-family);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0;
}
.forest-profile-heading h1 {
    margin: 0;
    color: rgb(var(--on-surface));
    font-family: var(--forest-font-family);
    font-size: 28px;
    font-weight: 700;
    line-height: 36px;
    letter-spacing: 0;
}
.forest-profile-heading > div > p:last-child {
    margin: 4px 0 0;
    color: rgb(var(--on-surface-variant));
    font-size: 14px;
    line-height: 22px;
}
.forest-profile-nav {
    padding: 3px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    display: flex;
    gap: 2px;
    background: rgb(var(--surface-container-lowest) / var(--card-opacity));
}
.forest-profile-nav a {
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgb(var(--on-surface-variant));
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
}
.forest-profile-nav a:hover,
.forest-profile-nav a:focus-visible {
    color: rgb(var(--primary));
    background: rgb(var(--surface-container));
    outline: none;
}
.forest-profile-nav a.is-active {
    color: rgb(var(--on-primary));
    background: rgb(var(--primary));
}
.forest-profile-nav .ti { font-size: 18px; }
.forest-profile-alert {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid rgb(var(--primary) / 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.08);
    font-size: 13px;
    line-height: 20px;
}
.forest-profile-alert.is-error {
    border-color: rgb(217 45 32 / 0.3);
    color: #b42318;
    background: rgb(217 45 32 / 0.08);
}
.forest-profile-alert .ti { font-size: 20px; }
.forest-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
    gap: 16px;
}
.forest-profile-side {
    min-width: 0;
    display: grid;
    gap: 16px;
}
.forest-profile-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    background: rgb(var(--surface-container-lowest) / var(--card-opacity));
    box-shadow: var(--shadow-soft);
}
.forest-glass .forest-profile-panel,
.forest-glass .forest-profile-nav {
    backdrop-filter: blur(10px) saturate(135%);
    -webkit-backdrop-filter: blur(10px) saturate(135%);
}
.forest-profile-panel-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.forest-profile-panel-heading > .ti {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.1);
    font-size: 20px;
}
.forest-profile-panel-heading h2 {
    margin: 0;
    color: rgb(var(--on-surface));
    font-family: var(--forest-font-family);
    font-size: 17px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0;
}
.forest-profile-panel-heading p {
    margin: 2px 0 0;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 18px;
}
.forest-profile-avatar-row {
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgb(var(--surface-container));
}
.forest-profile-avatar-button {
    position: relative;
    width: 72px;
    height: 72px;
    padding: 0;
    flex: 0 0 72px;
    border: 2px solid rgb(var(--surface-container-lowest));
    border-radius: 50%;
    overflow: hidden;
    background: rgb(var(--surface-container-high));
    box-shadow: 0 0 0 1px rgb(var(--surface-container-highest));
    cursor: pointer;
}
.forest-profile-avatar-button img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.forest-profile-avatar-button > .ti {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 24px;
    height: 24px;
    border: 2px solid rgb(var(--surface-container-lowest));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--on-primary));
    background: rgb(var(--primary));
    font-size: 14px;
}
.forest-profile-avatar-button:focus-visible {
    outline: 3px solid rgb(var(--primary) / 0.28);
    outline-offset: 3px;
}
.forest-profile-avatar-row > div { min-width: 0; }
.forest-profile-avatar-row strong {
    display: block;
    overflow: hidden;
    color: rgb(var(--on-surface));
    font-size: 15px;
    line-height: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forest-profile-avatar-row p {
    margin: 2px 0 4px;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 18px;
}
.forest-profile-avatar-link {
    padding: 0;
    border: 0;
    color: rgb(var(--primary));
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    cursor: pointer;
}
.forest-profile-avatar-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.forest-profile-upload-status {
    display: none;
    margin: -12px 0 16px;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 18px;
}
.forest-profile-upload-status:not(:empty) { display: block; }
.forest-profile-upload-status.is-success { color: rgb(var(--primary)); }
.forest-profile-upload-status.is-error { color: #b42318; }
.forest-profile-modal-open { overflow: hidden; }
.forest-profile-media-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.forest-profile-media-modal[hidden] { display: none; }
.forest-profile-media-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgb(15 23 20 / 0.58);
    backdrop-filter: blur(3px);
}
.forest-profile-media-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    background: rgb(var(--surface-container-lowest));
    box-shadow: 0 24px 64px rgb(0 0 0 / 0.26);
    outline: none;
}
.forest-profile-media-header {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 70px;
    padding: 14px 16px;
    border-bottom: 1px solid rgb(var(--surface-container-highest));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgb(var(--surface-container-lowest));
}
.forest-profile-media-header h2 {
    margin: 0;
    color: rgb(var(--on-surface));
    font-size: 17px;
    line-height: 24px;
    letter-spacing: 0;
}
.forest-profile-media-header p {
    margin: 2px 0 0;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 18px;
}
.forest-profile-media-close {
    width: 36px;
    height: 36px;
    padding: 0;
    flex: 0 0 36px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--surface-container));
    cursor: pointer;
}
.forest-profile-media-close:hover { color: rgb(var(--on-surface)); background: rgb(var(--surface-container-high)); }
.forest-profile-media-toolbar {
    min-height: 58px;
    padding: 12px 16px 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.forest-profile-media-upload,
.forest-profile-media-more {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid rgb(var(--primary));
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgb(var(--on-primary));
    background: rgb(var(--primary));
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    cursor: pointer;
}
.forest-profile-media-upload .ti,
.forest-profile-media-more .ti { font-size: 18px; }
.forest-profile-media-toolbar > span {
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 18px;
}
.forest-profile-media-status {
    min-height: 18px;
    margin: 0;
    padding: 0 16px;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 18px;
}
.forest-profile-media-status.is-error { color: #b42318; }
.forest-profile-media-status.is-success { color: rgb(var(--primary)); }
.forest-profile-media-grid {
    padding: 10px 16px 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.forest-profile-media-item {
    min-width: 0;
    padding: 0;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 7px;
    overflow: hidden;
    color: rgb(var(--on-surface));
    background: rgb(var(--surface-container));
    text-align: left;
    cursor: pointer;
}
.forest-profile-media-item:hover,
.forest-profile-media-item:focus-visible {
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 2px rgb(var(--primary) / 0.14);
    outline: none;
}
.forest-profile-media-item img {
    width: 100%;
    aspect-ratio: 1;
    display: block;
    object-fit: cover;
    background: rgb(var(--surface-container-high));
}
.forest-profile-media-item span {
    height: 34px;
    padding: 7px 8px;
    display: block;
    overflow: hidden;
    font-size: 11px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forest-profile-media-empty {
    min-height: 210px;
    padding: 40px 16px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: rgb(var(--on-surface-variant));
    text-align: center;
}
.forest-profile-media-empty:not([hidden]) { display: flex; }
.forest-profile-media-empty .ti { font-size: 34px; }
.forest-profile-media-empty p { margin: 8px 0 0; font-size: 13px; }
.forest-profile-media-footer {
    padding: 0 16px 16px;
    display: flex;
    justify-content: center;
}
.forest-profile-media-more {
    color: rgb(var(--primary));
    background: transparent;
}
.forest-profile-media-more[hidden] { display: none; }
.forest-profile-media-more:disabled,
.forest-profile-media-item:disabled { opacity: 0.58; cursor: wait; }
.forest-profile-form {
    display: grid;
    gap: 15px;
}
.forest-profile-field { min-width: 0; }
.forest-profile-field > label {
    display: block;
    margin-bottom: 6px;
    color: rgb(var(--on-surface));
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
}
.forest-profile-input-shell {
    min-height: 42px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 7px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--background));
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.forest-profile-input-shell:focus-within {
    border-color: rgb(var(--primary));
    box-shadow: 0 0 0 2px rgb(var(--primary) / 0.14);
}
.forest-profile-input-shell > .ti {
    width: 40px;
    flex: 0 0 40px;
    text-align: center;
    font-size: 19px;
}
.forest-profile-input-shell input {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 9px 11px 9px 0;
    border: 0;
    outline: 0;
    color: rgb(var(--on-surface));
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
}
.forest-profile-input-shell.is-readonly {
    color: rgb(var(--on-surface-variant) / 0.7);
    background: rgb(var(--surface-container));
}
.forest-profile-input-shell input:disabled { color: rgb(var(--on-surface-variant)); }
.forest-profile-field small {
    display: block;
    margin-top: 5px;
    color: rgb(var(--on-surface-variant));
    font-size: 11px;
    line-height: 17px;
}
.forest-profile-inline-note {
    margin: 0;
    padding: 9px 11px;
    border-left: 3px solid rgb(var(--primary));
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--primary) / 0.07);
    font-size: 12px;
    line-height: 19px;
}
.forest-profile-actions {
    padding-top: 3px;
    display: flex;
    justify-content: flex-end;
}
.forest-profile-primary {
    min-height: 39px;
    padding: 8px 14px;
    border: 1px solid rgb(var(--primary));
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgb(var(--on-primary));
    background: rgb(var(--primary));
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    cursor: pointer;
}
.forest-profile-primary:hover,
.forest-profile-primary:focus-visible {
    border-color: rgb(var(--primary-bright));
    background: rgb(var(--primary-bright));
    outline: none;
}
.forest-profile-primary .ti { font-size: 18px; }
.forest-profile-social-list { display: grid; }
.forest-profile-social-row {
    min-width: 0;
    min-height: 58px;
    padding: 10px 0;
    border-top: 1px solid rgb(var(--surface-container-highest));
    display: flex;
    align-items: center;
    gap: 10px;
}
.forest-profile-social-row:first-child { border-top: 0; padding-top: 0; }
.forest-profile-social-row:last-child { padding-bottom: 0; }
.forest-profile-social-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(var(--surface-container));
}
.forest-profile-social-icon .forest-slogin-icon { width: 20px; height: 20px; }
.forest-profile-social-row > div { min-width: 0; flex: 1; }
.forest-profile-social-row strong {
    display: block;
    color: rgb(var(--on-surface));
    font-size: 13px;
    line-height: 20px;
}
.forest-profile-social-row p {
    margin: 1px 0 0;
    overflow: hidden;
    color: rgb(var(--on-surface-variant));
    font-size: 11px;
    line-height: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forest-profile-social-row form { margin: 0; }
.forest-profile-text-button {
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid rgb(var(--primary) / 0.3);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.06);
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-decoration: none;
    cursor: pointer;
}
.forest-profile-text-button:hover,
.forest-profile-text-button:focus-visible {
    background: rgb(var(--primary) / 0.12);
    outline: none;
}
.forest-profile-text-button.is-danger {
    border-color: rgb(217 45 32 / 0.28);
    color: #b42318;
    background: rgb(217 45 32 / 0.06);
}
.forest-profile-empty {
    padding: 22px 12px;
    border: 1px dashed rgb(var(--surface-container-highest));
    border-radius: 8px;
    color: rgb(var(--on-surface-variant));
    text-align: center;
}
.forest-profile-empty .ti { color: rgb(var(--primary)); font-size: 28px; }
.forest-profile-empty p { margin: 5px 0 0; font-size: 12px; line-height: 18px; }
.forest-profile-tip-page {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    background: rgb(var(--surface-container-lowest) / var(--card-opacity));
    box-shadow: var(--shadow-soft);
}
.forest-glass .forest-profile-tip-page {
    backdrop-filter: blur(10px) saturate(135%);
    -webkit-backdrop-filter: blur(10px) saturate(135%);
}
.forest-profile-tip-section + .forest-profile-tip-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgb(var(--surface-container-highest));
}
.forest-profile-tip-section-heading {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.forest-profile-tip-section-heading h3 {
    margin: 0;
    color: rgb(var(--on-surface));
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
}
.forest-profile-tip-section-heading p {
    margin: 2px 0 0;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 18px;
}
.forest-profile-tip-section-heading > span {
    flex: 0 0 auto;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 18px;
}
.forest-profile-tip-table-wrap {
    max-width: 100%;
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    overflow-x: auto;
    background: rgb(var(--background));
}
.forest-profile-tip-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    table-layout: fixed;
}
.forest-profile-tip-table th {
    padding: 9px 12px;
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--surface-container));
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: left;
}
.forest-profile-tip-table th:first-child { width: 25%; }
.forest-profile-tip-table th:nth-child(2) { width: 18%; }
.forest-profile-tip-table th:last-child { width: 18%; }
.forest-profile-tip-table td {
    padding: 11px 12px;
    border-top: 1px solid rgb(var(--surface-container-highest));
    color: rgb(var(--on-surface));
    font-size: 12px;
    line-height: 18px;
    vertical-align: middle;
}
.forest-profile-tip-table td strong,
.forest-profile-tip-table td span,
.forest-profile-tip-table td small { display: block; }
.forest-profile-tip-table td small {
    margin-top: 2px;
    overflow: hidden;
    color: rgb(var(--on-surface-variant));
    font-size: 11px;
    line-height: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forest-profile-tip-article a {
    display: block;
    overflow: hidden;
    color: rgb(var(--on-surface));
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forest-profile-tip-article a:hover,
.forest-profile-tip-article a:focus-visible { color: rgb(var(--primary)); outline: none; }
.forest-profile-tip-amount {
    color: rgb(var(--primary)) !important;
    font-size: 14px !important;
    font-weight: 700;
}
.forest-profile-tip-transaction span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forest-profile-tip-status strong {
    width: max-content;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 11px;
    line-height: 18px;
}
.forest-profile-tip-status .is-paid {
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.1);
}
.forest-profile-tip-status .is-pending {
    color: #a15c00;
    background: rgb(245 158 11 / 0.12);
}
.forest-profile-tip-pagination {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 20px;
}
.forest-profile-tip-pagination a,
.forest-profile-tip-pagination .is-disabled {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--on-surface-variant));
    text-decoration: none;
}
.forest-profile-tip-pagination a:hover,
.forest-profile-tip-pagination a:focus-visible {
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.1);
    outline: none;
}
.forest-profile-tip-pagination .is-disabled { opacity: 0.35; }
.forest-profile-tip-pagination .ti { font-size: 18px; }
.forest-profile-tip-pagination-current {
    min-width: 44px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
    .forest-profile-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .forest-profile-heading { align-items: stretch; flex-direction: column; gap: 14px; }
    .forest-profile-heading h1 { font-size: 24px; line-height: 32px; }
    .forest-profile-nav { width: 100%; }
    .forest-profile-nav { overflow-x: auto; }
    .forest-profile-nav a { flex: 1 0 auto; justify-content: center; }
    .forest-profile-panel { padding: 16px; }
    .forest-profile-tip-page { padding: 12px; }
    .forest-profile-tip-page .forest-profile-panel-heading {
        margin-bottom: 12px;
        gap: 8px;
    }
    .forest-profile-tip-page .forest-profile-panel-heading > .ti {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        font-size: 18px;
    }
    .forest-profile-tip-section + .forest-profile-tip-section {
        margin-top: 14px;
        padding-top: 14px;
    }
    .forest-profile-tip-section-heading {
        margin-bottom: 8px;
        gap: 8px;
    }
    .forest-profile-tip-section-heading h3 {
        font-size: 14px;
        line-height: 20px;
    }
    .forest-profile-tip-section-heading p {
        font-size: 11px;
        line-height: 16px;
    }
    .forest-profile-tip-table { min-width: 640px; }
    .forest-profile-tip-table th,
    .forest-profile-tip-table td { padding: 7px 8px; }
    .forest-profile-tip-table td { font-size: 11px; line-height: 16px; }
    .forest-profile-tip-table td small {
        margin-top: 1px;
        font-size: 10px;
        line-height: 15px;
    }
    .forest-profile-tip-amount { font-size: 13px !important; }
    .forest-profile-tip-status strong {
        padding: 1px 6px;
        line-height: 16px;
    }
    .forest-profile-tip-pagination { margin-top: 8px; gap: 5px; }
    .forest-profile-avatar-row { padding: 12px; }
    .forest-profile-avatar-button { width: 62px; height: 62px; flex-basis: 62px; }
    .forest-profile-avatar-row p { display: none; }
    .forest-profile-media-modal { padding: 0; }
    .forest-profile-media-dialog {
        width: 100%;
        height: 100vh;
        height: 100svh;
        max-height: none;
        border: 0;
        border-radius: 0;
    }
    .forest-profile-media-toolbar { align-items: flex-start; flex-direction: column; gap: 5px; }
    .forest-profile-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .forest-profile-actions { justify-content: stretch; }
    .forest-profile-primary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .forest-profile-input-shell { transition: none; }
}

/* 退出登录确认弹窗 */
.forest-logout-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.forest-logout-modal-mask.open { display: flex; }
.forest-logout-modal {
    background: rgb(var(--surface-container-lowest));
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 16px;
    box-shadow: var(--shadow-lift);
    width: 100%;
    max-width: 360px;
    padding: 28px 24px 20px;
    text-align: center;
}
.forest-logout-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(186, 26, 26, 0.12);
    color: #ba1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.forest-logout-modal-icon .ti { font-size: 30px; }
.forest-logout-modal-title {
    font-family: var(--forest-font-family);
    font-size: 18px;
    font-weight: 600;
    color: rgb(var(--on-surface));
    margin: 0 0 8px;
}
.forest-logout-modal-desc {
    font-size: 14px;
    color: rgb(var(--on-surface-variant));
    margin: 0 0 20px;
    line-height: 1.5;
}
.forest-logout-modal-actions {
    display: flex;
    gap: 12px;
}
.forest-logout-modal-actions button {
    flex: 1;
    padding: 10px 14px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.forest-logout-cancel {
    background: rgb(var(--surface-container));
    color: rgb(var(--on-surface-variant));
}
.forest-logout-cancel:hover { background: rgb(var(--surface-container-high)); }
.forest-logout-confirm {
    background: #ba1a1a;
    color: #fff;
}
.forest-logout-confirm:hover { background: #93000a; }

/* ============== 公告弹窗与糖果按钮 ============== */
.forest-notice-mask {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    z-index: 180;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(14, 31, 23, 0.48);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}
.forest-notice-mask.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.forest-notice-modal {
    position: relative;
    width: min(100%, 440px);
    max-height: min(82vh, 620px);
    overflow: hidden;
    background: rgb(var(--surface-container-lowest));
    color: rgb(var(--on-surface));
    border: 1px solid rgb(var(--surface-container-highest));
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(10, 35, 23, 0.2);
    transform: translateY(14px) scale(0.98);
    transition: transform 0.24s ease;
    outline: none;
    box-sizing: border-box;
}
.forest-notice-modal * { box-sizing: border-box; }
.forest-notice-mask.open .forest-notice-modal {
    transform: translateY(0) scale(1);
}
.forest-notice-empty {
    padding: 24px;
}
.forest-notice-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-right: 42px;
    margin-bottom: 20px;
}
.forest-notice-head-icon {
    color: rgb(var(--primary));
    font-size: 23px;
}
.forest-notice-title {
    margin: 0;
    color: rgb(var(--on-surface));
    font-family: var(--forest-font-family);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    letter-spacing: 0;
}
.forest-notice-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--on-surface-variant));
    background: rgb(var(--surface-container));
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
}
.forest-notice-close:hover {
    color: rgb(var(--on-surface));
    background: rgb(var(--surface-container-highest));
}
.forest-notice-close .ti { font-size: 20px; }
.forest-notice-content {
    max-height: min(38vh, 280px);
    overflow-y: auto;
    padding: 0;
    color: rgb(var(--on-surface-variant));
    font-family: var(--forest-font-family);
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    text-align: center;
}
.forest-notice-content > :first-child { margin-top: 0; }
.forest-notice-content > :last-child { margin-bottom: 0; }
.forest-notice-content p { margin: 0 0 12px; }
.forest-notice-content a:not(.forest-candy-btn) {
    color: rgb(var(--primary));
    text-decoration: underline;
    text-underline-offset: 3px;
}
.forest-notice-content img,
.forest-notice-content video {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 16px 0;
    border-radius: 8px;
}
.forest-social-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.forest-social-popup-content .forest-social-popup-image {
    width: auto;
    max-width: 100%;
    max-height: min(42vh, 360px);
    margin: 0;
    object-fit: contain;
}
.forest-social-popup-text {
    width: 100%;
    margin: 0;
    white-space: pre-wrap;
}
.forest-notice-content pre {
    max-width: 100%;
    overflow-x: auto;
}
.forest-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
}
.forest-notice-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}
.forest-candy-btn {
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--forest-font-family);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.forest-candy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(22, 42, 31, 0.12);
    filter: saturate(1.06);
}
.forest-candy-btn:focus-visible,
.forest-notice-close:focus-visible {
    outline: 3px solid rgb(var(--primary) / 0.28);
    outline-offset: 2px;
}
.forest-candy-mint {
    color: #14532d;
    background: #c9f7d8;
    border-color: #8dd9aa;
}
.forest-candy-strawberry {
    color: #861b3d;
    background: #ffd1dc;
    border-color: #f49ab2;
}
.forest-candy-lemon {
    color: #665200;
    background: #fff0a8;
    border-color: #e8d36d;
}
.forest-candy-sky {
    color: #0b4f71;
    background: #cceaff;
    border-color: #85c7ea;
}
.forest-candy-gradient-sorbet {
    color: #6f2940;
    background: linear-gradient(135deg, #ffb8cb, #ffe39b);
    border-color: #efa6b7;
}
.forest-candy-gradient-berry {
    color: #573181;
    background: linear-gradient(135deg, #d8c7ff, #ffc9e4);
    border-color: #bca4ea;
}
.forest-notice-confirm {
    min-width: 112px;
    color: #fff;
    background: rgb(var(--primary));
}
@media (max-width: 520px) {
    .forest-notice-mask { padding: 14px; }
    .forest-notice-modal { max-width: calc(100vw - 28px); }
    .forest-notice-empty { padding: 20px 18px; }
    .forest-notice-head { margin-bottom: 18px; }
    .forest-notice-title { font-size: 18px; line-height: 24px; }
    .forest-notice-actions { flex-direction: column; }
    .forest-notice-actions .forest-candy-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .forest-notice-mask,
    .forest-notice-modal,
    .forest-candy-btn,
    .forest-sort-indicator,
    .forest-sort-option,
    .forest-header-user-dropdown { transition: none; }
}

/* ============== 移动端侧边抽屉 ============== */
.forest-drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.forest-drawer-mask.open {
    opacity: 1;
    pointer-events: auto;
}
.forest-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(86vw, 360px);
    background: rgb(var(--surface-container-lowest) / var(--card-opacity));
    border-left: 1px solid rgb(var(--surface-container-highest));
    box-shadow: var(--shadow-lift);
    z-index: 95;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.forest-drawer.open {
    transform: translateX(0);
}
.forest-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgb(var(--surface-container-highest));
    flex-shrink: 0;
}
.forest-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.forest-drawer-body > * {
    flex: 0 0 auto;
}
/* 毛玻璃模式下抽屉也启用 */
.forest-glass .forest-drawer {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    background: rgb(var(--surface-container-lowest) / calc(var(--card-opacity) * 0.9));
}

/* ============== 树叶图标晃动动画 ============== */
@keyframes forestLeafSway {
    0%   { transform: rotate(0deg); }
    20%  { transform: rotate(-12deg); }
    40%  { transform: rotate(10deg); }
    60%  { transform: rotate(-6deg); }
    80%  { transform: rotate(4deg); }
    100% { transform: rotate(0deg); }
}
.forest-leaf {
    display: inline-block;
    transform-origin: 50% 90%;
    animation: forestLeafSway 3.2s ease-in-out infinite;
    will-change: transform;
}
/* 悬停时加快晃动，增强交互感 */
a:hover .forest-leaf,
.forest-leaf:hover {
    animation-duration: 1.2s;
}

/* ============== 底部信息与统计 ============== */
.forest-footer-stats {
    display: grid;
    grid-template-columns: repeat(var(--forest-footer-stat-count), minmax(0, 1fr));
    background: transparent;
}
.forest-footer-stat {
    position: relative;
    min-width: 0;
    min-height: 72px;
    padding: 13px clamp(12px, 1.6vw, 22px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    color: rgb(var(--on-surface-variant));
}
.forest-footer-stat:only-child { justify-content: center; }
.forest-footer-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.09);
    font-size: 19px;
}
.forest-footer-stat-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.forest-footer-stat strong {
    color: rgb(var(--on-surface));
    font-size: 18px;
    font-weight: 700;
    line-height: 23px;
}
.forest-footer-stat small {
    font-size: 11px;
    line-height: 16px;
    white-space: nowrap;
}
.forest-footer-main {
    border-bottom: 0;
    padding-bottom: .8rem;
}
.forest-footer-column {
    min-width: 0;
    flex: 1 1 0;
    color: rgb(var(--on-surface-variant));
    font-size: 12px;
    line-height: 20px;
    overflow-wrap: anywhere;
}
.forest-footer-column > :first-child { margin-top: 0; }
.forest-footer-column > :last-child { margin-bottom: 0; }
.forest-footer-column a {
    color: rgb(var(--primary));
    text-decoration: none;
}
.forest-footer-column a:hover,
.forest-footer-column a:focus-visible {
    color: rgb(var(--primary-bright));
    text-decoration: underline;
    text-underline-offset: 3px;
    outline: none;
}
.forest-footer-left {
    flex: 3 1 0;
    text-align: left;
}
.forest-footer-right {
    flex: 7 1 0;
    text-align: right;
}

@media (min-width: 768px) {
    .forest-footer-main { align-items: center; }
}

/* ============== 底部友情链接滚动 ============== */
.forest-footer-links-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}
.forest-footer-links-inner > h2 {
    margin: 0;
    white-space: nowrap;
}
.forest-footer-links-viewport {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.forest-footer-links-track {
    --forest-link-loop-gap: 40px;
    display: flex;
    align-items: flex-start;
    width: max-content;
    column-gap: var(--forest-link-loop-gap);
}
.forest-footer-links-track.is-ready {
    animation: forestFooterLinksMarquee var(--forest-link-duration, 40s) linear infinite;
    will-change: transform;
}
.forest-footer-links-viewport:hover .forest-footer-links-track,
.forest-footer-links-viewport:focus-within .forest-footer-links-track {
    animation-play-state: paused;
}
.forest-footer-links-set {
    display: grid;
    grid-template-columns: repeat(var(--forest-link-columns), max-content);
    grid-template-rows: repeat(var(--forest-link-rows), minmax(24px, auto));
    gap: 10px clamp(24px, 3vw, 48px);
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
}
.forest-footer-link-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}
.forest-footer-link-item img {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border-radius: 3px;
    object-fit: cover;
}
@keyframes forestFooterLinksMarquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(0px - var(--forest-link-distance)), 0, 0); }
}

@media (max-width: 767px) {
    .forest-footer-stats-wrap { display: none; }
    .forest-footer-main {
        align-items: center;
        padding-bottom: .8rem;
    }
    .forest-footer-left,
    .forest-footer-right {
        width: 100%;
        flex: 0 1 auto;
        text-align: center;
    }
    .forest-footer-left { padding-top: .8rem; }
    .forest-footer-links-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }
    .forest-footer-links-track {
        --forest-link-loop-gap: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .forest-footer-links-viewport {
        overflow-x: auto;
        mask-image: none;
        -webkit-mask-image: none;
    }
    .forest-footer-links-track.is-ready {
        animation: none;
        transform: none;
    }
    .forest-footer-links-set[aria-hidden="true"] {
        display: none;
    }
}
