.swiper-shelf,
.swiper-coverflow {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 8px 0 36px;
    overflow: hidden;
}

.swiper-shelf .swiper-slide {
    width: auto;
    height: auto;
}

.shelf-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 128px;
    text-decoration: none;
    color: inherit;
}

.shelf-slide__cover {
    width: 120px;
    height: 160px;
    border-radius: 4px;
    border: 1px solid rgba(108, 73, 47, 0.38);
    background: #f7f0e6;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.55) inset,
        0 8px 20px rgba(70, 45, 25, 0.14);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shelf-slide__cover img {
    width: 120px !important;
    height: 160px !important;
    max-width: none;
    object-fit: cover;
    object-position: center top;
}

.shelf-slide:hover .shelf-slide__cover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(70, 45, 25, 0.18);
}

.shelf-slide__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    color: #3d3228;
}

.shelf-slide:hover .shelf-slide__name {
    color: #b83a32;
}

.coverflow-wrap {
    position: relative;
    z-index: 1;
    margin-top: 4px;
    padding: 8px 0 4px;
    background: transparent;
    border-radius: 0;
}

.swiper-coverflow {
    padding-bottom: 48px;
}

.swiper-coverflow .swiper-slide {
    width: 220px;
    height: auto;
}

.coverflow-slide {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: filter 0.35s ease;
}

.coverflow-slide__frame {
    display: block;
    width: 220px;
    height: 300px;
    margin: 0 auto;
    border-radius: 2px;
    border: 1px solid rgba(108, 73, 47, 0.36);
    background: #f7f0e6;
    box-shadow: 0 8px 20px rgba(70, 45, 25, 0.14);
    overflow: hidden;
}

.coverflow-slide__frame img {
    width: 220px !important;
    height: 300px !important;
    max-width: none;
    object-fit: cover;
    object-position: center top;
}

.coverflow-slide__caption {
    margin: 12px 8px 0;
    text-align: center;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    color: #2c241c;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.swiper-coverflow .swiper-slide-active .coverflow-slide__caption {
    color: #6b4530;
}

.swiper-coverflow .swiper-slide:not(.swiper-slide-active) .coverflow-slide {
    filter: brightness(0.92) saturate(0.92);
}

.swiper-shelf .swiper-button-prev,
.swiper-shelf .swiper-button-next,
.swiper-coverflow .swiper-button-prev,
.swiper-coverflow .swiper-button-next {
    width: 46px;
    height: 46px;
    margin-top: 0;
    top: 38%;
    border-radius: 50%;
    background:
        linear-gradient(160deg, #fffdf9 0%, #f3ebe0 100%);
    border: 1px solid rgba(108, 73, 47, 0.28);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 8px 20px rgba(70, 45, 25, 0.14);
    color: #6c492f;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.swiper-shelf .swiper-button-prev::after,
.swiper-shelf .swiper-button-next::after,
.swiper-coverflow .swiper-button-prev::after,
.swiper-coverflow .swiper-button-next::after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border: solid currentColor;
    border-width: 0 0 2px 2px;
    font-size: 0 !important;
    line-height: 0;
}

.swiper-shelf .swiper-button-prev::after,
.swiper-coverflow .swiper-button-prev::after {
    margin-left: 3px;
    transform: rotate(45deg);
}

.swiper-shelf .swiper-button-next::after,
.swiper-coverflow .swiper-button-next::after {
    margin-right: 3px;
    transform: rotate(-135deg);
}

.swiper-shelf .swiper-button-prev:hover,
.swiper-shelf .swiper-button-next:hover,
.swiper-coverflow .swiper-button-prev:hover,
.swiper-coverflow .swiper-button-next:hover {
    background: linear-gradient(160deg, #7a5640, #6c492f);
    color: #fffaf3;
    border-color: #6c492f;
    box-shadow: 0 10px 22px rgba(108, 73, 47, 0.28);
    transform: scale(1.04);
}

.swiper-shelf .swiper-button-disabled,
.swiper-coverflow .swiper-button-disabled {
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.swiper-shelf .swiper-pagination-bullet,
.swiper-coverflow .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    background: #a8866e;
    opacity: 0.35;
    transition: width 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.swiper-shelf .swiper-pagination-bullet-active,
.swiper-coverflow .swiper-pagination-bullet-active {
    width: 18px;
    border-radius: 4px;
    background: #c23531;
    opacity: 1;
}

.swiper-coverflow .swiper-pagination-fraction {
    bottom: 8px;
    font-family: "Noto Serif SC", serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: #8a6548;
}

@media (max-width: 900px) {
    .swiper-coverflow .swiper-slide {
        width: 180px;
    }

    .coverflow-slide__frame,
    .coverflow-slide__frame img {
        width: 180px !important;
        height: 240px !important;
    }
}

@media (max-width: 600px) {
    .swiper-coverflow .swiper-slide {
        width: 70vw;
        max-width: 220px;
    }

    .coverflow-slide__frame,
    .coverflow-slide__frame img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 3 / 4;
    }

    .swiper-shelf .swiper-button-prev,
    .swiper-shelf .swiper-button-next,
    .swiper-coverflow .swiper-button-prev,
    .swiper-coverflow .swiper-button-next {
        display: none;
    }
}

.swiper-shelf .swiper-button-next.is-hint,
.swiper-coverflow .swiper-button-next.is-hint {
    animation: nav-hint 1.4s var(--motion-ease, cubic-bezier(0.22, 1, 0.36, 1)) 2;
}

@keyframes nav-hint {
    0%, 100% { transform: translateX(0); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(2px); }
}

.swiper-shelf.is-sliding .shelf-slide__cover,
.swiper-coverflow.is-sliding .coverflow-slide__frame {
    will-change: transform;
}

.swiper-shelf.is-ready,
.swiper-coverflow.is-ready {
    animation: gallery-ready 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes gallery-ready {
    from { opacity: 0.4; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .swiper-shelf .swiper-button-next.is-hint,
    .swiper-shelf.is-ready,
    .swiper-coverflow.is-ready {
        animation: none !important;
    }
}
