:root {
    color-scheme: light;
    --bg: #f8fafb;
    --fg: #303c49;
    --muted: #647282;
    --surface: #fff;
    --dialog-bg: #fff;
    --line: #e9eef1;
    --accent: #287b9b;
    --accent-soft: #eff8fa;
    --code-bg: #f5f8fa;
    --header-bg: rgba(255, 255, 255, .97);
    --radius: 12px;
    --wrap: 1400px;
    --shadow: 0 3px 16px rgba(40, 65, 80, .035);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #101925;
    --fg: #e1eaf6;
    --muted: #a6b5ca;
    --surface: rgba(25, 38, 56, .94);
    --dialog-bg: #192638;
    --line: rgba(146, 170, 202, .2);
    --accent: #8bbaff;
    --accent-soft: rgba(118, 171, 255, .12);
    --code-bg: #121e2d;
    --header-bg: rgba(17, 28, 43, .96);
    --shadow: 0 8px 28px rgba(0, 6, 18, .2);
}

body { position: relative; isolation: isolate; background: var(--bg); color: var(--fg); }
body::before { content: none; }
::selection { background: var(--accent); color: var(--bg); }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:where(a, button, input, textarea, select, summary):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.wrap, main.wrap { width: 100%; max-width: 1400px; padding-inline: 24px; }
main.wrap { padding-top: 26px; padding-bottom: 24px; }
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--line); }
.dusk-has-hero .site-header {
    position: fixed;
    right: 0;
    left: 0;
    background: rgba(255, 255, 255, .62);
    border-bottom-color: rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    backdrop-filter: blur(18px) saturate(1.35);
    transition: background-color .25s ease, border-color .25s ease;
}
[data-theme="dark"] .dusk-has-hero .site-header { background: rgba(16, 25, 37, .55); border-bottom-color: rgba(255, 255, 255, .08); }
.dusk-has-hero .site-header.is-solid { background: var(--header-bg); border-bottom-color: var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .dusk-has-hero .site-header { background: var(--header-bg); } }
.header-inner { min-height: 72px; gap: 20px; }
.brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 10px;
    font-family: inherit;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: 0;
}
.brand:hover { text-decoration: none; }
.brand-logo-wrap { display: block; min-width: 0; }
.brand .dusk-brand-logo { display: block; width: auto; height: 36px; max-width: min(190px, 40vw); object-fit: contain; }
.brand .dusk-logo-dark { display: none; }
[data-theme="dark"] .brand .dusk-logo-dark { display: block; }
[data-theme="dark"] .brand .dusk-logo-light.has-dark { display: none; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }
.site-nav { flex: 1; justify-content: center; flex-wrap: wrap; gap: 4px; overflow: visible; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.theme-toggle, .menu-toggle { min-width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); }
.theme-toggle { width: 44px; }
.menu-toggle { display: none; }
.header-search {
    display: flex;
    align-items: center;
    flex: 0 1 240px;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}
.search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.header-search input { width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--fg); font-size: 16px; }
.header-search input::placeholder { color: var(--muted); opacity: 1; }
.header-search button { flex: none; min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--accent); }
.header-search button:hover { background: var(--accent-soft); }
.site-nav .header-search { flex-basis: 220px; }

/* Three columns share a single, compact vertical rhythm. */
.blog-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; align-items: start; gap: 22px; }
.blog-left, .blog-right { display: grid; align-content: start; gap: 18px; min-width: 0; }
.blog-center { min-width: 0; }
.blog-panel, .post-card, main > .post, #comments {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.blog-panel { padding: 18px; overflow-wrap: anywhere; }
.panel-heading { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.panel-heading::before { content: ""; width: 3px; height: 15px; flex: none; border-radius: 3px; background: var(--accent); }
.profile-cover { height: 92px; margin: -18px -18px 0; overflow: hidden; background: #263b55; }
.profile-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: -32px auto 10px;
    border: 4px solid var(--bg);
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    font-size: 25px;
    font-weight: 700;
}
.profile-name { margin: 0 0 6px; text-align: center; font-size: 18px; font-weight: 650; }
.profile-description { margin: 0; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.8; }
.profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; }
.profile-stats > * + * { border-left: 1px solid var(--line); }
.profile-stats strong { display: block; color: var(--fg); font-size: 19px; font-variant-numeric: tabular-nums; }
.profile-stats small { display: block; color: var(--muted); font-size: 12px; }
.sidebar-list, .recent-list { margin: 0; padding: 0; list-style: none; }
.sidebar-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 8px; border-radius: 8px; font-size: 13px; }
.sidebar-list a span { min-width: 0; }
.sidebar-list a small { flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sidebar-list a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 12px; overflow-wrap: anywhere; }
.tag-cloud a:hover { text-decoration: underline; }
.tag-cloud--dynamic a {
    background: color-mix(in srgb, hsl(var(--tag-hue, 196) 72% 52%) 13%, var(--surface));
    color: hsl(var(--tag-hue, 196) 52% 34%);
    animation: dusk-tag-float 5.4s ease-in-out infinite;
    animation-delay: calc(var(--tag-step, 0) * -.7s);
}
.tag-cloud--dynamic a:nth-child(6n+1) { --tag-hue: 188; }
.tag-cloud--dynamic a:nth-child(6n+2) { --tag-hue: 28; }
.tag-cloud--dynamic a:nth-child(6n+3) { --tag-hue: 152; }
.tag-cloud--dynamic a:nth-child(6n+4) { --tag-hue: 262; }
.tag-cloud--dynamic a:nth-child(6n+5) { --tag-hue: 342; }
.tag-cloud--dynamic a:nth-child(6n+6) { --tag-hue: 214; }
[data-theme="dark"] .tag-cloud--dynamic a { color: hsl(var(--tag-hue, 196) 70% 76%); background: color-mix(in srgb, hsl(var(--tag-hue, 196) 68% 58%) 18%, var(--surface)); }
@keyframes dusk-tag-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.friends-sidebar { display: grid; gap: 4px; }
.friends-sidebar a { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 5px 7px; border-radius: 8px; color: var(--fg); font-size: 13px; }
.friends-sidebar a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.friends-sidebar img { flex: none; width: 28px; height: 28px; border-radius: 8px; object-fit: cover; background: var(--code-bg); }
.friends-avatar { position: relative; display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; overflow: hidden; }
.friends-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
.friends-initial { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 650; }
.friends-more { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--accent); font-size: 12px; }
.friends-more:hover { text-decoration: none; }
.friends-page { width: 100%; max-width: 980px; margin: 0 auto; }
.friends-page-card { padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.friends-intro { margin-bottom: 24px; }
.friends-intro > :first-child { margin-top: 0; }
.friends-intro > :last-child { margin-bottom: 0; }
.friends-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.friend-card { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.friend-card:hover { border-color: var(--accent); box-shadow: 0 8px 20px rgba(35, 76, 95, .08); text-decoration: none; transform: translateY(-2px); }
.friend-avatar { position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 52px; overflow: hidden; border-radius: 13px; background: var(--accent-soft); }
.friend-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.friend-initial { color: var(--accent); font-size: 22px; font-weight: 650; }
.friend-card-body { display: grid; gap: 4px; min-width: 0; }
.friend-card-body strong { color: var(--fg); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.friend-card-body span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--muted); font-size: 12px; line-height: 1.7; }
.friend-card-arrow { flex: none; margin-left: auto; color: var(--accent); font-size: 17px; }
.friends-empty { color: var(--muted); font-size: 14px; }
.friends-empty code { padding: 1px 5px; border-radius: 4px; background: var(--code-bg); }
@media (max-width: 599px) {
    .friends-page-card { padding: 22px 18px; }
    .friends-grid { grid-template-columns: minmax(0, 1fr); }
}
.recent-list li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.recent-list li a { display: flex; align-items: center; min-height: 44px; font-size: 13px; line-height: 1.65; }
.recent-list time { display: block; color: var(--muted); font-size: 12px; }
.notice-text { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.notice-text a { color: var(--accent); }

.home-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 25rem;
    overflow: hidden;
    background: #263b55;
    color: #fff;
    text-align: center;
    text-shadow: 0 .1875rem .3125rem #1c1f21;
}
.home-hero__picture { position: absolute; inset: 0; z-index: 0; display: block; }
.home-hero__image { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.home-hero__overlay { position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, .2); }
.home-hero__content { position: relative; z-index: 3; width: min(100% - 40px, 880px); padding-inline: 20px; }
.home-hero__title { margin: 0 0 .75rem; color: #fff; font-family: "Times New Roman", "Source Han Serif SC", "Noto Serif SC", serif; font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; line-height: 1.4; letter-spacing: .05em; }
.home-hero__subtitle { margin: 0; color: rgba(255, 255, 255, .9); font-size: clamp(.875rem, 1.5vw, 1rem); line-height: 1.9; letter-spacing: .05em; }
.home-hero__waves { position: absolute; right: 0; bottom: -5px; left: 0; z-index: 2; pointer-events: none; }
.home-hero__waves-svg { display: block; width: 100%; height: 5rem; }
.home-hero__parallax > use { animation: dusk-wave-move 25s cubic-bezier(.55, .5, .45, .5) infinite; }
.home-hero.is-paused .home-hero__parallax > use { animation-play-state: paused; }
.home-hero__parallax > use:first-child { fill: rgba(255, 255, 255, .7); animation-delay: -2s; animation-duration: 7s; }
.home-hero__parallax > use:nth-child(2) { fill: rgba(255, 255, 255, .5); animation-delay: -3s; animation-duration: 10s; }
.home-hero__parallax > use:nth-child(3) { fill: rgba(255, 255, 255, .3); animation-delay: -4s; animation-duration: 13s; }
.home-hero__parallax > use:nth-child(4) { fill: var(--bg); animation-delay: -5s; animation-duration: 20s; }
[data-theme="dark"] .home-hero__parallax > use:first-child { fill: rgba(15, 23, 42, .7); }
[data-theme="dark"] .home-hero__parallax > use:nth-child(2) { fill: rgba(15, 23, 42, .5); }
[data-theme="dark"] .home-hero__parallax > use:nth-child(3) { fill: rgba(15, 23, 42, .3); }
@keyframes dusk-wave-move { 0% { transform: translate3d(-90px, 0, 0); } 100% { transform: translate3d(85px, 0, 0); } }
.feed-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.feed-heading h2 { margin: 0; font-size: 19px; font-weight: 650; }
.feed-heading span { color: var(--muted); font-size: 12px; }
.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border: 0; }
.post-card, .post-card:has(.card-cover) { display: flex; flex-direction: column; gap: 0; align-items: stretch; padding: 0; overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease; }
.card-cover { display: block; order: 0; flex: none; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 0; background: var(--code-bg); overflow: hidden; }
.card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.card-body { display: flex; flex-direction: column; order: 1; flex: 1; min-width: 0; padding: 16px; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.card-title { margin: 0 0 8px; font-family: inherit; font-size: 16px; line-height: 1.65; letter-spacing: 0; overflow-wrap: anywhere; }
.card-title a { display: flex; align-items: center; min-height: 44px; }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-excerpt { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.85; -webkit-line-clamp: 2; }

main > .post, #comments { width: 100%; max-width: 900px; margin: 0 auto 24px; padding: 36px; }
.post-title { font-family: inherit; font-size: clamp(26px, 3vw, 36px); line-height: 1.5; letter-spacing: -.02em; overflow-wrap: anywhere; }
.post-content { color: var(--fg); overflow-wrap: anywhere; }
.post-content :is(h2, h3, h4) { font-family: inherit; scroll-margin-top: 120px; }
.post-content a { color: var(--accent); }
.post-content blockquote { padding: 12px 18px; border-left-color: var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-soft); }
.post-content :is(pre, table) { max-width: 100%; overflow-x: auto; }
.post-content :is(img, video, iframe) { max-width: 100%; border-radius: 8px; }
.post-toc { background: var(--code-bg); }
#comments { scroll-margin-top: 120px; }
#comments :is(input, textarea) { max-width: 100%; background: var(--code-bg); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; }
#comments :is(input, button, .submit) { min-height: 44px; }
#comments .comment-list .comment-list { padding-left: 20px; }
.archive-header { padding: 8px 0 24px; }
.archive-header h1 { font-family: inherit; font-size: 26px; }
.page-navigator { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-block: 28px; }
.page-navigator :is(a, span) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 8px; }
.page-navigator .current a { background: var(--accent); color: var(--bg); }
.site-footer { margin-top: 32px; padding-block: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .footer-rss, .footer-sep { display: none; }
.site-footer .footer-intro { flex: 1 0 100%; margin: 0; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
@media (min-width: 900px) {
    .site-footer .footer-rss { display: inline-flex; margin-right: 6px; color: var(--accent); }
    .footer-sep { display: inline; }
}

@media (hover: hover) and (pointer: fine) {
    .post-card:hover { border-color: var(--accent); box-shadow: 0 6px 22px rgba(35, 76, 95, .08); }
    .post-card:hover .card-cover img { transform: scale(1.025); }
}
@media (min-width: 900px) and (max-width: 1199px) {
    .blog-layout { grid-template-columns: 220px minmax(0, 1fr); }
    .blog-right { display: none; }
    .header-inner { gap: 12px; }
    .site-nav a { padding-inline: 8px; }
    .header-search { flex-basis: 190px; }
}
@media (max-width: 899px) {
    .blog-layout { grid-template-columns: minmax(0, 1fr); }
    .blog-left, .blog-right { display: none; }
    .header-inner { flex-wrap: wrap; gap: 10px; padding-block: 12px; }
    .brand { flex: 1; min-width: 0; white-space: normal; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; padding-inline: 12px; font-size: 13px; }
    .site-nav { display: none; order: 4; flex: 0 0 100%; justify-content: flex-start; padding-top: 10px; border-top: 1px solid var(--line); }
    .site-nav.is-open { display: flex; }
    .header-inner > .header-search { order: 3; flex: 0 0 100%; }
    .site-nav .header-search { flex: 0 0 100%; }
    main.wrap { padding-top: 20px; }
    .post-content :is(h2, h3, h4), #comments { scroll-margin-top: 180px; }
    .home-hero { height: 20rem; }
    .home-hero__waves-svg { height: 3rem; }
}
@media (max-width: 599px) {
    .wrap, main.wrap { padding-inline: 16px; }
    .header-inner { gap: 8px; }
    .brand { font-size: 17px; gap: 8px; }
    .brand small { font-size: 10px; }
    .menu-toggle { padding-inline: 10px; }
    .home-hero__title { font-size: 1.5rem; }
    .home-hero__subtitle { font-size: .8125rem; }
    .home-hero__content { width: min(100% - 32px, 720px); padding-inline: 16px; }
    .post-list { grid-template-columns: minmax(0, 1fr); }
    .card-body { padding: 16px 18px; }
    main > .post, #comments { padding: 22px 18px; }
    .post-content { font-size: 16px; }
    .post-content h2 { font-size: 23px; }
    .site-footer .wrap { display: block; text-align: center; }
    .site-footer p { margin-block: 6px; }
}
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: dusk-page-out .18s ease both; }
::view-transition-new(root) { animation: dusk-page-in .3s cubic-bezier(.2, .75, .25, 1) both; }
::view-transition-group(post-title) { animation-duration: .34s; }
.dusk-single .post-title { view-transition-name: post-title; }
@keyframes dusk-page-out { to { opacity: 0; } }
@keyframes dusk-page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@supports not (view-transition-name: none) {
    @media (prefers-reduced-motion: no-preference) {
        .dusk-single .post.dusk-reading { animation: dusk-reading-in .32s cubic-bezier(.2, .75, .25, 1) both; }
    }
}
@keyframes dusk-reading-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
    #main.dusk-page-in { animation: dusk-reading-in .3s cubic-bezier(.2, .75, .25, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Compact reading cards and native modal navigation. */
.header-inner { flex-wrap: nowrap; }
.brand { min-width: 0; }
.brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-nav { flex-wrap: nowrap; justify-content: flex-end; overflow-x: auto; }
.site-nav a { flex: none; }
.header-inner > button { flex: none; }
.search-toggle { margin-left: auto; }
.dialog-open { overflow: hidden; }
dialog { color: var(--fg); background: var(--dialog-bg); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 24px; }
dialog:not([open]) { display: none; }
dialog::backdrop { background: rgba(15, 26, 38, .4); }
dialog[open] { animation: dusk-dialog-in .24s cubic-bezier(.2, .75, .25, 1) both; }
dialog[open]::backdrop { animation: dusk-backdrop-in .24s ease both; }
.search-dialog[open] { animation-name: dusk-search-in; }
.mobile-drawer[open] { animation-name: dusk-drawer-in; }
dialog[open].is-closing { animation: dusk-dialog-out .18s ease both; }
.mobile-drawer[open].is-closing { animation-name: dusk-drawer-out; }
dialog[open].is-closing::backdrop { animation: dusk-backdrop-out .18s ease both; }
@keyframes dusk-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dusk-search-in { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes dusk-drawer-in { from { opacity: .4; transform: translateX(100%); } to { opacity: 1; transform: none; } }
@keyframes dusk-dialog-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes dusk-drawer-out { from { opacity: 1; transform: none; } to { opacity: .2; transform: translateX(100%); } }
@keyframes dusk-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dusk-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dialog-heading h2 { margin: 0; font-size: 18px; }
.dialog-heading button { min-height: 44px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; }
.search-dialog { width: min(600px, calc(100% - 24px)); margin: 13vh auto auto; padding: 0; border-radius: 18px; }
.search-dialog .search-panel { display: block; width: 100%; margin: 0; padding: 18px 22px 20px; border: 0; background: transparent; }
.search-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.search-title { color: var(--muted); font-size: 13px; font-weight: 600; }
.search-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.search-close:hover { color: var(--fg); background: var(--accent-soft); }
.mobile-drawer { position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw); height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 18px 0 0 18px; border-width: 0 0 0 1px; padding: max(20px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom)); overflow-y: auto; }
.mobile-drawer[open] { display: flex; flex-direction: column; }
.drawer-description { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
#drawer-navigation { display: grid; gap: 6px; }
#drawer-navigation a { display: flex; align-items: center; min-height: 48px; padding: 8px 12px; border-radius: 9px; }
#drawer-navigation a:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
#drawer-navigation a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.drawer-subscribe { display: block; margin-top: auto; padding: 24px 12px 0; color: var(--accent); font-size: 13px; }
.post-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.post-card, .post-card:has(.card-cover) { position: relative; isolation: isolate; flex-direction: row; align-items: stretch; min-height: 176px; border: 0; background: #253943; }
.post-card:nth-child(even) { flex-direction: row-reverse; }
.card-backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.card-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.42) saturate(.85); }
.card-cover { width: 34%; max-width: none; min-height: 176px; aspect-ratio: auto; align-self: stretch; position: relative; clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%); }
.post-card:nth-child(even) .card-cover { clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%); }
.card-cover img { position: absolute; inset: 0; }
.card-body { padding: 22px; justify-content: center; gap: 8px; color: #fff; background: rgba(12, 23, 32, .55); }
.card-meta { margin: 0; color: #edf2f5; font-size: 12px; }
.card-meta a:hover { color: #fff; }
.card-title { font-size: 19px; line-height: 1.5; margin: 0; text-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.card-title a:is(:link, :visited, :hover, :active) { color: #fff; text-decoration: none; border-bottom: 0; box-shadow: none; background-image: none; }
.card-title a { min-height: 0; }
.search-dialog .search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.search-input-row { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); transition: border-color .16s ease, box-shadow .16s ease; }
.search-input-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { flex: none; color: var(--muted); }
.search-input-row input { flex: 1; min-width: 0; height: 48px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 17px; }
.search-input-row input::-webkit-search-cancel-button { cursor: pointer; }
.search-submit { flex: none; min-height: 40px; margin: 4px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--accent); color: var(--bg); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.search-submit:hover { filter: brightness(1.06); }
.search-hint { display: flex; align-items: center; gap: 4px; margin: 10px 2px 0; color: var(--muted); font-size: 12px; }
.search-hint kbd { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); font: inherit; font-size: 11px; }
#drawer-navigation .dusk-menu-group > div { border: 0; padding: 4px 0 4px 12px; background: transparent; }
#drawer-navigation summary { min-height: 48px; padding: 12px; }
.site-nav:has(.dusk-menu-group) { overflow: visible; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
dialog button:focus-visible, dialog a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-excerpt { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 2; color: #edf2f5; line-height: 1.8; margin: 0; }
.pagination:empty { display: none; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-block: 24px; }
.pagination .page-navigator { display: flex; width: auto; flex: 0 1 auto; justify-content: center; gap: 5px; margin: 0; }
.pagination .page-navigator[hidden] { display: none; }
.pagination .page-navigator li { flex: 0 0 auto; }
.pagination .page-navigator li :is(a, span) { width: auto; min-width: 36px; min-height: 40px; padding: 4px 9px; }
.load-more { min-height: 44px; width: auto; padding: 6px 24px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); background: var(--surface); font: inherit; font-size: 13px; }
.load-more:disabled { cursor: default; opacity: .65; }
.pagination[data-pagination] > a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 24px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); background: var(--surface); font-size: 13px; }
.pagination[data-pagination] > a[hidden] { display: none; }
.pagination-status { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 12px; }
.page-navigator { list-style: none; padding: 0; }
.page-navigator li { margin: 0; }
.page-navigator li :is(a, span) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 13px; }
.page-navigator li.current a, .page-navigator li a:hover { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }
.page-navigator li.current a { font-weight: 650; }
#comments textarea { font-size: 16px; resize: vertical; }
#comments :is(input, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.comment-content :is(pre, blockquote) { padding: 12px; border-radius: 8px; background: var(--code-bg); overflow-x: auto; }
.comment-content :is(p, ul, ol) { margin-block: 10px; }
@media (max-width: 899px) {
    .header-inner { min-height: 64px; padding-block: 8px; gap: 8px; }
    .brand { flex: 1; }
    .header-inner .site-nav { display: none; }
    .header-inner .menu-toggle { display: inline-flex; min-width: 44px; padding: 0; }
    .header-inner .search-toggle { margin-left: 0; }
}
@media (max-width: 599px) {
    .search-dialog { margin-top: 10vh; }
    .search-dialog .search-panel { padding: 16px 16px 18px; }
    .search-hint { display: none; }
    .search-submit { padding: 0 14px; }
    .brand { font-size: 17px; }
    .post-card, .post-card:has(.card-cover) { min-height: 154px; }
    .card-cover { display: none; }
    .card-body { padding: 20px; gap: 8px; }
    .card-title { font-size: 17px; }
    .card-meta { font-size: 12px; }
    .card-excerpt { font-size: 13px; }
}
