body { background: #f7f7f5; }
.site-shell { max-width: 1180px; }
.navbar .nav-link { white-space: nowrap; font-size: .95rem; }
.category-dropdown { min-width: 13rem; max-height: 70vh; overflow-y: auto; }
.book-cover { width: 100%; max-height: 220px; object-fit: contain; background: #fff; }
.book-card { height: 100%; }
.book-card .card-title { font-size: 1.05rem; line-height: 1.35; }
.book-summary { color: #555; font-size: .95rem; }
.admin-cover { width: 54px; height: 74px; object-fit: contain; background: #fff; border: 1px solid #dee2e6; border-radius: 4px; }
.admin-list-image { width: 76px; }
.admin-list-table td,
.admin-list-table th { vertical-align: middle; }
.admin-list-table { min-width: 820px; }
.admin-image-preview {
    min-height: 180px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}
.admin-image-preview img {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
}
.rich-editor-font { width: 145px; }
.rich-editor-surface {
    min-height: 320px;
    overflow-y: auto;
    outline: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.rich-editor-surface:focus {
    box-shadow: inset 0 0 0 2px rgba(25, 135, 84, .2);
}
.detail-cover { max-width: 190px; max-height: 280px; object-fit: contain; background: #fff; }
.legacy-html img { max-width: 100%; height: auto; }
.book-tab-scroll { max-height: min(70vh, 42rem); overflow-y: auto; padding-right: .5rem; }
.site-footer { border-top: 1px solid #dee2e6; color: #6c757d; font-size: .9rem; line-height: 1.7; text-align: center; }
.author-avatar { width: 82px; height: 82px; object-fit: cover; background: #fff; }
.author-detail-image { max-width: 190px; max-height: 280px; object-fit: contain; background: #fff; }
.author-books-scroll { max-height: 34rem; overflow-y: auto; padding-right: .35rem; }
.author-card-body { min-width: 0; flex: 1 1 auto; }
.author-name,
.author-summary,
.author-link,
.author-detail-text {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.admin-back-to-top {
    position: fixed;
    right: 1.75rem;
    bottom: 1.75rem;
    z-index: 1030;
    width: 3.5rem;
    height: 3.5rem;
    border: 0;
    border-radius: 50%;
    background: #198754;
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .22);
}
.admin-back-to-top:hover,
.admin-back-to-top:focus {
    background: #146c43;
    color: #fff;
    outline: 3px solid rgba(25, 135, 84, .25);
    outline-offset: 3px;
}
@media (max-width: 991.98px) { .navbar form[role="search"] { width: 100%; margin-top: .75rem; } }
@media (max-width: 575.98px) { .admin-back-to-top { right: 1rem; bottom: 1rem; width: 3rem; height: 3rem; } }
