.novel-detail-v4 {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ndv4-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.ndv4-main {
    min-width: 0;
}

.ndv4-back {
    margin-bottom: 10px;
}

.ndv4-back a {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.ndv4-title-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.ndv4-book-mark {
    display: grid;
    width: 46px;
    height: 54px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 10px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 15px;
    font-weight: 900;
}

.ndv4-title-block {
    min-width: 0;
}

.ndv4-kicker {
    color: #2563eb;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
}

.ndv4-title-block h1 {
    margin: 4px 0 8px;
    color: #0f172a;
    font-size: 26px;
    line-height: 1.2;
}

.ndv4-meta {
    display: flex;
    gap: 13px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 12px;
}

.ndv4-meta strong {
    color: #334155;
}

.ndv4-badges {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.ndv4-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.ndv4-badge.success {
    background: #dcfce7;
    color: #15803d;
}

.ndv4-badge.success-soft {
    background: #ecfdf5;
    color: #059669;
}

.ndv4-badge.primary {
    background: #eff6ff;
    color: #2563eb;
}

.ndv4-badge.warning {
    background: #fff7ed;
    color: #ea580c;
}

.ndv4-badge.muted {
    background: #f1f5f9;
    color: #64748b;
}

.ndv4-badge.purple {
    background: #f5f3ff;
    color: #7c3aed;
}

.ndv4-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ndv4-stats {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ndv4-stat {
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.ndv4-stat span,
.ndv4-stat small {
    display: block;
    color: #64748b;
}

.ndv4-stat span {
    font-size: 12px;
    font-weight: 700;
}

.ndv4-stat strong {
    display: block;
    margin: 7px 0 3px;
    color: #0f172a;
    font-size: 26px;
    line-height: 1;
}

.ndv4-stat small {
    font-size: 10px;
}

.ndv4-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 3fr)
        minmax(260px, 1fr);
    gap: 14px;
}

.ndv4-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.ndv4-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
}

.ndv4-card-head strong,
.ndv4-card-head span {
    display: block;
}

.ndv4-card-head strong {
    color: #0f172a;
    font-size: 14px;
}

.ndv4-card-head span {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
}

.ndv4-info-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 0;
}

.ndv4-info-grid > div {
    padding: 16px 18px;
    border-right: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
}

.ndv4-info-grid > div:nth-child(3n) {
    border-right: 0;
}

.ndv4-info-grid span,
.ndv4-info-grid strong {
    display: block;
}

.ndv4-info-grid span {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
}

.ndv4-info-grid strong {
    overflow: hidden;
    margin-top: 5px;
    color: #334155;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ndv4-intro {
    padding: 18px;
}

.ndv4-intro-title {
    margin-bottom: 7px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
}

.ndv4-intro-body {
    color: #64748b;
    font-size: 12px;
    line-height: 1.8;
    white-space: pre-line;
}

.ndv4-danger {
    border-color: #fecaca;
}

.ndv4-danger .ndv4-card-head {
    background: #fffafa;
}

.ndv4-danger p {
    margin: 0;
    padding: 18px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}

.ndv4-danger form {
    padding: 0 18px 18px;
}

.ndv4-chapter-head {
    align-items: flex-end;
}

.ndv4-chapter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ndv4-search,
.ndv4-jump-form {
    display: flex;
    gap: 6px;
}

.ndv4-search input,
.ndv4-jump-form input {
    min-height: 36px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
}

.ndv4-search input {
    width: 230px;
}

.ndv4-jump-form input {
    width: 105px;
}

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

.ndv4-table th {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-align: left;
    white-space: nowrap;
}

.ndv4-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f7;
    color: #334155;
    font-size: 12px;
    vertical-align: middle;
}

.ndv4-table tbody tr:hover {
    background: #f8fbff;
}

.ndv4-table tbody tr:last-child td {
    border-bottom: 0;
}

.ndv4-num {
    text-align: right !important;
}

.ndv4-op {
    width: 135px;
}

.ndv4-chapter-no {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.ndv4-chapter-title {
    min-width: 280px;
}

.ndv4-chapter-title a {
    display: block;
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
}

.ndv4-chapter-title small {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 9px;
}

.ndv4-time {
    color: #64748b;
    font-size: 10px;
    white-space: nowrap;
}

.ndv4-row-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.ndv4-row-actions a,
.ndv4-row-actions button {
    border: 0;
    background: none;
    color: #2563eb;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
}

.ndv4-row-actions button {
    color: #dc2626;
}

.ndv4-empty {
    padding: 50px 20px !important;
    text-align: center;
}

.ndv4-empty strong,
.ndv4-empty span {
    display: block;
}

.ndv4-empty span {
    margin-top: 5px;
    color: #94a3b8;
}

.ndv4-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-top: 1px solid #eef2f7;
    color: #64748b;
    font-size: 11px;
}

@media (max-width: 1200px) {
    .ndv4-stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .ndv4-grid {
        grid-template-columns: 1fr;
    }

    .ndv4-info-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .ndv4-info-grid > div:nth-child(3n) {
        border-right:
            1px solid #eef2f7;
    }

    .ndv4-info-grid > div:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .ndv4-hero,
    .ndv4-chapter-head,
    .ndv4-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .ndv4-stats,
    .ndv4-info-grid {
        grid-template-columns: 1fr;
    }

    .ndv4-info-grid > div {
        border-right: 0 !important;
    }

    .ndv4-actions {
        justify-content: flex-start;
    }

    .ndv4-chapter-actions,
    .ndv4-search,
    .ndv4-jump-form {
        width: 100%;
    }

    .ndv4-search input,
    .ndv4-jump-form input {
        flex: 1;
        width: auto;
    }
}
