#dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 20;
    background: rgba(10, 11, 20, 0.78);
    padding: 5px;
    border-radius: 12px;
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    transform: translate(-50%, 18px);
    opacity: 0;
    animation: dockIn 0.55s var(--ease) 0.22s forwards;
}

@keyframes dockIn {
    from { transform: translate(-50%, 18px); opacity: 0; }
    to   { transform: translate(-50%, 0); opacity: 1; }
}

.dock-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--fg-3);
    transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
    text-decoration: none;
}

.dock-btn:hover {
    background: rgba(200, 195, 230, 0.06);
    color: var(--fg);
    transform: translateY(-1px);
}

.dock-btn:active { transform: translateY(0); }

.dock-btn.active {
    background: rgba(200, 195, 230, 0.08);
    color: var(--accent);
}

.dock-btn svg { width: 16px; height: 16px; }

.dock-toggle {
    position: relative;
    border: none;
    background: rgba(200, 195, 230, 0.04);
    cursor: pointer;
}
.dock-toggle.has-active::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
}
.dock-toggle.open {
    background: rgba(200, 195, 230, 0.1);
    color: var(--fg);
}
.dock-toggle.open svg { transform: rotate(45deg); }
.dock-toggle svg {
    transition: transform 0.2s var(--ease);
}

.dock-popover {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translate(-50%, 8px) scale(0.96);
    display: flex;
    gap: 2px;
    padding: 5px;
    background: rgba(10, 11, 20, 0.92);
    border: 1px solid var(--line-2);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    z-index: 25;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s var(--ease), transform 0.2s var(--ease);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.dock-popover.open {
    pointer-events: auto;
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}
.dock-popover .dock-btn {
    width: 32px;
    height: 32px;
}

@media (max-width: 520px) {
    .dock-popover { max-width: calc(100vw - 36px); flex-wrap: wrap; justify-content: center; }
}
