:root {
    --maxw: 1280px;
    --muted: #666;
    --border: #e6e6e6;
    --gap: 20px;
    --card-bg: #fff;
    --note-panel-border: 1px dashed var(--border);
    --note-panel-padding: 0 12px 12px;
    --nonnote-panel-border: 1px dashed var(--border);
    --nonnote-panel-padding: 0 12px 12px;
    --link: #000000;
    --link-border: color-mix(in srgb, var(--link) 35%, transparent);
    --link-hover: var(--link);
    --link-hover-bg: color-mix(in srgb, var(--link) 5%, transparent);
    --link-card-border: color-mix(in srgb, var(--link) 20%, transparent);
    --link-card-bg: color-mix(in srgb, var(--link) 8%, #f7faff);
    --link-card-border-hover: color-mix(in srgb, var(--link) 70%, transparent);
    --link-card-bg-hover: color-mix(in srgb, var(--link) 12%, #eef4ff);
    --card-pad-plain-top: 8px;
    --card-pad-plain-inline: 24px;
    --card-pad-plain-bottom: 12px;
    --card-pad-image-top: 16px;
    --card-pad-image-inline: 16px;
    --card-pad-image-bottom: 12px;
}
* {
    box-sizing: border-box;
}
body {
    font-family:
        -apple-system, BlinkMacSystemFont, system-ui, "SF Pro Text",
        "PingFang SC", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol", "Noto Color Emoji";
    font-feature-settings:
        "ss01" on,
        "ss06" on,
        "ss07" on;
    /* -webkit-font-smoothing:antialiased; */
    text-rendering: optimizeLegibility;
    font-size-adjust: from-font;
    line-height: 1.7;
    margin: 0;
    color: #222;
    background: #f5f5f5;
}
.wrap {
    max-width: var(--maxw);
    margin-inline: auto;
    --wrap-pad-b: 40px;
    --wrap-pad-i: 40px;
    padding-block: var(--wrap-pad-b);
    padding-inline: var(--wrap-pad-i);
}
@media (max-width: 480px) {
    .wrap {
        --wrap-pad-b: 40px;
        --wrap-pad-i: 20px;
    }
}
h1 {
    font-size: 22px;
    margin: 0 0 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-logo {
    width: 32px;
    height: 32px;
    display: block;
}
.brand-logo-link {
    display: inline-flex;
    line-height: 0;
    text-decoration: none;
}
.brand-sep {
    color: #222;
    font-weight: 400;
    font-size: 12px;
}
.meta {
    color: var(--muted);
    font-size: 13px;
}
.is-clickable {
    cursor: pointer;
}
.is-clickable:hover {
    text-decoration: underline;
}

.posts {
    position: relative;
    margin: 32px 0 24px;
    padding: 0;
    list-style: none;
    min-height: 1px;
}

.posts::after {
    content: "";
    display: block;
    clear: both;
}

.posts[data-masonry-cols="1"] .card {
    width: 100%;
}
.posts[data-masonry-cols="2"] .card {
    width: calc((100% - var(--gap)) / 2);
}
.posts[data-masonry-cols="3"] .card {
    width: calc((100% - 2 * var(--gap)) / 3);
}
.posts[data-masonry-cols="4"] .card {
    width: calc((100% - 3 * var(--gap)) / 4);
}

.card {
    display: inline-block;
    width: 100%;
    background: var(--card-bg);
    border-radius: 8px;
    padding: var(--card-pad-plain-top, 8px) var(--card-pad-plain-inline, 24px)
        var(--card-pad-plain-bottom, 16px);
    margin: 0 0 var(--gap);
    break-inside: avoid;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    content-visibility: auto;
    contain-intrinsic-size: 600px;
    font-family: inherit;
    font-variant-ligatures: none;
    font-weight: 400;
    font-size: 14px;
}
.card:has(.entry-media) {
    padding: var(--card-pad-image-top, 16px) var(--card-pad-image-inline, 16px)
        var(--card-pad-image-bottom, 16px);
}
.card .panel,
.card .panel * {
    font-family: inherit;
}
.card[data-masonry-ready="false"] {
    visibility: hidden;
}
.card:has(.entry-media) .panel {
    margin-top: 0;
}
.card:has(.entry-media) .entry-media {
    margin: 0;
    overflow: hidden;
}
.card:has(.entry-media) .entry-media img {
    border-radius: 0 !important;
}
.card:has(.entry-media) .entry-text,
.card:has(.entry-media) .date-foot {
    padding: s;
}
.card .entry-text {
    font-family: inherit;
    -webkit-font-smoothing: auto;
}

.panel {
    border: none;
    padding: 0;
    margin-top: 8px;
    background: transparent;
    content-visibility: auto;
    contain-intrinsic-size: 400px;
    position: relative;
}
.panel[hidden] {
    display: none;
}
.loading {
    display: inline-block;
    padding: 6px 10px;
    background: #f3f3f3;
    border-radius: 6px;
    color: #888;
}

.head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 12px;
    margin-bottom: 8px;
}
.title {
    text-decoration: none;
    color: #222;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}
.title:hover {
    text-decoration: underline;
}

.panel h1,
.panel .post-title,
.panel time,
.panel .post-time,
.panel .entry-date,
.panel .article-date {
    display: none !important;
}
.panel header time,
.panel header [datetime],
.panel header .date,
.panel header .post-date,
.panel header .entry-date,
.panel header .post-time,
.panel header .meta,
.panel header [class*="date"],
.panel header [class*="time"],
.panel .post-meta {
    display: none !important;
}

.panel img,
.panel figure img,
.panel picture img,
.panel video,
.panel table,
.panel iframe,
.panel figure {
    display: block;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    border-radius: 6px;
}
.panel pre,
.panel code {
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
    max-width: 100%;
}

.entry-media {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 12px;
}
.entry-media > *:first-child {
    margin-top: 0 !important;
}
.media-cover {
    position: relative;
}
.shots-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    background: #000;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    padding: 4px 8px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    user-select: none;
    opacity: 0.92;
    letter-spacing: -0.5px;
}

.date-foot {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
    font-size: 11px;
    color: #888;
    text-align: left;
}

.tags-label {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    display: block;
}
.tag-chip {
    display: inline-block;
    margin: 6px 6px 0 0;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 6px;
    text-decoration: none;
    background: #f5f5f5;
    color: #334;
}
.tag-chip:hover {
    background: #f2f2f2;
}

.lb {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease;
}
.lb.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.lb-img {
    max-width: 92vw;
    max-height: 92vh;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
    transform: scale(0.95);
    opacity: 0;
    transition:
        transform 0.26s ease,
        opacity 0.26s ease;
}
.lb.show .lb-img {
    transform: scale(1);
    opacity: 1;
}
.lb-close {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.lb-close:focus {
    outline: 2px solid #fff7;
    outline-offset: 2px;
}
.lb-prev,
.lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: 0;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}
.lb-prev {
    left: 32px;
}
.lb-next {
    right: 32px;
}
.lb-prev:focus,
.lb-next:focus {
    outline: 2px solid #fff7;
    outline-offset: 2px;
}

footer.foot {
    margin-top: 64px;
    padding: 48px clamp(20px, 4vw, 52px);
    background: #fff;
    color: #1d1d21;
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.foot-inner {
    display: flex;
    flex-direction: column;
    gap: 36px;
}
.foot-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 520px;
}
.foot-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.78;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}
.foot-logo-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.foot-logo {
    width: 36px;
    height: 36px;
    display: block;
}
.foot-logo-text {
    font-weight: 600;
    letter-spacing: 0.08em;
}
.foot-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}
.foot-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(17, 17, 25, 0.72);
}
.foot-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.foot-pill {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(17, 24, 39, 0.78);
}
.foot-inline-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: -3px;
    margin: 0 4px 0 2px;
}
.foot-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
}
.foot-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.foot-head {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #555555;
}
.foot-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.foot-links a {
    color: rgba(42, 44, 56, 0.88);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    transition:
        color 0.18s ease,
        transform 0.18s ease;
}
.foot-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: rgba(17, 24, 39, 0.18);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s ease;
}
.foot-links a:hover {
    color: #111827;
    transform: translateX(2px);
}
.foot-links a:hover::after {
    transform: scaleX(1);
}
.foot-note,
.foot-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #555555;
}
.foot-summary {
    gap: 18px;
}
.foot-meta {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(107, 114, 128, 0.7);
}
.foot a {
    color: inherit;
}
@media (max-width: 600px) {
    footer.foot {
        padding: 36px 24px;
        border-radius: 24px;
    }
    .foot-title {
        font-size: 22px;
    }
    .foot-logo {
        width: 32px;
        height: 32px;
    }
}
@media (min-width: 720px) {
    .foot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 960px) {
    .foot-inner {
        flex-direction: row;
        align-items: flex-start;
    }
    .foot-brand {
        max-width: 360px;
    }
    .foot-grid {
        flex: 1;
    }
}
.more-wrap {
    text-align: center;
    margin: 8px 0 40px;
}
.btn {
    display: inline-block;
    border: 1px solid #ddd;
    background: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.head {
    display: none;
}
.head + .panel {
    margin-top: 0;
}
.panel .entry-text a:not(.tag-chip) {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid var(--link-border);
    word-break: break-word;
    overflow-wrap: anywhere;
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}
.panel .entry-text a:not(.tag-chip):hover {
    background: var(--link-hover-bg);
    border-bottom-color: var(--link-hover);
}
.panel .entry-text a:not(.tag-chip):has(img) {
    border-bottom: 0;
    background: none;
}
.panel .entry-text p > a:not(.tag-chip):only-child {
    display: inline-block;
    padding: 0 6px;
    border: 1px solid var(--link-card-border);
    border-radius: 99px;
    font-size: 11px;
}
.panel .entry-text p > a:not(.tag-chip):only-child:hover {
    border-color: var(--link-card-border-hover);
}
.panel .entry-text a[href^="http"]:not(.tag-chip):not(:has(img)) {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}
.panel .entry-text a[href^="http"]:not(.tag-chip):not(:has(img))::before {
    content: "";
    display: inline-block;
    width: 0.95em;
    aspect-ratio: 1;
    background: url("./images/link.svg") no-repeat center/contain;
    flex: none;
    transition: opacity 0.18s ease;
}
.panel .entry-text a[href^="http"]:not(.tag-chip):not(:has(img)):hover::before {
    opacity: 0.85;
}

/* ===== App Loading Overlay ===== */
.app-loading {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #fafafa 0%, #f2f2f2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.25s ease;
}
.loading-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.06),
        0 2px 10px rgba(0, 0, 0, 0.04);
}
.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-top-color: rgba(0, 0, 0, 0.75);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.loading-title {
    font-weight: 600;
    font-size: 14px;
    color: #222;
}
.loading-sub {
    font-size: 12px;
    color: #888;
}

@supports (content-visibility: auto) {
    @media (max-width: 720px) {
        .card,
        .panel {
            content-visibility: visible;
            contain-intrinsic-size: auto;
        }
    }
}
.posts[data-masonry-ready="true"] .card {
    position: absolute;
    will-change: transform;
}
