/* ==========================================================================
   Mono — 现代简约 Typecho 主题
   亮暗双模式：html[data-theme="light"] / html[data-theme="dark"]
   ========================================================================== */

:root {
    --max-w: 46rem;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas,
        "JetBrains Mono", "Courier New", monospace;

    --bg: #ffffff;
    --bg-soft: #f6f6f7;
    --fg: #1c1c1f;
    --fg-muted: #6f6f78;
    --border: #e6e6ea;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.09);
    --code-bg: #f4f4f6;
    --pre-bg: #f7f7f9;
    --pre-border: #e6e6ea;
    --shadow: rgba(0, 0, 0, 0.06);
    --header-bg: rgba(255, 255, 255, 0.82);
}

html[data-theme="dark"] {
    --bg: #101014;
    --bg-soft: #18181d;
    --fg: #e4e4e8;
    --fg-muted: #9494a0;
    --border: #26262d;
    --accent: #60a5fa;
    --accent-strong: #93c5fd;
    --accent-soft: rgba(96, 165, 250, 0.12);
    --code-bg: #1b1b22;
    --pre-bg: #16161c;
    --pre-border: #26262d;
    --shadow: rgba(0, 0, 0, 0.4);
    --header-bg: rgba(16, 16, 20, 0.82);
}

/* --------------------------------------------------------------------------
   基础
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    color: var(--fg);
    background: var(--bg);
    transition: background-color 0.25s ease, color 0.25s ease;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}
a:hover { color: var(--accent-strong); }

img { max-width: 100%; height: auto; border-radius: 8px; }

::selection { background: var(--accent-soft); }

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

/* --------------------------------------------------------------------------
   页面骨架
   -------------------------------------------------------------------------- */

.page { min-height: 100vh; display: flex; flex-direction: column; }

.site-main {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
    flex: 1;
}

/* ------------------------------ 头部导航 ---------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: calc(var(--max-w) + 3rem);
    margin: 0 auto;
    padding: 0.8rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-title {
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: 0.02em;
    color: var(--fg);
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.site-title:hover { color: var(--accent); }

.site-logo,
.site-logo-dark {
    height: 2.4rem;
    width: auto;
    transition: opacity 0.15s ease;
}
.site-logo-dark { display: none; }
html[data-theme="dark"] .site-logo { display: none; }
html[data-theme="dark"] .site-logo-dark { display: inline-block; }
.site-title:hover .site-logo,
.site-title:hover .site-logo-dark { opacity: 0.85; }

.site-nav {
    display: flex;
    gap: 1.1rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 0.94rem;
    white-space: nowrap;
    padding: 0.15rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover,
.site-nav a.current { color: var(--fg); border-bottom-color: var(--accent); }

/* 导航分类下拉：桌面折叠悬停展开，移动端平铺回退 */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--fg-muted);
    font-size: 0.94rem;
    white-space: nowrap;
    padding: 0.15rem 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-dropdown-toggle::after {
    content: "";
    width: 0.38rem;
    height: 0.38rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-0.06rem);
    transition: transform 0.2s ease;
}
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle { color: var(--fg); }
.nav-dropdown.is-active .nav-dropdown-toggle { color: var(--fg); border-bottom-color: var(--accent); }
.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after { transform: rotate(225deg) translateY(0); }

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: -0.75rem;
    min-width: 8rem;
    margin-top: 0.55rem;
    padding: 0.45rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 28px var(--shadow);
    display: none;
    z-index: 60;
}
.nav-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -0.6rem;
    left: 0;
    right: 0;
    height: 0.6rem;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    display: block;
    padding: 0.42rem 0.75rem;
    border-radius: 7px;
    font-size: 0.92rem;
    color: var(--fg-muted);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: none;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-dropdown-menu a:hover { color: var(--fg); background: var(--bg-soft); }
.nav-dropdown-menu a.current { color: var(--accent); background: var(--accent-soft); border-bottom: none; }

@media (min-width: 641px) {
    .site-nav { overflow: visible; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.search-form input[type="search"] {
    width: 9.5rem;
    padding: 0.36rem 0.8rem;
    font: inherit;
    font-size: 0.88rem;
    color: var(--fg);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    outline: none;
    transition: width 0.25s ease, border-color 0.15s ease, background-color 0.25s ease;
}
.search-form input[type="search"]:focus {
    width: 12rem;
    border-color: var(--accent);
    background: var(--bg);
}
.search-form input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    color: var(--fg-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.25s ease;
}
.theme-toggle:hover { color: var(--fg); background: var(--bg-soft); border-color: var(--border); }
.theme-toggle .icon { width: 1.1rem; height: 1.1rem; }
html[data-theme="light"] .icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }

/* --------------------------------------------------------------------------
   文章列表
   -------------------------------------------------------------------------- */

.post-item {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--border);
}
.post-item:first-child { padding-top: 0.2rem; }

.post-item-body { flex: 1; min-width: 0; }

.post-item-thumb {
    flex-shrink: 0;
    width: 7.5rem;
    aspect-ratio: 4 / 3;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    transition: opacity 0.15s ease;
}
.post-item-thumb:hover { opacity: 0.85; }
.post-item-thumb img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: block;
}
.post-item-thumb img.thumb-cover { object-fit: cover; }
.post-item-thumb img.thumb-contain { object-fit: contain; }
html[data-theme="dark"] .post-item-thumb img.thumb-contain { filter: invert(1); }

.post-item-title { margin: 0 0 0.35rem; font-size: 1.28rem; line-height: 1.45; }
.post-item-title a { color: var(--fg); text-decoration: none; }
.post-item-title a:hover { color: var(--accent); }

.post-item-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.84rem;
    color: var(--fg-muted);
}

.post-item-excerpt { margin-top: 0.55rem; color: var(--fg-muted); font-size: 0.95rem; }
.post-item-excerpt p { margin: 0 0 0.5rem; }
.post-item-more { font-size: 0.9rem; }
.post-item-more a { text-decoration: none; font-weight: 500; }
.post-item-more a::after { content: " \2192"; }
.post-item-more a:hover::after { text-decoration: none; }

.empty-note {
    text-align: center;
    color: var(--fg-muted);
    padding: 4rem 0;
}

/* 归档页头 */
.archive-header { margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--border); }
.archive-title { margin: 0; font-size: 1.45rem; }
.archive-desc { margin: 0.4rem 0 0; color: var(--fg-muted); font-size: 0.94rem; }

/* ------------------------------ 分页 ------------------------------------- */

.page-navigator {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin: 2.2rem 0 0;
    padding: 0;
    flex-wrap: wrap;
}
.page-navigator li a,
.page-navigator li.current span,
.page-navigator li.current a {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--fg-muted);
    background: var(--bg);
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.page-navigator li a:hover { border-color: var(--accent); color: var(--accent); }
.page-navigator li.current a,
.page-navigator li.current span {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.page-navigator li.current a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   文章正文
   -------------------------------------------------------------------------- */

.post-full { position: relative; }

.post-header { margin-bottom: 2rem; }
.post-title {
    margin: 0 0 0.6rem;
    font-size: 1.75rem;
    line-height: 1.4;
    letter-spacing: 0.01em;
}
.post-meta { font-size: 0.86rem; color: var(--fg-muted); }
.post-meta a { color: var(--fg-muted); text-decoration: none; }
.post-meta a:hover { color: var(--accent); }
.meta-dot { margin: 0 0.15rem; }

.post-content { font-size: 1.0rem; word-break: break-word; }

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 2em 0 0.7em;
    line-height: 1.4;
    font-weight: 700;
    scroll-margin-top: 5rem;
}
.post-content h1 { font-size: 1.55rem; }
.post-content h2 { font-size: 1.35rem; padding-bottom: 0.35em; border-bottom: 1px solid var(--border); }
.post-content h3 { font-size: 1.15rem; }
.post-content h4 { font-size: 1.02rem; }

.post-content p { margin: 0 0 1.15em; }

.post-content blockquote {
    margin: 1.4em 0;
    padding: 0.1em 1.1em;
    border-left: 3px solid var(--accent);
    background: var(--bg-soft);
    border-radius: 0 8px 8px 0;
    color: var(--fg-muted);
}
.post-content blockquote p { margin: 0.7em 0; }

.post-content ul, .post-content ol { margin: 0 0 1.15em; padding-left: 1.6em; }
.post-content li { margin: 0.3em 0; }
.post-content li > ul, .post-content li > ol { margin-bottom: 0.3em; }

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.2em auto;
    width: 100%;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 0.92rem;
    display: block;
    overflow-x: auto;
}
.post-content th, .post-content td {
    border: 1px solid var(--border);
    padding: 0.5em 0.85em;
    text-align: left;
}
.post-content th { background: var(--bg-soft); font-weight: 600; }

.post-content figure { margin: 1.5em 0; text-align: center; }
.post-content figcaption { font-size: 0.85rem; color: var(--fg-muted); margin-top: 0.5em; }

/* 行内代码 */
.post-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.12em 0.4em;
}

/* 代码块 */
.post-content pre {
    margin: 1.5em 0;
    padding: 1rem 1.1rem;
    background: var(--pre-bg);
    border: 1px solid var(--pre-border);
    border-radius: 10px;
    overflow-x: auto;
    position: relative;
    line-height: 1.6;
}
.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
}
.post-content pre[data-lang]::before {
    content: attr(data-lang);
    position: absolute;
    top: 0.5rem;
    right: 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--fg-muted);
    opacity: 0.7;
    pointer-events: none;
}

/* 标签 */
.post-tags { margin-top: 2rem; }
.post-tags a {
    display: inline-block;
    margin: 0 0.35rem 0.35rem 0;
    padding: 0.14rem 0.7rem;
    font-size: 0.82rem;
    color: var(--fg-muted);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.post-tags a:hover { color: var(--accent); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   文章目录 TOC
   -------------------------------------------------------------------------- */

.toc-list { margin: 0; padding: 0; list-style: none; font-size: 0.85rem; }
.toc-list li { margin: 0.28rem 0; line-height: 1.5; }
.toc-list a {
    display: block;
    color: var(--fg-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    padding: 0.1rem 0 0.1rem 0.7rem;
    transition: color 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.toc-list a:hover { color: var(--fg); }
.toc-list a.active { color: var(--accent); border-left-color: var(--accent); }
.toc-list .toc-h3 a { padding-left: 1.5rem; }

.toc-desktop {
    position: fixed;
    top: 6.5rem;
    left: calc(50% + (var(--max-w) / 2) + 2.5rem);
    width: 13rem;
    max-height: calc(100vh - 9rem);
    overflow-y: auto;
    scrollbar-width: none;
}
.toc-desktop::-webkit-scrollbar { display: none; }

.toc-mobile {
    margin: 1rem 0 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-soft);
    font-size: 0.9rem;
}
.toc-mobile summary {
    cursor: pointer;
    padding: 0.55rem 0.9rem;
    color: var(--fg-muted);
    font-weight: 500;
    user-select: none;
}
.toc-mobile[open] summary { border-bottom: 1px solid var(--border); }
.toc-mobile .toc-list { padding: 0.5rem 0.9rem 0.7rem; }

@media (min-width: 1200px) {
    .toc-mobile { display: none !important; }
}
@media (max-width: 1199.98px) {
    .toc-desktop { display: none !important; }
}

/* --------------------------------------------------------------------------
   评论
   -------------------------------------------------------------------------- */

.comments { margin-top: 3rem; border-top: 1px solid var(--border); padding-top: 2rem; }

.comments-title { font-size: 1.08rem; margin: 0 0 1.2rem; }

.comment-list, .comment-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list ol { margin-left: 2.2rem; }

.comment-list li { margin: 0 0 1.4rem; }

.comment-body {
    padding: 0.9rem 1rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.92rem;
}
.comment-author .avatar,
.comment-list img.avatar {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--code-bg);
}
.comment-author a { color: var(--fg); text-decoration: none; font-weight: 600; }
.comment-author a:hover { color: var(--accent); }
.comment-author cite { font-style: normal; }

.comment-meta { font-size: 0.8rem; color: var(--fg-muted); }
.comment-meta a { color: var(--fg-muted); text-decoration: none; }
.comment-meta a:hover { color: var(--accent); }

.comment-reply { margin-top: 0.4rem; font-size: 0.82rem; }
.comment-reply a { color: var(--fg-muted); text-decoration: none; }
.comment-reply a:hover { color: var(--accent); }

.comment-content { margin-top: 0.5rem; font-size: 0.95rem; overflow-wrap: break-word; }
.comment-content p { margin: 0.4em 0; }

/* 评论表单 */
.respond { margin-top: 2.2rem; }
.respond-login { font-size: 0.9rem; color: var(--fg-muted); }
.respond-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.respond-row p { flex: 1; min-width: 9rem; }

.respond label {
    display: block;
    font-size: 0.85rem;
    color: var(--fg-muted);
    margin-bottom: 0.3rem;
}
.respond label.required::after { content: " *"; color: #e05252; }

.respond input.text,
.respond textarea.textarea {
    width: 100%;
    padding: 0.55rem 0.8rem;
    font: inherit;
    font-size: 0.92rem;
    color: var(--fg);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.respond input.text:focus,
.respond textarea.textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.respond textarea.textarea { resize: vertical; min-height: 7rem; }

.respond .submit {
    padding: 0.5rem 1.4rem;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.respond .submit:hover { background: var(--accent-strong); }

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.6rem 1.25rem 2rem;
    margin-top: 2rem;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    text-align: center;
    font-size: 0.84rem;
    color: var(--fg-muted);
}
.footer-line { margin: 0.25rem 0; }
.footer-inner a { color: var(--fg-muted); text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   返回顶部
   -------------------------------------------------------------------------- */

.back-top {
    position: fixed;
    right: 1.4rem;
    bottom: 1.6rem;
    z-index: 60;
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fg-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease,
        color 0.15s ease, border-color 0.15s ease, background-color 0.25s ease;
}
.back-top.show { opacity: 1; transform: translateY(0); }
.back-top[hidden] { display: none; }
.back-top:hover { color: var(--accent); border-color: var(--accent); }
.back-top svg { width: 1.15rem; height: 1.15rem; }

/* --------------------------------------------------------------------------
   highlight.js 配色（跟随主题变量）
   -------------------------------------------------------------------------- */

.hljs { color: var(--fg); background: transparent; }
.hljs-comment, .hljs-quote { color: var(--fg-muted); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-tag { color: #b45ecf; }
.hljs-literal, .hljs-number, .hljs-symbol, .hljs-bullet { color: #d16969; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute { color: #2e8f5b; }
.hljs-title, .hljs-section, .hljs-name, .hljs-selector-id, .hljs-selector-class { color: #2563eb; }
.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-class .hljs-title { color: #b3732a; }
.hljs-deletion { color: #d16969; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: bold; }
.hljs-link { text-decoration: underline; }

html[data-theme="dark"] .hljs-keyword, html[data-theme="dark"] .hljs-selector-tag,
html[data-theme="dark"] .hljs-built_in, html[data-theme="dark"] .hljs-tag { color: #c792ea; }
html[data-theme="dark"] .hljs-literal, html[data-theme="dark"] .hljs-number,
html[data-theme="dark"] .hljs-symbol, html[data-theme="dark"] .hljs-bullet { color: #f78c6c; }
html[data-theme="dark"] .hljs-string, html[data-theme="dark"] .hljs-regexp,
html[data-theme="dark"] .hljs-addition, html[data-theme="dark"] .hljs-attribute { color: #8ee0a1; }
html[data-theme="dark"] .hljs-title, html[data-theme="dark"] .hljs-section,
html[data-theme="dark"] .hljs-name, html[data-theme="dark"] .hljs-selector-id,
html[data-theme="dark"] .hljs-selector-class { color: #82aaff; }
html[data-theme="dark"] .hljs-attr, html[data-theme="dark"] .hljs-variable,
html[data-theme="dark"] .hljs-template-variable, html[data-theme="dark"] .hljs-type,
html[data-theme="dark"] .hljs-class .hljs-title { color: #ffcb6b; }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .site-main { padding: 1.8rem 1.1rem 2.4rem; }

    .header-inner { flex-wrap: wrap; gap: 0.6rem 0.9rem; padding: 0.65rem 1rem; }
    .site-title { order: 1; }
    .header-actions { order: 2; margin-left: auto; }
    .site-nav { order: 3; flex-basis: 100%; }

    .search-form input[type="search"] { width: 7.5rem; }
    .search-form input[type="search"]:focus { width: 9rem; }

    .post-title { font-size: 1.45rem; }
    .post-content { font-size: 0.98rem; }

    .post-item { gap: 0.85rem; }
    .post-item-thumb { width: 5.5rem; }

    .nav-dropdown, .nav-dropdown-menu { display: contents; }
    /* 压制桌面端 :hover/:focus-within 弹出规则，否则点按分类时菜单会变回
       绝对定位面板盖住正文，导致点击落空（本块位置靠后，同优先级可覆盖） */
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu { display: contents; }
    .nav-dropdown-menu::before { display: none; }
    .nav-dropdown-toggle { display: none; }
    .nav-dropdown-menu a {
        display: inline-block;
        padding: 0.15rem 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
    }
    .nav-dropdown-menu a.current { color: var(--fg); background: none; border-bottom-color: var(--accent); }

    .comment-list ol { margin-left: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
