/* The Me popup (my/_menu): it opens upward off the face at the foot, with the
   page's own list inside and the ⋯ menu's rows below it (dialog.css). No inline
   padding on the float: the list scrolls and carries its own, so its scrollbar
   rides the edge. The doubled selector outranks .popup's no-anchor fallback
   whatever the file order. */
@layer components {
  .popup.my-menu {
    --popup-area: block-start span-inline-end;
    --popup-try: none;

    inline-size: 34rem;
    margin-block: 0 var(--block-space-half);
    padding-inline: 0;
    outline: none;

    nav,
    menu {
      padding-inline: var(--inline-space);
    }

    /* A fixed height, so the tabs stand still from tab to tab: the float grows
       upward from the face, and a shorter list would pull them down under the
       pointer. It holds the room before the first load too. */
    > turbo-frame {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
      block-size: min(20rem, 60dvh);
    }

    /* Selected is mizu, and a tint brings its paired ink, for the words and
       the links in the row alike. */
    [data-selected] {
      --color-ink: var(--color-selected-ink);
      --color-ink-subtle: var(--color-selected-ink);
      --color-link: var(--color-selected-ink);

      color: var(--color-selected-ink);
      background-color: var(--color-selected);
      border-radius: var(--border-radius);
    }
  }

  /* Where anchors don't exist at all, the popup still knows where the face
     is: the same foot, the same side. */
  @supports not (anchor-name: --supported) {
    .popup.my-menu {
      inset-block: auto var(--footer-height);
      inset-inline: var(--inline-space-double) auto;
      margin-inline: 0;
    }
  }

  /* A face with nothing beside it is easy to lose (owner, 2026-11-09). Its
     pane takes the tap target's size, the face inside it. */
  #footer .glass {
    --avatar-size: 2.25rem;
    --btn-size: var(--tap-target-size);
  }

  .my-menu__list {
    overflow-y: auto;
    padding-inline: var(--inline-space-double);
  }

  /* There is nothing more to see of an empty list. */
  .my-menu__list:not(:has([data-navigable-list-target="item"])) + .my-menu__more {
    display: none;
  }
}
