/* Shared member-page navigation: desktop uses the button grid, mobile uses the custom select. */
.member-nav-select:not(.cs-native) {
    display: none !important;
}

.member-profile-card > .cs,
.member-nav-card > .cs,
.member-nav-control {
    display: none !important;
}

.member-profile-meta > span {
    grid-template-columns: 19px minmax(0, 1fr) !important;
    gap: 9px !important;
}

.member-profile-meta i {
    width: 19px;
}

/* 會員資料卡整體間距調鬆：按鈕格間距與 pill 高度加大 */
.member-profile-actions {
    gap: 12px !important;
    margin-top: 28px !important;
}

.member-profile-link {
    min-height: 50px !important;
}

/* 格子內登出鈕（第 6 個）：紅色標示，與導覽連結區隔 */
.member-profile-link--logout {
    color: #ff6b6b !important;
    border-color: rgba(255, 89, 89, 0.30) !important;
    background: rgba(255, 89, 89, 0.08) !important;
}

.member-profile-link--logout i {
    color: inherit !important;
}

.member-profile-link--logout:hover,
.member-profile-link--logout:focus-visible {
    color: #fff !important;
    border-color: #ff5959 !important;
    background: rgba(255, 89, 89, 0.92) !important;
    box-shadow: 0 0 18px rgba(255, 89, 89, 0.28) !important;
}

/* 格子外登出鈕：僅手機顯示（手機隱藏按鈕格，改用導覽 select + 此鈕） */
.member-profile-logout {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
    padding: 0 15px;
    border: 1px solid rgba(255, 89, 89, 0.30);
    border-radius: 999px;
    color: #ff6b6b;
    background: rgba(255, 89, 89, 0.08);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.member-profile-logout i {
    font-size: 1.05em;
}

.member-profile-logout:hover,
.member-profile-logout:focus-visible {
    color: #fff;
    border-color: #ff5959;
    background: rgba(255, 89, 89, 0.92);
    box-shadow: 0 0 18px rgba(255, 89, 89, 0.28);
    outline: none;
}

@media (min-width: 761px) {
    .member-profile-actions {
        display: grid !important;
    }
}

@media (max-width: 760px) {
    .member-profile-actions {
        display: none !important;
    }

    .member-profile-logout {
        display: inline-flex;
    }

    .member-profile-card > .cs,
    .member-nav-card > .cs,
    .member-nav-control {
        display: block !important;
        margin-top: 16px;
    }

    .member-nav-select:not(.cs-native) {
        display: block !important;
        width: 100%;
        min-height: 48px;
        margin-top: 16px;
        padding: 0 42px 0 16px;
        border: 1px solid var(--line, rgba(255, 255, 255, 0.10));
        border-radius: 14px;
        color: var(--text, #f7f8f9);
        background-color: rgba(255, 255, 255, 0.04);
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8adb2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
        background-repeat: no-repeat;
        background-position: right 16px center;
        font: inherit;
        font-weight: 700;
        -webkit-appearance: none;
        appearance: none;
        cursor: pointer;
        outline: none;
    }

    .member-nav-select:focus {
        border-color: rgba(0, 191, 209, 0.55);
    }

    .member-nav-select option {
        background: #0d171a;
        color: #f7f8f9;
    }

    .member-nav-control .cs-trigger,
    .member-nav-control.is-open .cs-trigger,
    .member-nav-control .cs-trigger:focus-visible,
    .member-profile-card > .cs .cs-trigger,
    .member-profile-card > .cs.is-open .cs-trigger,
    .member-profile-card > .cs .cs-trigger:focus-visible,
    .member-nav-card > .cs .cs-trigger,
    .member-nav-card > .cs.is-open .cs-trigger,
    .member-nav-card > .cs .cs-trigger:focus-visible {
        border-color: var(--line, rgba(255, 255, 255, 0.10)) !important;
        background: rgba(255, 255, 255, 0.04) !important;
        box-shadow: none !important;
    }
}
