/* ===========================
   ShortNovel Theme - site.css
   Mobile-first, max-width 440px
   Matches Figma design: ShortNovel node 11:3
   =========================== */

/* Using system fonts matching HX theme — no external font downloads */

:root {
    --sn-primary: #FF6B6B;
    --sn-primary-dark: #E85D5D;
    --sn-primary-light: #FFE8E8;
    --sn-bg: #FAFAF8;
    --sn-white: #ffffff;
    --sn-text: #1A1A2E;
    --sn-text-secondary: #6B7280;
    --sn-text-muted: #9CA3AF;
    --sn-border: #E5E7EB;
    --sn-gray-bg: #F6F7F8;
    --sn-radius: 16px;
    --sn-radius-sm: 10px;
    --sn-radius-xs: 8px;
    --sn-tabbar-height: 62px;
    --sn-header-height: 56px;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: 'Droid Sans', Noto, 'PingFang SC', sans-serif;
    background: var(--sn-bg);
    color: var(--sn-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.imgbox {
    position: relative;
    overflow: hidden;
    background: #eee;
}
.imgbox img { width: 100%; display: block; }
.imgbox .imgmask { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; }

/* === PC NavBar (hidden on mobile, shown >= 768px) === */
.sn-navbar { display: none; }

@media (min-width: 768px) {
    .sn-navbar {
        display: block;
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--sn-white);
        border-bottom: 1px solid var(--sn-border);
    }

    .sn-navbar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 1080px;
        margin: 0 auto;
        height: 64px;
        padding: 0 40px;
    }

    .sn-navbar-left {
        display: flex;
        align-items: center;
        gap: 32px;
    }

    .sn-navbar-logo {
        font-size: 20px;
        font-weight: 700;
        color: var(--sn-primary);
        white-space: nowrap;
    }

    .sn-navbar-links {
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .sn-navlink {
        font-size: 14px;
        font-weight: 400;
        color: var(--sn-text-secondary);
        transition: color 0.2s;
    }

    .sn-navlink:hover,
    .sn-navlink.active {
        color: var(--sn-primary);
        font-weight: 600;
    }

    .sn-navbar-right {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .sn-navbar-search {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--sn-gray-bg);
        border-radius: 20px;
        padding: 0 16px;
        height: 36px;
        width: 240px;
        cursor: pointer;
    }

    .sn-navbar-search span {
        font-size: 14px;
        color: var(--sn-text-muted);
    }

    .sn-navbar-login-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 36px;
        padding: 0 20px;
        background: var(--sn-primary);
        color: #fff;
        border-radius: 18px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
    }

    .sn-navbar-login-btn:hover {
        background: var(--sn-primary-dark);
    }

    .sn-navbar-avatar img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
    }
}

/* === Mobile Header (shown on mobile, hidden >= 768px) === */
.sn-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--sn-white);
    height: var(--sn-header-height);
}

.sn-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 100%;
}

.sn-logo a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sn-logo-icon { flex-shrink: 0; }

.sn-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--sn-text);
    letter-spacing: 0.5px;
}

.sn-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sn-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sn-text-secondary);
    padding: 6px;
    display: flex;
    align-items: center;
    border-radius: 50%;
}

.sn-search-btn:active { background: var(--sn-bg); }

@media (min-width: 768px) {
    .sn-header { display: none; }
}

/* === Main Content === */
.sn-main {
    padding-top: var(--sn-header-height);
    padding-bottom: calc(var(--sn-tabbar-height) + env(safe-area-inset-bottom, 0px) + 8px);
}

.sn-main.sn-no-mobile-header {
    padding-top: 0;
}

@media (min-width: 768px) {
    .sn-main {
        padding-top: 0;
        padding-bottom: 0;
        max-width: 1080px;
        margin: 0 auto;
    }

    .sn-main.sn-no-mobile-header {
        padding-top: 0;
    }
}

.sn-pagebody {
}

.sn-home {
    padding: 12px 0 20px;
}

/* Home Search Bar (pill style below header) */
.sn-home-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--sn-gray-bg);
    border-radius: 20px;
    padding: 0 16px 0 12px;
    height: 40px;
    margin: 0 16px 16px;
    cursor: pointer;
}

.sn-home-search svg { flex-shrink: 0; color: var(--sn-text-muted); }

.sn-home-search span {
    font-size: 14px;
    color: var(--sn-text-muted);
}

/* PC: hide home inline search (navbar has its own) */
@media (min-width: 768px) {
    .sn-home-search { display: none; }

    .sn-home {
        padding-top: 0;
    }
}

/* === Banner / Carousel === */
.sn-banner {
    position: relative;
    overflow: hidden;
    margin: 0 12px 16px;
    border-radius: var(--sn-radius);
}

.sn-banner-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.sn-banner-slide {
    min-width: 100%;
    position: relative;
    display: block;
    flex-shrink: 0;
    transition: transform 0.4s ease, filter 0.4s ease, opacity 0.4s ease;
}

.sn-banner-img {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: var(--sn-radius);
}

.sn-banner-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sn-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.3) 50%, transparent);
    border-radius: 0 0 var(--sn-radius) var(--sn-radius);
}

.sn-banner-overlay h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0,0,0,0.15);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    line-height: 28px;
}

.sn-banner-overlay p {
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-shadow: 0 3px 6px rgba(0,0,0,0.12);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sn-banner-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 4px;
}

.sn-banner-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sn-text-muted);
    opacity: 0.4;
    transition: all 0.3s;
}

.sn-banner-dots .dot.active {
    width: 20px;
    border-radius: 3px;
    background: var(--sn-primary);
    opacity: 1;
}

/* Banner arrows: hidden by default (mobile), shown on PC */
.sn-banner-arrow { display: none; }

/* PC Banner: center-mode 3-column with blurred sides */
@media (min-width: 768px) {
    .sn-banner {
        margin: 24px auto 24px;
        max-width: 1080px;
        border-radius: 0;
        overflow: hidden;
    }

    .sn-banner-track {
        /* no extra styles needed */
    }

    .sn-banner-slide {
        min-width: 60%;
        padding: 0 8px;
        box-sizing: border-box;
        filter: blur(4px);
        opacity: 0.5;
        transform: scale(0.92);
    }

    .sn-banner-slide.active {
        filter: none;
        opacity: 1;
        transform: scale(1);
    }

    .sn-banner-img {
        padding-bottom: 38%;
        border-radius: 16px;
    }

    .sn-banner-overlay {
        border-radius: 0 0 16px 16px;
    }

    .sn-banner-overlay h3 {
        font-size: 24px;
    }

    /* Arrow buttons */
    .sn-banner-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255,255,255,0.9);
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #333;
        box-shadow: 0 2px 12px rgba(0,0,0,0.15);
        transition: background 0.2s, transform 0.2s;
    }

    .sn-banner-arrow:hover {
        background: #fff;
        transform: translateY(-50%) scale(1.08);
    }

    .sn-banner-arrow-left { left: 16px; }
    .sn-banner-arrow-right { right: 16px; }
}

/* === Sections === */
.sn-section {
    margin-bottom: 24px;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .sn-section {
        padding: 0 40px;
        margin-bottom: 32px;
    }

    .sn-section-header h2 {
        font-size: 24px;
    }
}

.sn-section-center { text-align: center; }

.sn-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sn-section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--sn-text);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 24px;
}

.sn-section-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.sn-more {
    font-size: 13px;
    color: var(--sn-primary);
    white-space: nowrap;
    font-weight: 400;
}

/* === Hot Recommendations (2-col wide covers) === */
.sn-hot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sn-hot-card {
    display: block;
    border-radius: var(--sn-radius-sm);
    overflow: hidden;
}

.sn-hot-card-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--sn-radius-sm);
    background: #eee;
}

.sn-hot-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sn-hot-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--sn-text);
    margin-top: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 20px;
}

/* === Category Grid (4 colored icons) === */
.sn-cate-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    text-align: center;
}

.sn-cate-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sn-cate-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.sn-cate-icon svg {
    width: 28px;
    height: 28px;
}

.sn-cate-name {
    font-size: 13px;
    color: var(--sn-text);
    font-weight: 700;
    line-height: 18px;
}

/* === Free Banner (Blue gradient CTA card) === */
.sn-free-banner {
    display: block;
    background: linear-gradient(135deg, #FF6B6B 0%, #ee5a24 100%);
    border-radius: var(--sn-radius);
    overflow: hidden;
    color: #fff;
}

.sn-free-banner-inner {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sn-free-banner-text h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 26px;
}

.sn-free-banner-text p {
    font-size: 13px;
    opacity: 0.85;
    line-height: 18px;
}

.sn-free-banner-btn {
    display: inline-block;
    align-self: flex-start;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 24px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.sn-free-banner-btn:active { background: rgba(255,255,255,0.3); }

/* === Book List (Vertical - for 最新更新, 分类精选) === */
.sn-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sn-book-listitem {
    display: flex;
    gap: 12px;
    padding: 12px 8px;
    border-radius: var(--sn-radius-sm);
    align-items: center;
    border-bottom: 1px solid var(--sn-border);
}

.sn-book-listitem:last-child { border-bottom: none; }

.sn-book-listitem:active { background: rgba(0,0,0,0.02); }

.sn-book-listitem-cover {
    flex-shrink: 0;
    width: 64px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
    .sn-book-listitem-cover {
        width: 108px;
    }
}

.sn-book-listitem-cover .imgbox {
    border-radius: 4px;
    position: relative;
    width: 100%;
    /* H5 */
    height: 85px;
    aspect-ratio: 3 / 4;
}

.sn-book-listitem-cover .imgbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sn-book-listitem:hover .sn-book-listitem-cover .imgbox img {
    transform: scale(1.06);
}

.sn-book-listitem-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.sn-book-listitem-info h3 {
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 20px;
    color: var(--sn-text);
}

.sn-book-desc {
    font-size: 13px;
    color: var(--sn-text-secondary);
    line-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sn-book-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--sn-text-muted);
    margin-top: 2px;
}

.sn-book-author { color: var(--sn-text-secondary); }

.sn-tag-finish {
    padding: 1px 8px;
    border-radius: 4px;
    background: #d1fae5;
    color: #065f46;
    font-size: 11px;
    font-weight: 600;
}

.sn-tag-serial {
    padding: 1px 8px;
    border-radius: 4px;
    background: var(--sn-primary-light);
    color: var(--sn-primary);
    font-size: 11px;
    font-weight: 600;
}

.sn-book-chapters { color: var(--sn-text-muted); }
.sn-book-reads { color: var(--sn-text-muted); }

/* === Tabs (Category Select) === */
.sn-tabs-nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 12px;
    background: var(--sn-bg);
    border-radius: var(--sn-radius-sm);
    padding: 4px;
}

.sn-tabs-nav::-webkit-scrollbar { display: none; }

.sn-tab-btn {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sn-text-secondary);
    background: none;
    border: none;
    border-radius: var(--sn-radius-xs);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sn-tab-btn.active {
    color: var(--sn-primary);
    background: var(--sn-white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.sn-tabs-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 80px;
}

/* === Rank List === */
.sn-rank-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sn-rank-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 8px;
    border-radius: var(--sn-radius-sm);
}

.sn-rank-item:active { background: rgba(0,0,0,0.02); }

.sn-rank-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--sn-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--sn-text-muted);
    background: var(--sn-gray-bg);
    position: relative;
}

.sn-rank-crown {
    display: none;
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
}

.sn-rank-num.top-1 {
    background: linear-gradient(135deg, #F59E0B, #F97316);
    color: #fff;
}

.sn-rank-num.top-2 {
    background: linear-gradient(135deg, #9CA3AF, #C0C0C0);
    color: #fff;
}

.sn-rank-num.top-3 {
    background: linear-gradient(135deg, #CD7F32, #B8733A);
    color: #fff;
}

.sn-rank-num.top .sn-rank-crown {
    display: block;
}

.sn-rank-num.top-1 .sn-rank-crown { color: #FFD700; }
.sn-rank-num.top-2 .sn-rank-crown { color: #E8E8E8; }
.sn-rank-num.top-3 .sn-rank-crown { color: #FFDAB0; }

.sn-rank-cover {
    flex-shrink: 0;
    width: 48px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
    .sn-rank-cover {
        width: 108px;
    }
}

.sn-rank-cover .imgbox {
    border-radius: 4px;
    position: relative;
    width: 100%;
    /* H5 */
    height: 64px;
    aspect-ratio: 3 / 4;
}

.sn-rank-cover .imgbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sn-rank-item:hover .sn-rank-cover .imgbox img {
    transform: scale(1.06);
}

.sn-rank-info {
    flex: 1;
    min-width: 0;
}

.sn-rank-info h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 20px;
}

/* === Load More Button === */
.sn-loadmore-btn {
    display: inline-block;
    padding: 12px 40px;
    border-radius: 24px;
    border: 1.5px solid var(--sn-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--sn-text-secondary);
    background: var(--sn-white);
    transition: all 0.2s;
}

.sn-loadmore-btn:active {
    background: var(--sn-bg);
    border-color: var(--sn-text-muted);
}

/* === Bottom Tab Bar (Pill style) === */
.sn-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--sn-white);
    display: flex;
    align-items: center;
    padding: 8px 21px calc(12px + env(safe-area-inset-bottom, 0)) 21px;
}

.sn-tabbar-pill {
    display: flex;
    width: 100%;
    height: 54px;
    padding: 4px;
}

.sn-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 3px;
    color: var(--sn-text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
}

.sn-tab svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.sn-tab.active {
    color: var(--sn-primary);
}

.sn-tab span {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Hide tabbar on PC */
@media (min-width: 768px) {
    .sn-tabbar { display: none; }
}

/* === Footer (dark, PC design) === */
.sn-footer {
    display: none;
    background: #1A1A2E;
    padding: 40px 16px;
    text-align: center;
}

@media (min-width: 768px) {
    .sn-footer {
        display: block;
        padding: 40px;
    }
}

.sn-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.sn-footer-brand {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.sn-footer-desc {
    font-size: 14px;
    color: var(--sn-text-muted);
}

.sn-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
}

.sn-footer-links a {
    font-size: 13px;
    color: #9CA3AF;
    transition: color 0.2s;
}

.sn-footer-links a:hover {
    color: #fff;
}

.sn-footer-copy {
    font-size: 12px;
    color: #6B7280;
}

/* === Loading overlay === */
.loading {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
}

.loadmask {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
}

.loadani {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 4px;
}

.loadani span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: loadpulse 1s ease-in-out infinite;
}

.loadani span:nth-child(2) { animation-delay: 0.1s; }
.loadani span:nth-child(3) { animation-delay: 0.2s; }
.loadani span:nth-child(4) { animation-delay: 0.3s; }
.loadani span:nth-child(5) { animation-delay: 0.4s; }

@keyframes loadpulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.5); opacity: 1; }
}

/* === User panel in header === */
.headuser { display: flex; align-items: center; }
.headuser a { display: flex; align-items: center; }
.headuser img { width: 28px; height: 28px; border-radius: 50%; }
.sn-login-btn { color: var(--sn-text-secondary); display: flex; align-items: center; }

/* === Horizontal Scroll (for other pages reuse) === */
.sn-scroll-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.sn-scroll-list::-webkit-scrollbar { display: none; }

.sn-book-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.sn-book-scroll::-webkit-scrollbar { display: none; }

/* PC: book scroll becomes a grid */
@media (min-width: 768px) {
    .sn-book-scroll {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
        overflow-x: visible;
    }

    .sn-rank-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 24px;
    }
}

.sn-book-card {
    flex-shrink: 0;
    width: 100px;
    scroll-snap-align: start;
    display: block;
}

@media (min-width: 768px) {
    .sn-book-card {
        width: auto;
    }
}

.sn-book-card-cover {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sn-book-card-cover .imgbox {
    border-radius: 4px;
    position: relative;
    width: 100%;
    /* H5 */
    height: 133px;
    aspect-ratio: 3 / 4;
}

.sn-book-card-cover .imgbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sn-book-card:hover .sn-book-card-cover .imgbox img {
    transform: scale(1.06);
}

.sn-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.sn-badge.adult { background: #ef4444; }
.sn-badge.finish { background: #10b981; }

.sn-book-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--sn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

/* === Featured Layout (今日必讀 - hero + side grid) === */
/* === Today (今日必讀 - H5 featured hero / PC rich grid) === */

/* H5: featured hero + side grid */
.sn-featured-h5 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sn-featured-hero {
    display: flex;
    gap: 14px;
    background: var(--sn-white);
    border-radius: var(--sn-radius);
    padding: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.sn-featured-hero-cover {
    flex-shrink: 0;
    width: 100px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.sn-featured-hero-cover .imgbox {
    position: relative;
    width: 100%;
    /* H5 */
    height: 133px;
    aspect-ratio: 3 / 4;
    border-radius: 4px;
}

.sn-featured-hero-cover .imgbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sn-featured-hero:hover .sn-featured-hero-cover .imgbox img {
    transform: scale(1.06);
}

.sn-featured-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.sn-featured-hero-info h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--sn-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sn-featured-hero-info p {
    font-size: 13px;
    color: var(--sn-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sn-featured-author {
    font-size: 12px;
    color: var(--sn-text-muted);
}

.sn-featured-side {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 10px;
    overflow: hidden;
}

.sn-featured-cell {
    display: block;
    text-decoration: none;
    min-width: 0;
}

.sn-featured-cell-cover {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
    /* H5: 宽度跟随网格列宽，高度由比例自动算出 */
    width: 100%;
    aspect-ratio: 3 / 4;
}

.sn-featured-cell-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s;
}

.sn-featured-cell:hover .sn-featured-cell-cover img {
    transform: scale(1.06);
}

.sn-cell-tag {
    position: absolute;
    top: 0;
    right: 0;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    border-radius: 0 8px 0 8px;
}

.sn-cell-tag.finish { background: #10b981; }
.sn-cell-tag.serial { background: var(--sn-primary); }

.sn-featured-cell-title {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* PC: hide H5 featured, show rich grid */
.sn-today-grid { display: none; }

@media (min-width: 768px) {
    .sn-featured-h5 { display: none; }

    .sn-today-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}

.sn-today-card {
    display: block;
}

.sn-today-cover {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sn-today-cover .imgbox {
    position: relative;
    width: 100%;
    /* H5 — 今日必讀PC版不在H5显示，此处仅作基础值 */
    height: 245px;
    aspect-ratio: 3 / 4;
    border-radius: 4px;
}

.sn-today-cover .imgbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sn-today-card:hover .sn-today-cover .imgbox img {
    transform: scale(1.06);
}

.sn-today-cover .sn-badge {
    padding: 2px 8px;
    z-index: 1;
}

.sn-today-cover .sn-badge.finish { background: #10b981; }
.sn-today-cover .sn-badge.serial { background: var(--sn-primary); }
.sn-today-cover .sn-badge.adult { top: auto; bottom: 6px; left: auto; background: #ef4444; }

.sn-today-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sn-today-info h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--sn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.sn-today-author {
    font-size: 12px;
    color: var(--sn-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sn-today-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--sn-text-muted);
}

@media (min-width: 768px) {
    .sn-today-info h3 {
        font-size: 14px;
    }

    .sn-today-author {
        font-size: 13px;
    }

    .sn-today-meta {
        font-size: 12px;
    }
}

/* === Tinted Section (subtle variety) === */
.sn-section-tinted {
    /* no background change — blends with page */
}

/* === Popular List (大家都愛看 - list items, multi-col on PC) === */
.sn-popular-list {
    display: flex;
    flex-direction: column;
}

.sn-popular-list .sn-book-listitem:nth-child(n+7) {
    display: none;
}

@media (min-width: 768px) {
    .sn-popular-list .sn-book-listitem:nth-child(n+7) {
        display: flex;
    }
}

@media (min-width: 768px) {
    .sn-popular-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 24px;
    }
}

/* === Book Grid (static grid, not scrollable) === */
.sn-book-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.sn-book-grid .sn-book-card:nth-child(n+7) {
    display: none;
}

@media (min-width: 768px) {
    .sn-book-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }

    .sn-book-grid .sn-book-card:nth-child(n+7) {
        display: block;
    }
}

/* === Page-specific tab highlight === */
body.page-library .sn-tabbar a[href="/library/"],
body.page-rank .sn-tabbar a[href="/rank/"] {
    color: var(--sn-primary);
}

body.page-library .sn-tabbar a[href="/"],
body.page-rank .sn-tabbar a[href="/"] {
    color: var(--sn-text-muted);
}

/* ============================================
   Page Header (for Library, Rank, History, User)
   ============================================ */
.sn-page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--sn-header-height);
    background: var(--sn-white);
    position: sticky;
    top: 0;
    z-index: 50;
}

.sn-page-header h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--sn-text);
}

.sn-page-header .sn-edit-btn {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--sn-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.sn-back-btn {
    display: flex;
    align-items: center;
    padding: 4px;
    color: var(--sn-text);
}

/* ============================================
   Library Page (书库)
   ============================================ */
.sn-library {
    padding-bottom: 20px;
    position: relative;
}

.sn-filter-bar {
    padding: 0 16px;
    margin-bottom: 8px;
}

.sn-filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
}

.sn-filter-scroll::-webkit-scrollbar { display: none; }

.sn-filter-tag {
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sn-text-secondary);
    background: var(--sn-gray-bg);
    border: 1.5px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.sn-filter-tag.active {
    color: var(--sn-primary);
    background: var(--sn-primary-light);
    border-color: var(--sn-primary);
}

.sn-sub-tag {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sn-text-muted);
    background: none;
    white-space: nowrap;
}

.sn-sub-tag.active {
    color: var(--sn-primary);
    background: var(--sn-primary-light);
}

/* === Tag Filter (2-row collapsed + dropdown arrow) === */
.sn-tag-filter {
    display: flex;
    align-items: flex-start;
    padding: 20px 16px 4px;
    margin-bottom: 10px;
    gap: 8px;
}
.sn-tag-filter-inner {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    max-height: 58px;
    overflow: hidden;
    transition: max-height 0.3s;
    line-height: 25px;
}
.sn-tag-item {
    display: inline-block;
    padding: 2px 0;
    font-size: 13px;
    color: var(--sn-text-secondary);
    white-space: nowrap;
    transition: color 0.2s;
    line-height: 25px;
}
.sn-tag-item.active {
    color: var(--sn-primary);
    font-weight: 700;
    background: var(--sn-primary-light);
    border-radius: 12px;
    padding: 2px 10px;
}
.sn-tag-item:hover {
    color: var(--sn-primary);
}
.sn-tag-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-top: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sn-border);
    border-radius: 6px;
    background: var(--sn-white);
    color: var(--sn-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.sn-tag-toggle:hover {
    border-color: var(--sn-primary);
    color: var(--sn-primary);
}
.sn-tag-toggle.open svg {
    transform: rotate(180deg);
}

/* Tag dropdown overlay */
.sn-tag-dropdown {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--sn-bg);
    flex-direction: column;
}
.sn-tag-dropdown.open {
    display: flex;
}
.sn-tag-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--sn-border);
}
.sn-tag-dropdown-header span {
    font-size: 16px;
    font-weight: 700;
    color: var(--sn-text);
}
.sn-tag-dropdown-header button {
    background: none;
    border: none;
    color: var(--sn-text-muted);
    cursor: pointer;
    padding: 4px;
}
.sn-tag-dropdown-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-content: flex-start;
}
.sn-tag-dropdown-body .sn-tag-item {
    padding: 8px 4px;
    font-size: 14px;
}

/* PC: dropdown as floating panel */
@media (min-width: 768px) {
    /* .sn-tag-filter {
        padding: 8px 0 4px;
    } */
    .sn-tag-dropdown {
        position: absolute;
        top: auto; bottom: auto; left: 16px; right: 16px;
        max-height: 320px;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.12);
        border: 1px solid var(--sn-border);
    }
    .sn-tag-dropdown-body {
        gap: 6px 20px;
    }
}

/* === Pagination === */
.sn-pagination {
    padding: 16px;
    text-align: center;
}
.sn-pagination ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.sn-pagination ul li {
    display: inline-block;
}
.sn-pagination ul li a,
.sn-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sn-text-secondary);
    background: var(--sn-gray-bg);
    transition: all 0.2s;
    text-decoration: none;
}
.sn-pagination ul li a:hover {
    background: var(--sn-primary-light);
    color: var(--sn-primary);
}
.sn-pagination ul li.current span,
.sn-pagination ul li.current a {
    background: var(--sn-primary);
    color: #fff;
}
.sn-pagination ul li.firstpage a,
.sn-pagination ul li.lastpage a {
    font-size: 12px;
}
.sn-pagination ul li.sn-page-dots span {
    background: none;
    border: none;
    color: var(--sn-text-muted);
    font-size: 14px;
    min-width: 20px;
    padding: 0 2px;
    cursor: default;
}

/* === Follow Pager (prev/next for AJAX follow list) === */
.sn-follow-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
}
.sn-follow-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    font-size: 13px;
    color: var(--sn-primary);
    background: var(--sn-primary-light);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}
.sn-follow-pager-btn:hover {
    background: var(--sn-primary);
    color: #fff;
}
.sn-follow-pager-info {
    font-size: 13px;
    color: var(--sn-text-muted);
}

/* === Library Grid: H5 3cols (21 items), PC 6cols (30 items) === */
.sn-lib-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px 10px !important;
    padding: 0 16px;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}
.sn-lib-grid .sn-grid-card:nth-child(n+7) {
    display: block !important;
}
/* H5: hide items beyond 21 (7 rows × 3 cols) */
.sn-lib-grid .sn-grid-card:nth-child(n+22) {
    display: none !important;
}
@media (min-width: 768px) {
    .sn-lib-grid {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 20px 16px !important;
    }
    /* PC: show all 30 items */
    .sn-lib-grid .sn-grid-card:nth-child(n+22) {
        display: block !important;
    }
}

.sn-grid-card { display: block; min-width: 0; }

.sn-grid-card-cover {
    border-radius: var(--sn-radius-xs);
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sn-grid-card-cover .imgbox {
    border-radius: var(--sn-radius-xs);
    position: relative;
    width: 100%;
    /* H5 */
    height: 140px;
    aspect-ratio: 3 / 4;
}
.sn-grid-card-cover .imgbox img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sn-grid-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--sn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 18px;
}

.sn-grid-card-author {
    font-size: 11px;
    color: var(--sn-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}

.sn-grid-card-meta {
    font-size: 11px;
    color: var(--sn-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}
.sn-grid-card-meta span {
    margin-left: 6px;
    color: var(--sn-text-muted);
    font-size: 10px;
}

/* ============================================
   Rank Page (排行榜)
   ============================================ */
.sn-rank-page {
    padding-bottom: 20px;
}

.sn-rank-page .sn-tabs-nav {
    margin: 0 16px 16px;
}

.sn-rank-page .sn-rank-list {
    padding: 0 16px;
}

/* ============================================
   Book Detail Page (书籍详情)
   ============================================ */
.sn-book-detail {
    padding-bottom: 80px;
}

/* Floating back button (replaces header) */
.sn-detail-back-float {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 50;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sn-detail-content {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sn-detail-cover-wrap {
    display: flex;
    justify-content: center;
}

.sn-detail-cover {
    width: 160px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.sn-detail-cover .imgbox {
    border-radius: var(--sn-radius-sm);
    position: relative;
    width: 100%;
    /* H5 */
    height: 213px;
    aspect-ratio: 3 / 4;
}

.sn-detail-cover .imgbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .sn-detail-cover {
        width: 200px;
    }
}

.sn-detail-info {
    text-align: center;
}

.sn-detail-info h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 30px;
}

.sn-detail-author-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--sn-text-secondary);
}

.sn-detail-author {
    color: var(--sn-primary);
    font-weight: 600;
    text-decoration: none;
}

.sn-detail-author:hover {
    text-decoration: underline;
}

.sn-detail-dot {
    color: var(--sn-text-muted);
}

.sn-detail-status {
    color: var(--sn-text-secondary);
}

.sn-detail-score {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #f59e0b;
    font-weight: 700;
    font-size: 14px;
}

.sn-detail-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.sn-detail-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    background: linear-gradient(120deg, var(--sn-primary), var(--sn-primary-dark));
}

.sn-detail-tag.tag-color-0 { background: linear-gradient(120deg, #667eea, #764ba2); }
.sn-detail-tag.tag-color-1 { background: linear-gradient(120deg, #f093fb, #c2185b); }
.sn-detail-tag.tag-color-2 { background: linear-gradient(120deg, #4facfe, #1565c0); }
.sn-detail-tag.tag-color-3 { background: linear-gradient(120deg, #11998e, #38ef7d); }
.sn-detail-tag.tag-color-4 { background: linear-gradient(120deg, #fa709a, #d84315); }
.sn-detail-tag.tag-color-5 { background: linear-gradient(120deg, #30cfd0, #330867); }
.sn-detail-tag.tag-color-6 { background: linear-gradient(120deg, #8e44ad, #c0392b); }
.sn-detail-tag.tag-color-7 { background: linear-gradient(120deg, #ff6b6b, #ee5a6f); }
.sn-detail-tag.tag-color-8 { background: linear-gradient(120deg, #f39c12, #e67e22); }
.sn-detail-tag.tag-color-9 { background: linear-gradient(120deg, #16a085, #2980b9); }

.sn-detail-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.sn-detail-stats {
    display: flex;
    background: var(--sn-white);
    border-radius: 12px;
    padding: 16px 0;
}

.sn-stat-item {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid var(--sn-border);
}

.sn-stat-item:last-child { border-right: none; }

.sn-stat-item strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--sn-text);
}

.sn-stat-item span {
    font-size: 11px;
    color: var(--sn-text-muted);
}

.sn-detail-synopsis {
    background: var(--sn-white);
    border-radius: var(--sn-radius-sm);
    padding: 16px;
}

.sn-detail-synopsis h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.sn-detail-synopsis p {
    font-size: 14px;
    color: var(--sn-text-secondary);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sn-detail-chapters {
    background: var(--sn-white);
    border-radius: var(--sn-radius-sm);
    padding: 16px;
}

.sn-detail-chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sn-detail-chapters-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.sn-chapter-preview {
    display: flex;
    flex-direction: column;
}

.sn-chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--sn-border);
}

.sn-chapter-name {
    font-size: 13px;
    color: var(--sn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.sn-chapter-status {
    font-size: 11px;
    color: var(--sn-text-muted);
    flex-shrink: 0;
    margin-left: 12px;
}

/* All catalog button at bottom of latest chapters */
.sn-all-catalog-btn {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 10px 0;
    border-radius: 22px;
    border: 1.5px solid var(--sn-primary);
    color: var(--sn-primary);
    font-size: 14px;
    font-weight: 700;
}

.sn-all-catalog-btn:active {
    background: var(--sn-primary-light);
}

/* Action Buttons (inline, above synopsis) */
.sn-detail-actions {
    display: flex;
    gap: 12px;
}

.sn-btn-read {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 22px;
    background: var(--sn-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.sn-btn-read:active {
    background: var(--sn-primary-dark);
}

.sn-btn-collect {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    border-radius: 22px;
    border: 1.5px solid var(--sn-border);
    background: var(--sn-white);
    color: var(--sn-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sn-btn-collect.active {
    border-color: #fbbf24;
    color: #f59e0b;
    background: #fffbeb;
}

.sn-btn-collect:active {
    transform: scale(0.97);
}

/* Chapter List Modal */
.sn-chapter-list-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    overflow: hidden;
}

.sn-chapter-modal-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    touch-action: none;
}

.sn-chapter-modal-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 400px;
    height: 100%;
    background: var(--sn-white);
    border-radius: 0 var(--sn-radius) var(--sn-radius) 0;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sn-chapter-list-modal.open .sn-chapter-modal-panel {
    transform: translateX(0);
}

.sn-chapter-list-modal .sn-chapter-modal-bg {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sn-chapter-list-modal.open .sn-chapter-modal-bg {
    opacity: 1;
}

.sn-chapter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sn-border);
}

.sn-chapter-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.sn-chapter-modal-header span {
    font-size: 13px;
    color: var(--sn-text-muted);
}

.sn-chapter-modal-header button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sn-text-secondary);
}

/* Chapter modal pagination tabs */
.sn-chapter-modal-tabs {
    padding: 10px 16px;
    border-bottom: 1px solid var(--sn-border);
    flex-shrink: 0;
}

.sn-chapter-tabs-wrapper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.sn-chapter-tabs-wrapper::-webkit-scrollbar { display: none; }

.sn-chapter-tab-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sn-text-secondary);
    background: var(--sn-gray-bg);
    border: 1.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.sn-chapter-tab-btn.active {
    color: var(--sn-primary);
    background: var(--sn-primary-light);
    border-color: var(--sn-primary);
}

.sn-chapter-modal-list {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

.sn-chapter-modal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.sn-chapter-modal-item:active { background: var(--sn-bg); }

/* ============================================
   Search Page (搜索)
   ============================================ */
.sn-search-page {
    min-height: 100vh;
}

.sn-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--sn-white);
    position: sticky;
    top: 0;
    z-index: 50;
}

.sn-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--sn-gray-bg);
    border-radius: 20px;
    padding: 0 16px 0 12px;
    height: 40px;
}

.sn-search-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--sn-text);
}

.sn-search-input-wrap input::placeholder { color: var(--sn-text-muted); }

.sn-search-submit {
    background: var(--sn-primary);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.sn-search-body { padding: 16px; }

.sn-search-section { margin-bottom: 24px; }

.sn-search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sn-search-section-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.sn-search-section-header a {
    font-size: 13px;
    color: var(--sn-text-muted);
    cursor: pointer;
}

.sn-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sn-search-tag {
    padding: 6px 14px;
    border-radius: 16px;
    background: var(--sn-gray-bg);
    font-size: 13px;
    color: var(--sn-text-secondary);
    cursor: pointer;
}

.sn-search-tag:active { background: var(--sn-border); }

.sn-search-results { min-height: 200px; }

/* ============================================
   User Profile Page (我的) — HX-style layout
   ============================================ */
.sn-user-page {
    padding-bottom: 20px;
    max-width: 1080px;
    margin: 0 auto;
}

/* Header card */
.sn-mine-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 12px 16px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    overflow: hidden;
}
.sn-mine-header::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.04) 40%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 60%, transparent 100%);
    animation: sn-shine 4s ease-in-out infinite;
}
@keyframes sn-shine { 0% { left: -100%; } 50%, 100% { left: 200%; } }

.sn-mine-header.sn-mine-header-unlogin {
    cursor: pointer;
    align-items: center;
    background: linear-gradient(135deg, var(--sn-primary-light), #e0e7ff);
}
.sn-mine-header.sn-mine-header-unlogin .sn-mine-info { display: flex; flex-direction: column; }
.sn-mine-unlogin-title { font-size: 20px; font-weight: bold; color: var(--sn-text); margin: 0; }
.sn-mine-unlogin-desc { font-size: 13px; color: var(--sn-text-muted); margin: 4px 0 0; }

/* Top row: avatar + name + edit */
.sn-mine-top-row {
    width: 100%; display: flex; align-items: center; gap: 14px;
    position: relative; z-index: 1;
}

/* Avatar */
.sn-mine-avatar {
    width: 56px; height: 56px;
    border-radius: 50%; overflow: hidden; flex-shrink: 0;
    border: 3px solid var(--sn-primary);
    background: var(--sn-bg);
    display: flex; align-items: center; justify-content: center;
}
.sn-mine-avatar.placeholder { border-color: #ddd; }
.sn-mine-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Name */
.sn-mine-name { font-size: 20px; font-weight: bold; color: #fff; flex: 1; min-width: 0; }
.sn-mine-edit {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.12); border-radius: 8px;
    color: var(--sn-primary); cursor: pointer; flex-shrink: 0;
}

/* Stats — below top row */
.sn-mine-stats { width: 100%; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.sn-mine-stat-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sn-mine-stat-info { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.sn-mine-stat-info svg { flex-shrink: 0; }
.sn-mine-stat-label { font-size: 13px; color: rgba(255,255,255,0.7); flex-shrink: 0; }
.sn-mine-stat-value { font-size: 13px; font-weight: bold; color: #fff; flex-shrink: 0; }
.sn-mine-stat-btn {
    padding: 6px 14px; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,0.1); color: var(--sn-primary) !important;
    border: 1px solid var(--sn-primary); border-radius: 6px;
    white-space: nowrap; text-decoration: none;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Sign-in */
.sn-mine-signin { width: 100%; position: relative; z-index: 1; margin-top: 4px; }
.sn-signin-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sn-signin-day {
    background: rgba(255,255,255,0.08); border-radius: 8px;
    padding: 8px 4px; display: flex; flex-direction: column;
    align-items: center; gap: 4px;
}
.sn-signin-day-name { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 400; }
.sn-signin-day-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.sn-signin-action {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-top: 12px;
}
.sn-signin-reward { font-size: 13px; color: rgba(255,255,255,0.7); flex: 1; }
.sn-signin-btn {
    padding: 7px 20px; font-size: 13px; font-weight: 600;
    background: var(--sn-primary); color: #fff; border: none;
    border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.sn-signin-btn:disabled { opacity: 0.5; cursor: default; }

/* Menu entries */
.sn-mine-entries {
    margin: 16px 16px 0;
    background: var(--sn-white);
    border-radius: var(--sn-radius);
    overflow: hidden;
}
.sn-mine-entry {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 16px; color: var(--sn-text); font-size: 15px;
    text-decoration: none; transition: background 0.15s;
}
.sn-mine-entry:active { background: var(--sn-bg); }
.sn-mine-entry-left { display: flex; align-items: center; gap: 14px; }
.sn-mine-entry-icon {
    width: 32px; height: 32px;
    background: var(--sn-primary-light); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--sn-primary); flex-shrink: 0;
}
.sn-mine-entry-icon.logout { background: #fef2f2; color: #ef4444; }
.sn-mine-entry-logout span { color: #ef4444; }

/* Mask overlay */
.sn-mask {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 999;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 15vh;
}

/* Modal */
.sn-modal {
    background: var(--sn-white); border-radius: 16px;
    width: 90%; max-width: 440px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: sn-modal-in 0.25s ease;
}
@keyframes sn-modal-in { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.sn-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid var(--sn-border);
}
.sn-modal-header h3 { font-size: 18px; font-weight: bold; margin: 0; }
.sn-modal-close {
    width: 32px; height: 32px; border: none; background: none;
    font-size: 22px; color: #999; cursor: pointer; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.sn-modal-close:hover { background: var(--sn-bg); color: var(--sn-text); }
.sn-modal-body { padding: 20px; }
.sn-form-group { margin-bottom: 16px; }
.sn-form-group:last-child { margin-bottom: 0; }
.sn-form-group label { display: block; font-size: 14px; font-weight: 400; margin-bottom: 8px; color: var(--sn-text); }
.sn-form-input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--sn-border);
    border-radius: 8px; font-size: 14px; box-sizing: border-box;
    background: var(--sn-bg); color: var(--sn-text);
}
.sn-form-input:focus { outline: none; border-color: var(--sn-primary); }
.sn-modal-footer {
    display: flex; gap: 12px; padding: 16px 20px;
    border-top: 1px solid var(--sn-border);
}
.sn-modal-footer button { flex: 1; padding: 10px; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; font-weight: 400; }
.sn-btn-cancel { background: var(--sn-bg); color: var(--sn-text-muted); }
.sn-btn-save { background: var(--sn-primary); color: #fff; }

/* Avatar section in edit modal */
.sn-avatar-section { display: flex; align-items: center; gap: 16px; }
.sn-current-avatar { width: 70px; height: 70px; border-radius: 50%; overflow: hidden; border: 3px solid var(--sn-primary); }
.sn-current-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sn-change-avatar-btn {
    padding: 8px 16px; background: var(--sn-primary); color: #fff;
    border: none; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.sn-avatar-library {
    margin-top: 12px; padding: 12px; background: var(--sn-bg);
    border-radius: 10px; max-height: 240px; overflow-y: auto;
}
.sn-avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sn-avatar-option {
    aspect-ratio: 1; border-radius: 50%; overflow: hidden; cursor: pointer;
    border: 3px solid transparent;
}
.sn-avatar-option.selected { border-color: var(--sn-primary); }
.sn-avatar-option img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* PC responsive */
@media (min-width: 768px) {
    .sn-mine-header { padding: 30px; gap: 20px; margin: 16px 0 0; }
    .sn-mine-avatar { width: 64px; height: 64px; }
    .sn-mine-name { font-size: 24px; }
    .sn-mine-stat-label, .sn-mine-stat-value { font-size: 16px; }
    .sn-mine-entries { margin: 20px 0 0; }
    .sn-mine-entry { padding: 18px 24px; }
}

/* ============================================
   Toast & Confirm
   ============================================ */
.sn-toast {
    position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,0.78); color: #fff;
    padding: 10px 24px; border-radius: 8px;
    font-size: 14px; white-space: nowrap; z-index: 10000;
    pointer-events: none; opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
}
.sn-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.sn-confirm-mask {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.sn-confirm-mask.show { opacity: 1; }
.sn-confirm-box {
    background: var(--sn-white, #fff); border-radius: 14px;
    width: 280px; max-width: 90vw; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    transform: scale(0.9); transition: transform 0.2s;
}
.sn-confirm-mask.show .sn-confirm-box { transform: scale(1); }
.sn-confirm-msg {
    padding: 28px 24px 20px; text-align: center;
    font-size: 15px; line-height: 1.5; color: var(--sn-text, #333);
}
.sn-confirm-btns {
    display: flex; border-top: 1px solid var(--sn-border, #eee);
}
.sn-confirm-btns button {
    flex: 1; padding: 14px 0; border: none; background: none;
    font-size: 16px; cursor: pointer; transition: background 0.15s;
}
.sn-confirm-btns button:active { background: var(--sn-bg, #f5f5f5); }
.sn-confirm-cancel { color: var(--sn-text-muted, #999); }
.sn-confirm-ok { color: var(--sn-primary, #4f46e5); font-weight: 600; border-left: 1px solid var(--sn-border, #eee) !important; }

/* ============================================
   Login Dialog (登录弹窗)
   ============================================ */
.sn-login-panel {
    position: relative;
    background: var(--sn-bg);
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.sn-login-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: var(--sn-gray-bg);
    cursor: pointer;
    color: var(--sn-text-muted);
    transition: background 0.2s;
}
.sn-login-close:hover {
    background: var(--sn-border);
    color: var(--sn-text);
}

.sn-login-logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--sn-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sn-login-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--sn-text);
    margin: 0;
}

.sn-login-subtitle {
    font-size: 13px;
    color: var(--sn-text-muted);
    margin-top: -8px;
}

.sn-login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sn-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--sn-gray-bg);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0 14px;
    height: 44px;
    transition: border-color 0.2s;
}
.sn-input-group:focus-within {
    border-color: var(--sn-primary);
}

.sn-input-group input {
    flex: 1;
    border: none;
    outline: none;
    background: none;
    font-size: 14px;
    color: var(--sn-text);
}

.sn-input-group input::placeholder { color: var(--sn-text-muted); }

.sn-login-submit {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    background: var(--sn-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s;
}
.sn-login-submit:hover { opacity: 0.9; }
.sn-login-submit:active { background: var(--sn-primary-dark); }

.sn-login-terms {
    font-size: 11px;
    color: var(--sn-text-muted);
    text-align: center;
    margin-top: 4px;
}

.sn-login-switch {
    text-align: center;
    font-size: 13px;
    color: var(--sn-text-secondary);
}
.sn-login-switch a {
    color: var(--sn-primary);
    font-weight: 600;
    cursor: pointer;
}

.sn-login-msg {
    text-align: center;
    color: #ef4444;
    font-size: 13px;
    padding: 0;
    display: none;
}

/* layer.js skin overrides for login dialog */
.layui-m-layer-sn-login-layer {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 90% !important;
    max-width: 380px !important;
}
.layui-m-layer-sn-login-layer .layui-m-layercont {
    padding: 0 !important;
}
.layui-m-layer-sn-login-layer .layui-m-layerbtn {
    display: none !important;
}
.layui-m-layer-sn-login-layer .sn-login-panel,
.layui-m-layer-sn-login-layer .sn-login-panel *,
.layui-m-layer-sn-login-layer .sn-login-panel *::before,
.layui-m-layer-sn-login-layer .sn-login-panel *::after {
    box-sizing: border-box !important;
}

/* ============================================
   History / Bookshelf Page (书架)
   ============================================ */
.sn-shelf-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--sn-border);
}
.sn-shelf-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--sn-text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.sn-shelf-tab.active {
    color: var(--sn-primary);
    border-bottom-color: var(--sn-primary);
}
.sn-loading-placeholder {
    text-align: center;
    padding: 40px 0;
    color: var(--sn-text-muted);
    font-size: 14px;
}

.sn-history-page {
    padding-bottom: 20px;
}

.sn-history-content {
    padding: 16px;
}

.sn-history-list {
    display: flex;
    flex-direction: column;
}

.sn-history-item {
    display: flex;
    align-items: center;
}

.sn-history-link {
    flex: 1;
    display: flex;
    gap: 12px;
    padding: 12px 8px;
    align-items: center;
    border-radius: var(--sn-radius-sm);
    min-width: 0;
}

.sn-history-del {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--sn-text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}
.sn-history-del:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}
.sn-history-del:active {
    color: #ef4444;
}

.sn-history-link:active { background: rgba(0,0,0,0.02); }

.sn-history-cover {
    flex-shrink: 0;
    width: 56px;
    border-radius: var(--sn-radius-xs);
    overflow: hidden;
}

.sn-history-cover .imgbox {
    border-radius: var(--sn-radius-xs);
    position: relative;
    width: 100%;
    /* H5 */
    height: 75px;
    aspect-ratio: 3 / 4;
}

.sn-history-cover .imgbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .sn-history-cover {
        width: 80px;
    }
}

.sn-history-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sn-history-info h3 {
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sn-history-progress {
    font-size: 12px;
    color: var(--sn-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sn-history-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--sn-gray-bg);
    border-radius: 2px;
    overflow: hidden;
}

.sn-history-progress-fill {
    height: 100%;
    background: var(--sn-primary);
    border-radius: 2px;
    transition: width 0.3s;
}

.sn-history-pct {
    font-size: 11px;
    font-weight: 400;
    color: var(--sn-text-muted);
}

.sn-history-meta {
    font-size: 12px;
    color: var(--sn-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sn-history-time {
    font-size: 11px;
    color: var(--sn-text-muted);
    opacity: 0.7;
}

.sn-history-actions {
    position: fixed;
    bottom: var(--sn-tabbar-height);
    left: 0;
    right: 0;
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: var(--sn-white);
    border-top: 1px solid var(--sn-border);
    z-index: 50;
}

.sn-btn-select-all,
.sn-btn-delete {
    flex: 1;
    height: 40px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.sn-btn-select-all {
    background: var(--sn-bg);
    color: var(--sn-text-secondary);
}

.sn-btn-delete {
    background: #ef4444;
    color: #fff;
}

/* Empty state */
.sn-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 80px 0;
    text-align: center;
}

.sn-empty p {
    font-size: 14px;
    color: var(--sn-text-muted);
}

.sn-empty-btn {
    padding: 10px 32px;
    border-radius: 20px;
    background: var(--sn-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================
   Cover 尺寸统一管理 (H5 在各自组件基础样式中, PC 统一在此)
   所有 cover 均为 aspect-ratio: 3/4 + 固定 height
   修改高度只需改这里的数值即可
   ============================================ */

/* --- PC Cover Heights (>= 768px) --- */
@media (min-width: 768px) {
    /* 小編推薦 - BookCard (6列网格) */
    .sn-book-card-cover .imgbox          { height: 200px; }

    /* 每日更新 - BookCard in grid (5列网格) */
    .sn-book-grid .sn-book-card-cover .imgbox { height: 245px; }

    /* 排行榜 - RankItem */
    .sn-rank-cover .imgbox               { height: 140px; }

    /* 大家都愛看 - BookListItem */
    .sn-book-listitem-cover .imgbox      { height: 140px; }

    /* 今日必讀 PC版 - TodayCard (5列网格) */
    .sn-today-cover .imgbox              { height: 245px; }

    /* 書庫頁 - GridCard (6列网格) */
    .sn-grid-card-cover .imgbox          { height: 200px; }

    /* 書籍詳情頁 - DetailCover */
    .sn-detail-cover .imgbox             { height: 267px; }

    /* 閱讀歷史 - HistoryCover */
    .sn-history-cover .imgbox            { height: 107px; }
}
