:root {
    color-scheme: light;
    --hue: 250;
    --primary: hsl(var(--hue) 72% 67%);
    --primary-strong: hsl(var(--hue) 70% 58%);
    --primary-soft: hsl(var(--hue) 78% 94%);
    --page-bg: hsl(var(--hue) 34% 96%);
    --card-bg: rgba(255, 255, 255, .96);
    --card-solid: #fff;
    --float-bg: rgba(255, 255, 255, .92);
    --text: hsl(var(--hue) 15% 18%);
    --text-75: hsl(var(--hue) 8% 34%);
    --text-50: hsl(var(--hue) 7% 50%);
    --text-30: hsl(var(--hue) 5% 64%);
    --line: hsl(var(--hue) 18% 89%);
    --line-dashed: hsl(var(--hue) 16% 86%);
    --button-bg: hsl(var(--hue) 55% 95%);
    --button-hover: hsl(var(--hue) 60% 90%);
    --code-bg: hsl(var(--hue) 22% 15%);
    --shadow: 0 10px 28px rgba(36, 27, 70, .055);
    --shadow-hover: 0 18px 42px rgba(36, 27, 70, .10);
    --radius: 16px;
    --radius-sm: 11px;
    --page-width: 1180px;
    --header-height: 72px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --primary: hsl(var(--hue) 75% 74%);
    --primary-strong: hsl(var(--hue) 76% 68%);
    --primary-soft: hsl(var(--hue) 28% 27%);
    --page-bg: hsl(var(--hue) 18% 12%);
    --card-bg: rgba(38, 34, 48, .96);
    --card-solid: hsl(var(--hue) 17% 17%);
    --float-bg: rgba(31, 28, 40, .95);
    --text: hsl(var(--hue) 18% 92%);
    --text-75: hsl(var(--hue) 10% 75%);
    --text-50: hsl(var(--hue) 7% 60%);
    --text-30: hsl(var(--hue) 5% 47%);
    --line: hsl(var(--hue) 12% 25%);
    --line-dashed: hsl(var(--hue) 13% 29%);
    --button-bg: hsl(var(--hue) 22% 24%);
    --button-hover: hsl(var(--hue) 25% 30%);
    --code-bg: hsl(var(--hue) 17% 9%);
    --shadow: 0 10px 30px rgba(0, 0, 0, .16);
    --shadow-hover: 0 18px 46px rgba(0, 0, 0, .25);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    background: var(--page-bg);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 4%, hsl(var(--hue) 80% 91% / .55), transparent 24rem),
        radial-gradient(circle at 88% 18%, hsl(calc(var(--hue) + 52) 72% 91% / .38), transparent 28rem),
        var(--page-bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    transition: background-color .3s ease, color .3s ease;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 14% 2%, hsl(var(--hue) 38% 21% / .42), transparent 28rem),
        radial-gradient(circle at 88% 20%, hsl(calc(var(--hue) + 55) 32% 18% / .28), transparent 28rem),
        var(--page-bg);
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea, select {
    color: inherit;
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

svg {
    display: block;
}

::selection {
    background: hsl(var(--hue) 75% 83% / .65);
}

.skip-link {
    position: fixed;
    z-index: 9999;
    top: 10px;
    left: 10px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--card-solid);
    color: var(--primary-strong);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: none;
}

.card-base, .side-card {
    border: 1px solid hsl(var(--hue) 30% 50% / .055);
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .25s ease;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.primary-button {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 18px hsl(var(--hue) 65% 50% / .18);
}

.primary-button:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
}

.ghost-button {
    background: var(--button-bg);
    color: var(--text-75);
}

.ghost-button:hover {
    background: var(--button-hover);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--text-75);
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.icon-button:hover {
    background: var(--button-bg);
    color: var(--primary-strong);
}

.icon-button:active {
    transform: scale(.92);
}

.icon-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Header */
.site-header {
    position: relative;
    z-index: 100;
    width: min(var(--page-width), calc(100% - 32px));
    margin: 0 auto;
}

.nav-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    min-height: var(--header-height);
    padding: 8px 14px;
    border: 1px solid hsl(var(--hue) 22% 50% / .06);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.brand-button {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 11px;
    color: var(--primary-strong);
    font-weight: 800;
    letter-spacing: .01em;
    transition: background .2s ease, transform .2s ease;
}

.brand-button:hover {
    background: var(--button-bg);
}

.brand-button:active {
    transform: scale(.97);
}

.brand-button svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.desktop-nav {
    justify-self: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    color: var(--text-75);
    font-size: 15px;
    font-weight: 700;
    transition: color .2s ease, background .2s ease;
}

.nav-item > a:hover,
.nav-item > a[aria-current="page"] {
    background: var(--button-bg);
    color: var(--primary-strong);
}

.has-children > a::after {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    content: "";
    transform: rotate(45deg);
}

.nav-submenu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 7px);
    left: 50%;
    min-width: 150px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--float-bg);
    box-shadow: 0 16px 36px rgba(26, 20, 46, .14);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -5px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    backdrop-filter: blur(18px);
}

.has-children:hover .nav-submenu,
.has-children:focus-within .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-submenu a {
    display: block;
    padding: 8px 11px;
    border-radius: 8px;
    color: var(--text-75);
    font-size: 14px;
    white-space: nowrap;
}

.nav-submenu a:hover {
    background: var(--button-bg);
    color: var(--primary-strong);
}

.nav-actions {
    display: flex;
    justify-self: end;
    gap: 2px;
}

.theme-button .sun-icon,
html[data-theme="dark"] .theme-button .moon-icon {
    display: none;
}

html[data-theme="dark"] .theme-button .sun-icon {
    display: block;
}

.menu-button {
    display: none;
}

.palette-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 9px);
    right: 54px;
    width: 210px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--float-bg);
    box-shadow: 0 16px 36px rgba(25, 18, 48, .14);
    backdrop-filter: blur(18px);
}

.palette-panel[hidden],
.theme-mode-panel[hidden] {
    display: none;
}

.settings-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-75);
    font-size: 13px;
    font-weight: 700;
}

.settings-title button {
    border: 0;
    border-radius: 7px;
    background: var(--button-bg);
    color: var(--text-50);
    cursor: pointer;
}

.palette-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

#palette-slider {
    width: 100%;
    height: 22px;
    accent-color: var(--primary);
}

#palette-value {
    min-width: 34px;
    padding: 2px 5px;
    border-radius: 6px;
    background: var(--button-bg);
    color: var(--text-75);
    font-size: 12px;
    text-align: center;
}

.theme-mode-panel {
    position: absolute;
    z-index: 31;
    top: calc(100% + 9px);
    right: 8px;
    display: grid;
    gap: 4px;
    width: 150px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--float-bg);
    box-shadow: 0 16px 36px rgba(25, 18, 48, .14);
    backdrop-filter: blur(18px);
}

.theme-mode-panel > button {
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-75);
    text-align: left;
}

.theme-mode-panel > button:hover {
    background: var(--button-bg);
    color: var(--primary-strong);
}

.palette-panel > span {
    display: block;
    margin-bottom: 10px;
    color: var(--text-50);
    font-size: 13px;
    font-weight: 700;
}

.palette-colors {
    display: flex;
    justify-content: space-between;
    gap: 7px;
}

.palette-colors button {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 3px solid var(--card-solid);
    border-radius: 50%;
    outline: 1px solid var(--line);
    background: hsl(var(--swatch-hue) 72% 67%);
    transition: transform .2s ease;
}

.palette-colors button:hover,
.palette-colors button.is-active {
    transform: scale(1.2);
}

.mobile-nav {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--float-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.mobile-nav[hidden] {
    display: none;
}

.mobile-nav-list {
    flex-direction: column;
    align-items: stretch;
}

.mobile-nav-list .nav-item > a {
    justify-content: space-between;
}

.mobile-nav-list .nav-submenu {
    position: static;
    display: block;
    min-width: 0;
    margin: 0 0 4px 16px;
    padding: 2px 6px;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Archive timeline */
.archive-heading p {
    margin: 6px 0 0;
    color: var(--text-50);
}

.archive-timeline {
    display: grid;
    gap: 22px;
}

.archive-year {
    padding: 22px 24px;
    border: 1px solid hsl(var(--hue) 30% 50% / .055);
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.archive-year > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line-dashed);
}

.archive-year h2 {
    margin: 0;
    color: var(--primary-strong);
    font-size: 1.7rem;
}

.archive-year > header span {
    color: var(--text-50);
    font-size: .85rem;
}

.archive-year ol {
    position: relative;
    display: grid;
    gap: 0;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.archive-year ol::before {
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 76px;
    width: 1px;
    background: var(--line-dashed);
    content: "";
}

.archive-year li {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 25px;
    align-items: start;
    padding: 9px 0;
}

.archive-year li::before {
    position: absolute;
    top: 17px;
    left: 72px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--card-solid);
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
    content: "";
    transform: translateX(-50%);
}

.archive-year time {
    color: var(--text-50);
    font-variant-numeric: tabular-nums;
    font-size: .85rem;
    line-height: 1.9;
    text-align: right;
}

.archive-year li > div {
    min-width: 0;
    padding-left: 4px;
}

.archive-year li a {
    color: var(--text-75);
    font-weight: 650;
    transition: color .2s ease;
}

.archive-year li a:hover {
    color: var(--primary-strong);
}

.archive-tags {
    display: block;
    margin-top: 3px;
    color: var(--text-50);
    font-size: .76rem;
}

.archive-tags a {
    margin-right: 8px;
    color: var(--text-50);
    font-weight: 500;
}

.archive-tags a:hover {
    color: var(--primary);
}

.search-results {
    display: grid;
    gap: 5px;
    max-height: 46vh;
    margin-top: 10px;
    overflow-y: auto;
}

.search-result {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border-radius: 9px;
    background: var(--button-bg);
    transition: background .2s ease, transform .2s ease;
}

.search-result:hover {
    background: var(--button-hover);
    transform: translateY(-1px);
}

.search-result strong {
    overflow: hidden;
    color: var(--text-75);
    font-size: .92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result span,
.search-loading,
.search-empty {
    color: var(--text-50);
    font-size: .78rem;
}

.search-result span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Search */
.search-layer {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: start center;
    padding: min(18vh, 170px) 20px 20px;
}

.search-layer[hidden] {
    display: none;
}

.search-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(18, 14, 28, .52);
    backdrop-filter: blur(8px);
}

.search-card {
    position: relative;
    width: min(620px, 100%);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--float-bg);
    box-shadow: 0 28px 70px rgba(12, 8, 24, .28);
    animation: search-in .22s ease both;
    backdrop-filter: blur(22px);
}

@keyframes search-in {
    from { opacity: 0; transform: translateY(-12px) scale(.98); }
}

.search-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.search-head h2 {
    margin: 0;
    font-size: 22px;
}

.search-head .icon-button {
    font-size: 26px;
}

.search-form {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 7px 7px 7px 14px;
    border: 2px solid var(--line);
    border-radius: 13px;
    background: var(--card-solid);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.search-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px hsl(var(--hue) 70% 65% / .12);
}

.search-form svg {
    width: 21px;
    fill: none;
    stroke: var(--text-30);
    stroke-width: 1.8;
    stroke-linecap: round;
}

.search-form input {
    min-width: 0;
    padding: 9px 0;
    border: 0;
    outline: 0;
    background: transparent;
}

.search-form button {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.search-card > p {
    margin: 10px 2px 0;
    color: var(--text-30);
    font-size: 13px;
}

/* Hero */
.hero-banner {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    width: min(var(--page-width), calc(100% - 32px));
    min-height: 260px;
    margin: 18px auto 26px;
    overflow: hidden;
    border-radius: 20px;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.65), transparent 18rem),
        linear-gradient(120deg, hsl(var(--hue) 77% 85%), hsl(calc(var(--hue) + 55) 75% 84%) 52%, hsl(calc(var(--hue) - 35) 75% 84%));
    box-shadow: var(--shadow);
}

.hero-banner::before,
.hero-banner::after {
    position: absolute;
    z-index: -2;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    content: "";
}

.hero-banner::before {
    top: -85px;
    right: 8%;
    width: 260px;
    height: 260px;
    box-shadow: 0 0 0 42px rgba(255,255,255,.10), 0 0 0 86px rgba(255,255,255,.07);
}

.hero-banner::after {
    bottom: -110px;
    left: 36%;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,.08);
}

.hero-banner.has-image {
    background: hsl(var(--hue) 20% 20%);
}

.hero-image {
    position: absolute;
    z-index: -3;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, rgba(26, 20, 43, .46), rgba(26, 20, 43, .04) 72%);
}

.hero-banner:not(.has-image) .hero-overlay {
    background: linear-gradient(90deg, hsl(var(--hue) 42% 30% / .25), transparent 65%);
}

.hero-content {
    width: min(720px, 86%);
    padding: 34px 42px;
    color: #fff;
    text-shadow: 0 2px 16px rgba(24, 18, 42, .22);
}

.hero-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    opacity: .8;
}

.hero-content h1 {
    margin: 7px 0 3px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.18;
}

.hero-content p {
    margin: 0;
    font-size: 16px;
    opacity: .88;
}

/* Main layout and post cards */
.page-shell {
    width: min(var(--page-width), calc(100% - 32px));
    margin: 26px auto 60px;
}

.site-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: start;
    gap: 22px;
}

.content-column {
    min-width: 0;
}

.list-context {
    margin-bottom: 16px;
    padding: 22px 28px;
}

.list-context span,
.page-kicker {
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
}

.list-context h1 {
    margin: 3px 0 0;
    font-size: 28px;
    line-height: 1.3;
}

.post-list {
    border-radius: var(--radius);
}

.post-card {
    position: relative;
    display: flex;
    min-height: 210px;
    margin-bottom: 16px;
    overflow: hidden;
    animation: card-enter .45s ease both;
}

.post-card:nth-child(2) { animation-delay: .05s; }
.post-card:nth-child(3) { animation-delay: .10s; }
.post-card:nth-child(4) { animation-delay: .15s; }

@keyframes card-enter {
    from { opacity: 0; transform: translateY(12px); }
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.post-card-content {
    min-width: 0;
    flex: 1;
    padding: 26px 72px 23px 30px;
}

.post-card.has-cover .post-card-content {
    padding-right: 24px;
}

.post-title-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.title-accent {
    position: absolute;
    top: 7px;
    left: -13px;
    width: 4px;
    height: 23px;
    border-radius: 4px;
    background: var(--primary);
}

.post-title-row h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 29px);
    line-height: 1.35;
    letter-spacing: -.015em;
}

.post-title-row h2 a {
    transition: color .2s ease;
}

.post-title-row h2 a:hover {
    color: var(--primary-strong);
}

.top-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 22px;
    margin-top: 7px;
    padding: 0 8px;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-size: 11px;
    font-weight: 800;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 14px;
    margin-top: 9px;
    color: var(--text-50);
    font-size: 13px;
}

.post-meta > span,
.post-meta > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-meta svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.meta-link:hover,
.meta-tag:hover {
    color: var(--primary-strong);
}

.meta-tags {
    gap: 6px !important;
}

.meta-tag + .meta-tag::before {
    margin-right: 5px;
    color: var(--text-30);
    content: "/";
}

.post-excerpt {
    display: -webkit-box;
    margin: 16px 0 11px;
    overflow: hidden;
    color: var(--text-75);
    font-size: 15px;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.post-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-30);
    font-size: 12px;
}

.meta-divider {
    opacity: .65;
}

.post-cover {
    position: relative;
    flex: 0 0 29%;
    margin: 12px;
    overflow: hidden;
    border-radius: 13px;
    background: var(--button-bg);
}

.post-cover::after {
    position: absolute;
    inset: 0;
    background: rgba(18, 13, 30, 0);
    content: "";
    transition: background .25s ease;
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.post-cover:hover img {
    transform: scale(1.045);
}

.post-cover:hover::after {
    background: rgba(18, 13, 30, .22);
}

.cover-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    color: #fff;
    font-size: 50px;
    line-height: 1;
    opacity: 0;
    transform: translate(-58%, -50%) scale(.7);
    transition: opacity .25s ease, transform .25s ease;
}

.post-cover:hover .cover-arrow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.post-enter {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 48px;
    place-items: center;
    border-radius: 12px;
    background: var(--button-bg);
    color: var(--primary-strong);
    font-size: 38px;
    line-height: 1;
    transition: background .2s ease, transform .2s ease;
}

.post-enter:hover {
    background: var(--button-hover);
}

.post-enter:active {
    transform: scale(.95);
}

.empty-state {
    padding: 60px 30px;
    text-align: center;
}

.empty-state > span {
    color: var(--primary);
    font-size: 40px;
}

.empty-state h2 {
    margin: 6px 0 0;
}

.empty-state p {
    margin: 4px 0 0;
    color: var(--text-50);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 24px;
}

.pagination a,
.pagination span,
.pagination em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 10px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    color: var(--text-75);
    font-size: 14px;
    font-weight: 700;
}

.pagination a:hover,
.pagination span {
    background: var(--primary);
    color: #fff;
}

.pagination em {
    background: transparent;
    box-shadow: none;
    color: var(--text-30);
    font-style: normal;
}

/* Sidebar */
.sidebar {
    min-width: 0;
}

.sidebar-sticky {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
}

.side-card {
    padding: 15px;
}

.profile-card {
    text-align: center;
}

.profile-avatar {
    position: relative;
    display: block;
    aspect-ratio: 1.1 / 1;
    overflow: hidden;
    border-radius: 13px;
    background: var(--button-bg);
}

.profile-avatar::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 55%, hsl(var(--hue) 70% 40% / .16));
    content: "";
    transition: background .25s ease;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.profile-avatar:hover img {
    transform: scale(1.04);
}

.profile-card h2 {
    margin: 13px 0 4px;
    font-size: 20px;
    line-height: 1.35;
}

.profile-accent {
    display: block;
    width: 24px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 10px;
    background: var(--primary);
}

.profile-card p {
    margin: 0 4px 12px;
    color: var(--text-50);
    font-size: 13px;
    line-height: 1.65;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
}

.social-links a {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 10px;
    background: var(--button-bg);
    color: var(--text-75);
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.social-links a:hover {
    background: var(--button-hover);
    color: var(--primary-strong);
    transform: translateY(-2px);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.social-links svg.icon-fill {
    fill: currentColor;
    stroke: none;
}

.calendar-widget table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-50);
    font-size: 12px;
    text-align: center;
}

.calendar-widget td {
    height: 28px;
    padding: 1px;
}

.calendar-widget td a {
    display: grid;
    min-height: 26px;
    place-items: center;
    border-radius: 7px;
    color: var(--primary-strong);
    font-weight: 700;
}

.calendar-widget td a:hover {
    background: var(--button-bg);
}

.calendar-widget .calendartop td {
    color: var(--text-75);
    font-weight: 700;
}

.widget-loading {
    margin: 0;
    color: var(--text-30);
    font-size: 12px;
}

.twitter-widget-list li {
    display: grid;
    gap: 3px;
}

.twitter-widget-list small {
    color: var(--text-30);
}

.compact-card {
    padding: 18px;
}

.compact-card h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 16px;
}

.side-icon {
    color: var(--primary-strong);
    font-size: 13px;
}

.category-list,
.archive-card ul,
.plain-widget-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-list a,
.archive-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 8px;
    border-radius: 8px;
    color: var(--text-75);
    font-size: 13px;
    transition: color .2s ease, background .2s ease;
}

.category-list a:hover,
.archive-card a:hover {
    background: var(--button-bg);
    color: var(--primary-strong);
}

.category-list em,
.archive-card em {
    min-width: 25px;
    padding: 1px 6px;
    border-radius: 7px;
    background: var(--button-bg);
    color: var(--text-50);
    font-size: 11px;
    font-style: normal;
    text-align: center;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-cloud a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--button-bg);
    color: var(--text-75);
    font-size: 12px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.tag-cloud a:hover {
    background: var(--button-hover);
    color: var(--primary-strong);
    transform: translateY(-1px);
}

.tag-cloud small {
    color: var(--text-30);
    font-size: 10px;
}

.plain-widget-list li + li {
    border-top: 1px dashed var(--line-dashed);
}

.plain-widget-list a {
    display: block;
    padding: 8px 3px;
    color: var(--text-75);
    font-size: 13px;
}

.plain-widget-list a:hover {
    color: var(--primary-strong);
}

.widget-content {
    overflow-wrap: anywhere;
    color: var(--text-75);
    font-size: 13px;
}

/* Article */
.article-shell {
    display: grid;
    grid-template-areas: "article toc";
    grid-template-columns: minmax(0, 820px) 220px;
    align-items: start;
    justify-content: center;
    gap: 22px;
    width: min(1240px, calc(100% - 32px));
}

.article-shell:not(.has-toc) {
    grid-template-areas: "article";
    grid-template-columns: minmax(0, 860px);
}

.article-shell.has-sidebar.has-toc {
    grid-template-areas: "sidebar article toc";
    grid-template-columns: 230px minmax(0, 760px) 200px;
    width: min(1260px, calc(100% - 32px));
}

.article-shell.has-sidebar:not(.has-toc) {
    grid-template-areas: "sidebar article";
    grid-template-columns: 240px minmax(0, 840px);
}

.article-main {
    grid-area: article;
    min-width: 0;
}

.article-shell > .sidebar {
    grid-area: sidebar;
}

.article-card {
    overflow: hidden;
}

.article-header {
    padding: 42px 48px 24px;
    text-align: center;
}

.article-category {
    min-height: 20px;
    color: var(--primary-strong);
    font-size: 13px;
    font-weight: 700;
}

.article-header h1 {
    margin: 10px auto 13px;
    font-size: clamp(31px, 5vw, 46px);
    line-height: 1.25;
    letter-spacing: -.025em;
}

.article-header .top-badge {
    margin: 0 9px 0 0;
    vertical-align: middle;
}

.article-meta {
    justify-content: center;
    margin-top: 0;
}

.article-edit {
    padding: 1px 8px;
    border-radius: 6px;
    background: var(--button-bg);
    color: var(--primary-strong);
}

.article-cover {
    margin: 0 24px 30px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--button-bg);
}

.article-cover img {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.markdown-body {
    padding: 10px 50px 42px;
    color: var(--text-75);
    font-family: ui-serif, "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
    font-size: 16px;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

.markdown-body > :first-child {
    margin-top: 0 !important;
}

.markdown-body > :last-child {
    margin-bottom: 0 !important;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    position: relative;
    color: var(--text);
    font-family: Inter, ui-sans-serif, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.45;
    scroll-margin-top: 92px;
}

.markdown-body h1 { margin: 2.2em 0 .8em; font-size: 2em; }
.markdown-body h2 { margin: 2.1em 0 .75em; font-size: 1.65em; }
.markdown-body h3 { margin: 1.8em 0 .7em; font-size: 1.32em; }
.markdown-body h4 { margin: 1.6em 0 .6em; font-size: 1.13em; }

.markdown-body h2::before {
    position: absolute;
    top: .18em;
    left: -18px;
    width: 4px;
    height: 1.15em;
    border-radius: 4px;
    background: var(--primary);
    content: "";
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body table,
.markdown-body pre {
    margin-top: 1.15em;
    margin-bottom: 1.15em;
}

.markdown-body a {
    color: var(--primary-strong);
    text-decoration: underline;
    text-decoration-color: hsl(var(--hue) 70% 65% / .38);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.markdown-body a:hover {
    text-decoration-color: var(--primary-strong);
}

.markdown-body img {
    display: block;
    height: auto;
    margin: 1.7em auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(20, 14, 34, .10);
    cursor: zoom-in;
}

.markdown-body blockquote {
    margin-right: 0;
    margin-left: 0;
    padding: 15px 20px;
    border-left: 4px solid var(--primary);
    border-radius: 0 10px 10px 0;
    background: var(--button-bg);
    color: var(--text-75);
}

.markdown-body blockquote > :first-child { margin-top: 0; }
.markdown-body blockquote > :last-child { margin-bottom: 0; }

.markdown-body code {
    padding: .16em .4em;
    border-radius: 6px;
    background: var(--button-bg);
    color: var(--primary-strong);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .9em;
}

.markdown-body pre {
    position: relative;
    overflow: auto;
    padding: 20px;
    border-radius: 13px;
    background: var(--code-bg);
    color: #e9e6f1;
    line-height: 1.7;
    tab-size: 4;
}

.markdown-body pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 13px;
}

.code-copy {
    position: absolute;
    top: 9px;
    right: 9px;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 7px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.72);
    font-family: inherit;
    font-size: 11px;
    opacity: 0;
    transition: opacity .2s ease, background .2s ease;
}

.markdown-body pre:hover .code-copy,
.code-copy:focus {
    opacity: 1;
}

.code-copy:hover {
    background: rgba(255,255,255,.15);
}

.markdown-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-family: Inter, ui-sans-serif, "PingFang SC", sans-serif;
    font-size: 14px;
}

.markdown-body th,
.markdown-body td {
    min-width: 110px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    text-align: left;
}

.markdown-body th {
    background: var(--button-bg);
    color: var(--text);
}

.markdown-body hr {
    height: 1px;
    margin: 2.4em 0;
    border: 0;
    background: var(--line);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 48px 24px;
    padding-top: 22px;
    border-top: 1px dashed var(--line-dashed);
}

.tag-chip {
    padding: 6px 11px;
    border-radius: 9px;
    background: var(--button-bg);
    color: var(--text-75);
    font-size: 12px;
    transition: color .2s ease, background .2s ease;
}

.tag-chip:hover {
    background: var(--button-hover);
    color: var(--primary-strong);
}

.license-box {
    margin: 0 48px 42px;
    padding: 18px 20px;
    border-left: 4px solid var(--primary);
    border-radius: 0 11px 11px 0;
    background: var(--button-bg);
}

.license-box span {
    display: block;
    color: var(--text-50);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
}

.license-box strong {
    display: block;
    margin-top: 3px;
    color: var(--text);
}

.license-box p {
    margin: 4px 0 0;
    color: var(--text-50);
    font-size: 13px;
}

.toc-panel {
    position: sticky;
    top: 18px;
    grid-area: toc;
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 18px 16px;
    box-shadow: none;
}

.toc-panel[hidden] {
    display: none;
}

.toc-panel h2 {
    margin: 0 0 12px;
    font-size: 15px;
}

#article-toc > p {
    margin: 0;
    color: var(--text-30);
    font-size: 12px;
}

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

.toc-list li {
    position: relative;
}

.toc-list li.is-h3 a {
    padding-left: 18px;
    font-size: 12px;
}

.toc-list a {
    display: block;
    padding: 7px 8px;
    border-radius: 7px;
    color: var(--text-50);
    font-size: 13px;
    line-height: 1.45;
    transition: color .2s ease, background .2s ease;
}

.toc-list a:hover,
.toc-list a.active {
    background: var(--button-bg);
    color: var(--primary-strong);
}

.page-header {
    padding-bottom: 30px;
}

/* Neighbor posts and comments */
.neighbor-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.neighbor-nav a {
    display: flex;
    min-height: 90px;
    flex-direction: column;
    justify-content: center;
    padding: 17px 20px;
    border: 1px solid hsl(var(--hue) 30% 50% / .055);
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    transition: box-shadow .2s ease, transform .2s ease;
}

.neighbor-nav a:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.neighbor-nav small {
    color: var(--primary-strong);
    font-size: 11px;
    font-weight: 700;
}

.neighbor-nav strong {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.neighbor-next {
    text-align: right;
}

.comment-form-card,
.comments-list {
    margin-top: 18px;
    padding: 28px 32px;
    border: 1px solid hsl(var(--hue) 30% 50% / .055);
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.comment-form-card h2,
.comments-list > h2 {
    margin: 0 0 18px;
    font-size: 20px;
}

.comments-list > h2 span {
    color: var(--primary-strong);
    font-size: 14px;
}

#commentform textarea,
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
.password-card input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: 0;
    background: var(--card-solid);
    transition: border-color .2s ease, box-shadow .2s ease;
}

#commentform textarea {
    min-height: 140px;
    padding: 14px 16px;
    resize: vertical;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"] {
    min-height: 44px;
    padding: 0 13px;
}

#commentform textarea:focus,
#commentform input:focus,
.password-card input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px hsl(var(--hue) 70% 65% / .10);
}

.comment-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.comment-captcha {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.comment-captcha input {
    width: 130px !important;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.comment-captcha img {
    max-height: 42px;
    border-radius: 7px;
}

.comment-submit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.comment-submit-row p {
    margin: 0;
    color: var(--text-50);
}

.comment-submit-row p a {
    color: var(--primary-strong);
}

.comment-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 13px;
    padding: 18px 0;
    border-top: 1px dashed var(--line-dashed);
}

.comments-list > .comment-item:first-of-type {
    border-top: 0;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--button-bg);
}

.comment-body {
    min-width: 0;
}

.comment-body header {
    display: flex;
    align-items: center;
    gap: 9px;
}

.comment-body header strong {
    font-size: 14px;
}

.comment-body header a:hover {
    color: var(--primary-strong);
}

.comment-body header time {
    color: var(--text-30);
    font-size: 11px;
}

.comment-content {
    margin-top: 5px;
    color: var(--text-75);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.comment-content p {
    margin: .4em 0;
}

.comment-content img {
    max-height: 220px;
    border-radius: 8px;
}

.comment-reply {
    margin-top: 7px;
    padding: 3px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-50);
    font-size: 12px;
}

.comment-reply:hover {
    background: var(--button-bg);
    color: var(--primary-strong);
}

.comment-children {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid var(--line);
}

.comment-child {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 13px 0 8px;
}

.comment-child .comment-avatar {
    width: 34px;
    height: 34px;
}

.comment-child .comment-children {
    margin-left: -46px;
}

.comment-pagination {
    margin-top: 12px;
    text-align: center;
}

.comment-pagination a,
.comment-pagination span {
    display: inline-flex;
    min-width: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    margin: 2px;
    border-radius: 8px;
    background: var(--button-bg);
    font-size: 12px;
}

/* Footer and utilities */
.site-footer {
    padding: 10px 20px 34px;
    color: var(--text-50);
    text-align: center;
}

.footer-inner {
    width: min(760px, 100%);
    margin: 0 auto;
    font-size: 12px;
}

.footer-inner p {
    margin: 3px 0;
}

.footer-inner a:hover {
    color: var(--primary-strong);
}

.footer-custom {
    margin: 3px 0;
}

.theme-credit {
    opacity: .72;
}

.back-to-top {
    position: fixed;
    z-index: 90;
    right: max(18px, calc((100vw - var(--page-width)) / 2 - 58px));
    bottom: 22px;
    border: 1px solid var(--line);
    background: var(--float-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.back-to-top[hidden] {
    display: none;
}

.image-viewer {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 50px;
    background: rgba(10, 8, 16, .88);
    cursor: zoom-out;
    backdrop-filter: blur(10px);
}

.image-viewer[hidden] {
    display: none;
}

.image-viewer img {
    max-width: min(1400px, 96vw);
    max-height: 90vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 30px 90px rgba(0,0,0,.4);
    cursor: zoom-in;
    transition: transform .2s ease;
}

.image-viewer button {
    position: absolute;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
    cursor: pointer;
}

.image-viewer-close {
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    font-size: 27px;
}

.image-viewer-prev,
.image-viewer-next {
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    font-size: 36px;
    line-height: 1;
}

.image-viewer-prev { left: 24px; }
.image-viewer-next { right: 24px; }

.image-viewer-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.8);
    font-size: 13px;
}

.toc-list li.is-h4 a {
    padding-left: 28px;
    font-size: 11px;
}

/* 404 and password */
.special-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 22px;
}

.special-card {
    width: min(520px, 100%);
    padding: 48px 38px;
    text-align: center;
}

.special-code {
    display: block;
    color: var(--primary);
    font-size: clamp(72px, 18vw, 118px);
    font-weight: 900;
    letter-spacing: -.08em;
    line-height: 1;
    opacity: .22;
}

.special-card h1 {
    margin: 10px 0 7px;
    font-size: 28px;
}

.special-card p {
    margin: 0 0 24px;
    color: var(--text-50);
}

.lock-symbol {
    color: var(--primary);
    font-size: 52px;
}

.password-card {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.password-card h1,
.password-card > p,
.password-card .lock-symbol {
    text-align: center;
}

.password-card label {
    margin-bottom: 6px;
    color: var(--text-50);
    font-size: 13px;
    font-weight: 700;
}

.password-card input {
    min-height: 46px;
    padding: 0 14px;
    margin-bottom: 13px;
}

.password-card .text-link {
    margin-top: 14px;
    color: var(--text-50);
    font-size: 13px;
    text-align: center;
}

.password-card .text-link:hover {
    color: var(--primary-strong);
}

@media (max-width: 1100px) {
    .nav-card {
        grid-template-columns: 1fr auto;
    }

    .desktop-nav {
        display: none;
    }

    .menu-button {
        display: inline-flex;
    }

    .article-shell,
    .article-shell.has-sidebar.has-toc,
    .article-shell.has-sidebar:not(.has-toc) {
        grid-template-areas: "article";
        grid-template-columns: minmax(0, 860px);
    }

    .article-shell > .sidebar,
    .toc-panel {
        display: none;
    }
}

@media (max-width: 900px) {
    .site-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar-sticky {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-card {
        grid-row: span 2;
    }

    .profile-avatar {
        aspect-ratio: 1.45 / 1;
    }
}

@media (max-width: 680px) {
    :root {
        --radius: 14px;
    }

    .site-header,
    .hero-banner,
    .page-shell,
    .article-shell {
        width: min(100% - 20px, var(--page-width));
    }

    .nav-card {
        min-height: 64px;
        padding: 6px 8px 6px 10px;
    }

    .brand-button {
        max-width: calc(100vw - 186px);
        min-height: 46px;
        padding: 0 8px;
    }

    .brand-button span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-button svg {
        flex: 0 0 auto;
    }

    #palette-toggle {
        display: none;
    }

    .icon-button {
        width: 41px;
        height: 41px;
    }

    .hero-banner {
        min-height: 210px;
        margin: 12px auto 16px;
        border-radius: 16px;
    }

    .hero-content {
        width: 100%;
        padding: 25px 24px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .page-shell {
        margin-top: 16px;
        margin-bottom: 42px;
    }

    .post-card,
    .post-card.has-cover {
        flex-direction: column-reverse;
        min-height: 0;
    }

    .post-card-content,
    .post-card.has-cover .post-card-content {
        padding: 22px 21px 21px;
    }

    .title-accent {
        display: none;
    }

    .post-title-row h2 {
        padding-right: 8px;
        font-size: 23px;
    }

    .post-cover {
        flex: auto;
        width: auto;
        height: 190px;
        margin: 10px 10px 0;
    }

    .post-enter {
        position: static;
        display: none;
    }

    .post-excerpt {
        -webkit-line-clamp: 3;
    }

    .sidebar-sticky {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-card {
        grid-row: auto;
    }

    .profile-avatar {
        aspect-ratio: 1.6 / 1;
    }

    .article-header {
        padding: 31px 23px 21px;
    }

    .article-header h1 {
        font-size: 31px;
    }

    .article-cover {
        margin: 0 12px 20px;
    }

    .markdown-body {
        padding: 8px 24px 32px;
        font-size: 15.5px;
        line-height: 1.9;
    }

    .markdown-body h2::before {
        left: -12px;
        width: 3px;
    }

    .article-tags,
    .license-box {
        margin-right: 24px;
        margin-left: 24px;
    }

    .neighbor-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .neighbor-next {
        text-align: left;
    }

    .comment-form-card,
    .comments-list {
        padding: 23px 20px;
    }

    .comment-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .comment-item {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
    }

    .comment-avatar {
        width: 36px;
        height: 36px;
    }

    .comment-child .comment-children {
        margin-left: -43px;
    }

    .search-layer {
        padding-top: 80px;
    }

    .search-card {
        padding: 17px;
    }

    .search-form {
        grid-template-columns: 23px 1fr;
    }

    .search-form button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .image-viewer {
        padding: 44px 12px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media print {
    .site-header,
    .sidebar,
    .toc-panel,
    .site-footer,
    .back-to-top,
    .comment-form-card,
    .comments-list,
    .neighbor-nav {
        display: none !important;
    }

    body,
    .article-card {
        background: #fff !important;
        color: #111 !important;
        box-shadow: none !important;
    }

    .article-shell {
        display: block;
        width: 100%;
        margin: 0;
    }
}
