/* Match the compact deposit wallet used by the reference header only. */
ion-header .header .wallet,
ion-header .header .assets-box .deposit:has(.deposit-icon) {
    min-width: 30px;
    height: 26px;
    padding: 4px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
ion-header .header .wallet ion-icon,
ion-header .header .deposit-icon {
    width: 19px;
    height: 18px;
    font-size: 18px;
    flex-shrink: 0;
}

/* Keep the brand beside the menu stable on narrow toolbars. The original
 * toolbar utility classes allow the ion-img host to shrink with the auth
 * buttons, which makes the logo look clipped or vertically distorted. */
ion-toolbar.header ion-img {
    display: block;
    flex: 0 0 84px !important;
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    margin-inline-start: 8px !important;
    margin-inline-end: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    background: transparent url("/assets/header-logo.webp?v=1") center / contain no-repeat;
}

ion-toolbar.header ion-img::part(image) {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0;
}

@media (min-width: 520px) {
    ion-toolbar.header ion-img {
        flex-basis: 96px !important;
        width: 96px !important;
        min-width: 96px !important;
        max-width: 96px !important;
    }
}