@font-face {
    font-family: "angelinaFont";
    src: local("Angelina"),
         url("/fonts/angelina.woff2") format("woff2"),
         url("/fonts/angelina.ttf") format("truetype");
    font-display: optional;
    font-style: normal;
    font-weight: 400;
}

html {
    scrollbar-gutter: stable both-edges;
}

@supports not (scrollbar-gutter: stable) {
    html {
        overflow-y: scroll;
    }
}

.navigatebar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 980px;
    margin: 18px auto 36px;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
    min-height: 42px;
}

.navigatebar-left,
.navigatebar-center,
.navigatebar-right {
    display: flex;
    align-items: center;
    min-width: 0;
}

.navigatebar-left {
    justify-self: start;
}

.navigatebar-center {
    justify-self: center;
}

.navigatebar-right {
    justify-self: end;
    padding-right: 2px;
}

.navigatebar-button {
    margin-left: 0;
    margin-right: 0;
    color: #3f3f3f;
    font-size: 18px;
    line-height: 1.1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
}

.navigatebar.is-zh .navigatebar-button:not(.navigatebar-mine) {
    font-family: "TsangerJinKai02", "STKaiti", "KaiTi", serif;
}

.navigatebar-button a {
    color: #3f3f3f;
    text-decoration: none;
    border-bottom: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    transition: color .12s ease;
}

.navigatebar-button a:hover {
    color: #2f2f2f;
}

.navigatebar-slogan {
    display: none;
}

.navigatebar-mine {
    flex: 0 0 auto;
    margin-left: 0;
    margin-right: 0;
    font-size: 38px;
    color: #3f3f3f;
    line-height: 1;
    font-weight: 400;
    font-family: "angelinaFont", cursive;
    font-synthesis: none;
}

.navigatebar-mine a {
    color: #3f3f3f;
    font-family: "angelinaFont", cursive;
}

.navigatebar-about {
    margin-right: 0;
    flex: 0 0 auto;
    width: auto;
    justify-content: flex-end;
}

.navigatebar-menu-item {
    margin-right: 20px;
}

.navigatebar-menu-item:last-child {
    margin-right: 0;
}

.navigatebar-menu-item a {
    color: #535353;
    padding: 0 2px;
}

.navigatebar-menu-item a.is-active {
    color: #262626;
    font-weight: 600;
}

.navigatebar.is-zh .navigatebar-menu-item a.is-active {
    font-weight: 500;
}

.lang-switch-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 4px;
    color: #535353;
    font-size: 18px;
    line-height: 1.1;
    text-decoration: none;
    transition: color .12s ease;
}

.lang-switch-text:hover {
    color: #2f2f2f;
}

.navigatebar-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.search-open-btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #5b5b5b;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color .12s ease, background-color .12s ease;
}

.search-open-btn svg {
    width: 18px;
    height: 18px;
}

.search-open-btn:hover {
    color: #2f2f2f;
    background: #f3f3f3;
}

.theme-toggle-btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #5b5b5b;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color .12s ease, background-color .12s ease;
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.theme-toggle-btn:hover {
    color: #2f2f2f;
    background: #f3f3f3;
}

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

.search-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 84px 20px 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
}

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

.search-container {
    width: 100%;
    max-width: 700px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(-8px);
    transition: transform .16s ease;
    display: flex;
    flex-direction: column;
}

.search-modal.active .search-container {
    transform: translateY(0);
}

.search-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.search-input {
    flex: 1;
    width: 100%;
    border: 0;
    outline: none;
    color: #2f2f2f;
    font-size: 17px;
    line-height: 1.45;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.search-input::placeholder {
    color: #a0a0a0;
}

.search-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #8f8f8f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-close:hover {
    color: #3f3f3f;
    background: #f3f3f3;
}

.search-results {
    overflow: auto;
    max-height: calc(100vh - 210px);
    padding: 8px 16px 14px;
}

.search-results.is-empty {
    padding: 0;
    max-height: 0;
}

.search-result-count,
.search-empty-state,
.search-loading,
.search-error,
.search-no-results {
    color: #8b8b8b;
    font-size: 13px;
    line-height: 1.4;
    padding: 8px 2px 10px;
}

.search-result-item {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 12px 8px;
    margin-bottom: 4px;
    border-radius: 8px;
}

.search-result-item:hover,
.search-result-item.selected {
    background: #f4f4f4;
}

.search-result-title {
    color: #232323;
    font-size: 18px;
    line-height: 1.5;
}

.search-result-summary {
    color: #666;
    font-size: 14px;
    line-height: 1.65;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-summary mark,
.search-result-title mark {
    background: #fde68a;
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

.search-result-meta {
    margin-top: 6px;
}

.search-result-date {
    color: #9a9a9a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.search-footer {
    border-top: 1px solid #f2f2f2;
    padding: 10px 16px;
}

.search-tips {
    color: #a4a4a4;
    font-size: 12px;
    line-height: 1.35;
}

.site-footer {
    width: 100%;
    max-width: 980px;
    margin: 28px auto 20px;
    padding: 0 20px 4px;
    box-sizing: border-box;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.site-footer-link {
    width: 22px;
    height: 22px;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-bottom: 0;
    transition: color .12s ease;
}

.site-footer-link:hover {
    color: #2f2f2f;
}

.site-footer-link svg {
    width: 18px;
    height: 18px;
}
