


:root {
    --blockquote-bg: #f5f5f5;
    --blockquote-tx: #000;
    --th-line: #dfe2e5;
    --hr-line: #f6f3f4;
    --ac-li-bg: #343a401a;
    --ac-li-tx: #324b64;
    --tag-bg: #dff2fe;
    --tag-tx: #00bcff;
}

:root.dark {
    --blockquote-bg: #282c34;
    --blockquote-tx: white;
    --th-line: #424242;
    --hr-line: color-mix(in oklab, #d1d5dc 50%, transparent);
    --ac-li-bg: #202328;
    --ac-li-tx: #e0e0e1;
    --tag-bg: #024a71;
    --tag-tx: #00a6f4;
}


html {
    scrollbar-width: none;
    -ms-overflow-style: none;
    
    scroll-behavior: auto;
    
    scroll-padding-top: 80px;
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}


body {
    transition: background-color 0.3s ease, color 0.3s ease;
}


h1 { font-size: 1.5rem; }
h1, h2 { font-weight: unset; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.25rem; }
h3, h4, h5, h6 { font-weight: unset; }
h4, h5, h6 { font-size: 1.125rem; }


.footer a { color: black; }
.footer a:hover { text-decoration: underline; }


.post-content-box a { color: #2196f3; }
.post-content-box a:hover { text-decoration: underline; }
.post-content-box p { margin: 16px 0; }


blockquote {
    background-color: var(--blockquote-bg);
    border-radius: 4px;
    color: var(--blockquote-tx);
    border-left: 0 solid #ccc;
    margin: 1rem 0;
    padding: .7em;
    quotes: "\201C" "\201D" "\2018" "\2019";
    transition: all .15s ease-out;
}

blockquote p {
    margin: 0 !important;
    border: none;
    font-size: inherit;
    font-family: inherit;
    font-weight: 400;
    color: inherit;
    padding: 0 15px;
    line-height: normal;
    text-align: inherit;
    display: inline-block;
}

blockquote:before {
    color: #2bbc8a;
    content: "\201C";
    font-size: 2em;
    line-height: .1em;
    vertical-align: -.4em;
}

blockquote:hover { transform: scale(1.03); }


.post-content img:hover,
.medium-box img:hover,
.medium-box video:hover {
    transform: scale(1.03);
    will-change: transform;
}

.medium-box img,
.medium-box video {
    transition: transform .3s ease-in-out;
    will-change: transform;
}

.post-content img {
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    transition: transform .3s ease-in-out;
}


table {
    border-spacing: 0;
    word-break: break-all;
    width: 100%;
}

table th { background-color: var(--blockquote-bg); }

table td, table th {
    padding: 10px 20px;
    border: 1px solid var(--th-line);
    text-align: center;
}


.post-content pre code::-webkit-scrollbar { height: 8px; }
.post-content pre code::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; }


.post-content hr {
    margin: 1rem 0;
    border-top: .1em dashed;
}


.post-content ul li {
    margin: 0;
    padding: 0;
    list-style: disc;
    margin-left: 20px;
}

.post-content ol li {
    margin: 0;
    padding: 0;
    list-style: decimal;
    margin-left: 20px;
}


.archives-li {
    padding: 3px 5px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    background-color: var(--ac-li-bg);
    color: var(--ac-li-tx);
    margin-right: 5px;
}


.link-img-box {
    width: 45px;
    height: 45px;
    overflow: hidden;
    border-radius: 4px;
}

.link-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.link-box {
    display: flex;
    align-items: center;
    height: 70px;
    border: 1px solid #f4f4f4;
    border-radius: 4px;
    padding: 10px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
    position: relative;
}

.link-img-a {
    display: block;
    position: absolute;
    top: 0;
    left: 60px;
    width: calc(100% - 60px);
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
}

.links p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .8em;
    white-space: nowrap;
}


.info-hr { padding: 20px 0; }

div.moment-box li.info-hr:not(:first-child) {
    display: block;
    border-top: 1px solid var(--hr-line);
}


.medium-box {
    box-sizing: border-box;
    margin: 1.25rem 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.medium-inner {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 5px;
    position: relative;
}

.medium-item-box {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    position: absolute;
    inset: 0;
}

ol li code, p code, table code, ul li code {
    background: var(--tag-bg);
    color: #2196f3;
    padding: .0rem .3rem;
    border-radius: 4px;
    white-space: break-spaces;
}


.vditor-task {
    margin-left: 0 !important;
    list-style-type: none !important;
}


.post-content h2, .post-content h3, .post-content h4,
.post-content h5, .post-content h6 {
    position: relative;
    text-transform: none;
    letter-spacing: normal;
    display: block;
    margin: 10px 0;
}

.post-content h2:before {
    content: "#";
    color: #2bbc8a;
    position: absolute;
    left: -1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.post-content h3:before, .post-content h4:before,
.post-content h5:before, .post-content h6:before {
    content: "#";
    color: #2bbc8a;
    position: absolute;
    left: -1rem;
    font-weight: 500;
}


.item-a {
    font-size: 22px;
    position: relative;
}

.item-a::before {
    position: absolute;
    content: "#";
    left: -1rem;
    color: #2bbc8a;
    font-weight: 700;
}

.zindex { z-index: 1000; }


.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 12rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all .15s ease-in-out;
    pointer-events: none;
}

.dropdown-content a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all .15s ease-in-out;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-content a:hover { background-color: #f0f0f0; }


@keyframes easyinout {
    0% { opacity: 0; }
    to { opacity: 1; }
}

.action {
    animation-name: easyinout;
    animation-duration: .4s;
    animation-timing-function: linear;
}


.post-card {
    animation: post-in .2s var(--delay) backwards;
}

@keyframes post-in {
    0% { opacity: 0; transform: translateY(var(--float-distance, 10%)); }
    100% { opacity: 1; transform: translateY(0px); }
}


.directory-content.initial { opacity: 0; }
.directory-content.pinned, .directory-content.unpinned { opacity: 1; }
.directory-content.headroom--top { opacity: 0; }
.directory-content.headroom--not-top {
    -webkit-transition: opacity .5s ease-in-out;
    transition: opacity .5s ease-in-out;
    opacity: 1;
}

.directory-content .toc a:hover { color: #2196f3; }
.directory-content .toc > .toc-list { overflow: hidden; position: relative; }
.directory-content .toc > .toc-list li { list-style: none; margin: 3px 5px; }
.directory-content .js-toc { overflow-y: hidden; }
.directory-content .toc-list { margin: 0; padding-left: 10px; }
.directory-content a.toc-link { color: currentColor; height: 100%; }
.directory-content .is-collapsible { max-height: 1000px; overflow: hidden; transition: all .3s ease-in-out; }
.directory-content .is-collapsed { max-height: 0; }
.directory-content .is-position-fixed { position: fixed !important; top: 0; }
.directory-content .is-active-link { font-weight: 700; }

.directory-content .toc-link:before {
    background-color: #eee;
    content: " ";
    display: inline-block;
    height: inherit;
    left: 0;
    margin-top: -1px;
    position: absolute;
    width: 2px;
}

.directory-content .is-active-link:before { background-color: #2196f3; }


.menu-btn, .menu-backdrop, .close-btn { display: none; }

@media (max-width: 640px) {
    .menu-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
    }

    .main-menu, .menu-backdrop { display: none; }

    .menu-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transition: left 0.3s ease-in-out;
        backdrop-filter: blur(8px);
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 998;
    }

    .main-menu {
        position: fixed;
        top: 0;
        left: -75%;
        width: 75%;
        height: 100vh;
        background: var(--blockquote-bg);
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 2rem;
        transition: left 0.3s ease-in-out;
        z-index: 999;
    }

    .main-menu.active { left: 0; }

    .close-btn {
        align-self: flex-end;
        display: inline-block;
    }

    .close-btn button {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--blockquote-tx);
        cursor: pointer;
    }
}




.photo-groups-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0 1.5rem;
}

.photo-group-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #666;
    background: var(--blockquote-bg);
    transition: all 0.2s ease;
    text-decoration: none;
}

.photo-group-tag:hover {
    color: #2196f3;
    background: #e3f2fd;
}

.photo-group-tag.active {
    color: #fff;
    background: #2196f3;
    font-weight: 500;
}

html.dark .photo-group-tag {
    color: #aaa;
    background: #2a2a2a;
}

html.dark .photo-group-tag:hover {
    color: #64b5f6;
    background: #1565c0;
}

html.dark .photo-group-tag.active {
    color: #fff;
    background: #1976d2;
}


.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.photo-grid-item {
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    background: var(--blockquote-bg);
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-grid-item img:hover {
    transform: scale(1.05);
}


.photo-empty {
    text-align: center;
    padding: 4rem 0;
    color: #999;
    font-size: 1rem;
}


.photo-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
}

.photo-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #fff;
    background: #2196f3;
    text-decoration: none;
    transition: background 0.2s ease;
}

.photo-page-btn:hover {
    background: #1976d2;
}

.photo-page-info {
    font-size: 0.875rem;
    color: #666;
}

html.dark .photo-page-info { color: #aaa; }


.photo-detail-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 0;
}

.photo-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #2196f3;
    text-decoration: none;
    margin-bottom: 1rem;
}

.photo-back-link:hover { text-decoration: underline; }

.photo-detail-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.photo-detail-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.photo-detail-info {
    padding: 1.5rem 0;
}

.photo-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.photo-detail-desc {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1rem;
}

html.dark .photo-detail-desc { color: #aaa; }

.photo-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.photo-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    background: var(--tag-bg);
    color: var(--tag-tx);
}


.photo-exif {
    background: var(--blockquote-bg);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.photo-exif-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.photo-exif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.exif-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.exif-label {
    font-size: 0.75rem;
    color: #999;
}

.exif-value {
    font-size: 0.875rem;
    font-weight: 500;
}

html.dark .exif-label { color: #777; }


.photo-detail-position {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 1rem;
}


.photo-detail-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.photo-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #fff;
    background: #2196f3;
    text-decoration: none;
    transition: background 0.2s ease;
}

.photo-nav-btn:hover { background: #1976d2; }

.photo-nav-disabled {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #ccc;
    background: var(--blockquote-bg);
    cursor: not-allowed;
}

html.dark .photo-nav-disabled { color: #555; }

.photo-nav-next { margin-left: auto; }


.photo-neighbors {
    display: flex;
    gap: 8px;
    padding: 1rem 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.photo-neighbor-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.photo-neighbor-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-neighbor-item:hover { border-color: #90caf9; }
.photo-neighbor-item.active { border-color: #2196f3; }


.photo-detail-comment { margin-top: 2rem; }


@media (max-width: 640px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }

    .photo-exif-grid {
        grid-template-columns: 1fr 1fr;
    }

    .photo-nav-btn, .photo-nav-disabled {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .photo-neighbor-item {
        width: 60px;
        height: 60px;
    }
}