.ns-avatar-menu {
    position: relative;
    z-index: 2;
    align-self: flex-end;
    max-width: 100%;
    color: #e6edfb;
    font: 400 14px/1.45 system-ui, sans-serif;
    pointer-events: auto;
}
.ns-avatar-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #526480;
    border-radius: 10px;
    background: #101b30;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.ns-avatar-menu-button:focus-visible,
.ns-avatar-menu-panel:focus-visible,
.ns-avatar-menu-option input:focus-visible {
    outline: 2px solid #f2b544;
    outline-offset: 3px;
}
.ns-avatar-menu-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    width: min(18rem, calc(100vw - 24px));
    max-height: min(65vh, 24rem);
    overflow: auto;
    box-sizing: border-box;
    padding: 14px;
    border: 1px solid #526480;
    border-radius: 12px;
    background: #101b30;
    box-shadow: 0 8px 30px #0008;
    overscroll-behavior: contain;
}
.ns-avatar-menu-panel[hidden] { display: none; }
.ns-avatar-menu-row[data-avatar-menu-chat] form { width: 100%; max-width: 100%; }
.ns-avatar-menu-row[data-avatar-menu-chat] form[hidden] { display: none; }
.ns-avatar-menu-row[data-avatar-menu-chat] input[type="text"],
.ns-avatar-menu-row[data-avatar-menu-chat] textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
.ns-avatar-menu-row {
    min-width: 0;
    margin: 0;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid #33415a;
}
.ns-avatar-menu-row:first-child { padding-top: 0; }
.ns-avatar-menu-row:last-child { padding-bottom: 0; border-bottom: 0; }
.ns-avatar-menu-row legend { padding: 0; font-weight: 650; }
.ns-avatar-menu-reason { margin: 6px 0 0; color: #b8c5db; font-size: 13px; overflow-wrap: anywhere; }
.ns-avatar-menu-option { display: flex; align-items: center; gap: 8px; min-height: 44px; overflow-wrap: anywhere; }
.ns-avatar-menu-option input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: #f2b544; }
.ns-avatar-menu-option input:disabled + span { color: #b8c5db; }
/* Line 5721: on a phone page that carries the guide dock, the menu riding in the chat composer stays clear
   of the dock (WCAG 2.4.11). --ns-dock-h is the room the dock takes at the foot of the screen, published by
   public/js/alive-dock.js (72px until it reports). The panel opens above its own button, or below it and above
   the dock when that gives more room, so it never covers the button; without anchoring it is capped above the
   dock. The page scrolls a focused control clear of the dock. Wider screens and the embed frame keep the rules above. */
@media (max-width: 479.98px) {
    html:has(.alive-dock) {
        scroll-padding-bottom: calc(var(--ns-dock-h, 72px) + 8px);
    }
    :where(body:has(.alive-dock)) .ns-cmp [data-avatar-menu-widget] div.ns-avatar-menu-panel {
        bottom: calc(var(--ns-dock-h, 72px) + 8px);
        max-height: min(65vh, 24rem, calc(100dvh - var(--ns-dock-h, 72px) - 24px));
        scroll-padding-block: 12px;
    }
    @supports (anchor-name: --a) and (position-area: top) {
        :where(body:has(.alive-dock)) .ns-cmp [data-avatar-menu-widget] {
            anchor-scope: --ns-avatar-menu-button;
        }
        :where(body:has(.alive-dock)) .ns-cmp [data-avatar-menu-widget] .ns-avatar-menu-button {
            anchor-name: --ns-avatar-menu-button;
        }
        :where(body:has(.alive-dock)) .ns-cmp [data-avatar-menu-widget] div.ns-avatar-menu-panel {
            position: fixed;
            position-anchor: --ns-avatar-menu-button;
            position-area: top span-left;
            inset: 8px 0 8px auto;
            max-height: min(65vh, 24rem, calc(100% - 16px));
            position-try-fallbacks: --ns-avatar-menu-below-clear-of-dock;
            position-try-order: most-height;
        }
        @position-try --ns-avatar-menu-below-clear-of-dock {
            position-area: bottom span-left;
            inset: 8px 0 calc(var(--ns-dock-h, 72px) + 8px) auto;
            max-height: min(65vh, 24rem, calc(100% - var(--ns-dock-h, 72px) - 16px));
        }
    }
}
/* Line 7033: on a tablet or a desktop page that carries the guide dock, the home door's one menu opens beside its
   own button and above the dock (the wide half of line 5721). Measured in a local render at 768 and 1440: the door's
   menu has already ridden into the chat composer (.ns-cmp, public-avatar-menu-widget.js), so the view's inline
   `position:fixed; right:12px; bottom:12px` rule places the panel, trapped by .ns-avatar-menu's z-index:2 under the
   dock (z-index 1040). An absolute panel there is clipped by the composer's card (.ns-pnl overflow:hidden), so the
   panel stays fixed and, where anchoring exists, opens next to its button; before the composer mounts the panel
   hangs under its button on the door. While the menu is open its wrapper rises above the dock. Phones keep line
   5721's block above, and the embed frame (no dock on /act/embed) keeps the base rules. Line 8199: here the panel
   may use up to 32rem, so at 1440 the whole Thinking + Look list shows with no cut row; the phone cap is unchanged. */
@media (min-width: 480px) {
    body:has(.alive-dock) .ns-cmp > .ns-door__one-menu {
        position: relative;
    }
    body:has(.alive-dock) :is(.ns-door > .ns-door__one-menu, .ns-cmp > .ns-door__one-menu):has([aria-expanded="true"]) {
        z-index: 1041;
    }
    body:has(.alive-dock) :is(.ns-door > .ns-door__one-menu, .ns-cmp > .ns-door__one-menu) div.ns-avatar-menu-panel {
        max-height: min(65vh, 32rem, calc(100dvh - var(--ns-dock-h, 72px) - 24px));
        overflow: auto;
    }
    body:has(.alive-dock) .ns-door > .ns-door__one-menu div.ns-avatar-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        bottom: auto;
    }
    @supports (anchor-name: --a) and (position-area: top) {
        body:has(.alive-dock) :is(.ns-door > .ns-door__one-menu, .ns-cmp > .ns-door__one-menu) {
            anchor-scope: --ns-door-menu-button;
        }
        body:has(.alive-dock) :is(.ns-door > .ns-door__one-menu, .ns-cmp > .ns-door__one-menu) .ns-avatar-menu-button {
            anchor-name: --ns-door-menu-button;
        }
        body:has(.alive-dock) :is(.ns-door > .ns-door__one-menu, .ns-cmp > .ns-door__one-menu) div.ns-avatar-menu-panel {
            position: fixed;
            position-anchor: --ns-door-menu-button;
            position-area: bottom span-left;
            inset: 8px 0 8px auto;
            max-height: min(65vh, 32rem, calc(100% - 16px));
            position-try-fallbacks: --ns-door-menu-above-its-button;
            position-try-order: most-height;
        }
        @position-try --ns-door-menu-above-its-button {
            position-area: top span-left;
            inset: 8px 0 8px auto;
            max-height: min(65vh, 32rem, calc(100% - 16px));
        }
    }
}
/* Line 8200: with the guide dock open between 480 and 1199 px, the open menu in the chat composer lifts only its
   panel over the dock. Live check d531dd5a14b (OR-AF, 768): line 7033's z-index:1041 on the open wrapper also lifted
   the door's own 'Avatar menu' button over the expanded dock card, on top of the card's own 'Avatar menu' button, so a
   stranger read 'Avatar menu u'. Here the wrapper keeps its base z-index (auto in the composer) and so does
   .ns-avatar-menu, whose z-index:2 would otherwise trap the fixed panel; only the panel rises over the dock, and the
   button stays under the card. 1200 px and up, phones, the collapsed dock and the menu on the door keep the rules above. */
@media (min-width: 480px) and (max-width: 1199.98px) {
    body:has(.alive-dock[data-alive-dock-state="open"]) .ns-cmp > .ns-door__one-menu:has([aria-expanded="true"]) {
        z-index: auto;
    }
    body:has(.alive-dock[data-alive-dock-state="open"]) .ns-cmp > .ns-door__one-menu:has([aria-expanded="true"]) > .ns-avatar-menu {
        z-index: auto;
    }
    body:has(.alive-dock[data-alive-dock-state="open"]) .ns-cmp > .ns-door__one-menu:has([aria-expanded="true"]) div.ns-avatar-menu-panel {
        z-index: 1041;
    }
}
/* Line 8178: on an agent page (/agent/{slug}) at 480 px and wider the Avatar menu opens under its own button.
   Measured in walk-140 at 1440: the button sits near the top of the stage, but the view's inline
   `position:fixed; right:12px; bottom:12px` rule dropped its panel into the window's bottom-right corner, 330 px
   away, over the end of 'Talk to <name>'. Behind ai.features.profile_avatar_menu_anchored the view marks that one
   menu .ns-public-avatar-menu--anchored (never the chat-composer widget, never another page). Here the panel hangs
   under its button, right edges aligned, inside .ns-avatar-menu (already position:relative). The stage clips its
   overflow, so where anchoring exists the panel is fixed to its button instead, opening above it when that gives
   more room. Phones keep line 5721's block and today's sheet; line 7033's door rules are untouched. Line 8400: the
   same key marks the home door's one menu (the communicator's copy, only on `/`); the panel may use up to 32rem, as
   line 8199 gives the door. That copy rides into the chat composer, whose card clips, so where anchoring does not
   exist it keeps its fixed place at the window's bottom-right instead of the absolute fallback. */
@media (min-width: 480px) {
    .ns-public-avatar-menu.ns-public-avatar-menu--anchored div.ns-avatar-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        bottom: auto;
        max-height: min(65vh, 32rem);
        overflow: auto;
    }
    @supports (anchor-name: --a) and (position-area: top) {
        .ns-public-avatar-menu.ns-public-avatar-menu--anchored {
            anchor-scope: --ns-profile-menu-button;
        }
        .ns-public-avatar-menu.ns-public-avatar-menu--anchored .ns-avatar-menu-button {
            anchor-name: --ns-profile-menu-button;
        }
        .ns-public-avatar-menu.ns-public-avatar-menu--anchored div.ns-avatar-menu-panel {
            position: fixed;
            position-anchor: --ns-profile-menu-button;
            position-area: bottom span-left;
            inset: 8px 0 8px auto;
            max-height: min(65vh, 32rem, calc(100% - 16px));
            position-try-fallbacks: --ns-profile-menu-above-its-button;
            position-try-order: most-height;
        }
        @position-try --ns-profile-menu-above-its-button {
            position-area: top span-left;
            inset: 8px 0 8px auto;
            max-height: min(65vh, 32rem, calc(100% - 16px));
        }
    }
    @supports not ((anchor-name: --a) and (position-area: top)) {
        .ns-public-avatar-menu.ns-public-avatar-menu--anchored[data-avatar-menu-widget] div.ns-avatar-menu-panel {
            position: fixed;
            top: auto;
            right: 12px;
            bottom: 12px;
        }
    }
}
/* Line 8179: on a phone the home door's Avatar menu opens as a bottom sheet that never hides her face and Talk for
   good. Measured in walk-138 at 375: the served `/` (a voice-first door) places the communicator's menu with the
   view's inline `position:fixed; right:12px; bottom:12px` rule, and the open panel covered Mrs. NetShow's face, her
   greeting and Talk. Behind ai.features.home_door_menu_phone_sheet the home door marks its one menu
   .ns-public-avatar-menu--sheet and paints a Close button first inside the panel. At 479.98 px and below the panel
   is a full-width sheet at the foot of the screen (above the guide dock where the page has one), 60dvh at most, with
   Close held at its top; the page behind is dimmed by the menu's own ::before, under the panel inside
   .ns-avatar-menu's stacking context, and a tap on it closes the menu (public/js/avatar-menu.js). Wider screens hide
   Close and keep lines 7033 and 8178; every other menu carries no sheet class. */
.ns-public-avatar-menu--sheet .ns-avatar-menu-close {
    display: none;
}
@media (max-width: 479.98px) {
    .ns-public-avatar-menu.ns-public-avatar-menu--sheet .ns-avatar-menu > div.ns-avatar-menu-panel {
        position: fixed;
        inset: auto 0 0 0;
        width: auto;
        max-width: none;
        max-height: 60dvh;
        padding-top: 0;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        border-width: 1px 0 0;
        border-radius: 16px 16px 0 0;
        text-align: left;
        position-area: none;
        position-try-fallbacks: none;
        scroll-padding-block: 56px 12px;
    }
    :where(body:has(.alive-dock)) .ns-public-avatar-menu.ns-public-avatar-menu--sheet .ns-avatar-menu > div.ns-avatar-menu-panel {
        bottom: var(--ns-dock-h, 72px);
        max-height: min(60dvh, calc(100dvh - var(--ns-dock-h, 72px) - 24px));
    }
    .ns-public-avatar-menu.ns-public-avatar-menu--sheet .ns-avatar-menu:has(> div.ns-avatar-menu-panel:not([hidden]))::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background: rgba(4, 8, 16, .6);
    }
    .ns-public-avatar-menu.ns-public-avatar-menu--sheet .ns-avatar-menu-close {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        box-sizing: border-box;
        width: calc(100% + 28px);
        min-height: 44px;
        margin: 0 -14px 4px;
        padding: 0 16px;
        border: 0;
        border-bottom: 1px solid #33415a;
        background: #101b30;
        color: #e6edfb;
        font: 650 15px/1.2 system-ui, sans-serif;
        cursor: pointer;
    }
    .ns-public-avatar-menu.ns-public-avatar-menu--sheet .ns-avatar-menu-close:focus-visible {
        outline: 2px solid #f2b544;
        outline-offset: -3px;
    }
}

/* Line 11894: the profile Look panel fits between the header and the Talk door. */
.ns-avatar-menu-panel [data-avatar-menu-automatic][hidden] { display: none; }
.ns-avatar-menu-panel [data-avatar-menu-own] {
    min-height: 44px;
    width: 100%;
    color: inherit;
    background: transparent;
    border: 1px solid #526480;
    border-radius: 8px;
    padding: 8px 12px;
    font: inherit;
    cursor: pointer;
}
@media (max-width: 480px) {
    .ns-public-avatar-menu .ns-avatar-menu > div.ns-avatar-menu-panel[data-avatar-menu-profile] {
        position: fixed;
        position-anchor: auto;
        position-area: none;
        position-try-fallbacks: none;
        top: auto;
        right: 12px;
        bottom: var(--ns-profile-look-bottom, 84px);
        max-height: var(--ns-profile-look-height, calc(100dvh - 160px));
        overflow: auto;
        overscroll-behavior: contain;
    }
}

/* Line 12170: profile-only phone dismissal, present only with the gated Close row. */
[data-avatar-menu-profile] > .ns-avatar-menu-close { display: none; }
@media (max-width: 480px) {
    .ns-public-avatar-menu .ns-avatar-menu > div[data-avatar-menu-profile]:has(> [data-avatar-menu-close]) {
        padding-top: 0;
        scroll-padding-block: 48px 12px;
    }
    .ns-public-avatar-menu .ns-avatar-menu:has(> [data-avatar-menu-profile]:not([hidden]) > [data-avatar-menu-close])::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background: rgba(4, 8, 16, .6);
    }
    [data-avatar-menu-profile] > .ns-avatar-menu-close {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        box-sizing: border-box;
        width: calc(100% + 28px);
        min-height: 44px;
        margin: 0 -14px 4px;
        padding: 0 16px;
        border: 0;
        border-bottom: 1px solid #33415a;
        background: #101b30;
        color: #e6edfb;
        font: 650 15px/1.2 system-ui, sans-serif;
        cursor: pointer;
    }
    [data-avatar-menu-profile] > .ns-avatar-menu-close:focus-visible {
        outline: 2px solid #f2b544;
        outline-offset: -3px;
    }
}

/* Line 1992: while a phone sheet with the Close row is open, avatar-menu.js marks html[data-avatar-menu-dim] and the
   sticky .landing-header (its own stacking layer, above the menu's ::before) wears the same dim; a tap on it closes the
   menu. With avatar_menu_every_width_tidy the Close row ([data-avatar-menu-close-wide]) is also the wide panel's sticky
   first row, and the menu's own 'Own the stage' row, hidden on a phone when the stage bar's button joined the menu,
   stays hidden. */
.ns-avatar-menu-panel[data-avatar-menu-tidy] [data-avatar-menu-own][hidden] { display: none; }
@media (max-width: 480px) {
    html[data-avatar-menu-dim] .landing-header::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 2147483000;
        background: rgba(4, 8, 16, .6);
    }
}
@media (min-width: 481px) {
    .ns-avatar-menu > div[data-avatar-menu-profile]:has(> [data-avatar-menu-close-wide]) {
        padding-top: 0;
        scroll-padding-block: 48px 12px;
    }
    [data-avatar-menu-profile] > .ns-avatar-menu-close[data-avatar-menu-close-wide] {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        box-sizing: border-box;
        width: calc(100% + 28px);
        min-height: 44px;
        margin: 0 -14px 4px;
        padding: 0 16px;
        border: 0;
        border-bottom: 1px solid #33415a;
        background: #101b30;
        color: #e6edfb;
        font: 650 15px/1.2 system-ui, sans-serif;
        cursor: pointer;
    }
    [data-avatar-menu-profile] > .ns-avatar-menu-close[data-avatar-menu-close-wide]:focus-visible {
        outline: 2px solid #f2b544;
        outline-offset: -3px;
    }
}

/* Line 13604: an open panel never runs past the bottom of the screen. avatar-menu.js marks the panel
   [data-avatar-menu-fit] only when its bottom would land below the viewport (16px margin) and gives it its measured
   top as --ns-avatar-menu-top, so this cap only ever shortens a panel that overflows; the panel then scrolls on its
   own. A panel that fits keeps every rule above untouched. */
.ns-avatar-menu-panel[data-avatar-menu-fit]:not([hidden]) {
    max-height: calc(100dvh - var(--ns-avatar-menu-top, 0px) - 16px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}
