/* Small shared layout and interaction refinements. Embedded profile tools retain their geometry. */
body.voicepa-product-ui {
    --vp-ui-ink: #263747;
    --vp-ui-muted: #617184;
    --vp-ui-focus: #087aaf;
}

body.voicepa-product-ui :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--vp-ui-focus);
    outline-offset: 3px;
}

body.voicepa-product-ui .vp-skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2147483000;
    transform: translateY(calc(-100% - 16px));
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff;
    color: #174c69;
    box-shadow: 0 2px 14px #172c4933;
    font-size: 14px;
    font-weight: 600;
}
body.voicepa-product-ui .vp-skip-link:focus { transform: translateY(0); }

/* Native buttons keep the existing header appearance and work with Enter / Space. */
body.voicepa-product-ui button[data-vp-menu-toggle] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    vertical-align: middle;
    cursor: pointer;
    appearance: none;
}
body.voicepa-product-ui button.voicepa-mobile-headerbar__auth-link {
    font-family: inherit;
    cursor: pointer;
    appearance: none;
}

/* One shared breakpoint prevents the 721–900px article/sidebar width collision. */
body.voicepa-product-ui #page {
    width: 100%;
    max-width: 1050px;
    min-width: 0;
    box-sizing: border-box;
    scroll-margin-top: 100px;
}
body.voicepa-product-ui #page > #content.article,
body.voicepa-product-ui #page > aside.sidebar {
    min-width: 0;
    box-sizing: border-box;
}
body.voicepa-product-ui #page > aside.sidebar > #sidebars.sidebar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
@media (min-width: 901px) {
    /* Override the legacy Bootstrap block/float rules at their actual ID specificity. */
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-inner {
        display: grid;
        grid-template-columns: 146px minmax(0, 1fr);
        align-items: start;
        column-gap: 16px;
        width: calc(100% - 24px);
        margin-inline: auto;
        padding: 8px 0 4px !important;
        box-sizing: border-box;
    }
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-inner::before,
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-inner::after,
    body.voicepa-product-ui #top-nav .nav-ul-menu::before,
    body.voicepa-product-ui #top-nav .nav-ul-menu::after {
        display: none;
        content: none;
    }
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-logo {
        float: none;
        min-width: 0;
        margin: 0;
    }
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-logo :is(.logo, .custom-logo-link) {
        display: flex;
        align-items: center;
        width: 100%;
        height: 44px;
        margin: 0;
        line-height: 1;
    }
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-logo img {
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 40px;
        object-fit: contain;
    }
    body.voicepa-product-ui #top-nav .container .main-menu.collapse {
        display: grid !important;
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 44px;
        align-items: center;
        column-gap: 12px;
        row-gap: 4px;
        float: none;
        width: auto;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        overflow: visible;
    }
    body.voicepa-product-ui #top-nav .main-menu > .vp-searchbar-mount--desktop,
    body.voicepa-product-ui #top-nav .main-menu > .voicepa-desktop-header-copy {
        float: none;
        width: auto;
        max-width: 100%;
        min-width: 0;
        margin: 0;
    }
    body.voicepa-product-ui #top-nav .main-menu > .vp-searchbar-mount--desktop {
        grid-column: 1;
        grid-row: 1;
    }
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-copy {
        grid-column: 2;
        grid-row: 1;
        font-size: 11px;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-burger-link {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        width: 44px;
        height: 44px;
        color: #fff;
    }
    body.voicepa-product-ui #top-nav .main-menu > .nav-ul-menu {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0 4px;
        position: relative;
        inset: auto;
        float: none !important;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0 !important;
        padding: 0;
        overflow: visible;
        box-sizing: border-box;
    }
    body.voicepa-product-ui #top-nav .nav-ul-menu > li {
        float: none;
        flex: 0 1 auto;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    body.voicepa-product-ui #top-nav .nav-ul-menu > li > a {
        display: flex;
        align-items: center;
        gap: 4px;
        float: none;
        min-height: 36px;
        box-sizing: border-box;
        padding: 7px 9px;
        font-size: 13px;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    body.voicepa-product-ui #top-nav .nav-ul-menu > li > .dropdown-menu {
        max-width: min(320px, calc(100vw - 24px));
        border-radius: 8px;
    }
    body.voicepa-product-ui #top-nav .nav-ul-menu > li:nth-last-child(-n+2) > .dropdown-menu {
        left: auto;
        right: 0;
    }
    body.voicepa-product-ui #top-nav .nav-ul-menu > li > .dropdown-menu > li > a {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    body.voicepa-product-ui #top-nav .nav-ul-menu > li:is(:hover, :focus-within, .open) > .dropdown-menu {
        opacity: 1;
        transform: scale(1);
        z-index: 20;
    }
    body.voicepa-product-ui #page {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }
    body.voicepa-product-ui #page > #content.article {
        flex: 1 1 0;
        float: none;
        width: auto !important;
        max-width: none;
        margin: 0;
    }
    body.voicepa-product-ui #page > aside.sidebar {
        flex: 0 0 320px;
        float: none;
        width: 320px;
        max-width: 320px;
        margin: 0;
    }
}
/* Keep search usable at the desktop breakpoint instead of squeezing it beside long copy. */
@media (min-width: 901px) and (max-width: 1100px) {
    body.voicepa-product-ui #top-nav .container .main-menu.collapse {
        grid-template-columns: minmax(0, 1fr) 44px;
    }
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-copy { display: none; }
    body.voicepa-product-ui #top-nav .voicepa-desktop-header-burger-link { grid-column: 2; }
}
/* The native controls and IDs stay with the existing menu owner; only the drawing changes. */
body.voicepa-product-ui #top-nav #btn03,
body.voicepa-product-ui .top-select2 #btn03_sm {
    display: grid !important;
    place-items: center;
    position: relative !important;
    inset: auto;
    float: none !important;
    width: 36px;
    height: 36px;
    margin: 0 !important;
    padding: 0;
    color: #fff;
    background: transparent;
    transform: none !important;
    transition: none;
}
body.voicepa-product-ui :is(#btn03, #btn03_sm) .vp-header-menu-icon {
    display: block;
    width: 24px;
    height: 24px;
    overflow: visible;
}
body.voicepa-product-ui .vp-header-menu-close { display: none; }
body.voicepa-product-ui button[data-vp-menu-toggle][aria-expanded="true"] .vp-header-menu-lines { display: none; }
body.voicepa-product-ui button[data-vp-menu-toggle][aria-expanded="true"] .vp-header-menu-close { display: block; }
@media (max-width: 900px) {
    body.voicepa-product-ui #page { display: block; }
    body.voicepa-product-ui #page > #content.article {
        float: none;
        width: 100% !important;
        max-width: 100%;
        margin: 0;
    }
    body.voicepa-product-ui #page > aside.sidebar {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 14px 0 0;
    }
}

/* One compact rail for full loads and PJAX; its height follows the labels. */
body.voicepa-product-ui .my-tabs-horizontal-home {
    min-width: 0;
    max-width: 100%;
}
body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 2px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 48px;
    margin: 0 0 6px !important;
    padding: 3px;
    border: 1px solid #eadde4;
    border-radius: 12px;
    background: #fff8fb;
    letter-spacing: normal;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home::-webkit-scrollbar { display: none; }
body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home > li {
    display: flex;
    flex: 1 0 auto;
    float: none;
    position: static;
    inset: auto;
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    text-indent: 0;
}
body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home > li > a {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 42px;
    margin: 0;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #695c67;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: normal;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}
body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home > li > a.current,
body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home > li > a.current:hover {
    border: 0;
    background: #f5e2ee;
    color: #892d66;
    box-shadow: inset 0 0 0 1px #eacddd;
    font-weight: 700;
}
body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home > li > a:focus-visible {
    outline: 2px solid var(--vp-ui-focus);
    outline-offset: -3px;
}
body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home .unread-count-tab {
    position: static;
    float: none;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: auto;
    height: auto;
    min-width: 18px;
    margin: 0;
    padding: 1px 5px;
    border: 0;
    border-radius: 999px;
    background: #98356e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: normal;
    text-align: center;
    vertical-align: middle;
}
body.voicepa-product-ui .my-tabs-horizontal-home .my-panes-home {
    min-width: 0;
    max-width: 100%;
    padding: 0;
}
body.voicepa-product-ui .my-tabs-horizontal-home .my-panes-home > [hidden] { display: none !important; }
@media (hover: hover) {
    body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home > li > a:not(.current):hover {
        background: #f4edf2;
        color: #892d66;
    }
}
@media (max-width: 380px) {
    body.voicepa-product-ui .my-tabs-horizontal-home ul.my-tabs-home > li > a { padding-inline: 6px; font-size: 12px; gap: 3px; }
}

/* Only the timeline row opts in; dialogs, profile backgrounds and bottle canvases are untouched. */
body.voicepa-product-ui #microblog-timeline .vp-microblog-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0;
}
body.voicepa-product-ui #microblog-timeline .vp-microblog-avatar-rail {
    grid-column: 1;
    float: none !important;
    width: 56px;
    margin: 0 !important;
}
body.voicepa-product-ui #microblog-timeline .vp-microblog-main {
    grid-column: 2;
    min-width: 0;
    width: auto;
    float: none;
    margin: 0;
    overflow-wrap: anywhere;
}
body.voicepa-product-ui #microblog-timeline .vp-microblog-main > .microblog-float-left,
body.voicepa-product-ui #microblog-timeline .vp-microblog-main .microblog-user-info > .microblog-float-left {
    float: none;
}
body.voicepa-product-ui #microblog-timeline .vp-microblog-main > br { display: none; }
body.voicepa-product-ui #microblog-timeline .vp-microblog-main .microblog-user-info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 7px;
    row-gap: 1px;
    margin: 0 0 5px;
    line-height: 1.5;
}
body.voicepa-product-ui #microblog-timeline .vp-microblog-main .microblog-content {
    float: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
body.voicepa-product-ui #microblog-timeline .vp-microblog-main .microblog-meta.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 12px !important;
    line-height: 1.5;
}
body.voicepa-product-ui #microblog-timeline .vp-microblog-main .microblog-meta.actions > div {
    float: none !important;
}
body.voicepa-product-ui .vp-post-media-link { display: block; }

/* Visible, compact recovery state; failed requests do not consume a page. */
body.voicepa-product-ui .vp-feed-status {
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin: 8px 0;
    padding: 10px 12px;
    border: 1px solid #dce6ed;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--vp-ui-muted);
    font-size: 13px;
    line-height: 1.6;
}
body.voicepa-product-ui .vp-feed-status[hidden] { display: none; }
body.voicepa-product-ui .vp-feed-retry {
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid #a7cede;
    border-radius: 8px;
    background: #edf7fc;
    color: #145c7c;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
html.vp-navigation-loading::before {
    content: '';
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 2147483000;
    width: 35%;
    height: 3px;
    background: linear-gradient(90deg, #f15b9f, #ef9c7b);
    pointer-events: none;
    animation: vp-navigation-progress 1.1s ease-in-out infinite;
}
@keyframes vp-navigation-progress {
    from { transform: translateX(-100%); }
    to { transform: translateX(300%); }
}
@media (prefers-reduced-motion: reduce) {
    html.vp-navigation-loading::before { animation: none; width: 100%; }
    body.voicepa-product-ui .vp-skip-link { transition: none; }
}
