/* 吉他社：网页音轨面板从工具栏右端向内展开，避免按钮靠右时裁掉混音控件。 */
#gtptab-2025 .at-player-right .dropdown-track .tracklist {
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
    max-width: calc(100dvw - 24px);
    border-radius: 12px;
}

@media (min-width: 769px) {
    #gtptab-2025 .at-player-right .dropdown-track .tracklist {
        left: auto !important;
        right: 0;
        transform: none !important;
    }
}

/* 吉他社：窄屏桌面版也使用横向铺满的面板，播放栏上方留出安全区。 */
@media (max-width: 768px) {
    #gtptab-2025 .at-player-right .dropdown-track .tracklist {
        position: fixed !important;
        left: max(10px, env(safe-area-inset-left, 0px)) !important;
        right: max(10px, env(safe-area-inset-right, 0px)) !important;
        bottom: calc(var(--at-footer-h, 64px) + env(safe-area-inset-bottom, 0px) + 8px) !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        max-height: min(55vh, 480px) !important;
        max-height: min(55dvh, 480px) !important;
        transform: none !important;
    }

    #gtptab-2025 .at-more.open .at-more-menu .at-loop {
        display: inline-flex !important;
    }
}

/* 吉他社：网页紧凑菜单统一显示文字。桌面网址也可能进入移动播放器，旧版图标字体没有「更多」字形。 */
#gtptab-2025 .at-player-right .at-more-toggle {
    width: auto;
    min-width: 36px;
    padding-inline: 8px;
    box-sizing: border-box;
    white-space: nowrap;
}

/* 吉他社：菜单向播放栏内侧和上方展开，覆盖桌面主题通用下拉框的左、上定位。 */
#gtptab-2025 .at-more .at-more-menu {
    left: auto;
    top: auto;
}

#gtptab-2025 .at-more-toggle i {
    display: none;
}

#gtptab-2025 .at-more-toggle::after {
    content: '更多';
    font-size: 13px;
}

@media (any-pointer: coarse) {
    #gtptab-2025 .at-player-right .at-more-toggle {
        min-inline-size: 44px;
        min-block-size: 44px;
    }
}

/* 吉他社：触屏桌面版和窄窗口把低频操作收进紧凑菜单。 */
@media (hover: none), (max-width: 980px) {
    html.jts-client-desktop #gtptab-2025 .at-player-right .at-more {
        display: block;
    }

    html.jts-client-desktop #gtptab-2025 .at-player-right .at-more-toggle {
        display: inline-flex;
    }

    html.jts-client-desktop #gtptab-2025 .at-player-right .at-more-menu {
        position: absolute;
        right: 0;
        bottom: calc(100% + 8px);
        display: none !important;
        width: 176px;
        max-height: 70vh;
        max-height: 70dvh;
        padding: 8px;
        overflow: auto;
        border: 1px solid rgba(0, 0, 0, .08);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 12px 32px rgba(24, 28, 36, .16);
        z-index: 2000;
    }

    html.jts-client-desktop #gtptab-2025 .at-player-right .at-more.open .at-more-menu {
        display: grid !important;
    }

    html.jts-client-desktop #gtptab-2025 .at-more-menu .at-more-item {
        width: 100%;
        height: 42px;
        padding-inline: 10px;
        justify-content: flex-start;
    }

    html.jts-client-desktop #gtptab-2025 .at-more-menu .at-more-item > span {
        display: inline;
    }
}
