.nd-balance-menu { position:relative; flex:none; }
.nd-balance-menu > summary { display:flex; align-items:center; justify-content:center; gap:.5rem; min-height:2.75rem; padding:.5rem .75rem; border:1px solid var(--nd-border); border-radius:.75rem; background:var(--nd-control); color:var(--nd-ink); font-size:.8125rem; font-weight:550; cursor:pointer; list-style:none; white-space:nowrap; }
.nd-balance-menu > summary::-webkit-details-marker { display:none; }
.nd-balance-menu > summary svg { width:1.125rem; height:1.125rem; color:var(--nd-brand); }
.nd-balance-menu > summary:hover, .nd-balance-menu[open] > summary { background:var(--nd-control-hover); border-color:var(--nd-field-border); }
.nd-balance-menu > summary:focus-visible { outline:2px solid var(--nd-brand); outline-offset:3px; }
.nd-balance-chevron { font-size:1rem; line-height:1; }
.nd-balance-menu[open] .nd-balance-chevron { transform:rotate(180deg); }
.nd-balance-panel { position:absolute; top:calc(100% + .625rem); right:0; width:min(20rem,calc(100vw - 2rem)); max-height:calc(100dvh - 6rem); overflow:auto; padding:.75rem; display:grid; gap:.375rem; border:1px solid var(--nd-border); border-radius:1rem; background:var(--nd-panel); box-shadow:0 16px 48px #0005; z-index:55; }
.nd-balance-menu:not([open]) > .nd-balance-panel { display:none; }
.nd-balance-caption { display:block; padding:.5rem .625rem .75rem; font-size:.875rem; color:var(--nd-ink); border-bottom:1px solid var(--nd-border); margin-bottom:.25rem; overflow-wrap:anywhere; }
html body .nd-balance-panel :is(a,button) { display:flex; align-items:center; justify-content:flex-start; width:100%; min-height:2.75rem; height:auto; border:1px solid transparent!important; border-radius:.5rem; background:var(--nd-control)!important; color:var(--nd-ink)!important; text-align:left; text-decoration:none; padding:.625rem .75rem; font:inherit; font-size:.8125rem; white-space:normal; }
html body .nd-balance-panel :is(a,button):hover { background:var(--nd-control-hover)!important; border-color:var(--nd-field-border)!important; }
@media(max-width:600px) {
  .studio-shell .top { gap:.5rem; padding:.625rem .75rem; min-height:4rem; }
  .studio-shell .top-context { display:none; }
  .studio-shell .top .userbar { gap:.5rem; margin-left:auto; min-width:0; }
  .studio-shell .menu-toggle { min-width:2.75rem; min-height:2.75rem; }
  .studio-shell .top .avatar { width:2.75rem; height:2.75rem; min-width:2.75rem; font-size:.875rem; }
  .studio-shell .top .userbar > a[href*="mode=register"] { display:none; }
  .nd-balance-menu > summary { font-size:.8125rem; padding:.5rem .625rem; }
  .nd-balance-panel { position:fixed; right:.75rem; top:4.25rem; width:min(21rem,calc(100vw - 1.5rem)); }
}
