@font-face {
    font-style: normal;
    font-family: 'eafont';
    src: url('../fonts/eafont.ttf') format('truetype');
}
:root {
    --width: 660px;
    --font-yahei: eafont, HarmonyOS_M, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", STHeiti, "WenQuanYi Micro Hei", Helvetica, Arial, sans-serif;
    --font-fangsong: Baskerville, "Times New Roman", "Liberation Serif", STFangsong, FangSong, FangSong_GB2312, "CWTEX\-F", serif;
    --font-songti: Georgia, "Nimbus Roman No9 L", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif;
    --font-scale: 1em;
    --background-color: #fff;
    --comment-author-color: #eee;
    --heading-color: #222;
    --text-color: #444;
    --link-color: #3273dc;
    --visited-color: #8b6fcb;
    --code-background-color: #fff;
    --code-color: #222;
    --blockquote-color: #222;
    --gray-color: #999;
    --current-page-color: #88b6ff;
    --image-background-color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #313131;
        --heading-color: #eee;
        --text-color: #ddd;
        --link-color: #6ab0e5;
        --visited-color: #8b6fcb;
        --code-background-color: #313131;
        --code-color: #ddd;
        --blockquote-color: #ccc;
        --gray-color: #999;
        --current-page-color: #a4d8ff;
        --comment-author-color: #606060;
        --image-background-color: #c0c0c0;
    }
}

body {
    font-family: var(--font-yahei);
    /* 可替换 --font-fangsong 或 --font-songti 字体 */
    font-size: var(--font-scale);
    margin: auto;
    padding: 20px;
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.7;
    color: var(--text-color);
}

html {
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading-color);
    display: inherit
}

a {
    color: var(--link-color);
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid transparent
}

a:hover,
nav .current {
    border-bottom: 1px solid
}

nav a {
    margin-right: 8px
}

strong,
b {
    color: var(--heading-color)
}

button {
    margin: 0;
    cursor: pointer
}

table {
    width: 100%
}

hr {
    border: 0;
    border-top: 1px dashed
}

img {
    max-width: 100%;
    height: auto
}

time,
.intro {
    color: var(--gray-color);
}

code {
    font-family: monospace;
    padding: 2px;
    background-color: var(--code-background-color);
    color: var(--code-color);
    border-radius: 4px
}

blockquote {
    border-left: 1px solid #999;
    color: var(--code-color);
    padding-left: 20px;
    font-style: italic
}

input {
    border-radius: 4px;
    border: 1px solid var(--gray-color);
    margin: 0 0 15px 0;
    padding: 10px;
    width: 50%
}

input:focus {
    outline: 0
}

input[type="submit"] {
    padding: 9px 10px 10px;
    text-align: center;
    width: 80px;
    display: inline-flex;
    background-color: var(--heading-color);
    color: var(--code-background-color);
    border: none
}

input[type="submit"]:hover {
    cursor: pointer;
    opacity: .7
}

header,
footer {
    padding: 20px 0
}

.title:hover {
    text-decoration: none;
    border: none
}

.title h1,
.title h2 {
    font-size: 1.5em
}

ul.posts {
    list-style-type: none;
    padding: unset
}

ul.posts li {
    display: flex;
    margin: 3px 0
}

ul.posts li span {
    flex: 0 0 115px
}

ul.posts li a:visited {
    color: var(--visited-color)
}

.tags {
    margin-top: 30px;
    color: var(--gray-color)
}

.tags a {
    margin: 0 5px 0 2px
}

.page-navigator {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.page-navigator li {
    display: block;
}

.current {
    color: var(--current-page-color);
    text-decoration: underline;
}

.tag_list .tag_item {
    display: inline-block;
    padding: 5px;
}

.heading-collapse-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.3em;
    font-size: 0.65em;
    cursor: pointer;
    color: var(--gray-color);
    border-radius: 3px;
    transition: color 0.2s, background-color 0.2s, transform 0.2s;
    vertical-align: middle;
    user-select: none;
    flex-shrink: 0;
}

.heading-collapse-arrow:hover {
    color: var(--heading-color);
    background-color: rgba(128, 128, 128, 0.15);
}

.heading-collapse-wrapper {
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.heading-collapse-wrapper.heading-collapsed {
    display: none;
}
/* 顶部站点标题取消粗体 */
.title h1,
.title h2 {
    font-weight: 400;
}

/* 首页 Notes / Articles 分区 */
.home-section {
    margin: 0 0 28px 0;
}

.notes-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.note-item {
    margin: 0 0 18px 0;
}

.note-date {
    display: block;
    color: var(--gray-color);
    margin-bottom: 4px;
}

.note-content p {
    margin: 0 0 8px 0;
}

.note-content a {
    pointer-events: none;
    color: var(--text-color);
    border-bottom: none;
}
.home-section-extra-item {
    display: none !important;
}

.home-section-more-btn {
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--link-color);
    cursor: pointer;
    font: inherit;
}

.home-section-more-btn:hover {
    border-bottom: 1px solid;
}
.home-section-expanded .home-section-extra-item {
    display: list-item !important;
}

.home-section-expanded .note-item.home-section-extra-item {
    display: block !important;
}
/* 修复首页分区行内布局和按钮焦点效果 */
.home-section .notes-list .note-item,
.home-section ul.posts li,
.home-section-expanded .notes-list .note-item.home-section-extra-item,
.home-section-expanded ul.posts li.home-section-extra-item {
    display: flex !important;
    align-items: baseline;
    margin: 3px 0;
}

.home-section .note-date,
.home-section ul.posts li span {
    flex: 0 0 115px;
    display: block;
    margin: 0;
    color: var(--gray-color);
}

.home-section .note-content,
.home-section ul.posts li div {
    flex: 1 1 auto;
    min-width: 0;
}

.home-section .note-content p {
    display: inline;
    margin: 0;
}

.home-section .note-content p + p {
    display: block;
    margin-top: 8px;
}

.home-section-more-btn,
.home-section-more-btn:focus,
.home-section-more-btn:active,
.home-section-more-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    appearance: none;
    -webkit-appearance: none;
}
/* 修复首页展开数量和按钮按压效果 */
.home-section .notes-list .note-item,
.home-section ul.posts li {
    display: flex !important;
    align-items: baseline;
    margin: 3px 0;
}

.home-section .note-date,
.home-section ul.posts li span {
    flex: 0 0 115px;
    display: block;
    margin: 0;
    color: var(--gray-color);
}

.home-section .note-content,
.home-section ul.posts li div {
    flex: 1 1 auto;
    min-width: 0;
}

.home-section .note-content p {
    display: inline;
    margin: 0;
}

.home-section .note-content p + p {
    display: block;
    margin-top: 8px;
}

.home-section .home-section-extra-item,
.home-section .notes-list .note-item.home-section-extra-item,
.home-section ul.posts li.home-section-extra-item {
    display: none !important;
}

.home-section.home-section-expanded .notes-list .note-item.home-section-extra-item,
.home-section.home-section-expanded ul.posts li.home-section-extra-item {
    display: flex !important;
}

.home-section-more-btn,
.home-section-more-btn:hover,
.home-section-more-btn:focus,
.home-section-more-btn:active,
.home-section-more-btn:focus-visible {
    margin-top: 4px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    color: var(--link-color);
    cursor: pointer;
    font: inherit;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    -webkit-focus-ring-color: rgba(0, 0, 0, 0) !important;
    user-select: none;
    touch-action: manipulation;
}

.home-section-more-btn::-moz-focus-inner {
    border: 0 !important;
    padding: 0 !important;
}
/* ===== 全局去除点击高亮 ===== */
* {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  outline: none !important;
}

/* ===== 单独确保按钮无任何高亮 ===== */
button,
button:focus,
button:active,
button:visited,
button::-moz-focus-inner {
  outline: none !important;
  border: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-focus-ring-color: transparent !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* 点击时强制无任何效果 */
.ctrl-btn:focus,
.ctrl-btn:active,
.ctrl-btn:focus-visible,
.toggle-btn:focus,
.toggle-btn:active,
.toggle-btn:focus-visible,
.home-section-more-btn:focus,
.home-section-more-btn:active,
.home-section-more-btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  -webkit-tap-highlight-color: transparent !important;
  background: transparent !important;
}
/* 更新日志：时间和内容水平同一行 */
.changelog-posts .changelog-item {
    display: flex !important;
    align-items: baseline;
    margin: 3px 0;
}

.changelog-posts .note-date {
    flex: 0 0 115px;
    display: block;
    margin: 0;
    color: var(--gray-color);
}

.changelog-posts .changelog-content {
    flex: 1 1 auto;
    min-width: 0;
}

.changelog-posts .changelog-content p {
    display: inline;
    margin: 0;
}

.changelog-posts .changelog-content p + p {
    display: block;
    margin-top: 8px;
}
/* 友链页面 */
.friend-links-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}
.friend-link-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 8px 0;
}
.friend-link-item a {
    color: var(--text-color);
    text-decoration: none;
    flex: 0 0 auto;
}
.friend-link-item a:hover {
    text-decoration: underline;
}
.friend-link-item span {
    color: var(--gray-color);
    font-size: 0.95em;
}
@media (max-width: 480px) {
    .friend-link-item {
        display: block;
    }
    .friend-link-item span {
        display: block;
        margin-top: 2px;
    }
}