:root {
    --bg: #fafaf7;
    --bg-2: #f5f4ef;
    --surface: #ffffff;
    --border: #e8e6e1;
    --border-strong: #d6d3cd;
    --text: #1c1917;
    --text-body: #3f3f46;
    --text-muted: #78716c;
    --text-soft: #a8a29e;
    --brand: #0f766e;
    --brand-hover: #115e59;
    --brand-soft: #ccfbf1;
    --accent: #c2410c;
    --accent-soft: #ffedd5;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow: 0 1px 3px rgba(28, 25, 23, 0.05), 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 6px 20px rgba(28, 25, 23, 0.06), 0 2px 6px rgba(28, 25, 23, 0.04);
    --shadow-lg: 0 20px 40px rgba(28, 25, 23, 0.08), 0 8px 16px rgba(28, 25, 23, 0.04);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    --font-serif: Georgia, "Times New Roman", "Songti SC", "Noto Serif SC", "STSong", serif;
    --font-mono: "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-body);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
    color: var(--brand);
    text-decoration: none;
    transition: color .15s;
}
a:hover { color: var(--brand-hover); }

::selection { background: var(--brand-soft); color: var(--text); }

.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ========== Header ========== */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 56px 0 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: 200px;
    background: radial-gradient(ellipse at center top, rgba(15, 118, 110, .06) 0%, transparent 70%);
    pointer-events: none;
}
.site-title {
    position: relative;
    font-family: var(--font-serif);
}
.site-title a {
    color: var(--text);
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -.5px;
    background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.site-description {
    position: relative;
    color: var(--text-muted);
    font-size: 14.5px;
    margin-top: 10px;
    letter-spacing: .3px;
}
.site-nav {
    position: relative;
    margin-top: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0 16px;
}
.site-nav a {
    color: var(--text-muted);
    font-size: 14.5px;
    padding: 8px 18px;
    border-radius: 999px;
    transition: all .15s;
}
.site-nav a:hover {
    color: var(--brand);
    background: var(--brand-soft);
}
.search-form-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 6px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: all .2s;
    margin-left: 4px;
}
.search-form-inline:focus-within {
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .08);
}
.search-form-inline svg {
    color: var(--text-muted);
    flex-shrink: 0;
}
.search-form-inline input {
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    width: 140px;
    transition: width .25s;
}
.search-form-inline input::placeholder { color: var(--text-soft); }
.search-form-inline:focus-within input { width: 180px; }

/* big search form on /search page */
.search-form-big {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    background: var(--surface);
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.search-form-big input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    min-width: 0;
}
.search-form-big input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}
.search-form-big button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    background: linear-gradient(135deg, #0f766e, #134e4a);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(15, 118, 110, .25);
    transition: all .2s;
    white-space: nowrap;
}
.search-form-big button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 118, 110, .35);
}

.q-hint {
    display: inline-block;
    padding: 3px 12px;
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 999px;
    font-size: 14px;
    font-weight: normal;
    font-family: var(--font-sans);
    margin-left: 6px;
}
.search-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}
.search-meta strong { color: var(--brand); font-weight: 600; }

mark {
    background: #fef08a;
    color: #713f12;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 500;
}

/* ========== Image host ========== */
.imghost-page { min-width: 0; }
.imghost-intro {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 22px;
    font-size: 14.5px;
}

.upload-area {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 58px 30px;
    text-align: center;
    background: var(--surface);
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 24px;
}
.upload-area:hover {
    border-color: var(--brand);
    background: var(--bg-2);
}
.upload-area.dragover {
    border-color: var(--brand);
    background: var(--brand-soft);
    transform: scale(1.01);
}
.upload-icon {
    color: var(--brand);
    margin-bottom: 14px;
    opacity: .75;
}
.upload-icon svg { display: block; margin: 0 auto; }
.upload-title {
    font-family: var(--font-serif);
    font-size: 19px;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 600;
}
.upload-hint {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.7;
}

.imghost-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}
.result-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    animation: slideIn .3s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.result-thumb {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    background: var(--bg-2);
    border: 1px solid var(--border);
}
.result-info { flex: 1; min-width: 0; }
.result-name {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-family: var(--font-mono);
    word-break: break-all;
}
.result-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.url-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.url-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 62px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.url-row input {
    flex: 1;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
    min-width: 0;
}
.url-row input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
}
.copy-btn {
    padding: 7px 14px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    flex-shrink: 0;
    font-weight: 500;
    transition: all .15s;
}
.copy-btn:hover { background: var(--brand-hover); }
.copy-btn.copied { background: #10b981; }

.result-loading {
    color: var(--text-muted);
    padding: 20px;
    justify-content: center;
    align-items: center;
    gap: 12px;
}
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result-error-item { padding: 0; border: none; background: none; box-shadow: none; }
.result-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border-left: 3px solid #ef4444;
    width: 100%;
}

.imghost-subtitle {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 34px 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.imghost-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.imghost-gallery-large {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.cat-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all .15s;
}
.cat-tabs a:hover {
    background: var(--bg-2);
    color: var(--text);
}
.cat-tabs a span {
    display: inline-block;
    padding: 1px 8px;
    background: var(--bg-2);
    color: var(--text-muted);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
}
.cat-tabs a.active {
    background: linear-gradient(135deg, #0f766e, #134e4a);
    color: #fff;
    box-shadow: 0 3px 10px rgba(15, 118, 110, .25);
}
.cat-tabs a.active span {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.cat-badge {
    display: inline-block;
    padding: 3px 12px;
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.cat-badge:hover {
    background: var(--brand);
    color: #fff;
}

.imghost-detail {
    background: var(--surface);
    padding: 36px 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.imghost-detail .back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 22px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-2);
    transition: all .15s;
}
.imghost-detail .back-link:hover {
    background: var(--brand-soft);
    color: var(--brand);
}
.imghost-preview {
    text-align: center;
    margin-bottom: 24px;
    background: var(--bg-2);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.imghost-preview img {
    max-width: 100%;
    max-height: 540px;
    border-radius: 6px;
    box-shadow: var(--shadow-md);
}
.imghost-info .detail-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    word-break: break-all;
}
.imghost-info .detail-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 22px;
    font-family: var(--font-mono);
}
.imghost-info .result-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.imghost-info .url-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.imghost-info .url-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 70px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.imghost-info .url-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    min-width: 0;
}
.imghost-info .url-row input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}
.imghost-info .copy-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #0f766e, #134e4a);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(15, 118, 110, .2);
    transition: all .15s;
}
.imghost-info .copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, .3);
}
.imghost-info .copy-btn.copied {
    background: #10b981;
}

@media (max-width: 640px) {
    .imghost-detail { padding: 24px 20px; }
    .imghost-preview { padding: 12px; }
    .imghost-preview img { max-height: 360px; }
    .imghost-info .url-row { flex-wrap: wrap; }
    .imghost-info .url-label { min-width: auto; width: 100%; }
    .imghost-info .url-row input { width: 100%; }
    .imghost-info .copy-btn { width: 100%; }
}
.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-2);
    border: 1px solid var(--border);
    transition: all .2s;
    display: block;
}
.gallery-item:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-md);
    border-color: var(--brand);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 640px) {
    .upload-area { padding: 42px 20px; }
    .upload-title { font-size: 17px; }
    .upload-icon svg { width: 48px; height: 48px; }
    .result-item { flex-direction: column; padding: 14px; }
    .result-thumb { width: 100%; height: 180px; }
    .url-row { flex-wrap: wrap; gap: 6px; }
    .url-label { min-width: auto; width: 100%; }
    .url-row input { width: 100%; }
    .imghost-gallery { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
}

/* ========== Layout ========== */
.main-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 48px;
    padding: 48px 24px;
    max-width: 1060px;
    margin: 0 auto;
}

/* ========== Post list ========== */
.content { min-width: 0; }

.post-item {
    background: var(--surface);
    padding: 32px 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 22px;
    box-shadow: var(--shadow);
    transition: all .25s ease;
}
.post-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.post-item .post-title {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.35;
    letter-spacing: -.3px;
}
.post-item .post-title a { color: var(--text); }
.post-item .post-title a:hover { color: var(--brand); }
.post-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.post-meta > * { display: inline-flex; align-items: center; gap: 4px; }
.post-meta time::before { content: '📅'; opacity: .6; font-size: 11px; }
.post-meta a { color: var(--text-muted); }
.post-meta a:hover { color: var(--brand); }
.post-excerpt {
    color: var(--text-body);
    font-size: 15.5px;
    line-height: 1.8;
    margin-bottom: 16px;
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--brand);
}
.read-more:hover { gap: 8px; }

/* ========== Single post ========== */
.single-post article {
    background: var(--surface);
    padding: 52px 60px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}
.single-post .post-title {
    font-family: var(--font-serif);
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.25;
    letter-spacing: -.5px;
    color: var(--text);
}
.post-content {
    margin-top: 34px;
    font-size: 16.5px;
    line-height: 1.95;
    color: var(--text-body);
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: var(--font-serif);
    margin: 36px 0 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    letter-spacing: -.2px;
}
.post-content h1 { font-size: 28px; }
.post-content h2 {
    font-size: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.post-content h3 { font-size: 20px; }
.post-content h4 { font-size: 17.5px; }
.post-content p { margin-bottom: 20px; }
.post-content a {
    color: var(--brand);
    border-bottom: 1px solid var(--brand-soft);
}
.post-content a:hover {
    border-bottom-color: var(--brand);
    background: var(--brand-soft);
}
.post-content img {
    display: block;
    margin: 26px auto;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}
.post-content pre {
    background: #1c1917;
    color: #f5f5f4;
    padding: 20px 22px;
    overflow-x: auto;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.7;
    margin: 24px 0;
    box-shadow: var(--shadow-md);
}
.post-content pre code {
    background: none;
    padding: 0;
    color: #f5f5f4;
    font-family: var(--font-mono);
}
.post-content code {
    background: var(--bg-2);
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: #c2410c;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.post-content blockquote {
    border-left: 4px solid var(--brand);
    padding: 14px 22px;
    color: var(--text-muted);
    background: var(--bg-2);
    margin: 24px 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content ul,
.post-content ol {
    padding-left: 2em;
    margin-bottom: 20px;
}
.post-content ul li,
.post-content ol li { margin-bottom: 8px; }
.post-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
    margin: 40px 0;
}
.post-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 22px 0;
    font-size: 14.5px;
}
.post-content th,
.post-content td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}
.post-content th { background: var(--bg-2); font-weight: 600; }

.post-tags {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}
.post-tags a {
    display: inline-block;
    background: var(--bg-2);
    padding: 5px 13px;
    margin: 0 6px 6px 0;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 12.5px;
    transition: all .15s;
}
.post-tags a:hover {
    background: var(--brand);
    color: #fff;
}

/* ========== Comments ========== */
.comments {
    background: var(--surface);
    padding: 36px 60px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.comments h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    margin-bottom: 24px;
    font-size: 20px;
    color: var(--text);
}
.comment {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}
.comment:last-of-type { border-bottom: none; }
.comment-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.comment-meta strong {
    color: var(--text);
    font-weight: 600;
}
.comment-body {
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.75;
}

.comment-form {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}
.comment-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-size: 14px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    transition: all .15s;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}
.comment-form textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.7;
}
.comment-form button {
    margin-top: 14px;
    padding: 11px 28px;
    background: linear-gradient(135deg, #0f766e, #134e4a);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all .2s;
    box-shadow: 0 4px 12px rgba(15, 118, 110, .25);
}
.comment-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 118, 110, .35);
}
.form-error,
.form-success {
    padding: 11px 14px;
    margin-bottom: 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.form-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}
.form-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 3px solid #10b981;
}

/* ========== Sidebar ========== */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}
.sidebar h3 {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--brand), var(--brand-hover));
    border-radius: 2px;
}
.sidebar ul { list-style: none; }
.sidebar li {
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--border);
}
.sidebar li:last-child { border-bottom: none; }
.sidebar li a {
    color: var(--text-body);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.sidebar li a:hover { color: var(--brand); }
.sidebar .empty { color: var(--text-soft); padding: 4px 0; border: none; font-size: 13px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a {
    display: inline-block;
    background: var(--bg-2);
    padding: 5px 12px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 12.5px;
    transition: all .15s;
    border: 1px solid transparent;
}
.tag-cloud a:hover {
    background: var(--brand);
    color: #fff;
    transform: translateY(-1px);
}

/* ========== Pagination ========== */
.pagination {
    margin-top: 36px;
    text-align: center;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 9px 15px;
    margin: 0 3px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all .15s;
}
.pagination a:hover {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: var(--brand);
}
.pagination .current {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* ========== Archive ========== */
.archive-title {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
    letter-spacing: -.3px;
}
.archive-year {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--brand);
    margin: 30px 0 12px;
}
.archive-list {
    list-style: none;
    padding-left: 16px;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 8px 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.archive-list li {
    padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px dashed var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
}
.archive-list li:last-child { border-bottom: none; }
.archive-list li a { color: var(--text); }
.archive-list li a:hover { color: var(--brand); }
.archive-date {
    color: var(--text-muted);
    font-size: 13px;
    font-family: var(--font-mono);
    flex-shrink: 0;
    min-width: 45px;
}

/* ========== Footer ========== */
.site-footer {
    margin-top: 70px;
    padding: 40px 0 30px;
    text-align: center;
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

.empty {
    color: var(--text-muted);
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
}

/* ========== Private lock screen ========== */
.private-lock {
    max-width: 440px;
    margin: 40px auto;
    background: var(--surface);
    padding: 50px 44px 44px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    text-align: center;
    animation: lockFadeIn .4s ease-out;
}
@keyframes lockFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.lock-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f766e, #134e4a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, .3);
}
.lock-icon svg { width: 30px; height: 30px; }
.private-lock h2 {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -.3px;
}
.lock-hint {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 26px;
}
.lock-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.lock-form input {
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    transition: all .15s;
    text-align: center;
    letter-spacing: 2px;
}
.lock-form input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}
.lock-form button {
    padding: 13px;
    background: linear-gradient(135deg, #0f766e, #134e4a);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(15, 118, 110, .25);
    transition: all .2s;
}
.lock-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 118, 110, .35);
}
.private-lock .form-error {
    margin-bottom: 14px;
    text-align: left;
}
@media (max-width: 640px) {
    .private-lock { padding: 40px 28px 34px; margin: 20px auto; }
    .private-lock h2 { font-size: 22px; }
}

/* ========== Private space (unlocked) ========== */
.private-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 34px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.private-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    letter-spacing: -.3px;
}
.private-sub {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}
.btn-lock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    transition: all .15s;
}
.btn-lock:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.private-section {
    margin-bottom: 36px;
}
.private-section-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.note-card {
    display: block;
    background: var(--surface);
    padding: 20px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all .2s;
    color: var(--text);
}
.note-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand);
    color: var(--text);
}
.note-card-title {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.note-card-excerpt {
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.65;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 60px;
}
.note-card-meta {
    font-size: 12px;
    color: var(--text-soft);
    font-family: var(--font-mono);
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all .2s;
    color: var(--text);
}
.file-item:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
    color: var(--text);
    transform: translateX(3px);
}
.file-ico {
    font-size: 26px;
    flex-shrink: 0;
    line-height: 1;
}
.file-info {
    flex: 1;
    min-width: 0;
}
.file-name {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-desc {
    font-size: 13px;
    color: var(--text-body);
    margin-top: 4px;
    line-height: 1.55;
    white-space: normal;
}
.file-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}
.file-dl {
    color: var(--text-muted);
    font-size: 20px;
    padding: 0 6px;
    transition: all .15s;
}
.file-item:hover .file-dl {
    color: var(--brand);
    transform: translateY(2px);
}

.private-note-detail {
    background: var(--surface);
    padding: 48px 56px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.private-note-detail .back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-2);
    transition: all .15s;
}
.private-note-detail .back-link:hover {
    background: var(--brand-soft);
    color: var(--brand);
}
.private-note-detail .post-title {
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--text);
    letter-spacing: -.4px;
}
.private-note-detail .post-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.private-note-detail .post-content {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.95;
    color: var(--text-body);
}

@media (max-width: 640px) {
    .private-header { padding: 22px; }
    .private-title { font-size: 20px; }
    .private-section-title { font-size: 18px; }
    .note-grid { grid-template-columns: 1fr; }
    .private-note-detail { padding: 28px 22px; }
    .private-note-detail .post-title { font-size: 24px; }
}

/* ========== Responsive ========== */
@media (max-width: 960px) {
    .main-wrap {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 32px 20px;
    }
    .site-header { padding: 42px 0 30px; }
    .site-title a { font-size: 28px; }
    .single-post article { padding: 40px 36px; }
    .comments { padding: 32px 36px; }
}

@media (max-width: 640px) {
    body { font-size: 15.5px; }
    .site-header { padding: 34px 0 24px; }
    .site-title a { font-size: 24px; }
    .site-description { font-size: 13.5px; }
    .site-nav { margin-top: 20px; gap: 4px; }
    .site-nav a { padding: 6px 13px; font-size: 14px; }
    .search-form-inline { margin: 6px 0 0; width: 100%; max-width: 280px; justify-content: center; }
    .search-form-inline input { width: 100%; }
    .search-form-inline:focus-within input { width: 100%; }
    .search-form-big { flex-direction: column; padding: 12px; }
    .search-form-big button { width: 100%; justify-content: center; }

    .main-wrap { padding: 24px 16px; gap: 24px; }

    .post-item { padding: 24px 22px; }
    .post-item .post-title { font-size: 21px; }
    .post-excerpt { font-size: 14.5px; }

    .single-post article { padding: 28px 22px; }
    .single-post .post-title { font-size: 25px; }
    .post-content { font-size: 15.5px; }
    .post-content h1 { font-size: 23px; }
    .post-content h2 { font-size: 20px; }
    .post-content h3 { font-size: 18px; }
    .post-content pre { padding: 16px; font-size: 12.5px; }

    .comments { padding: 24px 22px; }
    .comment-form .row { grid-template-columns: 1fr; }

    .sidebar .widget { padding: 18px 20px; }

    .pagination a,
    .pagination span { padding: 7px 11px; font-size: 13px; margin: 0 2px; }

    .archive-title { font-size: 22px; }
    .archive-year { font-size: 19px; }
}

@media (max-width: 400px) {
    .site-title a { font-size: 22px; }
    .post-item { padding: 20px 18px; }
    .single-post article { padding: 24px 18px; }
    .comments { padding: 22px 18px; }
}

/* === 代码块复制按钮（评论解锁） === */
.code-block-wrap {
    position: relative;
    margin: 16px 0;
}
.code-block-wrap pre {
    margin: 0;
    padding-top: 38px;
}
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 1px solid var(--border, #d1d5db);
    background: #fff;
    color: #374151;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    line-height: 1.4;
}
.code-copy-btn:hover {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
}
.code-copy-btn.locked {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}
.code-copy-btn.locked:hover {
    background: #fef3c7;
    color: #b45309;
    border-color: #fcd34d;
}
.code-copy-btn.flash {
    background: #fef3c7;
    color: #b45309;
    border-color: #fcd34d;
}
