:root {
    --reading-gold: #d5b479;
    --reading-panel: #242424;
    --reading-line: rgba(213, 180, 121, 0.28);
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ops a.button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    border: 1px solid #778487;
    border-radius: 0.4rem;
    text-decoration: none;
}

.ops .filters > div {
    flex: 1 1 11rem;
    min-width: 0;
}

.article-list-card {
    margin: 0 0 1rem;
    overflow: hidden;
    border: 1px solid var(--reading-line);
    border-radius: 1rem;
    background: linear-gradient(145deg, #292929, #191919);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.22);
}

.article-list-card + .article-list-card {
    margin-top: 1rem;
}

.article-list-card-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    color: inherit;
    text-decoration: none;
}

.article-list-card-link:focus-visible,
.article-pagination a:focus-visible {
    outline: 3px solid #f0c474;
    outline-offset: 3px;
}

.article-list-copy {
    min-width: 0;
    padding: 1.125rem;
}

.article-filter-toolbar {
    margin: 0 0 1.5rem;
}

.article-category-strip a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}

.article-search-form {
    margin: 0.5rem 0 0;
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.article-search-field { display: flex; align-items: center; flex: 1; min-width: 0; gap: .65rem; padding: 0 .85rem; border: 1px solid var(--reading-line); border-radius: .75rem; background: #242424; }
.article-search-field i { color: var(--reading-gold); }
.article-search-field input { width: 100%; min-width: 0; border: 0; background: transparent; color: #eee; padding: .65rem 0; }
.article-search-field:focus-within { outline: 2px solid var(--reading-gold); outline-offset: 2px; }
.article-search-field input:focus { outline: none; }
.article-search-submit, .article-page-jump button { flex-shrink: 0; min-height: 44px; padding: .5rem .9rem; border: 1px solid var(--reading-line); border-radius: .75rem; background: #d5b479; color: #1a1a1a; font-weight: 700; }
.article-results-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .35rem 1rem; margin: .6rem 0; font-size: .875rem; line-height: 1.7; }
.article-results-bar p { min-width: 0; overflow-wrap: anywhere; }
.article-results-bar strong { color: #e3c690; }
.article-results-bar p span { color: #aeb3bb; }
.article-results-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.article-results-actions a, .article-empty a { display: inline-flex; min-height: 44px; align-items: center; color: var(--reading-gold); text-decoration: underline; text-underline-offset: .2em; }
.article-pagination { flex-wrap: wrap; }
.article-pagination a { min-width: 44px; min-height: 44px; }
.article-page-edge { padding-inline: .6rem; display: inline-flex; align-items: center; justify-content: center; color: var(--reading-gold); }
.article-page-jump { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; margin: 1rem 0 1.5rem; font-size: .875rem; scroll-margin-top: 10rem; }
.article-page-jump input[type="number"] { width: 5.25rem; min-width: 0; min-height: 44px; padding: .5rem; font-size: 1rem; color: #eee; background: #242424; border: 1px solid var(--reading-line); border-radius: .5rem; text-align: center; }
.article-empty { padding: 2.5rem 1rem; line-height: 1.8; }

.article-search-form input[type="search"] {
    min-height: 44px;
    font-size: 1rem;
}

.article-cover {
    position: relative;
    overflow: hidden;
    background: #172123;
}

.article-cover-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-cover-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--reading-gold);
    background:
        radial-gradient(circle at 78% 22%, rgba(213, 180, 121, 0.16), transparent 34%),
        linear-gradient(145deg, #203033, #141b1d);
}

.article-cover-placeholder[hidden] {
    display: none;
}

.article-cover.cover-missing .article-cover-placeholder {
    display: flex;
}

.article-cover-placeholder svg {
    width: min(100%, 17rem);
    height: auto;
}

.article-cover-placeholder text {
    fill: currentColor;
    font-family: system-ui, "Microsoft JhengHei", sans-serif;
}

.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1rem;
}

.article-meta-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.article-category {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--reading-line);
    border-radius: 999px;
    color: var(--reading-gold);
    background: rgba(213, 180, 121, 0.09);
    font-size: 0.82rem;
    font-weight: 700;
}

.article-cover--detail {
    width: 100%;
    margin: 0 0 1.5rem;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--reading-line);
    border-radius: 1rem;
}

.article-cover--detail .article-cover-image,
.article-cover--detail .article-cover-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
}

.article-cover--detail .article-cover-image {
    object-fit: contain;
    background: #11191b;
}

.article-reading-column {
    width: 100%;
    max-width: 60rem;
    margin-inline: auto;
}

.article-body {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

#scroller {
    max-width: 100vw;
    overflow-x: hidden;
}

.article-body img,
.article-body video,
.article-body canvas {
    display: block;
    max-width: 100% !important;
    height: auto !important;
}

.article-body img[data-duplicate-cover][hidden],
.article-body [data-duplicate-cover-wrapper][hidden] {
    display: none !important;
}

.article-media-unavailable {
    margin: 1.25rem 0;
    padding: 0.85rem 1rem;
    border: 1px dashed #697577;
    border-radius: 0.55rem;
    color: #c7d0d0;
    background: #20292b;
    font-size: 0.92em;
}

.article-body iframe {
    max-width: 100% !important;
}

.article-body pre,
.article-body code,
.article-body a {
    overflow-wrap: anywhere;
}

.article-body pre {
    max-width: 100%;
    overflow: auto;
    padding: 1rem;
    border: 1px solid #465153;
    border-radius: 0.5rem;
    background: #111819;
    line-height: 1.6;
    white-space: pre;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.4em;
    padding-inline-start: 1.5em;
}

.article-body li + li {
    margin-top: 0.45em;
}

.article-table-scroll {
    max-width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    border: 1px solid #465153;
    border-radius: 0.65rem;
    background: #1b2426;
    overscroll-behavior-inline: contain;
}

.article-table-scroll:focus-visible {
    outline: 3px solid #f0c474;
    outline-offset: 3px;
}

.article-table-scroll table {
    width: max-content;
    min-width: 100%;
    margin: 0 !important;
    border-collapse: collapse;
}

.article-table-scroll th,
.article-table-scroll td {
    min-width: 7rem;
    max-width: 24rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #465153;
    vertical-align: top;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

.article-table-scroll th {
    color: #f1d49d;
    background: #263437;
}

.article-pagination {
    display: flex;
    flex-wrap: wrap;
}

.article-page-current-summary {
    display: none;
}

.category-picker-tools {
    width: 100%;
    margin-bottom: 0.5rem;
}

.category-picker-tools label {
    display: block;
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
}

.category-picker-tools input {
    width: 100%;
}

.category-picker-hint {
    display: block;
    min-height: 1.5em;
    margin-top: 0.4rem;
    color: #bdc8c8;
    font-size: 0.85rem;
}

.category-picker-up {
    margin-top: 0.5rem;
}

.article-editor-page {
    min-height: 100%;
    height: auto !important;
    display: block !important;
}

.article-editor-header {
    min-height: 4rem;
    height: auto !important;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.article-editor-page main {
    overflow: visible !important;
}

.article-editor-page label,
.article-editor-page legend {
    line-height: 1.5;
}

.article-editor-page input:not([type="radio"]),
.article-editor-page select,
.article-editor-page textarea {
    max-width: 100%;
    font: inherit;
}

.article-status-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    min-width: 0;
}

.article-status-options input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.45rem;
    accent-color: var(--reading-gold);
}

.article-editor-page .note-editor,
.article-editor-page .note-editing-area,
.article-editor-page .note-editable {
    max-width: 100%;
}

.article-editor-page .note-toolbar {
    overflow-x: auto;
    white-space: normal;
}

.article-editor-page .note-btn-group {
    float: none !important;
    display: inline-flex;
    vertical-align: top;
}

.article-editor-page :focus-visible {
    outline: 3px solid #f0c474 !important;
    outline-offset: 3px;
}

@media (max-width: 42rem) {
    .site-page--articles .site-desktop-nav ~ main.site-shell {
        padding-top: calc(3.5rem + env(safe-area-inset-top)) !important;
    }
    .article-filter-toolbar {
        position: sticky;
        top: 0;
        z-index: 40;
        margin: 0 calc(-1 * var(--site-gutter)) 0.5rem;
        padding: 0.5rem var(--site-gutter) 0.625rem;
        border-bottom: 1px solid rgba(213, 180, 121, 0.2);
        background: rgba(26, 26, 26, 0.97);
        backdrop-filter: blur(10px);
    }

    .article-filter-toolbar #nav-wrapper,
    .article-filter-toolbar .article-search-form {
        margin-bottom: 0 !important;
        margin-top: 0 !important;
    }

    .article-filter-toolbar .article-search-form {
        margin-top: 0.375rem !important;
    }

    .article-list-card,
    .article-list-card + .article-list-card {
        margin: 0;
        border: 0;
        border-bottom: 1px solid rgba(213, 180, 121, 0.22);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .article-list-card:first-child {
        border-top: 1px solid rgba(213, 180, 121, 0.22);
    }

    .article-list-card-link {
        min-height: 44px;
    }

    .article-list-card-link:active {
        background: rgba(213, 180, 121, 0.1);
    }

    .article-list-copy {
        width: 100%;
        padding: 1rem 0.125rem;
    }

    .article-meta-row {
        justify-content: flex-start;
    }

    .article-popularity,
    .article-view-count {
        display: none !important;
    }

    .article-list-title {
        font-size: 1.125rem;
    }

    .article-list-summary {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .article-pagination {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .article-pagination a,
    .article-page-current {
        min-width: 44px;
        min-height: 44px;
    }

    .article-page-number,
    .article-page-edge,
    .article-page-current-number {
        display: none !important;
    }

    .article-page-current {
        padding-inline: 0.875rem;
        transform: none !important;
        white-space: nowrap;
    }

    .article-page-current-summary {
        display: inline;
    }

    .article-body blockquote {
        margin-inline: 0;
    }

    .article-editor-header > * {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .article-list-card *,
    .article-editor-page * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
