.bookmark-swiper {
    width: 100%; overflow: hidden; flex-grow: 1;
    touch-action: pan-y;
}

.bookmark-swiper-wrapper {
    display: flex; height: 100%;
    transition: transform 0.3s ease-out; will-change: transform;
}

.bookmark-page {
    flex-shrink: 0; width: 100%; height: 100%;
    display: flex; align-items: flex-start; justify-content: center;
    box-sizing: border-box; padding-top: 0; overflow-y: auto;
}

.bookmark-page-content {
    display: grid; grid-template-columns: repeat(auto-fill, var(--card-size));
    gap: var(--gap); justify-content: flex-start;
    width: var(--page-width); max-width: 90%;
    align-content: flex-start; padding-bottom: 50px;
}

.page-title {
    grid-column: 1 / -1; font-size: 24px; font-weight: 600; color: inherit;
    margin: 0 0 5px 0; text-shadow: 0 1px 2px rgba(255,255,255,0.6);
    padding: 5px; border-radius: 8px;
}

.bookmark-item {
    display: flex; flex-direction: column; align-items: center;
    width: var(--card-size); cursor: pointer; position: relative;
    transition: transform 0.2s; -webkit-tap-highlight-color: transparent;
    will-change: transform;
}
.bookmark-item:hover { transform: scale(1.05); }

.icon-box {
    width: var(--card-size); height: var(--card-size);
    background: white; border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.icon-box img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.bookmark-item.style-fit .icon-box img { width: 85%; height: 85%; object-fit: contain; }
.bookmark-item.style-white .icon-box img { width: 60%; height: 60%; object-fit: contain; }

.text-icon {
    width: 100%; height: 100%; background: #e0e0e0; color: #555;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: bold; text-transform: uppercase;
}

.bookmark-title {
    margin-top: 8px; font-size: 13px; color: inherit; text-align: center;
    width: 120%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-weight: 500; text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}

@keyframes ios-jiggle {
    0% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } 100% { transform: rotate(-1.5deg); }
}
.is-editing .bookmark-item:not(.sortable-drag):not(.sortable-ghost) {
    animation: ios-jiggle 0.25s infinite ease-in-out; cursor: grab; transform-origin: center center;
}
.is-editing .bookmark-item:nth-child(2n) { animation-duration: 0.26s; animation-delay: -0.05s; }
.is-editing .bookmark-item:nth-child(3n) { animation-duration: 0.24s; animation-delay: -0.12s; }
.is-editing .bookmark-item:nth-child(5n) { animation-duration: 0.27s; animation-delay: -0.08s; }
.is-editing .bookmark-item:nth-child(7n) { animation-direction: alternate-reverse; }

.sortable-ghost { opacity: 0.2; background: #cce5ff; border-radius: var(--radius); }
.sortable-ghost .bookmark-title, .sortable-ghost .icon-box { opacity: 0.5; }
.sortable-drag {
    opacity: 1 !important; transform: scale(1.15); box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    z-index: 9999 !important; cursor: grabbing; transition: none !important;
}

@keyframes popIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.delete-btn {
    position: absolute; top: -8px; left: -8px; width: 22px; height: 22px;
    background: rgba(150, 150, 150, 0.9); color: white; border-radius: 50%;
    text-align: center; line-height: 20px; font-size: 14px;
    display: none; z-index: 10; cursor: pointer;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.is-editing .delete-btn { display: block; }

.pagination-dots {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 12px; z-index: 100; padding: 20px 40px; border-radius: 30px;
    opacity: 0; transition: opacity 0.3s ease-in-out; pointer-events: auto;
}
.pagination-dots.visible, .pagination-dots:hover { opacity: 1; }
.pagination-dots .dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s cubic-bezier(0.25, 1.5, 0.5, 1), transform 0.3s cubic-bezier(0.25, 1.5, 0.5, 1); cursor: pointer; position: relative;
}
.pagination-dots .dot.active { background: rgba(0, 0, 0, 0.8); transform: scale(1.2); }
.pagination-dots .dot:hover { background: #007AFF; transform: scale(1.8); }
.pagination-dots .dot::after {
    content: attr(data-title); position: absolute; bottom: 20px; left: 50%;
    opacity: 0; visibility: hidden; transform: translateX(-50%) scale(0.8); transform-origin: bottom center;
    background: rgba(0,0,0,0.85); color: white; padding: 5px 10px; font-size: 10px;
    border-radius: 12px; white-space: nowrap; pointer-events: none; font-weight: 500;
    transition: opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.pagination-dots .dot:hover::after { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1); }
