* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --bg: #fbfbfb;
    --grid: rgba(15, 23, 42, .075);
    --card: rgba(255, 255, 255, .94);
    --text: #161d2b;
    --muted: #9ca3af;
    --line: #eceff3;
    --accent: #3fb950;
    --accent-soft: #ebfff2;
    --danger: #f04f4f;
    --shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111827;
    --grid: rgba(255, 255, 255, .07);
    --card: rgba(25, 34, 48, .94);
    --text: #f7fafc;
    --muted: #aab4c3;
    --line: rgba(255, 255, 255, .1);
    --accent: #5ee67b;
    --accent-soft: rgba(94, 230, 123, .12);
    --shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 40px 40px;
}

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

img,
video {
    max-width: 100%;
}

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

.boke-shell {
    width: min(1000px, calc(100% - 48px));
    margin-inline: auto;
}

.boke-nav {
    min-height: 72px;
    margin-top: 28px;
    margin-bottom: 28px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-links > a,
.nav-item > a,
.back-home {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 700;
}

.nav-links a.active,
.nav-links a:hover,
.nav-item:hover > a {
    color: #149231;
    background: var(--accent-soft);
}

.nav-item {
    position: relative;
}

.dropdown-menu,
.dropdown-submenu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 10px);
    left: 0;
    min-width: 180px;
    display: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.dropdown-submenu {
    top: 0;
    left: calc(100% + 8px);
}

.nav-item:hover > .dropdown-menu,
.nav-item:focus-within > .dropdown-menu,
.dropdown-menu a:hover + .dropdown-submenu,
.dropdown-submenu:hover {
    display: grid;
    gap: 4px;
}

.dropdown-menu a,
.dropdown-submenu a {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    color: var(--text);
    white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-submenu a:hover {
    color: #149231;
    background: var(--accent-soft);
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.theme-toggle:hover {
    background: var(--accent-soft);
}

.boke-main {
    display: grid;
    gap: 28px;
}

.boke-list-card,
.category-title-card,
.breadcrumb,
.detail-article,
.boke-tag-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.breadcrumb {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    color: #64748b;
}

.breadcrumb a {
    color: #22548a;
}

.breadcrumb em {
    margin-left: auto;
    color: #94a3b8;
    font-style: normal;
}

.category-title-card {
    padding: 22px 24px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-head h1,
.boke-tag-panel h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: 0;
}

.section-head span {
    color: #64748b;
}

.tag-badges,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-title-card .tag-badges {
    margin-top: 16px;
}

.tag-badges a,
.tag-cloud a,
.detail-action-tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .6);
    color: #64748b;
    font-size: 14px;
}

.tag-badges a:hover,
.tag-cloud a:hover,
.detail-action-tag:hover {
    color: #149231;
    border-color: rgba(63, 185, 80, .35);
    background: var(--accent-soft);
}

.boke-article-list {
    display: grid;
}

.boke-row {
    min-height: 92px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}

.boke-row:last-child {
    border-bottom: 0;
}

.boke-row-thumb {
    width: 52px;
    height: 52px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #101827;
    color: #fff;
    font-weight: 900;
}

.boke-row-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.boke-row-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.article-row-title {
    min-width: 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
}

.article-row-title:hover {
    color: #149231;
}

.article-row-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.boke-row-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

.boke-row-meta span::before {
    content: "♙ ";
}

.boke-row-meta time::before {
    content: "◷ ";
}

.boke-row-category {
    justify-self: end;
    min-width: 54px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #596579;
    text-align: center;
    white-space: nowrap;
}

.boke-row-category:hover {
    color: #149231;
    border-color: rgba(63, 185, 80, .45);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 34px 20px;
    border-top: 1px solid var(--line);
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, .55);
    font-weight: 800;
}

.pagination a.active,
.pagination a:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

.boke-tag-panel {
    padding: 24px;
}

.boke-tag-panel h2 {
    margin-bottom: 18px;
}

.empty {
    margin: 0;
    padding: 32px 24px;
    color: #64748b;
}

.primary-link {
    display: inline-flex;
    margin: 0 24px 24px;
    padding: 9px 16px;
    border-radius: 6px;
    color: #fff;
    background: #265f99;
    font-weight: 700;
}

.boke-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    padding: 24px;
}

.content-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}

.cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #eef2f7;
}

.cover-portrait {
    aspect-ratio: 3 / 4;
}

.cover-landscape {
    aspect-ratio: 16 / 9;
}

.cover-square {
    aspect-ratio: 1 / 1;
}

.cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .25s ease;
}

.content-card:hover .cover img {
    transform: scale(1.035);
}

.cover-empty {
    height: 100%;
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-weight: 800;
}

.card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.card-title {
    min-height: 48px;
    color: var(--text);
    font-weight: 800;
    line-height: 1.45;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.detail-article {
    padding: 38px;
}

.boke-detail-hero {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.boke-detail-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.3;
    letter-spacing: 0;
}

.detail-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--muted);
}

.detail-hero-meta a:hover {
    color: #149231;
}

.detail-summary {
    margin: 24px 0 0;
    padding: 16px 18px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: #46615a;
}

.article-body {
    margin-top: 28px;
    color: var(--text);
    font-size: 18px;
}

.article-body > *:first-child {
    margin-top: 0;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body table,
.article-body pre {
    margin: 0 0 20px;
}

.article-body h1,
.article-body h2,
.article-body h3 {
    margin: 34px 0 16px;
    line-height: 1.35;
    letter-spacing: 0;
}

.article-body a {
    color: #22a342;
    font-weight: 800;
}

.article-body img {
    display: block;
    margin: 28px auto;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.article-body blockquote {
    padding: 16px 20px;
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    color: #53616d;
}

.article-body :not(pre) > code {
    padding: 2px 6px;
    border-radius: 5px;
    background: #eef2f7;
    color: #b42318;
}

.article-body pre,
.article-body .md-code-block {
    overflow: auto;
    padding: 18px;
    border-radius: 8px;
    background: #111827;
    color: #f8fafc;
}

.article-body pre code {
    background: transparent;
    color: inherit;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
}

.article-body th,
.article-body td {
    padding: 10px 12px;
    border: 1px solid var(--line);
}

.article-body .md-alert,
.article-body .md-panel,
.article-body .md-collapse,
.article-body .md-download {
    margin: 20px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .65);
}

.article-body .md-alert-success {
    border-color: rgba(63, 185, 80, .45);
    background: var(--accent-soft);
}

.article-body .md-alert-warning {
    border-color: rgba(245, 158, 11, .45);
    background: rgba(245, 158, 11, .09);
}

.article-body .md-alert-danger {
    border-color: rgba(240, 79, 79, .45);
    background: rgba(240, 79, 79, .09);
}

.detail-main-cover {
    margin: 30px auto 0;
    overflow: hidden;
    border-radius: 8px;
    text-align: center;
}

.detail-main-cover img {
    max-height: 780px;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.detail-cover-landscape img,
.detail-cover-square img,
.detail-cover-portrait img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
}

.video-section {
    margin-top: 28px;
}

.video-player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-message {
    padding: 14px;
    color: #fff;
    background: #111827;
}

.video-playlist {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.video-playlist button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, .75);
    color: var(--text);
    cursor: pointer;
}

.video-playlist button.active,
.video-playlist button:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

.detail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #eef2f7;
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 4;
    display: block;
    object-fit: cover;
    transition: transform .25s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-item span {
    position: absolute;
    left: 8px;
    top: 8px;
    min-width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, .45);
    font-size: 12px;
    font-weight: 800;
}

.gallery-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.gallery-load-more {
    min-height: 42px;
    padding: 0 20px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: var(--accent);
    cursor: pointer;
    font-weight: 800;
}

.detail-extras {
    display: grid;
    gap: 20px;
    margin-top: 34px;
}

.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.detail-action-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-right: auto;
}

.detail-action-btn {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .65);
    color: #64748b;
    cursor: pointer;
}

.detail-statement {
    padding: 18px;
    border-radius: 8px;
    background: #fff8df;
    color: #685b2f;
}

.detail-statement p {
    margin: 0;
}

.detail-statement span {
    margin-left: 10px;
}

.post-neighbor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.post-neighbor a,
.empty-neighbor {
    min-height: 86px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 16px;
    border-radius: 8px;
    color: #fff;
    background:
        linear-gradient(rgba(0, 0, 0, .42), rgba(0, 0, 0, .42)),
        radial-gradient(circle at 30% 30%, #94a3b8, #475569);
}

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

.post-neighbor span {
    color: rgba(255, 255, 255, .86);
    font-size: 14px;
}

.post-neighbor strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
}

.detail-related-box {
    padding-top: 10px;
}

.detail-section-title h2 {
    margin: 0 0 18px;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
    font-size: 22px;
    letter-spacing: 0;
}

.related-title-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
}

.related-title-grid a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.related-title-grid a::before {
    content: "›";
    margin-right: 8px;
    color: var(--accent);
}

.related-title-grid a:hover {
    color: #149231;
}

.lightbox {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, .86);
}

.lightbox.open {
    display: grid;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox figure {
    margin: 0;
    display: grid;
    gap: 12px;
    justify-items: center;
}

.lightbox img {
    max-width: min(96vw, 1400px);
    max-height: 86vh;
    border-radius: 8px;
    object-fit: contain;
    transition: transform .18s ease;
    transform: translate3d(0, 0, 0);
}

.lightbox figcaption {
    color: #e5e7eb;
}

.lightbox-close,
.lightbox-nav {
    position: fixed;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    cursor: pointer;
}

.lightbox-close {
    top: 22px;
    right: 22px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
}

.lightbox-nav {
    top: 50%;
    width: 52px;
    height: 72px;
    border-radius: 8px;
    transform: translateY(-50%);
    font-size: 46px;
}

.lightbox-nav.prev {
    left: 24px;
}

.lightbox-nav.next {
    right: 24px;
}

.boke-footer {
    width: min(1000px, calc(100% - 48px));
    margin: 54px auto 60px;
    padding-top: 28px;
    border-top: 1px dashed var(--line);
    color: #7b8794;
    text-align: center;
}

html[data-theme="dark"] .content-card,
html[data-theme="dark"] .tag-badges a,
html[data-theme="dark"] .tag-cloud a,
html[data-theme="dark"] .detail-action-tag,
html[data-theme="dark"] .detail-action-btn,
html[data-theme="dark"] .video-playlist button,
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .pagination span,
html[data-theme="dark"] .article-body .md-alert,
html[data-theme="dark"] .article-body .md-panel,
html[data-theme="dark"] .article-body .md-collapse,
html[data-theme="dark"] .article-body .md-download {
    background: rgba(17, 24, 39, .64);
}

html[data-theme="dark"] .detail-summary,
html[data-theme="dark"] .article-body blockquote {
    color: #c9d5df;
}

html[data-theme="dark"] .detail-statement {
    color: #f5e6aa;
    background: rgba(250, 204, 21, .12);
}

html[data-theme="dark"] .article-body :not(pre) > code {
    background: rgba(255, 255, 255, .1);
    color: #fca5a5;
}

@media (max-width: 980px) {
    .boke-card-grid,
    .detail-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-article {
        padding: 28px;
    }
}

@media (max-width: 720px) {
    .boke-shell,
    .boke-footer {
        width: min(100% - 24px, 1000px);
    }

    .boke-nav {
        margin-top: 12px;
        margin-bottom: 18px;
        min-height: auto;
        padding: 12px;
        align-items: flex-start;
    }

    .nav-links {
        gap: 6px;
    }

    .nav-links > a,
    .nav-item > a,
    .back-home {
        min-height: 36px;
        padding: 0 12px;
    }

    .dropdown-menu,
    .dropdown-submenu {
        position: static;
        margin-top: 6px;
    }

    .nav-item:hover > .dropdown-menu,
    .nav-item:focus-within > .dropdown-menu {
        display: grid;
    }

    .boke-row {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 12px;
        padding: 15px;
    }

    .boke-row-thumb {
        width: 44px;
        height: 44px;
    }

    .boke-row-category {
        grid-column: 2;
        justify-self: start;
        margin-top: 4px;
    }

    .article-row-title {
        font-size: 17px;
    }

    .boke-row-meta {
        gap: 10px;
        font-size: 13px;
    }

    .boke-card-grid,
    .detail-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .detail-article,
    .category-title-card,
    .boke-tag-panel {
        padding: 18px;
    }

    .article-body {
        font-size: 16px;
    }

    .post-neighbor,
    .related-title-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-nav {
        width: 44px;
        height: 60px;
    }
}

@media (max-width: 460px) {
    .boke-card-grid,
    .detail-gallery-grid {
        grid-template-columns: 1fr;
    }

    .breadcrumb {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .breadcrumb em {
        width: 100%;
        margin-left: 0;
    }
}

/* 2026-06-21: boke theme refinements per design notes */
.nav-links > a,
.nav-item > a,
.back-home {
    font-size: 16px;
    font-weight: 600;
}

.article-row-title {
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
}

.boke-row-meta,
.card-meta {
    font-weight: 400;
}

.card-title {
    min-height: auto;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.cover-portrait {
    aspect-ratio: 2 / 3;
}

.cover-landscape {
    aspect-ratio: 4 / 3;
}

.detail-article {
    padding: 34px 38px;
}

.boke-detail-hero {
    padding-bottom: 18px;
}

.boke-detail-hero h1 {
    margin-bottom: 10px;
    font-size: clamp(22px, 2.1vw, 26px);
    font-weight: 700;
    line-height: 1.35;
}

.article-body {
    font-size: 18px;
    line-height: 1.9;
}

.detail-divider {
    height: 1px;
    margin: 4px 0 2px;
    border: 0;
    border-top: 1px solid var(--line);
}

/* Beautified Markdown shortcode components for boke */
.article-body .md-code-block {
    position: relative;
    margin: 18px 0;
    padding: 42px 16px 16px !important;
    border: 1px solid #d5ddea !important;
    border-radius: 10px;
    background: #eef2f7 !important;
    color: #0b1b35 !important;
    white-space: pre;
    overflow-x: auto;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08) !important;
}

.article-body .md-code-block::before {
    content: attr(data-lang);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #d5ddea !important;
    background: #e3eaf3 !important;
    color: #2563a9 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.article-body .md-code-block code,
.article-body .md-code-block code.hljs,
.article-body .md-code-block .hljs {
    display: block;
    padding: 0;
    border-radius: 0;
    background: transparent !important;
    color: #0b1b35 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.7;
}

.article-body .md-code-copy {
    position: absolute;
    top: 4px;
    right: 14px;
    z-index: 2;
    width: 32px;
    height: 28px;
    min-width: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111827;
    cursor: pointer;
    box-shadow: none;
    transition: transform .16s ease, color .16s ease;
}

.article-body .md-code-copy svg {
    width: 18px;
    height: 18px;
    display: block;
}

.article-body .md-code-copy:hover {
    transform: translateY(-1px);
    color: #0f172a;
}

.article-body .md-code-block .hljs-keyword,
.article-body .md-code-block .hljs-selector-tag,
.article-body .md-code-block .hljs-built_in,
.article-body .md-code-block .hljs-name,
.article-body .md-code-block .hljs-tag,
.article-body .md-code-block .hljs-doctag,
.article-body .md-code-block .hljs-type,
.article-body .md-code-block .hljs-template-tag {
    color: #0b61c9 !important;
    font-weight: 700;
}

.article-body .md-code-block .hljs-string,
.article-body .md-code-block .hljs-title,
.article-body .md-code-block .hljs-section,
.article-body .md-code-block .hljs-attribute,
.article-body .md-code-block .hljs-addition {
    color: #087443 !important;
}

.article-body .md-code-block .hljs-attr,
.article-body .md-code-block .hljs-property {
    color: #7c3aed !important;
    font-weight: 700;
}

.article-body .md-code-block .hljs-comment,
.article-body .md-code-block .hljs-quote {
    color: #68758a !important;
    font-style: italic;
}

.article-body .md-code-block .hljs-number,
.article-body .md-code-block .hljs-literal {
    color: #b45309 !important;
}

.article-body .md-panel,
.article-body .md-alert,
.article-body .md-collapse,
.article-body .md-download,
.article-body .md-highlight,
.article-body .md-hide {
    margin: 18px 0;
    border-radius: 8px;
}

.article-body .md-panel {
    padding: 0;
    border: 1px solid #bfdbfe;
    background: #f8fbff;
    overflow: hidden;
}

.article-body .md-panel h3 {
    margin: 0;
    padding: 12px 15px;
    border-bottom: 1px solid #dbeafe;
    background: linear-gradient(90deg, #eff6ff, #fff);
    color: #1f3b5b !important;
    font-size: 16px;
    font-weight: 800;
}

.article-body .md-panel > div {
    padding: 14px 16px;
}

.article-body .md-panel-yellow {
    border-color: #fde68a;
    background: #fffbeb;
}

.article-body .md-panel-yellow h3 {
    border-color: #fde68a;
    background: linear-gradient(90deg, #fef3c7, #fffaf0);
}

.article-body .md-panel-red {
    border-color: #fecaca;
    background: #fff7f7;
}

.article-body .md-panel-red h3 {
    border-color: #fecaca;
    background: linear-gradient(90deg, #fee2e2, #fff7f7);
}

.article-body .md-panel-gray {
    border-color: #d1d5db;
    background: #f9fafb;
}

.article-body .md-panel-gray h3 {
    border-color: #d1d5db;
    background: linear-gradient(90deg, #f3f4f6, #fff);
}

.article-body .md-alert {
    padding: 13px 15px;
    border: 0;
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    color: #1f3b5b !important;
}

.article-body .md-alert > strong {
    display: block;
    margin-bottom: 6px;
    color: inherit !important;
}

.article-body .md-alert-success {
    border-left-color: #22c55e;
    background: #f0fdf4;
    color: #185c36 !important;
}

.article-body .md-alert-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
    color: #7c4a03 !important;
}

.article-body .md-alert-danger {
    border-left-color: #ef4444;
    background: #fef2f2;
    color: #8f1d1d !important;
}

.article-body .md-collapse {
    padding: 0;
    border: 1px solid #dbe3ee;
    background: #fff;
    overflow: hidden;
}

.article-body .md-collapse summary {
    cursor: pointer;
    padding: 12px 15px;
    background: #f8fafc;
    color: #1f3b5b !important;
    font-weight: 800;
}

.article-body .md-collapse > div {
    padding: 14px 16px;
    border-top: 1px solid #e5edf6;
}

.article-body .md-download {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) max-content;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e4ebf3;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.article-body .md-download-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #ecfeff;
    color: #0891b2;
    font-size: 22px;
}

.article-body .md-download-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.article-body .md-download-main strong {
    color: #1f3b5b !important;
    font-size: 15px;
}

.article-body .md-download-main span,
.article-body .md-hide > p:first-of-type {
    color: #617085 !important;
    font-size: 14px;
}

.article-body .md-download a,
.article-body .md-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 6px;
    background: #3b82f6;
    color: #fff !important;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(59, 130, 246, .22);
}

.article-body .md-download a::before,
.article-body .md-button::before {
    content: "☁";
    margin-right: 6px;
    font-size: 13px;
}

.article-body .md-highlight {
    padding: 13px 15px;
    border: 1px dashed #f59e0b;
    background: #fff7ed;
    color: #7c2d12;
}

.article-body .md-hide {
    padding: 14px 15px;
    border: 1px dashed #94a3b8;
    background: #f8fafc;
    color: #475569;
}

.article-body .md-hide > strong {
    display: block;
    margin-bottom: 4px;
    color: #1f3b5b !important;
}

html[data-theme="dark"] .article-row-title,
html[data-theme="dark"] .card-title {
    color: var(--text);
}

html[data-theme="dark"] .article-body .md-code-block {
    border-color: #3a4250 !important;
    background: #202631 !important;
    color: #dde5ef !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .24) !important;
}

html[data-theme="dark"] .article-body .md-code-block::before {
    border-bottom-color: #3a4250 !important;
    background: #2a313d !important;
    color: #d8e1ec !important;
}

html[data-theme="dark"] .article-body .md-code-block code,
html[data-theme="dark"] .article-body .md-code-block code.hljs,
html[data-theme="dark"] .article-body .md-code-block .hljs {
    background: transparent !important;
    color: #dde5ef !important;
}

html[data-theme="dark"] .article-body .md-code-copy {
    color: #e5edf8;
}

html[data-theme="dark"] .article-body .md-code-copy:hover {
    color: #fff;
}

html[data-theme="dark"] .article-body .md-panel,
html[data-theme="dark"] .article-body .md-collapse,
html[data-theme="dark"] .article-body .md-download {
    border-color: #263951;
    background: #111f33;
    color: #d4deeb;
    box-shadow: none;
}

html[data-theme="dark"] .article-body .md-panel h3,
html[data-theme="dark"] .article-body .md-collapse summary,
html[data-theme="dark"] .article-body .md-download-main strong,
html[data-theme="dark"] .article-body .md-hide > strong {
    border-color: #263951;
    background: #0d1828;
    color: #e6edf6 !important;
}

html[data-theme="dark"] .article-body .md-panel > div,
html[data-theme="dark"] .article-body .md-collapse > div {
    border-color: #263951;
}

html[data-theme="dark"] .article-body .md-alert,
html[data-theme="dark"] .article-body .md-alert > strong,
html[data-theme="dark"] .article-body .md-download-main span,
html[data-theme="dark"] .article-body .md-hide > p:first-of-type {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .article-body .md-alert {
    background: #10243d;
}

html[data-theme="dark"] .article-body .md-alert-success {
    background: #0f2f22;
}

html[data-theme="dark"] .article-body .md-alert-warning {
    background: #33250d;
}

html[data-theme="dark"] .article-body .md-alert-danger {
    background: #3a1216;
}

html[data-theme="dark"] .article-body .md-download-icon {
    background: #0c3240;
    color: #67e8f9;
}

html[data-theme="dark"] .article-body .md-highlight {
    border-color: #5a4217;
    background: #2a2112;
    color: #d8c48e;
}

html[data-theme="dark"] .article-body .md-hide {
    border-color: #334155;
    background: #0d1828;
    color: #cbd5e1;
}

@media (max-width: 720px) {
    .article-row-title,
    .card-title {
        font-size: 15px;
    }

    .boke-detail-hero h1 {
        font-size: 21px;
    }

    .detail-article {
        padding: 20px;
    }
}

@media (max-width: 700px) {
    .article-body .md-download {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .article-body .md-download a {
        grid-column: 1 / -1;
        width: 100%;
    }

    .article-body .md-code-copy {
        top: 4px;
        right: 10px;
        width: 30px;
        height: 26px;
    }
}

html[data-theme="dark"] .article-body .md-panel h3,
html[data-theme="dark"] .article-body .md-collapse summary {
    border-color: #263951 !important;
    background: #0d1828 !important;
    color: #e6edf6 !important;
}

html[data-theme="dark"] .article-body .md-download-main strong,
html[data-theme="dark"] .article-body .md-hide > strong {
    border: 0 !important;
    background: transparent !important;
    color: #e6edf6 !important;
}

/* 2026-06-22: boke responsive/content page refinements */
[hidden] {
    display: none !important;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.boke-shell,
.boke-footer {
    width: min(1000px, calc(100% - 48px));
}

.article-body img,
.detail-main-cover img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
}

.detail-main-cover {
    overflow: visible;
}

.article-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.article-body pre,
.article-body .md-code-block {
    max-width: 100%;
}

.video-section-clean .video-playlist.is-single-playlist,
.video-section-clean .video-playlist[hidden] {
    display: none !important;
}

@media (max-width: 720px) {
    .boke-shell,
    .boke-footer {
        width: calc(100% - 16px);
    }

    .boke-main {
        gap: 16px;
    }

    .boke-nav {
        width: calc(100% - 16px);
        margin-top: 8px;
        margin-bottom: 14px;
        padding: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .nav-links {
        flex: 1 1 auto;
        min-width: 0;
        gap: 6px;
    }

    .theme-toggle {
        flex: 0 0 auto;
        width: 36px;
        height: 36px;
        font-size: 23px;
    }

    .breadcrumb,
    .category-title-card,
    .boke-tag-panel,
    .detail-article,
    .boke-list-card {
        border-radius: 7px;
    }

    .breadcrumb {
        min-height: auto;
        padding: 10px 12px;
        line-height: 1.5;
    }

    .category-title-card,
    .boke-tag-panel {
        padding: 16px 14px;
    }

    .section-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .boke-row {
        min-height: 82px;
        padding: 14px 12px;
    }

    .detail-article {
        padding: 14px 12px;
    }

    .boke-detail-hero {
        padding-bottom: 14px;
    }

    .boke-detail-hero h1 {
        font-size: 20px;
        line-height: 1.38;
        word-break: break-word;
    }

    .detail-hero-meta {
        gap: 8px 14px;
        font-size: 14px;
    }

    .detail-summary,
    .article-body,
    .video-section {
        margin-top: 18px;
    }

    .article-body {
        font-size: 16px;
        line-height: 1.85;
        word-break: break-word;
    }

    .article-body p,
    .article-body ul,
    .article-body ol,
    .article-body blockquote,
    .article-body table,
    .article-body pre {
        margin-bottom: 16px;
    }

    .article-body img {
        margin: 18px auto;
        border-radius: 7px;
    }

    .video-section {
        margin-left: -6px;
        margin-right: -6px;
    }

    .video-player-shell {
        border-radius: 7px;
    }

    .video-player-shell .video-js.vjs-fluid,
    .video-player-shell .video-js.vjs-16-9,
    .video-player-shell .video-js.vjs-4-3 {
        padding-top: calc(56.25% + 50px) !important;
    }

    .detail-actions {
        gap: 8px;
        padding-top: 16px;
    }

    .detail-action-tags {
        width: 100%;
        margin-right: 0;
    }

    .detail-statement {
        padding: 14px;
        font-size: 14px;
        line-height: 1.75;
    }

    .detail-statement span {
        display: block;
        margin-left: 0;
        margin-top: 6px;
        word-break: break-all;
    }

    .detail-gallery-grid {
        gap: 10px;
    }

    .gallery-item {
        border-radius: 7px;
    }

    .article-body .md-download,
    .article-body .md-panel,
    .article-body .md-alert,
    .article-body .md-collapse,
    .article-body .md-hide,
    .article-body .md-highlight {
        margin: 14px 0;
    }
}

@media (max-width: 460px) {
    .boke-shell,
    .boke-footer,
    .boke-nav {
        width: calc(100% - 12px);
    }

    .boke-card-grid,
    .detail-gallery-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .detail-article {
        padding: 12px 10px;
    }

    .video-section {
        margin-left: -4px;
        margin-right: -4px;
    }

    .video-player-shell .video-js.vjs-fluid,
    .video-player-shell .video-js.vjs-16-9,
    .video-player-shell .video-js.vjs-4-3 {
        padding-top: calc(56.25% + 50px) !important;
    }
}

/* Detail gallery images should keep their original ratio instead of being cropped */
.detail-gallery-grid {
    align-items: start;
}

.detail-gallery-grid .gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
}

@media (max-width: 720px) {
    .video-section-clean .video-playlist {
        display: none !important;
    }
}


/* 2026-06-22: category page filter panel - 分类 + 标签 */
.category-filter-card {
    padding: 22px 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.category-filter-card .filter-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    padding: 14px 0;
}

.category-filter-card .filter-row:first-child {
    padding-top: 0;
}

.category-filter-card .filter-row + .filter-row {
    border-top: 1px solid var(--line);
}

.category-filter-card .filter-row:last-child {
    padding-bottom: 0;
}

.category-filter-card .filter-label {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.category-filter-card .filter-options {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.category-filter-card .filter-pill {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
    color: #4f6582;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.category-filter-card .filter-pill:hover {
    color: #149231;
    border-color: rgba(63, 185, 80, .42);
    background: var(--accent-soft);
}

.category-filter-card .filter-pill.active {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

.category-filter-card .filter-empty {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

html[data-theme="dark"] .category-filter-card .filter-pill {
    background: rgba(17, 24, 39, .25);
    color: #cbd5e1;
}

html[data-theme="dark"] .category-filter-card .filter-pill:hover {
    color: #d7ffe0;
}

html[data-theme="dark"] .category-filter-card .filter-pill.active {
    color: #052e16;
    background: var(--accent);
}

@media (max-width: 720px) {
    .category-filter-card {
        padding: 14px 12px;
    }

    .category-filter-card .filter-row {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 10px;
        padding: 12px 0;
    }

    .category-filter-card .filter-label {
        min-height: 32px;
        font-size: 15px;
    }

    .category-filter-card .filter-options {
        gap: 8px;
    }

    .category-filter-card .filter-pill {
        min-height: 32px;
        padding: 0 12px;
        font-size: 14px;
        border-radius: 6px;
    }
}

@media (max-width: 460px) {
    .category-filter-card .filter-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .category-filter-card .filter-label {
        font-weight: 600;
    }
}

/* 2026-06-22: round 4 refinements */
.boke-shell,
.boke-footer {
    width: min(1000px, calc(100% - 48px));
}

.category-filter-card {
    padding: 14px 20px;
}

.category-filter-card .filter-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
}

.category-filter-card .filter-label {
    min-height: 30px;
    font-size: 15px;
}

.category-filter-card .filter-options {
    gap: 7px 8px;
}

.category-filter-card .filter-pill {
    min-height: 30px;
    padding: 0 11px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .5);
    font-size: 14px;
}

.category-filter-card .filter-empty {
    min-height: 30px;
    font-size: 13px;
}

@media (max-width: 720px) {
    .boke-shell,
    .boke-footer,
    .boke-nav {
        width: calc(100% - 16px);
    }

    .category-filter-card {
        padding: 11px 10px;
    }

    .category-filter-card .filter-row {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 8px;
        padding: 8px 0;
    }

    .category-filter-card .filter-label {
        min-height: 28px;
        font-size: 14px;
    }

    .category-filter-card .filter-options {
        gap: 6px;
    }

    .category-filter-card .filter-pill {
        min-height: 28px;
        padding: 0 9px;
        font-size: 13px;
        border-radius: 5px;
    }
}

@media (max-width: 460px) {
    .boke-shell,
    .boke-footer,
    .boke-nav {
        width: calc(100% - 12px);
    }
}


/* 2026-06-22: home category pill and gallery load count refinements */
.boke-row-category {
    min-width: 0;
    min-height: 30px;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.25;
}

@media (max-width: 720px) {
    .boke-row-category {
        min-height: 26px;
        padding: 2px 7px;
        font-size: 12px;
    }
}

/* 2026-06-22: round 7 - restore portrait covers, only widen landscape covers */
:root {
    --site-width: 1100px;
    --soft-title: #4f6582;
}

body {
    font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.boke-shell,
.boke-footer {
    width: min(var(--site-width), calc(100% - 48px));
}

.article-row-title,
.card-title {
    color: var(--soft-title);
    font-weight: 600;
}

.article-row-title:hover,
.card-title:hover {
    color: #149231;
}

/* Do not force all cards into landscape. Keep each cover mode's own shape. */
.boke-card-grid .cover-portrait {
    aspect-ratio: 2 / 3;
}

.boke-card-grid .cover-square {
    aspect-ratio: 1 / 1;
}

/* Only landscape covers are stretched horizontally a little. */
.boke-card-grid .cover-landscape {
    aspect-ratio: 16 / 9;
}

.boke-card-grid .cover img {
    object-fit: cover;
}

html[data-theme="dark"] {
    --soft-title: #cbd5e1;
}

@media (max-width: 720px) {
    .boke-shell,
    .boke-footer,
    .boke-nav {
        width: calc(100% - 16px);
    }
}

@media (max-width: 460px) {
    .boke-shell,
    .boke-footer,
    .boke-nav {
        width: calc(100% - 12px);
    }
}

/* 2026-06-22: round 8 - restore normal title color and raise landscape cover height */
.article-row-title,
.card-title {
    color: var(--text) !important;
}

.article-row-title:hover,
.card-title:hover {
    color: #149231 !important;
}

.boke-card-grid .cover-landscape {
    aspect-ratio: auto !important;
    height: 0;
    padding-top: calc(56.25% + 20px);
}

.boke-card-grid .cover-landscape > img,
.boke-card-grid .cover-landscape > .cover-empty {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* 2026-06-22: round 9 - unify list/card titles with related recommendation title color */
:root {
    --boke-title-color: #07152b;
}

.article-row-title,
.card-title,
.related-title-grid a {
    color: var(--boke-title-color) !important;
}

.article-row-title:hover,
.card-title:hover,
.related-title-grid a:hover {
    color: #149231 !important;
}

html[data-theme="dark"] {
    --boke-title-color: #eef4ff;
}

/* 2026-06-22: round 10 - mobile layout fixes */
@media (max-width: 720px) {
    html,
    body {
        overflow-x: hidden;
    }

    .boke-nav {
        position: relative;
        display: block;
        padding: 10px 54px 12px 10px;
    }

    .boke-nav .theme-toggle {
        position: absolute;
        top: 10px;
        right: 10px;
        margin: 0;
    }

    .nav-links {
        width: 100%;
        display: flex;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px 10px;
    }

    .nav-links > a,
    .nav-item > a,
    .back-home {
        min-height: 34px;
        padding: 0 10px;
        font-size: 15px;
        line-height: 1.2;
    }

    .nav-item {
        min-width: 0;
    }

    .dropdown-menu,
    .dropdown-submenu {
        max-width: calc(100vw - 32px);
        overflow-x: auto;
    }

    .boke-row {
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 14px 12px;
    }

    .boke-row-category {
        display: none !important;
    }

    .boke-row-main,
    .article-row-title,
    .article-row-text {
        min-width: 0;
    }

    .article-body,
    .article-body * {
        max-width: 100%;
    }

    .article-body pre,
    .article-body .md-code-block {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        white-space: pre !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        touch-action: pan-x pan-y;
    }

    .article-body pre code,
    .article-body .md-code-block code,
    .article-body .md-code-block code.hljs,
    .article-body .md-code-block .hljs {
        display: inline-block !important;
        min-width: max-content;
        max-width: none !important;
        white-space: pre !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .article-body table {
        width: max-content;
        min-width: 100%;
        max-width: none;
    }

    .article-body .md-panel,
    .article-body .md-alert,
    .article-body .md-collapse,
    .article-body .md-download,
    .article-body .md-highlight,
    .article-body .md-hide {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 460px) {
    .boke-nav {
        padding-right: 50px;
    }

    .nav-links {
        gap: 7px 8px;
    }

    .nav-links > a,
    .nav-item > a,
    .back-home {
        padding: 0 9px;
        font-size: 14px;
    }

    .article-body .md-code-block {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* 2026-06-30: stable compact nested navigation and category-level filters */
.nav-item.has-dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 8px;
}

.dropdown-entry {
    position: relative;
    min-width: 0;
}

.dropdown-menu,
.dropdown-submenu {
    min-width: 132px;
    padding: 6px;
    gap: 3px;
}

.dropdown-menu {
    top: calc(100% + 6px);
}

.dropdown-submenu {
    top: -6px;
    left: calc(100% - 1px);
}

.nav-item:hover > .dropdown-menu,
.nav-item:focus-within > .dropdown-menu,
.dropdown-entry:hover > .dropdown-submenu,
.dropdown-entry:focus-within > .dropdown-submenu {
    display: grid;
}

.dropdown-menu a,
.dropdown-submenu a {
    padding: 6px 9px;
    border-radius: 5px;
    font-size: 15px;
    line-height: 1.35;
}

.category-filter-card .filter-label {
    font-weight: 600;
}

@media (max-width: 720px) {
    .category-filter-card .filter-row {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .nav-item.has-dropdown::after {
        display: none;
    }

    .dropdown-menu,
    .dropdown-submenu {
        position: static;
        min-width: 0;
        width: max-content;
        max-width: calc(100vw - 32px);
        margin-top: 6px;
        overflow-x: auto;
    }

    .dropdown-submenu {
        margin-left: 10px;
    }
}

@media (max-width: 460px) {
    .category-filter-card .filter-row {
        grid-template-columns: 1fr;
    }
}

/* 2026-06-30: mobile detail page refinements */
@media (max-width: 720px) {
    .boke-nav .theme-toggle {
        width: 30px;
        height: 30px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
        background: transparent !important;
        box-shadow: none;
        font-size: 19px;
        line-height: 1;
    }

    .theme-toggle:hover,
    .theme-toggle:focus,
    .theme-toggle:active {
        background: transparent !important;
        box-shadow: none;
    }

    .theme-toggle [data-theme-icon] {
        display: block;
        line-height: 1;
    }

    .boke-detail-hero h1 {
        font-size: 19px;
        line-height: 1.34;
        font-weight: 700;
    }

    .detail-gallery-grid {
        margin-left: -4px;
        margin-right: -4px;
        padding: 0;
    }

    .article-body img,
    .detail-main-cover {
        margin-left: -4px;
        margin-right: -4px;
    }

    .detail-related-box,
    .detail-divider {
        display: none !important;
    }

    .detail-extras {
        margin-top: 22px;
        gap: 14px;
    }

    .boke-footer {
        margin-top: 22px;
        margin-bottom: 24px;
        padding-top: 16px;
    }
}

@media (max-width: 460px) {
    .boke-nav .theme-toggle {
        top: 11px;
        right: 10px;
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .detail-article {
        padding-left: 8px;
        padding-right: 8px;
    }

    .boke-detail-hero h1 {
        font-size: 18px;
    }

    .detail-gallery-grid {
        margin-left: -5px;
        margin-right: -5px;
    }

    .article-body img,
    .detail-main-cover {
        margin-left: -5px;
        margin-right: -5px;
    }

    .boke-footer {
        margin-top: 18px;
        margin-bottom: 18px;
        padding-top: 14px;
    }
}

/* 2026-06-30: desktop category page refinements */
.boke-nav {
    min-height: 58px;
    margin-top: 22px;
    margin-bottom: 22px;
    padding: 0 20px;
}

.nav-links > a,
.nav-item > a,
.back-home {
    min-height: 34px;
    padding: 0 16px;
}

.boke-tag-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.28;
}

.boke-card .card-title {
    font-size: 15px;
    line-height: 1.45;
}

.card-category-link {
    color: inherit;
    text-decoration: none;
}

.card-category-link:hover {
    color: #149231;
}

@media (max-width: 720px) {
    .boke-nav {
        min-height: 0;
        margin-top: 8px;
        margin-bottom: 12px;
    }

    .boke-tag-panel h2 {
        font-size: 20px;
    }
}

/* 2026-06-30: mobile nav/filter compact pass */
@media (max-width: 720px) {
    .boke-nav {
        min-height: 56px;
        padding: 10px 50px 10px 10px;
    }

    .boke-nav .theme-toggle {
        top: 50%;
        right: 14px;
        width: 24px;
        height: 24px;
        font-size: 17px;
        transform: translateY(-50%);
    }

    .nav-links {
        align-items: center;
        gap: 6px 8px;
    }

    .nav-links > a,
    .nav-item > a,
    .back-home {
        min-height: 30px;
        padding: 0 12px;
        border-radius: 6px;
        line-height: 1;
    }

    .nav-links a.active,
    .nav-links a:hover,
    .nav-item:hover > a {
        background: rgba(63, 185, 80, .12);
    }

    .category-filter-card {
        padding: 10px 10px;
    }

    .category-filter-card .filter-row {
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        padding: 7px 0;
    }

    .category-filter-card .filter-label {
        min-height: 30px;
        font-size: 16px;
    }

    .category-filter-card .filter-options {
        gap: 6px;
    }

    .category-filter-card .filter-pill {
        min-height: 30px;
        padding: 0 12px;
        font-size: 15px;
    }
}

@media (max-width: 460px) {
    .boke-nav {
        min-height: 54px;
        padding: 10px 44px 10px 10px;
    }

    .boke-nav .theme-toggle {
        top: 50%;
        right: 10px;
        width: 22px;
        height: 22px;
        font-size: 16px;
    }

    .category-filter-card .filter-row {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 7px;
    }

    .category-filter-card .filter-label {
        font-size: 16px;
    }
}

/* 2026-06-30: tighter mobile category filters and no mobile nav dropdowns */
@media (max-width: 720px) {
    .boke-nav .dropdown-menu,
    .boke-nav .dropdown-submenu {
        display: none !important;
    }

    .nav-item.has-dropdown::after {
        display: none !important;
    }

    .category-filter-card {
        padding: 7px 9px;
    }

    .category-filter-card .filter-row {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 6px;
        padding: 5px 0;
    }

    .category-filter-card .filter-label {
        min-height: 26px;
        font-size: 15px;
        line-height: 1.2;
    }

    .category-filter-card .filter-options {
        gap: 5px;
    }

    .category-filter-card .filter-pill {
        min-height: 26px;
        padding: 0 9px;
        border-radius: 5px;
        font-size: 14px;
        line-height: 1.15;
    }
}

@media (max-width: 460px) {
    .category-filter-card {
        padding: 6px 8px;
    }

    .category-filter-card .filter-row {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 5px;
        padding: 4px 0;
    }

    .category-filter-card .filter-label {
        min-height: 25px;
        font-size: 14px;
    }

    .category-filter-card .filter-options {
        gap: 4px;
    }

    .category-filter-card .filter-pill {
        min-height: 25px;
        padding: 0 8px;
        font-size: 13px;
    }
}

/* 2026-07-01: mobile pagination must not push the page sideways */
@media (max-width: 720px) {
    .pagination {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 18px 8px;
        overflow: hidden;
    }

    .pagination a,
    .pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        flex: 0 0 auto;
        font-size: 14px;
        line-height: 1;
    }
}

@media (max-width: 460px) {
    .pagination {
        gap: 5px;
        padding: 16px 6px;
    }

    .pagination a,
    .pagination span {
        min-width: 32px;
        height: 32px;
        padding: 0 7px;
        font-size: 13px;
    }
}

/* 2026-07-02: screenshot refinements - mobile pagination, dark text glare, detail spacing */
html[data-theme="dark"] {
    --text: #d7e0ec;
    --muted: #8f9aaa;
    --boke-title-color: #cbd5e1;
}

html[data-theme="dark"] .article-row-title,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .related-title-grid a {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .boke-row-meta,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .section-head span {
    color: #8995a7;
}

html[data-theme="dark"] .detail-statement {
    color: #d7ca8a;
    background: rgba(250, 204, 21, .095);
}

html[data-theme="dark"] .gallery-load-more {
    color: rgba(8, 27, 18, .92);
    background: #4ade80;
    text-shadow: none;
}

.detail-extras {
    gap: 12px;
    margin-top: 22px;
}

.detail-actions {
    padding-top: 14px;
}

.detail-statement {
    margin: 0;
}

.detail-divider {
    margin: 0;
}

.detail-related-box {
    margin-top: -2px;
    padding-top: 0;
}

.detail-section-title h4 {
    margin: 0 0 12px;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
    color: var(--boke-title-color, var(--text));
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: 0;
}

@media (max-width: 720px) {
    .pagination {
        flex-wrap: nowrap !important;
        gap: 4px !important;
        padding: 16px 6px !important;
        overflow: hidden;
    }

    .pagination a,
    .pagination span {
        min-width: 30px !important;
        height: 32px !important;
        padding: 0 6px !important;
        border-radius: 6px;
        font-size: 13px !important;
        line-height: 1 !important;
    }

    .pagination:has(> :nth-child(9)) a:nth-of-type(2):not(.active),
    .pagination:has(> :nth-child(9)) a:nth-last-of-type(2):not(.active) {
        display: none;
    }

    .detail-extras {
        margin-top: 16px;
        gap: 10px;
    }

    .detail-actions {
        padding-top: 12px;
    }
}

@media (max-width: 360px) {
    .pagination {
        gap: 3px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .pagination a,
    .pagination span {
        min-width: 28px !important;
        height: 30px !important;
        padding: 0 5px !important;
        font-size: 12px !important;
    }
}

/* 2026-07-02: content/gallery progressive image loading */
.boke-lazy-images {
    width: 100%;
}

.article-lazy-images + .detail-main-cover,
.gallery-lazy-images + .detail-extras {
    margin-top: 28px;
}

.boke-content-image.is-lazy-pending,
[data-boke-lazy-item][hidden] {
    display: none !important;
}

.boke-content-image.is-lazy-loaded,
.gallery-item.is-lazy-loaded img {
    animation: bokeImageFadeIn .22s ease both;
}

@keyframes bokeImageFadeIn {
    from {
        opacity: .35;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.boke-lazy-load-more-wrap {
    margin-top: 24px;
    margin-bottom: 4px;
}

.boke-lazy-load-more {
    min-width: 168px;
}

.boke-lazy-load-more[disabled] {
    cursor: default;
    opacity: .82;
    box-shadow: none;
}

.boke-lazy-load-more-wrap.is-complete .boke-lazy-load-more {
    background: rgba(34, 197, 94, .16);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, .3);
}

html[data-theme="dark"] .boke-lazy-load-more-wrap.is-complete .boke-lazy-load-more {
    background: rgba(74, 222, 128, .14);
    color: #86efac;
    border-color: rgba(74, 222, 128, .28);
}

@media (max-width: 720px) {
    .boke-lazy-load-more-wrap {
        margin-top: 18px;
    }

    .boke-lazy-load-more {
        min-height: 40px;
        min-width: 150px;
        padding-inline: 16px;
    }
}
