/* Account identity belongs to the shared header, on Home and internal pages. */
.gaia-header-identity .gaia-account-link {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.65rem;
    max-width:220px;
    padding:.45rem .75rem;
    border:1px solid var(--border-strong);
    border-radius:12px;
    background:var(--bg-surface-soft);
    color:var(--text-main);
    font-size:.8rem;
    font-weight:650;
    line-height:1.3;
    overflow-wrap:anywhere;
    text-decoration:none;
}
.gaia-header-identity .gaia-account-link span {
    color:var(--gaia-brand-green);
    font-size:.6rem;
    flex:none;
}
.gaia-header-identity .gaia-account-link:hover,
.gaia-header-identity .gaia-account-link-active {
    color:var(--text-main);
    border-color:var(--gaia-brand-blue);
}
.gaia-header-identity .gaia-account-link:focus-visible {
    outline:3px solid var(--gaia-brand-gold);
    outline-offset:4px;
}
@media (max-width:560px) {
    .gaia-header-identity .gaia-account-link { max-width:150px; }
}

/* The central account column is independent of the language/theme controls. */
.gaia-header.gaia-header-account {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    grid-template-areas:"heading identity controls";
    gap:.8rem;
}
.gaia-header-account .header-left { grid-area:heading; min-width:0; overflow:hidden; }
.gaia-header-account .page-title { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.gaia-header-account .page-subtitle { min-width:0; }
.gaia-header-account .header-right { grid-area:controls; justify-self:end; min-width:0; }
.gaia-header-identity {
    grid-area:identity;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:.5rem;
    min-width:0;
}
.gaia-header-network {
    display:inline-flex;
    align-items:center;
    gap:.4rem;
    padding:.32rem .6rem;
    border:1px solid currentColor;
    border-radius:999px;
    font-size:.73rem;
    font-weight:700;
    line-height:1.3;
    white-space:nowrap;
}
.gaia-header-network>span { font-size:.55rem; }
.gaia-network-mainnet { color:#4ade80; background:rgba(74,222,128,.08); }
.gaia-network-testnet { color:#ff6b6b; background:rgba(255,107,107,.08); }
body[data-theme="light"] .gaia-network-mainnet { color:#137333; background:#edf8f0; }
body[data-theme="light"] .gaia-network-testnet { color:#c62828; background:#fff0f0; }
@media (max-width:1250px) {
    .gaia-header-account .page-subtitle { display:none; }
    .gaia-header-account .topbar-label { display:none; }
}
@media (max-width:640px) {
    .gaia-header.gaia-header-account {
        grid-template-columns:minmax(0,1fr) auto;
        grid-template-areas:"heading controls" "identity identity";
        row-gap:.55rem;
    }
    .gaia-header-account .header-left { width:100%; }
    .gaia-header-identity { padding-bottom:.15rem; }
    .gaia-header-identity .gaia-account-link { max-width:220px; }
}
