/* ====================================================================
   PDF 书店 — iBooks 风格（v3 设计）+ 专业数据调查开场动画
   ==================================================================== */

/* ====================================================================
   开场动画 — 「专业数据调查」仪式感
   ==================================================================== */
#introOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background:
        radial-gradient(ellipse at center,
            #3a2418 0%,
            #1f1208 60%,
            #0d0703 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

/* 背景细微的"扫描线"动效 */
#introOverlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg,
            transparent 0,
            transparent 3px,
            rgba(212, 168, 106, 0.025) 3px,
            rgba(212, 168, 106, 0.025) 4px);
    pointer-events: none;
}

/* 水平扫描光带（从上往下） */
#introOverlay::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(212, 168, 106, 0.4) 30%,
        rgba(245, 223, 184, 0.6) 50%,
        rgba(212, 168, 106, 0.4) 70%,
        transparent);
    box-shadow: 0 0 16px rgba(212, 168, 106, 0.5);
    animation: intro-scan 2.4s linear forwards;
    pointer-events: none;
}
@keyframes intro-scan {
    0% { top: -10px; opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { top: 100vh; opacity: 0; }
}

#introOverlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-content {
    text-align: center;
    color: #f5dfb8;
    position: relative;
    z-index: 2;
    padding: 0 32px;
}

.intro-mark {
    font-size: 11px;
    letter-spacing: 6px;
    color: #b8956a;
    font-family: 'SF Mono', 'Menlo', monospace;
    margin-bottom: 18px;
    opacity: 0;
    animation: intro-fade-in 0.6s ease 0.15s both;
}

.intro-title {
    font-family: 'Cochin', 'Hoefler Text', Georgia, serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 600;
    letter-spacing: clamp(8px, 1.2vw, 14px);
    text-indent: clamp(8px, 1.2vw, 14px);
    color: #f5dfb8;
    margin: 0;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, 0.5),
        0 0 30px rgba(212, 168, 106, 0.35);
    opacity: 0;
    animation: intro-title-in 1s cubic-bezier(.2, .8, .2, 1) 0.3s both;
}
@keyframes intro-title-in {
    from {
        opacity: 0;
        letter-spacing: clamp(2px, 0.3vw, 4px);
        text-indent: clamp(2px, 0.3vw, 4px);
    }
    to {
        opacity: 1;
        letter-spacing: clamp(8px, 1.2vw, 14px);
        text-indent: clamp(8px, 1.2vw, 14px);
    }
}

.intro-divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        #d4a86a,
        transparent);
    margin: 22px auto 18px;
    opacity: 0;
    transform: scaleX(0);
    animation: intro-divider 0.8s ease 0.9s forwards;
}
@keyframes intro-divider {
    to { opacity: 1; transform: scaleX(1); }
}

.intro-subtitle {
    font-family: 'Cochin', 'Hoefler Text', Georgia, serif;
    font-style: italic;
    font-size: 14px;
    color: #c4a578;
    letter-spacing: 4px;
    margin: 0 0 40px;
    opacity: 0;
    animation: intro-fade-in 0.7s ease 1.1s both;
}

.intro-progress {
    width: clamp(220px, 30vw, 320px);
    height: 2px;
    background: rgba(212, 168, 106, 0.18);
    margin: 0 auto 16px;
    border-radius: 1px;
    overflow: hidden;
    opacity: 0;
    animation: intro-fade-in 0.4s ease 1.3s both;
    position: relative;
}
.intro-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg,
        #d4a86a 0%,
        #f5dfb8 50%,
        #d4a86a 100%);
    box-shadow: 0 0 8px rgba(212, 168, 106, 0.6);
    animation: intro-progress 1.3s cubic-bezier(.4, 0, .6, 1) 1.4s forwards;
}
@keyframes intro-progress {
    to { width: 100%; }
}

.intro-status {
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 12px;
    color: #b8956a;
    letter-spacing: 1.5px;
    min-height: 18px;
    opacity: 0;
    animation: intro-fade-in 0.4s ease 1.4s both;
    font-variant-numeric: tabular-nums;
}
.intro-status .check {
    color: #7dca8d;
    margin-right: 5px;
    display: none;
}
.intro-status.done .check { display: inline; }

.intro-cursor {
    display: inline-block;
    width: 7px;
    height: 12px;
    background: #d4a86a;
    margin-left: 2px;
    vertical-align: middle;
    animation: intro-blink 0.8s steps(1) infinite;
}
.intro-status.done .intro-cursor { display: none; }
@keyframes intro-blink {
    50% { opacity: 0; }
}

.intro-skip {
    position: absolute;
    bottom: 30px;
    right: 30px;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: rgba(184, 149, 106, 0.55);
    opacity: 0;
    animation: intro-fade-in 0.5s ease 2s both;
}

@keyframes intro-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 减少动画偏好（无障碍）*/
@media (prefers-reduced-motion: reduce) {
    #introOverlay { animation: none; opacity: 0; pointer-events: none; }
}

* { box-sizing: border-box; }

/* ====================================================================
   书店容器 — 暖金黄木色
   ==================================================================== */
.bookstore {
    min-height: 100vh;
    background-color: #d4a86a;
    background-image:
        linear-gradient(rgba(228, 178, 110, 0.45),
                        rgba(212, 160, 96, 0.45)),
        url('/static/images/wood-bg.jpg');
    background-blend-mode: normal, multiply;
    background-repeat: no-repeat, repeat;
    background-size: cover, 800px auto;
    background-attachment: fixed, fixed;
    padding-bottom: 0;
}

/* ====================================================================
   顶部 chrome — iBooks 风深色木板带
   ==================================================================== */
.store-header {
    background: linear-gradient(180deg,
        #3d2412 0%,
        #4a2c16 40%,
        #3d2412 100%);
    border-bottom: 2px solid #1a0d05;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.45),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 200, 130, 0.18);
    position: sticky;
    top: 0;
    z-index: 50;
}
.store-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/static/images/wood-header.jpg');
    background-repeat: repeat-x;
    background-size: auto 100%;
    opacity: 0.35;
    mix-blend-mode: multiply;
    pointer-events: none;
}
.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 11px 18px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

/* 左侧分段控件 */
.segmented {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 2px;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 200, 130, 0.1);
}
.seg-btn {
    padding: 5px 14px;
    background: transparent;
    color: #d8b88a;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    letter-spacing: 0.5px;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}
.seg-btn.active {
    background: linear-gradient(180deg, #b08555 0%, #8a6438 100%);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 220, 170, 0.45),
        0 1px 1px rgba(0, 0, 0, 0.3);
}

/* 中间标题 */
.header-title {
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    color: #f5dfb8;
    letter-spacing: 6px;
    text-indent: 6px;
    font-family: 'Cochin', 'Hoefler Text', Georgia, serif;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.5),
        0 -1px 0 rgba(255, 220, 170, 0.15);
}

/* 右侧 — 共 N 本 */
.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-self: end;
}
.total-count {
    color: #f0d4a8;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px 12px;
    border-radius: 12px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
    font-family: 'SF Mono', 'Menlo', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}

/* ====================================================================
   搜索栏
   ==================================================================== */
.search-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 16px 12px;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    position: relative;
    z-index: 2;
}

/* 搜索栏旁的动作按钮（搜索 / 找回订单）— 参考 seg-btn active 金棕风格 */
.search-action-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    background: linear-gradient(180deg, #b08555 0%, #8a6438 100%);
    color: #fff;
    border: 1px solid rgba(40, 20, 5, 0.4);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 22px;
    letter-spacing: 0.5px;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 220, 170, 0.45),
        0 2px 4px rgba(0, 0, 0, 0.3);
    transition: filter 0.15s;
}
.search-action-btn:hover { filter: brightness(1.1); }
.search-action-btn:active { filter: brightness(0.95); }
.search-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg,
        rgba(252, 244, 228, 0.96) 0%,
        rgba(245, 232, 210, 0.96) 100%);
    border-radius: 22px;
    padding: 4px 6px 4px 14px;
    box-shadow:
        inset 0 2px 5px rgba(60, 30, 10, 0.32),
        inset 0 -1px 0 rgba(255, 250, 240, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(40, 20, 5, 0.4);
}
.search-icon {
    font-size: 14px;
    margin-right: 8px;
    opacity: 0.5;
}
#searchInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #3d2614;
    padding: 7px 4px;
    font-family: inherit;
    letter-spacing: 0.3px;
}
#searchInput::placeholder { color: #aa8866; }
.search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(60, 30, 10, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}
.search-clear:hover { background: rgba(60, 30, 10, 0.8); }

/* ====================================================================
   书柜 — 框架深度感（v3 核心）
   ==================================================================== */
.cabinet {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    box-shadow:
        inset 38px 0 50px -16px rgba(40, 18, 5, 0.55),
        inset -38px 0 50px -16px rgba(40, 18, 5, 0.55),
        inset 0 0 80px rgba(255, 220, 170, 0.08);
}

.bookshelf {
    padding: 0 0 8px;
}

.shelf {
    position: relative;
}

/* 关键：每行书上方的暗影带（用 ::before 实现，无需改 JS） */
.shelf::before {
    content: '';
    display: block;
    height: 26px;
    background: linear-gradient(180deg,
        rgba(28, 14, 4, 0.55) 0%,
        rgba(28, 14, 4, 0.35) 40%,
        rgba(28, 14, 4, 0.15) 75%,
        transparent 100%);
    pointer-events: none;
    position: relative;
    z-index: 5;
}

/* ====================================================================
   书本布局
   ==================================================================== */
.shelf-books {
    display: grid;
    grid-template-columns: repeat(var(--cols, 6), 1fr);
    gap: 14px;
    padding: 0 36px;
    align-items: end;
    min-height: 230px;
    margin-top: 4px;
}

/* ====================================================================
   单本书 — 平面 + 强投影
   ==================================================================== */
.book {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform 0.28s cubic-bezier(.2, .8, .2, 1.2);
    opacity: 0;
    animation: book-in 0.55s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes book-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.book:nth-child(1) { animation-delay: 0ms; }
.book:nth-child(2) { animation-delay: 40ms; }
.book:nth-child(3) { animation-delay: 80ms; }
.book:nth-child(4) { animation-delay: 120ms; }
.book:nth-child(5) { animation-delay: 160ms; }
.book:nth-child(6) { animation-delay: 200ms; }

.book:hover {
    transform: translateY(-6px) scale(1.04);
    z-index: 10;
}
.book:active {
    transform: translateY(-2px) scale(0.99);
    transition-duration: 0.1s;
}

.book-cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
}

/* 书名遮罩：桌面 hover 显示 / 触屏长按显示 */
.book-name-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    background: linear-gradient(180deg,
        rgba(28, 16, 6, 0.92) 0%,
        rgba(45, 28, 12, 0.94) 100%);
    color: #f3e6cd;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
    letter-spacing: 0.5px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
    overflow: hidden;
}
/* 仅真正支持悬停的设备（桌面鼠标）才启用 hover 显示，
   避免触屏 tap 误触发 hover 状态导致遮罩粘住 */
@media (hover: hover) and (pointer: fine) {
    .book:hover .book-name-overlay { opacity: 1; }
}
/* 触屏长按后由 JS 加 .show */
.book-name-overlay.show { opacity: 1; }

/* 触屏：禁系统长按菜单/文字选中，长按语义交给 JS */
.book {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 1px 3px 3px 1px;
    box-shadow:
        inset 4px 0 5px -2px rgba(0, 0, 0, 0.45),
        inset 1px 0 0 rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 3px 0 -1px rgba(0, 0, 0, 0.35),
        0 6px 10px rgba(0, 0, 0, 0.42),
        0 18px 22px rgba(0, 0, 0, 0.3);
}
.book:hover .book-cover {
    box-shadow:
        inset 4px 0 5px -2px rgba(0, 0, 0, 0.5),
        inset 1px 0 0 rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 4px 0 -1px rgba(0, 0, 0, 0.4),
        0 12px 18px rgba(0, 0, 0, 0.52),
        0 26px 36px rgba(0, 0, 0, 0.4);
}

.book-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #888;
    color: #fff;
    font-size: 11px;
    padding: 6px;
    text-align: center;
}

/* 右侧 5px 米色书页（用 .book-spine 类名兼容生产 JS） */
.book-spine {
    position: absolute;
    top: 1px;
    right: -4px;
    bottom: 1px;
    width: 5px;
    background:
        repeating-linear-gradient(0deg,
            #f8e8c5 0px,
            #f8e8c5 0.5px,
            #e6d4a4 0.5px,
            #e6d4a4 1px),
        linear-gradient(90deg,
            #f8e8c5 0%,
            #d4b888 60%,
            #a08560 100%);
    background-blend-mode: multiply, normal;
    border-radius: 0 2px 2px 0;
    box-shadow:
        1px 0 2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 250, 220, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* book-shadow 在 v3 不再需要 — 阴影直接整合到 box-shadow，隐藏旧 div */
.book-shadow { display: none; }

/* ====================================================================
   价格贴 / 角标 / 销量徽章
   ==================================================================== */
.price-tag {
    position: absolute;
    top: 8px;
    left: -3px;
    background: linear-gradient(135deg, #e74c3c 0%, #d63031 50%, #c0392b 100%);
    color: #fff;
    padding: 3px 8px 3px 6px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 1px 4px 4px 1px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    z-index: 5;
    transform: rotate(-2deg);
    transform-origin: top left;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}
.price-tag::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 3px;
    height: 3px;
    background: #8c2418;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.book-ribbon {
    position: absolute;
    top: 6px;
    right: -8px;
    background: linear-gradient(135deg, #5ba0e9 0%, #2c7be5 50%, #1e5fb8 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 14px;
    transform: rotate(40deg);
    transform-origin: center;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.35),
        0 4px 8px rgba(0, 0, 0, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    z-index: 6;
    letter-spacing: 1.2px;
}
.book-ribbon::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    width: 4px;
    height: 100%;
    background: rgba(0, 0, 0, 0.28);
    transform: skewY(-10deg) translateY(-50%);
}

.book-ribbon-hot {
    background: linear-gradient(135deg, #ff7e35 0%, #ff4500 50%, #c1272d 100%);
    animation: hot-pulse 2.4s ease-in-out infinite;
}
@keyframes hot-pulse {
    0%, 100% {
        box-shadow:
            0 2px 4px rgba(255, 69, 0, 0.4),
            inset 0 -1px 0 rgba(0, 0, 0, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }
    50% {
        box-shadow:
            0 2px 10px rgba(255, 69, 0, 0.9),
            0 0 20px rgba(255, 100, 50, 0.5),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

/* 免费商品：绿色价签 + 绿色角标 */
.price-tag-free {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 50%, #1e9e54 100%);
    letter-spacing: 1px;
}
.book-ribbon-free {
    background: linear-gradient(135deg, #34d27b 0%, #1e9e54 100%);
    animation: hot-pulse 2.4s ease-in-out infinite;
}

.sales-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(45, 24, 16, 0.78);
    color: #f8e6c8;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    z-index: 5;
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-variant-numeric: tabular-nums;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 240, 210, 0.18);
}

.book-placeholder { visibility: hidden; }

/* ====================================================================
   木质横板（书架隔板）
   ==================================================================== */
.shelf-board {
    height: 18px;
    background:
        linear-gradient(180deg,
            rgba(255, 230, 180, 0.22) 0%,
            rgba(255, 230, 180, 0.08) 8%,
            transparent 18%,
            transparent 82%,
            rgba(40, 20, 5, 0.32) 92%,
            rgba(40, 20, 5, 0.5) 100%),
        url('/static/images/shelf-board.jpg');
    background-repeat: no-repeat, repeat-x;
    background-size: 100% 100%, auto 100%;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 220, 170, 0.4);
    position: relative;
    z-index: 1;
}
.shelf-board::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 18px;
    background: linear-gradient(to bottom,
        rgba(40, 20, 5, 0.35),
        transparent);
    pointer-events: none;
}

/* ====================================================================
   加载状态
   ==================================================================== */
.load-state {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    color: #2a1a0d;
    font-size: 13px;
    background-color: rgba(228, 178, 110, 0.4);
}
.loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(60, 30, 10, 0.3);
    border-top-color: #3d2614;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.load-end {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    padding: 20px 16px;
    color: #2a1a0d;
    font-size: 12px;
    opacity: 0.75;
}

/* ====================================================================
   空状态（搜索无结果）
   ==================================================================== */
.empty-state {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px;
    color: #f8e8c5;
}
.empty-clear-btn {
    margin-top: 14px;
    padding: 8px 22px;
    border-radius: 20px;
    border: 1px solid rgba(248, 232, 197, 0.4);
    background: rgba(0, 0, 0, 0.25);
    color: #f8e8c5;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: background 0.15s;
}
.empty-clear-btn:hover { background: rgba(0, 0, 0, 0.45); }

/* ====================================================================
   底部
   ==================================================================== */
.store-footer {
    text-align: center;
    padding: 22px 16px;
    color: #f0d4a8;
    font-size: 12px;
    background:
        linear-gradient(to bottom, rgba(28, 14, 4, 0.6), rgba(28, 14, 4, 0.85)),
        url('/static/images/wood-bg.jpg');
    background-size: auto, 800px auto;
    background-repeat: repeat;
    border-top: 2px solid #1a0d05;
    letter-spacing: 0.5px;
}

/* ====================================================================
   响应式
   ==================================================================== */
@media (min-width: 768px) {
    .shelf-books {
        gap: 16px;
        padding: 0 44px;
        min-height: 260px;
    }
    .header-title { font-size: 22px; letter-spacing: 8px; }
    .shelf::before { height: 30px; }
    .cabinet {
        box-shadow:
            inset 50px 0 60px -18px rgba(40, 18, 5, 0.55),
            inset -50px 0 60px -18px rgba(40, 18, 5, 0.55),
            inset 0 0 100px rgba(255, 220, 170, 0.08);
    }
}
@media (min-width: 1100px) {
    .shelf-books {
        gap: 18px;
        padding: 0 56px;
        min-height: 300px;
    }
    .shelf::before { height: 32px; }
}

@media (max-width: 480px) {
    .shelf-books {
        padding: 0 18px;
        gap: 10px;
        min-height: 200px;
    }
    .cabinet {
        box-shadow:
            inset 20px 0 30px -10px rgba(40, 18, 5, 0.55),
            inset -20px 0 30px -10px rgba(40, 18, 5, 0.55);
    }
    .header-title { letter-spacing: 4px; font-size: 17px; }
    .seg-btn { padding: 4px 10px; font-size: 12px; }
    .total-count { padding: 3px 9px; font-size: 11px; }
    .search-bar { gap: 6px; }
    .search-action-btn { padding: 0 12px; font-size: 12px; }
}
