/* ==========================================================================
   翻书阅读 —— 前台样式
   ========================================================================== */

.fb-hero,
.fb-toolbar,
.fb-shelf,
.fb-detail,
.fb-upload-head,
.fb-upload-grid,
.fb-related,
.fb-empty,
.fb-reader,
.fb-detail-top {
    --fb-ink: #2c2117;
    --fb-muted: #85735f;
    --fb-paper: #fbf6ea;
    --fb-paper-deep: #f1e4cf;
    --fb-accent: #8b5e34;
    --fb-accent-soft: #c79a63;
    --fb-line: rgba(102, 74, 43, .16);
}

.fb-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 220px;
    padding: 34px 38px;
    margin: 4px 0 18px;
    border-radius: 24px;
    overflow: hidden;
    color: #f7ead6;
    background:
        radial-gradient(120% 160% at 78% 18%, rgba(219, 164, 99, .20), transparent 55%),
        radial-gradient(90% 120% at 12% 110%, rgba(0, 0, 0, .45), transparent 60%),
        linear-gradient(135deg, #2c2119 0%, #46301f 48%, #2a1c12 100%);
    box-shadow: 0 18px 40px rgba(43, 29, 18, .18);
}

.fb-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background-image:
        repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .03) 3px 4px),
        repeating-linear-gradient(90deg, transparent 0 36px, rgba(0, 0, 0, .05) 36px 37px);
}

.fb-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.fb-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: #d9b483;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.fb-hero h1 {
    margin: 0 0 10px;
    font-family: Georgia, "Songti SC", "SimSun", serif;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    color: #fdf4e4;
    letter-spacing: .02em;
}

.fb-hero p {
    margin: 0;
    max-width: 540px;
    color: rgba(253, 244, 228, .72);
    font-size: 15px;
    line-height: 1.7;
}

.fb-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    color: rgba(253, 244, 228, .58);
    font-size: 12px;
}

.fb-hero-points span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fb-hero-points i {
    color: #d9b483;
    font-size: 15px;
}

.fb-hero-art {
    position: relative;
    z-index: 1;
    flex: 0 0 220px;
    height: 170px;
    perspective: 900px;
}

.fb-hero-book {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 160px;
    height: 200px;
    transform: translateX(-50%) rotateY(-18deg) rotateX(4deg);
    transform-style: preserve-3d;
}

.fb-hero-page {
    position: absolute;
    inset: 0;
    border-radius: 5px 12px 12px 5px;
    background: linear-gradient(135deg, #fbf4e2, #e8d8bd);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .28);
}

.fb-hero-page-a {
    transform: translate3d(-18px, 8px, -18px) rotate(-5deg);
    opacity: .55;
}

.fb-hero-page-b {
    transform: translate3d(-9px, 4px, -9px) rotate(-2deg);
    opacity: .8;
}

.fb-hero-page-c {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d9b483;
    font-size: 40px;
    background:
        radial-gradient(90% 80% at 72% 18%, rgba(219, 164, 99, .24), transparent 55%),
        linear-gradient(145deg, #6d482c, #332012);
    box-shadow:
        inset 0 0 0 2px rgba(253, 244, 228, .16),
        inset 12px 0 18px rgba(0, 0, 0, .20),
        0 18px 30px rgba(0, 0, 0, .30);
}

.fb-hero-page-c::before {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: 12px;
    left: 20px;
    border: 1px solid rgba(217, 180, 131, .28);
    border-radius: 2px 7px 7px 2px;
}

.fb-hero-actions {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
}

.fb-btn-upload {
    padding: 11px 22px;
    border-color: #a9743f;
    background: linear-gradient(135deg, #a9743f, #8b5e34);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

.fb-btn-upload:hover,
.fb-btn-upload:focus {
    border-color: #b9844e;
    background: linear-gradient(135deg, #b9844e, #9a6839);
}

.fb-hero .btn-primary,
.fb-detail .btn-primary,
.fb-upload-form .btn-primary {
    border-color: #8b5e34;
    background: #8b5e34;
}

.fb-hero .btn-primary:hover,
.fb-detail .btn-primary:hover,
.fb-upload-form .btn-primary:hover {
    border-color: #744a28;
    background: #744a28;
}

.fb-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
}

.fb-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fb-filter {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 999px;
    color: var(--fb-muted);
    background: rgba(139, 94, 52, .06);
    font-size: 13px;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.fb-filter:hover {
    color: var(--fb-accent);
    background: rgba(139, 94, 52, .12);
    transform: translateY(-1px);
}

.fb-filter.active {
    color: #fff9ee;
    background: var(--fb-accent);
    box-shadow: 0 6px 14px rgba(139, 94, 52, .22);
}

.fb-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(320px, 100%);
    padding: 3px 4px 3px 14px;
    border-radius: 999px;
    background: rgba(139, 94, 52, .07);
    transition: box-shadow .18s ease, background .18s ease;
}

.fb-search:focus-within {
    background: #fffaf0;
    box-shadow: 0 0 0 3px rgba(139, 94, 52, .13);
}

.fb-search > i {
    color: var(--fb-muted);
    font-size: 15px;
}

.fb-search input {
    flex: 1;
    min-width: 0;
    padding: 7px 8px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--fb-ink);
    font-size: 13px;
}

.fb-search input::-webkit-search-cancel-button {
    display: none;
}

.fb-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    color: #fff9ee;
    background: var(--fb-accent);
    transition: transform .18s ease;
}

.fb-search button:hover {
    transform: translateX(1px);
}

.fb-shelf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 14px;
    color: var(--fb-muted);
    font-size: 12px;
}

.fb-shelf-count strong {
    color: var(--fb-accent);
    font-size: 15px;
}

.fb-pending-tip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid rgba(176, 124, 58, .22);
    border-radius: 10px;
    color: #7a5727;
    background: #fff9ed;
    font-size: 12px;
}

.fb-pending-tip > i {
    color: #b07c3a;
    font-size: 17px;
}

.fb-pending-tip a {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    color: #8b5e34;
    font-weight: 600;
    text-decoration: none;
}

.fb-pending-tip a:hover {
    text-decoration: underline;
}

.fb-clear {
    color: var(--fb-muted);
    font-size: 12px;
    text-decoration: none;
}

.fb-clear:hover {
    color: var(--fb-accent);
}

.fb-shelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 28px 24px;
    padding: 4px 2px 8px;
}

.fb-shelf-compact {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.fb-book-card {
    position: relative;
    display: block;
    color: inherit;
    text-decoration: none;
    transform-style: preserve-3d;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.fb-book-card:hover {
    color: inherit;
    transform: translateY(-7px);
}

.fb-book-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 4px 10px 10px 4px;
    background:
        radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, .16), transparent 55%),
        linear-gradient(145deg, #5f432b, #2f2015);
    box-shadow:
        -5px 6px 0 rgba(87, 60, 36, .10),
        0 14px 26px rgba(43, 29, 18, .20);
    transition: box-shadow .28s ease, transform .28s ease;
}

.fb-book-card:hover .fb-book-cover {
    box-shadow:
        -7px 8px 0 rgba(87, 60, 36, .13),
        0 22px 38px rgba(43, 29, 18, .28);
    transform: rotateY(-3deg);
}

.fb-book-cover::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 9px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .34), rgba(255, 255, 255, .10) 55%, rgba(0, 0, 0, .12));
    pointer-events: none;
}

.fb-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fb-book-cover.is-fallback {
    background:
        radial-gradient(90% 80% at 70% 16%, rgba(219, 164, 99, .28), transparent 55%),
        linear-gradient(150deg, #4d3523, #24180f);
}

.fb-cover-letter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -54%);
    color: rgba(253, 244, 228, .92);
    font-family: Georgia, "Songti SC", serif;
    font-size: 76px;
    line-height: 1;
    text-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}

.fb-cover-mark {
    position: absolute;
    right: 16px;
    bottom: 14px;
    color: rgba(253, 244, 228, .32);
    font-size: 26px;
}

.fb-cover-wm {
    position: absolute;
    right: 12px;
    bottom: 46px;
    z-index: 1;
    color: rgba(255, 248, 236, .09);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 92px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.08em;
    pointer-events: none;
}

.fb-cover-title {
    position: absolute;
    top: 48px;
    right: 16px;
    left: 20px;
    z-index: 2;
    display: -webkit-box;
    overflow: hidden;
    max-height: 116px;
    color: #fdf3e3;
    font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .20);
    word-break: break-word;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.fb-cover-author {
    position: absolute;
    bottom: 30px;
    left: 20px;
    z-index: 2;
    overflow: hidden;
    max-width: 120px;
    color: rgba(253, 243, 227, .68);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-cover-doc {
    position: absolute;
    bottom: 15px;
    left: 20px;
    z-index: 2;
    color: rgba(253, 243, 227, .34);
    font-size: 7px;
    letter-spacing: .12em;
}

.fb-cover-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, .02) 45%, rgba(0, 0, 0, .30));
    pointer-events: none;
}

.fb-type-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff8ec;
    background: rgba(30, 20, 13, .55);
    backdrop-filter: blur(4px);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .09em;
}

.fb-type-pill.is-static {
    position: static;
    display: inline-block;
    margin-right: 8px;
    background: rgba(139, 94, 52, .12);
    color: var(--fb-accent);
    letter-spacing: .08em;
}

.fb-state-pill {
    position: absolute;
    top: 10px;
    left: 14px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 4px;
    color: #3a2a12;
    background: #f4c97a;
    font-size: 10px;
    font-weight: 600;
}

.fb-state-pill.is-rejected {
    color: #fff3f0;
    background: #b94a3d;
}

.fb-book-info {
    padding: 13px 4px 0;
}

.fb-book-info h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 5px;
    color: var(--fb-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fb-book-author {
    overflow: hidden;
    color: var(--fb-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-book-stats {
    display: flex;
    gap: 12px;
    margin-top: 7px;
    color: #a08a72;
    font-size: 11px;
}

.fb-book-stats span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.fb-thread-origin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 7px 4px 0;
    padding: 2px 7px;
    border-radius: 4px;
    color: #8b6a45;
    background: rgba(139, 94, 52, .08);
    font-size: 9.5px;
}

.fb-book-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 9px 4px 0;
}

.fb-book-progress[hidden] {
    display: none;
}

.fb-book-progress-bar {
    flex: 1;
    height: 3px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(139, 94, 52, .12);
}

.fb-book-progress-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--fb-accent-soft), var(--fb-accent));
    transition: width .3s ease;
}

.fb-book-progress em {
    color: var(--fb-muted);
    font-size: 10px;
    font-style: normal;
    white-space: nowrap;
}

.fb-pagination {
    margin: 28px 0 10px;
}

.fb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 20px;
    text-align: center;
    color: var(--fb-muted);
}

.fb-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin-bottom: 18px;
    border-radius: 28px;
    color: var(--fb-accent);
    background: rgba(139, 94, 52, .08);
    font-size: 42px;
    transform: rotate(-4deg);
}

.fb-empty h2 {
    margin: 0 0 8px;
    color: var(--fb-ink);
    font-size: 20px;
}

.fb-empty p {
    max-width: 440px;
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.7;
}

/* ==========================================================================
   详情
   ========================================================================== */

.fb-detail-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 16px;
}

.fb-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--fb-muted);
    font-size: 13px;
    text-decoration: none;
}

.fb-back:hover {
    color: var(--fb-accent);
}

.fb-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding: 11px 16px;
    border-radius: 10px;
    color: #6b4b16;
    background: #fdf0d2;
    font-size: 13px;
}

.fb-notice.is-danger {
    color: #7d2f26;
    background: #fbe3df;
}

.fb-detail {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 50px;
    align-items: start;
    padding: 18px 6px 8px;
}

.fb-detail-cover-wrap {
    position: relative;
    padding: 0 10px 12px 0;
}

.fb-detail-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 6px 14px 14px 6px;
    background: linear-gradient(145deg, #5f432b, #2f2015);
    box-shadow:
        -7px 8px 0 rgba(87, 60, 36, .12),
        0 24px 44px rgba(43, 29, 18, .26);
}

.fb-detail-cover::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 13px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(255, 255, 255, .12) 55%, rgba(0, 0, 0, .12));
}

.fb-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fb-detail-cover.is-fallback {
    background:
        radial-gradient(90% 80% at 70% 16%, rgba(219, 164, 99, .28), transparent 55%),
        linear-gradient(150deg, #4d3523, #24180f);
}

.fb-detail-cover .fb-cover-letter {
    font-size: 120px;
}

.fb-detail-cover .fb-cover-wm {
    right: 22px;
    bottom: 74px;
    font-size: 150px;
}

.fb-detail-cover .fb-cover-title {
    top: 68px;
    right: 28px;
    left: 32px;
    max-height: 158px;
    font-size: 20px;
    line-height: 1.45;
    -webkit-line-clamp: 5;
}

.fb-detail-cover .fb-cover-author {
    bottom: 46px;
    left: 32px;
    max-width: 190px;
    font-size: 12px;
}

.fb-detail-cover .fb-cover-doc {
    bottom: 24px;
    left: 32px;
    font-size: 8px;
}

.fb-detail-cover-shadow {
    position: absolute;
    right: 18px;
    bottom: 0;
    left: 18px;
    height: 20px;
    border-radius: 50%;
    background: rgba(43, 29, 18, .18);
    filter: blur(14px);
}

.fb-detail-main {
    min-width: 0;
    padding-top: 6px;
}

.fb-detail-kicker {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: var(--fb-muted);
    font-size: 12px;
    letter-spacing: .06em;
}

.fb-detail-main h1 {
    margin: 0 0 10px;
    color: var(--fb-ink);
    font-family: Georgia, "Songti SC", "SimSun", serif;
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.25;
}

.fb-detail-author {
    color: var(--fb-muted);
    font-size: 14px;
}

.fb-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
    margin: 26px 0;
    padding: 18px 0;
    border-top: 1px solid var(--fb-line);
    border-bottom: 1px solid var(--fb-line);
}

.fb-detail-stats div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fb-detail-stats strong {
    color: var(--fb-ink);
    font-size: 16px;
    font-weight: 600;
}

.fb-detail-stats span {
    color: var(--fb-muted);
    font-size: 11px;
}

.fb-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.fb-open-book {
    padding-right: 28px;
    padding-left: 28px;
    box-shadow: 0 10px 22px rgba(139, 94, 52, .20);
}

.fb-delete-form {
    display: inline-flex;
    margin: 0;
}

.fb-detail-desc {
    max-width: 720px;
    margin-top: 32px;
    color: #594736;
}

.fb-detail-desc h2 {
    margin: 0 0 10px;
    color: var(--fb-ink);
    font-size: 15px;
    font-weight: 600;
}

.fb-detail-desc p {
    margin: 0;
    font-size: 14px;
    line-height: 1.85;
}

.fb-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 42px 0 18px;
}

.fb-section-head h2 {
    margin: 0;
    color: var(--fb-ink);
    font-family: Georgia, "Songti SC", serif;
    font-size: 21px;
}

.fb-section-head a {
    color: var(--fb-muted);
    font-size: 12px;
    text-decoration: none;
}

.fb-section-head a:hover {
    color: var(--fb-accent);
}

/* ==========================================================================
   上传
   ========================================================================== */

.fb-upload-head {
    max-width: 720px;
    margin: 2px 0 24px;
}

.fb-upload-head h1 {
    margin: 0 0 8px;
    color: var(--fb-ink);
    font-family: Georgia, "Songti SC", serif;
    font-size: 34px;
}

.fb-upload-head p {
    margin: 0;
    color: var(--fb-muted);
    font-size: 14px;
}

.fb-upload-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    align-items: start;
}

.fb-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    padding: 28px;
    border: 1.5px dashed rgba(139, 94, 52, .34);
    border-radius: 16px;
    background:
        radial-gradient(80% 100% at 50% 0%, rgba(199, 154, 99, .08), transparent 70%),
        rgba(251, 246, 234, .6);
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.fb-dropzone:hover,
.fb-dropzone.is-drag {
    border-color: var(--fb-accent);
    background: rgba(199, 154, 99, .12);
    transform: translateY(-1px);
}

.fb-dropzone.has-file {
    min-height: 140px;
}

.fb-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.fb-drop-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    border-radius: 16px;
    color: var(--fb-accent);
    background: rgba(139, 94, 52, .10);
    font-size: 26px;
}

.fb-drop-title {
    color: var(--fb-ink);
    font-size: 15px;
    font-weight: 600;
}

.fb-drop-hint {
    margin-top: 6px;
    color: var(--fb-muted);
    font-size: 12px;
}

.fb-drop-button {
    margin-top: 14px;
    padding: 6px 18px;
    border-radius: 999px;
    color: #fff9ee;
    background: var(--fb-accent);
    font-size: 12px;
}

.fb-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(139, 94, 52, .07);
}

.fb-file-card[hidden] {
    display: none;
}

.fb-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--fb-accent);
    background: #fffaf0;
    font-size: 20px;
}

.fb-file-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.fb-file-info strong {
    overflow: hidden;
    color: var(--fb-ink);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-file-info span {
    color: var(--fb-muted);
    font-size: 11px;
}

.fb-file-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    color: var(--fb-muted);
    background: transparent;
}

.fb-file-remove:hover {
    color: #b94a3d;
    background: rgba(185, 74, 61, .08);
}

.fb-field {
    margin-top: 18px;
}

.fb-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fb-readonly {
    color: var(--fb-muted);
    background: rgba(139, 94, 52, .05);
}

.fb-upload-tip {
    margin-top: 16px;
    color: var(--fb-muted);
    font-size: 12px;
    line-height: 1.7;
}

.fb-upload-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
}

.fb-upload-progress {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    max-width: 260px;
}

.fb-upload-progress[hidden] {
    display: none;
}

.fb-upload-progress > span {
    flex: 1;
    height: 5px;
    overflow: hidden;
    border-radius: 5px;
    background: rgba(139, 94, 52, .12);
}

.fb-upload-progress i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--fb-accent-soft), var(--fb-accent));
    transition: width .2s ease;
}

.fb-upload-progress em {
    color: var(--fb-muted);
    font-size: 11px;
    font-style: normal;
}

.fb-upload-error {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #7d2f26;
    background: #fbe3df;
    font-size: 13px;
}

.fb-upload-error[hidden] {
    display: none;
}

.fb-cover-preview-card {
    position: sticky;
    top: 88px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(251, 246, 234, .62);
}

.fb-cover-preview-card h2 {
    margin: 0 0 14px;
    color: var(--fb-ink);
    font-size: 13px;
    font-weight: 600;
}

.fb-cover-preview {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 5px 10px 10px 5px;
    background: linear-gradient(145deg, #5f432b, #2f2015);
    box-shadow: -5px 6px 0 rgba(87, 60, 36, .10), 0 18px 30px rgba(43, 29, 18, .18);
}

.fb-cover-preview.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(80% 80% at 50% 30%, rgba(199, 154, 99, .10), transparent 65%),
        rgba(139, 94, 52, .05);
    box-shadow: none;
}

.fb-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fb-cover-preview-placeholder {
    color: rgba(139, 94, 52, .36);
    font-size: 46px;
}

.fb-cover-preview.is-empty .fb-cover-preview-placeholder {
    display: block;
}

.fb-cover-preview:not(.is-empty) .fb-cover-preview-placeholder {
    display: none;
}

.fb-cover-preview-hint {
    margin: 14px 0 0;
    color: var(--fb-muted);
    font-size: 11px;
    line-height: 1.7;
}

/* ==========================================================================
   板块帖：发帖上传 / 帖内翻书
   ========================================================================== */

.fb-thread-upload {
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px dashed rgba(139, 94, 52, .30);
    border-radius: 12px;
    background: rgba(199, 154, 99, .06);
}

.fb-thread-upload[hidden] {
    display: none;
}

.fb-thread-upload-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.fb-thread-upload-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #8b5e34;
    background: rgba(139, 94, 52, .10);
    font-size: 18px;
}

.fb-thread-upload-head strong {
    display: block;
    color: var(--bs-body-color);
    font-size: 13px;
    font-weight: 600;
}

.fb-thread-upload-tip {
    margin-top: 2px;
    color: var(--bs-secondary-color);
    font-size: 11px;
    line-height: 1.6;
}

.fb-thread-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.fb-thread-upload-row input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.fb-thread-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 5px 12px;
    border-radius: 999px;
    color: #fff9ee;
    background: #8b5e34;
    font-size: 11px;
    cursor: pointer;
}

.fb-thread-file-btn:hover {
    background: #744a28;
}

.fb-thread-file-name {
    overflow: hidden;
    max-width: 300px;
    color: var(--bs-secondary-color);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-thread-file-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    color: var(--bs-secondary-color);
    background: transparent;
}

.fb-thread-file-clear:hover {
    color: #b94a3d;
    background: rgba(185, 74, 61, .08);
}

.fb-thread-upload-limit {
    margin-top: 6px;
    color: var(--bs-tertiary-color);
    font-size: 10px;
}

.fb-thread-upload-error {
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    color: #7d2f26;
    background: #fbe3df;
    font-size: 11px;
}

.fb-thread-upload-error[hidden] {
    display: none;
}

.fb-thread-book {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
    margin: 14px 0 8px;
    padding: 12px;
    border-radius: 14px;
    background:
        radial-gradient(100% 100% at 100% 0%, rgba(199, 154, 99, .10), transparent 55%),
        rgba(139, 94, 52, .045);
}

.fb-thread-book-cover {
    position: relative;
    flex: 0 0 112px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 3px 8px 8px 3px;
    background: linear-gradient(145deg, #5f432b, #2f2015);
    box-shadow: -4px 5px 0 rgba(87, 60, 36, .10), 0 10px 20px rgba(43, 29, 18, .18);
}

.fb-thread-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fb-thread-book-cover.is-fallback {
    background:
        radial-gradient(90% 80% at 70% 16%, rgba(219, 164, 99, .28), transparent 55%),
        linear-gradient(150deg, #4d3523, #24180f);
}

.fb-thread-cover-wm {
    position: absolute;
    right: -8px;
    bottom: 38px;
    z-index: 1;
    color: rgba(255, 248, 236, .08);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 46px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.08em;
    pointer-events: none;
}

.fb-thread-cover-title {
    position: absolute;
    top: 25px;
    right: 8px;
    left: 12px;
    z-index: 2;
    display: -webkit-box;
    overflow: hidden;
    max-height: 79px;
    color: #fdf3e3;
    font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.fb-thread-cover-author {
    position: absolute;
    bottom: 22px;
    left: 12px;
    z-index: 2;
    overflow: hidden;
    max-width: 84px;
    color: rgba(253, 243, 227, .68);
    font-size: 8.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-thread-cover-doc {
    position: absolute;
    bottom: 9px;
    left: 12px;
    z-index: 2;
    color: rgba(253, 243, 227, .34);
    font-size: 6px;
    letter-spacing: .1em;
}

.fb-thread-book-cover::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 8px;
    background: linear-gradient(90deg, rgba(0, 0, 0, .32), rgba(255, 255, 255, .10) 55%, rgba(0, 0, 0, .12));
}

.fb-thread-cover-letter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    color: rgba(253, 244, 228, .92);
    font-family: Georgia, "Songti SC", serif;
    font-size: 40px;
}

.fb-thread-cover-mark {
    position: absolute;
    right: 9px;
    bottom: 8px;
    color: rgba(253, 244, 228, .32);
    font-size: 16px;
}

.fb-thread-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .28));
}

.fb-thread-type {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 5px;
    border-radius: 3px;
    color: #fff8ec;
    background: rgba(30, 20, 13, .55);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .07em;
}

.fb-thread-book-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.fb-thread-book-kicker {
    color: #a07a4f;
    font-size: 10px;
    letter-spacing: .05em;
}

.fb-thread-book-info h3 {
    margin: 4px 0 5px;
    color: var(--bs-body-color);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
}

.fb-thread-book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--bs-secondary-color);
    font-size: 10.5px;
}

.fb-thread-book-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.fb-thread-book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.fb-thread-book-actions .btn {
    padding: 5px 12px;
    font-size: 11px;
}

.fb-thread-book-actions .btn-primary {
    border-color: #8b5e34;
    background: #8b5e34;
}

.fb-thread-book-actions .btn-primary:hover {
    border-color: #744a28;
    background: #744a28;
}

.fb-thread-book-actions .fb-thread-open {
    padding: 8px 19px;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .02em;
    box-shadow: 0 7px 16px rgba(116, 74, 40, .24);
}

.fb-thread-book-actions .fb-thread-open i {
    margin-right: 2px;
    font-size: 17px;
}

.fb-thread-shelf-link {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    align-self: center;
    min-width: 168px;
    margin-left: auto;
    padding: 11px 13px;
    border: 1px solid rgba(139, 94, 52, .18);
    border-radius: 13px;
    color: #7d522d;
    background: linear-gradient(135deg, #fffdf8, #fbf1e2);
    box-shadow: 0 6px 18px rgba(87, 60, 36, .08);
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.fb-thread-shelf-link:hover {
    border-color: rgba(139, 94, 52, .38);
    color: #6d4422;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(87, 60, 36, .14);
}

.fb-thread-shelf-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #fffaf0;
    background: linear-gradient(145deg, #a97849, #7e512a);
    font-size: 18px;
}

.fb-thread-shelf-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.fb-thread-shelf-text b {
    font-size: 13px;
    font-weight: 700;
}

.fb-thread-shelf-text small {
    color: #a88a6b;
    font-size: 9px;
    white-space: nowrap;
}

.fb-thread-shelf-arrow {
    margin-left: auto;
    color: #b18a63;
    font-size: 14px;
}

.fb-thread-reader {
    margin: 8px 0 16px;
    overflow: hidden;
    border-radius: 12px;
    background: #1c130d;
    box-shadow: 0 14px 30px rgba(28, 18, 12, .20);
}

.fb-thread-reader[hidden] {
    display: none;
}

.fb-thread-reader-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    color: rgba(243, 231, 212, .72);
    background: rgba(24, 16, 11, .72);
    font-size: 11px;
}

.fb-thread-reader-bar > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fb-thread-reader-close {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border: 0;
    border-radius: 999px;
    color: rgba(243, 231, 212, .72);
    background: rgba(255, 255, 255, .06);
    font-size: 10px;
}

.fb-thread-reader-close:hover {
    color: #fff6e6;
    background: rgba(255, 255, 255, .12);
}

.fb-thread-reader-frame iframe {
    display: block;
    width: 100%;
    height: 74vh;
    min-height: 480px;
    border: 0;
    background: #1c130d;
}

@media (max-width: 767.98px) {
    .fb-thread-book {
        gap: 11px;
        padding: 10px;
    }

    .fb-thread-book-cover {
        flex-basis: 96px;
    }

    .fb-thread-book-info h3 {
        font-size: 14px;
    }

    .fb-thread-book-meta {
        gap: 6px;
    }

    .fb-thread-cover-title {
        top: 22px;
        right: 6px;
        left: 10px;
        max-height: 62px;
        font-size: 10px;
    }

    .fb-thread-cover-wm {
        font-size: 38px;
    }

    .fb-thread-cover-author {
        bottom: 20px;
        left: 10px;
        max-width: 74px;
        font-size: 7.5px;
    }

    .fb-thread-cover-doc {
        bottom: 8px;
        left: 10px;
        font-size: 5.5px;
    }

    .fb-thread-shelf-link {
        width: 100%;
        margin-left: 0;
        padding: 9px 11px;
    }

    .fb-thread-book-actions .fb-thread-open {
        padding: 7px 15px;
        font-size: 13px;
    }

    .fb-thread-reader-frame iframe {
        height: 68vh;
        min-height: 420px;
    }
}

/* ==========================================================================
   阅读器
   ========================================================================== */

.fb-reader {
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 128px);
    min-height: 600px;
    margin: 2px 0 20px;
    overflow: hidden;
    border-radius: 20px;
    color: #f3e7d4;
    background:
        radial-gradient(100% 80% at 50% 0%, rgba(199, 154, 99, .10), transparent 55%),
        radial-gradient(120% 120% at 50% 120%, rgba(0, 0, 0, .55), transparent 60%),
        linear-gradient(135deg, #221810 0%, #362519 52%, #1c130d 100%);
    box-shadow: 0 22px 50px rgba(28, 18, 12, .28);
}

.fb-reader::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .20;
    background-image:
        repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .03) 3px 4px),
        repeating-linear-gradient(90deg, transparent 0 44px, rgba(0, 0, 0, .06) 44px 45px);
}

.fb-reader-bar {
    position: relative;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(24, 16, 11, .68), rgba(24, 16, 11, .18));
    backdrop-filter: blur(8px);
}

.fb-reader-back {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 999px;
    color: rgba(243, 231, 212, .78);
    font-size: 12px;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.fb-reader-back:hover {
    color: #fff6e6;
    background: rgba(255, 255, 255, .08);
}

.fb-reader-back i {
    font-size: 16px;
}

.fb-reader-heading {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.fb-reader-type {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 4px;
    color: #d9b483;
    background: rgba(217, 180, 131, .10);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .08em;
}

.fb-reader-heading h1 {
    overflow: hidden;
    margin: 0;
    color: #f8eedf;
    font-family: Georgia, "Songti SC", "SimSun", serif;
    font-size: 15px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-reader-heading em {
    overflow: hidden;
    color: rgba(243, 231, 212, .42);
    font-size: 11px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-reader-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
}

.fb-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    color: rgba(243, 231, 212, .66);
    background: transparent;
    font-size: 11px;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.fb-icon-btn:hover {
    color: #fff6e6;
    background: rgba(255, 255, 255, .08);
}

.fb-icon-btn i {
    font-size: 16px;
}

.fb-icon-btn.is-dark {
    color: #6b5843;
}

.fb-icon-btn.is-dark:hover {
    color: #2c2117;
    background: rgba(44, 33, 23, .08);
}

.fb-reader-notice {
    position: relative;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 18px 6px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #f0d39c;
    background: rgba(196, 144, 70, .12);
    font-size: 11.5px;
}

.fb-reader-notice.is-danger {
    color: #f2b8ad;
    background: rgba(185, 74, 61, .16);
}

.fb-reader-notice i {
    font-size: 15px;
}

.fb-reader-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 8px 18px 12px;
    perspective: 2200px;
}

.fb-book-mount {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}

.fb-book {
    position: relative;
    border-radius: 3px 7px 7px 3px;
    background: #fffdf8;
    box-shadow:
        0 32px 60px rgba(0, 0, 0, .45),
        0 4px 12px rgba(0, 0, 0, .28);
}

.fb-book::before,
.fb-book::after {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 4px;
    width: 12px;
    border-radius: 4px;
    background: repeating-linear-gradient(90deg, #efe2cd 0 2px, #dcc9ab 2px 3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
    z-index: -1;
    pointer-events: none;
}

.fb-book::before {
    left: -7px;
}

.fb-book::after {
    right: -7px;
    transform: scaleX(-1);
}

.fb-book-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 8;
    width: 54px;
    transform: translateX(-50%);
    pointer-events: none;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(70, 45, 24, .02) 18%,
        rgba(70, 45, 24, .13) 48%,
        rgba(70, 45, 24, .05) 62%,
        transparent 100%);
}

.fb-page {
    background: #fffdf8;
    overflow: hidden;
    box-sizing: border-box;
}

.fb-page-inner {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    background: #fffdf8;
    transform-origin: top left;
}

.fb-page-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fffdf8;
    user-select: none;
    -webkit-user-drag: none;
}

.fb-page-no {
    position: absolute;
    bottom: 7px;
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
    color: #a38c71;
    font-family: Georgia, "Songti SC", serif;
    font-size: 10px;
    letter-spacing: .10em;
    pointer-events: none;
}

.fb-page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 10px;
    color: #b7a087;
    background:
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(139, 94, 52, .035) 31px 32px),
        #fffdf8;
    font-family: Georgia, "Songti SC", serif;
    font-size: 11px;
}

.fb-page-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(139, 94, 52, .16);
    border-top-color: #b08a5e;
    border-radius: 50%;
    animation: fb-spin .9s linear infinite;
}

@keyframes fb-spin {
    to { transform: rotate(360deg); }
}

/* 文档排版页 */

.fb-sheet {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    color: #33261a;
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(255, 255, 255, .55), transparent 60%),
        #fffdf8;
    font-family: Georgia, "Songti SC", "SimSun", "Noto Serif SC", serif;
}

.fb-sheet::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 22px;
    background: linear-gradient(90deg, rgba(102, 74, 43, .10), transparent);
    pointer-events: none;
}

.fb-sheet-inner {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.fb-sheet-body {
    display: flow-root;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    color: #33261a;
    font-size: 21px;
    line-height: 1.8;
    text-align: justify;
    overflow-wrap: break-word;
    word-break: break-word;
}

.fb-sheet-body > :first-child {
    margin-top: 0;
}

.fb-sheet-body p {
    margin: 0 0 .78em;
}

.fb-sheet-body h1,
.fb-sheet-body h2,
.fb-sheet-body h3,
.fb-sheet-body h4,
.fb-sheet-body h5,
.fb-sheet-body h6 {
    color: #24180e;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    page-break-after: avoid;
}

.fb-sheet-body h1 {
    margin: 0 0 .8em;
    font-size: 1.72em;
}

.fb-sheet-body h2 {
    margin: 1.05em 0 .55em;
    font-size: 1.38em;
}

.fb-sheet-body h3 {
    margin: .9em 0 .45em;
    font-size: 1.16em;
}

.fb-sheet-body h4,
.fb-sheet-body h5,
.fb-sheet-body h6 {
    margin: .8em 0 .4em;
    font-size: 1em;
}

.fb-sheet-body ul,
.fb-sheet-body ol {
    margin: 0 0 .8em;
    padding-left: 1.5em;
}

.fb-sheet-body li {
    margin: .18em 0;
}

.fb-sheet-body blockquote {
    margin: .8em 0;
    padding: .3em 0 .3em 1em;
    border-left: 3px solid rgba(139, 94, 52, .34);
    color: #6d5842;
    background: rgba(199, 154, 99, .06);
}

.fb-sheet-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: .8em auto;
    border-radius: 3px;
}

.fb-sheet-body table {
    width: 100%;
    margin: .8em 0;
    border-collapse: collapse;
    font-size: .88em;
    line-height: 1.55;
}

.fb-sheet-body th,
.fb-sheet-body td {
    padding: .38em .5em;
    border: 1px solid rgba(102, 74, 43, .22);
    vertical-align: top;
    text-align: left;
}

.fb-sheet-body th {
    background: rgba(139, 94, 52, .07);
    font-weight: 600;
}

.fb-sheet-body a {
    color: #8b5e34;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fb-sheet-body hr {
    height: 1px;
    margin: 1em 0;
    border: 0;
    background: rgba(102, 74, 43, .2);
}

.fb-sheet-body pre {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-size: .82em;
    line-height: 1.6;
}

.fb-sheet-body code {
    font-size: .88em;
}

.fb-sheet-foot {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    color: #8a7359;
    font-family: Georgia, "Songti SC", serif;
    font-size: 15px;
    text-align: center;
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.fb-docx-measure {
    position: absolute !important;
    top: 0 !important;
    left: -120000px !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.fb-measure {
    position: absolute !important;
    top: 0 !important;
    left: -99999px !important;
    visibility: hidden !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    pointer-events: none !important;
}

/* 阅读器加载 / 错误 */

.fb-reader-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(28, 19, 13, .94);
    transition: opacity .26s ease;
}

.fb-reader-loading.is-done {
    opacity: 0;
    pointer-events: none;
}

.fb-reader-loading p {
    margin: 0;
    color: rgba(243, 231, 212, .74);
    font-size: 13px;
}

.fb-reader-loading em {
    color: rgba(243, 231, 212, .34);
    font-size: 10px;
    font-style: normal;
    letter-spacing: .08em;
}

.fb-loader-book {
    position: relative;
    width: 58px;
    height: 44px;
    perspective: 260px;
}

.fb-loader-book span {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 29px;
    background: #f2e3ca;
    border-radius: 2px;
}

.fb-loader-book span:nth-child(1) {
    left: 0;
    transform: rotateY(22deg);
    transform-origin: right center;
    animation: fb-left 1.6s ease-in-out infinite;
}

.fb-loader-book span:nth-child(2) {
    right: 0;
    transform: rotateY(-22deg);
    transform-origin: left center;
    animation: fb-right 1.6s ease-in-out infinite;
}

.fb-loader-book span:nth-child(3) {
    left: 27px;
    width: 4px;
    background: #b08a5e;
}

@keyframes fb-left {
    0%, 100% { transform: rotateY(18deg); }
    50% { transform: rotateY(40deg); }
}

@keyframes fb-right {
    0%, 100% { transform: rotateY(-18deg); }
    50% { transform: rotateY(-40deg); }
}

.fb-loading-bar {
    width: 160px;
    height: 3px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(243, 231, 212, .10);
}

.fb-loading-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #b08a5e, #e0bd8d);
    transition: width .25s ease;
}

.fb-reader-error {
    position: absolute;
    inset: 0;
    z-index: 24;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(28, 19, 13, .96);
    text-align: center;
}

.fb-reader-error[hidden] {
    display: none;
}

.fb-reader-error > i {
    color: #d9a05c;
    font-size: 38px;
}

.fb-reader-error h2 {
    margin: 12px 0 6px;
    color: #f8eedf;
    font-size: 18px;
}

.fb-reader-error p {
    max-width: 520px;
    margin: 0 0 18px;
    color: rgba(243, 231, 212, .55);
    font-size: 13px;
    line-height: 1.7;
}

/* 目录 */

.fb-toc-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: min(350px, 88%);
    padding: 18px;
    color: #2c2117;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(199, 154, 99, .16), transparent 60%),
        #f8f1e4;
    box-shadow: -22px 0 50px rgba(0, 0, 0, .32);
    transform: translateX(105%);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    visibility: hidden;
}

.fb-toc-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.fb-toc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
}

.fb-toc-head h2 {
    margin: 0;
    font-family: Georgia, "Songti SC", serif;
    font-size: 17px;
}

.fb-toc-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.fb-toc-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    padding: 8px 8px;
    border: 0;
    border-radius: 6px;
    color: #4c3927;
    background: transparent;
    font-size: 12.5px;
    text-align: left;
    transition: background .15s ease, color .15s ease;
}

.fb-toc-item:hover {
    color: #2c2117;
    background: rgba(139, 94, 52, .09);
}

.fb-toc-item.level-1 {
    font-weight: 600;
}

.fb-toc-item.level-2 {
    padding-left: 20px;
}

.fb-toc-item.level-3 {
    padding-left: 34px;
    color: #6d5842;
}

.fb-toc-item.level-4,
.fb-toc-item.level-5,
.fb-toc-item.level-6 {
    padding-left: 46px;
    color: #85735f;
}

.fb-toc-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-toc-item em {
    color: #a38c71;
    font-size: 10px;
    font-style: normal;
}

.fb-toc-empty {
    padding: 30px 10px;
    color: #85735f;
    font-size: 12px;
    text-align: center;
}

/* 控制栏 */

.fb-reader-controls {
    position: relative;
    z-index: 7;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 14px;
    background: linear-gradient(0deg, rgba(24, 16, 11, .70), rgba(24, 16, 11, .10));
}

.fb-nav-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(243, 231, 212, .14);
    border-radius: 50%;
    color: #f3e7d4;
    background: rgba(255, 255, 255, .05);
    font-size: 18px;
    transition: background .18s ease, opacity .18s ease;
}

.fb-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, .12);
}

.fb-nav-btn:disabled {
    opacity: .28;
    cursor: default;
}

.fb-page-control {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 12px;
    min-width: 80px;
}

.fb-page-control input[type="range"] {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    outline: 0;
    background: rgba(243, 231, 212, .18);
    -webkit-appearance: none;
    appearance: none;
}

.fb-page-control input[type="range"]::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    border: 2px solid #2a1d14;
    border-radius: 50%;
    background: #e0bd8d;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.fb-page-control input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: 2px solid #2a1d14;
    border-radius: 50%;
    background: #e0bd8d;
    cursor: pointer;
}

.fb-page-label {
    flex: 0 0 auto;
    color: rgba(243, 231, 212, .58);
    font-family: Georgia, serif;
    font-size: 11px;
    letter-spacing: .04em;
}

.fb-page-label span:first-child {
    color: #f3e7d4;
}

.fb-mode-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid rgba(243, 231, 212, .12);
    border-radius: 999px;
    color: rgba(243, 231, 212, .66);
    background: transparent;
    font-size: 11px;
    transition: background .18s ease;
}

.fb-mode-btn:hover {
    background: rgba(255, 255, 255, .08);
}

.fb-mode-btn i {
    font-size: 14px;
}

.fb-shortcut-hint {
    flex: 0 0 auto;
    color: rgba(243, 231, 212, .26);
    font-size: 10px;
    white-space: nowrap;
}

.fb-reader-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 8;
    height: 2px;
    background: rgba(243, 231, 212, .06);
}

.fb-reader-progress i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #8b5e34, #e0bd8d);
    transition: width .3s ease;
}

/* 全屏 */

.fb-reader:fullscreen,
.fb-reader.is-faux-fullscreen {
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
}

.fb-reader:fullscreen .fb-reader-stage,
.fb-reader.is-faux-fullscreen .fb-reader-stage {
    padding: 18px 28px;
}

.fb-reader.is-faux-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.fb-reader.is-error .fb-reader-stage {
    min-height: 420px;
}

/* 暗色适配：只调整外围控件，书页保持纸白 */

[data-bs-theme="dark"] .fb-filter {
    background: rgba(199, 154, 99, .10);
}

[data-bs-theme="dark"] .fb-search {
    background: rgba(199, 154, 99, .10);
}

[data-bs-theme="dark"] .fb-search:focus-within {
    background: #2a2119;
}

[data-bs-theme="dark"] .fb-book-info h3,
[data-bs-theme="dark"] .fb-detail-main h1,
[data-bs-theme="dark"] .fb-upload-head h1,
[data-bs-theme="dark"] .fb-empty h2,
[data-bs-theme="dark"] .fb-detail-stats strong,
[data-bs-theme="dark"] .fb-detail-desc h2,
[data-bs-theme="dark"] .fb-section-head h2 {
    color: #f2e6d5;
}

[data-bs-theme="dark"] .fb-detail-desc {
    color: #c9b7a2;
}

[data-bs-theme="dark"] .fb-cover-preview-card {
    background: rgba(255, 255, 255, .035);
}

[data-bs-theme="dark"] .fb-dropzone {
    background: rgba(255, 255, 255, .025);
}

/* 响应式 */

@media (max-width: 991.98px) {
    .fb-hero {
        padding: 28px;
    }

    .fb-hero-art {
        display: none;
    }

    .fb-detail {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 32px;
    }

    .fb-detail-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fb-upload-grid {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 22px;
    }

    .fb-shortcut-hint {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .fb-hero {
        flex-direction: column;
        align-items: flex-start;
        min-height: 0;
        padding: 24px 22px;
        border-radius: 18px;
    }

    .fb-hero h1 {
        font-size: 32px;
    }

    .fb-hero-actions {
        width: 100%;
    }

    .fb-btn-upload {
        width: auto;
    }

    .fb-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .fb-search {
        width: 100%;
    }

    .fb-shelf {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 16px;
    }

    .fb-book-cover {
        border-radius: 3px 8px 8px 3px;
    }

    .fb-cover-letter {
        font-size: 56px;
    }

    .fb-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .fb-detail-cover-wrap {
        width: 210px;
        margin: 0 auto;
    }

    .fb-detail-main {
        padding-top: 0;
        text-align: left;
    }

    .fb-detail-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 10px;
    }

    .fb-open-book {
        width: 100%;
    }

    .fb-upload-grid {
        grid-template-columns: 1fr;
    }

    .fb-upload-side {
        order: -1;
    }

    .fb-cover-preview-card {
        position: static;
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .fb-cover-preview-card h2 {
        display: none;
    }

    .fb-cover-preview {
        flex: 0 0 116px;
    }

    .fb-cover-preview-hint {
        margin: 0;
    }

    .fb-field-row {
        grid-template-columns: 1fr;
    }

    .fb-reader {
        height: calc(100vh - 96px);
        min-height: 520px;
        border-radius: 14px;
    }

    .fb-reader-bar {
        gap: 8px;
        padding: 9px 10px;
    }

    .fb-reader-back span,
    .fb-icon-btn span {
        display: none;
    }

    .fb-reader-heading h1 {
        font-size: 13px;
    }

    .fb-reader-heading em {
        display: none;
    }

    .fb-reader-stage {
        padding: 6px 8px 10px;
    }

    .fb-reader-controls {
        gap: 6px;
        padding: 8px 10px 12px;
    }

    .fb-nav-btn {
        width: 34px;
        height: 34px;
    }

    .fb-mode-btn span {
        display: none;
    }

    .fb-mode-btn {
        padding: 8px 9px;
    }

    .fb-page-control {
        gap: 8px;
    }

    .fb-page-label {
        font-size: 10px;
    }

    .fb-toc-panel {
        width: 90%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fb-book-card,
    .fb-book-cover,
    .fb-filter,
    .fb-toc-panel {
        transition: none !important;
    }
}
