.floating-horizontal-nav {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%) translateY(10px);
    width: min(980px, calc(100vw - 24px));
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(4px);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.floating-horizontal-nav.is-visible {
    visibility: visible;
}

.floating-horizontal-nav.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.floating-horizontal-nav .floating-scroll-btn {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.floating-horizontal-nav .floating-scroll-btn:hover {
    border-color: #8065ee;
    color: #4c1d95;
    background: #f9f7ff;
}

.floating-horizontal-nav .floating-scroll-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.floating-horizontal-nav .floating-scroll-viewport {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    height: 14px;
    border-radius: 10px;
    background: #f3f4f6;
}

.floating-horizontal-nav .floating-scroll-viewport::-webkit-scrollbar {
    height: 14px;
}

.floating-horizontal-nav .floating-scroll-viewport::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.floating-horizontal-nav .floating-scroll-viewport::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 10px;
}

.floating-horizontal-nav .floating-scroll-viewport::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.floating-horizontal-nav .floating-scroll-content {
    height: 1px;
    min-width: 100%;
}

.floating-horizontal-nav .floating-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    max-width: min(420px, calc(100vw - 30px));
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    color: #1f2937;
    font-size: 13px;
    line-height: 1.35;
    z-index: 61;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.floating-horizontal-nav .floating-scroll-hint.visible {
    opacity: 1;
    visibility: visible;
}

/* Shared utility: keep native scroll functional while hiding scrollbar UI. */
.hide-scrollbar {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
