/**************** N Controller - Note Page **************/
/* N sidebar over left70% right30% */
.sidebar-left {
    width: 70%;
    height: auto;
    overflow-y: visible
}

.sidebar-right {
    width: 30%;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    position: sticky;
    top: 84px;
    height: calc(100vh - 124px);
    overflow-y: auto
}

@media(max-width:767px) {

    .sidebar-left,
    .sidebar-right {
        width: 100%;
        position: static;
        height: auto
    }

    /* right slide */
    .slide-panel.sidebar-right {
        width: 80%;
        min-width: 300px;
        height: calc(100% - 124px);
        position: fixed;
        top: 84px;
        right: 0;
        left: auto;
        z-index: 1000;
        overflow-y: hidden;
        padding: 0 0 1rem 1rem;
        background: var(--m-bg-secondary);
        transform: translateX(100%);
        transition: transform .5s;
    }

    .slide-panel.sidebar-right.checked {
        transform: translateX(0);
    }

    .sidebar-left,
    .sidebar-right {
        padding: 1rem;
    }

    .slide-panel .nr-tab-content {
        padding-right: 1rem;
        padding-bottom: 1rem
    }
}

em {
    font-style: normal;
}

/* n/left - Note Content */
.nl-wrap {
    width: 100%
}

.nl-header {
    margin-bottom: 1.5rem
}

.nl-title {
    margin: 0 0 .75rem 0;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.4
}

.nl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .875rem;
    color: var(--f-black-6);
    margin-bottom: .5rem
}

.nl-meta i {
    margin-right: .25rem
}

.nl-author {
    /*color:var(--e-primary-color);*/
    text-decoration: none
}

.nl-author:hover {
    color: var(--e-primary-color);
}

.nl-author:hover {
    text-decoration: underline
}

.bl-author {
    color: var(--e-primary-color);
    text-decoration: none
}

.bl-author:hover {
    text-decoration: underline
}

.nl-likes {
    cursor: pointer;
    transition: color .2s
}

.nl-likes.liked {
    color: var(--e-primary-color)
}

.nl-likes.liked i {
    animation: like-pulse .3s ease
}

.nl-likes.loading {
    pointer-events: none;
    opacity: .6
}

.nl-favorite {
    cursor: pointer;
    transition: color .2s;
    margin-left: .25rem
}

.nl-favorite.favorited {
    color: var(--e-primary-color)
}

.nl-favorite.favorited i {
    animation: like-pulse .3s ease
}

.nl-favorite.loading {
    pointer-events: none;
    opacity: .6
}

.nl-report {
    cursor: pointer;
    transition: color .2s;
    margin-left: .25rem
}

.nl-report:hover {
    color: var(--e-primary-color)
}

/* Report Modal */
.report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .3s
}

.report-modal-overlay.show {
    opacity: 1;
    visibility: visible
}

.report-modal {
    background: var(--m-bg-secondary);
    border-radius: 6px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform .3s
}

.report-modal-overlay.show .report-modal {
    transform: translateY(0)
}

.report-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--f-white-c);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.report-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0
}

.report-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--f-black-6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all .2s
}

.report-modal-close:hover {
    background: var(--f-white-c);
    color: var(--f-black-3)
}

.report-modal-body {
    padding: 1.5rem
}

.report-modal-subtitle {
    font-size: .875rem;
    color: var(--f-black-6);
    margin: 0 0 1.25rem 0;
    line-height: 1.5
}

.report-form-group {
    margin-bottom: 1.25rem
}

.report-form-label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: .5rem;
    color: var(--f-black-3)
}

.report-form-label .required {
    color: #d32f2f
}

.report-reason-list {
    display: flex;
    flex-direction: column;
    gap: .5rem
}

.report-reason-item {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .625rem .875rem;
    border: 1px solid var(--f-white-c);
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s;
    background: var(--f-white)
}

.report-reason-item:hover {
    border-color: var(--e-primary-color);
}

.report-reason-item.selected {
    border-color: var(--e-primary-color);
    background: rgba(var(--e-primary-rgb, 66, 133, 244), .06)
}

.report-reason-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--f-white-c);
    flex-shrink: 0;
    position: relative;
    transition: all .2s
}

.report-reason-item.selected .report-reason-radio {
    border-color: var(--e-primary-color)
}

.report-reason-item.selected .report-reason-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--e-primary-color)
}

.report-reason-text {
    font-size: .875rem;
    color: var(--f-black-3);
    line-height: 1.4
}

.report-form-textarea {
    width: 100%;
    height: 120px;
    padding: .75rem 1rem;
    border: 1px solid var(--f-white-c);
    border-radius: 6px;
    background: var(--f-white);
    color: var(--f-black-3);
    font-size: .875rem;
    resize: vertical;
    box-sizing: border-box
}

.report-form-textarea:focus {
    outline: none;
    border-color: var(--e-primary-color) !important
}

.report-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--f-white-c);
    display: flex;
    justify-content: flex-end;
    gap: .75rem
}

.report-btn-cancel {
    padding: .625rem 1.25rem;
    border: 1px solid var(--f-white-c);
    border-radius: 6px;
    background: transparent;
    color: var(--f-black-4);
    font-size: .875rem;
    cursor: pointer;
    transition: all .2s
}

.report-btn-cancel:hover {
    background: var(--f-white-c)
}

.report-btn-submit {
    padding: .625rem 1.25rem;
    border: none;
    border-radius: 6px;
    background: var(--e-primary-color);
    color: #fff;
    font-size: .875rem;
    cursor: pointer;
    transition: all .2s
}

.report-btn-submit:hover {
    opacity: .9
}

.report-btn-submit:disabled {
    opacity: .5;
    cursor: not-allowed
}

@keyframes like-pulse {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.3)
    }

    100% {
        transform: scale(1)
    }
}

.nl-book {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .75rem;
    background: var(--e-primary-color);
    color: var(--f-white);
    border-radius: 1rem;
    font-size: .8rem;
    text-decoration: none;
    margin-top: .5rem
}

.nl-book:hover {
    opacity: .85
}

.nl-posters {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto
}

.nl-poster {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: .5rem
}

.nl-summary {
    padding: 1rem;
    background: var(--f-white-d);
    border-radius: .5rem;
    font-size: .95rem;
    line-height: 1.6;
    color: var(--f-black-4);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--e-primary-color)
}

.nl-content {
    font-size: 1rem;
    line-height: 1.8;
    word-break: break-all;
    overflow-wrap: break-word;
    word-wrap: break-word
}

.nl-content p {
    margin: 0 0 1rem 0
}

.nl-content img {
    max-width: 100%;
    height: auto;
    border-radius: .5rem;
    /*margin:1rem 0*/
    ;
    display: block
}

.nl-content img.lazy {
    max-width: 100%;
    height: auto
}

.nl-content img.lazy:not(.loaded) {
    min-height: 100px;
    object-fit: cover
}

.nl-content pre {
    background: var(--f-black-2);
    color: var(--f-white-e);
    padding: 1rem;
    border-radius: .5rem;
    overflow-x: auto;
    max-width: 100%
}

.nl-content code {
    background: var(--f-white-d);
    padding: .125rem .25rem;
    border-radius: .25rem;
    font-size: .9em
}

.nl-content pre code {
    background: transparent;
    padding: 0
}

.nl-content blockquote {
    margin: 1rem 0;
    padding: .5rem 1rem;
    border-left: 4px solid var(--e-primary-color);
    background: var(--f-white-e);
    border-radius: 0 .25rem .25rem 0
}

.nl-content ul,
.nl-content ol {
    margin: 0 0 1rem 1.5rem
}

.nl-content li {
    margin-bottom: .25rem
}

.nl-content table {
    width: 100%;
    border-collapse: collapse;
}

.nl-content th,
.nl-content td {
    padding: .5rem;
    border: 1px solid var(--f-white-c);
    text-align: left
}

.nl-content th {
    background: var(--f-white-e);
    font-weight: 600
}

/* write-preview styles */
.nl-content .write-preview-section {
    margin-bottom: 2rem
}

.nl-content .write-preview-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem 0
}

.nl-content .write-preview-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--e-primary-color);
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0
}

.nl-content .write-preview-title {
    flex: 1;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4
}

.nl-content .write-preview-content {
    font-size: 1rem;
    line-height: 1.8
}

.nl-content .write-preview-content p {
    margin: 0 0 1rem 0
}

.nl-content .write-preview-description {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--f-white-d);
    border-left: 4px solid var(--e-primary-color);
    border-radius: 4px;
    font-size: .95rem;
    line-height: 1.8
}

/* article- 样式 (from n.css) */
.nl-content .article-description {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--f-white);
    border-left: 4px solid var(--e-primary-color);
    border-radius: 4px;
    color: var(--f-black-6);
    font-size: 15px;
    line-height: 1.8
}

.nl-content fieldset.article-chapter-separator {
    border: none;
    border-top: 2px solid var(--f-white-c);
    margin: 48px 0;
    padding: 0;
    min-height: 0
}

.nl-content fieldset.article-chapter-separator legend.article-chapter-legend {
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center
}

.nl-content .article-chapter-title {
    color: var(--f-black-3);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    display: inline-block;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal
}

.nl-content .article-section {
    --article-table-caption-color: #212529;
    --article-table-caption-border: #000000;
    --article-table-container-bg: #ffffff;
    --article-table-container-border: #dee2e6;
    --article-table-cell-bg: #ffffff;
    --article-table-cell-color: #212529;
    --article-table-cell-border: #666666;
    --article-table-header-bg: #cccccc;
    margin-bottom: 40px;
    flex: 1
}

.nl-content .article-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 3rem 0
}

.nl-content .article-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--e-primary-color);
    color: #fff;
    font-weight: 700;
    border-radius: 4px
}

.nl-content .article-title {
    flex: 1;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--f-black-3);
    line-height: 1.4
}

.nl-content .article-content {
    color: var(--f-black-3);
    font-size: 15px;
    line-height: 1.8
}

.nl-content .article-content p {
    margin: 0 0 16px 0
}

.nl-content .article-content p:last-child {
    margin-bottom: 0
}

.nl-content .article-content b,
.nl-content .article-content strong {
    font-weight: 600
}

.nl-content .article-content strike {
    text-decoration: line-through
}

.nl-content .article-content a {
    color: var(--e-primary-color);
    text-decoration: none
}

.nl-content .article-content a:hover {
    text-decoration: underline
}

.nl-content .article-remarks-fieldset {
    border: none;
    border-top: 1px solid var(--f-white-c);
    padding: 2rem
}

.nl-content .article-remarks-legend {
    padding: 0 1rem
}

.nl-content .article-remarks-title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    /*color:var(--f-black-6)*/
}

.nl-content .article-remarks-content {
    color: var(--f-black-3);
    font-size: 15px;
    line-height: 1.8
}

.nl-content .article-image-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px
}

.nl-content .article-image-box {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--f-white-e);
    border-radius: 8px;
    overflow: hidden
}

.nl-content .article-image-box img {
    max-width: 100%;
    max-height: 600px;
    height: auto;
    display: block;
    object-fit: contain;
    background: var(--f-white-d)
}

.nl-content .article-image-box img.img-loading {
    object-fit: none;
    object-position: center
}

.nl-content .article-image-box img.img-loaded {
    background: none
}

.nl-content .article-image-description {
    height: 36px;
    padding: 8px 16px;
    background: var(--f-white);
    border-radius: 6px;
    color: var(--f-black-4);
    font-size: 13px;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box
}

.nl-content .article-image-description:empty {
    display: none
}

/*.nl-content .article-badge.badge-heading{background:#2196F3}*/
.nl-content [data-content-type="normal"] .article-content {
    text-indent: 2rem
}

/********** Code Block (from code.css) **********/
.nl-content .article-code-wrapper {
    width: 100%;
    border: 1px solid var(--f-white-c);
    border-radius: 6px;
    overflow: hidden;
    margin: 1rem 0
}

.nl-content .article-code-lang {
    padding: 8px 12px;
    background: var(--f-white);
    color: var(--f-black-6);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid var(--f-white-c)
}

.nl-content .article-code-block {
    margin: 0;
    padding: 16px;
    background: var(--f-white);
    color: var(--f-black-2);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    border-radius: 0;
}

.nl-content .article-code-block code {
    background: none;
    padding: 0;
    color: inherit;
    font-family: inherit
}

/********** Table (from table.css) **********/
.nl-content .article-table-wrapper {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--article-table-container-border);
    border-radius: 0;
    background: var(--article-table-container-bg);
    box-sizing: border-box;
    margin: 1rem 0;
    overflow-x: hidden
}

.nl-content .article-table-caption {
    width: 100%;
    padding: 8px 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--article-table-caption-color, var(--f-black-3));
    text-align: center;
    border: none;
    border-bottom: 2px solid var(--article-table-caption-border, var(--f-black-9));
    background: transparent;
    border-radius: 0;
    margin-bottom: 10px
}

.nl-content .article-table-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0
}

.nl-content .article-table {
    width: max-content;
    min-width: 100%;
    border-spacing: 0;
    font-size: 14px;
    border-collapse: collapse
}

.nl-content .article-table th,
.nl-content .article-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    min-width: 80px;
    background: var(--article-table-cell-bg);
    color: var(--article-table-cell-color);
    border: 1px solid var(--article-table-cell-border);
    overflow-wrap: normal;
    word-break: normal
}

.nl-content .article-table th {
    font-weight: 600
}

.nl-content .article-table[hr="true"] tr:first-child th,
.nl-content .article-table[hr="true"] tr:first-child td {
    background: var(--article-table-header-bg)
}

.nl-content .article-table[hc="true"] th:first-child,
.nl-content .article-table[hc="true"] td:first-child {
    background: var(--article-table-header-bg)
}

.nl-content .article-table p {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-wrap: normal;
    word-break: normal
}

/********** Table Section Forced Light/Dark Theme **********/
.nl-content .article-section.table-theme-light,
.nl-content .article-section.light,
.nl-content .article-table-wrapper.table-theme-light,
.nl-content .article-table-wrapper.light {
    --f-white: #FFFFFF;
    --f-white-c: #CCCCCC;
    --f-white-d: #DDDDDD;
    --f-white-e: #EEEEEE;
    --f-black-3: #333333;
    --f-black-6: #666666;
    --f-black-9: #999999;
    --article-table-caption-color: #212529;
    --article-table-caption-border: #000000;
    --article-table-container-bg: #ffffff;
    --article-table-container-border: #dee2e6;
    --article-table-cell-bg: #ffffff;
    --article-table-cell-color: #212529;
    --article-table-cell-border: #666666;
    --article-table-header-bg: #cccccc;
}

.nl-content .article-section.table-theme-dark,
.nl-content .article-section.dark,
.nl-content .article-table-wrapper.table-theme-dark,
.nl-content .article-table-wrapper.dark {
    --f-white: #1a1a1a;
    --f-white-c: #374151;
    --f-white-d: #2d2d2d;
    --f-white-e: #111827;
    --f-black-3: #e5e7eb;
    --f-black-6: #4b5563;
    --f-black-9: #9ca3af;
    --article-table-caption-color: #e8e8e8;
    --article-table-caption-border: #6c6c6c;
    --article-table-container-bg: #1a1a1a;
    --article-table-container-border: #404040;
    --article-table-cell-bg: #2d2d2d;
    --article-table-cell-color: #e8e8e8;
    --article-table-cell-border: #6c6c6c;
    --article-table-header-bg: #3a3a3a;
}

/********** Video (from video.css) **********/
.nl-content .article-video-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    margin: 1rem 0
}

.nl-content .article-video-left {
    flex: 1;
    min-width: 0
}

.nl-content .article-video-right {
    flex: 1;
    min-width: 0;
    display: flex
}

.nl-content .article-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2)
}

.nl-content .article-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none
}

.nl-content .article-video-right-inner {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    height: 36px;
    background: var(--f-white);
    border-radius: 6px;
    overflow: hidden
}

.nl-content .article-video-description {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 8px 16px;
    background: transparent;
    color: var(--f-black-4);
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box
}

.nl-content .article-video-maximize-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--f-black-4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center
}

/* Video Maximized State - Pure CSS (no DOM move to keep video playing) */
.nl-content .article-video-container.is-maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483647 !important;
    background: rgba(0, 0, 0, .95) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important
}

.nl-content .article-video-container.is-maximized .article-video-left {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important
}

.nl-content .article-video-container.is-maximized .article-video-embed {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    padding-bottom: 0 !important;
    background: #000 !important;
    border-radius: 0 !important
}

.nl-content .article-video-container.is-maximized .article-video-iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important
}

.nl-content .article-video-container.is-maximized .article-video-right {
    flex: none !important;
    width: 100% !important
}

.nl-content .article-video-container.is-maximized .article-video-right-inner {
    background: rgba(255, 255, 255, .1) !important;
    border-radius: 0 !important
}

.nl-content .article-video-container.is-maximized .article-video-description {
    color: #fff !important
}

.nl-content .article-video-container.is-maximized .article-video-maximize-btn {
    color: #fff !important
}

body.video-maximized {
    overflow: hidden
}

body.video-maximized .header,
body.video-maximized .header-top,
body.video-maximized .menu-bar,
body.video-maximized .footer,
body.video-maximized .site-footer,
body.video-maximized .sidebar-right,
body.video-maximized .privacy-banner,
body.video-maximized .cookie-banner,
body.video-maximized [class*="gdpr"],
body.video-maximized [class*="consent"] {
    visibility: hidden !important;
    pointer-events: none !important
}

/********** Mobile Responsive **********/
@media(max-width:767px) {
    .nl-content .article-video-container {
        flex-direction: column;
        gap: 12px
    }

    .nl-content .article-table th,
    .nl-content .article-table td {
        min-width: 60px;
        padding: 8px 10px;
        font-size: 13px
    }
}

.nl-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--f-black-9)
}

.nl-empty i {
    font-size: 2.5rem;
    margin-bottom: .75rem;
    display: block
}

/* n/right - Related Notes */
.nr-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%
}

/* Bookmark Card - 类似bl-card样式 */
.nr-bookmark-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--f-white);
    border-radius: .5rem;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    transition: all .2s;
    cursor: pointer
}

.nr-bookmark-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    /*transform:translateY(-2px);*/
    background-color: #f1f1f1;
}

.nr-bookmark-card .bl-name {
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.3;
    color: inherit;
    text-decoration: none
}

.nr-bookmark-card .bl-name:hover {
    color: var(--e-primary-color)
}

.nr-bookmark-poster {
    width: clamp(80px, 45%, 160px);
    height: 120px;
    flex-shrink: 0;
    border-radius: .5rem;
    overflow: hidden;
    background: var(--f-white-c);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    position: relative
}

.nr-bookmark-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--f-white-c)
}

.nr-bookmark-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.nr-bookmark-name {
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word
}

.nr-bookmark-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .75rem;
    color: var(--f-black-9);
    margin-top: .5rem
}

.nr-bookmark-meta span,
.nr-bookmark-meta a {
    display: flex;
    align-items: center
}

.nr-bookmark-meta i {
    margin-right: .25rem
}

.nr-bookmark-name {
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.3;
    color: inherit;
    text-decoration: none;
    display: block
}

.nr-bookmark-name:hover {
    color: var(--e-primary-color)
}

.nr-bookmark-author:hover {
    color: var(--e-primary-color);
    text-decoration: none
}

.nr-bookmark-author:hover {
    text-decoration: underline
}

.nr-bookmark-summary {
    font-size: .85rem;
    /*color:var(--f-white-b);*/
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    overflow-wrap: anywhere
}

/********** Tabs **********/
.nr-tabs {
    width: 100%;
    flex: 1;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: auto auto auto 1fr;
    min-height: 0
}

.nr-tab-radio {
    display: none
}

.nr-tab-label {
    display: inline-block;
    padding: .75rem 1rem;
    cursor: pointer;
    font-size: .9rem;
    border-bottom: 2px solid transparent;
    transition: all .2s
}

.nr-tab-label:hover {
    color: var(--e-primary-color)
}

.nr-tab-radio:checked+.nr-tab-label {
    color: var(--e-primary-color);
    border-bottom: 2px solid var(--e-primary-color);
    font-weight: 600
}

.nr-comment-count {
    margin-left: .25rem;
    font-size: .8rem;
    color: var(--f-black-6)
}

.nr-tab-content {
    display: none;
    padding-top: .75rem;
    padding-right: .5rem;
    padding-bottom: .75rem;
    border-top: 1px solid var(--f-white-c);
    grid-column: 1/-1;
    grid-row: 2;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable both-edges;
    min-height: 0
}

#tab-toc:checked~.nr-tab-toc {
    display: block
}

#tab-articles:checked~.nr-tab-articles {
    display: block
}

#tab-comments:checked~.nr-tab-comments {
    display: block
}

/********** TOC (Table of Contents) **********/
.ntoc-wrap {
    padding: 0
}

.ntoc-list {
    display: flex;
    flex-direction: column;
    gap: 1px
}

.ntoc-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--f-black-9);
    font-size: .875rem
}

.ntoc-empty i {
    font-size: 2rem;
    margin-bottom: .5rem;
    display: block;
    opacity: .5
}

.ntoc-empty p {
    margin: 0
}

.ntoc-item {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    padding: .4rem .6rem;
    border-radius: .25rem;
    cursor: pointer;
    font-size: .8rem;
    line-height: 1.4;
    color: var(--f-black-5);
    text-decoration: none
}

.ntoc-item:hover {
    background-color: rgba(17, 126, 150, .12);
    color: var(--e-primary-color)
}

.ntoc-item.active {
    background-color: rgba(17, 126, 150, .12);
    color: var(--e-primary-color);
    font-weight: 500
}

.ntoc-item.active i {
    color: var(--e-primary-color)
}

.ntoc-item i {
    flex-shrink: 0;
    width: 14px;
    margin-top: 2px;
    font-size: .7rem;
    color: var(--f-black-9);
    text-align: center
}

.ntoc-item span {
    flex: 1;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical
}

/* TOC Level 1: intro, remarks */
.ntoc-level-1 {
    font-weight: 600;
    color: var(--f-black-3)
}

.ntoc-level-1 i {
    font-size: .75rem
}

/* TOC Level 2: sections (normal has prefix, no icon) */
.ntoc-level-2 {
    padding-left: .6rem;
    font-size: .78rem
}

.ntoc-normal {
    padding-left: .6rem
}

/* TOC Level 3: sub-headings */
.ntoc-level-3 {
    padding-left: 1.5rem;
    font-size: .72rem;
    color: var(--f-black-7)
}

.ntoc-sub {
    padding-left: 1.5rem
}

/* TOC Chapter separator with legend */
.ntoc-chapter-sep {
    border: none;
    border-top: 1px solid var(--f-white-c);
    margin: .6rem 0 .3rem;
    padding: 0
}

.ntoc-chapter-sep legend {
    padding: 0 .5rem;
    margin: 0 auto;
    float: none;
    width: auto
}

.ntoc-chapter-sep .ntoc-item {
    padding: .2rem .4rem;
    font-weight: 600;
    color: var(--f-black-3);
    background: transparent
}

.ntoc-chapter-sep .ntoc-item i {
    font-size: .75rem
}

.ntoc-chapter-sep-empty {
    height: 1px;
    margin: .8rem 0
}

.ntoc-chapter-sep-empty .ntoc-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0
}

/* TOC icons unified color */
.ntoc-item i {
    color: var(--e-primary-color)
}

/* TOC prefix number color */
.ntoc-prefix {
    color: var(--e-primary-color);
    font-weight: 600
}

/********** Audit Status Alert **********/
.nl-audit-alert {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: .5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start
}

.nl-audit-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem
}

.nl-audit-content {
    flex: 1;
    min-width: 0
}

.nl-audit-title {
    font-weight: 600;
    color: var(--f-black-3);
    margin-bottom: .25rem
}

.nl-audit-desc {
    font-size: .875rem;
    color: var(--f-black-6);
    line-height: 1.5
}

.nl-audit-link {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    margin-top: .5rem;
    padding: .375rem .75rem;
    font-size: .8rem;
    color: #fff;
    border-radius: .25rem;
    text-decoration: none;
    transition: background .2s
}

/* Red style - New note awaiting audit */
.nl-audit-author_pending,
.nl-audit-admin_pending {
    border-left: 4px solid #ef4444;
    background-color: rgba(239, 68, 68, .08)
}

.nl-audit-author_pending .nl-audit-icon,
.nl-audit-admin_pending .nl-audit-icon {
    background: rgba(239, 68, 68, .15);
    color: #ef4444
}

.nl-audit-author_pending .nl-audit-link,
.nl-audit-admin_pending .nl-audit-link {
    background: #ef4444
}

.nl-audit-author_pending .nl-audit-link:hover,
.nl-audit-admin_pending .nl-audit-link:hover {
    background: #dc2626;
    color: #fff
}

/* Yellow style - Note with pending update */
.nl-audit-author_pending_update,
.nl-audit-admin_pending_update {
    border-left: 4px solid #f0ad4e;
    background-color: rgba(240, 173, 78, .08)
}

.nl-audit-author_pending_update .nl-audit-icon,
.nl-audit-admin_pending_update .nl-audit-icon {
    background: rgba(240, 173, 78, .15);
    color: #f0ad4e
}

.nl-audit-author_pending_update .nl-audit-link,
.nl-audit-admin_pending_update .nl-audit-link {
    background: #f0ad4e
}

.nl-audit-author_pending_update .nl-audit-link:hover,
.nl-audit-admin_pending_update .nl-audit-link:hover {
    background: #ec971f;
    color: #fff
}

/* Gray style - Hidden note */
.nl-audit-hidden {
    border-left: 4px solid #6b7280;
    background-color: rgba(107, 114, 128, .08)
}

.nl-audit-hidden .nl-audit-icon {
    background: rgba(107, 114, 128, .15);
    color: #6b7280
}

/* Dark Red style - Reported content */
.nl-audit-reported {
    border-left: 4px solid #dc2626;
    background-color: rgba(220, 38, 38, .08)
}

.nl-audit-reported .nl-audit-icon {
    background: rgba(220, 38, 38, .15);
    color: #dc2626
}

.nl-audit-reported .nl-audit-link {
    background: #dc2626
}

.nl-audit-reported .nl-audit-link:hover {
    background: #b91c1c;
    color: #fff
}

.nl-audit-detail {
    font-size: .875rem;
    color: var(--f-black-6);
    margin-top: .375rem
}

.nl-audit-divider {
    height: 1px;
    background: rgba(220, 38, 38, .2);
    margin: .75rem 0
}

.nl-report-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #dc2626;
    color: #fff;
    font-size: .65rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center
}

.nl-audit-reported .nl-audit-icon {
    position: relative
}

.nl-audit-btn {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    margin-top: .5rem;
    padding: .375rem .75rem;
    font-size: .8rem;
    color: #fff;
    border-radius: .25rem;
    border: none;
    cursor: pointer;
    transition: background .2s
}

.nl-audit-hidden .nl-audit-btn {
    background: #10b981
}

.nl-audit-hidden .nl-audit-btn:hover {
    background: #059669
}

.nl-audit-btn.loading {
    opacity: .6;
    cursor: not-allowed
}

.nl-audit-link i,
.nl-audit-btn i {
    font-size: .75rem
}

.nl-audit-preview {
    margin-top: .75rem;
    padding: .75rem;
    background: var(--f-white-e);
    border-radius: .375rem
}

.nl-audit-info-row {
    display: flex;
    gap: .5rem;
    margin-bottom: .375rem;
    font-size: .8rem
}

.nl-audit-info-row:last-child {
    margin-bottom: 0
}

.nl-audit-label {
    flex-shrink: 0;
    font-weight: 500;
    color: var(--f-black-5)
}

.nl-audit-value {
    color: var(--f-black-3);
    word-break: break-word
}

.nl-audit-posters {
    margin-top: .75rem
}

.nl-audit-poster-list {
    display: flex;
    gap: .5rem;
    margin-top: .375rem;
    flex-wrap: wrap
}

.nl-audit-poster-list img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: .25rem;
    border: 1px solid var(--f-white-c)
}

/********** Code Copy Button **********/
.article-code-wrapper {
    position: relative
}

.article-code-lang {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem
}

.article-code-copy {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--f-black-6);
    background: var(--f-white-d);
    border: 1px solid var(--f-white-c);
    border-radius: 4px;
    cursor: pointer
}

.article-code-copy.copied {
    background: var(--e-primary-color);
    color: #fff;
    border-color: var(--e-primary-color)
}

/********** Comments **********/
/* Comment Form */
.nc-form-wrap {
    padding: 1rem 0;
    border-bottom: 1px solid var(--f-white-c)
}

.nc-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem
}

.nc-form-title {
    margin: 0;
    font-size: .9rem;
    font-weight: 600
}

.nc-reply-to {
    color: var(--e-primary-color)
}

.nc-cancel-btn {
    padding: .25rem .5rem;
    font-size: .75rem;
    color: var(--f-black-6);
    background: none;
    border: none;
    cursor: pointer
}

.nc-cancel-btn:hover {
    color: var(--e-primary-color)
}

.nc-form {
    display: flex;
    flex-direction: column;
    gap: .5rem
}

.nc-textarea {
    width: 100%;
    min-height: 80px;
    padding: .5rem;
    border: 1px solid var(--f-white-c);
    border-radius: .25rem;
    resize: none;
    font-size: .875rem;
    transition: border-color .2s
}

.nc-textarea:focus {
    border-color: var(--e-primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(17, 126, 150, .15)
}

.nc-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.nc-counter-wrap {
    font-size: .75rem;
    color: var(--f-black-6);
}

.nc-char-counter.over-limit {
    color: #d32f2f
}

.nc-submit-btn {
    padding: .5rem 1rem;
    background: var(--e-primary-color);
    color: #fff;
    border: none;
    border-radius: .25rem;
    font-size: .8rem;
    cursor: pointer;
    transition: background .2s;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.nc-submit-btn:hover {
    background: #0d6a7f
}

.nc-submit-btn:disabled {
    opacity: .6;
    cursor: not-allowed
}

.nc-submit-btn label {
    cursor: pointer;
    display: inline-flex;
    align-items: center
}

.nc-submit-btn.nc-btn-loading {
    min-width: 80px
}

/* Login Prompt */
.nc-login-prompt {
    position: relative
}

.nc-textarea-disabled {
    width: 100%;
    min-height: 60px;
    padding: .5rem;
    border: 1px solid var(--f-white-c);
    border-radius: .25rem;
    background: var(--f-white-e);
    resize: none
}

.nc-login-link {
    text-align: right;
    margin-top: .5rem
}

.nc-login-btn {
    display: inline-block;
    padding: .35rem .875rem;
    background: var(--e-primary-color);
    color: #fff;
    border-radius: .25rem;
    font-size: .8rem;
    text-decoration: none
}

.nc-login-btn:hover {
    background: #0d6a7f
}

/* Comments Disabled Notice */
.nc-disabled-notice {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem;
    background: var(--f-white-e);
    border-radius: .25rem;
    color: var(--f-black-6);
    font-size: .875rem
}

.nc-disabled-notice i {
    font-size: 1rem
}

/* Comment List */
.nc-list {
    padding: .5rem 0
}

.nc-list p {
    padding: 2rem;
    text-align: center;
    color: var(--f-black-9)
}

.nc-item {
    padding: .75rem;
    border-bottom: 1px solid var(--f-white-c)
}

.nc-item:last-child {
    border-bottom: none
}

.nc-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem
}

.nc-item-user {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem
}

.nc-item-user i {
    color: var(--f-black-6)
}

.nc-reply-tag {
    color: var(--e-primary-color);
    margin-right: .25rem
}

.nc-item-time {
    font-size: .7rem;
    color: var(--f-black-9)
}

.nc-item-text {
    font-size: .875rem;
    line-height: 1.5;
    padding: .25rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word
}

.nc-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .5rem
}

.nc-action-btns {
    display: flex;
    gap: .5rem
}

.nc-action-btn {
    padding: .25rem .5rem;
    font-size: .75rem;
    color: var(--f-black-6);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: .25rem;
    transition: all .2s
}

.nc-action-btn:hover {
    background: var(--f-white-d);
    color: var(--e-primary-color)
}

.nc-action-btn:disabled {
    opacity: .5;
    cursor: default
}

.nc-action-btn:disabled:hover {
    background: none;
    color: var(--f-black-6)
}

.nc-action-btn i {
    margin-right: .2rem
}

.nc-action-btn.active {
    color: var(--e-primary-color)
}

.nc-del-btn {
    color: var(--f-black-9)
}

.nc-del-btn:hover {
    color: #d32f2f
}

/* Sub Comments */
.nc-sub-list {
    margin-left: 1rem;
    padding-left: .75rem;
    border-left: 2px solid var(--f-white-c)
}

.nc-sub-item {
    padding: .5rem 0;
    border-bottom: 1px solid var(--f-white-e)
}

.nc-sub-item:last-child {
    border-bottom: none
}

.nc-load-more {
    text-align: center;
    padding: .5rem
}

.nc-load-btn {
    padding: .5rem 1rem;
    font-size: .75rem;
    color: var(--f-black-6);
    background: none;
    border: 1px solid var(--f-white-c);
    border-radius: .25rem;
    cursor: pointer;
    transition: all .2s
}

.nc-load-btn:hover {
    border-color: var(--e-primary-color);
    color: var(--e-primary-color)
}

/* <=1200：评论tab仅隐藏子评论（回复）日期 */
@media(max-width:1200px) {
    .nc-sub-list .nc-item-time {
        display: none
    }
}

/* Reply Input */
.nc-reply-input-wrap {
    margin-top: .5rem
}

.nc-reply-input {
    display: flex;
    flex-direction: column;
    gap: .5rem
}

.nc-reply-input-row {
    display: flex;
    align-items: center;
    gap: .5rem
}

.nc-reply-input input {
    flex: 1;
    padding: .5rem;
    border: 1px solid var(--f-white-c);
    border-radius: .25rem;
    font-size: .8rem;
    transition: border-color .2s, box-shadow .2s
}

.nc-reply-input input:focus {
    border-color: var(--e-primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(17, 126, 150, .15)
}

.nc-reply-input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.nc-reply-counter {
    font-size: .75rem;
    color: var(--f-black-6)
}

.nc-reply-counter.over-limit {
    color: #d32f2f
}

.nc-reply-tag {
    font-size: .75rem;
    color: var(--e-primary-color)
}

.nc-reply-btns {
    display: flex;
    gap: .5rem
}

.nc-reply-input button {
    padding: .4rem .75rem;
    font-size: .75rem;
    border-radius: .25rem;
    cursor: pointer
}

.nc-reply-cancel-btn {
    background: var(--f-white-d);
    color: var(--f-black-6);
    border: 1px solid var(--f-white-c)
}

.nc-reply-cancel-btn:hover {
    background: var(--f-white-c)
}

.nc-reply-submit-btn,
.nc-reply-save-btn {
    background: var(--e-primary-color);
    color: #fff;
    border: none
}

.nc-reply-submit-btn:hover,
.nc-reply-save-btn:hover {
    background: #0d6a7f
}

/* Loading Animation */
.nc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px
}

.nc-loading span {
    width: 4px;
    height: 4px;
    background: #999;
    border-radius: 50%;
    animation: nc-dots 1.4s infinite
}

.nc-loading span:nth-child(2) {
    animation-delay: .2s
}

.nc-loading span:nth-child(3) {
    animation-delay: .4s
}

@keyframes nc-dots {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0
    }

    40% {
        transform: scale(1);
        opacity: 1
    }
}

.nr-header {
    padding: 0 0 .75rem 0;
    border-bottom: 1px solid var(--f-white-c);
    margin-bottom: .75rem
}

.nr-toc-header {
    margin-top: 1.5rem
}

.nr-title {
    font-size: 1rem;
    font-weight: bold
}

.nr-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-bottom: .5rem
}

.nr-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    background: var(--f-white);
    border-radius: .5rem;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
    overflow: hidden
}

.nr-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    /*transform:translateY(-1px);*/
    background-color: #f1f1f1;
}

.nr-item-multi {
    flex-direction: column;
    align-items: flex-start
}

.nr-item-multi .nr-posters {
    width: 100%;
    height: auto;
    overflow: visible;
    border-radius: 0;
    background: transparent
}

.nr-item-multi .nr-posters img {
    flex: 1;
    height: 70px;
    min-width: 0;
    border-radius: .25rem
}

.nr-item-multi .nr-info {
    width: 100%
}

.nr-posters {
    display: flex;
    gap: .25rem;
    width: clamp(60px, 40%, 120px);
    height: 90px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: .25rem;
    position: relative;
    background: var(--f-white-c)
}

.nr-posters img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--f-white-c)
}

.js-home-poster-box .js-home-poster-img {
    position: relative;
    z-index: 1;
    transition: opacity .18s ease;
    background: var(--f-white-c) url('/public/img/loading.svg') center center no-repeat;
    background-size: 80% auto
}

.js-home-poster-box .js-home-poster-img.is-loaded,
.js-home-poster-box .js-home-poster-img.is-error {
    background-color: var(--f-white-c);
    background-image: none
}

.js-home-poster-box.is-loading .js-home-poster-img {
    opacity: 0
}

.js-home-poster-box.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--f-white-c) url('/public/img/loading.svg') center center no-repeat;
    background-size: 80% auto;
    pointer-events: none
}

.js-home-poster-box.is-loaded .js-home-poster-img {
    opacity: 1
}

.nr-item-multi .js-home-poster-box.is-loading::after {
    display: none
}

.nr-item-multi .js-home-poster-box.is-loading .js-home-poster-img {
    opacity: 1
}

.nr-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column
}

.nr-title-text {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-word
}

.nr-summary {
    font-size: .8rem;
    /*color:var(--f-white-b);*/
    margin-bottom: .25rem;
    overflow: hidden;
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.4
}

.nr-meta {
    display: flex;
    gap: .75rem;
    font-size: .75rem;
    color: var(--f-black-9);
    margin-top: auto
}

.nr-meta i {
    margin-right: .2rem
}

.nr-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--f-black-9)
}

.nr-empty i {
    font-size: 2rem;
    margin-bottom: .5rem;
    display: block
}

/* Tablet: 768-1200 右侧tabs与文章列表改上图下文 */
@media(min-width:768px) and (max-width:1200px) {
    .nr-bookmark-card {
        flex-direction: column;
        align-items: stretch
    }

    .nr-bookmark-poster {
        width: 100%;
        height: 180px
    }

    .nr-bookmark-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover
    }

    .nr-bookmark-info {
        width: 100%
    }

    .nr-bookmark-name {
        word-break: break-word;
        white-space: normal
    }

    .nr-item {
        flex-direction: column;
        align-items: stretch
    }

    .nr-posters {
        width: 100%;
        height: auto;
        min-height: unset
    }

    .nr-posters img {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        min-width: unset;
        min-height: unset
    }

    .nr-item-multi .nr-posters img {
        flex: none;
        height: auto;
        min-width: unset
    }

    .nr-item-multi .nr-posters img:nth-child(n+2) {
        display: none
    }

    .nr-item-multi .nr-posters img:first-child {
        width: 100%;
        aspect-ratio: 16/9
    }

    .nr-info {
        width: 100%;
        overflow: hidden
    }

    .nr-title-text {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical
    }

    .nr-summary {
        display: block;
        white-space: nowrap;
        text-overflow: ellipsis
    }
}

/* Mobile */
@media(max-width:767px) {

    /* Bookmark card: poster full width */
    .nr-bookmark-card {
        flex-direction: column
    }

    .nr-bookmark-poster {
        width: 100%;
        height: 160px
    }

    .nr-bookmark-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover
    }

    .nr-bookmark-info {
        width: 100%
    }

    .nr-bookmark-name {
        word-break: break-word;
        white-space: normal
    }

    .nr-bookmark-summary {
        -webkit-line-clamp: 3;
        line-clamp: 3
    }

    /* Article items: column layout */
    .nr-item {
        flex-direction: column
    }

    .nr-posters {
        width: 100%;
        height: auto;
        min-height: unset
    }

    .nr-posters img {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        min-width: unset;
        min-height: unset
    }

    /* Multi-poster: show only first image (override desktop flex:1;height:70px) */
    .nr-item-multi .nr-posters img {
        flex: none;
        height: auto;
        min-width: unset
    }

    .nr-item-multi .nr-posters img:nth-child(n+2) {
        display: none
    }

    .nr-item-multi .nr-posters img:first-child {
        width: 100%;
        aspect-ratio: 16/9
    }

    /* Info: full width, allow wrap */
    .nr-info {
        width: 100%;
        overflow: hidden
    }

    .nr-title-text {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical
    }

    .nr-summary {
        display: block;
        white-space: nowrap;
        text-overflow: ellipsis
    }
}

/* Lazy load placeholder */
img.lazy {
    background: var(--f-white-c)
}

img.lazy.img-loading {
    object-fit: none;
    object-position: center
}

img.lazy.img-loaded {
    background: none
}

/**************** Dark Theme for H/B/N **************/
:root[app-theme='dark'] {

    .hl-item,
    .hr-item,
    .br-item,
    .nr-item,
    .nr-bookmark-card {
        background: var(--f-black-2);
        box-shadow: 0 1px 3px rgba(0, 0, 0, .2)
    }

    .hl-item:hover,
    .hr-item:hover,
    .br-item:hover,
    .nr-item:hover,
    .nr-bookmark-card:hover {
        background: var(--f-black-4);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .4)
    }

    .hl-poster,
    .hr-posters img,
    .bl-poster,
    .bl-rec-poster,
    .br-poster,
    .br-posters img,
    .nr-posters img,
    .nr-bookmark-poster {
        background: var(--f-black-5)
    }

    .js-home-poster-box .js-home-poster-img {
        background-color: var(--f-black-5)
    }

    .js-home-poster-box .js-home-poster-img.is-loaded,
    .js-home-poster-box .js-home-poster-img.is-error {
        background-color: var(--f-black-5)
    }

    .js-home-poster-box.is-loading::after {
        background-color: var(--f-black-5)
    }

    .hl-header,
    .hr-header,
    .bl-recommend,
    .br-header,
    .nr-header {
        border-color: var(--f-black-4)
    }

    .bl-card,
    .bl-stats .bl-stat-item,
    .bl-recommend,
    .bl-empty {
        background: var(--f-black-3);
        box-shadow: 0 1px 3px rgba(0, 0, 0, .2)
    }

    .bl-rec-item {
        background: var(--f-black-4);
        box-shadow: 0 1px 3px rgba(0, 0, 0, .2)
    }

    .bl-rec-item:hover {
        background: var(--f-black-5);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .4)
    }

    /* nl-content Dark */
    .nl-summary {
        background: var(--f-black-3);
        color: var(--f-white-c)
    }

    .nl-content {
        color: var(--f-white-e)
    }

    .nl-content code {
        color: var(--f-white-e)
    }

    .nl-content pre {
        background: #0d1117
    }

    .nl-content blockquote {
        background: var(--f-black-3)
    }

    .nl-content table:not(.article-table) th {
        background: #3a3a3a
    }

    .nl-content table:not(.article-table) th,
    .nl-content table:not(.article-table) td {
        border-color: var(--f-black-4)
    }

    /* article- Dark */
    .nl-content .article-description {
        background: var(--f-black-3);
        color: var(--f-white-c)
    }

    .nl-content .article-chapter-separator {
        border-top-color: var(--f-black-4)
    }

    .nl-content .article-chapter-title {
        color: var(--f-white-e)
    }

    .nl-content .article-title {
        color: var(--f-white-e)
    }

    .nl-content .article-content {
        color: var(--f-white-c)
    }

    .nl-content .article-section:not(.table-theme-light):not(.light) {
        --article-table-caption-color: #e8e8e8;
        --article-table-caption-border: #6c6c6c;
        --article-table-container-bg: #1a1a1a;
        --article-table-container-border: #404040;
        --article-table-cell-bg: #2d2d2d;
        --article-table-cell-color: #e8e8e8;
        --article-table-cell-border: #6c6c6c;
        --article-table-header-bg: #3a3a3a;
    }

    .nl-content .article-remarks-fieldset {
        border-top-color: var(--f-black-4)
    }

    .nl-content .article-remarks-title {
        color: var(--f-white-c)
    }

    .nl-content .article-remarks-content {
        color: var(--f-white-c)
    }

    .nl-content .article-image-box {
        background: var(--f-black-3)
    }

    .nl-content .article-image-description {
        background: var(--f-black-3);
        color: var(--f-white-c)
    }

    /* write-preview Dark */
    .nl-content .write-preview-description {
        background: var(--f-black-3);
        color: var(--f-white-c)
    }

    /* Code Block Dark */
    .nl-content .article-code-wrapper {
        border-color: var(--f-black-4)
    }

    .nl-content .article-code-lang {
        background: var(--f-black-4);
        color: var(--f-white-c);
        border-color: var(--f-black-5)
    }

    .nl-content .article-code-block {
        background: #2b2b2b;
        color: #e8e8e8
    }

    /* Video Dark */
    .nl-content .article-video-right-inner {
        background: var(--f-black-3)
    }

    .nl-content .article-video-description {
        color: var(--f-white-e)
    }

    .nl-content .article-video-maximize-btn {
        color: var(--f-white-c)
    }

    /* Tabs Dark */
    .nr-tab-content {
        border-color: var(--f-black-4)
    }

    /* TOC Dark */
    .ntoc-empty {
        color: var(--f-white-9)
    }

    .ntoc-item {
        color: var(--f-white-9)
    }

    .ntoc-item:hover {
        background-color: rgba(17, 126, 150, .2);
        color: var(--e-primary-color)
    }

    .ntoc-item.active {
        background-color: rgba(17, 126, 150, .2);
        color: var(--e-primary-color);
        font-weight: 500
    }

    .ntoc-item i {
        color: var(--e-primary-color)
    }

    .ntoc-level-1 {
        color: var(--f-white-e)
    }

    .ntoc-level-3 {
        color: var(--f-white-8)
    }

    .ntoc-chapter-sep {
        border-color: var(--f-black-4)
    }

    .ntoc-chapter-sep .ntoc-item {
        color: var(--f-white-e)
    }

    /* Audit Alert Dark */
    .nl-audit-author_pending,
    .nl-audit-admin_pending {
        background-color: rgba(239, 68, 68, .12)
    }

    .nl-audit-author_pending_update,
    .nl-audit-admin_pending_update {
        background-color: rgba(240, 173, 78, .12)
    }

    .nl-audit-title {
        color: var(--f-white-e)
    }

    .nl-audit-desc {
        color: var(--f-white-9)
    }

    .nl-audit-preview {
        background: var(--f-black-4)
    }

    .nl-audit-label {
        color: var(--f-white-8)
    }

    .nl-audit-value {
        color: var(--f-white-e)
    }

    .nl-audit-poster-list img {
        border-color: var(--f-black-5)
    }

    /* Code Copy Dark */
    .article-code-copy {
        background: var(--f-black-4);
        border-color: var(--f-black-5);
        color: var(--f-white-9)
    }

    /* Comments Dark */
    .nc-form-wrap,
    .nc-item {
        border-color: var(--f-black-4)
    }

    .nc-textarea,
    .nc-reply-input input {
        background: var(--f-black-4);
        border-color: var(--f-black-5);
        color: var(--f-white-e)
    }

    .nc-textarea-disabled {
        background: var(--f-black-4);
        border-color: var(--f-black-5)
    }

    .nc-sub-list {
        border-color: var(--f-black-4)
    }

    .nc-sub-item {
        border-color: var(--f-black-5)
    }

    .nc-action-btn:hover {
        background: var(--f-black-4)
    }

    .nc-load-btn {
        border-color: var(--f-black-5);
        color: var(--f-black-9)
    }

    /* Report Modal Dark */
    .report-modal {
        background: var(--m-bg-secondary)
    }

    .report-modal-header {
        border-color: var(--f-black-4)
    }

    .report-modal-title {
        color: var(--f-white-e)
    }

    .report-modal-close {
        color: var(--f-white-9)
    }

    .report-modal-close:hover {
        background: var(--f-black-4);
        color: var(--f-white-e)
    }

    .report-modal-subtitle {
        color: var(--f-white-9)
    }

    .report-form-label {
        color: var(--f-white-e)
    }

    .report-reason-item {
        background: #374151;
        border-color: var(--f-black-5)
    }

    .report-reason-item:hover {
        border-color: var(--e-primary-color)
    }

    .report-reason-text {
        color: var(--f-white-e)
    }

    .report-reason-radio {
        border-color: var(--f-black-5)
    }

    .report-form-textarea {
        background: #374151;
        border-color: var(--f-black-5);
        color: var(--f-white-e)
    }

    .report-modal-footer {
        border-color: var(--f-black-4)
    }

    .report-btn-cancel {
        border-color: var(--f-black-5);
        color: var(--f-white-9)
    }

    .report-btn-cancel:hover {
        background: var(--f-black-4)
    }
}
