/* IPN 1.10 · User menu (partials/user_menu.php). Identical copies in site.d / account.d / studio.d — edit one, copy to all.
   Layout only, neutral: the Prime theme may restyle colours. Light & dark, LTR & RTL. */
.umenu { position: relative; display: inline-block; flex: none; }
.umenu > summary { list-style: none; }
.umenu > summary::-webkit-details-marker { display: none; }
.umenu__btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line, rgba(0,0,0,.12)); background: var(--paper, transparent); color: var(--ink, inherit); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; user-select: none; white-space: nowrap; transition: background-color .18s ease-out, border-color .18s ease-out; }
html[dir="rtl"] .umenu__btn { padding: 0 4px 0 10px; }
.umenu__btn:hover, .umenu[open] > .umenu__btn { background: var(--sunk, rgba(0,0,0,.05)); }
.umenu__btn:focus-visible { outline: 2px solid var(--accent, #E8313F); outline-offset: 2px; }
.umenu__av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; background: color-mix(in srgb, var(--accent, #E8313F) 14%, var(--paper, #fff)); color: var(--accent, #E8313F); font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.umenu__av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.umenu__av--lg { width: 44px; height: 44px; font-size: 16px; }
.umenu__name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.umenu__chev { width: 16px; height: 16px; color: var(--muted, #777); transition: transform .2s ease-out; }
.umenu[open] .umenu__chev { transform: rotate(180deg); }
.umenu__dot { position: absolute; top: 4px; inset-inline-end: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #E8313F); box-shadow: 0 0 0 2px var(--paper, #fff); }

.umenu__pop { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 90; min-width: 264px; max-width: min(320px, calc(100vw - 24px)); padding: 6px; border-radius: 14px; background: var(--paper, #fff); color: var(--ink, inherit); border: 1px solid var(--line, rgba(0,0,0,.12)); box-shadow: 0 18px 44px -18px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.06); text-align: start; animation: umenu-in .18s ease-out; }
.umenu--drawer .umenu__pop { position: static; margin-top: 8px; box-shadow: none; max-width: none; }
.umenu--drawer, .umenu--drawer .umenu__btn { width: 100%; }
.umenu--drawer .umenu__btn { justify-content: flex-start; height: 48px; border-radius: 14px; }
.umenu--drawer .umenu__name { max-width: none; flex: 1; }
@keyframes umenu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .umenu__pop { animation: none; } .umenu__chev { transition: none; } }

.umenu__who { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.umenu__who-t { display: grid; min-width: 0; }
.umenu__who-t strong { font-size: 14.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu__who-t small { color: var(--muted, #777); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu__group { display: grid; gap: 1px; padding: 4px 0; border-top: 1px solid var(--line, rgba(0,0,0,.1)); }
.umenu__group a, .umenu__group button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink, inherit); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; text-align: start; cursor: pointer; transition: background-color .15s ease-out; }
.umenu__group a:hover, .umenu__group button:hover, .umenu__group a:focus-visible, .umenu__group button:focus-visible { background: var(--sunk, rgba(0,0,0,.05)); outline: none; }
.umenu__group .ic { width: 18px; height: 18px; flex: none; color: var(--muted, #777); }
.umenu__group a span, .umenu__group button span { flex: 1; min-width: 0; }
.umenu__group small { color: var(--muted, #777); font-size: 11.5px; font-weight: 700; }
.umenu__n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent, #E8313F); color: #fff; font-size: 11.5px; font-weight: 800; }
.umenu__studio .ic { color: var(--accent, #E8313F); }
.umenu__row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line, rgba(0,0,0,.1)); }
.umenu__row a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; border-radius: 10px; background: var(--sunk, rgba(0,0,0,.05)); color: var(--ink, inherit); font-size: 13px; font-weight: 700; text-decoration: none; transition: background-color .15s ease-out; }
.umenu__row a:hover { background: color-mix(in srgb, var(--ink, #000) 10%, var(--sunk, transparent)); }
.umenu__row .ic { width: 16px; height: 16px; }
.umenu__group--out form { display: contents; }
.umenu__group--out button { color: var(--accent, #E8313F); }
.umenu__group--out button .ic { color: currentColor; }
.umenu__group:empty { display: none; }

/* compact on narrow screens: avatar only (site header) */
@media (max-width: 1280px) { .umenu--hdr .umenu__name, .umenu--hdr .umenu__chev { display: none; } .umenu--hdr .umenu__btn { width: 40px; padding: 0; justify-content: center; border-color: transparent; background: transparent; } }
@media (max-width: 640px) { .umenu--portal .umenu__name, .umenu--account .umenu__name, .umenu--studio .umenu__name { display: none; } .umenu--portal .umenu__btn, .umenu--account .umenu__btn, .umenu--studio .umenu__btn { padding: 0 6px 0 3px; } html[dir="rtl"] .umenu--portal .umenu__btn, html[dir="rtl"] .umenu--account .umenu__btn, html[dir="rtl"] .umenu--studio .umenu__btn { padding: 0 3px 0 6px; }
  .umenu__pop { position: fixed; inset-inline: 12px; top: auto; bottom: max(12px, env(safe-area-inset-bottom)); max-width: none; min-width: 0; } }

/* the welcome / doors page sits on a dark picture */
.ld-top .umenu__btn, .stage__tools .umenu__btn { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.12); color: #fff; }
.ld-top .umenu__btn:hover, .stage__tools .umenu__btn:hover { background: rgba(255,255,255,.22); }
.ld-top .umenu__chev, .stage__tools .umenu__chev { color: rgba(255,255,255,.8); }
.ld-top .umenu__av, .stage__tools .umenu__btn .umenu__av { background: #fff; color: var(--accent, #E8313F); }

/* Studio top bar */
.st-top .umenu { margin-inline-start: 4px; }
.st-top .umenu__btn { height: 38px; background: var(--paper); }
